@cling-se/widget 0.14.2 → 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-BP2ip0A4.js +0 -46
- package/dist/AnswerModal-C8i3ldB_.js +0 -3869
- package/dist/AttachmentItem-BrvrAMae.js +0 -78
- package/dist/BaseDatePicker-BSkAllLg.js +0 -3183
- package/dist/BaseUpload-J2v3G0-q.js +0 -1977
- package/dist/BlockMedia-CAgKbN_k.js +0 -76
- package/dist/CCallout-D5Nk5DgN.js +0 -59
- package/dist/CCurrencyDropdown-CGYQfYSD.js +0 -246
- package/dist/CDropdownItem-DGES8E6l.js +0 -538
- package/dist/CField.vue_vue_type_style_index_0_lang-l0sNRNKZ.js +0 -1
- package/dist/CFormField-CE4rV3cr.js +0 -241
- package/dist/CPhoneFormat-DXPrTit9.js +0 -62
- package/dist/CPriceInput-CYsf1n6T.js +0 -112
- package/dist/CTabs.vue_vue_type_style_index_0_scoped_e02a6440_lang-l0sNRNKZ.js +0 -1
- package/dist/ClientAutocomplete-DPgOfPg1.js +0 -78
- package/dist/ClientModal-Dznh8Vvn.js +0 -625
- package/dist/ColorPicker-CWQEE8VR.js +0 -2879
- package/dist/CompanyModal-CeZ3GgLu.js +0 -141
- package/dist/ContentWrapper-DW7VHTdA.js +0 -183
- package/dist/CoverBlockSettings-DNSdXFgF.js +0 -275
- package/dist/DocAnswer-CPttkKAJ.js +0 -36
- package/dist/DocDetails-BCwWW_kM.js +0 -246
- package/dist/DocForm-BPjC08Ic.js +0 -7273
- package/dist/DocFormSend-BaC8IJCu.js +0 -143
- package/dist/DocLinks-DN-S8MY_.js +0 -38
- package/dist/DocModalBase-bFJp0T2Y.js +0 -28
- package/dist/DocPrint-Ci7Jyh-C.js +0 -240
- package/dist/DocReceipt-BYlXr6eS.js +0 -210
- package/dist/DocSendReminder-DFx4934a.js +0 -137
- package/dist/DocTextEditor-idQMnlIF.js +0 -17177
- package/dist/DocTimeline-ZmGSVRUB.js +0 -481
- package/dist/DocumentClient-DTRlyvLO.js +0 -136
- package/dist/DocumentLayout-BJAyNjNa.js +0 -4909
- package/dist/DocumentLogotype-pDJRc6Hj.js +0 -87
- package/dist/DocumentVoided-DfKewfe4.js +0 -25
- package/dist/EmbedInput-7hLNsnEV.js +0 -113
- package/dist/EmbedSettings-CpL24RhA.js +0 -72
- package/dist/ErrorCallout-CdJCe67q.js +0 -28
- package/dist/FilePreviewModal-B7qT3I7F.js +0 -81
- package/dist/Flag-DwW19zju.js +0 -114
- package/dist/HeaderSettings-C8SuuAwv.js +0 -392
- package/dist/ImageSelectModal-CAOh3YHc.js +0 -84
- package/dist/ImageUploadWrapper-21yldsj9.js +0 -1604
- package/dist/Index-B0BgYtWI.js +0 -150
- package/dist/Index-BC1AhlQ9.js +0 -98
- package/dist/Index-BZi6r2UN.js +0 -144
- package/dist/Index-BsD09y_2.js +0 -84
- package/dist/Index-Bu9SdKLP.js +0 -31
- package/dist/Index-BvsqZh2A.js +0 -26
- package/dist/Index-Bz4qd9uO.js +0 -55
- package/dist/Index-C--GiPc1.js +0 -171
- package/dist/Index-CC7qF0br.js +0 -77
- package/dist/Index-CGxOvTF4.js +0 -2402
- package/dist/Index-CI7_ktvb.js +0 -70
- package/dist/Index-COJZmxkX.js +0 -32
- package/dist/Index-CObEQ6G-.js +0 -140
- package/dist/Index-CP2bsXd-.js +0 -52
- package/dist/Index-CSvZBLnp.js +0 -49
- package/dist/Index-Ci-hGBbC.js +0 -33
- package/dist/Index-Ckzq1cEJ.js +0 -69
- package/dist/Index-CoIh5y2F.js +0 -62
- package/dist/Index-Couda8BX.js +0 -21
- package/dist/Index-CvXt3dm6.js +0 -292
- package/dist/Index-D95MNzAZ.js +0 -58
- package/dist/Index-DB5EG4EI.js +0 -223
- package/dist/Index-DDvRihXA.js +0 -24
- package/dist/Index-DIAntwBs.js +0 -61
- package/dist/Index-DUdJNcDT.js +0 -25
- package/dist/Index-DfANvO5d.js +0 -154
- package/dist/Index-Ds1Jv5Mr.js +0 -559
- package/dist/Index-FIWsRGmh.js +0 -57
- package/dist/Index-M3b7S4YX.js +0 -25
- package/dist/Index-NoN1_539.js +0 -642
- package/dist/Index-UGFm4yxI.js +0 -107
- package/dist/Index-aCBe0dXx.js +0 -754
- package/dist/Index-kJFtpJEP.js +0 -46
- package/dist/Index-rQKoLISX.js +0 -45
- package/dist/InputToggleRow-Ct8rvqAF.js +0 -57
- package/dist/ManualPopover-B0vp9ydC.js +0 -54
- package/dist/MediaWrapper-hmofOPLv.js +0 -23
- package/dist/NotBindingText-COpJPwHe.js +0 -32
- package/dist/PackageGroup-BdtslJL-.js +0 -699
- package/dist/PdfTerms-EDStBDhn.js +0 -36
- package/dist/PdfViewer-D1_Roqu2.js +0 -374
- package/dist/PlainHtml-C3JPvt4o.js +0 -20
- package/dist/PriceHeader-BdfozyN8.js +0 -339
- package/dist/SearchApi-CQtYh98a.js +0 -161
- package/dist/Setup-DHHMT6xu.js +0 -50
- package/dist/SmartList-BXeRj5NC.js +0 -83
- package/dist/TermsSettings-D1tDAu-r.js +0 -102
- package/dist/ThemeColorRow-HUN-QPY_.js +0 -63
- package/dist/ToggleBinding-CRoVM6Nw.js +0 -38
- package/dist/UploadModal-BD3pIiPT.js +0 -95
- package/dist/VideoPlayerInput-QFJfPoCf.js +0 -93
- package/dist/VideoPlayerSettings-CGq--niu.js +0 -61
- package/dist/VideoSelectModal-B61rBqdH.js +0 -100
- package/dist/anime.es-BrPTThYb.js +0 -858
- package/dist/answerDocumentMixin-DiONfM1s.js +0 -51
- package/dist/color-TdtKxwVa.js +0 -19
- package/dist/debounce-BIchuVwa.js +0 -84
- package/dist/dom-CJxkno7i.js +0 -91
- package/dist/favicon.ico +0 -0
- package/dist/focusDrawerMixin-CzvgKsOZ.js +0 -22
- package/dist/formComponentsInstall-EQLbqYqI.js +0 -2494
- package/dist/formDrawerState-CiKGHdNH.js +0 -20
- package/dist/formValidationMixin-5BVcxu38.js +0 -49
- package/dist/i18nMessages-Chz_lxGG.js +0 -17
- package/dist/index-BYTRIZIz.js +0 -81
- package/dist/index-Be__C37A.js +0 -102
- package/dist/index-CUydiL8B.js +0 -3919
- package/dist/index-DH6SCEKQ.js +0 -166
- package/dist/index-gtVGRKIX.js +0 -347
- package/dist/index-tNIrTnCx.js +0 -492
- package/dist/index.es.js +0 -35
- package/dist/index.umd.js +0 -3148
- package/dist/main-Bp2qcma0.js +0 -56697
- package/dist/mapFormMixin-Ce3_WIKw.js +0 -72
- package/dist/omit-21u5fFMx.js +0 -31
- package/dist/publicSenderState-BcN9kJJr.js +0 -21
- package/dist/splitpanes-BHUVsCZF.js +0 -382
- package/dist/style.css +0 -4
- package/dist/throttle-CfPxqhW_.js +0 -18
- package/dist/tinycolor-DNK6zGoq.js +0 -633
- package/dist/tippy.esm-B5TcTBWX.js +0 -1799
- package/dist/utils-GzwJPAEe.js +0 -108
- package/dist/vuedraggable.umd-2pmrPYml.js +0 -3161
- package/dist/vuex.esm-DKGl8mcw.js +0 -467
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { b as r } from "./main-Bp2qcma0.js";
|
|
2
|
-
const f = (a = [], { event: o = "input", type: c = void 0, useEmit: d = !0, setFnName: l } = {}) => ({
|
|
3
|
-
inheritAttrs: !1,
|
|
4
|
-
props: {
|
|
5
|
-
_document: {
|
|
6
|
-
type: Object,
|
|
7
|
-
default: () => ({})
|
|
8
|
-
},
|
|
9
|
-
_value: {
|
|
10
|
-
type: Object,
|
|
11
|
-
default: () => ({})
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
inject: {
|
|
15
|
-
viewSettings: {
|
|
16
|
-
default: () => ({
|
|
17
|
-
canEdit: !1,
|
|
18
|
-
isForm: !1,
|
|
19
|
-
setFormValue: null,
|
|
20
|
-
removeFormValue: null,
|
|
21
|
-
isPublicForm: !1
|
|
22
|
-
})
|
|
23
|
-
},
|
|
24
|
-
containerType: {
|
|
25
|
-
default: () => ({})
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
computed: {
|
|
29
|
-
canEdit() {
|
|
30
|
-
return r(this, "viewSettings.canEdit");
|
|
31
|
-
},
|
|
32
|
-
device() {
|
|
33
|
-
return r(this, "containerType.device", "");
|
|
34
|
-
},
|
|
35
|
-
isForm() {
|
|
36
|
-
return r(this, "viewSettings.isForm");
|
|
37
|
-
},
|
|
38
|
-
...a.reduce((i, e) => {
|
|
39
|
-
const t = e, s = {
|
|
40
|
-
get() {
|
|
41
|
-
return this._value ? r(this._document, (this._value || {})[e]) : r(this.$attrs, e);
|
|
42
|
-
},
|
|
43
|
-
set(u) {
|
|
44
|
-
this.setField({ field: e, value: u, type: c });
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
return i[t] = s, i;
|
|
48
|
-
}, {})
|
|
49
|
-
},
|
|
50
|
-
methods: {
|
|
51
|
-
// Setter method exposed to host component, in case extra setter options are needed
|
|
52
|
-
// Providing either 'key' or 'field' optional, but one required
|
|
53
|
-
// key > field
|
|
54
|
-
// 'field' refers to name of computed field registered for the mixin
|
|
55
|
-
setField({ key: i, field: e, value: t, options: s, type: u }) {
|
|
56
|
-
const n = i || (this._value || {})[e];
|
|
57
|
-
if (!n)
|
|
58
|
-
return;
|
|
59
|
-
const m = l ? this[l] : this.viewSettings.setFormValue;
|
|
60
|
-
!d && typeof m == "function" ? m({ key: n, value: t, options: s }) : o ? (u === "number" && Number.isNaN(parseFloat(t)) && (t = null), this.$emit(o, { key: n, value: t, options: s })) : this.$emit({ key: n, value: t, options: s });
|
|
61
|
-
},
|
|
62
|
-
// Forward of document remove method
|
|
63
|
-
// Note: does not yet support emit option like the setter
|
|
64
|
-
removeField(i) {
|
|
65
|
-
var e, t;
|
|
66
|
-
(t = (e = this.viewSettings) == null ? void 0 : e.removeFormValue) == null || t.call(e, i);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
export {
|
|
71
|
-
f as m
|
|
72
|
-
};
|
package/dist/omit-21u5fFMx.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { W as l, _ as o, X as i, Y as _, k as u, Z as f, $ as v, a0 as c, a1 as m, a2 as O, a3 as g } from "./main-Bp2qcma0.js";
|
|
2
|
-
var C = l;
|
|
3
|
-
function L(t) {
|
|
4
|
-
return C(t) ? void 0 : t;
|
|
5
|
-
}
|
|
6
|
-
var b = L, F = o;
|
|
7
|
-
function A(t) {
|
|
8
|
-
var e = t == null ? 0 : t.length;
|
|
9
|
-
return e ? F(t, 1) : [];
|
|
10
|
-
}
|
|
11
|
-
var E = A, P = E, R = i, $ = _;
|
|
12
|
-
function d(t) {
|
|
13
|
-
return $(R(t, void 0, P), t + "");
|
|
14
|
-
}
|
|
15
|
-
var y = d, S = f, D = O, G = v, M = g, N = c, T = b, h = y, j = m, p = 1, x = 2, I = 4, K = h(function(t, e) {
|
|
16
|
-
var a = {};
|
|
17
|
-
if (t == null)
|
|
18
|
-
return a;
|
|
19
|
-
var s = !1;
|
|
20
|
-
e = S(e, function(n) {
|
|
21
|
-
return n = M(n, t), s || (s = n.length > 1), n;
|
|
22
|
-
}), N(t, j(t), a), s && (a = D(a, p | x | I, T));
|
|
23
|
-
for (var r = e.length; r--; )
|
|
24
|
-
G(a, e[r]);
|
|
25
|
-
return a;
|
|
26
|
-
}), U = K;
|
|
27
|
-
const k = /* @__PURE__ */ u(U);
|
|
28
|
-
export {
|
|
29
|
-
y as _,
|
|
30
|
-
k as o
|
|
31
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { I as a, V as c } from "./main-Bp2qcma0.js";
|
|
2
|
-
const e = JSON.parse(a.getItem("publicSender")), s = c.observable({
|
|
3
|
-
company: {
|
|
4
|
-
name: "",
|
|
5
|
-
LogotypePublicId: null,
|
|
6
|
-
...e ? e.company : {}
|
|
7
|
-
},
|
|
8
|
-
user: {
|
|
9
|
-
email: "",
|
|
10
|
-
firstname: "",
|
|
11
|
-
lastname: "",
|
|
12
|
-
cellphone: "",
|
|
13
|
-
...e ? e.user : {}
|
|
14
|
-
}
|
|
15
|
-
}), r = ({ company: n, user: t }) => {
|
|
16
|
-
Object.assign(s.company, n), Object.assign(s.user, t), a.setItem("publicSender", JSON.stringify(s));
|
|
17
|
-
};
|
|
18
|
-
export {
|
|
19
|
-
r as a,
|
|
20
|
-
s
|
|
21
|
-
};
|
|
@@ -1,382 +0,0 @@
|
|
|
1
|
-
var _ = Object.defineProperty, M = Object.defineProperties, g = Object.getOwnPropertyDescriptors, u = Object.getOwnPropertySymbols, v = Object.prototype.hasOwnProperty, P = Object.prototype.propertyIsEnumerable, m = (e, t, i) => t in e ? _(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i, y = (e, t) => {
|
|
2
|
-
for (var i in t || (t = {}))
|
|
3
|
-
v.call(t, i) && m(e, i, t[i]);
|
|
4
|
-
if (u)
|
|
5
|
-
for (var i of u(t))
|
|
6
|
-
P.call(t, i) && m(e, i, t[i]);
|
|
7
|
-
return e;
|
|
8
|
-
}, C = (e, t) => M(e, g(t)), w = (e, t) => {
|
|
9
|
-
var i = {};
|
|
10
|
-
for (var s in e)
|
|
11
|
-
v.call(e, s) && t.indexOf(s) < 0 && (i[s] = e[s]);
|
|
12
|
-
if (e != null && u)
|
|
13
|
-
for (var s of u(e))
|
|
14
|
-
t.indexOf(s) < 0 && P.call(e, s) && (i[s] = e[s]);
|
|
15
|
-
return i;
|
|
16
|
-
};
|
|
17
|
-
function S(e, t, i, s, n, a, r, h) {
|
|
18
|
-
var o = typeof e == "function" ? e.options : e;
|
|
19
|
-
t && (o.render = t, o.staticRenderFns = i, o._compiled = !0);
|
|
20
|
-
var l;
|
|
21
|
-
if (n && (l = n), l)
|
|
22
|
-
if (o.functional) {
|
|
23
|
-
o._injectStyles = l;
|
|
24
|
-
var c = o.render;
|
|
25
|
-
o.render = function(x, p) {
|
|
26
|
-
return l.call(p), c(x, p);
|
|
27
|
-
};
|
|
28
|
-
} else {
|
|
29
|
-
var d = o.beforeCreate;
|
|
30
|
-
o.beforeCreate = d ? [].concat(d, l) : [l];
|
|
31
|
-
}
|
|
32
|
-
return {
|
|
33
|
-
exports: e,
|
|
34
|
-
options: o
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
const b = {
|
|
38
|
-
name: "splitpanes",
|
|
39
|
-
props: {
|
|
40
|
-
horizontal: { type: Boolean },
|
|
41
|
-
pushOtherPanes: { type: Boolean, default: !0 },
|
|
42
|
-
dblClickSplitter: { type: Boolean, default: !0 },
|
|
43
|
-
rtl: { type: Boolean, default: !1 },
|
|
44
|
-
firstSplitter: { type: Boolean }
|
|
45
|
-
},
|
|
46
|
-
provide() {
|
|
47
|
-
return {
|
|
48
|
-
requestUpdate: this.requestUpdate,
|
|
49
|
-
onPaneAdd: this.onPaneAdd,
|
|
50
|
-
onPaneRemove: this.onPaneRemove,
|
|
51
|
-
onPaneClick: this.onPaneClick
|
|
52
|
-
};
|
|
53
|
-
},
|
|
54
|
-
data: () => ({
|
|
55
|
-
container: null,
|
|
56
|
-
ready: !1,
|
|
57
|
-
panes: [],
|
|
58
|
-
touch: {
|
|
59
|
-
mouseDown: !1,
|
|
60
|
-
dragging: !1,
|
|
61
|
-
activeSplitter: null
|
|
62
|
-
},
|
|
63
|
-
splitterTaps: {
|
|
64
|
-
splitter: null,
|
|
65
|
-
timeoutId: null
|
|
66
|
-
}
|
|
67
|
-
}),
|
|
68
|
-
computed: {
|
|
69
|
-
panesCount() {
|
|
70
|
-
return this.panes.length;
|
|
71
|
-
},
|
|
72
|
-
indexedPanes() {
|
|
73
|
-
return this.panes.reduce((e, t) => (e[t.id] = t) && e, {});
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
methods: {
|
|
77
|
-
updatePaneComponents() {
|
|
78
|
-
this.panes.forEach((e) => {
|
|
79
|
-
e.update && e.update({
|
|
80
|
-
[this.horizontal ? "height" : "width"]: `${this.indexedPanes[e.id].size}%`
|
|
81
|
-
});
|
|
82
|
-
});
|
|
83
|
-
},
|
|
84
|
-
bindEvents() {
|
|
85
|
-
document.addEventListener("mousemove", this.onMouseMove, { passive: !1 }), document.addEventListener("mouseup", this.onMouseUp), "ontouchstart" in window && (document.addEventListener("touchmove", this.onMouseMove, { passive: !1 }), document.addEventListener("touchend", this.onMouseUp));
|
|
86
|
-
},
|
|
87
|
-
unbindEvents() {
|
|
88
|
-
document.removeEventListener("mousemove", this.onMouseMove, { passive: !1 }), document.removeEventListener("mouseup", this.onMouseUp), "ontouchstart" in window && (document.removeEventListener("touchmove", this.onMouseMove, { passive: !1 }), document.removeEventListener("touchend", this.onMouseUp));
|
|
89
|
-
},
|
|
90
|
-
onMouseDown(e, t) {
|
|
91
|
-
this.bindEvents(), this.touch.mouseDown = !0, this.touch.activeSplitter = t;
|
|
92
|
-
},
|
|
93
|
-
onMouseMove(e) {
|
|
94
|
-
this.touch.mouseDown && (e.preventDefault(), this.touch.dragging = !0, this.calculatePanesSize(this.getCurrentMouseDrag(e)), this.$emit("resize", this.panes.map((t) => ({ min: t.min, max: t.max, size: t.size }))));
|
|
95
|
-
},
|
|
96
|
-
onMouseUp() {
|
|
97
|
-
this.touch.dragging && this.$emit("resized", this.panes.map((e) => ({ min: e.min, max: e.max, size: e.size }))), this.touch.mouseDown = !1, setTimeout(() => {
|
|
98
|
-
this.touch.dragging = !1, this.unbindEvents();
|
|
99
|
-
}, 100);
|
|
100
|
-
},
|
|
101
|
-
onSplitterClick(e, t) {
|
|
102
|
-
"ontouchstart" in window && (e.preventDefault(), this.dblClickSplitter && (this.splitterTaps.splitter === t ? (clearTimeout(this.splitterTaps.timeoutId), this.splitterTaps.timeoutId = null, this.onSplitterDblClick(e, t), this.splitterTaps.splitter = null) : (this.splitterTaps.splitter = t, this.splitterTaps.timeoutId = setTimeout(() => {
|
|
103
|
-
this.splitterTaps.splitter = null;
|
|
104
|
-
}, 500)))), this.touch.dragging || this.$emit("splitter-click", this.panes[t]);
|
|
105
|
-
},
|
|
106
|
-
onSplitterDblClick(e, t) {
|
|
107
|
-
let i = 0;
|
|
108
|
-
this.panes = this.panes.map((s, n) => (s.size = n === t ? s.max : s.min, n !== t && (i += s.min), s)), this.panes[t].size -= i, this.$emit("pane-maximize", this.panes[t]);
|
|
109
|
-
},
|
|
110
|
-
onPaneClick(e, t) {
|
|
111
|
-
this.$emit("pane-click", this.indexedPanes[t]);
|
|
112
|
-
},
|
|
113
|
-
getCurrentMouseDrag(e) {
|
|
114
|
-
const t = this.container.getBoundingClientRect(), { clientX: i, clientY: s } = "ontouchstart" in window && e.touches ? e.touches[0] : e;
|
|
115
|
-
return {
|
|
116
|
-
x: i - t.left,
|
|
117
|
-
y: s - t.top
|
|
118
|
-
};
|
|
119
|
-
},
|
|
120
|
-
getCurrentDragPercentage(e) {
|
|
121
|
-
e = e[this.horizontal ? "y" : "x"];
|
|
122
|
-
const t = this.container[this.horizontal ? "clientHeight" : "clientWidth"];
|
|
123
|
-
return this.rtl && !this.horizontal && (e = t - e), e * 100 / t;
|
|
124
|
-
},
|
|
125
|
-
calculatePanesSize(e) {
|
|
126
|
-
const t = this.touch.activeSplitter;
|
|
127
|
-
let i = {
|
|
128
|
-
prevPanesSize: this.sumPrevPanesSize(t),
|
|
129
|
-
nextPanesSize: this.sumNextPanesSize(t),
|
|
130
|
-
prevReachedMinPanes: 0,
|
|
131
|
-
nextReachedMinPanes: 0
|
|
132
|
-
};
|
|
133
|
-
const s = 0 + (this.pushOtherPanes ? 0 : i.prevPanesSize), n = 100 - (this.pushOtherPanes ? 0 : i.nextPanesSize), a = Math.max(Math.min(this.getCurrentDragPercentage(e), n), s);
|
|
134
|
-
let r = [t, t + 1], h = this.panes[r[0]] || null, o = this.panes[r[1]] || null;
|
|
135
|
-
const l = h.max < 100 && a >= h.max + i.prevPanesSize, c = o.max < 100 && a <= 100 - (o.max + this.sumNextPanesSize(t + 1));
|
|
136
|
-
if (l || c) {
|
|
137
|
-
l ? (h.size = h.max, o.size = Math.max(100 - h.max - i.prevPanesSize - i.nextPanesSize, 0)) : (h.size = Math.max(100 - o.max - i.prevPanesSize - this.sumNextPanesSize(t + 1), 0), o.size = o.max);
|
|
138
|
-
return;
|
|
139
|
-
}
|
|
140
|
-
if (this.pushOtherPanes) {
|
|
141
|
-
const d = this.doPushOtherPanes(i, a);
|
|
142
|
-
if (!d)
|
|
143
|
-
return;
|
|
144
|
-
({ sums: i, panesToResize: r } = d), h = this.panes[r[0]] || null, o = this.panes[r[1]] || null;
|
|
145
|
-
}
|
|
146
|
-
h !== null && (h.size = Math.min(Math.max(a - i.prevPanesSize - i.prevReachedMinPanes, h.min), h.max)), o !== null && (o.size = Math.min(Math.max(100 - a - i.nextPanesSize - i.nextReachedMinPanes, o.min), o.max));
|
|
147
|
-
},
|
|
148
|
-
doPushOtherPanes(e, t) {
|
|
149
|
-
const i = this.touch.activeSplitter, s = [i, i + 1];
|
|
150
|
-
return t < e.prevPanesSize + this.panes[s[0]].min && (s[0] = this.findPrevExpandedPane(i).index, e.prevReachedMinPanes = 0, s[0] < i && this.panes.forEach((n, a) => {
|
|
151
|
-
a > s[0] && a <= i && (n.size = n.min, e.prevReachedMinPanes += n.min);
|
|
152
|
-
}), e.prevPanesSize = this.sumPrevPanesSize(s[0]), s[0] === void 0) ? (e.prevReachedMinPanes = 0, this.panes[0].size = this.panes[0].min, this.panes.forEach((n, a) => {
|
|
153
|
-
a > 0 && a <= i && (n.size = n.min, e.prevReachedMinPanes += n.min);
|
|
154
|
-
}), this.panes[s[1]].size = 100 - e.prevReachedMinPanes - this.panes[0].min - e.prevPanesSize - e.nextPanesSize, null) : t > 100 - e.nextPanesSize - this.panes[s[1]].min && (s[1] = this.findNextExpandedPane(i).index, e.nextReachedMinPanes = 0, s[1] > i + 1 && this.panes.forEach((n, a) => {
|
|
155
|
-
a > i && a < s[1] && (n.size = n.min, e.nextReachedMinPanes += n.min);
|
|
156
|
-
}), e.nextPanesSize = this.sumNextPanesSize(s[1] - 1), s[1] === void 0) ? (e.nextReachedMinPanes = 0, this.panes[this.panesCount - 1].size = this.panes[this.panesCount - 1].min, this.panes.forEach((n, a) => {
|
|
157
|
-
a < this.panesCount - 1 && a >= i + 1 && (n.size = n.min, e.nextReachedMinPanes += n.min);
|
|
158
|
-
}), this.panes[s[0]].size = 100 - e.prevPanesSize - e.nextReachedMinPanes - this.panes[this.panesCount - 1].min - e.nextPanesSize, null) : { sums: e, panesToResize: s };
|
|
159
|
-
},
|
|
160
|
-
sumPrevPanesSize(e) {
|
|
161
|
-
return this.panes.reduce((t, i, s) => t + (s < e ? i.size : 0), 0);
|
|
162
|
-
},
|
|
163
|
-
sumNextPanesSize(e) {
|
|
164
|
-
return this.panes.reduce((t, i, s) => t + (s > e + 1 ? i.size : 0), 0);
|
|
165
|
-
},
|
|
166
|
-
findPrevExpandedPane(e) {
|
|
167
|
-
return [...this.panes].reverse().find((i) => i.index < e && i.size > i.min) || {};
|
|
168
|
-
},
|
|
169
|
-
findNextExpandedPane(e) {
|
|
170
|
-
return this.panes.find((i) => i.index > e + 1 && i.size > i.min) || {};
|
|
171
|
-
},
|
|
172
|
-
checkSplitpanesNodes() {
|
|
173
|
-
Array.from(this.container.children).forEach((t) => {
|
|
174
|
-
const i = t.classList.contains("splitpanes__pane"), s = t.classList.contains("splitpanes__splitter");
|
|
175
|
-
if (!i && !s) {
|
|
176
|
-
t.parentNode.removeChild(t), console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed.");
|
|
177
|
-
return;
|
|
178
|
-
}
|
|
179
|
-
});
|
|
180
|
-
},
|
|
181
|
-
addSplitter(e, t, i = !1) {
|
|
182
|
-
const s = e - 1, n = document.createElement("div");
|
|
183
|
-
n.classList.add("splitpanes__splitter"), i || (n.onmousedown = (a) => this.onMouseDown(a, s), typeof window < "u" && "ontouchstart" in window && (n.ontouchstart = (a) => this.onMouseDown(a, s)), n.onclick = (a) => this.onSplitterClick(a, s + 1)), this.dblClickSplitter && (n.ondblclick = (a) => this.onSplitterDblClick(a, s + 1)), t.parentNode.insertBefore(n, t);
|
|
184
|
-
},
|
|
185
|
-
removeSplitter(e) {
|
|
186
|
-
e.onmousedown = void 0, e.onclick = void 0, e.ondblclick = void 0, e.parentNode.removeChild(e);
|
|
187
|
-
},
|
|
188
|
-
redoSplitters() {
|
|
189
|
-
const e = Array.from(this.container.children);
|
|
190
|
-
e.forEach((i) => {
|
|
191
|
-
i.className.includes("splitpanes__splitter") && this.removeSplitter(i);
|
|
192
|
-
});
|
|
193
|
-
let t = 0;
|
|
194
|
-
e.forEach((i) => {
|
|
195
|
-
i.className.includes("splitpanes__pane") && (!t && this.firstSplitter ? this.addSplitter(t, i, !0) : t && this.addSplitter(t, i), t++);
|
|
196
|
-
});
|
|
197
|
-
},
|
|
198
|
-
requestUpdate(e) {
|
|
199
|
-
var t = e, { target: i } = t, s = w(t, ["target"]);
|
|
200
|
-
const n = this.indexedPanes[i._uid];
|
|
201
|
-
Object.entries(s).forEach(([a, r]) => n[a] = r);
|
|
202
|
-
},
|
|
203
|
-
onPaneAdd(e) {
|
|
204
|
-
let t = -1;
|
|
205
|
-
Array.from(e.$el.parentNode.children).some((n) => (n.className.includes("splitpanes__pane") && t++, n === e.$el));
|
|
206
|
-
const i = parseFloat(e.minSize), s = parseFloat(e.maxSize);
|
|
207
|
-
this.panes.splice(t, 0, {
|
|
208
|
-
id: e._uid,
|
|
209
|
-
index: t,
|
|
210
|
-
min: isNaN(i) ? 0 : i,
|
|
211
|
-
max: isNaN(s) ? 100 : s,
|
|
212
|
-
size: e.size === null ? null : parseFloat(e.size),
|
|
213
|
-
givenSize: e.size,
|
|
214
|
-
update: e.update
|
|
215
|
-
}), this.panes.forEach((n, a) => n.index = a), this.ready && this.$nextTick(() => {
|
|
216
|
-
this.redoSplitters(), this.resetPaneSizes({ addedPane: this.panes[t] }), this.$emit("pane-add", { index: t, panes: this.panes.map((n) => ({ min: n.min, max: n.max, size: n.size })) });
|
|
217
|
-
});
|
|
218
|
-
},
|
|
219
|
-
onPaneRemove(e) {
|
|
220
|
-
const t = this.panes.findIndex((s) => s.id === e._uid), i = this.panes.splice(t, 1)[0];
|
|
221
|
-
this.panes.forEach((s, n) => s.index = n), this.$nextTick(() => {
|
|
222
|
-
this.redoSplitters(), this.resetPaneSizes({ removedPane: C(y({}, i), { index: t }) }), this.$emit("pane-remove", { removed: i, panes: this.panes.map((s) => ({ min: s.min, max: s.max, size: s.size })) });
|
|
223
|
-
});
|
|
224
|
-
},
|
|
225
|
-
resetPaneSizes(e = {}) {
|
|
226
|
-
!e.addedPane && !e.removedPane ? this.initialPanesSizing() : this.panes.some((t) => t.givenSize !== null || t.min || t.max < 100) ? this.equalizeAfterAddOrRemove(e) : this.equalize(), this.ready && this.$emit("resized", this.panes.map((t) => ({ min: t.min, max: t.max, size: t.size })));
|
|
227
|
-
},
|
|
228
|
-
equalize() {
|
|
229
|
-
const e = 100 / this.panesCount;
|
|
230
|
-
let t = 0, i = [], s = [];
|
|
231
|
-
this.panes.forEach((n) => {
|
|
232
|
-
n.size = Math.max(Math.min(e, n.max), n.min), t -= n.size, n.size >= n.max && i.push(n.id), n.size <= n.min && s.push(n.id);
|
|
233
|
-
}), t > 0.1 && this.readjustSizes(t, i, s);
|
|
234
|
-
},
|
|
235
|
-
initialPanesSizing() {
|
|
236
|
-
100 / this.panesCount;
|
|
237
|
-
let e = 100, t = [], i = [], s = 0;
|
|
238
|
-
this.panes.forEach((a) => {
|
|
239
|
-
e -= a.size, a.size !== null && s++, a.size >= a.max && t.push(a.id), a.size <= a.min && i.push(a.id);
|
|
240
|
-
});
|
|
241
|
-
let n = 100;
|
|
242
|
-
e > 0.1 && (this.panes.forEach((a) => {
|
|
243
|
-
a.size === null && (a.size = Math.max(Math.min(e / (this.panesCount - s), a.max), a.min)), n -= a.size;
|
|
244
|
-
}), n > 0.1 && this.readjustSizes(e, t, i));
|
|
245
|
-
},
|
|
246
|
-
equalizeAfterAddOrRemove({ addedPane: e, removedPane: t } = {}) {
|
|
247
|
-
let i = 100 / this.panesCount, s = 0, n = [], a = [];
|
|
248
|
-
e && e.givenSize !== null && (i = (100 - e.givenSize) / (this.panesCount - 1)), this.panes.forEach((r) => {
|
|
249
|
-
s -= r.size, r.size >= r.max && n.push(r.id), r.size <= r.min && a.push(r.id);
|
|
250
|
-
}), !(Math.abs(s) < 0.1) && (this.panes.forEach((r) => {
|
|
251
|
-
e && e.givenSize !== null && e.id === r.id || (r.size = Math.max(Math.min(i, r.max), r.min)), s -= r.size, r.size >= r.max && n.push(r.id), r.size <= r.min && a.push(r.id);
|
|
252
|
-
}), s > 0.1 && this.readjustSizes(s, n, a));
|
|
253
|
-
},
|
|
254
|
-
readjustSizes(e, t, i) {
|
|
255
|
-
let s;
|
|
256
|
-
e > 0 ? s = e / (this.panesCount - t.length) : s = e / (this.panesCount - i.length), this.panes.forEach((n, a) => {
|
|
257
|
-
if (e > 0 && !t.includes(n.id)) {
|
|
258
|
-
const r = Math.max(Math.min(n.size + s, n.max), n.min), h = r - n.size;
|
|
259
|
-
e -= h, n.size = r;
|
|
260
|
-
} else if (!i.includes(n.id)) {
|
|
261
|
-
const r = Math.max(Math.min(n.size + s, n.max), n.min), h = r - n.size;
|
|
262
|
-
e -= h, n.size = r;
|
|
263
|
-
}
|
|
264
|
-
n.update({
|
|
265
|
-
[this.horizontal ? "height" : "width"]: `${this.indexedPanes[n.id].size}%`
|
|
266
|
-
});
|
|
267
|
-
}), Math.abs(e) > 0.1 && this.$nextTick(() => {
|
|
268
|
-
this.ready && console.warn("Splitpanes: Could not resize panes correctly due to their constraints.");
|
|
269
|
-
});
|
|
270
|
-
}
|
|
271
|
-
},
|
|
272
|
-
watch: {
|
|
273
|
-
panes: {
|
|
274
|
-
deep: !0,
|
|
275
|
-
immediate: !1,
|
|
276
|
-
handler() {
|
|
277
|
-
this.updatePaneComponents();
|
|
278
|
-
}
|
|
279
|
-
},
|
|
280
|
-
horizontal() {
|
|
281
|
-
this.updatePaneComponents();
|
|
282
|
-
},
|
|
283
|
-
firstSplitter() {
|
|
284
|
-
this.redoSplitters();
|
|
285
|
-
},
|
|
286
|
-
dblClickSplitter(e) {
|
|
287
|
-
[...this.container.querySelectorAll(".splitpanes__splitter")].forEach((i, s) => {
|
|
288
|
-
i.ondblclick = e ? (n) => this.onSplitterDblClick(n, s) : void 0;
|
|
289
|
-
});
|
|
290
|
-
}
|
|
291
|
-
},
|
|
292
|
-
beforeDestroy() {
|
|
293
|
-
this.ready = !1;
|
|
294
|
-
},
|
|
295
|
-
mounted() {
|
|
296
|
-
this.container = this.$refs.container, this.checkSplitpanesNodes(), this.redoSplitters(), this.resetPaneSizes(), this.$emit("ready"), this.ready = !0;
|
|
297
|
-
},
|
|
298
|
-
render(e) {
|
|
299
|
-
return e("div", {
|
|
300
|
-
ref: "container",
|
|
301
|
-
class: [
|
|
302
|
-
"splitpanes",
|
|
303
|
-
`splitpanes--${this.horizontal ? "horizontal" : "vertical"}`,
|
|
304
|
-
{
|
|
305
|
-
"splitpanes--dragging": this.touch.dragging
|
|
306
|
-
}
|
|
307
|
-
]
|
|
308
|
-
}, this.$slots.default);
|
|
309
|
-
}
|
|
310
|
-
};
|
|
311
|
-
let E, R;
|
|
312
|
-
const f = {};
|
|
313
|
-
var k = /* @__PURE__ */ S(b, E, R, !1, N);
|
|
314
|
-
function N(e) {
|
|
315
|
-
for (let t in f)
|
|
316
|
-
this[t] = f[t];
|
|
317
|
-
}
|
|
318
|
-
var j = /* @__PURE__ */ function() {
|
|
319
|
-
return k.exports;
|
|
320
|
-
}(), O = function() {
|
|
321
|
-
var e = this, t = e.$createElement, i = e._self._c || t;
|
|
322
|
-
return i("div", { staticClass: "splitpanes__pane", style: e.style, on: { click: function(s) {
|
|
323
|
-
return e.onPaneClick(s, e._uid);
|
|
324
|
-
} } }, [e._t("default")], 2);
|
|
325
|
-
}, D = [];
|
|
326
|
-
const $ = {
|
|
327
|
-
name: "pane",
|
|
328
|
-
inject: ["requestUpdate", "onPaneAdd", "onPaneRemove", "onPaneClick"],
|
|
329
|
-
props: {
|
|
330
|
-
size: { type: [Number, String], default: null },
|
|
331
|
-
minSize: { type: [Number, String], default: 0 },
|
|
332
|
-
maxSize: { type: [Number, String], default: 100 }
|
|
333
|
-
},
|
|
334
|
-
data: () => ({
|
|
335
|
-
style: {}
|
|
336
|
-
}),
|
|
337
|
-
mounted() {
|
|
338
|
-
this.onPaneAdd(this);
|
|
339
|
-
},
|
|
340
|
-
beforeDestroy() {
|
|
341
|
-
this.onPaneRemove(this);
|
|
342
|
-
},
|
|
343
|
-
methods: {
|
|
344
|
-
update(e) {
|
|
345
|
-
this.style = e;
|
|
346
|
-
}
|
|
347
|
-
},
|
|
348
|
-
computed: {
|
|
349
|
-
sizeNumber() {
|
|
350
|
-
return this.size || this.size === 0 ? parseFloat(this.size) : null;
|
|
351
|
-
},
|
|
352
|
-
minSizeNumber() {
|
|
353
|
-
return parseFloat(this.minSize);
|
|
354
|
-
},
|
|
355
|
-
maxSizeNumber() {
|
|
356
|
-
return parseFloat(this.maxSize);
|
|
357
|
-
}
|
|
358
|
-
},
|
|
359
|
-
watch: {
|
|
360
|
-
sizeNumber(e) {
|
|
361
|
-
this.requestUpdate({ target: this, size: e });
|
|
362
|
-
},
|
|
363
|
-
minSizeNumber(e) {
|
|
364
|
-
this.requestUpdate({ target: this, min: e });
|
|
365
|
-
},
|
|
366
|
-
maxSizeNumber(e) {
|
|
367
|
-
this.requestUpdate({ target: this, max: e });
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
}, z = {};
|
|
371
|
-
var T = /* @__PURE__ */ S($, O, D, !1, q);
|
|
372
|
-
function q(e) {
|
|
373
|
-
for (let t in z)
|
|
374
|
-
this[t] = z[t];
|
|
375
|
-
}
|
|
376
|
-
var U = /* @__PURE__ */ function() {
|
|
377
|
-
return T.exports;
|
|
378
|
-
}();
|
|
379
|
-
export {
|
|
380
|
-
U as p,
|
|
381
|
-
j as s
|
|
382
|
-
};
|