@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.
- package/.eslintrc.cjs +4 -4
- package/README.md +40 -40
- package/package.json +1 -1
- package/tsconfig.json +26 -26
- package/tsconfig.node.json +10 -10
- package/tsconfig.paths.json +17 -17
- package/vite.config.ts +61 -61
- package/dist/AddClientCallout-DKH-LP5B.js +0 -46
- package/dist/AnswerModal-BCbq8wc4.js +0 -3869
- package/dist/AttachmentItem-60CSZnkF.js +0 -78
- package/dist/BaseDatePicker-Cl8SnC1k.js +0 -3183
- package/dist/BaseUpload-D4FCjlhL.js +0 -1977
- package/dist/BlockMedia-CqkwdGnE.js +0 -76
- package/dist/CCallout-BTBgU8f-.js +0 -59
- package/dist/CCurrencyDropdown-CL32Mo-Y.js +0 -246
- package/dist/CDropdownItem-DlWtQwO6.js +0 -538
- package/dist/CField.vue_vue_type_style_index_0_lang-l0sNRNKZ.js +0 -1
- package/dist/CFormField-BxJv-nUO.js +0 -241
- package/dist/CPhoneFormat-CJ9kndtJ.js +0 -62
- package/dist/CPriceInput-BpXI5X2j.js +0 -112
- package/dist/CTabs.vue_vue_type_style_index_0_scoped_e02a6440_lang-l0sNRNKZ.js +0 -1
- package/dist/ClientAutocomplete-D9Dj9iBW.js +0 -78
- package/dist/ClientModal-JOt8NGcR.js +0 -625
- package/dist/ColorPicker-uPKD-Gvm.js +0 -2879
- package/dist/CompanyModal-7bG0iIRd.js +0 -141
- package/dist/ContentWrapper-B2nyZHL4.js +0 -183
- package/dist/CoverBlockSettings-C1O_FAde.js +0 -275
- package/dist/DocAnswer-B9G-y4Px.js +0 -36
- package/dist/DocDetails-DYHxKChO.js +0 -246
- package/dist/DocForm-BktEXjML.js +0 -7273
- package/dist/DocFormSend-DM6QgUOj.js +0 -143
- package/dist/DocLinks-BIGwfB3H.js +0 -38
- package/dist/DocModalBase-D5GdwTI7.js +0 -28
- package/dist/DocPrint-HqbaIGms.js +0 -240
- package/dist/DocReceipt-WXo6vWyW.js +0 -210
- package/dist/DocSendReminder-C8dNEpLg.js +0 -137
- package/dist/DocTextEditor-BfOZFDTP.js +0 -17177
- package/dist/DocTimeline-CitwS9px.js +0 -481
- package/dist/DocumentClient-CQ_z8ajY.js +0 -136
- package/dist/DocumentLayout-BA7mFfZh.js +0 -4909
- package/dist/DocumentLogotype-woc_hfll.js +0 -87
- package/dist/DocumentVoided-DC4FzpxG.js +0 -25
- package/dist/EmbedInput-CheqYcNr.js +0 -113
- package/dist/EmbedSettings-YcwM8hJw.js +0 -72
- package/dist/ErrorCallout-6pCYcx00.js +0 -28
- package/dist/FilePreviewModal-T8AiphqO.js +0 -81
- package/dist/Flag-Ddm6a4Il.js +0 -114
- package/dist/HeaderSettings-DHdZweJH.js +0 -392
- package/dist/ImageSelectModal-CAoBhnI8.js +0 -84
- package/dist/ImageUploadWrapper-CNv59Lhh.js +0 -1604
- package/dist/Index-B6S9U4Z-.js +0 -26
- package/dist/Index-BHX0D5fW.js +0 -559
- package/dist/Index-BL_7m5Ca.js +0 -70
- package/dist/Index-BXMXEUfo.js +0 -223
- package/dist/Index-BhVBvMu6.js +0 -32
- package/dist/Index-Bl_SNW80.js +0 -25
- package/dist/Index-BsguntKl.js +0 -21
- package/dist/Index-CGYjPfsf.js +0 -2402
- package/dist/Index-CKrGb3of.js +0 -61
- package/dist/Index-CMNrQo5a.js +0 -140
- package/dist/Index-CU50Al5c.js +0 -642
- package/dist/Index-CdqrrZxd.js +0 -77
- package/dist/Index-CfnL9dAw.js +0 -58
- package/dist/Index-CuW0MYrT.js +0 -171
- package/dist/Index-D-z8JSn6.js +0 -154
- package/dist/Index-D8giJ_bs.js +0 -84
- package/dist/Index-DDvfqy_h.js +0 -24
- package/dist/Index-DQDalqZ-.js +0 -107
- package/dist/Index-DTIPKKkV.js +0 -150
- package/dist/Index-DWxzUBff.js +0 -754
- package/dist/Index-DaNGeDQw.js +0 -144
- package/dist/Index-DfLU_AyN.js +0 -49
- package/dist/Index-DkVav_I7.js +0 -25
- package/dist/Index-Dxp8QAtB.js +0 -57
- package/dist/Index-DzjxFkcv.js +0 -52
- package/dist/Index-EwUJJWaB.js +0 -69
- package/dist/Index-I60qAqLl.js +0 -31
- package/dist/Index-LfF-7lQK.js +0 -292
- package/dist/Index-P0_dyc2V.js +0 -45
- package/dist/Index-RQMPSeHw.js +0 -98
- package/dist/Index-oipNLl3Y.js +0 -46
- package/dist/Index-sJq2Iyvt.js +0 -62
- package/dist/Index-uubi3NHX.js +0 -33
- package/dist/Index-vNj2kYZT.js +0 -55
- package/dist/InputToggleRow-B2pWvVyx.js +0 -57
- package/dist/ManualPopover-BI_Sf1zG.js +0 -54
- package/dist/MediaWrapper-eFpWxv3n.js +0 -23
- package/dist/NotBindingText-DA5NpePz.js +0 -32
- package/dist/PackageGroup-DOSijBdN.js +0 -699
- package/dist/PdfTerms-Q5YuVtrJ.js +0 -36
- package/dist/PdfViewer-zcWl8XZT.js +0 -374
- package/dist/PlainHtml-BmA83UAm.js +0 -20
- package/dist/PriceHeader-C14L5zgG.js +0 -339
- package/dist/SearchApi-CGT7-jVf.js +0 -161
- package/dist/Setup-RJQvZlDO.js +0 -50
- package/dist/SmartList-YosKRPVn.js +0 -83
- package/dist/TermsSettings-C5JTv7rT.js +0 -102
- package/dist/ThemeColorRow-D-C_tm2f.js +0 -63
- package/dist/ToggleBinding-KEVHHvKf.js +0 -38
- package/dist/UploadModal-DOYoWELI.js +0 -95
- package/dist/VideoPlayerInput-Dxb6CNk-.js +0 -93
- package/dist/VideoPlayerSettings-DsVN4Ix-.js +0 -61
- package/dist/VideoSelectModal-BpfzNx61.js +0 -100
- package/dist/anime.es-BrPTThYb.js +0 -858
- package/dist/answerDocumentMixin-BJMGrfUs.js +0 -51
- package/dist/color-TdtKxwVa.js +0 -19
- package/dist/debounce-BN83gOVd.js +0 -84
- package/dist/dom-CJxkno7i.js +0 -91
- package/dist/favicon.ico +0 -0
- package/dist/focusDrawerMixin-CawyQaGq.js +0 -22
- package/dist/formComponentsInstall-jcnyQ1zw.js +0 -2494
- package/dist/formDrawerState-BdNohvZH.js +0 -20
- package/dist/formValidationMixin-DOwgebZk.js +0 -49
- package/dist/i18nMessages-Chz_lxGG.js +0 -17
- package/dist/index-BBJIOkm_.js +0 -347
- package/dist/index-BNq9YCWc.js +0 -166
- package/dist/index-BdhbkLLU.js +0 -81
- package/dist/index-COf8F6CL.js +0 -3916
- package/dist/index-D0WvZHX_.js +0 -102
- package/dist/index-DTzZP4yq.js +0 -492
- package/dist/index.es.js +0 -35
- package/dist/index.umd.js +0 -3148
- package/dist/main-DE5THsiR.js +0 -56739
- package/dist/mapFormMixin-y2txvLw9.js +0 -72
- package/dist/omit-BrsWQAtU.js +0 -31
- package/dist/publicSenderState-BYsq95Vt.js +0 -21
- package/dist/splitpanes-BHUVsCZF.js +0 -382
- package/dist/style.css +0 -4
- package/dist/throttle-C2srA2wa.js +0 -18
- package/dist/tinycolor-SjV_ROuP.js +0 -633
- package/dist/tippy.esm-Dj7DQppr.js +0 -1799
- package/dist/utils-16HMuRfY.js +0 -108
- package/dist/vuedraggable.umd-Cd1g2Hr7.js +0 -3161
- package/dist/vuex.esm-DKGl8mcw.js +0 -467
|
@@ -1,241 +0,0 @@
|
|
|
1
|
-
import { n as i, Q as l } from "./main-DE5THsiR.js";
|
|
2
|
-
import "./CField.vue_vue_type_style_index_0_lang-l0sNRNKZ.js";
|
|
3
|
-
const n = {
|
|
4
|
-
name: "CFieldBody",
|
|
5
|
-
props: {
|
|
6
|
-
message: {
|
|
7
|
-
type: String,
|
|
8
|
-
default: ""
|
|
9
|
-
},
|
|
10
|
-
type: {
|
|
11
|
-
type: [String, Object],
|
|
12
|
-
default: ""
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
render(s) {
|
|
16
|
-
return s(
|
|
17
|
-
"div",
|
|
18
|
-
{ attrs: { class: "field-body" } },
|
|
19
|
-
this.$slots.default.map((e) => e.tag ? this.message ? s(
|
|
20
|
-
"c-field",
|
|
21
|
-
{ attrs: { message: this.message, type: this.type } },
|
|
22
|
-
[e]
|
|
23
|
-
) : s("c-field", { attrs: { type: this.type } }, [
|
|
24
|
-
e
|
|
25
|
-
]) : e)
|
|
26
|
-
);
|
|
27
|
-
}
|
|
28
|
-
}, r = null, o = null;
|
|
29
|
-
var u = /* @__PURE__ */ i(
|
|
30
|
-
n,
|
|
31
|
-
r,
|
|
32
|
-
o,
|
|
33
|
-
!1,
|
|
34
|
-
null,
|
|
35
|
-
null
|
|
36
|
-
);
|
|
37
|
-
const d = u.exports, p = {
|
|
38
|
-
name: "CField",
|
|
39
|
-
components: {
|
|
40
|
-
CFieldBody: d
|
|
41
|
-
},
|
|
42
|
-
props: {
|
|
43
|
-
type: {
|
|
44
|
-
type: [String, Object],
|
|
45
|
-
default: ""
|
|
46
|
-
},
|
|
47
|
-
label: {
|
|
48
|
-
type: String,
|
|
49
|
-
default: ""
|
|
50
|
-
},
|
|
51
|
-
labelFor: {
|
|
52
|
-
type: String,
|
|
53
|
-
default: ""
|
|
54
|
-
},
|
|
55
|
-
message: {
|
|
56
|
-
type: [String, Array, Object],
|
|
57
|
-
default: ""
|
|
58
|
-
},
|
|
59
|
-
grouped: Boolean,
|
|
60
|
-
groupMultiline: Boolean,
|
|
61
|
-
position: {
|
|
62
|
-
type: String,
|
|
63
|
-
default: ""
|
|
64
|
-
},
|
|
65
|
-
expanded: Boolean,
|
|
66
|
-
horizontal: Boolean,
|
|
67
|
-
addons: {
|
|
68
|
-
type: Boolean,
|
|
69
|
-
default: !0
|
|
70
|
-
},
|
|
71
|
-
customClass: {
|
|
72
|
-
type: String,
|
|
73
|
-
default: ""
|
|
74
|
-
},
|
|
75
|
-
labelPosition: {
|
|
76
|
-
type: String,
|
|
77
|
-
default: () => "top"
|
|
78
|
-
// config.defaultFieldLabelPosition,
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
data() {
|
|
82
|
-
return {
|
|
83
|
-
newType: this.type,
|
|
84
|
-
newMessage: this.message,
|
|
85
|
-
fieldLabelSize: null,
|
|
86
|
-
_isField: !0
|
|
87
|
-
// Used internally by Input and Select
|
|
88
|
-
};
|
|
89
|
-
},
|
|
90
|
-
computed: {
|
|
91
|
-
rootClasses() {
|
|
92
|
-
return [
|
|
93
|
-
this.newPosition,
|
|
94
|
-
{
|
|
95
|
-
"is-expanded": this.expanded,
|
|
96
|
-
"is-grouped-multiline": this.groupMultiline,
|
|
97
|
-
"is-horizontal": this.horizontal,
|
|
98
|
-
"is-floating-in-label": this.hasLabel && !this.horizontal && this.labelPosition === "inside",
|
|
99
|
-
"is-floating-label": this.hasLabel && !this.horizontal && this.labelPosition === "on-border"
|
|
100
|
-
},
|
|
101
|
-
this.numberInputClasses
|
|
102
|
-
];
|
|
103
|
-
},
|
|
104
|
-
/**
|
|
105
|
-
* Correct Bulma class for the side of the addon or group.
|
|
106
|
-
*
|
|
107
|
-
* This is not kept like the others (is-small, etc.),
|
|
108
|
-
* because since 'has-addons' is set automatically it
|
|
109
|
-
* doesn't make sense to teach users what addons are exactly.
|
|
110
|
-
*/
|
|
111
|
-
// eslint-disable-next-line vue/return-in-computed-property
|
|
112
|
-
newPosition() {
|
|
113
|
-
if (this.position === void 0)
|
|
114
|
-
return;
|
|
115
|
-
const s = this.position.split("-");
|
|
116
|
-
if (s.length < 1)
|
|
117
|
-
return;
|
|
118
|
-
const e = this.grouped ? "is-grouped-" : "has-addons-";
|
|
119
|
-
if (this.position)
|
|
120
|
-
return e + s[1];
|
|
121
|
-
},
|
|
122
|
-
/**
|
|
123
|
-
* Formatted message in case it's an array
|
|
124
|
-
* (each element is separated by <br> tag)
|
|
125
|
-
*/
|
|
126
|
-
formattedMessage() {
|
|
127
|
-
if (typeof this.newMessage == "string")
|
|
128
|
-
return this.newMessage;
|
|
129
|
-
const s = [];
|
|
130
|
-
if (Array.isArray(this.newMessage))
|
|
131
|
-
this.newMessage.forEach((e) => {
|
|
132
|
-
if (typeof e == "string")
|
|
133
|
-
s.push(e);
|
|
134
|
-
else
|
|
135
|
-
for (const t in e)
|
|
136
|
-
e[t] && s.push(t);
|
|
137
|
-
});
|
|
138
|
-
else
|
|
139
|
-
for (const e in this.newMessage)
|
|
140
|
-
this.newMessage[e] && s.push(e);
|
|
141
|
-
return s.filter((e) => {
|
|
142
|
-
if (e)
|
|
143
|
-
return e;
|
|
144
|
-
}).join(" <br> ");
|
|
145
|
-
},
|
|
146
|
-
hasLabel() {
|
|
147
|
-
return this.label || this.$slots.label;
|
|
148
|
-
},
|
|
149
|
-
numberInputClasses() {
|
|
150
|
-
if (this.$slots.default) {
|
|
151
|
-
const s = this.$slots.default.filter(
|
|
152
|
-
(e) => e.tag && e.tag.toLowerCase().indexOf("numberinput") >= 0
|
|
153
|
-
)[0];
|
|
154
|
-
if (s) {
|
|
155
|
-
const e = ["has-numberinput"], t = s.componentOptions.propsData.controlsPosition, a = s.componentOptions.propsData.size;
|
|
156
|
-
return t && e.push(`has-numberinput-${t}`), a && e.push(`has-numberinput-${a}`), e;
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
return null;
|
|
160
|
-
}
|
|
161
|
-
},
|
|
162
|
-
watch: {
|
|
163
|
-
/**
|
|
164
|
-
* Set internal type when prop change.
|
|
165
|
-
*/
|
|
166
|
-
type(s) {
|
|
167
|
-
this.newType = s;
|
|
168
|
-
},
|
|
169
|
-
/**
|
|
170
|
-
* Set internal message when prop change.
|
|
171
|
-
*/
|
|
172
|
-
message(s) {
|
|
173
|
-
this.newMessage = s;
|
|
174
|
-
}
|
|
175
|
-
},
|
|
176
|
-
mounted() {
|
|
177
|
-
this.horizontal && this.$el.querySelectorAll(
|
|
178
|
-
".input, .select, .button, .textarea, .c-slider"
|
|
179
|
-
).length > 0 && (this.fieldLabelSize = "is-normal");
|
|
180
|
-
},
|
|
181
|
-
methods: {
|
|
182
|
-
/**
|
|
183
|
-
* Field has addons if there are more than one slot
|
|
184
|
-
* (element / component) in the Field.
|
|
185
|
-
* Or is grouped when prop is set.
|
|
186
|
-
* Is a method to be called when component re-render.
|
|
187
|
-
*/
|
|
188
|
-
fieldType() {
|
|
189
|
-
if (this.grouped)
|
|
190
|
-
return "is-grouped";
|
|
191
|
-
let s = 0;
|
|
192
|
-
if (this.$slots.default && (s = this.$slots.default.reduce(
|
|
193
|
-
(e, t) => t.tag ? e + 1 : e,
|
|
194
|
-
0
|
|
195
|
-
)), s > 1 && this.addons && !this.horizontal)
|
|
196
|
-
return "has-addons";
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
};
|
|
200
|
-
var f = function() {
|
|
201
|
-
var e = this, t = e._self._c;
|
|
202
|
-
return t("div", { staticClass: "field", class: [e.rootClasses, e.fieldType()] }, [e.horizontal ? t("div", { staticClass: "field-label", class: [e.customClass, e.fieldLabelSize] }, [e.hasLabel ? t("label", { staticClass: "label truncate-text", class: e.customClass, attrs: { for: e.labelFor } }, [e.$slots.label ? e._t("label") : [e._v(e._s(e.label))]], 2) : e._e()]) : [e.hasLabel ? t("label", { staticClass: "label truncate-text", class: e.customClass, attrs: { for: e.labelFor } }, [e.$slots.label ? e._t("label") : [e._v(e._s(e.label))]], 2) : e._e()], e.horizontal ? t("CFieldBody", { attrs: { message: e.newMessage ? e.formattedMessage : "", type: e.newType } }, [e._t("default")], 2) : [e._t("default")], e.newMessage && !e.horizontal ? t("p", { staticClass: "help", class: e.newType, domProps: { innerHTML: e._s(e.formattedMessage) } }) : e._e()], 2);
|
|
203
|
-
}, c = [], h = /* @__PURE__ */ i(
|
|
204
|
-
p,
|
|
205
|
-
f,
|
|
206
|
-
c,
|
|
207
|
-
!1,
|
|
208
|
-
null,
|
|
209
|
-
null
|
|
210
|
-
);
|
|
211
|
-
const _ = h.exports, g = {
|
|
212
|
-
name: "CFormField",
|
|
213
|
-
components: {
|
|
214
|
-
CField: _
|
|
215
|
-
},
|
|
216
|
-
extends: l,
|
|
217
|
-
computed: {
|
|
218
|
-
type() {
|
|
219
|
-
return this.hasErrors ? "is-danger" : this.isValid ? "is-success" : null;
|
|
220
|
-
},
|
|
221
|
-
customClass() {
|
|
222
|
-
return this.hasErrors ? "text-red-500" : this.isValid ? "text-green-500" : null;
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
};
|
|
226
|
-
var m = function() {
|
|
227
|
-
var e = this, t = e._self._c;
|
|
228
|
-
return t("CField", e._b({ attrs: { label: e.label, "custom-class": e.customClass, type: e.type, message: e.firstErrorMessage } }, "CField", { ...e.$attrs, ...e.$props }, !1), [e._t("default")], 2);
|
|
229
|
-
}, b = [], y = /* @__PURE__ */ i(
|
|
230
|
-
g,
|
|
231
|
-
m,
|
|
232
|
-
b,
|
|
233
|
-
!1,
|
|
234
|
-
null,
|
|
235
|
-
null
|
|
236
|
-
);
|
|
237
|
-
const w = y.exports;
|
|
238
|
-
export {
|
|
239
|
-
w as C,
|
|
240
|
-
_ as a
|
|
241
|
-
};
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { u as e, v as o, n } from "./main-DE5THsiR.js";
|
|
2
|
-
const r = {
|
|
3
|
-
name: "CPhoneFormat",
|
|
4
|
-
props: {
|
|
5
|
-
phone: {
|
|
6
|
-
type: String,
|
|
7
|
-
required: !1,
|
|
8
|
-
default: ""
|
|
9
|
-
},
|
|
10
|
-
region: {
|
|
11
|
-
type: String,
|
|
12
|
-
required: !1,
|
|
13
|
-
default: null
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
data() {
|
|
17
|
-
return {
|
|
18
|
-
formattedPhone: ""
|
|
19
|
-
};
|
|
20
|
-
},
|
|
21
|
-
watch: {
|
|
22
|
-
phone: {
|
|
23
|
-
immediate: !0,
|
|
24
|
-
async handler() {
|
|
25
|
-
this.doFormatPhone();
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
methods: {
|
|
30
|
-
async doFormatPhone() {
|
|
31
|
-
if (!this.phone) {
|
|
32
|
-
this.formattedPhone = "";
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
const t = await e(this.phone, {
|
|
36
|
-
defaultRegion: this.region
|
|
37
|
-
});
|
|
38
|
-
if (!t) {
|
|
39
|
-
this.formattedPhone = this.phone;
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
this.formattedPhone = t.national;
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
render() {
|
|
46
|
-
return this.$scopedSlots.default ? this.$scopedSlots.default({
|
|
47
|
-
formattedValue: this.formattedPhone
|
|
48
|
-
}) : o("span", [this.formattedPhone]);
|
|
49
|
-
}
|
|
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;
|
|
60
|
-
export {
|
|
61
|
-
d as C
|
|
62
|
-
};
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import { C as s } from "./CCurrencyDropdown-CL32Mo-Y.js";
|
|
2
|
-
import { n as i, q as u, r as a } from "./main-DE5THsiR.js";
|
|
3
|
-
const l = {
|
|
4
|
-
name: "CPriceInput",
|
|
5
|
-
components: {
|
|
6
|
-
CInput: u,
|
|
7
|
-
CCurrencyDropdown: s
|
|
8
|
-
},
|
|
9
|
-
props: {
|
|
10
|
-
value: {
|
|
11
|
-
type: Number,
|
|
12
|
-
default: 0
|
|
13
|
-
},
|
|
14
|
-
currency: {
|
|
15
|
-
type: String,
|
|
16
|
-
required: !0
|
|
17
|
-
},
|
|
18
|
-
priceType: {
|
|
19
|
-
type: String,
|
|
20
|
-
default: "fixed",
|
|
21
|
-
validator: (t) => ["fixed", "markup", "openAcc", "approx"].includes(t)
|
|
22
|
-
},
|
|
23
|
-
unitLabel: {
|
|
24
|
-
type: String,
|
|
25
|
-
default: ""
|
|
26
|
-
},
|
|
27
|
-
isIncVat: {
|
|
28
|
-
type: Boolean,
|
|
29
|
-
default: !1
|
|
30
|
-
},
|
|
31
|
-
// Vat in percentage
|
|
32
|
-
vat: {
|
|
33
|
-
type: Number,
|
|
34
|
-
default: null
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
data() {
|
|
38
|
-
return {
|
|
39
|
-
isCurrencyDropdownOpen: !1
|
|
40
|
-
};
|
|
41
|
-
},
|
|
42
|
-
computed: {
|
|
43
|
-
internalValue: {
|
|
44
|
-
get() {
|
|
45
|
-
if (!Number.isNaN(parseFloat(this.value)) && Number.isFinite(this.value)) {
|
|
46
|
-
if (!this.value && !this.showZero)
|
|
47
|
-
return "";
|
|
48
|
-
let t = this.value;
|
|
49
|
-
return this.isIncVat && (t *= (100 + this.vat) / 100), Math.round(t) / 100;
|
|
50
|
-
}
|
|
51
|
-
return this.value;
|
|
52
|
-
},
|
|
53
|
-
set(t) {
|
|
54
|
-
let e = t;
|
|
55
|
-
e = t * 100, this.isIncVat && (e /= (100 + this.vat) / 100), e = Math.round(e), this.$emit("input", e);
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
internalCurrency: {
|
|
59
|
-
get() {
|
|
60
|
-
return this.currency;
|
|
61
|
-
},
|
|
62
|
-
set(t) {
|
|
63
|
-
this.$emit("update:currency", t);
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
suffixValue() {
|
|
67
|
-
const t = a(this.internalCurrency);
|
|
68
|
-
switch (this.priceType) {
|
|
69
|
-
case "openAcc":
|
|
70
|
-
return `${t}/${this.unitLabel || this.$t("_common:unitType.unit")}`;
|
|
71
|
-
case "markup":
|
|
72
|
-
return "%";
|
|
73
|
-
default:
|
|
74
|
-
return t;
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
showCurrencyDropdown() {
|
|
78
|
-
return !["markup"].includes(this.priceType);
|
|
79
|
-
},
|
|
80
|
-
eventListeners() {
|
|
81
|
-
return { ...this.$listeners, onInput: () => ({}), input: () => ({}) };
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
methods: {
|
|
85
|
-
focus() {
|
|
86
|
-
this.$refs.priceInput && typeof this.$refs.priceInput.focus == "function" && this.$refs.priceInput.focus();
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
};
|
|
90
|
-
var o = function() {
|
|
91
|
-
var e = this, r = e._self._c;
|
|
92
|
-
return r("CInput", e._g(e._b({ key: e.internalCurrency + e.priceType, ref: "priceInput", style: e.isCurrencyDropdownOpen && { zIndex: 99 }, attrs: { size: e.$attrs.size, placeholder: e.$attrs.placeholder, type: "number" }, model: { value: e.internalValue, callback: function(n) {
|
|
93
|
-
e.internalValue = n;
|
|
94
|
-
}, expression: "internalValue" } }, "CInput", { ...e.$attrs, ...e.$props }, !1), e.eventListeners), [e.$slots.prefix ? r("div", { attrs: { slot: "prefix" }, slot: "prefix" }, [e._t("prefix")], 2) : e._e(), e.$slots.suffix ? r("div", { attrs: { slot: "suffix" }, slot: "suffix" }, [e._t("suffix")], 2) : r("template", { slot: "suffix" }, [e.showCurrencyDropdown ? r("CCurrencyDropdown", { on: { "active-change": function(n) {
|
|
95
|
-
e.isCurrencyDropdownOpen = n;
|
|
96
|
-
} }, scopedSlots: e._u([{ key: "default", fn: function({ selectedValue: n }) {
|
|
97
|
-
return [r("CButton", { staticClass: "is-thinner", staticStyle: { "padding-left": "0.5em", "padding-right": "0.5em", "border-radius": "0.25em" }, attrs: { size: e.$attrs.size, type: "none", pattern: "tertiary" } }, [e._v(" " + e._s(n) + " ")])];
|
|
98
|
-
} }], null, !1, 1723986040), model: { value: e.internalCurrency, callback: function(n) {
|
|
99
|
-
e.internalCurrency = n;
|
|
100
|
-
}, expression: "internalCurrency" } }) : r("div", [e._v(e._s(e.suffixValue))])], 1)], 2);
|
|
101
|
-
}, p = [], c = /* @__PURE__ */ i(
|
|
102
|
-
l,
|
|
103
|
-
o,
|
|
104
|
-
p,
|
|
105
|
-
!1,
|
|
106
|
-
null,
|
|
107
|
-
null
|
|
108
|
-
);
|
|
109
|
-
const y = c.exports;
|
|
110
|
-
export {
|
|
111
|
-
y as C
|
|
112
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { S as o } from "./SearchApi-CGT7-jVf.js";
|
|
2
|
-
import { n as l, y as c } from "./main-DE5THsiR.js";
|
|
3
|
-
const i = {
|
|
4
|
-
i18nOptions: {
|
|
5
|
-
namespaces: "components",
|
|
6
|
-
keyPrefix: "account.documentForm.clients"
|
|
7
|
-
},
|
|
8
|
-
name: "ClientAutocomplete",
|
|
9
|
-
components: {
|
|
10
|
-
SearchApi: o
|
|
11
|
-
},
|
|
12
|
-
props: {
|
|
13
|
-
searchEnabled: {
|
|
14
|
-
type: Boolean,
|
|
15
|
-
default: !0
|
|
16
|
-
},
|
|
17
|
-
showLoading: {
|
|
18
|
-
type: Boolean,
|
|
19
|
-
default: !1
|
|
20
|
-
},
|
|
21
|
-
showEmpty: {
|
|
22
|
-
type: Boolean,
|
|
23
|
-
default: !1
|
|
24
|
-
},
|
|
25
|
-
filled: {
|
|
26
|
-
type: Boolean,
|
|
27
|
-
default: !1
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
data() {
|
|
31
|
-
return {
|
|
32
|
-
convertToNewClient: c,
|
|
33
|
-
results: [],
|
|
34
|
-
// results when searching for existing endCustomer
|
|
35
|
-
searchQuery: ""
|
|
36
|
-
// query used to search for endCustomers
|
|
37
|
-
};
|
|
38
|
-
},
|
|
39
|
-
methods: {
|
|
40
|
-
search(r, e) {
|
|
41
|
-
this.$emit("input", e), this.searchEnabled && (this.searchQuery = e, r({
|
|
42
|
-
q: e,
|
|
43
|
-
cb: ({ endCustomer: s }) => {
|
|
44
|
-
this.results = s;
|
|
45
|
-
}
|
|
46
|
-
}));
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
var u = function() {
|
|
51
|
-
var e = this, s = e._self._c;
|
|
52
|
-
return s("SearchApi", { attrs: { "custom-search": { endCustomer: !0 } }, scopedSlots: e._u([{ key: "default", fn: function({ fetch: a, isLoading: n }) {
|
|
53
|
-
return [s("CAutocomplete", e._b({ attrs: { data: e.results, loading: e.showLoading && n, filled: e.filled, expanded: "", "keep-first": "" }, on: { typing: function(t) {
|
|
54
|
-
return e.search(a, t);
|
|
55
|
-
}, select: function(t) {
|
|
56
|
-
e.$emit("setClient", e.convertToNewClient(t));
|
|
57
|
-
} }, scopedSlots: e._u([{ key: "default", fn: function({ option: t }) {
|
|
58
|
-
return s("div", { staticStyle: { "line-height": "1.5" } }, [s("div", { staticStyle: { "font-weight": "500" } }, [e._v(e._s(t.name || t.email))]), s("div", { staticClass: "text-gray-600", staticStyle: { "font-size": "14px" } }, [e._v(" " + e._s(t.reference ? `${t.reference} · ` : "") + " " + e._s(t.workStreet || t.street || " ") + " ")])]);
|
|
59
|
-
} }], null, !0) }, "CAutocomplete", {
|
|
60
|
-
placeholder: e.$t("search.placeholder"),
|
|
61
|
-
...e.$attrs,
|
|
62
|
-
...e.$props
|
|
63
|
-
}, !1), [e.searchEnabled && e.showEmpty ? [s("div", { attrs: { slot: "footer" }, slot: "footer" }, [e.searchQuery && !e.results.length ? s("CButton", { staticStyle: { "font-weight": "600" }, attrs: { type: "secondary", pattern: "tertiary", size: "small" }, on: { click: function(t) {
|
|
64
|
-
return e.$emit("add");
|
|
65
|
-
} } }, [e._v(" " + e._s(e.$t("_common:add")) + " ")]) : e._e()], 1), s("template", { slot: "empty" }, [e._v(" " + e._s(e.$t("search.empty")) + " " + e._s(e.searchQuery) + " ")])] : e._e()], 2)];
|
|
66
|
-
} }]) });
|
|
67
|
-
}, d = [], f = /* @__PURE__ */ l(
|
|
68
|
-
i,
|
|
69
|
-
u,
|
|
70
|
-
d,
|
|
71
|
-
!1,
|
|
72
|
-
null,
|
|
73
|
-
"7407276e"
|
|
74
|
-
);
|
|
75
|
-
const h = f.exports;
|
|
76
|
-
export {
|
|
77
|
-
h as C
|
|
78
|
-
};
|