@mhmo91/schmancy 0.4.69 → 0.4.70
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/dist/{animated-text-DhaihRNU.js → animated-text-CMITbL1U.js} +3 -3
- package/dist/{animated-text-DhaihRNU.js.map → animated-text-CMITbL1U.js.map} +1 -1
- package/dist/{animated-text-Bm1G50ol.cjs → animated-text-DefVTtAq.cjs} +2 -2
- package/dist/{animated-text-Bm1G50ol.cjs.map → animated-text-DefVTtAq.cjs.map} +1 -1
- package/dist/animated-text.cjs +1 -1
- package/dist/animated-text.js +1 -1
- package/dist/area.cjs +1 -1
- package/dist/{area.component-Cybfl9fo.js → area.component-CVnJvyK0.js} +3 -3
- package/dist/{area.component-Cybfl9fo.js.map → area.component-CVnJvyK0.js.map} +1 -1
- package/dist/{area.component-e7ccHmOi.cjs → area.component-CxVp3gZp.cjs} +2 -2
- package/dist/{area.component-e7ccHmOi.cjs.map → area.component-CxVp3gZp.cjs.map} +1 -1
- package/dist/area.js +1 -1
- package/dist/{autocomplete-CHPr_eII.js → autocomplete-DTm45vy3.js} +3 -3
- package/dist/{autocomplete-CHPr_eII.js.map → autocomplete-DTm45vy3.js.map} +1 -1
- package/dist/{autocomplete-DhRURo6G.cjs → autocomplete-DZgp2iwf.cjs} +2 -2
- package/dist/{autocomplete-DhRURo6G.cjs.map → autocomplete-DZgp2iwf.cjs.map} +1 -1
- package/dist/autocomplete.cjs +1 -1
- package/dist/autocomplete.js +1 -1
- package/dist/{avatar-B3rxuPbq.js → avatar-Cp3pBHJ0.js} +54 -53
- package/dist/{avatar-B3rxuPbq.js.map → avatar-Cp3pBHJ0.js.map} +1 -1
- package/dist/{avatar-BREyQJqy.cjs → avatar-Dexe_o7K.cjs} +2 -2
- package/dist/{avatar-BREyQJqy.cjs.map → avatar-Dexe_o7K.cjs.map} +1 -1
- package/dist/badge.cjs +1 -1
- package/dist/badge.js +1 -1
- package/dist/{boat-IQenN8zy.cjs → boat-DTLpjckT.cjs} +2 -2
- package/dist/{boat-IQenN8zy.cjs.map → boat-DTLpjckT.cjs.map} +1 -1
- package/dist/{boat-Ch2Dn8n_.js → boat-DiWtHOng.js} +2 -2
- package/dist/{boat-Ch2Dn8n_.js.map → boat-DiWtHOng.js.map} +1 -1
- package/dist/boat.cjs +1 -1
- package/dist/boat.js +1 -1
- package/dist/busy.cjs +1 -1
- package/dist/busy.js +1 -1
- package/dist/button.cjs +1 -1
- package/dist/button.js +1 -1
- package/dist/card.cjs +1 -1
- package/dist/card.js +1 -1
- package/dist/{checkbox-DTtOgNWH.js → checkbox-CatOf2np.js} +2 -2
- package/dist/{checkbox-DTtOgNWH.js.map → checkbox-CatOf2np.js.map} +1 -1
- package/dist/{checkbox-EV_8e4Q9.cjs → checkbox-DIbnOfL2.cjs} +2 -2
- package/dist/{checkbox-EV_8e4Q9.cjs.map → checkbox-DIbnOfL2.cjs.map} +1 -1
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/{chips-D9bYHkvu.cjs → chips-DtPe3B90.cjs} +2 -2
- package/dist/{chips-D9bYHkvu.cjs.map → chips-DtPe3B90.cjs.map} +1 -1
- package/dist/{chips-xlNsY8Dl.js → chips-zrYIeivA.js} +3 -3
- package/dist/{chips-xlNsY8Dl.js.map → chips-zrYIeivA.js.map} +1 -1
- package/dist/chips.cjs +1 -1
- package/dist/chips.js +1 -1
- package/dist/code-highlight.cjs +1 -1
- package/dist/code-highlight.js +1 -1
- package/dist/{code-preview-Dy4fNmOI.js → code-preview-CnfzlCWq.js} +2 -2
- package/dist/{code-preview-Dy4fNmOI.js.map → code-preview-CnfzlCWq.js.map} +1 -1
- package/dist/{code-preview-CC_QZwlB.cjs → code-preview-DMIT_oTX.cjs} +2 -2
- package/dist/{code-preview-CC_QZwlB.cjs.map → code-preview-DMIT_oTX.cjs.map} +1 -1
- package/dist/components.cjs +1 -1
- package/dist/components.js +1 -1
- package/dist/content-drawer.cjs +1 -1
- package/dist/content-drawer.js +1 -1
- package/dist/{date-range-XTs2K2Rp.cjs → date-range-CAAjykaN.cjs} +2 -2
- package/dist/{date-range-XTs2K2Rp.cjs.map → date-range-CAAjykaN.cjs.map} +1 -1
- package/dist/{date-range-CEhn7Gvg.js → date-range-alXAlxtp.js} +4 -4
- package/dist/{date-range-CEhn7Gvg.js.map → date-range-alXAlxtp.js.map} +1 -1
- package/dist/{date-range-inline-BW6v6aDq.cjs → date-range-inline-DCYLf0py.cjs} +2 -2
- package/dist/{date-range-inline-BW6v6aDq.cjs.map → date-range-inline-DCYLf0py.cjs.map} +1 -1
- package/dist/{date-range-inline-D-F8YwDL.js → date-range-inline-GGJ-b5Ji.js} +3 -3
- package/dist/{date-range-inline-D-F8YwDL.js.map → date-range-inline-GGJ-b5Ji.js.map} +1 -1
- package/dist/date-range-inline.cjs +1 -1
- package/dist/date-range-inline.js +1 -1
- package/dist/date-range.cjs +1 -1
- package/dist/date-range.js +1 -1
- package/dist/{delay-CqcMq7V3.js → delay-BX1HD8i5.js} +12 -12
- package/dist/{delay-CqcMq7V3.js.map → delay-BX1HD8i5.js.map} +1 -1
- package/dist/{delay-BYwpzSYY.cjs → delay-DnJcmVMd.cjs} +2 -2
- package/dist/{delay-BYwpzSYY.cjs.map → delay-DnJcmVMd.cjs.map} +1 -1
- package/dist/delay.cjs +1 -1
- package/dist/delay.js +1 -1
- package/dist/{details-C9Vr2c8F.cjs → details-B-SW_Fin.cjs} +2 -2
- package/dist/{details-C9Vr2c8F.cjs.map → details-B-SW_Fin.cjs.map} +1 -1
- package/dist/{details-gxjy3noS.js → details-DJdIO2Op.js} +2 -2
- package/dist/{details-gxjy3noS.js.map → details-DJdIO2Op.js.map} +1 -1
- package/dist/details.cjs +1 -1
- package/dist/details.js +1 -1
- package/dist/{dialog-content-CJ21oAff.js → dialog-content-CDfCvaaL.js} +4 -4
- package/dist/{dialog-content-CJ21oAff.js.map → dialog-content-CDfCvaaL.js.map} +1 -1
- package/dist/{dialog-content-DfXB0r6A.cjs → dialog-content-DBlOSail.cjs} +2 -2
- package/dist/{dialog-content-DfXB0r6A.cjs.map → dialog-content-DBlOSail.cjs.map} +1 -1
- package/dist/{dialog-service-ClZa-7cE.cjs → dialog-service-C4ko20zk.cjs} +2 -2
- package/dist/{dialog-service-ClZa-7cE.cjs.map → dialog-service-C4ko20zk.cjs.map} +1 -1
- package/dist/{dialog-service-Dwnyl4Gg.js → dialog-service-DoKaWw88.js} +2 -2
- package/dist/{dialog-service-Dwnyl4Gg.js.map → dialog-service-DoKaWw88.js.map} +1 -1
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.js +2 -2
- package/dist/{divider-Dw3OYKoH.js → divider-TH_rknPx.js} +3 -3
- package/dist/{divider-Dw3OYKoH.js.map → divider-TH_rknPx.js.map} +1 -1
- package/dist/{divider-ZX6UG8fE.cjs → divider-xwxPJtAX.cjs} +2 -2
- package/dist/{divider-ZX6UG8fE.cjs.map → divider-xwxPJtAX.cjs.map} +1 -1
- package/dist/divider.cjs +1 -1
- package/dist/divider.js +1 -1
- package/dist/{dropdown-content-ULdb1NeW.cjs → dropdown-content-BdHciywm.cjs} +2 -2
- package/dist/{dropdown-content-ULdb1NeW.cjs.map → dropdown-content-BdHciywm.cjs.map} +1 -1
- package/dist/{dropdown-content-QWlP1OxV.js → dropdown-content-CSwcyUQ9.js} +3 -3
- package/dist/{dropdown-content-QWlP1OxV.js.map → dropdown-content-CSwcyUQ9.js.map} +1 -1
- package/dist/dropdown.cjs +1 -1
- package/dist/dropdown.js +1 -1
- package/dist/{email-recipients-H9HVkFvE.cjs → email-recipients-B9F9tbTi.cjs} +549 -86
- package/dist/email-recipients-B9F9tbTi.cjs.map +1 -0
- package/dist/{email-recipients-DQ36ickQ.js → email-recipients-BH3-shuO.js} +782 -258
- package/dist/email-recipients-BH3-shuO.js.map +1 -0
- package/dist/extra.cjs +1 -1
- package/dist/extra.js +1 -1
- package/dist/{flex-Cam0G_h7.js → flex-D8gAI_hG.js} +2 -2
- package/dist/{flex-Cam0G_h7.js.map → flex-D8gAI_hG.js.map} +1 -1
- package/dist/{flex-DEiJ9fDk.cjs → flex-DpTCuZUb.cjs} +2 -2
- package/dist/{flex-DEiJ9fDk.cjs.map → flex-DpTCuZUb.cjs.map} +1 -1
- package/dist/{form-EPO5N6pI.js → form-BZjCPbr9.js} +2 -2
- package/dist/{form-EPO5N6pI.js.map → form-BZjCPbr9.js.map} +1 -1
- package/dist/{form-B87v130C.cjs → form-CVRfikGe.cjs} +2 -2
- package/dist/{form-B87v130C.cjs.map → form-CVRfikGe.cjs.map} +1 -1
- package/dist/form.cjs +1 -1
- package/dist/form.js +1 -1
- package/dist/{formField.mixin-B6XjIwKN.js → formField.mixin-Ljb1niLU.js} +2 -2
- package/dist/{formField.mixin-B6XjIwKN.js.map → formField.mixin-Ljb1niLU.js.map} +1 -1
- package/dist/{formField.mixin-Dpx2Zk8-.cjs → formField.mixin-OMhAnwUx.cjs} +2 -2
- package/dist/{formField.mixin-Dpx2Zk8-.cjs.map → formField.mixin-OMhAnwUx.cjs.map} +1 -1
- package/dist/{icon-MrlToWLJ.cjs → icon-DX0oxbGd.cjs} +2 -2
- package/dist/{icon-MrlToWLJ.cjs.map → icon-DX0oxbGd.cjs.map} +1 -1
- package/dist/{icon-C6CXTo3Z.js → icon-P0BSH_XX.js} +2 -2
- package/dist/{icon-C6CXTo3Z.js.map → icon-P0BSH_XX.js.map} +1 -1
- package/dist/{icon-button-Csj8jwj8.js → icon-button-CHc7Bgkr.js} +3 -3
- package/dist/{icon-button-Csj8jwj8.js.map → icon-button-CHc7Bgkr.js.map} +1 -1
- package/dist/{icon-button-BwAStx3H.cjs → icon-button-GkluRkNE.cjs} +2 -2
- package/dist/{icon-button-BwAStx3H.cjs.map → icon-button-GkluRkNE.cjs.map} +1 -1
- package/dist/icons.cjs +1 -1
- package/dist/icons.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +225 -224
- package/dist/index.js.map +1 -1
- package/dist/{input-B9PDbNB9.js → input-BxzFCM0j.js} +3 -3
- package/dist/{input-B9PDbNB9.js.map → input-BxzFCM0j.js.map} +1 -1
- package/dist/{input-D4L413yG.cjs → input-qI9CER23.cjs} +2 -2
- package/dist/{input-D4L413yG.cjs.map → input-qI9CER23.cjs.map} +1 -1
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.js +1 -1
- package/dist/{list-DLUbjS69.cjs → list-BBCV7EZh.cjs} +2 -2
- package/dist/{list-DLUbjS69.cjs.map → list-BBCV7EZh.cjs.map} +1 -1
- package/dist/{list-Cdd7ht2E.js → list-CD6Ue96E.js} +2 -2
- package/dist/{list-Cdd7ht2E.js.map → list-CD6Ue96E.js.map} +1 -1
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/{litElement.mixin-BYVS1wwl.js → litElement.mixin-BSsJVIyj.js} +2 -2
- package/dist/{litElement.mixin-BYVS1wwl.js.map → litElement.mixin-BSsJVIyj.js.map} +1 -1
- package/dist/{litElement.mixin-CbFQ2uxn.cjs → litElement.mixin-D8xYT3dQ.cjs} +2 -2
- package/dist/{litElement.mixin-CbFQ2uxn.cjs.map → litElement.mixin-D8xYT3dQ.cjs.map} +1 -1
- package/dist/mailbox.cjs +1 -1
- package/dist/mailbox.js +1 -1
- package/dist/{map-DxUajvGo.cjs → map-CVeIZTSC.cjs} +2 -2
- package/dist/{map-DxUajvGo.cjs.map → map-CVeIZTSC.cjs.map} +1 -1
- package/dist/{map-DmjQ1Izx.js → map-D637QcQS.js} +2 -2
- package/dist/{map-DmjQ1Izx.js.map → map-D637QcQS.js.map} +1 -1
- package/dist/map.cjs +1 -1
- package/dist/map.js +1 -1
- package/dist/{media-DPurU9FS.js → media-CXv34EUE.js} +2 -2
- package/dist/{media-DPurU9FS.js.map → media-CXv34EUE.js.map} +1 -1
- package/dist/{media-DCIVM-cE.cjs → media-ng9D3LV4.cjs} +2 -2
- package/dist/{media-DCIVM-cE.cjs.map → media-ng9D3LV4.cjs.map} +1 -1
- package/dist/{menu-CwRGjbC-.js → menu-B5aEANFb.js} +3 -3
- package/dist/{menu-CwRGjbC-.js.map → menu-B5aEANFb.js.map} +1 -1
- package/dist/{menu-CIObvZ7n.cjs → menu-BKqFx_Sg.cjs} +2 -2
- package/dist/{menu-CIObvZ7n.cjs.map → menu-BKqFx_Sg.cjs.map} +1 -1
- package/dist/menu.cjs +1 -1
- package/dist/menu.js +1 -1
- package/dist/nav-drawer.cjs +1 -1
- package/dist/nav-drawer.js +1 -1
- package/dist/{notification-service-BMnjQVrQ.cjs → notification-service-BL_SA5r6.cjs} +2 -2
- package/dist/{notification-service-BMnjQVrQ.cjs.map → notification-service-BL_SA5r6.cjs.map} +1 -1
- package/dist/{notification-service-DypTYarw.js → notification-service-BO0LiH62.js} +4 -4
- package/dist/{notification-service-DypTYarw.js.map → notification-service-BO0LiH62.js.map} +1 -1
- package/dist/notification.cjs +1 -1
- package/dist/notification.js +2 -2
- package/dist/{notify-CqCSy8Ek.cjs → notify-DiIsT6_U.cjs} +2 -2
- package/dist/{notify-CqCSy8Ek.cjs.map → notify-DiIsT6_U.cjs.map} +1 -1
- package/dist/{notify-DUMaApt7.js → notify-sR_wpqSL.js} +2 -2
- package/dist/{notify-DUMaApt7.js.map → notify-sR_wpqSL.js.map} +1 -1
- package/dist/{option-BuN5MSy7.cjs → option-Bna3I9yk.cjs} +2 -2
- package/dist/{option-BuN5MSy7.cjs.map → option-Bna3I9yk.cjs.map} +1 -1
- package/dist/{option-CvjLp3CB.js → option-Wdzvm3xE.js} +2 -2
- package/dist/{option-CvjLp3CB.js.map → option-Wdzvm3xE.js.map} +1 -1
- package/dist/option.cjs +1 -1
- package/dist/option.js +1 -1
- package/dist/{payment-card-form-CFDdmSH2.js → payment-card-form-BanESqh4.js} +3 -3
- package/dist/{payment-card-form-CFDdmSH2.js.map → payment-card-form-BanESqh4.js.map} +1 -1
- package/dist/{payment-card-form-C9VN_H07.cjs → payment-card-form-D_F0Qk8m.cjs} +2 -2
- package/dist/{payment-card-form-C9VN_H07.cjs.map → payment-card-form-D_F0Qk8m.cjs.map} +1 -1
- package/dist/{progress-C-6ieScw.cjs → progress-DWUvgJRQ.cjs} +2 -2
- package/dist/{progress-C-6ieScw.cjs.map → progress-DWUvgJRQ.cjs.map} +1 -1
- package/dist/{progress-BeOOCcPN.js → progress-lCHm-5Qd.js} +2 -2
- package/dist/{progress-BeOOCcPN.js.map → progress-lCHm-5Qd.js.map} +1 -1
- package/dist/progress.cjs +1 -1
- package/dist/progress.js +1 -1
- package/dist/{radio-button-Bi4ywYhW.cjs → radio-button-BgvPoY5w.cjs} +2 -2
- package/dist/{radio-button-Bi4ywYhW.cjs.map → radio-button-BgvPoY5w.cjs.map} +1 -1
- package/dist/{radio-button-D6zvMVQb.js → radio-button-CXX8rL5Z.js} +3 -3
- package/dist/{radio-button-D6zvMVQb.js.map → radio-button-CXX8rL5Z.js.map} +1 -1
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/{schmancy-steps-container-i8rqaPet.cjs → schmancy-steps-container-WmpbfnAv.cjs} +2 -2
- package/dist/{schmancy-steps-container-i8rqaPet.cjs.map → schmancy-steps-container-WmpbfnAv.cjs.map} +1 -1
- package/dist/{schmancy-steps-container-CfDatUf8.js → schmancy-steps-container-dAv2AQ1o.js} +2 -2
- package/dist/{schmancy-steps-container-CfDatUf8.js.map → schmancy-steps-container-dAv2AQ1o.js.map} +1 -1
- package/dist/{select-X7b74OI8.js → select-BFHRO7D1.js} +3 -3
- package/dist/{select-X7b74OI8.js.map → select-BFHRO7D1.js.map} +1 -1
- package/dist/{select-BPkJhj-o.cjs → select-C4ysSiyb.cjs} +2 -2
- package/dist/{select-BPkJhj-o.cjs.map → select-C4ysSiyb.cjs.map} +1 -1
- package/dist/select.cjs +1 -1
- package/dist/select.js +1 -1
- package/dist/sheet-Bm7AdMAf.js +144 -0
- package/dist/sheet-Bm7AdMAf.js.map +1 -0
- package/dist/sheet-BrWQNETX.cjs +52 -0
- package/dist/sheet-BrWQNETX.cjs.map +1 -0
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.js +6 -5
- package/dist/sheet.js.map +1 -1
- package/dist/sheet.service-CgKnOzZN.js +87 -0
- package/dist/sheet.service-CgKnOzZN.js.map +1 -0
- package/dist/sheet.service-DGYkGKzX.cjs +2 -0
- package/dist/sheet.service-DGYkGKzX.cjs.map +1 -0
- package/dist/{slider-py-bz6Vv.js → slider-DtMki7JS.js} +3 -3
- package/dist/{slider-py-bz6Vv.js.map → slider-DtMki7JS.js.map} +1 -1
- package/dist/{slider-DWO4L_qC.cjs → slider-zzIaOtVV.cjs} +2 -2
- package/dist/{slider-DWO4L_qC.cjs.map → slider-zzIaOtVV.cjs.map} +1 -1
- package/dist/slider.cjs +1 -1
- package/dist/slider.js +1 -1
- package/dist/{spinner-Dv1WJaIf.cjs → spinner-DpiguU2b.cjs} +2 -2
- package/dist/{spinner-Dv1WJaIf.cjs.map → spinner-DpiguU2b.cjs.map} +1 -1
- package/dist/{spinner-DpmMO5_E.js → spinner-yQpcUe1F.js} +2 -2
- package/dist/{spinner-DpmMO5_E.js.map → spinner-yQpcUe1F.js.map} +1 -1
- package/dist/steps.cjs +1 -1
- package/dist/steps.js +1 -1
- package/dist/{surface-Bn4-n1lT.cjs → surface-BQkqeqQL.cjs} +2 -2
- package/dist/{surface-Bn4-n1lT.cjs.map → surface-BQkqeqQL.cjs.map} +1 -1
- package/dist/{surface-CFNIITaq.js → surface-uQy_g3S3.js} +2 -2
- package/dist/{surface-CFNIITaq.js.map → surface-uQy_g3S3.js.map} +1 -1
- package/dist/surface.cjs +1 -1
- package/dist/surface.js +1 -1
- package/dist/{table-DNUpAcQk.js → table-D_NfwO-r.js} +2 -2
- package/dist/{table-DNUpAcQk.js.map → table-D_NfwO-r.js.map} +1 -1
- package/dist/{table-A_oEWQzm.cjs → table-P5rTnqC_.cjs} +2 -2
- package/dist/{table-A_oEWQzm.cjs.map → table-P5rTnqC_.cjs.map} +1 -1
- package/dist/table.cjs +1 -1
- package/dist/table.js +1 -1
- package/dist/{tabs-compatibility-Bxoz71f7.js → tabs-compatibility-8_k_UM2J.js} +2 -2
- package/dist/{tabs-compatibility-Bxoz71f7.js.map → tabs-compatibility-8_k_UM2J.js.map} +1 -1
- package/dist/{tabs-compatibility-DNVqDoQh.cjs → tabs-compatibility-BdJ2pRM4.cjs} +2 -2
- package/dist/{tabs-compatibility-DNVqDoQh.cjs.map → tabs-compatibility-BdJ2pRM4.cjs.map} +1 -1
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/tailwind.mixin-BFHdirqy.cjs +2 -0
- package/dist/{tailwind.mixin-BU9fMdfc.cjs.map → tailwind.mixin-BFHdirqy.cjs.map} +1 -1
- package/dist/tailwind.mixin-C3MkWn0v.js +43 -0
- package/dist/{tailwind.mixin-Bpgmqass.js.map → tailwind.mixin-C3MkWn0v.js.map} +1 -1
- package/dist/teleport.cjs +1 -1
- package/dist/teleport.js +1 -1
- package/dist/{textarea-BE5TqYmx.js → textarea-BIa-VJgn.js} +2 -2
- package/dist/{textarea-BE5TqYmx.js.map → textarea-BIa-VJgn.js.map} +1 -1
- package/dist/{textarea-DTlpsJ-V.cjs → textarea-d0QK9I_W.cjs} +2 -2
- package/dist/{textarea-DTlpsJ-V.cjs.map → textarea-d0QK9I_W.cjs.map} +1 -1
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +1 -1
- package/dist/{theme-button-DG8sPYM-.cjs → theme-button-2R4gqt1Z.cjs} +2 -2
- package/dist/{theme-button-DG8sPYM-.cjs.map → theme-button-2R4gqt1Z.cjs.map} +1 -1
- package/dist/{theme-button-BsojGTM7.js → theme-button-BXkmh4nn.js} +2 -2
- package/dist/{theme-button-BsojGTM7.js.map → theme-button-BXkmh4nn.js.map} +1 -1
- package/dist/theme-button.cjs +1 -1
- package/dist/theme-button.js +1 -1
- package/dist/theme.cjs +1 -1
- package/dist/{theme.component-BG4oCMuV.js → theme.component-Cta_ZGr5.js} +2 -2
- package/dist/{theme.component-BG4oCMuV.js.map → theme.component-Cta_ZGr5.js.map} +1 -1
- package/dist/{theme.component-D7TpDD6q.cjs → theme.component-DHuNvHEP.cjs} +3 -3
- package/dist/{theme.component-D7TpDD6q.cjs.map → theme.component-DHuNvHEP.cjs.map} +1 -1
- package/dist/theme.js +1 -1
- package/dist/{timezone-DtsS7reI.js → timezone-DLuRf9_q.js} +3 -3
- package/dist/{timezone-DtsS7reI.js.map → timezone-DLuRf9_q.js.map} +1 -1
- package/dist/{timezone-dc6VVlU0.cjs → timezone-DZMzss0f.cjs} +2 -2
- package/dist/{timezone-dc6VVlU0.cjs.map → timezone-DZMzss0f.cjs.map} +1 -1
- package/dist/{tooltip-C5C8KN_9.js → tooltip-BbSE2kUb.js} +2 -2
- package/dist/{tooltip-C5C8KN_9.js.map → tooltip-BbSE2kUb.js.map} +1 -1
- package/dist/{tooltip-CA2yHZN6.cjs → tooltip-CK-XmbzO.cjs} +2 -2
- package/dist/{tooltip-CA2yHZN6.cjs.map → tooltip-CK-XmbzO.cjs.map} +1 -1
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/{tree-D7CAcAHa.cjs → tree-COFL10bn.cjs} +2 -2
- package/dist/{tree-D7CAcAHa.cjs.map → tree-COFL10bn.cjs.map} +1 -1
- package/dist/{tree-jBMmDqPl.js → tree-DQJIF5Zw.js} +2 -2
- package/dist/{tree-jBMmDqPl.js.map → tree-DQJIF5Zw.js.map} +1 -1
- package/dist/tree.cjs +1 -1
- package/dist/tree.js +1 -1
- package/dist/{typewriter-BMfjokvJ.cjs → typewriter-DTuH_jfH.cjs} +2 -2
- package/dist/{typewriter-BMfjokvJ.cjs.map → typewriter-DTuH_jfH.cjs.map} +1 -1
- package/dist/{typewriter-DDgmwo1Z.js → typewriter-DWfh9dQx.js} +7 -7
- package/dist/{typewriter-DDgmwo1Z.js.map → typewriter-DWfh9dQx.js.map} +1 -1
- package/dist/typewriter.cjs +1 -1
- package/dist/typewriter.js +1 -1
- package/dist/{typography-CeAzj0Al.cjs → typography-CVIqatrO.cjs} +2 -2
- package/dist/{typography-CeAzj0Al.cjs.map → typography-CVIqatrO.cjs.map} +1 -1
- package/dist/{typography-D0JH1nwp.js → typography-CbfOMwD6.js} +2 -2
- package/dist/{typography-D0JH1nwp.js.map → typography-CbfOMwD6.js.map} +1 -1
- package/dist/typography.cjs +1 -1
- package/dist/typography.js +1 -1
- package/package.json +1 -1
- package/types/src/mailbox/email-editor.d.ts +9 -10
- package/types/src/mailbox/email-template-picker.d.ts +64 -0
- package/types/src/mailbox/types.d.ts +3 -0
- package/dist/email-recipients-DQ36ickQ.js.map +0 -1
- package/dist/email-recipients-H9HVkFvE.cjs.map +0 -1
- package/dist/sheet-BBT4JQ3Z.cjs +0 -52
- package/dist/sheet-BBT4JQ3Z.cjs.map +0 -1
- package/dist/sheet-DvCIJGFo.js +0 -228
- package/dist/sheet-DvCIJGFo.js.map +0 -1
- package/dist/tailwind.mixin-BU9fMdfc.cjs +0 -2
- package/dist/tailwind.mixin-Bpgmqass.js +0 -43
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import "rxjs";
|
|
2
2
|
import "lit/directives/class-map.js";
|
|
3
3
|
import "lit/directives/style-map.js";
|
|
4
|
-
import { $ as
|
|
5
|
-
import { T } from "./tailwind.mixin-
|
|
6
|
-
import { property as
|
|
7
|
-
import { css as
|
|
8
|
-
import { when as
|
|
9
|
-
import { createRef as
|
|
4
|
+
import { $ as A } from "./litElement.mixin-BSsJVIyj.js";
|
|
5
|
+
import { T as P } from "./tailwind.mixin-C3MkWn0v.js";
|
|
6
|
+
import { property as d, state as m, customElement as R } from "lit/decorators.js";
|
|
7
|
+
import { css as D, html as c } from "lit";
|
|
8
|
+
import { when as h } from "lit/directives/when.js";
|
|
9
|
+
import { createRef as T, ref as E } from "lit/directives/ref.js";
|
|
10
10
|
import { repeat as I } from "lit/directives/repeat.js";
|
|
11
|
-
import { $ as v } from "./notification-service-
|
|
12
|
-
import "./dialog-content-
|
|
13
|
-
import { $ as
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
import { $ as v } from "./notification-service-BO0LiH62.js";
|
|
12
|
+
import "./dialog-content-CDfCvaaL.js";
|
|
13
|
+
import { $ as L } from "./dialog-service-DoKaWw88.js";
|
|
14
|
+
import { s as j } from "./sheet.service-CgKnOzZN.js";
|
|
15
|
+
var F = Object.defineProperty, B = Object.getOwnPropertyDescriptor, u = (e, t, s, i) => {
|
|
16
|
+
for (var a, n = i > 1 ? void 0 : i ? B(t, s) : t, r = e.length - 1; r >= 0; r--) (a = e[r]) && (n = (i ? a(t, s, n) : a(n)) || n);
|
|
17
|
+
return i && n && F(t, s, n), n;
|
|
17
18
|
};
|
|
18
|
-
let
|
|
19
|
+
let y = class extends A(D`
|
|
19
20
|
:host {
|
|
20
21
|
display: block;
|
|
21
22
|
height: 100%;
|
|
@@ -23,19 +24,19 @@ let p = class extends E(A`
|
|
|
23
24
|
`) {
|
|
24
25
|
constructor() {
|
|
25
26
|
super(...arguments), this.config = {}, this.templates = [], this.importSources = [], this.disabled = !1, this.recipientsTitle = "Recipients", this.recipientsEmptyTitle = "No recipients yet", this.recipientsEmptyMessage = "Import from sources or upload a CSV", this.enableCsvImport = !0, this.enableDragDrop = !0, this.recipients = [], this.selectedRecipients = [], this.subject = "", this.body = "", this.templateId = null, this.attachments = [], this.isSending = !1, this.handleEmailsImported = (e) => {
|
|
26
|
-
const { emails: t } = e.detail,
|
|
27
|
-
this.recipients =
|
|
27
|
+
const { emails: t } = e.detail, s = [.../* @__PURE__ */ new Set([...this.recipients, ...t])], i = t.filter((a) => !this.recipients.includes(a));
|
|
28
|
+
this.recipients = s, this.selectedRecipients = [.../* @__PURE__ */ new Set([...this.selectedRecipients, ...i])], this.dispatchEvent(new CustomEvent("emails-imported", { detail: { emails: i, source: e.detail.source }, bubbles: !0, composed: !0 }));
|
|
28
29
|
}, this.handleRecipientRemoved = (e) => {
|
|
29
30
|
const { email: t } = e.detail;
|
|
30
|
-
this.recipients = this.recipients.filter((
|
|
31
|
+
this.recipients = this.recipients.filter((s) => s !== t), this.selectedRecipients = this.selectedRecipients.filter((s) => s !== t), this.dispatchEvent(new CustomEvent("recipient-removed", { detail: { email: t }, bubbles: !0, composed: !0 }));
|
|
31
32
|
}, this.handleRecipientsCleared = () => {
|
|
32
33
|
this.recipients = [], this.selectedRecipients = [], this.dispatchEvent(new CustomEvent("recipients-cleared", { bubbles: !0, composed: !0 }));
|
|
33
34
|
}, this.handleSelectionChanged = (e) => {
|
|
34
35
|
const { selectedEmails: t } = e.detail;
|
|
35
36
|
this.selectedRecipients = t, this.dispatchEvent(new CustomEvent("selection-changed", { detail: { selectedEmails: t }, bubbles: !0, composed: !0 }));
|
|
36
37
|
}, this.handleEditorChange = (e) => {
|
|
37
|
-
const { subject: t, body:
|
|
38
|
-
this.subject = t, this.body =
|
|
38
|
+
const { subject: t, body: s, templateId: i, attachments: a } = e.detail;
|
|
39
|
+
this.subject = t, this.body = s, this.templateId = i, this.attachments = a, this.dispatchEvent(new CustomEvent("compose-changed", { detail: { subject: t, body: s, templateId: i, attachments: a }, bubbles: !0, composed: !0 }));
|
|
39
40
|
}, this.handleSend = async () => {
|
|
40
41
|
if (this.selectedRecipients.length !== 0) if (this.subject.trim()) if (this.body.trim()) {
|
|
41
42
|
this.isSending = !0;
|
|
@@ -59,8 +60,8 @@ let p = class extends E(A`
|
|
|
59
60
|
super.updated(e), e.has("disabled") && this.setSending(this.disabled);
|
|
60
61
|
}
|
|
61
62
|
addRecipients(e) {
|
|
62
|
-
const t = [.../* @__PURE__ */ new Set([...this.recipients, ...e])],
|
|
63
|
-
this.recipients = t, this.selectedRecipients = [.../* @__PURE__ */ new Set([...this.selectedRecipients, ...
|
|
63
|
+
const t = [.../* @__PURE__ */ new Set([...this.recipients, ...e])], s = e.filter((i) => !this.recipients.includes(i));
|
|
64
|
+
this.recipients = t, this.selectedRecipients = [.../* @__PURE__ */ new Set([...this.selectedRecipients, ...s])];
|
|
64
65
|
}
|
|
65
66
|
setSubject(e) {
|
|
66
67
|
this.subject = e;
|
|
@@ -79,7 +80,7 @@ let p = class extends E(A`
|
|
|
79
80
|
}
|
|
80
81
|
render() {
|
|
81
82
|
const e = this.selectedRecipients.length > 0 && this.subject.trim() && this.body.trim() && !this.isSending && !this.disabled;
|
|
82
|
-
return
|
|
83
|
+
return c`
|
|
83
84
|
<!-- Main Layout Container -->
|
|
84
85
|
<div class="flex flex-col h-full gap-6 p-6">
|
|
85
86
|
|
|
@@ -126,7 +127,7 @@ let p = class extends E(A`
|
|
|
126
127
|
<schmancy-typography type="body" token="sm" class="font-medium">
|
|
127
128
|
${this.selectedRecipients.length} recipient${this.selectedRecipients.length === 1 ? "" : "s"} selected
|
|
128
129
|
</schmancy-typography>
|
|
129
|
-
${
|
|
130
|
+
${h(this.attachments.length > 0, () => c`
|
|
130
131
|
<schmancy-typography type="body" token="xs">
|
|
131
132
|
${this.attachments.length} attachment${this.attachments.length === 1 ? "" : "s"}
|
|
132
133
|
</schmancy-typography>
|
|
@@ -169,9 +170,9 @@ let p = class extends E(A`
|
|
|
169
170
|
`;
|
|
170
171
|
}
|
|
171
172
|
};
|
|
172
|
-
|
|
173
|
-
var
|
|
174
|
-
let z = class extends
|
|
173
|
+
u([d({ type: Object })], y.prototype, "config", 2), u([d({ type: Array })], y.prototype, "templates", 2), u([d({ type: Array })], y.prototype, "importSources", 2), u([d({ type: Boolean })], y.prototype, "disabled", 2), u([d({ type: String })], y.prototype, "recipientsTitle", 2), u([d({ type: String })], y.prototype, "recipientsEmptyTitle", 2), u([d({ type: String })], y.prototype, "recipientsEmptyMessage", 2), u([d({ type: Boolean })], y.prototype, "enableCsvImport", 2), u([d({ type: Boolean })], y.prototype, "enableDragDrop", 2), u([m()], y.prototype, "recipients", 2), u([m()], y.prototype, "selectedRecipients", 2), u([m()], y.prototype, "subject", 2), u([m()], y.prototype, "body", 2), u([m()], y.prototype, "templateId", 2), u([m()], y.prototype, "attachments", 2), u([m()], y.prototype, "isSending", 2), y = u([R("schmancy-mailbox")], y);
|
|
174
|
+
var O = Object.getOwnPropertyDescriptor;
|
|
175
|
+
let z = class extends P() {
|
|
175
176
|
constructor() {
|
|
176
177
|
super(...arguments), this.layouts = [{ id: "columns-2", icon: "view_week", label: "2 Col" }, { id: "columns-3", icon: "view_column", label: "3 Col" }, { id: "sidebar-left", icon: "view_sidebar", label: "Left" }, { id: "sidebar-right", icon: "view_sidebar", label: "Right", flipped: !0 }, { id: "image-row", icon: "collections", label: "Images" }];
|
|
177
178
|
}
|
|
@@ -179,9 +180,9 @@ let z = class extends T() {
|
|
|
179
180
|
this.dispatchEvent(new CustomEvent("layout-select", { detail: { layout: e }, bubbles: !0, composed: !0 }));
|
|
180
181
|
}
|
|
181
182
|
render() {
|
|
182
|
-
return
|
|
183
|
+
return c`
|
|
183
184
|
<div class="grid p-3 gap-2">
|
|
184
|
-
${this.layouts.map((e) =>
|
|
185
|
+
${this.layouts.map((e) => c`
|
|
185
186
|
<schmancy-button
|
|
186
187
|
variant="outlined"
|
|
187
188
|
@click=${() => this.selectLayout(e.id)}
|
|
@@ -200,31 +201,380 @@ let z = class extends T() {
|
|
|
200
201
|
`;
|
|
201
202
|
}
|
|
202
203
|
};
|
|
203
|
-
z = ((e, t,
|
|
204
|
-
for (var a, n =
|
|
204
|
+
z = ((e, t, s, i) => {
|
|
205
|
+
for (var a, n = i > 1 ? void 0 : i ? O(t, s) : t, r = e.length - 1; r >= 0; r--) (a = e[r]) && (n = a(n) || n);
|
|
205
206
|
return n;
|
|
206
|
-
})([
|
|
207
|
-
var
|
|
208
|
-
for (var a, n =
|
|
209
|
-
return
|
|
207
|
+
})([R("schmancy-email-layout-selector")], z);
|
|
208
|
+
var M = Object.defineProperty, H = Object.getOwnPropertyDescriptor, C = (e, t, s, i) => {
|
|
209
|
+
for (var a, n = i > 1 ? void 0 : i ? H(t, s) : t, r = e.length - 1; r >= 0; r--) (a = e[r]) && (n = (i ? a(t, s, n) : a(n)) || n);
|
|
210
|
+
return i && n && M(t, s, n), n;
|
|
210
211
|
};
|
|
211
|
-
let
|
|
212
|
+
let $ = class extends A(D`
|
|
213
|
+
:host {
|
|
214
|
+
display: block;
|
|
215
|
+
}
|
|
216
|
+
`) {
|
|
217
|
+
constructor() {
|
|
218
|
+
super(...arguments), this.templates = [], this.searchQuery = "", this.selectedTemplate = null, this.filteredTemplates = [], this.showPreview = !1, this.selectedCategory = "all", this.handleSearch = (e) => {
|
|
219
|
+
const t = e.target;
|
|
220
|
+
this.searchQuery = t.value;
|
|
221
|
+
}, this.handleCategorySelect = (e) => {
|
|
222
|
+
this.selectedCategory = e, this.updateFilteredTemplates();
|
|
223
|
+
}, this.selectTemplate = (e) => {
|
|
224
|
+
this.selectedTemplate = e, this.showPreview = !0;
|
|
225
|
+
}, this.confirmSelection = () => {
|
|
226
|
+
this.selectedTemplate && (this.dispatchEvent(new CustomEvent("template-selected", { detail: this.selectedTemplate, bubbles: !0, composed: !0 })), j.dismiss());
|
|
227
|
+
}, this.close = () => {
|
|
228
|
+
j.dismiss();
|
|
229
|
+
}, this.backToList = () => {
|
|
230
|
+
this.showPreview = !1, this.selectedTemplate = null;
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
connectedCallback() {
|
|
234
|
+
super.connectedCallback(), this.updateFilteredTemplates();
|
|
235
|
+
}
|
|
236
|
+
updated(e) {
|
|
237
|
+
(e.has("templates") || e.has("searchQuery") || e.has("selectedCategory")) && this.updateFilteredTemplates();
|
|
238
|
+
}
|
|
239
|
+
get categories() {
|
|
240
|
+
const e = /* @__PURE__ */ new Set();
|
|
241
|
+
return this.templates.forEach((t) => {
|
|
242
|
+
t.category && e.add(t.category);
|
|
243
|
+
}), ["all", ...Array.from(e)];
|
|
244
|
+
}
|
|
245
|
+
updateFilteredTemplates() {
|
|
246
|
+
let e = [...this.templates];
|
|
247
|
+
if (this.selectedCategory !== "all" && (e = e.filter((t) => t.category === this.selectedCategory)), this.searchQuery.trim()) {
|
|
248
|
+
const t = this.searchQuery.toLowerCase();
|
|
249
|
+
e = e.filter((s) => s.name.toLowerCase().includes(t) || s.category?.toLowerCase().includes(t) || s.description?.toLowerCase().includes(t));
|
|
250
|
+
}
|
|
251
|
+
this.filteredTemplates = e;
|
|
252
|
+
}
|
|
253
|
+
render() {
|
|
254
|
+
return c`
|
|
255
|
+
<div class="flex flex-col h-full overflow-hidden">
|
|
256
|
+
<!-- Header -->
|
|
257
|
+
<div class="flex items-center justify-between px-6 py-4 border-b border-outline-variant">
|
|
258
|
+
<div class="flex items-center gap-3">
|
|
259
|
+
<schmancy-icon size="24px" class="text-primary">
|
|
260
|
+
${this.showPreview ? "preview" : "mail"}
|
|
261
|
+
</schmancy-icon>
|
|
262
|
+
<schmancy-typography type="headline" token="md">
|
|
263
|
+
${this.showPreview ? "Template Preview" : "Choose Email Template"}
|
|
264
|
+
</schmancy-typography>
|
|
265
|
+
</div>
|
|
266
|
+
<schmancy-button
|
|
267
|
+
variant="text"
|
|
268
|
+
@click=${this.close}
|
|
269
|
+
class="hover:bg-surface-container rounded-full w-10 h-10 p-0"
|
|
270
|
+
>
|
|
271
|
+
<schmancy-icon>close</schmancy-icon>
|
|
272
|
+
</schmancy-button>
|
|
273
|
+
</div>
|
|
274
|
+
|
|
275
|
+
<!-- Body -->
|
|
276
|
+
<div class="flex-1 flex flex-col overflow-hidden">
|
|
277
|
+
${h(this.showPreview && this.selectedTemplate, () => this.renderPreview(), () => this.renderTemplateList())}
|
|
278
|
+
</div>
|
|
279
|
+
|
|
280
|
+
<!-- Footer -->
|
|
281
|
+
<div class="flex justify-between px-6 py-4 border-t border-outline-variant bg-surface-containerLow">
|
|
282
|
+
${h(this.showPreview, () => c`
|
|
283
|
+
<schmancy-button
|
|
284
|
+
variant="outlined"
|
|
285
|
+
@click=${this.backToList}
|
|
286
|
+
class="px-6 py-3"
|
|
287
|
+
>
|
|
288
|
+
<schmancy-icon slot="prefix">arrow_back</schmancy-icon>
|
|
289
|
+
Back to Templates
|
|
290
|
+
</schmancy-button>
|
|
291
|
+
<schmancy-button
|
|
292
|
+
variant="filled"
|
|
293
|
+
@click=${this.confirmSelection}
|
|
294
|
+
class="px-8 py-3 bg-primary text-primary-on shadow-md hover:shadow-lg transition-shadow"
|
|
295
|
+
>
|
|
296
|
+
<schmancy-icon slot="prefix">check_circle</schmancy-icon>
|
|
297
|
+
Use This Template
|
|
298
|
+
</schmancy-button>
|
|
299
|
+
`, () => c`
|
|
300
|
+
<div class="flex gap-3">
|
|
301
|
+
<schmancy-button
|
|
302
|
+
variant="text"
|
|
303
|
+
@click=${this.close}
|
|
304
|
+
class="px-6 py-3"
|
|
305
|
+
>
|
|
306
|
+
Cancel
|
|
307
|
+
</schmancy-button>
|
|
308
|
+
</div>
|
|
309
|
+
`)}
|
|
310
|
+
</div>
|
|
311
|
+
</div>
|
|
312
|
+
`;
|
|
313
|
+
}
|
|
314
|
+
renderTemplateList() {
|
|
315
|
+
return c`
|
|
316
|
+
<!-- Search and Filter Bar -->
|
|
317
|
+
<div class="px-6 py-4 border-b border-outline-variant bg-surface-containerLow">
|
|
318
|
+
<div class="flex flex-col gap-4">
|
|
319
|
+
<!-- Search Input -->
|
|
320
|
+
<schmancy-input
|
|
321
|
+
type="search"
|
|
322
|
+
placeholder="Search templates by name, category, or description..."
|
|
323
|
+
.value=${this.searchQuery}
|
|
324
|
+
@input=${this.handleSearch}
|
|
325
|
+
class="w-full"
|
|
326
|
+
>
|
|
327
|
+
<schmancy-icon slot="prefix" size="20px" class="text-surface-onVariant">search</schmancy-icon>
|
|
328
|
+
${h(this.searchQuery, () => c`
|
|
329
|
+
<schmancy-button
|
|
330
|
+
slot="suffix"
|
|
331
|
+
variant="text"
|
|
332
|
+
@click=${() => {
|
|
333
|
+
this.searchQuery = "";
|
|
334
|
+
}}
|
|
335
|
+
class="rounded-full w-8 h-8 p-0"
|
|
336
|
+
>
|
|
337
|
+
<schmancy-icon size="16px">close</schmancy-icon>
|
|
338
|
+
</schmancy-button>
|
|
339
|
+
`)}
|
|
340
|
+
</schmancy-input>
|
|
341
|
+
|
|
342
|
+
<!-- Category Filter -->
|
|
343
|
+
${h(this.categories.length > 1, () => c`
|
|
344
|
+
<div class="flex gap-2 flex-wrap">
|
|
345
|
+
${I(this.categories, (e) => e, (e) => c`
|
|
346
|
+
<schmancy-chip
|
|
347
|
+
class="cursor-pointer transition-all hover:shadow-sm ${this.selectedCategory === e ? "bg-primary text-primary-on" : "border border-outline"}"
|
|
348
|
+
@click=${() => this.handleCategorySelect(e)}
|
|
349
|
+
>
|
|
350
|
+
${e === "all" ? "All Templates" : e}
|
|
351
|
+
</schmancy-chip>
|
|
352
|
+
`)}
|
|
353
|
+
</div>
|
|
354
|
+
`)}
|
|
355
|
+
</div>
|
|
356
|
+
</div>
|
|
357
|
+
|
|
358
|
+
<!-- Template List -->
|
|
359
|
+
<div class="flex-1 overflow-y-auto px-6 py-6">
|
|
360
|
+
${h(this.filteredTemplates.length > 0, () => c`
|
|
361
|
+
<div class="space-y-4">
|
|
362
|
+
${I(this.filteredTemplates, (e) => e.id, (e) => c`
|
|
363
|
+
<schmancy-surface
|
|
364
|
+
type="containerLow"
|
|
365
|
+
elevation="1"
|
|
366
|
+
rounded="all"
|
|
367
|
+
class="group cursor-pointer hover:elevation-3 transition-all duration-200 p-4"
|
|
368
|
+
@click=${() => this.selectTemplate(e)}
|
|
369
|
+
>
|
|
370
|
+
<div class="flex items-start justify-between gap-4">
|
|
371
|
+
<div class="flex-1">
|
|
372
|
+
<!-- Template Header -->
|
|
373
|
+
<div class="flex items-start justify-between mb-2">
|
|
374
|
+
<schmancy-typography type="title" token="md" class="font-semibold leading-tight">
|
|
375
|
+
${e.name}
|
|
376
|
+
</schmancy-typography>
|
|
377
|
+
${h(e.isDefault, () => c`
|
|
378
|
+
<schmancy-chip class="bg-primary text-primary-on text-xs">
|
|
379
|
+
<schmancy-icon slot="prefix" size="12px">star</schmancy-icon>
|
|
380
|
+
Default
|
|
381
|
+
</schmancy-chip>
|
|
382
|
+
`)}
|
|
383
|
+
</div>
|
|
384
|
+
|
|
385
|
+
<!-- Category Badge -->
|
|
386
|
+
${h(e.category, () => c`
|
|
387
|
+
<div class="mb-2">
|
|
388
|
+
<schmancy-chip class="text-xs border border-outline">
|
|
389
|
+
${e.category}
|
|
390
|
+
</schmancy-chip>
|
|
391
|
+
</div>
|
|
392
|
+
`)}
|
|
393
|
+
|
|
394
|
+
<!-- Description -->
|
|
395
|
+
${h(e.description, () => c`
|
|
396
|
+
<schmancy-typography type="body" token="sm" class="text-surface-onVariant leading-relaxed">
|
|
397
|
+
${e.description}
|
|
398
|
+
</schmancy-typography>
|
|
399
|
+
`, () => c`
|
|
400
|
+
<schmancy-typography type="body" token="sm" class="text-surface-onVariant opacity-60 italic">
|
|
401
|
+
No description available
|
|
402
|
+
</schmancy-typography>
|
|
403
|
+
`)}
|
|
404
|
+
</div>
|
|
405
|
+
|
|
406
|
+
<!-- Preview Button -->
|
|
407
|
+
<div class="flex-shrink-0">
|
|
408
|
+
<schmancy-button variant="outlined" size="sm">
|
|
409
|
+
<schmancy-icon slot="prefix">preview</schmancy-icon>
|
|
410
|
+
Preview
|
|
411
|
+
</schmancy-button>
|
|
412
|
+
</div>
|
|
413
|
+
</div>
|
|
414
|
+
</schmancy-surface>
|
|
415
|
+
`)}
|
|
416
|
+
</div>
|
|
417
|
+
`, () => c`
|
|
418
|
+
<div class="flex flex-col items-center justify-center h-96 text-center">
|
|
419
|
+
<div class="mb-6">
|
|
420
|
+
<schmancy-icon size="64px" class="text-surface-onVariant opacity-20">mail_outline</schmancy-icon>
|
|
421
|
+
</div>
|
|
422
|
+
<schmancy-typography type="headline" token="sm" class="mb-2">
|
|
423
|
+
${this.searchQuery || this.selectedCategory !== "all" ? "No templates found" : "No templates available"}
|
|
424
|
+
</schmancy-typography>
|
|
425
|
+
<schmancy-typography type="body" token="md" class="text-surface-onVariant mb-6 max-w-md">
|
|
426
|
+
${this.searchQuery ? `No templates match your search for "${this.searchQuery}"` : this.selectedCategory !== "all" ? `No templates found in the "${this.selectedCategory}" category` : "Start by creating your first email template"}
|
|
427
|
+
</schmancy-typography>
|
|
428
|
+
${h(this.searchQuery || this.selectedCategory !== "all", () => c`
|
|
429
|
+
<div class="flex gap-3">
|
|
430
|
+
${h(this.searchQuery, () => c`
|
|
431
|
+
<schmancy-button
|
|
432
|
+
variant="outlined"
|
|
433
|
+
@click=${() => {
|
|
434
|
+
this.searchQuery = "";
|
|
435
|
+
}}
|
|
436
|
+
>
|
|
437
|
+
<schmancy-icon slot="prefix">clear</schmancy-icon>
|
|
438
|
+
Clear Search
|
|
439
|
+
</schmancy-button>
|
|
440
|
+
`)}
|
|
441
|
+
${h(this.selectedCategory !== "all", () => c`
|
|
442
|
+
<schmancy-button
|
|
443
|
+
variant="filled"
|
|
444
|
+
@click=${() => this.handleCategorySelect("all")}
|
|
445
|
+
>
|
|
446
|
+
<schmancy-icon slot="prefix">view_list</schmancy-icon>
|
|
447
|
+
Show All Templates
|
|
448
|
+
</schmancy-button>
|
|
449
|
+
`)}
|
|
450
|
+
</div>
|
|
451
|
+
`)}
|
|
452
|
+
</div>
|
|
453
|
+
`)}
|
|
454
|
+
</div>
|
|
455
|
+
`;
|
|
456
|
+
}
|
|
457
|
+
renderPreview() {
|
|
458
|
+
return this.selectedTemplate ? c`
|
|
459
|
+
<div class="flex-1 overflow-y-auto">
|
|
460
|
+
<!-- Template Header Section -->
|
|
461
|
+
<div class="px-6 py-6 border-b border-outline-variant bg-surface-containerLow">
|
|
462
|
+
<div class="flex items-start gap-6">
|
|
463
|
+
<!-- Template Thumbnail -->
|
|
464
|
+
${h(this.selectedTemplate.thumbnail, () => c`
|
|
465
|
+
<div class="flex-shrink-0">
|
|
466
|
+
<schmancy-surface elevation="2" rounded="all" class="overflow-hidden w-32 h-24">
|
|
467
|
+
<img
|
|
468
|
+
src=${this.selectedTemplate.thumbnail}
|
|
469
|
+
alt=${this.selectedTemplate.name}
|
|
470
|
+
class="w-full h-full object-cover"
|
|
471
|
+
/>
|
|
472
|
+
</schmancy-surface>
|
|
473
|
+
</div>
|
|
474
|
+
`, () => c`
|
|
475
|
+
<div class="flex-shrink-0">
|
|
476
|
+
<schmancy-surface elevation="1" rounded="all" class="w-32 h-24 bg-gradient-to-br from-surface-container to-surface-containerLow flex items-center justify-center">
|
|
477
|
+
<schmancy-icon size="32px" class="text-surface-onVariant opacity-40">mail</schmancy-icon>
|
|
478
|
+
</schmancy-surface>
|
|
479
|
+
</div>
|
|
480
|
+
`)}
|
|
481
|
+
|
|
482
|
+
<!-- Template Info -->
|
|
483
|
+
<div class="flex-1">
|
|
484
|
+
<div class="flex items-start justify-between mb-3">
|
|
485
|
+
<schmancy-typography type="headline" token="lg" class="font-semibold">
|
|
486
|
+
${this.selectedTemplate.name}
|
|
487
|
+
</schmancy-typography>
|
|
488
|
+
${h(this.selectedTemplate.isDefault, () => c`
|
|
489
|
+
<schmancy-chip class="bg-primary text-primary-on">
|
|
490
|
+
<schmancy-icon slot="prefix" size="12px">star</schmancy-icon>
|
|
491
|
+
Default
|
|
492
|
+
</schmancy-chip>
|
|
493
|
+
`)}
|
|
494
|
+
</div>
|
|
495
|
+
|
|
496
|
+
<div class="flex flex-wrap gap-2 mb-3">
|
|
497
|
+
${h(this.selectedTemplate.category, () => c`
|
|
498
|
+
<schmancy-chip class="border border-outline">
|
|
499
|
+
<schmancy-icon slot="prefix" size="12px">category</schmancy-icon>
|
|
500
|
+
${this.selectedTemplate.category}
|
|
501
|
+
</schmancy-chip>
|
|
502
|
+
`)}
|
|
503
|
+
${h(this.selectedTemplate.createdAt, () => c`
|
|
504
|
+
<schmancy-chip class="border border-outline">
|
|
505
|
+
<schmancy-icon slot="prefix" size="12px">schedule</schmancy-icon>
|
|
506
|
+
Created ${new Date(this.selectedTemplate.createdAt).toLocaleDateString()}
|
|
507
|
+
</schmancy-chip>
|
|
508
|
+
`)}
|
|
509
|
+
</div>
|
|
510
|
+
|
|
511
|
+
${h(this.selectedTemplate.description, () => c`
|
|
512
|
+
<schmancy-typography type="body" token="md" class="text-surface-onVariant leading-relaxed">
|
|
513
|
+
${this.selectedTemplate.description}
|
|
514
|
+
</schmancy-typography>
|
|
515
|
+
`)}
|
|
516
|
+
</div>
|
|
517
|
+
</div>
|
|
518
|
+
</div>
|
|
519
|
+
|
|
520
|
+
<!-- Template Content -->
|
|
521
|
+
<div class="px-6 py-6 space-y-8">
|
|
522
|
+
<!-- Subject Preview -->
|
|
523
|
+
<div>
|
|
524
|
+
<div class="flex items-center gap-2 mb-4">
|
|
525
|
+
<schmancy-icon size="20px" class="text-primary">subject</schmancy-icon>
|
|
526
|
+
<schmancy-typography type="title" token="md" class="text-primary">
|
|
527
|
+
Subject Line
|
|
528
|
+
</schmancy-typography>
|
|
529
|
+
</div>
|
|
530
|
+
<schmancy-surface elevation="1" type="surface" class="p-4 border-l-4 border-primary">
|
|
531
|
+
<schmancy-typography type="body" token="md" class="font-medium">
|
|
532
|
+
${this.selectedTemplate.subject}
|
|
533
|
+
</schmancy-typography>
|
|
534
|
+
</schmancy-surface>
|
|
535
|
+
</div>
|
|
536
|
+
|
|
537
|
+
<!-- Body Preview -->
|
|
538
|
+
<div>
|
|
539
|
+
<div class="flex items-center gap-2 mb-4">
|
|
540
|
+
<schmancy-icon size="20px" class="text-primary">article</schmancy-icon>
|
|
541
|
+
<schmancy-typography type="title" token="md" class="text-primary">
|
|
542
|
+
Email Preview
|
|
543
|
+
</schmancy-typography>
|
|
544
|
+
</div>
|
|
545
|
+
<schmancy-email-viewer
|
|
546
|
+
subject=${this.selectedTemplate.subject}
|
|
547
|
+
body=${this.selectedTemplate.body}
|
|
548
|
+
mode="desktop"
|
|
549
|
+
></schmancy-email-viewer>
|
|
550
|
+
</div>
|
|
551
|
+
</div>
|
|
552
|
+
</div>
|
|
553
|
+
` : null;
|
|
554
|
+
}
|
|
555
|
+
};
|
|
556
|
+
C([d({ type: Array })], $.prototype, "templates", 2), C([m()], $.prototype, "searchQuery", 2), C([m()], $.prototype, "selectedTemplate", 2), C([m()], $.prototype, "filteredTemplates", 2), C([m()], $.prototype, "showPreview", 2), C([m()], $.prototype, "selectedCategory", 2), $ = C([R("schmancy-email-template-picker")], $);
|
|
557
|
+
var V = Object.defineProperty, U = Object.getOwnPropertyDescriptor, x = (e, t, s, i) => {
|
|
558
|
+
for (var a, n = i > 1 ? void 0 : i ? U(t, s) : t, r = e.length - 1; r >= 0; r--) (a = e[r]) && (n = (i ? a(t, s, n) : a(n)) || n);
|
|
559
|
+
return i && n && V(t, s, n), n;
|
|
560
|
+
};
|
|
561
|
+
let b = class extends A(D`
|
|
212
562
|
:host {
|
|
213
563
|
display: block;
|
|
214
564
|
height: 100%;
|
|
215
565
|
}
|
|
216
566
|
`) {
|
|
217
567
|
constructor() {
|
|
218
|
-
super(...arguments), this.subject = "", this.body = "", this.
|
|
568
|
+
super(...arguments), this.subject = "", this.body = "", this.disabled = !1, this.attachments = [], this.config = {}, this.templates = this.getDefaultTemplates(), this.dragOver = !1, this.isUploading = !1, this.subjectInputRef = T(), this.bodyTextAreaRef = T(), this.fileInputRef = T(), this.imageInputRef = T(), this.handleKeyDown = (e) => {
|
|
219
569
|
if (this.disabled) return;
|
|
220
570
|
const t = this.bodyTextAreaRef.value?.shadowRoot?.querySelector("textarea");
|
|
221
571
|
e.key === "Tab" && e.target === t && (e.preventDefault(), this.insertAtCursor(" "));
|
|
222
572
|
}, this.handlePaste = (e) => {
|
|
223
573
|
const t = this.bodyTextAreaRef.value?.shadowRoot?.querySelector("textarea");
|
|
224
574
|
if (this.disabled || document.activeElement !== t) return;
|
|
225
|
-
const
|
|
226
|
-
if (
|
|
227
|
-
const a = i
|
|
575
|
+
const s = e.clipboardData?.items;
|
|
576
|
+
if (s) for (let i = 0; i < s.length; i++) {
|
|
577
|
+
const a = s[i];
|
|
228
578
|
if (a.type.indexOf("image") !== -1) {
|
|
229
579
|
e.preventDefault();
|
|
230
580
|
const n = a.getAsFile();
|
|
@@ -237,21 +587,22 @@ let b = class extends E(A`
|
|
|
237
587
|
this.subject = t.value, this.dispatchChange();
|
|
238
588
|
}, this.handleBodyChange = (e) => {
|
|
239
589
|
this.body = e.detail.value, this.dispatchChange();
|
|
240
|
-
}, this.selectTemplate = (e) => {
|
|
241
|
-
const t = this.templates.find((i) => i.id === e);
|
|
242
|
-
t && (this.subject = t.subject, this.body = t.body, this.selectedTemplate = e, this.dispatchChange());
|
|
243
|
-
}, this.clearTemplate = () => {
|
|
244
|
-
this.subject = "", this.body = "", this.selectedTemplate = null, this.dispatchChange();
|
|
245
590
|
}, this.dispatchChange = () => {
|
|
246
|
-
this.dispatchEvent(new CustomEvent("editor-change", { detail: { subject: this.subject, body: this.body,
|
|
591
|
+
this.dispatchEvent(new CustomEvent("editor-change", { detail: { subject: this.subject, body: this.body, attachments: this.attachments }, bubbles: !0, composed: !0 }));
|
|
247
592
|
}, this.openLayoutDialog = () => {
|
|
248
|
-
|
|
593
|
+
L.component(c`
|
|
249
594
|
<schmancy-email-layout-selector
|
|
250
595
|
@layout-select=${(e) => {
|
|
251
|
-
this.applyLayout(e.detail.layout),
|
|
596
|
+
this.applyLayout(e.detail.layout), L.close();
|
|
252
597
|
}}
|
|
253
598
|
></schmancy-email-layout-selector>
|
|
254
599
|
`);
|
|
600
|
+
}, this.openTemplatePicker = () => {
|
|
601
|
+
const e = new $();
|
|
602
|
+
e.templates = this.templates, e.addEventListener("template-selected", this.handleTemplateSelected), j.open({ component: e, title: "Choose Email Template" });
|
|
603
|
+
}, this.handleTemplateSelected = (e) => {
|
|
604
|
+
const t = e.detail;
|
|
605
|
+
this.subject = t.subject, this.body = t.body, this.dispatchChange(), v.success(`Template "${t.name}" applied successfully`);
|
|
255
606
|
}, this.applyLayout = (e) => {
|
|
256
607
|
const t = { "columns-2": `
|
|
257
608
|
:::layout columns-2
|
|
@@ -353,51 +704,51 @@ Your primary content goes here. This area takes up most of the width while the s
|
|
|
353
704
|
try {
|
|
354
705
|
let t;
|
|
355
706
|
this.config.imageUploadHandler ? t = await this.config.imageUploadHandler(e) : this.config.uploadHandler ? t = await this.config.uploadHandler(e) : (t = await this.createDataUrl(e), v.warning("No upload handler configured. Using local preview."));
|
|
356
|
-
const
|
|
357
|
-
this.insertImageMarkdown(t, e.name,
|
|
707
|
+
const s = await this.getImageDimensions(e);
|
|
708
|
+
this.insertImageMarkdown(t, e.name, s.width, s.height), v.success("Image uploaded successfully");
|
|
358
709
|
} catch {
|
|
359
710
|
v.error("Failed to upload image");
|
|
360
711
|
} finally {
|
|
361
712
|
this.isUploading = !1;
|
|
362
713
|
}
|
|
363
714
|
}
|
|
364
|
-
}, this.createDataUrl = (e) => new Promise((t,
|
|
365
|
-
const
|
|
366
|
-
|
|
715
|
+
}, this.createDataUrl = (e) => new Promise((t, s) => {
|
|
716
|
+
const i = new FileReader();
|
|
717
|
+
i.onload = () => t(i.result), i.onerror = s, i.readAsDataURL(e);
|
|
367
718
|
}), this.getImageDimensions = (e) => new Promise((t) => {
|
|
368
|
-
const
|
|
369
|
-
|
|
370
|
-
t({ width:
|
|
371
|
-
},
|
|
372
|
-
t({ width: 400, height: 300 }), URL.revokeObjectURL(
|
|
373
|
-
},
|
|
374
|
-
}), this.insertImageMarkdown = (e, t,
|
|
719
|
+
const s = new Image();
|
|
720
|
+
s.onload = () => {
|
|
721
|
+
t({ width: s.width, height: s.height }), URL.revokeObjectURL(s.src);
|
|
722
|
+
}, s.onerror = () => {
|
|
723
|
+
t({ width: 400, height: 300 }), URL.revokeObjectURL(s.src);
|
|
724
|
+
}, s.src = URL.createObjectURL(e);
|
|
725
|
+
}), this.insertImageMarkdown = (e, t, s, i) => {
|
|
375
726
|
const a = this.bodyTextAreaRef.value?.shadowRoot?.querySelector("textarea");
|
|
376
727
|
if (!a) return;
|
|
377
|
-
const n = `{width=${Math.min(
|
|
378
|
-
this.body =
|
|
379
|
-
const
|
|
380
|
-
if (
|
|
381
|
-
const
|
|
382
|
-
|
|
728
|
+
const n = `{width=${Math.min(s, 600)}px height=auto}`, r = a.selectionStart, o = a.selectionEnd, l = this.body.substring(0, r) + n + this.body.substring(o);
|
|
729
|
+
this.body = l, this.dispatchChange(), this.updateComplete.then(() => {
|
|
730
|
+
const p = this.bodyTextAreaRef.value?.shadowRoot?.querySelector("textarea");
|
|
731
|
+
if (p) {
|
|
732
|
+
const k = r + n.length;
|
|
733
|
+
p.setSelectionRange(k, k), p.focus();
|
|
383
734
|
}
|
|
384
735
|
});
|
|
385
736
|
}, this.handleFileChange = (e) => {
|
|
386
|
-
const t = e.target,
|
|
387
|
-
if (
|
|
388
|
-
const a = i
|
|
737
|
+
const t = e.target, s = t.files;
|
|
738
|
+
if (s) for (let i = 0; i < s.length; i++) {
|
|
739
|
+
const a = s[i];
|
|
389
740
|
a.type.startsWith("image/") ? this.uploadImage(a) : this.addFile(a);
|
|
390
741
|
}
|
|
391
742
|
t.value = "";
|
|
392
743
|
}, this.handleImageSelect = (e) => {
|
|
393
|
-
const t = e.target,
|
|
394
|
-
|
|
744
|
+
const t = e.target, s = t.files?.[0];
|
|
745
|
+
s && s.type.startsWith("image/") && this.uploadImage(s), t.value = "";
|
|
395
746
|
}, this.handleDrop = (e) => {
|
|
396
747
|
e.preventDefault(), this.dragOver = !1;
|
|
397
748
|
const t = e.dataTransfer?.files;
|
|
398
|
-
if (t) for (let
|
|
399
|
-
const
|
|
400
|
-
|
|
749
|
+
if (t) for (let s = 0; s < t.length; s++) {
|
|
750
|
+
const i = t[s];
|
|
751
|
+
i.type.startsWith("image/") ? this.uploadImage(i) : this.addFile(i);
|
|
401
752
|
}
|
|
402
753
|
}, this.handleDragEnter = (e) => {
|
|
403
754
|
e.preventDefault(), this.dragOver = !0;
|
|
@@ -411,7 +762,7 @@ Your primary content goes here. This area takes up most of the width while the s
|
|
|
411
762
|
e.preventDefault();
|
|
412
763
|
}, this.addFile = (e) => {
|
|
413
764
|
if (e.size > 10485760) return void v.error(`File "${e.name}" is too large. Maximum size is 10MB.`);
|
|
414
|
-
if (this.attachments.some((
|
|
765
|
+
if (this.attachments.some((s) => s.name === e.name && s.size === e.size)) return void v.warning(`File "${e.name}" is already attached.`);
|
|
415
766
|
const t = { id: crypto.randomUUID(), file: e, name: e.name, size: e.size, type: e.type || "application/octet-stream" };
|
|
416
767
|
this.attachments = [...this.attachments, t], this.dispatchChange();
|
|
417
768
|
}, this.removeAttachment = (e) => {
|
|
@@ -424,6 +775,198 @@ Your primary content goes here. This area takes up most of the width while the s
|
|
|
424
775
|
disconnectedCallback() {
|
|
425
776
|
super.disconnectedCallback(), document.removeEventListener("paste", this.handlePaste), document.removeEventListener("dragenter", this.handleDragEnter), document.removeEventListener("dragleave", this.handleDocumentDragLeave), document.removeEventListener("drop", this.handleDocumentDrop);
|
|
426
777
|
}
|
|
778
|
+
getDefaultTemplates() {
|
|
779
|
+
return [{ id: "welcome", name: "Welcome Email", subject: "Welcome to Our Community! 🌟", description: "A warm welcome message for new users", category: "onboarding", body: `# Welcome to Our Community!
|
|
780
|
+
|
|
781
|
+
We're thrilled to have you on board. Thank you for joining us on this journey.
|
|
782
|
+
|
|
783
|
+
## What's Next?
|
|
784
|
+
|
|
785
|
+
* **Explore** your dashboard and discover all the features
|
|
786
|
+
* **Connect** with other community members
|
|
787
|
+
* **Get support** whenever you need it - we're here to help
|
|
788
|
+
|
|
789
|
+
---
|
|
790
|
+
|
|
791
|
+
*Need assistance? Simply reply to this email and we'll get back to you within 24 hours.*
|
|
792
|
+
|
|
793
|
+
Best regards,
|
|
794
|
+
The Team` }, { id: "newsletter", name: "Newsletter", subject: "Weekly Insights & Updates", description: "Regular newsletter template with updates and insights", category: "communication", body: `# This Week's Highlights
|
|
795
|
+
|
|
796
|
+
## Featured Story
|
|
797
|
+
|
|
798
|
+
**[Article Title]**
|
|
799
|
+
Brief description of the main story or update that you want to highlight this week.
|
|
800
|
+
|
|
801
|
+
[Read More](https://example.com)
|
|
802
|
+
|
|
803
|
+
## Quick Updates
|
|
804
|
+
|
|
805
|
+
* **Update 1**: Brief description of an important update
|
|
806
|
+
* **Update 2**: Another noteworthy development
|
|
807
|
+
* **Update 3**: Additional news worth sharing
|
|
808
|
+
|
|
809
|
+
## Upcoming Events
|
|
810
|
+
|
|
811
|
+
**[Event Name]** - *Date*
|
|
812
|
+
Short description of the upcoming event.
|
|
813
|
+
|
|
814
|
+
---
|
|
815
|
+
|
|
816
|
+
*Thanks for reading! Forward this to a friend who might enjoy it.*
|
|
817
|
+
|
|
818
|
+
Until next week,
|
|
819
|
+
The Team` }, { id: "product-launch", name: "Product Launch", subject: "Introducing Our Latest Innovation 🚀", description: "Announce new products or features", category: "marketing", body: `# Something Amazing is Here
|
|
820
|
+
|
|
821
|
+
We've been working hard behind the scenes, and today we're excited to introduce our latest creation.
|
|
822
|
+
|
|
823
|
+
## Key Features
|
|
824
|
+
|
|
825
|
+
* **Feature 1**: Benefit that matters to your users
|
|
826
|
+
* **Feature 2**: Another compelling capability
|
|
827
|
+
* **Feature 3**: The feature that sets you apart
|
|
828
|
+
|
|
829
|
+
## Early Access
|
|
830
|
+
|
|
831
|
+
As a valued member, you get **exclusive early access** starting today.
|
|
832
|
+
|
|
833
|
+
[Get Started Now](https://example.com)
|
|
834
|
+
|
|
835
|
+
---
|
|
836
|
+
|
|
837
|
+
*Questions? We'd love to hear from you. Just hit reply!*
|
|
838
|
+
|
|
839
|
+
Best,
|
|
840
|
+
The Product Team` }, { id: "event-invitation", name: "Event Invitation", subject: "You're Invited: [Event Name]", description: "Professional event invitation template", category: "events", body: `# You're Invited!
|
|
841
|
+
|
|
842
|
+
## [Event Name]
|
|
843
|
+
|
|
844
|
+
**When**: [Date & Time]
|
|
845
|
+
**Where**: [Location or Virtual Link]
|
|
846
|
+
**Duration**: [Duration]
|
|
847
|
+
|
|
848
|
+
Join us for an exclusive gathering where we'll explore [brief event description].
|
|
849
|
+
|
|
850
|
+
## What to Expect
|
|
851
|
+
|
|
852
|
+
* **Networking** with industry professionals
|
|
853
|
+
* **Insights** from leading experts
|
|
854
|
+
* **Interactive** sessions and discussions
|
|
855
|
+
|
|
856
|
+
## RSVP Required
|
|
857
|
+
|
|
858
|
+
Space is limited, so please confirm your attendance by [RSVP Date].
|
|
859
|
+
|
|
860
|
+
[Confirm Attendance](https://example.com)
|
|
861
|
+
|
|
862
|
+
---
|
|
863
|
+
|
|
864
|
+
*Can't make it? Let us know and we'll share the key highlights with you.*
|
|
865
|
+
|
|
866
|
+
Looking forward to seeing you there,
|
|
867
|
+
The Events Team` }, { id: "thank-you", name: "Thank You", subject: "Thank You - It Means Everything", description: "Express gratitude to customers or supporters", category: "appreciation", body: `# Thank You
|
|
868
|
+
|
|
869
|
+
Your support means the world to us.
|
|
870
|
+
|
|
871
|
+
Whether you've been with us from the beginning or just joined our community, we want you to know how much we appreciate you.
|
|
872
|
+
|
|
873
|
+
## Because of You
|
|
874
|
+
|
|
875
|
+
* We've been able to improve our service
|
|
876
|
+
* Our community has grown stronger
|
|
877
|
+
* We've achieved milestones we never thought possible
|
|
878
|
+
|
|
879
|
+
## What's Next
|
|
880
|
+
|
|
881
|
+
We're committed to continuing to earn your trust and providing even more value in the coming months.
|
|
882
|
+
|
|
883
|
+
---
|
|
884
|
+
|
|
885
|
+
*Your feedback shapes everything we do. Reply anytime with thoughts or suggestions.*
|
|
886
|
+
|
|
887
|
+
With genuine gratitude,
|
|
888
|
+
The Team` }, { id: "feedback-request", name: "Feedback Request", subject: "Your Opinion Matters - 2 Minutes?", description: "Request feedback or reviews from users", category: "feedback", body: `# We'd Love Your Feedback
|
|
889
|
+
|
|
890
|
+
Your experience matters to us, and we're always looking for ways to improve.
|
|
891
|
+
|
|
892
|
+
## Quick Favor?
|
|
893
|
+
|
|
894
|
+
Could you spare **2 minutes** to share your thoughts? Your honest feedback helps us serve you better.
|
|
895
|
+
|
|
896
|
+
[Share Your Feedback](https://example.com)
|
|
897
|
+
|
|
898
|
+
## What We're Asking
|
|
899
|
+
|
|
900
|
+
* How has your experience been so far?
|
|
901
|
+
* What's working well for you?
|
|
902
|
+
* What could we improve?
|
|
903
|
+
|
|
904
|
+
## Thank You Gift
|
|
905
|
+
|
|
906
|
+
As a small token of appreciation, everyone who completes our feedback form receives [incentive].
|
|
907
|
+
|
|
908
|
+
---
|
|
909
|
+
|
|
910
|
+
*Every response is read personally by our team. We take your input seriously.*
|
|
911
|
+
|
|
912
|
+
Thanks in advance,
|
|
913
|
+
The Team` }, { id: "password-reset", name: "Password Reset", subject: "Reset Your Password - Action Required", description: "Secure password reset instructions", category: "security", body: `# Password Reset Request
|
|
914
|
+
|
|
915
|
+
We received a request to reset the password for your account.
|
|
916
|
+
|
|
917
|
+
## Reset Your Password
|
|
918
|
+
|
|
919
|
+
Click the button below to create a new password. This link will expire in **24 hours** for your security.
|
|
920
|
+
|
|
921
|
+
[Reset Password](https://example.com/reset)
|
|
922
|
+
|
|
923
|
+
## Didn't Request This?
|
|
924
|
+
|
|
925
|
+
If you didn't request a password reset, please ignore this email. Your account remains secure.
|
|
926
|
+
|
|
927
|
+
## Need Help?
|
|
928
|
+
|
|
929
|
+
If you're having trouble with the reset process, contact our support team and we'll assist you right away.
|
|
930
|
+
|
|
931
|
+
---
|
|
932
|
+
|
|
933
|
+
*For security reasons, this link can only be used once and expires in 24 hours.*
|
|
934
|
+
|
|
935
|
+
Best regards,
|
|
936
|
+
Security Team` }, { id: "order-confirmation", name: "Order Confirmation", subject: "Order Confirmed - #[ORDER-NUMBER]", description: "Professional order confirmation template", category: "commerce", body: `# Order Confirmation
|
|
937
|
+
|
|
938
|
+
Thanks for your order! We've received your payment and are preparing your items for shipment.
|
|
939
|
+
|
|
940
|
+
## Order Details
|
|
941
|
+
|
|
942
|
+
**Order Number**: #[ORDER-NUMBER]
|
|
943
|
+
**Order Date**: [DATE]
|
|
944
|
+
**Total**: $[AMOUNT]
|
|
945
|
+
|
|
946
|
+
## Items Ordered
|
|
947
|
+
|
|
948
|
+
* **[Item 1]** - Quantity: [QTY] - $[PRICE]
|
|
949
|
+
* **[Item 2]** - Quantity: [QTY] - $[PRICE]
|
|
950
|
+
|
|
951
|
+
## Shipping Information
|
|
952
|
+
|
|
953
|
+
**Address**: [SHIPPING ADDRESS]
|
|
954
|
+
**Method**: [SHIPPING METHOD]
|
|
955
|
+
**Estimated Delivery**: [DELIVERY DATE]
|
|
956
|
+
|
|
957
|
+
## Next Steps
|
|
958
|
+
|
|
959
|
+
You'll receive a tracking number via email once your order ships (usually within 1-2 business days).
|
|
960
|
+
|
|
961
|
+
[Track Your Order](https://example.com/track)
|
|
962
|
+
|
|
963
|
+
---
|
|
964
|
+
|
|
965
|
+
*Questions about your order? Reply to this email or contact our support team.*
|
|
966
|
+
|
|
967
|
+
Thank you for your business,
|
|
968
|
+
The Fulfillment Team` }];
|
|
969
|
+
}
|
|
427
970
|
addKeyboardListeners() {
|
|
428
971
|
this.addEventListener("keydown", this.handleKeyDown), document.addEventListener("paste", this.handlePaste);
|
|
429
972
|
}
|
|
@@ -432,29 +975,29 @@ Your primary content goes here. This area takes up most of the width while the s
|
|
|
432
975
|
}
|
|
433
976
|
insertAtCursor(e, t) {
|
|
434
977
|
if (!this.bodyTextAreaRef.value) return;
|
|
435
|
-
const
|
|
436
|
-
if (!
|
|
437
|
-
const
|
|
978
|
+
const s = this.bodyTextAreaRef.value.shadowRoot?.querySelector("textarea");
|
|
979
|
+
if (!s) return;
|
|
980
|
+
const i = s.selectionStart, a = s.selectionEnd, n = s.value.substring(0, i) + e + s.value.substring(a);
|
|
438
981
|
this.body = n, this.dispatchChange(), this.updateComplete.then(() => {
|
|
439
|
-
const
|
|
440
|
-
if (
|
|
441
|
-
const
|
|
442
|
-
|
|
443
|
-
} else
|
|
982
|
+
const r = this.bodyTextAreaRef.value?.shadowRoot?.querySelector("textarea");
|
|
983
|
+
if (r) if (r.focus(), t) {
|
|
984
|
+
const o = i + e.indexOf(t), l = o + t.length;
|
|
985
|
+
r.setSelectionRange(o, l);
|
|
986
|
+
} else r.setSelectionRange(i + e.length, i + e.length);
|
|
444
987
|
});
|
|
445
988
|
}
|
|
446
|
-
wrapSelection(e, t,
|
|
989
|
+
wrapSelection(e, t, s) {
|
|
447
990
|
if (!this.bodyTextAreaRef.value) return;
|
|
448
|
-
const
|
|
449
|
-
if (!
|
|
450
|
-
const a =
|
|
451
|
-
this.body =
|
|
452
|
-
const
|
|
453
|
-
|
|
991
|
+
const i = this.bodyTextAreaRef.value.shadowRoot?.querySelector("textarea");
|
|
992
|
+
if (!i) return;
|
|
993
|
+
const a = i.selectionStart, n = i.selectionEnd, r = i.value.substring(a, n), o = e + (r || s) + t, l = i.value.substring(0, a) + o + i.value.substring(n);
|
|
994
|
+
this.body = l, this.dispatchChange(), this.updateComplete.then(() => {
|
|
995
|
+
const p = this.bodyTextAreaRef.value?.shadowRoot?.querySelector("textarea");
|
|
996
|
+
p && (p.focus(), r ? p.setSelectionRange(a + o.length, a + o.length) : p.setSelectionRange(a + e.length, a + e.length + s.length));
|
|
454
997
|
});
|
|
455
998
|
}
|
|
456
999
|
render() {
|
|
457
|
-
return
|
|
1000
|
+
return c`
|
|
458
1001
|
<schmancy-surface
|
|
459
1002
|
type="surface"
|
|
460
1003
|
rounded="all"
|
|
@@ -465,44 +1008,15 @@ Your primary content goes here. This area takes up most of the width while the s
|
|
|
465
1008
|
>
|
|
466
1009
|
<div class="flex flex-col h-full gap-4">
|
|
467
1010
|
|
|
468
|
-
<!-- Header Section with
|
|
1011
|
+
<!-- Header Section with Subject -->
|
|
469
1012
|
<div class="flex-shrink-0 p-4 pb-0 space-y-4">
|
|
470
|
-
<!-- Template Selector -->
|
|
471
|
-
${m(this.templates.length > 0, () => l`
|
|
472
|
-
<div class="space-y-3">
|
|
473
|
-
<schmancy-typography type="label" token="md">
|
|
474
|
-
Email Templates
|
|
475
|
-
</schmancy-typography>
|
|
476
|
-
<div class="flex flex-wrap gap-2">
|
|
477
|
-
${I(this.templates, (e) => e.id, (e) => l`
|
|
478
|
-
<schmancy-chip
|
|
479
|
-
?selected=${this.selectedTemplate === e.id}
|
|
480
|
-
@click=${() => this.selectTemplate(e.id)}
|
|
481
|
-
class="text-sm"
|
|
482
|
-
>
|
|
483
|
-
${e.name}
|
|
484
|
-
</schmancy-chip>
|
|
485
|
-
`)}
|
|
486
|
-
${m(this.selectedTemplate, () => l`
|
|
487
|
-
<schmancy-button
|
|
488
|
-
variant="text"
|
|
489
|
-
@click=${this.clearTemplate}
|
|
490
|
-
>
|
|
491
|
-
<schmancy-icon slot="prefix" size="16px">clear</schmancy-icon>
|
|
492
|
-
Clear
|
|
493
|
-
</schmancy-button>
|
|
494
|
-
`)}
|
|
495
|
-
</div>
|
|
496
|
-
</div>
|
|
497
|
-
`)}
|
|
498
|
-
|
|
499
1013
|
<!-- Subject Field -->
|
|
500
1014
|
<div class="space-y-2">
|
|
501
1015
|
<schmancy-typography type="label" token="md">
|
|
502
1016
|
Subject *
|
|
503
1017
|
</schmancy-typography>
|
|
504
1018
|
<schmancy-input
|
|
505
|
-
${
|
|
1019
|
+
${E(this.subjectInputRef)}
|
|
506
1020
|
.value=${this.subject}
|
|
507
1021
|
@input=${this.handleSubjectChange}
|
|
508
1022
|
placeholder="Enter email subject..."
|
|
@@ -588,7 +1102,7 @@ Your primary content goes here. This area takes up most of the width while the s
|
|
|
588
1102
|
?disabled=${this.disabled || this.isUploading}
|
|
589
1103
|
@click=${() => this.imageInputRef.value?.click()}
|
|
590
1104
|
>
|
|
591
|
-
${
|
|
1105
|
+
${h(this.isUploading, () => c`<schmancy-progress size="sm" class="w-4 h-4"></schmancy-progress>`, () => c`<schmancy-icon>image</schmancy-icon>`)}
|
|
592
1106
|
</schmancy-icon-button>
|
|
593
1107
|
<schmancy-icon-button
|
|
594
1108
|
size="sm"
|
|
@@ -597,7 +1111,16 @@ Your primary content goes here. This area takes up most of the width while the s
|
|
|
597
1111
|
?disabled=${this.disabled}
|
|
598
1112
|
@click=${this.openLayoutDialog}
|
|
599
1113
|
>
|
|
600
|
-
<schmancy-icon>
|
|
1114
|
+
<schmancy-icon>mobile_layout</schmancy-icon>
|
|
1115
|
+
</schmancy-icon-button>
|
|
1116
|
+
<schmancy-icon-button
|
|
1117
|
+
size="sm"
|
|
1118
|
+
variant="text"
|
|
1119
|
+
title="Use Template"
|
|
1120
|
+
?disabled=${this.disabled || this.templates.length === 0}
|
|
1121
|
+
@click=${this.openTemplatePicker}
|
|
1122
|
+
>
|
|
1123
|
+
<schmancy-icon>description</schmancy-icon>
|
|
601
1124
|
</schmancy-icon-button>
|
|
602
1125
|
</div>
|
|
603
1126
|
</div>
|
|
@@ -607,7 +1130,7 @@ Your primary content goes here. This area takes up most of the width while the s
|
|
|
607
1130
|
<!-- Textarea Container - Takes remaining space -->
|
|
608
1131
|
<div class="flex-1 px-4 relative min-h-0">
|
|
609
1132
|
<schmancy-textarea
|
|
610
|
-
${
|
|
1133
|
+
${E(this.bodyTextAreaRef)}
|
|
611
1134
|
.value=${this.body}
|
|
612
1135
|
@change=${this.handleBodyChange}
|
|
613
1136
|
placeholder="Enter your email message here...
|
|
@@ -624,7 +1147,7 @@ Tab key inserts 2 spaces for better formatting."
|
|
|
624
1147
|
></schmancy-textarea>
|
|
625
1148
|
|
|
626
1149
|
<!-- Upload Progress Overlay -->
|
|
627
|
-
${
|
|
1150
|
+
${h(this.isUploading, () => c`
|
|
628
1151
|
<div class="absolute top-3 right-3 z-10">
|
|
629
1152
|
<schmancy-surface type="container" rounded="all" class="p-2">
|
|
630
1153
|
<div class="flex items-center gap-2">
|
|
@@ -646,14 +1169,14 @@ Tab key inserts 2 spaces for better formatting."
|
|
|
646
1169
|
</div>
|
|
647
1170
|
|
|
648
1171
|
<!-- Attachments Display (if any) -->
|
|
649
|
-
${
|
|
1172
|
+
${h(this.attachments.length > 0, () => c`
|
|
650
1173
|
<div class="space-y-2">
|
|
651
1174
|
<schmancy-typography type="label" token="sm" class="flex items-center gap-2">
|
|
652
1175
|
<schmancy-icon size="16px">attach_file</schmancy-icon>
|
|
653
1176
|
Attachments (${this.attachments.length})
|
|
654
1177
|
</schmancy-typography>
|
|
655
1178
|
<div class="flex flex-wrap gap-2">
|
|
656
|
-
${I(this.attachments, (e) => e.id, (e) =>
|
|
1179
|
+
${I(this.attachments, (e) => e.id, (e) => c`
|
|
657
1180
|
<schmancy-chip class="text-xs">
|
|
658
1181
|
<span class="truncate max-w-32">${e.name}</span>
|
|
659
1182
|
<button
|
|
@@ -673,13 +1196,13 @@ Tab key inserts 2 spaces for better formatting."
|
|
|
673
1196
|
<!-- Hidden File Inputs -->
|
|
674
1197
|
<div class="hidden">
|
|
675
1198
|
<input
|
|
676
|
-
${
|
|
1199
|
+
${E(this.fileInputRef)}
|
|
677
1200
|
type="file"
|
|
678
1201
|
multiple
|
|
679
1202
|
@change=${this.handleFileChange}
|
|
680
1203
|
>
|
|
681
1204
|
<input
|
|
682
|
-
${
|
|
1205
|
+
${E(this.imageInputRef)}
|
|
683
1206
|
type="file"
|
|
684
1207
|
accept="image/*"
|
|
685
1208
|
@change=${this.handleImageSelect}
|
|
@@ -688,15 +1211,16 @@ Tab key inserts 2 spaces for better formatting."
|
|
|
688
1211
|
|
|
689
1212
|
</div>
|
|
690
1213
|
</schmancy-surface>
|
|
1214
|
+
|
|
691
1215
|
`;
|
|
692
1216
|
}
|
|
693
1217
|
};
|
|
694
|
-
x([
|
|
695
|
-
var
|
|
696
|
-
for (var a, n =
|
|
697
|
-
return
|
|
1218
|
+
x([d({ type: String })], b.prototype, "subject", 2), x([d({ type: String })], b.prototype, "body", 2), x([d({ type: Boolean })], b.prototype, "disabled", 2), x([d({ type: Array })], b.prototype, "attachments", 2), x([d({ type: Object })], b.prototype, "config", 2), x([d({ type: Array })], b.prototype, "templates", 2), x([m()], b.prototype, "dragOver", 2), x([m()], b.prototype, "isUploading", 2), b = x([R("schmancy-email-editor")], b);
|
|
1219
|
+
var W = Object.defineProperty, N = Object.getOwnPropertyDescriptor, S = (e, t, s, i) => {
|
|
1220
|
+
for (var a, n = i > 1 ? void 0 : i ? N(t, s) : t, r = e.length - 1; r >= 0; r--) (a = e[r]) && (n = (i ? a(t, s, n) : a(n)) || n);
|
|
1221
|
+
return i && n && W(t, s, n), n;
|
|
698
1222
|
};
|
|
699
|
-
let
|
|
1223
|
+
let w = class extends A(D`
|
|
700
1224
|
:host {
|
|
701
1225
|
display: block;
|
|
702
1226
|
}
|
|
@@ -705,54 +1229,54 @@ let $ = class extends E(A`
|
|
|
705
1229
|
super(...arguments), this.subject = "", this.body = "", this.attachments = [], this.recipients = [], this.fromAddress = "sender@example.com", this.toAddress = "recipient@example.com", this.viewMode = "html";
|
|
706
1230
|
}
|
|
707
1231
|
parseLayoutBlocks(e) {
|
|
708
|
-
return e.replace(/:::layout\s+([a-zA-Z0-9-]+)\n([\s\S]*?)\n:::/g, (t,
|
|
709
|
-
switch (
|
|
1232
|
+
return e.replace(/:::layout\s+([a-zA-Z0-9-]+)\n([\s\S]*?)\n:::/g, (t, s, i) => {
|
|
1233
|
+
switch (s) {
|
|
710
1234
|
case "columns-2":
|
|
711
|
-
return this.parseColumnsLayout(
|
|
1235
|
+
return this.parseColumnsLayout(i, 2);
|
|
712
1236
|
case "columns-3":
|
|
713
|
-
return this.parseColumnsLayout(
|
|
1237
|
+
return this.parseColumnsLayout(i, 3);
|
|
714
1238
|
case "sidebar-left":
|
|
715
|
-
return this.parseSidebarLayout(
|
|
1239
|
+
return this.parseSidebarLayout(i, "left");
|
|
716
1240
|
case "sidebar-right":
|
|
717
|
-
return this.parseSidebarLayout(
|
|
1241
|
+
return this.parseSidebarLayout(i, "right");
|
|
718
1242
|
case "image-row":
|
|
719
|
-
return this.parseImageRowLayout(
|
|
1243
|
+
return this.parseImageRowLayout(i);
|
|
720
1244
|
default:
|
|
721
|
-
return
|
|
1245
|
+
return i;
|
|
722
1246
|
}
|
|
723
1247
|
});
|
|
724
1248
|
}
|
|
725
1249
|
parseColumnsLayout(e, t) {
|
|
726
|
-
const
|
|
1250
|
+
const s = /<div class="column">([\s\S]*?)<\/div>/g, i = [];
|
|
727
1251
|
let a;
|
|
728
|
-
for (; (a =
|
|
729
|
-
if (
|
|
730
|
-
const n = Math.floor(100 / t),
|
|
731
|
-
let
|
|
732
|
-
for (let
|
|
733
|
-
|
|
734
|
-
<td width="${n}%" style="padding: ${
|
|
735
|
-
${this.parseBasicMarkdown(
|
|
1252
|
+
for (; (a = s.exec(e)) !== null; ) i.push(a[1].trim());
|
|
1253
|
+
if (i.length === 0) return e;
|
|
1254
|
+
const n = Math.floor(100 / t), r = "0 10px 0 0";
|
|
1255
|
+
let o = "<tr>";
|
|
1256
|
+
for (let l = 0; l < t && l < i.length; l++)
|
|
1257
|
+
o += `
|
|
1258
|
+
<td width="${n}%" style="padding: ${l === t - 1 ? "0" : r}; vertical-align: top; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.6; color: #333333;">
|
|
1259
|
+
${this.parseBasicMarkdown(i[l])}
|
|
736
1260
|
</td>`;
|
|
737
|
-
for (let
|
|
738
|
-
|
|
739
|
-
<td width="${n}%" style="padding: ${
|
|
1261
|
+
for (let l = i.length; l < t; l++)
|
|
1262
|
+
o += `
|
|
1263
|
+
<td width="${n}%" style="padding: ${l === t - 1 ? "0" : r}; vertical-align: top;">
|
|
740
1264
|
|
|
741
1265
|
</td>`;
|
|
742
|
-
return
|
|
1266
|
+
return o += "</tr>", `
|
|
743
1267
|
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin: 16px 0;">
|
|
744
|
-
${
|
|
1268
|
+
${o}
|
|
745
1269
|
</table>`;
|
|
746
1270
|
}
|
|
747
1271
|
parseSidebarLayout(e, t) {
|
|
748
|
-
const
|
|
749
|
-
if (!
|
|
1272
|
+
const s = e.match(/<div class="sidebar">([\s\S]*?)<\/div>/), i = e.match(/<div class="main">([\s\S]*?)<\/div>/);
|
|
1273
|
+
if (!s || !i) return e;
|
|
750
1274
|
const a = `
|
|
751
1275
|
<td width="30%" style="padding: 0 16px 0 0; vertical-align: top; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.6; color: #333333;">
|
|
752
|
-
${this.parseBasicMarkdown(
|
|
1276
|
+
${this.parseBasicMarkdown(s[1].trim())}
|
|
753
1277
|
</td>`, n = `
|
|
754
1278
|
<td width="70%" style="padding: 0; vertical-align: top; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.6; color: #333333;">
|
|
755
|
-
${this.parseBasicMarkdown(
|
|
1279
|
+
${this.parseBasicMarkdown(i[1].trim())}
|
|
756
1280
|
</td>`;
|
|
757
1281
|
return `
|
|
758
1282
|
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin: 16px 0;">
|
|
@@ -760,23 +1284,23 @@ let $ = class extends E(A`
|
|
|
760
1284
|
</table>`;
|
|
761
1285
|
}
|
|
762
1286
|
parseImageRowLayout(e) {
|
|
763
|
-
const t = /<div class="image">([\s\S]*?)<\/div>/g,
|
|
764
|
-
let
|
|
765
|
-
for (; (
|
|
766
|
-
const
|
|
767
|
-
if (
|
|
768
|
-
const [,
|
|
769
|
-
|
|
1287
|
+
const t = /<div class="image">([\s\S]*?)<\/div>/g, s = [];
|
|
1288
|
+
let i;
|
|
1289
|
+
for (; (i = t.exec(e)) !== null; ) {
|
|
1290
|
+
const r = i[1].trim().match(/!\[([^\]]*)\]\(([^)]+)\)/);
|
|
1291
|
+
if (r) {
|
|
1292
|
+
const [, o, l] = r;
|
|
1293
|
+
s.push(`<img src="${l}" alt="${o || "Image"}" style="display: block; max-width: 100%; height: auto;" border="0">`);
|
|
770
1294
|
}
|
|
771
1295
|
}
|
|
772
|
-
if (
|
|
773
|
-
const a = Math.floor(100 /
|
|
1296
|
+
if (s.length === 0) return e;
|
|
1297
|
+
const a = Math.floor(100 / s.length);
|
|
774
1298
|
let n = "<tr>";
|
|
775
|
-
return
|
|
776
|
-
const
|
|
1299
|
+
return s.forEach((r, o) => {
|
|
1300
|
+
const l = o === s.length - 1;
|
|
777
1301
|
n += `
|
|
778
|
-
<td width="${a}%" style="padding: ${
|
|
779
|
-
${
|
|
1302
|
+
<td width="${a}%" style="padding: ${l ? "0" : "0 8px 0 0"}; vertical-align: top; text-align: center;">
|
|
1303
|
+
${r}
|
|
780
1304
|
</td>`;
|
|
781
1305
|
}), n += "</tr>", `
|
|
782
1306
|
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin: 16px 0;">
|
|
@@ -786,34 +1310,34 @@ let $ = class extends E(A`
|
|
|
786
1310
|
parseImageAttributes(e) {
|
|
787
1311
|
const t = {};
|
|
788
1312
|
if (!e) return t;
|
|
789
|
-
const
|
|
790
|
-
|
|
791
|
-
const
|
|
792
|
-
return
|
|
1313
|
+
const s = e.match(/width=([^\s}]+)/);
|
|
1314
|
+
s && (t.width = s[1]);
|
|
1315
|
+
const i = e.match(/height=([^\s}]+)/);
|
|
1316
|
+
return i && (t.height = i[1]), e.includes("cover") && (t.cover = !0), e.includes("contain") && (t.contain = !0), t;
|
|
793
1317
|
}
|
|
794
1318
|
generateImageStyles(e, t = !1) {
|
|
795
|
-
let
|
|
796
|
-
return e.width ? e.width === "auto" ? a += t ? " max-width: 100%; height: auto;" : " height: auto;" : e.width.endsWith("%") ? (a += ` width: ${e.width}; max-width: 100%;`, e.height || (a += " height: auto;")) : e.width.endsWith("px") && (
|
|
1319
|
+
let s, i, a = "display: block; margin: 8px 0; border: 0;";
|
|
1320
|
+
return e.width ? e.width === "auto" ? a += t ? " max-width: 100%; height: auto;" : " height: auto;" : e.width.endsWith("%") ? (a += ` width: ${e.width}; max-width: 100%;`, e.height || (a += " height: auto;")) : e.width.endsWith("px") && (s = e.width.replace("px", ""), a += " max-width: 100%;", e.height || (a += " height: auto;")) : a += t ? " width: 100%; max-width: 100%; height: auto;" : " max-width: 100%; height: auto;", e.height && (e.height === "auto" ? a += " height: auto;" : e.height.endsWith("px") && (i = e.height.replace("px", ""), e.width || (a += " max-width: 100%;"))), (e.cover || e.contain) && (e.width || e.height || (a += " width: 100%;")), { imgStyle: a, imgWidth: s, imgHeight: i };
|
|
797
1321
|
}
|
|
798
1322
|
parseBasicMarkdown(e) {
|
|
799
|
-
return e.replace(/!\[([^\]]*)\]\(([^)]+)\)(?:\{([^}]+)\})?/g, (t,
|
|
800
|
-
const n = this.parseImageAttributes(a), { imgStyle:
|
|
801
|
-
let
|
|
802
|
-
return
|
|
1323
|
+
return e.replace(/!\[([^\]]*)\]\(([^)]+)\)(?:\{([^}]+)\})?/g, (t, s, i, a) => {
|
|
1324
|
+
const n = this.parseImageAttributes(a), { imgStyle: r, imgWidth: o, imgHeight: l } = this.generateImageStyles(n, !0);
|
|
1325
|
+
let p = `<img src="${i}" alt="${s || "Image"}" style="${r}" border="0"`;
|
|
1326
|
+
return o && (p += ` width="${o}"`), l && (p += ` height="${l}"`), p += ">", p;
|
|
803
1327
|
}).replace(/\n\n/g, '</p><p style="margin: 0 0 16px 0; padding: 0; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.6; color: #333333;">').replace(/\n/g, "<br>").replace(/\*\*(.*?)\*\*/g, '<strong style="font-weight: bold;">$1</strong>').replace(/\*(.*?)\*/g, '<em style="font-style: italic;">$1</em>').replace(/\[([^\]]+)\]\(([^)]+)\)/g, '<a href="$2" style="color: #0066cc; text-decoration: underline;">$1</a>').replace(/^# (.*$)/gim, '<h2 style="margin: 16px 0 8px 0; padding: 0; font-family: Arial, Helvetica, sans-serif; font-size: 18px; font-weight: bold; color: #1a1a1a;">$1</h2>').replace(/^\* (.*$)/gim, '<li style="margin: 4px 0; font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: #333333;">$1</li>').replace(/^\d+\. (.*$)/gim, '<li style="margin: 4px 0; font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: #333333;">$1</li>').replace(/(<li[^>]*>.*?<\/li>(?:\s*<li[^>]*>.*?<\/li>)*)/gs, (t) => {
|
|
804
|
-
const
|
|
805
|
-
return `<${
|
|
1328
|
+
const s = /^\d+\./.test(t.replace(/<[^>]*>/g, "")) ? "ol" : "ul";
|
|
1329
|
+
return `<${s} style="margin: 8px 0; padding: 0 0 0 20px; font-family: Arial, Helvetica, sans-serif;">${t}</${s}>`;
|
|
806
1330
|
}).replace(/^(?!<[h\d]|<p|<ul|<ol|<li|<img)(.+)$/gim, '<p style="margin: 0 0 16px 0; padding: 0; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.6; color: #333333;">$1</p>');
|
|
807
1331
|
}
|
|
808
1332
|
parseExtendedMarkdown(e) {
|
|
809
1333
|
let t = e;
|
|
810
|
-
return t = this.parseLayoutBlocks(t), t = t.replace(/:::images\s+(row|grid(?:=\d+)?)\n((?:!\[.*?\]\(.*?\)(?:\{.*?\})?\s*\n?)*?):::/g, "[Multiple Images - View in web browser]"), t = t.replace(/!\[([^\]]*)\]\(([^)]+)\)(?:\{([^}]+)\})?/g, (
|
|
811
|
-
const
|
|
812
|
-
let
|
|
813
|
-
return
|
|
814
|
-
}), t = t.replace(/\n\n/g, '</p><p style="margin: 0 0 16px 0; padding: 0; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.6; color: #333333;">').replace(/\n/g, "<br>").replace(/\*\*(.*?)\*\*/g, '<strong style="font-weight: bold;">$1</strong>').replace(/\*(.*?)\*/g, '<em style="font-style: italic;">$1</em>').replace(/\[([^\]]+)\]\(([^)]+)\)/g, '<a href="$2" style="color: #0066cc; text-decoration: underline;">$1</a>').replace(/^# (.*$)/gim, '<table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin: 24px 0 16px 0;"><tr><td><h1 style="margin: 0; padding: 0; font-family: Arial, Helvetica, sans-serif; font-size: 24px; font-weight: bold; color: #1a1a1a;">$1</h1></td></tr></table>').replace(/^\* (.*$)/gim, '<li style="margin: 4px 0; font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: #333333;">$1</li>').replace(/^\d+\. (.*$)/gim, '<li style="margin: 4px 0; font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: #333333;">$1</li>').replace(/^---$/gim, '<table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin: 24px 0;"><tr><td style="border-top: 1px solid #e0e0e0; height: 1px; line-height: 1px;"> </td></tr></table>'), t = t.replace(/(<li[^>]*>.*?<\/li>(?:\s*<li[^>]*>.*?<\/li>)*)/gs, (
|
|
815
|
-
const
|
|
816
|
-
return `<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td><${a} style="margin: 16px 0; padding: 0 0 0 20px; font-family: Arial, Helvetica, sans-serif;">${
|
|
1334
|
+
return t = this.parseLayoutBlocks(t), t = t.replace(/:::images\s+(row|grid(?:=\d+)?)\n((?:!\[.*?\]\(.*?\)(?:\{.*?\})?\s*\n?)*?):::/g, "[Multiple Images - View in web browser]"), t = t.replace(/!\[([^\]]*)\]\(([^)]+)\)(?:\{([^}]+)\})?/g, (s, i, a, n) => {
|
|
1335
|
+
const r = this.parseImageAttributes(n), { imgStyle: o, imgWidth: l, imgHeight: p } = this.generateImageStyles(r, !1);
|
|
1336
|
+
let k = `<img src="${a}" alt="${i || "Image"}" style="${o}" border="0"`;
|
|
1337
|
+
return l && (k += ` width="${l}"`), p && (k += ` height="${p}"`), k += ">", `<table cellpadding="0" cellspacing="0" border="0" style="margin: 16px 0;"><tr><td>${k}</td></tr></table>`;
|
|
1338
|
+
}), t = t.replace(/\n\n/g, '</p><p style="margin: 0 0 16px 0; padding: 0; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.6; color: #333333;">').replace(/\n/g, "<br>").replace(/\*\*(.*?)\*\*/g, '<strong style="font-weight: bold;">$1</strong>').replace(/\*(.*?)\*/g, '<em style="font-style: italic;">$1</em>').replace(/\[([^\]]+)\]\(([^)]+)\)/g, '<a href="$2" style="color: #0066cc; text-decoration: underline;">$1</a>').replace(/^# (.*$)/gim, '<table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin: 24px 0 16px 0;"><tr><td><h1 style="margin: 0; padding: 0; font-family: Arial, Helvetica, sans-serif; font-size: 24px; font-weight: bold; color: #1a1a1a;">$1</h1></td></tr></table>').replace(/^\* (.*$)/gim, '<li style="margin: 4px 0; font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: #333333;">$1</li>').replace(/^\d+\. (.*$)/gim, '<li style="margin: 4px 0; font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: #333333;">$1</li>').replace(/^---$/gim, '<table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin: 24px 0;"><tr><td style="border-top: 1px solid #e0e0e0; height: 1px; line-height: 1px;"> </td></tr></table>'), t = t.replace(/(<li[^>]*>.*?<\/li>(?:\s*<li[^>]*>.*?<\/li>)*)/gs, (s) => {
|
|
1339
|
+
const i = /^\d+\./.test(s.replace(/<[^>]*>/g, "")), a = i ? "ol" : "ul";
|
|
1340
|
+
return `<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td><${a} style="margin: 16px 0; padding: 0 0 0 20px; font-family: Arial, Helvetica, sans-serif;">${s}</${a}></td></tr></table>`;
|
|
817
1341
|
}), t.includes("<table>") || t.includes("<h1>") || (t = `<p style="margin: 0 0 16px 0; padding: 0; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.6; color: #333333;">${t}</p>`), t = `<table cellpadding="0" cellspacing="0" border="0" width="100%" style="max-width: 600px; margin: 0 auto;">
|
|
818
1342
|
<tr>
|
|
819
1343
|
<td style="padding: 0; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.6; color: #333333;">
|
|
@@ -823,7 +1347,7 @@ let $ = class extends E(A`
|
|
|
823
1347
|
</table>`, t;
|
|
824
1348
|
}
|
|
825
1349
|
convertToPlainText(e) {
|
|
826
|
-
return e.trim().replace(/:::layout\s+([a-zA-Z0-9-]+)\n([\s\S]*?)\n:::/g, (t,
|
|
1350
|
+
return e.trim().replace(/:::layout\s+([a-zA-Z0-9-]+)\n([\s\S]*?)\n:::/g, (t, s, i) => i.replace(/<div class="(?:column|sidebar|main|image)">/g, `
|
|
827
1351
|
`).replace(/<\/div>/g, `
|
|
828
1352
|
`).replace(/\n{3,}/g, `
|
|
829
1353
|
|
|
@@ -837,8 +1361,8 @@ let $ = class extends E(A`
|
|
|
837
1361
|
return parseFloat((e / Math.pow(1024, t)).toFixed(2)) + " " + ["Bytes", "KB", "MB", "GB"][t];
|
|
838
1362
|
}
|
|
839
1363
|
render() {
|
|
840
|
-
const e = this.parseExtendedMarkdown(this.body), t = this.convertToPlainText(this.body),
|
|
841
|
-
return
|
|
1364
|
+
const e = this.parseExtendedMarkdown(this.body), t = this.convertToPlainText(this.body), s = this.recipients[0] || this.toAddress;
|
|
1365
|
+
return c`
|
|
842
1366
|
<schmancy-surface type="surface" rounded="all" class="h-full flex flex-col">
|
|
843
1367
|
|
|
844
1368
|
<!-- Header Section -->
|
|
@@ -912,7 +1436,7 @@ let $ = class extends E(A`
|
|
|
912
1436
|
</schmancy-typography>
|
|
913
1437
|
</div>
|
|
914
1438
|
<schmancy-typography type="body" token="sm" class="break-all flex-1">
|
|
915
|
-
${
|
|
1439
|
+
${s}
|
|
916
1440
|
</schmancy-typography>
|
|
917
1441
|
</div>
|
|
918
1442
|
|
|
@@ -925,7 +1449,7 @@ let $ = class extends E(A`
|
|
|
925
1449
|
</schmancy-typography>
|
|
926
1450
|
</div>
|
|
927
1451
|
<schmancy-typography type="body" token="sm" class="font-medium flex-1">
|
|
928
|
-
${this.subject ||
|
|
1452
|
+
${this.subject || c`<span class="italic text-surface-onVariant">(No subject)</span>`}
|
|
929
1453
|
</schmancy-typography>
|
|
930
1454
|
</div>
|
|
931
1455
|
</div>
|
|
@@ -933,17 +1457,17 @@ let $ = class extends E(A`
|
|
|
933
1457
|
|
|
934
1458
|
<!-- Email Body Content -->
|
|
935
1459
|
<div class="flex-1 overflow-y-auto min-h-0">
|
|
936
|
-
${
|
|
937
|
-
${
|
|
1460
|
+
${h(this.body, () => c`
|
|
1461
|
+
${h(this.viewMode === "html", () => c`
|
|
938
1462
|
<div class="p-6 bg-white" style="color: #333; line-height: 1.6; font-family: system-ui, -apple-system, sans-serif; font-size: 14px;">
|
|
939
1463
|
<div .innerHTML=${e}></div>
|
|
940
1464
|
</div>
|
|
941
|
-
`, () =>
|
|
1465
|
+
`, () => c`
|
|
942
1466
|
<div class="p-6 bg-white" style="color: #333; line-height: 1.6; font-family: 'Courier New', monospace; font-size: 13px; white-space: pre-wrap;">
|
|
943
1467
|
${t}
|
|
944
1468
|
</div>
|
|
945
1469
|
`)}
|
|
946
|
-
`, () =>
|
|
1470
|
+
`, () => c`
|
|
947
1471
|
<!-- Empty State -->
|
|
948
1472
|
<div class="flex-1 flex items-center justify-center p-8">
|
|
949
1473
|
<div class="text-center space-y-3">
|
|
@@ -960,7 +1484,7 @@ let $ = class extends E(A`
|
|
|
960
1484
|
</div>
|
|
961
1485
|
|
|
962
1486
|
<!-- Attachments Section -->
|
|
963
|
-
${
|
|
1487
|
+
${h(this.attachments.length > 0, () => c`
|
|
964
1488
|
<div class="flex-shrink-0 p-4 border-t border-outline-variant bg-surface-containerLowest">
|
|
965
1489
|
<div class="space-y-3">
|
|
966
1490
|
<!-- Attachments Header -->
|
|
@@ -973,21 +1497,21 @@ let $ = class extends E(A`
|
|
|
973
1497
|
|
|
974
1498
|
<!-- Attachments List -->
|
|
975
1499
|
<div class="grid gap-2 sm:grid-cols-2 lg:grid-cols-1 xl:grid-cols-2">
|
|
976
|
-
${I(this.attachments, (
|
|
1500
|
+
${I(this.attachments, (i) => i.id, (i) => c`
|
|
977
1501
|
<schmancy-surface type="container" rounded="all" class="p-3">
|
|
978
1502
|
<div class="flex items-center gap-3">
|
|
979
1503
|
<!-- File Icon -->
|
|
980
1504
|
<schmancy-icon size="20px" class="text-surface-onVariant flex-shrink-0">
|
|
981
|
-
${
|
|
1505
|
+
${i.type.startsWith("image/") ? "image" : i.type.includes("pdf") ? "picture_as_pdf" : i.type.includes("text") ? "description" : "attach_file"}
|
|
982
1506
|
</schmancy-icon>
|
|
983
1507
|
|
|
984
1508
|
<!-- File Info -->
|
|
985
1509
|
<div class="flex-1 min-w-0">
|
|
986
1510
|
<schmancy-typography type="body" token="sm" class="font-medium truncate">
|
|
987
|
-
${
|
|
1511
|
+
${i.name}
|
|
988
1512
|
</schmancy-typography>
|
|
989
1513
|
<schmancy-typography type="body" token="xs" class="text-surface-onVariant">
|
|
990
|
-
${this.formatFileSize(
|
|
1514
|
+
${this.formatFileSize(i.size)} • ${i.type}
|
|
991
1515
|
</schmancy-typography>
|
|
992
1516
|
</div>
|
|
993
1517
|
</div>
|
|
@@ -1001,7 +1525,7 @@ let $ = class extends E(A`
|
|
|
1001
1525
|
</div>
|
|
1002
1526
|
|
|
1003
1527
|
<!-- Preview Stats -->
|
|
1004
|
-
${
|
|
1528
|
+
${h(this.body, () => c`
|
|
1005
1529
|
<div class="flex-shrink-0">
|
|
1006
1530
|
<schmancy-surface type="container" rounded="all" class="p-3">
|
|
1007
1531
|
<div class="flex items-center justify-center gap-6 text-center">
|
|
@@ -1022,7 +1546,7 @@ let $ = class extends E(A`
|
|
|
1022
1546
|
${this.body.trim() ? this.body.trim().split(/\s+/).length : 0}
|
|
1023
1547
|
</schmancy-typography>
|
|
1024
1548
|
</div>
|
|
1025
|
-
${
|
|
1549
|
+
${h(this.attachments.length > 0, () => c`
|
|
1026
1550
|
<div class="w-px h-8 bg-outline-variant"></div>
|
|
1027
1551
|
<div>
|
|
1028
1552
|
<schmancy-typography type="body" token="xs" class="text-surface-onVariant">
|
|
@@ -1043,25 +1567,25 @@ let $ = class extends E(A`
|
|
|
1043
1567
|
`;
|
|
1044
1568
|
}
|
|
1045
1569
|
};
|
|
1046
|
-
|
|
1047
|
-
var
|
|
1048
|
-
for (var a, n =
|
|
1049
|
-
return
|
|
1570
|
+
S([d({ type: String })], w.prototype, "subject", 2), S([d({ type: String })], w.prototype, "body", 2), S([d({ type: Array })], w.prototype, "attachments", 2), S([d({ type: Array })], w.prototype, "recipients", 2), S([d({ type: String })], w.prototype, "fromAddress", 2), S([d({ type: String })], w.prototype, "toAddress", 2), S([m()], w.prototype, "viewMode", 2), w = S([R("schmancy-email-viewer")], w);
|
|
1571
|
+
var Q = Object.defineProperty, _ = Object.getOwnPropertyDescriptor, f = (e, t, s, i) => {
|
|
1572
|
+
for (var a, n = i > 1 ? void 0 : i ? _(t, s) : t, r = e.length - 1; r >= 0; r--) (a = e[r]) && (n = (i ? a(t, s, n) : a(n)) || n);
|
|
1573
|
+
return i && n && Q(t, s, n), n;
|
|
1050
1574
|
};
|
|
1051
|
-
let g = class extends
|
|
1575
|
+
let g = class extends A(D`
|
|
1052
1576
|
:host {
|
|
1053
1577
|
display: block;
|
|
1054
1578
|
height: 100%;
|
|
1055
1579
|
}
|
|
1056
1580
|
`) {
|
|
1057
1581
|
constructor() {
|
|
1058
|
-
super(...arguments), this.disabled = !1, this.recipients = [], this.selectedRecipients = [], this.enableCsvImport = !0, this.enableDragDrop = !0, this.title = "Recipients", this.emptyStateTitle = "No recipients yet", this.emptyStateMessage = "Import from sources or upload a CSV", this.dragOver = !1, this.localSelectedRecipients = /* @__PURE__ */ new Set(), this.searchQuery = "", this.filteredRecipients = [], this.boatState = "minimized", this.fileInputRef =
|
|
1582
|
+
super(...arguments), this.disabled = !1, this.recipients = [], this.selectedRecipients = [], this.enableCsvImport = !0, this.enableDragDrop = !0, this.title = "Recipients", this.emptyStateTitle = "No recipients yet", this.emptyStateMessage = "Import from sources or upload a CSV", this.dragOver = !1, this.localSelectedRecipients = /* @__PURE__ */ new Set(), this.searchQuery = "", this.filteredRecipients = [], this.boatState = "minimized", this.fileInputRef = T(), this.handleEmailsImported = () => {
|
|
1059
1583
|
this.updateFilteredRecipients(), this.requestUpdate();
|
|
1060
1584
|
}, this.handleImportFromCSV = () => {
|
|
1061
1585
|
this.enableCsvImport && this.fileInputRef.value?.click();
|
|
1062
1586
|
}, this.handleFileSelect = (e) => {
|
|
1063
|
-
const t = e.target,
|
|
1064
|
-
|
|
1587
|
+
const t = e.target, s = t.files?.[0];
|
|
1588
|
+
s && this.processCSVFile(s);
|
|
1065
1589
|
}, this.handleDrop = (e) => {
|
|
1066
1590
|
if (!this.enableDragDrop) return;
|
|
1067
1591
|
e.preventDefault(), this.dragOver = !1;
|
|
@@ -1070,10 +1594,10 @@ let g = class extends E(A`
|
|
|
1070
1594
|
}, this.processCSVFile = (e) => {
|
|
1071
1595
|
if (!e.name.endsWith(".csv")) return void v.error("Please select a CSV file");
|
|
1072
1596
|
const t = new FileReader();
|
|
1073
|
-
t.onload = (
|
|
1074
|
-
const
|
|
1597
|
+
t.onload = (s) => {
|
|
1598
|
+
const i = s.target?.result;
|
|
1075
1599
|
try {
|
|
1076
|
-
const a = this.parseCSV(
|
|
1600
|
+
const a = this.parseCSV(i);
|
|
1077
1601
|
if (a.length === 0) return void v.error("No valid email addresses found in CSV");
|
|
1078
1602
|
this.dispatchEvent(new CustomEvent("emails-imported", { detail: { emails: a, source: "csv" }, bubbles: !0, composed: !0 })), v.success(`Imported ${a.length} emails from CSV file`);
|
|
1079
1603
|
} catch {
|
|
@@ -1094,7 +1618,7 @@ let g = class extends E(A`
|
|
|
1094
1618
|
const e = Array.isArray(this.recipients) ? this.recipients : [];
|
|
1095
1619
|
if (this.searchQuery.trim()) {
|
|
1096
1620
|
const t = this.searchQuery.toLowerCase();
|
|
1097
|
-
this.filteredRecipients = e.filter((
|
|
1621
|
+
this.filteredRecipients = e.filter((s) => s.toLowerCase().includes(t));
|
|
1098
1622
|
} else this.filteredRecipients = [...e];
|
|
1099
1623
|
}, this.handleSearchInput = (e) => {
|
|
1100
1624
|
const t = e.target;
|
|
@@ -1115,24 +1639,24 @@ let g = class extends E(A`
|
|
|
1115
1639
|
}
|
|
1116
1640
|
parseCSV(e) {
|
|
1117
1641
|
const t = [];
|
|
1118
|
-
let
|
|
1119
|
-
|
|
1120
|
-
const
|
|
1121
|
-
let n = a.find((
|
|
1122
|
-
if (!n) for (const
|
|
1123
|
-
const
|
|
1124
|
-
if (
|
|
1125
|
-
n =
|
|
1642
|
+
let s;
|
|
1643
|
+
s = this.csvParser ? this.csvParser.parse(e, { header: !0, skipEmptyLines: !0, dynamicTyping: !0, delimiter: "", transformHeader: (o) => o.trim() }) : this.simpleCSVParse(e);
|
|
1644
|
+
const i = s.data, a = s.meta.fields || [];
|
|
1645
|
+
let n = a.find((o) => o.toLowerCase().includes("email"));
|
|
1646
|
+
if (!n) for (const o of a) {
|
|
1647
|
+
const l = i[0]?.[o]?.toString();
|
|
1648
|
+
if (l && this.isValidEmail(l)) {
|
|
1649
|
+
n = o;
|
|
1126
1650
|
break;
|
|
1127
1651
|
}
|
|
1128
1652
|
}
|
|
1129
1653
|
if (!n) throw new Error("No email column found in CSV");
|
|
1130
|
-
const
|
|
1131
|
-
for (const
|
|
1132
|
-
const
|
|
1133
|
-
if (!
|
|
1134
|
-
const
|
|
1135
|
-
this.isValidEmail(
|
|
1654
|
+
const r = /* @__PURE__ */ new Set();
|
|
1655
|
+
for (const o of i) {
|
|
1656
|
+
const l = o[n]?.toString();
|
|
1657
|
+
if (!l) continue;
|
|
1658
|
+
const p = l.toLowerCase().trim();
|
|
1659
|
+
this.isValidEmail(p) && !r.has(p) && (r.add(p), t.push(p));
|
|
1136
1660
|
}
|
|
1137
1661
|
return t;
|
|
1138
1662
|
}
|
|
@@ -1140,22 +1664,22 @@ let g = class extends E(A`
|
|
|
1140
1664
|
const t = e.split(`
|
|
1141
1665
|
`).filter((a) => a.trim());
|
|
1142
1666
|
if (t.length === 0) return { data: [], meta: {} };
|
|
1143
|
-
const
|
|
1667
|
+
const s = t[0].split(",").map((a) => a.trim().replace(/"/g, "")), i = [];
|
|
1144
1668
|
for (let a = 1; a < t.length; a++) {
|
|
1145
|
-
const n = t[a].split(",").map((
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
}),
|
|
1669
|
+
const n = t[a].split(",").map((o) => o.trim().replace(/"/g, "")), r = {};
|
|
1670
|
+
s.forEach((o, l) => {
|
|
1671
|
+
r[o] = n[l] || "";
|
|
1672
|
+
}), i.push(r);
|
|
1149
1673
|
}
|
|
1150
|
-
return { data:
|
|
1674
|
+
return { data: i, meta: { fields: s } };
|
|
1151
1675
|
}
|
|
1152
1676
|
isValidEmail(e) {
|
|
1153
1677
|
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e.trim());
|
|
1154
1678
|
}
|
|
1155
1679
|
addRecipients(e) {
|
|
1156
1680
|
if (!e.length) return;
|
|
1157
|
-
const t = [.../* @__PURE__ */ new Set([...this.recipients, ...e])],
|
|
1158
|
-
this.recipients = t, this.selectedRecipients = [.../* @__PURE__ */ new Set([...this.selectedRecipients, ...
|
|
1681
|
+
const t = [.../* @__PURE__ */ new Set([...this.recipients, ...e])], s = e.filter((i) => !this.recipients.includes(i));
|
|
1682
|
+
this.recipients = t, this.selectedRecipients = [.../* @__PURE__ */ new Set([...this.selectedRecipients, ...s])], this.localSelectedRecipients = new Set(this.selectedRecipients), this.updateFilteredRecipients(), this.requestUpdate();
|
|
1159
1683
|
}
|
|
1160
1684
|
showBoat() {
|
|
1161
1685
|
this.boatState = "minimized";
|
|
@@ -1173,13 +1697,13 @@ let g = class extends E(A`
|
|
|
1173
1697
|
return this.renderBoatLayout();
|
|
1174
1698
|
}
|
|
1175
1699
|
renderBoatLayout() {
|
|
1176
|
-
return
|
|
1700
|
+
return c`
|
|
1177
1701
|
<!-- Hidden file input for CSV import -->
|
|
1178
|
-
${
|
|
1702
|
+
${h(this.enableCsvImport, () => c`
|
|
1179
1703
|
<input
|
|
1180
1704
|
type="file"
|
|
1181
1705
|
accept=".csv"
|
|
1182
|
-
${
|
|
1706
|
+
${E(this.fileInputRef)}
|
|
1183
1707
|
@change=${this.handleFileSelect}
|
|
1184
1708
|
class="hidden"
|
|
1185
1709
|
/>
|
|
@@ -1196,7 +1720,7 @@ let g = class extends E(A`
|
|
|
1196
1720
|
<schmancy-typography type="title" token="md" class="font-semibold">
|
|
1197
1721
|
${this.title}
|
|
1198
1722
|
</schmancy-typography>
|
|
1199
|
-
${
|
|
1723
|
+
${h(this.recipients.length > 0, () => c`
|
|
1200
1724
|
<schmancy-badge>
|
|
1201
1725
|
${this.localSelectedRecipients.size}/${this.recipients.length}
|
|
1202
1726
|
</schmancy-badge>
|
|
@@ -1212,7 +1736,7 @@ let g = class extends E(A`
|
|
|
1212
1736
|
`;
|
|
1213
1737
|
}
|
|
1214
1738
|
renderBoatContent() {
|
|
1215
|
-
return
|
|
1739
|
+
return c`
|
|
1216
1740
|
<!-- Search Bar and CSV Import on one line -->
|
|
1217
1741
|
<div class="p-4 flex gap-3">
|
|
1218
1742
|
<schmancy-input
|
|
@@ -1222,7 +1746,7 @@ let g = class extends E(A`
|
|
|
1222
1746
|
@input=${this.handleSearchInput}
|
|
1223
1747
|
class="flex-1"
|
|
1224
1748
|
>
|
|
1225
|
-
${
|
|
1749
|
+
${h(this.searchQuery, () => c`
|
|
1226
1750
|
<schmancy-button
|
|
1227
1751
|
slot="suffix"
|
|
1228
1752
|
variant="text"
|
|
@@ -1233,7 +1757,7 @@ let g = class extends E(A`
|
|
|
1233
1757
|
`)}
|
|
1234
1758
|
</schmancy-input>
|
|
1235
1759
|
|
|
1236
|
-
${
|
|
1760
|
+
${h(this.enableCsvImport, () => c`
|
|
1237
1761
|
<schmancy-button
|
|
1238
1762
|
variant="outlined"
|
|
1239
1763
|
@click=${this.handleImportFromCSV}
|
|
@@ -1245,7 +1769,7 @@ let g = class extends E(A`
|
|
|
1245
1769
|
`)}
|
|
1246
1770
|
</div>
|
|
1247
1771
|
|
|
1248
|
-
${
|
|
1772
|
+
${h(this.recipients.length > 0, () => c`
|
|
1249
1773
|
<!-- Bulk Actions -->
|
|
1250
1774
|
<div class="px-4 pb-4">
|
|
1251
1775
|
<div class="flex items-center gap-3">
|
|
@@ -1278,9 +1802,9 @@ let g = class extends E(A`
|
|
|
1278
1802
|
|
|
1279
1803
|
<!-- Recipients List -->
|
|
1280
1804
|
<div class="flex-1 overflow-y-auto px-4 pb-4">
|
|
1281
|
-
${
|
|
1805
|
+
${h(this.filteredRecipients.length > 0, () => c`
|
|
1282
1806
|
<div class="flex flex-wrap gap-3">
|
|
1283
|
-
${I(this.filteredRecipients, (e) => e, (e) =>
|
|
1807
|
+
${I(this.filteredRecipients, (e) => e, (e) => c`
|
|
1284
1808
|
<schmancy-button
|
|
1285
1809
|
variant=${this.localSelectedRecipients.has(e) ? "filled" : "outlined"}
|
|
1286
1810
|
@click=${(t) => {
|
|
@@ -1299,7 +1823,7 @@ let g = class extends E(A`
|
|
|
1299
1823
|
</schmancy-button>
|
|
1300
1824
|
`)}
|
|
1301
1825
|
</div>
|
|
1302
|
-
`, () =>
|
|
1826
|
+
`, () => c`
|
|
1303
1827
|
<div class="text-center py-8">
|
|
1304
1828
|
<schmancy-icon size="32px" class="opacity-50 mb-2">search_off</schmancy-icon>
|
|
1305
1829
|
<schmancy-typography type="body" token="sm" class="mb-2">
|
|
@@ -1311,7 +1835,7 @@ let g = class extends E(A`
|
|
|
1311
1835
|
</div>
|
|
1312
1836
|
`)}
|
|
1313
1837
|
</div>
|
|
1314
|
-
`, () =>
|
|
1838
|
+
`, () => c`
|
|
1315
1839
|
<!-- Empty State -->
|
|
1316
1840
|
<div class="flex-1 flex items-center justify-center p-8">
|
|
1317
1841
|
<div class="text-center space-y-4">
|
|
@@ -1327,7 +1851,7 @@ let g = class extends E(A`
|
|
|
1327
1851
|
`)}
|
|
1328
1852
|
|
|
1329
1853
|
<!-- Drag Overlay -->
|
|
1330
|
-
${
|
|
1854
|
+
${h(this.dragOver && this.enableDragDrop, () => c`
|
|
1331
1855
|
<div
|
|
1332
1856
|
class="absolute inset-4 flex items-center justify-center border-2 border-dashed border-primary rounded-lg z-10"
|
|
1333
1857
|
@dragover=${(e) => {
|
|
@@ -1347,12 +1871,12 @@ let g = class extends E(A`
|
|
|
1347
1871
|
`;
|
|
1348
1872
|
}
|
|
1349
1873
|
};
|
|
1350
|
-
f([
|
|
1874
|
+
f([d({ type: Boolean })], g.prototype, "disabled", 2), f([d({ type: Array })], g.prototype, "recipients", 2), f([d({ type: Array })], g.prototype, "selectedRecipients", 2), f([d({ type: Boolean })], g.prototype, "enableCsvImport", 2), f([d({ type: Boolean })], g.prototype, "enableDragDrop", 2), f([d({ type: String })], g.prototype, "title", 2), f([d({ type: String })], g.prototype, "emptyStateTitle", 2), f([d({ type: String })], g.prototype, "emptyStateMessage", 2), f([d({ type: Object })], g.prototype, "csvParser", 2), f([m()], g.prototype, "dragOver", 2), f([m()], g.prototype, "localSelectedRecipients", 2), f([m()], g.prototype, "searchQuery", 2), f([m()], g.prototype, "filteredRecipients", 2), f([m()], g.prototype, "boatState", 2), g = f([R("schmancy-email-recipients")], g);
|
|
1351
1875
|
export {
|
|
1352
|
-
|
|
1876
|
+
y as S,
|
|
1353
1877
|
b as a,
|
|
1354
|
-
|
|
1878
|
+
w as b,
|
|
1355
1879
|
g as c,
|
|
1356
1880
|
z as d
|
|
1357
1881
|
};
|
|
1358
|
-
//# sourceMappingURL=email-recipients-
|
|
1882
|
+
//# sourceMappingURL=email-recipients-BH3-shuO.js.map
|