@cling-se/widget 0.14.3 → 0.14.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/.eslintrc.cjs +4 -4
  2. package/README.md +40 -40
  3. package/package.json +1 -1
  4. package/tsconfig.json +26 -26
  5. package/tsconfig.node.json +10 -10
  6. package/tsconfig.paths.json +17 -17
  7. package/vite.config.ts +61 -61
  8. package/dist/AddClientCallout-DKH-LP5B.js +0 -46
  9. package/dist/AnswerModal-BCbq8wc4.js +0 -3869
  10. package/dist/AttachmentItem-60CSZnkF.js +0 -78
  11. package/dist/BaseDatePicker-Cl8SnC1k.js +0 -3183
  12. package/dist/BaseUpload-D4FCjlhL.js +0 -1977
  13. package/dist/BlockMedia-CqkwdGnE.js +0 -76
  14. package/dist/CCallout-BTBgU8f-.js +0 -59
  15. package/dist/CCurrencyDropdown-CL32Mo-Y.js +0 -246
  16. package/dist/CDropdownItem-DlWtQwO6.js +0 -538
  17. package/dist/CField.vue_vue_type_style_index_0_lang-l0sNRNKZ.js +0 -1
  18. package/dist/CFormField-BxJv-nUO.js +0 -241
  19. package/dist/CPhoneFormat-CJ9kndtJ.js +0 -62
  20. package/dist/CPriceInput-BpXI5X2j.js +0 -112
  21. package/dist/CTabs.vue_vue_type_style_index_0_scoped_e02a6440_lang-l0sNRNKZ.js +0 -1
  22. package/dist/ClientAutocomplete-D9Dj9iBW.js +0 -78
  23. package/dist/ClientModal-JOt8NGcR.js +0 -625
  24. package/dist/ColorPicker-uPKD-Gvm.js +0 -2879
  25. package/dist/CompanyModal-7bG0iIRd.js +0 -141
  26. package/dist/ContentWrapper-B2nyZHL4.js +0 -183
  27. package/dist/CoverBlockSettings-C1O_FAde.js +0 -275
  28. package/dist/DocAnswer-B9G-y4Px.js +0 -36
  29. package/dist/DocDetails-DYHxKChO.js +0 -246
  30. package/dist/DocForm-BktEXjML.js +0 -7273
  31. package/dist/DocFormSend-DM6QgUOj.js +0 -143
  32. package/dist/DocLinks-BIGwfB3H.js +0 -38
  33. package/dist/DocModalBase-D5GdwTI7.js +0 -28
  34. package/dist/DocPrint-HqbaIGms.js +0 -240
  35. package/dist/DocReceipt-WXo6vWyW.js +0 -210
  36. package/dist/DocSendReminder-C8dNEpLg.js +0 -137
  37. package/dist/DocTextEditor-BfOZFDTP.js +0 -17177
  38. package/dist/DocTimeline-CitwS9px.js +0 -481
  39. package/dist/DocumentClient-CQ_z8ajY.js +0 -136
  40. package/dist/DocumentLayout-BA7mFfZh.js +0 -4909
  41. package/dist/DocumentLogotype-woc_hfll.js +0 -87
  42. package/dist/DocumentVoided-DC4FzpxG.js +0 -25
  43. package/dist/EmbedInput-CheqYcNr.js +0 -113
  44. package/dist/EmbedSettings-YcwM8hJw.js +0 -72
  45. package/dist/ErrorCallout-6pCYcx00.js +0 -28
  46. package/dist/FilePreviewModal-T8AiphqO.js +0 -81
  47. package/dist/Flag-Ddm6a4Il.js +0 -114
  48. package/dist/HeaderSettings-DHdZweJH.js +0 -392
  49. package/dist/ImageSelectModal-CAoBhnI8.js +0 -84
  50. package/dist/ImageUploadWrapper-CNv59Lhh.js +0 -1604
  51. package/dist/Index-B6S9U4Z-.js +0 -26
  52. package/dist/Index-BHX0D5fW.js +0 -559
  53. package/dist/Index-BL_7m5Ca.js +0 -70
  54. package/dist/Index-BXMXEUfo.js +0 -223
  55. package/dist/Index-BhVBvMu6.js +0 -32
  56. package/dist/Index-Bl_SNW80.js +0 -25
  57. package/dist/Index-BsguntKl.js +0 -21
  58. package/dist/Index-CGYjPfsf.js +0 -2402
  59. package/dist/Index-CKrGb3of.js +0 -61
  60. package/dist/Index-CMNrQo5a.js +0 -140
  61. package/dist/Index-CU50Al5c.js +0 -642
  62. package/dist/Index-CdqrrZxd.js +0 -77
  63. package/dist/Index-CfnL9dAw.js +0 -58
  64. package/dist/Index-CuW0MYrT.js +0 -171
  65. package/dist/Index-D-z8JSn6.js +0 -154
  66. package/dist/Index-D8giJ_bs.js +0 -84
  67. package/dist/Index-DDvfqy_h.js +0 -24
  68. package/dist/Index-DQDalqZ-.js +0 -107
  69. package/dist/Index-DTIPKKkV.js +0 -150
  70. package/dist/Index-DWxzUBff.js +0 -754
  71. package/dist/Index-DaNGeDQw.js +0 -144
  72. package/dist/Index-DfLU_AyN.js +0 -49
  73. package/dist/Index-DkVav_I7.js +0 -25
  74. package/dist/Index-Dxp8QAtB.js +0 -57
  75. package/dist/Index-DzjxFkcv.js +0 -52
  76. package/dist/Index-EwUJJWaB.js +0 -69
  77. package/dist/Index-I60qAqLl.js +0 -31
  78. package/dist/Index-LfF-7lQK.js +0 -292
  79. package/dist/Index-P0_dyc2V.js +0 -45
  80. package/dist/Index-RQMPSeHw.js +0 -98
  81. package/dist/Index-oipNLl3Y.js +0 -46
  82. package/dist/Index-sJq2Iyvt.js +0 -62
  83. package/dist/Index-uubi3NHX.js +0 -33
  84. package/dist/Index-vNj2kYZT.js +0 -55
  85. package/dist/InputToggleRow-B2pWvVyx.js +0 -57
  86. package/dist/ManualPopover-BI_Sf1zG.js +0 -54
  87. package/dist/MediaWrapper-eFpWxv3n.js +0 -23
  88. package/dist/NotBindingText-DA5NpePz.js +0 -32
  89. package/dist/PackageGroup-DOSijBdN.js +0 -699
  90. package/dist/PdfTerms-Q5YuVtrJ.js +0 -36
  91. package/dist/PdfViewer-zcWl8XZT.js +0 -374
  92. package/dist/PlainHtml-BmA83UAm.js +0 -20
  93. package/dist/PriceHeader-C14L5zgG.js +0 -339
  94. package/dist/SearchApi-CGT7-jVf.js +0 -161
  95. package/dist/Setup-RJQvZlDO.js +0 -50
  96. package/dist/SmartList-YosKRPVn.js +0 -83
  97. package/dist/TermsSettings-C5JTv7rT.js +0 -102
  98. package/dist/ThemeColorRow-D-C_tm2f.js +0 -63
  99. package/dist/ToggleBinding-KEVHHvKf.js +0 -38
  100. package/dist/UploadModal-DOYoWELI.js +0 -95
  101. package/dist/VideoPlayerInput-Dxb6CNk-.js +0 -93
  102. package/dist/VideoPlayerSettings-DsVN4Ix-.js +0 -61
  103. package/dist/VideoSelectModal-BpfzNx61.js +0 -100
  104. package/dist/anime.es-BrPTThYb.js +0 -858
  105. package/dist/answerDocumentMixin-BJMGrfUs.js +0 -51
  106. package/dist/color-TdtKxwVa.js +0 -19
  107. package/dist/debounce-BN83gOVd.js +0 -84
  108. package/dist/dom-CJxkno7i.js +0 -91
  109. package/dist/favicon.ico +0 -0
  110. package/dist/focusDrawerMixin-CawyQaGq.js +0 -22
  111. package/dist/formComponentsInstall-jcnyQ1zw.js +0 -2494
  112. package/dist/formDrawerState-BdNohvZH.js +0 -20
  113. package/dist/formValidationMixin-DOwgebZk.js +0 -49
  114. package/dist/i18nMessages-Chz_lxGG.js +0 -17
  115. package/dist/index-BBJIOkm_.js +0 -347
  116. package/dist/index-BNq9YCWc.js +0 -166
  117. package/dist/index-BdhbkLLU.js +0 -81
  118. package/dist/index-COf8F6CL.js +0 -3916
  119. package/dist/index-D0WvZHX_.js +0 -102
  120. package/dist/index-DTzZP4yq.js +0 -492
  121. package/dist/index.es.js +0 -35
  122. package/dist/index.umd.js +0 -3148
  123. package/dist/main-DE5THsiR.js +0 -56739
  124. package/dist/mapFormMixin-y2txvLw9.js +0 -72
  125. package/dist/omit-BrsWQAtU.js +0 -31
  126. package/dist/publicSenderState-BYsq95Vt.js +0 -21
  127. package/dist/splitpanes-BHUVsCZF.js +0 -382
  128. package/dist/style.css +0 -4
  129. package/dist/throttle-C2srA2wa.js +0 -18
  130. package/dist/tinycolor-SjV_ROuP.js +0 -633
  131. package/dist/tippy.esm-Dj7DQppr.js +0 -1799
  132. package/dist/utils-16HMuRfY.js +0 -108
  133. package/dist/vuedraggable.umd-Cd1g2Hr7.js +0 -3161
  134. package/dist/vuex.esm-DKGl8mcw.js +0 -467
@@ -1,538 +0,0 @@
1
- import { V as f, k as m, n as p } from "./main-DE5THsiR.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
- };