@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,26 +0,0 @@
1
- import { m as o } from "./mapFormMixin-y2txvLw9.js";
2
- import { n as i } from "./main-DE5THsiR.js";
3
- const a = {
4
- name: "NotBinding",
5
- components: {
6
- Edit: () => import("./ToggleBinding-KEVHHvKf.js"),
7
- Read: () => import("./NotBindingText-DA5NpePz.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,559 +0,0 @@
1
- import { m as g } from "./mapFormMixin-y2txvLw9.js";
2
- import { A as o, ap as u, b as h, n as l, aq as b, ar as a, as as n } from "./main-DE5THsiR.js";
3
- import { s as v, p as y } from "./splitpanes-BHUVsCZF.js";
4
- import { t as w } from "./throttle-C2srA2wa.js";
5
- import { W as m } from "./DocumentLayout-BA7mFfZh.js";
6
- import { e as p } from "./dom-CJxkno7i.js";
7
- import { d as _ } from "./debounce-BN83gOVd.js";
8
- const x = `
9
- /*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,footer,header,nav,section{display:block}h1{font-size:2em;margin:.67em 0}figcaption,figure,main{display:block}figure{margin:1em 40px}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent;-webkit-text-decoration-skip:objects}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:inherit}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}dfn{font-style:italic}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}audio,video{display:inline-block}audio:not([controls]){display:none;height:0}img{border-style:none}svg:not(:root){overflow:hidden}button,input,optgroup,select,textarea{font-family:sans-serif;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{display:inline-block;vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details,menu{display:block}summary{display:list-item}canvas{display:inline-block}template{display:none}[hidden]{display:none}html{box-sizing:border-box;font-family:sans-serif}*,::after,::before{box-sizing:inherit}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,p,pre{margin:0}button{background:0 0;padding:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}fieldset{margin:0;padding:0}ol,ul{margin:0}*,::after,::before{border-width:0;border-style:solid;border-color:#dae1e7}img{border-style:solid}[type=button],[type=reset],[type=submit],button{border-radius:0}textarea{resize:vertical}img{max-width:100%;height:auto}button,input,optgroup,select,textarea{font-family:inherit}input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:inherit;opacity:.5}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:inherit;opacity:.5}input::-ms-input-placeholder,textarea::-ms-input-placeholder{color:inherit;opacity:.5}input::placeholder,textarea::placeholder{color:inherit;opacity:.5}[role=button],button{cursor:pointer}table{border-collapse:collapse}
10
- `, M = (e, { _document: t, id: s, firstRender: i }) => `
11
- <!DOCTYPE html>
12
- <html>
13
- <head>
14
- <style>${x}</style>
15
- <style>${e.css}</style>
16
- </head>
17
- <body>
18
- ${e.html}
19
- </body>
20
- <script>
21
- var doc = ${t};
22
- var firstRender = ${i};
23
- function getOuterHeight(el) {
24
- var height = el.clientHeight;
25
- var computedStyle = window.getComputedStyle(el);
26
- height += parseInt(computedStyle.marginTop, 10);
27
- height += parseInt(computedStyle.marginBottom, 10);
28
- height += parseInt(computedStyle.borderTopWidth, 10);
29
- height += parseInt(computedStyle.borderBottomWidth, 10);
30
- return height;
31
- };
32
-
33
- function sendHeightMessage() {
34
- var message = JSON.stringify({
35
- id: '${s}',
36
- channel: 'customBlock',
37
- data: {
38
- height: getOuterHeight(document.body),
39
- },
40
- });
41
-
42
- window.parent.postMessage(message, '*');
43
- };
44
-
45
- setTimeout(sendHeightMessage, 10);
46
- setInterval(sendHeightMessage, 1000);
47
-
48
- // Update doc variable on changes
49
- window.addEventListener('message', function(e){
50
- try {
51
- parsed = JSON.parse(e.data);
52
- } catch (error) {
53
- // nope
54
- }
55
- if (!(parsed && parsed.channel === 'document')) return;
56
- doc = parsed.data.body;
57
- window.dispatchEvent(new CustomEvent('docUpdate', { detail: doc }));
58
- });
59
- <\/script>
60
- <script type="module">
61
- ${e.javascript}
62
- <\/script>
63
- </html>`, f = {
64
- name: "CustomView",
65
- props: {
66
- html: {
67
- type: String,
68
- default: ""
69
- },
70
- css: {
71
- type: String,
72
- default: ""
73
- },
74
- javascript: {
75
- type: String,
76
- default: ""
77
- },
78
- _document: {
79
- type: Object,
80
- default: () => ({})
81
- }
82
- },
83
- data() {
84
- return {
85
- storeListenerUnsubscribe: null,
86
- // Temp obj to store current used paths and their value to detect when we should re-render
87
- usedPathValues: {}
88
- };
89
- },
90
- watch: {
91
- html() {
92
- this.updateView();
93
- },
94
- css() {
95
- this.updateView();
96
- },
97
- javascript() {
98
- this.updateView();
99
- }
100
- },
101
- methods: {
102
- updateView({
103
- firstRender: e = !1
104
- } = {}) {
105
- if (!this.$refs.iframe)
106
- return;
107
- const t = this._document.getRawData();
108
- this.setUsedPathValues(), this.$refs.iframe.srcdoc = M({
109
- html: o(this.html, t),
110
- css: o(this.css, t),
111
- javascript: o(this.javascript, t)
112
- }, {
113
- _document: JSON.stringify(t),
114
- id: this._uid,
115
- firstRender: e
116
- });
117
- },
118
- registerStoreListener() {
119
- this.sendDocumentUpdate = w(this.sendDocMessage, 1e3), this.storeListenerUnsubscribe = this.$store.subscribe((e) => {
120
- const {
121
- type: t
122
- } = e;
123
- (t === "forms/SET_FORM_VALUE" || t === "publicDocuments/SET_CURRENT_DOCUMENT_VALUE") && (this.sendDocumentUpdate(), ["html", "css", "javascript"].some((i) => {
124
- const c = u(this[i]);
125
- return Object.keys(c).some((d) => this.usedPathValues[d] !== h(this._document.getRawData(), d));
126
- }) && this.updateView());
127
- });
128
- },
129
- unregisterStoreListener() {
130
- var e;
131
- (e = this.storeListenerUnsubscribe) == null || e.call(this);
132
- },
133
- setUsedPathValues() {
134
- ["html", "css", "javascript"].forEach((e) => {
135
- const t = u(this[e]);
136
- Object.keys(t).forEach((s) => {
137
- this.usedPathValues[s] = h(this._document.getRawData(), s);
138
- });
139
- });
140
- },
141
- // Update doc variable in iFrame
142
- sendDocMessage() {
143
- const e = JSON.stringify({
144
- channel: "document",
145
- data: {
146
- body: this._document.getRawData()
147
- }
148
- });
149
- this.$refs.iframe.contentWindow.postMessage(e, "*");
150
- }
151
- },
152
- mounted() {
153
- this.updateView({
154
- firstRender: !0
155
- }), this.sendDocMessage(), window.addEventListener("message", (e) => {
156
- let t = null;
157
- try {
158
- t = JSON.parse(e.data);
159
- } catch {
160
- }
161
- t && t.channel === "customBlock" && (t == null ? void 0 : t.id) === `${this._uid}` && this.$refs.iframe && (this.$refs.iframe.style.height = t.data.height + "px");
162
- }), this.registerStoreListener();
163
- },
164
- beforeDestroy() {
165
- var e, t;
166
- this.unregisterStoreListener(), (t = (e = this.sendDocumentUpdate) == null ? void 0 : e.cancel) == null || t.call(e);
167
- },
168
- render(e) {
169
- return e("iframe", {
170
- attrs: {
171
- id: this._uid,
172
- sandbox: "allow-scripts",
173
- frameBorder: "0"
174
- },
175
- ref: "iframe",
176
- class: "h-0 w-full"
177
- });
178
- }
179
- }, S = {
180
- name: "MonacoEditor",
181
- props: {
182
- value: String,
183
- srcdoc: String,
184
- language: {
185
- type: String,
186
- default: "javascript"
187
- },
188
- theme: {
189
- type: String,
190
- default: "vs-dark"
191
- },
192
- options: {
193
- type: Object,
194
- default: () => ({
195
- tabSize: 2,
196
- insertSpaces: !0,
197
- minimap: {
198
- enabled: !1
199
- }
200
- })
201
- },
202
- editorMounted: {
203
- type: Function,
204
- default: () => {
205
- }
206
- },
207
- editorBeforeMount: {
208
- type: Function,
209
- default: () => {
210
- }
211
- },
212
- debounceTime: {
213
- type: Number,
214
- default: 500
215
- },
216
- disabled: {
217
- type: Boolean,
218
- default: !1
219
- }
220
- },
221
- components: {
222
- WithDimensions: m
223
- },
224
- watch: {
225
- options: {
226
- deep: !0,
227
- handler(e) {
228
- var t;
229
- (t = this.editor) == null || t.updateOptions(e);
230
- }
231
- },
232
- value() {
233
- this.editor && this.value !== this.getValue() && this.setValue(this.value);
234
- },
235
- language() {
236
- this.editor && window.monaco.editor.setModelLanguage(this.editor.getModel(), this.language);
237
- },
238
- theme() {
239
- this.editor && window.monaco.editor.setTheme(this.theme);
240
- },
241
- disabled(e) {
242
- var t;
243
- (t = this.editor) == null || t.updateOptions({
244
- readOnly: e
245
- });
246
- }
247
- },
248
- mounted() {
249
- this.loadMonaco().then(() => {
250
- var e;
251
- this.initMonaco(), (e = this.editor) == null || e.focus();
252
- });
253
- },
254
- beforeDestroy() {
255
- var e, t, s;
256
- (e = this.editor) == null || e.dispose(), (s = (t = this.codeChangeEmitter) == null ? void 0 : t.cancel) == null || s.call(t);
257
- },
258
- render(e) {
259
- return e(m, {
260
- on: {
261
- width: () => {
262
- var t;
263
- return (t = this.editor) == null ? void 0 : t.layout();
264
- },
265
- height: () => {
266
- var t;
267
- return (t = this.editor) == null ? void 0 : t.layout();
268
- }
269
- }
270
- }, [e("div")]);
271
- },
272
- methods: {
273
- async loadMonaco() {
274
- await p("https://cdn.jsdelivr.net/npm/monaco-editor@0.33.0/min/vs/loader.js");
275
- const e = {
276
- paths: {
277
- vs: "https://cdn.jsdelivr.net/npm/monaco-editor@0.33.0/min/vs"
278
- }
279
- };
280
- await new Promise((t, s) => {
281
- window.require.config(e), window.require(["vs/editor/editor.main"], t, s);
282
- }), await p("https://cdn.jsdelivr.net/npm/emmet-monaco-es@5.1.0/dist/emmet-monaco.js");
283
- },
284
- initMonaco() {
285
- window.emmetMonaco.emmetHTML(window.monaco), window.emmetMonaco.emmetCSS(window.monaco);
286
- const {
287
- value: e,
288
- language: t,
289
- theme: s,
290
- options: i
291
- } = this;
292
- Object.assign(i, this._editorBeforeMount()), this.editor = window.monaco.editor.create(this.$el, {
293
- value: e,
294
- language: t,
295
- theme: s,
296
- readOnly: this.disabled,
297
- ...i
298
- }), this._editorMounted(this.editor);
299
- },
300
- getEditor() {
301
- return this.editor ? this.editor : null;
302
- },
303
- setValue(e) {
304
- const t = this.getEditor();
305
- t == null || t.setValue(e);
306
- },
307
- getValue() {
308
- const e = this.getEditor();
309
- return e ? e.getValue() : "";
310
- },
311
- _editorBeforeMount() {
312
- return this.editorBeforeMount(window.monaco) || {};
313
- },
314
- _editorMounted(e) {
315
- this.editorMounted(e, window.monaco), this.codeChangeEmitter = _((t, s) => this.emitChange(t, s), this.debounceTime), e.onDidChangeModelContent((t) => {
316
- const s = this.getValue();
317
- this.codeChangeEmitter(s, t);
318
- });
319
- },
320
- emitChange(e, t) {
321
- this.$emit("change", e, t), this.$emit("input", e);
322
- }
323
- }
324
- }, z = {
325
- html: '<path fill="#e44f26" d="M5.902 27.201L3.655 2h24.69l-2.25 25.197L15.985 30L5.902 27.201z"></path><path fill="#f1662a" d="m16 27.858l8.17-2.265l1.922-21.532H16v23.797z"></path><path fill="#ebebeb" d="M16 13.407h-4.09l-.282-3.165H16V7.151H8.25l.074.83l.759 8.517H16v-3.091zm0 8.027l-.014.004l-3.442-.929l-.22-2.465H9.221l.433 4.852l6.332 1.758l.014-.004v-3.216z"></path><path fill="#fff" d="M15.989 13.407v3.091h3.806l-.358 4.009l-3.448.93v3.216l6.337-1.757l.046-.522l.726-8.137l.076-.83h-7.185zm0-6.256v3.091h7.466l.062-.694l.141-1.567l.074-.83h-7.743z"></path>',
326
- css: '<path fill="#1572b6" d="M5.902 27.201L3.656 2h24.688l-2.249 25.197L15.985 30L5.902 27.201z"></path><path fill="#33a9dc" d="m16 27.858l8.17-2.265l1.922-21.532H16v23.797z"></path><path fill="#fff" d="M16 13.191h4.09l.282-3.165H16V6.935h7.75l-.074.829l-.759 8.518H16v-3.091z"></path><path fill="#ebebeb" d="m16.019 21.218l-.014.004l-3.442-.93l-.22-2.465H9.24l.433 4.853l6.331 1.758l.015-.004v-3.216z"></path><path fill="#fff" d="m19.827 16.151l-.372 4.139l-3.447.93v3.216l6.336-1.756l.047-.522l.537-6.007h-3.101z"></path><path fill="#ebebeb" d="M16.011 6.935v3.091H8.545l-.062-.695l-.141-1.567l-.074-.829h7.743zM16 13.191v3.091h-3.399l-.062-.695l-.14-1.567l-.074-.829H16z"></path>',
327
- javascript: '<path fill="#f5de19" d="M2 2h28v28H2z"></path><path d="M20.809 23.875a2.866 2.866 0 0 0 2.6 1.6c1.09 0 1.787-.545 1.787-1.3c0-.9-.716-1.222-1.916-1.747l-.658-.282c-1.9-.809-3.16-1.822-3.16-3.964c0-1.973 1.5-3.476 3.853-3.476a3.889 3.889 0 0 1 3.742 2.107L25 18.128A1.789 1.789 0 0 0 23.311 17a1.145 1.145 0 0 0-1.259 1.128c0 .789.489 1.109 1.618 1.6l.658.282c2.236.959 3.5 1.936 3.5 4.133c0 2.369-1.861 3.667-4.36 3.667a5.055 5.055 0 0 1-4.795-2.691Zm-9.295.228c.413.733.789 1.353 1.693 1.353c.864 0 1.41-.338 1.41-1.653v-8.947h2.631v8.982c0 2.724-1.6 3.964-3.929 3.964a4.085 4.085 0 0 1-3.947-2.4Z"></path>',
328
- json: '<path fill="currentColor" d="M31 11v10h-2l-2-6v6h-2V11h2l2 6v-6h2zm-9.666 10h-2.667A1.668 1.668 0 0 1 17 19.334v-6.667A1.668 1.668 0 0 1 18.666 11h2.667A1.668 1.668 0 0 1 23 12.666v6.667A1.668 1.668 0 0 1 21.334 21zM19 19h2v-6h-2zm-5.666 2H9v-2h4v-2h-2a2.002 2.002 0 0 1-2-2v-2.334A1.668 1.668 0 0 1 10.666 11H15v2h-4v2h2a2.002 2.002 0 0 1 2 2v2.333A1.668 1.668 0 0 1 13.334 21zm-8 0H2.667A1.668 1.668 0 0 1 1 19.334V17h2v2h2v-8h2v8.334A1.668 1.668 0 0 1 5.333 21z"></path>'
329
- }, k = {
330
- name: "Tabs",
331
- props: {
332
- value: {
333
- type: String,
334
- default: ""
335
- },
336
- items: {
337
- type: Array,
338
- default: () => []
339
- },
340
- hLayout: {
341
- type: Boolean,
342
- default: !1
343
- }
344
- },
345
- data() {
346
- return {
347
- icons: z
348
- };
349
- }
350
- };
351
- var C = function() {
352
- var t = this, s = t._self._c;
353
- return s("div", { staticClass: "tabs-root" }, [s("div", { staticClass: "simple-btn", on: { click: function(i) {
354
- return t.$emit("close");
355
- } } }, [s("CIcon", { attrs: { type: "x", size: "18" } })], 1), t._l(t.items, function(i) {
356
- return s("div", { key: i.value, staticClass: "tab-item", class: {
357
- "tab-item-active": t.value === i.value
358
- }, on: { click: function(c) {
359
- return t.$emit("input", i.value);
360
- } } }, [s("svg", { staticStyle: { "margin-right": "0.5em" }, attrs: { xmlns: "http://www.w3.org/2000/svg", "xmlns:xlink": "http://www.w3.org/1999/xlink", "aria-hidden": "true", role: "img", width: "18", height: "18", preserveAspectRatio: "xMidYMid meet", viewBox: "0 0 32 32" }, domProps: { innerHTML: t._s(t.icons[i.value]) } }), s("span", { domProps: { textContent: t._s(i.text) } })]);
361
- }), s("div", { staticClass: "simple-btn", staticStyle: { "margin-left": "auto" }, on: { click: function(i) {
362
- return t.$emit("update:hLayout", !t.hLayout);
363
- } } }, [s("CIcon", { staticStyle: { transition: "transform 150ms" }, style: {
364
- transform: t.hLayout ? "rotate(0deg)" : "rotate(90deg)"
365
- }, attrs: { type: "layout", size: "18" } })], 1)], 2);
366
- }, j = [], $ = /* @__PURE__ */ l(
367
- k,
368
- C,
369
- j,
370
- !1,
371
- null,
372
- "2b587c3e"
373
- );
374
- const L = $.exports, V = {
375
- name: "CustomModal",
376
- components: {
377
- Tabs: L,
378
- MonacoEditor: S,
379
- Splitpanes: v,
380
- Pane: y,
381
- CustomView: f
382
- },
383
- props: {
384
- _document: {
385
- type: Object,
386
- default: () => ({})
387
- },
388
- html: {
389
- type: String,
390
- default: ""
391
- },
392
- css: {
393
- type: String,
394
- default: ""
395
- },
396
- javascript: {
397
- type: String,
398
- default: ""
399
- }
400
- },
401
- data() {
402
- return {
403
- hLayout: !1,
404
- currentTab: "html",
405
- items: [
406
- { text: "HTML", value: "html" },
407
- { text: "CSS", value: "css" },
408
- { text: "JS", value: "javascript" },
409
- { text: "Data", value: "json", disabled: !0 }
410
- ],
411
- modalName: `customModal${this._uid}`
412
- };
413
- },
414
- computed: {
415
- currentValue() {
416
- return this[this.currentTab];
417
- },
418
- currentItem() {
419
- return this.items.find(({ value: e }) => e === this.currentTab) || {};
420
- },
421
- json() {
422
- return JSON.stringify(this._document.getRawData(), null, 2);
423
- }
424
- },
425
- methods: {
426
- show() {
427
- this.$modal.show(this.modalName);
428
- }
429
- }
430
- };
431
- var T = function() {
432
- var t = this, s = t._self._c;
433
- return s("portal", { attrs: { to: "modal" } }, [s("modal", { attrs: { name: t.modalName, adaptive: !0, width: "100%", height: "100%", classes: "overflow-visible primary" } }, [s("Splitpanes", { staticClass: "root font-inter", attrs: { horizontal: t.hLayout } }, [s("Pane", [s("Tabs", { attrs: { items: t.items, "h-layout": t.hLayout }, on: { "update:hLayout": function(i) {
434
- t.hLayout = i;
435
- }, "update:h-layout": function(i) {
436
- t.hLayout = i;
437
- }, close: function(i) {
438
- return t.$modal.hide(t.modalName);
439
- } }, model: { value: t.currentTab, callback: function(i) {
440
- t.currentTab = i;
441
- }, expression: "currentTab" } }), s("MonacoEditor", { staticStyle: { width: "100%", height: "100%" }, attrs: { language: t.currentTab, value: t.currentValue, disabled: t.currentItem.disabled }, on: { change: function(i) {
442
- return t.$emit(`update:${t.currentTab}`, i);
443
- } }, nativeOn: { keyup: function(i) {
444
- i.stopPropagation();
445
- } } })], 1), s("Pane", [s("div", { staticStyle: { height: "100%", width: "100%", overflow: "auto" } }, [s("CustomView", { attrs: { html: t.html, css: t.css, javascript: t.javascript, _document: t._document } })], 1)])], 1)], 1)], 1);
446
- }, E = [], H = /* @__PURE__ */ l(
447
- V,
448
- T,
449
- E,
450
- !1,
451
- null,
452
- "34c1270f"
453
- );
454
- const O = H.exports, r = b(), D = {
455
- components: {
456
- CustomView: f,
457
- CustomModal: O
458
- },
459
- i18nOptions: {
460
- namespaces: "Custom",
461
- messages: {
462
- en: {
463
- title: "Create your own custom block.",
464
- text: "Use HTML, CSS and Javascript to create & design a block exactly the way you want it.",
465
- action: "Open editor"
466
- },
467
- sv: {
468
- title: "Skapa ett skräddarsytt block.",
469
- text: "Använd HTML, CSS och Javascript för att koda & design:a ett block precis som du vill ha det.",
470
- action: "Öppna kod-editor"
471
- }
472
- }
473
- },
474
- mixins: [g(["custom"])],
475
- inject: {
476
- setOpenDrawer: {
477
- type: Function,
478
- default: null
479
- }
480
- },
481
- data() {
482
- return {
483
- showControls: !1
484
- };
485
- },
486
- computed: {
487
- isEdited() {
488
- return this.custom ? this.custom.html !== r.html || this.custom.css !== r.css || this.custom.javascript !== r.javascript : !1;
489
- },
490
- html: {
491
- get() {
492
- return this.custom.html ? a(this.custom.html) : "";
493
- },
494
- set(e) {
495
- this.custom = {
496
- ...this.custom,
497
- html: n(e)
498
- };
499
- }
500
- },
501
- css: {
502
- get() {
503
- return this.custom.css ? a(this.custom.css) : "";
504
- },
505
- set(e) {
506
- this.custom = {
507
- ...this.custom,
508
- css: n(e)
509
- };
510
- }
511
- },
512
- javascript: {
513
- get() {
514
- return this.custom.javascript ? a(this.custom.javascript) : "";
515
- },
516
- set(e) {
517
- this.custom = {
518
- ...this.custom,
519
- javascript: n(e)
520
- };
521
- }
522
- }
523
- },
524
- created() {
525
- this.setOpenDrawer && this.setOpenDrawer(this.openModal);
526
- },
527
- methods: {
528
- openModal() {
529
- this.$refs.customModal.show();
530
- }
531
- }
532
- };
533
- var P = function() {
534
- var t = this, s = t._self._c;
535
- return s("div", { staticClass: "custom-root", class: {
536
- "is-empty": !t.isEdited
537
- }, style: t.canEdit && { minHeight: "100px" }, on: { "&mouseover": function(i) {
538
- t.showControls = !0;
539
- }, "&mouseleave": function(i) {
540
- t.showControls = !1;
541
- } } }, [t.isEdited ? s("CustomView", { staticStyle: { width: "100%", "min-height": "0" }, attrs: { html: t.html, css: t.css, javascript: t.javascript, _document: t._document } }) : t._e(), t.isForm ? [t.canEdit && !t.isEdited ? s("div", { staticClass: "flex flex-col items-center justify-center text-center", staticStyle: { padding: "calc(3 * var(--rem)) calc(1 * var(--rem))", "line-height": "1.5", color: "white" } }, [s("div", { staticStyle: { "font-weight": "500", "margin-bottom": "0.25em", opacity: "0.98" }, domProps: { textContent: t._s(t.$t("title")) } }), s("div", { staticStyle: { "font-size": "14px", "margin-bottom": "calc(2 * var(--rem))", color: "hsl(218deg 24% 60%)", "max-width": "40ch" }, domProps: { textContent: t._s(t.$t("text")) } }), s("CButton", { staticStyle: { "font-size": "14px", "border-radius": "8px", padding: "12px 12px", height: "initial", "box-shadow": "rgb(0, 0, 0, 50%) 0px 10px 40px" }, attrs: { size: "normal", "icon-left": "code", type: "secondary" }, on: { click: t.openModal } }, [t._v(" " + t._s(t.$t("action")) + " ")])], 1) : t._e()] : t._e(), s("CustomModal", { ref: "customModal", attrs: { html: t.html, css: t.css, javascript: t.javascript, _document: t._document }, on: { "update:html": function(i) {
542
- t.html = i;
543
- }, "update:css": function(i) {
544
- t.css = i;
545
- }, "update:javascript": function(i) {
546
- t.javascript = i;
547
- } } })], 2);
548
- }, R = [], U = /* @__PURE__ */ l(
549
- D,
550
- P,
551
- R,
552
- !1,
553
- null,
554
- null
555
- );
556
- const W = U.exports;
557
- export {
558
- W as default
559
- };
@@ -1,70 +0,0 @@
1
- import { m as i } from "./mapFormMixin-y2txvLw9.js";
2
- import { S as o, n as a } from "./main-DE5THsiR.js";
3
- import { f as r } from "./focusDrawerMixin-CawyQaGq.js";
4
- const d = {
5
- // eslint-disable-next-line vue/no-reserved-component-names
6
- name: "Embed",
7
- i18nOptions: {
8
- namespaces: "embed",
9
- messages: {
10
- en: {
11
- subTitle: "Embed anything (PDFs, Google Docs, Calender Sheets...)"
12
- },
13
- sv: {
14
- subTitle: "Bädda in vad som helst (PDF:er, Google Docs, Calender Sheets...)"
15
- }
16
- }
17
- },
18
- components: {
19
- EmbedSettings: () => import("./EmbedSettings-YcwM8hJw.js"),
20
- EmbedInput: () => import("./EmbedInput-CheqYcNr.js"),
21
- Spinner: o
22
- },
23
- mixins: [i(["embed", "size"]), r],
24
- data() {
25
- return {
26
- showControls: !1,
27
- isLoading: !0
28
- };
29
- },
30
- methods: {
31
- onAdd() {
32
- const n = () => {
33
- this.$refs.input.focus();
34
- };
35
- this.$refs.input ? n() : this.$once("triggerOnAdd", n);
36
- }
37
- }
38
- };
39
- var m = function() {
40
- var e = this, s = e._self._c;
41
- return s("div", { staticClass: "embed-root font-inter", on: { "&mouseover": function(t) {
42
- e.showControls = !0;
43
- }, "&mouseleave": function(t) {
44
- e.showControls = !1;
45
- } } }, [s("div", { staticClass: "no-drag", class: [
46
- (e.size || !(e.embed && e.embed.src)) && "auto-size",
47
- `embed-is-${e.size}`
48
- ] }, [e.embed ? s("div", { staticClass: "embed-container" }, [!e.embed.src && e.canEdit ? s("div", { staticClass: "embed-element" }, [s("div", { staticClass: "is-placeholder" }, [s("div", { staticClass: "text-gray-600" }, [e._v(" " + e._s(e.$t("subTitle")) + " ")]), s("EmbedInput", { ref: "input", staticStyle: { "padding-top": "1em" }, on: { "hook:mounted": function(t) {
49
- return e.$emit("triggerOnAdd");
50
- } }, model: { value: e.embed, callback: function(t) {
51
- e.embed = t;
52
- }, expression: "embed" } })], 1)]) : e.embed.src ? s("iframe", e._b({ ref: "iframe", staticClass: "embed-element", on: { load: function(t) {
53
- e.isLoading = !1;
54
- } } }, "iframe", { allowfullscreen: "", ...e.embed }, !1)) : e._e(), e.embed.src && e.isLoading ? s("div", { staticClass: "embed-loading-container" }, [s("Spinner", { attrs: { color: "hsl(0, 0%, 60%)" } })], 1) : e._e()]) : e._e()]), e.isForm ? [e.showDrawer ? s("portal", { attrs: { to: "drawer-content" } }, [s("EmbedSettings", { attrs: { size: e.size }, on: { "update:size": function(t) {
55
- e.size = t;
56
- } }, model: { value: e.embed, callback: function(t) {
57
- e.embed = t;
58
- }, expression: "embed" } })], 1) : e._e()] : e._e()], 2);
59
- }, l = [], c = /* @__PURE__ */ a(
60
- d,
61
- m,
62
- l,
63
- !1,
64
- null,
65
- "ca826f69"
66
- );
67
- const p = c.exports;
68
- export {
69
- p as default
70
- };