@cling-se/widget 0.9.1 → 0.9.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 (132) hide show
  1. package/dist/AddClientCallout-746899d9.js +57 -0
  2. package/dist/{AnswerModal-c22c6729.js → AnswerModal-fdfea0f8.js} +7 -5
  3. package/dist/{AttachmentItem-ab7c264b.js → AttachmentItem-5671c64d.js} +5 -7
  4. package/dist/BaseDatePicker-a9240306.js +3156 -0
  5. package/dist/{BaseInput-2b048506.js → BaseInput-d3c3688b.js} +4 -4
  6. package/dist/{BaseUpload-869cbd9a.js → BaseUpload-8e7a2b72.js} +3 -3
  7. package/dist/BlockMedia-b613a2a4.js +72 -0
  8. package/dist/CCallout-e9ff903a.js +52 -0
  9. package/dist/CDropdownItem-05d84f95.js +610 -0
  10. package/dist/CField-cd4dcae9.js +183 -0
  11. package/dist/CField.vue_vue_type_style_index_0_lang-4ed993c7.js +1 -0
  12. package/dist/CSlider.vue_vue_type_style_index_0_lang-383db616.js +83 -0
  13. package/dist/ClientAutocomplete-421a2216.js +80 -0
  14. package/dist/ClientModal-11341b1c.js +547 -0
  15. package/dist/ColorPicker-f90939b5.js +2881 -0
  16. package/dist/{CompanyModal-26243605.js → CompanyModal-2bfd21b8.js} +12 -11
  17. package/dist/{ContentWrapper-315b8ac7.js → ContentWrapper-4aae35b2.js} +21 -14
  18. package/dist/{CoverBlockSettings-ff4d5ccc.js → CoverBlockSettings-1f917be3.js} +7 -7
  19. package/dist/DocForm-0891c6b2.js +6767 -0
  20. package/dist/DocFormSend-2b35999d.js +135 -0
  21. package/dist/{DocModalBase-3d81e120.js → DocModalBase-225e2f2d.js} +1 -1
  22. package/dist/{DocReceipt-c9c5aefc.js → DocReceipt-1391c17a.js} +1 -1
  23. package/dist/{DocSendReminder-ab8e6f0f.js → DocSendReminder-c488842d.js} +1 -1
  24. package/dist/{DocTextEditor-88987249.js → DocTextEditor-2538e1ab.js} +16 -12
  25. package/dist/{DocTimeline-8e8a1b51.js → DocTimeline-69ada0de.js} +11 -11
  26. package/dist/DocumentClient-74b8f25b.js +145 -0
  27. package/dist/{DocumentLogotype-a777ea0d.js → DocumentLogotype-e89b53fb.js} +3 -3
  28. package/dist/{EmbedInput-4b92adae.js → EmbedInput-b7fefe5e.js} +10 -11
  29. package/dist/{EmbedSettings-0701c838.js → EmbedSettings-4957252f.js} +10 -11
  30. package/dist/ErrorCallout-42e45ec0.js +30 -0
  31. package/dist/{FilePreviewModal-fa0f4b2c.js → FilePreviewModal-75693619.js} +6 -7
  32. package/dist/FormInputRow-09d450e3.js +2045 -0
  33. package/dist/{HeaderSettings-3b1f470a.js → HeaderSettings-9b69eada.js} +23 -19
  34. package/dist/{ImageSelectModal-24b1d738.js → ImageSelectModal-94d4dc7f.js} +20 -18
  35. package/dist/{ImageUploadWrapper-f9d3ab48.js → ImageUploadWrapper-a144b042.js} +2 -2
  36. package/dist/{Index-a6d8cb6c.js → Index-00ef9241.js} +10 -10
  37. package/dist/{Index-17041bc1.js → Index-023c3119.js} +6 -7
  38. package/dist/{Index-1df9e104.js → Index-1bafafca.js} +2 -2
  39. package/dist/{Index-e9dcaa48.js → Index-2cb8fa22.js} +73 -118
  40. package/dist/{Index-9797765e.js → Index-304c45be.js} +21 -16
  41. package/dist/{Index-ec4600d0.js → Index-35387450.js} +52 -42
  42. package/dist/Index-37a9183b.js +28 -0
  43. package/dist/{Index-d21e1d0d.js → Index-3dff19dd.js} +7 -7
  44. package/dist/{Index-53f58582.js → Index-3ee2e944.js} +2 -2
  45. package/dist/{Index-41e37657.js → Index-42e26b46.js} +11 -11
  46. package/dist/{Index-36b91cfc.js → Index-4440fe3d.js} +6 -7
  47. package/dist/{Index-36fc26f9.js → Index-4563d3fa.js} +33 -31
  48. package/dist/{Index-9262d0cb.js → Index-53da7be8.js} +3 -3
  49. package/dist/{Index-bfc7f353.js → Index-62936c19.js} +16 -17
  50. package/dist/{Index-9a0239fe.js → Index-693005f0.js} +6 -7
  51. package/dist/{Index-5c0744c1.js → Index-78f13416.js} +6 -7
  52. package/dist/{Index-a01c2862.js → Index-90492f19.js} +5 -6
  53. package/dist/{Index-8bb9f798.js → Index-96f39afc.js} +6 -7
  54. package/dist/{Index-ee9ff714.js → Index-97d1f2f3.js} +8 -8
  55. package/dist/{Index-41e93dd5.js → Index-9a243eb8.js} +2 -2
  56. package/dist/{Index-01f77191.js → Index-9ffe9766.js} +11 -12
  57. package/dist/{Index-be520920.js → Index-a37beb03.js} +1 -1
  58. package/dist/{Index-e5ebcd2f.js → Index-a554b58c.js} +6 -7
  59. package/dist/{Index-aa1323ee.js → Index-a86ea774.js} +8 -9
  60. package/dist/{Index-c070cd5e.js → Index-abb8c6e4.js} +6 -6
  61. package/dist/{Index-74d98d97.js → Index-b7def77a.js} +8 -9
  62. package/dist/{Index-6f5192b8.js → Index-bcc478b3.js} +7 -8
  63. package/dist/{Index-033cd5ed.js → Index-cec7d4f1.js} +22 -15
  64. package/dist/{Index-560f7a0f.js → Index-d68a28da.js} +7 -7
  65. package/dist/{Index-5ba3dd14.js → Index-dbe97658.js} +2 -2
  66. package/dist/{Index-a5b8ec5c.js → Index-ec8d534f.js} +4 -6
  67. package/dist/{Index-013c4412.js → Index-f2b66b79.js} +6 -7
  68. package/dist/{Index-8ad015e2.js → Index-f453850f.js} +6 -7
  69. package/dist/{Index-78391f8b.js → Index-f9b5f03c.js} +27 -20
  70. package/dist/{InputToggleRow-9aa959ff.js → InputToggleRow-68320d9f.js} +1 -1
  71. package/dist/IsPremiumPreStep-0c7032a3.js +1919 -0
  72. package/dist/{MediaWrapper-03b27562.js → MediaWrapper-c50879c2.js} +4 -4
  73. package/dist/{NotBindingText-fb4e9ecb.js → NotBindingText-8f2d9244.js} +2 -2
  74. package/dist/{PackageGroup-821d41fa.js → PackageGroup-2c49e99b.js} +24 -17
  75. package/dist/{PdfTerms-4a29bcc9.js → PdfTerms-94153a5f.js} +6 -7
  76. package/dist/{PdfViewer-374bfe41.js → PdfViewer-701ad40e.js} +2 -2
  77. package/dist/{PlainHtml-65923dd4.js → PlainHtml-04a6d7f9.js} +1 -1
  78. package/dist/PriceHeader-7f92d5a7.js +336 -0
  79. package/dist/SearchApi-ffe5b697.js +148 -0
  80. package/dist/{TermsSettings-4a40aaa2.js → TermsSettings-b1bf19e9.js} +6 -6
  81. package/dist/{ThemeColorRow-72b7a35b.js → ThemeColorRow-913497f6.js} +7 -6
  82. package/dist/{ToggleBinding-00c37a9d.js → ToggleBinding-6518935d.js} +8 -9
  83. package/dist/{UploadModal-761770b9.js → UploadModal-3c399d25.js} +21 -22
  84. package/dist/{VideoPlayerInput-6692fe27.js → VideoPlayerInput-b54845a4.js} +5 -6
  85. package/dist/{VideoPlayerSettings-2b7a8a39.js → VideoPlayerSettings-496e9e79.js} +13 -14
  86. package/dist/{VideoSelectModal-4596e9b4.js → VideoSelectModal-3a566398.js} +10 -10
  87. package/dist/anime.es-e284c852.js +858 -0
  88. package/dist/answerDocumentMixin-0e5e4dbb.js +54 -0
  89. package/dist/color-71c20583.js +15 -0
  90. package/dist/{cssMode-34bf902e.js → cssMode-c0865919.js} +15 -14
  91. package/dist/focusDrawerMixin-298861bc.js +68 -0
  92. package/dist/formComponentsInstall-1be6791d.js +2491 -0
  93. package/dist/formValidationMixin-df38771c.js +4984 -0
  94. package/dist/{freemarker2-61453951.js → freemarker2-85dde97c.js} +19 -18
  95. package/dist/{handlebars-24c80c6f.js → handlebars-6aa1e52b.js} +18 -17
  96. package/dist/{html-fc291ba3.js → html-f0c735cd.js} +14 -13
  97. package/dist/{htmlMode-bb27a86a.js → htmlMode-7b3bd7c9.js} +19 -18
  98. package/dist/{index-afe3eb26.js → index-1ef6f423.js} +21 -15
  99. package/dist/index-30808a2c.js +490 -0
  100. package/dist/{index-053f9545.js → index-431938de.js} +13 -12
  101. package/dist/index-6d08eac3.js +14 -0
  102. package/dist/index-805c56e4.js +4 -0
  103. package/dist/index.es.js +3 -3
  104. package/dist/index.umd.js +713 -600
  105. package/dist/{javascript-584c9812.js → javascript-9c54ad9e.js} +11 -10
  106. package/dist/{jsonMode-f03e810a.js → jsonMode-1d1176fa.js} +19 -18
  107. package/dist/{liquid-2157b417.js → liquid-0738c73d.js} +11 -10
  108. package/dist/{main-e2129a84.js → main-2d9b8259.js} +19557 -20415
  109. package/dist/mapFormMixin-308bbdab.js +66 -0
  110. package/dist/{publicSenderState-11d47322.js → publicSenderState-9eecb11f.js} +1 -1
  111. package/dist/{python-7f1728ff.js → python-588c9e64.js} +11 -10
  112. package/dist/{razor-54008302.js → razor-fbaa1d21.js} +14 -13
  113. package/dist/regions-29ee6964.js +1250 -0
  114. package/dist/simplebar.min-75960401.js +2429 -0
  115. package/dist/style.css +4 -0
  116. package/dist/template-b877debf.js +526 -0
  117. package/dist/throttle-d7bed81a.js +18 -0
  118. package/dist/tinycolor-ef496244.js +634 -0
  119. package/dist/{tsMode-6bcf5f10.js → tsMode-c1de8e10.js} +15 -14
  120. package/dist/{typescript-f225fd6d.js → typescript-737827aa.js} +11 -10
  121. package/dist/{utils-c4dbd526.js → utils-69c41ae9.js} +5 -5
  122. package/dist/vuedraggable.umd-67b8cddf.js +3179 -0
  123. package/dist/{xml-8680011c.js → xml-30e811a1.js} +11 -10
  124. package/package.json +4 -4
  125. package/stats.html +1 -1
  126. package/dist/DocForm-b6cc1bdf.js +0 -22074
  127. package/dist/DocFormSend-1c7e370d.js +0 -113
  128. package/dist/Index-0f345bed.js +0 -29
  129. package/dist/PriceHeader-4fb21725.js +0 -329
  130. package/dist/formComponentsInstall-0d5f842a.js +0 -11121
  131. package/dist/index-3a6d34e0.js +0 -11
  132. package/dist/throttle-7fc52dc7.js +0 -18
@@ -0,0 +1,610 @@
1
+ import { V as N, a8 as P, i as T, a9 as R, f as L, n as E } from "./main-2d9b8259.js";
2
+ class F {
3
+ constructor({ defaults: e = { width: 800, height: 600 }, delay: i = 50 } = {}) {
4
+ this._width = e.width, this._height = e.height, this._delay = i, this._timer = null, this._initialized = !1, this._handler = this._handleResize.bind(this);
5
+ }
6
+ _handleResize() {
7
+ clearTimeout(this._timer), this._timer = setTimeout(() => {
8
+ this.update();
9
+ }, this._delay);
10
+ }
11
+ get width() {
12
+ return this._width;
13
+ }
14
+ get height() {
15
+ return this._height;
16
+ }
17
+ get initialized() {
18
+ return this._initialized;
19
+ }
20
+ update() {
21
+ this._width = window.innerWidth, this._height = window.innerHeight;
22
+ }
23
+ setDelay(e) {
24
+ this._delay = e;
25
+ }
26
+ init() {
27
+ return typeof window > "u" ? this : this.initialized ? this : (this.update(), window.addEventListener("resize", this._handler, { passive: !0 }), this._initialized = !0, this);
28
+ }
29
+ destroy() {
30
+ return this.initialized ? (window.removeEventListener("resize", this._handler, { passive: !0 }), this._initialized = !1, this) : this;
31
+ }
32
+ }
33
+ const H = new F().init(), g = new N({ data: { windowSize: H } }), j = {
34
+ computed: {
35
+ windowWidth() {
36
+ return g.windowSize.width;
37
+ },
38
+ windowHeight() {
39
+ return g.windowSize.height;
40
+ },
41
+ mq() {
42
+ const { width: t } = g.windowSize, e = {
43
+ sm: 576,
44
+ md: 1024,
45
+ lg: 1280,
46
+ xl: 1 / 0
47
+ };
48
+ let i = "lg";
49
+ return Object.keys(e).reverse().forEach((a) => {
50
+ t <= e[a] && (i = a);
51
+ }), i;
52
+ }
53
+ }
54
+ };
55
+ var W = P, q = function() {
56
+ return W.Date.now();
57
+ }, K = q, V = /\s/;
58
+ function Y(t) {
59
+ for (var e = t.length; e-- && V.test(t.charAt(e)); )
60
+ ;
61
+ return e;
62
+ }
63
+ var U = Y, X = U, G = /^\s+/;
64
+ function J(t) {
65
+ return t && t.slice(0, X(t) + 1).replace(G, "");
66
+ }
67
+ var Q = J, Z = Q, I = T, ee = R, O = 0 / 0, te = /^[-+]0x[0-9a-f]+$/i, ie = /^0b[01]+$/i, se = /^0o[0-7]+$/i, ne = parseInt;
68
+ function oe(t) {
69
+ if (typeof t == "number")
70
+ return t;
71
+ if (ee(t))
72
+ return O;
73
+ if (I(t)) {
74
+ var e = typeof t.valueOf == "function" ? t.valueOf() : t;
75
+ t = I(e) ? e + "" : e;
76
+ }
77
+ if (typeof t != "string")
78
+ return t === 0 ? t : +t;
79
+ t = Z(t);
80
+ var i = ie.test(t);
81
+ return i || se.test(t) ? ne(t.slice(2), i ? 2 : 8) : te.test(t) ? O : +t;
82
+ }
83
+ var ae = oe, re = T, w = K, A = ae, le = "Expected a function", de = Math.max, ce = Math.min;
84
+ function ue(t, e, i) {
85
+ var a, s, d, r, n, l, u = 0, C = !1, h = !1, v = !0;
86
+ if (typeof t != "function")
87
+ throw new TypeError(le);
88
+ e = A(e) || 0, re(i) && (C = !!i.leading, h = "maxWait" in i, d = h ? de(A(i.maxWait) || 0, e) : d, v = "trailing" in i ? !!i.trailing : v);
89
+ function b(o) {
90
+ var c = a, f = s;
91
+ return a = s = void 0, u = o, r = t.apply(f, c), r;
92
+ }
93
+ function S(o) {
94
+ return u = o, n = setTimeout(p, e), C ? b(o) : r;
95
+ }
96
+ function M(o) {
97
+ var c = o - l, f = o - u, B = e - c;
98
+ return h ? ce(B, d - f) : B;
99
+ }
100
+ function $(o) {
101
+ var c = o - l, f = o - u;
102
+ return l === void 0 || c >= e || c < 0 || h && f >= d;
103
+ }
104
+ function p() {
105
+ var o = w();
106
+ if ($(o))
107
+ return k(o);
108
+ n = setTimeout(p, M(o));
109
+ }
110
+ function k(o) {
111
+ return n = void 0, v && a ? b(o) : (a = s = void 0, r);
112
+ }
113
+ function z() {
114
+ n !== void 0 && clearTimeout(n), u = 0, a = l = s = n = void 0;
115
+ }
116
+ function D() {
117
+ return n === void 0 ? r : k(w());
118
+ }
119
+ function y() {
120
+ var o = w(), c = $(o);
121
+ if (a = arguments, s = this, l = o, c) {
122
+ if (n === void 0)
123
+ return S(l);
124
+ if (h)
125
+ return clearTimeout(n), n = setTimeout(p, e), b(l);
126
+ }
127
+ return n === void 0 && (n = setTimeout(p, e)), r;
128
+ }
129
+ return y.cancel = z, y.flush = D, y;
130
+ }
131
+ var he = ue;
132
+ const Te = /* @__PURE__ */ L(he), m = (t, e = !1) => t ? e ? t.querySelectorAll('*[tabindex="-1"]') : t.querySelectorAll(`a[href]:not([tabindex="-1"]),
133
+ area[href],
134
+ input:not([disabled]),
135
+ select:not([disabled]),
136
+ textarea:not([disabled]),
137
+ button:not([disabled]),
138
+ iframe,
139
+ object,
140
+ embed,
141
+ *[tabindex]:not([tabindex="-1"]),
142
+ *[contenteditable]`) : null;
143
+ let _;
144
+ const fe = (t, { value: e = !0 }) => {
145
+ if (e) {
146
+ let i = m(t), a = m(t, !0);
147
+ i && i.length > 0 && (_ = (s) => {
148
+ i = m(t), a = m(t, !0);
149
+ const d = i[0], r = i[i.length - 1];
150
+ s.target === d && s.shiftKey && s.key === "Tab" ? (s.preventDefault(), r.focus()) : (s.target === r || Array.from(a).indexOf(s.target) >= 0) && !s.shiftKey && s.key === "Tab" && (s.preventDefault(), d.focus());
151
+ }, t.addEventListener("keydown", _));
152
+ }
153
+ }, pe = (t) => {
154
+ t.removeEventListener("keydown", _);
155
+ }, me = {
156
+ bind: fe,
157
+ unbind: pe
158
+ };
159
+ var x = { exports: {} };
160
+ (function(t, e) {
161
+ Object.defineProperty(e, "__esModule", {
162
+ value: !0
163
+ }), e.default = i;
164
+ function i() {
165
+ return !!(typeof window < "u" && ("ontouchstart" in window || window.DocumentTouch && typeof document < "u" && document instanceof window.DocumentTouch)) || !!(typeof navigator < "u" && (navigator.maxTouchPoints || navigator.msMaxTouchPoints));
166
+ }
167
+ t.exports = e.default;
168
+ })(x, x.exports);
169
+ var ve = x.exports;
170
+ const be = /* @__PURE__ */ L(ve), Le = be();
171
+ function Ee(t, e) {
172
+ return e.split(".").reduce((a, s) => a ? a[s] : null, t);
173
+ }
174
+ function ye(t) {
175
+ typeof t.remove < "u" ? t.remove() : typeof t.parentNode < "u" && t.parentNode !== null && t.parentNode.removeChild(t);
176
+ }
177
+ function ge(t) {
178
+ const e = document.createElement("div");
179
+ e.style.position = "absolute", e.style.left = "0px", e.style.top = "0px";
180
+ const i = document.createElement("div");
181
+ return e.appendChild(i), i.appendChild(t), document.body.appendChild(e), e;
182
+ }
183
+ function Se(t, e, i) {
184
+ return Math.max(e, Math.min(i, t));
185
+ }
186
+ const we = ["escape", "outside"], _e = {
187
+ name: "CDropdown",
188
+ directives: {
189
+ trapFocus: me
190
+ },
191
+ mixins: [j],
192
+ props: {
193
+ value: {
194
+ type: [String, Number, Boolean, Object, Array, Function],
195
+ default: null
196
+ },
197
+ disabled: {
198
+ type: Boolean,
199
+ default: !1
200
+ },
201
+ hoverable: {
202
+ type: Boolean,
203
+ default: !1
204
+ },
205
+ inline: {
206
+ type: Boolean,
207
+ default: !1
208
+ },
209
+ scrollable: {
210
+ type: Boolean,
211
+ default: !1
212
+ },
213
+ maxHeight: {
214
+ type: [String, Number],
215
+ default: 200
216
+ },
217
+ position: {
218
+ type: String,
219
+ default: "is-bottom-left",
220
+ validator(t) {
221
+ return [
222
+ "is-top-right",
223
+ "is-top-left",
224
+ "is-bottom-left",
225
+ "is-bottom-right"
226
+ ].indexOf(t) > -1;
227
+ }
228
+ },
229
+ mobileModal: {
230
+ type: Boolean,
231
+ default: () => !0
232
+ // config.defaultDropdownMobileModal,
233
+ },
234
+ ariaRole: {
235
+ type: String,
236
+ validator(t) {
237
+ return ["menu", "list", "dialog"].indexOf(t) > -1;
238
+ },
239
+ default: null
240
+ },
241
+ animation: {
242
+ type: String,
243
+ default: "fade-bounce"
244
+ },
245
+ multiple: {
246
+ type: Boolean,
247
+ default: !1
248
+ },
249
+ trapFocus: {
250
+ type: Boolean,
251
+ default: () => !1
252
+ // config.defaultTrapFocus,
253
+ },
254
+ closeOnClick: {
255
+ type: Boolean,
256
+ default: !0
257
+ },
258
+ canClose: {
259
+ type: [Array, Boolean],
260
+ default: !0
261
+ },
262
+ expanded: {
263
+ type: Boolean,
264
+ default: !1
265
+ },
266
+ appendToBody: {
267
+ type: Boolean,
268
+ default: !1
269
+ },
270
+ appendToBodyCopyParent: {
271
+ type: Boolean,
272
+ default: !1
273
+ },
274
+ menuStyling: {
275
+ type: Object,
276
+ default: () => ({})
277
+ },
278
+ mobileLabel: {
279
+ type: String,
280
+ default: ""
281
+ },
282
+ paddingless: {
283
+ type: Boolean,
284
+ default: !1
285
+ }
286
+ },
287
+ data() {
288
+ return {
289
+ selected: this.value,
290
+ style: {},
291
+ isActive: !1,
292
+ isHoverable: this.hoverable,
293
+ _isDropdown: !0,
294
+ // Used internally by DropdownItem
295
+ _bodyEl: void 0,
296
+ // Used to append to body
297
+ uniquePopoverClass: `dropdown-popover-${this._uid}`
298
+ // Used internally by DropdownItem
299
+ };
300
+ },
301
+ computed: {
302
+ rootClasses() {
303
+ return [
304
+ this.position,
305
+ {
306
+ "is-disabled": this.disabled,
307
+ "is-hoverable": this.hoverable,
308
+ "is-inline": this.inline,
309
+ "is-active": this.isActive || this.inline,
310
+ "is-mobile-modal": this.isMobileModal,
311
+ "is-expanded": this.expanded
312
+ }
313
+ ];
314
+ },
315
+ isMobileModal() {
316
+ return this.mobileModal && this.mq === "sm";
317
+ },
318
+ cancelOptions() {
319
+ return typeof this.canClose == "boolean" ? this.canClose ? we : [] : this.canClose;
320
+ },
321
+ contentStyle() {
322
+ return {
323
+ maxHeight: this.scrollable ? this.maxHeight === void 0 ? null : isNaN(this.maxHeight) ? this.maxHeight : `${this.maxHeight}px` : null,
324
+ overflow: this.scrollable ? "auto" : null,
325
+ padding: this.paddingless ? "0" : null
326
+ };
327
+ }
328
+ },
329
+ watch: {
330
+ /**
331
+ * When v-model is changed set the new selected item.
332
+ */
333
+ value(t) {
334
+ this.selected = t;
335
+ },
336
+ /**
337
+ * Emit event when isActive value is changed.
338
+ */
339
+ isActive(t) {
340
+ this.$emit("active-change", t), this.appendToBody && this.$nextTick(() => {
341
+ this.updateAppendToBody();
342
+ });
343
+ }
344
+ },
345
+ mounted() {
346
+ this.appendToBody && (this.$data._bodyEl = ge(this.$refs.dropdownMenu), this.updateAppendToBody());
347
+ },
348
+ created() {
349
+ typeof window < "u" && (document.addEventListener("click", this.clickedOutside), document.addEventListener("keyup", this.keyPress));
350
+ },
351
+ beforeDestroy() {
352
+ typeof window < "u" && (document.removeEventListener("click", this.clickedOutside), document.removeEventListener("keyup", this.keyPress)), this.appendToBody && ye(this.$data._bodyEl);
353
+ },
354
+ methods: {
355
+ /**
356
+ * Click listener from DropdownItem.
357
+ * 1. Set new selected item.
358
+ * 2. Emit input event to update the user v-model.
359
+ * 3. Close the dropdown.
360
+ */
361
+ selectItem(t, e) {
362
+ if (this.multiple) {
363
+ if (this.selected) {
364
+ const i = this.selected.indexOf(t);
365
+ i === -1 ? this.selected.push(t) : this.selected.splice(i, 1);
366
+ } else
367
+ this.selected = [t];
368
+ this.$emit("change", this.selected);
369
+ } else
370
+ this.selected !== t && (this.selected = t, this.$emit("change", this.selected));
371
+ this.$emit("input", this.selected), this.multiple || (this.isActive = e.closeOnClick ? !this.closeOnClick : !0, this.hoverable && this.closeOnClick && (this.isHoverable = !1));
372
+ },
373
+ /**
374
+ * White-listed items to not close when clicked.
375
+ */
376
+ isInWhiteList(t) {
377
+ if (t === this.$refs.dropdownMenu || t === this.$refs.trigger)
378
+ return !0;
379
+ if (this.$refs.dropdownMenu !== void 0) {
380
+ const e = this.$refs.dropdownMenu.querySelectorAll("*");
381
+ for (const i of e)
382
+ if (t === i)
383
+ return !0;
384
+ }
385
+ if (this.$refs.trigger !== void 0) {
386
+ const e = this.$refs.trigger.querySelectorAll("*");
387
+ for (const i of e)
388
+ if (t === i)
389
+ return !0;
390
+ }
391
+ return !1;
392
+ },
393
+ /**
394
+ * Close dropdown if clicked outside.
395
+ */
396
+ clickedOutside(t) {
397
+ var i;
398
+ if (this.cancelOptions.indexOf("outside") < 0 || this.inline)
399
+ return;
400
+ const e = ((i = t.path) == null ? void 0 : i[0]) || t.target;
401
+ this.isInWhiteList(e) || (this.isActive = !1);
402
+ },
403
+ /**
404
+ * Keypress event that is bound to the document
405
+ */
406
+ keyPress(t) {
407
+ if (this.isActive && t.keyCode === 27) {
408
+ if (this.cancelOptions.indexOf("escape") < 0)
409
+ return;
410
+ this.isActive = !1;
411
+ }
412
+ },
413
+ /**
414
+ * Toggle dropdown if it's not disabled.
415
+ */
416
+ toggle() {
417
+ this.disabled || (this.isActive ? this.isActive = !this.isActive : this.$nextTick(() => {
418
+ const t = !this.isActive;
419
+ this.isActive = t, setTimeout(() => this.isActive = t);
420
+ }));
421
+ },
422
+ checkHoverable() {
423
+ this.hoverable && (this.isHoverable = !0);
424
+ },
425
+ updateAppendToBody() {
426
+ const t = this.$refs.dropdownMenu, e = this.$refs.trigger;
427
+ if (t && e) {
428
+ const i = this.$data._bodyEl.children[0];
429
+ if (i.classList.forEach((r) => i.classList.remove(r)), i.classList.add("dropdown"), i.classList.add("dropdown-menu-animation"), this.$vnode && this.$vnode.data && this.$vnode.data.staticClass && i.classList.add(this.$vnode.data.staticClass), this.rootClasses.forEach((r) => {
430
+ if (r && typeof r == "object")
431
+ for (const n in r)
432
+ r[n] && i.classList.add(n);
433
+ }), this.appendToBodyCopyParent) {
434
+ const r = this.$refs.dropdown.parentNode, n = this.$data._bodyEl;
435
+ n.classList.forEach((l) => n.classList.remove(l)), r.classList.forEach((l) => {
436
+ n.classList.add(l);
437
+ });
438
+ }
439
+ const a = e.getBoundingClientRect();
440
+ let s = a.top + window.scrollY, d = a.left + window.scrollX;
441
+ !this.position || this.position.indexOf("bottom") >= 0 ? s += e.clientHeight : s -= t.clientHeight, this.position && this.position.indexOf("left") >= 0 && (d -= t.clientWidth - e.clientWidth), this.style = {
442
+ position: "absolute",
443
+ top: `${s}px`,
444
+ left: `${d}px`,
445
+ zIndex: "1001"
446
+ };
447
+ }
448
+ }
449
+ }
450
+ };
451
+ var xe = function() {
452
+ var e = this, i = e._self._c;
453
+ return i("div", { ref: "dropdown", staticClass: "dropdown dropdown-menu-animation", class: e.rootClasses }, [e.inline ? e._e() : i("div", { ref: "trigger", staticClass: "dropdown-trigger", attrs: { role: "button", "aria-haspopup": "true" }, on: { click: e.toggle, mouseenter: e.checkHoverable } }, [e._t("trigger", null, { active: e.isActive })], 2), i("transition", { attrs: { name: "fade-in" } }, [e.isMobileModal ? i("div", { directives: [{ name: "show", rawName: "v-show", value: e.isActive, expression: "isActive" }], staticClass: "background", attrs: { "aria-hidden": !e.isActive } }) : e._e()]), i("transition", { attrs: { name: e.isMobileModal ? "slide-in-bottom" : e.animation } }, [i("div", { directives: [{ name: "trap-focus", rawName: "v-trap-focus", value: e.trapFocus, expression: "trapFocus" }, { name: "show", rawName: "v-show", value: !e.disabled && (e.isActive || e.isHoverable) || e.inline, expression: "(!disabled && (isActive || isHoverable)) || inline" }], ref: "dropdownMenu", staticClass: "dropdown-menu", style: {
454
+ ...e.style,
455
+ ...e.menuStyling
456
+ }, attrs: { "aria-hidden": !e.isActive } }, [e.isActive ? [e._t("header"), i("div", { staticClass: "dropdown-content", class: `${e.uniquePopoverClass}`, style: e.contentStyle, attrs: { role: e.ariaRole } }, [e.isMobileModal && e.mobileLabel ? e._t("mobileLabel", function() {
457
+ return [i("div", { staticClass: "dropdown-content-label" }, [e._v(e._s(e.mobileLabel))])];
458
+ }) : e._e(), e._t("default")], 2), e._t("footer")] : e._e()], 2)])], 1);
459
+ }, Ce = [], $e = /* @__PURE__ */ E(
460
+ _e,
461
+ xe,
462
+ Ce,
463
+ !1,
464
+ null,
465
+ null,
466
+ null,
467
+ null
468
+ );
469
+ const Me = $e.exports;
470
+ const ke = {
471
+ name: "CDropdownItem",
472
+ props: {
473
+ value: {
474
+ type: [String, Number, Boolean, Object, Array, Function],
475
+ default: null
476
+ },
477
+ separator: Boolean,
478
+ disabled: Boolean,
479
+ custom: Boolean,
480
+ focusable: {
481
+ type: Boolean,
482
+ default: !0
483
+ },
484
+ paddingless: Boolean,
485
+ hasLink: Boolean,
486
+ ariaRole: {
487
+ type: String,
488
+ default: ""
489
+ },
490
+ type: {
491
+ type: String,
492
+ default: null
493
+ },
494
+ toggle: {
495
+ type: Boolean,
496
+ default: !1
497
+ },
498
+ title: {
499
+ type: String,
500
+ default: ""
501
+ },
502
+ tooltip: {
503
+ type: [Object, String],
504
+ default: null
505
+ },
506
+ closeOnClick: {
507
+ type: Boolean,
508
+ default: !0
509
+ },
510
+ iconLeft: String,
511
+ iconRight: String,
512
+ iconProps: {
513
+ type: Object,
514
+ default: () => ({})
515
+ },
516
+ to: {
517
+ type: Object,
518
+ default: null
519
+ },
520
+ // Allows for parent communication on arbitrary depth
521
+ customParent: {
522
+ type: Object,
523
+ default: null
524
+ }
525
+ },
526
+ computed: {
527
+ parent() {
528
+ return this.customParent || this.$parent;
529
+ },
530
+ anchorClasses() {
531
+ return {
532
+ "is-disabled": this.parent.disabled || this.disabled,
533
+ "is-paddingless": this.paddingless,
534
+ "is-active": this.isActive,
535
+ "has-toggle": this.toggle
536
+ };
537
+ },
538
+ itemClasses() {
539
+ return {
540
+ "dropdown-item": !this.hasLink,
541
+ "is-disabled": this.disabled,
542
+ "is-paddingless": this.paddingless,
543
+ "is-active": this.isActive,
544
+ "has-link": this.hasLink
545
+ };
546
+ },
547
+ ariaRoleItem() {
548
+ return this.ariaRole === "menuitem" || this.ariaRole === "listitem" ? this.ariaRole : null;
549
+ },
550
+ isClickable() {
551
+ return !this.parent.disabled && !this.separator && !this.disabled && !this.custom;
552
+ },
553
+ isActive() {
554
+ return this.toggle || this.parent.selected === null ? !1 : this.parent.multiple ? this.parent.selected.indexOf(this.value) >= 0 : this.value === this.parent.selected;
555
+ },
556
+ isFocusable() {
557
+ return this.hasLink ? !1 : this.focusable;
558
+ },
559
+ tooltipItem() {
560
+ if (!this.tooltip)
561
+ return null;
562
+ const t = typeof this.tooltip == "string" ? { content: this.tooltip } : this.tooltip;
563
+ return {
564
+ boundariesElement: `.${this.parent.uniquePopoverClass}`,
565
+ classes: "dropdown-tooltip-class",
566
+ offset: 7,
567
+ placement: "left",
568
+ ...t
569
+ };
570
+ }
571
+ },
572
+ created() {
573
+ if (!this.parent.$data._isDropdown)
574
+ throw this.$destroy(), new Error("You should wrap cDropdownItem on a cDropdown");
575
+ },
576
+ methods: {
577
+ /**
578
+ * Click listener, select the item.
579
+ */
580
+ selectItem() {
581
+ this.isClickable && (this.parent.selectItem(this.value, { closeOnClick: this.closeOnClick }), this.$emit("click"), typeof this.value == "boolean" && this.$emit("input", !this.value));
582
+ }
583
+ }
584
+ };
585
+ var Be = function() {
586
+ var e = this, i = e._self._c;
587
+ return e.separator ? i("hr", { staticClass: "dropdown-divider" }) : !e.custom && !e.hasLink ? i(e.to && !e.disabled ? "router-link" : "a", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: e.tooltipItem, expression: "tooltipItem" }], tag: "component", staticClass: "dropdown-item truncate-text", class: [e.anchorClasses, `is-${e.type}`], attrs: { to: e.to, role: e.ariaRoleItem, tabindex: e.isFocusable ? 0 : null }, on: { click: e.selectItem } }, [e.iconLeft ? i("BaseIcon", e._b({ staticClass: "icon dropdown-item-icon", attrs: { type: e.iconLeft } }, "BaseIcon", { size: 18, ...e.iconProps }, !1)) : e._e(), e._t("default"), e.toggle ? i("CSwitch", { directives: [{ name: "tooltip", rawName: "v-tooltip", value: e.tooltipItem, expression: "tooltipItem" }], staticStyle: { display: "inline-flex", "pointer-events": "none", position: "absolute", right: "0", top: "50%", transform: "translateY(-50%)", "margin-right": "0" }, attrs: { value: e.value, size: "tiny", type: "success" } }) : e._e(), e.iconRight ? i("BaseIcon", e._b({ staticClass: "icon dropdown-item-icon is-right", attrs: { type: e.iconRight || "chevron-up-down" } }, "BaseIcon", { size: 18, ...e.iconProps }, !1)) : e._e()], 2) : i("div", { staticClass: "truncate-text", class: [e.itemClasses, `is-${e.type}`], attrs: { role: e.ariaRoleItem, tabindex: e.isFocusable ? 0 : null }, on: { click: e.selectItem } }, [e.iconLeft ? i("BaseIcon", e._b({ staticClass: "icon dropdown-item-icon", attrs: { type: e.iconLeft } }, "BaseIcon", { size: 18, ...e.iconProps }, !1)) : e._e(), e._t("default"), e.iconRight ? i("BaseIcon", e._b({ staticClass: "icon dropdown-item-icon is-right", attrs: { type: e.iconRight } }, "BaseIcon", { size: 18, ...e.iconProps }, !1)) : e._e()], 2);
588
+ }, Ie = [], Oe = /* @__PURE__ */ E(
589
+ ke,
590
+ Be,
591
+ Ie,
592
+ !1,
593
+ null,
594
+ null,
595
+ null,
596
+ null
597
+ );
598
+ const ze = Oe.exports;
599
+ export {
600
+ Me as C,
601
+ he as a,
602
+ ze as b,
603
+ ge as c,
604
+ Te as d,
605
+ Se as e,
606
+ Ee as g,
607
+ Le as i,
608
+ ye as r,
609
+ j as w
610
+ };