@cling-se/widget 1.0.0-beta.1 → 1.0.0-beta.2
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/CHANGELOG.md +25 -0
- package/README.internal.md +82 -0
- package/README.md +14 -40
- package/README.public.md +14 -0
- package/dist/AddClientCallout-e8d19R3f.js +101 -0
- package/dist/AnswerModal-BGvB8IVV.js +3291 -0
- package/dist/AttachmentItem-CkHbAm4l.js +171 -0
- package/dist/BaseUpload-BiJBcWRu.js +2472 -0
- package/dist/BlockMedia-CW5wgipC.js +103 -0
- package/dist/CCallout-Cy2eeIYd.js +104 -0
- package/dist/{CCurrencyDropdown-qH-3m2eP.js → CCurrencyDropdown-DE_3CTjm.js} +91 -49
- package/dist/CDropdownItem-Dmq5gYzA.js +751 -0
- package/dist/CFormField.vue_vue_type_script_setup_true_lang-D_U9coAY.js +292 -0
- package/dist/{CPhoneFormat-CfQayFxw.js → CPhoneFormat-BS2nP9kc.js} +13 -21
- package/dist/CPhoneInput-Bf6329PO.js +207 -0
- package/dist/CPriceInput-d1yjuMQr.js +140 -0
- package/dist/CSelect-DgnT07Hk.js +98 -0
- package/dist/CSkeleton.vue_vue_type_script_setup_true_lang-Ckl--dyv.js +51 -0
- package/dist/ClientAutocomplete-9JzGcO9O.js +532 -0
- package/dist/ClientModal-BzWQtWSZ.js +1181 -0
- package/dist/ColorPicker-BvoFN8nu.js +1408 -0
- package/dist/CompanyModal-Bp4V_az9.js +250 -0
- package/dist/ContentWrapper-CuH6xKmo.js +265 -0
- package/dist/CoverBlockSettings-BA5L0Zee.js +861 -0
- package/dist/DocAnswer-BcNA_KEg.js +33 -0
- package/dist/DocDetails-CStEwWnU.js +448 -0
- package/dist/DocForm-BOoILf5E.js +6748 -0
- package/dist/DocFormSend-CQIf-HJY.js +171 -0
- package/dist/DocLinks-BRX5QzNe.js +36 -0
- package/dist/DocModalBase-D72yWj-x.js +29 -0
- package/dist/DocPrint-BI1LXUPE.js +399 -0
- package/dist/DocReceipt-DaZ4V76p.js +341 -0
- package/dist/DocSendReminder-DKGZlo7s.js +181 -0
- package/dist/DocTextEditor-Dm-cTZpA.js +19413 -0
- package/dist/DocTimeline-DCwofzuk.js +537 -0
- package/dist/DocumentClient-vJdxCB53.js +90 -0
- package/dist/DocumentLayout-CKSi42ev.js +1368 -0
- package/dist/DocumentLogotype-DbQlvQ-y.js +162 -0
- package/dist/DocumentVoided-CRX2WxWO.js +33 -0
- package/dist/EmbedInput-B-oeC4Wy.js +157 -0
- package/dist/EmbedSettings-B9Yka2yB.js +103 -0
- package/dist/ErrorCallout-B_ygH33E.js +34 -0
- package/dist/FilePreviewModal-Bf3ELTow.js +202 -0
- package/dist/Flag-BwTgCNHO.js +41 -0
- package/dist/HeaderSettings-DvC7nlyY.js +720 -0
- package/dist/ImageSelectModal-D3sP3lhR.js +119 -0
- package/dist/ImageUploadWrapper-RWNa-yIq.js +1585 -0
- package/dist/Index-0_3ULrWX.js +126 -0
- package/dist/Index-4NPe0sfX.js +629 -0
- package/dist/Index-B1uA0FF6.js +4 -0
- package/dist/Index-BBkCYm2q.js +201 -0
- package/dist/{Index-DIOiMm9f.js → Index-BBwvo7S9.js} +10 -18
- package/dist/Index-BEMlsYwJ.js +68 -0
- package/dist/Index-BRBhJ6kz.js +21 -0
- package/dist/{Index--qPMWUMT.js → Index-BTFmHjUt.js} +48 -61
- package/dist/Index-BcUNnxLC.js +1098 -0
- package/dist/Index-Bo6ExBUL.js +93 -0
- package/dist/Index-BvMPCgdH.js +102 -0
- package/dist/Index-Bx5TOI9k.js +74 -0
- package/dist/Index-C7GZS8EI.js +16 -0
- package/dist/Index-CNWhm07R.js +25 -0
- package/dist/{Index-DcQbh-z2.js → Index-CQpznMKV.js} +9 -17
- package/dist/Index-CRzsnIij.js +159 -0
- package/dist/Index-CeSG1C41.js +140 -0
- package/dist/Index-CjfjdZj5.js +52 -0
- package/dist/Index-CskKmZpd.js +363 -0
- package/dist/Index-D5qwbCo1.js +28 -0
- package/dist/Index-D8Ae1Txt.js +228 -0
- package/dist/Index-DE8aenDB.js +3452 -0
- package/dist/Index-DI5EB5Rt.js +39 -0
- package/dist/Index-DaV57YPP.js +163 -0
- package/dist/Index-DbwkmoyM.js +38 -0
- package/dist/Index-Df9skok6.js +70 -0
- package/dist/{Index-Bu0MGrj6.js → Index-DfLLA0ij.js} +313 -206
- package/dist/Index-Dw1CO5F9.js +76 -0
- package/dist/Index-PZXyOoVb.js +87 -0
- package/dist/{Index-D4XgxmbD.js → Index-ZUnH-BHj.js} +10 -18
- package/dist/Index-cjKGSiDi.js +136 -0
- package/dist/Index-m-goRuKD.js +49 -0
- package/dist/Index-rGeWbLcB.js +47 -0
- package/dist/Index-vrljNp6G.js +28 -0
- package/dist/Index.vue_vue_type_script_lang-aeVuChGF.js +671 -0
- package/dist/InputToggleRow-v6qAWPg6.js +99 -0
- package/dist/ManualPopover-BONBJIUA.js +57 -0
- package/dist/MediaWrapper-CXb2UGd9.js +18 -0
- package/dist/{NotBindingText-CNV2Wmdx.js → NotBindingText-BqESO13N.js} +13 -17
- package/dist/PackageGroup-AIysVmyh.js +1058 -0
- package/dist/PdfTerms-BlhHdTu3.js +34 -0
- package/dist/PdfViewer-DwZ1rwlN.js +392 -0
- package/dist/PlainHtml.vue_vue_type_script_setup_true_lang-D6NNUTz0.js +17 -0
- package/dist/PriceHeader-C4XhnoA3.js +488 -0
- package/dist/SearchApi-B7lXgUY6.js +137 -0
- package/dist/SendForm-BcD0xSvB.js +7031 -0
- package/dist/Setup-C2qaYDei.js +47 -0
- package/dist/{SmartList-Qgu0rMrI.js → SmartList-DqG7Q5t7.js} +16 -24
- package/dist/Sortable.vue_vue_type_script_setup_true_lang-CzMbr8AX.js +1303 -0
- package/dist/{TermsSettings-CE3h_xkm.js → TermsSettings-BOCONyM4.js} +169 -49
- package/dist/ThemeColorRow-sjGdMzGN.js +108 -0
- package/dist/ToggleBinding-7oq_oXPt.js +44 -0
- package/dist/UploadModal-C_X2NjVY.js +134 -0
- package/dist/VideoPlayerInput-BsUcmpl4.js +135 -0
- package/dist/VideoPlayerSettings-BXMmxaZQ.js +78 -0
- package/dist/VideoSelectModal-CW0OweCw.js +217 -0
- package/dist/{anime.es-BrPTThYb.js → anime.es-gdcpA-eY.js} +1 -2
- package/dist/{color-TdtKxwVa.js → color-HetJPhlA.js} +1 -2
- package/dist/{debounce-C1AuSpOZ.js → debounce-DNl99Gyo.js} +7 -7
- package/dist/dom-CkTGWrfu.js +69 -0
- package/dist/{focusDrawerMixin-Be6BAK8-.js → focusDrawerMixin-BwcErMDY.js} +1 -1
- package/dist/{formDrawerState-DRbg5rVI.js → formDrawerState-DaurePnd.js} +2 -2
- package/dist/helpers-CPW--XIz.js +44 -0
- package/dist/index-BjiGCJPI.js +149 -0
- package/dist/index-CFNv6OvX.js +188 -0
- package/dist/index-Cx71On5Z.js +508 -0
- package/dist/index-DKMxIBz_.js +270 -0
- package/dist/index-DKf5SGLD.js +125 -0
- package/dist/index-E32WgUp9.js +3525 -0
- package/dist/index-kp-GC5I0.js +513 -0
- package/dist/index.es.js +2 -5
- package/dist/index.umd.js +306 -1505
- package/dist/{main-WKzC-Dnu.js → main-Cb-nyil1.js} +33252 -33755
- package/dist/mapFormMixin-D3BihYWW.js +1544 -0
- package/dist/omit--YYr41Xp.js +31 -0
- package/dist/{publicSenderState-BujjYsZZ.js → publicSenderState-CdRW_Wwp.js} +4 -4
- package/dist/regions-BdZt9Srn.js +1250 -0
- package/dist/splitpanes-D-ThFkeR.js +342 -0
- package/dist/style.css +1 -4
- package/dist/template-BvaNnq-g.js +1493 -0
- package/dist/{throttle-CWPJmFid.js → throttle-D-bUGaVh.js} +2 -2
- package/dist/tippy.esm-BmKNqohP.js +1994 -0
- package/dist/useTermsModal-Dhf6_eYb.js +87 -0
- package/dist/{utils-CA_Zy6u1.js → utils-CBPcYdLv.js} +8 -11
- package/dist/validation-DOcUOoMe.js +40 -0
- package/package.json +25 -31
- package/.eslintrc.cjs +0 -4
- package/dist/AddClientCallout-BWnvyBcK.js +0 -46
- package/dist/AnswerModal-CLGRdSnK.js +0 -3874
- package/dist/AttachmentItem-BPS0-wyc.js +0 -78
- package/dist/BaseDatePicker-BbmV_GdD.js +0 -3183
- package/dist/BaseUpload-9gPgI7r6.js +0 -1977
- package/dist/BlockMedia-DkPFWiYL.js +0 -76
- package/dist/CCallout-T26jwUby.js +0 -59
- package/dist/CDropdownItem-BE8BAMD1.js +0 -636
- package/dist/CField.vue_vue_type_style_index_0_lang-l0sNRNKZ.js +0 -1
- package/dist/CFormField-DECEfoVq.js +0 -241
- package/dist/CPriceInput-C4SOB-P5.js +0 -112
- package/dist/CTabs.vue_vue_type_style_index_0_scoped_e02a6440_lang-l0sNRNKZ.js +0 -1
- package/dist/ClientAutocomplete-DSebA1Mx.js +0 -78
- package/dist/ClientModal-BXFYvYCF.js +0 -625
- package/dist/ColorPicker-CZ_bJabP.js +0 -2879
- package/dist/CompanyModal-CDr3t28n.js +0 -141
- package/dist/ContentWrapper-BwmMoe4W.js +0 -183
- package/dist/CoverBlockSettings-_F11-DGc.js +0 -275
- package/dist/DocAnswer-BR59xzkT.js +0 -36
- package/dist/DocDetails-D1qbCbps.js +0 -259
- package/dist/DocForm-DBc2a7z5.js +0 -7272
- package/dist/DocFormSend-Casix-yG.js +0 -144
- package/dist/DocLinks-DGTaewyX.js +0 -38
- package/dist/DocModalBase-BbS_qvSv.js +0 -28
- package/dist/DocPrint-0PqX3mbJ.js +0 -240
- package/dist/DocReceipt-CU3VD5pt.js +0 -210
- package/dist/DocSendReminder-CuycBspr.js +0 -137
- package/dist/DocTextEditor-CntS2Bd-.js +0 -17180
- package/dist/DocTimeline-DJuv3yBe.js +0 -481
- package/dist/DocumentClient-C25XXzz6.js +0 -136
- package/dist/DocumentLayout-B7afHRMr.js +0 -4909
- package/dist/DocumentLogotype-sqI51wvM.js +0 -87
- package/dist/DocumentVoided-TahdTSMn.js +0 -25
- package/dist/EmbedInput-BY-wHSfc.js +0 -113
- package/dist/EmbedSettings-8pfjk4NP.js +0 -72
- package/dist/ErrorCallout-Dsr8PNsU.js +0 -28
- package/dist/FilePreviewModal-CcEinEFg.js +0 -81
- package/dist/Flag-PJKrghi9.js +0 -114
- package/dist/HeaderSettings-BqczIOsG.js +0 -392
- package/dist/ImageSelectModal-Cd-HhKnH.js +0 -84
- package/dist/ImageUploadWrapper-Dv43rGdb.js +0 -1604
- package/dist/Index-6b5VBKE-.js +0 -107
- package/dist/Index-B4pRJnbw.js +0 -84
- package/dist/Index-B69f8qgZ.js +0 -62
- package/dist/Index-B79YN9RO.js +0 -25
- package/dist/Index-BBrlPoe8.js +0 -58
- package/dist/Index-BXfWJCuq.js +0 -52
- package/dist/Index-Bd76vb37.js +0 -55
- package/dist/Index-BmbtQO5F.js +0 -150
- package/dist/Index-ByV_kJaH.js +0 -77
- package/dist/Index-CDV5rhWS.js +0 -49
- package/dist/Index-CIx4OOK-.js +0 -144
- package/dist/Index-CL1OWLt6.js +0 -223
- package/dist/Index-Caow0eZu.js +0 -31
- package/dist/Index-Cd3-3PEK.js +0 -2402
- package/dist/Index-CdpZBEKU.js +0 -98
- package/dist/Index-CmU3Sys-.js +0 -754
- package/dist/Index-CtRtgnpm.js +0 -32
- package/dist/Index-Cukkr33D.js +0 -140
- package/dist/Index-Cuqw0ios.js +0 -57
- package/dist/Index-Czm_WdqC.js +0 -25
- package/dist/Index-DNdYXHgr.js +0 -33
- package/dist/Index-DcuBxutp.js +0 -642
- package/dist/Index-DpWNWiyY.js +0 -291
- package/dist/Index-DzS1rZdF.js +0 -24
- package/dist/Index-N6s5pZxv.js +0 -26
- package/dist/Index-g_DNu4mt.js +0 -69
- package/dist/Index-mJ8F41GY.js +0 -154
- package/dist/Index-q7W9KA8m.js +0 -21
- package/dist/Index-rtzblZp4.js +0 -70
- package/dist/InputToggleRow-CZjxsDOQ.js +0 -57
- package/dist/ManualPopover-CZrWiT-P.js +0 -58
- package/dist/MediaWrapper-D37qK4KR.js +0 -23
- package/dist/PackageGroup-Heo_s8ct.js +0 -699
- package/dist/PdfTerms-AB9tXAtU.js +0 -36
- package/dist/PdfViewer-CIVkvOBr.js +0 -373
- package/dist/PlainHtml-CPmIebjY.js +0 -20
- package/dist/PriceHeader-DhDAruwX.js +0 -339
- package/dist/SearchApi-BMgdaI4s.js +0 -161
- package/dist/Setup-VIaIV9uT.js +0 -50
- package/dist/ThemeColorRow-DYJNgk6S.js +0 -67
- package/dist/ToggleBinding-CuwCeYpO.js +0 -38
- package/dist/UploadModal-BITcxG-J.js +0 -95
- package/dist/VideoPlayerInput-8szEX_8L.js +0 -93
- package/dist/VideoPlayerSettings-BIPytm6w.js +0 -61
- package/dist/VideoSelectModal-B-Pe34nb.js +0 -100
- package/dist/answerDocumentMixin-W7vE1Gp4.js +0 -51
- package/dist/formComponentsInstall-Bm3VMOh6.js +0 -2507
- package/dist/formValidationMixin-COkY8COk.js +0 -49
- package/dist/index-BFvjENMH.js +0 -81
- package/dist/index-BV2nGWay.js +0 -492
- package/dist/index-BgJ05dYc.js +0 -165
- package/dist/index-CMPAXxzs.js +0 -347
- package/dist/index-DNDjI5uI.js +0 -3916
- package/dist/index-aoff9oUi.js +0 -102
- package/dist/mapFormMixin-QbevCwJK.js +0 -72
- package/dist/omit-CTp9CXoU.js +0 -31
- package/dist/splitpanes-BHUVsCZF.js +0 -382
- package/dist/tinycolor-kTl0yxzz.js +0 -633
- package/dist/tippy.esm-sS5koDSU.js +0 -1799
- package/dist/vuedraggable.umd-BA3ZDRAp.js +0 -3161
- package/dist/vuex.esm-DKGl8mcw.js +0 -467
- package/public/favicon.ico +0 -0
- package/tsconfig.json +0 -26
- package/tsconfig.node.json +0 -10
- package/tsconfig.paths.json +0 -17
- package/vite.config.ts +0 -60
|
@@ -0,0 +1,720 @@
|
|
|
1
|
+
import { m as F } from "./mapFormMixin-D3BihYWW.js";
|
|
2
|
+
import { T as U } from "./ThemeColorRow-sjGdMzGN.js";
|
|
3
|
+
import P from "./VideoPlayerInput-BsUcmpl4.js";
|
|
4
|
+
import j from "./ImageUploadWrapper-RWNa-yIq.js";
|
|
5
|
+
import { B as H, a as $ } from "./index-DKMxIBz_.js";
|
|
6
|
+
import { p as S, _ as A, a4 as V, av as R, b as g, o as a, c as x, w as c, s as l, d as u, F as _, k as L, l as B, v as h, e as p, B as w, f as z, Y as O, b5 as D, S as W, E as q, ao as M, b6 as N, n as I, af as E } from "./main-Cb-nyil1.js";
|
|
7
|
+
import { _ as K } from "./CFormField.vue_vue_type_script_setup_true_lang-D_U9coAY.js";
|
|
8
|
+
import { b as Y } from "./CDropdownItem-Dmq5gYzA.js";
|
|
9
|
+
import { t as G } from "./template-BvaNnq-g.js";
|
|
10
|
+
const T = S.unsplash.id, J = S.pexels.id, Q = {
|
|
11
|
+
name: "MediaSelectModal",
|
|
12
|
+
i18nOptions: {
|
|
13
|
+
namespaces: "mediaSelectModal",
|
|
14
|
+
messages: {
|
|
15
|
+
en: {
|
|
16
|
+
title: "Choose background",
|
|
17
|
+
creditVideos: "Videos from {{thing}}",
|
|
18
|
+
tabLink: "Use link",
|
|
19
|
+
minWidth: "Recommended minimum image width is 1200 pixels or greater."
|
|
20
|
+
},
|
|
21
|
+
sv: {
|
|
22
|
+
title: "Välj bakgrundsbild",
|
|
23
|
+
creditVideos: "Videor från {{thing}}",
|
|
24
|
+
tabLink: "Egen länk",
|
|
25
|
+
minWidth: "Rekommenderad minimum bredd på bilden är 1200 pixlar eller större."
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
components: {
|
|
30
|
+
BackgroundModal: H,
|
|
31
|
+
BackgroundList: $,
|
|
32
|
+
VideoPlayerInput: P,
|
|
33
|
+
ImageUploadWrapper: j
|
|
34
|
+
},
|
|
35
|
+
emits: ["input", "close"],
|
|
36
|
+
props: {
|
|
37
|
+
currentType: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: ""
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
data() {
|
|
43
|
+
return {
|
|
44
|
+
tabs: [
|
|
45
|
+
{
|
|
46
|
+
value: "unsplash",
|
|
47
|
+
label: "Unsplash",
|
|
48
|
+
icon: '<svg style="margin-right: calc(0.5 * var(--rem));" width="20" height="20" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M10 9V0h12v9H10zm12 5h10v18H0V14h10v9h12v-9z"/></svg>'
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
value: "customImage",
|
|
52
|
+
label: this.$t("_common:upload"),
|
|
53
|
+
icon: '<svg style="margin-right: calc(0.5 * var(--rem));" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2"/><circle cx="8.5" cy="8.5" r="1.5"/><path d="M20.4 14.5L16 10 4 20"/></svg>'
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
value: "pexels",
|
|
57
|
+
label: "Pexels",
|
|
58
|
+
icon: '<svg style="margin-right: calc(0.5 * var(--rem));" xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 32 32"><path d="M2 0h28a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2z" fill="#05A081"></path><path d="M13 21h3.863v-3.752h1.167a3.124 3.124 0 1 0 0-6.248H13v10zm5.863 2H11V9h7.03a5.124 5.124 0 0 1 .833 10.18V23z" fill="#fff"></path></svg>'
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
value: "customVideo",
|
|
62
|
+
label: this.$t("tabLink"),
|
|
63
|
+
icon: '<svg style="margin-right: calc(0.5 * var(--rem));" width="28" height="28" xmlns="http://www.w3.org/2000/svg" version="1.1" x="0" y="0" xml:space="preserve" viewBox="0 0 71.412 50"><g transform="scale(.58824)"><path d="M118.9 13.3c-1.4-5.2-5.5-9.3-10.7-10.7C98.7 0 60.7 0 60.7 0s-38 0-47.5 2.5C8.1 3.9 3.9 8.1 2.5 13.3 0 22.8 0 42.5 0 42.5s0 19.8 2.5 29.2C3.9 76.9 8 81 13.2 82.4 22.8 85 60.7 85 60.7 85s38 0 47.5-2.5c5.2-1.4 9.3-5.5 10.7-10.7 2.5-9.5 2.5-29.2 2.5-29.2s.1-19.8-2.5-29.3z" fill="red" fill-opacity="1"/><path fill="#fff" d="M80.2 42.5L48.6 24.3v36.4z"/></g></svg>'
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
activeTab: "unsplash",
|
|
67
|
+
selectedImage: null,
|
|
68
|
+
preferredColor: null,
|
|
69
|
+
customImage: null,
|
|
70
|
+
selectedVideo: null,
|
|
71
|
+
customVideo: null
|
|
72
|
+
};
|
|
73
|
+
},
|
|
74
|
+
computed: {
|
|
75
|
+
isImage() {
|
|
76
|
+
return ["unsplash", "customImage"].includes(this.activeTab);
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
created() {
|
|
80
|
+
this.currentType === "video" && (this.activeTab = "pexels");
|
|
81
|
+
},
|
|
82
|
+
methods: {
|
|
83
|
+
async fetchImage({ query: e, page: t }) {
|
|
84
|
+
const { data: r } = await V.get(
|
|
85
|
+
"https://api.unsplash.com/search/photos",
|
|
86
|
+
{
|
|
87
|
+
params: {
|
|
88
|
+
page: t,
|
|
89
|
+
per_page: 12,
|
|
90
|
+
client_id: T,
|
|
91
|
+
query: e
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
);
|
|
95
|
+
return {
|
|
96
|
+
items: (r.results || []).map((n) => ({
|
|
97
|
+
...n,
|
|
98
|
+
image: n.urls.regular,
|
|
99
|
+
minImage: n.urls.thumb
|
|
100
|
+
})),
|
|
101
|
+
total: r.total
|
|
102
|
+
};
|
|
103
|
+
},
|
|
104
|
+
async fetchVideo({ query: e, page: t }) {
|
|
105
|
+
const { data: r } = await V.get("https://api.pexels.com/videos/search", {
|
|
106
|
+
headers: {
|
|
107
|
+
Authorization: J
|
|
108
|
+
},
|
|
109
|
+
params: {
|
|
110
|
+
page: t,
|
|
111
|
+
per_page: 12,
|
|
112
|
+
query: e
|
|
113
|
+
}
|
|
114
|
+
}), n = (o, d) => o.height < d.height || o.width < d.width ? -1 : 1, s = (o) => (o.find(({ height: d }) => d > 1e3 && d < 1200) || {}).link;
|
|
115
|
+
return {
|
|
116
|
+
items: (r.videos || []).map(
|
|
117
|
+
({ id: o, image: d, video_files: m = [], user: C }) => {
|
|
118
|
+
const { sd: k, hd: b } = (m || []).sort(n).reduce(
|
|
119
|
+
(f, v) => (f[v.quality] && v.link && f[v.quality].push(v.link), f),
|
|
120
|
+
{ sd: [], hd: [] }
|
|
121
|
+
), [i] = k;
|
|
122
|
+
let y = s(m);
|
|
123
|
+
return y || ([y] = b.length ? b : k.slice(-1)), {
|
|
124
|
+
id: `${o}`,
|
|
125
|
+
image: d,
|
|
126
|
+
minImage: d,
|
|
127
|
+
video: y,
|
|
128
|
+
minVideo: i,
|
|
129
|
+
userName: C.name,
|
|
130
|
+
userLink: C.link
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
),
|
|
134
|
+
total: r.total_results
|
|
135
|
+
};
|
|
136
|
+
},
|
|
137
|
+
selectImage({ image: e, links: t, color: r }) {
|
|
138
|
+
this.selectedImage = R(e, { w: 1800 }), r && (this.preferredColor = r);
|
|
139
|
+
const n = new Image();
|
|
140
|
+
n.src = this.selectedImage, V.get(t.download_location, {
|
|
141
|
+
params: {
|
|
142
|
+
client_id: T
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
},
|
|
146
|
+
setCustomBackground({ response: e }) {
|
|
147
|
+
this.customImage = e.url;
|
|
148
|
+
},
|
|
149
|
+
selectVideo({ id: e, image: t, video: r }) {
|
|
150
|
+
this.selectedVideo = {
|
|
151
|
+
id: e,
|
|
152
|
+
url: r,
|
|
153
|
+
thumbnail: t,
|
|
154
|
+
provider: "pexels"
|
|
155
|
+
};
|
|
156
|
+
},
|
|
157
|
+
onSave() {
|
|
158
|
+
let e;
|
|
159
|
+
this.isImage ? e = {
|
|
160
|
+
type: "image",
|
|
161
|
+
value: this.activeTab === "unsplash" ? this.selectedImage : this.customImage
|
|
162
|
+
} : e = {
|
|
163
|
+
type: "video",
|
|
164
|
+
value: this.activeTab === "pexels" ? this.selectedVideo : this.customVideo
|
|
165
|
+
}, this.preferredColor && (e.preferredColor = this.preferredColor), this.$emit("input", e), this.$emit("close");
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}, X = {
|
|
169
|
+
class: "flex w-full items-center justify-center",
|
|
170
|
+
style: { padding: "calc(0.25 * var(--rem)) calc(1 * var(--rem))", "border-bottom": "1px solid hsl(0, 0%, 88%)" }
|
|
171
|
+
}, Z = { class: "inline-flex items-center justify-center" }, ee = ["innerHTML"], te = { class: "max-md:!hidden" }, oe = {
|
|
172
|
+
key: 1,
|
|
173
|
+
class: "flex w-full flex-col items-center justify-center"
|
|
174
|
+
}, ie = { style: { "max-width": "500px", width: "100%", margin: "0 auto", "padding-top": "calc(3 * var(--rem))" } }, se = { style: { position: "relative", width: "100%", "padding-top": "56.25%", "background-color": "hsl(var(--gray-color-100) / 1)", "border-radius": "0.5em", "margin-bottom": "calc(1.5 * var(--rem))" } }, le = ["src"], re = {
|
|
175
|
+
key: 2,
|
|
176
|
+
class: "flex flex-col items-center justify-center"
|
|
177
|
+
}, ae = { style: { "max-width": "500px", width: "100%", margin: "0 auto", "padding-top": "calc(3 * var(--rem))" } }, ne = { class: "relative mb-6 w-full" }, de = ["src", "alt"], ce = {
|
|
178
|
+
key: 1,
|
|
179
|
+
class: "flex aspect-video flex-col items-center justify-center rounded-md bg-gray-100"
|
|
180
|
+
}, ue = {
|
|
181
|
+
style: { "padding-top": "calc(1 * var(--rem))", "font-size": "14px", "max-width": "40ch" },
|
|
182
|
+
class: "text-center text-gray-600"
|
|
183
|
+
}, me = { class: "flex items-center justify-center" };
|
|
184
|
+
function he(e, t, r, n, s, o) {
|
|
185
|
+
const d = g("CButton"), m = g("BackgroundList"), C = g("VideoPlayerInput"), k = g("ImageUploadWrapper"), b = g("BackgroundModal");
|
|
186
|
+
return a(), x(b, {
|
|
187
|
+
onClose: t[2] || (t[2] = (i) => e.$emit("close"))
|
|
188
|
+
}, {
|
|
189
|
+
header: c(() => [
|
|
190
|
+
l("div", X, [
|
|
191
|
+
(a(!0), u(_, null, L(s.tabs, (i, y) => (a(), x(d, {
|
|
192
|
+
key: y,
|
|
193
|
+
style: B([s.activeTab === i.value && { opacity: 1 }, { "font-size": "15px", "font-weight": "700", opacity: "0.5", "box-shadow": "none" }]),
|
|
194
|
+
onClick: (f) => s.activeTab = i.value
|
|
195
|
+
}, {
|
|
196
|
+
default: c(() => [
|
|
197
|
+
l("span", Z, [
|
|
198
|
+
l("div", {
|
|
199
|
+
innerHTML: i.icon
|
|
200
|
+
}, null, 8, ee),
|
|
201
|
+
l("span", te, h(i.label), 1)
|
|
202
|
+
])
|
|
203
|
+
]),
|
|
204
|
+
_: 2
|
|
205
|
+
}, 1032, ["style", "onClick"]))), 128))
|
|
206
|
+
])
|
|
207
|
+
]),
|
|
208
|
+
default: c(() => [
|
|
209
|
+
["unsplash", "pexels"].includes(s.activeTab) ? (a(), x(m, {
|
|
210
|
+
key: s.activeTab,
|
|
211
|
+
fetch: o.isImage ? o.fetchImage : o.fetchVideo,
|
|
212
|
+
"credit-text": e.$t("creditVideos", { thing: s.activeTab.capitalize() }),
|
|
213
|
+
"default-query": "nature",
|
|
214
|
+
onSelect: t[0] || (t[0] = (i) => o.isImage ? o.selectImage(i) : o.selectVideo(i))
|
|
215
|
+
}, {
|
|
216
|
+
footer: c(() => [
|
|
217
|
+
p(d, {
|
|
218
|
+
disabled: o.isImage ? !s.selectedImage : !s.selectedVideo,
|
|
219
|
+
style: { "margin-left": "0.5em" },
|
|
220
|
+
type: "secondary",
|
|
221
|
+
onClick: o.onSave
|
|
222
|
+
}, {
|
|
223
|
+
default: c(() => [
|
|
224
|
+
w(h(e.$t("_common:save")), 1)
|
|
225
|
+
]),
|
|
226
|
+
_: 1
|
|
227
|
+
}, 8, ["disabled", "onClick"])
|
|
228
|
+
]),
|
|
229
|
+
_: 1
|
|
230
|
+
}, 8, ["fetch", "credit-text"])) : s.activeTab === "customVideo" ? (a(), u("div", oe, [
|
|
231
|
+
l("div", ie, [
|
|
232
|
+
l("div", se, [
|
|
233
|
+
s.customVideo ? (a(), u("iframe", {
|
|
234
|
+
key: 0,
|
|
235
|
+
src: s.customVideo.url,
|
|
236
|
+
class: "custom-video-preview"
|
|
237
|
+
}, null, 8, le)) : z("", !0)
|
|
238
|
+
]),
|
|
239
|
+
p(C, {
|
|
240
|
+
modelValue: s.customVideo,
|
|
241
|
+
"onUpdate:modelValue": t[1] || (t[1] = (i) => s.customVideo = i),
|
|
242
|
+
filled: !0,
|
|
243
|
+
"video-options": { background: !0 }
|
|
244
|
+
}, {
|
|
245
|
+
default: c(() => [
|
|
246
|
+
p(d, {
|
|
247
|
+
disabled: !s.customVideo,
|
|
248
|
+
type: "secondary",
|
|
249
|
+
onClick: o.onSave
|
|
250
|
+
}, {
|
|
251
|
+
default: c(() => [
|
|
252
|
+
w(h(e.$t("_common:save")), 1)
|
|
253
|
+
]),
|
|
254
|
+
_: 1
|
|
255
|
+
}, 8, ["disabled", "onClick"])
|
|
256
|
+
]),
|
|
257
|
+
_: 1
|
|
258
|
+
}, 8, ["modelValue"])
|
|
259
|
+
])
|
|
260
|
+
])) : (a(), u("div", re, [
|
|
261
|
+
l("div", ae, [
|
|
262
|
+
p(k, {
|
|
263
|
+
ref: "uploadWrapper",
|
|
264
|
+
"on-image-upload": o.setCustomBackground
|
|
265
|
+
}, {
|
|
266
|
+
default: c(({ progress: i }) => [
|
|
267
|
+
l("div", ne, [
|
|
268
|
+
s.customImage ? (a(), u("img", {
|
|
269
|
+
key: 0,
|
|
270
|
+
src: s.customImage,
|
|
271
|
+
alt: s.customImage,
|
|
272
|
+
class: "h-full w-full object-cover object-scale-down object-top",
|
|
273
|
+
style: { "max-height": "500px" }
|
|
274
|
+
}, null, 8, de)) : (a(), u("div", ce, [
|
|
275
|
+
p(d, {
|
|
276
|
+
loading: !!i && i < 100,
|
|
277
|
+
style: B(s.customImage && { opacity: 0.5 }),
|
|
278
|
+
"icon-left": "upload",
|
|
279
|
+
type: "none"
|
|
280
|
+
}, {
|
|
281
|
+
default: c(() => [
|
|
282
|
+
w(h(e.$t("_common:upload")), 1)
|
|
283
|
+
]),
|
|
284
|
+
_: 2
|
|
285
|
+
}, 1032, ["loading", "style"]),
|
|
286
|
+
l("div", ue, h(e.$t("minWidth")), 1)
|
|
287
|
+
]))
|
|
288
|
+
])
|
|
289
|
+
]),
|
|
290
|
+
_: 1
|
|
291
|
+
}, 8, ["on-image-upload"]),
|
|
292
|
+
l("div", me, [
|
|
293
|
+
p(d, {
|
|
294
|
+
disabled: !s.customImage,
|
|
295
|
+
type: "secondary",
|
|
296
|
+
onClick: o.onSave
|
|
297
|
+
}, {
|
|
298
|
+
default: c(() => [
|
|
299
|
+
w(h(e.$t("_common:save")), 1)
|
|
300
|
+
]),
|
|
301
|
+
_: 1
|
|
302
|
+
}, 8, ["disabled", "onClick"])
|
|
303
|
+
])
|
|
304
|
+
])
|
|
305
|
+
]))
|
|
306
|
+
]),
|
|
307
|
+
_: 1
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
const pe = /* @__PURE__ */ A(Q, [["render", he], ["__scopeId", "data-v-0a5b68e1"]]), ge = {
|
|
311
|
+
name: "CRadioButton",
|
|
312
|
+
components: {
|
|
313
|
+
CButton: O
|
|
314
|
+
},
|
|
315
|
+
mixins: [D],
|
|
316
|
+
props: {
|
|
317
|
+
type: {
|
|
318
|
+
type: String,
|
|
319
|
+
default: "primary"
|
|
320
|
+
},
|
|
321
|
+
expanded: Boolean
|
|
322
|
+
},
|
|
323
|
+
data() {
|
|
324
|
+
return {
|
|
325
|
+
isFocused: !1
|
|
326
|
+
};
|
|
327
|
+
}
|
|
328
|
+
}, ye = ["disabled", "required", "name", "value"];
|
|
329
|
+
function ve(e, t, r, n, s, o) {
|
|
330
|
+
const d = g("CButton");
|
|
331
|
+
return a(), u("div", {
|
|
332
|
+
class: I([{ "is-expanded": r.expanded }, "control"])
|
|
333
|
+
}, [
|
|
334
|
+
p(d, {
|
|
335
|
+
ref: "label",
|
|
336
|
+
tag: "label",
|
|
337
|
+
type: e.newValue === e.nativeValue ? r.type : null,
|
|
338
|
+
size: e.size,
|
|
339
|
+
class: I([[{ "is-disabled": e.disabled, "is-focused": s.isFocused }], "c-radio radio button"]),
|
|
340
|
+
disabled: e.disabledOrUndefined,
|
|
341
|
+
onClick: e.focus,
|
|
342
|
+
onKeydown: t[4] || (t[4] = E(M((m) => e.$refs.$el.label.click(), ["prevent"]), ["enter"]))
|
|
343
|
+
}, {
|
|
344
|
+
default: c(() => [
|
|
345
|
+
W(e.$slots, "default"),
|
|
346
|
+
q(l("input", {
|
|
347
|
+
ref: "input",
|
|
348
|
+
"onUpdate:modelValue": t[0] || (t[0] = (m) => e.computedValue = m),
|
|
349
|
+
disabled: e.disabledOrUndefined,
|
|
350
|
+
required: e.requiredOrUndefined,
|
|
351
|
+
name: e.name,
|
|
352
|
+
value: e.nativeValue,
|
|
353
|
+
type: "radio",
|
|
354
|
+
onClick: t[1] || (t[1] = M(() => {
|
|
355
|
+
}, ["stop"])),
|
|
356
|
+
onFocus: t[2] || (t[2] = (m) => s.isFocused = !0),
|
|
357
|
+
onBlur: t[3] || (t[3] = (m) => s.isFocused = !1)
|
|
358
|
+
}, null, 40, ye), [
|
|
359
|
+
[N, e.computedValue]
|
|
360
|
+
])
|
|
361
|
+
]),
|
|
362
|
+
_: 3
|
|
363
|
+
}, 8, ["type", "size", "class", "disabled", "onClick"])
|
|
364
|
+
], 2);
|
|
365
|
+
}
|
|
366
|
+
const fe = /* @__PURE__ */ A(ge, [["render", ve]]), we = {
|
|
367
|
+
name: "HeaderSettings",
|
|
368
|
+
components: {
|
|
369
|
+
ThemeColorRow: U,
|
|
370
|
+
CRadioButton: fe,
|
|
371
|
+
CSwitch: Y,
|
|
372
|
+
CField: K
|
|
373
|
+
},
|
|
374
|
+
mixins: [
|
|
375
|
+
F(
|
|
376
|
+
[
|
|
377
|
+
"layout",
|
|
378
|
+
"items",
|
|
379
|
+
"media",
|
|
380
|
+
"showPriceSummary",
|
|
381
|
+
"backgroundColor",
|
|
382
|
+
"textAlign",
|
|
383
|
+
"textColor"
|
|
384
|
+
],
|
|
385
|
+
{ useEmit: !1 }
|
|
386
|
+
)
|
|
387
|
+
],
|
|
388
|
+
data() {
|
|
389
|
+
return {
|
|
390
|
+
type: "image",
|
|
391
|
+
layoutOptions2: [
|
|
392
|
+
{
|
|
393
|
+
value: "left",
|
|
394
|
+
icon: '<rect x="3" y="6" width="18" height="14" rx="1"></rect><rect x="3" y="6" width="8" height="14" rx="1" fill="currentColor"></rect>'
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
value: "right",
|
|
398
|
+
icon: '<rect x="3" y="6" width="18" height="14" rx="1"></rect><rect x="13" y="6" width="8" height="14" rx="1" fill="currentColor"></rect>'
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
value: "top",
|
|
402
|
+
icon: '<rect x="3" y="6" width="18" height="14" rx="1"></rect><rect x="3" y="6" width="18" height="7" rx="1" fill="currentColor"></rect>'
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
value: "bottom",
|
|
406
|
+
icon: '<rect x="3" y="6" width="18" height="14" rx="1"></rect><rect x="3" y="14" width="18" height="5" rx="1" fill="currentColor"></rect>'
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
value: "center",
|
|
410
|
+
icon: '<rect x="3" y="6" width="18" height="14" rx="1"></rect><rect x="8" y="12" width="8" height="2" rx="0" fill="currentColor"></rect>'
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
value: "price",
|
|
414
|
+
icon: '<rect x="4" y="6" width="16" height="7"></rect><rect x="4" y="16" width="16" height="3" style="fill: currentColor;"></rect>'
|
|
415
|
+
}
|
|
416
|
+
],
|
|
417
|
+
alignOptions: [
|
|
418
|
+
{
|
|
419
|
+
value: "left",
|
|
420
|
+
icon: '<path d="M 6 9 A 2.0002 2.0002 0 1 0 6 13 L 34 13 A 2.0002 2.0002 0 1 0 34 9 L 6 9 z M 6 22 A 2.0002 2.0002 0 1 0 6 26 L 42 26 A 2.0002 2.0002 0 1 0 42 22 L 6 22 z M 7 35 A 2.0002 2.0002 0 1 0 7 39 L 27 39 A 2.0002 2.0002 0 1 0 27 35 L 7 35 z" />'
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
value: "center",
|
|
424
|
+
icon: '<path d="M 10 9 A 2.0002 2.0002 0 1 0 10 13 L 38 13 A 2.0002 2.0002 0 1 0 38 9 L 10 9 z M 6 22 A 2.0002 2.0002 0 1 0 6 26 L 42 26 A 2.0002 2.0002 0 1 0 42 22 L 6 22 z M 14 35 A 2.0002 2.0002 0 1 0 14 39 L 34 39 A 2.0002 2.0002 0 1 0 34 35 L 14 35 z" />'
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
value: "right",
|
|
428
|
+
icon: '<path d="M 14 9 A 2.0002 2.0002 0 1 0 14 13 L 42 13 A 2.0002 2.0002 0 1 0 42 9 L 14 9 z M 6 22 A 2.0002 2.0002 0 1 0 6 26 L 42 26 A 2.0002 2.0002 0 1 0 42 22 L 6 22 z M 22 35 A 2.0002 2.0002 0 1 0 22 39 L 42 39 A 2.0002 2.0002 0 1 0 42 35 L 22 35 z" />'
|
|
429
|
+
}
|
|
430
|
+
]
|
|
431
|
+
};
|
|
432
|
+
},
|
|
433
|
+
computed: {
|
|
434
|
+
layoutOptions() {
|
|
435
|
+
var t;
|
|
436
|
+
const { type: e } = ((t = this.items) == null ? void 0 : t[0]) || {};
|
|
437
|
+
return [
|
|
438
|
+
{
|
|
439
|
+
// left
|
|
440
|
+
isActive: this.layout === "vertical" && e === "media",
|
|
441
|
+
icon: '<rect x="3" y="6" width="18" height="14" rx="1"></rect><rect x="3" y="6" width="8" height="14" rx="1" fill="currentColor"></rect>',
|
|
442
|
+
onClick: () => this.setLayout({ layout: "vertical", type: "media" })
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
// right
|
|
446
|
+
isActive: this.layout === "vertical" && e === "content",
|
|
447
|
+
icon: '<rect x="3" y="6" width="18" height="14" rx="1"></rect><rect x="13" y="6" width="8" height="14" rx="1" fill="currentColor"></rect>',
|
|
448
|
+
onClick: () => this.setLayout({ layout: "vertical", type: "content" })
|
|
449
|
+
},
|
|
450
|
+
{
|
|
451
|
+
// top
|
|
452
|
+
isActive: this.layout === "horizontal" && e === "media",
|
|
453
|
+
icon: '<rect x="3" y="6" width="18" height="14" rx="1"></rect><rect x="3" y="6" width="18" height="7" rx="1" fill="currentColor"></rect>',
|
|
454
|
+
onClick: () => this.setLayout({ layout: "horizontal", type: "media" })
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
// bottom
|
|
458
|
+
isActive: this.layout === "horizontal" && e === "content",
|
|
459
|
+
icon: '<rect x="3" y="6" width="18" height="14" rx="1"></rect><rect x="3" y="14" width="18" height="5" rx="1" fill="currentColor"></rect>',
|
|
460
|
+
onClick: () => this.setLayout({ layout: "horizontal", type: "content" })
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
// center
|
|
464
|
+
isActive: this.layout === "center",
|
|
465
|
+
icon: '<rect x="3" y="6" width="18" height="14" rx="1"></rect><rect x="8" y="12" width="8" height="2" rx="0" fill="currentColor"></rect>',
|
|
466
|
+
onClick: () => this.setLayout({ layout: "center", type: "media" })
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
// price
|
|
470
|
+
isActive: this.layout === "price",
|
|
471
|
+
icon: '<rect x="4" y="6" width="16" height="7"></rect><rect x="4" y="16" width="16" height="3" style="fill: currentColor;"></rect>',
|
|
472
|
+
onClick: () => this.setLayout({ layout: "price" })
|
|
473
|
+
}
|
|
474
|
+
];
|
|
475
|
+
},
|
|
476
|
+
overlayColor: {
|
|
477
|
+
get() {
|
|
478
|
+
var e;
|
|
479
|
+
return ((e = this.media) == null ? void 0 : e.overlayColor) || "";
|
|
480
|
+
},
|
|
481
|
+
set(e) {
|
|
482
|
+
this.media = { ...this.media, overlay: !0, overlayColor: e };
|
|
483
|
+
}
|
|
484
|
+
},
|
|
485
|
+
background() {
|
|
486
|
+
let e = "";
|
|
487
|
+
const { type: t, resourceUrl: r, video: n = {} } = this.media || {};
|
|
488
|
+
return t === "image" && r ? e = r : t === "video" && n.thumbnail && (e = n.thumbnail), e;
|
|
489
|
+
},
|
|
490
|
+
theme() {
|
|
491
|
+
var e;
|
|
492
|
+
return ((e = this._document) == null ? void 0 : e.theme) || {};
|
|
493
|
+
},
|
|
494
|
+
showPriceToggle: {
|
|
495
|
+
get() {
|
|
496
|
+
return !!(typeof this.showPriceSummary == "boolean" ? this.showPriceSummary : this.theme.showPriceSummary);
|
|
497
|
+
},
|
|
498
|
+
set(e) {
|
|
499
|
+
this.showPriceSummary = e;
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
},
|
|
503
|
+
watch: {
|
|
504
|
+
layout(e) {
|
|
505
|
+
this._document.isDirty(this._value.textAlign) || (this.textAlign = e === "center" ? e : "left");
|
|
506
|
+
},
|
|
507
|
+
backgroundColor(e) {
|
|
508
|
+
this._document.isDirty(this._value.textColor) || (this.textColor = G.readability(e, "#fff") < 1.8 ? "#111111" : "#FFFFFF");
|
|
509
|
+
}
|
|
510
|
+
},
|
|
511
|
+
methods: {
|
|
512
|
+
// Used for setting the correct array item order for specific layouts
|
|
513
|
+
// will place the given item type first in items
|
|
514
|
+
setLayout({ layout: e, type: t = "" }) {
|
|
515
|
+
const r = (n) => (s) => s.type === n ? -1 : 1;
|
|
516
|
+
t && (this.items = [...this.items].sort(r(t))), this.layout = e;
|
|
517
|
+
},
|
|
518
|
+
openBgModal() {
|
|
519
|
+
const { type: e = "image" } = this.media || {};
|
|
520
|
+
this.$modal.show(
|
|
521
|
+
pe,
|
|
522
|
+
{
|
|
523
|
+
currentType: e
|
|
524
|
+
},
|
|
525
|
+
{},
|
|
526
|
+
{
|
|
527
|
+
input: ({ type: t, value: r, preferredColor: n }) => {
|
|
528
|
+
const s = t === "image" ? "resourceUrl" : "video";
|
|
529
|
+
this.media = {
|
|
530
|
+
...this.media,
|
|
531
|
+
type: t,
|
|
532
|
+
[s]: r
|
|
533
|
+
}, n && !this._document.isDirty(this._value.backgroundColor) && (this.backgroundColor = n);
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
);
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
}, Ce = { class: "d-root" }, ke = { class: "d-option" }, be = { class: "grid grid-cols-3 gap-2 p-1" }, xe = ["innerHTML"], _e = { class: "d-option" }, Ve = {
|
|
540
|
+
class: "d-option-title",
|
|
541
|
+
style: { "padding-bottom": "calc(0.5 * var(--rem))" }
|
|
542
|
+
}, Le = {
|
|
543
|
+
class: "d-option",
|
|
544
|
+
style: { "padding-bottom": "0.5em" }
|
|
545
|
+
}, Be = {
|
|
546
|
+
key: 0,
|
|
547
|
+
class: "d-option"
|
|
548
|
+
}, ze = { class: "d-option-title" }, Ie = { style: { flex: "1 1 auto" } }, Ae = {
|
|
549
|
+
key: 0,
|
|
550
|
+
class: "d-option-row",
|
|
551
|
+
style: { "padding-top": "1em" }
|
|
552
|
+
}, Me = {
|
|
553
|
+
key: 0,
|
|
554
|
+
class: "d-option"
|
|
555
|
+
}, Te = { class: "d-option" }, Se = { class: "d-option flex w-full" }, Fe = {
|
|
556
|
+
class: "d-option-title",
|
|
557
|
+
style: { "margin-top": "calc(0.5 * var(--rem))" }
|
|
558
|
+
}, Ue = ["innerHTML"];
|
|
559
|
+
function Pe(e, t, r, n, s, o) {
|
|
560
|
+
const d = g("CButton"), m = g("ThemeColorRow"), C = g("CSwitch"), k = g("CRadioButton"), b = g("CField");
|
|
561
|
+
return a(), u("div", Ce, [
|
|
562
|
+
l("div", ke, [
|
|
563
|
+
t[8] || (t[8] = l("div", {
|
|
564
|
+
class: "d-option-title",
|
|
565
|
+
style: { "padding-bottom": "calc(0.5 * var(--rem))" }
|
|
566
|
+
}, " Layouts ", -1)),
|
|
567
|
+
l("div", be, [
|
|
568
|
+
(a(!0), u(_, null, L(o.layoutOptions, ({ isActive: i, onClick: y, icon: f }, v) => (a(), x(d, {
|
|
569
|
+
key: v,
|
|
570
|
+
type: i ? "secondary" : "none",
|
|
571
|
+
pattern: i ? "primary" : "secondary",
|
|
572
|
+
size: "normal",
|
|
573
|
+
style: { padding: "6px 10px", "border-radius": "3px", height: "initial" },
|
|
574
|
+
onClick: y
|
|
575
|
+
}, {
|
|
576
|
+
default: c(() => [
|
|
577
|
+
(a(), u("svg", {
|
|
578
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
579
|
+
width: "30",
|
|
580
|
+
height: "30",
|
|
581
|
+
viewBox: "0 0 24 24",
|
|
582
|
+
fill: "none",
|
|
583
|
+
stroke: "currentColor",
|
|
584
|
+
"stroke-width": "1.75",
|
|
585
|
+
"stroke-linecap": "round",
|
|
586
|
+
"stroke-linejoin": "round",
|
|
587
|
+
innerHTML: f
|
|
588
|
+
}, null, 8, xe))
|
|
589
|
+
]),
|
|
590
|
+
_: 2
|
|
591
|
+
}, 1032, ["type", "pattern", "onClick"]))), 128))
|
|
592
|
+
])
|
|
593
|
+
]),
|
|
594
|
+
l("div", _e, [
|
|
595
|
+
l("div", Ve, h(e.$t("_common:background").capitalize()), 1),
|
|
596
|
+
l("div", {
|
|
597
|
+
style: B({
|
|
598
|
+
backgroundImage: `url(${o.background || o.theme.background})`
|
|
599
|
+
}),
|
|
600
|
+
class: "d-option-button-image",
|
|
601
|
+
onClick: t[0] || (t[0] = (...i) => o.openBgModal && o.openBgModal(...i))
|
|
602
|
+
}, null, 4)
|
|
603
|
+
]),
|
|
604
|
+
l("div", Le, [
|
|
605
|
+
p(m, {
|
|
606
|
+
value: o.overlayColor || o.theme.backgroundFilter || "",
|
|
607
|
+
placement: "auto",
|
|
608
|
+
class: "d-option-title",
|
|
609
|
+
onChange: t[1] || (t[1] = (i) => o.overlayColor = i)
|
|
610
|
+
}, {
|
|
611
|
+
default: c(() => [
|
|
612
|
+
w(h(e.$t("components:account.documentForm.settings.backgroundFilter")), 1)
|
|
613
|
+
]),
|
|
614
|
+
_: 1
|
|
615
|
+
}, 8, ["value"])
|
|
616
|
+
]),
|
|
617
|
+
e.layout === "price" ? (a(), u("div", Be, [
|
|
618
|
+
l("div", ze, [
|
|
619
|
+
l("div", Ie, h(e.$t(
|
|
620
|
+
"components:account.documentForm.settings.priceSummaryBackground"
|
|
621
|
+
)), 1),
|
|
622
|
+
p(C, {
|
|
623
|
+
modelValue: o.showPriceToggle,
|
|
624
|
+
"onUpdate:modelValue": t[2] || (t[2] = (i) => o.showPriceToggle = i),
|
|
625
|
+
size: "small",
|
|
626
|
+
type: "secondary",
|
|
627
|
+
style: { "margin-right": "0" }
|
|
628
|
+
}, null, 8, ["modelValue"])
|
|
629
|
+
]),
|
|
630
|
+
o.showPriceToggle ? (a(), u("div", Ae, [
|
|
631
|
+
p(m, {
|
|
632
|
+
value: e.backgroundColor || o.theme.priceSummaryBackground || "",
|
|
633
|
+
"picker-options": { disableAlpha: !0 },
|
|
634
|
+
placement: "auto",
|
|
635
|
+
class: "d-option-title",
|
|
636
|
+
onChange: t[3] || (t[3] = (i) => e.backgroundColor = i)
|
|
637
|
+
}, {
|
|
638
|
+
default: c(() => [
|
|
639
|
+
w(h(e.$t("_common:backgroundColor").capitalize()), 1)
|
|
640
|
+
]),
|
|
641
|
+
_: 1
|
|
642
|
+
}, 8, ["value"])
|
|
643
|
+
])) : z("", !0)
|
|
644
|
+
])) : (a(), u(_, { key: 1 }, [
|
|
645
|
+
e.layout !== "center" ? (a(), u("div", Me, [
|
|
646
|
+
p(m, {
|
|
647
|
+
value: e.backgroundColor || o.theme.priceSummaryBackground || "",
|
|
648
|
+
"picker-options": { disableAlpha: !0 },
|
|
649
|
+
placement: "auto",
|
|
650
|
+
class: "d-option-title",
|
|
651
|
+
onChange: t[4] || (t[4] = (i) => {
|
|
652
|
+
e.backgroundColor = i, e._document.setDirty(e._value.backgroundColor);
|
|
653
|
+
})
|
|
654
|
+
}, {
|
|
655
|
+
default: c(() => [
|
|
656
|
+
w(h(e.$t("_common:backgroundColor").capitalize()), 1)
|
|
657
|
+
]),
|
|
658
|
+
_: 1
|
|
659
|
+
}, 8, ["value"])
|
|
660
|
+
])) : z("", !0),
|
|
661
|
+
l("div", Te, [
|
|
662
|
+
p(m, {
|
|
663
|
+
value: e.textColor || "",
|
|
664
|
+
"picker-options": { disableAlpha: !0 },
|
|
665
|
+
placement: "auto",
|
|
666
|
+
class: "d-option-title",
|
|
667
|
+
style: { "margin-top": "calc(0.5 * var(--rem))" },
|
|
668
|
+
onChange: t[5] || (t[5] = (i) => {
|
|
669
|
+
e.textColor = i, e._document.setDirty(e._value.textColor);
|
|
670
|
+
})
|
|
671
|
+
}, {
|
|
672
|
+
default: c(() => [
|
|
673
|
+
w(h(e.$t("_common:textColor").capitalize()), 1)
|
|
674
|
+
]),
|
|
675
|
+
_: 1
|
|
676
|
+
}, 8, ["value"])
|
|
677
|
+
]),
|
|
678
|
+
l("div", Se, [
|
|
679
|
+
l("div", Fe, h(e.$t("_common:textAlign").capitalize()), 1),
|
|
680
|
+
p(b, { style: { "margin-left": "auto" } }, {
|
|
681
|
+
default: c(() => [
|
|
682
|
+
(a(!0), u(_, null, L(s.alignOptions, ({ value: i, icon: y }, f) => (a(), x(k, {
|
|
683
|
+
key: f,
|
|
684
|
+
modelValue: e.textAlign,
|
|
685
|
+
"onUpdate:modelValue": [
|
|
686
|
+
t[6] || (t[6] = (v) => e.textAlign = v),
|
|
687
|
+
t[7] || (t[7] = (v) => e._document.setDirty(e._value.textAlign))
|
|
688
|
+
],
|
|
689
|
+
"native-value": i,
|
|
690
|
+
type: e.textAlign ? "secondary" : "none",
|
|
691
|
+
class: I(!e.textAlign && "text-gray-400"),
|
|
692
|
+
size: "small"
|
|
693
|
+
}, {
|
|
694
|
+
default: c(() => [
|
|
695
|
+
(a(), u("svg", {
|
|
696
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
697
|
+
width: "16",
|
|
698
|
+
height: "16",
|
|
699
|
+
viewBox: "0 0 48 48",
|
|
700
|
+
fill: "currentColor",
|
|
701
|
+
stroke: "currentColor",
|
|
702
|
+
"stroke-linecap": "round",
|
|
703
|
+
"stroke-linejoin": "round",
|
|
704
|
+
style: { margin: "0" },
|
|
705
|
+
innerHTML: y
|
|
706
|
+
}, null, 8, Ue))
|
|
707
|
+
]),
|
|
708
|
+
_: 2
|
|
709
|
+
}, 1032, ["modelValue", "native-value", "type", "class"]))), 128))
|
|
710
|
+
]),
|
|
711
|
+
_: 1
|
|
712
|
+
})
|
|
713
|
+
])
|
|
714
|
+
], 64))
|
|
715
|
+
]);
|
|
716
|
+
}
|
|
717
|
+
const Ee = /* @__PURE__ */ A(we, [["render", Pe], ["__scopeId", "data-v-bccd31d9"]]);
|
|
718
|
+
export {
|
|
719
|
+
Ee as default
|
|
720
|
+
};
|