@cling-se/widget 0.3.2 → 0.3.3

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 (105) hide show
  1. package/.env +4 -4
  2. package/dist/{DocFormSend.58fbdade.js → DocFormSend.8754868e.js} +6 -6
  3. package/dist/{DocSendReminder.610e6f1b.js → DocSendReminder.d98e3f1e.js} +16 -14
  4. package/dist/DocTimeline.281a4dbc.js +379 -0
  5. package/dist/{index.c2181b71.js → index.0064b913.js} +1 -1
  6. package/dist/{index.ed2c5306.js → index.03eb849d.js} +1 -1
  7. package/dist/{index.5e93a4a4.js → index.06ae19a2.js} +1 -1
  8. package/dist/{index.7c5aed5b.js → index.0b00c821.js} +1 -1
  9. package/dist/{index.c934c6af.js → index.0b0db0bd.js} +1 -1
  10. package/dist/{index.291b2b54.js → index.0bc608d5.js} +1 -1
  11. package/dist/{index.1c92d26c.js → index.0c336ba9.js} +1 -1
  12. package/dist/{index.fbc2bf20.js → index.0ceaa718.js} +1 -1
  13. package/dist/{index.764b658e.js → index.0ef1a3a6.js} +1 -1
  14. package/dist/{index.83910d3f.js → index.1503d863.js} +1 -1
  15. package/dist/{index.dc39016c.js → index.15ee0ab9.js} +1 -1
  16. package/dist/{index.b4904461.js → index.168c2bce.js} +1 -1
  17. package/dist/{index.27304047.js → index.16902632.js} +1 -1
  18. package/dist/{index.bf3d1093.js → index.18701043.js} +1 -1
  19. package/dist/{index.0c6034f0.js → index.198d78b9.js} +1 -1
  20. package/dist/{index.218b46ae.js → index.1b27357e.js} +1 -1
  21. package/dist/{index.b6512901.js → index.1bc3c82c.js} +1 -1
  22. package/dist/{index.0372fc9a.js → index.1cca6025.js} +1 -1
  23. package/dist/{index.ce8801e2.js → index.2026e05c.js} +1 -1
  24. package/dist/{index.e19eaf33.js → index.222039f9.js} +1 -1
  25. package/dist/{index.dfe76608.js → index.23a35b9b.js} +1 -1
  26. package/dist/{index.c627b669.js → index.2942b429.js} +1 -1
  27. package/dist/{index.98af6e12.js → index.298a69f1.js} +1 -1
  28. package/dist/{index.57976804.js → index.2c359b4e.js} +1 -1
  29. package/dist/{index.a9441e00.js → index.2d941184.js} +1 -1
  30. package/dist/{index.a3b03275.js → index.2db71959.js} +1 -1
  31. package/dist/{index.0df3b27e.js → index.31152a7a.js} +1 -1
  32. package/dist/{index.1d4d1b78.js → index.311ffa7e.js} +1 -1
  33. package/dist/{index.7619605a.js → index.32733310.js} +1 -1
  34. package/dist/{index.7062d55c.js → index.3c067fea.js} +1 -1
  35. package/dist/{index.90a87d9e.js → index.3fcd5701.js} +1 -1
  36. package/dist/{index.4dbcd770.js → index.47d10a37.js} +1 -1
  37. package/dist/{index.135b006c.js → index.49976861.js} +1 -1
  38. package/dist/{index.571dd412.js → index.5087f7bd.js} +1 -1
  39. package/dist/{index.4eb9c363.js → index.54e2a93d.js} +2 -2
  40. package/dist/{index.4f04d830.js → index.572141f4.js} +1 -1
  41. package/dist/{index.7081acc5.js → index.6158b0ab.js} +1 -1
  42. package/dist/{index.3ae42b88.js → index.66cfda66.js} +1 -1
  43. package/dist/{index.9d868f2c.js → index.67e7120b.js} +1 -1
  44. package/dist/{index.05656554.js → index.694a50c1.js} +2 -2
  45. package/dist/{index.25db5309.js → index.6b196f79.js} +1 -1
  46. package/dist/{index.54aa5bdb.js → index.6fbbcdb3.js} +1 -1
  47. package/dist/{index.95cbc7d1.js → index.741c5144.js} +1 -1
  48. package/dist/{index.1e40747d.js → index.7a83617c.js} +1 -1
  49. package/dist/{index.dd9fd6fa.js → index.7b414677.js} +1 -1
  50. package/dist/{index.59de1b2c.js → index.8163ec67.js} +1 -1
  51. package/dist/{index.1f0b252d.js → index.825ca275.js} +1 -1
  52. package/dist/{index.64fdd79b.js → index.849ab6fa.js} +1 -1
  53. package/dist/{index.be109e22.js → index.87a7d282.js} +1 -1
  54. package/dist/{index.3ede3ed9.js → index.89b15e9c.js} +1 -1
  55. package/dist/{index.b51268b0.js → index.89edadab.js} +1 -1
  56. package/dist/{index.d320459d.js → index.8d78ff09.js} +1 -1
  57. package/dist/{index.48e6f73c.js → index.91647e7b.js} +1 -1
  58. package/dist/{index.ea966a9a.js → index.91b4b4e5.js} +1 -1
  59. package/dist/{index.d5ad6009.js → index.91b9ac70.js} +1 -1
  60. package/dist/{index.66e76ef5.js → index.947cc7ce.js} +1 -1
  61. package/dist/{index.1936f911.js → index.98d98c90.js} +1 -1
  62. package/dist/{index.021aea9f.js → index.9a09d960.js} +1 -1
  63. package/dist/{index.272e7245.js → index.9b893c04.js} +1 -1
  64. package/dist/{index.a4cc2ffa.js → index.9c1acbbd.js} +1 -1
  65. package/dist/{index.22b2af79.js → index.9fb3d656.js} +1 -1
  66. package/dist/{index.e3826d57.js → index.9fd80be0.js} +1 -1
  67. package/dist/{index.6d854739.js → index.a3323069.js} +1 -1
  68. package/dist/{index.510b34a1.js → index.aa84e0d9.js} +1 -1
  69. package/dist/{index.266a6ace.js → index.add715bd.js} +1 -1
  70. package/dist/{index.c498538e.js → index.b08b5876.js} +1 -1
  71. package/dist/{index.d380d13d.js → index.b3a86349.js} +1 -1
  72. package/dist/{index.a9a2afee.js → index.b5842b70.js} +1 -1
  73. package/dist/{index.39e24331.js → index.b658adad.js} +1 -1
  74. package/dist/{index.5b3f29b6.js → index.b71f00b5.js} +1 -1
  75. package/dist/{index.7b93c6da.js → index.b8750637.js} +1 -1
  76. package/dist/{index.31d7f14e.js → index.b995f365.js} +1 -1
  77. package/dist/{index.d6b1b629.js → index.ba4f216e.js} +1 -1
  78. package/dist/{index.ba3dcf3b.js → index.bee408a6.js} +1 -1
  79. package/dist/{index.1595ef27.js → index.bf274622.js} +1 -1
  80. package/dist/{index.4eba4a7d.js → index.bfdd7ce8.js} +1 -1
  81. package/dist/{index.8bd24899.js → index.c8b68fb4.js} +1 -1
  82. package/dist/{index.1c5c3e44.js → index.cbebf0b5.js} +1 -1
  83. package/dist/{index.ed474d79.js → index.cedea761.js} +1 -1
  84. package/dist/{index.f678de56.js → index.d3fb286b.js} +2 -2
  85. package/dist/{index.faf3d6eb.js → index.d6936050.js} +1 -1
  86. package/dist/{index.f0d4aeb1.js → index.d7e2ee42.js} +1 -1
  87. package/dist/{index.4ff3dace.js → index.d97cba81.js} +1 -1
  88. package/dist/{index.4ac3b55d.js → index.e1de722f.js} +1 -1
  89. package/dist/{index.63b5f71b.js → index.e216613c.js} +1 -1
  90. package/dist/{index.e70d1ec3.js → index.e70ace17.js} +1 -1
  91. package/dist/{index.0e4c0d69.js → index.ead78f64.js} +1 -1
  92. package/dist/{index.a0f17a47.js → index.ef37b57d.js} +1 -1
  93. package/dist/index.es.js +3 -3
  94. package/dist/{index.b724afce.js → index.f9398aeb.js} +1 -1
  95. package/dist/{index.fae17bfe.js → index.fbf51f38.js} +1 -1
  96. package/dist/{index.df9d0f0b.js → index.fd6131ed.js} +1 -1
  97. package/dist/{index.37c3cfdc.js → index.fe1fd10f.js} +1 -1
  98. package/dist/{index.604f9a4f.js → index.fe69dc7a.js} +1 -1
  99. package/dist/{index.08d12aab.js → index.ffd56116.js} +1 -1
  100. package/dist/index.umd.js +60 -60
  101. package/dist/init.1c637e98.js +570 -0
  102. package/dist/{main.65f1b3e9.js → main.837b42e2.js} +3597 -3552
  103. package/package.json +1 -1
  104. package/stats.html +1 -1
  105. package/dist/init.b422c2c8.js +0 -570
package/.env CHANGED
@@ -1,7 +1,7 @@
1
1
  VITE_APP_ROOT_STYLE_ID=CLING_WIDGET_STYLE
2
- VITE_APP_WEB_BASEURL=https://app.cling.se
3
- VITE_APP_CLINGAPI_BASEURL=https://api.cling.se
4
- VITE_APP_CLINGAPI_SOCKET_ROOT=https://api.cling.se
2
+ VITE_APP_WEB_BASEURL=https://app.dev2.cling.se
3
+ VITE_APP_CLINGAPI_BASEURL=https://api.dev.cling.se
4
+ VITE_APP_CLINGAPI_SOCKET_ROOT=https://api.dev.cling.se
5
5
  VITE_APP_ROLLBAR_CLIENT_TOKEN=cf75726b70174d4097505ae18d5f9600
6
6
  VITE_APP_ROLLBAR_ENV=production
7
7
  VITE_APP_STRIPE_PUBLISHABLE_KEY=pk_live_srt9FB7WkzNiQGIP46ISVpag00bGlEZBT8
@@ -11,4 +11,4 @@ VITE_APP_WEB_BASEURL_DEV=https://app.dev2.cling.se
11
11
  VITE_APP_CLINGAPI_BASEURL_DEV=https://api.dev.cling.se
12
12
  VITE_APP_CLINGAPI_SOCKET_ROOT_DEV=https://api.dev.cling.se
13
13
  VITE_APP_ROLLBAR_CLIENT_TOKEN_DEV=cf75726b70174d4097505ae18d5f9600
14
- VITE_APP_ROLLBAR_ENV_DEV=staging
14
+ VITE_APP_ROLLBAR_ENV_DEV=staging
@@ -1,5 +1,5 @@
1
- import { g as Se, n as N, C as Ya, s as jf, e as Wf, i as Yf, r as Tc, a as Xs, m as Rc, b as Lt, c as mn, d as nt, _ as Vf, f as Ic, h as Uf, p as Hf, j as Gf, k as qf, l as Pc, V as Va, o as Ac, A as Kf, q as Xf, t as Zf, u as Jf, v as Qf, F as Fc, w as Nc, x as Ua, y as eh, z as th, B as Zs, D as rh, E as nh, G as ih } from "./main.65f1b3e9.js";
2
- import { c as se, b as ah } from "./init.b422c2c8.js";
1
+ import { g as Se, n as N, C as Ya, s as jf, e as Wf, i as Yf, r as Tc, a as Xs, m as Rc, b as Lt, c as mn, d as nt, _ as Vf, f as Ic, h as Uf, p as Hf, j as Gf, k as qf, l as Pc, V as Va, o as Ac, A as Kf, q as Xf, t as Zf, u as Jf, v as Qf, F as Fc, w as Nc, x as Ua, y as eh, z as th, B as Zs, D as rh, E as nh, G as ih } from "./main.837b42e2.js";
2
+ import { c as se, b as ah } from "./init.1c637e98.js";
3
3
  const fe = {
4
4
  AD: {
5
5
  name: "Andorra",
@@ -7991,7 +7991,7 @@ var sM = function() {
7991
7991
  e.type = n;
7992
7992
  }, expression: "type" } }, [e._v(" " + e._s(e.$t("forms.client.individual")) + " ")]), r("CRadioButton", { attrs: { "native-value": "company", type: "none", size: "small" }, model: { value: e.type, callback: function(n) {
7993
7993
  e.type = n;
7994
- }, expression: "type" } }, [e._v(" " + e._s(e.$t("_common:company").capitalize()) + " ")])], 1)], 1), r("CField", { staticStyle: { "margin-bottom": "1.5rem" }, attrs: { label: e.isIndivid ? e.$t("name").capitalize() : e.$t("company").capitalize(), validator: e.$v.name, messages: e.messages.name, "label-position": "inside" } }, [r("ClientAutocomplete", { ref: "name", attrs: { placeholder: e.isIndivid ? e.$t("forms.client.placeholders.name") : e.$t("forms.client.placeholders.companyName"), "search-enabled": e.searchEnabled }, on: { setClient: function(n) {
7994
+ }, expression: "type" } }, [e._v(" " + e._s(e.$t("_common:company").capitalize()) + " ")])], 1)], 1), r("CField", { staticStyle: { "margin-bottom": "1.5rem" }, attrs: { label: e.isIndivid ? e.$t("name").capitalize() : e.$t("company").capitalize(), validator: e.$v.name, messages: e.messages.name, "label-position": "inside" } }, [r("ClientAutocomplete", { ref: "name", attrs: { placeholder: e.isIndivid ? e.$t("forms.client.placeholders.name") : e.$t("forms.client.placeholders.companyName"), "search-enabled": e.searchEnabled, "show-loading": !0 }, on: { setClient: function(n) {
7995
7995
  return e.$emit("setClient", n);
7996
7996
  } }, model: { value: e.name, callback: function(n) {
7997
7997
  e.name = n;
@@ -8017,7 +8017,7 @@ var sM = function() {
8017
8017
  e.type = n;
8018
8018
  }, expression: "type" } }, [e._v(" " + e._s(e.$t("forms.client.individual")) + " ")]), r("CRadioButton", { attrs: { "native-value": "company", type: "none", size: "normal" }, model: { value: e.type, callback: function(n) {
8019
8019
  e.type = n;
8020
- }, expression: "type" } }, [e._v(" " + e._s(e.$t("_common:company").capitalize()) + " ")])], 1)], 1), r("CField", { staticClass: "flex", attrs: { grouped: "" } }, [r("CField", { attrs: { label: e.isIndivid ? e.$t("name").capitalize() : e.$t("company").capitalize(), validator: e.$v.name, messages: e.messages.name, "label-position": "inside", expanded: "" } }, [r("ClientAutocomplete", { ref: "name", attrs: { placeholder: e.isIndivid ? e.$t("forms.client.placeholders.name") : e.$t("forms.client.placeholders.companyName"), "search-enabled": e.searchEnabled, size: "medium" }, on: { setClient: function(n) {
8020
+ }, expression: "type" } }, [e._v(" " + e._s(e.$t("_common:company").capitalize()) + " ")])], 1)], 1), r("CField", { staticClass: "flex", attrs: { grouped: "" } }, [r("CField", { attrs: { label: e.isIndivid ? e.$t("name").capitalize() : e.$t("company").capitalize(), validator: e.$v.name, messages: e.messages.name, "label-position": "inside", expanded: "" } }, [r("ClientAutocomplete", { ref: "name", attrs: { placeholder: e.isIndivid ? e.$t("forms.client.placeholders.name") : e.$t("forms.client.placeholders.companyName"), "show-loading": !0, "search-enabled": e.searchEnabled, size: "medium" }, on: { setClient: function(n) {
8021
8021
  return e.$emit("setClient", n);
8022
8022
  } }, model: { value: e.name, callback: function(n) {
8023
8023
  e.name = n;
@@ -8072,7 +8072,7 @@ var sM = function() {
8072
8072
  oM,
8073
8073
  !1,
8074
8074
  null,
8075
- "01fc72bf",
8075
+ "89076d1d",
8076
8076
  null,
8077
8077
  null
8078
8078
  );
@@ -10931,7 +10931,7 @@ var OT = function() {
10931
10931
  clients: "clients",
10932
10932
  reminders: "data.reminders",
10933
10933
  name: "data.name"
10934
- }, "set-form-value": e.setDocValue, "remove-form-value": e.removeDocValue, "use-scroll": "" } }) : r("div", { staticClass: "w-full h-full grid place-items-center" }, [r("BaseIcon", { staticClass: "animate-spin text-gray-400", attrs: { type: "loader", size: 28 } })], 1);
10934
+ }, "set-form-value": e.setDocValue, "remove-form-value": e.removeDocValue, "add-missing-answer-method": "", "use-scroll": "" } }) : r("div", { staticClass: "w-full h-full grid place-items-center" }, [r("BaseIcon", { staticClass: "animate-spin text-gray-400", attrs: { type: "loader", size: 28 } })], 1);
10935
10935
  }, kT = [], DT = /* @__PURE__ */ N(
10936
10936
  xT,
10937
10937
  OT,
@@ -1,6 +1,6 @@
1
- import { b as d, c, d as m, n as r } from "./main.65f1b3e9.js";
2
- import "./init.b422c2c8.js";
3
- const l = {
1
+ import { b as d, c, d as l, n as r } from "./main.837b42e2.js";
2
+ import "./init.1c637e98.js";
3
+ const m = {
4
4
  name: "DocumentSendReminderModal",
5
5
  props: {
6
6
  document: {
@@ -30,7 +30,7 @@ const l = {
30
30
  },
31
31
  methods: {
32
32
  ...c({
33
- sendDocumentReminder: m.SEND_REMINDER_DOCUMENT2
33
+ sendDocumentReminder: l.SEND_REMINDER_DOCUMENT2
34
34
  }),
35
35
  async submit() {
36
36
  await this.sendDocumentReminder({
@@ -52,7 +52,7 @@ const l = {
52
52
  }
53
53
  }
54
54
  };
55
- var p = function() {
55
+ var u = function() {
56
56
  var e = this, s = e._self._c;
57
57
  return s("div", { staticClass: "bg-white rounded-xl p-8" }, [s("div", { staticClass: "mb-6 text-lg font-semibold", domProps: { textContent: e._s(e.$t("send", { thing: e.$t("reminder") })) } }), e._l(e.clientsToSend, function(t, i) {
58
58
  return s("div", { key: i, staticClass: "border border-gray-200 p-2 rounded-lg mb-3" }, [s("div", { staticClass: "mb-2 pl-1" }, [s("div", { staticClass: "font-medium text-sm" }, [e._v(e._s(t.name || t.companyName))]), t.answer ? s("div", { staticClass: "text-gray-500 text-xs", domProps: { textContent: e._s(e.$t("components:account.documentForm.send.reminders.alreadySigned").capitalize()) } }) : t.documentRole === "recipient" ? s("div", { staticClass: "text-gray-500 text-xs", domProps: { textContent: e._s(e.$t("components:account.documentForm.send.reminders.cannotSign").capitalize()) } }) : e._e()]), s("div", { staticClass: "flex" }, [s("div", { staticClass: "py-1.5 pl-1.5 rounded-md bg-gray-100 border border-gray-200 items-center flex mr-2" }, [s("CCheckbox", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: { ...!e.canSendType("sms", t) && { content: e.$t("missing", { thing: e.$t("phoneNumber") }) } }, expression: "{ ...(!canSendType('sms', client) && { content: $t('missing', { thing: $t('phoneNumber') }) }) }" }], staticClass: "font-medium mr-2", attrs: { value: e.isTypeActive("sms", t), size: "tiny", disabled: !e.feature("sms") || !e.canSendType("sms", t) }, on: { input: function(o) {
@@ -61,17 +61,17 @@ var p = function() {
61
61
  return e.setDeliveryMethod("email", i);
62
62
  } } }, [e._v(" " + e._s(e.$t("email").capitalize()) + " ")])], 1)])]);
63
63
  }), s("CButton", { staticClass: "font-semibold mt-8", attrs: { type: "secondary", size: "small", taller: "", icon: "send", wide: "" }, on: { click: e.submit } }, [e._v(" " + e._s(e.$t("send", { thing: e.$t("reminder") })) + " ")])], 2);
64
- }, u = [], v = /* @__PURE__ */ r(
65
- l,
66
- p,
64
+ }, p = [], v = /* @__PURE__ */ r(
65
+ m,
67
66
  u,
67
+ p,
68
68
  !1,
69
69
  null,
70
70
  null,
71
71
  null,
72
72
  null
73
73
  );
74
- const y = v.exports, _ = {
74
+ const y = v.exports, h = {
75
75
  props: {
76
76
  document: {
77
77
  type: Object,
@@ -82,12 +82,14 @@ const y = v.exports, _ = {
82
82
  DocumentSendReminderModal: y
83
83
  }
84
84
  };
85
- var h = function() {
85
+ var _ = function() {
86
86
  var e = this, s = e._self._c;
87
- return s("DocumentSendReminderModal", { attrs: { document: e.document } });
87
+ return s("DocumentSendReminderModal", { attrs: { document: e.document }, on: { close: function(t) {
88
+ return e.$router.push("/");
89
+ } } });
88
90
  }, f = [], b = /* @__PURE__ */ r(
89
- _,
90
91
  h,
92
+ _,
91
93
  f,
92
94
  !1,
93
95
  null,
@@ -95,7 +97,7 @@ var h = function() {
95
97
  null,
96
98
  null
97
99
  );
98
- const C = b.exports;
100
+ const $ = b.exports;
99
101
  export {
100
- C as default
102
+ $ as default
101
103
  };
@@ -0,0 +1,379 @@
1
+ import { n as p, i as g, H as f, b as x } from "./main.837b42e2.js";
2
+ import "./init.1c637e98.js";
3
+ const $ = {
4
+ name: "DynamicLink",
5
+ props: {
6
+ template: {
7
+ type: String,
8
+ required: !0
9
+ }
10
+ },
11
+ computed: {
12
+ transformed() {
13
+ return { template: this.template };
14
+ }
15
+ }
16
+ };
17
+ var v = function() {
18
+ var t = this, e = t._self._c;
19
+ return e(t.transformed, { tag: "component" });
20
+ }, b = [], C = /* @__PURE__ */ p(
21
+ $,
22
+ v,
23
+ b,
24
+ !1,
25
+ null,
26
+ null,
27
+ null,
28
+ null
29
+ );
30
+ const k = C.exports, S = {
31
+ name: "EventItem",
32
+ components: {
33
+ DynamicLink: k
34
+ },
35
+ props: {
36
+ title: {
37
+ type: String,
38
+ default: ""
39
+ },
40
+ template: {
41
+ type: String,
42
+ default: ""
43
+ },
44
+ content: {
45
+ type: [String, Array],
46
+ default: ""
47
+ },
48
+ createdAt: {
49
+ type: String,
50
+ default: ""
51
+ },
52
+ icon: {
53
+ type: String,
54
+ default: "square"
55
+ },
56
+ compact: {
57
+ type: Boolean,
58
+ default: !1
59
+ },
60
+ loading: {
61
+ type: Boolean,
62
+ default: !1
63
+ },
64
+ color: {
65
+ type: String,
66
+ default: "gray",
67
+ validator: (n) => ["blue", "teal", "orange", "green", "red", "purple", "gray", "primary"].indexOf(n) !== -1
68
+ },
69
+ isFuture: {
70
+ type: Boolean,
71
+ default: !1
72
+ },
73
+ size: {
74
+ type: String,
75
+ default: ""
76
+ }
77
+ },
78
+ computed: {
79
+ date() {
80
+ return g(f(this.createdAt)) ? this.$formatDate(this.createdAt, "Pp") : null;
81
+ },
82
+ dayOfMonth() {
83
+ return g(f(this.createdAt)) ? this.$formatDate(this.createdAt, "d") : null;
84
+ },
85
+ month() {
86
+ return g(f(this.createdAt)) ? this.$formatDate(this.createdAt, "MMM") : null;
87
+ },
88
+ iconClasses() {
89
+ const n = {
90
+ blue: "text-blue-600 bg-blue-50",
91
+ teal: "text-cyan-600 bg-cyan-50",
92
+ orange: "text-orange-600 bg-orange-50",
93
+ green: "text-green-600 bg-green-50",
94
+ red: "text-red-600 bg-red-50",
95
+ purple: "text-purple-600 bg-purple-50",
96
+ gray: "text-gray-500 bg-gray-100",
97
+ primary: "text-primary-500 bg-primary-50"
98
+ };
99
+ return this.isFuture ? "bg-purple-100 text-purple-500" : n[this.color] || n.gray;
100
+ },
101
+ titleSize() {
102
+ return this.size === "large" ? "text-base" : "text-sm";
103
+ },
104
+ textSize() {
105
+ return this.size === "large" ? "text-[15px]" : "text-[13px]";
106
+ },
107
+ dateSize() {
108
+ return this.size === "large" ? "text-sm" : "text-xs";
109
+ }
110
+ }
111
+ };
112
+ var D = function() {
113
+ var t = this, e = t._self._c;
114
+ return e("div", { staticClass: "flex flex-nowrap relative text-primary-500 cursor-default pb-5 ml-4 event before:content-[''] before:absolute before:w-px before:h-full before:bg-gray-300 before:-left-px before:top-4 last:before:hidden" }, [e("div", { staticClass: "m-0 h-[23px] relative", staticStyle: { "--bg": "#fff" } }, [e("div", { staticClass: "rounded-full absolute left-1/2 top-1/2 z-[1] w-7 h-7 flex items-center justify-center border-none bg-gray-100", class: t.iconClasses, staticStyle: { transform: "translate(-50%, calc(-50% + 8px))", "box-shadow": "0 0 0 2px var(--bg)" } }, [t.loading ? t._e() : e("BaseIcon", { attrs: { type: t.icon, size: "14" } })], 1)]), e("div", { staticClass: "ml-7 min-w-0 flex-grow flex flex-col pt-1" }, [t.loading ? [e("CSkeleton", { staticClass: "max-w-md text-gray-900 font-medium", class: t.titleSize, attrs: { width: "80%" } }), e("CSkeleton", { staticClass: "text-gray-600", class: t.textSize, attrs: { width: "40%" } }), e("CSkeleton", { staticClass: "text-center text-gray-500 text-xs inline-flex pt-0.5", class: t.dateSize, attrs: { hidden: "" } })] : t._e(), e("div", { staticClass: "max-w-md font-medium", class: [t.isFuture ? "text-gray-500" : "text-gray-700", t.titleSize] }, [t.template ? e("DynamicLink", { attrs: { template: t.template } }) : [t._v(t._s(t.title))]], 2), t.content ? e("div", { class: [t.isFuture ? "text-gray-400" : "text-gray-600", t.textSize] }, [e("div", { domProps: { innerHTML: t._s(t.content) } })]) : t._e(), e("div", { staticClass: "text-center text-gray-500 inline-flex pt-1", class: t.dateSize }, [e("div", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: t.date, expression: "date" }] }, [t._v(t._s(t.dayOfMonth) + " " + t._s(t.month))])])], 2)]);
115
+ }, w = [], z = /* @__PURE__ */ p(
116
+ S,
117
+ D,
118
+ w,
119
+ !1,
120
+ null,
121
+ null,
122
+ null,
123
+ null
124
+ );
125
+ const I = z.exports, M = {
126
+ name: "DocumentTimeline",
127
+ i18nOptions: {
128
+ namespaces: "DocumentTimeline",
129
+ messages: {
130
+ en: {
131
+ clientName: "Client",
132
+ byName: "By {{- name}}",
133
+ withBankId: "with BankID",
134
+ propertyDesignation: "Request for property designation",
135
+ viewed: "Viewed",
136
+ viewedContent: "{{- name}} has viewed the document",
137
+ signed: "Signed",
138
+ denied: "denied",
139
+ accepted: "accepted",
140
+ statusChanged: "Document was",
141
+ requestChange: "Manually marked as",
142
+ mailOpened: "Email opened",
143
+ mailOpenedContent: "{{email}} viewed",
144
+ mailDropped: "Could not send email",
145
+ smsDropped: "Could not send SMS",
146
+ expired: "Expired",
147
+ expiredContent: "Marked as declined - expiration date has passed"
148
+ },
149
+ sv: {
150
+ clientName: "Kunden",
151
+ byName: "Av {{- name}}",
152
+ withBankId: "med BankID",
153
+ propertyDesignation: "Beg\xE4ran om fastighetsbeteckning",
154
+ viewed: "Granskat",
155
+ viewedContent: "{{- name}} har visat dokumentet",
156
+ signed: "Signerat",
157
+ denied: "Nekat",
158
+ accepted: "godk\xE4nt",
159
+ statusChanged: "Dokumentet blev",
160
+ requestChange: "Markerades manuellt som",
161
+ mailOpened: "Mail visat",
162
+ mailOpenedContent: "{{email}} visat",
163
+ mailDropped: "E-post kunde inte skickas",
164
+ smsDropped: "SMS kunde inte skickas",
165
+ expired: "Upph\xF6rde att g\xE4lla",
166
+ expiredContent: "Markerades som nekat f\xF6r att giltighetstiden har passerat"
167
+ }
168
+ }
169
+ },
170
+ components: {
171
+ EventItem: I
172
+ },
173
+ props: {
174
+ id: {
175
+ type: String,
176
+ required: !0
177
+ }
178
+ },
179
+ computed: {
180
+ ...x({
181
+ docById: "documents2/byId",
182
+ userById: "companyUsers/byId"
183
+ }),
184
+ document() {
185
+ return this.docById(this.id);
186
+ },
187
+ events() {
188
+ var i;
189
+ const n = [
190
+ this.formatEvent({
191
+ code: "created",
192
+ createdAt: (i = this.document) == null ? void 0 : i.createdAt
193
+ })
194
+ ], { events: t, scheduledFirstDelivery: e } = this.document || {};
195
+ if ((e == null ? void 0 : e.status) === "active") {
196
+ const r = e.deliveryTypes.join(
197
+ ` ${this.$t("_common:and")} `
198
+ );
199
+ n.push({
200
+ title: this.$t("_common:scheduledDelivery"),
201
+ content: `${this.$t(
202
+ "_common:via"
203
+ )} ${r}, ${this.$formatDate(
204
+ e.sendAt
205
+ )}`,
206
+ isFuture: !0,
207
+ icon: "calendar",
208
+ color: "primary"
209
+ });
210
+ }
211
+ return t == null || t.forEach((r) => n.push(this.formatEvent(r))), n;
212
+ }
213
+ },
214
+ methods: {
215
+ formatEvent({ code: n, data: t, createdAt: e, children: i = [] }) {
216
+ const {
217
+ client: r = {},
218
+ clients: u,
219
+ email: c,
220
+ status: d,
221
+ counter: _,
222
+ sendSource: h,
223
+ companyUserId: y
224
+ } = t || {}, m = _ || i.length + 1, o = r.name;
225
+ return {
226
+ created: () => ({
227
+ title: this.$t("_common:created"),
228
+ createdAt: e,
229
+ icon: "folder",
230
+ color: "primary"
231
+ }),
232
+ viewed: () => ({
233
+ title: this.$t("viewed"),
234
+ content: (o ? this.$t("viewedContent", { name: o }) : "") + (m ? ` ${this.$tc("_common:times", { count: m })}` : ""),
235
+ createdAt: e,
236
+ icon: "eye",
237
+ color: "primary"
238
+ }),
239
+ accepted: () => {
240
+ var a;
241
+ const s = {
242
+ title: this.$t("_common:status.signed"),
243
+ content: o ? this.$t("byName", { name: o }) : "",
244
+ createdAt: e,
245
+ icon: "check",
246
+ color: "primary"
247
+ };
248
+ return s.content && ((a = r.answerMethod) == null ? void 0 : a.accept) === "bankId" && (s.content += this.$t("withBankId")), s;
249
+ },
250
+ denied: () => ({
251
+ title: this.$t("_common:status.denied"),
252
+ content: o ? this.$t("byName", { name: o }) : "",
253
+ createdAt: e,
254
+ icon: "x",
255
+ color: "primary"
256
+ }),
257
+ sent: () => {
258
+ let s = this.$t("_common:sent");
259
+ return ["reminder", "propertyDesignation"].includes(h) && (s = this.$t("_common:sentThing", {
260
+ thing: h === "reminder" ? this.$t("_common:reminder") : this.$t("propertyDesignation")
261
+ })), {
262
+ title: s,
263
+ content: u == null ? void 0 : u.map(
264
+ (a) => ["email", "cellphone"].filter((l) => !!a[l]).map((l) => a[l]).join(` ${this.$t("_common:and")} `)
265
+ ).reduce(
266
+ (a, l) => a ? `${a}<div>${l}</div>` : `${this.$t("_common:to")}: ${l}`.capitalize(),
267
+ ""
268
+ ),
269
+ createdAt: e,
270
+ icon: h === "reminder" ? "bell" : "send",
271
+ color: "primary"
272
+ };
273
+ },
274
+ statusChanged: () => ["accepted", "denied"].includes(d) ? {
275
+ title: `${this.$t("statusChanged")} ${this.$t(
276
+ `_common:status.${d}`
277
+ )}`,
278
+ createdAt: e,
279
+ icon: d === "accepted" ? "check" : "x",
280
+ color: d === "accepted" ? "green" : "red"
281
+ } : null,
282
+ requestChange: () => {
283
+ var a;
284
+ const s = ((a = this.userById(y)) == null ? void 0 : a.fullName) || "";
285
+ return {
286
+ title: `${this.$t("requestChange")} ${this.$t(
287
+ `_common:status.${d}`
288
+ )}`,
289
+ content: s && this.$t("byName", { name: s }),
290
+ createdAt: e,
291
+ icon: "tool",
292
+ color: "primary"
293
+ };
294
+ },
295
+ mailDelivered: () => ({
296
+ title: this.$t("_common:sentThing", {
297
+ thing: this.$t("_common:email").capitalize()
298
+ }),
299
+ content: c ? `${this.$t("_common:to")}: ${c}`.capitalize() : "",
300
+ createdAt: e,
301
+ icon: "inbox",
302
+ color: "primary"
303
+ }),
304
+ mailOpened: () => ({
305
+ title: this.$t("mailOpened"),
306
+ content: `${this.$t("mailOpenedContent", { email: c })} ${m ? this.$tc("_common:times", { count: m }) : ""}`,
307
+ createdAt: e,
308
+ icon: "email",
309
+ color: "primary"
310
+ }),
311
+ mailDropped: () => ({
312
+ title: this.$t("mailDropped"),
313
+ content: c ? this.$t("toEmail", { email: c }) : null,
314
+ createdAt: e,
315
+ icon: "alert-triangle",
316
+ color: "orange"
317
+ }),
318
+ smsDropped: () => ({
319
+ title: this.$t("smsDropped"),
320
+ content: t ? `${this.$t("_common:to")}: ${t}`.capitalize() : "",
321
+ createdAt: e,
322
+ icon: "alert-triangle",
323
+ color: "orange"
324
+ }),
325
+ expired: () => ({
326
+ title: this.$t("expired"),
327
+ content: this.$t("expiredContent"),
328
+ createdAt: e,
329
+ icon: "x",
330
+ color: "red"
331
+ })
332
+ }[n]();
333
+ }
334
+ }
335
+ };
336
+ var B = function() {
337
+ var t = this, e = t._self._c;
338
+ return e("div", [e("div", { staticClass: "border-b mb-4 pb-4" }, [e("div", { staticClass: "mb-2" }, [e("div", { staticClass: "text-xs text-gray-600", domProps: { textContent: t._s(t.$t("_common:document").capitalize()) } }), e("div", { staticClass: "font-semibold text-lg" }, [t._v(t._s(t.document.name))])]), e("div", { staticClass: "inline-flex items-center rounded-full bg-gray-100 border-gray-200 -ml-2" }, [e("div", { staticClass: "text-xs text-gray-600 mr-1 py-1 pl-2", domProps: { textContent: t._s(t.$t("_common:status.status")) } }), e("div", { staticClass: "text-xs font-semibold py-1 px-2 bg-gray-300 rounded-r-full", domProps: { textContent: t._s(t.$t(`_common:status.${t.document.status}`)) } })])]), t._l(t.events, function(i, r) {
339
+ return e("EventItem", { key: r, attrs: { title: i.title, content: i.content, createdAt: i.createdAt, icon: i.icon, color: i.color, "is-future": i.isFuture, size: "large" } });
340
+ })], 2);
341
+ }, O = [], E = /* @__PURE__ */ p(
342
+ M,
343
+ B,
344
+ O,
345
+ !1,
346
+ null,
347
+ null,
348
+ null,
349
+ null
350
+ );
351
+ const N = E.exports, T = {
352
+ name: "DocTimeline",
353
+ components: {
354
+ DocumentTimeline: N
355
+ },
356
+ props: {
357
+ id: {
358
+ type: String,
359
+ required: !0
360
+ }
361
+ }
362
+ };
363
+ var q = function() {
364
+ var t = this, e = t._self._c;
365
+ return e("div", { staticClass: "p-8" }, [e("DocumentTimeline", { attrs: { id: t.id } })], 1);
366
+ }, F = [], P = /* @__PURE__ */ p(
367
+ T,
368
+ q,
369
+ F,
370
+ !1,
371
+ null,
372
+ null,
373
+ null,
374
+ null
375
+ );
376
+ const A = P.exports;
377
+ export {
378
+ A as default
379
+ };
@@ -1,4 +1,4 @@
1
- import { g as k } from "./init.b422c2c8.js";
1
+ import { g as k } from "./init.1c637e98.js";
2
2
  import { b as O, a as F, c as R, d as q } from "./index.eaf0a7c6.js";
3
3
  function C(i, e) {
4
4
  for (var a = 0; a < e.length; a++) {
@@ -1,4 +1,4 @@
1
- import { g as k } from "./init.b422c2c8.js";
1
+ import { g as k } from "./init.1c637e98.js";
2
2
  import { b as O, a as R, c as z, d as F } from "./index.eaf0a7c6.js";
3
3
  function C(i, e) {
4
4
  for (var t = 0; t < e.length; t++) {
@@ -1,4 +1,4 @@
1
- import { g as W } from "./init.b422c2c8.js";
1
+ import { g as W } from "./init.1c637e98.js";
2
2
  import { b as j, a as D, c as O, d as A } from "./index.eaf0a7c6.js";
3
3
  function K(i, e) {
4
4
  for (var a = 0; a < e.length; a++) {
@@ -1,4 +1,4 @@
1
- import { g as M } from "./init.b422c2c8.js";
1
+ import { g as M } from "./init.1c637e98.js";
2
2
  import { f as w, a as _, b as D, m as x } from "./index.c84e7cc7.js";
3
3
  import { a as A } from "./index.eaf0a7c6.js";
4
4
  function N(n, e) {
@@ -1,4 +1,4 @@
1
- import { g as D } from "./init.b422c2c8.js";
1
+ import { g as D } from "./init.1c637e98.js";
2
2
  import { b as F, a as O, c as T, d as C } from "./index.eaf0a7c6.js";
3
3
  import { a as z, i as R } from "./index.9a1c119f.js";
4
4
  function q(f, e) {
@@ -1,4 +1,4 @@
1
- import { g as k } from "./init.b422c2c8.js";
1
+ import { g as k } from "./init.1c637e98.js";
2
2
  import { b as O, a as z, c as F, d as C } from "./index.eaf0a7c6.js";
3
3
  function R(u, e) {
4
4
  for (var t = 0; t < e.length; t++) {
@@ -1,4 +1,4 @@
1
- import { g as k } from "./init.b422c2c8.js";
1
+ import { g as k } from "./init.1c637e98.js";
2
2
  import { b as O, a as z, c as F, d as S } from "./index.eaf0a7c6.js";
3
3
  function R(o, e) {
4
4
  for (var t = 0; t < e.length; t++) {
@@ -1,4 +1,4 @@
1
- import { g as z } from "./init.b422c2c8.js";
1
+ import { g as z } from "./init.1c637e98.js";
2
2
  import { b as W, a as D, c as C, d as O } from "./index.eaf0a7c6.js";
3
3
  function F(d, e) {
4
4
  for (var a = 0; a < e.length; a++) {
@@ -1,4 +1,4 @@
1
- import { g as k } from "./init.b422c2c8.js";
1
+ import { g as k } from "./init.1c637e98.js";
2
2
  import { b as F, a as N, c as z, d as S } from "./index.eaf0a7c6.js";
3
3
  function R(d, e) {
4
4
  for (var t = 0; t < e.length; t++) {
@@ -1,4 +1,4 @@
1
- import { g as D } from "./init.b422c2c8.js";
1
+ import { g as D } from "./init.1c637e98.js";
2
2
  import { b as k, a as O, c as z, d as E } from "./index.eaf0a7c6.js";
3
3
  function F(u, e) {
4
4
  for (var t = 0; t < e.length; t++) {
@@ -1,4 +1,4 @@
1
- import { g as S } from "./init.b422c2c8.js";
1
+ import { g as S } from "./init.1c637e98.js";
2
2
  import { b as k, a as O, c as C, d as F } from "./index.eaf0a7c6.js";
3
3
  function z(d, e) {
4
4
  for (var t = 0; t < e.length; t++) {
@@ -1,4 +1,4 @@
1
- import { g as D } from "./init.b422c2c8.js";
1
+ import { g as D } from "./init.1c637e98.js";
2
2
  import { b as O, a as k, d as z, c as F } from "./index.eaf0a7c6.js";
3
3
  function N(u, e) {
4
4
  for (var t = 0; t < e.length; t++) {
@@ -1,4 +1,4 @@
1
- import { g as D } from "./init.b422c2c8.js";
1
+ import { g as D } from "./init.1c637e98.js";
2
2
  import { b as W, a as S, c as q, d as O } from "./index.eaf0a7c6.js";
3
3
  function E(i, e) {
4
4
  for (var t = 0; t < e.length; t++) {
@@ -1,4 +1,4 @@
1
- import { g as k } from "./init.b422c2c8.js";
1
+ import { g as k } from "./init.1c637e98.js";
2
2
  import { b as C, a as D, c as W, d as B } from "./index.eaf0a7c6.js";
3
3
  function O(o, a) {
4
4
  for (var e = 0; e < a.length; e++) {
@@ -1,4 +1,4 @@
1
- import { g as W } from "./init.b422c2c8.js";
1
+ import { g as W } from "./init.1c637e98.js";
2
2
  import { b as D, a as N, c as O, d as k } from "./index.eaf0a7c6.js";
3
3
  function T(o, e) {
4
4
  for (var a = 0; a < e.length; a++) {
@@ -1,4 +1,4 @@
1
- import { g as D } from "./init.b422c2c8.js";
1
+ import { g as D } from "./init.1c637e98.js";
2
2
  import { b as k, a as O, d as C, c as z } from "./index.eaf0a7c6.js";
3
3
  function H(i, e) {
4
4
  for (var a = 0; a < e.length; a++) {
@@ -1,4 +1,4 @@
1
- import { g as W } from "./init.b422c2c8.js";
1
+ import { g as W } from "./init.1c637e98.js";
2
2
  import { b as D, a as O, c as K, d as F } from "./index.eaf0a7c6.js";
3
3
  function A(u, e) {
4
4
  for (var a = 0; a < e.length; a++) {
@@ -1,4 +1,4 @@
1
- import { g as z } from "./init.b422c2c8.js";
1
+ import { g as z } from "./init.1c637e98.js";
2
2
  import { a as F, b as L, c as R, d as V } from "./index.eaf0a7c6.js";
3
3
  function C(t, e) {
4
4
  for (var a = 0; a < e.length; a++) {
@@ -1,4 +1,4 @@
1
- import { g as W } from "./init.b422c2c8.js";
1
+ import { g as W } from "./init.1c637e98.js";
2
2
  import { b as D, a as H, c as O, d as F } from "./index.eaf0a7c6.js";
3
3
  function R(o, a) {
4
4
  for (var e = 0; e < a.length; e++) {