@cling-se/widget 0.14.4 → 0.14.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/.eslintrc.cjs +4 -4
  2. package/README.md +40 -40
  3. package/dist/AddClientCallout-BMc-v9rJ.js +46 -0
  4. package/dist/AnswerModal-Cu0Ke5pl.js +3874 -0
  5. package/dist/AttachmentItem-Co8pVvtv.js +78 -0
  6. package/dist/BaseDatePicker-P5iq-XAp.js +3183 -0
  7. package/dist/BaseUpload-BDWnWTxr.js +1977 -0
  8. package/dist/BlockMedia-B_UiePCr.js +76 -0
  9. package/dist/CCallout-Bbp9ya9n.js +59 -0
  10. package/dist/CCurrencyDropdown-Cw39vJWw.js +246 -0
  11. package/dist/CDropdownItem-BjYnhZJr.js +538 -0
  12. package/dist/CField.vue_vue_type_style_index_0_lang-l0sNRNKZ.js +1 -0
  13. package/dist/CFormField-CeJ58aN2.js +241 -0
  14. package/dist/CPhoneFormat-BZnmeEeW.js +62 -0
  15. package/dist/CPriceInput-B07d19qq.js +112 -0
  16. package/dist/CTabs.vue_vue_type_style_index_0_scoped_e02a6440_lang-l0sNRNKZ.js +1 -0
  17. package/dist/ClientAutocomplete-9iM1pR9l.js +78 -0
  18. package/dist/ClientModal-fw8f6UvL.js +625 -0
  19. package/dist/ColorPicker-uu6vKe8o.js +2879 -0
  20. package/dist/CompanyModal-5t4yhKL4.js +141 -0
  21. package/dist/ContentWrapper-DwcOQ21l.js +183 -0
  22. package/dist/CoverBlockSettings-cCCXzAZ0.js +275 -0
  23. package/dist/DocAnswer-9lbgqHRX.js +36 -0
  24. package/dist/DocDetails-CoLL_tHs.js +246 -0
  25. package/dist/DocForm-DUjcuHJe.js +7273 -0
  26. package/dist/DocFormSend-LawcXcM2.js +143 -0
  27. package/dist/DocLinks-pJT9HpjR.js +38 -0
  28. package/dist/DocModalBase-xUoskL63.js +28 -0
  29. package/dist/DocPrint-ClEJBiAg.js +240 -0
  30. package/dist/DocReceipt-x_YsXPnG.js +210 -0
  31. package/dist/DocSendReminder-Dbz8CkAz.js +137 -0
  32. package/dist/DocTextEditor-AqBE7jZj.js +17181 -0
  33. package/dist/DocTimeline-hq2asPzr.js +481 -0
  34. package/dist/DocumentClient-TmtHqfiw.js +136 -0
  35. package/dist/DocumentLayout-CRAp8mfk.js +4909 -0
  36. package/dist/DocumentLogotype-emSjQ21f.js +87 -0
  37. package/dist/DocumentVoided-BOjiWBK6.js +25 -0
  38. package/dist/EmbedInput-B3LFGEee.js +113 -0
  39. package/dist/EmbedSettings-BYPJTGQf.js +72 -0
  40. package/dist/ErrorCallout-CwgYHBkg.js +28 -0
  41. package/dist/FilePreviewModal-81sSrDGg.js +81 -0
  42. package/dist/Flag-DGFvUTQZ.js +114 -0
  43. package/dist/HeaderSettings-BGpkzcbj.js +392 -0
  44. package/dist/ImageSelectModal-Cimviyuy.js +84 -0
  45. package/dist/ImageUploadWrapper-qJDHCf8T.js +1604 -0
  46. package/dist/Index-18w_qMQH.js +25 -0
  47. package/dist/Index-9_R8_myc.js +77 -0
  48. package/dist/Index-BKoXW7GK.js +84 -0
  49. package/dist/Index-BL3-tRGt.js +642 -0
  50. package/dist/Index-BNfAA-ZJ.js +154 -0
  51. package/dist/Index-BOxSvAug.js +144 -0
  52. package/dist/Index-BQgW1jlH.js +45 -0
  53. package/dist/Index-BXAqgXVi.js +150 -0
  54. package/dist/Index-BgK_WC0d.js +140 -0
  55. package/dist/Index-BkUzlQaQ.js +107 -0
  56. package/dist/Index-BpyYa9LR.js +171 -0
  57. package/dist/Index-ByzGXUoc.js +292 -0
  58. package/dist/Index-C1lsSfnX.js +52 -0
  59. package/dist/Index-C9sq_RDg.js +223 -0
  60. package/dist/Index-CDEh3GAi.js +26 -0
  61. package/dist/Index-CEG-Hiv6.js +69 -0
  62. package/dist/Index-CMUg61_b.js +33 -0
  63. package/dist/Index-CObGPoQv.js +62 -0
  64. package/dist/Index-CPNUsaOS.js +57 -0
  65. package/dist/Index-CegW1Rim.js +98 -0
  66. package/dist/Index-CoSt-Bws.js +31 -0
  67. package/dist/Index-CpDgldnz.js +70 -0
  68. package/dist/Index-CqImx-rG.js +55 -0
  69. package/dist/Index-CrOD4_xj.js +58 -0
  70. package/dist/Index-DBCNVVm5.js +24 -0
  71. package/dist/Index-DGG1S8uJ.js +559 -0
  72. package/dist/Index-DRWS2z82.js +2402 -0
  73. package/dist/Index-DXRgZZNj.js +61 -0
  74. package/dist/Index-DY5gAUnE.js +754 -0
  75. package/dist/Index-Dr7mVlBb.js +49 -0
  76. package/dist/Index-Dx944wv-.js +21 -0
  77. package/dist/Index-Eq3JlTKK.js +46 -0
  78. package/dist/Index-Sr3emNkE.js +25 -0
  79. package/dist/Index-VshOfaom.js +32 -0
  80. package/dist/InputToggleRow-CQsaayf-.js +57 -0
  81. package/dist/ManualPopover-CFXm5cQy.js +58 -0
  82. package/dist/MediaWrapper-Cn0Yr4ce.js +23 -0
  83. package/dist/NotBindingText-CNiszGqn.js +32 -0
  84. package/dist/PackageGroup-BVys9ouj.js +699 -0
  85. package/dist/PdfTerms-Bbns-jMY.js +36 -0
  86. package/dist/PdfViewer-B1zzZU4Y.js +374 -0
  87. package/dist/PlainHtml-CARRbTxi.js +20 -0
  88. package/dist/PriceHeader-CqeC9Lhb.js +339 -0
  89. package/dist/SearchApi-bB9FLxUq.js +161 -0
  90. package/dist/Setup-p3Du_uf8.js +50 -0
  91. package/dist/SmartList-P5ZfTWBb.js +83 -0
  92. package/dist/TermsSettings-CQ8TGwBV.js +102 -0
  93. package/dist/ThemeColorRow-DMWVlFRU.js +67 -0
  94. package/dist/ToggleBinding-BPaYWgqP.js +38 -0
  95. package/dist/UploadModal-9O4HTVZm.js +95 -0
  96. package/dist/VideoPlayerInput-5KybfY7N.js +93 -0
  97. package/dist/VideoPlayerSettings-xSW8tcTZ.js +61 -0
  98. package/dist/VideoSelectModal-BbaNAxGH.js +100 -0
  99. package/dist/anime.es-BrPTThYb.js +858 -0
  100. package/dist/answerDocumentMixin-S-Bmv15G.js +51 -0
  101. package/dist/color-TdtKxwVa.js +19 -0
  102. package/dist/debounce-B_0g8OVh.js +84 -0
  103. package/dist/dom-CJxkno7i.js +91 -0
  104. package/dist/favicon.ico +0 -0
  105. package/dist/focusDrawerMixin-DhsqWZUo.js +22 -0
  106. package/dist/formComponentsInstall-UG7a9vjZ.js +2499 -0
  107. package/dist/formDrawerState-BMQrWaBt.js +20 -0
  108. package/dist/formValidationMixin-DUu0omWT.js +49 -0
  109. package/dist/i18nMessages-Chz_lxGG.js +17 -0
  110. package/dist/index-B3R_uKML.js +347 -0
  111. package/dist/index-B4aiQXsr.js +166 -0
  112. package/dist/index-C50JSDKO.js +3916 -0
  113. package/dist/index-CJ9AvuZH.js +102 -0
  114. package/dist/index-Czyda2Ej.js +492 -0
  115. package/dist/index-myOYAnwV.js +81 -0
  116. package/dist/index.es.js +35 -0
  117. package/dist/index.umd.js +3148 -0
  118. package/dist/main-B9t0ybqW.js +56739 -0
  119. package/dist/mapFormMixin-ETYhBLl2.js +72 -0
  120. package/dist/omit-DtTfKAed.js +31 -0
  121. package/dist/publicSenderState-DD1lN9CR.js +21 -0
  122. package/dist/splitpanes-BHUVsCZF.js +382 -0
  123. package/dist/style.css +4 -0
  124. package/dist/throttle-qziKkJJX.js +18 -0
  125. package/dist/tinycolor-CMC8Xp7x.js +633 -0
  126. package/dist/tippy.esm-DjbYjfS2.js +1799 -0
  127. package/dist/utils-C5Rg0fQC.js +108 -0
  128. package/dist/vuedraggable.umd-CE3WmaEQ.js +3161 -0
  129. package/dist/vuex.esm-DKGl8mcw.js +467 -0
  130. package/package.json +1 -1
  131. package/tsconfig.json +26 -26
  132. package/tsconfig.node.json +10 -10
  133. package/tsconfig.paths.json +17 -17
  134. package/vite.config.ts +61 -61
@@ -0,0 +1,87 @@
1
+ import { a } from "./publicSenderState-DD1lN9CR.js";
2
+ import { g as s, n as l } from "./main-B9t0ybqW.js";
3
+ import { m as p, a as r } from "./vuex.esm-DKGl8mcw.js";
4
+ const c = {
5
+ name: "DocumentLogotype",
6
+ components: {
7
+ ImageUploadWrapper: () => import("./ImageUploadWrapper-qJDHCf8T.js")
8
+ },
9
+ inject: {
10
+ viewSettings: {
11
+ default: () => ({
12
+ canEdit: !1,
13
+ isPublicForm: !1
14
+ })
15
+ }
16
+ },
17
+ props: {
18
+ value: {
19
+ type: String,
20
+ default: null
21
+ },
22
+ companyLogotype: {
23
+ type: String,
24
+ default: null
25
+ },
26
+ showLogo: {
27
+ type: Boolean,
28
+ default: !0
29
+ },
30
+ hasHover: {
31
+ type: Boolean,
32
+ default: !1
33
+ }
34
+ },
35
+ computed: {
36
+ ...p({
37
+ isPosting: "companies/isPosting"
38
+ }),
39
+ logotype() {
40
+ return this.value || this.companyLogotype || "";
41
+ }
42
+ },
43
+ methods: {
44
+ ...r({
45
+ updateCompany: s.DO_UPDATE_CURRENT_COMPANY
46
+ }),
47
+ initUpload() {
48
+ this.$refs.uploadWrapper && this.$refs.uploadWrapper.onClick();
49
+ },
50
+ async setLogotype({ response: e }) {
51
+ const { publicId: t, url: o } = e || {};
52
+ o && this.$emit("input", o), !this.companyLogotype && t && await this.postLogo(t);
53
+ },
54
+ async postLogo(e) {
55
+ if (this.isPosting)
56
+ return;
57
+ const t = { LogotypePublicId: e };
58
+ this.viewSettings.isPublicForm ? a({ company: t }) : await this.updateCompany({ body: t });
59
+ }
60
+ }
61
+ };
62
+ var m = function() {
63
+ var t = this, o = t._self._c;
64
+ return t.viewSettings.canEdit ? o("ImageUploadWrapper", { ref: "uploadWrapper", staticStyle: { display: "inline-block", width: "fit-content", "will-change": "opacity", "z-index": "3" }, attrs: { "on-image-upload": t.setLogotype, "upload-options": { maxWidth: 500, maxHeight: 300 } }, scopedSlots: t._u([{ key: "default", fn: function({ progress: n }) {
65
+ return [o("CDropdown", { attrs: { position: "is-bottom-right" }, nativeOn: { click: function(i) {
66
+ i.stopPropagation();
67
+ } } }, [o("template", { slot: "trigger" }, [t.logotype && t.showLogo ? o("div", { staticClass: "logo", staticStyle: { "min-height": "35px" } }, [o("img", { staticClass: "hover:outline-primary-500 hover:outline hover:outline-2", attrs: { src: t.logotype, alt: "", width: "150" } })]) : o("CButton", { staticClass: "button-logo", style: !t.hasHover && {
68
+ visibility: "hidden",
69
+ pointerEvents: "none"
70
+ }, attrs: { loading: !!n && n < 100 || t.isPosting, type: "text", size: "normal", pattern: "secondary" } }, [t._v(" " + t._s(t.$t("_common:logo").capitalize()) + " ")])], 1), o("CDropdownItem", { attrs: { value: t.showLogo, "close-on-click": !1, toggle: "" }, on: { input: function(i) {
71
+ return t.$emit("update:show-logo", i);
72
+ } } }, [t._v(" " + t._s(t.$t("_common:show", { thing: t.$t("_common:logotype") })) + " ")]), t.showLogo ? [o("CDropdownItem", { attrs: { separator: !0 } }), o("CDropdownItem", { on: { click: t.initUpload } }, [t._v(" " + t._s(t.$t("_common:change", { thing: t.$t("_common:logotype") })) + " ")]), o("CDropdownItem", { attrs: { disabled: !t.value }, on: { click: function(i) {
73
+ return t.$emit("input", "");
74
+ } } }, [t._v(" " + t._s(t.$t("_common:reset")) + " ")])] : t._e()], 2)];
75
+ } }], null, !1, 818564773) }) : t.showLogo ? o("div", { staticStyle: { display: "inline-block" } }, [o("img", { attrs: { src: t.logotype, alt: "", width: "150" } })]) : t._e();
76
+ }, u = [], g = /* @__PURE__ */ l(
77
+ c,
78
+ m,
79
+ u,
80
+ !1,
81
+ null,
82
+ "ad15ba8a"
83
+ );
84
+ const f = g.exports;
85
+ export {
86
+ f as default
87
+ };
@@ -0,0 +1,25 @@
1
+ import { n } from "./main-B9t0ybqW.js";
2
+ const s = {
3
+ name: "DocumentVoided",
4
+ props: {
5
+ document: {
6
+ type: Object,
7
+ required: !0
8
+ }
9
+ }
10
+ };
11
+ var o = function() {
12
+ var t = this, e = t._self._c;
13
+ return e("div", { staticClass: "grid h-full place-items-center text-center" }, [e("div", { staticClass: "py-12" }, [e("CIcon", { staticClass: "text-primary-500 mb-2", attrs: { type: "info" } }), e("div", { staticClass: "text-lg font-medium", domProps: { textContent: t._s(t.document.$t("documentVoided.title")) } }), e("div", { staticClass: "text-gray-700", domProps: { textContent: t._s(t.document.$t("documentVoided.description")) } })], 1)]);
14
+ }, r = [], c = /* @__PURE__ */ n(
15
+ s,
16
+ o,
17
+ r,
18
+ !1,
19
+ null,
20
+ null
21
+ );
22
+ const a = c.exports;
23
+ export {
24
+ a as D
25
+ };
@@ -0,0 +1,113 @@
1
+ import { d } from "./debounce-B_0g8OVh.js";
2
+ import { b as l, n as o } from "./main-B9t0ybqW.js";
3
+ const m = (t) => {
4
+ const i = new DOMParser().parseFromString(t, "text/html"), [a] = l(i, "body.children") || [];
5
+ return !a || a.tagName !== "IFRAME" ? {} : Array.from(a.attributes).reduce(
6
+ (s, { name: r, value: n }) => ({ ...s, [r]: n }),
7
+ {}
8
+ );
9
+ }, u = (t) => {
10
+ if (typeof t != "object" || !t)
11
+ return "";
12
+ const e = document.createElement("iframe");
13
+ return Object.keys(t).forEach((i) => e.setAttribute(i, t[i])), e.hasAttribute("src") ? e.outerHTML : "";
14
+ }, c = (t) => /^(?:https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[^\s]{2,}|www\.[a-zA-Z0-9]+\.[^\s]{2,})/gi.test(
15
+ t
16
+ ), p = {
17
+ name: "EmbedInput",
18
+ i18nOptions: {
19
+ namespaces: "embedInput",
20
+ messages: {
21
+ en: {
22
+ placeholder: "Paste embed link",
23
+ validations: {
24
+ embed: {
25
+ isValid: "No supported source found"
26
+ }
27
+ }
28
+ },
29
+ sv: {
30
+ placeholder: "Klista in inbäddningslänk",
31
+ validations: {
32
+ embed: {
33
+ isValid: "Ingen källa kunde hittas"
34
+ }
35
+ }
36
+ }
37
+ }
38
+ },
39
+ props: {
40
+ value: {
41
+ type: Object,
42
+ default: () => ({})
43
+ },
44
+ isDrawerMode: {
45
+ type: Boolean,
46
+ default: !1
47
+ }
48
+ },
49
+ data() {
50
+ return {
51
+ isLoading: !1,
52
+ embed: {},
53
+ // TODO: could remove the template string in the input and only parse/validate input strings
54
+ // TODO: would
55
+ iFrameTplString: "",
56
+ inputPlaceholder: '<iframe style="border: 1px solid rgba(0, 0, 0, 0.1)...'
57
+ };
58
+ },
59
+ validations() {
60
+ return {
61
+ embed: { isValid: (t) => t && c(t.src) }
62
+ };
63
+ },
64
+ computed: {
65
+ messages() {
66
+ return {
67
+ embed: { isValid: this.$t("validations.embed.isValid") }
68
+ };
69
+ }
70
+ },
71
+ watch: {
72
+ value: {
73
+ immediate: !0,
74
+ handler(t) {
75
+ this.embed = Object.assign({}, t), this.iFrameTplString = u(this.embed);
76
+ }
77
+ }
78
+ },
79
+ methods: {
80
+ onInput: d(function(e) {
81
+ this.$v.$reset(), e && this.validateInput(e);
82
+ }, 500),
83
+ async validateInput(t) {
84
+ this.isLoading = !0, this.embed = await m(t), this.embed.src || (this.embed.src = t), this.$v.$invalid || this.$emit("input", this.embed), this.isLoading = !1, this.$v.$touch();
85
+ },
86
+ focus() {
87
+ this.$refs.input && this.$refs.input.focus();
88
+ }
89
+ }
90
+ };
91
+ var f = function() {
92
+ var e = this, i = e._self._c;
93
+ return i("CField", { style: e.isDrawerMode && {
94
+ display: "flex",
95
+ flexDirection: "column",
96
+ alignItems: "flex-start"
97
+ }, attrs: { grouped: !e.isDrawerMode } }, [i("CField", { staticStyle: { width: "100%" }, attrs: { validator: e.$v.embed, messages: e.messages.embed, expanded: "" } }, [i("CInput", { ref: "input", attrs: { placeholder: e.inputPlaceholder, size: e.isDrawerMode ? "small" : void 0, loading: e.isLoading, filled: e.isDrawerMode, "auto-resize": !0, type: "textarea", expanded: "" }, on: { input: e.onInput }, model: { value: e.iFrameTplString, callback: function(a) {
98
+ e.iFrameTplString = a;
99
+ }, expression: "iFrameTplString" } })], 1), i("CButton", { attrs: { disabled: e.isLoading, size: e.isDrawerMode ? "small" : void 0, type: "secondary" }, on: { click: function(a) {
100
+ return e.validateInput(e.iFrameTplString);
101
+ } } }, [e._v(" " + e._s(e.$t("_common:add")) + " ")])], 1);
102
+ }, h = [], b = /* @__PURE__ */ o(
103
+ p,
104
+ f,
105
+ h,
106
+ !1,
107
+ null,
108
+ null
109
+ );
110
+ const v = b.exports;
111
+ export {
112
+ v as default
113
+ };
@@ -0,0 +1,72 @@
1
+ import n from "./EmbedInput-B3LFGEee.js";
2
+ import { n as l } from "./main-B9t0ybqW.js";
3
+ const o = {
4
+ i18nOptions: {
5
+ namespaces: "embedSettings",
6
+ messages: {
7
+ en: {
8
+ title: "Embed - iFrame",
9
+ subTitle: "Embed anything (PDFs, Google Docs, Calender Sheets...)",
10
+ responsiveSize: "Responsive size"
11
+ },
12
+ sv: {
13
+ title: "Bädda in - iFrame",
14
+ subTitle: "Bädda in vad som helst (PDF:er, Google Docs, Calender Sheets...)",
15
+ responsiveSize: "Responsiv storlek"
16
+ }
17
+ }
18
+ },
19
+ name: "EmbedSettings",
20
+ components: {
21
+ EmbedInput: n
22
+ },
23
+ props: {
24
+ value: {
25
+ type: Object,
26
+ default: () => ({})
27
+ },
28
+ size: {
29
+ type: String,
30
+ default: "small"
31
+ }
32
+ },
33
+ computed: {
34
+ sizeOptions() {
35
+ return [
36
+ {
37
+ value: "small",
38
+ svg: '<g fill-rule="nonzero" fill="none"><path d="M0 0h99v65H0z"/><path d="M22 16h56a2 2 0 012 2v30a2 2 0 01-2 2H22a2 2 0 01-2-2V18a2 2 0 012-2zm0 40h56a2 2 0 012 2v7H20v-7a2 2 0 012-2zM20 0h60v7a2 2 0 01-2 2H22a2 2 0 01-2-2V0z" fill="currentColor"/></g>'
39
+ },
40
+ {
41
+ value: "medium",
42
+ svg: '<g fill-rule="nonzero" fill="none"><path d="M0 0h99v65H0z"/><path d="M11 14h76a2 2 0 012 2v33a2 2 0 01-2 2H11a2 2 0 01-2-2V16a2 2 0 012-2zm8-14h60v6a2 2 0 01-2 2H21a2 2 0 01-2-2V0zm2 58h56a2 2 0 012 2v5H19v-5a2 2 0 012-2z" fill="currentColor"/></g>'
43
+ },
44
+ {
45
+ value: "large",
46
+ svg: '<g fill-rule="nonzero" fill="none"><path d="M0 0h99v65H0z"/><path d="M8 7h84a2 2 0 012 2v42a2 2 0 01-2 2H8a2 2 0 01-2-2V9a2 2 0 012-2zm13 51h56a2 2 0 012 2v5H19v-5a2 2 0 012-2z" fill="currentColor"/></g>'
47
+ }
48
+ ];
49
+ }
50
+ }
51
+ };
52
+ var r = function() {
53
+ var e = this, t = e._self._c;
54
+ return t("div", { staticClass: "d-root" }, [t("div", { staticClass: "d-option" }, [t("div", { staticClass: "d-option-title" }, [e._v(e._s(e.$t("title").capitalize()))]), t("div", { staticClass: "text-gray-600", staticStyle: { "padding-bottom": "1em" } }, [e._v(" " + e._s(e.$t("subTitle")) + " ")]), t("EmbedInput", { attrs: { value: e.value, "is-drawer-mode": !0 }, on: { input: function(i) {
55
+ return e.$emit("input", i);
56
+ } } })], 1), t("div", { staticClass: "d-option" }, [t("div", { staticClass: "d-option-title" }, [t("div", { staticStyle: { flex: "1 1 auto" } }, [e._v(" " + e._s(e.$t("responsiveSize")) + " ")]), t("CSwitch", { staticStyle: { "margin-right": "0" }, attrs: { value: !!e.size, size: "small", type: "secondary" }, on: { input: (i) => e.$emit("update:size", i ? "small" : null) } })], 1), e.size ? t("div", { staticStyle: { display: "flex", "flex-direction": "row", "flex-wrap": "wrap", "padding-top": "5px" } }, e._l(e.sizeOptions, function({ value: i, svg: s }, a) {
57
+ return t("div", { key: a, staticClass: "size-option", on: { click: function(m) {
58
+ return e.$emit("update:size", i);
59
+ } } }, [t("svg", { staticClass: "size-option-image", class: { "is-active": e.size === i }, attrs: { viewBox: "0 0 99 65" }, domProps: { innerHTML: e._s(s) } })]);
60
+ }), 0) : e._e()])]);
61
+ }, d = [], v = /* @__PURE__ */ l(
62
+ o,
63
+ r,
64
+ d,
65
+ !1,
66
+ null,
67
+ "5e441f83"
68
+ );
69
+ const z = v.exports;
70
+ export {
71
+ z as default
72
+ };
@@ -0,0 +1,28 @@
1
+ import { n as e } from "./main-B9t0ybqW.js";
2
+ const a = {
3
+ name: "ErrorCallout",
4
+ props: {
5
+ message: {
6
+ type: String,
7
+ required: !0
8
+ },
9
+ size: {
10
+ type: String,
11
+ default: "normal"
12
+ }
13
+ }
14
+ };
15
+ var s = function(r, t) {
16
+ return r("div", { staticClass: "flex items-center", class: [t.data.staticClass], staticStyle: { "margin-top": "calc(1 * var(--rem))" }, style: [t.data.staticStyle] }, [r("div", { staticClass: "error-wrapper bg-red-50 text-red-500", class: [`is-${t.props.size}`], staticStyle: { margin: "calc(1 * var(--rem)) 0" } }, [r("CIcon", { staticStyle: { "margin-right": "0.5em", flex: "0 0 18px" }, attrs: { type: "alert", size: "18" } }), r("div", [t._v(" " + t._s(t.props.message) + " ")])], 1)]);
17
+ }, i = [], n = /* @__PURE__ */ e(
18
+ a,
19
+ s,
20
+ i,
21
+ !0,
22
+ null,
23
+ "a90b7cb8"
24
+ );
25
+ const c = n.exports;
26
+ export {
27
+ c as E
28
+ };
@@ -0,0 +1,81 @@
1
+ import { V as n } from "./PdfViewer-B1zzZU4Y.js";
2
+ import { n as o, S as r } from "./main-B9t0ybqW.js";
3
+ const a = {
4
+ name: "FilesPreviewModal",
5
+ components: {
6
+ Spinner: r,
7
+ VuePdf: n
8
+ },
9
+ props: {
10
+ index: {
11
+ type: Number,
12
+ default: 0
13
+ },
14
+ list: {
15
+ type: Array,
16
+ required: !0
17
+ }
18
+ },
19
+ data() {
20
+ return {
21
+ isLoading: !0,
22
+ currentIndex: this.index
23
+ };
24
+ },
25
+ computed: {
26
+ isPdf() {
27
+ return this.list[this.currentIndex].mime === "application/pdf";
28
+ }
29
+ },
30
+ mounted() {
31
+ window.addEventListener("keyup", this.handleKey, { capture: !0 }), this.toggleIsLoading();
32
+ },
33
+ beforeDestroy() {
34
+ window.removeEventListener("keyup", this.handleKey, { capture: !0 });
35
+ },
36
+ methods: {
37
+ onGo(i) {
38
+ const t = this.currentIndex + i;
39
+ this.list[t] && (this.currentIndex = t, this.toggleIsLoading());
40
+ },
41
+ toggleIsLoading() {
42
+ this.isLoading = !0, setTimeout(() => {
43
+ this.isLoading = !1;
44
+ }, 1e3);
45
+ },
46
+ handleKey(i) {
47
+ i.stopPropagation(), parseInt(i.keyCode, 10) === 37 && this.onGo(-1), parseInt(i.keyCode, 10) === 39 && this.onGo(1);
48
+ const t = i.key || i.keyCode;
49
+ (t === "Escape" || t === "Esc" || t === 27) && this.$emit("close");
50
+ }
51
+ }
52
+ };
53
+ var l = function() {
54
+ var t = this, e = t._self._c;
55
+ return e("div", { staticClass: "flex w-full flex-col", staticStyle: { height: "100%" } }, [e("div", { staticClass: "image-modal-overlay" }), e("div", { staticClass: "image-modal-nav", staticStyle: { "z-index": "2" } }, [e("div", { staticClass: "truncate-text", staticStyle: { "align-items": "center", display: "flex" } }, [e("div", { staticClass: "truncate-text" }, [t._v(t._s(t.list[t.currentIndex].name))])]), e("div", { staticStyle: { display: "flex" } }, [e("div", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: t.$t("show", { thing: t.$t("previous") }), expression: "$t('show', { thing: $t('previous') })" }], staticClass: "image-modal-nav-button", class: { disabled: !t.list[t.currentIndex - 1] }, on: { click: function(s) {
56
+ return t.onGo(-1);
57
+ } } }, [e("svg", { attrs: { xmlns: "http://www.w3.org/2000/svg", width: "22", height: "22", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" } }, [e("path", { attrs: { d: "M19 12H6M12 5l-7 7 7 7" } })])]), e("div", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: t.$t("show", { thing: t.$t("next") }), expression: "$t('show', { thing: $t('next') })" }], staticClass: "image-modal-nav-button", class: { disabled: !t.list[t.currentIndex + 1] }, on: { click: function(s) {
58
+ return t.onGo(1);
59
+ } } }, [e("svg", { attrs: { xmlns: "http://www.w3.org/2000/svg", width: "22", height: "22", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" } }, [e("path", { attrs: { d: "M5 12h13M12 5l7 7-7 7" } })])]), e("a", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: t.$t("download"), expression: "$t('download')" }], staticClass: "image-modal-nav-button", attrs: { href: t.list[t.currentIndex].url, target: "_blank", download: "" } }, [e("svg", { attrs: { xmlns: "http://www.w3.org/2000/svg", width: "22", height: "22", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" } }, [e("path", { attrs: { d: "M3 15v4c0 1.1.9 2 2 2h14a2 2 0 0 0 2-2v-4M17 9l-5 5-5-5M12 12.8V2.5" } })])]), e("div", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: t.$t("close"), expression: "$t('close')" }], staticClass: "image-modal-nav-button", on: { click: function(s) {
60
+ return t.$emit("close");
61
+ } } }, [e("svg", { attrs: { xmlns: "http://www.w3.org/2000/svg", width: "22", height: "22", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" } }, [e("line", { attrs: { x1: "18", y1: "6", x2: "6", y2: "18" } }), e("line", { attrs: { x1: "6", y1: "6", x2: "18", y2: "18" } })])])])]), e("div", { staticClass: "content-container flex w-full items-center justify-center", staticStyle: { position: "relative" }, on: { click: function(s) {
62
+ return t.$emit("close");
63
+ } } }, [t.isLoading ? e("Spinner", { staticStyle: { position: "absolute", left: "50%", top: "50%", transform: "translate(-50%, -50%)" }, attrs: { size: "50px" } }) : t._e(), t.isPdf ? e("div", { staticClass: "pdf-root" }, [e("VuePdf", { staticClass: "pdf-page", attrs: { src: t.list[t.currentIndex].url }, on: { rendered: () => {
64
+ t.isLoading = !1;
65
+ } }, nativeOn: { click: function(s) {
66
+ s.stopPropagation();
67
+ } } })], 1) : t.isLoading ? t._e() : e("img", { staticClass: "modal-image", attrs: { src: t.list[t.currentIndex].url }, on: { load: function(s) {
68
+ t.isLoading = !1;
69
+ } } })], 1)]);
70
+ }, d = [], c = /* @__PURE__ */ o(
71
+ a,
72
+ l,
73
+ d,
74
+ !1,
75
+ null,
76
+ "76622471"
77
+ );
78
+ const p = c.exports;
79
+ export {
80
+ p as default
81
+ };
@@ -0,0 +1,114 @@
1
+ import { R as c, n as _ } from "./main-B9t0ybqW.js";
2
+ var m = {
3
+ name: "simplebar-vue",
4
+ mounted: function() {
5
+ var e = c.getOptions(this.$refs.element.attributes);
6
+ this.SimpleBar = new c(this.$refs.element, e);
7
+ },
8
+ computed: {
9
+ scrollElement: function() {
10
+ return this.$refs.scrollElement;
11
+ },
12
+ contentElement: function() {
13
+ return this.$refs.contentElement;
14
+ }
15
+ }
16
+ }, d = m, o = function() {
17
+ var e = this, s = e.$createElement, r = e._self._c || s;
18
+ return r("div", {
19
+ ref: "element"
20
+ }, [r("div", {
21
+ staticClass: "simplebar-wrapper"
22
+ }, [e._m(0), e._v(" "), r("div", {
23
+ staticClass: "simplebar-mask"
24
+ }, [r("div", {
25
+ staticClass: "simplebar-offset"
26
+ }, [r("div", e._g({
27
+ ref: "scrollElement",
28
+ staticClass: "simplebar-content-wrapper"
29
+ }, Object.assign({}, e.$listeners.scroll && {
30
+ scroll: e.$listeners.scroll
31
+ })), [r("div", {
32
+ ref: "contentElement",
33
+ staticClass: "simplebar-content"
34
+ }, [e._t("default")], 2)])])]), e._v(" "), r("div", {
35
+ staticClass: "simplebar-placeholder"
36
+ })]), e._v(" "), e._m(1), e._v(" "), e._m(2)]);
37
+ }, v = [function() {
38
+ var t = this, e = t.$createElement, s = t._self._c || e;
39
+ return s("div", {
40
+ staticClass: "simplebar-height-auto-observer-wrapper"
41
+ }, [s("div", {
42
+ staticClass: "simplebar-height-auto-observer"
43
+ })]);
44
+ }, function() {
45
+ var t = this, e = t.$createElement, s = t._self._c || e;
46
+ return s("div", {
47
+ staticClass: "simplebar-track simplebar-horizontal"
48
+ }, [s("div", {
49
+ staticClass: "simplebar-scrollbar"
50
+ })]);
51
+ }, function() {
52
+ var t = this, e = t.$createElement, s = t._self._c || e;
53
+ return s("div", {
54
+ staticClass: "simplebar-track simplebar-vertical"
55
+ }, [s("div", {
56
+ staticClass: "simplebar-scrollbar"
57
+ })]);
58
+ }];
59
+ o._withStripped = !0;
60
+ var p = void 0, u = void 0;
61
+ function f(t, e, s, r, n, i, l, S) {
62
+ var a = (typeof s == "function" ? s.options : s) || {};
63
+ return a.__file = "/Users/adriendenat/Sites/simplebar/packages/simplebar-vue/index.vue", a.render || (a.render = t.render, a.staticRenderFns = t.staticRenderFns, a._compiled = !0), a._scopeId = r, a;
64
+ }
65
+ var $ = f({
66
+ render: o,
67
+ staticRenderFns: v
68
+ }, p, d, u);
69
+ const h = {
70
+ name: "FlagIcon",
71
+ props: {
72
+ region: {
73
+ type: String,
74
+ default: null
75
+ },
76
+ title: {
77
+ type: String,
78
+ default: null
79
+ },
80
+ isSquared: {
81
+ type: Boolean,
82
+ default: !1
83
+ }
84
+ },
85
+ mounted() {
86
+ var i, l;
87
+ const t = "FLAG_ICONS", e = (l = (i = this.$el).getRootNode) == null ? void 0 : l.call(i), r = (e == null ? void 0 : e.toString()) === "[object ShadowRoot]" ? e : document.head;
88
+ if (r.querySelector(`#${t}`))
89
+ return;
90
+ const n = document.createElement("link");
91
+ n.id = t, n.rel = "stylesheet", n.type = "text/css", n.href = "https://www.unpkg.com/flag-icons@6.6.6/css/flag-icons.min.css", n.media = "all", r.appendChild(n);
92
+ }
93
+ };
94
+ var b = function() {
95
+ var e = this, s = e._self._c;
96
+ return e.region ? s("span", { staticClass: "fi", class: [
97
+ `fi-${e.region.toLowerCase()}`,
98
+ {
99
+ fis: e.isSquared
100
+ }
101
+ ], attrs: { title: e.title || e.region } }) : e._e();
102
+ }, g = [], C = /* @__PURE__ */ _(
103
+ h,
104
+ b,
105
+ g,
106
+ !1,
107
+ null,
108
+ null
109
+ );
110
+ const w = C.exports;
111
+ export {
112
+ w as F,
113
+ $ as s
114
+ };