@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,559 +0,0 @@
1
- import { m as g } from "./mapFormMixin-Ce3_WIKw.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-Bp2qcma0.js";
3
- import { s as v, p as y } from "./splitpanes-BHUVsCZF.js";
4
- import { t as w } from "./throttle-CfPxqhW_.js";
5
- import { W as m } from "./DocumentLayout-BJAyNjNa.js";
6
- import { e as p } from "./dom-CJxkno7i.js";
7
- import { d as _ } from "./debounce-BIchuVwa.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,57 +0,0 @@
1
- import { m as r } from "./mapFormMixin-Ce3_WIKw.js";
2
- import { q as l, n as o } from "./main-Bp2qcma0.js";
3
- const c = {
4
- name: "DocChapter",
5
- components: {
6
- CInput: l
7
- },
8
- mixins: [r(["title"])],
9
- props: {
10
- enableSpacingX: {
11
- type: Boolean,
12
- default: !0
13
- },
14
- enableSpacingY: {
15
- type: Boolean,
16
- default: !0
17
- },
18
- pdfSpacingX: {
19
- type: Boolean,
20
- default: !1
21
- }
22
- },
23
- methods: {
24
- // Naming convention used by generateTemplate-functions in order for it to choose whether or not to run on add
25
- conditionalOnAdd() {
26
- const a = () => this.$refs.input.focus();
27
- this.$refs.input ? a() : this.$once("triggerOnAdd", a);
28
- }
29
- }
30
- };
31
- var p = function() {
32
- var i;
33
- var t = this, n = t._self._c;
34
- return n("div", { staticClass: "chapter" }, [n("div", { staticClass: "no-drag", class: {
35
- "chapter-spacing-x": t.enableSpacingX,
36
- "chapter-spacing-y": t.enableSpacingY,
37
- "pdf-spacing-x": t.pdfSpacingX
38
- } }, [t.canEdit && ((i = t._value) != null && i.title) ? n("CInput", { ref: "input", staticClass: "title preview-title-input", attrs: { value: t.title, spellcheck: !1, placeholder: t.$t("components:account.documentForm.titleAndText.title"), static: "" }, on: { blur: (e) => {
39
- var s;
40
- t.title = ((s = e.target) == null ? void 0 : s.value) || "";
41
- }, "hook:mounted": function(e) {
42
- return t.$emit("triggerOnAdd");
43
- } }, nativeOn: { keydown: function(e) {
44
- return !e.type.indexOf("key") && t._k(e.keyCode, "enter", 13, e.key, "Enter") ? null : e.target.blur();
45
- } } }) : t.title ? n("div", { staticClass: "title" }, [t._v(" " + t._s(t.title) + " ")]) : t._e(), n("div", [t._t("default")], 2)], 1)]);
46
- }, d = [], u = /* @__PURE__ */ o(
47
- c,
48
- p,
49
- d,
50
- !1,
51
- null,
52
- "7afaa603"
53
- );
54
- const _ = u.exports;
55
- export {
56
- _ as default
57
- };
@@ -1,25 +0,0 @@
1
- import { m as e } from "./mapFormMixin-Ce3_WIKw.js";
2
- import { n as i } from "./main-Bp2qcma0.js";
3
- const m = {
4
- name: "EstimatedTimeToComplete",
5
- components: {
6
- Read: () => import("./Index-rQKoLISX.js"),
7
- Edit: () => import("./Index-CP2bsXd-.js")
8
- },
9
- mixins: [e(["noOfTimeUnits", "timeUnit"])]
10
- };
11
- var o = function() {
12
- var t = this, n = t._self._c;
13
- return t.canEdit ? n("Edit", t._g({ attrs: { _document: t._document, _value: t._value } }, t.$listeners)) : n("Read", { attrs: { "no-of-time-units": t.noOfTimeUnits, "time-unit": t.timeUnit } });
14
- }, r = [], s = /* @__PURE__ */ i(
15
- m,
16
- o,
17
- r,
18
- !1,
19
- null,
20
- null
21
- );
22
- const d = s.exports;
23
- export {
24
- d as default
25
- };