@cling-se/widget 0.14.4 → 0.14.6

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 (129) hide show
  1. package/dist/AddClientCallout-C7abPZ87.js +46 -0
  2. package/dist/AnswerModal-CsA2pl2P.js +3874 -0
  3. package/dist/AttachmentItem-Da1-7xwf.js +78 -0
  4. package/dist/BaseDatePicker-k9zlSi5J.js +3183 -0
  5. package/dist/BaseUpload-BUrXX3fT.js +1977 -0
  6. package/dist/BlockMedia-CYI07qAn.js +76 -0
  7. package/dist/CCallout-Qwae66vo.js +59 -0
  8. package/dist/CCurrencyDropdown-Y_u0hgBx.js +246 -0
  9. package/dist/CDropdownItem-CXJ4xD8W.js +538 -0
  10. package/dist/CField.vue_vue_type_style_index_0_lang-l0sNRNKZ.js +1 -0
  11. package/dist/CFormField--m3PvQuT.js +241 -0
  12. package/dist/CPhoneFormat-Qg6MkDVP.js +62 -0
  13. package/dist/CPriceInput-Dlx44UrR.js +112 -0
  14. package/dist/CTabs.vue_vue_type_style_index_0_scoped_b7262014_lang-l0sNRNKZ.js +1 -0
  15. package/dist/ClientAutocomplete-BKKc_br6.js +78 -0
  16. package/dist/ClientModal-CVZFb1Br.js +625 -0
  17. package/dist/ColorPicker-Bo3s3Esp.js +2879 -0
  18. package/dist/CompanyModal-DadjAioS.js +141 -0
  19. package/dist/ContentWrapper-BC3ZBQW9.js +183 -0
  20. package/dist/CoverBlockSettings-B484eE4g.js +275 -0
  21. package/dist/DocAnswer-CcYryOWI.js +36 -0
  22. package/dist/DocDetails-BigsoEWL.js +246 -0
  23. package/dist/DocForm-DlN0eNWt.js +7273 -0
  24. package/dist/DocFormSend-TqKo210I.js +143 -0
  25. package/dist/DocLinks-DSo54vDn.js +38 -0
  26. package/dist/DocModalBase-XlM1SThW.js +28 -0
  27. package/dist/DocPrint-tD0Vd9Sw.js +240 -0
  28. package/dist/DocReceipt-CDHPrhXM.js +210 -0
  29. package/dist/DocSendReminder-C62RhltH.js +137 -0
  30. package/dist/DocTextEditor-VjhV9IRp.js +17181 -0
  31. package/dist/DocTimeline-LcW4z3nC.js +481 -0
  32. package/dist/DocumentClient-CqbTRdpB.js +136 -0
  33. package/dist/DocumentLayout-Dbf8_01r.js +4909 -0
  34. package/dist/DocumentLogotype-DXYnBedV.js +87 -0
  35. package/dist/DocumentVoided-vH1Ti5lZ.js +25 -0
  36. package/dist/EmbedInput-D9qP8OnY.js +113 -0
  37. package/dist/EmbedSettings-DISuNqJT.js +72 -0
  38. package/dist/ErrorCallout-CCtCVwSh.js +28 -0
  39. package/dist/FilePreviewModal-BjhNyb6L.js +81 -0
  40. package/dist/Flag-Dhukv9_J.js +114 -0
  41. package/dist/HeaderSettings-CK4SkB1x.js +392 -0
  42. package/dist/ImageSelectModal-DnvPZzXx.js +84 -0
  43. package/dist/ImageUploadWrapper-B7cNMu5a.js +1604 -0
  44. package/dist/Index-B3HoK_cZ.js +84 -0
  45. package/dist/Index-B3aucNji.js +25 -0
  46. package/dist/Index-B9H5MMHb.js +62 -0
  47. package/dist/Index-BAYdvT-t.js +754 -0
  48. package/dist/Index-BLeQprjq.js +46 -0
  49. package/dist/Index-BOyvQlng.js +154 -0
  50. package/dist/Index-BVsw2tak.js +70 -0
  51. package/dist/Index-BY1UKGEO.js +98 -0
  52. package/dist/Index-Bh0kMSsA.js +107 -0
  53. package/dist/Index-BlQSM7tC.js +144 -0
  54. package/dist/Index-BpcJBGGd.js +642 -0
  55. package/dist/Index-Bs8wprXw.js +58 -0
  56. package/dist/Index-BvZZAvFd.js +21 -0
  57. package/dist/Index-CFo-3Y5Q.js +26 -0
  58. package/dist/Index-CNvp5K3L.js +559 -0
  59. package/dist/Index-CPJVx14x.js +171 -0
  60. package/dist/Index-CQ325eVT.js +140 -0
  61. package/dist/Index-CWrDtcfT.js +49 -0
  62. package/dist/Index-CyJnSvDR.js +223 -0
  63. package/dist/Index-D6bc7lg4.js +52 -0
  64. package/dist/Index-DCR8ev4U.js +33 -0
  65. package/dist/Index-DGQSB9cH.js +24 -0
  66. package/dist/Index-DXAvlq74.js +292 -0
  67. package/dist/Index-D_rfst8y.js +45 -0
  68. package/dist/Index-Dm8xMFGg.js +61 -0
  69. package/dist/Index-DtSSgtxB.js +55 -0
  70. package/dist/Index-DuTw9vhb.js +77 -0
  71. package/dist/Index-Dw26jtGV.js +31 -0
  72. package/dist/Index-OxN73_fO.js +32 -0
  73. package/dist/Index-S-FHG7_k.js +2402 -0
  74. package/dist/Index-ZFkitzfq.js +69 -0
  75. package/dist/Index-dyWK9jgr.js +25 -0
  76. package/dist/Index-gb11ngPS.js +57 -0
  77. package/dist/Index-lKk_XKJ3.js +150 -0
  78. package/dist/InputToggleRow-DSSvhPKA.js +57 -0
  79. package/dist/ManualPopover-lpJYSkw5.js +58 -0
  80. package/dist/MediaWrapper-BQ22FA2B.js +23 -0
  81. package/dist/NotBindingText-JxwzZLPP.js +32 -0
  82. package/dist/PackageGroup-BLSMSUDz.js +699 -0
  83. package/dist/PdfTerms-DtutjM5Y.js +36 -0
  84. package/dist/PdfViewer-BsxcZI_x.js +374 -0
  85. package/dist/PlainHtml-BMPZs2fT.js +20 -0
  86. package/dist/PriceHeader-BRYY01H2.js +339 -0
  87. package/dist/SearchApi-6001iFxU.js +161 -0
  88. package/dist/Setup-cw6jMI9M.js +50 -0
  89. package/dist/SmartList-q6H-uLbm.js +83 -0
  90. package/dist/TermsSettings-DWvaPneu.js +102 -0
  91. package/dist/ThemeColorRow-BXWnvfz-.js +67 -0
  92. package/dist/ToggleBinding-DydtwpNG.js +38 -0
  93. package/dist/UploadModal-D_EDKHGD.js +95 -0
  94. package/dist/VideoPlayerInput-B9yzUeBW.js +93 -0
  95. package/dist/VideoPlayerSettings-Bvp9l0yj.js +61 -0
  96. package/dist/VideoSelectModal-DY3N4JiS.js +100 -0
  97. package/dist/anime.es-BrPTThYb.js +858 -0
  98. package/dist/answerDocumentMixin-BYZPU_R-.js +51 -0
  99. package/dist/color-TdtKxwVa.js +19 -0
  100. package/dist/debounce-BPnlzNwd.js +84 -0
  101. package/dist/dom-CJxkno7i.js +91 -0
  102. package/dist/favicon.ico +0 -0
  103. package/dist/focusDrawerMixin-DC9Oa1i7.js +22 -0
  104. package/dist/formComponentsInstall-CEW6TK6z.js +2499 -0
  105. package/dist/formDrawerState-CAzvSMiQ.js +20 -0
  106. package/dist/formValidationMixin-D7zXxCpC.js +49 -0
  107. package/dist/i18nMessages-Chz_lxGG.js +17 -0
  108. package/dist/index-B9WDC3Xe.js +166 -0
  109. package/dist/index-BCMaUC5r.js +3916 -0
  110. package/dist/index-BDMI4NVY.js +492 -0
  111. package/dist/index-BbscgdRg.js +81 -0
  112. package/dist/index-CLUljEDI.js +347 -0
  113. package/dist/index-SxyZvewN.js +102 -0
  114. package/dist/index.es.js +35 -0
  115. package/dist/index.umd.js +3148 -0
  116. package/dist/main-CQBEuZk9.js +56739 -0
  117. package/dist/mapFormMixin-DlFcgwhm.js +72 -0
  118. package/dist/omit-BWy0Zhd3.js +31 -0
  119. package/dist/publicSenderState-CvOcFv2U.js +21 -0
  120. package/dist/splitpanes-BHUVsCZF.js +382 -0
  121. package/dist/style.css +4 -0
  122. package/dist/throttle-BrC8eGjQ.js +18 -0
  123. package/dist/tinycolor-PhFP695w.js +633 -0
  124. package/dist/tippy.esm-7dmKOUvu.js +1799 -0
  125. package/dist/utils-NBLgNGHR.js +108 -0
  126. package/dist/vuedraggable.umd-ByfH7ZxC.js +3161 -0
  127. package/dist/vuex.esm-DKGl8mcw.js +467 -0
  128. package/package.json +1 -1
  129. package/vite.config.ts +0 -1
@@ -0,0 +1,87 @@
1
+ import { a } from "./publicSenderState-CvOcFv2U.js";
2
+ import { g as s, n as l } from "./main-CQBEuZk9.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-B7cNMu5a.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
+ "79960d5c"
83
+ );
84
+ const f = g.exports;
85
+ export {
86
+ f as default
87
+ };
@@ -0,0 +1,25 @@
1
+ import { n } from "./main-CQBEuZk9.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-BPnlzNwd.js";
2
+ import { b as l, n as o } from "./main-CQBEuZk9.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-D9qP8OnY.js";
2
+ import { n as l } from "./main-CQBEuZk9.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
+ "515692e9"
68
+ );
69
+ const z = v.exports;
70
+ export {
71
+ z as default
72
+ };
@@ -0,0 +1,28 @@
1
+ import { n as e } from "./main-CQBEuZk9.js";
2
+ const s = {
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 a = 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
+ s,
19
+ a,
20
+ i,
21
+ !0,
22
+ null,
23
+ "882e2972"
24
+ );
25
+ const c = n.exports;
26
+ export {
27
+ c as E
28
+ };
@@ -0,0 +1,81 @@
1
+ import { V as n } from "./PdfViewer-BsxcZI_x.js";
2
+ import { n as o, S as r } from "./main-CQBEuZk9.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
+ "677d587e"
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-CQBEuZk9.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
+ };