@cling-se/widget 0.9.2 → 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.
- package/dist/AddClientCallout-746899d9.js +57 -0
- package/dist/{AnswerModal-8f918a49.js → AnswerModal-fdfea0f8.js} +7 -5
- package/dist/{AttachmentItem-79618446.js → AttachmentItem-5671c64d.js} +5 -7
- package/dist/BaseDatePicker-a9240306.js +3156 -0
- package/dist/{BaseInput-9f376e4e.js → BaseInput-d3c3688b.js} +4 -4
- package/dist/{BaseUpload-9a3d655d.js → BaseUpload-8e7a2b72.js} +3 -3
- package/dist/BlockMedia-b613a2a4.js +72 -0
- package/dist/CCallout-e9ff903a.js +52 -0
- package/dist/CDropdownItem-05d84f95.js +610 -0
- package/dist/CField-cd4dcae9.js +183 -0
- package/dist/CField.vue_vue_type_style_index_0_lang-4ed993c7.js +1 -0
- package/dist/CSlider.vue_vue_type_style_index_0_lang-383db616.js +83 -0
- package/dist/ClientAutocomplete-421a2216.js +80 -0
- package/dist/ClientModal-11341b1c.js +547 -0
- package/dist/ColorPicker-f90939b5.js +2881 -0
- package/dist/{CompanyModal-5dfa4486.js → CompanyModal-2bfd21b8.js} +12 -11
- package/dist/{ContentWrapper-3ac57cb2.js → ContentWrapper-4aae35b2.js} +21 -14
- package/dist/{CoverBlockSettings-323ef519.js → CoverBlockSettings-1f917be3.js} +7 -7
- package/dist/DocForm-0891c6b2.js +6767 -0
- package/dist/DocFormSend-2b35999d.js +135 -0
- package/dist/{DocModalBase-4058a890.js → DocModalBase-225e2f2d.js} +1 -1
- package/dist/{DocReceipt-390f75e3.js → DocReceipt-1391c17a.js} +1 -1
- package/dist/{DocSendReminder-afc52d3d.js → DocSendReminder-c488842d.js} +1 -1
- package/dist/{DocTextEditor-0be1aea9.js → DocTextEditor-2538e1ab.js} +16 -12
- package/dist/{DocTimeline-c421dead.js → DocTimeline-69ada0de.js} +11 -11
- package/dist/DocumentClient-74b8f25b.js +145 -0
- package/dist/{DocumentLogotype-5230c7bd.js → DocumentLogotype-e89b53fb.js} +3 -3
- package/dist/{EmbedInput-8092d310.js → EmbedInput-b7fefe5e.js} +10 -11
- package/dist/{EmbedSettings-bbea9894.js → EmbedSettings-4957252f.js} +10 -11
- package/dist/ErrorCallout-42e45ec0.js +30 -0
- package/dist/{FilePreviewModal-67088d0f.js → FilePreviewModal-75693619.js} +6 -7
- package/dist/FormInputRow-09d450e3.js +2045 -0
- package/dist/{HeaderSettings-e02a5832.js → HeaderSettings-9b69eada.js} +23 -19
- package/dist/{ImageSelectModal-a9912356.js → ImageSelectModal-94d4dc7f.js} +20 -18
- package/dist/{ImageUploadWrapper-1310e96e.js → ImageUploadWrapper-a144b042.js} +2 -2
- package/dist/{Index-d3e59202.js → Index-00ef9241.js} +10 -10
- package/dist/{Index-e30b3de9.js → Index-023c3119.js} +6 -7
- package/dist/{Index-9cd881f2.js → Index-1bafafca.js} +2 -2
- package/dist/{Index-26f9a008.js → Index-2cb8fa22.js} +73 -118
- package/dist/{Index-faeeff50.js → Index-304c45be.js} +21 -16
- package/dist/{Index-e1bd4ea9.js → Index-35387450.js} +52 -42
- package/dist/Index-37a9183b.js +28 -0
- package/dist/{Index-0a22673f.js → Index-3dff19dd.js} +7 -7
- package/dist/{Index-f3eae2af.js → Index-3ee2e944.js} +2 -2
- package/dist/{Index-15591118.js → Index-42e26b46.js} +11 -11
- package/dist/{Index-2b684213.js → Index-4440fe3d.js} +6 -7
- package/dist/{Index-17e60907.js → Index-4563d3fa.js} +33 -31
- package/dist/{Index-648a786a.js → Index-53da7be8.js} +3 -3
- package/dist/{Index-6ee090c3.js → Index-62936c19.js} +16 -17
- package/dist/{Index-0ac00646.js → Index-693005f0.js} +6 -7
- package/dist/{Index-2d5fe047.js → Index-78f13416.js} +6 -7
- package/dist/{Index-6df9883f.js → Index-90492f19.js} +5 -6
- package/dist/{Index-28c78ddc.js → Index-96f39afc.js} +6 -7
- package/dist/{Index-90566113.js → Index-97d1f2f3.js} +8 -8
- package/dist/{Index-876daf3e.js → Index-9a243eb8.js} +2 -2
- package/dist/{Index-ca8aedde.js → Index-9ffe9766.js} +11 -12
- package/dist/{Index-8a22c5cd.js → Index-a37beb03.js} +1 -1
- package/dist/{Index-35f3bca9.js → Index-a554b58c.js} +6 -7
- package/dist/{Index-d02a530a.js → Index-a86ea774.js} +8 -9
- package/dist/{Index-d11146a6.js → Index-abb8c6e4.js} +6 -6
- package/dist/{Index-f4bb1f71.js → Index-b7def77a.js} +8 -9
- package/dist/{Index-f03edd3d.js → Index-bcc478b3.js} +7 -8
- package/dist/{Index-57ce8eee.js → Index-cec7d4f1.js} +22 -15
- package/dist/{Index-87497c7c.js → Index-d68a28da.js} +7 -7
- package/dist/{Index-de45c9c3.js → Index-dbe97658.js} +2 -2
- package/dist/{Index-a9ed7c39.js → Index-ec8d534f.js} +4 -6
- package/dist/{Index-0d81bade.js → Index-f2b66b79.js} +6 -7
- package/dist/{Index-1ae93acd.js → Index-f453850f.js} +6 -7
- package/dist/{Index-1f966c82.js → Index-f9b5f03c.js} +27 -20
- package/dist/{InputToggleRow-c58dde03.js → InputToggleRow-68320d9f.js} +1 -1
- package/dist/IsPremiumPreStep-0c7032a3.js +1919 -0
- package/dist/{MediaWrapper-afc29574.js → MediaWrapper-c50879c2.js} +4 -4
- package/dist/{NotBindingText-e3a49f8a.js → NotBindingText-8f2d9244.js} +2 -2
- package/dist/{PackageGroup-150a9942.js → PackageGroup-2c49e99b.js} +24 -17
- package/dist/{PdfTerms-fcc835f4.js → PdfTerms-94153a5f.js} +6 -7
- package/dist/{PdfViewer-b1118475.js → PdfViewer-701ad40e.js} +2 -2
- package/dist/{PlainHtml-47791667.js → PlainHtml-04a6d7f9.js} +1 -1
- package/dist/PriceHeader-7f92d5a7.js +336 -0
- package/dist/SearchApi-ffe5b697.js +148 -0
- package/dist/{TermsSettings-c97df867.js → TermsSettings-b1bf19e9.js} +6 -6
- package/dist/{ThemeColorRow-014a0526.js → ThemeColorRow-913497f6.js} +7 -6
- package/dist/{ToggleBinding-342beacc.js → ToggleBinding-6518935d.js} +8 -9
- package/dist/{UploadModal-aed5f8c9.js → UploadModal-3c399d25.js} +21 -22
- package/dist/{VideoPlayerInput-7ebb49d7.js → VideoPlayerInput-b54845a4.js} +5 -6
- package/dist/{VideoPlayerSettings-0a027a8e.js → VideoPlayerSettings-496e9e79.js} +13 -14
- package/dist/{VideoSelectModal-5c1a8ddc.js → VideoSelectModal-3a566398.js} +10 -10
- package/dist/anime.es-e284c852.js +858 -0
- package/dist/answerDocumentMixin-0e5e4dbb.js +54 -0
- package/dist/color-71c20583.js +15 -0
- package/dist/{cssMode-b59b5164.js → cssMode-c0865919.js} +15 -14
- package/dist/focusDrawerMixin-298861bc.js +68 -0
- package/dist/formComponentsInstall-1be6791d.js +2491 -0
- package/dist/formValidationMixin-df38771c.js +4984 -0
- package/dist/{freemarker2-5b426d60.js → freemarker2-85dde97c.js} +19 -18
- package/dist/{handlebars-9a256dec.js → handlebars-6aa1e52b.js} +18 -17
- package/dist/{html-4322f199.js → html-f0c735cd.js} +14 -13
- package/dist/{htmlMode-d8a0ed16.js → htmlMode-7b3bd7c9.js} +19 -18
- package/dist/{index-7359c27c.js → index-1ef6f423.js} +21 -15
- package/dist/index-30808a2c.js +490 -0
- package/dist/{index-c2f8c4f3.js → index-431938de.js} +13 -12
- package/dist/index-6d08eac3.js +14 -0
- package/dist/index-805c56e4.js +4 -0
- package/dist/index.es.js +3 -3
- package/dist/index.umd.js +713 -600
- package/dist/{javascript-7f9828c0.js → javascript-9c54ad9e.js} +11 -10
- package/dist/{jsonMode-e07cde60.js → jsonMode-1d1176fa.js} +19 -18
- package/dist/{liquid-b47f65fb.js → liquid-0738c73d.js} +11 -10
- package/dist/{main-154fab72.js → main-2d9b8259.js} +19557 -20415
- package/dist/mapFormMixin-308bbdab.js +66 -0
- package/dist/{publicSenderState-51ca0439.js → publicSenderState-9eecb11f.js} +1 -1
- package/dist/{python-f3873309.js → python-588c9e64.js} +11 -10
- package/dist/{razor-4071ec1b.js → razor-fbaa1d21.js} +14 -13
- package/dist/regions-29ee6964.js +1250 -0
- package/dist/simplebar.min-75960401.js +2429 -0
- package/dist/style.css +4 -0
- package/dist/template-b877debf.js +526 -0
- package/dist/throttle-d7bed81a.js +18 -0
- package/dist/tinycolor-ef496244.js +634 -0
- package/dist/{tsMode-71160e05.js → tsMode-c1de8e10.js} +15 -14
- package/dist/{typescript-80a61e6a.js → typescript-737827aa.js} +11 -10
- package/dist/{utils-72915af5.js → utils-69c41ae9.js} +5 -5
- package/dist/vuedraggable.umd-67b8cddf.js +3179 -0
- package/dist/{xml-021490f1.js → xml-30e811a1.js} +11 -10
- package/package.json +3 -2
- package/stats.html +1 -1
- package/dist/DocForm-5ff2cbbb.js +0 -22074
- package/dist/DocFormSend-06ffa19c.js +0 -113
- package/dist/Index-2b5c1367.js +0 -29
- package/dist/PriceHeader-1dfa95fd.js +0 -329
- package/dist/formComponentsInstall-e33d6795.js +0 -11121
- package/dist/index-51b2742c.js +0 -11
- package/dist/throttle-f479e1f1.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
|
+
};
|