@cling-se/widget 0.5.2 → 0.5.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.
package/.env CHANGED
@@ -1,7 +1,6 @@
1
1
  VITE_APP_ROOT_STYLE_ID=CLING_WIDGET_STYLE
2
2
  VITE_APP_WEB_BASEURL=https://app.cling.se
3
3
  VITE_APP_CLINGAPI_BASEURL=https://api.cling.se
4
- VITE_APP_CLINGAPI_SOCKET_ROOT=https://api.cling.se
5
4
  VITE_APP_ROLLBAR_CLIENT_TOKEN=cf75726b70174d4097505ae18d5f9600
6
5
  VITE_APP_ROLLBAR_ENV=production
7
6
  VITE_APP_STRIPE_PUBLISHABLE_KEY=pk_live_srt9FB7WkzNiQGIP46ISVpag00bGlEZBT8
@@ -9,6 +8,5 @@ VITE_APP_STRIPE_PUBLISHABLE_KEY=pk_live_srt9FB7WkzNiQGIP46ISVpag00bGlEZBT8
9
8
  # WIDGET DEV OVERRIDES
10
9
  VITE_APP_WEB_BASEURL_DEV=https://app.dev2.cling.se
11
10
  VITE_APP_CLINGAPI_BASEURL_DEV=https://api.dev.cling.se
12
- VITE_APP_CLINGAPI_SOCKET_ROOT_DEV=https://api.dev.cling.se
13
11
  VITE_APP_ROLLBAR_CLIENT_TOKEN_DEV=cf75726b70174d4097505ae18d5f9600
14
12
  VITE_APP_ROLLBAR_ENV_DEV=staging
@@ -1,4 +1,4 @@
1
- import { c as se, g as Se, a as jf, n as N, C as Ya, s as Wf, e as Yf, i as Vf, r as Tc, b as Xs, m as Rc, d as Lt, f as mn, h as nt, _ as Uf, j as Ic, k as Hf, p as Gf, l as qf, o as Kf, q as Pc, V as Va, t as Ac, A as Xf, u as Zf, v as Jf, w as Qf, x as eh, F as Fc, y as Nc, z as Ua, B as th, D as rh, E as Zs, G as nh, H as ih, I as ah } from "./main.c91dd7f4.js";
1
+ import { c as se, g as Se, a as jf, n as N, C as Ya, s as Wf, e as Yf, i as Vf, r as Tc, b as Xs, m as Rc, d as Lt, f as mn, h as nt, _ as Uf, j as Ic, k as Hf, p as Gf, l as qf, o as Kf, q as Pc, V as Va, t as Ac, A as Xf, u as Zf, v as Jf, w as Qf, x as eh, F as Fc, y as Nc, z as Ua, B as th, D as rh, E as Zs, G as nh, H as ih, I as ah } from "./main.21e6cfa7.js";
2
2
  const fe = {
3
3
  AD: {
4
4
  name: "Andorra",
@@ -8739,15 +8739,15 @@ const EM = {
8739
8739
  };
8740
8740
  var TM = function() {
8741
8741
  var e = this, r = e._self._c;
8742
- return r("div", { staticClass: "flex flex-col h-full @container" }, [r(e.useScroll ? "Simplebar" : "div", { tag: "component", staticClass: "main-container" }, [r("div", { staticClass: "relative pt-6 px-4 pb-4 @md:px-8 @md:pb-8 @xl:px-16 @xl:pb-16" }, [r("div", { staticClass: "text-lg font-bold pb-4" }, [e._v(" " + e._s(e.$t("_common:send", { thing: e.$t("_common:document").toLowerCase() })) + " ")]), r("div", { staticClass: "mb-6" }, [r("div", { staticClass: "text-gray-900 text-xs font-medium pb-0.5" }, [e._v(" " + e._s(e.$t("_common:documentName")) + " ")]), r("CInput", { attrs: { placeholder: e.$t("_common:name").capitalize(), filled: "" }, model: { value: e.name, callback: function(n) {
8742
+ return r("div", { staticClass: "flex flex-col h-full @container" }, [r(e.useScroll ? "Simplebar" : "div", { tag: "component", staticClass: "main-container" }, [r("div", { staticClass: "relative pt-6 px-4 pb-4 @md:px-8 @md:pb-8 @xl:px-16 @xl:pb-16" }, [r("div", { staticClass: "pb-4 text-lg font-bold" }, [e._v(" " + e._s(e.$t("_common:send", { thing: e.$t("_common:document").toLowerCase() })) + " ")]), r("div", { staticClass: "mb-6" }, [r("div", { staticClass: "text-gray-900 text-xs font-medium pb-0.5" }, [e._v(" " + e._s(e.$t("_common:documentName")) + " ")]), r("CInput", { attrs: { placeholder: e.$t("_common:name").capitalize(), filled: "" }, model: { value: e.name, callback: function(n) {
8743
8743
  e.name = n;
8744
8744
  }, expression: "name" } })], 1), r("div", { staticClass: "mb-6" }, [r("RecipientBlock", { attrs: { _value: {
8745
8745
  clients: "clients"
8746
- }, _document: e._document, "set-form-value": e.setFormValue, "remove-form-value": e.removeFormValue, "default-add-sender-client": e.documentSenderSign, "is-public-form": e.isPublicForm } })], 1), e._t("default"), e.defaultAnswerMethod && e.signMethods.length > 1 ? r("div", { staticClass: "mb-8" }, [r("div", { staticClass: "block-title text-gray-900 text-xs font-medium pb-0.5" }, [e._v(" " + e._s(e.$t("signMethod.title")) + " "), r("BaseIcon", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: e.$t("signMethod.tooltip"), expression: "$t('signMethod.tooltip')" }], staticClass: "text-gray-500 ml-px", attrs: { type: "info", size: "14" } })], 1), r("div", { staticClass: "cb-card-group" }, e._l(e.signMethods, function(n) {
8747
- return r("div", { key: n.value, staticClass: "cb-card flex", class: { checked: e.defaultAnswerMethod.accept === n.value }, on: { click: function(i) {
8746
+ }, _document: e._document, "set-form-value": e.setFormValue, "remove-form-value": e.removeFormValue, "default-add-sender-client": e.documentSenderSign, "is-public-form": e.isPublicForm } })], 1), e._t("default"), e.defaultAnswerMethod && e.signMethods.length > 1 ? r("div", { staticClass: "mb-8" }, [r("div", { staticClass: "block-title text-gray-900 text-xs font-medium pb-0.5" }, [e._v(" " + e._s(e.$t("signMethod.title")) + " "), r("BaseIcon", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: e.$t("signMethod.tooltip"), expression: "$t('signMethod.tooltip')" }], staticClass: "ml-px text-gray-500", attrs: { type: "info", size: "14" } })], 1), r("div", { staticClass: "cb-card-group" }, e._l(e.signMethods, function(n) {
8747
+ return r("div", { key: n.value, staticClass: "flex cb-card", class: { checked: e.defaultAnswerMethod.accept === n.value }, on: { click: function(i) {
8748
8748
  e.defaultAnswerMethod.accept !== n.value && e.setAnswerMethod(n.value);
8749
8749
  } } }, [r("CRadio", { staticStyle: { "margin-right": "0.75em" }, attrs: { value: e.defaultAnswerMethod.accept, "native-value": n.value, type: "secondary", size: "small" } }), r("div", { staticClass: "flex-grow" }, [r("div", { staticClass: "cb-card-title" }, [e._v(e._s(n.title))]), r("div", { directives: [{ name: "show", rawName: "v-show", value: e.defaultAnswerMethod.accept === n.value, expression: "defaultAnswerMethod.accept === signMethod.value" }], staticClass: "cb-card-body" }, [e._v(" " + e._s(n.content) + " ")])])], 1);
8750
- }), 0)]) : e._e(), r("div", { staticClass: "grid items-center gap-2", staticStyle: { "grid-template-columns": "repeat(auto-fit, minmax(200px, 1fr))" } }, [r("div", [r("BaseDatePicker", { staticClass: "psuedo-input relative", attrs: { "custom-el": !0, direction: "end", tabindex: "0" }, model: { value: e.expiresAt, callback: function(n) {
8750
+ }), 0)]) : e._e(), r("div", { staticClass: "grid items-center gap-2", staticStyle: { "grid-template-columns": "repeat(auto-fit, minmax(200px, 1fr))" } }, [r("div", [r("BaseDatePicker", { staticClass: "relative psuedo-input", attrs: { "custom-el": !0, direction: "end", tabindex: "0" }, model: { value: e.expiresAt, callback: function(n) {
8751
8751
  e.expiresAt = n;
8752
8752
  }, expression: "expiresAt" } }, [r("div", { staticClass: "psuedo-input-label" }, [e._v(e._s(e.$t("validityPeriod")))]), r("div", [e._v(e._s(e.expiresAt ? e.$formatDate(e.expiresAt) : e.$t("_common:disabled").capitalize()))]), e.expiresAt ? r("CButton", { staticClass: "absolute right-3 top-3", attrs: { icon: "x", size: "small", type: "none", pattern: "secondary" }, on: { click: function(n) {
8753
8753
  n.preventDefault(), n.stopPropagation(), e.expiresAt = void 0, e._document.setDirty("expiresAt");
@@ -8759,10 +8759,10 @@ var TM = function() {
8759
8759
  content: e.$t("manualDeliveryTooltip")
8760
8760
  } }, domProps: { textContent: e._s(e.$t("manualDelivery")) }, on: { click: () => {
8761
8761
  e.setDeliveryMethod("sms", !1), e.setDeliveryMethod("email", !1);
8762
- } } })], 1), !e.useSignOrder && !e.isManualDelivery ? r("div", { staticClass: "psuedo-input relative", attrs: { tabindex: "0" }, on: { click: e.openReminders } }, [r("div", { staticClass: "psuedo-input-label" }, [e._v(e._s(e.$t("_common:reminder_plural").capitalize()))]), r("div", [e._v(" " + e._s(e.noOfReminders ? `${e.noOfReminders} ${e.$i18n.lang === "sv" ? e.$t("_common:unitType.unit") : ""}` : e.$t("_common:disabled").capitalize()) + " ")]), e.noOfReminders ? r("CButton", { staticClass: "absolute right-3 top-3", attrs: { icon: "x", size: "small", type: "none", pattern: "secondary" }, on: { click: function(n) {
8762
+ } } })], 1), !e.useSignOrder && !e.isManualDelivery ? r("div", { staticClass: "relative psuedo-input", attrs: { tabindex: "0" }, on: { click: e.openReminders } }, [r("div", { staticClass: "psuedo-input-label" }, [e._v(e._s(e.$t("_common:reminder_plural").capitalize()))]), r("div", [e._v(" " + e._s(e.noOfReminders ? `${e.noOfReminders} ${e.$i18n.lang === "sv" ? e.$t("_common:unitType.unit") : ""}` : e.$t("_common:disabled").capitalize()) + " ")]), e.noOfReminders ? r("CButton", { staticClass: "absolute right-3 top-3", attrs: { icon: "x", size: "small", type: "none", pattern: "secondary" }, on: { click: function(n) {
8763
8763
  n.preventDefault(), n.stopPropagation(), e.reminders = [];
8764
8764
  } } }) : e._e()], 1) : e._e()], 1), e.clientsAreMissingContactInfo && !e.isManualDelivery ? r("ErrorCallout", { attrs: { message: e.$t("clientsAreMissingContactInfo"), size: "small" } }) : e._e()], 2)]), r("div", { staticClass: "px-4 pb-4 @md:px-8 @xl:px-16" }, [e._t("send", function() {
8765
- return [r("div", { staticClass: "flex" }, [e.showSave ? r("CButton", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: e.$t("_common:save", { thing: e.$t("_common:document").toLowerCase() }), expression: "$t('_common:save', { thing: $t('_common:document').toLowerCase() })" }], staticClass: "mr-2 w-12", attrs: { loading: e.isPosting, type: "none", icon: "save", pattern: "secondary" }, on: { click: function(n) {
8765
+ return [r("div", { staticClass: "flex" }, [e.showSave ? r("CButton", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: e.$t("_common:save", { thing: e.$t("_common:document").toLowerCase() }), expression: "$t('_common:save', { thing: $t('_common:document').toLowerCase() })" }], staticClass: "w-12 mr-2", attrs: { loading: e.isPosting, type: "none", icon: "save", pattern: "secondary" }, on: { click: function(n) {
8766
8766
  return e.doSaveDocument();
8767
8767
  } } }) : e._e(), e.showSchedule && !e.useSignOrder && !e.isManualDelivery ? r("CButton", { staticClass: "mr-2 w-12 @md:w-auto", staticStyle: { padding: "14px 16px", "border-radius": "8px", height: "initial", "font-size": "14px", "font-weight": "600" }, attrs: { disabled: e.isPosting || !e.clients.length, type: "none", pattern: "secondary" }, on: { click: e.openSendLater } }, [r("span", { staticClass: "!hidden @md:!block", domProps: { textContent: e._s(e.$t("scheduledTooltip")) } }), r("BaseIcon", { staticClass: "@md:!hidden", attrs: { type: "calendar", size: "16" } })], 1) : e._e(), r("div", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: {
8768
8768
  content: e.clients.length ? "" : e.$t("components:account.documentForm.clients.errorMessage")
@@ -8778,7 +8778,7 @@ var TM = function() {
8778
8778
  RM,
8779
8779
  !1,
8780
8780
  null,
8781
- "433b8516",
8781
+ "6dadab73",
8782
8782
  null,
8783
8783
  null
8784
8784
  );
@@ -1,4 +1,4 @@
1
- import { f as g, h as p, n as u } from "./main.c91dd7f4.js";
1
+ import { f as g, h as p, n as u } from "./main.21e6cfa7.js";
2
2
  const _ = {
3
3
  name: "DocumentReceipt",
4
4
  i18nOptions: {
@@ -1,4 +1,4 @@
1
- import { d, f as c, h as l, n as r } from "./main.c91dd7f4.js";
1
+ import { d, f as c, h as l, n as r } from "./main.21e6cfa7.js";
2
2
  const m = {
3
3
  name: "DocumentSendReminderModal",
4
4
  props: {
@@ -40,7 +40,7 @@ const m = {
40
40
  }), this.$emit("close");
41
41
  },
42
42
  canSendType(n, e) {
43
- return e[n === "sms" ? "cellphone" : "email"];
43
+ return !!e[n === "sms" ? "cellphone" : "email"];
44
44
  },
45
45
  isTypeActive(n, e) {
46
46
  return e.deliveryTypes.includes(n) && this.canSendType(n, e);
@@ -1,4 +1,4 @@
1
- import { n as p, i as g, J as f, d as x } from "./main.c91dd7f4.js";
1
+ import { n as p, i as g, J as f, d as x } from "./main.21e6cfa7.js";
2
2
  const $ = {
3
3
  name: "DynamicLink",
4
4
  props: {