@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.
- package/dist/AddClientCallout-C7abPZ87.js +46 -0
- package/dist/AnswerModal-CsA2pl2P.js +3874 -0
- package/dist/AttachmentItem-Da1-7xwf.js +78 -0
- package/dist/BaseDatePicker-k9zlSi5J.js +3183 -0
- package/dist/BaseUpload-BUrXX3fT.js +1977 -0
- package/dist/BlockMedia-CYI07qAn.js +76 -0
- package/dist/CCallout-Qwae66vo.js +59 -0
- package/dist/CCurrencyDropdown-Y_u0hgBx.js +246 -0
- package/dist/CDropdownItem-CXJ4xD8W.js +538 -0
- package/dist/CField.vue_vue_type_style_index_0_lang-l0sNRNKZ.js +1 -0
- package/dist/CFormField--m3PvQuT.js +241 -0
- package/dist/CPhoneFormat-Qg6MkDVP.js +62 -0
- package/dist/CPriceInput-Dlx44UrR.js +112 -0
- package/dist/CTabs.vue_vue_type_style_index_0_scoped_b7262014_lang-l0sNRNKZ.js +1 -0
- package/dist/ClientAutocomplete-BKKc_br6.js +78 -0
- package/dist/ClientModal-CVZFb1Br.js +625 -0
- package/dist/ColorPicker-Bo3s3Esp.js +2879 -0
- package/dist/CompanyModal-DadjAioS.js +141 -0
- package/dist/ContentWrapper-BC3ZBQW9.js +183 -0
- package/dist/CoverBlockSettings-B484eE4g.js +275 -0
- package/dist/DocAnswer-CcYryOWI.js +36 -0
- package/dist/DocDetails-BigsoEWL.js +246 -0
- package/dist/DocForm-DlN0eNWt.js +7273 -0
- package/dist/DocFormSend-TqKo210I.js +143 -0
- package/dist/DocLinks-DSo54vDn.js +38 -0
- package/dist/DocModalBase-XlM1SThW.js +28 -0
- package/dist/DocPrint-tD0Vd9Sw.js +240 -0
- package/dist/DocReceipt-CDHPrhXM.js +210 -0
- package/dist/DocSendReminder-C62RhltH.js +137 -0
- package/dist/DocTextEditor-VjhV9IRp.js +17181 -0
- package/dist/DocTimeline-LcW4z3nC.js +481 -0
- package/dist/DocumentClient-CqbTRdpB.js +136 -0
- package/dist/DocumentLayout-Dbf8_01r.js +4909 -0
- package/dist/DocumentLogotype-DXYnBedV.js +87 -0
- package/dist/DocumentVoided-vH1Ti5lZ.js +25 -0
- package/dist/EmbedInput-D9qP8OnY.js +113 -0
- package/dist/EmbedSettings-DISuNqJT.js +72 -0
- package/dist/ErrorCallout-CCtCVwSh.js +28 -0
- package/dist/FilePreviewModal-BjhNyb6L.js +81 -0
- package/dist/Flag-Dhukv9_J.js +114 -0
- package/dist/HeaderSettings-CK4SkB1x.js +392 -0
- package/dist/ImageSelectModal-DnvPZzXx.js +84 -0
- package/dist/ImageUploadWrapper-B7cNMu5a.js +1604 -0
- package/dist/Index-B3HoK_cZ.js +84 -0
- package/dist/Index-B3aucNji.js +25 -0
- package/dist/Index-B9H5MMHb.js +62 -0
- package/dist/Index-BAYdvT-t.js +754 -0
- package/dist/Index-BLeQprjq.js +46 -0
- package/dist/Index-BOyvQlng.js +154 -0
- package/dist/Index-BVsw2tak.js +70 -0
- package/dist/Index-BY1UKGEO.js +98 -0
- package/dist/Index-Bh0kMSsA.js +107 -0
- package/dist/Index-BlQSM7tC.js +144 -0
- package/dist/Index-BpcJBGGd.js +642 -0
- package/dist/Index-Bs8wprXw.js +58 -0
- package/dist/Index-BvZZAvFd.js +21 -0
- package/dist/Index-CFo-3Y5Q.js +26 -0
- package/dist/Index-CNvp5K3L.js +559 -0
- package/dist/Index-CPJVx14x.js +171 -0
- package/dist/Index-CQ325eVT.js +140 -0
- package/dist/Index-CWrDtcfT.js +49 -0
- package/dist/Index-CyJnSvDR.js +223 -0
- package/dist/Index-D6bc7lg4.js +52 -0
- package/dist/Index-DCR8ev4U.js +33 -0
- package/dist/Index-DGQSB9cH.js +24 -0
- package/dist/Index-DXAvlq74.js +292 -0
- package/dist/Index-D_rfst8y.js +45 -0
- package/dist/Index-Dm8xMFGg.js +61 -0
- package/dist/Index-DtSSgtxB.js +55 -0
- package/dist/Index-DuTw9vhb.js +77 -0
- package/dist/Index-Dw26jtGV.js +31 -0
- package/dist/Index-OxN73_fO.js +32 -0
- package/dist/Index-S-FHG7_k.js +2402 -0
- package/dist/Index-ZFkitzfq.js +69 -0
- package/dist/Index-dyWK9jgr.js +25 -0
- package/dist/Index-gb11ngPS.js +57 -0
- package/dist/Index-lKk_XKJ3.js +150 -0
- package/dist/InputToggleRow-DSSvhPKA.js +57 -0
- package/dist/ManualPopover-lpJYSkw5.js +58 -0
- package/dist/MediaWrapper-BQ22FA2B.js +23 -0
- package/dist/NotBindingText-JxwzZLPP.js +32 -0
- package/dist/PackageGroup-BLSMSUDz.js +699 -0
- package/dist/PdfTerms-DtutjM5Y.js +36 -0
- package/dist/PdfViewer-BsxcZI_x.js +374 -0
- package/dist/PlainHtml-BMPZs2fT.js +20 -0
- package/dist/PriceHeader-BRYY01H2.js +339 -0
- package/dist/SearchApi-6001iFxU.js +161 -0
- package/dist/Setup-cw6jMI9M.js +50 -0
- package/dist/SmartList-q6H-uLbm.js +83 -0
- package/dist/TermsSettings-DWvaPneu.js +102 -0
- package/dist/ThemeColorRow-BXWnvfz-.js +67 -0
- package/dist/ToggleBinding-DydtwpNG.js +38 -0
- package/dist/UploadModal-D_EDKHGD.js +95 -0
- package/dist/VideoPlayerInput-B9yzUeBW.js +93 -0
- package/dist/VideoPlayerSettings-Bvp9l0yj.js +61 -0
- package/dist/VideoSelectModal-DY3N4JiS.js +100 -0
- package/dist/anime.es-BrPTThYb.js +858 -0
- package/dist/answerDocumentMixin-BYZPU_R-.js +51 -0
- package/dist/color-TdtKxwVa.js +19 -0
- package/dist/debounce-BPnlzNwd.js +84 -0
- package/dist/dom-CJxkno7i.js +91 -0
- package/dist/favicon.ico +0 -0
- package/dist/focusDrawerMixin-DC9Oa1i7.js +22 -0
- package/dist/formComponentsInstall-CEW6TK6z.js +2499 -0
- package/dist/formDrawerState-CAzvSMiQ.js +20 -0
- package/dist/formValidationMixin-D7zXxCpC.js +49 -0
- package/dist/i18nMessages-Chz_lxGG.js +17 -0
- package/dist/index-B9WDC3Xe.js +166 -0
- package/dist/index-BCMaUC5r.js +3916 -0
- package/dist/index-BDMI4NVY.js +492 -0
- package/dist/index-BbscgdRg.js +81 -0
- package/dist/index-CLUljEDI.js +347 -0
- package/dist/index-SxyZvewN.js +102 -0
- package/dist/index.es.js +35 -0
- package/dist/index.umd.js +3148 -0
- package/dist/main-CQBEuZk9.js +56739 -0
- package/dist/mapFormMixin-DlFcgwhm.js +72 -0
- package/dist/omit-BWy0Zhd3.js +31 -0
- package/dist/publicSenderState-CvOcFv2U.js +21 -0
- package/dist/splitpanes-BHUVsCZF.js +382 -0
- package/dist/style.css +4 -0
- package/dist/throttle-BrC8eGjQ.js +18 -0
- package/dist/tinycolor-PhFP695w.js +633 -0
- package/dist/tippy.esm-7dmKOUvu.js +1799 -0
- package/dist/utils-NBLgNGHR.js +108 -0
- package/dist/vuedraggable.umd-ByfH7ZxC.js +3161 -0
- package/dist/vuex.esm-DKGl8mcw.js +467 -0
- package/package.json +1 -1
- package/vite.config.ts +0 -1
|
@@ -0,0 +1,538 @@
|
|
|
1
|
+
import { V as f, k as m, n as p } from "./main-CQBEuZk9.js";
|
|
2
|
+
class b {
|
|
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 v = new b().init(), c = new f({ data: { windowSize: v } }), y = {
|
|
34
|
+
computed: {
|
|
35
|
+
windowWidth() {
|
|
36
|
+
return c.windowSize.width;
|
|
37
|
+
},
|
|
38
|
+
windowHeight() {
|
|
39
|
+
return c.windowSize.height;
|
|
40
|
+
},
|
|
41
|
+
mq() {
|
|
42
|
+
const { width: t } = c.windowSize, e = {
|
|
43
|
+
sm: 640,
|
|
44
|
+
md: 768,
|
|
45
|
+
lg: 1024,
|
|
46
|
+
xl: 1280,
|
|
47
|
+
"2xl": 1536,
|
|
48
|
+
"3xl": 1 / 0
|
|
49
|
+
};
|
|
50
|
+
let i = "lg";
|
|
51
|
+
return Object.keys(e).reverse().forEach((o) => {
|
|
52
|
+
t <= e[o] && (i = o);
|
|
53
|
+
}), i;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
var h = { exports: {} };
|
|
58
|
+
(function(t, e) {
|
|
59
|
+
Object.defineProperty(e, "__esModule", {
|
|
60
|
+
value: !0
|
|
61
|
+
}), e.default = i;
|
|
62
|
+
function i() {
|
|
63
|
+
return !!(typeof window < "u" && ("ontouchstart" in window || window.DocumentTouch && typeof document < "u" && document instanceof window.DocumentTouch)) || !!(typeof navigator < "u" && (navigator.maxTouchPoints || navigator.msMaxTouchPoints));
|
|
64
|
+
}
|
|
65
|
+
t.exports = e.default;
|
|
66
|
+
})(h, h.exports);
|
|
67
|
+
var g = h.exports;
|
|
68
|
+
const w = /* @__PURE__ */ m(g), T = w();
|
|
69
|
+
function M(t, e) {
|
|
70
|
+
return e.split(".").reduce((o, s) => o ? o[s] : null, t);
|
|
71
|
+
}
|
|
72
|
+
function _(t) {
|
|
73
|
+
typeof t.remove < "u" ? t.remove() : typeof t.parentNode < "u" && t.parentNode !== null && t.parentNode.removeChild(t);
|
|
74
|
+
}
|
|
75
|
+
function C(t) {
|
|
76
|
+
var n;
|
|
77
|
+
const e = (n = t.getRootNode) == null ? void 0 : n.call(t), o = (e == null ? void 0 : e.toString()) === "[object ShadowRoot]" ? e : document.body, s = document.createElement("div");
|
|
78
|
+
s.style.position = "absolute", s.style.left = "0px", s.style.top = "0px";
|
|
79
|
+
const a = document.createElement("div");
|
|
80
|
+
return s.appendChild(a), a.appendChild(t), o.appendChild(s), s;
|
|
81
|
+
}
|
|
82
|
+
function D(t, e, i) {
|
|
83
|
+
return Math.max(e, Math.min(i, t));
|
|
84
|
+
}
|
|
85
|
+
const r = (t, e = !1) => t ? e ? t.querySelectorAll('*[tabindex="-1"]') : t.querySelectorAll(`a[href]:not([tabindex="-1"]),
|
|
86
|
+
area[href],
|
|
87
|
+
input:not([disabled]),
|
|
88
|
+
select:not([disabled]),
|
|
89
|
+
textarea:not([disabled]),
|
|
90
|
+
button:not([disabled]),
|
|
91
|
+
iframe,
|
|
92
|
+
object,
|
|
93
|
+
embed,
|
|
94
|
+
*[tabindex]:not([tabindex="-1"]),
|
|
95
|
+
*[contenteditable]`) : null;
|
|
96
|
+
let u;
|
|
97
|
+
const x = (t, { value: e = !0 }) => {
|
|
98
|
+
if (e) {
|
|
99
|
+
let i = r(t), o = r(t, !0);
|
|
100
|
+
i && i.length > 0 && (u = (s) => {
|
|
101
|
+
i = r(t), o = r(t, !0);
|
|
102
|
+
const a = i[0], n = i[i.length - 1];
|
|
103
|
+
s.target === a && s.shiftKey && s.key === "Tab" ? (s.preventDefault(), n.focus()) : (s.target === n || Array.from(o).indexOf(s.target) >= 0) && !s.shiftKey && s.key === "Tab" && (s.preventDefault(), a.focus());
|
|
104
|
+
}, t.addEventListener("keydown", u));
|
|
105
|
+
}
|
|
106
|
+
}, $ = (t) => {
|
|
107
|
+
t.removeEventListener("keydown", u);
|
|
108
|
+
}, k = {
|
|
109
|
+
bind: x,
|
|
110
|
+
unbind: $
|
|
111
|
+
}, S = ["escape", "outside"], A = {
|
|
112
|
+
name: "CDropdown",
|
|
113
|
+
directives: {
|
|
114
|
+
trapFocus: k
|
|
115
|
+
},
|
|
116
|
+
mixins: [y],
|
|
117
|
+
props: {
|
|
118
|
+
value: {
|
|
119
|
+
type: [String, Number, Boolean, Object, Array, Function],
|
|
120
|
+
default: null
|
|
121
|
+
},
|
|
122
|
+
disabled: {
|
|
123
|
+
type: Boolean,
|
|
124
|
+
default: !1
|
|
125
|
+
},
|
|
126
|
+
hoverable: {
|
|
127
|
+
type: Boolean,
|
|
128
|
+
default: !1
|
|
129
|
+
},
|
|
130
|
+
inline: {
|
|
131
|
+
type: Boolean,
|
|
132
|
+
default: !1
|
|
133
|
+
},
|
|
134
|
+
scrollable: {
|
|
135
|
+
type: Boolean,
|
|
136
|
+
default: !1
|
|
137
|
+
},
|
|
138
|
+
maxHeight: {
|
|
139
|
+
type: [String, Number],
|
|
140
|
+
default: 200
|
|
141
|
+
},
|
|
142
|
+
position: {
|
|
143
|
+
type: String,
|
|
144
|
+
default: "is-bottom-left",
|
|
145
|
+
validator(t) {
|
|
146
|
+
return [
|
|
147
|
+
"is-top-right",
|
|
148
|
+
"is-top-left",
|
|
149
|
+
"is-bottom-left",
|
|
150
|
+
"is-bottom-right"
|
|
151
|
+
].indexOf(t) > -1;
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
mobileModal: {
|
|
155
|
+
type: Boolean,
|
|
156
|
+
default: () => !0
|
|
157
|
+
// config.defaultDropdownMobileModal,
|
|
158
|
+
},
|
|
159
|
+
ariaRole: {
|
|
160
|
+
type: String,
|
|
161
|
+
validator(t) {
|
|
162
|
+
return ["menu", "list", "dialog"].indexOf(t) > -1;
|
|
163
|
+
},
|
|
164
|
+
default: null
|
|
165
|
+
},
|
|
166
|
+
animation: {
|
|
167
|
+
type: String,
|
|
168
|
+
default: "fade-bounce"
|
|
169
|
+
},
|
|
170
|
+
multiple: {
|
|
171
|
+
type: Boolean,
|
|
172
|
+
default: !1
|
|
173
|
+
},
|
|
174
|
+
trapFocus: {
|
|
175
|
+
type: Boolean,
|
|
176
|
+
default: () => !1
|
|
177
|
+
// config.defaultTrapFocus,
|
|
178
|
+
},
|
|
179
|
+
closeOnClick: {
|
|
180
|
+
type: Boolean,
|
|
181
|
+
default: !0
|
|
182
|
+
},
|
|
183
|
+
canClose: {
|
|
184
|
+
type: [Array, Boolean],
|
|
185
|
+
default: !0
|
|
186
|
+
},
|
|
187
|
+
expanded: {
|
|
188
|
+
type: Boolean,
|
|
189
|
+
default: !1
|
|
190
|
+
},
|
|
191
|
+
appendToBody: {
|
|
192
|
+
type: Boolean,
|
|
193
|
+
default: !1
|
|
194
|
+
},
|
|
195
|
+
appendToBodyCopyParent: {
|
|
196
|
+
type: Boolean,
|
|
197
|
+
default: !1
|
|
198
|
+
},
|
|
199
|
+
menuStyling: {
|
|
200
|
+
type: Object,
|
|
201
|
+
default: () => ({})
|
|
202
|
+
},
|
|
203
|
+
mobileLabel: {
|
|
204
|
+
type: String,
|
|
205
|
+
default: ""
|
|
206
|
+
},
|
|
207
|
+
paddingless: {
|
|
208
|
+
type: Boolean,
|
|
209
|
+
default: !1
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
data() {
|
|
213
|
+
return {
|
|
214
|
+
selected: this.value,
|
|
215
|
+
style: {},
|
|
216
|
+
isActive: !1,
|
|
217
|
+
isHoverable: this.hoverable,
|
|
218
|
+
_isDropdown: !0,
|
|
219
|
+
// Used internally by DropdownItem
|
|
220
|
+
_bodyEl: void 0,
|
|
221
|
+
// Used to append to body
|
|
222
|
+
uniquePopoverClass: `dropdown-popover-${this._uid}`
|
|
223
|
+
// Used internally by DropdownItem
|
|
224
|
+
};
|
|
225
|
+
},
|
|
226
|
+
computed: {
|
|
227
|
+
rootClasses() {
|
|
228
|
+
return [
|
|
229
|
+
this.position,
|
|
230
|
+
{
|
|
231
|
+
"is-disabled": this.disabled,
|
|
232
|
+
"is-hoverable": this.hoverable,
|
|
233
|
+
"is-inline": this.inline,
|
|
234
|
+
"is-active": this.isActive || this.inline,
|
|
235
|
+
"is-mobile-modal": this.isMobileModal,
|
|
236
|
+
"is-expanded": this.expanded
|
|
237
|
+
}
|
|
238
|
+
];
|
|
239
|
+
},
|
|
240
|
+
isMobileModal() {
|
|
241
|
+
return this.mobileModal && this.mq === "sm";
|
|
242
|
+
},
|
|
243
|
+
cancelOptions() {
|
|
244
|
+
return typeof this.canClose == "boolean" ? this.canClose ? S : [] : this.canClose;
|
|
245
|
+
},
|
|
246
|
+
contentStyle() {
|
|
247
|
+
return {
|
|
248
|
+
maxHeight: this.scrollable ? this.maxHeight === void 0 ? null : isNaN(this.maxHeight) ? this.maxHeight : `${this.maxHeight}px` : null,
|
|
249
|
+
overflow: this.scrollable ? "auto" : null,
|
|
250
|
+
padding: this.paddingless ? "0" : null
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
watch: {
|
|
255
|
+
/**
|
|
256
|
+
* When v-model is changed set the new selected item.
|
|
257
|
+
*/
|
|
258
|
+
value(t) {
|
|
259
|
+
this.selected = t;
|
|
260
|
+
},
|
|
261
|
+
/**
|
|
262
|
+
* Emit event when isActive value is changed.
|
|
263
|
+
*/
|
|
264
|
+
isActive(t) {
|
|
265
|
+
this.$emit("active-change", t), this.appendToBody && this.$nextTick(() => {
|
|
266
|
+
this.updateAppendToBody();
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
},
|
|
270
|
+
mounted() {
|
|
271
|
+
typeof window < "u" && (this.getRootElm().addEventListener("click", this.clickedOutside), document.addEventListener("keyup", this.keyPress)), this.appendToBody && (this.$data._bodyEl = C(this.$refs.dropdownMenu), this.$data._bodyEl.style.zIndex = Number(
|
|
272
|
+
window.getComputedStyle(this.$el).getPropertyValue("--app-z-index")
|
|
273
|
+
) + 9999, this.isMobileModal && this.$data._bodyEl.appendChild(this.$refs.mobileBackground), this.updateAppendToBody());
|
|
274
|
+
},
|
|
275
|
+
beforeDestroy() {
|
|
276
|
+
typeof window < "u" && (this.getRootElm().removeEventListener("click", this.clickedOutside), document.removeEventListener("keyup", this.keyPress)), this.appendToBody && _(this.$data._bodyEl);
|
|
277
|
+
},
|
|
278
|
+
methods: {
|
|
279
|
+
/**
|
|
280
|
+
* Click listener from DropdownItem.
|
|
281
|
+
* 1. Set new selected item.
|
|
282
|
+
* 2. Emit input event to update the user v-model.
|
|
283
|
+
* 3. Close the dropdown.
|
|
284
|
+
*/
|
|
285
|
+
selectItem(t, e) {
|
|
286
|
+
if (this.multiple) {
|
|
287
|
+
if (this.selected) {
|
|
288
|
+
const i = this.selected.indexOf(t);
|
|
289
|
+
i === -1 ? this.selected.push(t) : this.selected.splice(i, 1);
|
|
290
|
+
} else
|
|
291
|
+
this.selected = [t];
|
|
292
|
+
this.$emit("change", this.selected);
|
|
293
|
+
} else
|
|
294
|
+
this.selected !== t && (this.selected = t, this.$emit("change", this.selected));
|
|
295
|
+
this.$emit("input", this.selected), this.multiple || (this.isActive = e.closeOnClick ? !this.closeOnClick : !0, this.hoverable && this.closeOnClick && (this.isHoverable = !1));
|
|
296
|
+
},
|
|
297
|
+
/**
|
|
298
|
+
* White-listed items to not close when clicked.
|
|
299
|
+
*/
|
|
300
|
+
isInWhiteList(t) {
|
|
301
|
+
if (t === this.$refs.dropdownMenu || t === this.$refs.trigger)
|
|
302
|
+
return !0;
|
|
303
|
+
if (this.$refs.dropdownMenu !== void 0) {
|
|
304
|
+
const e = this.$refs.dropdownMenu.querySelectorAll("*");
|
|
305
|
+
for (const i of e)
|
|
306
|
+
if (t === i)
|
|
307
|
+
return !0;
|
|
308
|
+
}
|
|
309
|
+
if (this.$refs.trigger !== void 0) {
|
|
310
|
+
const e = this.$refs.trigger.querySelectorAll("*");
|
|
311
|
+
for (const i of e)
|
|
312
|
+
if (t === i)
|
|
313
|
+
return !0;
|
|
314
|
+
}
|
|
315
|
+
return !1;
|
|
316
|
+
},
|
|
317
|
+
/**
|
|
318
|
+
* Close dropdown if clicked outside.
|
|
319
|
+
*/
|
|
320
|
+
clickedOutside(t) {
|
|
321
|
+
var i;
|
|
322
|
+
if (this.cancelOptions.indexOf("outside") < 0 || this.inline)
|
|
323
|
+
return;
|
|
324
|
+
const e = ((i = t.path) == null ? void 0 : i[0]) || t.target;
|
|
325
|
+
this.isInWhiteList(e) || (this.isActive = !1);
|
|
326
|
+
},
|
|
327
|
+
/**
|
|
328
|
+
* Keypress event that is bound to the document
|
|
329
|
+
*/
|
|
330
|
+
keyPress(t) {
|
|
331
|
+
if (this.isActive && t.keyCode === 27) {
|
|
332
|
+
if (this.cancelOptions.indexOf("escape") < 0)
|
|
333
|
+
return;
|
|
334
|
+
this.isActive = !1;
|
|
335
|
+
}
|
|
336
|
+
},
|
|
337
|
+
/**
|
|
338
|
+
* Toggle dropdown if it's not disabled.
|
|
339
|
+
*/
|
|
340
|
+
toggle() {
|
|
341
|
+
this.disabled || (this.isActive ? this.isActive = !this.isActive : this.$nextTick(() => {
|
|
342
|
+
const t = !this.isActive;
|
|
343
|
+
this.isActive = t, setTimeout(() => this.isActive = t);
|
|
344
|
+
}));
|
|
345
|
+
},
|
|
346
|
+
checkHoverable() {
|
|
347
|
+
this.hoverable && (this.isHoverable = !0);
|
|
348
|
+
},
|
|
349
|
+
updateAppendToBody() {
|
|
350
|
+
const t = this.$refs.dropdownMenu, e = this.$refs.trigger;
|
|
351
|
+
if (t && e) {
|
|
352
|
+
const i = this.$data._bodyEl.children[0];
|
|
353
|
+
if (i.classList.forEach((n) => i.classList.remove(n)), 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((n) => {
|
|
354
|
+
if (n && typeof n == "object")
|
|
355
|
+
for (const l in n)
|
|
356
|
+
n[l] && i.classList.add(l);
|
|
357
|
+
}), this.appendToBodyCopyParent) {
|
|
358
|
+
const n = this.$refs.dropdown.parentNode, l = this.$data._bodyEl;
|
|
359
|
+
l.classList.forEach((d) => l.classList.remove(d)), n.classList.forEach((d) => {
|
|
360
|
+
l.classList.add(d);
|
|
361
|
+
});
|
|
362
|
+
}
|
|
363
|
+
const o = e.getBoundingClientRect();
|
|
364
|
+
let s = o.top + window.scrollY, a = o.left + window.scrollX;
|
|
365
|
+
!this.position || this.position.indexOf("bottom") >= 0 ? s += e.clientHeight : s -= t.clientHeight, this.position && this.position.indexOf("left") >= 0 && (a -= t.clientWidth - e.clientWidth), this.style = {
|
|
366
|
+
position: "absolute",
|
|
367
|
+
top: `${s}px`,
|
|
368
|
+
left: `${a}px`,
|
|
369
|
+
zIndex: "1001"
|
|
370
|
+
};
|
|
371
|
+
}
|
|
372
|
+
},
|
|
373
|
+
getRootElm() {
|
|
374
|
+
var i, o;
|
|
375
|
+
const t = (o = (i = this.$el).getRootNode) == null ? void 0 : o.call(i);
|
|
376
|
+
return (t == null ? void 0 : t.toString()) === "[object ShadowRoot]" ? t : document;
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
};
|
|
380
|
+
var B = function() {
|
|
381
|
+
var e = this, i = e._self._c;
|
|
382
|
+
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" }], ref: "mobileBackground", staticClass: "fixed inset-0 z-40 bg-black/40", attrs: { "aria-hidden": !e.isActive } }) : e._e()]), i("transition", { attrs: { name: e.isMobileModal ? "slide-in-bottom" : e.animation } }, [i("div", { directives: [{ name: "show", rawName: "v-show", value: !e.disabled && (e.isActive || e.isHoverable) || e.inline, expression: "(!disabled && (isActive || isHoverable)) || inline" }, { name: "trap-focus", rawName: "v-trap-focus", value: e.trapFocus, expression: "trapFocus" }], ref: "dropdownMenu", staticClass: "dropdown-menu", style: {
|
|
383
|
+
...e.style,
|
|
384
|
+
...e.menuStyling
|
|
385
|
+
}, 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() {
|
|
386
|
+
return [i("div", { staticClass: "dropdown-content-label" }, [e._v(e._s(e.mobileLabel))])];
|
|
387
|
+
}) : e._e(), e._t("default")], 2), e._t("footer")] : e._e()], 2)])], 1);
|
|
388
|
+
}, L = [], O = /* @__PURE__ */ p(
|
|
389
|
+
A,
|
|
390
|
+
B,
|
|
391
|
+
L,
|
|
392
|
+
!1,
|
|
393
|
+
null,
|
|
394
|
+
null
|
|
395
|
+
);
|
|
396
|
+
const H = O.exports, E = {
|
|
397
|
+
name: "CDropdownItem",
|
|
398
|
+
props: {
|
|
399
|
+
value: {
|
|
400
|
+
type: [String, Number, Boolean, Object, Array, Function],
|
|
401
|
+
default: null
|
|
402
|
+
},
|
|
403
|
+
separator: Boolean,
|
|
404
|
+
disabled: Boolean,
|
|
405
|
+
custom: Boolean,
|
|
406
|
+
focusable: {
|
|
407
|
+
type: Boolean,
|
|
408
|
+
default: !0
|
|
409
|
+
},
|
|
410
|
+
paddingless: Boolean,
|
|
411
|
+
hasLink: Boolean,
|
|
412
|
+
ariaRole: {
|
|
413
|
+
type: String,
|
|
414
|
+
default: ""
|
|
415
|
+
},
|
|
416
|
+
type: {
|
|
417
|
+
type: String,
|
|
418
|
+
default: null
|
|
419
|
+
},
|
|
420
|
+
toggle: {
|
|
421
|
+
type: Boolean,
|
|
422
|
+
default: !1
|
|
423
|
+
},
|
|
424
|
+
title: {
|
|
425
|
+
type: String,
|
|
426
|
+
default: ""
|
|
427
|
+
},
|
|
428
|
+
tooltip: {
|
|
429
|
+
type: [Object, String],
|
|
430
|
+
default: null
|
|
431
|
+
},
|
|
432
|
+
closeOnClick: {
|
|
433
|
+
type: Boolean,
|
|
434
|
+
default: !0
|
|
435
|
+
},
|
|
436
|
+
iconLeft: {
|
|
437
|
+
type: String,
|
|
438
|
+
default: null
|
|
439
|
+
},
|
|
440
|
+
iconRight: {
|
|
441
|
+
type: String,
|
|
442
|
+
default: null
|
|
443
|
+
},
|
|
444
|
+
iconProps: {
|
|
445
|
+
type: Object,
|
|
446
|
+
default: () => ({})
|
|
447
|
+
},
|
|
448
|
+
to: {
|
|
449
|
+
type: Object,
|
|
450
|
+
default: null
|
|
451
|
+
},
|
|
452
|
+
// Allows for parent communication on arbitrary depth
|
|
453
|
+
customParent: {
|
|
454
|
+
type: Object,
|
|
455
|
+
default: null
|
|
456
|
+
}
|
|
457
|
+
},
|
|
458
|
+
computed: {
|
|
459
|
+
parent() {
|
|
460
|
+
return this.customParent || this.$parent;
|
|
461
|
+
},
|
|
462
|
+
anchorClasses() {
|
|
463
|
+
return {
|
|
464
|
+
"is-disabled": this.parent.disabled || this.disabled,
|
|
465
|
+
"is-paddingless": this.paddingless,
|
|
466
|
+
"is-active": this.isActive,
|
|
467
|
+
"has-toggle": this.toggle
|
|
468
|
+
};
|
|
469
|
+
},
|
|
470
|
+
itemClasses() {
|
|
471
|
+
return {
|
|
472
|
+
"dropdown-item": !this.hasLink,
|
|
473
|
+
"is-disabled": this.disabled,
|
|
474
|
+
"is-paddingless": this.paddingless,
|
|
475
|
+
"is-active": this.isActive,
|
|
476
|
+
"has-link": this.hasLink
|
|
477
|
+
};
|
|
478
|
+
},
|
|
479
|
+
ariaRoleItem() {
|
|
480
|
+
return this.ariaRole === "menuitem" || this.ariaRole === "listitem" ? this.ariaRole : null;
|
|
481
|
+
},
|
|
482
|
+
isClickable() {
|
|
483
|
+
return !this.parent.disabled && !this.separator && !this.disabled && !this.custom;
|
|
484
|
+
},
|
|
485
|
+
isActive() {
|
|
486
|
+
return this.toggle || this.parent.selected === null ? !1 : this.parent.multiple ? this.parent.selected.indexOf(this.value) >= 0 : this.value === this.parent.selected;
|
|
487
|
+
},
|
|
488
|
+
isFocusable() {
|
|
489
|
+
return this.hasLink ? !1 : this.focusable;
|
|
490
|
+
},
|
|
491
|
+
tooltipItem() {
|
|
492
|
+
if (!this.tooltip)
|
|
493
|
+
return null;
|
|
494
|
+
const t = typeof this.tooltip == "string" ? { content: this.tooltip } : this.tooltip;
|
|
495
|
+
return {
|
|
496
|
+
boundariesElement: `.${this.parent.uniquePopoverClass}`,
|
|
497
|
+
classes: "dropdown-tooltip-class",
|
|
498
|
+
offset: 7,
|
|
499
|
+
placement: "left",
|
|
500
|
+
...t
|
|
501
|
+
};
|
|
502
|
+
}
|
|
503
|
+
},
|
|
504
|
+
created() {
|
|
505
|
+
if (!this.parent.$data._isDropdown)
|
|
506
|
+
throw this.$destroy(), new Error("You should wrap cDropdownItem on a cDropdown");
|
|
507
|
+
},
|
|
508
|
+
methods: {
|
|
509
|
+
/**
|
|
510
|
+
* Click listener, select the item.
|
|
511
|
+
*/
|
|
512
|
+
selectItem() {
|
|
513
|
+
this.isClickable && (this.parent.selectItem(this.value, { closeOnClick: this.closeOnClick }), this.$emit("click"), typeof this.value == "boolean" && this.$emit("input", !this.value));
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
};
|
|
517
|
+
var I = function() {
|
|
518
|
+
var e = this, i = e._self._c;
|
|
519
|
+
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("CIcon", e._b({ staticClass: "icon dropdown-item-icon", attrs: { type: e.iconLeft } }, "CIcon", { 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("CIcon", e._b({ staticClass: "icon dropdown-item-icon is-right", attrs: { type: e.iconRight || "chevron-up-down" } }, "CIcon", { 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("CIcon", e._b({ staticClass: "icon dropdown-item-icon", attrs: { type: e.iconLeft } }, "CIcon", { size: 18, ...e.iconProps }, !1)) : e._e(), e._t("default"), e.iconRight ? i("CIcon", e._b({ staticClass: "icon dropdown-item-icon is-right", attrs: { type: e.iconRight } }, "CIcon", { size: 18, ...e.iconProps }, !1)) : e._e()], 2);
|
|
520
|
+
}, z = [], P = /* @__PURE__ */ p(
|
|
521
|
+
E,
|
|
522
|
+
I,
|
|
523
|
+
z,
|
|
524
|
+
!1,
|
|
525
|
+
null,
|
|
526
|
+
null
|
|
527
|
+
);
|
|
528
|
+
const N = P.exports;
|
|
529
|
+
export {
|
|
530
|
+
H as C,
|
|
531
|
+
N as a,
|
|
532
|
+
D as b,
|
|
533
|
+
C as c,
|
|
534
|
+
M as g,
|
|
535
|
+
T as i,
|
|
536
|
+
_ as r,
|
|
537
|
+
y as w
|
|
538
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|