@cling-se/widget 0.14.4 → 0.14.5
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/dist/AddClientCallout-BMc-v9rJ.js +46 -0
- package/dist/AnswerModal-Cu0Ke5pl.js +3874 -0
- package/dist/AttachmentItem-Co8pVvtv.js +78 -0
- package/dist/BaseDatePicker-P5iq-XAp.js +3183 -0
- package/dist/BaseUpload-BDWnWTxr.js +1977 -0
- package/dist/BlockMedia-B_UiePCr.js +76 -0
- package/dist/CCallout-Bbp9ya9n.js +59 -0
- package/dist/CCurrencyDropdown-Cw39vJWw.js +246 -0
- package/dist/CDropdownItem-BjYnhZJr.js +538 -0
- package/dist/CField.vue_vue_type_style_index_0_lang-l0sNRNKZ.js +1 -0
- package/dist/CFormField-CeJ58aN2.js +241 -0
- package/dist/CPhoneFormat-BZnmeEeW.js +62 -0
- package/dist/CPriceInput-B07d19qq.js +112 -0
- package/dist/CTabs.vue_vue_type_style_index_0_scoped_e02a6440_lang-l0sNRNKZ.js +1 -0
- package/dist/ClientAutocomplete-9iM1pR9l.js +78 -0
- package/dist/ClientModal-fw8f6UvL.js +625 -0
- package/dist/ColorPicker-uu6vKe8o.js +2879 -0
- package/dist/CompanyModal-5t4yhKL4.js +141 -0
- package/dist/ContentWrapper-DwcOQ21l.js +183 -0
- package/dist/CoverBlockSettings-cCCXzAZ0.js +275 -0
- package/dist/DocAnswer-9lbgqHRX.js +36 -0
- package/dist/DocDetails-CoLL_tHs.js +246 -0
- package/dist/DocForm-DUjcuHJe.js +7273 -0
- package/dist/DocFormSend-LawcXcM2.js +143 -0
- package/dist/DocLinks-pJT9HpjR.js +38 -0
- package/dist/DocModalBase-xUoskL63.js +28 -0
- package/dist/DocPrint-ClEJBiAg.js +240 -0
- package/dist/DocReceipt-x_YsXPnG.js +210 -0
- package/dist/DocSendReminder-Dbz8CkAz.js +137 -0
- package/dist/DocTextEditor-AqBE7jZj.js +17181 -0
- package/dist/DocTimeline-hq2asPzr.js +481 -0
- package/dist/DocumentClient-TmtHqfiw.js +136 -0
- package/dist/DocumentLayout-CRAp8mfk.js +4909 -0
- package/dist/DocumentLogotype-emSjQ21f.js +87 -0
- package/dist/DocumentVoided-BOjiWBK6.js +25 -0
- package/dist/EmbedInput-B3LFGEee.js +113 -0
- package/dist/EmbedSettings-BYPJTGQf.js +72 -0
- package/dist/ErrorCallout-CwgYHBkg.js +28 -0
- package/dist/FilePreviewModal-81sSrDGg.js +81 -0
- package/dist/Flag-DGFvUTQZ.js +114 -0
- package/dist/HeaderSettings-BGpkzcbj.js +392 -0
- package/dist/ImageSelectModal-Cimviyuy.js +84 -0
- package/dist/ImageUploadWrapper-qJDHCf8T.js +1604 -0
- package/dist/Index-18w_qMQH.js +25 -0
- package/dist/Index-9_R8_myc.js +77 -0
- package/dist/Index-BKoXW7GK.js +84 -0
- package/dist/Index-BL3-tRGt.js +642 -0
- package/dist/Index-BNfAA-ZJ.js +154 -0
- package/dist/Index-BOxSvAug.js +144 -0
- package/dist/Index-BQgW1jlH.js +45 -0
- package/dist/Index-BXAqgXVi.js +150 -0
- package/dist/Index-BgK_WC0d.js +140 -0
- package/dist/Index-BkUzlQaQ.js +107 -0
- package/dist/Index-BpyYa9LR.js +171 -0
- package/dist/Index-ByzGXUoc.js +292 -0
- package/dist/Index-C1lsSfnX.js +52 -0
- package/dist/Index-C9sq_RDg.js +223 -0
- package/dist/Index-CDEh3GAi.js +26 -0
- package/dist/Index-CEG-Hiv6.js +69 -0
- package/dist/Index-CMUg61_b.js +33 -0
- package/dist/Index-CObGPoQv.js +62 -0
- package/dist/Index-CPNUsaOS.js +57 -0
- package/dist/Index-CegW1Rim.js +98 -0
- package/dist/Index-CoSt-Bws.js +31 -0
- package/dist/Index-CpDgldnz.js +70 -0
- package/dist/Index-CqImx-rG.js +55 -0
- package/dist/Index-CrOD4_xj.js +58 -0
- package/dist/Index-DBCNVVm5.js +24 -0
- package/dist/Index-DGG1S8uJ.js +559 -0
- package/dist/Index-DRWS2z82.js +2402 -0
- package/dist/Index-DXRgZZNj.js +61 -0
- package/dist/Index-DY5gAUnE.js +754 -0
- package/dist/Index-Dr7mVlBb.js +49 -0
- package/dist/Index-Dx944wv-.js +21 -0
- package/dist/Index-Eq3JlTKK.js +46 -0
- package/dist/Index-Sr3emNkE.js +25 -0
- package/dist/Index-VshOfaom.js +32 -0
- package/dist/InputToggleRow-CQsaayf-.js +57 -0
- package/dist/ManualPopover-CFXm5cQy.js +58 -0
- package/dist/MediaWrapper-Cn0Yr4ce.js +23 -0
- package/dist/NotBindingText-CNiszGqn.js +32 -0
- package/dist/PackageGroup-BVys9ouj.js +699 -0
- package/dist/PdfTerms-Bbns-jMY.js +36 -0
- package/dist/PdfViewer-B1zzZU4Y.js +374 -0
- package/dist/PlainHtml-CARRbTxi.js +20 -0
- package/dist/PriceHeader-CqeC9Lhb.js +339 -0
- package/dist/SearchApi-bB9FLxUq.js +161 -0
- package/dist/Setup-p3Du_uf8.js +50 -0
- package/dist/SmartList-P5ZfTWBb.js +83 -0
- package/dist/TermsSettings-CQ8TGwBV.js +102 -0
- package/dist/ThemeColorRow-DMWVlFRU.js +67 -0
- package/dist/ToggleBinding-BPaYWgqP.js +38 -0
- package/dist/UploadModal-9O4HTVZm.js +95 -0
- package/dist/VideoPlayerInput-5KybfY7N.js +93 -0
- package/dist/VideoPlayerSettings-xSW8tcTZ.js +61 -0
- package/dist/VideoSelectModal-BbaNAxGH.js +100 -0
- package/dist/anime.es-BrPTThYb.js +858 -0
- package/dist/answerDocumentMixin-S-Bmv15G.js +51 -0
- package/dist/color-TdtKxwVa.js +19 -0
- package/dist/debounce-B_0g8OVh.js +84 -0
- package/dist/dom-CJxkno7i.js +91 -0
- package/dist/favicon.ico +0 -0
- package/dist/focusDrawerMixin-DhsqWZUo.js +22 -0
- package/dist/formComponentsInstall-UG7a9vjZ.js +2499 -0
- package/dist/formDrawerState-BMQrWaBt.js +20 -0
- package/dist/formValidationMixin-DUu0omWT.js +49 -0
- package/dist/i18nMessages-Chz_lxGG.js +17 -0
- package/dist/index-B3R_uKML.js +347 -0
- package/dist/index-B4aiQXsr.js +166 -0
- package/dist/index-C50JSDKO.js +3916 -0
- package/dist/index-CJ9AvuZH.js +102 -0
- package/dist/index-Czyda2Ej.js +492 -0
- package/dist/index-myOYAnwV.js +81 -0
- package/dist/index.es.js +35 -0
- package/dist/index.umd.js +3148 -0
- package/dist/main-B9t0ybqW.js +56739 -0
- package/dist/mapFormMixin-ETYhBLl2.js +72 -0
- package/dist/omit-DtTfKAed.js +31 -0
- package/dist/publicSenderState-DD1lN9CR.js +21 -0
- package/dist/splitpanes-BHUVsCZF.js +382 -0
- package/dist/style.css +4 -0
- package/dist/throttle-qziKkJJX.js +18 -0
- package/dist/tinycolor-CMC8Xp7x.js +633 -0
- package/dist/tippy.esm-DjbYjfS2.js +1799 -0
- package/dist/utils-C5Rg0fQC.js +108 -0
- package/dist/vuedraggable.umd-CE3WmaEQ.js +3161 -0
- package/dist/vuex.esm-DKGl8mcw.js +467 -0
- 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
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
import { n as i, Q as l } from "./main-B9t0ybqW.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
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { u as e, v as o, n } from "./main-B9t0ybqW.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
|
+
};
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { C as s } from "./CCurrencyDropdown-Cw39vJWw.js";
|
|
2
|
+
import { n as i, q as u, r as a } from "./main-B9t0ybqW.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
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { S as o } from "./SearchApi-bB9FLxUq.js";
|
|
2
|
+
import { n as l, y as c } from "./main-B9t0ybqW.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
|
+
};
|