@cling-se/widget 0.14.4 → 0.14.6

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.
Files changed (129) hide show
  1. package/dist/AddClientCallout-C7abPZ87.js +46 -0
  2. package/dist/AnswerModal-CsA2pl2P.js +3874 -0
  3. package/dist/AttachmentItem-Da1-7xwf.js +78 -0
  4. package/dist/BaseDatePicker-k9zlSi5J.js +3183 -0
  5. package/dist/BaseUpload-BUrXX3fT.js +1977 -0
  6. package/dist/BlockMedia-CYI07qAn.js +76 -0
  7. package/dist/CCallout-Qwae66vo.js +59 -0
  8. package/dist/CCurrencyDropdown-Y_u0hgBx.js +246 -0
  9. package/dist/CDropdownItem-CXJ4xD8W.js +538 -0
  10. package/dist/CField.vue_vue_type_style_index_0_lang-l0sNRNKZ.js +1 -0
  11. package/dist/CFormField--m3PvQuT.js +241 -0
  12. package/dist/CPhoneFormat-Qg6MkDVP.js +62 -0
  13. package/dist/CPriceInput-Dlx44UrR.js +112 -0
  14. package/dist/CTabs.vue_vue_type_style_index_0_scoped_b7262014_lang-l0sNRNKZ.js +1 -0
  15. package/dist/ClientAutocomplete-BKKc_br6.js +78 -0
  16. package/dist/ClientModal-CVZFb1Br.js +625 -0
  17. package/dist/ColorPicker-Bo3s3Esp.js +2879 -0
  18. package/dist/CompanyModal-DadjAioS.js +141 -0
  19. package/dist/ContentWrapper-BC3ZBQW9.js +183 -0
  20. package/dist/CoverBlockSettings-B484eE4g.js +275 -0
  21. package/dist/DocAnswer-CcYryOWI.js +36 -0
  22. package/dist/DocDetails-BigsoEWL.js +246 -0
  23. package/dist/DocForm-DlN0eNWt.js +7273 -0
  24. package/dist/DocFormSend-TqKo210I.js +143 -0
  25. package/dist/DocLinks-DSo54vDn.js +38 -0
  26. package/dist/DocModalBase-XlM1SThW.js +28 -0
  27. package/dist/DocPrint-tD0Vd9Sw.js +240 -0
  28. package/dist/DocReceipt-CDHPrhXM.js +210 -0
  29. package/dist/DocSendReminder-C62RhltH.js +137 -0
  30. package/dist/DocTextEditor-VjhV9IRp.js +17181 -0
  31. package/dist/DocTimeline-LcW4z3nC.js +481 -0
  32. package/dist/DocumentClient-CqbTRdpB.js +136 -0
  33. package/dist/DocumentLayout-Dbf8_01r.js +4909 -0
  34. package/dist/DocumentLogotype-DXYnBedV.js +87 -0
  35. package/dist/DocumentVoided-vH1Ti5lZ.js +25 -0
  36. package/dist/EmbedInput-D9qP8OnY.js +113 -0
  37. package/dist/EmbedSettings-DISuNqJT.js +72 -0
  38. package/dist/ErrorCallout-CCtCVwSh.js +28 -0
  39. package/dist/FilePreviewModal-BjhNyb6L.js +81 -0
  40. package/dist/Flag-Dhukv9_J.js +114 -0
  41. package/dist/HeaderSettings-CK4SkB1x.js +392 -0
  42. package/dist/ImageSelectModal-DnvPZzXx.js +84 -0
  43. package/dist/ImageUploadWrapper-B7cNMu5a.js +1604 -0
  44. package/dist/Index-B3HoK_cZ.js +84 -0
  45. package/dist/Index-B3aucNji.js +25 -0
  46. package/dist/Index-B9H5MMHb.js +62 -0
  47. package/dist/Index-BAYdvT-t.js +754 -0
  48. package/dist/Index-BLeQprjq.js +46 -0
  49. package/dist/Index-BOyvQlng.js +154 -0
  50. package/dist/Index-BVsw2tak.js +70 -0
  51. package/dist/Index-BY1UKGEO.js +98 -0
  52. package/dist/Index-Bh0kMSsA.js +107 -0
  53. package/dist/Index-BlQSM7tC.js +144 -0
  54. package/dist/Index-BpcJBGGd.js +642 -0
  55. package/dist/Index-Bs8wprXw.js +58 -0
  56. package/dist/Index-BvZZAvFd.js +21 -0
  57. package/dist/Index-CFo-3Y5Q.js +26 -0
  58. package/dist/Index-CNvp5K3L.js +559 -0
  59. package/dist/Index-CPJVx14x.js +171 -0
  60. package/dist/Index-CQ325eVT.js +140 -0
  61. package/dist/Index-CWrDtcfT.js +49 -0
  62. package/dist/Index-CyJnSvDR.js +223 -0
  63. package/dist/Index-D6bc7lg4.js +52 -0
  64. package/dist/Index-DCR8ev4U.js +33 -0
  65. package/dist/Index-DGQSB9cH.js +24 -0
  66. package/dist/Index-DXAvlq74.js +292 -0
  67. package/dist/Index-D_rfst8y.js +45 -0
  68. package/dist/Index-Dm8xMFGg.js +61 -0
  69. package/dist/Index-DtSSgtxB.js +55 -0
  70. package/dist/Index-DuTw9vhb.js +77 -0
  71. package/dist/Index-Dw26jtGV.js +31 -0
  72. package/dist/Index-OxN73_fO.js +32 -0
  73. package/dist/Index-S-FHG7_k.js +2402 -0
  74. package/dist/Index-ZFkitzfq.js +69 -0
  75. package/dist/Index-dyWK9jgr.js +25 -0
  76. package/dist/Index-gb11ngPS.js +57 -0
  77. package/dist/Index-lKk_XKJ3.js +150 -0
  78. package/dist/InputToggleRow-DSSvhPKA.js +57 -0
  79. package/dist/ManualPopover-lpJYSkw5.js +58 -0
  80. package/dist/MediaWrapper-BQ22FA2B.js +23 -0
  81. package/dist/NotBindingText-JxwzZLPP.js +32 -0
  82. package/dist/PackageGroup-BLSMSUDz.js +699 -0
  83. package/dist/PdfTerms-DtutjM5Y.js +36 -0
  84. package/dist/PdfViewer-BsxcZI_x.js +374 -0
  85. package/dist/PlainHtml-BMPZs2fT.js +20 -0
  86. package/dist/PriceHeader-BRYY01H2.js +339 -0
  87. package/dist/SearchApi-6001iFxU.js +161 -0
  88. package/dist/Setup-cw6jMI9M.js +50 -0
  89. package/dist/SmartList-q6H-uLbm.js +83 -0
  90. package/dist/TermsSettings-DWvaPneu.js +102 -0
  91. package/dist/ThemeColorRow-BXWnvfz-.js +67 -0
  92. package/dist/ToggleBinding-DydtwpNG.js +38 -0
  93. package/dist/UploadModal-D_EDKHGD.js +95 -0
  94. package/dist/VideoPlayerInput-B9yzUeBW.js +93 -0
  95. package/dist/VideoPlayerSettings-Bvp9l0yj.js +61 -0
  96. package/dist/VideoSelectModal-DY3N4JiS.js +100 -0
  97. package/dist/anime.es-BrPTThYb.js +858 -0
  98. package/dist/answerDocumentMixin-BYZPU_R-.js +51 -0
  99. package/dist/color-TdtKxwVa.js +19 -0
  100. package/dist/debounce-BPnlzNwd.js +84 -0
  101. package/dist/dom-CJxkno7i.js +91 -0
  102. package/dist/favicon.ico +0 -0
  103. package/dist/focusDrawerMixin-DC9Oa1i7.js +22 -0
  104. package/dist/formComponentsInstall-CEW6TK6z.js +2499 -0
  105. package/dist/formDrawerState-CAzvSMiQ.js +20 -0
  106. package/dist/formValidationMixin-D7zXxCpC.js +49 -0
  107. package/dist/i18nMessages-Chz_lxGG.js +17 -0
  108. package/dist/index-B9WDC3Xe.js +166 -0
  109. package/dist/index-BCMaUC5r.js +3916 -0
  110. package/dist/index-BDMI4NVY.js +492 -0
  111. package/dist/index-BbscgdRg.js +81 -0
  112. package/dist/index-CLUljEDI.js +347 -0
  113. package/dist/index-SxyZvewN.js +102 -0
  114. package/dist/index.es.js +35 -0
  115. package/dist/index.umd.js +3148 -0
  116. package/dist/main-CQBEuZk9.js +56739 -0
  117. package/dist/mapFormMixin-DlFcgwhm.js +72 -0
  118. package/dist/omit-BWy0Zhd3.js +31 -0
  119. package/dist/publicSenderState-CvOcFv2U.js +21 -0
  120. package/dist/splitpanes-BHUVsCZF.js +382 -0
  121. package/dist/style.css +4 -0
  122. package/dist/throttle-BrC8eGjQ.js +18 -0
  123. package/dist/tinycolor-PhFP695w.js +633 -0
  124. package/dist/tippy.esm-7dmKOUvu.js +1799 -0
  125. package/dist/utils-NBLgNGHR.js +108 -0
  126. package/dist/vuedraggable.umd-ByfH7ZxC.js +3161 -0
  127. package/dist/vuex.esm-DKGl8mcw.js +467 -0
  128. package/package.json +1 -1
  129. package/vite.config.ts +0 -1
@@ -0,0 +1,141 @@
1
+ import { w as r } from "./CDropdownItem-CXJ4xD8W.js";
2
+ import { E as l, g as s, n as c } from "./main-CQBEuZk9.js";
3
+ import { v as o } from "./index-BDMI4NVY.js";
4
+ import { m as p, b as n, a as d } from "./vuex.esm-DKGl8mcw.js";
5
+ import { s as m, a as u } from "./publicSenderState-CvOcFv2U.js";
6
+ const { mapFields: f } = l({
7
+ getterType: "forms/getField",
8
+ mutationType: "forms/updateField"
9
+ }), y = {
10
+ name: "CompanyModal",
11
+ mixins: [r],
12
+ props: {
13
+ inputFocusOnMount: {
14
+ type: String,
15
+ default: ""
16
+ },
17
+ isPublicForm: {
18
+ type: Boolean,
19
+ default: !1
20
+ }
21
+ },
22
+ data() {
23
+ return {
24
+ isLoading: !1
25
+ };
26
+ },
27
+ validations: {
28
+ name: {
29
+ required: o.required
30
+ },
31
+ email: {
32
+ email: o.email
33
+ }
34
+ },
35
+ computed: {
36
+ ...p({
37
+ isPostingCompany: "companies/isPosting",
38
+ isPostingUser: "companyUsers/isPosting",
39
+ hasChanged: "forms/hasChanged",
40
+ companyRegion: "application/companyRegion",
41
+ can: "application/can"
42
+ }),
43
+ ...f({
44
+ company: "company",
45
+ user: "companyUser",
46
+ name: "company.name",
47
+ email: "companyUser.email",
48
+ firstName: "companyUser.firstname",
49
+ lastName: "companyUser.lastname",
50
+ cellphone: "companyUser.cellphone"
51
+ }),
52
+ ...n("application", {
53
+ currentUserId: (i) => i.user.userId
54
+ }),
55
+ ...n("forms", {
56
+ documentCompanyUserId: ({ document2: i }) => i && i.companyUserId
57
+ }),
58
+ isFullScreen() {
59
+ return this.mq === "sm";
60
+ },
61
+ isPosting() {
62
+ return this.isPostingCompany || this.isPostingUser;
63
+ },
64
+ notCurrentUser() {
65
+ return this.currentUserId !== this.documentCompanyUserId && !this.isPublicForm;
66
+ },
67
+ messages() {
68
+ const i = (e) => this.$t(`views:account.settings.company.validations.${e}`);
69
+ return {
70
+ name: {
71
+ required: i("name.required")
72
+ },
73
+ email: {
74
+ required: i("email.required"),
75
+ email: i("email.email")
76
+ }
77
+ };
78
+ }
79
+ },
80
+ created() {
81
+ this.loadForm();
82
+ },
83
+ mounted() {
84
+ this.$refs[this.inputFocusOnMount] ? this.$refs[this.inputFocusOnMount].$el.querySelector("input").focus() : this.$refs.name.$el.querySelector("input").focus();
85
+ },
86
+ methods: {
87
+ ...d({
88
+ formEditCompany: s.FORM_EDIT_COMPANY,
89
+ formEditCompanyUser: s.FORM_EDIT_COMPANY_USER,
90
+ formSubmitCompany: s.FORM_SUBMIT_COMPANY,
91
+ formSubmitCompanyUser: s.FORM_SUBMIT_COMPANY_USER,
92
+ setForm: s.SET_FORM,
93
+ showMessage: s.SHOW_MESSAGE
94
+ }),
95
+ loadForm() {
96
+ this.isPublicForm ? (this.setForm({ key: "company", formData: m.company }), this.setForm({ key: "companyUser", formData: m.user })) : (this.formEditCompany({ props: ["name"] }), this.formEditCompanyUser({
97
+ id: this.documentCompanyUserId,
98
+ props: ["id", "firstname", "lastname", "cellphone", "email"]
99
+ }));
100
+ },
101
+ async save() {
102
+ this.$v.$touch(), !this.$v.$invalid && (this.isLoading = !0, this.isPublicForm ? u({ company: this.company, user: this.user }) : await Promise.all([
103
+ ...this.hasChanged("company") ? [this.formSubmitCompany()] : [],
104
+ ...this.hasChanged("companyUser") && this.currentUserId === this.documentCompanyUserId ? [this.formSubmitCompanyUser()] : []
105
+ ]), this.$emit("close"), this.isLoading = !1);
106
+ },
107
+ close() {
108
+ this.$emit("close");
109
+ }
110
+ }
111
+ };
112
+ var h = function() {
113
+ var e = this, a = e._self._c;
114
+ return a("div", { staticClass: "font-inter", class: {
115
+ "full-screen": e.isFullScreen,
116
+ "modal-overlay": !0
117
+ }, on: { "&click": function(t) {
118
+ return t.target !== t.currentTarget ? null : e.close.apply(null, arguments);
119
+ } } }, [a("div", { staticClass: "modal-container", style: !e.isFullScreen && { padding: "calc(3 * var(--rem))" } }, [e.isFullScreen ? a("CButton", { staticClass: "modal-close", attrs: { pattern: "tertiary", type: "none", circle: "", icon: "x" }, on: { click: e.close } }) : e._e(), a("div", { staticClass: "form-client" }, [a("div", { staticStyle: { "font-weight": "600", "font-size": "21px", "padding-bottom": "calc(2.5 * var(--rem))" } }, [e._v(" " + e._s(e.$t("_common:edit", { thing: e.$t("_common:company") })) + " ")]), a("CField", { staticStyle: { "margin-bottom": "calc(1.5 * var(--rem))" }, attrs: { label: e.$t("_common:companyName").capitalize(), validator: e.$v.name, messages: e.messages.name, "label-position": "inside" } }, [a("CInput", { ref: "name", attrs: { disabled: e.isPublicForm ? !1 : !e.can("company", "modify"), placeholder: e.$t("_common:companyName").capitalize(), size: "medium" }, model: { value: e.name, callback: function(t) {
120
+ e.name = t;
121
+ }, expression: "name" } })], 1), a("CField", { staticStyle: { "margin-bottom": "calc(1.5 * var(--rem))" }, attrs: { label: e.$t("_common:firstName").capitalize(), "label-position": "inside" } }, [a("CInput", { ref: "reference", attrs: { disabled: e.notCurrentUser, placeholder: e.$t("_common:firstName").capitalize(), size: "medium" }, model: { value: e.firstName, callback: function(t) {
122
+ e.firstName = t;
123
+ }, expression: "firstName" } }), a("CField", { attrs: { label: e.$t("_common:lastName").capitalize(), "label-position": "inside" } }, [a("CInput", { attrs: { disabled: e.notCurrentUser, placeholder: e.$t("_common:lastName").capitalize(), size: "medium" }, model: { value: e.lastName, callback: function(t) {
124
+ e.lastName = t;
125
+ }, expression: "lastName" } })], 1)], 1), a("CField", { staticStyle: { "margin-bottom": "calc(1.5 * var(--rem))" }, attrs: { validator: e.$v.email, messages: e.messages.email, label: e.$t("_common:email").capitalize(), "label-position": "inside" } }, [a("CInput", { ref: "email", attrs: { disabled: !e.isPublicForm, placeholder: e.$t("_common:email").capitalize(), size: "medium" }, model: { value: e.email, callback: function(t) {
126
+ e.email = typeof t == "string" ? t.trim() : t;
127
+ }, expression: "email" } })], 1), a("CField", [a("CPhoneInput", { ref: "cellphone", attrs: { "default-region": e.companyRegion, disabled: e.notCurrentUser, label: e.$t("_common:cellphone").capitalize(), "label-position": "inside", size: "medium" }, model: { value: e.cellphone, callback: function(t) {
128
+ e.cellphone = t;
129
+ }, expression: "cellphone" } })], 1), a("CButton", { staticStyle: { "margin-top": "calc(3 * var(--rem))" }, attrs: { loading: e.isPosting, type: "secondary", wide: "", size: "medium" }, on: { click: e.save } }, [e._v(" " + e._s(e.$t("_common:save", { thing: e.$t("_common:company") })) + " ")])], 1)], 1)]);
130
+ }, g = [], C = /* @__PURE__ */ c(
131
+ y,
132
+ h,
133
+ g,
134
+ !1,
135
+ null,
136
+ "01341cfe"
137
+ );
138
+ const S = C.exports;
139
+ export {
140
+ S as default
141
+ };
@@ -0,0 +1,183 @@
1
+ import { m as n } from "./mapFormMixin-DlFcgwhm.js";
2
+ import { B as l } from "./BlockMedia-CYI07qAn.js";
3
+ import { t as r } from "./tinycolor-PhFP695w.js";
4
+ import { T as i } from "./DocTextEditor-VjhV9IRp.js";
5
+ import { n as s, ab as c, z as u, B as m, A as p } from "./main-CQBEuZk9.js";
6
+ import { i as d } from "./i18nMessages-Chz_lxGG.js";
7
+ const _ = {
8
+ name: "StaticComboLayout",
9
+ props: {
10
+ layout: {
11
+ type: String,
12
+ required: !0
13
+ }
14
+ }
15
+ };
16
+ var f = function() {
17
+ var t = this, e = t._self._c;
18
+ return ["horizontal"].includes(t.layout) ? e("div", { staticClass: "flex w-full flex-col", staticStyle: { flex: "1 1 auto", "min-height": "100%" } }, [t._t("logo"), e("div", { staticClass: "flex w-full flex-col justify-end", staticStyle: { flex: "1 1 auto" } }, [t._t("preText"), t._t("documentName"), t._t("postText")], 2)], 2) : e("div", { staticClass: "flex w-full flex-col justify-between", class: {
19
+ "items-center": t.layout === "center"
20
+ }, staticStyle: { flex: "1 1 auto", "min-height": "100%" } }, [t._t("logo"), e("div", { staticClass: "flex w-full flex-col justify-center", staticStyle: { flex: "1 1 auto" } }, [t._t("preText"), t._t("documentName")], 2), t._t("postText")], 2);
21
+ }, x = [], y = /* @__PURE__ */ s(
22
+ _,
23
+ f,
24
+ x,
25
+ !1,
26
+ null,
27
+ "430dee73"
28
+ );
29
+ const h = y.exports, v = {
30
+ name: "StaticLayout",
31
+ i18nOptions: {
32
+ namespaces: "staticLayout",
33
+ messages: d
34
+ },
35
+ components: {
36
+ DocumentLogotype: () => import("./DocumentLogotype-DXYnBedV.js"),
37
+ StaticComboLayout: h,
38
+ TextEditor: i
39
+ },
40
+ mixins: [
41
+ n([
42
+ "layout",
43
+ "preText",
44
+ "documentName",
45
+ "postText",
46
+ "showLogo",
47
+ "logotype"
48
+ ])
49
+ ],
50
+ props: {
51
+ validator: {
52
+ type: Object,
53
+ default: () => ({})
54
+ },
55
+ hasHover: {
56
+ type: Boolean,
57
+ default: !1
58
+ }
59
+ },
60
+ computed: {
61
+ companyLogotype() {
62
+ var o, t;
63
+ return ((t = (o = this._document.sender) == null ? void 0 : o.company) == null ? void 0 : t.logotype) || "";
64
+ },
65
+ internalName: {
66
+ get() {
67
+ var o;
68
+ return this.documentName || `<p data-typography="title">${((o = this._document.data) == null ? void 0 : o.name) || ""}</p>`;
69
+ },
70
+ set(o) {
71
+ this.documentName = o, this.$emit("input", {
72
+ key: "data.name",
73
+ value: c(o).trim().slice(0, 255)
74
+ });
75
+ }
76
+ },
77
+ mentions() {
78
+ return () => this._document.textTemplateItems || [];
79
+ }
80
+ },
81
+ methods: {
82
+ mustacheToSpan: u,
83
+ spanToMustache: m,
84
+ interpolateString: p
85
+ }
86
+ };
87
+ var g = function() {
88
+ var t = this, e = t._self._c;
89
+ return e("div", { staticClass: "dont-break-out hyphens-auto flex w-full flex-col break-words", class: [`is-layout-${t.layout}`], staticStyle: { "word-wrap": "break-word", "word-break": "break-word" } }, [e("StaticComboLayout", { attrs: { layout: t.layout } }, [e("DocumentLogotype", { attrs: { slot: "logo", "show-logo": t.showLogo, "company-logotype": t.companyLogotype, "has-hover": t.hasHover }, on: { "update:showLogo": function(a) {
90
+ t.showLogo = a;
91
+ }, "update:show-logo": function(a) {
92
+ t.showLogo = a;
93
+ } }, slot: "logo", model: { value: t.logotype, callback: function(a) {
94
+ t.logotype = a;
95
+ }, expression: "logotype" } }), e("template", { slot: "preText" }, [e("TextEditor", { key: "preText" + t.canEdit, ref: "preTextEditor", staticClass: "no-drag header-text", attrs: { value: t.canEdit ? t.mustacheToSpan(
96
+ t.preText,
97
+ t._document.textTemplateMap,
98
+ t._document._doc
99
+ ) : t.interpolateString(t.preText, t._document._doc), mentions: t.mentions, snippets: !0, placeholder: t.$t("optional").capitalize(), static: "", unstyled: "" }, on: { input: function(a) {
100
+ t.preText = t.spanToMustache(a);
101
+ } } })], 1), e("div", { staticStyle: { "font-size": "calc(2 * var(--rem))", "font-weight": "700", margin: "calc(1 * var(--rem)) 0" }, attrs: { slot: "documentName" }, slot: "documentName" }, [t.canEdit ? e("TextEditor", { ref: "nameEditor", staticClass: "no-drag header-text", attrs: { value: t.internalName, extensions: {
102
+ bulletList: !0,
103
+ heading: [1, 2, 3],
104
+ bold: !0,
105
+ link: !0,
106
+ underline: !0,
107
+ blockquote: !0,
108
+ table: !1
109
+ }, placeholder: t.$t("name.placeholder"), unstyled: "", static: "" }, on: { input: function(a) {
110
+ t.internalName = a;
111
+ } } }) : e("div", { staticClass: "header-text", domProps: { innerHTML: t._s(t.internalName) } })], 1), e("template", { slot: "postText" }, [e("TextEditor", { key: "postText" + t.canEdit, ref: "postTextEditor", staticClass: "no-drag header-text", staticStyle: { width: "100%" }, attrs: { value: t.canEdit ? t.mustacheToSpan(
112
+ t.postText,
113
+ t._document.textTemplateMap,
114
+ t._document._doc
115
+ ) : t.interpolateString(t.postText, t._document._doc), editable: t.canEdit, mentions: t.mentions, snippets: !0, placeholder: t.$t("optional").capitalize(), static: "", unstyled: "" }, on: { input: function(a) {
116
+ t.postText = t.spanToMustache(a);
117
+ } } })], 1)], 2)], 1);
118
+ }, T = [], b = /* @__PURE__ */ s(
119
+ v,
120
+ g,
121
+ T,
122
+ !1,
123
+ null,
124
+ "709166f1"
125
+ );
126
+ const C = b.exports, w = {
127
+ name: "ContentWrapper",
128
+ components: {
129
+ StaticCombo: C,
130
+ BlockMedia: l
131
+ },
132
+ mixins: [n(["layout", "item", "baseStyle"])],
133
+ props: {
134
+ hasHover: {
135
+ type: Boolean,
136
+ default: !1
137
+ },
138
+ validator: {
139
+ type: Object,
140
+ default: () => ({})
141
+ }
142
+ },
143
+ data() {
144
+ return {
145
+ hoverIndex: null
146
+ };
147
+ },
148
+ computed: {
149
+ color() {
150
+ var o;
151
+ return ((o = this.baseStyle) == null ? void 0 : o.textColor) || this.fallbackTextColor;
152
+ },
153
+ textAlign() {
154
+ var o;
155
+ return ((o = this.baseStyle) == null ? void 0 : o.textAlign) || "left";
156
+ },
157
+ fallbackTextColor() {
158
+ return this.backgroundColor && r.readability(this.backgroundColor, "#fff") < 1.8 ? "#111111" : "#FFFFFF";
159
+ }
160
+ }
161
+ };
162
+ var S = function() {
163
+ var t = this, e = t._self._c;
164
+ return e("div", { staticClass: "content-root", class: { "has-hover": t.hasHover }, style: { color: t.color, textAlign: t.textAlign } }, [t.layout !== "center" ? e("BlockMedia", { staticClass: "content-media", attrs: { media: t.item.media } }) : t._e(), e("div", { staticClass: "content-spacing" }, [e("StaticCombo", t._g({ attrs: { "has-hover": t.hasHover, _document: t._document, _value: {
165
+ layout: t._value.layout,
166
+ preText: `${t._value.item}.value.preText`,
167
+ documentName: `${t._value.item}.value.documentName`,
168
+ postText: `${t._value.item}.value.postText`,
169
+ showLogo: `${t._value.item}.value.showLogo`,
170
+ logotype: `${t._value.item}.value.logotype`
171
+ }, validator: t.validator } }, t.$listeners))], 1)], 1);
172
+ }, $ = [], L = /* @__PURE__ */ s(
173
+ w,
174
+ S,
175
+ $,
176
+ !1,
177
+ null,
178
+ "62c6ef68"
179
+ );
180
+ const z = L.exports;
181
+ export {
182
+ z as default
183
+ };
@@ -0,0 +1,275 @@
1
+ import { m as d } from "./mapFormMixin-DlFcgwhm.js";
2
+ import { T as l } from "./ThemeColorRow-BXWnvfz-.js";
3
+ import { n as s, P as p, H as u } from "./main-CQBEuZk9.js";
4
+ const m = (i, e, t, o) => Math.atan2(i - t, e - o) * (180 / Math.PI) * -1 + 180, v = {
5
+ name: "DegreePicker",
6
+ props: {
7
+ value: {
8
+ type: Number,
9
+ required: !0
10
+ }
11
+ },
12
+ computed: {
13
+ degreesStyle() {
14
+ return { transform: `rotate(${this.value}deg)` };
15
+ }
16
+ },
17
+ methods: {
18
+ onButtonDown(i) {
19
+ let e = this.mouseDownHandler(i);
20
+ const t = (o) => {
21
+ e = this.mouseMoveHandler(o, e) || e;
22
+ };
23
+ window.addEventListener("mousemove", t), window.addEventListener(
24
+ "mouseup",
25
+ () => {
26
+ window.removeEventListener("mousemove", t);
27
+ },
28
+ { once: !0 }
29
+ );
30
+ },
31
+ mouseMoveHandler(i, { centerX: e, centerY: t }) {
32
+ const o = m(
33
+ i.clientX,
34
+ i.clientY,
35
+ e,
36
+ t
37
+ );
38
+ this.$emit("input", parseInt(o, 10));
39
+ },
40
+ mouseDownHandler(i) {
41
+ const t = i.target.getBoundingClientRect(), o = t.top + parseInt(8 - window.pageYOffset, 10), r = t.left + parseInt(8 - window.pageXOffset, 10);
42
+ return { centerY: o, centerX: r };
43
+ }
44
+ }
45
+ };
46
+ var g = function() {
47
+ var e = this, t = e._self._c;
48
+ return t("div", { staticClass: "gradient-degrees-options" }, [t("div", { staticStyle: { "pointer-events": "none", "user-select": "none", "padding-right": "0.5em", opacity: "0.75" } }, [t("div", [e._v(e._s(e.value) + "°")])]), t("div", { staticClass: "gradient-degrees", on: { mousedown: e.onButtonDown } }, [t("div", { staticClass: "gradient-degree-center", style: e.degreesStyle }, [t("div", { staticClass: "gradient-degree-pointer" })])])]);
49
+ }, f = [], _ = /* @__PURE__ */ s(
50
+ v,
51
+ g,
52
+ f,
53
+ !1,
54
+ null,
55
+ "9d7cb204"
56
+ );
57
+ const y = _.exports, h = {
58
+ name: "GradientPicker",
59
+ i18nOptions: {
60
+ namespaces: "gradientPicker",
61
+ messages: {
62
+ en: {
63
+ startColor: "Start color",
64
+ stopColor: "Stop color",
65
+ rotation: "Rotation"
66
+ },
67
+ sv: {
68
+ startColor: "Startfärg",
69
+ stopColor: "Stoppfärg",
70
+ rotation: "Rotation"
71
+ }
72
+ }
73
+ },
74
+ components: {
75
+ ThemeColorRow: l,
76
+ DegreePicker: y
77
+ },
78
+ props: {
79
+ value: {
80
+ type: Object,
81
+ required: !0
82
+ }
83
+ },
84
+ data() {
85
+ return {
86
+ set: p,
87
+ defaultValue: {
88
+ type: "linear",
89
+ degree: 0,
90
+ colors: [
91
+ { percent: 0, color: "#000000" },
92
+ { percent: 100, color: "#0095FF" }
93
+ ]
94
+ }
95
+ };
96
+ },
97
+ computed: {
98
+ internalValue: {
99
+ get() {
100
+ return { ...this.defaultValue, ...this.value };
101
+ },
102
+ set(i) {
103
+ this.$emit("input", i);
104
+ }
105
+ }
106
+ },
107
+ methods: {
108
+ updateData(i, e) {
109
+ let t = e;
110
+ if (i === "colors") {
111
+ const { i: o, color: r, percent: a } = e || {};
112
+ t = this.internalValue.colors.map(
113
+ (n, c) => c === o ? { color: r, percent: a } : n
114
+ );
115
+ }
116
+ this.internalValue = { ...this.internalValue, [i]: t };
117
+ }
118
+ }
119
+ };
120
+ var C = function() {
121
+ var e = this, t = e._self._c;
122
+ return t("div", [t("ThemeColorRow", { staticClass: "d-option-title d-option", attrs: { value: e.internalValue.colors[0].color }, on: { change: function(o) {
123
+ return e.updateData("colors", { i: 0, percent: 0, color: o });
124
+ } } }, [e._v(" " + e._s(e.$t("startColor")) + " ")]), t("ThemeColorRow", { staticClass: "d-option-title d-option", attrs: { value: e.internalValue.colors[1].color }, on: { change: function(o) {
125
+ return e.updateData("colors", { i: 1, percent: 100, color: o });
126
+ } } }, [e._v(" " + e._s(e.$t("stopColor")) + " ")]), t("div", { staticClass: "d-option flex w-full items-center" }, [t("div", { staticClass: "d-option-title", staticStyle: { flex: "1 1 auto" } }, [e._v(" " + e._s(e.$t("rotation")) + " ")]), t("DegreePicker", { staticStyle: { "padding-right": "4px" }, attrs: { value: e.internalValue.degree }, on: { input: function(o) {
127
+ return e.updateData("degree", o);
128
+ } } })], 1)], 1);
129
+ }, b = [], w = /* @__PURE__ */ s(
130
+ h,
131
+ C,
132
+ b,
133
+ !1,
134
+ null,
135
+ "8dae9e23"
136
+ );
137
+ const $ = w.exports, x = {
138
+ image: () => import("./ImageSelectModal-DnvPZzXx.js"),
139
+ video: () => import("./VideoSelectModal-DY3N4JiS.js")
140
+ }, S = {
141
+ name: "CoverBlockSettings",
142
+ i18nOptions: {
143
+ namespaces: "coverBlockSettings",
144
+ messages: {
145
+ en: {
146
+ colorLabel: "Color",
147
+ overlay: {
148
+ title: "Overlay",
149
+ colorLabel: "Color",
150
+ opacityLabel: "Opacity"
151
+ }
152
+ },
153
+ sv: {
154
+ colorLabel: "Färg",
155
+ overlay: {
156
+ title: "Överlägg",
157
+ colorLabel: "Färg",
158
+ opacityLabel: "Opacitet"
159
+ }
160
+ }
161
+ }
162
+ },
163
+ components: {
164
+ ThemeColorRow: l,
165
+ GradientPicker: $
166
+ },
167
+ mixins: [
168
+ d(
169
+ [
170
+ "type",
171
+ "video",
172
+ "resourceUrl",
173
+ "filter",
174
+ "blur",
175
+ "position",
176
+ "overlay",
177
+ "overlayColor",
178
+ "gradient",
179
+ "backgroundColor"
180
+ ],
181
+ { useEmit: !1 }
182
+ )
183
+ ],
184
+ data() {
185
+ return {
186
+ getUnsplashResized: u
187
+ };
188
+ },
189
+ methods: {
190
+ toggleOverlay(i) {
191
+ i && !this.overlayColor ? (this.overlayColor = "hsla(205, 100%, 50%, 0.5)", this.overlay = !0) : this.overlay = i;
192
+ },
193
+ setType(i) {
194
+ i === "color" && !this.backgroundColor ? this.backgroundColor = "hsl(134, 74%, 39%)" : i === "video" && !this.video ? this.video = {
195
+ provider: "pexels",
196
+ id: "3214448",
197
+ thumbnail: "https://images.pexels.com/videos/3214448/free-video-3214448.jpg?fit=crop&w=1200&h=630&auto=compress&cs=tinysrgb",
198
+ url: "https://player.vimeo.com/external/372567192.hd.mp4?s=c186273e04cc5015efecd863d8256eb99bc034fd&profile_id=172&oauth2_token_id=57447761"
199
+ } : i === "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)) : i === "gradient" && !this.gradient && (this.gradient = {
200
+ type: "linear",
201
+ degree: 45,
202
+ colors: [
203
+ { color: "hsla(324.71,100%,50%,1)", percent: 0 },
204
+ { color: "hsla(209.41,85.18%,40.65%,1)", percent: 100 }
205
+ ]
206
+ }), this.type = i;
207
+ },
208
+ openResourceModal(i) {
209
+ this.$modal.show(
210
+ x[i],
211
+ {},
212
+ {},
213
+ {
214
+ input: (e) => {
215
+ i === "image" ? this.resourceUrl = e : i === "video" && (this.video = e);
216
+ }
217
+ }
218
+ );
219
+ }
220
+ }
221
+ };
222
+ var k = function() {
223
+ var e = this, t = e._self._c;
224
+ return t("div", { staticClass: "d-root" }, [t("div", { staticClass: "d-option", staticStyle: { "border-bottom": "none" } }, [t("div", { staticClass: "d-option-title" }, [e._v(" " + e._s(e.$t("_common:background").capitalize()) + " ")]), t("div", { staticClass: "flex w-full", staticStyle: { "flex-wrap": "wrap", "padding-top": "0.25em" } }, e._l([
225
+ { label: e.$t("_common:image"), value: "image" },
226
+ { label: e.$t("_common:color"), value: "color" },
227
+ { label: e.$t("_common:gradient"), value: "gradient" },
228
+ { label: e.$t("_common:video"), value: "video" }
229
+ ], function({ label: o, value: r }, a) {
230
+ return t("CButton", { key: o + a, staticStyle: { margin: "0 3px 3px 0", padding: "0 0.5em", height: "2em", "font-size": "15px", "border-radius": "4px" }, attrs: { type: e.type === r ? "secondary" : "none", pattern: e.type === r ? "primary" : "secondary", size: "normal" }, on: { click: function(n) {
231
+ return e.setType(r);
232
+ } } }, [e._v(" " + e._s(o.capitalize()) + " ")]);
233
+ }), 1)]), e.type === "image" ? [t("div", { staticClass: "d-option-button-image", style: { backgroundImage: `url(${e.resourceUrl})` }, on: { click: function(o) {
234
+ return e.openResourceModal(e.type);
235
+ } } }), e.resourceUrl ? t("div", { staticClass: "d-option" }, [t("div", { staticClass: "d-option-title" }, [e._v(" " + e._s(e.$t("_common:filter").capitalize()) + " ")]), t("div", { staticStyle: { display: "flex", "flex-direction": "row", "flex-wrap": "wrap", "padding-top": "0.25em" } }, e._l([
236
+ "",
237
+ "sepia(30%) brightness(110%) contrast(110%) grayscale(100%)",
238
+ "brightness(110%) contrast(90%) saturate(150%)",
239
+ "sepia(50%) contrast(140%)",
240
+ "sepia(25%) brightness(95%) contrast(95%) saturate(150%)",
241
+ "blur(0px) sepia(15%) saturate(130%) hue-rotate(-30deg)"
242
+ ], function(o, r) {
243
+ return t("div", { key: r, staticClass: "bg-filter", class: { "is-active": e.filter === o }, on: { click: function(a) {
244
+ e.filter = o;
245
+ } } }, [t("div", { staticClass: "bg-filter-preview", style: {
246
+ filter: o,
247
+ backgroundImage: `url(${e.getUnsplashResized(e.resourceUrl, {
248
+ w: 200
249
+ })})`
250
+ } })]);
251
+ }), 0)]) : e._e(), t("div", { staticClass: "d-option", staticStyle: { "padding-bottom": "0.5em" } }, [t("div", { staticClass: "d-option-title" }, [t("div", { staticStyle: { flex: "1 1 auto" } }, [e._v(" " + e._s(e.$t("_common:position").capitalize()) + " ")]), t("CSlider", { staticStyle: { width: "80px", margin: "0" }, attrs: { value: e.position || 0, type: "secondary", size: "small", rounded: "" }, on: { input: function(o) {
252
+ e.position = o;
253
+ } } })], 1)])] : e._e(), e.type === "video" ? [t("div", { staticClass: "d-option-button-image", style: { backgroundImage: `url(${e.video.thumbnail})` }, on: { click: function(o) {
254
+ return e.openResourceModal(e.type);
255
+ } } })] : e.type === "color" ? t("div", { staticClass: "d-option" }, [t("ThemeColorRow", { staticClass: "d-option-title", attrs: { value: e.backgroundColor || "" }, on: { change: function(o) {
256
+ e.backgroundColor = o;
257
+ } } }, [e._v(" " + e._s(e.$t("colorLabel")) + " ")])], 1) : e.type === "gradient" ? t("GradientPicker", { attrs: { value: e.gradient || {} }, on: { input: function(o) {
258
+ e.gradient = o;
259
+ } } }) : e._e(), ["image", "video"].includes(e.type) ? t("div", { staticClass: "d-option", staticStyle: { "padding-bottom": "0.5em" } }, [t("div", { staticClass: "d-option-title" }, [t("div", { staticStyle: { flex: "1 1 auto" } }, [e._v(" " + e._s(e.$t("_common:blur").capitalize()) + " ")]), t("CSlider", { staticStyle: { width: "80px", margin: "0" }, attrs: { value: e.blur || 0, max: 30, type: "secondary", size: "small", rounded: "" }, on: { input: function(o) {
260
+ e.blur = o;
261
+ } } })], 1)]) : e._e(), ["image", "video"].includes(e.type) ? t("div", { staticClass: "d-option" }, [t("div", { staticClass: "d-option-title" }, [t("div", { staticStyle: { flex: "1 1 auto" } }, [e._v(e._s(e.$t("overlay.title")))]), t("CSwitch", { staticStyle: { "margin-right": "0" }, attrs: { value: !!e.overlay, size: "small", type: "secondary" }, on: { input: e.toggleOverlay } })], 1), e.overlay ? t("div", { staticClass: "d-option-row", staticStyle: { "padding-top": "1em" } }, [t("ThemeColorRow", { attrs: { value: e.overlayColor || "", placement: "top-end" }, on: { change: function(o) {
262
+ e.overlayColor = o;
263
+ } } }, [e._v(" " + e._s(e.$t("overlay.colorLabel")) + " ")])], 1) : e._e()]) : e._e()], 2);
264
+ }, R = [], D = /* @__PURE__ */ s(
265
+ S,
266
+ k,
267
+ R,
268
+ !1,
269
+ null,
270
+ "ac3e3e8f"
271
+ );
272
+ const B = D.exports;
273
+ export {
274
+ B as default
275
+ };
@@ -0,0 +1,36 @@
1
+ import r from "./AnswerModal-CsA2pl2P.js";
2
+ import { n as o } from "./main-CQBEuZk9.js";
3
+ const t = {
4
+ components: {
5
+ AnswerModal: r
6
+ },
7
+ props: {
8
+ document: {
9
+ type: Object,
10
+ required: !0
11
+ },
12
+ answerType: {
13
+ type: String,
14
+ required: !0
15
+ },
16
+ closeFunc: {
17
+ type: Function,
18
+ default: null
19
+ }
20
+ }
21
+ };
22
+ var s = function() {
23
+ var e = this, n = e._self._c;
24
+ return n("AnswerModal", { attrs: { mode: e.answerType, _document: e.document }, on: { close: e.closeFunc } });
25
+ }, c = [], a = /* @__PURE__ */ o(
26
+ t,
27
+ s,
28
+ c,
29
+ !1,
30
+ null,
31
+ null
32
+ );
33
+ const m = a.exports;
34
+ export {
35
+ m as default
36
+ };