@cling-se/widget 0.9.8 → 0.9.10

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 (132) hide show
  1. package/.env +11 -11
  2. package/README.md +35 -35
  3. package/dist/{AddClientCallout-a45ee0f3.js → AddClientCallout-98b5d2c9.js} +5 -5
  4. package/dist/{AnswerModal-de2d4e05.js → AnswerModal-995e7a87.js} +7 -7
  5. package/dist/{AttachmentItem-3d18f509.js → AttachmentItem-331b9c1e.js} +4 -4
  6. package/dist/{BaseDatePicker-dea04782.js → BaseDatePicker-7f047527.js} +1 -1
  7. package/dist/{BaseInput-d1686e72.js → BaseInput-c79f0001.js} +1 -1
  8. package/dist/{BaseUpload-02c9e78f.js → BaseUpload-9402cc1b.js} +3 -3
  9. package/dist/{BlockMedia-620716a2.js → BlockMedia-80a082ed.js} +2 -2
  10. package/dist/{CCallout-2842d99e.js → CCallout-bd314caa.js} +6 -6
  11. package/dist/{CDropdownItem-c2f36de9.js → CDropdownItem-ab42f924.js} +5 -5
  12. package/dist/{CField-c089365f.js → CField-6da7299b.js} +1 -1
  13. package/dist/{CSlider.vue_vue_type_style_index_0_lang-3de2be04.js → CSlider.vue_vue_type_style_index_0_lang-c70342a2.js} +1 -1
  14. package/dist/{ClientAutocomplete-1288f9a7.js → ClientAutocomplete-67fc253c.js} +6 -6
  15. package/dist/{ClientModal-0863a0a5.js → ClientModal-1709e8c7.js} +5 -5
  16. package/dist/{ColorPicker-e0178aa9.js → ColorPicker-4880a624.js} +2 -2
  17. package/dist/{CompanyModal-902787de.js → CompanyModal-dbe85884.js} +4 -4
  18. package/dist/{ContentWrapper-b7748534.js → ContentWrapper-a602cc3d.js} +14 -14
  19. package/dist/{CoverBlockSettings-e108e279.js → CoverBlockSettings-f37fe6e1.js} +18 -18
  20. package/dist/DocAnswer-081e8239.js +33 -0
  21. package/dist/{DocForm-fdf870ec.js → DocForm-c69281fc.js} +152 -132
  22. package/dist/{DocFormSend-ad07f927.js → DocFormSend-c9b955b9.js} +19 -18
  23. package/dist/{DocModalBase-19bd9218.js → DocModalBase-8c238a59.js} +4 -4
  24. package/dist/{DocPrint-065067d3.js → DocPrint-2a181ffb.js} +5 -5
  25. package/dist/{DocReceipt-cd92f4bc.js → DocReceipt-00c0f631.js} +1 -1
  26. package/dist/{DocSendReminder-10240571.js → DocSendReminder-9effd808.js} +1 -1
  27. package/dist/{DocTextEditor-264eae51.js → DocTextEditor-0c8a4782.js} +12 -12
  28. package/dist/{DocTimeline-7ca06776.js → DocTimeline-be5e8b9d.js} +1 -1
  29. package/dist/{DocumentClient-11bb861b.js → DocumentClient-13f55b25.js} +5 -5
  30. package/dist/{DocumentLayout-2c0dde37.js → DocumentLayout-2ff55f9f.js} +120 -120
  31. package/dist/{DocumentLogotype-c63e9e2b.js → DocumentLogotype-80a2521a.js} +6 -6
  32. package/dist/{EmbedInput-f829347b.js → EmbedInput-8572a42b.js} +2 -2
  33. package/dist/{EmbedSettings-15c9c5d2.js → EmbedSettings-1a60358e.js} +5 -5
  34. package/dist/{ErrorCallout-9b4c45b0.js → ErrorCallout-84e8168b.js} +2 -2
  35. package/dist/{FilePreviewModal-3c976c4f.js → FilePreviewModal-cdafbf1c.js} +5 -5
  36. package/dist/{HeaderSettings-2bed2e49.js → HeaderSettings-9f4d182b.js} +15 -15
  37. package/dist/{ImageSelectModal-aa8a9196.js → ImageSelectModal-b97c8185.js} +10 -10
  38. package/dist/{ImageUploadWrapper-191b58cb.js → ImageUploadWrapper-ebcdbc9e.js} +3 -3
  39. package/dist/{Index-a0bce09c.js → Index-0022bc40.js} +4 -4
  40. package/dist/{Index-b3a5344a.js → Index-0306a974.js} +12 -12
  41. package/dist/{Index-e49bf365.js → Index-039d9c9d.js} +6 -6
  42. package/dist/{Index-2d0ce634.js → Index-0bbbe1cf.js} +11 -11
  43. package/dist/{Index-68c2e6e8.js → Index-0bd4a30c.js} +6 -6
  44. package/dist/{Index-584c31f5.js → Index-11d16691.js} +22 -22
  45. package/dist/{Index-30a2e82a.js → Index-2ecefac2.js} +4 -4
  46. package/dist/{Index-587512ed.js → Index-341f9388.js} +8 -8
  47. package/dist/{Index-6a834a9a.js → Index-3ccc66e4.js} +4 -4
  48. package/dist/{Index-7b7f6b0d.js → Index-451f5485.js} +5 -5
  49. package/dist/{Index-b8809785.js → Index-473d0fad.js} +3 -3
  50. package/dist/{Index-e75fb399.js → Index-4bbfdb2e.js} +2 -2
  51. package/dist/{Index-27a08871.js → Index-5428e87c.js} +11 -11
  52. package/dist/{Index-2efc79a6.js → Index-623bb993.js} +4 -4
  53. package/dist/{Index-09f3d14a.js → Index-6c782bef.js} +12 -12
  54. package/dist/{Index-81121ad2.js → Index-7b1fd376.js} +2 -2
  55. package/dist/{Index-f7910f63.js → Index-7f01697f.js} +7 -7
  56. package/dist/{Index-579a4b8e.js → Index-8053871b.js} +4 -4
  57. package/dist/{Index-49e83404.js → Index-8755440b.js} +5 -5
  58. package/dist/{Index-8c251698.js → Index-8c4fd5b4.js} +27 -27
  59. package/dist/{Index-fc0c3175.js → Index-8cba5dac.js} +26 -26
  60. package/dist/{Index-ca5a3caf.js → Index-8ecb9aa4.js} +2 -2
  61. package/dist/{Index-ef1edca1.js → Index-8eff4eae.js} +2 -2
  62. package/dist/{Index-77a0fd51.js → Index-95f0dd2f.js} +19 -19
  63. package/dist/{Index-b2b13e59.js → Index-9c5f5d6e.js} +7 -7
  64. package/dist/{Index-3af51db0.js → Index-b233276b.js} +2 -2
  65. package/dist/{Index-010b6c77.js → Index-ba4cfb80.js} +6 -6
  66. package/dist/{Index-4a3e4ff7.js → Index-c2b2ccd9.js} +8 -8
  67. package/dist/{Index-a8a278df.js → Index-dca28212.js} +2 -2
  68. package/dist/{Index-bc0448b7.js → Index-dd30bbc5.js} +12 -12
  69. package/dist/{Index-2b95c1b1.js → Index-ddf49640.js} +6 -6
  70. package/dist/{Index-491ca5f8.js → Index-de93e029.js} +7 -7
  71. package/dist/{Index-97ceff4a.js → Index-f9063054.js} +7 -7
  72. package/dist/{Index-466ac151.js → Index-ffc7dba1.js} +5 -5
  73. package/dist/{InputToggleRow-ff35c2ce.js → InputToggleRow-533651e6.js} +2 -2
  74. package/dist/{IsPremiumPreStep-3a45da09.js → IsPremiumPreStep-8d46fadc.js} +248 -242
  75. package/dist/{MediaWrapper-5714c933.js → MediaWrapper-388589e5.js} +3 -3
  76. package/dist/{NotBindingText-09b91d96.js → NotBindingText-b833c49b.js} +2 -2
  77. package/dist/{PackageGroup-8a819bad.js → PackageGroup-41b2d524.js} +15 -15
  78. package/dist/{PdfTerms-8f633637.js → PdfTerms-461fcd9e.js} +7 -7
  79. package/dist/{PdfViewer-c9707701.js → PdfViewer-099b598c.js} +2 -2
  80. package/dist/{PlainHtml-7e5c2f75.js → PlainHtml-37aa5b7b.js} +1 -1
  81. package/dist/PriceHeader-41c48787.js +337 -0
  82. package/dist/{SearchApi-941492e2.js → SearchApi-25909227.js} +2 -2
  83. package/dist/{TermsSettings-ef3ff7bd.js → TermsSettings-c730ac70.js} +10 -10
  84. package/dist/{ThemeColorRow-228b2150.js → ThemeColorRow-31d8285b.js} +3 -3
  85. package/dist/{ToggleBinding-864dd88b.js → ToggleBinding-1a98360f.js} +3 -3
  86. package/dist/{UploadModal-becfcb33.js → UploadModal-e0a37c3e.js} +4 -4
  87. package/dist/{VideoPlayerInput-22f9bd4d.js → VideoPlayerInput-4d7f302a.js} +3 -3
  88. package/dist/{VideoPlayerSettings-871ebafc.js → VideoPlayerSettings-81168a6b.js} +5 -5
  89. package/dist/{VideoSelectModal-7702dfef.js → VideoSelectModal-dc429ff0.js} +28 -28
  90. package/dist/{answerDocumentMixin-1cebd720.js → answerDocumentMixin-3ff2b25d.js} +3 -3
  91. package/dist/{cssMode-ecb6e1c1.js → cssMode-c6b1b286.js} +7 -7
  92. package/dist/{focusDrawerMixin-f736add2.js → focusDrawerMixin-01b547f0.js} +1 -1
  93. package/dist/{formComponentsInstall-2d3f76f6.js → formComponentsInstall-9e33cb8f.js} +20 -20
  94. package/dist/{formValidationMixin-e41d906a.js → formValidationMixin-74c239ee.js} +1 -1
  95. package/dist/{freemarker2-307c95a2.js → freemarker2-076519a0.js} +7 -7
  96. package/dist/{handlebars-81fcee8b.js → handlebars-bb155717.js} +7 -7
  97. package/dist/{html-968ef632.js → html-1cf008d9.js} +7 -7
  98. package/dist/{htmlMode-8db816bf.js → htmlMode-bf67fa2b.js} +7 -7
  99. package/dist/{index-df6392e8.js → index-0f09ca1c.js} +1 -1
  100. package/dist/{index-f44d3569.js → index-7097f05c.js} +10 -10
  101. package/dist/{index-072e7404.js → index-908333a3.js} +9 -9
  102. package/dist/{index-bfbed7c8.js → index-e37214e9.js} +3 -3
  103. package/dist/index.es.js +3 -3
  104. package/dist/index.umd.js +496 -493
  105. package/dist/{javascript-cea828eb.js → javascript-b98377f9.js} +8 -8
  106. package/dist/{jsonMode-9dc70f37.js → jsonMode-e9595a57.js} +7 -7
  107. package/dist/{liquid-a15e142f.js → liquid-b60636e3.js} +7 -7
  108. package/dist/{main-b6350bc3.js → main-cf622dd3.js} +26095 -25993
  109. package/dist/{mapFormMixin-48e32d23.js → mapFormMixin-490a1765.js} +1 -1
  110. package/dist/{publicSenderState-8ff674de.js → publicSenderState-6b369e21.js} +1 -1
  111. package/dist/{python-c1ad439e.js → python-4e4d18f5.js} +7 -7
  112. package/dist/{razor-29ed486f.js → razor-63ead89f.js} +7 -7
  113. package/dist/{simplebar.min-bd77544d.js → simplebar.min-3f1edc12.js} +1 -1
  114. package/dist/style.css +2 -2
  115. package/dist/{template-b8b398df.js → template-66eba036.js} +1 -1
  116. package/dist/throttle-2b45d29c.js +18 -0
  117. package/dist/{tinycolor-8a716699.js → tinycolor-9f3cc25c.js} +1 -1
  118. package/dist/{tippy.esm-be0516c8.js → tippy.esm-dec03596.js} +7 -7
  119. package/dist/{tsMode-b84b9fe6.js → tsMode-e93504e4.js} +7 -7
  120. package/dist/{typescript-2fb3afdc.js → typescript-111230d0.js} +7 -7
  121. package/dist/{utils-c1d2b87e.js → utils-fb02e603.js} +1 -1
  122. package/dist/{vuedraggable.umd-995319fc.js → vuedraggable.umd-f2d6d3e3.js} +1 -1
  123. package/dist/{xml-795e735c.js → xml-987e33cc.js} +7 -7
  124. package/jsconfig.json +11 -11
  125. package/package.json +4 -2
  126. package/postcss.config.cjs +6 -6
  127. package/stats.html +1 -1
  128. package/tailwind.config.cjs +26 -26
  129. package/vite-plugin-library-asset-external/index.js +134 -134
  130. package/dist/DocAnswer-2c75c7d8.js +0 -46
  131. package/dist/PriceHeader-04f93704.js +0 -337
  132. package/dist/throttle-62e7a6dd.js +0 -18
@@ -1,36 +1,36 @@
1
- import { aX as ce, aY as le, aZ as R, a_ as ue, a$ as A, b0 as S, b1 as oe, b2 as Pe, b3 as ze, b4 as be, i as xe, g as u, n as d, C as B, b5 as me, l as z, h as O, b6 as pe, b7 as ye, z as Xe, b8 as He, b9 as je, aW as he, ba as Le, M as c, a3 as P, c as o, aR as p, bb as Oe, bc as we, bd as ge, be as Te, B as Ne, bf as Ze, d as Ce, f as H, a2 as q, S as We, r as ke, ao as De, ad as Me, bg as Ve, aT as E, aU as I, I as W, bh as T, aV as Fe, bi as Je, V as w, bj as k, m as Ye, a as Ge, bk as Re, u as Ae } from "./main-b6350bc3.js";
1
+ import { aX as ce, aY as le, aZ as R, a_ as ue, a$ as A, b0 as S, b1 as oe, b2 as Pe, b3 as ze, b4 as be, f as xe, g as o, n as d, C as B, b5 as me, k as z, h as w, b6 as pe, b7 as ye, z as Xe, b8 as He, b9 as je, aW as he, ba as Le, M as c, a3 as P, b as u, aR as p, bb as Oe, bc as we, bd as ge, be as Te, B as Ne, bf as Ze, c as Ce, e as H, a2 as q, S as We, q as ke, ao as De, ad as Me, bg as Ve, V as j, aT as E, aU as I, I as W, bh as T, aV as Fe, bi as Je, bj as k, r as Ye, m as Ge, a as Re, bk as Ae } from "./main-cf622dd3.js";
2
2
  import { m as b, a as y } from "./vuex.esm-4a0fff7c.js";
3
- import "./index-df6392e8.js";
3
+ import "./index-0f09ca1c.js";
4
4
  import { v as Z } from "./index-805c56e4.js";
5
- import { d as C, w as j } from "./CDropdownItem-c2f36de9.js";
6
- import { D as Se, l as Be, g as qe, W as Ee, b as Ie, a as Ke } from "./DocumentLayout-2c0dde37.js";
7
- import { s as h } from "./simplebar.min-bd77544d.js";
8
- import { B as Ue } from "./BlockMedia-620716a2.js";
9
- import { b as Qe, I as K, a as U } from "./IsPremiumPreStep-3a45da09.js";
10
- import { c as _e, g as $e } from "./template-b8b398df.js";
11
- import { a as et } from "./tinycolor-8a716699.js";
12
- import { m as L } from "./mapFormMixin-48e32d23.js";
13
- import { S as tt, C as Q, i as nt } from "./formComponentsInstall-2d3f76f6.js";
14
- import { s as m, f as ft } from "./focusDrawerMixin-f736add2.js";
15
- import { f as rt } from "./formValidationMixin-e41d906a.js";
16
- import { F as _, d as st } from "./tippy.esm-be0516c8.js";
17
- import { S as vt } from "./CSlider.vue_vue_type_style_index_0_lang-3de2be04.js";
18
- import { o as at, d as it } from "./vuedraggable.umd-995319fc.js";
5
+ import { d as C, w as h } from "./CDropdownItem-ab42f924.js";
6
+ import { D as Se, l as Be, g as qe, W as Ee, b as Ie, a as Ke } from "./DocumentLayout-2ff55f9f.js";
7
+ import { s as L } from "./simplebar.min-3f1edc12.js";
8
+ import { B as Ue } from "./BlockMedia-80a082ed.js";
9
+ import { b as Qe, I as K, a as U } from "./IsPremiumPreStep-8d46fadc.js";
10
+ import { c as _e, g as $e } from "./template-66eba036.js";
11
+ import { a as et } from "./tinycolor-9f3cc25c.js";
12
+ import { m as O } from "./mapFormMixin-490a1765.js";
13
+ import { S as tt, C as Q, i as nt } from "./formComponentsInstall-9e33cb8f.js";
14
+ import { s as m, f as ft } from "./focusDrawerMixin-01b547f0.js";
15
+ import { f as rt } from "./formValidationMixin-74c239ee.js";
16
+ import { F as _, d as st } from "./tippy.esm-dec03596.js";
17
+ import { S as vt } from "./CSlider.vue_vue_type_style_index_0_lang-c70342a2.js";
18
+ import { o as at, d as it } from "./vuedraggable.umd-f2d6d3e3.js";
19
19
  import { s as dt } from "./dom-068d1a7b.js";
20
- import ct from "./AnswerModal-de2d4e05.js";
20
+ import ct from "./AnswerModal-995e7a87.js";
21
21
  import "./color-71c20583.js";
22
22
  import "./anime.es-e284c852.js";
23
23
  import "./regions-29ee6964.js";
24
- import "./BaseDatePicker-dea04782.js";
25
- import "./ErrorCallout-9b4c45b0.js";
26
- import "./AddClientCallout-a45ee0f3.js";
27
- import "./ClientAutocomplete-1288f9a7.js";
28
- import "./SearchApi-941492e2.js";
29
- import "./ClientModal-0863a0a5.js";
30
- import "./CCallout-2842d99e.js";
31
- import "./CField-c089365f.js";
24
+ import "./BaseDatePicker-7f047527.js";
25
+ import "./ErrorCallout-84e8168b.js";
26
+ import "./AddClientCallout-98b5d2c9.js";
27
+ import "./ClientAutocomplete-67fc253c.js";
28
+ import "./SearchApi-25909227.js";
29
+ import "./ClientModal-1709e8c7.js";
30
+ import "./CCallout-bd314caa.js";
31
+ import "./CField-6da7299b.js";
32
32
  import "./CField.vue_vue_type_style_index_0_lang-4ed993c7.js";
33
- import "./ColorPicker-e0178aa9.js";
33
+ import "./ColorPicker-4880a624.js";
34
34
  var lt = ce, ut = le, ot = R;
35
35
  function Pt(n, e, t) {
36
36
  for (var f = -1, r = e.length, s = {}; ++f < r; ) {
@@ -245,9 +245,9 @@ const M1 = {
245
245
  },
246
246
  methods: {
247
247
  ...y({
248
- loadTemplate: u.DO_LOAD_TEMPLATE,
249
- saveTemplate: u.SAVE_TEMPLATE_FORM,
250
- updateSettings: u.UPDATE_SETTINGS
248
+ loadTemplate: o.DO_LOAD_TEMPLATE,
249
+ saveTemplate: o.SAVE_TEMPLATE_FORM,
250
+ updateSettings: o.UPDATE_SETTINGS
251
251
  }),
252
252
  async onSave() {
253
253
  if (!this.document && !this.template && (this.$log.error('Missing prop "document" or "template"'), this.$emit("close")), this.$v.$invalid)
@@ -312,7 +312,7 @@ var V1 = function() {
312
312
  F1,
313
313
  !1,
314
314
  null,
315
- "9f39f8ce",
315
+ "f9bd0c75",
316
316
  null,
317
317
  null
318
318
  );
@@ -320,7 +320,7 @@ const ne = J1.exports;
320
320
  const Y1 = {
321
321
  name: "GalleryTemplateModal",
322
322
  components: {
323
- simplebar: h,
323
+ simplebar: L,
324
324
  DocumentLayout: Se
325
325
  },
326
326
  props: {
@@ -416,7 +416,7 @@ var G1 = function() {
416
416
  R1,
417
417
  !1,
418
418
  null,
419
- "c23a90b5",
419
+ "a06e4d2b",
420
420
  null,
421
421
  null
422
422
  );
@@ -539,7 +539,7 @@ const S1 = A1.exports, B1 = {
539
539
  const s = this.templateGalleryItems.find(({ id: v }) => v === t);
540
540
  this.selectGalleryItem(s);
541
541
  } catch (s) {
542
- O(s);
542
+ w(s);
543
543
  }
544
544
  });
545
545
  },
@@ -554,7 +554,7 @@ const S1 = A1.exports, B1 = {
554
554
  const t = await this.fetchGallery(e);
555
555
  this.templateGalleryItems = t || [], this.availableCategoryKeys = t.reduce((f, r) => [.../* @__PURE__ */ new Set([...f, ...r.categories])], []);
556
556
  } catch (t) {
557
- O(t);
557
+ w(t);
558
558
  } finally {
559
559
  this.isLoading = !1, typeof n == "function" && n();
560
560
  }
@@ -676,14 +676,14 @@ var Q1 = function(e, t) {
676
676
  t.listeners.click && t.listeners.click();
677
677
  } } }, "div", t.data.attrs, !1), [e("div", { staticClass: "item-paper" }, [t.props.thumbnail ? e("div", { staticStyle: { width: "100%", height: "100%", "background-size": "100% auto", "background-repeat": "no-repeat", "background-position": "0% 0%" }, style: {
678
678
  backgroundImage: `url(${t.props.thumbnail})`
679
- } }) : t.props.isPlaceholder || t.props.isAdd ? t._e() : e(t.injections.components.BlockMedia, { tag: "component", staticClass: "item-media", attrs: { media: t.props.media, preview: "" } }), t.props.isAdd ? e("div", { staticClass: "add-button" }, [e("BaseIcon", { attrs: { size: 18, "stroke-width": 3, type: "plus" } })], 1) : t._e()], 1), e("div", { staticClass: "item-footer" }, [t.props.isAdd ? e("div", { staticClass: "item-text", staticStyle: { color: "hsl(0, 0%, 55%)" }, domProps: { textContent: t._s(t.parent.$t("_common:empty", { thing: t.parent.$t("_common:template") })) } }) : t.props.name ? [e("div", { staticClass: "item-text", domProps: { textContent: t._s(t.$options.truncate(t.props.name, 60)) } }), t._t("default")] : t._e()], 2)]);
679
+ } }) : t.props.isPlaceholder || t.props.isAdd ? t._e() : e(t.injections.components.BlockMedia, { tag: "component", staticClass: "item-media", attrs: { media: t.props.media, preview: "" } }), t.scopedSlots.badge ? e("div", { staticClass: "absolute right-2 bottom-2" }, [t._t("badge")], 2) : t._e(), t.props.isAdd ? e("div", { staticClass: "add-button" }, [e("BaseIcon", { attrs: { size: 18, "stroke-width": 3, type: "plus" } })], 1) : t._e()], 1), e("div", { staticClass: "item-footer" }, [t.props.isAdd ? e("div", { staticClass: "item-text", staticStyle: { color: "hsl(0, 0%, 55%)" }, domProps: { textContent: t._s(t.parent.$t("_common:empty", { thing: t.parent.$t("_common:template") })) } }) : t.props.name ? [e("div", { staticClass: "item-text", domProps: { textContent: t._s(t.$options.truncate(t.props.name, 60)) } }), t._t("default")] : t._e()], 2)]);
680
680
  }, _1 = [], $1 = /* @__PURE__ */ d(
681
681
  U1,
682
682
  Q1,
683
683
  _1,
684
684
  !0,
685
685
  null,
686
- "6b8b46e0",
686
+ "4af01db0",
687
687
  null,
688
688
  null
689
689
  );
@@ -691,7 +691,7 @@ const e2 = $1.exports;
691
691
  const t2 = {
692
692
  name: "HorizontalScroll",
693
693
  components: {
694
- Simplebar: h
694
+ Simplebar: L
695
695
  },
696
696
  data() {
697
697
  return {
@@ -754,7 +754,7 @@ var n2 = function() {
754
754
  f2,
755
755
  !1,
756
756
  null,
757
- "15f25c8e",
757
+ "99e80a12",
758
758
  null,
759
759
  null
760
760
  );
@@ -793,7 +793,7 @@ const v2 = {
793
793
  },
794
794
  methods: {
795
795
  ...y({
796
- loadDocument: u.LOAD_DOCUMENT2
796
+ loadDocument: o.LOAD_DOCUMENT2
797
797
  }),
798
798
  async onInput() {
799
799
  this.isLoading = !0, this.onLoadDocuments();
@@ -861,7 +861,7 @@ var a2 = function() {
861
861
  i2,
862
862
  !1,
863
863
  null,
864
- "0096ccb0",
864
+ "917f8958",
865
865
  null,
866
866
  null
867
867
  );
@@ -884,7 +884,8 @@ const l2 = {
884
884
  cancel: "Avbryt"
885
885
  },
886
886
  icon: {
887
- tooltip: "Fler val"
887
+ tooltip: "Fler val",
888
+ freeTooltip: "Det här en gratismall som du kan använda obegränsat."
888
889
  }
889
890
  },
890
891
  en: {
@@ -901,13 +902,14 @@ const l2 = {
901
902
  cancel: "Cancel"
902
903
  },
903
904
  icon: {
904
- tooltip: "More options"
905
+ tooltip: "More options",
906
+ freeTooltip: "This is a template that you can use for free, without limitations."
905
907
  }
906
908
  }
907
909
  }
908
910
  },
909
- name: "DocumentFormSelect",
910
- mixins: [j],
911
+ name: "TemplateSelector",
912
+ mixins: [h],
911
913
  components: {
912
914
  HorizontalScroll: s2,
913
915
  DocumentIcon: e2,
@@ -947,6 +949,10 @@ const l2 = {
947
949
  listExpanded: {
948
950
  type: Boolean,
949
951
  default: !1
952
+ },
953
+ includePartnerTemplates: {
954
+ type: Boolean,
955
+ default: !1
950
956
  }
951
957
  },
952
958
  data() {
@@ -978,7 +984,7 @@ const l2 = {
978
984
  },
979
985
  myTemplates() {
980
986
  const n = [...this.availableTemplates];
981
- return !n.length && this.isFetchingTemplates ? Array(5).fill({ placeholder: !0 }) : [{ id: "empty" }, ...n];
987
+ return !n.length && this.isFetchingTemplates ? Array(5).fill({ placeholder: !0 }) : [{ id: "empty", doConsumeDocumentQuota: !0 }, ...n];
982
988
  },
983
989
  galleryModalProps() {
984
990
  const { fSkatt: n, insurance: e } = this.companySettings;
@@ -998,15 +1004,14 @@ const l2 = {
998
1004
  },
999
1005
  methods: {
1000
1006
  ...y({
1001
- loadTemplatesAction: u.LOAD_TEMPLATES,
1002
- loadTemplate: u.LOAD_TEMPLATE,
1003
- createTemplate: u.DO_CREATE_TEMPLATE,
1004
- hideTemplate: u.HIDE_TEMPLATE,
1005
- deleteTemplate: u.DELETE_TEMPLATE
1007
+ loadTemplatesAction: o.LOAD_TEMPLATES,
1008
+ loadTemplate: o.LOAD_TEMPLATE,
1009
+ createTemplate: o.DO_CREATE_TEMPLATE,
1010
+ removeTemplate: o.REMOVE_TEMPLATE
1006
1011
  }),
1007
1012
  loadTemplates() {
1008
1013
  const n = {};
1009
- this.defaultLanguage && (n.sharedLanguage = this.defaultLanguage), this.loadTemplatesAction(n), this.isAuthenticatedCRM("hubspot") && this.loadTemplate({ id: "hubspot" });
1014
+ this.defaultLanguage && (n.sharedLanguage = this.defaultLanguage), this.includePartnerTemplates && (n.includePartnerTemplates = !0), this.loadTemplatesAction(n), this.isAuthenticatedCRM("hubspot") && this.loadTemplate({ id: "hubspot" });
1010
1015
  },
1011
1016
  select({ templateId: n, documentId: e, formData: t }) {
1012
1017
  return this.onUseTemplate({
@@ -1022,13 +1027,10 @@ const l2 = {
1022
1027
  const { data: e } = n, t = he(e, ["_id", "id", "companyId", "isVisible"]);
1023
1028
  return await this.createTemplate({ body: t }), !0;
1024
1029
  } catch (e) {
1025
- O(e);
1030
+ w(e);
1026
1031
  }
1027
1032
  return !1;
1028
1033
  },
1029
- async onRemoveTemplate(n) {
1030
- n.companyId ? await this.deleteTemplate({ id: n.id }) : await this.hideTemplate({ id: n.id });
1031
- },
1032
1034
  async openTemplateFormModal({ document: n = null, template: e = null }) {
1033
1035
  this.$modal.show(
1034
1036
  ne,
@@ -1060,14 +1062,22 @@ var u2 = function() {
1060
1062
  } } }, e._l(e.myTemplates, function(f) {
1061
1063
  return t("DocumentIcon", { key: f.id, staticClass: "template-item", attrs: { "is-add": f.id === "empty", "is-placeholder": f.placeholder, media: f.defaultMedia || e.fallbackMedia, thumbnail: f.thumbnailUrl, name: f.name }, on: { click: function(r) {
1062
1064
  f.placeholder || e.select({ templateId: f.id });
1063
- } } }, [t("CDropdown", { staticStyle: { top: "-8px", right: "-4px" }, attrs: { "append-to-body": "" }, nativeOn: { click: function(r) {
1065
+ } } }, [!f.doConsumeDocumentQuota && !f.placeholder ? t("div", { staticClass: "text-sm capitalize font-bold text-white bg-primary-500 rounded leading-none px-1.5 py-1", attrs: { slot: "badge" }, slot: "badge" }, [e._v(" " + e._s(e.$t("_common:free")) + " ")]) : e._e(), f.onModify === "create" && !f.doConsumeDocumentQuota ? t("CButton", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: {
1066
+ content: e.$t("icon.freeTooltip"),
1067
+ placement: "bottom"
1068
+ }, expression: `{
1069
+ content: $t('icon.freeTooltip'),
1070
+ placement: 'bottom'
1071
+ }` }], staticStyle: { top: "-8px", right: "-4px" }, attrs: { icon: "info", type: "none", pattern: "tertiary", size: "small" }, nativeOn: { click: function(r) {
1072
+ r.stopPropagation();
1073
+ } } }) : t("CDropdown", { staticStyle: { top: "-8px", right: "-4px" }, attrs: { "append-to-body": "" }, nativeOn: { click: function(r) {
1064
1074
  r.stopPropagation();
1065
1075
  } } }, [t("CButton", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: e.$t("icon.tooltip"), expression: "$t('icon.tooltip')" }], attrs: { slot: "trigger", icon: "more-vertical", type: "none", pattern: "tertiary", size: "small" }, slot: "trigger" }), e.onEditTemplate ? t("CDropdownItem", { attrs: { "icon-left": "template-color" }, on: { click: function(r) {
1066
1076
  return e.onEditTemplate(f.id);
1067
1077
  } } }, [e._v(" " + e._s(e.$t("_common:edit", { thing: e.$t("_common:template") })) + " ")]) : e._e(), t("CDropdownItem", { attrs: { "icon-props": { size: 16 }, "icon-left": "edit" }, on: { click: function(r) {
1068
1078
  return e.openTemplateFormModal({ template: f });
1069
1079
  } } }, [e._v(" " + e._s(e.$t("_common:change", { thing: e.$t("_common:name") })) + " ")]), t("CDropdownItem", { attrs: { separator: "" } }), t("CDropdownItem", { attrs: { "icon-props": { size: 16, stroke: "hsl(360, 100%, 60%)" }, "icon-left": "trash" }, on: { click: function(r) {
1070
- return e.onRemoveTemplate(f);
1080
+ return e.removeTemplate({ template: f });
1071
1081
  } } }, [e._v(" " + e._s(e.$t("_common:remove")) + " ")])], 1)], 1);
1072
1082
  }), 1)], 1), e.showGallery ? [t("GalleryLogic", { attrs: { "fetch-gallery": e.fetchGallery, "use-template": e.select, "show-template-author": e.showGalleryTemplateAuthor, "modal-props": e.galleryModalProps }, scopedSlots: e._u([{ key: "default", fn: function({
1073
1083
  galleryItems: f,
@@ -1094,7 +1104,7 @@ var u2 = function() {
1094
1104
  o2,
1095
1105
  !1,
1096
1106
  null,
1097
- "8de0763f",
1107
+ "f1ac5587",
1098
1108
  null,
1099
1109
  null
1100
1110
  );
@@ -2387,7 +2397,7 @@ const l3 = ({
2387
2397
  _getters: t,
2388
2398
  allArticles: f = []
2389
2399
  } = {}) => {
2390
- const r = o(t, "settings/defaultVatRate") || null, s = !o(t, "settings/hidePriceOnNewlyAddedArticles"), v = (a) => P.t(`packageGroupContentItems:${a}`, { lng: n });
2400
+ const r = u(t, "settings/defaultVatRate") || null, s = !u(t, "settings/hidePriceOnNewlyAddedArticles"), v = (a) => P.t(`packageGroupContentItems:${a}`, { lng: n });
2391
2401
  return [
2392
2402
  {
2393
2403
  previewUrl: `
@@ -3444,7 +3454,7 @@ var w3 = function() {
3444
3454
  g3,
3445
3455
  !1,
3446
3456
  null,
3447
- "3cb13e4e",
3457
+ "d54a4290",
3448
3458
  null,
3449
3459
  null
3450
3460
  );
@@ -3481,11 +3491,11 @@ const N3 = {
3481
3491
  CButton: Ce
3482
3492
  },
3483
3493
  mixins: [
3484
- L([], {
3494
+ O([], {
3485
3495
  useEmit: !1,
3486
3496
  setFnName: "setFormValue"
3487
3497
  }),
3488
- j
3498
+ h
3489
3499
  ],
3490
3500
  props: {
3491
3501
  setFormValue: {
@@ -3523,7 +3533,7 @@ const N3 = {
3523
3533
  return !!(this.viewSettings && this.viewSettings.isPublicForm);
3524
3534
  },
3525
3535
  hasAnswerBlock() {
3526
- return (o(this._document, "template.views.read.nodes") || []).some((e) => e.itemType === "answer");
3536
+ return (u(this._document, "template.views.read.nodes") || []).some((e) => e.itemType === "answer");
3527
3537
  }
3528
3538
  },
3529
3539
  watch: {
@@ -3540,7 +3550,7 @@ const N3 = {
3540
3550
  },
3541
3551
  methods: {
3542
3552
  ...y({
3543
- createTemplate: u.DO_CREATE_TEMPLATE
3553
+ createTemplate: o.DO_CREATE_TEMPLATE
3544
3554
  }),
3545
3555
  open() {
3546
3556
  this.isOpen = !0;
@@ -3550,7 +3560,7 @@ const N3 = {
3550
3560
  return;
3551
3561
  const n = {
3552
3562
  ...this._document.copyTemplateDocDefault(),
3553
- name: o(this._document, "name") || this.$t("_common:untitled"),
3563
+ name: u(this._document, "name") || this.$t("_common:untitled"),
3554
3564
  _id: void 0,
3555
3565
  id: void 0,
3556
3566
  isVisible: !0
@@ -3583,7 +3593,7 @@ var Z3 = function() {
3583
3593
  C3,
3584
3594
  !1,
3585
3595
  null,
3586
- "7cbf7355",
3596
+ "fb3658be",
3587
3597
  null,
3588
3598
  null
3589
3599
  );
@@ -3662,7 +3672,7 @@ var G3 = function() {
3662
3672
  R3,
3663
3673
  !1,
3664
3674
  null,
3665
- "9b75010b",
3675
+ "d394713b",
3666
3676
  null,
3667
3677
  null
3668
3678
  );
@@ -3678,7 +3688,7 @@ const S3 = /([\d+.]*)(.*)/, X = (n) => (n || "").match(S3), B3 = {
3678
3688
  DragWindow: se
3679
3689
  },
3680
3690
  mixins: [
3681
- L(
3691
+ O(
3682
3692
  ["css"],
3683
3693
  { useEmit: !1, setFnName: "set" }
3684
3694
  )
@@ -3747,7 +3757,7 @@ const S3 = /([\d+.]*)(.*)/, X = (n) => (n || "").match(S3), B3 = {
3747
3757
  // Dynamic depending on font family
3748
3758
  definitionOptions: {
3749
3759
  fontFamily: ({ key: n, value: e }) => {
3750
- const t = o(this.css, `${this.activeItem.selector}.fontWeight`) || o(this.activeItem, "style.fontWeight") || "400";
3760
+ const t = u(this.css, `${this.activeItem.selector}.fontWeight`) || u(this.activeItem, "style.fontWeight") || "400";
3751
3761
  return {
3752
3762
  label: this.$t("font"),
3753
3763
  inputs: [
@@ -4199,7 +4209,7 @@ const S3 = /([\d+.]*)(.*)/, X = (n) => (n || "").match(S3), B3 = {
4199
4209
  activeItemOptions() {
4200
4210
  if (!this.activeItem)
4201
4211
  return [];
4202
- const { selector: n, category: e, style: t = {} } = this.activeItem, f = o(this.css, n) || {}, r = (s) => f[s] || t[s];
4212
+ const { selector: n, category: e, style: t = {} } = this.activeItem, f = u(this.css, n) || {}, r = (s) => f[s] || t[s];
4203
4213
  return this[e].map(({ option: s, key: v }, a) => {
4204
4214
  const i = this.definitionOptions[s], l = Array.isArray(v) ? v.map((x) => ({ key: x, value: r(x) })) : { key: v, value: r(v) };
4205
4215
  return i(l, a);
@@ -4208,7 +4218,7 @@ const S3 = /([\d+.]*)(.*)/, X = (n) => (n || "").match(S3), B3 = {
4208
4218
  },
4209
4219
  watch: {
4210
4220
  async activeItem(n) {
4211
- const e = o(n, "style.fontFamily");
4221
+ const e = u(n, "style.fontFamily");
4212
4222
  e && (this.fontWeightOptions = await qe(e));
4213
4223
  }
4214
4224
  },
@@ -4246,7 +4256,7 @@ var q3 = function() {
4246
4256
  E3,
4247
4257
  !1,
4248
4258
  null,
4249
- "930a4202",
4259
+ "1ead8632",
4250
4260
  null,
4251
4261
  null
4252
4262
  );
@@ -4341,7 +4351,7 @@ const U3 = {
4341
4351
  },
4342
4352
  created() {
4343
4353
  if (this.existingFieldId) {
4344
- const n = o(this.document, `fields.${this.existingFieldId}`);
4354
+ const n = u(this.document, `fields.${this.existingFieldId}`);
4345
4355
  n && (this.form = { ...this.form, ...n });
4346
4356
  }
4347
4357
  },
@@ -4383,7 +4393,7 @@ var Q3 = function() {
4383
4393
  _3,
4384
4394
  !1,
4385
4395
  null,
4386
- "5cc44007",
4396
+ "e9078ef4",
4387
4397
  null,
4388
4398
  null
4389
4399
  );
@@ -4416,7 +4426,7 @@ const tn = {
4416
4426
  CAccordion: Qe,
4417
4427
  CField: Q
4418
4428
  },
4419
- mixins: [L()],
4429
+ mixins: [O()],
4420
4430
  props: {
4421
4431
  set: {
4422
4432
  type: Function,
@@ -4510,7 +4520,7 @@ const tn = {
4510
4520
  );
4511
4521
  },
4512
4522
  onCopyField(n) {
4513
- navigator && navigator.clipboard && n && navigator.clipboard.writeText(n).then(() => q("info", this.$t("_common:copyMessage"))).catch((e) => O(e));
4523
+ navigator && navigator.clipboard && n && navigator.clipboard.writeText(n).then(() => q("info", this.$t("_common:copyMessage"))).catch((e) => w(e));
4514
4524
  },
4515
4525
  filterMethod(n, e) {
4516
4526
  return e.filter((t) => t.label.toLowerCase().includes(n.toLowerCase()));
@@ -4572,7 +4582,7 @@ var nn = function() {
4572
4582
  fn,
4573
4583
  !1,
4574
4584
  null,
4575
- "ef9c2946",
4585
+ "d4a32633",
4576
4586
  null,
4577
4587
  null
4578
4588
  );
@@ -4623,7 +4633,7 @@ const vn = {
4623
4633
  draggable: it,
4624
4634
  Spinner: We
4625
4635
  },
4626
- mixins: [L([
4636
+ mixins: [O([
4627
4637
  "externalReferences",
4628
4638
  "clients",
4629
4639
  "articles"
@@ -4805,7 +4815,7 @@ var an = function() {
4805
4815
  dn,
4806
4816
  !1,
4807
4817
  null,
4808
- "b775e9f9",
4818
+ "37eb1ef8",
4809
4819
  null,
4810
4820
  null
4811
4821
  );
@@ -4907,7 +4917,7 @@ const un = {
4907
4917
  required: !0
4908
4918
  }
4909
4919
  },
4910
- mixins: [L([
4920
+ mixins: [O([
4911
4921
  "tags",
4912
4922
  "series",
4913
4923
  "senderId",
@@ -5098,7 +5108,7 @@ const un = {
5098
5108
  },
5099
5109
  methods: {
5100
5110
  ...y({
5101
- loadUsers: u.LOAD_COMPANY_USERS
5111
+ loadUsers: o.LOAD_COMPANY_USERS
5102
5112
  }),
5103
5113
  update(n, e) {
5104
5114
  this[n] = e;
@@ -5130,7 +5140,7 @@ var on = function() {
5130
5140
  Pn,
5131
5141
  !1,
5132
5142
  null,
5133
- "1601b625",
5143
+ "539898df",
5134
5144
  null,
5135
5145
  null
5136
5146
  );
@@ -5262,10 +5272,14 @@ var gn = function() {
5262
5272
  null
5263
5273
  );
5264
5274
  const Zn = Nn.exports;
5265
- const Cn = {
5275
+ const Cn = j.component("ProBadge", {
5266
5276
  name: "ProBadge",
5267
- template: '<div class="text-[10px] font-semibold text-white bg-primary-500 rounded leading-none px-1.5 py-1">Pro</div>'
5268
- }, Wn = {
5277
+ render(n) {
5278
+ return n("div", {
5279
+ staticClass: "text-[10px] font-semibold text-white bg-primary-500 rounded leading-none px-1.5 py-1"
5280
+ }, "Pro");
5281
+ }
5282
+ }), Wn = {
5269
5283
  name: "MenuBlocks",
5270
5284
  i18nOptions: {
5271
5285
  namespaces: "menuBlocks",
@@ -5335,7 +5349,7 @@ const Cn = {
5335
5349
  }
5336
5350
  },
5337
5351
  components: {
5338
- simplebar: h,
5352
+ simplebar: L,
5339
5353
  DragList: E,
5340
5354
  DragItem: I,
5341
5355
  AddBlock: fe,
@@ -5365,7 +5379,7 @@ const Cn = {
5365
5379
  default: !0
5366
5380
  }
5367
5381
  },
5368
- mixins: [j],
5382
+ mixins: [h],
5369
5383
  data() {
5370
5384
  return {
5371
5385
  subMenuToShow: null,
@@ -5643,7 +5657,7 @@ const Cn = {
5643
5657
  return this.availableBlocks.filter(({ key: n }) => !this.primaryFilterNames.includes(n));
5644
5658
  },
5645
5659
  activeSubMenuKey() {
5646
- return o(this.activeSubMenu, "[0].key") || null;
5660
+ return u(this.activeSubMenu, "[0].key") || null;
5647
5661
  }
5648
5662
  // section key is added to each element in the menu
5649
5663
  },
@@ -5719,7 +5733,7 @@ const Cn = {
5719
5733
  return !this.feature(`docBlock_${n}`);
5720
5734
  },
5721
5735
  doesBlockExist(n) {
5722
- return !!o(this._document, "_doc.template.views.read.nodes", []).find((t) => t.itemId.startsWith(n));
5736
+ return !!u(this._document, "_doc.template.views.read.nodes", []).find((t) => t.itemId.startsWith(n));
5723
5737
  },
5724
5738
  getGhostParent() {
5725
5739
  var t, f;
@@ -5784,7 +5798,7 @@ var kn = function() {
5784
5798
  Dn,
5785
5799
  !1,
5786
5800
  null,
5787
- "4ce1e5ea",
5801
+ "9961b977",
5788
5802
  null,
5789
5803
  null
5790
5804
  );
@@ -5921,7 +5935,7 @@ var Jn = function() {
5921
5935
  Yn,
5922
5936
  !1,
5923
5937
  null,
5924
- "49f05ec2",
5938
+ "279bcfd8",
5925
5939
  null,
5926
5940
  null
5927
5941
  );
@@ -5975,7 +5989,7 @@ var Sn = function() {
5975
5989
  Bn,
5976
5990
  !1,
5977
5991
  null,
5978
- "79921f13",
5992
+ "33152708",
5979
5993
  null,
5980
5994
  null
5981
5995
  );
@@ -6061,7 +6075,7 @@ var Kn = function() {
6061
6075
  Un,
6062
6076
  !1,
6063
6077
  null,
6064
- "60aa95ad",
6078
+ "cd626093",
6065
6079
  null,
6066
6080
  null
6067
6081
  );
@@ -6069,7 +6083,7 @@ const _n = Qn.exports;
6069
6083
  const $n = {
6070
6084
  name: "DocumentDrawer",
6071
6085
  components: {
6072
- simplebar: h,
6086
+ simplebar: L,
6073
6087
  Drawer: re
6074
6088
  },
6075
6089
  props: {
@@ -6110,7 +6124,7 @@ var e7 = function() {
6110
6124
  t7,
6111
6125
  !1,
6112
6126
  null,
6113
- "f0a56edd",
6127
+ "bce8bd6b",
6114
6128
  null,
6115
6129
  null
6116
6130
  );
@@ -6141,7 +6155,7 @@ var s7 = function() {
6141
6155
  v7,
6142
6156
  !1,
6143
6157
  null,
6144
- "bfd27279",
6158
+ "89f0c419",
6145
6159
  null,
6146
6160
  null
6147
6161
  );
@@ -6189,7 +6203,7 @@ var z7 = function() {
6189
6203
  b7,
6190
6204
  !1,
6191
6205
  null,
6192
- "05fc111c",
6206
+ "51b7dda2",
6193
6207
  null,
6194
6208
  null
6195
6209
  );
@@ -6226,7 +6240,7 @@ const ve = (n, e, t = "$children") => {
6226
6240
  DocumentFormNav: m7,
6227
6241
  DocumentDrawer: f7,
6228
6242
  DocumentStyleContainer: Ke,
6229
- simplebar: h,
6243
+ simplebar: L,
6230
6244
  LogoBanner: o7,
6231
6245
  IsPremium: U
6232
6246
  },
@@ -6265,7 +6279,7 @@ const ve = (n, e, t = "$children") => {
6265
6279
  default: !0
6266
6280
  }
6267
6281
  },
6268
- mixins: [j],
6282
+ mixins: [h],
6269
6283
  data() {
6270
6284
  return {
6271
6285
  drawerState: m,
@@ -6280,28 +6294,28 @@ const ve = (n, e, t = "$children") => {
6280
6294
  },
6281
6295
  computed: {
6282
6296
  docTemplate() {
6283
- return o(this._document, "template", null);
6297
+ return u(this._document, "template", null);
6284
6298
  },
6285
6299
  isTemplateEditable() {
6286
- return o(this.docTemplate, "views.read.isEditable", !1);
6300
+ return u(this.docTemplate, "views.read.isEditable", !1);
6287
6301
  },
6288
6302
  canMove() {
6289
6303
  return this.isTemplateEditable && this.isEditView;
6290
6304
  },
6291
6305
  readLayout() {
6292
- return o(this.docTemplate, "views.read.nodes", []);
6306
+ return u(this.docTemplate, "views.read.nodes", []);
6293
6307
  },
6294
6308
  nestedReadLayout() {
6295
6309
  return this._document.getReadLayout({ showHiddenNodes: this.isEditView });
6296
6310
  },
6297
6311
  currency() {
6298
- return o(this._document, "currency");
6312
+ return u(this._document, "currency");
6299
6313
  },
6300
6314
  externalReferences() {
6301
- return o(this._document, "externalReferences") || [];
6315
+ return u(this._document, "externalReferences") || [];
6302
6316
  },
6303
6317
  headingColor() {
6304
- return o(this._document, "theme.headingColor");
6318
+ return u(this._document, "theme.headingColor");
6305
6319
  },
6306
6320
  isEditView() {
6307
6321
  return this.view === "edit";
@@ -6397,11 +6411,11 @@ const ve = (n, e, t = "$children") => {
6397
6411
  Array.isArray(e.packages) && e.packages.forEach((f) => {
6398
6412
  this.setFormValue({
6399
6413
  key: "articles",
6400
- value: o(this._document, "_doc.articles", []).filter(({ packageId: r }) => r !== f.packageId)
6414
+ value: u(this._document, "_doc.articles", []).filter(({ packageId: r }) => r !== f.packageId)
6401
6415
  });
6402
6416
  });
6403
- const t = Object.assign({}, o(this._document, "_doc.data.packageGroups"));
6404
- delete t[n], this.setFormValue({ key: "data.packageGroups", value: t }), Object.keys(o(this._document, "_doc.data.packageGroups", {})).length || this.removeFormValue("template.validationSchema.properties.data.properties.packageGroups");
6417
+ const t = Object.assign({}, u(this._document, "_doc.data.packageGroups"));
6418
+ delete t[n], this.setFormValue({ key: "data.packageGroups", value: t }), Object.keys(u(this._document, "_doc.data.packageGroups", {})).length || this.removeFormValue("template.validationSchema.properties.data.properties.packageGroups");
6405
6419
  },
6406
6420
  onBlockListChange(n, { removedIndex: e, addedIndex: t, payload: f }) {
6407
6421
  if (e !== null && t !== null) {
@@ -6519,11 +6533,11 @@ var y7 = function() {
6519
6533
  X7,
6520
6534
  !1,
6521
6535
  null,
6522
- "bc2f56f0",
6536
+ "6eacc434",
6523
6537
  null,
6524
6538
  null
6525
6539
  );
6526
- const j7 = H7.exports, N = w.observable({
6540
+ const j7 = H7.exports, N = j.observable({
6527
6541
  canEdit: !1,
6528
6542
  isForm: !0,
6529
6543
  setFormValue: null
@@ -6599,7 +6613,7 @@ const j7 = H7.exports, N = w.observable({
6599
6613
  },
6600
6614
  computed: {
6601
6615
  canDoActions() {
6602
- return !!o(this.document, "template.views.read.nodes", []).length;
6616
+ return !!u(this.document, "template.views.read.nodes", []).length;
6603
6617
  },
6604
6618
  canEdit() {
6605
6619
  const { document: n } = this;
@@ -6724,7 +6738,7 @@ const T7 = {
6724
6738
  },
6725
6739
  methods: {
6726
6740
  ...y({
6727
- loadDocument: u.LOAD_DOCUMENT2
6741
+ loadDocument: o.LOAD_DOCUMENT2
6728
6742
  }),
6729
6743
  copyToClipboard(n) {
6730
6744
  n.target.previousElementSibling.select(), document.execCommand("copy", !1), q("info", this.$t("copied"));
@@ -6744,14 +6758,14 @@ var N7 = function() {
6744
6758
  Z7,
6745
6759
  !1,
6746
6760
  null,
6747
- "791a9a8f",
6761
+ "27127273",
6748
6762
  null,
6749
6763
  null
6750
6764
  );
6751
6765
  const W7 = C7.exports, k7 = W7, D7 = ({ id: n }) => {
6752
- if (!w.prototype.$modal)
6766
+ if (!j.prototype.$modal)
6753
6767
  throw Error("Open client modal requires plugin vue-js-modal");
6754
- w.prototype.$modal.show(
6768
+ j.prototype.$modal.show(
6755
6769
  k7,
6756
6770
  {
6757
6771
  id: n
@@ -6767,7 +6781,7 @@ const W7 = C7.exports, k7 = W7, D7 = ({ id: n }) => {
6767
6781
  };
6768
6782
  const M7 = {
6769
6783
  name: "PostDocumentSend",
6770
- mixins: [j],
6784
+ mixins: [h],
6771
6785
  i18nOptions: {
6772
6786
  namespaces: "PostDocumentSend",
6773
6787
  messages: {
@@ -6812,9 +6826,9 @@ const M7 = {
6812
6826
  },
6813
6827
  methods: {
6814
6828
  ...y({
6815
- updateDocument: u.DO_UPDATE_DOCUMENT2,
6816
- answerDocument: u.ANSWER_OWN_DOCUMENT2,
6817
- sendDocument: u.DO_SEND_DOCUMENT2
6829
+ updateDocument: o.DO_UPDATE_DOCUMENT2,
6830
+ answerDocument: o.ANSWER_OWN_DOCUMENT2,
6831
+ sendDocument: o.DO_SEND_DOCUMENT2
6818
6832
  }),
6819
6833
  async handleDocumentLinks() {
6820
6834
  const { id: n } = this.document, e = k(this.document), t = !e.sms && !e.email;
@@ -6899,9 +6913,10 @@ var V7 = function() {
6899
6913
  null
6900
6914
  );
6901
6915
  const Y7 = J7.exports;
6902
- w.use(nt);
6916
+ j.use(nt);
6903
6917
  const G7 = {
6904
6918
  name: "DocForm",
6919
+ mixins: [Ye(["closeFunc"])],
6905
6920
  i18nOptions: {
6906
6921
  namespaces: "widgetDocForm",
6907
6922
  messages: {
@@ -6937,7 +6952,7 @@ const G7 = {
6937
6952
  };
6938
6953
  },
6939
6954
  computed: {
6940
- ...Ye({
6955
+ ...Ge({
6941
6956
  company: "application/company",
6942
6957
  feature: "application/feature",
6943
6958
  can: "application/can",
@@ -6966,14 +6981,14 @@ const G7 = {
6966
6981
  (!this.rawDoc || (n = this.rawDoc) != null && n.__isNew) && (this.view = "templateSelect");
6967
6982
  },
6968
6983
  methods: {
6969
- ...Ge({
6970
- setFormValue: u.SET_FORM_VALUE,
6971
- removeFormValue: u.REMOVE_FORM_VALUE,
6972
- removeFormKeyValue: u.REMOVE_FORM_KEY_VALUE,
6973
- loadDocumentForm: u.LOAD_DOCUMENT2_FORM,
6974
- duplicateDocumentForm: u.LOAD_DUPLICATE_DOCUMENT2_FORM,
6975
- saveDocument: u.SAVE_DYNDOC_FORM,
6976
- loadCompanyUser: u.LOAD_COMPANY_USER
6984
+ ...Re({
6985
+ setFormValue: o.SET_FORM_VALUE,
6986
+ removeFormValue: o.REMOVE_FORM_VALUE,
6987
+ removeFormKeyValue: o.REMOVE_FORM_KEY_VALUE,
6988
+ loadDocumentForm: o.LOAD_DOCUMENT2_FORM,
6989
+ duplicateDocumentForm: o.LOAD_DUPLICATE_DOCUMENT2_FORM,
6990
+ saveDocument: o.SAVE_DYNDOC_FORM,
6991
+ loadCompanyUser: o.LOAD_COMPANY_USER
6977
6992
  }),
6978
6993
  async initDoc() {
6979
6994
  if (!this.rawDoc)
@@ -6998,7 +7013,7 @@ const G7 = {
6998
7013
  _formData: f
6999
7014
  }) : await this.loadDocumentForm({
7000
7015
  templateId: n,
7001
- formData: t ? Re(t, f) : null,
7016
+ formData: t ? Ae(t, f) : null,
7002
7017
  _formData: f
7003
7018
  }), (r = f == null ? void 0 : f.data) != null && r.name && this.setDocValue({ key: "data.name", value: f.data.name }), await this.initDoc(), this.view = "editor";
7004
7019
  },
@@ -7016,7 +7031,12 @@ const G7 = {
7016
7031
  n && (t != null && t.senderClient) ? (this.document = t, this.view = "postSend") : this.close();
7017
7032
  },
7018
7033
  close() {
7019
- Ae.open = !1;
7034
+ if (this.closeFunc)
7035
+ this.closeFunc();
7036
+ else
7037
+ throw new Error(
7038
+ "[DocForm] closeFunc is missing from route params. Make sure to set it from ui"
7039
+ );
7020
7040
  },
7021
7041
  goBack() {
7022
7042
  this.view = "templateSelect", this.setDocValue({ key: "__isNew", value: !0 });
@@ -7025,7 +7045,7 @@ const G7 = {
7025
7045
  };
7026
7046
  var R7 = function() {
7027
7047
  var e = this, t = e._self._c;
7028
- return t("div", { staticClass: "flex flex-col w-full h-full" }, [e.view === "templateSelect" ? t("div", { staticClass: "flex flex-col w-full h-full" }, [t("div", { staticClass: "relative flex items-center justify-center h-16 border-b border-gray-200" }, [t("CButton", { staticClass: "absolute -translate-y-1/2 top-1/2 left-4", attrs: { icon: "x", circle: "" }, on: { click: e.close } }), t("div", [e._v(e._s(e.$t("selectNavTitle")))])], 1), t("TemplateSelector", { staticClass: "min-h-0 body-scroll", attrs: { "on-use-template": e.onTemplateSelect, "show-gallery": e.feature("templateGallery"), "show-gallery-template-author": !1 } })], 1) : e.view === "editor" ? t("DocumentEditor", { attrs: { document: e.document, "set-doc-value": e.setDocValue, "set-form-value": e.setFormValue, "remove-doc-value": e.removeDocValue, "remove-doc-key-value": e.removeDocKeyValue, "on-save-document": e.onSaveDocument, "is-loading": e.isPosting, close: e.close, "go-back": e.goBack, "can-show-banner": !1 } }) : t("PostSend", { attrs: { document: e.document, "on-send-func": e.close, "on-close-func": e.close } })], 1);
7048
+ return t("div", { staticClass: "flex flex-col w-full h-full" }, [e.view === "templateSelect" ? t("div", { staticClass: "flex flex-col w-full h-full" }, [t("div", { staticClass: "relative flex items-center justify-center h-16 border-b border-gray-200" }, [t("CButton", { staticClass: "absolute -translate-y-1/2 top-1/2 left-4", attrs: { icon: "x", circle: "" }, on: { click: e.close } }), t("div", [e._v(e._s(e.$t("selectNavTitle")))])], 1), t("TemplateSelector", { staticClass: "min-h-0 body-scroll", attrs: { "on-use-template": e.onTemplateSelect, "show-gallery": e.feature("templateGallery"), "show-gallery-template-author": !1, "include-partner-templates": "" } })], 1) : e.view === "editor" ? t("DocumentEditor", { attrs: { document: e.document, "set-doc-value": e.setDocValue, "set-form-value": e.setFormValue, "remove-doc-value": e.removeDocValue, "remove-doc-key-value": e.removeDocKeyValue, "on-save-document": e.onSaveDocument, "is-loading": e.isPosting, close: e.close, "go-back": e.goBack, "can-show-banner": !1 } }) : t("PostSend", { attrs: { document: e.document, "on-send-func": e.close, "on-close-func": e.close } })], 1);
7029
7049
  }, A7 = [], S7 = /* @__PURE__ */ d(
7030
7050
  G7,
7031
7051
  R7,