@cling-se/widget 0.17.3 → 0.18.1

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 +24 -0
  2. package/dist/AddClientCallout-CCt78VvH.js +101 -0
  3. package/dist/AnswerModal-B4LwVv2N.js +3371 -0
  4. package/dist/AttachmentItem-DnvYffKP.js +171 -0
  5. package/dist/BaseUpload-DFoV0ZLe.js +6503 -0
  6. package/dist/BlockMedia-Amo_kdHo.js +103 -0
  7. package/dist/CCallout-Gd06ds6O.js +104 -0
  8. package/dist/{CCurrencyDropdown-CXXQu8th.js → CCurrencyDropdown-B4GNmOGA.js} +91 -53
  9. package/dist/CDropdownItem-BUNVCpSR.js +749 -0
  10. package/dist/CFormField.vue_vue_type_script_setup_true_lang-Bo2J0c4G.js +292 -0
  11. package/dist/{CPhoneFormat-BtBGl8b4.js → CPhoneFormat-DmN5r9Ci.js} +13 -21
  12. package/dist/CPhoneInput-B6iyhsOG.js +207 -0
  13. package/dist/CPriceInput-BLQaNu1d.js +142 -0
  14. package/dist/CSelect-BVO9iO9L.js +98 -0
  15. package/dist/CSkeleton.vue_vue_type_script_setup_true_lang-C9loRtrk.js +51 -0
  16. package/dist/ClientAutocomplete-C__yUaxD.js +532 -0
  17. package/dist/ClientModal-B9cbuEiC.js +1188 -0
  18. package/dist/ColorPicker-G2kkxL7_.js +1408 -0
  19. package/dist/CompanyModal-por9AG4P.js +250 -0
  20. package/dist/ContentWrapper-CQtaGA2u.js +265 -0
  21. package/dist/CoverBlockSettings-BCBDouyl.js +861 -0
  22. package/dist/DocAnswer-BrKctwrY.js +33 -0
  23. package/dist/DocDetails-B_LWVHGt.js +452 -0
  24. package/dist/DocForm-D6T7NmfO.js +6772 -0
  25. package/dist/DocFormSend-COYPrhl7.js +171 -0
  26. package/dist/DocLinks-B0LjxXIk.js +36 -0
  27. package/dist/DocModalBase-DObZHuYr.js +29 -0
  28. package/dist/DocPrint-CkDq78fB.js +399 -0
  29. package/dist/DocReceipt-CYBPyePC.js +341 -0
  30. package/dist/DocSendReminder-Dau6s43e.js +181 -0
  31. package/dist/{DocTextEditor-yD9Dt_um.js → DocTextEditor-CVn6gE1i.js} +7907 -5579
  32. package/dist/DocTimeline-ChBDPOfd.js +537 -0
  33. package/dist/DocumentClient-MLXzzXLb.js +90 -0
  34. package/dist/DocumentLayout-BMHOt380.js +1434 -0
  35. package/dist/DocumentLogotype-Clj3fopX.js +162 -0
  36. package/dist/DocumentVoided-B5_MSBbC.js +33 -0
  37. package/dist/EmbedInput-CzkOa02p.js +156 -0
  38. package/dist/EmbedSettings-Cf_F3KrM.js +103 -0
  39. package/dist/ErrorCallout-CJn6NCse.js +34 -0
  40. package/dist/FilePreviewModal-Di1VnPNY.js +202 -0
  41. package/dist/Flag-C4_G5IY1.js +41 -0
  42. package/dist/HeaderSettings-DWN0TjVD.js +720 -0
  43. package/dist/ImageSelectModal-DmAJ9PrN.js +119 -0
  44. package/dist/ImageUploadWrapper-QLEhA_dI.js +1585 -0
  45. package/dist/Index-B06eCuBA.js +76 -0
  46. package/dist/Index-B8Zj0-MX.js +87 -0
  47. package/dist/{Index-C_aIQ908.js → Index-BBBXL4zh.js} +319 -214
  48. package/dist/Index-BCHLxp7B.js +21 -0
  49. package/dist/Index-BDAp1CwZ.js +363 -0
  50. package/dist/Index-BFbcjFo4.js +16 -0
  51. package/dist/{Index-CRiATiQn.js → Index-BODJXJNp.js} +10 -18
  52. package/dist/Index-BOx_9tTM.js +136 -0
  53. package/dist/Index-BgZNiD7A.js +47 -0
  54. package/dist/Index-Bt97lEsI.js +228 -0
  55. package/dist/Index-C9aBeBBk.js +70 -0
  56. package/dist/Index-CE3pWPzp.js +49 -0
  57. package/dist/Index-CMdPSsp4.js +38 -0
  58. package/dist/Index-CNhBDG2e.js +126 -0
  59. package/dist/Index-CdsOdgG2.js +28 -0
  60. package/dist/{Index-Ch9r5yhG.js → Index-CmxFh3dW.js} +9 -17
  61. package/dist/Index-CpxzwwQS.js +52 -0
  62. package/dist/Index-CxTwWRD9.js +93 -0
  63. package/dist/Index-D9WFWlE6.js +140 -0
  64. package/dist/Index-D9bulLeI.js +39 -0
  65. package/dist/{Index-RWMPRDAE.js → Index-DL_9LzoR.js} +10 -18
  66. package/dist/Index-DR-sGE3Y.js +25 -0
  67. package/dist/Index-DRoOW5Pn.js +163 -0
  68. package/dist/Index-DTn47-hP.js +74 -0
  69. package/dist/Index-DeGDlj0B.js +68 -0
  70. package/dist/Index-DhYYK4bK.js +28 -0
  71. package/dist/Index-Dssdb-0Z.js +629 -0
  72. package/dist/Index-OcBnU480.js +200 -0
  73. package/dist/Index-Qh_8JqAv.js +3477 -0
  74. package/dist/Index-W10PQb8i.js +102 -0
  75. package/dist/Index-lbWFEELM.js +4 -0
  76. package/dist/Index-qFAg7VVU.js +1098 -0
  77. package/dist/Index-rDndJKo1.js +160 -0
  78. package/dist/{Index-Dfq7egc1.js → Index-s-6Qh_NE.js} +47 -60
  79. package/dist/Index.vue_vue_type_script_lang-CriDqp1F.js +671 -0
  80. package/dist/InputToggleRow-DJarYsVL.js +99 -0
  81. package/dist/ManualPopover-BMrkEHtV.js +65 -0
  82. package/dist/MediaWrapper-BYdVpmov.js +18 -0
  83. package/dist/{NotBindingText-CC7TxUqg.js → NotBindingText-DGjJoN8-.js} +13 -17
  84. package/dist/PackageGroup-q7_oBOqw.js +1060 -0
  85. package/dist/PdfTerms-DBEClYQ5.js +34 -0
  86. package/dist/PdfViewer-C_y5sqXB.js +392 -0
  87. package/dist/PlainHtml.vue_vue_type_script_setup_true_lang-D5ZLw34T.js +17 -0
  88. package/dist/PriceHeader-BSwv3mzc.js +488 -0
  89. package/dist/{SearchApi-G2Hvp0Dd.js → SearchApi-BM6TTqxW.js} +37 -49
  90. package/dist/SendForm-DfmBbhp9.js +6689 -0
  91. package/dist/Setup-BC1feKr_.js +47 -0
  92. package/dist/{SmartList-BynTuXtB.js → SmartList-B3pgsg4S.js} +16 -24
  93. package/dist/Sortable.vue_vue_type_script_setup_true_lang-YOP-Y07m.js +1349 -0
  94. package/dist/{TermsSettings-cA5YAO77.js → TermsSettings-DEkACrRU.js} +169 -56
  95. package/dist/ThemeColorRow-qG8Dkkyj.js +105 -0
  96. package/dist/ToggleBinding-Cdtl_-1s.js +44 -0
  97. package/dist/UploadModal-1OWPRxA5.js +134 -0
  98. package/dist/VideoPlayerInput-DgFNjiKK.js +134 -0
  99. package/dist/VideoPlayerSettings-CFuA-7RC.js +78 -0
  100. package/dist/VideoSelectModal-CSv67eA8.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-r-OZchfV.js} +1 -1
  105. package/dist/{formDrawerState-CkNGdxn5.js → formDrawerState-COVczNhJ.js} +2 -2
  106. package/dist/helpers-ChwW54Ex.js +46 -0
  107. package/dist/index-BMZle8Ew.js +513 -0
  108. package/dist/index-Bf-fiKJf.js +268 -0
  109. package/dist/index-Bg4JRi5S.js +125 -0
  110. package/dist/index-C7chK2UD.js +3525 -0
  111. package/dist/index-CR52qIBO.js +149 -0
  112. package/dist/index-D1x9O_nJ.js +188 -0
  113. package/dist/index-YFcPqc9m.js +508 -0
  114. package/dist/index.es.js +2 -5
  115. package/dist/index.umd.js +303 -1486
  116. package/dist/main-DI0diChK.js +57570 -0
  117. package/dist/mapFormMixin-Cgvwie9a.js +1528 -0
  118. package/dist/omit-DpjD7Dj9.js +56 -0
  119. package/dist/{publicSenderState-CGEm9EYe.js → publicSenderState-BcjNldje.js} +4 -4
  120. package/dist/splitpanes-BypKTSRL.js +342 -0
  121. package/dist/template-Dzexob5I.js +1572 -0
  122. package/dist/tippy.esm-0UMN6kWf.js +1994 -0
  123. package/dist/useTermsModal-DzH_PDFP.js +87 -0
  124. package/dist/{utils-Dr4AcaE9.js → utils--kBYCNZD.js} +8 -11
  125. package/dist/validation-B-omH73u.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
@@ -0,0 +1,292 @@
1
+ import { i as M, a as _ } from "./helpers-ChwW54Ex.js";
2
+ import { F as f, ah as y, aJ as F, aK as k, e as C, _ as v, o as i, b as r, n as u, S as d, B as m, v as b, f as h, c as w, w as S, h as z, i as p, $ as B, j as $ } from "./main-DI0diChK.js";
3
+ const T = {
4
+ name: "CFieldBody",
5
+ inject: {
6
+ parent: {
7
+ from: "CField",
8
+ default: null
9
+ }
10
+ },
11
+ props: {
12
+ message: {
13
+ type: [String, Array],
14
+ default: ""
15
+ },
16
+ type: {
17
+ type: [String, Object],
18
+ default: ""
19
+ }
20
+ },
21
+ render() {
22
+ let t = !0, e = typeof this.$slots.default == "function" ? this.$slots.default() : this.$slots.default;
23
+ return e != null && e.length === 1 && e[0].type === f && (e = e[0].children), y(
24
+ "div",
25
+ { class: "field-body" },
26
+ {
27
+ default: () => e != null && e.map((s) => {
28
+ if (s.type === F || s.type === k)
29
+ return s;
30
+ let o;
31
+ return t && (o = this.message, t = !1), y(
32
+ this.parent ? this.parent.$.type : C("c-field"),
33
+ {
34
+ type: this.type,
35
+ message: o
36
+ },
37
+ () => s
38
+ );
39
+ })
40
+ }
41
+ );
42
+ }
43
+ }, L = {
44
+ name: "CField",
45
+ components: {
46
+ CFieldBody: T
47
+ },
48
+ provide() {
49
+ return {
50
+ CField: this
51
+ };
52
+ },
53
+ props: {
54
+ type: {
55
+ type: [String, Object],
56
+ default: ""
57
+ },
58
+ label: {
59
+ type: String,
60
+ default: ""
61
+ },
62
+ labelFor: {
63
+ type: String,
64
+ default: ""
65
+ },
66
+ message: {
67
+ type: [String, Array, Object],
68
+ default: ""
69
+ },
70
+ grouped: Boolean,
71
+ groupMultiline: Boolean,
72
+ position: {
73
+ type: String,
74
+ default: ""
75
+ },
76
+ expanded: Boolean,
77
+ horizontal: Boolean,
78
+ addons: {
79
+ type: Boolean,
80
+ default: !0
81
+ },
82
+ customClass: {
83
+ type: String,
84
+ default: ""
85
+ },
86
+ labelPosition: {
87
+ type: String,
88
+ default: () => "top"
89
+ // config.defaultFieldLabelPosition,
90
+ }
91
+ },
92
+ data() {
93
+ return {
94
+ newType: this.type,
95
+ newMessage: this.message,
96
+ fieldLabelSize: null,
97
+ numberInputClasses: [],
98
+ _isField: !0
99
+ // Used internally by Input and Select
100
+ };
101
+ },
102
+ computed: {
103
+ rootClasses() {
104
+ return [
105
+ this.newPosition,
106
+ {
107
+ "is-expanded": this.expanded,
108
+ "is-grouped-multiline": this.groupMultiline,
109
+ "is-horizontal": this.horizontal,
110
+ "is-floating-in-label": this.hasLabel && !this.horizontal && this.labelPosition === "inside",
111
+ "is-floating-label": this.hasLabel && !this.horizontal && this.labelPosition === "on-border"
112
+ },
113
+ this.numberInputClasses
114
+ ];
115
+ },
116
+ /**
117
+ * Correct Bulma class for the side of the addon or group.
118
+ *
119
+ * This is not kept like the others (is-small, etc.),
120
+ * because since 'has-addons' is set automatically it
121
+ * doesn't make sense to teach users what addons are exactly.
122
+ */
123
+ newPosition() {
124
+ if (this.position === void 0) return;
125
+ const t = this.position.split("-");
126
+ if (t.length < 1) return;
127
+ const e = this.grouped ? "is-grouped-" : "has-addons-";
128
+ if (this.position) return e + t[1];
129
+ },
130
+ /**
131
+ * Formatted message in case it's an array
132
+ * (each element is separated by <br> tag)
133
+ */
134
+ formattedMessage() {
135
+ if (typeof this.newMessage == "string")
136
+ return this.newMessage;
137
+ const t = [];
138
+ if (Array.isArray(this.newMessage))
139
+ this.newMessage.forEach((e) => {
140
+ if (typeof e == "string")
141
+ t.push(e);
142
+ else
143
+ for (const s in e)
144
+ e[s] && t.push(s);
145
+ });
146
+ else
147
+ for (const e in this.newMessage)
148
+ this.newMessage[e] && t.push(e);
149
+ return t.filter((e) => !!e).join(" <br> ");
150
+ },
151
+ hasLabel() {
152
+ return this.label || this.$slots.label;
153
+ }
154
+ },
155
+ watch: {
156
+ /**
157
+ * Set internal type when prop change.
158
+ */
159
+ type(t) {
160
+ this.newType = t;
161
+ },
162
+ /**
163
+ * Set internal message when prop change.
164
+ */
165
+ message(t) {
166
+ JSON.stringify(t) !== JSON.stringify(this.newMessage) && (this.newMessage = t);
167
+ }
168
+ },
169
+ mounted() {
170
+ this.horizontal && this.$el.querySelectorAll(
171
+ ".input, .select, .button, .textarea, .c-slider"
172
+ ).length > 0 && (this.fieldLabelSize = "is-normal");
173
+ },
174
+ methods: {
175
+ /**
176
+ * Field has addons if there are more than one slot
177
+ * (element / component) in the Field.
178
+ * Or is grouped when prop is set.
179
+ * Is a method to be called when component re-render.
180
+ */
181
+ fieldType() {
182
+ if (this.grouped) return "is-grouped";
183
+ if (this.hasAddons()) return "has-addons";
184
+ },
185
+ getSlotNodes(t) {
186
+ return t.flatMap(
187
+ (e) => M(e) ? this.getSlotNodes(e.children) : [e]
188
+ );
189
+ },
190
+ hasAddons() {
191
+ let t = 0;
192
+ return this.$slots.default && (t = this.getSlotNodes(this.$slots.default()).reduce(
193
+ (e, s) => _(s) ? e + 1 : e,
194
+ 0
195
+ )), t > 1 && this.addons && !this.horizontal;
196
+ },
197
+ // called by a number input if it is a direct child.
198
+ wrapNumberinput({ controlsPosition: t, size: e }) {
199
+ const s = ["has-numberinput"];
200
+ t && s.push(`has-numberinput-${t}`), e && s.push(`has-numberinput-${e}`), this.numberInputClasses = s;
201
+ }
202
+ }
203
+ }, N = ["for"], A = ["for"], j = ["innerHTML"];
204
+ function x(t, e, s, o, n, a) {
205
+ const l = C("CFieldBody");
206
+ return i(), r("div", {
207
+ class: u([[a.rootClasses, a.fieldType()], "field"])
208
+ }, [
209
+ s.horizontal ? (i(), r("div", {
210
+ key: 0,
211
+ class: u([[s.customClass, n.fieldLabelSize], "field-label"])
212
+ }, [
213
+ a.hasLabel ? (i(), r("label", {
214
+ key: 0,
215
+ for: s.labelFor,
216
+ class: u([s.customClass, "label truncate-text"])
217
+ }, [
218
+ t.$slots.label ? d(t.$slots, "label", { key: 0 }) : (i(), r(f, { key: 1 }, [
219
+ m(b(s.label), 1)
220
+ ], 64))
221
+ ], 10, N)) : h("", !0)
222
+ ], 2)) : (i(), r(f, { key: 1 }, [
223
+ a.hasLabel ? (i(), r("label", {
224
+ key: 0,
225
+ for: s.labelFor,
226
+ class: u([s.customClass, "label truncate-text"])
227
+ }, [
228
+ t.$slots.label ? d(t.$slots, "label", { key: 0 }) : (i(), r(f, { key: 1 }, [
229
+ m(b(s.label), 1)
230
+ ], 64))
231
+ ], 10, A)) : h("", !0)
232
+ ], 64)),
233
+ s.horizontal ? (i(), w(l, {
234
+ key: 2,
235
+ message: n.newMessage ? a.formattedMessage : "",
236
+ type: n.newType
237
+ }, {
238
+ default: S(() => [
239
+ d(t.$slots, "default")
240
+ ]),
241
+ _: 3
242
+ }, 8, ["message", "type"])) : d(t.$slots, "default", { key: 3 }),
243
+ n.newMessage && !s.horizontal ? (i(), r("p", {
244
+ key: 4,
245
+ class: u([n.newType, "help"]),
246
+ innerHTML: a.formattedMessage
247
+ }, null, 10, j)) : h("", !0)
248
+ ], 2);
249
+ }
250
+ const O = /* @__PURE__ */ v(L, [["render", x]]), I = /* @__PURE__ */ z({
251
+ __name: "CFormField",
252
+ props: {
253
+ label: {},
254
+ validator: {},
255
+ messages: {}
256
+ },
257
+ setup(t) {
258
+ const e = t, s = p(() => {
259
+ var a, l;
260
+ if ((a = e.validator) != null && a.$error)
261
+ return "is-danger";
262
+ if ((l = e.validator) != null && l.$dirty)
263
+ return "is-success";
264
+ }), o = p(() => {
265
+ var a, l;
266
+ if ((a = e.validator) != null && a.$error)
267
+ return "text-red-500";
268
+ if ((l = e.validator) != null && l.$dirty)
269
+ return "text-green-500";
270
+ }), n = p(() => {
271
+ var c, g;
272
+ if (!((c = e.validator) != null && c.$errors.length)) return "";
273
+ const l = e.validator.$errors[0].$validator;
274
+ return ((g = e.messages) == null ? void 0 : g[l]) ?? "";
275
+ });
276
+ return (a, l) => (i(), w($(O), B({ ...a.$attrs, ...a.$props }, {
277
+ label: a.label,
278
+ "custom-class": o.value,
279
+ type: s.value,
280
+ message: n.value
281
+ }), {
282
+ default: S(() => [
283
+ d(a.$slots, "default")
284
+ ]),
285
+ _: 3
286
+ }, 16, ["label", "custom-class", "type", "message"]));
287
+ }
288
+ });
289
+ export {
290
+ O as C,
291
+ I as _
292
+ };
@@ -1,5 +1,5 @@
1
- import { A as e, B as o, n } from "./main-BL_yzf2r.js";
2
- const r = {
1
+ import { af as o, _ as n, S as r, s as a, v as s } from "./main-DI0diChK.js";
2
+ const h = {
3
3
  name: "CPhoneFormat",
4
4
  props: {
5
5
  phone: {
@@ -32,31 +32,23 @@ const r = {
32
32
  this.formattedPhone = "";
33
33
  return;
34
34
  }
35
- const t = await e(this.phone, {
35
+ const e = await o(this.phone, {
36
36
  defaultRegion: this.region
37
37
  });
38
- if (!t) {
38
+ if (!e) {
39
39
  this.formattedPhone = this.phone;
40
40
  return;
41
41
  }
42
- this.formattedPhone = t.national;
42
+ this.formattedPhone = e.national;
43
43
  }
44
- },
45
- render() {
46
- return this.$scopedSlots.default ? this.$scopedSlots.default({
47
- formattedValue: this.formattedPhone
48
- }) : o("span", [this.formattedPhone]);
49
44
  }
50
- }, a = null, s = null;
51
- var h = /* @__PURE__ */ n(
52
- r,
53
- a,
54
- s,
55
- !1,
56
- null,
57
- null
58
- );
59
- const d = h.exports;
45
+ };
46
+ function i(e, d, f, m, t, p) {
47
+ return r(e.$slots, "default", { formattedValue: t.formattedPhone }, () => [
48
+ a("span", null, s(t.formattedPhone), 1)
49
+ ]);
50
+ }
51
+ const u = /* @__PURE__ */ n(h, [["render", i]]);
60
52
  export {
61
- d as C
53
+ u as C
62
54
  };
@@ -0,0 +1,207 @@
1
+ import { _ as w, Y as B, Z as S, o as m, c as y, w as i, s as V, d as o, B as z, v as p, b as F, k as $, F as k, $ as I, e as s } from "./main-DI0diChK.js";
2
+ import { C as D, a as v } from "./CDropdownItem-BUNVCpSR.js";
3
+ import { C as j } from "./CFormField.vue_vue_type_script_setup_true_lang-Bo2J0c4G.js";
4
+ import { F as K } from "./Flag-C4_G5IY1.js";
5
+ import { S as L } from "./SmartList-B3pgsg4S.js";
6
+ import { r as n } from "./regions-BdZt9Srn.js";
7
+ const N = {
8
+ name: "CPhoneInput",
9
+ components: {
10
+ Flag: K,
11
+ CInput: B,
12
+ CDropdown: D,
13
+ CDropdownItem: v,
14
+ CButton: S,
15
+ CField: j,
16
+ SmartList: L
17
+ },
18
+ props: {
19
+ modelValue: {
20
+ type: [String, Number],
21
+ default: ""
22
+ },
23
+ region: {
24
+ type: String,
25
+ default: ""
26
+ },
27
+ // Region to fallback to if prefix is not found in modelValue
28
+ defaultRegion: {
29
+ type: String,
30
+ required: !0
31
+ },
32
+ label: {
33
+ type: String,
34
+ default: ""
35
+ },
36
+ labelPosition: {
37
+ type: String,
38
+ default: ""
39
+ }
40
+ },
41
+ emits: ["update:modelValue", "update:region"],
42
+ data() {
43
+ return {
44
+ internalPrefix: null,
45
+ // Used to remember prefix when value is changed to empty
46
+ searchQuery: ""
47
+ };
48
+ },
49
+ computed: {
50
+ defaultPrefix() {
51
+ return n[this.internalRegion].callingCode;
52
+ },
53
+ currentRegion() {
54
+ return this.getRegionByCallingCode(this.prefix);
55
+ },
56
+ internalRegion: {
57
+ get() {
58
+ if (this.region) return this.region;
59
+ if (this.modelValue) {
60
+ const e = (Object.keys(n) || []).find(
61
+ (t) => n[t].callingCode && this.modelValue && this.modelValue.startsWith(n[t].callingCode)
62
+ );
63
+ if (e) return e;
64
+ }
65
+ return this.internalPrefix ? this.getRegionByCallingCode(this.internalPrefix) : this.defaultRegion;
66
+ },
67
+ set(e) {
68
+ this.$emit("update:region", e), this.updateValue({ prefix: n[e].callingCode });
69
+ }
70
+ },
71
+ prefix() {
72
+ if (!this.modelValue) return this.internalPrefix || this.defaultPrefix;
73
+ const e = (Object.keys(n) || []).find(
74
+ (t) => n[t].callingCode && this.modelValue && this.modelValue.startsWith(n[t].callingCode)
75
+ );
76
+ return e ? n[e].callingCode : this.defaultPrefix;
77
+ },
78
+ phone: {
79
+ get() {
80
+ return this.prefix && this.modelValue && this.modelValue.startsWith(this.prefix) ? this.modelValue.substring(this.prefix.length) : this.modelValue;
81
+ },
82
+ set(e) {
83
+ this.updateValue({ phone: e });
84
+ }
85
+ },
86
+ sortedRegions() {
87
+ return (Object.keys(n) || []).map((e) => ({
88
+ key: e,
89
+ title: `${n[e].name} (${e})`,
90
+ callingCode: n[e].callingCode
91
+ })).sort((e, t) => e.title.localeCompare(t.title));
92
+ }
93
+ },
94
+ methods: {
95
+ getRegionByCallingCode(e) {
96
+ return e ? (Object.keys(n) || []).find(
97
+ (l) => e === n[l].callingCode
98
+ ) : null;
99
+ },
100
+ updateValue({ prefix: e, phone: t }) {
101
+ const l = e !== void 0 ? e : this.prefix || "", h = t !== void 0 ? t : this.phone || "", d = `${l}${h}`;
102
+ d !== l ? (this.$emit("update:modelValue", d), this.region || this.$emit("update:region", this.internalRegion), this.internalPrefix = null) : (this.internalPrefix = l, this.$emit("update:modelValue", ""));
103
+ }
104
+ }
105
+ }, O = { class: "control" }, Q = { class: "truncate-text" };
106
+ function W(e, t, l, h, d, r) {
107
+ const g = s("Flag"), x = s("CButton"), c = s("CInput"), b = s("CDropdownItem"), _ = s("CDropdown"), P = s("SmartList"), f = s("CField");
108
+ return m(), y(f, {
109
+ class: "has-addons",
110
+ expanded: ""
111
+ }, {
112
+ default: i(() => [
113
+ V("div", O, [
114
+ o(P, {
115
+ query: d.searchQuery,
116
+ items: r.sortedRegions
117
+ }, {
118
+ default: i(({ items: u }) => [
119
+ o(_, {
120
+ modelValue: r.internalRegion,
121
+ "onUpdate:modelValue": t[1] || (t[1] = (a) => r.internalRegion = a),
122
+ size: e.$attrs.size,
123
+ disabled: e.$attrs.disabled,
124
+ "menu-styling": {
125
+ maxWidth: "300px"
126
+ },
127
+ scrollable: !0,
128
+ position: "is-bottom-right",
129
+ "max-height": "240px",
130
+ class: "control",
131
+ style: { height: "100%" }
132
+ }, {
133
+ trigger: i(() => [
134
+ o(x, {
135
+ size: e.$attrs.size,
136
+ type: "none",
137
+ pattern: "secondary",
138
+ style: { height: "100%" }
139
+ }, {
140
+ default: i(() => [
141
+ o(g, {
142
+ region: r.internalRegion,
143
+ style: { "margin-right": "0.35em" }
144
+ }, null, 8, ["region"]),
145
+ z(" " + p(r.prefix), 1)
146
+ ]),
147
+ _: 1
148
+ }, 8, ["size"])
149
+ ]),
150
+ header: i(() => [
151
+ o(c, {
152
+ modelValue: d.searchQuery,
153
+ "onUpdate:modelValue": t[0] || (t[0] = (a) => d.searchQuery = a),
154
+ placeholder: e.$t("_common:search"),
155
+ filled: "",
156
+ style: { "margin-bottom": "0.25em" },
157
+ "custom-class": "!rounded-[7px]"
158
+ }, null, 8, ["modelValue", "placeholder"])
159
+ ]),
160
+ default: i(() => [
161
+ (m(!0), F(k, null, $(u, ({ key: a, title: C, callingCode: R }) => (m(), y(b, {
162
+ key: a,
163
+ value: a,
164
+ class: "truncate-text"
165
+ }, {
166
+ default: i(() => [
167
+ o(g, {
168
+ region: a,
169
+ title: C,
170
+ style: { "margin-right": "0.75em", flex: "0 0 auto" }
171
+ }, null, 8, ["region", "title"]),
172
+ V("span", Q, p(C) + " (" + p(R) + ") ", 1)
173
+ ]),
174
+ _: 2
175
+ }, 1032, ["value"]))), 128))
176
+ ]),
177
+ _: 2
178
+ }, 1032, ["modelValue", "size", "disabled"])
179
+ ]),
180
+ _: 1
181
+ }, 8, ["query", "items"])
182
+ ]),
183
+ o(f, {
184
+ label: l.label,
185
+ "label-position": l.labelPosition,
186
+ class: "control",
187
+ expanded: ""
188
+ }, {
189
+ default: i(() => [
190
+ o(c, I({ ...e.$attrs, ...e.$props }, {
191
+ modelValue: r.phone,
192
+ "onUpdate:modelValue": t[2] || (t[2] = (u) => r.phone = u),
193
+ size: e.$attrs.size,
194
+ placeholder: e.$attrs.placeholder,
195
+ type: "tel"
196
+ }), null, 16, ["modelValue", "size", "placeholder"])
197
+ ]),
198
+ _: 1
199
+ }, 8, ["label", "label-position"])
200
+ ]),
201
+ _: 1
202
+ });
203
+ }
204
+ const A = /* @__PURE__ */ w(N, [["render", W]]);
205
+ export {
206
+ A as C
207
+ };
@@ -0,0 +1,142 @@
1
+ import { C as h } from "./CCurrencyDropdown-B4GNmOGA.js";
2
+ import { _ as C, Y as V, a5 as g, e as o, o as s, c as l, w as i, b as u, S as p, f as w, d as I, B as k, v as d, $ as _ } from "./main-DI0diChK.js";
3
+ const $ = {
4
+ name: "CPriceInput",
5
+ inheritAttrs: !1,
6
+ components: {
7
+ CInput: V,
8
+ CCurrencyDropdown: h
9
+ },
10
+ props: {
11
+ modelValue: {
12
+ type: Number,
13
+ default: 0
14
+ },
15
+ currency: {
16
+ type: String,
17
+ required: !0
18
+ },
19
+ priceType: {
20
+ type: String,
21
+ default: "fixed",
22
+ validator: (e) => ["fixed", "markup", "openAcc", "approx"].includes(e)
23
+ },
24
+ unitLabel: {
25
+ type: String,
26
+ default: ""
27
+ },
28
+ isIncVat: {
29
+ type: Boolean,
30
+ default: !1
31
+ },
32
+ // Vat in percentage
33
+ vat: {
34
+ type: Number,
35
+ default: null
36
+ }
37
+ },
38
+ emits: ["update:modelValue", "update:currency"],
39
+ data() {
40
+ return {
41
+ isCurrencyDropdownOpen: !1
42
+ };
43
+ },
44
+ computed: {
45
+ internalValue: {
46
+ get() {
47
+ if (!Number.isNaN(parseFloat(this.modelValue)) && Number.isFinite(this.modelValue)) {
48
+ if (!this.modelValue) return "";
49
+ let e = this.modelValue;
50
+ return this.isIncVat && (e *= (100 + this.vat) / 100), Math.round(e) / 100;
51
+ }
52
+ return this.modelValue;
53
+ },
54
+ set(e) {
55
+ let t = e;
56
+ t = e * 100, this.isIncVat && (t /= (100 + this.vat) / 100), t = Math.round(t), this.$emit("update:modelValue", t);
57
+ }
58
+ },
59
+ internalCurrency: {
60
+ get() {
61
+ return this.currency;
62
+ },
63
+ set(e) {
64
+ this.$emit("update:currency", e);
65
+ }
66
+ },
67
+ suffixValue() {
68
+ const e = g(this.internalCurrency);
69
+ switch (this.priceType) {
70
+ // case 'approx':
71
+ // return `${this.$t('_common:approx')} ${currencyString}`;
72
+ case "openAcc":
73
+ return `${e}/${this.unitLabel || this.$t("_common:unitType.unit")}`;
74
+ case "markup":
75
+ return "%";
76
+ default:
77
+ return e;
78
+ }
79
+ },
80
+ showCurrencyDropdown() {
81
+ return !["markup"].includes(this.priceType);
82
+ }
83
+ },
84
+ methods: {
85
+ focus() {
86
+ this.$refs.priceInput && typeof this.$refs.priceInput.focus == "function" && this.$refs.priceInput.focus();
87
+ }
88
+ }
89
+ }, b = { key: 0 }, v = { key: 0 }, D = { key: 1 }, N = { key: 1 };
90
+ function x(e, t, c, z, a, r) {
91
+ const f = o("CButton"), m = o("CCurrencyDropdown"), y = o("CInput");
92
+ return s(), l(y, _({ ...e.$attrs, ...e.$props }, {
93
+ ref: "priceInput",
94
+ key: r.internalCurrency + c.priceType,
95
+ modelValue: r.internalValue,
96
+ "onUpdate:modelValue": t[2] || (t[2] = (n) => r.internalValue = n),
97
+ modelModifiers: { lazy: !0 },
98
+ size: e.$attrs.size,
99
+ placeholder: e.$attrs.placeholder,
100
+ style: a.isCurrencyDropdownOpen && { zIndex: 99 },
101
+ type: "number"
102
+ }), {
103
+ prefix: i(() => [
104
+ e.$slots.prefix ? (s(), u("div", b, [
105
+ p(e.$slots, "prefix")
106
+ ])) : w("", !0)
107
+ ]),
108
+ suffix: i(() => [
109
+ e.$slots.suffix ? (s(), u("div", v, [
110
+ p(e.$slots, "suffix")
111
+ ])) : (s(), u("div", D, [
112
+ r.showCurrencyDropdown ? (s(), l(m, {
113
+ key: 0,
114
+ modelValue: r.internalCurrency,
115
+ "onUpdate:modelValue": t[0] || (t[0] = (n) => r.internalCurrency = n),
116
+ onActiveChange: t[1] || (t[1] = (n) => a.isCurrencyDropdownOpen = n)
117
+ }, {
118
+ default: i(({ selectedValue: n }) => [
119
+ I(f, {
120
+ size: e.$attrs.size,
121
+ type: "none",
122
+ pattern: "tertiary",
123
+ class: "is-thinner",
124
+ style: { "padding-left": "0.5em", "padding-right": "0.5em", "border-radius": "0.25em" }
125
+ }, {
126
+ default: i(() => [
127
+ k(d(n), 1)
128
+ ]),
129
+ _: 2
130
+ }, 1032, ["size"])
131
+ ]),
132
+ _: 1
133
+ }, 8, ["modelValue"])) : (s(), u("div", N, d(r.suffixValue), 1))
134
+ ]))
135
+ ]),
136
+ _: 3
137
+ }, 16, ["modelValue", "size", "placeholder", "style"]);
138
+ }
139
+ const T = /* @__PURE__ */ C($, [["render", x]]);
140
+ export {
141
+ T as C
142
+ };