@cling-se/widget 0.17.3 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/AddClientCallout-Bod9Eqx4.js +101 -0
- package/dist/AnswerModal-a2cyKFbt.js +3371 -0
- package/dist/AttachmentItem-DBUqckCS.js +171 -0
- package/dist/BaseUpload-DrWzuvbS.js +6503 -0
- package/dist/BlockMedia-DuE_K9hR.js +103 -0
- package/dist/CCallout-CM1VsH30.js +104 -0
- package/dist/{CCurrencyDropdown-CXXQu8th.js → CCurrencyDropdown-C_lAaq4P.js} +91 -53
- package/dist/CDropdownItem-DMUAJ90n.js +749 -0
- package/dist/CFormField.vue_vue_type_script_setup_true_lang-BqAyWe3T.js +292 -0
- package/dist/{CPhoneFormat-BtBGl8b4.js → CPhoneFormat-Dnn_cKk7.js} +13 -21
- package/dist/CPhoneInput-DuGkDiv-.js +207 -0
- package/dist/CPriceInput-B7DYzKcF.js +142 -0
- package/dist/CSelect-BZZDr27O.js +98 -0
- package/dist/CSkeleton.vue_vue_type_script_setup_true_lang-D2jDhnYI.js +51 -0
- package/dist/ClientAutocomplete-DuaJ5zDf.js +532 -0
- package/dist/ClientModal-CaMSjLkD.js +1188 -0
- package/dist/ColorPicker-BISZPQ6j.js +1408 -0
- package/dist/CompanyModal-ClTcmU4Y.js +250 -0
- package/dist/ContentWrapper-Bj7jbWU0.js +265 -0
- package/dist/CoverBlockSettings-AXyiLxrF.js +861 -0
- package/dist/DocAnswer-Bu09V33D.js +33 -0
- package/dist/DocDetails-B6-2LKsO.js +452 -0
- package/dist/DocForm-CFN8LWSd.js +6772 -0
- package/dist/DocFormSend-D1CUhy4n.js +171 -0
- package/dist/DocLinks-CuliFqtN.js +36 -0
- package/dist/DocModalBase-BxKsnwN-.js +29 -0
- package/dist/DocPrint-B_HJ_RET.js +399 -0
- package/dist/DocReceipt-D-A1TaTI.js +341 -0
- package/dist/DocSendReminder-BKTJonzh.js +181 -0
- package/dist/{DocTextEditor-yD9Dt_um.js → DocTextEditor-CEPcJT2o.js} +7907 -5579
- package/dist/DocTimeline-CF9S4YDZ.js +537 -0
- package/dist/DocumentClient-7mbq2QA4.js +90 -0
- package/dist/DocumentLayout-DkFlHgW6.js +1434 -0
- package/dist/DocumentLogotype-BTYMdpNi.js +162 -0
- package/dist/DocumentVoided-CWr5WMUv.js +33 -0
- package/dist/EmbedInput-SevVEpwc.js +156 -0
- package/dist/EmbedSettings-YMbUmp1O.js +103 -0
- package/dist/ErrorCallout-CQo2iF9c.js +34 -0
- package/dist/FilePreviewModal-C0xBeoAz.js +202 -0
- package/dist/Flag-BObij6SN.js +41 -0
- package/dist/HeaderSettings-C77pR78n.js +720 -0
- package/dist/ImageSelectModal-DKdU-0uq.js +119 -0
- package/dist/ImageUploadWrapper-BGkS5Cll.js +1585 -0
- package/dist/Index-B3y-jq9s.js +1098 -0
- package/dist/Index-B41pUREi.js +47 -0
- package/dist/Index-BEyeS1OG.js +52 -0
- package/dist/Index-BG5j8ZFP.js +93 -0
- package/dist/Index-BOT65yQR.js +68 -0
- package/dist/Index-BQNl-cXP.js +28 -0
- package/dist/Index-BY6xsS7C.js +38 -0
- package/dist/Index-Bh0Xv5ry.js +163 -0
- package/dist/Index-Bn4FSQcx.js +228 -0
- package/dist/Index-BrRIAede.js +87 -0
- package/dist/Index-C-6um0kX.js +76 -0
- package/dist/{Index-C_aIQ908.js → Index-C-gHa5xk.js} +319 -214
- package/dist/Index-C0wcjKCH.js +629 -0
- package/dist/Index-C6BbUFYw.js +160 -0
- package/dist/Index-C8xwJ0m1.js +200 -0
- package/dist/Index-CKgFEJF4.js +140 -0
- package/dist/{Index-Dfq7egc1.js → Index-CQwmu4f1.js} +47 -60
- package/dist/Index-CXchTpBa.js +74 -0
- package/dist/{Index-Ch9r5yhG.js → Index-CYoRt8PA.js} +9 -17
- package/dist/Index-CZZNQ4q5.js +39 -0
- package/dist/Index-CkaAs5ms.js +136 -0
- package/dist/Index-CtpXaBz8.js +363 -0
- package/dist/Index-CxDsSGtZ.js +126 -0
- package/dist/Index-DFkTBm02.js +102 -0
- package/dist/Index-DP3ll8F-.js +70 -0
- package/dist/{Index-RWMPRDAE.js → Index-DPDzMKQa.js} +10 -18
- package/dist/Index-DvxSig3z.js +25 -0
- package/dist/Index-Dzrn3Y6p.js +16 -0
- package/dist/{Index-CRiATiQn.js → Index-LQb0omFE.js} +10 -18
- package/dist/Index-Mt4mSaNT.js +4 -0
- package/dist/Index-_xN_cczo.js +3477 -0
- package/dist/Index-gAz45qgR.js +21 -0
- package/dist/Index-xXLFalgR.js +49 -0
- package/dist/Index-zyZRPz3H.js +28 -0
- package/dist/Index.vue_vue_type_script_lang-Ddo1wo-D.js +671 -0
- package/dist/InputToggleRow-CokEYwm2.js +99 -0
- package/dist/ManualPopover-Dukly7GP.js +65 -0
- package/dist/MediaWrapper-B8msCrQm.js +18 -0
- package/dist/{NotBindingText-CC7TxUqg.js → NotBindingText-DcQd8Eej.js} +13 -17
- package/dist/PackageGroup-clUIUoik.js +1060 -0
- package/dist/PdfTerms-DpzMVRfN.js +34 -0
- package/dist/PdfViewer-CSf4Rtbj.js +392 -0
- package/dist/PlainHtml.vue_vue_type_script_setup_true_lang-D6KSjjMA.js +17 -0
- package/dist/PriceHeader-Dyweu8aH.js +488 -0
- package/dist/{SearchApi-G2Hvp0Dd.js → SearchApi-Y1fDQn0u.js} +37 -49
- package/dist/SendForm-B9l24WwR.js +6689 -0
- package/dist/Setup-DyzbPFM4.js +47 -0
- package/dist/{SmartList-BynTuXtB.js → SmartList-CWGKoAJh.js} +16 -24
- package/dist/Sortable.vue_vue_type_script_setup_true_lang-C2Gwp6Q-.js +1349 -0
- package/dist/{TermsSettings-cA5YAO77.js → TermsSettings-BeQH307A.js} +169 -56
- package/dist/ThemeColorRow-DFIsPy55.js +105 -0
- package/dist/ToggleBinding-DlH4y1IM.js +44 -0
- package/dist/UploadModal-BZ0mPBBB.js +134 -0
- package/dist/VideoPlayerInput-DBxcTUb7.js +134 -0
- package/dist/VideoPlayerSettings-Dg1OxjOa.js +78 -0
- package/dist/VideoSelectModal-BhbanMix.js +217 -0
- package/dist/{anime.es-BrPTThYb.js → anime.es-4wvNItHq.js} +205 -201
- package/dist/{color-TdtKxwVa.js → color-HetJPhlA.js} +1 -2
- package/dist/{dom-Ds4ypDrd.js → dom-CkTGWrfu.js} +3 -6
- package/dist/{focusDrawerMixin-CximZA1J.js → focusDrawerMixin-BVbTYOGr.js} +1 -1
- package/dist/{formDrawerState-CkNGdxn5.js → formDrawerState-CogZ-GVm.js} +2 -2
- package/dist/helpers-B4GUxtdD.js +46 -0
- package/dist/index-BZDey7B-.js +268 -0
- package/dist/index-Bd8_ZHHq.js +188 -0
- package/dist/index-BvyoYp1e.js +508 -0
- package/dist/index-CJZoubA3.js +3525 -0
- package/dist/index-D7yQWP4d.js +125 -0
- package/dist/index-D8hGHka6.js +513 -0
- package/dist/index-Dxy4tf7x.js +149 -0
- package/dist/index.es.js +2 -5
- package/dist/index.umd.js +303 -1486
- package/dist/main-Bn5XkQPb.js +57570 -0
- package/dist/mapFormMixin-C7FJLnbO.js +1528 -0
- package/dist/omit-DrWpFvRJ.js +56 -0
- package/dist/{publicSenderState-CGEm9EYe.js → publicSenderState-tdtCFPMx.js} +4 -4
- package/dist/splitpanes-BApidgjj.js +342 -0
- package/dist/template-CHdf2K2I.js +1572 -0
- package/dist/tippy.esm-Co6FYzEM.js +1994 -0
- package/dist/useTermsModal-VDnO1Lro.js +87 -0
- package/dist/{utils-Dr4AcaE9.js → utils-DZkn0Q9c.js} +8 -11
- package/dist/validation-CqBkar3f.js +40 -0
- package/dist/widget.css +1 -0
- package/package.json +20 -25
- package/dist/AddClientCallout-Br6IhwGH.js +0 -48
- package/dist/AnswerModal-CsWltR6j.js +0 -3879
- package/dist/AttachmentItem-BG7FuSCD.js +0 -85
- package/dist/BaseDatePicker-PSNBtUIh.js +0 -3187
- package/dist/BaseUpload-BfEurAAV.js +0 -1977
- package/dist/BlockMedia-Bo3OfNSU.js +0 -76
- package/dist/CCallout-CAjM8-1X.js +0 -58
- package/dist/CDropdownItem-CN7gSfgY.js +0 -640
- package/dist/CFormField-Clvcf2Jh.js +0 -240
- package/dist/CPhoneInput-CEHXh5jM.js +0 -138
- package/dist/CPriceInput-D2c07SXp.js +0 -116
- package/dist/CSelect-Cz2IPzxS.js +0 -91
- package/dist/CSkeleton-AsnvnD-m.js +0 -55
- package/dist/ClientAutocomplete-CZ55-DKe.js +0 -438
- package/dist/ClientModal-CgUhWZ5L.js +0 -666
- package/dist/ColorPicker-IFGHqH-u.js +0 -2879
- package/dist/CompanyModal-TLSBFo3U.js +0 -147
- package/dist/ContentWrapper-HClxKPuT.js +0 -190
- package/dist/CoverBlockSettings-D99hAa6e.js +0 -659
- package/dist/DocAnswer-CTV_Bpt7.js +0 -36
- package/dist/DocDetails-CQe5htXj.js +0 -263
- package/dist/DocForm-6Efv5_oz.js +0 -5017
- package/dist/DocFormSend-DbXcklxU.js +0 -146
- package/dist/DocLinks-BO545zbL.js +0 -38
- package/dist/DocModalBase-DXHNJ-6i.js +0 -28
- package/dist/DocPrint-Bf2U4FQN.js +0 -240
- package/dist/DocReceipt-CWXvC7bY.js +0 -217
- package/dist/DocSendReminder-CRzBM2NJ.js +0 -140
- package/dist/DocTimeline-DGVOk8-2.js +0 -485
- package/dist/DocumentClient-Das9BaJ7.js +0 -136
- package/dist/DocumentLayout-4q8rmTVT.js +0 -4880
- package/dist/DocumentLogotype-DLncJJAB.js +0 -92
- package/dist/DocumentVoided-CcI9lX27.js +0 -25
- package/dist/EmbedInput-BPdy0lGS.js +0 -117
- package/dist/EmbedSettings-L2iwYLQK.js +0 -74
- package/dist/ErrorCallout-Ds_tBT02.js +0 -27
- package/dist/FilePreviewModal-hxUu330p.js +0 -81
- package/dist/Flag-1-HcT5Dz.js +0 -46
- package/dist/HeaderSettings-C27fMugK.js +0 -440
- package/dist/ImageSelectModal-BKDIyxF4.js +0 -86
- package/dist/ImageUploadWrapper-BiYzUQur.js +0 -1604
- package/dist/Index-5BOWxcPG.js +0 -26
- package/dist/Index-B1Odktov.js +0 -754
- package/dist/Index-B3d5BjEn.js +0 -25
- package/dist/Index-B3sSU_4X.js +0 -54
- package/dist/Index-B5Dqsh3K.js +0 -150
- package/dist/Index-B6aO1c_w.js +0 -62
- package/dist/Index-BGfICxJQ.js +0 -643
- package/dist/Index-BHopC0hv.js +0 -24
- package/dist/Index-BJXcSmp_.js +0 -55
- package/dist/Index-BQe6QjQZ.js +0 -25
- package/dist/Index-BmXx_x6t.js +0 -77
- package/dist/Index-C692qMTG.js +0 -294
- package/dist/Index-CEvbw-3i.js +0 -41
- package/dist/Index-CYSULnpn.js +0 -32
- package/dist/Index-CdtYzwAM.js +0 -107
- package/dist/Index-CetF2FW0.js +0 -230
- package/dist/Index-Cv6XLM20.js +0 -73
- package/dist/Index-Cwy8ff76.js +0 -154
- package/dist/Index-D34z4UEY.js +0 -84
- package/dist/Index-DNCei-lp.js +0 -56
- package/dist/Index-DUbxgIYB.js +0 -2445
- package/dist/Index-DVwn_LLf.js +0 -28
- package/dist/Index-Dla-mesV.js +0 -146
- package/dist/Index-KtUkOPI2.js +0 -58
- package/dist/Index-LjnOTVJk.js +0 -66
- package/dist/Index-ky1SRtfY.js +0 -94
- package/dist/Index-mceZW2NX.js +0 -41
- package/dist/Index-tD3hZjh8.js +0 -144
- package/dist/Index-vM5kDtC2.js +0 -33
- package/dist/InputToggleRow-BmDuSbE2.js +0 -57
- package/dist/ManualPopover-CQfjPvFe.js +0 -60
- package/dist/MediaWrapper-DDzcjR6V.js +0 -23
- package/dist/PackageGroup-mAGXfZDv.js +0 -704
- package/dist/PdfTerms-BH_Nwf2h.js +0 -31
- package/dist/PdfViewer-mBLxI8bA.js +0 -383
- package/dist/PlainHtml-B7gUNNZd.js +0 -27
- package/dist/PriceHeader-DClYMPcq.js +0 -338
- package/dist/SendForm-Cxv_m8Rq.js +0 -1023
- package/dist/Setup-B90VDZTG.js +0 -50
- package/dist/ThemeColorRow-D-Z7w4Wk.js +0 -69
- package/dist/ToggleBinding-DOeTcWzi.js +0 -42
- package/dist/UploadModal-DOPLVEpV.js +0 -95
- package/dist/VideoPlayerInput-1zG06elO.js +0 -97
- package/dist/VideoPlayerSettings-O-4rAYYh.js +0 -61
- package/dist/VideoSelectModal-DzqFrqCg.js +0 -104
- package/dist/answerDocumentMixin-HBiNWYCH.js +0 -51
- package/dist/debounce-Ch1d3526.js +0 -84
- package/dist/formValidationMixin-D_MzsHsR.js +0 -49
- package/dist/index-BNdbPq4J.js +0 -492
- package/dist/index-BXzugeJ6.js +0 -81
- package/dist/index-C5wcxrC6.js +0 -167
- package/dist/index-CgDOs7t4.js +0 -2700
- package/dist/index-Cj-_2coz.js +0 -351
- package/dist/index-DpqV5y0K.js +0 -102
- package/dist/main-BL_yzf2r.js +0 -57357
- package/dist/mapFormMixin-Cu_vkTP-.js +0 -3028
- package/dist/omit-Dfe_H1Ft.js +0 -31
- package/dist/simplebar.min-CRlLD1Oz.js +0 -71
- package/dist/splitpanes-BHUVsCZF.js +0 -382
- package/dist/style.css +0 -4
- package/dist/throttle-BX_w77tW.js +0 -18
- package/dist/tippy.esm-n4arfVzA.js +0 -1805
- package/dist/vuedraggable.umd-DW4PJoZ3.js +0 -3161
- package/dist/vuex.esm-DKGl8mcw.js +0 -467
|
@@ -0,0 +1,861 @@
|
|
|
1
|
+
import { m as z } from "./mapFormMixin-C7FJLnbO.js";
|
|
2
|
+
import { T as R } from "./ThemeColorRow-DFIsPy55.js";
|
|
3
|
+
import { b as _ } from "./helpers-B4GUxtdD.js";
|
|
4
|
+
import { _ as w, aj as M, o as l, b as u, s as n, $ as x, ae as f, an as y, S as $, f as p, n as T, l as b, e as g, F as V, k as L, c as S, d as v, v as h, ad as U, w as k, B as C, au as N, z as B } from "./main-Bn5XkQPb.js";
|
|
5
|
+
import { b as I } from "./CDropdownItem-DMUAJ90n.js";
|
|
6
|
+
const K = {
|
|
7
|
+
name: "CSliderThumb",
|
|
8
|
+
mixins: [M],
|
|
9
|
+
props: {
|
|
10
|
+
modelValue: {
|
|
11
|
+
type: Number,
|
|
12
|
+
default: 0
|
|
13
|
+
},
|
|
14
|
+
type: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: ""
|
|
17
|
+
},
|
|
18
|
+
customFormatter: {
|
|
19
|
+
type: Function,
|
|
20
|
+
default: null
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
emits: ["dragend", "dragstart", "update:modelValue"],
|
|
24
|
+
data() {
|
|
25
|
+
return {
|
|
26
|
+
isFocused: !1,
|
|
27
|
+
dragging: !1,
|
|
28
|
+
startX: 0,
|
|
29
|
+
startPosition: 0,
|
|
30
|
+
newPosition: null,
|
|
31
|
+
oldValue: this.modelValue
|
|
32
|
+
};
|
|
33
|
+
},
|
|
34
|
+
computed: {
|
|
35
|
+
disabled() {
|
|
36
|
+
return this.$parent.disabled;
|
|
37
|
+
},
|
|
38
|
+
max() {
|
|
39
|
+
return this.$parent.max;
|
|
40
|
+
},
|
|
41
|
+
min() {
|
|
42
|
+
return this.$parent.min;
|
|
43
|
+
},
|
|
44
|
+
step() {
|
|
45
|
+
return this.$parent.step;
|
|
46
|
+
},
|
|
47
|
+
precision() {
|
|
48
|
+
return this.$parent.precision;
|
|
49
|
+
},
|
|
50
|
+
currentPosition() {
|
|
51
|
+
return `${(this.modelValue - this.min) / (this.max - this.min) * 100}%`;
|
|
52
|
+
},
|
|
53
|
+
wrapperStyle() {
|
|
54
|
+
return { left: this.currentPosition };
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
beforeUnmount() {
|
|
58
|
+
document.removeEventListener("mousemove", this.onDragging), document.removeEventListener("touchmove", this.onDragging), document.removeEventListener("mouseup", this.onDragEnd), document.removeEventListener("touchend", this.onDragEnd), document.removeEventListener("contextmenu", this.onDragEnd);
|
|
59
|
+
},
|
|
60
|
+
methods: {
|
|
61
|
+
onFocus() {
|
|
62
|
+
this.isFocused = !0;
|
|
63
|
+
},
|
|
64
|
+
onBlur() {
|
|
65
|
+
this.isFocused = !1;
|
|
66
|
+
},
|
|
67
|
+
onButtonDown(e) {
|
|
68
|
+
this.disabled || (e.preventDefault(), this.onDragStart(e), typeof window < "u" && (document.addEventListener("mousemove", this.onDragging), document.addEventListener("touchmove", this.onDragging), document.addEventListener("mouseup", this.onDragEnd), document.addEventListener("touchend", this.onDragEnd), document.addEventListener("contextmenu", this.onDragEnd)));
|
|
69
|
+
},
|
|
70
|
+
onLeftKeyDown() {
|
|
71
|
+
this.disabled || this.modelValue === this.min || (this.newPosition = parseFloat(this.currentPosition) - this.step / (this.max - this.min) * 100, this.setPosition(this.newPosition), this.$parent.emitValue("change"));
|
|
72
|
+
},
|
|
73
|
+
onRightKeyDown() {
|
|
74
|
+
this.disabled || this.modelValue === this.max || (this.newPosition = parseFloat(this.currentPosition) + this.step / (this.max - this.min) * 100, this.setPosition(this.newPosition), this.$parent.emitValue("change"));
|
|
75
|
+
},
|
|
76
|
+
onHomeKeyDown() {
|
|
77
|
+
this.disabled || this.modelValue === this.min || (this.newPosition = 0, this.setPosition(this.newPosition), this.$parent.emitValue("change"));
|
|
78
|
+
},
|
|
79
|
+
onEndKeyDown() {
|
|
80
|
+
this.disabled || this.modelValue === this.max || (this.newPosition = 100, this.setPosition(this.newPosition), this.$parent.emitValue("change"));
|
|
81
|
+
},
|
|
82
|
+
onDragStart(e) {
|
|
83
|
+
this.dragging = !0, this.$emit("dragstart"), e.type === "touchstart" && (e.clientX = e.touches[0].clientX), this.startX = e.clientX, this.startPosition = parseFloat(this.currentPosition), this.newPosition = this.startPosition;
|
|
84
|
+
},
|
|
85
|
+
onDragging(e) {
|
|
86
|
+
if (this.dragging) {
|
|
87
|
+
e.type === "touchmove" && (e.clientX = e.touches[0].clientX);
|
|
88
|
+
const t = (e.clientX - this.startX) / this.$parent.sliderSize() * 100;
|
|
89
|
+
this.newPosition = this.startPosition + t, this.setPosition(this.newPosition);
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
onDragEnd() {
|
|
93
|
+
this.dragging = !1, this.$emit("dragend"), this.modelValue !== this.oldValue && this.$parent.emitValue("change"), this.setPosition(this.newPosition), typeof window < "u" && (document.removeEventListener("mousemove", this.onDragging), document.removeEventListener("touchmove", this.onDragging), document.removeEventListener("mouseup", this.onDragEnd), document.removeEventListener("touchend", this.onDragEnd), document.removeEventListener("contextmenu", this.onDragEnd));
|
|
94
|
+
},
|
|
95
|
+
setPosition(e) {
|
|
96
|
+
if (e === null || isNaN(e)) return;
|
|
97
|
+
e < 0 ? e = 0 : e > 100 && (e = 100);
|
|
98
|
+
const t = 100 / ((this.max - this.min) / this.step);
|
|
99
|
+
let a = Math.round(e / t) * t / 100 * (this.max - this.min) + this.min;
|
|
100
|
+
a = parseFloat(a.toFixed(this.precision)), this.$emit("update:modelValue", a), !this.dragging && a !== this.oldValue && (this.oldValue = a);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}, O = ["tabindex"];
|
|
104
|
+
function X(e, t, s, a, r, i) {
|
|
105
|
+
return l(), u("div", x({
|
|
106
|
+
class: [{ "is-dragging": r.dragging }, "c-slider-thumb-wrapper"],
|
|
107
|
+
style: i.wrapperStyle
|
|
108
|
+
}, e.rootAttrs), [
|
|
109
|
+
n("div", x(e.fallthroughAttrs, {
|
|
110
|
+
tabindex: i.disabled ? !1 : 0,
|
|
111
|
+
class: "c-slider-thumb",
|
|
112
|
+
onMousedown: t[0] || (t[0] = (...o) => i.onButtonDown && i.onButtonDown(...o)),
|
|
113
|
+
onTouchstart: t[1] || (t[1] = (...o) => i.onButtonDown && i.onButtonDown(...o)),
|
|
114
|
+
onFocus: t[2] || (t[2] = (...o) => i.onFocus && i.onFocus(...o)),
|
|
115
|
+
onBlur: t[3] || (t[3] = (...o) => i.onBlur && i.onBlur(...o)),
|
|
116
|
+
onKeydown: [
|
|
117
|
+
t[4] || (t[4] = f(y((...o) => i.onLeftKeyDown && i.onLeftKeyDown(...o), ["prevent"]), ["left"])),
|
|
118
|
+
t[5] || (t[5] = f(y((...o) => i.onRightKeyDown && i.onRightKeyDown(...o), ["prevent"]), ["right"])),
|
|
119
|
+
t[6] || (t[6] = f(y((...o) => i.onLeftKeyDown && i.onLeftKeyDown(...o), ["prevent"]), ["down"])),
|
|
120
|
+
t[7] || (t[7] = f(y((...o) => i.onRightKeyDown && i.onRightKeyDown(...o), ["prevent"]), ["up"])),
|
|
121
|
+
t[8] || (t[8] = f(y((...o) => i.onHomeKeyDown && i.onHomeKeyDown(...o), ["prevent"]), ["home"])),
|
|
122
|
+
t[9] || (t[9] = f(y((...o) => i.onEndKeyDown && i.onEndKeyDown(...o), ["prevent"]), ["end"]))
|
|
123
|
+
]
|
|
124
|
+
}), null, 16, O)
|
|
125
|
+
], 16);
|
|
126
|
+
}
|
|
127
|
+
const A = /* @__PURE__ */ w(K, [["render", X]]), H = {
|
|
128
|
+
name: "CSliderTick",
|
|
129
|
+
props: {
|
|
130
|
+
value: {
|
|
131
|
+
type: Number,
|
|
132
|
+
default: 0
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
computed: {
|
|
136
|
+
position() {
|
|
137
|
+
const e = (this.value - this.$parent.min) / (this.$parent.max - this.$parent.min) * 100;
|
|
138
|
+
return e >= 0 && e <= 100 ? e : 0;
|
|
139
|
+
},
|
|
140
|
+
hidden() {
|
|
141
|
+
return this.value === this.$parent.min || this.value === this.$parent.max;
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
created() {
|
|
145
|
+
if (!this.$parent.$data._isSlider)
|
|
146
|
+
throw new Error("You should wrap bSliderTick on a bSlider");
|
|
147
|
+
},
|
|
148
|
+
methods: {
|
|
149
|
+
getTickStyle(e) {
|
|
150
|
+
return { left: `${e}%` };
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}, j = {
|
|
154
|
+
key: 0,
|
|
155
|
+
class: "c-slider-tick-label"
|
|
156
|
+
};
|
|
157
|
+
function G(e, t, s, a, r, i) {
|
|
158
|
+
return l(), u("div", {
|
|
159
|
+
class: T([{ "is-tick-hidden": i.hidden }, "c-slider-tick"]),
|
|
160
|
+
style: b(i.getTickStyle(i.position))
|
|
161
|
+
}, [
|
|
162
|
+
e.$slots.default ? (l(), u("span", j, [
|
|
163
|
+
$(e.$slots, "default")
|
|
164
|
+
])) : p("", !0)
|
|
165
|
+
], 6);
|
|
166
|
+
}
|
|
167
|
+
const Y = /* @__PURE__ */ w(H, [["render", G]]), q = {
|
|
168
|
+
name: "CSlider",
|
|
169
|
+
components: {
|
|
170
|
+
CSliderThumb: A,
|
|
171
|
+
CSliderTick: Y
|
|
172
|
+
},
|
|
173
|
+
props: {
|
|
174
|
+
modelValue: {
|
|
175
|
+
type: [Number, Array],
|
|
176
|
+
default: 0
|
|
177
|
+
},
|
|
178
|
+
min: {
|
|
179
|
+
type: Number,
|
|
180
|
+
default: 0
|
|
181
|
+
},
|
|
182
|
+
max: {
|
|
183
|
+
type: Number,
|
|
184
|
+
default: 100
|
|
185
|
+
},
|
|
186
|
+
step: {
|
|
187
|
+
type: Number,
|
|
188
|
+
default: 1
|
|
189
|
+
},
|
|
190
|
+
type: {
|
|
191
|
+
type: String,
|
|
192
|
+
default: "primary"
|
|
193
|
+
},
|
|
194
|
+
size: {
|
|
195
|
+
type: String,
|
|
196
|
+
default: ""
|
|
197
|
+
},
|
|
198
|
+
ticks: {
|
|
199
|
+
type: Boolean,
|
|
200
|
+
default: !1
|
|
201
|
+
},
|
|
202
|
+
tooltip: {
|
|
203
|
+
type: Boolean,
|
|
204
|
+
default: !0
|
|
205
|
+
},
|
|
206
|
+
tooltipType: {
|
|
207
|
+
type: String,
|
|
208
|
+
default: ""
|
|
209
|
+
},
|
|
210
|
+
rounded: {
|
|
211
|
+
type: Boolean,
|
|
212
|
+
default: !1
|
|
213
|
+
},
|
|
214
|
+
disabled: {
|
|
215
|
+
type: Boolean,
|
|
216
|
+
default: !1
|
|
217
|
+
},
|
|
218
|
+
lazy: {
|
|
219
|
+
type: Boolean,
|
|
220
|
+
default: !1
|
|
221
|
+
},
|
|
222
|
+
customFormatter: {
|
|
223
|
+
type: Function,
|
|
224
|
+
default: null
|
|
225
|
+
},
|
|
226
|
+
ariaLabel: {
|
|
227
|
+
type: [String, Array],
|
|
228
|
+
default: ""
|
|
229
|
+
},
|
|
230
|
+
biggerSliderFocus: {
|
|
231
|
+
type: Boolean,
|
|
232
|
+
default: !1
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
emits: ["change", "dragend", "dragging", "dragstart", "update:modelValue"],
|
|
236
|
+
data() {
|
|
237
|
+
return {
|
|
238
|
+
value1: null,
|
|
239
|
+
value2: null,
|
|
240
|
+
// internal is used to update value1 and value2 with a single shot.
|
|
241
|
+
// internal is also used to stop unnecessary propagation of update.
|
|
242
|
+
internal: {
|
|
243
|
+
value1: null,
|
|
244
|
+
value2: null
|
|
245
|
+
},
|
|
246
|
+
dragging: !1,
|
|
247
|
+
isRange: !1,
|
|
248
|
+
_isSlider: !0,
|
|
249
|
+
// Used by Thumb and Tick
|
|
250
|
+
timeOutID: null
|
|
251
|
+
};
|
|
252
|
+
},
|
|
253
|
+
computed: {
|
|
254
|
+
newTooltipType() {
|
|
255
|
+
return this.tooltipType ? this.tooltipType : this.type;
|
|
256
|
+
},
|
|
257
|
+
tickValues() {
|
|
258
|
+
if (!this.ticks || this.min > this.max || this.step === 0) return [];
|
|
259
|
+
const e = [];
|
|
260
|
+
for (let t = this.min + this.step; t < this.max; t += this.step)
|
|
261
|
+
e.push(t);
|
|
262
|
+
return e;
|
|
263
|
+
},
|
|
264
|
+
minValue() {
|
|
265
|
+
return Math.min(this.value1, this.value2);
|
|
266
|
+
},
|
|
267
|
+
maxValue() {
|
|
268
|
+
return Math.max(this.value1, this.value2);
|
|
269
|
+
},
|
|
270
|
+
barSize() {
|
|
271
|
+
return this.isRange ? `${100 * (this.maxValue - this.minValue) / (this.max - this.min)}%` : `${100 * (this.value1 - this.min) / (this.max - this.min)}%`;
|
|
272
|
+
},
|
|
273
|
+
barStart() {
|
|
274
|
+
return this.isRange ? `${100 * (this.minValue - this.min) / (this.max - this.min)}%` : "0%";
|
|
275
|
+
},
|
|
276
|
+
precision() {
|
|
277
|
+
const e = [this.min, this.max, this.step].map((t) => {
|
|
278
|
+
const s = `${t}`.split(".")[1];
|
|
279
|
+
return s ? s.length : 0;
|
|
280
|
+
});
|
|
281
|
+
return Math.max(...e);
|
|
282
|
+
},
|
|
283
|
+
barStyle() {
|
|
284
|
+
return {
|
|
285
|
+
width: this.barSize,
|
|
286
|
+
left: this.barStart
|
|
287
|
+
};
|
|
288
|
+
},
|
|
289
|
+
rootClasses() {
|
|
290
|
+
return {
|
|
291
|
+
"is-rounded": this.rounded,
|
|
292
|
+
"is-dragging": this.dragging,
|
|
293
|
+
"is-disabled": this.disabled,
|
|
294
|
+
"slider-focus": this.biggerSliderFocus
|
|
295
|
+
};
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
watch: {
|
|
299
|
+
/**
|
|
300
|
+
* When v-model is changed set the new active step.
|
|
301
|
+
*/
|
|
302
|
+
modelValue(e) {
|
|
303
|
+
this.setValues(e);
|
|
304
|
+
},
|
|
305
|
+
internal({ value1: e, value2: t }) {
|
|
306
|
+
this.value1 = e, this.value2 = t;
|
|
307
|
+
},
|
|
308
|
+
value1(e) {
|
|
309
|
+
this.internal.value1 !== e && this.onInternalValueUpdate();
|
|
310
|
+
},
|
|
311
|
+
value2(e) {
|
|
312
|
+
this.internal.value2 !== e && this.onInternalValueUpdate();
|
|
313
|
+
},
|
|
314
|
+
min() {
|
|
315
|
+
this.setValues(this.modelValue);
|
|
316
|
+
},
|
|
317
|
+
max() {
|
|
318
|
+
this.setValues(this.modelValue);
|
|
319
|
+
}
|
|
320
|
+
},
|
|
321
|
+
created() {
|
|
322
|
+
this.isThumbReversed = !1, this.isTrackClickDisabled = !1, this.setValues(this.modelValue);
|
|
323
|
+
},
|
|
324
|
+
beforeUnmount() {
|
|
325
|
+
clearTimeout(this.timeOutID);
|
|
326
|
+
},
|
|
327
|
+
methods: {
|
|
328
|
+
setValues(e) {
|
|
329
|
+
if (!(this.min > this.max))
|
|
330
|
+
if (Array.isArray(e)) {
|
|
331
|
+
this.isRange = !0;
|
|
332
|
+
const t = typeof e[0] != "number" || isNaN(e[0]) ? this.min : _(e[0], this.min, this.max), s = typeof e[1] != "number" || isNaN(e[1]) ? this.max : _(e[1], this.min, this.max);
|
|
333
|
+
this.internal = {
|
|
334
|
+
value1: this.isThumbReversed ? s : t,
|
|
335
|
+
value2: this.isThumbReversed ? t : s
|
|
336
|
+
};
|
|
337
|
+
} else
|
|
338
|
+
this.isRange = !1, this.internal = {
|
|
339
|
+
value1: isNaN(e) ? this.min : _(e, this.min, this.max),
|
|
340
|
+
value2: null
|
|
341
|
+
};
|
|
342
|
+
},
|
|
343
|
+
onInternalValueUpdate() {
|
|
344
|
+
this.isRange && (this.isThumbReversed = this.value1 > this.value2), (!this.lazy || !this.dragging) && this.emitValue("update:modelValue"), this.dragging && this.emitValue("dragging");
|
|
345
|
+
},
|
|
346
|
+
sliderSize() {
|
|
347
|
+
return this.$refs.slider.getBoundingClientRect().width;
|
|
348
|
+
},
|
|
349
|
+
onSliderClick(e) {
|
|
350
|
+
if (this.disabled || this.isTrackClickDisabled) return;
|
|
351
|
+
const t = this.$refs.slider.getBoundingClientRect().left, s = (e.clientX - t) / this.sliderSize() * 100, a = this.min + s * (this.max - this.min) / 100, r = Math.abs(a - this.value1);
|
|
352
|
+
if (this.isRange) {
|
|
353
|
+
const i = Math.abs(a - this.value2);
|
|
354
|
+
if (r <= i) {
|
|
355
|
+
if (r < this.step / 2) return;
|
|
356
|
+
this.$refs.button1.setPosition(s);
|
|
357
|
+
} else {
|
|
358
|
+
if (i < this.step / 2) return;
|
|
359
|
+
this.$refs.button2.setPosition(s);
|
|
360
|
+
}
|
|
361
|
+
} else {
|
|
362
|
+
if (r < this.step / 2) return;
|
|
363
|
+
this.$refs.button1.setPosition(s);
|
|
364
|
+
}
|
|
365
|
+
this.emitValue("change");
|
|
366
|
+
},
|
|
367
|
+
onDragStart() {
|
|
368
|
+
this.dragging = !0, this.$emit("dragstart");
|
|
369
|
+
},
|
|
370
|
+
onDragEnd() {
|
|
371
|
+
this.isTrackClickDisabled = !0, this.timeOutID = setTimeout(() => {
|
|
372
|
+
this.isTrackClickDisabled = !1;
|
|
373
|
+
}, 0), this.dragging = !1, this.$emit("dragend"), this.lazy && this.emitValue("update:modelValue");
|
|
374
|
+
},
|
|
375
|
+
emitValue(e) {
|
|
376
|
+
this.$emit(
|
|
377
|
+
e,
|
|
378
|
+
this.isRange ? [this.minValue, this.maxValue] : this.value1
|
|
379
|
+
);
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
}, J = {
|
|
383
|
+
ref: "slider",
|
|
384
|
+
class: "c-slider-track"
|
|
385
|
+
};
|
|
386
|
+
function Q(e, t, s, a, r, i) {
|
|
387
|
+
const o = g("CSliderTick"), c = g("CSliderThumb");
|
|
388
|
+
return l(), u("div", {
|
|
389
|
+
class: T([[`is-${s.size}`, `is-${s.type}`, i.rootClasses], "c-slider"]),
|
|
390
|
+
onClick: t[2] || (t[2] = (...m) => i.onSliderClick && i.onSliderClick(...m))
|
|
391
|
+
}, [
|
|
392
|
+
n("div", J, [
|
|
393
|
+
n("div", {
|
|
394
|
+
style: b(i.barStyle),
|
|
395
|
+
class: "c-slider-fill"
|
|
396
|
+
}, null, 4),
|
|
397
|
+
s.ticks ? (l(!0), u(V, { key: 0 }, L(i.tickValues, (m, P) => (l(), S(o, {
|
|
398
|
+
key: P,
|
|
399
|
+
value: m
|
|
400
|
+
}, null, 8, ["value"]))), 128)) : p("", !0),
|
|
401
|
+
$(e.$slots, "default"),
|
|
402
|
+
v(c, {
|
|
403
|
+
ref: "button1",
|
|
404
|
+
modelValue: r.value1,
|
|
405
|
+
"onUpdate:modelValue": t[0] || (t[0] = (m) => r.value1 = m),
|
|
406
|
+
type: `is-${i.newTooltipType}`,
|
|
407
|
+
tooltip: s.tooltip,
|
|
408
|
+
"custom-formatter": s.customFormatter,
|
|
409
|
+
"aria-valuenow": r.value1,
|
|
410
|
+
"aria-valuemin": s.min,
|
|
411
|
+
"aria-valuemax": s.max,
|
|
412
|
+
"aria-label": Array.isArray(s.ariaLabel) ? s.ariaLabel[0] : s.ariaLabel,
|
|
413
|
+
"aria-disabled": s.disabled || void 0,
|
|
414
|
+
role: "slider",
|
|
415
|
+
"aria-orientation": "horizontal",
|
|
416
|
+
onDragstart: i.onDragStart,
|
|
417
|
+
onDragend: i.onDragEnd
|
|
418
|
+
}, null, 8, ["modelValue", "type", "tooltip", "custom-formatter", "aria-valuenow", "aria-valuemin", "aria-valuemax", "aria-label", "aria-disabled", "onDragstart", "onDragend"]),
|
|
419
|
+
r.isRange ? (l(), S(c, {
|
|
420
|
+
key: 1,
|
|
421
|
+
ref: "button2",
|
|
422
|
+
modelValue: r.value2,
|
|
423
|
+
"onUpdate:modelValue": t[1] || (t[1] = (m) => r.value2 = m),
|
|
424
|
+
type: i.newTooltipType,
|
|
425
|
+
tooltip: s.tooltip,
|
|
426
|
+
"custom-formatter": s.customFormatter,
|
|
427
|
+
"aria-valuenow": r.value2,
|
|
428
|
+
"aria-valuemin": s.min,
|
|
429
|
+
"aria-valuemax": s.max,
|
|
430
|
+
"aria-label": Array.isArray(s.ariaLabel) ? s.ariaLabel[1] : "",
|
|
431
|
+
"aria-disabled": s.disabled || void 0,
|
|
432
|
+
role: "slider",
|
|
433
|
+
"aria-orientation": "horizontal",
|
|
434
|
+
onDragstart: i.onDragStart,
|
|
435
|
+
onDragend: i.onDragEnd
|
|
436
|
+
}, null, 8, ["modelValue", "type", "tooltip", "custom-formatter", "aria-valuenow", "aria-valuemin", "aria-valuemax", "aria-label", "aria-disabled", "onDragstart", "onDragend"])) : p("", !0)
|
|
437
|
+
], 512)
|
|
438
|
+
], 2);
|
|
439
|
+
}
|
|
440
|
+
const W = /* @__PURE__ */ w(q, [["render", Q]]), Z = (e, t, s, a) => Math.atan2(e - s, t - a) * (180 / Math.PI) * -1 + 180, ee = {
|
|
441
|
+
name: "DegreePicker",
|
|
442
|
+
emits: ["input"],
|
|
443
|
+
props: {
|
|
444
|
+
value: {
|
|
445
|
+
type: Number,
|
|
446
|
+
required: !0
|
|
447
|
+
}
|
|
448
|
+
},
|
|
449
|
+
computed: {
|
|
450
|
+
degreesStyle() {
|
|
451
|
+
return { transform: `rotate(${this.value}deg)` };
|
|
452
|
+
}
|
|
453
|
+
},
|
|
454
|
+
methods: {
|
|
455
|
+
onButtonDown(e) {
|
|
456
|
+
let t = this.mouseDownHandler(e);
|
|
457
|
+
const s = (a) => {
|
|
458
|
+
t = this.mouseMoveHandler(a, t) || t;
|
|
459
|
+
};
|
|
460
|
+
window.addEventListener("mousemove", s), window.addEventListener(
|
|
461
|
+
"mouseup",
|
|
462
|
+
() => {
|
|
463
|
+
window.removeEventListener("mousemove", s);
|
|
464
|
+
},
|
|
465
|
+
{ once: !0 }
|
|
466
|
+
);
|
|
467
|
+
},
|
|
468
|
+
mouseMoveHandler(e, { centerX: t, centerY: s }) {
|
|
469
|
+
const a = Z(
|
|
470
|
+
e.clientX,
|
|
471
|
+
e.clientY,
|
|
472
|
+
t,
|
|
473
|
+
s
|
|
474
|
+
);
|
|
475
|
+
this.$emit("input", parseInt(a, 10));
|
|
476
|
+
},
|
|
477
|
+
mouseDownHandler(e) {
|
|
478
|
+
const s = e.target.getBoundingClientRect(), a = s.top + parseInt(8 - window.pageYOffset, 10), r = s.left + parseInt(8 - window.pageXOffset, 10);
|
|
479
|
+
return { centerY: a, centerX: r };
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
}, te = { class: "gradient-degrees-options" }, ie = { style: { "pointer-events": "none", "user-select": "none", "padding-right": "0.5em", opacity: "0.75" } };
|
|
483
|
+
function se(e, t, s, a, r, i) {
|
|
484
|
+
return l(), u("div", te, [
|
|
485
|
+
n("div", ie, [
|
|
486
|
+
n("div", null, h(s.value) + "°", 1)
|
|
487
|
+
]),
|
|
488
|
+
n("div", {
|
|
489
|
+
class: "gradient-degrees",
|
|
490
|
+
onMousedown: t[0] || (t[0] = (...o) => i.onButtonDown && i.onButtonDown(...o))
|
|
491
|
+
}, [
|
|
492
|
+
n("div", {
|
|
493
|
+
style: b(i.degreesStyle),
|
|
494
|
+
class: "gradient-degree-center"
|
|
495
|
+
}, t[1] || (t[1] = [
|
|
496
|
+
n("div", { class: "gradient-degree-pointer" }, null, -1)
|
|
497
|
+
]), 4)
|
|
498
|
+
], 32)
|
|
499
|
+
]);
|
|
500
|
+
}
|
|
501
|
+
const oe = /* @__PURE__ */ w(ee, [["render", se], ["__scopeId", "data-v-fe95bfec"]]), ne = {
|
|
502
|
+
name: "GradientPicker",
|
|
503
|
+
i18nOptions: {
|
|
504
|
+
namespaces: "gradientPicker",
|
|
505
|
+
messages: {
|
|
506
|
+
en: {
|
|
507
|
+
startColor: "Start color",
|
|
508
|
+
stopColor: "Stop color",
|
|
509
|
+
rotation: "Rotation"
|
|
510
|
+
},
|
|
511
|
+
sv: {
|
|
512
|
+
startColor: "Startfärg",
|
|
513
|
+
stopColor: "Stoppfärg",
|
|
514
|
+
rotation: "Rotation"
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
},
|
|
518
|
+
components: {
|
|
519
|
+
ThemeColorRow: R,
|
|
520
|
+
DegreePicker: oe
|
|
521
|
+
},
|
|
522
|
+
emits: ["input"],
|
|
523
|
+
props: {
|
|
524
|
+
value: {
|
|
525
|
+
type: Object,
|
|
526
|
+
required: !0
|
|
527
|
+
}
|
|
528
|
+
},
|
|
529
|
+
data() {
|
|
530
|
+
return {
|
|
531
|
+
set: U,
|
|
532
|
+
defaultValue: {
|
|
533
|
+
type: "linear",
|
|
534
|
+
degree: 0,
|
|
535
|
+
colors: [
|
|
536
|
+
{ percent: 0, color: "#000000" },
|
|
537
|
+
{ percent: 100, color: "#0095FF" }
|
|
538
|
+
]
|
|
539
|
+
}
|
|
540
|
+
};
|
|
541
|
+
},
|
|
542
|
+
computed: {
|
|
543
|
+
internalValue: {
|
|
544
|
+
get() {
|
|
545
|
+
return { ...this.defaultValue, ...this.value };
|
|
546
|
+
},
|
|
547
|
+
set(e) {
|
|
548
|
+
this.$emit("input", e);
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
},
|
|
552
|
+
methods: {
|
|
553
|
+
updateData(e, t) {
|
|
554
|
+
let s = t;
|
|
555
|
+
if (e === "colors") {
|
|
556
|
+
const { i: a, color: r, percent: i } = t || {};
|
|
557
|
+
s = this.internalValue.colors.map(
|
|
558
|
+
(o, c) => c === a ? { color: r, percent: i } : o
|
|
559
|
+
);
|
|
560
|
+
}
|
|
561
|
+
this.internalValue = { ...this.internalValue, [e]: s };
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
}, ae = { class: "d-option flex w-full items-center" }, re = {
|
|
565
|
+
class: "d-option-title",
|
|
566
|
+
style: { flex: "1 1 auto" }
|
|
567
|
+
};
|
|
568
|
+
function le(e, t, s, a, r, i) {
|
|
569
|
+
const o = g("ThemeColorRow"), c = g("DegreePicker");
|
|
570
|
+
return l(), u("div", null, [
|
|
571
|
+
v(o, {
|
|
572
|
+
value: i.internalValue.colors[0].color,
|
|
573
|
+
class: "d-option-title d-option",
|
|
574
|
+
onChange: t[0] || (t[0] = (m) => i.updateData("colors", { i: 0, percent: 0, color: m }))
|
|
575
|
+
}, {
|
|
576
|
+
default: k(() => [
|
|
577
|
+
C(h(e.$t("startColor")), 1)
|
|
578
|
+
]),
|
|
579
|
+
_: 1
|
|
580
|
+
}, 8, ["value"]),
|
|
581
|
+
v(o, {
|
|
582
|
+
value: i.internalValue.colors[1].color,
|
|
583
|
+
class: "d-option-title d-option",
|
|
584
|
+
onChange: t[1] || (t[1] = (m) => i.updateData("colors", { i: 1, percent: 100, color: m }))
|
|
585
|
+
}, {
|
|
586
|
+
default: k(() => [
|
|
587
|
+
C(h(e.$t("stopColor")), 1)
|
|
588
|
+
]),
|
|
589
|
+
_: 1
|
|
590
|
+
}, 8, ["value"]),
|
|
591
|
+
n("div", ae, [
|
|
592
|
+
n("div", re, h(e.$t("rotation")), 1),
|
|
593
|
+
v(c, {
|
|
594
|
+
value: i.internalValue.degree,
|
|
595
|
+
style: { "padding-right": "4px" },
|
|
596
|
+
onInput: t[2] || (t[2] = (m) => i.updateData("degree", m))
|
|
597
|
+
}, null, 8, ["value"])
|
|
598
|
+
])
|
|
599
|
+
]);
|
|
600
|
+
}
|
|
601
|
+
const de = /* @__PURE__ */ w(ne, [["render", le], ["__scopeId", "data-v-a0f7de54"]]), ue = {
|
|
602
|
+
image: B(
|
|
603
|
+
() => import("./ImageSelectModal-DKdU-0uq.js")
|
|
604
|
+
),
|
|
605
|
+
video: B(
|
|
606
|
+
() => import("./VideoSelectModal-BhbanMix.js")
|
|
607
|
+
)
|
|
608
|
+
}, me = {
|
|
609
|
+
name: "CoverBlockSettings",
|
|
610
|
+
i18nOptions: {
|
|
611
|
+
namespaces: "coverBlockSettings",
|
|
612
|
+
messages: {
|
|
613
|
+
en: {
|
|
614
|
+
colorLabel: "Color",
|
|
615
|
+
overlay: {
|
|
616
|
+
title: "Overlay",
|
|
617
|
+
colorLabel: "Color",
|
|
618
|
+
opacityLabel: "Opacity"
|
|
619
|
+
}
|
|
620
|
+
},
|
|
621
|
+
sv: {
|
|
622
|
+
colorLabel: "Färg",
|
|
623
|
+
overlay: {
|
|
624
|
+
title: "Överlägg",
|
|
625
|
+
colorLabel: "Färg",
|
|
626
|
+
opacityLabel: "Opacitet"
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
},
|
|
631
|
+
components: {
|
|
632
|
+
ThemeColorRow: R,
|
|
633
|
+
GradientPicker: de,
|
|
634
|
+
CSlider: W,
|
|
635
|
+
CSwitch: I
|
|
636
|
+
},
|
|
637
|
+
mixins: [
|
|
638
|
+
z(
|
|
639
|
+
[
|
|
640
|
+
"type",
|
|
641
|
+
"video",
|
|
642
|
+
"resourceUrl",
|
|
643
|
+
"filter",
|
|
644
|
+
"blur",
|
|
645
|
+
"position",
|
|
646
|
+
"overlay",
|
|
647
|
+
"overlayColor",
|
|
648
|
+
"gradient",
|
|
649
|
+
"backgroundColor"
|
|
650
|
+
],
|
|
651
|
+
{ useEmit: !1 }
|
|
652
|
+
)
|
|
653
|
+
],
|
|
654
|
+
data() {
|
|
655
|
+
return {
|
|
656
|
+
getUnsplashResized: N
|
|
657
|
+
};
|
|
658
|
+
},
|
|
659
|
+
methods: {
|
|
660
|
+
toggleOverlay(e) {
|
|
661
|
+
e && !this.overlayColor ? (this.overlayColor = "hsla(205, 100%, 50%, 0.5)", this.overlay = !0) : this.overlay = e;
|
|
662
|
+
},
|
|
663
|
+
setType(e) {
|
|
664
|
+
e === "color" && !this.backgroundColor ? this.backgroundColor = "hsl(134, 74%, 39%)" : e === "video" && !this.video ? this.video = {
|
|
665
|
+
id: "1409899",
|
|
666
|
+
url: "https://videos.pexels.com/video-files/1409899/1409899-hd_1920_1080_25fps.mp4",
|
|
667
|
+
thumbnail: "https://images.pexels.com/videos/1409899/free-video-1409899.jpg?auto=compress&cs=tinysrgb&fit=crop&h=630&w=1200",
|
|
668
|
+
provider: "pexels"
|
|
669
|
+
} : e === "image" ? (this.resourceUrl || (this.resourceUrl = "https://images.unsplash.com/photo-1520013817300-1f4c1cb245ef?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1987&q=80"), this.position || (this.position = 50)) : e === "gradient" && !this.gradient && (this.gradient = {
|
|
670
|
+
type: "linear",
|
|
671
|
+
degree: 45,
|
|
672
|
+
colors: [
|
|
673
|
+
{ color: "hsla(324.71,100%,50%,1)", percent: 0 },
|
|
674
|
+
{ color: "hsla(209.41,85.18%,40.65%,1)", percent: 100 }
|
|
675
|
+
]
|
|
676
|
+
}), this.type = e;
|
|
677
|
+
},
|
|
678
|
+
openResourceModal(e) {
|
|
679
|
+
this.$modal.show(
|
|
680
|
+
ue[e],
|
|
681
|
+
{},
|
|
682
|
+
{},
|
|
683
|
+
{
|
|
684
|
+
input: (t) => {
|
|
685
|
+
e === "image" ? this.resourceUrl = t : e === "video" && (this.video = t);
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
);
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
}, he = { class: "d-root" }, ce = {
|
|
692
|
+
class: "d-option",
|
|
693
|
+
style: { "border-bottom": "none" }
|
|
694
|
+
}, pe = { class: "d-option-title" }, ge = {
|
|
695
|
+
class: "flex w-full",
|
|
696
|
+
style: { "flex-wrap": "wrap", "padding-top": "0.25em" }
|
|
697
|
+
}, ve = { class: "d-option" }, fe = {
|
|
698
|
+
key: 0,
|
|
699
|
+
class: "d-option"
|
|
700
|
+
}, ye = { class: "d-option-title" }, be = { style: { display: "flex", "flex-direction": "row", "flex-wrap": "wrap", "padding-top": "0.25em" } }, we = ["onClick"], De = {
|
|
701
|
+
class: "d-option",
|
|
702
|
+
style: { "padding-bottom": "0.5em" }
|
|
703
|
+
}, ke = { class: "d-option-title" }, Ce = { style: { flex: "1 1 auto" } }, Ve = {
|
|
704
|
+
key: 1,
|
|
705
|
+
class: "d-option"
|
|
706
|
+
}, Se = {
|
|
707
|
+
key: 2,
|
|
708
|
+
class: "d-option"
|
|
709
|
+
}, Pe = {
|
|
710
|
+
key: 4,
|
|
711
|
+
class: "d-option",
|
|
712
|
+
style: { "padding-bottom": "0.5em" }
|
|
713
|
+
}, _e = { class: "d-option-title" }, Le = { style: { flex: "1 1 auto" } }, Te = {
|
|
714
|
+
key: 5,
|
|
715
|
+
class: "d-option"
|
|
716
|
+
}, Ee = { class: "d-option-title" }, xe = { style: { flex: "1 1 auto" } }, Be = {
|
|
717
|
+
key: 0,
|
|
718
|
+
class: "d-option-row",
|
|
719
|
+
style: { "padding-top": "1em" }
|
|
720
|
+
};
|
|
721
|
+
function Re(e, t, s, a, r, i) {
|
|
722
|
+
const o = g("CButton"), c = g("CSlider"), m = g("ThemeColorRow"), P = g("GradientPicker"), F = g("CSwitch");
|
|
723
|
+
return l(), u("div", he, [
|
|
724
|
+
n("div", ce, [
|
|
725
|
+
n("div", pe, h(e.$t("_common:background").capitalize()), 1),
|
|
726
|
+
n("div", ge, [
|
|
727
|
+
(l(!0), u(V, null, L([
|
|
728
|
+
{ label: e.$t("_common:image"), value: "image" },
|
|
729
|
+
{ label: e.$t("_common:color"), value: "color" },
|
|
730
|
+
{ label: e.$t("_common:gradient"), value: "gradient" },
|
|
731
|
+
{ label: e.$t("_common:video"), value: "video" }
|
|
732
|
+
], ({ label: d, value: D }, E) => (l(), S(o, {
|
|
733
|
+
key: d + E,
|
|
734
|
+
type: e.type === D ? "secondary" : "none",
|
|
735
|
+
pattern: e.type === D ? "primary" : "secondary",
|
|
736
|
+
size: "normal",
|
|
737
|
+
style: { margin: "0 3px 3px 0", padding: "0 0.5em", height: "2em", "font-size": "15px", "border-radius": "4px" },
|
|
738
|
+
onClick: ($e) => i.setType(D)
|
|
739
|
+
}, {
|
|
740
|
+
default: k(() => [
|
|
741
|
+
C(h(d.capitalize()), 1)
|
|
742
|
+
]),
|
|
743
|
+
_: 2
|
|
744
|
+
}, 1032, ["type", "pattern", "onClick"]))), 128))
|
|
745
|
+
])
|
|
746
|
+
]),
|
|
747
|
+
e.type === "image" ? (l(), u(V, { key: 0 }, [
|
|
748
|
+
n("div", ve, [
|
|
749
|
+
n("div", {
|
|
750
|
+
style: b({ backgroundImage: `url(${e.resourceUrl})` }),
|
|
751
|
+
class: "d-option-button-image",
|
|
752
|
+
onClick: t[0] || (t[0] = (d) => i.openResourceModal(e.type))
|
|
753
|
+
}, null, 4)
|
|
754
|
+
]),
|
|
755
|
+
e.resourceUrl ? (l(), u("div", fe, [
|
|
756
|
+
n("div", ye, h(e.$t("_common:filter").capitalize()), 1),
|
|
757
|
+
n("div", be, [
|
|
758
|
+
(l(), u(V, null, L([
|
|
759
|
+
"",
|
|
760
|
+
"sepia(30%) brightness(110%) contrast(110%) grayscale(100%)",
|
|
761
|
+
"brightness(110%) contrast(90%) saturate(150%)",
|
|
762
|
+
"sepia(50%) contrast(140%)",
|
|
763
|
+
"sepia(25%) brightness(95%) contrast(95%) saturate(150%)",
|
|
764
|
+
"blur(0px) sepia(15%) saturate(130%) hue-rotate(-30deg)"
|
|
765
|
+
], (d, D) => n("div", {
|
|
766
|
+
key: D,
|
|
767
|
+
class: T([{ "is-active": e.filter === d }, "bg-filter"]),
|
|
768
|
+
onClick: (E) => e.filter = d
|
|
769
|
+
}, [
|
|
770
|
+
n("div", {
|
|
771
|
+
style: b({
|
|
772
|
+
filter: d,
|
|
773
|
+
backgroundImage: `url(${r.getUnsplashResized(e.resourceUrl, {
|
|
774
|
+
w: 200
|
|
775
|
+
})})`
|
|
776
|
+
}),
|
|
777
|
+
class: "bg-filter-preview"
|
|
778
|
+
}, null, 4)
|
|
779
|
+
], 10, we)), 64))
|
|
780
|
+
])
|
|
781
|
+
])) : p("", !0),
|
|
782
|
+
n("div", De, [
|
|
783
|
+
n("div", ke, [
|
|
784
|
+
n("div", Ce, h(e.$t("_common:position").capitalize()), 1),
|
|
785
|
+
v(c, {
|
|
786
|
+
"model-value": e.position || 0,
|
|
787
|
+
type: "secondary",
|
|
788
|
+
size: "small",
|
|
789
|
+
rounded: "",
|
|
790
|
+
style: { width: "80px", margin: "0" },
|
|
791
|
+
"onUpdate:modelValue": t[1] || (t[1] = (d) => e.position = d)
|
|
792
|
+
}, null, 8, ["model-value"])
|
|
793
|
+
])
|
|
794
|
+
])
|
|
795
|
+
], 64)) : p("", !0),
|
|
796
|
+
e.type === "video" ? (l(), u("div", Ve, [
|
|
797
|
+
n("div", {
|
|
798
|
+
style: b({ backgroundImage: `url(${e.video.thumbnail})` }),
|
|
799
|
+
class: "d-option-button-image",
|
|
800
|
+
onClick: t[2] || (t[2] = (d) => i.openResourceModal(e.type))
|
|
801
|
+
}, null, 4)
|
|
802
|
+
])) : e.type === "color" ? (l(), u("div", Se, [
|
|
803
|
+
v(m, {
|
|
804
|
+
value: e.backgroundColor || "",
|
|
805
|
+
class: "d-option-title",
|
|
806
|
+
onChange: t[3] || (t[3] = (d) => e.backgroundColor = d)
|
|
807
|
+
}, {
|
|
808
|
+
default: k(() => [
|
|
809
|
+
C(h(e.$t("colorLabel")), 1)
|
|
810
|
+
]),
|
|
811
|
+
_: 1
|
|
812
|
+
}, 8, ["value"])
|
|
813
|
+
])) : e.type === "gradient" ? (l(), S(P, {
|
|
814
|
+
key: 3,
|
|
815
|
+
value: e.gradient || {},
|
|
816
|
+
onInput: t[4] || (t[4] = (d) => e.gradient = d)
|
|
817
|
+
}, null, 8, ["value"])) : p("", !0),
|
|
818
|
+
["image", "video"].includes(e.type) ? (l(), u("div", Pe, [
|
|
819
|
+
n("div", _e, [
|
|
820
|
+
n("div", Le, h(e.$t("_common:blur").capitalize()), 1),
|
|
821
|
+
v(c, {
|
|
822
|
+
"model-value": e.blur || 0,
|
|
823
|
+
max: 30,
|
|
824
|
+
type: "secondary",
|
|
825
|
+
size: "small",
|
|
826
|
+
rounded: "",
|
|
827
|
+
style: { width: "80px", margin: "0" },
|
|
828
|
+
"onUpdate:modelValue": t[5] || (t[5] = (d) => e.blur = d)
|
|
829
|
+
}, null, 8, ["model-value"])
|
|
830
|
+
])
|
|
831
|
+
])) : p("", !0),
|
|
832
|
+
["image", "video"].includes(e.type) ? (l(), u("div", Te, [
|
|
833
|
+
n("div", Ee, [
|
|
834
|
+
n("div", xe, h(e.$t("overlay.title")), 1),
|
|
835
|
+
v(F, {
|
|
836
|
+
"model-value": !!e.overlay,
|
|
837
|
+
size: "small",
|
|
838
|
+
type: "secondary",
|
|
839
|
+
style: { "margin-right": "0" },
|
|
840
|
+
"onUpdate:modelValue": i.toggleOverlay
|
|
841
|
+
}, null, 8, ["model-value", "onUpdate:modelValue"])
|
|
842
|
+
]),
|
|
843
|
+
e.overlay ? (l(), u("div", Be, [
|
|
844
|
+
v(m, {
|
|
845
|
+
value: e.overlayColor || "",
|
|
846
|
+
placement: "top-end",
|
|
847
|
+
onChange: t[6] || (t[6] = (d) => e.overlayColor = d)
|
|
848
|
+
}, {
|
|
849
|
+
default: k(() => [
|
|
850
|
+
C(h(e.$t("overlay.colorLabel")), 1)
|
|
851
|
+
]),
|
|
852
|
+
_: 1
|
|
853
|
+
}, 8, ["value"])
|
|
854
|
+
])) : p("", !0)
|
|
855
|
+
])) : p("", !0)
|
|
856
|
+
]);
|
|
857
|
+
}
|
|
858
|
+
const Ie = /* @__PURE__ */ w(me, [["render", Re], ["__scopeId", "data-v-6f8a8437"]]);
|
|
859
|
+
export {
|
|
860
|
+
Ie as default
|
|
861
|
+
};
|