@cling-se/widget 0.17.0 → 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/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-C2rXt2cJ.js → CCurrencyDropdown-DE_3CTjm.js} +91 -53
- 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-C8VPsiK6.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-LzN6dktq.js → Index-BBwvo7S9.js} +10 -18
- package/dist/Index-BEMlsYwJ.js +68 -0
- package/dist/Index-BRBhJ6kz.js +21 -0
- package/dist/{Index-BPUYpfLJ.js → Index-BTFmHjUt.js} +47 -60
- 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-BUK-1yVR.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-BHJGfHm9.js → Index-DfLLA0ij.js} +313 -206
- package/dist/Index-Dw1CO5F9.js +76 -0
- package/dist/Index-PZXyOoVb.js +87 -0
- package/dist/{Index-BioOegOO.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-CM3FN0A6.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-DhhjSWLO.js → SmartList-DqG7Q5t7.js} +16 -24
- package/dist/Sortable.vue_vue_type_script_setup_true_lang-CzMbr8AX.js +1303 -0
- package/dist/{TermsSettings-BEQwmkFH.js → TermsSettings-BOCONyM4.js} +169 -56
- 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-D0hKNU85.js → debounce-DNl99Gyo.js} +10 -10
- package/dist/dom-CkTGWrfu.js +69 -0
- package/dist/{focusDrawerMixin-C_aTLmK0.js → focusDrawerMixin-BwcErMDY.js} +1 -1
- package/dist/{formDrawerState-Da4mcbab.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 +285 -1485
- package/dist/{main-BgzLHIoo.js → main-Cb-nyil1.js} +41414 -42507
- package/dist/mapFormMixin-D3BihYWW.js +1544 -0
- package/dist/omit--YYr41Xp.js +31 -0
- package/dist/{publicSenderState-DB4BHByV.js → publicSenderState-CdRW_Wwp.js} +4 -4
- 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-DT2UVOqm.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-nos8CB1L.js → utils-CBPcYdLv.js} +8 -11
- package/dist/validation-DOcUOoMe.js +40 -0
- package/package.json +18 -21
- package/dist/AddClientCallout-BJzBdba1.js +0 -48
- package/dist/AnswerModal-frHq1g4s.js +0 -3874
- package/dist/AttachmentItem-BaN0OrEV.js +0 -85
- package/dist/BaseDatePicker-B-AfdrSb.js +0 -3187
- package/dist/BaseUpload-CY3lTcte.js +0 -1977
- package/dist/BlockMedia-Bb5wQIDg.js +0 -76
- package/dist/CCallout-5quI6yyk.js +0 -58
- package/dist/CDropdownItem-CaoSQX6X.js +0 -640
- package/dist/CFormField-Dd2Y71JG.js +0 -240
- package/dist/CPhoneInput-BU1t6eo_.js +0 -138
- package/dist/CPriceInput-pv2aIVkH.js +0 -116
- package/dist/CSelect-CrM45B7V.js +0 -91
- package/dist/CSkeleton-BkvONMqL.js +0 -55
- package/dist/ClientAutocomplete-BRXIKQSk.js +0 -438
- package/dist/ClientModal-CvHAptV2.js +0 -666
- package/dist/ColorPicker-RgoXRrud.js +0 -2879
- package/dist/CompanyModal-OL4bD9Gk.js +0 -147
- package/dist/ContentWrapper-8HduCnR4.js +0 -190
- package/dist/CoverBlockSettings-DUv8AcdX.js +0 -659
- package/dist/DocAnswer-DiyFfpT2.js +0 -36
- package/dist/DocDetails-BxNRfBnK.js +0 -263
- package/dist/DocForm-MGp-o0pu.js +0 -5017
- package/dist/DocFormSend-q_QuVCqh.js +0 -146
- package/dist/DocLinks-DGDdp30U.js +0 -38
- package/dist/DocModalBase-qG4RqwBn.js +0 -28
- package/dist/DocPrint-Cln3kt0g.js +0 -240
- package/dist/DocReceipt-nbsJ-ukZ.js +0 -217
- package/dist/DocSendReminder-B3qdqduf.js +0 -140
- package/dist/DocTextEditor-CQDnjnRY.js +0 -17193
- package/dist/DocTimeline-CgKHoDcG.js +0 -485
- package/dist/DocumentClient-UZlnIlz5.js +0 -136
- package/dist/DocumentLayout-Dvr4zgyF.js +0 -4880
- package/dist/DocumentLogotype-mAVgMRHr.js +0 -92
- package/dist/DocumentVoided-BXYNrf_6.js +0 -25
- package/dist/EmbedInput-YRUrw3c6.js +0 -117
- package/dist/EmbedSettings-DvRreF7H.js +0 -74
- package/dist/ErrorCallout-DVknpLVY.js +0 -27
- package/dist/FilePreviewModal-DC56FaGy.js +0 -81
- package/dist/Flag-D5iZLESg.js +0 -46
- package/dist/HeaderSettings-DXZnZL7A.js +0 -440
- package/dist/ImageSelectModal-Bu4_xZga.js +0 -86
- package/dist/ImageUploadWrapper-CtZhkAm1.js +0 -1604
- package/dist/Index-B1dJO6Bk.js +0 -54
- package/dist/Index-B3pz1coY.js +0 -150
- package/dist/Index-BHgW8EHW.js +0 -2446
- package/dist/Index-BNucs2O-.js +0 -154
- package/dist/Index-BW-EtZ1z.js +0 -55
- package/dist/Index-BjKACpun.js +0 -66
- package/dist/Index-C94BL4uU.js +0 -294
- package/dist/Index-CB57haU8.js +0 -58
- package/dist/Index-CP17iXT6.js +0 -25
- package/dist/Index-CUSbvjoD.js +0 -62
- package/dist/Index-CVnD6jo5.js +0 -25
- package/dist/Index-Ci5zdPeT.js +0 -28
- package/dist/Index-CikqSMjb.js +0 -41
- package/dist/Index-CxO4tJ3U.js +0 -26
- package/dist/Index-D4J4BpHd.js +0 -230
- package/dist/Index-DAQQQlut.js +0 -754
- package/dist/Index-DNxSR72J.js +0 -73
- package/dist/Index-DPuKRwmu.js +0 -41
- package/dist/Index-DSy8QG8T.js +0 -32
- package/dist/Index-DX6_D-J-.js +0 -77
- package/dist/Index-Dk0KaIKg.js +0 -643
- package/dist/Index-Hkzoh9QR.js +0 -24
- package/dist/Index-KsHJxWAa.js +0 -94
- package/dist/Index-TtItTuv6.js +0 -33
- package/dist/Index-YAD39Qvg.js +0 -146
- package/dist/Index-eh909lAz.js +0 -107
- package/dist/Index-otowKI_C.js +0 -56
- package/dist/Index-t_oVV8Rc.js +0 -84
- package/dist/Index-vG96oEXZ.js +0 -144
- package/dist/InputToggleRow-CcqJDguN.js +0 -57
- package/dist/ManualPopover-BE2IN-XU.js +0 -60
- package/dist/MediaWrapper-lnGUFiyc.js +0 -23
- package/dist/PackageGroup-BsmxOMLW.js +0 -704
- package/dist/PdfTerms-BgYwZoAZ.js +0 -31
- package/dist/PdfViewer-C0lDpjte.js +0 -383
- package/dist/PlainHtml-5YwYVj1v.js +0 -27
- package/dist/PriceHeader-CxqhpGS-.js +0 -338
- package/dist/SearchApi-BndaIbri.js +0 -161
- package/dist/SendForm-D7U9fG-5.js +0 -1023
- package/dist/Setup-CmAK2_ZT.js +0 -50
- package/dist/ThemeColorRow-BlnhzebY.js +0 -69
- package/dist/ToggleBinding-t_58JFya.js +0 -42
- package/dist/UploadModal-T-WpYNsN.js +0 -95
- package/dist/VideoPlayerInput-DKHKjMgX.js +0 -97
- package/dist/VideoPlayerSettings-DDMlUvSt.js +0 -61
- package/dist/VideoSelectModal-B9bbP0dd.js +0 -104
- package/dist/answerDocumentMixin-DXI_E5Kx.js +0 -51
- package/dist/dom-CWsqMElk.js +0 -71
- package/dist/formValidationMixin-WZ2lGndu.js +0 -49
- package/dist/index-B2l57ilt.js +0 -102
- package/dist/index-COKDjmM2.js +0 -167
- package/dist/index-HtKGcIng.js +0 -2700
- package/dist/index-LQ7NztTt.js +0 -81
- package/dist/index-fx5gR8fM.js +0 -351
- package/dist/index-zXXJrTvv.js +0 -492
- package/dist/mapFormMixin-CQgSN7dv.js +0 -3028
- package/dist/omit-ScS7B6c5.js +0 -31
- package/dist/simplebar.min-B0cB_p8g.js +0 -71
- package/dist/splitpanes-BHUVsCZF.js +0 -382
- package/dist/tippy.esm-CR89mtdY.js +0 -1805
- package/dist/vuedraggable.umd-CkXXkt1b.js +0 -3161
- package/dist/vuex.esm-DKGl8mcw.js +0 -467
|
@@ -1,440 +0,0 @@
|
|
|
1
|
-
import { m as x, t as _ } from "./mapFormMixin-CQgSN7dv.js";
|
|
2
|
-
import { T as C } from "./ThemeColorRow-BlnhzebY.js";
|
|
3
|
-
import w from "./VideoPlayerInput-DKHKjMgX.js";
|
|
4
|
-
import k from "./ImageUploadWrapper-CtZhkAm1.js";
|
|
5
|
-
import { B as b, a as S } from "./index-COKDjmM2.js";
|
|
6
|
-
import { c as y, n as u, q as d, P as V, k as A, ai as L } from "./main-BgzLHIoo.js";
|
|
7
|
-
import { C as z } from "./CFormField-Dd2Y71JG.js";
|
|
8
|
-
import { b as $ } from "./CDropdownItem-CaoSQX6X.js";
|
|
9
|
-
const v = y.unsplash.id, I = y.pexels.id, B = {
|
|
10
|
-
name: "MediaSelectModal",
|
|
11
|
-
i18nOptions: {
|
|
12
|
-
namespaces: "mediaSelectModal",
|
|
13
|
-
messages: {
|
|
14
|
-
en: {
|
|
15
|
-
title: "Choose background",
|
|
16
|
-
creditVideos: "Videos from {{thing}}",
|
|
17
|
-
tabLink: "Use link",
|
|
18
|
-
minWidth: "Recommended minimum image width is 1200 pixels or greater."
|
|
19
|
-
},
|
|
20
|
-
sv: {
|
|
21
|
-
title: "Välj bakgrundsbild",
|
|
22
|
-
creditVideos: "Videor från {{thing}}",
|
|
23
|
-
tabLink: "Egen länk",
|
|
24
|
-
minWidth: "Rekommenderad minimum bredd på bilden är 1200 pixlar eller större."
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
components: {
|
|
29
|
-
BackgroundModal: b,
|
|
30
|
-
BackgroundList: S,
|
|
31
|
-
VideoPlayerInput: w,
|
|
32
|
-
ImageUploadWrapper: k
|
|
33
|
-
},
|
|
34
|
-
props: {
|
|
35
|
-
currentType: {
|
|
36
|
-
type: String,
|
|
37
|
-
default: ""
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
data() {
|
|
41
|
-
return {
|
|
42
|
-
tabs: [
|
|
43
|
-
{
|
|
44
|
-
value: "unsplash",
|
|
45
|
-
label: "Unsplash",
|
|
46
|
-
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>'
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
value: "customImage",
|
|
50
|
-
label: this.$t("_common:upload"),
|
|
51
|
-
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>'
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
value: "pexels",
|
|
55
|
-
label: "Pexels",
|
|
56
|
-
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>'
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
value: "customVideo",
|
|
60
|
-
label: this.$t("tabLink"),
|
|
61
|
-
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>'
|
|
62
|
-
}
|
|
63
|
-
],
|
|
64
|
-
activeTab: "unsplash",
|
|
65
|
-
selectedImage: null,
|
|
66
|
-
preferredColor: null,
|
|
67
|
-
customImage: null,
|
|
68
|
-
selectedVideo: null,
|
|
69
|
-
customVideo: null
|
|
70
|
-
};
|
|
71
|
-
},
|
|
72
|
-
computed: {
|
|
73
|
-
isImage() {
|
|
74
|
-
return ["unsplash", "customImage"].includes(this.activeTab);
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
created() {
|
|
78
|
-
this.currentType === "video" && (this.activeTab = "pexels");
|
|
79
|
-
},
|
|
80
|
-
methods: {
|
|
81
|
-
async fetchImage({ query: o, page: t }) {
|
|
82
|
-
const { data: e } = await d.get(
|
|
83
|
-
"https://api.unsplash.com/search/photos",
|
|
84
|
-
{
|
|
85
|
-
params: {
|
|
86
|
-
page: t,
|
|
87
|
-
per_page: 12,
|
|
88
|
-
client_id: v,
|
|
89
|
-
query: o
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
);
|
|
93
|
-
return {
|
|
94
|
-
items: (e.results || []).map((i) => ({
|
|
95
|
-
...i,
|
|
96
|
-
image: i.urls.regular,
|
|
97
|
-
minImage: i.urls.thumb
|
|
98
|
-
})),
|
|
99
|
-
total: e.total
|
|
100
|
-
};
|
|
101
|
-
},
|
|
102
|
-
async fetchVideo({ query: o, page: t }) {
|
|
103
|
-
const { data: e } = await d.get("https://api.pexels.com/videos/search", {
|
|
104
|
-
headers: {
|
|
105
|
-
Authorization: I
|
|
106
|
-
},
|
|
107
|
-
params: {
|
|
108
|
-
page: t,
|
|
109
|
-
per_page: 12,
|
|
110
|
-
query: o
|
|
111
|
-
}
|
|
112
|
-
}), i = (s, a) => s.height < a.height || s.width < a.width ? -1 : 1, r = (s) => (s.find(({ height: a }) => a > 1e3 && a < 1200) || {}).link;
|
|
113
|
-
return {
|
|
114
|
-
items: (e.videos || []).map(
|
|
115
|
-
({ id: s, image: a, video_files: m = [], user: h }) => {
|
|
116
|
-
const { sd: p, hd: g } = (m || []).sort(i).reduce(
|
|
117
|
-
(c, l) => (c[l.quality] && l.link && c[l.quality].push(l.link), c),
|
|
118
|
-
{ sd: [], hd: [] }
|
|
119
|
-
), [f] = p;
|
|
120
|
-
let n = r(m);
|
|
121
|
-
return n || ([n] = g.length ? g : p.slice(-1)), {
|
|
122
|
-
id: `${s}`,
|
|
123
|
-
image: a,
|
|
124
|
-
minImage: a,
|
|
125
|
-
video: n,
|
|
126
|
-
minVideo: f,
|
|
127
|
-
userName: h.name,
|
|
128
|
-
userLink: h.link
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
|
-
),
|
|
132
|
-
total: e.total_results
|
|
133
|
-
};
|
|
134
|
-
},
|
|
135
|
-
selectImage({ image: o, links: t, color: e }) {
|
|
136
|
-
this.selectedImage = V(o, { w: 1800 }), e && (this.preferredColor = e);
|
|
137
|
-
const i = new Image();
|
|
138
|
-
i.src = this.selectedImage, d.get(t.download_location, {
|
|
139
|
-
params: {
|
|
140
|
-
client_id: v
|
|
141
|
-
}
|
|
142
|
-
});
|
|
143
|
-
},
|
|
144
|
-
setCustomBackground({ response: o }) {
|
|
145
|
-
this.customImage = o.url;
|
|
146
|
-
},
|
|
147
|
-
selectVideo({ id: o, image: t, video: e }) {
|
|
148
|
-
this.selectedVideo = {
|
|
149
|
-
id: o,
|
|
150
|
-
url: e,
|
|
151
|
-
thumbnail: t,
|
|
152
|
-
provider: "pexels"
|
|
153
|
-
};
|
|
154
|
-
},
|
|
155
|
-
onSave() {
|
|
156
|
-
let o;
|
|
157
|
-
this.isImage ? o = {
|
|
158
|
-
type: "image",
|
|
159
|
-
value: this.activeTab === "unsplash" ? this.selectedImage : this.customImage
|
|
160
|
-
} : o = {
|
|
161
|
-
type: "video",
|
|
162
|
-
value: this.activeTab === "pexels" ? this.selectedVideo : this.customVideo
|
|
163
|
-
}, this.preferredColor && (o.preferredColor = this.preferredColor), this.$emit("input", o), this.$parent && this.$parent.$emit("input", o), this.$emit("close");
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
};
|
|
167
|
-
var M = function() {
|
|
168
|
-
var t = this, e = t._self._c;
|
|
169
|
-
return e("BackgroundModal", t._g({ scopedSlots: t._u([{ key: "header", fn: function() {
|
|
170
|
-
return [e("div", { staticClass: "flex w-full items-center justify-center", staticStyle: { padding: "calc(0.25 * var(--rem)) calc(1 * var(--rem))", "border-bottom": "1px solid hsl(0, 0%, 88%)" } }, t._l(t.tabs, function(i, r) {
|
|
171
|
-
return e("CButton", { key: r, staticStyle: { "font-size": "15px", "font-weight": "700", opacity: "0.5", "box-shadow": "none" }, style: t.activeTab === i.value && { opacity: 1 }, on: { click: function(s) {
|
|
172
|
-
t.activeTab = i.value;
|
|
173
|
-
} } }, [e("span", { staticClass: "inline-flex items-center justify-center" }, [e("div", { domProps: { innerHTML: t._s(i.icon) } }), e("span", { staticClass: "max-md:!hidden" }, [t._v(t._s(i.label))])])]);
|
|
174
|
-
}), 1)];
|
|
175
|
-
}, proxy: !0 }]) }, t.$listeners), [["unsplash", "pexels"].includes(t.activeTab) ? e("BackgroundList", { key: t.activeTab, attrs: { fetch: t.isImage ? t.fetchImage : t.fetchVideo, "credit-text": t.$t("creditVideos", { thing: t.activeTab.capitalize() }), "default-query": "nature" }, on: { select: function(i) {
|
|
176
|
-
t.isImage ? t.selectImage(i) : t.selectVideo(i);
|
|
177
|
-
} }, scopedSlots: t._u([{ key: "footer", fn: function() {
|
|
178
|
-
return [e("CButton", { staticStyle: { "margin-left": "0.5em" }, attrs: { disabled: t.isImage ? !t.selectedImage : !t.selectedVideo, type: "secondary" }, on: { click: t.onSave } }, [t._v(" " + t._s(t.$t("_common:save")) + " ")])];
|
|
179
|
-
}, proxy: !0 }], null, !1, 782343106) }) : t.activeTab === "customVideo" ? e("div", { staticClass: "flex w-full flex-col items-center justify-center" }, [e("div", { staticStyle: { "max-width": "500px", width: "100%", margin: "0 auto", "padding-top": "calc(3 * var(--rem))" } }, [e("div", { staticStyle: { 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))" } }, [t.customVideo ? e("iframe", { staticClass: "custom-video-preview", attrs: { src: t.customVideo.url } }) : t._e()]), e("VideoPlayerInput", { attrs: { filled: !0, "video-options": { background: !0 } }, model: { value: t.customVideo, callback: function(i) {
|
|
180
|
-
t.customVideo = i;
|
|
181
|
-
}, expression: "customVideo" } }, [e("CButton", { attrs: { disabled: !t.customVideo, type: "secondary" }, on: { click: t.onSave } }, [t._v(" " + t._s(t.$t("_common:save")) + " ")])], 1)], 1)]) : e("div", { staticClass: "flex flex-col items-center justify-center" }, [e("div", { staticStyle: { "max-width": "500px", width: "100%", margin: "0 auto", "padding-top": "calc(3 * var(--rem))" } }, [e("ImageUploadWrapper", { ref: "uploadWrapper", attrs: { "on-image-upload": t.setCustomBackground }, scopedSlots: t._u([{ key: "default", fn: function({ progress: i }) {
|
|
182
|
-
return [e("div", { staticClass: "relative mb-6 w-full" }, [t.customImage ? e("img", { staticClass: "h-full w-full object-cover object-scale-down object-top", staticStyle: { "max-height": "500px" }, attrs: { src: t.customImage, alt: t.customImage } }) : e("div", { staticClass: "flex aspect-video flex-col items-center justify-center rounded-md bg-gray-100" }, [e("CButton", { style: t.customImage && { opacity: 0.5 }, attrs: { loading: !!i && i < 100, "icon-left": "upload", type: "none" } }, [t._v(" " + t._s(t.$t("_common:upload")) + " ")]), e("div", { staticClass: "text-center text-gray-600", staticStyle: { "padding-top": "calc(1 * var(--rem))", "font-size": "14px", "max-width": "40ch" } }, [t._v(" " + t._s(t.$t("minWidth")) + " ")])], 1)])];
|
|
183
|
-
} }]) }), e("div", { staticClass: "flex items-center justify-center" }, [e("CButton", { attrs: { disabled: !t.customImage, type: "secondary" }, on: { click: t.onSave } }, [t._v(" " + t._s(t.$t("_common:save")) + " ")])], 1)], 1)])], 1);
|
|
184
|
-
}, T = [], F = /* @__PURE__ */ u(
|
|
185
|
-
B,
|
|
186
|
-
M,
|
|
187
|
-
T,
|
|
188
|
-
!1,
|
|
189
|
-
null,
|
|
190
|
-
"e2e19b2c"
|
|
191
|
-
);
|
|
192
|
-
const P = F.exports, R = {
|
|
193
|
-
name: "CRadioButton",
|
|
194
|
-
components: {
|
|
195
|
-
CButton: A
|
|
196
|
-
},
|
|
197
|
-
mixins: [L],
|
|
198
|
-
props: {
|
|
199
|
-
type: {
|
|
200
|
-
type: String,
|
|
201
|
-
default: "primary"
|
|
202
|
-
},
|
|
203
|
-
expanded: Boolean
|
|
204
|
-
},
|
|
205
|
-
data() {
|
|
206
|
-
return {
|
|
207
|
-
isFocused: !1
|
|
208
|
-
};
|
|
209
|
-
}
|
|
210
|
-
};
|
|
211
|
-
var j = function() {
|
|
212
|
-
var t = this, e = t._self._c;
|
|
213
|
-
return e("div", { staticClass: "control", class: { "is-expanded": t.expanded } }, [e("CButton", { ref: "label", staticClass: "c-radio radio button", class: [{ "is-disabled": t.disabled, "is-focused": t.isFocused }], attrs: { tag: "label", type: t.newValue === t.nativeValue ? t.type : null, size: t.size, disabled: t.disabled }, on: { click: t.focus, keydown: function(i) {
|
|
214
|
-
return !i.type.indexOf("key") && t._k(i.keyCode, "enter", 13, i.key, "Enter") ? null : (i.preventDefault(), t.$refs.$el.label.click());
|
|
215
|
-
} } }, [t._t("default"), e("input", { directives: [{ name: "model", rawName: "v-model", value: t.computedValue, expression: "computedValue" }], ref: "input", attrs: { disabled: t.disabled, required: t.required, name: t.name, type: "radio" }, domProps: { value: t.nativeValue, checked: t._q(t.computedValue, t.nativeValue) }, on: { click: function(i) {
|
|
216
|
-
i.stopPropagation();
|
|
217
|
-
}, focus: function(i) {
|
|
218
|
-
t.isFocused = !0;
|
|
219
|
-
}, blur: function(i) {
|
|
220
|
-
t.isFocused = !1;
|
|
221
|
-
}, change: function(i) {
|
|
222
|
-
t.computedValue = t.nativeValue;
|
|
223
|
-
} } })], 2)], 1);
|
|
224
|
-
}, H = [], q = /* @__PURE__ */ u(
|
|
225
|
-
R,
|
|
226
|
-
j,
|
|
227
|
-
H,
|
|
228
|
-
!1,
|
|
229
|
-
null,
|
|
230
|
-
null
|
|
231
|
-
);
|
|
232
|
-
const D = q.exports, O = {
|
|
233
|
-
name: "HeaderSettings",
|
|
234
|
-
components: {
|
|
235
|
-
ThemeColorRow: C,
|
|
236
|
-
CRadioButton: D,
|
|
237
|
-
CSwitch: $,
|
|
238
|
-
CField: z
|
|
239
|
-
},
|
|
240
|
-
mixins: [
|
|
241
|
-
x(
|
|
242
|
-
[
|
|
243
|
-
"layout",
|
|
244
|
-
"items",
|
|
245
|
-
"media",
|
|
246
|
-
"showPriceSummary",
|
|
247
|
-
"backgroundColor",
|
|
248
|
-
"textAlign",
|
|
249
|
-
"textColor"
|
|
250
|
-
],
|
|
251
|
-
{ useEmit: !1 }
|
|
252
|
-
)
|
|
253
|
-
],
|
|
254
|
-
data() {
|
|
255
|
-
return {
|
|
256
|
-
type: "image",
|
|
257
|
-
layoutOptions2: [
|
|
258
|
-
{
|
|
259
|
-
value: "left",
|
|
260
|
-
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>'
|
|
261
|
-
},
|
|
262
|
-
{
|
|
263
|
-
value: "right",
|
|
264
|
-
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>'
|
|
265
|
-
},
|
|
266
|
-
{
|
|
267
|
-
value: "top",
|
|
268
|
-
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>'
|
|
269
|
-
},
|
|
270
|
-
{
|
|
271
|
-
value: "bottom",
|
|
272
|
-
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>'
|
|
273
|
-
},
|
|
274
|
-
{
|
|
275
|
-
value: "center",
|
|
276
|
-
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>'
|
|
277
|
-
},
|
|
278
|
-
{
|
|
279
|
-
value: "price",
|
|
280
|
-
icon: '<rect x="4" y="6" width="16" height="7"></rect><rect x="4" y="16" width="16" height="3" style="fill: currentColor;"></rect>'
|
|
281
|
-
}
|
|
282
|
-
],
|
|
283
|
-
alignOptions: [
|
|
284
|
-
{
|
|
285
|
-
value: "left",
|
|
286
|
-
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" />'
|
|
287
|
-
},
|
|
288
|
-
{
|
|
289
|
-
value: "center",
|
|
290
|
-
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" />'
|
|
291
|
-
},
|
|
292
|
-
{
|
|
293
|
-
value: "right",
|
|
294
|
-
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" />'
|
|
295
|
-
}
|
|
296
|
-
]
|
|
297
|
-
};
|
|
298
|
-
},
|
|
299
|
-
computed: {
|
|
300
|
-
layoutOptions() {
|
|
301
|
-
var t;
|
|
302
|
-
const { type: o } = ((t = this.items) == null ? void 0 : t[0]) || {};
|
|
303
|
-
return [
|
|
304
|
-
{
|
|
305
|
-
// left
|
|
306
|
-
isActive: this.layout === "vertical" && o === "media",
|
|
307
|
-
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>',
|
|
308
|
-
onClick: () => this.setLayout({ layout: "vertical", type: "media" })
|
|
309
|
-
},
|
|
310
|
-
{
|
|
311
|
-
// right
|
|
312
|
-
isActive: this.layout === "vertical" && o === "content",
|
|
313
|
-
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>',
|
|
314
|
-
onClick: () => this.setLayout({ layout: "vertical", type: "content" })
|
|
315
|
-
},
|
|
316
|
-
{
|
|
317
|
-
// top
|
|
318
|
-
isActive: this.layout === "horizontal" && o === "media",
|
|
319
|
-
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>',
|
|
320
|
-
onClick: () => this.setLayout({ layout: "horizontal", type: "media" })
|
|
321
|
-
},
|
|
322
|
-
{
|
|
323
|
-
// bottom
|
|
324
|
-
isActive: this.layout === "horizontal" && o === "content",
|
|
325
|
-
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>',
|
|
326
|
-
onClick: () => this.setLayout({ layout: "horizontal", type: "content" })
|
|
327
|
-
},
|
|
328
|
-
{
|
|
329
|
-
// center
|
|
330
|
-
isActive: this.layout === "center",
|
|
331
|
-
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>',
|
|
332
|
-
onClick: () => this.setLayout({ layout: "center", type: "media" })
|
|
333
|
-
},
|
|
334
|
-
{
|
|
335
|
-
// price
|
|
336
|
-
isActive: this.layout === "price",
|
|
337
|
-
icon: '<rect x="4" y="6" width="16" height="7"></rect><rect x="4" y="16" width="16" height="3" style="fill: currentColor;"></rect>',
|
|
338
|
-
onClick: () => this.setLayout({ layout: "price" })
|
|
339
|
-
}
|
|
340
|
-
];
|
|
341
|
-
},
|
|
342
|
-
overlayColor: {
|
|
343
|
-
get() {
|
|
344
|
-
var o;
|
|
345
|
-
return ((o = this.media) == null ? void 0 : o.overlayColor) || "";
|
|
346
|
-
},
|
|
347
|
-
set(o) {
|
|
348
|
-
this.media = { ...this.media, overlay: !0, overlayColor: o };
|
|
349
|
-
}
|
|
350
|
-
},
|
|
351
|
-
background() {
|
|
352
|
-
let o = "";
|
|
353
|
-
const { type: t, resourceUrl: e, video: i = {} } = this.media || {};
|
|
354
|
-
return t === "image" && e ? o = e : t === "video" && i.thumbnail && (o = i.thumbnail), o;
|
|
355
|
-
},
|
|
356
|
-
theme() {
|
|
357
|
-
var o;
|
|
358
|
-
return ((o = this._document) == null ? void 0 : o.theme) || {};
|
|
359
|
-
},
|
|
360
|
-
showPriceToggle: {
|
|
361
|
-
get() {
|
|
362
|
-
return !!(typeof this.showPriceSummary == "boolean" ? this.showPriceSummary : this.theme.showPriceSummary);
|
|
363
|
-
},
|
|
364
|
-
set(o) {
|
|
365
|
-
this.showPriceSummary = o;
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
},
|
|
369
|
-
watch: {
|
|
370
|
-
layout(o) {
|
|
371
|
-
this._document.isDirty(this._value.textAlign) || (this.textAlign = o === "center" ? o : "left");
|
|
372
|
-
},
|
|
373
|
-
backgroundColor(o) {
|
|
374
|
-
this._document.isDirty(this._value.textColor) || (this.textColor = _.readability(o, "#fff") < 1.8 ? "#111111" : "#FFFFFF");
|
|
375
|
-
}
|
|
376
|
-
},
|
|
377
|
-
methods: {
|
|
378
|
-
// Used for setting the correct array item order for specific layouts
|
|
379
|
-
// will place the given item type first in items
|
|
380
|
-
setLayout({ layout: o, type: t = "" }) {
|
|
381
|
-
const e = (i) => (r) => r.type === i ? -1 : 1;
|
|
382
|
-
t && (this.items = [...this.items].sort(e(t))), this.layout = o;
|
|
383
|
-
},
|
|
384
|
-
openBgModal() {
|
|
385
|
-
const { type: o = "image" } = this.media || {};
|
|
386
|
-
this.$modal.show(
|
|
387
|
-
P,
|
|
388
|
-
{
|
|
389
|
-
currentType: o
|
|
390
|
-
},
|
|
391
|
-
{},
|
|
392
|
-
{
|
|
393
|
-
input: ({ type: t, value: e, preferredColor: i }) => {
|
|
394
|
-
const r = t === "image" ? "resourceUrl" : "video";
|
|
395
|
-
this.media = {
|
|
396
|
-
...this.media,
|
|
397
|
-
type: t,
|
|
398
|
-
[r]: e
|
|
399
|
-
}, i && !this._document.isDirty(this._value.backgroundColor) && (this.backgroundColor = i);
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
);
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
};
|
|
406
|
-
var U = function() {
|
|
407
|
-
var t = this, e = t._self._c;
|
|
408
|
-
return e("div", { staticClass: "d-root" }, [e("div", { staticClass: "d-option" }, [e("div", { staticClass: "d-option-title", staticStyle: { "padding-bottom": "calc(0.5 * var(--rem))" } }, [t._v(" Layouts ")]), e("div", { staticClass: "grid grid-cols-3 gap-2 p-1" }, t._l(t.layoutOptions, function({ isActive: i, onClick: r, icon: s }, a) {
|
|
409
|
-
return e("CButton", { key: a, staticStyle: { padding: "6px 10px", "border-radius": "3px", height: "initial" }, attrs: { type: i ? "secondary" : "none", pattern: i ? "primary" : "secondary", size: "normal" }, on: { click: r } }, [e("svg", { attrs: { xmlns: "http://www.w3.org/2000/svg", width: "30", height: "30", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "1.75", "stroke-linecap": "round", "stroke-linejoin": "round" }, domProps: { innerHTML: t._s(s) } })]);
|
|
410
|
-
}), 1)]), e("div", { staticClass: "d-option" }, [e("div", { staticClass: "d-option-title", staticStyle: { "padding-bottom": "calc(0.5 * var(--rem))" } }, [t._v(" " + t._s(t.$t("_common:background").capitalize()) + " ")]), e("div", { staticClass: "d-option-button-image", style: {
|
|
411
|
-
backgroundImage: `url(${t.background || t.theme.background})`
|
|
412
|
-
}, on: { click: t.openBgModal } })]), e("div", { staticClass: "d-option", staticStyle: { "padding-bottom": "0.5em" } }, [e("ThemeColorRow", { staticClass: "d-option-title", attrs: { value: t.overlayColor || t.theme.backgroundFilter || "", placement: "auto" }, on: { change: function(i) {
|
|
413
|
-
t.overlayColor = i;
|
|
414
|
-
} } }, [t._v(" " + t._s(t.$t("components:account.documentForm.settings.backgroundFilter")) + " ")])], 1), t.layout === "price" ? e("div", { staticClass: "d-option" }, [e("div", { staticClass: "d-option-title" }, [e("div", { staticStyle: { flex: "1 1 auto" } }, [t._v(" " + t._s(t.$t("components:account.documentForm.settings.priceSummaryBackground")) + " ")]), e("CSwitch", { staticStyle: { "margin-right": "0" }, attrs: { size: "small", type: "secondary" }, model: { value: t.showPriceToggle, callback: function(i) {
|
|
415
|
-
t.showPriceToggle = i;
|
|
416
|
-
}, expression: "showPriceToggle" } })], 1), t.showPriceToggle ? e("div", { staticClass: "d-option-row", staticStyle: { "padding-top": "1em" } }, [e("ThemeColorRow", { staticClass: "d-option-title", attrs: { value: t.backgroundColor || t.theme.priceSummaryBackground || "", "picker-options": { disableAlpha: !0 }, placement: "auto" }, on: { change: function(i) {
|
|
417
|
-
t.backgroundColor = i;
|
|
418
|
-
} } }, [t._v(" " + t._s(t.$t("_common:backgroundColor").capitalize()) + " ")])], 1) : t._e()]) : [t.layout !== "center" ? e("div", { staticClass: "d-option" }, [e("ThemeColorRow", { staticClass: "d-option-title", attrs: { value: t.backgroundColor || t.theme.priceSummaryBackground || "", "picker-options": { disableAlpha: !0 }, placement: "auto" }, on: { change: function(i) {
|
|
419
|
-
t.backgroundColor = i, t._document.setDirty(t._value.backgroundColor);
|
|
420
|
-
} } }, [t._v(" " + t._s(t.$t("_common:backgroundColor").capitalize()) + " ")])], 1) : t._e(), e("div", { staticClass: "d-option" }, [e("ThemeColorRow", { staticClass: "d-option-title", staticStyle: { "margin-top": "calc(0.5 * var(--rem))" }, attrs: { value: t.textColor || "", "picker-options": { disableAlpha: !0 }, placement: "auto" }, on: { change: function(i) {
|
|
421
|
-
t.textColor = i, t._document.setDirty(t._value.textColor);
|
|
422
|
-
} } }, [t._v(" " + t._s(t.$t("_common:textColor").capitalize()) + " ")])], 1), e("div", { staticClass: "d-option flex w-full" }, [e("div", { staticClass: "d-option-title", staticStyle: { "margin-top": "calc(0.5 * var(--rem))" } }, [t._v(" " + t._s(t.$t("_common:textAlign").capitalize()) + " ")]), e("CField", { staticStyle: { "margin-left": "auto" } }, t._l(t.alignOptions, function({ value: i, icon: r }, s) {
|
|
423
|
-
return e("CRadioButton", { key: s, class: !t.textAlign && "text-gray-400", attrs: { "native-value": i, type: t.textAlign ? "secondary" : "none", size: "small" }, on: { input: function(a) {
|
|
424
|
-
return t._document.setDirty(t._value.textAlign);
|
|
425
|
-
} }, model: { value: t.textAlign, callback: function(a) {
|
|
426
|
-
t.textAlign = a;
|
|
427
|
-
}, expression: "textAlign" } }, [e("svg", { staticStyle: { margin: "0" }, attrs: { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 48 48", fill: "currentColor", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round" }, domProps: { innerHTML: t._s(r) } })]);
|
|
428
|
-
}), 1)], 1)]], 2);
|
|
429
|
-
}, W = [], E = /* @__PURE__ */ u(
|
|
430
|
-
O,
|
|
431
|
-
U,
|
|
432
|
-
W,
|
|
433
|
-
!1,
|
|
434
|
-
null,
|
|
435
|
-
"7fbe66cc"
|
|
436
|
-
);
|
|
437
|
-
const tt = E.exports;
|
|
438
|
-
export {
|
|
439
|
-
tt as default
|
|
440
|
-
};
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import r from "./ImageUploadWrapper-CtZhkAm1.js";
|
|
2
|
-
import { B as l, a as i } from "./index-COKDjmM2.js";
|
|
3
|
-
import { c, n as d, q as n, P as m } from "./main-BgzLHIoo.js";
|
|
4
|
-
const o = c.unsplash.id, p = {
|
|
5
|
-
name: "ImageSelectModal",
|
|
6
|
-
i18nOptions: {
|
|
7
|
-
namespaces: "imageSelectModal",
|
|
8
|
-
messages: {
|
|
9
|
-
en: {
|
|
10
|
-
creditImages: "Images from {{thing}}"
|
|
11
|
-
},
|
|
12
|
-
sv: {
|
|
13
|
-
creditImages: "Bilder från {{thing}}"
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
components: {
|
|
18
|
-
BackgroundModal: l,
|
|
19
|
-
BackgroundList: i,
|
|
20
|
-
ImageUploadWrapper: r
|
|
21
|
-
},
|
|
22
|
-
data() {
|
|
23
|
-
return {
|
|
24
|
-
selectedUrl: null
|
|
25
|
-
};
|
|
26
|
-
},
|
|
27
|
-
methods: {
|
|
28
|
-
async fetch({ query: a, page: e }) {
|
|
29
|
-
const { data: t } = await n.get(
|
|
30
|
-
"https://api.unsplash.com/search/photos",
|
|
31
|
-
{
|
|
32
|
-
params: {
|
|
33
|
-
page: e,
|
|
34
|
-
per_page: 12,
|
|
35
|
-
client_id: o,
|
|
36
|
-
query: a
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
);
|
|
40
|
-
return {
|
|
41
|
-
items: (t.results || []).map((s) => ({
|
|
42
|
-
...s,
|
|
43
|
-
image: s.urls.regular,
|
|
44
|
-
minImage: s.urls.thumb
|
|
45
|
-
})),
|
|
46
|
-
total: t.total
|
|
47
|
-
};
|
|
48
|
-
},
|
|
49
|
-
selectImage(a) {
|
|
50
|
-
this.selectedUrl = m(a.image, { w: 1800 });
|
|
51
|
-
const e = new Image();
|
|
52
|
-
e.src = this.selectedUrl, n.get(a.links.download_location, {
|
|
53
|
-
params: {
|
|
54
|
-
client_id: o
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
},
|
|
58
|
-
setCustomBackground({ response: a }) {
|
|
59
|
-
this.selectedUrl = a.url, this.onSave();
|
|
60
|
-
},
|
|
61
|
-
onSave() {
|
|
62
|
-
this.$emit("change"), this.$emit("input", this.selectedUrl), this.$parent && (this.$parent.$emit("change"), this.$parent.$emit("input", this.selectedUrl)), this.$emit("close");
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
var u = function() {
|
|
67
|
-
var e = this, t = e._self._c;
|
|
68
|
-
return t("BackgroundModal", e._g({}, e.$listeners), [t("BackgroundList", { attrs: { fetch: e.fetch, "credit-text": e.$t("creditImages", { thing: "Unsplash" }), "default-query": "architecture" }, on: { select: e.selectImage }, scopedSlots: e._u([{ key: "footer", fn: function() {
|
|
69
|
-
return [t("ImageUploadWrapper", { ref: "uploadWrapper", attrs: { "on-image-upload": e.setCustomBackground }, on: { upload: function(s) {
|
|
70
|
-
e.isUploadingImage = !0;
|
|
71
|
-
} }, scopedSlots: e._u([{ key: "default", fn: function({ progress: s }) {
|
|
72
|
-
return [t("CButton", { attrs: { loading: !!s, "icon-left": "upload", type: "none" } }, [e._v(" " + e._s(e.$t("_common:upload")) + " ")])];
|
|
73
|
-
} }]) }), t("CButton", { staticStyle: { "margin-left": "0.5em" }, attrs: { type: "secondary" }, on: { click: e.onSave } }, [e._v(" " + e._s(e.$t("_common:save")) + " ")])];
|
|
74
|
-
}, proxy: !0 }]) })], 1);
|
|
75
|
-
}, g = [], h = /* @__PURE__ */ d(
|
|
76
|
-
p,
|
|
77
|
-
u,
|
|
78
|
-
g,
|
|
79
|
-
!1,
|
|
80
|
-
null,
|
|
81
|
-
"4fdd100a"
|
|
82
|
-
);
|
|
83
|
-
const v = h.exports;
|
|
84
|
-
export {
|
|
85
|
-
v as default
|
|
86
|
-
};
|