@vue-interface/btn-dropdown 0.9.13 → 0.9.14
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/btn-dropdown.es.js +2179 -0
- package/dist/btn-dropdown.umd.js +1 -0
- package/dist/style.css +1 -0
- package/package.json +26 -30
- package/.eslintrc.js +0 -53
- package/babel.config.js +0 -7
- package/dist/BtnDropdown.common.js +0 -6902
- package/dist/BtnDropdown.common.js.map +0 -1
- package/dist/BtnDropdown.css +0 -1
- package/dist/BtnDropdown.umd.js +0 -6912
- package/dist/BtnDropdown.umd.js.map +0 -1
- package/dist/BtnDropdown.umd.min.js +0 -2
- package/dist/BtnDropdown.umd.min.js.map +0 -1
- package/dist/demo.html +0 -19
- package/docs/.vuepress/config.js +0 -44
- package/docs/.vuepress/dist/404.html +0 -19
- package/docs/.vuepress/dist/assets/css/0.styles.275ee968.css +0 -1
- package/docs/.vuepress/dist/assets/img/search.83621669.svg +0 -1
- package/docs/.vuepress/dist/assets/js/10.5d93d289.js +0 -1
- package/docs/.vuepress/dist/assets/js/11.97ab3884.js +0 -1
- package/docs/.vuepress/dist/assets/js/2.f3d148c3.js +0 -1
- package/docs/.vuepress/dist/assets/js/3.81681fff.js +0 -1
- package/docs/.vuepress/dist/assets/js/4.82fa7382.js +0 -1
- package/docs/.vuepress/dist/assets/js/5.3dae6ad4.js +0 -1
- package/docs/.vuepress/dist/assets/js/6.6a04f815.js +0 -1
- package/docs/.vuepress/dist/assets/js/7.c033cb49.js +0 -1
- package/docs/.vuepress/dist/assets/js/8.6d6eb599.js +0 -1
- package/docs/.vuepress/dist/assets/js/9.eaefe866.js +0 -1
- package/docs/.vuepress/dist/assets/js/app.7ed065d3.js +0 -13
- package/docs/.vuepress/dist/examples/index.html +0 -21
- package/docs/.vuepress/dist/examples/test.html +0 -17
- package/docs/.vuepress/dist/index.html +0 -53
- package/docs/.vuepress/dist/options.html +0 -41
- package/docs/.vuepress/dist/tailwindcss.html +0 -85
- package/docs/README.md +0 -17
- package/docs/examples/README.md +0 -3
- package/docs/options.md +0 -44
- package/index.html +0 -328
- package/index.js +0 -3
- package/main.vue +0 -5
- package/postcss.config.js +0 -1
- package/public/favicon.ico +0 -0
- package/public/index.html +0 -17
- package/src/BtnDropdown.vue +0 -106
- package/src/BtnDropdownAction.vue +0 -38
- package/src/BtnDropdownSingle.vue +0 -40
- package/src/BtnDropdownSplit.vue +0 -66
- package/src/DropdownHandler.js +0 -419
- package/src/css/BtnDropdown.css +0 -1
- package/tailwind.config.js +0 -13
- package/vue.config.js +0 -11
|
@@ -0,0 +1,2179 @@
|
|
|
1
|
+
var top = "top";
|
|
2
|
+
var bottom = "bottom";
|
|
3
|
+
var right = "right";
|
|
4
|
+
var left = "left";
|
|
5
|
+
var auto = "auto";
|
|
6
|
+
var basePlacements = [top, bottom, right, left];
|
|
7
|
+
var start = "start";
|
|
8
|
+
var end = "end";
|
|
9
|
+
var clippingParents = "clippingParents";
|
|
10
|
+
var viewport = "viewport";
|
|
11
|
+
var popper = "popper";
|
|
12
|
+
var reference = "reference";
|
|
13
|
+
var variationPlacements = /* @__PURE__ */ basePlacements.reduce(function(acc, placement) {
|
|
14
|
+
return acc.concat([placement + "-" + start, placement + "-" + end]);
|
|
15
|
+
}, []);
|
|
16
|
+
var placements = /* @__PURE__ */ [].concat(basePlacements, [auto]).reduce(function(acc, placement) {
|
|
17
|
+
return acc.concat([placement, placement + "-" + start, placement + "-" + end]);
|
|
18
|
+
}, []);
|
|
19
|
+
var beforeRead = "beforeRead";
|
|
20
|
+
var read = "read";
|
|
21
|
+
var afterRead = "afterRead";
|
|
22
|
+
var beforeMain = "beforeMain";
|
|
23
|
+
var main = "main";
|
|
24
|
+
var afterMain = "afterMain";
|
|
25
|
+
var beforeWrite = "beforeWrite";
|
|
26
|
+
var write = "write";
|
|
27
|
+
var afterWrite = "afterWrite";
|
|
28
|
+
var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];
|
|
29
|
+
function getNodeName(element) {
|
|
30
|
+
return element ? (element.nodeName || "").toLowerCase() : null;
|
|
31
|
+
}
|
|
32
|
+
function getWindow(node) {
|
|
33
|
+
if (node == null) {
|
|
34
|
+
return window;
|
|
35
|
+
}
|
|
36
|
+
if (node.toString() !== "[object Window]") {
|
|
37
|
+
var ownerDocument = node.ownerDocument;
|
|
38
|
+
return ownerDocument ? ownerDocument.defaultView || window : window;
|
|
39
|
+
}
|
|
40
|
+
return node;
|
|
41
|
+
}
|
|
42
|
+
function isElement(node) {
|
|
43
|
+
var OwnElement = getWindow(node).Element;
|
|
44
|
+
return node instanceof OwnElement || node instanceof Element;
|
|
45
|
+
}
|
|
46
|
+
function isHTMLElement(node) {
|
|
47
|
+
var OwnElement = getWindow(node).HTMLElement;
|
|
48
|
+
return node instanceof OwnElement || node instanceof HTMLElement;
|
|
49
|
+
}
|
|
50
|
+
function isShadowRoot(node) {
|
|
51
|
+
if (typeof ShadowRoot === "undefined") {
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
var OwnElement = getWindow(node).ShadowRoot;
|
|
55
|
+
return node instanceof OwnElement || node instanceof ShadowRoot;
|
|
56
|
+
}
|
|
57
|
+
function applyStyles(_ref) {
|
|
58
|
+
var state = _ref.state;
|
|
59
|
+
Object.keys(state.elements).forEach(function(name) {
|
|
60
|
+
var style = state.styles[name] || {};
|
|
61
|
+
var attributes = state.attributes[name] || {};
|
|
62
|
+
var element = state.elements[name];
|
|
63
|
+
if (!isHTMLElement(element) || !getNodeName(element)) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
Object.assign(element.style, style);
|
|
67
|
+
Object.keys(attributes).forEach(function(name2) {
|
|
68
|
+
var value = attributes[name2];
|
|
69
|
+
if (value === false) {
|
|
70
|
+
element.removeAttribute(name2);
|
|
71
|
+
} else {
|
|
72
|
+
element.setAttribute(name2, value === true ? "" : value);
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
function effect$2(_ref2) {
|
|
78
|
+
var state = _ref2.state;
|
|
79
|
+
var initialStyles = {
|
|
80
|
+
popper: {
|
|
81
|
+
position: state.options.strategy,
|
|
82
|
+
left: "0",
|
|
83
|
+
top: "0",
|
|
84
|
+
margin: "0"
|
|
85
|
+
},
|
|
86
|
+
arrow: {
|
|
87
|
+
position: "absolute"
|
|
88
|
+
},
|
|
89
|
+
reference: {}
|
|
90
|
+
};
|
|
91
|
+
Object.assign(state.elements.popper.style, initialStyles.popper);
|
|
92
|
+
state.styles = initialStyles;
|
|
93
|
+
if (state.elements.arrow) {
|
|
94
|
+
Object.assign(state.elements.arrow.style, initialStyles.arrow);
|
|
95
|
+
}
|
|
96
|
+
return function() {
|
|
97
|
+
Object.keys(state.elements).forEach(function(name) {
|
|
98
|
+
var element = state.elements[name];
|
|
99
|
+
var attributes = state.attributes[name] || {};
|
|
100
|
+
var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]);
|
|
101
|
+
var style = styleProperties.reduce(function(style2, property) {
|
|
102
|
+
style2[property] = "";
|
|
103
|
+
return style2;
|
|
104
|
+
}, {});
|
|
105
|
+
if (!isHTMLElement(element) || !getNodeName(element)) {
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
Object.assign(element.style, style);
|
|
109
|
+
Object.keys(attributes).forEach(function(attribute) {
|
|
110
|
+
element.removeAttribute(attribute);
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
var applyStyles$1 = {
|
|
116
|
+
name: "applyStyles",
|
|
117
|
+
enabled: true,
|
|
118
|
+
phase: "write",
|
|
119
|
+
fn: applyStyles,
|
|
120
|
+
effect: effect$2,
|
|
121
|
+
requires: ["computeStyles"]
|
|
122
|
+
};
|
|
123
|
+
function getBasePlacement(placement) {
|
|
124
|
+
return placement.split("-")[0];
|
|
125
|
+
}
|
|
126
|
+
var max = Math.max;
|
|
127
|
+
var min = Math.min;
|
|
128
|
+
var round = Math.round;
|
|
129
|
+
function getBoundingClientRect(element, includeScale) {
|
|
130
|
+
if (includeScale === void 0) {
|
|
131
|
+
includeScale = false;
|
|
132
|
+
}
|
|
133
|
+
var rect = element.getBoundingClientRect();
|
|
134
|
+
var scaleX = 1;
|
|
135
|
+
var scaleY = 1;
|
|
136
|
+
if (isHTMLElement(element) && includeScale) {
|
|
137
|
+
var offsetHeight = element.offsetHeight;
|
|
138
|
+
var offsetWidth = element.offsetWidth;
|
|
139
|
+
if (offsetWidth > 0) {
|
|
140
|
+
scaleX = round(rect.width) / offsetWidth || 1;
|
|
141
|
+
}
|
|
142
|
+
if (offsetHeight > 0) {
|
|
143
|
+
scaleY = round(rect.height) / offsetHeight || 1;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
return {
|
|
147
|
+
width: rect.width / scaleX,
|
|
148
|
+
height: rect.height / scaleY,
|
|
149
|
+
top: rect.top / scaleY,
|
|
150
|
+
right: rect.right / scaleX,
|
|
151
|
+
bottom: rect.bottom / scaleY,
|
|
152
|
+
left: rect.left / scaleX,
|
|
153
|
+
x: rect.left / scaleX,
|
|
154
|
+
y: rect.top / scaleY
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
function getLayoutRect(element) {
|
|
158
|
+
var clientRect = getBoundingClientRect(element);
|
|
159
|
+
var width = element.offsetWidth;
|
|
160
|
+
var height = element.offsetHeight;
|
|
161
|
+
if (Math.abs(clientRect.width - width) <= 1) {
|
|
162
|
+
width = clientRect.width;
|
|
163
|
+
}
|
|
164
|
+
if (Math.abs(clientRect.height - height) <= 1) {
|
|
165
|
+
height = clientRect.height;
|
|
166
|
+
}
|
|
167
|
+
return {
|
|
168
|
+
x: element.offsetLeft,
|
|
169
|
+
y: element.offsetTop,
|
|
170
|
+
width,
|
|
171
|
+
height
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
function contains(parent, child) {
|
|
175
|
+
var rootNode = child.getRootNode && child.getRootNode();
|
|
176
|
+
if (parent.contains(child)) {
|
|
177
|
+
return true;
|
|
178
|
+
} else if (rootNode && isShadowRoot(rootNode)) {
|
|
179
|
+
var next = child;
|
|
180
|
+
do {
|
|
181
|
+
if (next && parent.isSameNode(next)) {
|
|
182
|
+
return true;
|
|
183
|
+
}
|
|
184
|
+
next = next.parentNode || next.host;
|
|
185
|
+
} while (next);
|
|
186
|
+
}
|
|
187
|
+
return false;
|
|
188
|
+
}
|
|
189
|
+
function getComputedStyle(element) {
|
|
190
|
+
return getWindow(element).getComputedStyle(element);
|
|
191
|
+
}
|
|
192
|
+
function isTableElement(element) {
|
|
193
|
+
return ["table", "td", "th"].indexOf(getNodeName(element)) >= 0;
|
|
194
|
+
}
|
|
195
|
+
function getDocumentElement(element) {
|
|
196
|
+
return ((isElement(element) ? element.ownerDocument : element.document) || window.document).documentElement;
|
|
197
|
+
}
|
|
198
|
+
function getParentNode(element) {
|
|
199
|
+
if (getNodeName(element) === "html") {
|
|
200
|
+
return element;
|
|
201
|
+
}
|
|
202
|
+
return element.assignedSlot || element.parentNode || (isShadowRoot(element) ? element.host : null) || getDocumentElement(element);
|
|
203
|
+
}
|
|
204
|
+
function getTrueOffsetParent(element) {
|
|
205
|
+
if (!isHTMLElement(element) || getComputedStyle(element).position === "fixed") {
|
|
206
|
+
return null;
|
|
207
|
+
}
|
|
208
|
+
return element.offsetParent;
|
|
209
|
+
}
|
|
210
|
+
function getContainingBlock(element) {
|
|
211
|
+
var isFirefox = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1;
|
|
212
|
+
var isIE = navigator.userAgent.indexOf("Trident") !== -1;
|
|
213
|
+
if (isIE && isHTMLElement(element)) {
|
|
214
|
+
var elementCss = getComputedStyle(element);
|
|
215
|
+
if (elementCss.position === "fixed") {
|
|
216
|
+
return null;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
var currentNode = getParentNode(element);
|
|
220
|
+
while (isHTMLElement(currentNode) && ["html", "body"].indexOf(getNodeName(currentNode)) < 0) {
|
|
221
|
+
var css = getComputedStyle(currentNode);
|
|
222
|
+
if (css.transform !== "none" || css.perspective !== "none" || css.contain === "paint" || ["transform", "perspective"].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === "filter" || isFirefox && css.filter && css.filter !== "none") {
|
|
223
|
+
return currentNode;
|
|
224
|
+
} else {
|
|
225
|
+
currentNode = currentNode.parentNode;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
return null;
|
|
229
|
+
}
|
|
230
|
+
function getOffsetParent(element) {
|
|
231
|
+
var window2 = getWindow(element);
|
|
232
|
+
var offsetParent = getTrueOffsetParent(element);
|
|
233
|
+
while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === "static") {
|
|
234
|
+
offsetParent = getTrueOffsetParent(offsetParent);
|
|
235
|
+
}
|
|
236
|
+
if (offsetParent && (getNodeName(offsetParent) === "html" || getNodeName(offsetParent) === "body" && getComputedStyle(offsetParent).position === "static")) {
|
|
237
|
+
return window2;
|
|
238
|
+
}
|
|
239
|
+
return offsetParent || getContainingBlock(element) || window2;
|
|
240
|
+
}
|
|
241
|
+
function getMainAxisFromPlacement(placement) {
|
|
242
|
+
return ["top", "bottom"].indexOf(placement) >= 0 ? "x" : "y";
|
|
243
|
+
}
|
|
244
|
+
function within(min$1, value, max$1) {
|
|
245
|
+
return max(min$1, min(value, max$1));
|
|
246
|
+
}
|
|
247
|
+
function withinMaxClamp(min2, value, max2) {
|
|
248
|
+
var v = within(min2, value, max2);
|
|
249
|
+
return v > max2 ? max2 : v;
|
|
250
|
+
}
|
|
251
|
+
function getFreshSideObject() {
|
|
252
|
+
return {
|
|
253
|
+
top: 0,
|
|
254
|
+
right: 0,
|
|
255
|
+
bottom: 0,
|
|
256
|
+
left: 0
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
function mergePaddingObject(paddingObject) {
|
|
260
|
+
return Object.assign({}, getFreshSideObject(), paddingObject);
|
|
261
|
+
}
|
|
262
|
+
function expandToHashMap(value, keys) {
|
|
263
|
+
return keys.reduce(function(hashMap, key) {
|
|
264
|
+
hashMap[key] = value;
|
|
265
|
+
return hashMap;
|
|
266
|
+
}, {});
|
|
267
|
+
}
|
|
268
|
+
var toPaddingObject = function toPaddingObject2(padding, state) {
|
|
269
|
+
padding = typeof padding === "function" ? padding(Object.assign({}, state.rects, {
|
|
270
|
+
placement: state.placement
|
|
271
|
+
})) : padding;
|
|
272
|
+
return mergePaddingObject(typeof padding !== "number" ? padding : expandToHashMap(padding, basePlacements));
|
|
273
|
+
};
|
|
274
|
+
function arrow(_ref) {
|
|
275
|
+
var _state$modifiersData$;
|
|
276
|
+
var state = _ref.state, name = _ref.name, options = _ref.options;
|
|
277
|
+
var arrowElement = state.elements.arrow;
|
|
278
|
+
var popperOffsets2 = state.modifiersData.popperOffsets;
|
|
279
|
+
var basePlacement = getBasePlacement(state.placement);
|
|
280
|
+
var axis = getMainAxisFromPlacement(basePlacement);
|
|
281
|
+
var isVertical = [left, right].indexOf(basePlacement) >= 0;
|
|
282
|
+
var len = isVertical ? "height" : "width";
|
|
283
|
+
if (!arrowElement || !popperOffsets2) {
|
|
284
|
+
return;
|
|
285
|
+
}
|
|
286
|
+
var paddingObject = toPaddingObject(options.padding, state);
|
|
287
|
+
var arrowRect = getLayoutRect(arrowElement);
|
|
288
|
+
var minProp = axis === "y" ? top : left;
|
|
289
|
+
var maxProp = axis === "y" ? bottom : right;
|
|
290
|
+
var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets2[axis] - state.rects.popper[len];
|
|
291
|
+
var startDiff = popperOffsets2[axis] - state.rects.reference[axis];
|
|
292
|
+
var arrowOffsetParent = getOffsetParent(arrowElement);
|
|
293
|
+
var clientSize = arrowOffsetParent ? axis === "y" ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;
|
|
294
|
+
var centerToReference = endDiff / 2 - startDiff / 2;
|
|
295
|
+
var min2 = paddingObject[minProp];
|
|
296
|
+
var max2 = clientSize - arrowRect[len] - paddingObject[maxProp];
|
|
297
|
+
var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;
|
|
298
|
+
var offset2 = within(min2, center, max2);
|
|
299
|
+
var axisProp = axis;
|
|
300
|
+
state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset2, _state$modifiersData$.centerOffset = offset2 - center, _state$modifiersData$);
|
|
301
|
+
}
|
|
302
|
+
function effect$1(_ref2) {
|
|
303
|
+
var state = _ref2.state, options = _ref2.options;
|
|
304
|
+
var _options$element = options.element, arrowElement = _options$element === void 0 ? "[data-popper-arrow]" : _options$element;
|
|
305
|
+
if (arrowElement == null) {
|
|
306
|
+
return;
|
|
307
|
+
}
|
|
308
|
+
if (typeof arrowElement === "string") {
|
|
309
|
+
arrowElement = state.elements.popper.querySelector(arrowElement);
|
|
310
|
+
if (!arrowElement) {
|
|
311
|
+
return;
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
if (!contains(state.elements.popper, arrowElement)) {
|
|
315
|
+
return;
|
|
316
|
+
}
|
|
317
|
+
state.elements.arrow = arrowElement;
|
|
318
|
+
}
|
|
319
|
+
var arrow$1 = {
|
|
320
|
+
name: "arrow",
|
|
321
|
+
enabled: true,
|
|
322
|
+
phase: "main",
|
|
323
|
+
fn: arrow,
|
|
324
|
+
effect: effect$1,
|
|
325
|
+
requires: ["popperOffsets"],
|
|
326
|
+
requiresIfExists: ["preventOverflow"]
|
|
327
|
+
};
|
|
328
|
+
function getVariation(placement) {
|
|
329
|
+
return placement.split("-")[1];
|
|
330
|
+
}
|
|
331
|
+
var unsetSides = {
|
|
332
|
+
top: "auto",
|
|
333
|
+
right: "auto",
|
|
334
|
+
bottom: "auto",
|
|
335
|
+
left: "auto"
|
|
336
|
+
};
|
|
337
|
+
function roundOffsetsByDPR(_ref) {
|
|
338
|
+
var x = _ref.x, y = _ref.y;
|
|
339
|
+
var win = window;
|
|
340
|
+
var dpr = win.devicePixelRatio || 1;
|
|
341
|
+
return {
|
|
342
|
+
x: round(x * dpr) / dpr || 0,
|
|
343
|
+
y: round(y * dpr) / dpr || 0
|
|
344
|
+
};
|
|
345
|
+
}
|
|
346
|
+
function mapToStyles(_ref2) {
|
|
347
|
+
var _Object$assign2;
|
|
348
|
+
var popper2 = _ref2.popper, popperRect = _ref2.popperRect, placement = _ref2.placement, variation = _ref2.variation, offsets = _ref2.offsets, position = _ref2.position, gpuAcceleration = _ref2.gpuAcceleration, adaptive = _ref2.adaptive, roundOffsets = _ref2.roundOffsets, isFixed = _ref2.isFixed;
|
|
349
|
+
var _offsets$x = offsets.x, x = _offsets$x === void 0 ? 0 : _offsets$x, _offsets$y = offsets.y, y = _offsets$y === void 0 ? 0 : _offsets$y;
|
|
350
|
+
var _ref3 = typeof roundOffsets === "function" ? roundOffsets({
|
|
351
|
+
x,
|
|
352
|
+
y
|
|
353
|
+
}) : {
|
|
354
|
+
x,
|
|
355
|
+
y
|
|
356
|
+
};
|
|
357
|
+
x = _ref3.x;
|
|
358
|
+
y = _ref3.y;
|
|
359
|
+
var hasX = offsets.hasOwnProperty("x");
|
|
360
|
+
var hasY = offsets.hasOwnProperty("y");
|
|
361
|
+
var sideX = left;
|
|
362
|
+
var sideY = top;
|
|
363
|
+
var win = window;
|
|
364
|
+
if (adaptive) {
|
|
365
|
+
var offsetParent = getOffsetParent(popper2);
|
|
366
|
+
var heightProp = "clientHeight";
|
|
367
|
+
var widthProp = "clientWidth";
|
|
368
|
+
if (offsetParent === getWindow(popper2)) {
|
|
369
|
+
offsetParent = getDocumentElement(popper2);
|
|
370
|
+
if (getComputedStyle(offsetParent).position !== "static" && position === "absolute") {
|
|
371
|
+
heightProp = "scrollHeight";
|
|
372
|
+
widthProp = "scrollWidth";
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
offsetParent = offsetParent;
|
|
376
|
+
if (placement === top || (placement === left || placement === right) && variation === end) {
|
|
377
|
+
sideY = bottom;
|
|
378
|
+
var offsetY = isFixed && win.visualViewport ? win.visualViewport.height : offsetParent[heightProp];
|
|
379
|
+
y -= offsetY - popperRect.height;
|
|
380
|
+
y *= gpuAcceleration ? 1 : -1;
|
|
381
|
+
}
|
|
382
|
+
if (placement === left || (placement === top || placement === bottom) && variation === end) {
|
|
383
|
+
sideX = right;
|
|
384
|
+
var offsetX = isFixed && win.visualViewport ? win.visualViewport.width : offsetParent[widthProp];
|
|
385
|
+
x -= offsetX - popperRect.width;
|
|
386
|
+
x *= gpuAcceleration ? 1 : -1;
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
var commonStyles = Object.assign({
|
|
390
|
+
position
|
|
391
|
+
}, adaptive && unsetSides);
|
|
392
|
+
var _ref4 = roundOffsets === true ? roundOffsetsByDPR({
|
|
393
|
+
x,
|
|
394
|
+
y
|
|
395
|
+
}) : {
|
|
396
|
+
x,
|
|
397
|
+
y
|
|
398
|
+
};
|
|
399
|
+
x = _ref4.x;
|
|
400
|
+
y = _ref4.y;
|
|
401
|
+
if (gpuAcceleration) {
|
|
402
|
+
var _Object$assign;
|
|
403
|
+
return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? "0" : "", _Object$assign[sideX] = hasX ? "0" : "", _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign));
|
|
404
|
+
}
|
|
405
|
+
return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : "", _Object$assign2[sideX] = hasX ? x + "px" : "", _Object$assign2.transform = "", _Object$assign2));
|
|
406
|
+
}
|
|
407
|
+
function computeStyles(_ref5) {
|
|
408
|
+
var state = _ref5.state, options = _ref5.options;
|
|
409
|
+
var _options$gpuAccelerat = options.gpuAcceleration, gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat, _options$adaptive = options.adaptive, adaptive = _options$adaptive === void 0 ? true : _options$adaptive, _options$roundOffsets = options.roundOffsets, roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;
|
|
410
|
+
var commonStyles = {
|
|
411
|
+
placement: getBasePlacement(state.placement),
|
|
412
|
+
variation: getVariation(state.placement),
|
|
413
|
+
popper: state.elements.popper,
|
|
414
|
+
popperRect: state.rects.popper,
|
|
415
|
+
gpuAcceleration,
|
|
416
|
+
isFixed: state.options.strategy === "fixed"
|
|
417
|
+
};
|
|
418
|
+
if (state.modifiersData.popperOffsets != null) {
|
|
419
|
+
state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {
|
|
420
|
+
offsets: state.modifiersData.popperOffsets,
|
|
421
|
+
position: state.options.strategy,
|
|
422
|
+
adaptive,
|
|
423
|
+
roundOffsets
|
|
424
|
+
})));
|
|
425
|
+
}
|
|
426
|
+
if (state.modifiersData.arrow != null) {
|
|
427
|
+
state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {
|
|
428
|
+
offsets: state.modifiersData.arrow,
|
|
429
|
+
position: "absolute",
|
|
430
|
+
adaptive: false,
|
|
431
|
+
roundOffsets
|
|
432
|
+
})));
|
|
433
|
+
}
|
|
434
|
+
state.attributes.popper = Object.assign({}, state.attributes.popper, {
|
|
435
|
+
"data-popper-placement": state.placement
|
|
436
|
+
});
|
|
437
|
+
}
|
|
438
|
+
var computeStyles$1 = {
|
|
439
|
+
name: "computeStyles",
|
|
440
|
+
enabled: true,
|
|
441
|
+
phase: "beforeWrite",
|
|
442
|
+
fn: computeStyles,
|
|
443
|
+
data: {}
|
|
444
|
+
};
|
|
445
|
+
var passive = {
|
|
446
|
+
passive: true
|
|
447
|
+
};
|
|
448
|
+
function effect(_ref) {
|
|
449
|
+
var state = _ref.state, instance = _ref.instance, options = _ref.options;
|
|
450
|
+
var _options$scroll = options.scroll, scroll = _options$scroll === void 0 ? true : _options$scroll, _options$resize = options.resize, resize = _options$resize === void 0 ? true : _options$resize;
|
|
451
|
+
var window2 = getWindow(state.elements.popper);
|
|
452
|
+
var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);
|
|
453
|
+
if (scroll) {
|
|
454
|
+
scrollParents.forEach(function(scrollParent) {
|
|
455
|
+
scrollParent.addEventListener("scroll", instance.update, passive);
|
|
456
|
+
});
|
|
457
|
+
}
|
|
458
|
+
if (resize) {
|
|
459
|
+
window2.addEventListener("resize", instance.update, passive);
|
|
460
|
+
}
|
|
461
|
+
return function() {
|
|
462
|
+
if (scroll) {
|
|
463
|
+
scrollParents.forEach(function(scrollParent) {
|
|
464
|
+
scrollParent.removeEventListener("scroll", instance.update, passive);
|
|
465
|
+
});
|
|
466
|
+
}
|
|
467
|
+
if (resize) {
|
|
468
|
+
window2.removeEventListener("resize", instance.update, passive);
|
|
469
|
+
}
|
|
470
|
+
};
|
|
471
|
+
}
|
|
472
|
+
var eventListeners = {
|
|
473
|
+
name: "eventListeners",
|
|
474
|
+
enabled: true,
|
|
475
|
+
phase: "write",
|
|
476
|
+
fn: function fn() {
|
|
477
|
+
},
|
|
478
|
+
effect,
|
|
479
|
+
data: {}
|
|
480
|
+
};
|
|
481
|
+
var hash$1 = {
|
|
482
|
+
left: "right",
|
|
483
|
+
right: "left",
|
|
484
|
+
bottom: "top",
|
|
485
|
+
top: "bottom"
|
|
486
|
+
};
|
|
487
|
+
function getOppositePlacement(placement) {
|
|
488
|
+
return placement.replace(/left|right|bottom|top/g, function(matched) {
|
|
489
|
+
return hash$1[matched];
|
|
490
|
+
});
|
|
491
|
+
}
|
|
492
|
+
var hash = {
|
|
493
|
+
start: "end",
|
|
494
|
+
end: "start"
|
|
495
|
+
};
|
|
496
|
+
function getOppositeVariationPlacement(placement) {
|
|
497
|
+
return placement.replace(/start|end/g, function(matched) {
|
|
498
|
+
return hash[matched];
|
|
499
|
+
});
|
|
500
|
+
}
|
|
501
|
+
function getWindowScroll(node) {
|
|
502
|
+
var win = getWindow(node);
|
|
503
|
+
var scrollLeft = win.pageXOffset;
|
|
504
|
+
var scrollTop = win.pageYOffset;
|
|
505
|
+
return {
|
|
506
|
+
scrollLeft,
|
|
507
|
+
scrollTop
|
|
508
|
+
};
|
|
509
|
+
}
|
|
510
|
+
function getWindowScrollBarX(element) {
|
|
511
|
+
return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;
|
|
512
|
+
}
|
|
513
|
+
function getViewportRect(element) {
|
|
514
|
+
var win = getWindow(element);
|
|
515
|
+
var html = getDocumentElement(element);
|
|
516
|
+
var visualViewport = win.visualViewport;
|
|
517
|
+
var width = html.clientWidth;
|
|
518
|
+
var height = html.clientHeight;
|
|
519
|
+
var x = 0;
|
|
520
|
+
var y = 0;
|
|
521
|
+
if (visualViewport) {
|
|
522
|
+
width = visualViewport.width;
|
|
523
|
+
height = visualViewport.height;
|
|
524
|
+
if (!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {
|
|
525
|
+
x = visualViewport.offsetLeft;
|
|
526
|
+
y = visualViewport.offsetTop;
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
return {
|
|
530
|
+
width,
|
|
531
|
+
height,
|
|
532
|
+
x: x + getWindowScrollBarX(element),
|
|
533
|
+
y
|
|
534
|
+
};
|
|
535
|
+
}
|
|
536
|
+
function getDocumentRect(element) {
|
|
537
|
+
var _element$ownerDocumen;
|
|
538
|
+
var html = getDocumentElement(element);
|
|
539
|
+
var winScroll = getWindowScroll(element);
|
|
540
|
+
var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;
|
|
541
|
+
var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);
|
|
542
|
+
var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);
|
|
543
|
+
var x = -winScroll.scrollLeft + getWindowScrollBarX(element);
|
|
544
|
+
var y = -winScroll.scrollTop;
|
|
545
|
+
if (getComputedStyle(body || html).direction === "rtl") {
|
|
546
|
+
x += max(html.clientWidth, body ? body.clientWidth : 0) - width;
|
|
547
|
+
}
|
|
548
|
+
return {
|
|
549
|
+
width,
|
|
550
|
+
height,
|
|
551
|
+
x,
|
|
552
|
+
y
|
|
553
|
+
};
|
|
554
|
+
}
|
|
555
|
+
function isScrollParent(element) {
|
|
556
|
+
var _getComputedStyle = getComputedStyle(element), overflow = _getComputedStyle.overflow, overflowX = _getComputedStyle.overflowX, overflowY = _getComputedStyle.overflowY;
|
|
557
|
+
return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);
|
|
558
|
+
}
|
|
559
|
+
function getScrollParent(node) {
|
|
560
|
+
if (["html", "body", "#document"].indexOf(getNodeName(node)) >= 0) {
|
|
561
|
+
return node.ownerDocument.body;
|
|
562
|
+
}
|
|
563
|
+
if (isHTMLElement(node) && isScrollParent(node)) {
|
|
564
|
+
return node;
|
|
565
|
+
}
|
|
566
|
+
return getScrollParent(getParentNode(node));
|
|
567
|
+
}
|
|
568
|
+
function listScrollParents(element, list) {
|
|
569
|
+
var _element$ownerDocumen;
|
|
570
|
+
if (list === void 0) {
|
|
571
|
+
list = [];
|
|
572
|
+
}
|
|
573
|
+
var scrollParent = getScrollParent(element);
|
|
574
|
+
var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);
|
|
575
|
+
var win = getWindow(scrollParent);
|
|
576
|
+
var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;
|
|
577
|
+
var updatedList = list.concat(target);
|
|
578
|
+
return isBody ? updatedList : updatedList.concat(listScrollParents(getParentNode(target)));
|
|
579
|
+
}
|
|
580
|
+
function rectToClientRect(rect) {
|
|
581
|
+
return Object.assign({}, rect, {
|
|
582
|
+
left: rect.x,
|
|
583
|
+
top: rect.y,
|
|
584
|
+
right: rect.x + rect.width,
|
|
585
|
+
bottom: rect.y + rect.height
|
|
586
|
+
});
|
|
587
|
+
}
|
|
588
|
+
function getInnerBoundingClientRect(element) {
|
|
589
|
+
var rect = getBoundingClientRect(element);
|
|
590
|
+
rect.top = rect.top + element.clientTop;
|
|
591
|
+
rect.left = rect.left + element.clientLeft;
|
|
592
|
+
rect.bottom = rect.top + element.clientHeight;
|
|
593
|
+
rect.right = rect.left + element.clientWidth;
|
|
594
|
+
rect.width = element.clientWidth;
|
|
595
|
+
rect.height = element.clientHeight;
|
|
596
|
+
rect.x = rect.left;
|
|
597
|
+
rect.y = rect.top;
|
|
598
|
+
return rect;
|
|
599
|
+
}
|
|
600
|
+
function getClientRectFromMixedType(element, clippingParent) {
|
|
601
|
+
return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
|
|
602
|
+
}
|
|
603
|
+
function getClippingParents(element) {
|
|
604
|
+
var clippingParents2 = listScrollParents(getParentNode(element));
|
|
605
|
+
var canEscapeClipping = ["absolute", "fixed"].indexOf(getComputedStyle(element).position) >= 0;
|
|
606
|
+
var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;
|
|
607
|
+
if (!isElement(clipperElement)) {
|
|
608
|
+
return [];
|
|
609
|
+
}
|
|
610
|
+
return clippingParents2.filter(function(clippingParent) {
|
|
611
|
+
return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== "body";
|
|
612
|
+
});
|
|
613
|
+
}
|
|
614
|
+
function getClippingRect(element, boundary, rootBoundary) {
|
|
615
|
+
var mainClippingParents = boundary === "clippingParents" ? getClippingParents(element) : [].concat(boundary);
|
|
616
|
+
var clippingParents2 = [].concat(mainClippingParents, [rootBoundary]);
|
|
617
|
+
var firstClippingParent = clippingParents2[0];
|
|
618
|
+
var clippingRect = clippingParents2.reduce(function(accRect, clippingParent) {
|
|
619
|
+
var rect = getClientRectFromMixedType(element, clippingParent);
|
|
620
|
+
accRect.top = max(rect.top, accRect.top);
|
|
621
|
+
accRect.right = min(rect.right, accRect.right);
|
|
622
|
+
accRect.bottom = min(rect.bottom, accRect.bottom);
|
|
623
|
+
accRect.left = max(rect.left, accRect.left);
|
|
624
|
+
return accRect;
|
|
625
|
+
}, getClientRectFromMixedType(element, firstClippingParent));
|
|
626
|
+
clippingRect.width = clippingRect.right - clippingRect.left;
|
|
627
|
+
clippingRect.height = clippingRect.bottom - clippingRect.top;
|
|
628
|
+
clippingRect.x = clippingRect.left;
|
|
629
|
+
clippingRect.y = clippingRect.top;
|
|
630
|
+
return clippingRect;
|
|
631
|
+
}
|
|
632
|
+
function computeOffsets(_ref) {
|
|
633
|
+
var reference2 = _ref.reference, element = _ref.element, placement = _ref.placement;
|
|
634
|
+
var basePlacement = placement ? getBasePlacement(placement) : null;
|
|
635
|
+
var variation = placement ? getVariation(placement) : null;
|
|
636
|
+
var commonX = reference2.x + reference2.width / 2 - element.width / 2;
|
|
637
|
+
var commonY = reference2.y + reference2.height / 2 - element.height / 2;
|
|
638
|
+
var offsets;
|
|
639
|
+
switch (basePlacement) {
|
|
640
|
+
case top:
|
|
641
|
+
offsets = {
|
|
642
|
+
x: commonX,
|
|
643
|
+
y: reference2.y - element.height
|
|
644
|
+
};
|
|
645
|
+
break;
|
|
646
|
+
case bottom:
|
|
647
|
+
offsets = {
|
|
648
|
+
x: commonX,
|
|
649
|
+
y: reference2.y + reference2.height
|
|
650
|
+
};
|
|
651
|
+
break;
|
|
652
|
+
case right:
|
|
653
|
+
offsets = {
|
|
654
|
+
x: reference2.x + reference2.width,
|
|
655
|
+
y: commonY
|
|
656
|
+
};
|
|
657
|
+
break;
|
|
658
|
+
case left:
|
|
659
|
+
offsets = {
|
|
660
|
+
x: reference2.x - element.width,
|
|
661
|
+
y: commonY
|
|
662
|
+
};
|
|
663
|
+
break;
|
|
664
|
+
default:
|
|
665
|
+
offsets = {
|
|
666
|
+
x: reference2.x,
|
|
667
|
+
y: reference2.y
|
|
668
|
+
};
|
|
669
|
+
}
|
|
670
|
+
var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;
|
|
671
|
+
if (mainAxis != null) {
|
|
672
|
+
var len = mainAxis === "y" ? "height" : "width";
|
|
673
|
+
switch (variation) {
|
|
674
|
+
case start:
|
|
675
|
+
offsets[mainAxis] = offsets[mainAxis] - (reference2[len] / 2 - element[len] / 2);
|
|
676
|
+
break;
|
|
677
|
+
case end:
|
|
678
|
+
offsets[mainAxis] = offsets[mainAxis] + (reference2[len] / 2 - element[len] / 2);
|
|
679
|
+
break;
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
return offsets;
|
|
683
|
+
}
|
|
684
|
+
function detectOverflow(state, options) {
|
|
685
|
+
if (options === void 0) {
|
|
686
|
+
options = {};
|
|
687
|
+
}
|
|
688
|
+
var _options = options, _options$placement = _options.placement, placement = _options$placement === void 0 ? state.placement : _options$placement, _options$boundary = _options.boundary, boundary = _options$boundary === void 0 ? clippingParents : _options$boundary, _options$rootBoundary = _options.rootBoundary, rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary, _options$elementConte = _options.elementContext, elementContext = _options$elementConte === void 0 ? popper : _options$elementConte, _options$altBoundary = _options.altBoundary, altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary, _options$padding = _options.padding, padding = _options$padding === void 0 ? 0 : _options$padding;
|
|
689
|
+
var paddingObject = mergePaddingObject(typeof padding !== "number" ? padding : expandToHashMap(padding, basePlacements));
|
|
690
|
+
var altContext = elementContext === popper ? reference : popper;
|
|
691
|
+
var popperRect = state.rects.popper;
|
|
692
|
+
var element = state.elements[altBoundary ? altContext : elementContext];
|
|
693
|
+
var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary);
|
|
694
|
+
var referenceClientRect = getBoundingClientRect(state.elements.reference);
|
|
695
|
+
var popperOffsets2 = computeOffsets({
|
|
696
|
+
reference: referenceClientRect,
|
|
697
|
+
element: popperRect,
|
|
698
|
+
strategy: "absolute",
|
|
699
|
+
placement
|
|
700
|
+
});
|
|
701
|
+
var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets2));
|
|
702
|
+
var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect;
|
|
703
|
+
var overflowOffsets = {
|
|
704
|
+
top: clippingClientRect.top - elementClientRect.top + paddingObject.top,
|
|
705
|
+
bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,
|
|
706
|
+
left: clippingClientRect.left - elementClientRect.left + paddingObject.left,
|
|
707
|
+
right: elementClientRect.right - clippingClientRect.right + paddingObject.right
|
|
708
|
+
};
|
|
709
|
+
var offsetData = state.modifiersData.offset;
|
|
710
|
+
if (elementContext === popper && offsetData) {
|
|
711
|
+
var offset2 = offsetData[placement];
|
|
712
|
+
Object.keys(overflowOffsets).forEach(function(key) {
|
|
713
|
+
var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;
|
|
714
|
+
var axis = [top, bottom].indexOf(key) >= 0 ? "y" : "x";
|
|
715
|
+
overflowOffsets[key] += offset2[axis] * multiply;
|
|
716
|
+
});
|
|
717
|
+
}
|
|
718
|
+
return overflowOffsets;
|
|
719
|
+
}
|
|
720
|
+
function computeAutoPlacement(state, options) {
|
|
721
|
+
if (options === void 0) {
|
|
722
|
+
options = {};
|
|
723
|
+
}
|
|
724
|
+
var _options = options, placement = _options.placement, boundary = _options.boundary, rootBoundary = _options.rootBoundary, padding = _options.padding, flipVariations = _options.flipVariations, _options$allowedAutoP = _options.allowedAutoPlacements, allowedAutoPlacements = _options$allowedAutoP === void 0 ? placements : _options$allowedAutoP;
|
|
725
|
+
var variation = getVariation(placement);
|
|
726
|
+
var placements$1 = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function(placement2) {
|
|
727
|
+
return getVariation(placement2) === variation;
|
|
728
|
+
}) : basePlacements;
|
|
729
|
+
var allowedPlacements = placements$1.filter(function(placement2) {
|
|
730
|
+
return allowedAutoPlacements.indexOf(placement2) >= 0;
|
|
731
|
+
});
|
|
732
|
+
if (allowedPlacements.length === 0) {
|
|
733
|
+
allowedPlacements = placements$1;
|
|
734
|
+
}
|
|
735
|
+
var overflows = allowedPlacements.reduce(function(acc, placement2) {
|
|
736
|
+
acc[placement2] = detectOverflow(state, {
|
|
737
|
+
placement: placement2,
|
|
738
|
+
boundary,
|
|
739
|
+
rootBoundary,
|
|
740
|
+
padding
|
|
741
|
+
})[getBasePlacement(placement2)];
|
|
742
|
+
return acc;
|
|
743
|
+
}, {});
|
|
744
|
+
return Object.keys(overflows).sort(function(a, b) {
|
|
745
|
+
return overflows[a] - overflows[b];
|
|
746
|
+
});
|
|
747
|
+
}
|
|
748
|
+
function getExpandedFallbackPlacements(placement) {
|
|
749
|
+
if (getBasePlacement(placement) === auto) {
|
|
750
|
+
return [];
|
|
751
|
+
}
|
|
752
|
+
var oppositePlacement = getOppositePlacement(placement);
|
|
753
|
+
return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];
|
|
754
|
+
}
|
|
755
|
+
function flip(_ref) {
|
|
756
|
+
var state = _ref.state, options = _ref.options, name = _ref.name;
|
|
757
|
+
if (state.modifiersData[name]._skip) {
|
|
758
|
+
return;
|
|
759
|
+
}
|
|
760
|
+
var _options$mainAxis = options.mainAxis, checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis, _options$altAxis = options.altAxis, checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis, specifiedFallbackPlacements = options.fallbackPlacements, padding = options.padding, boundary = options.boundary, rootBoundary = options.rootBoundary, altBoundary = options.altBoundary, _options$flipVariatio = options.flipVariations, flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio, allowedAutoPlacements = options.allowedAutoPlacements;
|
|
761
|
+
var preferredPlacement = state.options.placement;
|
|
762
|
+
var basePlacement = getBasePlacement(preferredPlacement);
|
|
763
|
+
var isBasePlacement = basePlacement === preferredPlacement;
|
|
764
|
+
var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));
|
|
765
|
+
var placements2 = [preferredPlacement].concat(fallbackPlacements).reduce(function(acc, placement2) {
|
|
766
|
+
return acc.concat(getBasePlacement(placement2) === auto ? computeAutoPlacement(state, {
|
|
767
|
+
placement: placement2,
|
|
768
|
+
boundary,
|
|
769
|
+
rootBoundary,
|
|
770
|
+
padding,
|
|
771
|
+
flipVariations,
|
|
772
|
+
allowedAutoPlacements
|
|
773
|
+
}) : placement2);
|
|
774
|
+
}, []);
|
|
775
|
+
var referenceRect = state.rects.reference;
|
|
776
|
+
var popperRect = state.rects.popper;
|
|
777
|
+
var checksMap = new Map();
|
|
778
|
+
var makeFallbackChecks = true;
|
|
779
|
+
var firstFittingPlacement = placements2[0];
|
|
780
|
+
for (var i = 0; i < placements2.length; i++) {
|
|
781
|
+
var placement = placements2[i];
|
|
782
|
+
var _basePlacement = getBasePlacement(placement);
|
|
783
|
+
var isStartVariation = getVariation(placement) === start;
|
|
784
|
+
var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;
|
|
785
|
+
var len = isVertical ? "width" : "height";
|
|
786
|
+
var overflow = detectOverflow(state, {
|
|
787
|
+
placement,
|
|
788
|
+
boundary,
|
|
789
|
+
rootBoundary,
|
|
790
|
+
altBoundary,
|
|
791
|
+
padding
|
|
792
|
+
});
|
|
793
|
+
var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;
|
|
794
|
+
if (referenceRect[len] > popperRect[len]) {
|
|
795
|
+
mainVariationSide = getOppositePlacement(mainVariationSide);
|
|
796
|
+
}
|
|
797
|
+
var altVariationSide = getOppositePlacement(mainVariationSide);
|
|
798
|
+
var checks = [];
|
|
799
|
+
if (checkMainAxis) {
|
|
800
|
+
checks.push(overflow[_basePlacement] <= 0);
|
|
801
|
+
}
|
|
802
|
+
if (checkAltAxis) {
|
|
803
|
+
checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);
|
|
804
|
+
}
|
|
805
|
+
if (checks.every(function(check) {
|
|
806
|
+
return check;
|
|
807
|
+
})) {
|
|
808
|
+
firstFittingPlacement = placement;
|
|
809
|
+
makeFallbackChecks = false;
|
|
810
|
+
break;
|
|
811
|
+
}
|
|
812
|
+
checksMap.set(placement, checks);
|
|
813
|
+
}
|
|
814
|
+
if (makeFallbackChecks) {
|
|
815
|
+
var numberOfChecks = flipVariations ? 3 : 1;
|
|
816
|
+
var _loop = function _loop2(_i2) {
|
|
817
|
+
var fittingPlacement = placements2.find(function(placement2) {
|
|
818
|
+
var checks2 = checksMap.get(placement2);
|
|
819
|
+
if (checks2) {
|
|
820
|
+
return checks2.slice(0, _i2).every(function(check) {
|
|
821
|
+
return check;
|
|
822
|
+
});
|
|
823
|
+
}
|
|
824
|
+
});
|
|
825
|
+
if (fittingPlacement) {
|
|
826
|
+
firstFittingPlacement = fittingPlacement;
|
|
827
|
+
return "break";
|
|
828
|
+
}
|
|
829
|
+
};
|
|
830
|
+
for (var _i = numberOfChecks; _i > 0; _i--) {
|
|
831
|
+
var _ret = _loop(_i);
|
|
832
|
+
if (_ret === "break")
|
|
833
|
+
break;
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
if (state.placement !== firstFittingPlacement) {
|
|
837
|
+
state.modifiersData[name]._skip = true;
|
|
838
|
+
state.placement = firstFittingPlacement;
|
|
839
|
+
state.reset = true;
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
var flip$1 = {
|
|
843
|
+
name: "flip",
|
|
844
|
+
enabled: true,
|
|
845
|
+
phase: "main",
|
|
846
|
+
fn: flip,
|
|
847
|
+
requiresIfExists: ["offset"],
|
|
848
|
+
data: {
|
|
849
|
+
_skip: false
|
|
850
|
+
}
|
|
851
|
+
};
|
|
852
|
+
function getSideOffsets(overflow, rect, preventedOffsets) {
|
|
853
|
+
if (preventedOffsets === void 0) {
|
|
854
|
+
preventedOffsets = {
|
|
855
|
+
x: 0,
|
|
856
|
+
y: 0
|
|
857
|
+
};
|
|
858
|
+
}
|
|
859
|
+
return {
|
|
860
|
+
top: overflow.top - rect.height - preventedOffsets.y,
|
|
861
|
+
right: overflow.right - rect.width + preventedOffsets.x,
|
|
862
|
+
bottom: overflow.bottom - rect.height + preventedOffsets.y,
|
|
863
|
+
left: overflow.left - rect.width - preventedOffsets.x
|
|
864
|
+
};
|
|
865
|
+
}
|
|
866
|
+
function isAnySideFullyClipped(overflow) {
|
|
867
|
+
return [top, right, bottom, left].some(function(side) {
|
|
868
|
+
return overflow[side] >= 0;
|
|
869
|
+
});
|
|
870
|
+
}
|
|
871
|
+
function hide(_ref) {
|
|
872
|
+
var state = _ref.state, name = _ref.name;
|
|
873
|
+
var referenceRect = state.rects.reference;
|
|
874
|
+
var popperRect = state.rects.popper;
|
|
875
|
+
var preventedOffsets = state.modifiersData.preventOverflow;
|
|
876
|
+
var referenceOverflow = detectOverflow(state, {
|
|
877
|
+
elementContext: "reference"
|
|
878
|
+
});
|
|
879
|
+
var popperAltOverflow = detectOverflow(state, {
|
|
880
|
+
altBoundary: true
|
|
881
|
+
});
|
|
882
|
+
var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);
|
|
883
|
+
var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);
|
|
884
|
+
var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);
|
|
885
|
+
var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);
|
|
886
|
+
state.modifiersData[name] = {
|
|
887
|
+
referenceClippingOffsets,
|
|
888
|
+
popperEscapeOffsets,
|
|
889
|
+
isReferenceHidden,
|
|
890
|
+
hasPopperEscaped
|
|
891
|
+
};
|
|
892
|
+
state.attributes.popper = Object.assign({}, state.attributes.popper, {
|
|
893
|
+
"data-popper-reference-hidden": isReferenceHidden,
|
|
894
|
+
"data-popper-escaped": hasPopperEscaped
|
|
895
|
+
});
|
|
896
|
+
}
|
|
897
|
+
var hide$1 = {
|
|
898
|
+
name: "hide",
|
|
899
|
+
enabled: true,
|
|
900
|
+
phase: "main",
|
|
901
|
+
requiresIfExists: ["preventOverflow"],
|
|
902
|
+
fn: hide
|
|
903
|
+
};
|
|
904
|
+
function distanceAndSkiddingToXY(placement, rects, offset2) {
|
|
905
|
+
var basePlacement = getBasePlacement(placement);
|
|
906
|
+
var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;
|
|
907
|
+
var _ref = typeof offset2 === "function" ? offset2(Object.assign({}, rects, {
|
|
908
|
+
placement
|
|
909
|
+
})) : offset2, skidding = _ref[0], distance = _ref[1];
|
|
910
|
+
skidding = skidding || 0;
|
|
911
|
+
distance = (distance || 0) * invertDistance;
|
|
912
|
+
return [left, right].indexOf(basePlacement) >= 0 ? {
|
|
913
|
+
x: distance,
|
|
914
|
+
y: skidding
|
|
915
|
+
} : {
|
|
916
|
+
x: skidding,
|
|
917
|
+
y: distance
|
|
918
|
+
};
|
|
919
|
+
}
|
|
920
|
+
function offset(_ref2) {
|
|
921
|
+
var state = _ref2.state, options = _ref2.options, name = _ref2.name;
|
|
922
|
+
var _options$offset = options.offset, offset2 = _options$offset === void 0 ? [0, 0] : _options$offset;
|
|
923
|
+
var data = placements.reduce(function(acc, placement) {
|
|
924
|
+
acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset2);
|
|
925
|
+
return acc;
|
|
926
|
+
}, {});
|
|
927
|
+
var _data$state$placement = data[state.placement], x = _data$state$placement.x, y = _data$state$placement.y;
|
|
928
|
+
if (state.modifiersData.popperOffsets != null) {
|
|
929
|
+
state.modifiersData.popperOffsets.x += x;
|
|
930
|
+
state.modifiersData.popperOffsets.y += y;
|
|
931
|
+
}
|
|
932
|
+
state.modifiersData[name] = data;
|
|
933
|
+
}
|
|
934
|
+
var offset$1 = {
|
|
935
|
+
name: "offset",
|
|
936
|
+
enabled: true,
|
|
937
|
+
phase: "main",
|
|
938
|
+
requires: ["popperOffsets"],
|
|
939
|
+
fn: offset
|
|
940
|
+
};
|
|
941
|
+
function popperOffsets(_ref) {
|
|
942
|
+
var state = _ref.state, name = _ref.name;
|
|
943
|
+
state.modifiersData[name] = computeOffsets({
|
|
944
|
+
reference: state.rects.reference,
|
|
945
|
+
element: state.rects.popper,
|
|
946
|
+
strategy: "absolute",
|
|
947
|
+
placement: state.placement
|
|
948
|
+
});
|
|
949
|
+
}
|
|
950
|
+
var popperOffsets$1 = {
|
|
951
|
+
name: "popperOffsets",
|
|
952
|
+
enabled: true,
|
|
953
|
+
phase: "read",
|
|
954
|
+
fn: popperOffsets,
|
|
955
|
+
data: {}
|
|
956
|
+
};
|
|
957
|
+
function getAltAxis(axis) {
|
|
958
|
+
return axis === "x" ? "y" : "x";
|
|
959
|
+
}
|
|
960
|
+
function preventOverflow(_ref) {
|
|
961
|
+
var state = _ref.state, options = _ref.options, name = _ref.name;
|
|
962
|
+
var _options$mainAxis = options.mainAxis, checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis, _options$altAxis = options.altAxis, checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis, boundary = options.boundary, rootBoundary = options.rootBoundary, altBoundary = options.altBoundary, padding = options.padding, _options$tether = options.tether, tether = _options$tether === void 0 ? true : _options$tether, _options$tetherOffset = options.tetherOffset, tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;
|
|
963
|
+
var overflow = detectOverflow(state, {
|
|
964
|
+
boundary,
|
|
965
|
+
rootBoundary,
|
|
966
|
+
padding,
|
|
967
|
+
altBoundary
|
|
968
|
+
});
|
|
969
|
+
var basePlacement = getBasePlacement(state.placement);
|
|
970
|
+
var variation = getVariation(state.placement);
|
|
971
|
+
var isBasePlacement = !variation;
|
|
972
|
+
var mainAxis = getMainAxisFromPlacement(basePlacement);
|
|
973
|
+
var altAxis = getAltAxis(mainAxis);
|
|
974
|
+
var popperOffsets2 = state.modifiersData.popperOffsets;
|
|
975
|
+
var referenceRect = state.rects.reference;
|
|
976
|
+
var popperRect = state.rects.popper;
|
|
977
|
+
var tetherOffsetValue = typeof tetherOffset === "function" ? tetherOffset(Object.assign({}, state.rects, {
|
|
978
|
+
placement: state.placement
|
|
979
|
+
})) : tetherOffset;
|
|
980
|
+
var normalizedTetherOffsetValue = typeof tetherOffsetValue === "number" ? {
|
|
981
|
+
mainAxis: tetherOffsetValue,
|
|
982
|
+
altAxis: tetherOffsetValue
|
|
983
|
+
} : Object.assign({
|
|
984
|
+
mainAxis: 0,
|
|
985
|
+
altAxis: 0
|
|
986
|
+
}, tetherOffsetValue);
|
|
987
|
+
var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;
|
|
988
|
+
var data = {
|
|
989
|
+
x: 0,
|
|
990
|
+
y: 0
|
|
991
|
+
};
|
|
992
|
+
if (!popperOffsets2) {
|
|
993
|
+
return;
|
|
994
|
+
}
|
|
995
|
+
if (checkMainAxis) {
|
|
996
|
+
var _offsetModifierState$;
|
|
997
|
+
var mainSide = mainAxis === "y" ? top : left;
|
|
998
|
+
var altSide = mainAxis === "y" ? bottom : right;
|
|
999
|
+
var len = mainAxis === "y" ? "height" : "width";
|
|
1000
|
+
var offset2 = popperOffsets2[mainAxis];
|
|
1001
|
+
var min$1 = offset2 + overflow[mainSide];
|
|
1002
|
+
var max$1 = offset2 - overflow[altSide];
|
|
1003
|
+
var additive = tether ? -popperRect[len] / 2 : 0;
|
|
1004
|
+
var minLen = variation === start ? referenceRect[len] : popperRect[len];
|
|
1005
|
+
var maxLen = variation === start ? -popperRect[len] : -referenceRect[len];
|
|
1006
|
+
var arrowElement = state.elements.arrow;
|
|
1007
|
+
var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {
|
|
1008
|
+
width: 0,
|
|
1009
|
+
height: 0
|
|
1010
|
+
};
|
|
1011
|
+
var arrowPaddingObject = state.modifiersData["arrow#persistent"] ? state.modifiersData["arrow#persistent"].padding : getFreshSideObject();
|
|
1012
|
+
var arrowPaddingMin = arrowPaddingObject[mainSide];
|
|
1013
|
+
var arrowPaddingMax = arrowPaddingObject[altSide];
|
|
1014
|
+
var arrowLen = within(0, referenceRect[len], arrowRect[len]);
|
|
1015
|
+
var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;
|
|
1016
|
+
var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;
|
|
1017
|
+
var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);
|
|
1018
|
+
var clientOffset = arrowOffsetParent ? mainAxis === "y" ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;
|
|
1019
|
+
var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;
|
|
1020
|
+
var tetherMin = offset2 + minOffset - offsetModifierValue - clientOffset;
|
|
1021
|
+
var tetherMax = offset2 + maxOffset - offsetModifierValue;
|
|
1022
|
+
var preventedOffset = within(tether ? min(min$1, tetherMin) : min$1, offset2, tether ? max(max$1, tetherMax) : max$1);
|
|
1023
|
+
popperOffsets2[mainAxis] = preventedOffset;
|
|
1024
|
+
data[mainAxis] = preventedOffset - offset2;
|
|
1025
|
+
}
|
|
1026
|
+
if (checkAltAxis) {
|
|
1027
|
+
var _offsetModifierState$2;
|
|
1028
|
+
var _mainSide = mainAxis === "x" ? top : left;
|
|
1029
|
+
var _altSide = mainAxis === "x" ? bottom : right;
|
|
1030
|
+
var _offset = popperOffsets2[altAxis];
|
|
1031
|
+
var _len = altAxis === "y" ? "height" : "width";
|
|
1032
|
+
var _min = _offset + overflow[_mainSide];
|
|
1033
|
+
var _max = _offset - overflow[_altSide];
|
|
1034
|
+
var isOriginSide = [top, left].indexOf(basePlacement) !== -1;
|
|
1035
|
+
var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;
|
|
1036
|
+
var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;
|
|
1037
|
+
var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;
|
|
1038
|
+
var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);
|
|
1039
|
+
popperOffsets2[altAxis] = _preventedOffset;
|
|
1040
|
+
data[altAxis] = _preventedOffset - _offset;
|
|
1041
|
+
}
|
|
1042
|
+
state.modifiersData[name] = data;
|
|
1043
|
+
}
|
|
1044
|
+
var preventOverflow$1 = {
|
|
1045
|
+
name: "preventOverflow",
|
|
1046
|
+
enabled: true,
|
|
1047
|
+
phase: "main",
|
|
1048
|
+
fn: preventOverflow,
|
|
1049
|
+
requiresIfExists: ["offset"]
|
|
1050
|
+
};
|
|
1051
|
+
function getHTMLElementScroll(element) {
|
|
1052
|
+
return {
|
|
1053
|
+
scrollLeft: element.scrollLeft,
|
|
1054
|
+
scrollTop: element.scrollTop
|
|
1055
|
+
};
|
|
1056
|
+
}
|
|
1057
|
+
function getNodeScroll(node) {
|
|
1058
|
+
if (node === getWindow(node) || !isHTMLElement(node)) {
|
|
1059
|
+
return getWindowScroll(node);
|
|
1060
|
+
} else {
|
|
1061
|
+
return getHTMLElementScroll(node);
|
|
1062
|
+
}
|
|
1063
|
+
}
|
|
1064
|
+
function isElementScaled(element) {
|
|
1065
|
+
var rect = element.getBoundingClientRect();
|
|
1066
|
+
var scaleX = round(rect.width) / element.offsetWidth || 1;
|
|
1067
|
+
var scaleY = round(rect.height) / element.offsetHeight || 1;
|
|
1068
|
+
return scaleX !== 1 || scaleY !== 1;
|
|
1069
|
+
}
|
|
1070
|
+
function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
|
|
1071
|
+
if (isFixed === void 0) {
|
|
1072
|
+
isFixed = false;
|
|
1073
|
+
}
|
|
1074
|
+
var isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
1075
|
+
var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);
|
|
1076
|
+
var documentElement = getDocumentElement(offsetParent);
|
|
1077
|
+
var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled);
|
|
1078
|
+
var scroll = {
|
|
1079
|
+
scrollLeft: 0,
|
|
1080
|
+
scrollTop: 0
|
|
1081
|
+
};
|
|
1082
|
+
var offsets = {
|
|
1083
|
+
x: 0,
|
|
1084
|
+
y: 0
|
|
1085
|
+
};
|
|
1086
|
+
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
|
|
1087
|
+
if (getNodeName(offsetParent) !== "body" || isScrollParent(documentElement)) {
|
|
1088
|
+
scroll = getNodeScroll(offsetParent);
|
|
1089
|
+
}
|
|
1090
|
+
if (isHTMLElement(offsetParent)) {
|
|
1091
|
+
offsets = getBoundingClientRect(offsetParent, true);
|
|
1092
|
+
offsets.x += offsetParent.clientLeft;
|
|
1093
|
+
offsets.y += offsetParent.clientTop;
|
|
1094
|
+
} else if (documentElement) {
|
|
1095
|
+
offsets.x = getWindowScrollBarX(documentElement);
|
|
1096
|
+
}
|
|
1097
|
+
}
|
|
1098
|
+
return {
|
|
1099
|
+
x: rect.left + scroll.scrollLeft - offsets.x,
|
|
1100
|
+
y: rect.top + scroll.scrollTop - offsets.y,
|
|
1101
|
+
width: rect.width,
|
|
1102
|
+
height: rect.height
|
|
1103
|
+
};
|
|
1104
|
+
}
|
|
1105
|
+
function order(modifiers) {
|
|
1106
|
+
var map = new Map();
|
|
1107
|
+
var visited = new Set();
|
|
1108
|
+
var result = [];
|
|
1109
|
+
modifiers.forEach(function(modifier) {
|
|
1110
|
+
map.set(modifier.name, modifier);
|
|
1111
|
+
});
|
|
1112
|
+
function sort(modifier) {
|
|
1113
|
+
visited.add(modifier.name);
|
|
1114
|
+
var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);
|
|
1115
|
+
requires.forEach(function(dep) {
|
|
1116
|
+
if (!visited.has(dep)) {
|
|
1117
|
+
var depModifier = map.get(dep);
|
|
1118
|
+
if (depModifier) {
|
|
1119
|
+
sort(depModifier);
|
|
1120
|
+
}
|
|
1121
|
+
}
|
|
1122
|
+
});
|
|
1123
|
+
result.push(modifier);
|
|
1124
|
+
}
|
|
1125
|
+
modifiers.forEach(function(modifier) {
|
|
1126
|
+
if (!visited.has(modifier.name)) {
|
|
1127
|
+
sort(modifier);
|
|
1128
|
+
}
|
|
1129
|
+
});
|
|
1130
|
+
return result;
|
|
1131
|
+
}
|
|
1132
|
+
function orderModifiers(modifiers) {
|
|
1133
|
+
var orderedModifiers = order(modifiers);
|
|
1134
|
+
return modifierPhases.reduce(function(acc, phase) {
|
|
1135
|
+
return acc.concat(orderedModifiers.filter(function(modifier) {
|
|
1136
|
+
return modifier.phase === phase;
|
|
1137
|
+
}));
|
|
1138
|
+
}, []);
|
|
1139
|
+
}
|
|
1140
|
+
function debounce(fn2) {
|
|
1141
|
+
var pending;
|
|
1142
|
+
return function() {
|
|
1143
|
+
if (!pending) {
|
|
1144
|
+
pending = new Promise(function(resolve) {
|
|
1145
|
+
Promise.resolve().then(function() {
|
|
1146
|
+
pending = void 0;
|
|
1147
|
+
resolve(fn2());
|
|
1148
|
+
});
|
|
1149
|
+
});
|
|
1150
|
+
}
|
|
1151
|
+
return pending;
|
|
1152
|
+
};
|
|
1153
|
+
}
|
|
1154
|
+
function mergeByName(modifiers) {
|
|
1155
|
+
var merged = modifiers.reduce(function(merged2, current) {
|
|
1156
|
+
var existing = merged2[current.name];
|
|
1157
|
+
merged2[current.name] = existing ? Object.assign({}, existing, current, {
|
|
1158
|
+
options: Object.assign({}, existing.options, current.options),
|
|
1159
|
+
data: Object.assign({}, existing.data, current.data)
|
|
1160
|
+
}) : current;
|
|
1161
|
+
return merged2;
|
|
1162
|
+
}, {});
|
|
1163
|
+
return Object.keys(merged).map(function(key) {
|
|
1164
|
+
return merged[key];
|
|
1165
|
+
});
|
|
1166
|
+
}
|
|
1167
|
+
var DEFAULT_OPTIONS = {
|
|
1168
|
+
placement: "bottom",
|
|
1169
|
+
modifiers: [],
|
|
1170
|
+
strategy: "absolute"
|
|
1171
|
+
};
|
|
1172
|
+
function areValidElements() {
|
|
1173
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
1174
|
+
args[_key] = arguments[_key];
|
|
1175
|
+
}
|
|
1176
|
+
return !args.some(function(element) {
|
|
1177
|
+
return !(element && typeof element.getBoundingClientRect === "function");
|
|
1178
|
+
});
|
|
1179
|
+
}
|
|
1180
|
+
function popperGenerator(generatorOptions) {
|
|
1181
|
+
if (generatorOptions === void 0) {
|
|
1182
|
+
generatorOptions = {};
|
|
1183
|
+
}
|
|
1184
|
+
var _generatorOptions = generatorOptions, _generatorOptions$def = _generatorOptions.defaultModifiers, defaultModifiers2 = _generatorOptions$def === void 0 ? [] : _generatorOptions$def, _generatorOptions$def2 = _generatorOptions.defaultOptions, defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;
|
|
1185
|
+
return function createPopper2(reference2, popper2, options) {
|
|
1186
|
+
if (options === void 0) {
|
|
1187
|
+
options = defaultOptions;
|
|
1188
|
+
}
|
|
1189
|
+
var state = {
|
|
1190
|
+
placement: "bottom",
|
|
1191
|
+
orderedModifiers: [],
|
|
1192
|
+
options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),
|
|
1193
|
+
modifiersData: {},
|
|
1194
|
+
elements: {
|
|
1195
|
+
reference: reference2,
|
|
1196
|
+
popper: popper2
|
|
1197
|
+
},
|
|
1198
|
+
attributes: {},
|
|
1199
|
+
styles: {}
|
|
1200
|
+
};
|
|
1201
|
+
var effectCleanupFns = [];
|
|
1202
|
+
var isDestroyed = false;
|
|
1203
|
+
var instance = {
|
|
1204
|
+
state,
|
|
1205
|
+
setOptions: function setOptions(setOptionsAction) {
|
|
1206
|
+
var options2 = typeof setOptionsAction === "function" ? setOptionsAction(state.options) : setOptionsAction;
|
|
1207
|
+
cleanupModifierEffects();
|
|
1208
|
+
state.options = Object.assign({}, defaultOptions, state.options, options2);
|
|
1209
|
+
state.scrollParents = {
|
|
1210
|
+
reference: isElement(reference2) ? listScrollParents(reference2) : reference2.contextElement ? listScrollParents(reference2.contextElement) : [],
|
|
1211
|
+
popper: listScrollParents(popper2)
|
|
1212
|
+
};
|
|
1213
|
+
var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers2, state.options.modifiers)));
|
|
1214
|
+
state.orderedModifiers = orderedModifiers.filter(function(m) {
|
|
1215
|
+
return m.enabled;
|
|
1216
|
+
});
|
|
1217
|
+
runModifierEffects();
|
|
1218
|
+
return instance.update();
|
|
1219
|
+
},
|
|
1220
|
+
forceUpdate: function forceUpdate() {
|
|
1221
|
+
if (isDestroyed) {
|
|
1222
|
+
return;
|
|
1223
|
+
}
|
|
1224
|
+
var _state$elements = state.elements, reference3 = _state$elements.reference, popper3 = _state$elements.popper;
|
|
1225
|
+
if (!areValidElements(reference3, popper3)) {
|
|
1226
|
+
return;
|
|
1227
|
+
}
|
|
1228
|
+
state.rects = {
|
|
1229
|
+
reference: getCompositeRect(reference3, getOffsetParent(popper3), state.options.strategy === "fixed"),
|
|
1230
|
+
popper: getLayoutRect(popper3)
|
|
1231
|
+
};
|
|
1232
|
+
state.reset = false;
|
|
1233
|
+
state.placement = state.options.placement;
|
|
1234
|
+
state.orderedModifiers.forEach(function(modifier) {
|
|
1235
|
+
return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);
|
|
1236
|
+
});
|
|
1237
|
+
for (var index = 0; index < state.orderedModifiers.length; index++) {
|
|
1238
|
+
if (state.reset === true) {
|
|
1239
|
+
state.reset = false;
|
|
1240
|
+
index = -1;
|
|
1241
|
+
continue;
|
|
1242
|
+
}
|
|
1243
|
+
var _state$orderedModifie = state.orderedModifiers[index], fn2 = _state$orderedModifie.fn, _state$orderedModifie2 = _state$orderedModifie.options, _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2, name = _state$orderedModifie.name;
|
|
1244
|
+
if (typeof fn2 === "function") {
|
|
1245
|
+
state = fn2({
|
|
1246
|
+
state,
|
|
1247
|
+
options: _options,
|
|
1248
|
+
name,
|
|
1249
|
+
instance
|
|
1250
|
+
}) || state;
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
},
|
|
1254
|
+
update: debounce(function() {
|
|
1255
|
+
return new Promise(function(resolve) {
|
|
1256
|
+
instance.forceUpdate();
|
|
1257
|
+
resolve(state);
|
|
1258
|
+
});
|
|
1259
|
+
}),
|
|
1260
|
+
destroy: function destroy() {
|
|
1261
|
+
cleanupModifierEffects();
|
|
1262
|
+
isDestroyed = true;
|
|
1263
|
+
}
|
|
1264
|
+
};
|
|
1265
|
+
if (!areValidElements(reference2, popper2)) {
|
|
1266
|
+
return instance;
|
|
1267
|
+
}
|
|
1268
|
+
instance.setOptions(options).then(function(state2) {
|
|
1269
|
+
if (!isDestroyed && options.onFirstUpdate) {
|
|
1270
|
+
options.onFirstUpdate(state2);
|
|
1271
|
+
}
|
|
1272
|
+
});
|
|
1273
|
+
function runModifierEffects() {
|
|
1274
|
+
state.orderedModifiers.forEach(function(_ref3) {
|
|
1275
|
+
var name = _ref3.name, _ref3$options = _ref3.options, options2 = _ref3$options === void 0 ? {} : _ref3$options, effect2 = _ref3.effect;
|
|
1276
|
+
if (typeof effect2 === "function") {
|
|
1277
|
+
var cleanupFn = effect2({
|
|
1278
|
+
state,
|
|
1279
|
+
name,
|
|
1280
|
+
instance,
|
|
1281
|
+
options: options2
|
|
1282
|
+
});
|
|
1283
|
+
var noopFn = function noopFn2() {
|
|
1284
|
+
};
|
|
1285
|
+
effectCleanupFns.push(cleanupFn || noopFn);
|
|
1286
|
+
}
|
|
1287
|
+
});
|
|
1288
|
+
}
|
|
1289
|
+
function cleanupModifierEffects() {
|
|
1290
|
+
effectCleanupFns.forEach(function(fn2) {
|
|
1291
|
+
return fn2();
|
|
1292
|
+
});
|
|
1293
|
+
effectCleanupFns = [];
|
|
1294
|
+
}
|
|
1295
|
+
return instance;
|
|
1296
|
+
};
|
|
1297
|
+
}
|
|
1298
|
+
var defaultModifiers = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1, offset$1, flip$1, preventOverflow$1, arrow$1, hide$1];
|
|
1299
|
+
var createPopper = /* @__PURE__ */ popperGenerator({
|
|
1300
|
+
defaultModifiers
|
|
1301
|
+
});
|
|
1302
|
+
var Sizeable$1 = {
|
|
1303
|
+
props: {
|
|
1304
|
+
size: String,
|
|
1305
|
+
sizePrefix: {
|
|
1306
|
+
type: String,
|
|
1307
|
+
default() {
|
|
1308
|
+
return this.$options.name && this.$options.name.toLowerCase();
|
|
1309
|
+
}
|
|
1310
|
+
}
|
|
1311
|
+
},
|
|
1312
|
+
computed: {
|
|
1313
|
+
sizeableClassPrefix() {
|
|
1314
|
+
return this.sizePrefix;
|
|
1315
|
+
},
|
|
1316
|
+
sizeableClass() {
|
|
1317
|
+
if (!this.size || !this.sizeableClassPrefix) {
|
|
1318
|
+
return "";
|
|
1319
|
+
}
|
|
1320
|
+
return `${this.sizeableClassPrefix}-${this.size}`;
|
|
1321
|
+
}
|
|
1322
|
+
}
|
|
1323
|
+
};
|
|
1324
|
+
var Variant = {
|
|
1325
|
+
props: {
|
|
1326
|
+
variant: String,
|
|
1327
|
+
variantPrefix: {
|
|
1328
|
+
type: String,
|
|
1329
|
+
default() {
|
|
1330
|
+
return this.$options.name && this.$options.name.toLowerCase();
|
|
1331
|
+
}
|
|
1332
|
+
}
|
|
1333
|
+
},
|
|
1334
|
+
computed: {
|
|
1335
|
+
variantClassPrefix() {
|
|
1336
|
+
return this.variantPrefix;
|
|
1337
|
+
},
|
|
1338
|
+
variantClass() {
|
|
1339
|
+
if (!this.variant || !this.variantClassPrefix) {
|
|
1340
|
+
return "";
|
|
1341
|
+
}
|
|
1342
|
+
return `${this.variantClassPrefix}-${this.variant}`;
|
|
1343
|
+
}
|
|
1344
|
+
}
|
|
1345
|
+
};
|
|
1346
|
+
var render$5 = function() {
|
|
1347
|
+
var _vm = this;
|
|
1348
|
+
var _h = _vm.$createElement;
|
|
1349
|
+
var _c = _vm._self._c || _h;
|
|
1350
|
+
return _vm.to ? _c("router-link", {
|
|
1351
|
+
class: _vm.classes,
|
|
1352
|
+
attrs: {
|
|
1353
|
+
"to": _vm.to,
|
|
1354
|
+
"disabled": _vm.disabled,
|
|
1355
|
+
"role": "button"
|
|
1356
|
+
},
|
|
1357
|
+
on: {
|
|
1358
|
+
"click": _vm.onClick
|
|
1359
|
+
}
|
|
1360
|
+
}, [_vm._t("default")], 2) : _vm.href ? _c("a", {
|
|
1361
|
+
class: _vm.classes,
|
|
1362
|
+
attrs: {
|
|
1363
|
+
"href": _vm.href,
|
|
1364
|
+
"disabled": _vm.disabled,
|
|
1365
|
+
"role": "button"
|
|
1366
|
+
},
|
|
1367
|
+
on: {
|
|
1368
|
+
"click": _vm.onClick
|
|
1369
|
+
}
|
|
1370
|
+
}, [_vm._t("default")], 2) : _vm.label ? _c("label", {
|
|
1371
|
+
class: _vm.classes,
|
|
1372
|
+
attrs: {
|
|
1373
|
+
"disabled": _vm.disabled,
|
|
1374
|
+
"role": "button"
|
|
1375
|
+
},
|
|
1376
|
+
on: {
|
|
1377
|
+
"click": _vm.onClick
|
|
1378
|
+
}
|
|
1379
|
+
}, [_vm._t("default")], 2) : _c("button", {
|
|
1380
|
+
class: _vm.classes,
|
|
1381
|
+
attrs: {
|
|
1382
|
+
"type": _vm.type,
|
|
1383
|
+
"disabled": _vm.disabled
|
|
1384
|
+
},
|
|
1385
|
+
on: {
|
|
1386
|
+
"click": _vm.onClick
|
|
1387
|
+
}
|
|
1388
|
+
}, [_vm._t("default")], 2);
|
|
1389
|
+
};
|
|
1390
|
+
var staticRenderFns$5 = [];
|
|
1391
|
+
function normalizeComponent$3(scriptExports, render2, staticRenderFns2, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
|
|
1392
|
+
var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports;
|
|
1393
|
+
if (render2) {
|
|
1394
|
+
options.render = render2;
|
|
1395
|
+
options.staticRenderFns = staticRenderFns2;
|
|
1396
|
+
options._compiled = true;
|
|
1397
|
+
}
|
|
1398
|
+
if (functionalTemplate) {
|
|
1399
|
+
options.functional = true;
|
|
1400
|
+
}
|
|
1401
|
+
if (scopeId) {
|
|
1402
|
+
options._scopeId = "data-v-" + scopeId;
|
|
1403
|
+
}
|
|
1404
|
+
var hook;
|
|
1405
|
+
if (moduleIdentifier) {
|
|
1406
|
+
hook = function(context) {
|
|
1407
|
+
context = context || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext;
|
|
1408
|
+
if (!context && typeof __VUE_SSR_CONTEXT__ !== "undefined") {
|
|
1409
|
+
context = __VUE_SSR_CONTEXT__;
|
|
1410
|
+
}
|
|
1411
|
+
if (injectStyles) {
|
|
1412
|
+
injectStyles.call(this, context);
|
|
1413
|
+
}
|
|
1414
|
+
if (context && context._registeredComponents) {
|
|
1415
|
+
context._registeredComponents.add(moduleIdentifier);
|
|
1416
|
+
}
|
|
1417
|
+
};
|
|
1418
|
+
options._ssrRegister = hook;
|
|
1419
|
+
} else if (injectStyles) {
|
|
1420
|
+
hook = shadowMode ? function() {
|
|
1421
|
+
injectStyles.call(this, (options.functional ? this.parent : this).$root.$options.shadowRoot);
|
|
1422
|
+
} : injectStyles;
|
|
1423
|
+
}
|
|
1424
|
+
if (hook) {
|
|
1425
|
+
if (options.functional) {
|
|
1426
|
+
options._injectStyles = hook;
|
|
1427
|
+
var originalRender = options.render;
|
|
1428
|
+
options.render = function renderWithStyleInjection(h, context) {
|
|
1429
|
+
hook.call(context);
|
|
1430
|
+
return originalRender(h, context);
|
|
1431
|
+
};
|
|
1432
|
+
} else {
|
|
1433
|
+
var existing = options.beforeCreate;
|
|
1434
|
+
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
|
|
1435
|
+
}
|
|
1436
|
+
}
|
|
1437
|
+
return {
|
|
1438
|
+
exports: scriptExports,
|
|
1439
|
+
options
|
|
1440
|
+
};
|
|
1441
|
+
}
|
|
1442
|
+
const __vue2_script$5 = {
|
|
1443
|
+
name: "Btn",
|
|
1444
|
+
mixins: [Sizeable$1, Variant],
|
|
1445
|
+
props: {
|
|
1446
|
+
active: Boolean,
|
|
1447
|
+
block: Boolean,
|
|
1448
|
+
disabled: Boolean,
|
|
1449
|
+
href: String,
|
|
1450
|
+
label: Boolean,
|
|
1451
|
+
outline: Boolean,
|
|
1452
|
+
to: [Object, String],
|
|
1453
|
+
type: String
|
|
1454
|
+
},
|
|
1455
|
+
computed: {
|
|
1456
|
+
variantClassPrefix() {
|
|
1457
|
+
return this.variantPrefix + (this.outline ? "-outline" : "");
|
|
1458
|
+
},
|
|
1459
|
+
classes() {
|
|
1460
|
+
return ["btn", this.variantClass, this.sizeableClass, this.block ? "btn-block" : "", this.active ? "active" : ""];
|
|
1461
|
+
}
|
|
1462
|
+
},
|
|
1463
|
+
methods: {
|
|
1464
|
+
onClick(event) {
|
|
1465
|
+
if (!this.disabled) {
|
|
1466
|
+
this.$emit("click", event);
|
|
1467
|
+
} else {
|
|
1468
|
+
event.preventDefault();
|
|
1469
|
+
}
|
|
1470
|
+
}
|
|
1471
|
+
}
|
|
1472
|
+
};
|
|
1473
|
+
const __cssModules$5 = {};
|
|
1474
|
+
var __component__$5 = /* @__PURE__ */ normalizeComponent$3(__vue2_script$5, render$5, staticRenderFns$5, false, __vue2_injectStyles$5, null, null, null);
|
|
1475
|
+
function __vue2_injectStyles$5(context) {
|
|
1476
|
+
for (let o in __cssModules$5) {
|
|
1477
|
+
this[o] = __cssModules$5[o];
|
|
1478
|
+
}
|
|
1479
|
+
}
|
|
1480
|
+
var Btn = /* @__PURE__ */ function() {
|
|
1481
|
+
return __component__$5.exports;
|
|
1482
|
+
}();
|
|
1483
|
+
var Sizeable = {
|
|
1484
|
+
props: {
|
|
1485
|
+
size: String,
|
|
1486
|
+
sizePrefix: {
|
|
1487
|
+
type: String,
|
|
1488
|
+
default() {
|
|
1489
|
+
return this.$options.name && this.$options.name.toLowerCase();
|
|
1490
|
+
}
|
|
1491
|
+
}
|
|
1492
|
+
},
|
|
1493
|
+
computed: {
|
|
1494
|
+
sizeableClassPrefix() {
|
|
1495
|
+
return this.sizePrefix;
|
|
1496
|
+
},
|
|
1497
|
+
sizeableClass() {
|
|
1498
|
+
if (!this.size || !this.sizeableClassPrefix) {
|
|
1499
|
+
return "";
|
|
1500
|
+
}
|
|
1501
|
+
return `${this.sizeableClassPrefix}-${this.size}`;
|
|
1502
|
+
}
|
|
1503
|
+
}
|
|
1504
|
+
};
|
|
1505
|
+
var render$2$1 = function() {
|
|
1506
|
+
var _vm = this;
|
|
1507
|
+
var _h = _vm.$createElement;
|
|
1508
|
+
var _c = _vm._self._c || _h;
|
|
1509
|
+
return _c("div", {
|
|
1510
|
+
class: _vm.classes,
|
|
1511
|
+
attrs: {
|
|
1512
|
+
"data-toggle": _vm.toggle ? "buttons" : false,
|
|
1513
|
+
"role": "group"
|
|
1514
|
+
}
|
|
1515
|
+
}, [_vm._t("default")], 2);
|
|
1516
|
+
};
|
|
1517
|
+
var staticRenderFns$2$1 = [];
|
|
1518
|
+
function normalizeComponent$2(scriptExports, render2, staticRenderFns2, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
|
|
1519
|
+
var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports;
|
|
1520
|
+
if (render2) {
|
|
1521
|
+
options.render = render2;
|
|
1522
|
+
options.staticRenderFns = staticRenderFns2;
|
|
1523
|
+
options._compiled = true;
|
|
1524
|
+
}
|
|
1525
|
+
if (functionalTemplate) {
|
|
1526
|
+
options.functional = true;
|
|
1527
|
+
}
|
|
1528
|
+
if (scopeId) {
|
|
1529
|
+
options._scopeId = "data-v-" + scopeId;
|
|
1530
|
+
}
|
|
1531
|
+
var hook;
|
|
1532
|
+
if (moduleIdentifier) {
|
|
1533
|
+
hook = function(context) {
|
|
1534
|
+
context = context || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext;
|
|
1535
|
+
if (!context && typeof __VUE_SSR_CONTEXT__ !== "undefined") {
|
|
1536
|
+
context = __VUE_SSR_CONTEXT__;
|
|
1537
|
+
}
|
|
1538
|
+
if (injectStyles) {
|
|
1539
|
+
injectStyles.call(this, context);
|
|
1540
|
+
}
|
|
1541
|
+
if (context && context._registeredComponents) {
|
|
1542
|
+
context._registeredComponents.add(moduleIdentifier);
|
|
1543
|
+
}
|
|
1544
|
+
};
|
|
1545
|
+
options._ssrRegister = hook;
|
|
1546
|
+
} else if (injectStyles) {
|
|
1547
|
+
hook = shadowMode ? function() {
|
|
1548
|
+
injectStyles.call(this, (options.functional ? this.parent : this).$root.$options.shadowRoot);
|
|
1549
|
+
} : injectStyles;
|
|
1550
|
+
}
|
|
1551
|
+
if (hook) {
|
|
1552
|
+
if (options.functional) {
|
|
1553
|
+
options._injectStyles = hook;
|
|
1554
|
+
var originalRender = options.render;
|
|
1555
|
+
options.render = function renderWithStyleInjection(h, context) {
|
|
1556
|
+
hook.call(context);
|
|
1557
|
+
return originalRender(h, context);
|
|
1558
|
+
};
|
|
1559
|
+
} else {
|
|
1560
|
+
var existing = options.beforeCreate;
|
|
1561
|
+
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
|
|
1562
|
+
}
|
|
1563
|
+
}
|
|
1564
|
+
return {
|
|
1565
|
+
exports: scriptExports,
|
|
1566
|
+
options
|
|
1567
|
+
};
|
|
1568
|
+
}
|
|
1569
|
+
const __vue2_script$2$1 = {
|
|
1570
|
+
name: "BtnGroup",
|
|
1571
|
+
mixins: [Sizeable],
|
|
1572
|
+
props: {
|
|
1573
|
+
sizePrefix: {
|
|
1574
|
+
type: String,
|
|
1575
|
+
default() {
|
|
1576
|
+
return "btn-group";
|
|
1577
|
+
}
|
|
1578
|
+
},
|
|
1579
|
+
toggle: Boolean,
|
|
1580
|
+
vertical: Boolean
|
|
1581
|
+
},
|
|
1582
|
+
computed: {
|
|
1583
|
+
classes() {
|
|
1584
|
+
return {
|
|
1585
|
+
"btn-group": !this.vertical,
|
|
1586
|
+
"btn-group-toggle": this.toggle,
|
|
1587
|
+
"btn-group-vertical": this.vertical,
|
|
1588
|
+
[this.sizeableClass]: !!this.size
|
|
1589
|
+
};
|
|
1590
|
+
}
|
|
1591
|
+
}
|
|
1592
|
+
};
|
|
1593
|
+
const __cssModules$2$1 = {};
|
|
1594
|
+
var __component__$2$1 = /* @__PURE__ */ normalizeComponent$2(__vue2_script$2$1, render$2$1, staticRenderFns$2$1, false, __vue2_injectStyles$2$1, null, null, null);
|
|
1595
|
+
function __vue2_injectStyles$2$1(context) {
|
|
1596
|
+
for (let o in __cssModules$2$1) {
|
|
1597
|
+
this[o] = __cssModules$2$1[o];
|
|
1598
|
+
}
|
|
1599
|
+
}
|
|
1600
|
+
var BtnGroup = /* @__PURE__ */ function() {
|
|
1601
|
+
return __component__$2$1.exports;
|
|
1602
|
+
}();
|
|
1603
|
+
function normalizeComponent$1(scriptExports, render2, staticRenderFns2, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
|
|
1604
|
+
var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports;
|
|
1605
|
+
if (render2) {
|
|
1606
|
+
options.render = render2;
|
|
1607
|
+
options.staticRenderFns = staticRenderFns2;
|
|
1608
|
+
options._compiled = true;
|
|
1609
|
+
}
|
|
1610
|
+
if (functionalTemplate) {
|
|
1611
|
+
options.functional = true;
|
|
1612
|
+
}
|
|
1613
|
+
if (scopeId) {
|
|
1614
|
+
options._scopeId = "data-v-" + scopeId;
|
|
1615
|
+
}
|
|
1616
|
+
var hook;
|
|
1617
|
+
if (moduleIdentifier) {
|
|
1618
|
+
hook = function(context) {
|
|
1619
|
+
context = context || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext;
|
|
1620
|
+
if (!context && typeof __VUE_SSR_CONTEXT__ !== "undefined") {
|
|
1621
|
+
context = __VUE_SSR_CONTEXT__;
|
|
1622
|
+
}
|
|
1623
|
+
if (injectStyles) {
|
|
1624
|
+
injectStyles.call(this, context);
|
|
1625
|
+
}
|
|
1626
|
+
if (context && context._registeredComponents) {
|
|
1627
|
+
context._registeredComponents.add(moduleIdentifier);
|
|
1628
|
+
}
|
|
1629
|
+
};
|
|
1630
|
+
options._ssrRegister = hook;
|
|
1631
|
+
} else if (injectStyles) {
|
|
1632
|
+
hook = shadowMode ? function() {
|
|
1633
|
+
injectStyles.call(this, (options.functional ? this.parent : this).$root.$options.shadowRoot);
|
|
1634
|
+
} : injectStyles;
|
|
1635
|
+
}
|
|
1636
|
+
if (hook) {
|
|
1637
|
+
if (options.functional) {
|
|
1638
|
+
options._injectStyles = hook;
|
|
1639
|
+
var originalRender = options.render;
|
|
1640
|
+
options.render = function renderWithStyleInjection(h, context) {
|
|
1641
|
+
hook.call(context);
|
|
1642
|
+
return originalRender(h, context);
|
|
1643
|
+
};
|
|
1644
|
+
} else {
|
|
1645
|
+
var existing = options.beforeCreate;
|
|
1646
|
+
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
|
|
1647
|
+
}
|
|
1648
|
+
}
|
|
1649
|
+
return {
|
|
1650
|
+
exports: scriptExports,
|
|
1651
|
+
options
|
|
1652
|
+
};
|
|
1653
|
+
}
|
|
1654
|
+
function appendClass(vnode, str) {
|
|
1655
|
+
vnode.data.staticClass = `${vnode.data.staticClass || ""} ${str}`.trim();
|
|
1656
|
+
}
|
|
1657
|
+
function wrap(wrapper, fn2) {
|
|
1658
|
+
return (e) => {
|
|
1659
|
+
if (typeof fn2 === "function") {
|
|
1660
|
+
fn2(e);
|
|
1661
|
+
}
|
|
1662
|
+
if (!e.cancelBubble) {
|
|
1663
|
+
wrapper(e);
|
|
1664
|
+
}
|
|
1665
|
+
};
|
|
1666
|
+
}
|
|
1667
|
+
function listener(vnode, key) {
|
|
1668
|
+
return vnode.data.on[key] || vnode.componentOptions && vnode.componentOptions.listeners && vnode.componentOptions.listeners[key];
|
|
1669
|
+
}
|
|
1670
|
+
const __vue2_script$1$1 = {
|
|
1671
|
+
functional: true,
|
|
1672
|
+
render(h, context) {
|
|
1673
|
+
context.children.filter((vnode) => !!vnode.tag).forEach((vnode, i) => {
|
|
1674
|
+
vnode.data = Object.assign({
|
|
1675
|
+
staticClass: void 0
|
|
1676
|
+
}, vnode.data);
|
|
1677
|
+
if (!vnode.data.on) {
|
|
1678
|
+
vnode.data.on = {};
|
|
1679
|
+
}
|
|
1680
|
+
const isDropdownItem = vnode.data.staticClass && vnode.data.staticClass.match(/dropdown-item/);
|
|
1681
|
+
const isDropdownDivider = vnode.data.staticClass && vnode.data.staticClass.match(/dropdown-divider/);
|
|
1682
|
+
vnode.data.on.click = wrap((e) => {
|
|
1683
|
+
context.parent.$emit("click-item", e, vnode);
|
|
1684
|
+
}, listener(vnode, "click"));
|
|
1685
|
+
vnode.data.on.blur = wrap((e) => {
|
|
1686
|
+
context.parent.$emit("blur-item", e, vnode);
|
|
1687
|
+
}, listener(vnode, "blur"));
|
|
1688
|
+
if (vnode.tag.match(/^h\d$/)) {
|
|
1689
|
+
appendClass(vnode, "dropdown-header");
|
|
1690
|
+
} else if (vnode.tag === "hr" && !isDropdownDivider) {
|
|
1691
|
+
vnode.tag = "div";
|
|
1692
|
+
appendClass(vnode, "dropdown-divider");
|
|
1693
|
+
} else if (!isDropdownItem) {
|
|
1694
|
+
appendClass(vnode, "dropdown-item");
|
|
1695
|
+
}
|
|
1696
|
+
});
|
|
1697
|
+
return context.children;
|
|
1698
|
+
}
|
|
1699
|
+
};
|
|
1700
|
+
let __vue2_render, __vue2_staticRenderFns;
|
|
1701
|
+
const __cssModules$1$1 = {};
|
|
1702
|
+
var __component__$1$1 = /* @__PURE__ */ normalizeComponent$1(__vue2_script$1$1, __vue2_render, __vue2_staticRenderFns, false, __vue2_injectStyles$1$1, null, null, null);
|
|
1703
|
+
function __vue2_injectStyles$1$1(context) {
|
|
1704
|
+
for (let o in __cssModules$1$1) {
|
|
1705
|
+
this[o] = __cssModules$1$1[o];
|
|
1706
|
+
}
|
|
1707
|
+
}
|
|
1708
|
+
var DropdownMenuItems = /* @__PURE__ */ function() {
|
|
1709
|
+
return __component__$1$1.exports;
|
|
1710
|
+
}();
|
|
1711
|
+
var render$4 = function() {
|
|
1712
|
+
var _vm = this;
|
|
1713
|
+
var _h = _vm.$createElement;
|
|
1714
|
+
var _c = _vm._self._c || _h;
|
|
1715
|
+
return _c("div", {
|
|
1716
|
+
staticClass: "dropdown-menu",
|
|
1717
|
+
class: {
|
|
1718
|
+
"dropdown-menu-left": _vm.align === "left",
|
|
1719
|
+
"dropdown-menu-right": _vm.align === "right",
|
|
1720
|
+
"show": _vm.show
|
|
1721
|
+
},
|
|
1722
|
+
attrs: {
|
|
1723
|
+
"aria-labelledby": _vm.$attrs.id
|
|
1724
|
+
}
|
|
1725
|
+
}, [_c("dropdown-menu-items", [_vm._t("default")], 2)], 1);
|
|
1726
|
+
};
|
|
1727
|
+
var staticRenderFns$4 = [];
|
|
1728
|
+
const __vue2_script$4 = {
|
|
1729
|
+
name: "DropdownMenu",
|
|
1730
|
+
components: {
|
|
1731
|
+
DropdownMenuItems
|
|
1732
|
+
},
|
|
1733
|
+
props: {
|
|
1734
|
+
align: {
|
|
1735
|
+
type: String,
|
|
1736
|
+
default: "left",
|
|
1737
|
+
validate(value) {
|
|
1738
|
+
return ["left", "right"].indexOf(value.toLowerCase()) !== -1;
|
|
1739
|
+
}
|
|
1740
|
+
},
|
|
1741
|
+
show: Boolean
|
|
1742
|
+
}
|
|
1743
|
+
};
|
|
1744
|
+
const __cssModules$4 = {};
|
|
1745
|
+
var __component__$4 = /* @__PURE__ */ normalizeComponent$1(__vue2_script$4, render$4, staticRenderFns$4, false, __vue2_injectStyles$4, null, null, null);
|
|
1746
|
+
function __vue2_injectStyles$4(context) {
|
|
1747
|
+
for (let o in __cssModules$4) {
|
|
1748
|
+
this[o] = __cssModules$4[o];
|
|
1749
|
+
}
|
|
1750
|
+
}
|
|
1751
|
+
var DropdownMenu = /* @__PURE__ */ function() {
|
|
1752
|
+
return __component__$4.exports;
|
|
1753
|
+
}();
|
|
1754
|
+
var render$3 = function() {
|
|
1755
|
+
var _vm = this;
|
|
1756
|
+
var _h = _vm.$createElement;
|
|
1757
|
+
var _c = _vm._self._c || _h;
|
|
1758
|
+
return _c(_vm.is, _vm._b({ tag: "component", attrs: { "id": _vm.id, "aria-haspopup": "true", "aria-expanded": _vm.expanded, "type": _vm.is === "button" ? "button" : void 0 } }, "component", _vm.to ? { to: _vm.to } : { href: _vm.href }, false), [_vm._t("default")], 2);
|
|
1759
|
+
};
|
|
1760
|
+
var staticRenderFns$3 = [];
|
|
1761
|
+
function normalizeComponent(scriptExports, render2, staticRenderFns2, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
|
|
1762
|
+
var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports;
|
|
1763
|
+
if (render2) {
|
|
1764
|
+
options.render = render2;
|
|
1765
|
+
options.staticRenderFns = staticRenderFns2;
|
|
1766
|
+
options._compiled = true;
|
|
1767
|
+
}
|
|
1768
|
+
if (functionalTemplate) {
|
|
1769
|
+
options.functional = true;
|
|
1770
|
+
}
|
|
1771
|
+
if (scopeId) {
|
|
1772
|
+
options._scopeId = "data-v-" + scopeId;
|
|
1773
|
+
}
|
|
1774
|
+
var hook;
|
|
1775
|
+
if (moduleIdentifier) {
|
|
1776
|
+
hook = function(context) {
|
|
1777
|
+
context = context || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext;
|
|
1778
|
+
if (!context && typeof __VUE_SSR_CONTEXT__ !== "undefined") {
|
|
1779
|
+
context = __VUE_SSR_CONTEXT__;
|
|
1780
|
+
}
|
|
1781
|
+
if (injectStyles) {
|
|
1782
|
+
injectStyles.call(this, context);
|
|
1783
|
+
}
|
|
1784
|
+
if (context && context._registeredComponents) {
|
|
1785
|
+
context._registeredComponents.add(moduleIdentifier);
|
|
1786
|
+
}
|
|
1787
|
+
};
|
|
1788
|
+
options._ssrRegister = hook;
|
|
1789
|
+
} else if (injectStyles) {
|
|
1790
|
+
hook = shadowMode ? function() {
|
|
1791
|
+
injectStyles.call(this, (options.functional ? this.parent : this).$root.$options.shadowRoot);
|
|
1792
|
+
} : injectStyles;
|
|
1793
|
+
}
|
|
1794
|
+
if (hook) {
|
|
1795
|
+
if (options.functional) {
|
|
1796
|
+
options._injectStyles = hook;
|
|
1797
|
+
var originalRender = options.render;
|
|
1798
|
+
options.render = function renderWithStyleInjection(h, context) {
|
|
1799
|
+
hook.call(context);
|
|
1800
|
+
return originalRender(h, context);
|
|
1801
|
+
};
|
|
1802
|
+
} else {
|
|
1803
|
+
var existing = options.beforeCreate;
|
|
1804
|
+
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
|
|
1805
|
+
}
|
|
1806
|
+
}
|
|
1807
|
+
return {
|
|
1808
|
+
exports: scriptExports,
|
|
1809
|
+
options
|
|
1810
|
+
};
|
|
1811
|
+
}
|
|
1812
|
+
const __vue2_script$3 = {
|
|
1813
|
+
props: {
|
|
1814
|
+
expanded: {
|
|
1815
|
+
type: Boolean,
|
|
1816
|
+
default: false
|
|
1817
|
+
},
|
|
1818
|
+
id: String,
|
|
1819
|
+
href: String,
|
|
1820
|
+
to: [String, Object]
|
|
1821
|
+
},
|
|
1822
|
+
computed: {
|
|
1823
|
+
is() {
|
|
1824
|
+
if (this.to) {
|
|
1825
|
+
return "router-link";
|
|
1826
|
+
}
|
|
1827
|
+
if (this.href) {
|
|
1828
|
+
return "a";
|
|
1829
|
+
}
|
|
1830
|
+
return "button";
|
|
1831
|
+
}
|
|
1832
|
+
}
|
|
1833
|
+
};
|
|
1834
|
+
const __cssModules$3 = {};
|
|
1835
|
+
var __component__$3 = /* @__PURE__ */ normalizeComponent(__vue2_script$3, render$3, staticRenderFns$3, false, __vue2_injectStyles$3, null, null, null);
|
|
1836
|
+
function __vue2_injectStyles$3(context) {
|
|
1837
|
+
for (let o in __cssModules$3) {
|
|
1838
|
+
this[o] = __cssModules$3[o];
|
|
1839
|
+
}
|
|
1840
|
+
}
|
|
1841
|
+
var BtnDropdownAction = /* @__PURE__ */ function() {
|
|
1842
|
+
return __component__$3.exports;
|
|
1843
|
+
}();
|
|
1844
|
+
var DropdownHandler = {
|
|
1845
|
+
components: {
|
|
1846
|
+
BtnDropdownAction,
|
|
1847
|
+
BtnGroup,
|
|
1848
|
+
DropdownMenu
|
|
1849
|
+
},
|
|
1850
|
+
extends: Btn,
|
|
1851
|
+
props: {
|
|
1852
|
+
align: {
|
|
1853
|
+
type: String,
|
|
1854
|
+
default: "left",
|
|
1855
|
+
validate(value) {
|
|
1856
|
+
return ["left", "right"].indexOf(value.toLowerCase()) !== -1;
|
|
1857
|
+
}
|
|
1858
|
+
},
|
|
1859
|
+
animated: {
|
|
1860
|
+
type: Boolean,
|
|
1861
|
+
default: true
|
|
1862
|
+
},
|
|
1863
|
+
caret: {
|
|
1864
|
+
type: Boolean,
|
|
1865
|
+
default: true
|
|
1866
|
+
},
|
|
1867
|
+
dropup: {
|
|
1868
|
+
type: Boolean,
|
|
1869
|
+
default: false
|
|
1870
|
+
},
|
|
1871
|
+
dropright: {
|
|
1872
|
+
type: Boolean,
|
|
1873
|
+
default: false
|
|
1874
|
+
},
|
|
1875
|
+
dropleft: {
|
|
1876
|
+
type: Boolean,
|
|
1877
|
+
default: false
|
|
1878
|
+
},
|
|
1879
|
+
height: String,
|
|
1880
|
+
href: String,
|
|
1881
|
+
nav: Boolean,
|
|
1882
|
+
label: String,
|
|
1883
|
+
offset: {
|
|
1884
|
+
type: Number,
|
|
1885
|
+
default: 5
|
|
1886
|
+
},
|
|
1887
|
+
rotate: {
|
|
1888
|
+
type: Boolean,
|
|
1889
|
+
default: false
|
|
1890
|
+
},
|
|
1891
|
+
split: {
|
|
1892
|
+
type: Boolean,
|
|
1893
|
+
default: false
|
|
1894
|
+
},
|
|
1895
|
+
to: [String, Object],
|
|
1896
|
+
type: {
|
|
1897
|
+
type: String,
|
|
1898
|
+
default: "button"
|
|
1899
|
+
},
|
|
1900
|
+
width: String
|
|
1901
|
+
},
|
|
1902
|
+
data() {
|
|
1903
|
+
return {
|
|
1904
|
+
popper: null,
|
|
1905
|
+
triggerAnimation: false,
|
|
1906
|
+
expanded: false
|
|
1907
|
+
};
|
|
1908
|
+
},
|
|
1909
|
+
computed: {
|
|
1910
|
+
placement() {
|
|
1911
|
+
if (this.dropup) {
|
|
1912
|
+
return "top";
|
|
1913
|
+
}
|
|
1914
|
+
if (this.dropleft) {
|
|
1915
|
+
return "left";
|
|
1916
|
+
}
|
|
1917
|
+
if (this.dropright) {
|
|
1918
|
+
return "right";
|
|
1919
|
+
}
|
|
1920
|
+
return "bottom";
|
|
1921
|
+
},
|
|
1922
|
+
variantClassPrefix() {
|
|
1923
|
+
return "btn" + (this.outline ? "-outline" : "");
|
|
1924
|
+
},
|
|
1925
|
+
sizeableClassPrefix() {
|
|
1926
|
+
return "btn";
|
|
1927
|
+
},
|
|
1928
|
+
classes() {
|
|
1929
|
+
return {
|
|
1930
|
+
"dropdown": this.dropup && this.dropright && this.dropleft,
|
|
1931
|
+
"dropup": this.dropup,
|
|
1932
|
+
"dropright": this.dropright,
|
|
1933
|
+
"dropleft": this.dropleft,
|
|
1934
|
+
"icon-only": !this.nav && !this.split && !!this.$slots.icon && !this.$slots.label,
|
|
1935
|
+
"hide-caret": !this.caret,
|
|
1936
|
+
"expanded": this.expanded,
|
|
1937
|
+
"rotate-90": !this.nav && this.split && this.rotate && this.expanded
|
|
1938
|
+
};
|
|
1939
|
+
},
|
|
1940
|
+
actionClasses() {
|
|
1941
|
+
return [!this.nav && "btn", !this.nav && this.size && this.sizeableClass, !this.nav && this.variant && this.variantClass].filter((value) => !!value).join(" ");
|
|
1942
|
+
},
|
|
1943
|
+
toggleStyle() {
|
|
1944
|
+
return {
|
|
1945
|
+
width: this.width,
|
|
1946
|
+
height: this.height
|
|
1947
|
+
};
|
|
1948
|
+
},
|
|
1949
|
+
toggleClasses() {
|
|
1950
|
+
return [
|
|
1951
|
+
this.nav && "nav-link",
|
|
1952
|
+
!this.nav && "btn",
|
|
1953
|
+
!this.nav && this.variantClass,
|
|
1954
|
+
this.sizeableClass,
|
|
1955
|
+
this.active ? "active" : "",
|
|
1956
|
+
this.block ? "btn-block" : "",
|
|
1957
|
+
!this.split && this.rotate && this.expanded ? "rotate-90" : "",
|
|
1958
|
+
!this.nav && this.split ? "dropdown-toggle-split" : "",
|
|
1959
|
+
"dropdown-toggle"
|
|
1960
|
+
].filter((value) => !!value).join(" ");
|
|
1961
|
+
}
|
|
1962
|
+
},
|
|
1963
|
+
beforeDestroy() {
|
|
1964
|
+
this.popper && this.popper.destroy();
|
|
1965
|
+
},
|
|
1966
|
+
mounted() {
|
|
1967
|
+
},
|
|
1968
|
+
methods: {
|
|
1969
|
+
focus() {
|
|
1970
|
+
this.$el.querySelector(".dropdown-toggle").focus();
|
|
1971
|
+
},
|
|
1972
|
+
queryFocusable() {
|
|
1973
|
+
return this.$el.querySelector(".dropdown-menu").querySelectorAll('label, input, select, textarea, [tabindex]:not([tabindex="-1"])');
|
|
1974
|
+
},
|
|
1975
|
+
isFocusable(element) {
|
|
1976
|
+
const nodes = this.queryFocusable();
|
|
1977
|
+
for (let i in nodes) {
|
|
1978
|
+
if (element === nodes[i]) {
|
|
1979
|
+
return true;
|
|
1980
|
+
}
|
|
1981
|
+
}
|
|
1982
|
+
return false;
|
|
1983
|
+
},
|
|
1984
|
+
toggle(e) {
|
|
1985
|
+
!this.expanded ? this.show() : this.hide();
|
|
1986
|
+
},
|
|
1987
|
+
show() {
|
|
1988
|
+
this.expanded = true;
|
|
1989
|
+
const target = this.$refs.split && this.$refs.split.$el || this.$el;
|
|
1990
|
+
if (!this.nav && !this.popper) {
|
|
1991
|
+
this.popper = createPopper(target, this.$refs.menu.$el, {
|
|
1992
|
+
placement: `${this.placement}-${this.align === "left" ? "start" : "end"}`,
|
|
1993
|
+
onFirstUpdate: () => {
|
|
1994
|
+
this.triggerAnimation = this.animated;
|
|
1995
|
+
},
|
|
1996
|
+
modifiers: [{
|
|
1997
|
+
name: "offset",
|
|
1998
|
+
options: {
|
|
1999
|
+
offset: [0, !this.nav ? this.offset : 1]
|
|
2000
|
+
}
|
|
2001
|
+
}]
|
|
2002
|
+
});
|
|
2003
|
+
} else if (this.popper) {
|
|
2004
|
+
this.popper.update();
|
|
2005
|
+
}
|
|
2006
|
+
},
|
|
2007
|
+
hide() {
|
|
2008
|
+
this.expanded = false;
|
|
2009
|
+
},
|
|
2010
|
+
onBlur(e) {
|
|
2011
|
+
if (!this.$el.contains(e.relatedTarget)) {
|
|
2012
|
+
this.hide();
|
|
2013
|
+
}
|
|
2014
|
+
},
|
|
2015
|
+
onClickItem(e) {
|
|
2016
|
+
if (!this.isFocusable(e.target)) {
|
|
2017
|
+
this.hide();
|
|
2018
|
+
}
|
|
2019
|
+
},
|
|
2020
|
+
onClickToggle(e) {
|
|
2021
|
+
this.$emit("click-toggle", e);
|
|
2022
|
+
if (!e.defaultPrevented) {
|
|
2023
|
+
this.toggle();
|
|
2024
|
+
}
|
|
2025
|
+
}
|
|
2026
|
+
},
|
|
2027
|
+
watch: {
|
|
2028
|
+
expanded(value) {
|
|
2029
|
+
this.$nextTick(() => {
|
|
2030
|
+
this.$emit(value ? "show" : "hide");
|
|
2031
|
+
this.$emit("toggle", value);
|
|
2032
|
+
});
|
|
2033
|
+
}
|
|
2034
|
+
}
|
|
2035
|
+
};
|
|
2036
|
+
var render$2 = function() {
|
|
2037
|
+
var _vm = this;
|
|
2038
|
+
var _h = _vm.$createElement;
|
|
2039
|
+
var _c = _vm._self._c || _h;
|
|
2040
|
+
return _c("btn-group", { staticClass: "btn-dropdown-split", class: _vm.classes, on: { "click": _vm.onClick } }, [!_vm.dropleft ? _vm._t("button", function() {
|
|
2041
|
+
return [!_vm.dropleft ? _c("btn-dropdown-action", { ref: "button", class: _vm.actionClasses, attrs: { "id": _vm.$attrs.id, "expanded": _vm.expanded, "href": _vm.href, "to": _vm.to }, nativeOn: { "click": function($event) {
|
|
2042
|
+
return function(e) {
|
|
2043
|
+
return _vm.$emit("click", e);
|
|
2044
|
+
}.apply(null, arguments);
|
|
2045
|
+
} } }, [_vm._t("icon"), _vm._t("label", function() {
|
|
2046
|
+
return [_vm._v(" " + _vm._s(_vm.label) + " ")];
|
|
2047
|
+
})], 2) : _vm._e()];
|
|
2048
|
+
}, null, this) : _vm._e(), _c("btn-group", { ref: "split" }, [_vm._t("split", function() {
|
|
2049
|
+
return [_vm.split ? _c("button", { class: _vm.toggleClasses, attrs: { "id": _vm.$attrs.id, "type": "button", "aria-haspopup": "true", "aria-expanded": _vm.expanded }, on: { "blur": _vm.onBlur, "click": _vm.onClickToggle } }) : _vm._e()];
|
|
2050
|
+
}, null, this), _c("dropdown-menu", { ref: "menu", class: { animated: _vm.triggerAnimation }, attrs: { "id": _vm.$attrs.id, "align": _vm.align, "show": _vm.expanded }, on: { "click-item": _vm.onClickItem, "blur-item": _vm.onBlur } }, [_vm._t("default")], 2)], 2), _vm.dropleft ? _vm._t("button", function() {
|
|
2051
|
+
return [_vm.dropleft ? _c("btn-dropdown-action", { ref: "button", class: _vm.actionClasses, attrs: { "id": _vm.$attrs.id, "expanded": _vm.expanded, "href": _vm.href, "to": _vm.to }, nativeOn: { "click": function($event) {
|
|
2052
|
+
return function(e) {
|
|
2053
|
+
return _vm.$emit("click", e);
|
|
2054
|
+
}.apply(null, arguments);
|
|
2055
|
+
} } }, [_vm._t("icon"), _vm._t("label", function() {
|
|
2056
|
+
return [_vm._v(" " + _vm._s(_vm.label) + " ")];
|
|
2057
|
+
})], 2) : _vm._e()];
|
|
2058
|
+
}, null, this) : _vm._e()], 2);
|
|
2059
|
+
};
|
|
2060
|
+
var staticRenderFns$2 = [];
|
|
2061
|
+
const __vue2_script$2 = {
|
|
2062
|
+
mixins: [
|
|
2063
|
+
DropdownHandler
|
|
2064
|
+
]
|
|
2065
|
+
};
|
|
2066
|
+
const __cssModules$2 = {};
|
|
2067
|
+
var __component__$2 = /* @__PURE__ */ normalizeComponent(__vue2_script$2, render$2, staticRenderFns$2, false, __vue2_injectStyles$2, null, null, null);
|
|
2068
|
+
function __vue2_injectStyles$2(context) {
|
|
2069
|
+
for (let o in __cssModules$2) {
|
|
2070
|
+
this[o] = __cssModules$2[o];
|
|
2071
|
+
}
|
|
2072
|
+
}
|
|
2073
|
+
var BtnDropdownSplit = /* @__PURE__ */ function() {
|
|
2074
|
+
return __component__$2.exports;
|
|
2075
|
+
}();
|
|
2076
|
+
var render$1 = function() {
|
|
2077
|
+
var _vm = this;
|
|
2078
|
+
var _h = _vm.$createElement;
|
|
2079
|
+
var _c = _vm._self._c || _h;
|
|
2080
|
+
return _c("btn-group", { class: _vm.classes }, [_vm._t("button", function() {
|
|
2081
|
+
return [_c("btn-dropdown-action", { ref: "button", class: _vm.toggleClasses, style: _vm.toggleStyle, attrs: { "id": _vm.$attrs.id, "expanded": _vm.expanded, "href": _vm.href, "to": _vm.to }, nativeOn: { "blur": function($event) {
|
|
2082
|
+
return _vm.onBlur.apply(null, arguments);
|
|
2083
|
+
}, "click": function($event) {
|
|
2084
|
+
return _vm.onClickToggle.apply(null, arguments);
|
|
2085
|
+
} } }, [_vm._t("icon"), _vm._t("label", function() {
|
|
2086
|
+
return [_vm._v(" " + _vm._s(_vm.label) + " ")];
|
|
2087
|
+
})], 2)];
|
|
2088
|
+
}, null, this), _c("dropdown-menu", { ref: "menu", class: { animated: _vm.triggerAnimation }, attrs: { "id": _vm.$attrs.id, "align": _vm.align, "show": _vm.expanded }, on: { "blur-item": _vm.onBlur, "click-item": _vm.onClickItem } }, [_vm._t("default")], 2)], 2);
|
|
2089
|
+
};
|
|
2090
|
+
var staticRenderFns$1 = [];
|
|
2091
|
+
const __vue2_script$1 = {
|
|
2092
|
+
mixins: [
|
|
2093
|
+
DropdownHandler
|
|
2094
|
+
]
|
|
2095
|
+
};
|
|
2096
|
+
const __cssModules$1 = {};
|
|
2097
|
+
var __component__$1 = /* @__PURE__ */ normalizeComponent(__vue2_script$1, render$1, staticRenderFns$1, false, __vue2_injectStyles$1, null, null, null);
|
|
2098
|
+
function __vue2_injectStyles$1(context) {
|
|
2099
|
+
for (let o in __cssModules$1) {
|
|
2100
|
+
this[o] = __cssModules$1[o];
|
|
2101
|
+
}
|
|
2102
|
+
}
|
|
2103
|
+
var BtnDropdownSingle = /* @__PURE__ */ function() {
|
|
2104
|
+
return __component__$1.exports;
|
|
2105
|
+
}();
|
|
2106
|
+
var render = function() {
|
|
2107
|
+
var this$1$1 = this;
|
|
2108
|
+
var _vm = this;
|
|
2109
|
+
var _h = _vm.$createElement;
|
|
2110
|
+
var _c = _vm._self._c || _h;
|
|
2111
|
+
return _c(_vm.$attrs.split === void 0 || !!_vm.$attrs.nav ? "btn-dropdown-single" : "btn-dropdown-split", _vm._b({ tag: "component", staticClass: "btn-dropdown", on: { "click": function() {
|
|
2112
|
+
var ref;
|
|
2113
|
+
var args = [], len = arguments.length;
|
|
2114
|
+
while (len--)
|
|
2115
|
+
args[len] = arguments[len];
|
|
2116
|
+
return (ref = this$1$1).$emit.apply(ref, ["click"].concat(args));
|
|
2117
|
+
}, "click-toggle": function() {
|
|
2118
|
+
var ref;
|
|
2119
|
+
var args = [], len = arguments.length;
|
|
2120
|
+
while (len--)
|
|
2121
|
+
args[len] = arguments[len];
|
|
2122
|
+
return (ref = this$1$1).$emit.apply(ref, ["click-toggle"].concat(args));
|
|
2123
|
+
}, "dropdown": function() {
|
|
2124
|
+
var ref;
|
|
2125
|
+
var args = [], len = arguments.length;
|
|
2126
|
+
while (len--)
|
|
2127
|
+
args[len] = arguments[len];
|
|
2128
|
+
return (ref = this$1$1).$emit.apply(ref, ["dropdown"].concat(args));
|
|
2129
|
+
}, "show": function() {
|
|
2130
|
+
var ref;
|
|
2131
|
+
var args = [], len = arguments.length;
|
|
2132
|
+
while (len--)
|
|
2133
|
+
args[len] = arguments[len];
|
|
2134
|
+
return (ref = this$1$1).$emit.apply(ref, ["show"].concat(args));
|
|
2135
|
+
}, "hide": function() {
|
|
2136
|
+
var ref;
|
|
2137
|
+
var args = [], len = arguments.length;
|
|
2138
|
+
while (len--)
|
|
2139
|
+
args[len] = arguments[len];
|
|
2140
|
+
return (ref = this$1$1).$emit.apply(ref, ["hide"].concat(args));
|
|
2141
|
+
}, "toggle": function() {
|
|
2142
|
+
var ref;
|
|
2143
|
+
var args = [], len = arguments.length;
|
|
2144
|
+
while (len--)
|
|
2145
|
+
args[len] = arguments[len];
|
|
2146
|
+
return (ref = this$1$1).$emit.apply(ref, ["toggle"].concat(args));
|
|
2147
|
+
} }, scopedSlots: _vm._u([{ key: "icon", fn: function() {
|
|
2148
|
+
return [_vm._t("icon")];
|
|
2149
|
+
}, proxy: true }, _vm.$attrs.label || this.$slots.label ? { key: "label", fn: function() {
|
|
2150
|
+
return [_vm._t("label", function() {
|
|
2151
|
+
return [_vm._v(" " + _vm._s(_vm.$attrs.label) + " ")];
|
|
2152
|
+
})];
|
|
2153
|
+
}, proxy: true } : null, { key: "button", fn: function(slot) {
|
|
2154
|
+
return [_vm._t("button", null, null, slot)];
|
|
2155
|
+
} }, { key: "split", fn: function(slot) {
|
|
2156
|
+
return [_vm._t("split", null, null, slot)];
|
|
2157
|
+
} }], null, true) }, "component", _vm.$attrs, false), [_vm._t("default")], 2);
|
|
2158
|
+
};
|
|
2159
|
+
var staticRenderFns = [];
|
|
2160
|
+
var BtnDropdown_vue_vue_type_style_index_0_lang = "";
|
|
2161
|
+
const __vue2_script = {
|
|
2162
|
+
name: "BtnDropdown",
|
|
2163
|
+
components: {
|
|
2164
|
+
BtnDropdownSplit,
|
|
2165
|
+
BtnDropdownSingle
|
|
2166
|
+
},
|
|
2167
|
+
inheritAttrs: false
|
|
2168
|
+
};
|
|
2169
|
+
const __cssModules = {};
|
|
2170
|
+
var __component__ = /* @__PURE__ */ normalizeComponent(__vue2_script, render, staticRenderFns, false, __vue2_injectStyles, null, null, null);
|
|
2171
|
+
function __vue2_injectStyles(context) {
|
|
2172
|
+
for (let o in __cssModules) {
|
|
2173
|
+
this[o] = __cssModules[o];
|
|
2174
|
+
}
|
|
2175
|
+
}
|
|
2176
|
+
var BtnDropdown = /* @__PURE__ */ function() {
|
|
2177
|
+
return __component__.exports;
|
|
2178
|
+
}();
|
|
2179
|
+
export { BtnDropdown };
|