@cling-se/widget 0.14.2 → 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-BP2ip0A4.js +0 -46
  9. package/dist/AnswerModal-C8i3ldB_.js +0 -3869
  10. package/dist/AttachmentItem-BrvrAMae.js +0 -78
  11. package/dist/BaseDatePicker-BSkAllLg.js +0 -3183
  12. package/dist/BaseUpload-J2v3G0-q.js +0 -1977
  13. package/dist/BlockMedia-CAgKbN_k.js +0 -76
  14. package/dist/CCallout-D5Nk5DgN.js +0 -59
  15. package/dist/CCurrencyDropdown-CGYQfYSD.js +0 -246
  16. package/dist/CDropdownItem-DGES8E6l.js +0 -538
  17. package/dist/CField.vue_vue_type_style_index_0_lang-l0sNRNKZ.js +0 -1
  18. package/dist/CFormField-CE4rV3cr.js +0 -241
  19. package/dist/CPhoneFormat-DXPrTit9.js +0 -62
  20. package/dist/CPriceInput-CYsf1n6T.js +0 -112
  21. package/dist/CTabs.vue_vue_type_style_index_0_scoped_e02a6440_lang-l0sNRNKZ.js +0 -1
  22. package/dist/ClientAutocomplete-DPgOfPg1.js +0 -78
  23. package/dist/ClientModal-Dznh8Vvn.js +0 -625
  24. package/dist/ColorPicker-CWQEE8VR.js +0 -2879
  25. package/dist/CompanyModal-CeZ3GgLu.js +0 -141
  26. package/dist/ContentWrapper-DW7VHTdA.js +0 -183
  27. package/dist/CoverBlockSettings-DNSdXFgF.js +0 -275
  28. package/dist/DocAnswer-CPttkKAJ.js +0 -36
  29. package/dist/DocDetails-BCwWW_kM.js +0 -246
  30. package/dist/DocForm-BPjC08Ic.js +0 -7273
  31. package/dist/DocFormSend-BaC8IJCu.js +0 -143
  32. package/dist/DocLinks-DN-S8MY_.js +0 -38
  33. package/dist/DocModalBase-bFJp0T2Y.js +0 -28
  34. package/dist/DocPrint-Ci7Jyh-C.js +0 -240
  35. package/dist/DocReceipt-BYlXr6eS.js +0 -210
  36. package/dist/DocSendReminder-DFx4934a.js +0 -137
  37. package/dist/DocTextEditor-idQMnlIF.js +0 -17177
  38. package/dist/DocTimeline-ZmGSVRUB.js +0 -481
  39. package/dist/DocumentClient-DTRlyvLO.js +0 -136
  40. package/dist/DocumentLayout-BJAyNjNa.js +0 -4909
  41. package/dist/DocumentLogotype-pDJRc6Hj.js +0 -87
  42. package/dist/DocumentVoided-DfKewfe4.js +0 -25
  43. package/dist/EmbedInput-7hLNsnEV.js +0 -113
  44. package/dist/EmbedSettings-CpL24RhA.js +0 -72
  45. package/dist/ErrorCallout-CdJCe67q.js +0 -28
  46. package/dist/FilePreviewModal-B7qT3I7F.js +0 -81
  47. package/dist/Flag-DwW19zju.js +0 -114
  48. package/dist/HeaderSettings-C8SuuAwv.js +0 -392
  49. package/dist/ImageSelectModal-CAOh3YHc.js +0 -84
  50. package/dist/ImageUploadWrapper-21yldsj9.js +0 -1604
  51. package/dist/Index-B0BgYtWI.js +0 -150
  52. package/dist/Index-BC1AhlQ9.js +0 -98
  53. package/dist/Index-BZi6r2UN.js +0 -144
  54. package/dist/Index-BsD09y_2.js +0 -84
  55. package/dist/Index-Bu9SdKLP.js +0 -31
  56. package/dist/Index-BvsqZh2A.js +0 -26
  57. package/dist/Index-Bz4qd9uO.js +0 -55
  58. package/dist/Index-C--GiPc1.js +0 -171
  59. package/dist/Index-CC7qF0br.js +0 -77
  60. package/dist/Index-CGxOvTF4.js +0 -2402
  61. package/dist/Index-CI7_ktvb.js +0 -70
  62. package/dist/Index-COJZmxkX.js +0 -32
  63. package/dist/Index-CObEQ6G-.js +0 -140
  64. package/dist/Index-CP2bsXd-.js +0 -52
  65. package/dist/Index-CSvZBLnp.js +0 -49
  66. package/dist/Index-Ci-hGBbC.js +0 -33
  67. package/dist/Index-Ckzq1cEJ.js +0 -69
  68. package/dist/Index-CoIh5y2F.js +0 -62
  69. package/dist/Index-Couda8BX.js +0 -21
  70. package/dist/Index-CvXt3dm6.js +0 -292
  71. package/dist/Index-D95MNzAZ.js +0 -58
  72. package/dist/Index-DB5EG4EI.js +0 -223
  73. package/dist/Index-DDvRihXA.js +0 -24
  74. package/dist/Index-DIAntwBs.js +0 -61
  75. package/dist/Index-DUdJNcDT.js +0 -25
  76. package/dist/Index-DfANvO5d.js +0 -154
  77. package/dist/Index-Ds1Jv5Mr.js +0 -559
  78. package/dist/Index-FIWsRGmh.js +0 -57
  79. package/dist/Index-M3b7S4YX.js +0 -25
  80. package/dist/Index-NoN1_539.js +0 -642
  81. package/dist/Index-UGFm4yxI.js +0 -107
  82. package/dist/Index-aCBe0dXx.js +0 -754
  83. package/dist/Index-kJFtpJEP.js +0 -46
  84. package/dist/Index-rQKoLISX.js +0 -45
  85. package/dist/InputToggleRow-Ct8rvqAF.js +0 -57
  86. package/dist/ManualPopover-B0vp9ydC.js +0 -54
  87. package/dist/MediaWrapper-hmofOPLv.js +0 -23
  88. package/dist/NotBindingText-COpJPwHe.js +0 -32
  89. package/dist/PackageGroup-BdtslJL-.js +0 -699
  90. package/dist/PdfTerms-EDStBDhn.js +0 -36
  91. package/dist/PdfViewer-D1_Roqu2.js +0 -374
  92. package/dist/PlainHtml-C3JPvt4o.js +0 -20
  93. package/dist/PriceHeader-BdfozyN8.js +0 -339
  94. package/dist/SearchApi-CQtYh98a.js +0 -161
  95. package/dist/Setup-DHHMT6xu.js +0 -50
  96. package/dist/SmartList-BXeRj5NC.js +0 -83
  97. package/dist/TermsSettings-D1tDAu-r.js +0 -102
  98. package/dist/ThemeColorRow-HUN-QPY_.js +0 -63
  99. package/dist/ToggleBinding-CRoVM6Nw.js +0 -38
  100. package/dist/UploadModal-BD3pIiPT.js +0 -95
  101. package/dist/VideoPlayerInput-QFJfPoCf.js +0 -93
  102. package/dist/VideoPlayerSettings-CGq--niu.js +0 -61
  103. package/dist/VideoSelectModal-B61rBqdH.js +0 -100
  104. package/dist/anime.es-BrPTThYb.js +0 -858
  105. package/dist/answerDocumentMixin-DiONfM1s.js +0 -51
  106. package/dist/color-TdtKxwVa.js +0 -19
  107. package/dist/debounce-BIchuVwa.js +0 -84
  108. package/dist/dom-CJxkno7i.js +0 -91
  109. package/dist/favicon.ico +0 -0
  110. package/dist/focusDrawerMixin-CzvgKsOZ.js +0 -22
  111. package/dist/formComponentsInstall-EQLbqYqI.js +0 -2494
  112. package/dist/formDrawerState-CiKGHdNH.js +0 -20
  113. package/dist/formValidationMixin-5BVcxu38.js +0 -49
  114. package/dist/i18nMessages-Chz_lxGG.js +0 -17
  115. package/dist/index-BYTRIZIz.js +0 -81
  116. package/dist/index-Be__C37A.js +0 -102
  117. package/dist/index-CUydiL8B.js +0 -3919
  118. package/dist/index-DH6SCEKQ.js +0 -166
  119. package/dist/index-gtVGRKIX.js +0 -347
  120. package/dist/index-tNIrTnCx.js +0 -492
  121. package/dist/index.es.js +0 -35
  122. package/dist/index.umd.js +0 -3148
  123. package/dist/main-Bp2qcma0.js +0 -56697
  124. package/dist/mapFormMixin-Ce3_WIKw.js +0 -72
  125. package/dist/omit-21u5fFMx.js +0 -31
  126. package/dist/publicSenderState-BcN9kJJr.js +0 -21
  127. package/dist/splitpanes-BHUVsCZF.js +0 -382
  128. package/dist/style.css +0 -4
  129. package/dist/throttle-CfPxqhW_.js +0 -18
  130. package/dist/tinycolor-DNK6zGoq.js +0 -633
  131. package/dist/tippy.esm-B5TcTBWX.js +0 -1799
  132. package/dist/utils-GzwJPAEe.js +0 -108
  133. package/dist/vuedraggable.umd-2pmrPYml.js +0 -3161
  134. package/dist/vuex.esm-DKGl8mcw.js +0 -467
@@ -1,150 +0,0 @@
1
- import { m as c } from "./mapFormMixin-Ce3_WIKw.js";
2
- import l from "./FilePreviewModal-B7qT3I7F.js";
3
- import { n as m, t as p } from "./main-Bp2qcma0.js";
4
- const d = {
5
- name: "FilePreviewWrapper",
6
- components: {
7
- FilePreviewModal: l
8
- },
9
- props: {
10
- list: {
11
- type: Array,
12
- default: () => [],
13
- validator: (t) => t.length ? !(!t[0].hasOwnProperty("url") || !t[0].hasOwnProperty("name") || !t[0].hasOwnProperty("mime")) : !0
14
- }
15
- },
16
- computed: {
17
- fileList() {
18
- return this.list.reduce(
19
- (t, e) => this.isImage(e.mime) || this.isPdf(e.mime) ? [...t, e] : t,
20
- []
21
- );
22
- }
23
- },
24
- methods: {
25
- isImage(t) {
26
- const e = t.toLowerCase(t);
27
- return /image\/(gif|jpg|jpeg|png|bmp|svg|svg\+xml|tiff)$/.test(e);
28
- },
29
- isPdf(t) {
30
- return t === "application/pdf";
31
- },
32
- FilePreviewModal(t) {
33
- this.$modal.show(
34
- l,
35
- {
36
- index: this.fileList.indexOf(this.list[t]),
37
- // Translate src index to img list index
38
- list: this.fileList
39
- },
40
- {
41
- adaptive: !0,
42
- height: "100%",
43
- width: "100%",
44
- classes: "",
45
- // Don't remove. In place to not apply default modal class
46
- transition: ""
47
- }
48
- );
49
- }
50
- },
51
- render() {
52
- return this.$scopedSlots.default({
53
- openModal: (t) => this.FilePreviewModal(t),
54
- isImageOrPdf: (t) => this.isImage(t) || this.isPdf(t)
55
- });
56
- }
57
- }, u = null, f = null;
58
- var h = /* @__PURE__ */ m(
59
- d,
60
- u,
61
- f,
62
- !1,
63
- null,
64
- null
65
- );
66
- const w = h.exports, v = {
67
- name: "AttachmentList",
68
- components: {
69
- FilePreviewWrapper: w,
70
- BaseUpload: () => import("./BaseUpload-J2v3G0-q.js"),
71
- AttachmentItem: () => import("./AttachmentItem-BrvrAMae.js")
72
- },
73
- mixins: [c(["attachments"])],
74
- data() {
75
- return {
76
- hoverIndex: null,
77
- newFiles: [],
78
- maxFileSize: 1e3 * 1e3 * 30
79
- // 30 MB
80
- };
81
- },
82
- computed: {
83
- cAttachments() {
84
- return [
85
- ...this.attachments,
86
- ...this.newFiles.map(
87
- ({ displayName: t, type: e, url: s, progress: n }) => ({
88
- name: t,
89
- mime: e,
90
- url: s,
91
- progress: parseInt(n, 10)
92
- })
93
- )
94
- ];
95
- },
96
- showRecentModal() {
97
- return !this.viewSettings.isPublicForm;
98
- }
99
- },
100
- methods: {
101
- immutable: p,
102
- async onUploadSuccess(t) {
103
- const { id: e, displayName: s, url: n, mime: i } = t.response;
104
- if (!e)
105
- throw new Error("Could not read id from uploaded file");
106
- this.attachments = [
107
- ...this.attachments,
108
- {
109
- fileId: e,
110
- name: s,
111
- mime: i,
112
- url: n
113
- }
114
- ], this.$refs.uploader.remove(t);
115
- },
116
- remove(t) {
117
- if (!this.attachments[t])
118
- return;
119
- const e = this.attachments.slice();
120
- e.splice(t, 1), this.attachments = e;
121
- }
122
- }
123
- };
124
- var g = function() {
125
- var e = this, s = e._self._c;
126
- return s("div", { staticClass: "font-inter" }, [s("FilePreviewWrapper", { attrs: { list: e.cAttachments }, scopedSlots: e._u([{ key: "default", fn: function({ openModal: n, isImageOrPdf: i }) {
127
- return [s("div", e._l(e.cAttachments, function(o, r) {
128
- return s("AttachmentItem", { key: r, attrs: { "is-image-or-pdf": i(o.mime), attachment: o, "can-edit": e.canEdit, "upload-progress": o.progress }, on: { click: function(a) {
129
- i(o.mime) && n(r);
130
- }, remove: function(a) {
131
- return e.remove(r);
132
- }, input: function(a) {
133
- e.attachments = e.immutable(e.attachments).set(a, r);
134
- } } });
135
- }), 1)];
136
- } }]) }), e.canEdit ? [s("BaseUpload", { ref: "uploader", attrs: { "recent-modal": e.showRecentModal, "autostart-upload": !0, "max-size": e.maxFileSize, extensions: "png,gif,jpg,jpeg,svg,bmp,heic,heif,pdf,txt,odp,ods,odt,rtf,doc,docx,xls,xlsx,ppt,pptx,csv,ogv,mp4,webm,m4v,ogg,mp3,wav,zip,rar,json,7z,mpeg,oga,ogv,vsd,weba,webm,webp,xml,gz,tif,jfif,dwg,dwf,dwfx,dwt,msg,ai,psd,md,markdown,mdown,markdn", accept: "*" }, on: { "upload-success": e.onUploadSuccess }, model: { value: e.newFiles, callback: function(n) {
137
- e.newFiles = n;
138
- }, expression: "newFiles" } }), s("CButton", { attrs: { type: "none", pattern: "secondary", wide: "", "icon-left": "upload-cloud" }, on: { click: () => e.$refs.uploader ? e.$refs.uploader.open() : null } }, [e._v(" " + e._s(e.$t("_common:upload", { thing: e.$t("_common:file") })) + " ")])] : e._e()], 2);
139
- }, _ = [], x = /* @__PURE__ */ m(
140
- v,
141
- g,
142
- _,
143
- !1,
144
- null,
145
- null
146
- );
147
- const P = x.exports;
148
- export {
149
- P as default
150
- };
@@ -1,98 +0,0 @@
1
- import { m as o } from "./mapFormMixin-Ce3_WIKw.js";
2
- import { f as r } from "./focusDrawerMixin-CzvgKsOZ.js";
3
- import { g as a } from "./utils-GzwJPAEe.js";
4
- import { n } from "./main-Bp2qcma0.js";
5
- const d = {
6
- name: "VideoPlayer",
7
- i18nOptions: {
8
- namespaces: "components",
9
- keyPrefix: "document.videoPlayer"
10
- },
11
- components: {
12
- VideoPlayerSettings: () => import("./VideoPlayerSettings-CGq--niu.js"),
13
- VideoPlayerInput: () => import("./VideoPlayerInput-QFJfPoCf.js")
14
- },
15
- mixins: [o(["videoPlayer"]), r],
16
- data() {
17
- return {
18
- showControls: !1,
19
- aspectRatio: null,
20
- sizes: {
21
- small: 600,
22
- medium: 1e3,
23
- large: 1e3
24
- },
25
- // defaults to 16:9 aspect ratio
26
- videoSize: {
27
- width: 480,
28
- height: 270
29
- }
30
- };
31
- },
32
- computed: {
33
- video() {
34
- var t;
35
- return ((t = this.videoPlayer) == null ? void 0 : t.video) || {};
36
- },
37
- size() {
38
- var t;
39
- return ((t = this.videoPlayer) == null ? void 0 : t.size) || "medium";
40
- }
41
- },
42
- watch: {
43
- video: {
44
- immediate: !0,
45
- async handler(t) {
46
- if (!t || !t.url)
47
- return;
48
- let { width: e, height: i } = t;
49
- (!e || !i) && ({ width: e, height: i } = await a(t.url) || {}), this.videoSize = { width: e, height: i }, this.setAspectRatio();
50
- }
51
- },
52
- size() {
53
- this.setAspectRatio();
54
- }
55
- },
56
- methods: {
57
- setValue({ key: t, value: e }) {
58
- this.videoPlayer = {
59
- ...this.videoPlayer,
60
- [t]: e
61
- };
62
- },
63
- setAspectRatio() {
64
- !this.videoSize.width || !this.videoSize.height || (this.aspectRatio = `${Math.round(
65
- 100 * this.videoSize.height / this.videoSize.width
66
- )}%`);
67
- },
68
- onAdd() {
69
- const t = () => {
70
- this.$refs.input.focus();
71
- };
72
- this.$refs.input ? t() : this.$once("triggerOnAdd", t);
73
- }
74
- }
75
- };
76
- var l = function() {
77
- var e = this, i = e._self._c;
78
- return i("div", { staticClass: "video-root font-inter", on: { "&mouseover": function(s) {
79
- e.showControls = !0;
80
- }, "&mouseleave": function(s) {
81
- e.showControls = !1;
82
- } } }, [i("div", { staticClass: "no-drag", class: [`video-is-${e.size}`] }, [i("div", { staticClass: "video-container", style: { paddingTop: e.aspectRatio } }, [!e.video.url && e.canEdit ? i("div", { staticClass: "video-element" }, [i("div", { staticClass: "is-placeholder" }, [i("div", { staticClass: "text-gray-600" }, [e._v(" " + e._s(e.$t("subTitle")) + " ")]), i("VideoPlayerInput", { ref: "input", staticStyle: { "padding-top": "1em" }, attrs: { value: e.video }, on: { input: function(s) {
83
- return e.setValue({ key: "video", value: s });
84
- }, "hook:mounted": function(s) {
85
- return e.$emit("triggerOnAdd");
86
- } } })], 1)]) : i("iframe", { ref: "iframe", staticClass: "video-element", attrs: { title: "Video", src: e.video.url, frameborder: "0", allowfullscreen: "" } })])]), e.isForm ? [e.showDrawer ? i("portal", { attrs: { to: "drawer-content" } }, [i("VideoPlayerSettings", { attrs: { video: e.video, size: e.size }, on: { input: e.setValue } })], 1) : e._e()] : e._e()], 2);
87
- }, c = [], u = /* @__PURE__ */ n(
88
- d,
89
- l,
90
- c,
91
- !1,
92
- null,
93
- "018a61e3"
94
- );
95
- const f = u.exports;
96
- export {
97
- f as default
98
- };
@@ -1,144 +0,0 @@
1
- import { m as r } from "./mapFormMixin-Ce3_WIKw.js";
2
- import { f as l } from "./focusDrawerMixin-CzvgKsOZ.js";
3
- import { d as c } from "./debounce-BIchuVwa.js";
4
- import { s as m, p as u } from "./splitpanes-BHUVsCZF.js";
5
- import { n } from "./main-Bp2qcma0.js";
6
- const d = {
7
- name: "HeaderItems",
8
- components: {
9
- MediaWrapper: () => import("./MediaWrapper-hmofOPLv.js"),
10
- ContentWrapper: () => import("./ContentWrapper-DW7VHTdA.js"),
11
- Splitpanes: m,
12
- Pane: u
13
- },
14
- mixins: [r(["layout", "items", "baseStyle"])],
15
- props: {
16
- showControls: {
17
- type: Boolean,
18
- default: !1
19
- }
20
- },
21
- computed: {
22
- forceHorizontal() {
23
- return this.device === "mobile";
24
- },
25
- canResize() {
26
- return this.device === "desktop" || this.device === "tablet";
27
- },
28
- useSplitPane() {
29
- return this.canEdit && this.canResize;
30
- }
31
- },
32
- created() {
33
- ["layout", "canEdit"].forEach(
34
- (t) => this.$watch(t, {
35
- immediate: !0,
36
- handler: this.addNoDragClass
37
- })
38
- );
39
- },
40
- methods: {
41
- addNoDragClass() {
42
- !this.canEdit || !["vertical", "horizontal"].includes(this.layout) || setTimeout(() => {
43
- const t = this.$el.querySelector(".splitpanes__splitter");
44
- t && !t.classList.contains("no-drag") && t.classList.add("no-drag");
45
- }, 0);
46
- },
47
- onResize: c(function([{ size: e }]) {
48
- const a = Math.round(e), o = 100 - a;
49
- this.items = this.items.map((s, i) => ({ ...s, size: [a, o][i] }));
50
- }, 100)
51
- }
52
- };
53
- var h = function() {
54
- var e = this, a = e._self._c;
55
- return e.layout === "center" ? a("div", { staticStyle: { position: "relative", "min-height": "calc(100 * var(--vh, 1vh))" } }, e._l(e.items, function(o, s) {
56
- return a(`${o.type}Wrapper`, e._g({ key: s, tag: "component", staticClass: "item", staticStyle: { position: "absolute", left: "0", top: "0", right: "0", bottom: "0" }, attrs: { size: o.size, _document: e._document, _value: { ...e._value, item: `${e._value.items}.${s}` }, "has-hover": e.showControls } }, e.$listeners));
57
- }), 1) : a(e.useSplitPane ? "splitpanes" : "div", { tag: "component", staticClass: "layout-wrapper", style: !e.canEdit && {
58
- "flex-direction": e.forceHorizontal || e.layout === "horizontal" ? "column" : "row"
59
- }, attrs: { horizontal: e.forceHorizontal ? !0 : e.layout === "horizontal", vertical: e.forceHorizontal ? !1 : e.layout === "vertical" }, on: { resize: e.onResize } }, e._l(e.items, function(o, s) {
60
- return a(e.useSplitPane ? "pane" : "div", { key: s, tag: "component", style: !e.useSplitPane && {
61
- flex: `1 1 ${o.size}%`
62
- }, attrs: { size: o.size } }, [a(`${o.type}Wrapper`, e._g({ tag: "component", staticClass: "item", attrs: { _document: e._document, _value: { ...e._value, item: `${e._value.items}.${s}` }, "has-hover": e.showControls } }, e.$listeners))], 1);
63
- }), 1);
64
- }, _ = [], p = /* @__PURE__ */ n(
65
- d,
66
- h,
67
- _,
68
- !1,
69
- null,
70
- "683ee6d3"
71
- );
72
- const v = p.exports, f = {
73
- name: "HeaderBlock",
74
- components: {
75
- PriceHeader: () => import("./PriceHeader-BdfozyN8.js"),
76
- HeaderSettings: () => import("./HeaderSettings-C8SuuAwv.js"),
77
- HeaderItems: v
78
- },
79
- mixins: [r(["header"]), l],
80
- data() {
81
- return {
82
- showControls: !1
83
- };
84
- },
85
- computed: {
86
- layout() {
87
- var t;
88
- return (t = this.header) == null ? void 0 : t.layout;
89
- },
90
- items() {
91
- var t;
92
- return ((t = this.header) == null ? void 0 : t.items) || [];
93
- },
94
- mediaPath() {
95
- const t = this.items.findIndex(({ type: e }) => e === "media");
96
- return t !== -1 ? `${this._value.header}.items.${t}.media` : "";
97
- },
98
- contentPath() {
99
- const t = this.items.findIndex(({ type: e }) => e === "content");
100
- return t !== -1 ? `${this._value.header}.items.${t}` : "";
101
- }
102
- }
103
- };
104
- var $ = function() {
105
- var e = this, a = e._self._c;
106
- return a("div", { staticClass: "header-root", class: {
107
- "has-parent-nav": e.viewSettings.isForm,
108
- "has-hover": e.showControls
109
- }, on: { "&mouseover": function(o) {
110
- e.showControls = !0;
111
- }, "&mouseleave": function(o) {
112
- e.showControls = !1;
113
- } } }, [e.layout === "price" ? a("PriceHeader", e._g({ attrs: { _document: e._document, _value: {
114
- media: e.mediaPath,
115
- backgroundColor: `${e.contentPath}.media.backgroundColor`,
116
- documentName: `${e.contentPath}.value.documentName`,
117
- showLogo: `${e.contentPath}.value.showLogo`,
118
- logotype: `${e.contentPath}.value.logotype`,
119
- showPriceSummary: `${e._value.header}.showPriceSummary`
120
- }, "has-hover": e.showControls } }, e.$listeners)) : a("HeaderItems", e._g({ attrs: { _document: e._document, _value: {
121
- layout: `${e._value.header}.layout`,
122
- items: `${e._value.header}.items`,
123
- baseStyle: `${e._value.header}.baseStyle`
124
- }, "show-controls": e.showControls } }, e.$listeners)), e.isForm ? [e.showDrawer ? a("portal", { attrs: { to: "drawer-content" } }, [a("HeaderSettings", { attrs: { _document: e._document, _value: {
125
- layout: `${e._value.header}.layout`,
126
- items: `${e._value.header}.items`,
127
- showPriceSummary: `${e._value.header}.showPriceSummary`,
128
- media: e.mediaPath,
129
- backgroundColor: `${e.contentPath}.media.backgroundColor`,
130
- textAlign: `${e._value.header}.baseStyle.textAlign`,
131
- textColor: `${e._value.header}.baseStyle.textColor`
132
- } } })], 1) : e._e()] : e._e()], 2);
133
- }, y = [], g = /* @__PURE__ */ n(
134
- f,
135
- $,
136
- y,
137
- !1,
138
- null,
139
- null
140
- );
141
- const x = g.exports;
142
- export {
143
- x as default
144
- };
@@ -1,84 +0,0 @@
1
- import { m as s } from "./mapFormMixin-Ce3_WIKw.js";
2
- import { B as c } from "./BlockMedia-CAgKbN_k.js";
3
- import { T as a } from "./DocTextEditor-idQMnlIF.js";
4
- import { f as n } from "./focusDrawerMixin-CzvgKsOZ.js";
5
- import { b as i, z as l, A as v, B as d, P as u, n as m } from "./main-Bp2qcma0.js";
6
- const _ = {
7
- name: "CoverBlock",
8
- components: {
9
- BlockMedia: c,
10
- TextEditor: a,
11
- CoverBlockSettings: () => import("./CoverBlockSettings-DNSdXFgF.js")
12
- },
13
- mixins: [s(["coverBlock"]), n],
14
- inject: ["parentSize"],
15
- data() {
16
- return {
17
- showControls: !1
18
- };
19
- },
20
- computed: {
21
- text: {
22
- get() {
23
- const t = i(this, "coverBlock.text", "");
24
- return this.canEdit ? l(
25
- t,
26
- this._document.textTemplateMap,
27
- this._document._doc
28
- ) : v(t, this._document._doc);
29
- },
30
- set(t) {
31
- this.setValue({ key: "text", value: d(t) });
32
- }
33
- },
34
- media() {
35
- const { type: t, cover: e } = this.coverBlock || {};
36
- return { ...e, ...t && { type: t } };
37
- }
38
- },
39
- methods: {
40
- setValue({ key: t, value: e }) {
41
- this.coverBlock = u(this.coverBlock, t, e);
42
- },
43
- onAdd() {
44
- const t = () => this.$refs.editor.focus();
45
- this.$refs.editor ? t() : this.$once("triggerOnAdd", t);
46
- }
47
- }
48
- };
49
- var p = function() {
50
- var e = this, o = e._self._c;
51
- return o("div", { staticClass: "cover-root font-inter", class: { "is-700-plus": e.parentSize.width >= 700 }, on: { "&mouseover": function(r) {
52
- e.showControls = !0;
53
- }, "&mouseleave": function(r) {
54
- e.showControls = !1;
55
- } } }, [o("div", { staticClass: "cover-base" }, [o("BlockMedia", { attrs: { media: e.media } }), o("div", { staticClass: "cover-text-wrapper no-drag" }, [o("div", { staticClass: "cover-text" }, [o("TextEditor", { key: e.canEdit, ref: "editor", attrs: { editable: e.canEdit, mentions: () => e._document.textTemplateItems, snippets: !0, extensions: "all", unstyled: "" }, on: { "hook:mounted": function(r) {
56
- return e.$emit("triggerOnAdd");
57
- } }, model: { value: e.text, callback: function(r) {
58
- e.text = r;
59
- }, expression: "text" } })], 1)])], 1), e.isForm ? [e.showDrawer ? o("portal", { attrs: { to: "drawer-content" } }, [o("CoverBlockSettings", { attrs: { _document: e._document, _value: {
60
- type: `${e._value.coverBlock}.type`,
61
- video: `${e._value.coverBlock}.cover.video`,
62
- resourceUrl: `${e._value.coverBlock}.cover.resourceUrl`,
63
- filter: `${e._value.coverBlock}.cover.filter`,
64
- blur: `${e._value.coverBlock}.cover.blur`,
65
- position: `${e._value.coverBlock}.cover.position`,
66
- overlay: `${e._value.coverBlock}.cover.overlay`,
67
- overlayColor: `${e._value.coverBlock}.cover.overlayColor`,
68
- gradient: `${e._value.coverBlock}.cover.gradient`,
69
- backgroundColor: `${e._value.coverBlock}.cover.backgroundColor`
70
- } } }), o("div", { staticClass: "footer-button", attrs: { slot: "footer" }, slot: "footer" }, [o("CButton", { attrs: { type: "danger", pattern: "tertiary", wide: "" }, on: { click: function(r) {
71
- return e.$emit("section-remove");
72
- } } }, [e._v(" " + e._s(e.$t("_common:remove")) + " ")])], 1)], 1) : e._e()] : e._e()], 2);
73
- }, f = [], k = /* @__PURE__ */ m(
74
- _,
75
- p,
76
- f,
77
- !1,
78
- null,
79
- "a29fb39a"
80
- );
81
- const g = k.exports;
82
- export {
83
- g as default
84
- };
@@ -1,31 +0,0 @@
1
- import { n as r } from "./main-Bp2qcma0.js";
2
- const l = {
3
- name: "DocChapterSub",
4
- inject: {
5
- viewSettings: { default: () => ({ canEdit: !1 }) }
6
- },
7
- inheritAttrs: !1
8
- };
9
- var o = function(e, t) {
10
- var i, n;
11
- return t.props.hideFromEdit && t.injections.viewSettings.canEdit ? t._e() : e("div", { staticClass: "sub-chapter" }, [e("div", { staticClass: "sub-chapter-title" }, [e("span", { staticClass: "sub-chapter-counter primary-pseudo-background" }), t.injections.viewSettings.canEdit && ((n = (i = t.props) == null ? void 0 : i._value) != null && n.title) ? [e("CInput", { staticClass: "preview-title-input", attrs: { value: t.props.title, spellcheck: !1, static: "" }, on: { blur: (s) => {
12
- var a;
13
- t.injections.viewSettings.setFormValue && t.injections.viewSettings.setFormValue({
14
- key: t.props._value.title,
15
- value: ((a = s.target) == null ? void 0 : a.value) || ""
16
- });
17
- } }, nativeOn: { keydown: function(s) {
18
- return !s.type.indexOf("key") && t._k(s.keyCode, "enter", 13, s.key, "Enter") ? null : s.target.blur();
19
- } } })] : t.props.title ? e("div", [t._v(t._s(t.props.title))]) : t._e()], 2), e("div", { staticClass: "sub-chapter-content" }, [t._t("default")], 2)]);
20
- }, c = [], p = /* @__PURE__ */ r(
21
- l,
22
- o,
23
- c,
24
- !0,
25
- null,
26
- "cf4c14b1"
27
- );
28
- const f = p.exports;
29
- export {
30
- f as default
31
- };
@@ -1,26 +0,0 @@
1
- import { m as o } from "./mapFormMixin-Ce3_WIKw.js";
2
- import { n as i } from "./main-Bp2qcma0.js";
3
- const a = {
4
- name: "NotBinding",
5
- components: {
6
- Edit: () => import("./ToggleBinding-CRoVM6Nw.js"),
7
- Read: () => import("./NotBindingText-COpJPwHe.js")
8
- },
9
- mixins: [o()]
10
- };
11
- var r = function() {
12
- var e;
13
- var n = this, t = n._self._c;
14
- return n.canEdit ? t("Edit", n._g({ attrs: { _document: n._document, _value: { notBinding: "data.notBinding" } } }, n.$listeners)) : (e = n._document.data) != null && e.notBinding ? t("Read") : n._e();
15
- }, m = [], _ = /* @__PURE__ */ i(
16
- a,
17
- r,
18
- m,
19
- !1,
20
- null,
21
- "a3b56101"
22
- );
23
- const p = _.exports;
24
- export {
25
- p as default
26
- };
@@ -1,55 +0,0 @@
1
- import { m as n } from "./mapFormMixin-Ce3_WIKw.js";
2
- import { f as o } from "./focusDrawerMixin-CzvgKsOZ.js";
3
- import { n as i } from "./main-Bp2qcma0.js";
4
- const a = {
5
- name: "Terms",
6
- i18nOptions: {
7
- namespaces: "terms",
8
- messages: {
9
- en: {
10
- noneSelected: "No terms selected"
11
- },
12
- sv: {
13
- noneSelected: "Inga villkor valda"
14
- }
15
- }
16
- },
17
- components: {
18
- Read: () => import("./Index-DfANvO5d.js"),
19
- TermsSettings: () => import("./TermsSettings-D1tDAu-r.js")
20
- },
21
- mixins: [
22
- n(["href", "termType", "file", "text"]),
23
- o
24
- ],
25
- data() {
26
- return {
27
- showControls: !1
28
- };
29
- },
30
- computed: {
31
- hasTerms() {
32
- const s = ["href", "file"].includes(this.termType) && this.href, e = this.termType === "text" && this.text, t = this.termType === "file" && this.file;
33
- return s || e || t;
34
- }
35
- }
36
- };
37
- var m = function() {
38
- var e = this, t = e._self._c;
39
- return e.isForm || e.hasTerms ? t("div", { on: { "&mouseover": function(r) {
40
- e.showControls = !0;
41
- }, "&mouseleave": function(r) {
42
- e.showControls = !1;
43
- } } }, [t("Read", e._g({ attrs: { _document: e._document, href: e.href, "term-type": e.termType, file: e.file, text: e.text } }, e.$listeners)), e.isForm ? [e.hasTerms ? e._e() : t("CButton", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: e.$t("noneSelected"), expression: "$t('noneSelected')" }], staticStyle: { position: "absolute", left: "calc(1 * var(--rem))", top: "calc(1 * var(--rem))", width: "2em", height: "2em" }, attrs: { "icon-props": { size: 18 }, pattern: "secondary", icon: "info", circle: "", size: "small", type: "danger" }, on: { click: e.openDrawer } }), e.showDrawer ? t("portal", { attrs: { to: "drawer-content" } }, [t("TermsSettings", e._g({ attrs: { _document: e._document, _value: { term: "data.terms" } } }, e.$listeners))], 1) : e._e()] : e._e()], 2) : e._e();
44
- }, l = [], c = /* @__PURE__ */ i(
45
- a,
46
- m,
47
- l,
48
- !1,
49
- null,
50
- null
51
- );
52
- const _ = c.exports;
53
- export {
54
- _ as default
55
- };