@cling-se/widget 0.17.3 → 0.18.0

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 (232) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/AddClientCallout-Bod9Eqx4.js +101 -0
  3. package/dist/AnswerModal-a2cyKFbt.js +3371 -0
  4. package/dist/AttachmentItem-DBUqckCS.js +171 -0
  5. package/dist/BaseUpload-DrWzuvbS.js +6503 -0
  6. package/dist/BlockMedia-DuE_K9hR.js +103 -0
  7. package/dist/CCallout-CM1VsH30.js +104 -0
  8. package/dist/{CCurrencyDropdown-CXXQu8th.js → CCurrencyDropdown-C_lAaq4P.js} +91 -53
  9. package/dist/CDropdownItem-DMUAJ90n.js +749 -0
  10. package/dist/CFormField.vue_vue_type_script_setup_true_lang-BqAyWe3T.js +292 -0
  11. package/dist/{CPhoneFormat-BtBGl8b4.js → CPhoneFormat-Dnn_cKk7.js} +13 -21
  12. package/dist/CPhoneInput-DuGkDiv-.js +207 -0
  13. package/dist/CPriceInput-B7DYzKcF.js +142 -0
  14. package/dist/CSelect-BZZDr27O.js +98 -0
  15. package/dist/CSkeleton.vue_vue_type_script_setup_true_lang-D2jDhnYI.js +51 -0
  16. package/dist/ClientAutocomplete-DuaJ5zDf.js +532 -0
  17. package/dist/ClientModal-CaMSjLkD.js +1188 -0
  18. package/dist/ColorPicker-BISZPQ6j.js +1408 -0
  19. package/dist/CompanyModal-ClTcmU4Y.js +250 -0
  20. package/dist/ContentWrapper-Bj7jbWU0.js +265 -0
  21. package/dist/CoverBlockSettings-AXyiLxrF.js +861 -0
  22. package/dist/DocAnswer-Bu09V33D.js +33 -0
  23. package/dist/DocDetails-B6-2LKsO.js +452 -0
  24. package/dist/DocForm-CFN8LWSd.js +6772 -0
  25. package/dist/DocFormSend-D1CUhy4n.js +171 -0
  26. package/dist/DocLinks-CuliFqtN.js +36 -0
  27. package/dist/DocModalBase-BxKsnwN-.js +29 -0
  28. package/dist/DocPrint-B_HJ_RET.js +399 -0
  29. package/dist/DocReceipt-D-A1TaTI.js +341 -0
  30. package/dist/DocSendReminder-BKTJonzh.js +181 -0
  31. package/dist/{DocTextEditor-yD9Dt_um.js → DocTextEditor-CEPcJT2o.js} +7907 -5579
  32. package/dist/DocTimeline-CF9S4YDZ.js +537 -0
  33. package/dist/DocumentClient-7mbq2QA4.js +90 -0
  34. package/dist/DocumentLayout-DkFlHgW6.js +1434 -0
  35. package/dist/DocumentLogotype-BTYMdpNi.js +162 -0
  36. package/dist/DocumentVoided-CWr5WMUv.js +33 -0
  37. package/dist/EmbedInput-SevVEpwc.js +156 -0
  38. package/dist/EmbedSettings-YMbUmp1O.js +103 -0
  39. package/dist/ErrorCallout-CQo2iF9c.js +34 -0
  40. package/dist/FilePreviewModal-C0xBeoAz.js +202 -0
  41. package/dist/Flag-BObij6SN.js +41 -0
  42. package/dist/HeaderSettings-C77pR78n.js +720 -0
  43. package/dist/ImageSelectModal-DKdU-0uq.js +119 -0
  44. package/dist/ImageUploadWrapper-BGkS5Cll.js +1585 -0
  45. package/dist/Index-B3y-jq9s.js +1098 -0
  46. package/dist/Index-B41pUREi.js +47 -0
  47. package/dist/Index-BEyeS1OG.js +52 -0
  48. package/dist/Index-BG5j8ZFP.js +93 -0
  49. package/dist/Index-BOT65yQR.js +68 -0
  50. package/dist/Index-BQNl-cXP.js +28 -0
  51. package/dist/Index-BY6xsS7C.js +38 -0
  52. package/dist/Index-Bh0Xv5ry.js +163 -0
  53. package/dist/Index-Bn4FSQcx.js +228 -0
  54. package/dist/Index-BrRIAede.js +87 -0
  55. package/dist/Index-C-6um0kX.js +76 -0
  56. package/dist/{Index-C_aIQ908.js → Index-C-gHa5xk.js} +319 -214
  57. package/dist/Index-C0wcjKCH.js +629 -0
  58. package/dist/Index-C6BbUFYw.js +160 -0
  59. package/dist/Index-C8xwJ0m1.js +200 -0
  60. package/dist/Index-CKgFEJF4.js +140 -0
  61. package/dist/{Index-Dfq7egc1.js → Index-CQwmu4f1.js} +47 -60
  62. package/dist/Index-CXchTpBa.js +74 -0
  63. package/dist/{Index-Ch9r5yhG.js → Index-CYoRt8PA.js} +9 -17
  64. package/dist/Index-CZZNQ4q5.js +39 -0
  65. package/dist/Index-CkaAs5ms.js +136 -0
  66. package/dist/Index-CtpXaBz8.js +363 -0
  67. package/dist/Index-CxDsSGtZ.js +126 -0
  68. package/dist/Index-DFkTBm02.js +102 -0
  69. package/dist/Index-DP3ll8F-.js +70 -0
  70. package/dist/{Index-RWMPRDAE.js → Index-DPDzMKQa.js} +10 -18
  71. package/dist/Index-DvxSig3z.js +25 -0
  72. package/dist/Index-Dzrn3Y6p.js +16 -0
  73. package/dist/{Index-CRiATiQn.js → Index-LQb0omFE.js} +10 -18
  74. package/dist/Index-Mt4mSaNT.js +4 -0
  75. package/dist/Index-_xN_cczo.js +3477 -0
  76. package/dist/Index-gAz45qgR.js +21 -0
  77. package/dist/Index-xXLFalgR.js +49 -0
  78. package/dist/Index-zyZRPz3H.js +28 -0
  79. package/dist/Index.vue_vue_type_script_lang-Ddo1wo-D.js +671 -0
  80. package/dist/InputToggleRow-CokEYwm2.js +99 -0
  81. package/dist/ManualPopover-Dukly7GP.js +65 -0
  82. package/dist/MediaWrapper-B8msCrQm.js +18 -0
  83. package/dist/{NotBindingText-CC7TxUqg.js → NotBindingText-DcQd8Eej.js} +13 -17
  84. package/dist/PackageGroup-clUIUoik.js +1060 -0
  85. package/dist/PdfTerms-DpzMVRfN.js +34 -0
  86. package/dist/PdfViewer-CSf4Rtbj.js +392 -0
  87. package/dist/PlainHtml.vue_vue_type_script_setup_true_lang-D6KSjjMA.js +17 -0
  88. package/dist/PriceHeader-Dyweu8aH.js +488 -0
  89. package/dist/{SearchApi-G2Hvp0Dd.js → SearchApi-Y1fDQn0u.js} +37 -49
  90. package/dist/SendForm-B9l24WwR.js +6689 -0
  91. package/dist/Setup-DyzbPFM4.js +47 -0
  92. package/dist/{SmartList-BynTuXtB.js → SmartList-CWGKoAJh.js} +16 -24
  93. package/dist/Sortable.vue_vue_type_script_setup_true_lang-C2Gwp6Q-.js +1349 -0
  94. package/dist/{TermsSettings-cA5YAO77.js → TermsSettings-BeQH307A.js} +169 -56
  95. package/dist/ThemeColorRow-DFIsPy55.js +105 -0
  96. package/dist/ToggleBinding-DlH4y1IM.js +44 -0
  97. package/dist/UploadModal-BZ0mPBBB.js +134 -0
  98. package/dist/VideoPlayerInput-DBxcTUb7.js +134 -0
  99. package/dist/VideoPlayerSettings-Dg1OxjOa.js +78 -0
  100. package/dist/VideoSelectModal-BhbanMix.js +217 -0
  101. package/dist/{anime.es-BrPTThYb.js → anime.es-4wvNItHq.js} +205 -201
  102. package/dist/{color-TdtKxwVa.js → color-HetJPhlA.js} +1 -2
  103. package/dist/{dom-Ds4ypDrd.js → dom-CkTGWrfu.js} +3 -6
  104. package/dist/{focusDrawerMixin-CximZA1J.js → focusDrawerMixin-BVbTYOGr.js} +1 -1
  105. package/dist/{formDrawerState-CkNGdxn5.js → formDrawerState-CogZ-GVm.js} +2 -2
  106. package/dist/helpers-B4GUxtdD.js +46 -0
  107. package/dist/index-BZDey7B-.js +268 -0
  108. package/dist/index-Bd8_ZHHq.js +188 -0
  109. package/dist/index-BvyoYp1e.js +508 -0
  110. package/dist/index-CJZoubA3.js +3525 -0
  111. package/dist/index-D7yQWP4d.js +125 -0
  112. package/dist/index-D8hGHka6.js +513 -0
  113. package/dist/index-Dxy4tf7x.js +149 -0
  114. package/dist/index.es.js +2 -5
  115. package/dist/index.umd.js +303 -1486
  116. package/dist/main-Bn5XkQPb.js +57570 -0
  117. package/dist/mapFormMixin-C7FJLnbO.js +1528 -0
  118. package/dist/omit-DrWpFvRJ.js +56 -0
  119. package/dist/{publicSenderState-CGEm9EYe.js → publicSenderState-tdtCFPMx.js} +4 -4
  120. package/dist/splitpanes-BApidgjj.js +342 -0
  121. package/dist/template-CHdf2K2I.js +1572 -0
  122. package/dist/tippy.esm-Co6FYzEM.js +1994 -0
  123. package/dist/useTermsModal-VDnO1Lro.js +87 -0
  124. package/dist/{utils-Dr4AcaE9.js → utils-DZkn0Q9c.js} +8 -11
  125. package/dist/validation-CqBkar3f.js +40 -0
  126. package/dist/widget.css +1 -0
  127. package/package.json +20 -25
  128. package/dist/AddClientCallout-Br6IhwGH.js +0 -48
  129. package/dist/AnswerModal-CsWltR6j.js +0 -3879
  130. package/dist/AttachmentItem-BG7FuSCD.js +0 -85
  131. package/dist/BaseDatePicker-PSNBtUIh.js +0 -3187
  132. package/dist/BaseUpload-BfEurAAV.js +0 -1977
  133. package/dist/BlockMedia-Bo3OfNSU.js +0 -76
  134. package/dist/CCallout-CAjM8-1X.js +0 -58
  135. package/dist/CDropdownItem-CN7gSfgY.js +0 -640
  136. package/dist/CFormField-Clvcf2Jh.js +0 -240
  137. package/dist/CPhoneInput-CEHXh5jM.js +0 -138
  138. package/dist/CPriceInput-D2c07SXp.js +0 -116
  139. package/dist/CSelect-Cz2IPzxS.js +0 -91
  140. package/dist/CSkeleton-AsnvnD-m.js +0 -55
  141. package/dist/ClientAutocomplete-CZ55-DKe.js +0 -438
  142. package/dist/ClientModal-CgUhWZ5L.js +0 -666
  143. package/dist/ColorPicker-IFGHqH-u.js +0 -2879
  144. package/dist/CompanyModal-TLSBFo3U.js +0 -147
  145. package/dist/ContentWrapper-HClxKPuT.js +0 -190
  146. package/dist/CoverBlockSettings-D99hAa6e.js +0 -659
  147. package/dist/DocAnswer-CTV_Bpt7.js +0 -36
  148. package/dist/DocDetails-CQe5htXj.js +0 -263
  149. package/dist/DocForm-6Efv5_oz.js +0 -5017
  150. package/dist/DocFormSend-DbXcklxU.js +0 -146
  151. package/dist/DocLinks-BO545zbL.js +0 -38
  152. package/dist/DocModalBase-DXHNJ-6i.js +0 -28
  153. package/dist/DocPrint-Bf2U4FQN.js +0 -240
  154. package/dist/DocReceipt-CWXvC7bY.js +0 -217
  155. package/dist/DocSendReminder-CRzBM2NJ.js +0 -140
  156. package/dist/DocTimeline-DGVOk8-2.js +0 -485
  157. package/dist/DocumentClient-Das9BaJ7.js +0 -136
  158. package/dist/DocumentLayout-4q8rmTVT.js +0 -4880
  159. package/dist/DocumentLogotype-DLncJJAB.js +0 -92
  160. package/dist/DocumentVoided-CcI9lX27.js +0 -25
  161. package/dist/EmbedInput-BPdy0lGS.js +0 -117
  162. package/dist/EmbedSettings-L2iwYLQK.js +0 -74
  163. package/dist/ErrorCallout-Ds_tBT02.js +0 -27
  164. package/dist/FilePreviewModal-hxUu330p.js +0 -81
  165. package/dist/Flag-1-HcT5Dz.js +0 -46
  166. package/dist/HeaderSettings-C27fMugK.js +0 -440
  167. package/dist/ImageSelectModal-BKDIyxF4.js +0 -86
  168. package/dist/ImageUploadWrapper-BiYzUQur.js +0 -1604
  169. package/dist/Index-5BOWxcPG.js +0 -26
  170. package/dist/Index-B1Odktov.js +0 -754
  171. package/dist/Index-B3d5BjEn.js +0 -25
  172. package/dist/Index-B3sSU_4X.js +0 -54
  173. package/dist/Index-B5Dqsh3K.js +0 -150
  174. package/dist/Index-B6aO1c_w.js +0 -62
  175. package/dist/Index-BGfICxJQ.js +0 -643
  176. package/dist/Index-BHopC0hv.js +0 -24
  177. package/dist/Index-BJXcSmp_.js +0 -55
  178. package/dist/Index-BQe6QjQZ.js +0 -25
  179. package/dist/Index-BmXx_x6t.js +0 -77
  180. package/dist/Index-C692qMTG.js +0 -294
  181. package/dist/Index-CEvbw-3i.js +0 -41
  182. package/dist/Index-CYSULnpn.js +0 -32
  183. package/dist/Index-CdtYzwAM.js +0 -107
  184. package/dist/Index-CetF2FW0.js +0 -230
  185. package/dist/Index-Cv6XLM20.js +0 -73
  186. package/dist/Index-Cwy8ff76.js +0 -154
  187. package/dist/Index-D34z4UEY.js +0 -84
  188. package/dist/Index-DNCei-lp.js +0 -56
  189. package/dist/Index-DUbxgIYB.js +0 -2445
  190. package/dist/Index-DVwn_LLf.js +0 -28
  191. package/dist/Index-Dla-mesV.js +0 -146
  192. package/dist/Index-KtUkOPI2.js +0 -58
  193. package/dist/Index-LjnOTVJk.js +0 -66
  194. package/dist/Index-ky1SRtfY.js +0 -94
  195. package/dist/Index-mceZW2NX.js +0 -41
  196. package/dist/Index-tD3hZjh8.js +0 -144
  197. package/dist/Index-vM5kDtC2.js +0 -33
  198. package/dist/InputToggleRow-BmDuSbE2.js +0 -57
  199. package/dist/ManualPopover-CQfjPvFe.js +0 -60
  200. package/dist/MediaWrapper-DDzcjR6V.js +0 -23
  201. package/dist/PackageGroup-mAGXfZDv.js +0 -704
  202. package/dist/PdfTerms-BH_Nwf2h.js +0 -31
  203. package/dist/PdfViewer-mBLxI8bA.js +0 -383
  204. package/dist/PlainHtml-B7gUNNZd.js +0 -27
  205. package/dist/PriceHeader-DClYMPcq.js +0 -338
  206. package/dist/SendForm-Cxv_m8Rq.js +0 -1023
  207. package/dist/Setup-B90VDZTG.js +0 -50
  208. package/dist/ThemeColorRow-D-Z7w4Wk.js +0 -69
  209. package/dist/ToggleBinding-DOeTcWzi.js +0 -42
  210. package/dist/UploadModal-DOPLVEpV.js +0 -95
  211. package/dist/VideoPlayerInput-1zG06elO.js +0 -97
  212. package/dist/VideoPlayerSettings-O-4rAYYh.js +0 -61
  213. package/dist/VideoSelectModal-DzqFrqCg.js +0 -104
  214. package/dist/answerDocumentMixin-HBiNWYCH.js +0 -51
  215. package/dist/debounce-Ch1d3526.js +0 -84
  216. package/dist/formValidationMixin-D_MzsHsR.js +0 -49
  217. package/dist/index-BNdbPq4J.js +0 -492
  218. package/dist/index-BXzugeJ6.js +0 -81
  219. package/dist/index-C5wcxrC6.js +0 -167
  220. package/dist/index-CgDOs7t4.js +0 -2700
  221. package/dist/index-Cj-_2coz.js +0 -351
  222. package/dist/index-DpqV5y0K.js +0 -102
  223. package/dist/main-BL_yzf2r.js +0 -57357
  224. package/dist/mapFormMixin-Cu_vkTP-.js +0 -3028
  225. package/dist/omit-Dfe_H1Ft.js +0 -31
  226. package/dist/simplebar.min-CRlLD1Oz.js +0 -71
  227. package/dist/splitpanes-BHUVsCZF.js +0 -382
  228. package/dist/style.css +0 -4
  229. package/dist/throttle-BX_w77tW.js +0 -18
  230. package/dist/tippy.esm-n4arfVzA.js +0 -1805
  231. package/dist/vuedraggable.umd-DW4PJoZ3.js +0 -3161
  232. package/dist/vuex.esm-DKGl8mcw.js +0 -467
@@ -1,640 +0,0 @@
1
- import { V as f, l as m, n as p } from "./main-BL_yzf2r.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 y = new b().init(), c = new f({ data: { windowSize: y } }), v = {
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 u = { 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
- })(u, u.exports);
67
- var g = u.exports;
68
- const w = /* @__PURE__ */ m(g), F = w();
69
- function j(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 H(t, e, i) {
83
- return Math.max(e, Math.min(i, t));
84
- }
85
- const d = (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 h;
97
- const x = (t, { value: e = !0 }) => {
98
- if (e) {
99
- let i = d(t), o = d(t, !0);
100
- i && i.length > 0 && (h = (s) => {
101
- i = d(t), o = d(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", h));
105
- }
106
- }, k = (t) => {
107
- t.removeEventListener("keydown", h);
108
- }, $ = {
109
- bind: x,
110
- unbind: k
111
- }, S = ["escape", "outside"], A = {
112
- name: "CDropdown",
113
- directives: {
114
- trapFocus: $
115
- },
116
- mixins: [v],
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((r) => l.classList.remove(r)), n.classList.forEach((r) => {
360
- l.classList.add(r);
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
- }, O = [], L = /* @__PURE__ */ p(
389
- A,
390
- B,
391
- O,
392
- !1,
393
- null,
394
- null
395
- );
396
- const q = L.exports, E = {
397
- name: "CSwitch",
398
- props: {
399
- value: {
400
- type: [String, Number, Boolean, Function, Object, Array, Date],
401
- default: null
402
- },
403
- nativeValue: {
404
- type: [String, Number, Boolean, Function, Object, Array, Date],
405
- default: null
406
- },
407
- disabled: Boolean,
408
- type: {
409
- type: String,
410
- default: ""
411
- },
412
- name: {
413
- type: String,
414
- default: ""
415
- },
416
- required: Boolean,
417
- size: {
418
- type: String,
419
- default: ""
420
- },
421
- trueValue: {
422
- type: [String, Number, Boolean, Function, Object, Array, Date],
423
- default: !0
424
- },
425
- falseValue: {
426
- type: [String, Number, Boolean, Function, Object, Array, Date],
427
- default: !1
428
- },
429
- rounded: {
430
- type: Boolean,
431
- default: !0
432
- }
433
- },
434
- data() {
435
- return {
436
- newValue: this.value
437
- };
438
- },
439
- computed: {
440
- computedValue: {
441
- get() {
442
- return this.newValue;
443
- },
444
- set(t) {
445
- this.newValue = t, this.$emit("input", t);
446
- }
447
- },
448
- newClass() {
449
- return [
450
- `is-${this.size}`,
451
- {
452
- "is-disabled": this.disabled,
453
- "is-rounded": this.rounded
454
- }
455
- ];
456
- }
457
- },
458
- watch: {
459
- /**
460
- * When v-model change, set internal value.
461
- */
462
- value(t) {
463
- this.newValue = t;
464
- }
465
- },
466
- methods: {
467
- focus() {
468
- this.$refs.input.focus();
469
- }
470
- }
471
- };
472
- var I = function() {
473
- var e = this, i = e._self._c;
474
- return i("label", { ref: "label", staticClass: "switch", class: e.newClass, attrs: { disabled: e.disabled }, on: { click: e.focus, keydown: function(o) {
475
- return !o.type.indexOf("key") && e._k(o.keyCode, "enter", 13, o.key, "Enter") ? null : (o.preventDefault(), e.$refs.label.click());
476
- } } }, [i("input", { directives: [{ name: "model", rawName: "v-model", value: e.computedValue, expression: "computedValue" }], ref: "input", attrs: { disabled: e.disabled, name: e.name, required: e.required, "true-value": e.trueValue, "false-value": e.falseValue, type: "checkbox" }, domProps: { value: e.nativeValue, checked: Array.isArray(e.computedValue) ? e._i(e.computedValue, e.nativeValue) > -1 : e._q(e.computedValue, e.trueValue) }, on: { click: function(o) {
477
- o.stopPropagation();
478
- }, change: function(o) {
479
- var s = e.computedValue, a = o.target, n = a.checked ? e.trueValue : e.falseValue;
480
- if (Array.isArray(s)) {
481
- var l = e.nativeValue, r = e._i(s, l);
482
- a.checked ? r < 0 && (e.computedValue = s.concat([l])) : r > -1 && (e.computedValue = s.slice(0, r).concat(s.slice(r + 1)));
483
- } else
484
- e.computedValue = n;
485
- } } }), i("span", { staticClass: "check", class: [`is-${e.type}`] }), i("span", { staticClass: "control-label" }, [e._t("default")], 2)]);
486
- }, z = [], V = /* @__PURE__ */ p(
487
- E,
488
- I,
489
- z,
490
- !1,
491
- null,
492
- "4cdd239d"
493
- );
494
- const P = V.exports, R = {
495
- name: "CDropdownItem",
496
- components: {
497
- CSwitch: P
498
- },
499
- props: {
500
- value: {
501
- type: [String, Number, Boolean, Object, Array, Function],
502
- default: null
503
- },
504
- separator: Boolean,
505
- disabled: Boolean,
506
- custom: Boolean,
507
- focusable: {
508
- type: Boolean,
509
- default: !0
510
- },
511
- paddingless: Boolean,
512
- hasLink: Boolean,
513
- ariaRole: {
514
- type: String,
515
- default: ""
516
- },
517
- type: {
518
- type: String,
519
- default: null
520
- },
521
- toggle: {
522
- type: Boolean,
523
- default: !1
524
- },
525
- title: {
526
- type: String,
527
- default: ""
528
- },
529
- tooltip: {
530
- type: [Object, String],
531
- default: null
532
- },
533
- closeOnClick: {
534
- type: Boolean,
535
- default: !0
536
- },
537
- iconLeft: {
538
- type: String,
539
- default: null
540
- },
541
- iconRight: {
542
- type: String,
543
- default: null
544
- },
545
- iconProps: {
546
- type: Object,
547
- default: () => ({})
548
- },
549
- to: {
550
- type: Object,
551
- default: null
552
- },
553
- // Allows for parent communication on arbitrary depth
554
- customParent: {
555
- type: Object,
556
- default: null
557
- }
558
- },
559
- computed: {
560
- parent() {
561
- return this.customParent || this.$parent;
562
- },
563
- anchorClasses() {
564
- return {
565
- "is-disabled": this.parent.disabled || this.disabled,
566
- "is-paddingless": this.paddingless,
567
- "is-active": this.isActive,
568
- "has-toggle": this.toggle
569
- };
570
- },
571
- itemClasses() {
572
- return {
573
- "dropdown-item": !this.hasLink,
574
- "is-disabled": this.disabled,
575
- "is-paddingless": this.paddingless,
576
- "is-active": this.isActive,
577
- "has-link": this.hasLink
578
- };
579
- },
580
- ariaRoleItem() {
581
- return this.ariaRole === "menuitem" || this.ariaRole === "listitem" ? this.ariaRole : null;
582
- },
583
- isClickable() {
584
- return !this.parent.disabled && !this.separator && !this.disabled && !this.custom;
585
- },
586
- isActive() {
587
- return this.toggle || this.parent.selected === null ? !1 : this.parent.multiple ? this.parent.selected.indexOf(this.value) >= 0 : this.value === this.parent.selected;
588
- },
589
- isFocusable() {
590
- return this.hasLink ? !1 : this.focusable;
591
- },
592
- tooltipItem() {
593
- if (!this.tooltip)
594
- return null;
595
- const t = typeof this.tooltip == "string" ? { content: this.tooltip } : this.tooltip;
596
- return {
597
- boundariesElement: `.${this.parent.uniquePopoverClass}`,
598
- classes: "dropdown-tooltip-class",
599
- offset: 7,
600
- placement: "left",
601
- ...t
602
- };
603
- }
604
- },
605
- created() {
606
- if (!this.parent.$data._isDropdown)
607
- throw this.$destroy(), new Error("You should wrap cDropdownItem on a cDropdown");
608
- },
609
- methods: {
610
- /**
611
- * Click listener, select the item.
612
- */
613
- selectItem() {
614
- this.isClickable && (this.parent.selectItem(this.value, { closeOnClick: this.closeOnClick }), this.$emit("click"), typeof this.value == "boolean" && this.$emit("input", !this.value));
615
- }
616
- }
617
- };
618
- var T = function() {
619
- var e = this, i = e._self._c;
620
- 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);
621
- }, D = [], M = /* @__PURE__ */ p(
622
- R,
623
- T,
624
- D,
625
- !1,
626
- null,
627
- null
628
- );
629
- const W = M.exports;
630
- export {
631
- q as C,
632
- W as a,
633
- P as b,
634
- C as c,
635
- H as d,
636
- j as g,
637
- F as i,
638
- _ as r,
639
- v as w
640
- };