dpot-ui 0.2.1 → 0.2.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/dist/index.es.js +426 -407
- package/dist/style.css +1 -1
- package/docs/toggleRaw.pdf +0 -0
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,46 +1,14 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileOverview Kickass library to create and place poppers near their reference elements.
|
|
3
|
-
* @version {{version}}
|
|
4
|
-
* @license
|
|
5
|
-
* Copyright (c) 2016 Federico Zivolo and contributors
|
|
6
|
-
*
|
|
7
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
9
|
-
* in the Software without restriction, including without limitation the rights
|
|
10
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
12
|
-
* furnished to do so, subject to the following conditions:
|
|
13
|
-
*
|
|
14
|
-
* The above copyright notice and this permission notice shall be included in all
|
|
15
|
-
* copies or substantial portions of the Software.
|
|
16
|
-
*
|
|
17
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
-
* SOFTWARE.
|
|
24
|
-
*/
|
|
25
1
|
const U = function() {
|
|
26
2
|
var e = window, r = {
|
|
27
|
-
// placement of the popper
|
|
28
3
|
placement: "bottom",
|
|
29
4
|
gpuAcceleration: !0,
|
|
30
|
-
// shift popper from its origin by the given amount of pixels (can be negative)
|
|
31
5
|
offset: 0,
|
|
32
|
-
// the element which will act as boundary of the popper
|
|
33
6
|
boundariesElement: "viewport",
|
|
34
|
-
// amount of pixel used to define a minimum distance between the boundaries and the popper
|
|
35
7
|
boundariesPadding: 5,
|
|
36
|
-
// popper will try to prevent overflow following this order,
|
|
37
|
-
// by default, then, it could overflow on the left and on top of the boundariesElement
|
|
38
8
|
preventOverflowOrder: ["left", "right", "top", "bottom"],
|
|
39
|
-
// the behavior used by flip to change the placement of the popper
|
|
40
9
|
flipBehavior: "flip",
|
|
41
10
|
arrowElement: "[x-arrow]",
|
|
42
11
|
arrowOffset: 0,
|
|
43
|
-
// list of functions used to modify the offsets before they are applied to the popper
|
|
44
12
|
modifiers: [
|
|
45
13
|
"shift",
|
|
46
14
|
"offset",
|
|
@@ -53,10 +21,10 @@ const U = function() {
|
|
|
53
21
|
modifiersIgnored: [],
|
|
54
22
|
forceAbsolute: !1
|
|
55
23
|
};
|
|
56
|
-
function o(t, i,
|
|
24
|
+
function o(t, i, l) {
|
|
57
25
|
this._reference = t.jquery ? t[0] : t, this.state = {};
|
|
58
|
-
var
|
|
59
|
-
return
|
|
26
|
+
var s = typeof i > "u" || i === null, d = i && Object.prototype.toString.call(i) === "[object Object]";
|
|
27
|
+
return s || d ? this._popper = this.parse(d ? i : {}) : this._popper = i.jquery ? i[0] : i, this._options = Object.assign({}, r, l), this._options.modifiers = this._options.modifiers.map(
|
|
60
28
|
function(p) {
|
|
61
29
|
if (this._options.modifiersIgnored.indexOf(p) === -1)
|
|
62
30
|
return p === "applyStyle" && this._popper.setAttribute(
|
|
@@ -64,10 +32,10 @@ const U = function() {
|
|
|
64
32
|
this._options.placement
|
|
65
33
|
), this.modifiers[p] || p;
|
|
66
34
|
}.bind(this)
|
|
67
|
-
), this.state.position = this._getPosition(this._popper, this._reference),
|
|
35
|
+
), this.state.position = this._getPosition(this._popper, this._reference), b(this._popper, { position: this.state.position, top: 0 }), this.update(), this._setupEventListeners(), this;
|
|
68
36
|
}
|
|
69
37
|
o.prototype.destroy = function() {
|
|
70
|
-
return this._popper.removeAttribute("x-placement"), this._popper.style.left = "", this._popper.style.position = "", this._popper.style.top = "", this._popper.style[
|
|
38
|
+
return this._popper.removeAttribute("x-placement"), this._popper.style.left = "", this._popper.style.position = "", this._popper.style.top = "", this._popper.style[D("transform")] = "", this._removeEventListeners(), this._options.removeOnDestroy && this._popper.remove(), this;
|
|
71
39
|
}, o.prototype.update = function() {
|
|
72
40
|
var t = { instance: this, styles: {} };
|
|
73
41
|
t.placement = this._options.placement, t._originalPlacement = this._options.placement, t.offsets = this._getOffsets(
|
|
@@ -96,16 +64,16 @@ const U = function() {
|
|
|
96
64
|
arrowAttributes: ["x-arrow"]
|
|
97
65
|
};
|
|
98
66
|
t = Object.assign({}, i, t);
|
|
99
|
-
var
|
|
100
|
-
if (u(
|
|
67
|
+
var l = e.document, s = l.createElement(t.tagName);
|
|
68
|
+
if (u(s, t.classNames), v(s, t.attributes), t.contentType === "node" ? s.appendChild(
|
|
101
69
|
t.content.jquery ? t.content[0] : t.content
|
|
102
|
-
) : t.contentType === "html" ?
|
|
103
|
-
var d =
|
|
104
|
-
u(d, t.arrowClassNames), v(d, t.arrowAttributes),
|
|
70
|
+
) : t.contentType === "html" ? s.innerHTML = t.content : s.textContent = t.content, t.arrowTagName) {
|
|
71
|
+
var d = l.createElement(t.arrowTagName);
|
|
72
|
+
u(d, t.arrowClassNames), v(d, t.arrowAttributes), s.appendChild(d);
|
|
105
73
|
}
|
|
106
74
|
var p = t.parent.jquery ? t.parent[0] : t.parent;
|
|
107
75
|
if (typeof p == "string") {
|
|
108
|
-
if (p =
|
|
76
|
+
if (p = l.querySelectorAll(t.parent), p.length > 1 && console.warn(
|
|
109
77
|
"WARNING: the given `parent` query(" + t.parent + ") matched more than one element, the first one will be used"
|
|
110
78
|
), p.length === 0)
|
|
111
79
|
throw "ERROR: the given `parent` doesn't exists!";
|
|
@@ -113,41 +81,41 @@ const U = function() {
|
|
|
113
81
|
}
|
|
114
82
|
return p.length > 1 && !(p instanceof Element) && (console.warn(
|
|
115
83
|
"WARNING: you have passed as parent a list of elements, the first one will be used"
|
|
116
|
-
), p = p[0]), p.appendChild(
|
|
117
|
-
function u(
|
|
118
|
-
|
|
119
|
-
|
|
84
|
+
), p = p[0]), p.appendChild(s), s;
|
|
85
|
+
function u(w, y) {
|
|
86
|
+
y.forEach(function(C) {
|
|
87
|
+
w.classList.add(C);
|
|
120
88
|
});
|
|
121
89
|
}
|
|
122
|
-
function v(
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
90
|
+
function v(w, y) {
|
|
91
|
+
y.forEach(function(C) {
|
|
92
|
+
w.setAttribute(
|
|
93
|
+
C.split(":")[0],
|
|
94
|
+
C.split(":")[1] || ""
|
|
127
95
|
);
|
|
128
96
|
});
|
|
129
97
|
}
|
|
130
98
|
}, o.prototype._getPosition = function(t, i) {
|
|
131
|
-
if (
|
|
99
|
+
if (m(i), this._options.forceAbsolute)
|
|
132
100
|
return "absolute";
|
|
133
|
-
var
|
|
134
|
-
return
|
|
135
|
-
}, o.prototype._getOffsets = function(t, i,
|
|
136
|
-
|
|
137
|
-
var
|
|
138
|
-
|
|
139
|
-
var d =
|
|
101
|
+
var l = S(i);
|
|
102
|
+
return l ? "fixed" : "absolute";
|
|
103
|
+
}, o.prototype._getOffsets = function(t, i, l) {
|
|
104
|
+
l = l.split("-")[0];
|
|
105
|
+
var s = {};
|
|
106
|
+
s.position = this.state.position;
|
|
107
|
+
var d = s.position === "fixed", p = V(
|
|
140
108
|
i,
|
|
141
|
-
|
|
109
|
+
m(t),
|
|
142
110
|
d
|
|
143
|
-
), u =
|
|
144
|
-
return ["right", "left"].indexOf(
|
|
145
|
-
popper:
|
|
111
|
+
), u = n(t);
|
|
112
|
+
return ["right", "left"].indexOf(l) !== -1 ? (s.top = p.top + p.height / 2 - u.height / 2, l === "left" ? s.left = p.left - u.width : s.left = p.right) : (s.left = p.left + p.width / 2 - u.width / 2, l === "top" ? s.top = p.top - u.height : s.top = p.bottom), s.width = u.width, s.height = u.height, {
|
|
113
|
+
popper: s,
|
|
146
114
|
reference: p
|
|
147
115
|
};
|
|
148
116
|
}, o.prototype._setupEventListeners = function() {
|
|
149
117
|
if (this.state.updateBound = this.update.bind(this), e.addEventListener("resize", this.state.updateBound), this._options.boundariesElement !== "window") {
|
|
150
|
-
var t =
|
|
118
|
+
var t = g(this._reference);
|
|
151
119
|
(t === e.document.body || t === e.document.documentElement) && (t = e), t.addEventListener("scroll", this.state.updateBound), this.state.scrollTarget = t;
|
|
152
120
|
}
|
|
153
121
|
}, o.prototype._removeEventListeners = function() {
|
|
@@ -155,9 +123,9 @@ const U = function() {
|
|
|
155
123
|
"scroll",
|
|
156
124
|
this.state.updateBound
|
|
157
125
|
), this.state.scrollTarget = null), this.state.updateBound = null;
|
|
158
|
-
}, o.prototype._getBoundaries = function(t, i,
|
|
159
|
-
var
|
|
160
|
-
if (
|
|
126
|
+
}, o.prototype._getBoundaries = function(t, i, l) {
|
|
127
|
+
var s = {}, d, p;
|
|
128
|
+
if (l === "window") {
|
|
161
129
|
var u = e.document.body, v = e.document.documentElement;
|
|
162
130
|
p = Math.max(
|
|
163
131
|
u.scrollHeight,
|
|
@@ -171,64 +139,64 @@ const U = function() {
|
|
|
171
139
|
v.clientWidth,
|
|
172
140
|
v.scrollWidth,
|
|
173
141
|
v.offsetWidth
|
|
174
|
-
),
|
|
142
|
+
), s = {
|
|
175
143
|
top: 0,
|
|
176
144
|
right: d,
|
|
177
145
|
bottom: p,
|
|
178
146
|
left: 0
|
|
179
147
|
};
|
|
180
|
-
} else if (
|
|
181
|
-
var
|
|
182
|
-
return
|
|
148
|
+
} else if (l === "viewport") {
|
|
149
|
+
var w = m(this._popper), y = g(this._popper), C = M(w), I = function(k) {
|
|
150
|
+
return k == document.body ? Math.max(
|
|
183
151
|
document.documentElement.scrollTop,
|
|
184
152
|
document.body.scrollTop
|
|
185
|
-
) :
|
|
186
|
-
}, $ = function(
|
|
187
|
-
return
|
|
153
|
+
) : k.scrollTop;
|
|
154
|
+
}, $ = function(k) {
|
|
155
|
+
return k == document.body ? Math.max(
|
|
188
156
|
document.documentElement.scrollLeft,
|
|
189
157
|
document.body.scrollLeft
|
|
190
|
-
) :
|
|
191
|
-
}, T = t.offsets.popper.position === "fixed" ? 0 :
|
|
192
|
-
|
|
193
|
-
top: 0 - (
|
|
194
|
-
right: e.document.documentElement.clientWidth - (
|
|
195
|
-
bottom: e.document.documentElement.clientHeight - (
|
|
196
|
-
left: 0 - (
|
|
158
|
+
) : k.scrollLeft;
|
|
159
|
+
}, T = t.offsets.popper.position === "fixed" ? 0 : I(y), O = t.offsets.popper.position === "fixed" ? 0 : $(y);
|
|
160
|
+
s = {
|
|
161
|
+
top: 0 - (C.top - T),
|
|
162
|
+
right: e.document.documentElement.clientWidth - (C.left - O),
|
|
163
|
+
bottom: e.document.documentElement.clientHeight - (C.top - T),
|
|
164
|
+
left: 0 - (C.left - O)
|
|
197
165
|
};
|
|
198
166
|
} else
|
|
199
|
-
|
|
167
|
+
m(this._popper) === l ? s = {
|
|
200
168
|
top: 0,
|
|
201
169
|
left: 0,
|
|
202
|
-
right:
|
|
203
|
-
bottom:
|
|
204
|
-
} :
|
|
205
|
-
return
|
|
206
|
-
}, o.prototype.runModifiers = function(t, i,
|
|
207
|
-
var
|
|
208
|
-
return
|
|
170
|
+
right: l.clientWidth,
|
|
171
|
+
bottom: l.clientHeight
|
|
172
|
+
} : s = M(l);
|
|
173
|
+
return s.left += i, s.right -= i, s.top = s.top + i, s.bottom = s.bottom - i, s;
|
|
174
|
+
}, o.prototype.runModifiers = function(t, i, l) {
|
|
175
|
+
var s = i.slice();
|
|
176
|
+
return l !== void 0 && (s = this._options.modifiers.slice(
|
|
209
177
|
0,
|
|
210
|
-
c(this._options.modifiers,
|
|
211
|
-
)),
|
|
178
|
+
c(this._options.modifiers, l)
|
|
179
|
+
)), s.forEach(
|
|
212
180
|
function(d) {
|
|
213
|
-
|
|
181
|
+
_(d) && (t = d.call(this, t));
|
|
214
182
|
}.bind(this)
|
|
215
183
|
), t;
|
|
216
184
|
}, o.prototype.isModifierRequired = function(t, i) {
|
|
217
|
-
var
|
|
218
|
-
return !!this._options.modifiers.slice(0,
|
|
219
|
-
return
|
|
185
|
+
var l = c(this._options.modifiers, t);
|
|
186
|
+
return !!this._options.modifiers.slice(0, l).filter(function(s) {
|
|
187
|
+
return s === i;
|
|
220
188
|
}).length;
|
|
221
189
|
}, o.prototype.modifiers = {}, o.prototype.modifiers.applyStyle = function(t) {
|
|
222
190
|
var i = {
|
|
223
191
|
position: t.offsets.popper.position
|
|
224
|
-
},
|
|
225
|
-
return this._options.gpuAcceleration && (d =
|
|
192
|
+
}, l = Math.round(t.offsets.popper.left), s = Math.round(t.offsets.popper.top), d;
|
|
193
|
+
return this._options.gpuAcceleration && (d = D("transform")) ? (i[d] = "translate3d(" + l + "px, " + s + "px, 0)", i.top = 0, i.left = 0) : (i.left = l, i.top = s), Object.assign(i, t.styles), b(this._popper, i), this._popper.setAttribute("x-placement", t.placement), this.isModifierRequired(
|
|
226
194
|
this.modifiers.applyStyle,
|
|
227
195
|
this.modifiers.arrow
|
|
228
|
-
) && t.offsets.arrow &&
|
|
196
|
+
) && t.offsets.arrow && b(t.arrowElement, t.offsets.arrow), t;
|
|
229
197
|
}, o.prototype.modifiers.shift = function(t) {
|
|
230
|
-
var i = t.placement,
|
|
231
|
-
if (
|
|
198
|
+
var i = t.placement, l = i.split("-")[0], s = i.split("-")[1];
|
|
199
|
+
if (s) {
|
|
232
200
|
var d = t.offsets.reference, p = f(t.offsets.popper), u = {
|
|
233
201
|
y: {
|
|
234
202
|
start: { top: d.top },
|
|
@@ -242,44 +210,44 @@ const U = function() {
|
|
|
242
210
|
left: d.left + d.width - p.width
|
|
243
211
|
}
|
|
244
212
|
}
|
|
245
|
-
}, v = ["bottom", "top"].indexOf(
|
|
213
|
+
}, v = ["bottom", "top"].indexOf(l) !== -1 ? "x" : "y";
|
|
246
214
|
t.offsets.popper = Object.assign(
|
|
247
215
|
p,
|
|
248
|
-
u[v][
|
|
216
|
+
u[v][s]
|
|
249
217
|
);
|
|
250
218
|
}
|
|
251
219
|
return t;
|
|
252
220
|
}, o.prototype.modifiers.preventOverflow = function(t) {
|
|
253
|
-
var i = this._options.preventOverflowOrder,
|
|
221
|
+
var i = this._options.preventOverflowOrder, l = f(t.offsets.popper), s = {
|
|
254
222
|
left: function() {
|
|
255
|
-
var d =
|
|
256
|
-
return
|
|
223
|
+
var d = l.left;
|
|
224
|
+
return l.left < t.boundaries.left && (d = Math.max(l.left, t.boundaries.left)), { left: d };
|
|
257
225
|
},
|
|
258
226
|
right: function() {
|
|
259
|
-
var d =
|
|
260
|
-
return
|
|
261
|
-
|
|
262
|
-
t.boundaries.right -
|
|
227
|
+
var d = l.left;
|
|
228
|
+
return l.right > t.boundaries.right && (d = Math.min(
|
|
229
|
+
l.left,
|
|
230
|
+
t.boundaries.right - l.width
|
|
263
231
|
)), { left: d };
|
|
264
232
|
},
|
|
265
233
|
top: function() {
|
|
266
|
-
var d =
|
|
267
|
-
return
|
|
234
|
+
var d = l.top;
|
|
235
|
+
return l.top < t.boundaries.top && (d = Math.max(l.top, t.boundaries.top)), { top: d };
|
|
268
236
|
},
|
|
269
237
|
bottom: function() {
|
|
270
|
-
var d =
|
|
271
|
-
return
|
|
272
|
-
|
|
273
|
-
t.boundaries.bottom -
|
|
238
|
+
var d = l.top;
|
|
239
|
+
return l.bottom > t.boundaries.bottom && (d = Math.min(
|
|
240
|
+
l.top,
|
|
241
|
+
t.boundaries.bottom - l.height
|
|
274
242
|
)), { top: d };
|
|
275
243
|
}
|
|
276
244
|
};
|
|
277
245
|
return i.forEach(function(d) {
|
|
278
|
-
t.offsets.popper = Object.assign(
|
|
246
|
+
t.offsets.popper = Object.assign(l, s[d]());
|
|
279
247
|
}), t;
|
|
280
248
|
}, o.prototype.modifiers.keepTogether = function(t) {
|
|
281
|
-
var i = f(t.offsets.popper),
|
|
282
|
-
return i.right <
|
|
249
|
+
var i = f(t.offsets.popper), l = t.offsets.reference, s = Math.floor;
|
|
250
|
+
return i.right < s(l.left) && (t.offsets.popper.left = s(l.left) - i.width), i.left > s(l.right) && (t.offsets.popper.left = s(l.right)), i.bottom < s(l.top) && (t.offsets.popper.top = s(l.top) - i.height), i.top > s(l.bottom) && (t.offsets.popper.top = s(l.bottom)), t;
|
|
283
251
|
}, o.prototype.modifiers.flip = function(t) {
|
|
284
252
|
if (!this.isModifierRequired(
|
|
285
253
|
this.modifiers.flip,
|
|
@@ -290,13 +258,13 @@ const U = function() {
|
|
|
290
258
|
), t;
|
|
291
259
|
if (t.flipped && t.placement === t._originalPlacement)
|
|
292
260
|
return t;
|
|
293
|
-
var i = t.placement.split("-")[0],
|
|
294
|
-
return this._options.flipBehavior === "flip" ? d = [i,
|
|
261
|
+
var i = t.placement.split("-")[0], l = a(i), s = t.placement.split("-")[1] || "", d = [];
|
|
262
|
+
return this._options.flipBehavior === "flip" ? d = [i, l] : d = this._options.flipBehavior, d.forEach(
|
|
295
263
|
function(p, u) {
|
|
296
264
|
if (!(i !== p || d.length === u + 1)) {
|
|
297
|
-
i = t.placement.split("-")[0],
|
|
298
|
-
var v = f(t.offsets.popper),
|
|
299
|
-
(
|
|
265
|
+
i = t.placement.split("-")[0], l = a(i);
|
|
266
|
+
var v = f(t.offsets.popper), w = ["right", "bottom"].indexOf(i) !== -1;
|
|
267
|
+
(w && Math.floor(t.offsets.reference[i]) > Math.floor(v[l]) || !w && Math.floor(t.offsets.reference[i]) < Math.floor(v[l])) && (t.flipped = !0, t.placement = d[u + 1], s && (t.placement += "-" + s), t.offsets.popper = this._getOffsets(
|
|
300
268
|
this._popper,
|
|
301
269
|
this._reference,
|
|
302
270
|
t.placement
|
|
@@ -309,10 +277,10 @@ const U = function() {
|
|
|
309
277
|
}.bind(this)
|
|
310
278
|
), t;
|
|
311
279
|
}, o.prototype.modifiers.offset = function(t) {
|
|
312
|
-
var i = this._options.offset,
|
|
313
|
-
return t.placement.indexOf("left") !== -1 ?
|
|
280
|
+
var i = this._options.offset, l = t.offsets.popper;
|
|
281
|
+
return t.placement.indexOf("left") !== -1 ? l.top -= i : t.placement.indexOf("right") !== -1 ? l.top += i : t.placement.indexOf("top") !== -1 ? l.left -= i : t.placement.indexOf("bottom") !== -1 && (l.left += i), t;
|
|
314
282
|
}, o.prototype.modifiers.arrow = function(t) {
|
|
315
|
-
var i = this._options.arrowElement,
|
|
283
|
+
var i = this._options.arrowElement, l = this._options.arrowOffset;
|
|
316
284
|
if (typeof i == "string" && (i = this._popper.querySelector(i)), !i)
|
|
317
285
|
return t;
|
|
318
286
|
if (!this._popper.contains(i))
|
|
@@ -326,32 +294,32 @@ const U = function() {
|
|
|
326
294
|
return console.warn(
|
|
327
295
|
"WARNING: keepTogether modifier is required by arrow modifier in order to work, be sure to include it before arrow!"
|
|
328
296
|
), t;
|
|
329
|
-
var
|
|
330
|
-
u[
|
|
331
|
-
var T = u[
|
|
332
|
-
return
|
|
333
|
-
Math.min(p[
|
|
297
|
+
var s = {}, d = t.placement.split("-")[0], p = f(t.offsets.popper), u = t.offsets.reference, v = ["left", "right"].indexOf(d) !== -1, w = v ? "height" : "width", y = v ? "top" : "left", C = v ? "left" : "top", I = v ? "bottom" : "right", $ = n(i)[w];
|
|
298
|
+
u[I] - $ < p[y] && (t.offsets.popper[y] -= p[y] - (u[I] - $)), u[y] + $ > p[I] && (t.offsets.popper[y] += u[y] + $ - p[I]);
|
|
299
|
+
var T = u[y] + (l || u[w] / 2 - $ / 2), O = T - p[y];
|
|
300
|
+
return O = Math.max(
|
|
301
|
+
Math.min(p[w] - $ - 10, O),
|
|
334
302
|
8
|
|
335
|
-
),
|
|
303
|
+
), s[y] = O, s[C] = "", t.offsets.arrow = s, t.arrowElement = i, t;
|
|
336
304
|
};
|
|
337
|
-
function
|
|
338
|
-
var i = t.style.display,
|
|
305
|
+
function n(t) {
|
|
306
|
+
var i = t.style.display, l = t.style.visibility;
|
|
339
307
|
t.style.display = "block", t.style.visibility = "hidden", t.offsetWidth;
|
|
340
|
-
var
|
|
308
|
+
var s = e.getComputedStyle(t), d = parseFloat(s.marginTop) + parseFloat(s.marginBottom), p = parseFloat(s.marginLeft) + parseFloat(s.marginRight), u = {
|
|
341
309
|
width: t.offsetWidth + p,
|
|
342
310
|
height: t.offsetHeight + d
|
|
343
311
|
};
|
|
344
|
-
return t.style.display = i, t.style.visibility =
|
|
312
|
+
return t.style.display = i, t.style.visibility = l, u;
|
|
345
313
|
}
|
|
346
|
-
function
|
|
314
|
+
function a(t) {
|
|
347
315
|
var i = {
|
|
348
316
|
left: "right",
|
|
349
317
|
right: "left",
|
|
350
318
|
bottom: "top",
|
|
351
319
|
top: "bottom"
|
|
352
320
|
};
|
|
353
|
-
return t.replace(/left|right|bottom|top/g, function(
|
|
354
|
-
return i[
|
|
321
|
+
return t.replace(/left|right|bottom|top/g, function(l) {
|
|
322
|
+
return i[l];
|
|
355
323
|
});
|
|
356
324
|
}
|
|
357
325
|
function f(t) {
|
|
@@ -359,23 +327,23 @@ const U = function() {
|
|
|
359
327
|
return i.right = i.left + i.width, i.bottom = i.top + i.height, i;
|
|
360
328
|
}
|
|
361
329
|
function c(t, i) {
|
|
362
|
-
var
|
|
363
|
-
for (
|
|
364
|
-
if (t[
|
|
365
|
-
return
|
|
366
|
-
|
|
330
|
+
var l = 0, s;
|
|
331
|
+
for (s in t) {
|
|
332
|
+
if (t[s] === i)
|
|
333
|
+
return l;
|
|
334
|
+
l++;
|
|
367
335
|
}
|
|
368
336
|
return null;
|
|
369
337
|
}
|
|
370
338
|
function h(t, i) {
|
|
371
|
-
var
|
|
372
|
-
return
|
|
339
|
+
var l = e.getComputedStyle(t, null);
|
|
340
|
+
return l[i];
|
|
373
341
|
}
|
|
374
|
-
function
|
|
342
|
+
function m(t) {
|
|
375
343
|
var i = t.offsetParent;
|
|
376
344
|
return i === e.document.body || !i ? e.document.documentElement : i;
|
|
377
345
|
}
|
|
378
|
-
function
|
|
346
|
+
function g(t) {
|
|
379
347
|
var i = t.parentNode;
|
|
380
348
|
return i ? i === e.document ? e.document.body.scrollTop || e.document.body.scrollLeft ? e.document.body : e.document.documentElement : ["scroll", "auto"].indexOf(
|
|
381
349
|
h(i, "overflow")
|
|
@@ -383,23 +351,23 @@ const U = function() {
|
|
|
383
351
|
h(i, "overflow-x")
|
|
384
352
|
) !== -1 || ["scroll", "auto"].indexOf(
|
|
385
353
|
h(i, "overflow-y")
|
|
386
|
-
) !== -1 ? i :
|
|
354
|
+
) !== -1 ? i : g(t.parentNode) : t;
|
|
387
355
|
}
|
|
388
|
-
function
|
|
389
|
-
return t === e.document.body ? !1 : h(t, "position") === "fixed" ? !0 : t.parentNode ?
|
|
356
|
+
function S(t) {
|
|
357
|
+
return t === e.document.body ? !1 : h(t, "position") === "fixed" ? !0 : t.parentNode ? S(t.parentNode) : t;
|
|
390
358
|
}
|
|
391
|
-
function
|
|
392
|
-
function
|
|
393
|
-
return
|
|
359
|
+
function b(t, i) {
|
|
360
|
+
function l(s) {
|
|
361
|
+
return s !== "" && !isNaN(parseFloat(s)) && isFinite(s);
|
|
394
362
|
}
|
|
395
|
-
Object.keys(i).forEach(function(
|
|
363
|
+
Object.keys(i).forEach(function(s) {
|
|
396
364
|
var d = "";
|
|
397
365
|
["width", "height", "top", "right", "bottom", "left"].indexOf(
|
|
398
|
-
|
|
399
|
-
) !== -1 &&
|
|
366
|
+
s
|
|
367
|
+
) !== -1 && l(i[s]) && (d = "px"), t.style[s] = i[s] + d;
|
|
400
368
|
});
|
|
401
369
|
}
|
|
402
|
-
function
|
|
370
|
+
function _(t) {
|
|
403
371
|
var i = {};
|
|
404
372
|
return t && i.toString.call(t) === "[object Function]";
|
|
405
373
|
}
|
|
@@ -412,38 +380,38 @@ const U = function() {
|
|
|
412
380
|
};
|
|
413
381
|
return i.right = i.left + i.width, i.bottom = i.top + i.height, i;
|
|
414
382
|
}
|
|
415
|
-
function
|
|
416
|
-
var i = t.getBoundingClientRect(),
|
|
383
|
+
function E(t) {
|
|
384
|
+
var i = t.getBoundingClientRect(), l = navigator.userAgent.indexOf("MSIE") != -1, s = l && t.tagName === "HTML" ? -t.scrollTop : i.top;
|
|
417
385
|
return {
|
|
418
386
|
left: i.left,
|
|
419
|
-
top:
|
|
387
|
+
top: s,
|
|
420
388
|
right: i.right,
|
|
421
389
|
bottom: i.bottom,
|
|
422
390
|
width: i.right - i.left,
|
|
423
|
-
height: i.bottom -
|
|
391
|
+
height: i.bottom - s
|
|
424
392
|
};
|
|
425
393
|
}
|
|
426
|
-
function
|
|
427
|
-
var
|
|
428
|
-
if (
|
|
429
|
-
var p =
|
|
394
|
+
function V(t, i, l) {
|
|
395
|
+
var s = E(t), d = E(i);
|
|
396
|
+
if (l) {
|
|
397
|
+
var p = g(i);
|
|
430
398
|
d.top += p.scrollTop, d.bottom += p.scrollTop, d.left += p.scrollLeft, d.right += p.scrollLeft;
|
|
431
399
|
}
|
|
432
400
|
var u = {
|
|
433
|
-
top:
|
|
434
|
-
left:
|
|
435
|
-
bottom:
|
|
436
|
-
right:
|
|
437
|
-
width:
|
|
438
|
-
height:
|
|
401
|
+
top: s.top - d.top,
|
|
402
|
+
left: s.left - d.left,
|
|
403
|
+
bottom: s.top - d.top + s.height,
|
|
404
|
+
right: s.left - d.left + s.width,
|
|
405
|
+
width: s.width,
|
|
406
|
+
height: s.height
|
|
439
407
|
};
|
|
440
408
|
return u;
|
|
441
409
|
}
|
|
442
|
-
function
|
|
443
|
-
for (var i = ["", "ms", "webkit", "moz", "o"],
|
|
444
|
-
var
|
|
445
|
-
if (typeof e.document.body.style[
|
|
446
|
-
return
|
|
410
|
+
function D(t) {
|
|
411
|
+
for (var i = ["", "ms", "webkit", "moz", "o"], l = 0; l < i.length; l++) {
|
|
412
|
+
var s = i[l] ? i[l] + t.charAt(0).toUpperCase() + t.slice(1) : t;
|
|
413
|
+
if (typeof e.document.body.style[s] < "u")
|
|
414
|
+
return s;
|
|
447
415
|
}
|
|
448
416
|
return null;
|
|
449
417
|
}
|
|
@@ -456,23 +424,23 @@ const U = function() {
|
|
|
456
424
|
throw new TypeError(
|
|
457
425
|
"Cannot convert first argument to object"
|
|
458
426
|
);
|
|
459
|
-
for (var i = Object(t),
|
|
460
|
-
var
|
|
461
|
-
if (
|
|
462
|
-
|
|
463
|
-
for (var d = Object.keys(
|
|
464
|
-
var v = d[p],
|
|
465
|
-
|
|
427
|
+
for (var i = Object(t), l = 1; l < arguments.length; l++) {
|
|
428
|
+
var s = arguments[l];
|
|
429
|
+
if (s != null) {
|
|
430
|
+
s = Object(s);
|
|
431
|
+
for (var d = Object.keys(s), p = 0, u = d.length; p < u; p++) {
|
|
432
|
+
var v = d[p], w = Object.getOwnPropertyDescriptor(
|
|
433
|
+
s,
|
|
466
434
|
v
|
|
467
435
|
);
|
|
468
|
-
|
|
436
|
+
w !== void 0 && w.enumerable && (i[v] = s[v]);
|
|
469
437
|
}
|
|
470
438
|
}
|
|
471
439
|
}
|
|
472
440
|
return i;
|
|
473
441
|
}
|
|
474
442
|
}), o;
|
|
475
|
-
}(),
|
|
443
|
+
}(), F = (e) => e.stopPropagation(), Y = {
|
|
476
444
|
props: {
|
|
477
445
|
placement: {
|
|
478
446
|
type: String,
|
|
@@ -490,7 +458,7 @@ const U = function() {
|
|
|
490
458
|
},
|
|
491
459
|
arrowOffset: {
|
|
492
460
|
type: Number,
|
|
493
|
-
default:
|
|
461
|
+
default: 0
|
|
494
462
|
},
|
|
495
463
|
appendToBody: {
|
|
496
464
|
type: Boolean,
|
|
@@ -530,9 +498,9 @@ const U = function() {
|
|
|
530
498
|
return;
|
|
531
499
|
const e = this.popperOptions, r = this.popperElm = this.popperElm || this.popper || this.$refs.popover;
|
|
532
500
|
let o = this.referenceElm = this.referenceElm || this.reference || this.$refs.reference;
|
|
533
|
-
!o && this.$slots.reference && this.$slots.reference[0] && (o = this.referenceElm = this.$slots.reference[0].elm), !(!r || !o) && (this.visibleArrow && this.appendArrow(r), this.appendToBody && document.body.appendChild(this.popperElm), this.popperJS && this.popperJS.destroy && this.popperJS.destroy(), e.placement = this.currentPlacement, e.offset = this.offset, e.arrowOffset = this.arrowOffset, this.popperJS = new U(o, r, e), this.popperJS.onCreate((
|
|
501
|
+
!o && this.$slots.reference && this.$slots.reference[0] && (o = this.referenceElm = this.$slots.reference[0].elm), !(!r || !o) && (this.visibleArrow && this.appendArrow(r), this.appendToBody && document.body.appendChild(this.popperElm), this.popperJS && this.popperJS.destroy && this.popperJS.destroy(), e.placement = this.currentPlacement, e.offset = this.offset, e.arrowOffset = this.arrowOffset, this.popperJS = new U(o, r, e), this.popperJS.onCreate((n) => {
|
|
534
502
|
this.$emit("created", this), this.$nextTick(this.updatePopper);
|
|
535
|
-
}), typeof e.onUpdate == "function" && this.popperJS.onUpdate(e.onUpdate), this.popperJS._popper.style.zIndex = 1e3, this.popperElm.addEventListener("click",
|
|
503
|
+
}), typeof e.onUpdate == "function" && this.popperJS.onUpdate(e.onUpdate), this.popperJS._popper.style.zIndex = 1e3, this.popperElm.addEventListener("click", F));
|
|
536
504
|
},
|
|
537
505
|
updatePopper() {
|
|
538
506
|
const e = this.popperJS;
|
|
@@ -546,9 +514,9 @@ const U = function() {
|
|
|
546
514
|
if (this.appended)
|
|
547
515
|
return;
|
|
548
516
|
this.appended = !0;
|
|
549
|
-
for (let
|
|
550
|
-
if (/^_v-/.test(e.attributes[
|
|
551
|
-
r = e.attributes[
|
|
517
|
+
for (let n in e.attributes)
|
|
518
|
+
if (/^_v-/.test(e.attributes[n].name)) {
|
|
519
|
+
r = e.attributes[n].name;
|
|
552
520
|
break;
|
|
553
521
|
}
|
|
554
522
|
const o = document.createElement("div");
|
|
@@ -556,7 +524,7 @@ const U = function() {
|
|
|
556
524
|
}
|
|
557
525
|
},
|
|
558
526
|
beforeDestroy() {
|
|
559
|
-
this.doDestroy(!0), this.popperElm && this.popperElm.parentNode === document.body && (this.popperElm.removeEventListener("click",
|
|
527
|
+
this.doDestroy(!0), this.popperElm && this.popperElm.parentNode === document.body && (this.popperElm.removeEventListener("click", F), document.body.removeChild(this.popperElm));
|
|
560
528
|
},
|
|
561
529
|
// call destroy in keep-alive mode
|
|
562
530
|
deactivated() {
|
|
@@ -565,7 +533,9 @@ const U = function() {
|
|
|
565
533
|
};
|
|
566
534
|
var Z = function() {
|
|
567
535
|
var e = this, r = e.$createElement, o = e._self._c || r;
|
|
568
|
-
return o("span",
|
|
536
|
+
return o("span", {
|
|
537
|
+
staticClass: "dp-popover_box_"
|
|
538
|
+
}, [o("div", {
|
|
569
539
|
directives: [{
|
|
570
540
|
name: "show",
|
|
571
541
|
rawName: "v-show",
|
|
@@ -581,38 +551,41 @@ var Z = function() {
|
|
|
581
551
|
return [e._v(e._s(e.content))];
|
|
582
552
|
})], 2), o("span", {
|
|
583
553
|
ref: "trigger",
|
|
554
|
+
staticClass: "dp-popover_ref_",
|
|
584
555
|
on: {
|
|
585
|
-
click:
|
|
556
|
+
click: function(n) {
|
|
557
|
+
return n.stopPropagation(), e.handleToggleShow.apply(null, arguments);
|
|
558
|
+
}
|
|
586
559
|
}
|
|
587
560
|
}, [e._t("reference")], 2)]);
|
|
588
561
|
}, X = [];
|
|
589
|
-
function
|
|
590
|
-
var
|
|
591
|
-
r && (
|
|
592
|
-
var
|
|
593
|
-
if (c ? (
|
|
594
|
-
|
|
562
|
+
function x(e, r, o, n, a, f, c, h) {
|
|
563
|
+
var m = typeof e == "function" ? e.options : e;
|
|
564
|
+
r && (m.render = r, m.staticRenderFns = o, m._compiled = !0), n && (m.functional = !0), f && (m._scopeId = "data-v-" + f);
|
|
565
|
+
var g;
|
|
566
|
+
if (c ? (g = function(_) {
|
|
567
|
+
_ = _ || // cached call
|
|
595
568
|
this.$vnode && this.$vnode.ssrContext || // stateful
|
|
596
|
-
this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !
|
|
597
|
-
},
|
|
598
|
-
|
|
569
|
+
this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !_ && typeof __VUE_SSR_CONTEXT__ < "u" && (_ = __VUE_SSR_CONTEXT__), a && a.call(this, _), _ && _._registeredComponents && _._registeredComponents.add(c);
|
|
570
|
+
}, m._ssrRegister = g) : a && (g = h ? function() {
|
|
571
|
+
a.call(
|
|
599
572
|
this,
|
|
600
|
-
(
|
|
573
|
+
(m.functional ? this.parent : this).$root.$options.shadowRoot
|
|
601
574
|
);
|
|
602
|
-
} :
|
|
603
|
-
if (
|
|
604
|
-
|
|
605
|
-
var
|
|
606
|
-
|
|
607
|
-
return
|
|
575
|
+
} : a), g)
|
|
576
|
+
if (m.functional) {
|
|
577
|
+
m._injectStyles = g;
|
|
578
|
+
var S = m.render;
|
|
579
|
+
m.render = function(M, E) {
|
|
580
|
+
return g.call(E), S(M, E);
|
|
608
581
|
};
|
|
609
582
|
} else {
|
|
610
|
-
var
|
|
611
|
-
|
|
583
|
+
var b = m.beforeCreate;
|
|
584
|
+
m.beforeCreate = b ? [].concat(b, g) : [g];
|
|
612
585
|
}
|
|
613
586
|
return {
|
|
614
587
|
exports: e,
|
|
615
|
-
options:
|
|
588
|
+
options: m
|
|
616
589
|
};
|
|
617
590
|
}
|
|
618
591
|
const Q = {
|
|
@@ -680,13 +653,13 @@ const Q = {
|
|
|
680
653
|
e && (e.removeEventListener("mouseenter", this.handleMouseEnter), e.removeEventListener("mouseleave", this.handleMouseLeave), r.removeEventListener("mouseenter", this.handleMouseEnter), r.removeEventListener("mouseleave", this.handleMouseLeave));
|
|
681
654
|
}
|
|
682
655
|
}, H = {};
|
|
683
|
-
var ee = /* @__PURE__ */
|
|
656
|
+
var ee = /* @__PURE__ */ x(
|
|
684
657
|
Q,
|
|
685
658
|
Z,
|
|
686
659
|
X,
|
|
687
660
|
!1,
|
|
688
661
|
te,
|
|
689
|
-
"
|
|
662
|
+
"b930cdc4",
|
|
690
663
|
null,
|
|
691
664
|
null
|
|
692
665
|
);
|
|
@@ -705,8 +678,8 @@ var oe = function() {
|
|
|
705
678
|
disabled: e.disabled
|
|
706
679
|
},
|
|
707
680
|
on: {
|
|
708
|
-
click: function(
|
|
709
|
-
return
|
|
681
|
+
click: function(n) {
|
|
682
|
+
return n.stopPropagation(), e.handleChange.apply(null, arguments);
|
|
710
683
|
}
|
|
711
684
|
}
|
|
712
685
|
}, [o("span", {
|
|
@@ -736,23 +709,23 @@ const ie = {
|
|
|
736
709
|
this.$emit("change", e, this.data.key);
|
|
737
710
|
}
|
|
738
711
|
}
|
|
739
|
-
},
|
|
740
|
-
var
|
|
712
|
+
}, B = {};
|
|
713
|
+
var ne = /* @__PURE__ */ x(
|
|
741
714
|
ie,
|
|
742
715
|
oe,
|
|
743
716
|
re,
|
|
744
717
|
!1,
|
|
745
|
-
|
|
718
|
+
se,
|
|
746
719
|
"1bea0315",
|
|
747
720
|
null,
|
|
748
721
|
null
|
|
749
722
|
);
|
|
750
|
-
function
|
|
751
|
-
for (let r in
|
|
752
|
-
this[r] =
|
|
723
|
+
function se(e) {
|
|
724
|
+
for (let r in B)
|
|
725
|
+
this[r] = B[r];
|
|
753
726
|
}
|
|
754
727
|
const ae = /* @__PURE__ */ function() {
|
|
755
|
-
return
|
|
728
|
+
return ne.exports;
|
|
756
729
|
}();
|
|
757
730
|
var le = function() {
|
|
758
731
|
var e = this, r = e.$createElement, o = e._self._c || r;
|
|
@@ -762,8 +735,8 @@ var le = function() {
|
|
|
762
735
|
disabled: e.disabled
|
|
763
736
|
},
|
|
764
737
|
on: {
|
|
765
|
-
click: function(
|
|
766
|
-
return
|
|
738
|
+
click: function(n) {
|
|
739
|
+
return n.stopPropagation(), e.handleChange.apply(null, arguments);
|
|
767
740
|
}
|
|
768
741
|
}
|
|
769
742
|
}, [o("span", {
|
|
@@ -792,23 +765,23 @@ const pe = {
|
|
|
792
765
|
this.$emit("change", this.data.code, this.data.key);
|
|
793
766
|
}
|
|
794
767
|
}
|
|
795
|
-
},
|
|
796
|
-
var
|
|
768
|
+
}, P = {};
|
|
769
|
+
var ce = /* @__PURE__ */ x(
|
|
797
770
|
pe,
|
|
798
771
|
le,
|
|
799
772
|
de,
|
|
800
773
|
!1,
|
|
801
|
-
|
|
774
|
+
he,
|
|
802
775
|
"1d357f3a",
|
|
803
776
|
null,
|
|
804
777
|
null
|
|
805
778
|
);
|
|
806
|
-
function
|
|
807
|
-
for (let r in
|
|
808
|
-
this[r] =
|
|
779
|
+
function he(e) {
|
|
780
|
+
for (let r in P)
|
|
781
|
+
this[r] = P[r];
|
|
809
782
|
}
|
|
810
783
|
const fe = /* @__PURE__ */ function() {
|
|
811
|
-
return
|
|
784
|
+
return ce.exports;
|
|
812
785
|
}();
|
|
813
786
|
var ue = function() {
|
|
814
787
|
var e = this, r = e.$createElement, o = e._self._c || r;
|
|
@@ -827,11 +800,11 @@ var ue = function() {
|
|
|
827
800
|
class: [e.value.length && "dp-checkfilter_title_checked_"]
|
|
828
801
|
}, [e._v(e._s(e.title))]), o("span", {
|
|
829
802
|
staticClass: "dp-checkfilter_arrow_"
|
|
830
|
-
})]), o("div", [e.type === "check" ? e._l(e.option, function(
|
|
803
|
+
})]), o("div", [e.type === "check" ? e._l(e.option, function(n) {
|
|
831
804
|
return o("dp-check", {
|
|
832
|
-
key:
|
|
805
|
+
key: n.code,
|
|
833
806
|
attrs: {
|
|
834
|
-
data: Object.assign({},
|
|
807
|
+
data: Object.assign({}, n, {
|
|
835
808
|
key: e.code
|
|
836
809
|
}),
|
|
837
810
|
value: e.value
|
|
@@ -840,11 +813,11 @@ var ue = function() {
|
|
|
840
813
|
change: e.handleChange
|
|
841
814
|
}
|
|
842
815
|
});
|
|
843
|
-
}) : e.type === "radio" ? e._l(e.option, function(
|
|
816
|
+
}) : e.type === "radio" ? e._l(e.option, function(n) {
|
|
844
817
|
return o("dp-radio", {
|
|
845
|
-
key:
|
|
818
|
+
key: n.code,
|
|
846
819
|
attrs: {
|
|
847
|
-
data: Object.assign({},
|
|
820
|
+
data: Object.assign({}, n, {
|
|
848
821
|
key: e.code
|
|
849
822
|
}),
|
|
850
823
|
value: e.value[0]
|
|
@@ -855,7 +828,7 @@ var ue = function() {
|
|
|
855
828
|
});
|
|
856
829
|
}) : e._e()], 2)]);
|
|
857
830
|
}, _e = [];
|
|
858
|
-
const
|
|
831
|
+
const me = {
|
|
859
832
|
name: "dp-checkfilter",
|
|
860
833
|
components: {
|
|
861
834
|
DpPopover: G,
|
|
@@ -892,8 +865,8 @@ const ve = {
|
|
|
892
865
|
}
|
|
893
866
|
}
|
|
894
867
|
}, N = {};
|
|
895
|
-
var
|
|
896
|
-
|
|
868
|
+
var ve = /* @__PURE__ */ x(
|
|
869
|
+
me,
|
|
897
870
|
ue,
|
|
898
871
|
_e,
|
|
899
872
|
!1,
|
|
@@ -906,10 +879,10 @@ function ge(e) {
|
|
|
906
879
|
for (let r in N)
|
|
907
880
|
this[r] = N[r];
|
|
908
881
|
}
|
|
909
|
-
const
|
|
910
|
-
return
|
|
882
|
+
const ye = /* @__PURE__ */ function() {
|
|
883
|
+
return ve.exports;
|
|
911
884
|
}();
|
|
912
|
-
var
|
|
885
|
+
var be = function() {
|
|
913
886
|
var e = this, r = e.$createElement, o = e._self._c || r;
|
|
914
887
|
return o("li", {
|
|
915
888
|
class: ["dp-table_header_item_ dp-table_header_item_height_", e.item.children ? "dp-table_header_item_group_" : "dp-table_header_item_border_", e.item.sortKey && "dp-table_header_item_cursor_"],
|
|
@@ -918,8 +891,8 @@ var ye = function() {
|
|
|
918
891
|
justifyContent: e.align
|
|
919
892
|
}, e.item.style, e.item.privateStyle),
|
|
920
893
|
on: {
|
|
921
|
-
click: function(
|
|
922
|
-
return
|
|
894
|
+
click: function(n) {
|
|
895
|
+
return n.stopPropagation(), e.handleItemClick(e.item, e.fullCode);
|
|
923
896
|
}
|
|
924
897
|
}
|
|
925
898
|
}, [e._t(e.item.slot || e.item.code, function() {
|
|
@@ -937,13 +910,13 @@ var ye = function() {
|
|
|
937
910
|
style: {
|
|
938
911
|
borderColor: e.borderColor
|
|
939
912
|
}
|
|
940
|
-
}, e._l(e.item.children, function(
|
|
913
|
+
}, e._l(e.item.children, function(n) {
|
|
941
914
|
return o("dp-table-header-item", {
|
|
942
|
-
key:
|
|
915
|
+
key: n.code,
|
|
943
916
|
attrs: {
|
|
944
917
|
align: e.align,
|
|
945
|
-
fullCode: [].concat(e.fullCode, [
|
|
946
|
-
item:
|
|
918
|
+
fullCode: [].concat(e.fullCode, [n.code]),
|
|
919
|
+
item: n,
|
|
947
920
|
borderColor: e.borderColor,
|
|
948
921
|
sortInfo: e.sortInfo,
|
|
949
922
|
filterInfo: e.filterInfo
|
|
@@ -953,7 +926,7 @@ var ye = function() {
|
|
|
953
926
|
changeSort: e.handleItemClick,
|
|
954
927
|
changeFilter: e.handleChangeFilter
|
|
955
928
|
},
|
|
956
|
-
scopedSlots: e._u([e._l(e.$slots, function(
|
|
929
|
+
scopedSlots: e._u([e._l(e.$slots, function(a, f) {
|
|
957
930
|
return {
|
|
958
931
|
key: f,
|
|
959
932
|
fn: function() {
|
|
@@ -990,7 +963,7 @@ var ye = function() {
|
|
|
990
963
|
const Ce = {
|
|
991
964
|
name: "dp-table-header-item",
|
|
992
965
|
components: {
|
|
993
|
-
DpCheckfilter:
|
|
966
|
+
DpCheckfilter: ye
|
|
994
967
|
},
|
|
995
968
|
props: {
|
|
996
969
|
item: {
|
|
@@ -1025,7 +998,6 @@ const Ce = {
|
|
|
1025
998
|
},
|
|
1026
999
|
data() {
|
|
1027
1000
|
return {
|
|
1028
|
-
resizer: null,
|
|
1029
1001
|
widthObj: {}
|
|
1030
1002
|
};
|
|
1031
1003
|
},
|
|
@@ -1044,56 +1016,54 @@ const Ce = {
|
|
|
1044
1016
|
}
|
|
1045
1017
|
},
|
|
1046
1018
|
mounted() {
|
|
1047
|
-
this.item.children ||
|
|
1048
|
-
},
|
|
1049
|
-
beforeUnMounted() {
|
|
1050
|
-
this.resizer && this.resizer.unobserve(this.$el);
|
|
1019
|
+
this.item.children || this.$nextTick(this.handleResize);
|
|
1051
1020
|
}
|
|
1052
|
-
},
|
|
1053
|
-
var
|
|
1021
|
+
}, R = {};
|
|
1022
|
+
var xe = /* @__PURE__ */ x(
|
|
1054
1023
|
Ce,
|
|
1055
|
-
|
|
1024
|
+
be,
|
|
1056
1025
|
we,
|
|
1057
1026
|
!1,
|
|
1058
|
-
|
|
1059
|
-
"
|
|
1027
|
+
$e,
|
|
1028
|
+
"5685df36",
|
|
1060
1029
|
null,
|
|
1061
1030
|
null
|
|
1062
1031
|
);
|
|
1063
|
-
function
|
|
1064
|
-
for (let r in
|
|
1065
|
-
this[r] =
|
|
1032
|
+
function $e(e) {
|
|
1033
|
+
for (let r in R)
|
|
1034
|
+
this[r] = R[r];
|
|
1066
1035
|
}
|
|
1067
1036
|
const Se = /* @__PURE__ */ function() {
|
|
1068
|
-
return
|
|
1069
|
-
}(),
|
|
1070
|
-
const
|
|
1071
|
-
if (!
|
|
1037
|
+
return xe.exports;
|
|
1038
|
+
}(), L = (e, r, o) => {
|
|
1039
|
+
const n = e[o];
|
|
1040
|
+
if (!n.isFixed || !r[n.code])
|
|
1072
1041
|
return {};
|
|
1073
|
-
const
|
|
1074
|
-
return { position: "sticky", left: `${e.filter((c, h) => h < o && c.isFixed).map((c) =>
|
|
1042
|
+
const a = (c) => typeof c == "number" ? [c] : (Object.values(c) || []).map((h) => a(h)).flat();
|
|
1043
|
+
return { position: "sticky", left: `${e.filter((c, h) => h < o && c.isFixed).map((c) => a(r[c.code])).reduce((c, h) => parseFloat(c) + parseFloat(h), 0)}px` };
|
|
1075
1044
|
}, j = (e, r, o) => {
|
|
1076
|
-
const
|
|
1077
|
-
return r.length > 1 ? j(
|
|
1045
|
+
const n = e[r[0]];
|
|
1046
|
+
return r.length > 1 ? j(n, r.slice(1), o) : e[o] === void 0 ? n : e[o];
|
|
1078
1047
|
};
|
|
1079
1048
|
var Ie = function() {
|
|
1080
1049
|
var e = this, r = e.$createElement, o = e._self._c || r;
|
|
1081
1050
|
return o("ul", {
|
|
1051
|
+
key: e.key,
|
|
1082
1052
|
staticClass: "dp-table_header_view_",
|
|
1083
1053
|
style: {
|
|
1084
1054
|
borderColor: e.borderColor,
|
|
1085
1055
|
backgroundColor: e.bgColor,
|
|
1086
1056
|
minWidth: e.isBlock ? "100%" : ""
|
|
1087
1057
|
}
|
|
1088
|
-
}, e._l(e.data, function(
|
|
1058
|
+
}, e._l(e.data, function(n, a) {
|
|
1089
1059
|
return o("dp-item", {
|
|
1090
|
-
key:
|
|
1091
|
-
class: [
|
|
1092
|
-
style: Object.assign({}, e.fixedStyle[
|
|
1060
|
+
key: n.code,
|
|
1061
|
+
class: [n.isFixed && "dp-table_fixed_bg_", e.isLeftScroll && "dp-table_fixed_shadow_"],
|
|
1062
|
+
style: Object.assign({}, e.fixedStyle[a]),
|
|
1093
1063
|
attrs: {
|
|
1094
|
-
item:
|
|
1064
|
+
item: n,
|
|
1095
1065
|
align: e.align,
|
|
1096
|
-
fullCode: [
|
|
1066
|
+
fullCode: [n.code],
|
|
1097
1067
|
borderColor: e.borderColor,
|
|
1098
1068
|
sortInfo: e.sortInfo,
|
|
1099
1069
|
filterInfo: e.filterInfo
|
|
@@ -1152,43 +1122,54 @@ const Ee = {
|
|
|
1152
1122
|
},
|
|
1153
1123
|
computed: {
|
|
1154
1124
|
fixedStyle() {
|
|
1155
|
-
return this.data.map((e, r) => ({ ...
|
|
1125
|
+
return this.data.map((e, r) => ({ ...L(this.data, this.widthInfo, r), backgroundColor: this.bgColor }));
|
|
1156
1126
|
}
|
|
1157
1127
|
},
|
|
1158
1128
|
watch: {
|
|
1159
1129
|
data() {
|
|
1160
|
-
this.
|
|
1130
|
+
this.handleChangeKey();
|
|
1161
1131
|
}
|
|
1162
1132
|
},
|
|
1163
1133
|
data() {
|
|
1164
1134
|
return {
|
|
1165
1135
|
widthInfo: {},
|
|
1166
1136
|
timer: null,
|
|
1167
|
-
isBlock: !0
|
|
1137
|
+
isBlock: !0,
|
|
1138
|
+
key: 0,
|
|
1139
|
+
resizer: null
|
|
1168
1140
|
};
|
|
1169
1141
|
},
|
|
1142
|
+
mounted() {
|
|
1143
|
+
window.addEventListener("resize", this.handleChangeKey);
|
|
1144
|
+
},
|
|
1145
|
+
beforeDestroy() {
|
|
1146
|
+
window.removeEventListener("resize", this.handleChangeKey);
|
|
1147
|
+
},
|
|
1170
1148
|
methods: {
|
|
1171
|
-
computFixedStyle:
|
|
1149
|
+
computFixedStyle: L,
|
|
1172
1150
|
handleChangeWidthInfo(e) {
|
|
1173
1151
|
this.widthInfo = { ...this.widthInfo, ...e }, clearTimeout(this.timer), this.timer = setTimeout(() => {
|
|
1174
1152
|
this.$emit("changeWidth", this.widthInfo), this.isBlock = Object.values(this.widthInfo).reduce((r, o) => r + o, 0) > this.$el.offsetWidth - 2, this.$emit("changeBlock", this.isBlock);
|
|
1175
|
-
},
|
|
1153
|
+
}, 100);
|
|
1176
1154
|
},
|
|
1177
1155
|
handleChangeSort(e, r) {
|
|
1178
1156
|
this.$emit("changeSort", e, r);
|
|
1179
1157
|
},
|
|
1180
1158
|
handleChangeFilter(e) {
|
|
1181
1159
|
this.$emit("changeFilter", e);
|
|
1160
|
+
},
|
|
1161
|
+
handleChangeKey() {
|
|
1162
|
+
this.key++, this.widthInfo = {}, this.$emit("changeBlock", this.isBlock);
|
|
1182
1163
|
}
|
|
1183
1164
|
}
|
|
1184
1165
|
}, W = {};
|
|
1185
|
-
var ke = /* @__PURE__ */
|
|
1166
|
+
var ke = /* @__PURE__ */ x(
|
|
1186
1167
|
Ee,
|
|
1187
1168
|
Ie,
|
|
1188
1169
|
Oe,
|
|
1189
1170
|
!1,
|
|
1190
1171
|
Me,
|
|
1191
|
-
"
|
|
1172
|
+
"093a0750",
|
|
1192
1173
|
null,
|
|
1193
1174
|
null
|
|
1194
1175
|
);
|
|
@@ -1232,11 +1213,11 @@ var je = function() {
|
|
|
1232
1213
|
changeSort: e.handleChangeSort,
|
|
1233
1214
|
changeFilter: e.handleChangeFilter
|
|
1234
1215
|
},
|
|
1235
|
-
scopedSlots: e._u([e._l(e.$slots, function(
|
|
1216
|
+
scopedSlots: e._u([e._l(e.$slots, function(n, a) {
|
|
1236
1217
|
return {
|
|
1237
|
-
key:
|
|
1218
|
+
key: a,
|
|
1238
1219
|
fn: function() {
|
|
1239
|
-
return [e._t(
|
|
1220
|
+
return [e._t(a)];
|
|
1240
1221
|
},
|
|
1241
1222
|
proxy: !0
|
|
1242
1223
|
};
|
|
@@ -1247,28 +1228,28 @@ var je = function() {
|
|
|
1247
1228
|
height: `${e.fullHeight}px`,
|
|
1248
1229
|
paddingTop: e.beforeHeight + "px"
|
|
1249
1230
|
}
|
|
1250
|
-
}, e._l(e.resultData, function(
|
|
1231
|
+
}, e._l(e.resultData, function(n) {
|
|
1251
1232
|
return o("li", {
|
|
1252
|
-
key:
|
|
1253
|
-
class: ["dp-table_body_item_",
|
|
1254
|
-
style: Object.assign({},
|
|
1255
|
-
height: `${e.fullHeightInfo[
|
|
1233
|
+
key: n.__key,
|
|
1234
|
+
class: ["dp-table_body_item_", n.__isTotalData && "dp-table_total_view_"],
|
|
1235
|
+
style: Object.assign({}, n.style, e.hoverStyle, e.computEvenColor(n.__sub), {
|
|
1236
|
+
height: `${e.fullHeightInfo[n.__key]}px`
|
|
1256
1237
|
}),
|
|
1257
1238
|
on: {
|
|
1258
|
-
mouseenter: function(
|
|
1239
|
+
mouseenter: function(a) {
|
|
1259
1240
|
return e.handleChangeFlag(!0);
|
|
1260
1241
|
},
|
|
1261
|
-
mouseleave: function(
|
|
1242
|
+
mouseleave: function(a) {
|
|
1262
1243
|
return e.handleChangeFlag(!1);
|
|
1263
1244
|
}
|
|
1264
1245
|
}
|
|
1265
|
-
}, [e._l(e.deepHeadData, function(
|
|
1266
|
-
return [
|
|
1267
|
-
class: ["dp-table_body_item_group_col_",
|
|
1246
|
+
}, [e._l(e.deepHeadData, function(a, f) {
|
|
1247
|
+
return [n[a.code] instanceof Object ? [n[a.code].slot ? o("div", {
|
|
1248
|
+
class: ["dp-table_body_item_group_col_", a.isFixed && "dp-table_fixed_bg_", !!e.scrollLeft && "dp-table_fixed_shadow_"],
|
|
1268
1249
|
style: Object.assign({
|
|
1269
1250
|
borderColor: e.borderColor
|
|
1270
|
-
},
|
|
1271
|
-
}, e._l([
|
|
1251
|
+
}, a.style, a.colStyle, e.computEvenColor(n.__sub), e.fixedStyle[f], e.computWidth(n[a.code], a.code))
|
|
1252
|
+
}, e._l([n[a.code].slot].flat(), function(c, h) {
|
|
1272
1253
|
return o("div", {
|
|
1273
1254
|
key: c,
|
|
1274
1255
|
staticClass: "dp-table_body_item_child_",
|
|
@@ -1276,19 +1257,19 @@ var je = function() {
|
|
|
1276
1257
|
borderColor: e.borderColor,
|
|
1277
1258
|
padding: e.itemPadding,
|
|
1278
1259
|
justifyContent: e.dir
|
|
1279
|
-
},
|
|
1260
|
+
}, a.style, a.colStyle, n[a.code].style, {
|
|
1280
1261
|
width: "100%"
|
|
1281
1262
|
})
|
|
1282
1263
|
}, [e._t(c, null, {
|
|
1283
|
-
item:
|
|
1264
|
+
item: n,
|
|
1284
1265
|
index: h
|
|
1285
1266
|
})], 2);
|
|
1286
|
-
}), 0) :
|
|
1287
|
-
class: ["dp-table_body_item_group_col_",
|
|
1267
|
+
}), 0) : n[a.code].raw ? o("div", {
|
|
1268
|
+
class: ["dp-table_body_item_group_col_", a.isFixed && "dp-table_fixed_bg_", !!e.scrollLeft && "dp-table_fixed_shadow_"],
|
|
1288
1269
|
style: Object.assign({
|
|
1289
1270
|
borderColor: e.borderColor
|
|
1290
|
-
},
|
|
1291
|
-
}, e._l([
|
|
1271
|
+
}, a.style, a.colStyle, e.computEvenColor(n.__sub), e.fixedStyle[f], e.computWidth(n[a.code], a.code))
|
|
1272
|
+
}, e._l([n[a.code].raw].flat(), function(c, h) {
|
|
1292
1273
|
return o("div", {
|
|
1293
1274
|
key: h,
|
|
1294
1275
|
staticClass: "dp-table_body_item_child_",
|
|
@@ -1296,19 +1277,19 @@ var je = function() {
|
|
|
1296
1277
|
borderColor: e.borderColor,
|
|
1297
1278
|
padding: e.itemPadding,
|
|
1298
1279
|
justifyContent: e.dir
|
|
1299
|
-
},
|
|
1280
|
+
}, a.style, a.colStyle, n[a.code].style, {
|
|
1300
1281
|
width: "100%"
|
|
1301
1282
|
}),
|
|
1302
1283
|
domProps: {
|
|
1303
1284
|
innerHTML: e._s(c)
|
|
1304
1285
|
}
|
|
1305
1286
|
});
|
|
1306
|
-
}), 0) :
|
|
1307
|
-
class: ["dp-table_body_item_group_col_",
|
|
1287
|
+
}), 0) : n[a.code].value ? o("div", {
|
|
1288
|
+
class: ["dp-table_body_item_group_col_", a.isFixed && "dp-table_fixed_bg_", !!e.scrollLeft && "dp-table_fixed_shadow_"],
|
|
1308
1289
|
style: Object.assign({
|
|
1309
1290
|
borderColor: e.borderColor
|
|
1310
|
-
},
|
|
1311
|
-
}, e._l([
|
|
1291
|
+
}, a.style, a.colStyle, e.computEvenColor(n.__sub), e.fixedStyle[f], e.computWidth(n[a.code], a.code))
|
|
1292
|
+
}, e._l([n[a.code].value].flat(), function(c, h) {
|
|
1312
1293
|
return o("div", {
|
|
1313
1294
|
key: h,
|
|
1314
1295
|
staticClass: "dp-table_body_item_child_",
|
|
@@ -1316,25 +1297,25 @@ var je = function() {
|
|
|
1316
1297
|
borderColor: e.borderColor,
|
|
1317
1298
|
padding: e.itemPadding,
|
|
1318
1299
|
justifyContent: e.dir
|
|
1319
|
-
},
|
|
1300
|
+
}, a.style, a.colStyle, n[a.code].style, {
|
|
1320
1301
|
width: "100%"
|
|
1321
1302
|
}),
|
|
1322
1303
|
attrs: {
|
|
1323
|
-
title:
|
|
1304
|
+
title: a.isShowTitle ? c : ""
|
|
1324
1305
|
}
|
|
1325
1306
|
}, [e._v(e._s(c))]);
|
|
1326
1307
|
}), 0) : e._e()] : o("div", {
|
|
1327
|
-
class: ["dp-table_body_item_child_",
|
|
1308
|
+
class: ["dp-table_body_item_child_", a.isFixed && "dp-table_fixed_bg_", !!e.scrollLeft && "dp-table_fixed_shadow_"],
|
|
1328
1309
|
style: Object.assign({
|
|
1329
1310
|
borderColor: e.borderColor,
|
|
1330
1311
|
padding: e.itemPadding,
|
|
1331
1312
|
justifyContent: e.dir
|
|
1332
|
-
},
|
|
1313
|
+
}, a.style, a.colStyle, e.computEvenColor(n.__sub), e.fixedStyle[f]),
|
|
1333
1314
|
attrs: {
|
|
1334
|
-
title:
|
|
1315
|
+
title: a.isShowTitle ? n[a.code] : ""
|
|
1335
1316
|
}
|
|
1336
|
-
}, [e._v(e._s(
|
|
1337
|
-
}),
|
|
1317
|
+
}, [e._v(e._s(n[a.code]))])];
|
|
1318
|
+
}), n.__isTotalData ? o("span", {
|
|
1338
1319
|
staticClass: "dp-table_total_border_",
|
|
1339
1320
|
style: {
|
|
1340
1321
|
borderColor: e.borderColor
|
|
@@ -1351,8 +1332,8 @@ var je = function() {
|
|
|
1351
1332
|
borderColor: e.borderColor
|
|
1352
1333
|
}
|
|
1353
1334
|
})])]);
|
|
1354
|
-
},
|
|
1355
|
-
const
|
|
1335
|
+
}, Le = [];
|
|
1336
|
+
const De = {
|
|
1356
1337
|
name: "dp-table",
|
|
1357
1338
|
components: {
|
|
1358
1339
|
DpHeader: Te
|
|
@@ -1438,7 +1419,7 @@ const Fe = {
|
|
|
1438
1419
|
// 平铺表头
|
|
1439
1420
|
deepHeadData() {
|
|
1440
1421
|
const e = [], r = (o) => {
|
|
1441
|
-
o.children ? o.children.forEach((
|
|
1422
|
+
o.children ? o.children.forEach((n) => r({ ...n, code: `${o.code}_${n.code}` })) : e.push(o);
|
|
1442
1423
|
};
|
|
1443
1424
|
return this.resultHeadData.forEach((o) => r(o)), e;
|
|
1444
1425
|
},
|
|
@@ -1447,8 +1428,8 @@ const Fe = {
|
|
|
1447
1428
|
const e = Object.values(this.filterInfo).filter((r) => r.value.length);
|
|
1448
1429
|
return e.length ? [...this.bodyData].filter((r) => {
|
|
1449
1430
|
let o = !0;
|
|
1450
|
-
return e.some((
|
|
1451
|
-
if (!
|
|
1431
|
+
return e.some((n) => {
|
|
1432
|
+
if (!n.value.includes(j(r, n.target, n.filterKey)))
|
|
1452
1433
|
return o = !1, !0;
|
|
1453
1434
|
}), o;
|
|
1454
1435
|
}) : this.bodyData;
|
|
@@ -1460,29 +1441,29 @@ const Fe = {
|
|
|
1460
1441
|
// 表体渲染数据
|
|
1461
1442
|
resultData() {
|
|
1462
1443
|
return Object.keys(this.widthInfo).length < this.headData.length || !this.headData.length ? [] : (this.sortInfo.value ? [...this.filterBodyData].sort((r, o) => {
|
|
1463
|
-
const
|
|
1464
|
-
return this.sortInfo.value === "up" ?
|
|
1444
|
+
const n = j(r, this.sortInfo.target, this.sortInfo.sortKey), a = j(o, this.sortInfo.target, this.sortInfo.sortKey);
|
|
1445
|
+
return this.sortInfo.value === "up" ? n - a : a - n;
|
|
1465
1446
|
}) : this.filterBodyData).slice(this.beforeIndex, this.currentIndex).concat(this.totalData ? [{ ...this.totalData, __sub: "", __isTotalData: !0 }] : []).map((r, o) => {
|
|
1466
|
-
const
|
|
1467
|
-
return Object.keys(
|
|
1468
|
-
if (
|
|
1469
|
-
const f = this.deepHeadData.findIndex((h) => h.code ===
|
|
1447
|
+
const n = this.handleComputItem(r, !0);
|
|
1448
|
+
return Object.keys(n).forEach((a) => {
|
|
1449
|
+
if (n[a] instanceof Object && (n[a].merge || 0) > 1) {
|
|
1450
|
+
const f = this.deepHeadData.findIndex((h) => h.code === a), c = this.deepHeadData.slice(f, f + n[a].merge);
|
|
1470
1451
|
c.forEach((h) => {
|
|
1471
|
-
const
|
|
1472
|
-
|
|
1473
|
-
}),
|
|
1452
|
+
const m = n[h.code];
|
|
1453
|
+
m instanceof Object || (n[h.code] = { value: m }), n[h.code] = { ...n[h.code], isMergeIgnored: !0 };
|
|
1454
|
+
}), n[a].isMerge = !0, n[a].width = c.map((h) => this.widthInfo[h.code] || 0).reduce((h, m) => h + m, 0);
|
|
1474
1455
|
}
|
|
1475
1456
|
}), {
|
|
1476
1457
|
__sub: o + parseInt(this.basicSub) + this.beforeIndex,
|
|
1477
1458
|
...r,
|
|
1478
|
-
...
|
|
1459
|
+
...n,
|
|
1479
1460
|
__key: o + this.beforeIndex
|
|
1480
1461
|
};
|
|
1481
1462
|
});
|
|
1482
1463
|
},
|
|
1483
1464
|
// 冻结列样式
|
|
1484
1465
|
fixedStyle() {
|
|
1485
|
-
return this.headData.map((e, r) =>
|
|
1466
|
+
return this.headData.map((e, r) => L(this.resultHeadData, this.widthInfo, r));
|
|
1486
1467
|
},
|
|
1487
1468
|
// 行hover样式
|
|
1488
1469
|
hoverStyle() {
|
|
@@ -1523,8 +1504,8 @@ const Fe = {
|
|
|
1523
1504
|
},
|
|
1524
1505
|
methods: {
|
|
1525
1506
|
// 计算合并单元格的宽度
|
|
1526
|
-
computWidth(e) {
|
|
1527
|
-
return e instanceof Object && e.isMerge ? { width: `${e.width}px` } : {};
|
|
1507
|
+
computWidth(e, r) {
|
|
1508
|
+
return e instanceof Object && e.isMerge ? { width: `${e.width}px` } : { maxWidth: `${this.widthInfo[r]}px` };
|
|
1528
1509
|
},
|
|
1529
1510
|
// 计算隔行变色
|
|
1530
1511
|
computEvenColor(e) {
|
|
@@ -1537,8 +1518,8 @@ const Fe = {
|
|
|
1537
1518
|
if (this.rowHeight)
|
|
1538
1519
|
o = this.rowHeight;
|
|
1539
1520
|
else if (this.rowItemHeight) {
|
|
1540
|
-
const
|
|
1541
|
-
o = Math.max(...
|
|
1521
|
+
const n = this.handleComputItem(e, !0), a = this.deepHeadData.map((c) => n[c.code] instanceof Object ? n[c.code].slot ? [n[c.code].slot].flat().length : n[c.code].raw ? [n[c.code].raw].flat().length : n[c.code].value ? [n[c.code].value].flat().length : 1 : 1);
|
|
1522
|
+
o = Math.max(...a) * this.rowItemHeight;
|
|
1542
1523
|
}
|
|
1543
1524
|
return o;
|
|
1544
1525
|
});
|
|
@@ -1554,10 +1535,10 @@ const Fe = {
|
|
|
1554
1535
|
// 递归铺开数据
|
|
1555
1536
|
handleComputItem(e, r) {
|
|
1556
1537
|
let o = {};
|
|
1557
|
-
const
|
|
1558
|
-
f.children ? f.children.forEach((c) =>
|
|
1538
|
+
const n = (a, f) => {
|
|
1539
|
+
f.children ? f.children.forEach((c) => n((a || {})[c.code], { ...c, code: `${f.code}_${c.code}` })) : o[f.code] = a;
|
|
1559
1540
|
};
|
|
1560
|
-
return this.headData.filter((
|
|
1541
|
+
return this.headData.filter((a) => r || a.children).forEach((a) => n(e[a.code], a)), o;
|
|
1561
1542
|
},
|
|
1562
1543
|
// 滚动事件
|
|
1563
1544
|
handleScroll(e) {
|
|
@@ -1567,9 +1548,9 @@ const Fe = {
|
|
|
1567
1548
|
this.beforeIndex = Math.max(Math.floor(r / this.rowHeight), 0), this.currentIndex = Math.max(this.beforeIndex + Math.ceil(this.$el.offsetHeight / this.rowHeight) * 3, 50);
|
|
1568
1549
|
else {
|
|
1569
1550
|
let o = 0;
|
|
1570
|
-
this.beforeIndex = this.fullHeightInfo.findIndex((
|
|
1571
|
-
const
|
|
1572
|
-
return
|
|
1551
|
+
this.beforeIndex = this.fullHeightInfo.findIndex((n) => {
|
|
1552
|
+
const a = o + n >= r;
|
|
1553
|
+
return a || (o += n), a;
|
|
1573
1554
|
}), this.currentIndex = Math.min(this.beforeIndex + 50, this.filterBodyData.length);
|
|
1574
1555
|
}
|
|
1575
1556
|
}, 10);
|
|
@@ -1582,7 +1563,7 @@ const Fe = {
|
|
|
1582
1563
|
handleChangeSort(e, r) {
|
|
1583
1564
|
if (this.sortInfo.target.join("_") === r.join("_")) {
|
|
1584
1565
|
const o = ["up", "down", null];
|
|
1585
|
-
this.sortInfo.value = o[(o.findIndex((
|
|
1566
|
+
this.sortInfo.value = o[(o.findIndex((n) => n === (this.sortInfo.value || null)) + 1) % o.length];
|
|
1586
1567
|
} else
|
|
1587
1568
|
this.sortInfo = { target: r, value: "up", sortKey: e.sortKey, sortFn: e.sortFn || null };
|
|
1588
1569
|
this.$emit("changeSort", { key: e.sortKey, value: this.sortInfo.value });
|
|
@@ -1593,13 +1574,13 @@ const Fe = {
|
|
|
1593
1574
|
}
|
|
1594
1575
|
}
|
|
1595
1576
|
}, A = {};
|
|
1596
|
-
var
|
|
1597
|
-
Fe,
|
|
1598
|
-
je,
|
|
1577
|
+
var Fe = /* @__PURE__ */ x(
|
|
1599
1578
|
De,
|
|
1579
|
+
je,
|
|
1580
|
+
Le,
|
|
1600
1581
|
!1,
|
|
1601
1582
|
He,
|
|
1602
|
-
"
|
|
1583
|
+
"4f3eefb0",
|
|
1603
1584
|
null,
|
|
1604
1585
|
null
|
|
1605
1586
|
);
|
|
@@ -1607,10 +1588,10 @@ function He(e) {
|
|
|
1607
1588
|
for (let r in A)
|
|
1608
1589
|
this[r] = A[r];
|
|
1609
1590
|
}
|
|
1610
|
-
const
|
|
1611
|
-
return
|
|
1591
|
+
const Be = /* @__PURE__ */ function() {
|
|
1592
|
+
return Fe.exports;
|
|
1612
1593
|
}();
|
|
1613
|
-
var
|
|
1594
|
+
var Pe = function() {
|
|
1614
1595
|
var e = this, r = e.$createElement, o = e._self._c || r;
|
|
1615
1596
|
return o("div", {
|
|
1616
1597
|
staticClass: "problem-raw",
|
|
@@ -1619,7 +1600,7 @@ var Re = function() {
|
|
|
1619
1600
|
}
|
|
1620
1601
|
});
|
|
1621
1602
|
}, Ne = [];
|
|
1622
|
-
const
|
|
1603
|
+
const Re = {
|
|
1623
1604
|
name: "dp-raw",
|
|
1624
1605
|
props: {
|
|
1625
1606
|
data: String
|
|
@@ -1631,22 +1612,22 @@ const Be = {
|
|
|
1631
1612
|
computSvgDom() {
|
|
1632
1613
|
const e = ["width", "height"];
|
|
1633
1614
|
[...this.$el.querySelectorAll("img")].filter((o) => /.svg$/i.test(o.src)).forEach(async (o) => {
|
|
1634
|
-
const
|
|
1635
|
-
if (
|
|
1636
|
-
const
|
|
1637
|
-
o.replaceWith(
|
|
1615
|
+
const n = await fetch(o.src).then(async (a) => await a.text());
|
|
1616
|
+
if (n) {
|
|
1617
|
+
const a = document.createElement("span");
|
|
1618
|
+
o.replaceWith(a);
|
|
1638
1619
|
const f = document.createElement("span");
|
|
1639
|
-
f.innerHTML =
|
|
1620
|
+
f.innerHTML = n, [...o.attributes].filter((h) => h.value && h.name !== "src").forEach((h) => {
|
|
1640
1621
|
e.includes(h.name) ? f.style[h.name] = h.value : f[h.name] = h.value;
|
|
1641
|
-
}), f.style.display = "inline-block", f.style.fontSize = "0", f.setAttribute("part", "__svg_view__"),
|
|
1622
|
+
}), f.style.display = "inline-block", f.style.fontSize = "0", f.setAttribute("part", "__svg_view__"), a.attachShadow({ mode: "open" }).append(f);
|
|
1642
1623
|
}
|
|
1643
1624
|
});
|
|
1644
1625
|
}
|
|
1645
1626
|
}
|
|
1646
1627
|
}, z = {};
|
|
1647
|
-
var We = /* @__PURE__ */
|
|
1648
|
-
Be,
|
|
1628
|
+
var We = /* @__PURE__ */ x(
|
|
1649
1629
|
Re,
|
|
1630
|
+
Pe,
|
|
1650
1631
|
Ne,
|
|
1651
1632
|
!1,
|
|
1652
1633
|
Ae,
|
|
@@ -1661,10 +1642,10 @@ function Ae(e) {
|
|
|
1661
1642
|
const ze = /* @__PURE__ */ function() {
|
|
1662
1643
|
return We.exports;
|
|
1663
1644
|
}();
|
|
1664
|
-
var qe = { choice: 'span.__MC41aTVhZDc3NDdnMzM2__[data-t="MC4wNHY2eGVwODFmMXg"]', decide: 'span.__MC5jY2ZpMWU5NzYyamo__[data-t="MC5hMDFjMGM5NGNmZmFl"]', fill: 'span.__MC50aXB0OGc2Y2tqbw__[data-t="MC5mM2VtbTVkcDJm"]', scoreline: 'span.__MC5sOG52dGVycnI5Zw__[data-t="MC42NG83Z2Y1Y2w3bw"]' },
|
|
1665
|
-
let { el: r, isShow: o, type:
|
|
1645
|
+
var qe = { choice: 'span.__MC41aTVhZDc3NDdnMzM2__[data-t="MC4wNHY2eGVwODFmMXg"]', decide: 'span.__MC5jY2ZpMWU5NzYyamo__[data-t="MC5hMDFjMGM5NGNmZmFl"]', fill: 'span.__MC50aXB0OGc2Y2tqbw__[data-t="MC5mM2VtbTVkcDJm"]', scoreline: 'span.__MC5sOG52dGVycnI5Zw__[data-t="MC42NG83Z2Y1Y2w3bw"]' }, Ke = (e) => {
|
|
1646
|
+
let { el: r, isShow: o, type: n } = e, a = Object.keys(qe), f = o ? a.filter((h) => !(n || a).includes(h)) : n || a, c = a.filter((h) => !f.includes(h));
|
|
1666
1647
|
r.classList.add(...f.map((h) => `__toggleraw_${h}_hidden`)), r.classList.remove(...c.map((h) => `__toggleraw_${h}_hidden`));
|
|
1667
|
-
},
|
|
1648
|
+
}, Je = Ke, Ge = { ToggleRaw: Je }, Ve = function() {
|
|
1668
1649
|
var e = this, r = e.$createElement, o = e._self._c || r;
|
|
1669
1650
|
return o("svg", {
|
|
1670
1651
|
staticClass: "icon",
|
|
@@ -1694,9 +1675,9 @@ const Ye = {
|
|
|
1694
1675
|
}
|
|
1695
1676
|
}
|
|
1696
1677
|
}, q = {};
|
|
1697
|
-
var Ze = /* @__PURE__ */
|
|
1678
|
+
var Ze = /* @__PURE__ */ x(
|
|
1698
1679
|
Ye,
|
|
1699
|
-
|
|
1680
|
+
Ve,
|
|
1700
1681
|
Ue,
|
|
1701
1682
|
!1,
|
|
1702
1683
|
Xe,
|
|
@@ -1722,19 +1703,19 @@ var et = function() {
|
|
|
1722
1703
|
left: `${e.index * e.itemW}%`,
|
|
1723
1704
|
background: e.activeColor
|
|
1724
1705
|
}
|
|
1725
|
-
}), e._l(e.option, function(
|
|
1706
|
+
}), e._l(e.option, function(n, a) {
|
|
1726
1707
|
return o("div", {
|
|
1727
1708
|
staticClass: "dp-capsule_view_item_",
|
|
1728
1709
|
style: {
|
|
1729
1710
|
width: `${e.itemW}%`,
|
|
1730
|
-
color:
|
|
1711
|
+
color: a === e.index ? e.activeTextColor : "inherit"
|
|
1731
1712
|
},
|
|
1732
1713
|
on: {
|
|
1733
1714
|
click: function(f) {
|
|
1734
|
-
return e.handleChange(
|
|
1715
|
+
return f.stopPropagation(), e.handleChange(n.code);
|
|
1735
1716
|
}
|
|
1736
1717
|
}
|
|
1737
|
-
}, [e._v(e._s(
|
|
1718
|
+
}, [e._v(e._s(n.name))]);
|
|
1738
1719
|
})], 2);
|
|
1739
1720
|
}, tt = [];
|
|
1740
1721
|
const ot = {
|
|
@@ -1779,29 +1760,29 @@ const ot = {
|
|
|
1779
1760
|
this.disabled || this.$emit("change", e, this.name);
|
|
1780
1761
|
}
|
|
1781
1762
|
}
|
|
1782
|
-
},
|
|
1783
|
-
var rt = /* @__PURE__ */
|
|
1763
|
+
}, K = {};
|
|
1764
|
+
var rt = /* @__PURE__ */ x(
|
|
1784
1765
|
ot,
|
|
1785
1766
|
et,
|
|
1786
1767
|
tt,
|
|
1787
1768
|
!1,
|
|
1788
1769
|
it,
|
|
1789
|
-
"
|
|
1770
|
+
"729c1722",
|
|
1790
1771
|
null,
|
|
1791
1772
|
null
|
|
1792
1773
|
);
|
|
1793
1774
|
function it(e) {
|
|
1794
|
-
for (let r in
|
|
1795
|
-
this[r] =
|
|
1775
|
+
for (let r in K)
|
|
1776
|
+
this[r] = K[r];
|
|
1796
1777
|
}
|
|
1797
|
-
const
|
|
1778
|
+
const nt = /* @__PURE__ */ function() {
|
|
1798
1779
|
return rt.exports;
|
|
1799
1780
|
}();
|
|
1800
|
-
var
|
|
1781
|
+
var st = function() {
|
|
1801
1782
|
var e = this, r = e.$createElement, o = e._self._c || r;
|
|
1802
|
-
return o("dp-popover", {
|
|
1783
|
+
return e.isShowTool ? o("dp-popover", {
|
|
1803
1784
|
attrs: {
|
|
1804
|
-
width: "
|
|
1785
|
+
width: "260px"
|
|
1805
1786
|
}
|
|
1806
1787
|
}, [o("dp-icon", {
|
|
1807
1788
|
staticClass: "dp-toggleraw_icon_",
|
|
@@ -1809,15 +1790,12 @@ var nt = function() {
|
|
|
1809
1790
|
slot: "reference",
|
|
1810
1791
|
name: "set"
|
|
1811
1792
|
},
|
|
1812
|
-
nativeOn: {
|
|
1813
|
-
click: function(s) {
|
|
1814
|
-
return e.handleChange(e.isShow);
|
|
1815
|
-
}
|
|
1816
|
-
},
|
|
1817
1793
|
slot: "reference"
|
|
1818
1794
|
}), o("div", {
|
|
1819
1795
|
staticClass: "dp-toggleraw_content_"
|
|
1820
|
-
}, [o("span",
|
|
1796
|
+
}, [o("span", {
|
|
1797
|
+
staticClass: "dp-toggleraw_tips_"
|
|
1798
|
+
}, [e._v("题型控件显隐控制")]), o("dp-capsule", {
|
|
1821
1799
|
attrs: {
|
|
1822
1800
|
value: e.isShow,
|
|
1823
1801
|
option: e.option
|
|
@@ -1825,26 +1803,31 @@ var nt = function() {
|
|
|
1825
1803
|
on: {
|
|
1826
1804
|
change: e.handleChange
|
|
1827
1805
|
}
|
|
1828
|
-
})], 1)], 1)
|
|
1806
|
+
})], 1)], 1) : o("span", {
|
|
1807
|
+
staticClass: "dp-toggleraw_empty_"
|
|
1808
|
+
});
|
|
1829
1809
|
}, at = [];
|
|
1830
1810
|
const lt = {
|
|
1831
1811
|
name: "dp-toggleraw",
|
|
1832
1812
|
components: {
|
|
1833
1813
|
DpIcon: Qe,
|
|
1834
1814
|
DpPopover: G,
|
|
1835
|
-
DpCapsule:
|
|
1815
|
+
DpCapsule: nt
|
|
1836
1816
|
},
|
|
1837
1817
|
props: {
|
|
1838
|
-
|
|
1818
|
+
value: {
|
|
1839
1819
|
type: Boolean,
|
|
1840
1820
|
default: !1
|
|
1841
1821
|
},
|
|
1822
|
+
isShowTool: {
|
|
1823
|
+
type: Boolean
|
|
1824
|
+
},
|
|
1842
1825
|
selectorList: {
|
|
1843
1826
|
type: Array
|
|
1844
1827
|
}
|
|
1845
1828
|
},
|
|
1846
1829
|
mounted() {
|
|
1847
|
-
this.isShow = this.
|
|
1830
|
+
this.isShow = this.value, this.handleChange(this.isShow);
|
|
1848
1831
|
},
|
|
1849
1832
|
data() {
|
|
1850
1833
|
return {
|
|
@@ -1857,40 +1840,76 @@ const lt = {
|
|
|
1857
1840
|
},
|
|
1858
1841
|
methods: {
|
|
1859
1842
|
handleChange(e) {
|
|
1860
|
-
this.isShow = e, this.selectorList.map((o) => document.querySelector(o)).filter((o) => o).forEach((o) => {
|
|
1843
|
+
this.isShow = e, this.selectorList.map((o) => document.body.querySelector(o)).filter((o) => o).forEach((o) => {
|
|
1861
1844
|
Ge.ToggleRaw({ el: o, isShow: this.isShow });
|
|
1862
1845
|
}), this.$emit("change", this.isShow);
|
|
1863
1846
|
}
|
|
1864
1847
|
}
|
|
1865
|
-
},
|
|
1866
|
-
var dt = /* @__PURE__ */
|
|
1848
|
+
}, J = {};
|
|
1849
|
+
var dt = /* @__PURE__ */ x(
|
|
1867
1850
|
lt,
|
|
1868
|
-
|
|
1851
|
+
st,
|
|
1869
1852
|
at,
|
|
1870
1853
|
!1,
|
|
1871
1854
|
pt,
|
|
1872
|
-
"
|
|
1855
|
+
"7dec0afb",
|
|
1873
1856
|
null,
|
|
1874
1857
|
null
|
|
1875
1858
|
);
|
|
1876
1859
|
function pt(e) {
|
|
1877
|
-
for (let r in
|
|
1878
|
-
this[r] =
|
|
1860
|
+
for (let r in J)
|
|
1861
|
+
this[r] = J[r];
|
|
1879
1862
|
}
|
|
1880
|
-
const
|
|
1863
|
+
const ct = /* @__PURE__ */ function() {
|
|
1881
1864
|
return dt.exports;
|
|
1882
|
-
}()
|
|
1883
|
-
|
|
1865
|
+
}();
|
|
1866
|
+
window._iconfont_svg_string_3979503 = '<svg><symbol id="dp-set" viewBox="0 0 1024 1024"><path d="M1020.2 442.2c-4-22.2-25.4-44.8-47.6-49.8l-16.6-3.8c-39-11.8-73.6-37.6-95.6-75.6-22-38.2-27.2-81.6-17.6-121.4L848 176c6.6-21.6-2-51.4-19.4-66.2 0 0-15.6-13.2-59.6-38.6C725 46 706 39 706 39c-21.4-7.8-51.4-0.4-67 16.2l-11.6 12.4c-29.6 28-69.4 45-113.4 45s-84.2-17.2-113.8-45.4l-11.2-12c-15.4-16.6-45.6-24-67-16.2 0 0-19.2 7-63.2 32.2-44 25.6-59.4 38.8-59.4 38.8-17.4 14.6-26 44.2-19.4 66l4.8 15.8c9.4 39.8 4.4 83-17.6 121.2s-57 64.2-96.2 75.8l-16 3.6c-22 5-43.6 27.4-47.6 49.8 0 0-3.6 20-3.6 70.8s3.6 70.8 3.6 70.8c4 22.4 25.4 44.8 47.6 49.8l15.6 3.6c39.2 11.6 74.4 37.6 96.4 76 22 38.2 27.2 81.6 17.6 121.4L180 850c-6.6 21.6 2 51.4 19.4 66.2 0 0 15.6 13.2 59.6 38.6 44 25.4 63 32.2 63 32.2 21.4 7.8 51.4 0.4 67-16.2l11-11.8c29.8-28.2 69.8-45.4 114-45.4s84.4 17.4 114 45.6l11 11.8c15.4 16.6 45.6 24 67 16.2 0 0 19.2-7 63.2-32.2 44-25.4 59.4-38.6 59.4-38.6 17.4-14.6 26-44.4 19.4-66.2l-4.8-16c-9.4-39.6-4.4-82.8 17.6-120.8 22-38.2 57.2-64.4 96.4-76l15.6-3.6c22-5 43.6-27.4 47.6-49.8 0 0 3.6-20 3.6-70.8-0.2-51-3.8-71-3.8-71zM514 716.4c-112.2 0-203.4-91-203.4-203.4 0-112.2 91-203.2 203.4-203.2 112.2 0 203.4 91 203.4 203.4-0.2 112.2-91.2 203.2-203.4 203.2z m0 0" fill="#333333" ></path></symbol></svg>', function(e) {
|
|
1867
|
+
var o = (o = document.getElementsByTagName("script"))[o.length - 1], r = o.getAttribute("data-injectcss"), o = o.getAttribute("data-disable-injectsvg");
|
|
1868
|
+
if (!o) {
|
|
1869
|
+
var n, a, f, c, h, m = function(b, _) {
|
|
1870
|
+
_.parentNode.insertBefore(b, _);
|
|
1871
|
+
};
|
|
1872
|
+
if (r && !e.__iconfont__svg__cssinject__) {
|
|
1873
|
+
e.__iconfont__svg__cssinject__ = !0;
|
|
1874
|
+
try {
|
|
1875
|
+
document.write("<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>");
|
|
1876
|
+
} catch (b) {
|
|
1877
|
+
console && console.log(b);
|
|
1878
|
+
}
|
|
1879
|
+
}
|
|
1880
|
+
n = function() {
|
|
1881
|
+
var b, _ = document.createElement("div");
|
|
1882
|
+
_.innerHTML = e._iconfont_svg_string_3979503, (_ = _.getElementsByTagName("svg")[0]) && (_.setAttribute("aria-hidden", "true"), _.style.position = "absolute", _.style.width = 0, _.style.height = 0, _.style.overflow = "hidden", _ = _, (b = document.body).firstChild ? m(_, b.firstChild) : b.appendChild(_));
|
|
1883
|
+
}, document.addEventListener ? ~["complete", "loaded", "interactive"].indexOf(document.readyState) ? setTimeout(n, 0) : (a = function() {
|
|
1884
|
+
document.removeEventListener("DOMContentLoaded", a, !1), n();
|
|
1885
|
+
}, document.addEventListener("DOMContentLoaded", a, !1)) : document.attachEvent && (f = n, c = e.document, h = !1, S(), c.onreadystatechange = function() {
|
|
1886
|
+
c.readyState == "complete" && (c.onreadystatechange = null, g());
|
|
1887
|
+
});
|
|
1888
|
+
}
|
|
1889
|
+
function g() {
|
|
1890
|
+
h || (h = !0, f());
|
|
1891
|
+
}
|
|
1892
|
+
function S() {
|
|
1893
|
+
try {
|
|
1894
|
+
c.documentElement.doScroll("left");
|
|
1895
|
+
} catch {
|
|
1896
|
+
return void setTimeout(S, 50);
|
|
1897
|
+
}
|
|
1898
|
+
g();
|
|
1899
|
+
}
|
|
1900
|
+
}(window);
|
|
1901
|
+
const ht = [
|
|
1902
|
+
Be,
|
|
1884
1903
|
ze,
|
|
1885
|
-
|
|
1904
|
+
ct
|
|
1886
1905
|
], ft = {
|
|
1887
1906
|
install: (e) => {
|
|
1888
|
-
|
|
1907
|
+
ht.forEach((r) => e.component(r.name, r));
|
|
1889
1908
|
}
|
|
1890
1909
|
};
|
|
1891
1910
|
export {
|
|
1892
1911
|
ze as Raw,
|
|
1893
|
-
|
|
1894
|
-
|
|
1912
|
+
Be as Table,
|
|
1913
|
+
ct as ToggleRaw,
|
|
1895
1914
|
ft as default
|
|
1896
1915
|
};
|