@cling-se/widget 0.14.3 → 0.14.4

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 (134) hide show
  1. package/.eslintrc.cjs +4 -4
  2. package/README.md +40 -40
  3. package/package.json +1 -1
  4. package/tsconfig.json +26 -26
  5. package/tsconfig.node.json +10 -10
  6. package/tsconfig.paths.json +17 -17
  7. package/vite.config.ts +61 -61
  8. package/dist/AddClientCallout-DKH-LP5B.js +0 -46
  9. package/dist/AnswerModal-BCbq8wc4.js +0 -3869
  10. package/dist/AttachmentItem-60CSZnkF.js +0 -78
  11. package/dist/BaseDatePicker-Cl8SnC1k.js +0 -3183
  12. package/dist/BaseUpload-D4FCjlhL.js +0 -1977
  13. package/dist/BlockMedia-CqkwdGnE.js +0 -76
  14. package/dist/CCallout-BTBgU8f-.js +0 -59
  15. package/dist/CCurrencyDropdown-CL32Mo-Y.js +0 -246
  16. package/dist/CDropdownItem-DlWtQwO6.js +0 -538
  17. package/dist/CField.vue_vue_type_style_index_0_lang-l0sNRNKZ.js +0 -1
  18. package/dist/CFormField-BxJv-nUO.js +0 -241
  19. package/dist/CPhoneFormat-CJ9kndtJ.js +0 -62
  20. package/dist/CPriceInput-BpXI5X2j.js +0 -112
  21. package/dist/CTabs.vue_vue_type_style_index_0_scoped_e02a6440_lang-l0sNRNKZ.js +0 -1
  22. package/dist/ClientAutocomplete-D9Dj9iBW.js +0 -78
  23. package/dist/ClientModal-JOt8NGcR.js +0 -625
  24. package/dist/ColorPicker-uPKD-Gvm.js +0 -2879
  25. package/dist/CompanyModal-7bG0iIRd.js +0 -141
  26. package/dist/ContentWrapper-B2nyZHL4.js +0 -183
  27. package/dist/CoverBlockSettings-C1O_FAde.js +0 -275
  28. package/dist/DocAnswer-B9G-y4Px.js +0 -36
  29. package/dist/DocDetails-DYHxKChO.js +0 -246
  30. package/dist/DocForm-BktEXjML.js +0 -7273
  31. package/dist/DocFormSend-DM6QgUOj.js +0 -143
  32. package/dist/DocLinks-BIGwfB3H.js +0 -38
  33. package/dist/DocModalBase-D5GdwTI7.js +0 -28
  34. package/dist/DocPrint-HqbaIGms.js +0 -240
  35. package/dist/DocReceipt-WXo6vWyW.js +0 -210
  36. package/dist/DocSendReminder-C8dNEpLg.js +0 -137
  37. package/dist/DocTextEditor-BfOZFDTP.js +0 -17177
  38. package/dist/DocTimeline-CitwS9px.js +0 -481
  39. package/dist/DocumentClient-CQ_z8ajY.js +0 -136
  40. package/dist/DocumentLayout-BA7mFfZh.js +0 -4909
  41. package/dist/DocumentLogotype-woc_hfll.js +0 -87
  42. package/dist/DocumentVoided-DC4FzpxG.js +0 -25
  43. package/dist/EmbedInput-CheqYcNr.js +0 -113
  44. package/dist/EmbedSettings-YcwM8hJw.js +0 -72
  45. package/dist/ErrorCallout-6pCYcx00.js +0 -28
  46. package/dist/FilePreviewModal-T8AiphqO.js +0 -81
  47. package/dist/Flag-Ddm6a4Il.js +0 -114
  48. package/dist/HeaderSettings-DHdZweJH.js +0 -392
  49. package/dist/ImageSelectModal-CAoBhnI8.js +0 -84
  50. package/dist/ImageUploadWrapper-CNv59Lhh.js +0 -1604
  51. package/dist/Index-B6S9U4Z-.js +0 -26
  52. package/dist/Index-BHX0D5fW.js +0 -559
  53. package/dist/Index-BL_7m5Ca.js +0 -70
  54. package/dist/Index-BXMXEUfo.js +0 -223
  55. package/dist/Index-BhVBvMu6.js +0 -32
  56. package/dist/Index-Bl_SNW80.js +0 -25
  57. package/dist/Index-BsguntKl.js +0 -21
  58. package/dist/Index-CGYjPfsf.js +0 -2402
  59. package/dist/Index-CKrGb3of.js +0 -61
  60. package/dist/Index-CMNrQo5a.js +0 -140
  61. package/dist/Index-CU50Al5c.js +0 -642
  62. package/dist/Index-CdqrrZxd.js +0 -77
  63. package/dist/Index-CfnL9dAw.js +0 -58
  64. package/dist/Index-CuW0MYrT.js +0 -171
  65. package/dist/Index-D-z8JSn6.js +0 -154
  66. package/dist/Index-D8giJ_bs.js +0 -84
  67. package/dist/Index-DDvfqy_h.js +0 -24
  68. package/dist/Index-DQDalqZ-.js +0 -107
  69. package/dist/Index-DTIPKKkV.js +0 -150
  70. package/dist/Index-DWxzUBff.js +0 -754
  71. package/dist/Index-DaNGeDQw.js +0 -144
  72. package/dist/Index-DfLU_AyN.js +0 -49
  73. package/dist/Index-DkVav_I7.js +0 -25
  74. package/dist/Index-Dxp8QAtB.js +0 -57
  75. package/dist/Index-DzjxFkcv.js +0 -52
  76. package/dist/Index-EwUJJWaB.js +0 -69
  77. package/dist/Index-I60qAqLl.js +0 -31
  78. package/dist/Index-LfF-7lQK.js +0 -292
  79. package/dist/Index-P0_dyc2V.js +0 -45
  80. package/dist/Index-RQMPSeHw.js +0 -98
  81. package/dist/Index-oipNLl3Y.js +0 -46
  82. package/dist/Index-sJq2Iyvt.js +0 -62
  83. package/dist/Index-uubi3NHX.js +0 -33
  84. package/dist/Index-vNj2kYZT.js +0 -55
  85. package/dist/InputToggleRow-B2pWvVyx.js +0 -57
  86. package/dist/ManualPopover-BI_Sf1zG.js +0 -54
  87. package/dist/MediaWrapper-eFpWxv3n.js +0 -23
  88. package/dist/NotBindingText-DA5NpePz.js +0 -32
  89. package/dist/PackageGroup-DOSijBdN.js +0 -699
  90. package/dist/PdfTerms-Q5YuVtrJ.js +0 -36
  91. package/dist/PdfViewer-zcWl8XZT.js +0 -374
  92. package/dist/PlainHtml-BmA83UAm.js +0 -20
  93. package/dist/PriceHeader-C14L5zgG.js +0 -339
  94. package/dist/SearchApi-CGT7-jVf.js +0 -161
  95. package/dist/Setup-RJQvZlDO.js +0 -50
  96. package/dist/SmartList-YosKRPVn.js +0 -83
  97. package/dist/TermsSettings-C5JTv7rT.js +0 -102
  98. package/dist/ThemeColorRow-D-C_tm2f.js +0 -63
  99. package/dist/ToggleBinding-KEVHHvKf.js +0 -38
  100. package/dist/UploadModal-DOYoWELI.js +0 -95
  101. package/dist/VideoPlayerInput-Dxb6CNk-.js +0 -93
  102. package/dist/VideoPlayerSettings-DsVN4Ix-.js +0 -61
  103. package/dist/VideoSelectModal-BpfzNx61.js +0 -100
  104. package/dist/anime.es-BrPTThYb.js +0 -858
  105. package/dist/answerDocumentMixin-BJMGrfUs.js +0 -51
  106. package/dist/color-TdtKxwVa.js +0 -19
  107. package/dist/debounce-BN83gOVd.js +0 -84
  108. package/dist/dom-CJxkno7i.js +0 -91
  109. package/dist/favicon.ico +0 -0
  110. package/dist/focusDrawerMixin-CawyQaGq.js +0 -22
  111. package/dist/formComponentsInstall-jcnyQ1zw.js +0 -2494
  112. package/dist/formDrawerState-BdNohvZH.js +0 -20
  113. package/dist/formValidationMixin-DOwgebZk.js +0 -49
  114. package/dist/i18nMessages-Chz_lxGG.js +0 -17
  115. package/dist/index-BBJIOkm_.js +0 -347
  116. package/dist/index-BNq9YCWc.js +0 -166
  117. package/dist/index-BdhbkLLU.js +0 -81
  118. package/dist/index-COf8F6CL.js +0 -3916
  119. package/dist/index-D0WvZHX_.js +0 -102
  120. package/dist/index-DTzZP4yq.js +0 -492
  121. package/dist/index.es.js +0 -35
  122. package/dist/index.umd.js +0 -3148
  123. package/dist/main-DE5THsiR.js +0 -56739
  124. package/dist/mapFormMixin-y2txvLw9.js +0 -72
  125. package/dist/omit-BrsWQAtU.js +0 -31
  126. package/dist/publicSenderState-BYsq95Vt.js +0 -21
  127. package/dist/splitpanes-BHUVsCZF.js +0 -382
  128. package/dist/style.css +0 -4
  129. package/dist/throttle-C2srA2wa.js +0 -18
  130. package/dist/tinycolor-SjV_ROuP.js +0 -633
  131. package/dist/tippy.esm-Dj7DQppr.js +0 -1799
  132. package/dist/utils-16HMuRfY.js +0 -108
  133. package/dist/vuedraggable.umd-Cd1g2Hr7.js +0 -3161
  134. package/dist/vuex.esm-DKGl8mcw.js +0 -467
@@ -1,141 +0,0 @@
1
- import { w as r } from "./CDropdownItem-DlWtQwO6.js";
2
- import { E as l, g as s, n as c } from "./main-DE5THsiR.js";
3
- import { v as o } from "./index-DTzZP4yq.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-BYsq95Vt.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
- "20ecbb22"
137
- );
138
- const S = C.exports;
139
- export {
140
- S as default
141
- };
@@ -1,183 +0,0 @@
1
- import { m as n } from "./mapFormMixin-y2txvLw9.js";
2
- import { B as l } from "./BlockMedia-CqkwdGnE.js";
3
- import { t as r } from "./tinycolor-SjV_ROuP.js";
4
- import { T as i } from "./DocTextEditor-BfOZFDTP.js";
5
- import { n as s, ab as c, z as u, B as m, A as p } from "./main-DE5THsiR.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
- "8e41c57b"
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-woc_hfll.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
- "5e1fe7d6"
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
- "3dfe0998"
179
- );
180
- const z = L.exports;
181
- export {
182
- z as default
183
- };
@@ -1,275 +0,0 @@
1
- import { m as d } from "./mapFormMixin-y2txvLw9.js";
2
- import { T as l } from "./ThemeColorRow-D-C_tm2f.js";
3
- import { n as s, P as p, H as u } from "./main-DE5THsiR.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
- _,
53
- !1,
54
- null,
55
- "0c48c700"
56
- );
57
- const y = f.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
- "e22a6b42"
136
- );
137
- const $ = w.exports, x = {
138
- image: () => import("./ImageSelectModal-CAoBhnI8.js"),
139
- video: () => import("./VideoSelectModal-BpfzNx61.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
- "30a9943d"
271
- );
272
- const B = D.exports;
273
- export {
274
- B as default
275
- };
@@ -1,36 +0,0 @@
1
- import r from "./AnswerModal-BCbq8wc4.js";
2
- import { n as o } from "./main-DE5THsiR.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
- };