@94ai/nf-search-form 3.2.39 → 3.2.43
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/lib/index.d.ts +38 -38
- package/lib/nf-search-form.cjs.js +554 -36
- package/lib/nf-search-form.esm-bundler.js +555 -37
- package/lib/nf-search-form.vue.d.ts +13 -13
- package/package/nf-search-form.vue +28 -14
- package/package.json +17 -16
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, getCurrentInstance, computed, watch, onBeforeMount, onMounted, nextTick,
|
|
1
|
+
import { defineComponent, ref, getCurrentInstance, computed, watch, onBeforeMount, onMounted, nextTick, onBeforeUnmount } from "vue-demi";
|
|
2
2
|
import { normalizeComponent } from "@94ai/vue2-runtime-helpers";
|
|
3
3
|
import NfMessage from "@94ai/nf-message";
|
|
4
4
|
const __sfc_main$5 = defineComponent({
|
|
@@ -1433,7 +1433,7 @@ function lastChild(el, selector) {
|
|
|
1433
1433
|
}
|
|
1434
1434
|
return last || null;
|
|
1435
1435
|
}
|
|
1436
|
-
function index(el, selector) {
|
|
1436
|
+
function index$1(el, selector) {
|
|
1437
1437
|
var index2 = 0;
|
|
1438
1438
|
if (!el || !el.parentNode) {
|
|
1439
1439
|
return -1;
|
|
@@ -1500,7 +1500,7 @@ function isRectEqual(rect1, rect2) {
|
|
|
1500
1500
|
return Math.round(rect1.top) === Math.round(rect2.top) && Math.round(rect1.left) === Math.round(rect2.left) && Math.round(rect1.height) === Math.round(rect2.height) && Math.round(rect1.width) === Math.round(rect2.width);
|
|
1501
1501
|
}
|
|
1502
1502
|
var _throttleTimeout;
|
|
1503
|
-
function throttle(callback, ms) {
|
|
1503
|
+
function throttle$1(callback, ms) {
|
|
1504
1504
|
return function() {
|
|
1505
1505
|
if (!_throttleTimeout) {
|
|
1506
1506
|
var args = arguments, _this = this;
|
|
@@ -2050,8 +2050,8 @@ Sortable.prototype = /** @lends Sortable.prototype */
|
|
|
2050
2050
|
if (lastDownEl === target) {
|
|
2051
2051
|
return;
|
|
2052
2052
|
}
|
|
2053
|
-
oldIndex = index(target);
|
|
2054
|
-
oldDraggableIndex = index(target, options.draggable);
|
|
2053
|
+
oldIndex = index$1(target);
|
|
2054
|
+
oldDraggableIndex = index$1(target, options.draggable);
|
|
2055
2055
|
if (typeof filter === "function") {
|
|
2056
2056
|
if (filter.call(this, evt, target, this)) {
|
|
2057
2057
|
_dispatchEvent({
|
|
@@ -2474,8 +2474,8 @@ Sortable.prototype = /** @lends Sortable.prototype */
|
|
|
2474
2474
|
return completedFired = true;
|
|
2475
2475
|
}
|
|
2476
2476
|
function changed() {
|
|
2477
|
-
newIndex = index(dragEl);
|
|
2478
|
-
newDraggableIndex = index(dragEl, options.draggable);
|
|
2477
|
+
newIndex = index$1(dragEl);
|
|
2478
|
+
newDraggableIndex = index$1(dragEl, options.draggable);
|
|
2479
2479
|
_dispatchEvent({
|
|
2480
2480
|
sortable: _this,
|
|
2481
2481
|
name: "change",
|
|
@@ -2545,7 +2545,7 @@ Sortable.prototype = /** @lends Sortable.prototype */
|
|
|
2545
2545
|
direction = _getSwapDirection(evt, target, targetRect, vertical, differentRowCol ? 1 : options.swapThreshold, options.invertedSwapThreshold == null ? options.swapThreshold : options.invertedSwapThreshold, isCircumstantialInvert, lastTarget === target);
|
|
2546
2546
|
var sibling;
|
|
2547
2547
|
if (direction !== 0) {
|
|
2548
|
-
var dragIndex = index(dragEl);
|
|
2548
|
+
var dragIndex = index$1(dragEl);
|
|
2549
2549
|
do {
|
|
2550
2550
|
dragIndex -= direction;
|
|
2551
2551
|
sibling = parentEl.children[dragIndex];
|
|
@@ -2607,14 +2607,14 @@ Sortable.prototype = /** @lends Sortable.prototype */
|
|
|
2607
2607
|
},
|
|
2608
2608
|
_onDrop: function _onDrop(evt) {
|
|
2609
2609
|
var el = this.el, options = this.options;
|
|
2610
|
-
newIndex = index(dragEl);
|
|
2611
|
-
newDraggableIndex = index(dragEl, options.draggable);
|
|
2610
|
+
newIndex = index$1(dragEl);
|
|
2611
|
+
newDraggableIndex = index$1(dragEl, options.draggable);
|
|
2612
2612
|
pluginEvent2("drop", this, {
|
|
2613
2613
|
evt
|
|
2614
2614
|
});
|
|
2615
2615
|
parentEl = dragEl && dragEl.parentNode;
|
|
2616
|
-
newIndex = index(dragEl);
|
|
2617
|
-
newDraggableIndex = index(dragEl, options.draggable);
|
|
2616
|
+
newIndex = index$1(dragEl);
|
|
2617
|
+
newDraggableIndex = index$1(dragEl, options.draggable);
|
|
2618
2618
|
if (Sortable.eventCanceled) {
|
|
2619
2619
|
this._nulling();
|
|
2620
2620
|
return;
|
|
@@ -2954,7 +2954,7 @@ function _getSwapDirection(evt, target, targetRect, vertical, swapThreshold, inv
|
|
|
2954
2954
|
return 0;
|
|
2955
2955
|
}
|
|
2956
2956
|
function _getInsertDirection(target) {
|
|
2957
|
-
if (index(dragEl) < index(target)) {
|
|
2957
|
+
if (index$1(dragEl) < index$1(target)) {
|
|
2958
2958
|
return 1;
|
|
2959
2959
|
} else {
|
|
2960
2960
|
return -1;
|
|
@@ -2998,11 +2998,11 @@ Sortable.utils = {
|
|
|
2998
2998
|
return !!closest(el, selector, el, false);
|
|
2999
2999
|
},
|
|
3000
3000
|
extend,
|
|
3001
|
-
throttle,
|
|
3001
|
+
throttle: throttle$1,
|
|
3002
3002
|
closest,
|
|
3003
3003
|
toggleClass,
|
|
3004
3004
|
clone,
|
|
3005
|
-
index,
|
|
3005
|
+
index: index$1,
|
|
3006
3006
|
nextTick: _nextTick,
|
|
3007
3007
|
cancelNextTick: _cancelNextTick,
|
|
3008
3008
|
detectDirection: _detectDirection,
|
|
@@ -3128,7 +3128,7 @@ function clearAutoScrolls() {
|
|
|
3128
3128
|
function clearPointerElemChangedInterval() {
|
|
3129
3129
|
clearInterval(pointerElemChangedInterval);
|
|
3130
3130
|
}
|
|
3131
|
-
var autoScroll = throttle(function(evt, options, rootEl2, isFallback) {
|
|
3131
|
+
var autoScroll = throttle$1(function(evt, options, rootEl2, isFallback) {
|
|
3132
3132
|
if (!options.scroll)
|
|
3133
3133
|
return;
|
|
3134
3134
|
var x = (evt.touches ? evt.touches[0] : evt).clientX, y = (evt.touches ? evt.touches[0] : evt).clientY, sens = options.scrollSensitivity, speed = options.scrollSpeed, winScroller = getWindowScrollingElement();
|
|
@@ -3319,8 +3319,8 @@ function swapNodes(n1, n2) {
|
|
|
3319
3319
|
var p1 = n1.parentNode, p2 = n2.parentNode, i1, i2;
|
|
3320
3320
|
if (!p1 || !p2 || p1.isEqualNode(n2) || p2.isEqualNode(n1))
|
|
3321
3321
|
return;
|
|
3322
|
-
i1 = index(n1);
|
|
3323
|
-
i2 = index(n2);
|
|
3322
|
+
i1 = index$1(n1);
|
|
3323
|
+
i2 = index$1(n2);
|
|
3324
3324
|
if (p1.isEqualNode(p2) && i1 < i2) {
|
|
3325
3325
|
i2++;
|
|
3326
3326
|
}
|
|
@@ -3430,7 +3430,7 @@ function MultiDragPlugin() {
|
|
|
3430
3430
|
multiDragSortable.multiDrag._deselectMultiDrag();
|
|
3431
3431
|
}
|
|
3432
3432
|
multiDragElements.forEach(function(multiDragElement) {
|
|
3433
|
-
multiDragElement.sortableIndex = index(multiDragElement);
|
|
3433
|
+
multiDragElement.sortableIndex = index$1(multiDragElement);
|
|
3434
3434
|
});
|
|
3435
3435
|
multiDragElements = multiDragElements.sort(function(a, b) {
|
|
3436
3436
|
return a.sortableIndex - b.sortableIndex;
|
|
@@ -3576,7 +3576,7 @@ function MultiDragPlugin() {
|
|
|
3576
3576
|
originalEvt: evt
|
|
3577
3577
|
});
|
|
3578
3578
|
if (evt.shiftKey && lastMultiDragSelect && sortable.el.contains(lastMultiDragSelect)) {
|
|
3579
|
-
var lastIndex = index(lastMultiDragSelect), currentIndex = index(dragEl$1);
|
|
3579
|
+
var lastIndex = index$1(lastMultiDragSelect), currentIndex = index$1(dragEl$1);
|
|
3580
3580
|
if (~lastIndex && ~currentIndex && lastIndex !== currentIndex) {
|
|
3581
3581
|
var n, i;
|
|
3582
3582
|
if (currentIndex > lastIndex) {
|
|
@@ -3618,7 +3618,7 @@ function MultiDragPlugin() {
|
|
|
3618
3618
|
}
|
|
3619
3619
|
if (dragStarted && this.isMultiDrag) {
|
|
3620
3620
|
if ((parentEl2[expando].options.sort || parentEl2 !== rootEl2) && multiDragElements.length > 1) {
|
|
3621
|
-
var dragRect = getRect(dragEl$1), multiDragIndex = index(dragEl$1, ":not(." + this.options.selectedClass + ")");
|
|
3621
|
+
var dragRect = getRect(dragEl$1), multiDragIndex = index$1(dragEl$1, ":not(." + this.options.selectedClass + ")");
|
|
3622
3622
|
if (!initialFolding && options.animation)
|
|
3623
3623
|
dragEl$1.thisAnimationDuration = null;
|
|
3624
3624
|
toSortable.captureAnimationState();
|
|
@@ -3646,10 +3646,10 @@ function MultiDragPlugin() {
|
|
|
3646
3646
|
}
|
|
3647
3647
|
multiDragIndex++;
|
|
3648
3648
|
});
|
|
3649
|
-
if (oldIndex2 === index(dragEl$1)) {
|
|
3649
|
+
if (oldIndex2 === index$1(dragEl$1)) {
|
|
3650
3650
|
var update = false;
|
|
3651
3651
|
multiDragElements.forEach(function(multiDragElement) {
|
|
3652
|
-
if (multiDragElement.sortableIndex !== index(multiDragElement)) {
|
|
3652
|
+
if (multiDragElement.sortableIndex !== index$1(multiDragElement)) {
|
|
3653
3653
|
update = true;
|
|
3654
3654
|
return;
|
|
3655
3655
|
}
|
|
@@ -3760,9 +3760,9 @@ function MultiDragPlugin() {
|
|
|
3760
3760
|
if (folding && multiDragElement !== dragEl$1) {
|
|
3761
3761
|
newIndex2 = -1;
|
|
3762
3762
|
} else if (folding) {
|
|
3763
|
-
newIndex2 = index(multiDragElement, ":not(." + _this3.options.selectedClass + ")");
|
|
3763
|
+
newIndex2 = index$1(multiDragElement, ":not(." + _this3.options.selectedClass + ")");
|
|
3764
3764
|
} else {
|
|
3765
|
-
newIndex2 = index(multiDragElement);
|
|
3765
|
+
newIndex2 = index$1(multiDragElement);
|
|
3766
3766
|
}
|
|
3767
3767
|
newIndicies.push({
|
|
3768
3768
|
multiDragElement,
|
|
@@ -6436,6 +6436,502 @@ var _sfc_render$1 = function render5() {
|
|
|
6436
6436
|
var _sfc_staticRenderFns$1 = [];
|
|
6437
6437
|
var __component__$1 = /* @__PURE__ */ normalizeComponent(__sfc_main$1, _sfc_render$1, _sfc_staticRenderFns$1, false, null, null, null, null);
|
|
6438
6438
|
const ColumnCheckDrawer = __component__$1.exports;
|
|
6439
|
+
var MapShim = function() {
|
|
6440
|
+
if (typeof Map !== "undefined") {
|
|
6441
|
+
return Map;
|
|
6442
|
+
}
|
|
6443
|
+
function getIndex(arr, key) {
|
|
6444
|
+
var result = -1;
|
|
6445
|
+
arr.some(function(entry, index2) {
|
|
6446
|
+
if (entry[0] === key) {
|
|
6447
|
+
result = index2;
|
|
6448
|
+
return true;
|
|
6449
|
+
}
|
|
6450
|
+
return false;
|
|
6451
|
+
});
|
|
6452
|
+
return result;
|
|
6453
|
+
}
|
|
6454
|
+
return (
|
|
6455
|
+
/** @class */
|
|
6456
|
+
function() {
|
|
6457
|
+
function class_1() {
|
|
6458
|
+
this.__entries__ = [];
|
|
6459
|
+
}
|
|
6460
|
+
Object.defineProperty(class_1.prototype, "size", {
|
|
6461
|
+
/**
|
|
6462
|
+
* @returns {boolean}
|
|
6463
|
+
*/
|
|
6464
|
+
get: function() {
|
|
6465
|
+
return this.__entries__.length;
|
|
6466
|
+
},
|
|
6467
|
+
enumerable: true,
|
|
6468
|
+
configurable: true
|
|
6469
|
+
});
|
|
6470
|
+
class_1.prototype.get = function(key) {
|
|
6471
|
+
var index2 = getIndex(this.__entries__, key);
|
|
6472
|
+
var entry = this.__entries__[index2];
|
|
6473
|
+
return entry && entry[1];
|
|
6474
|
+
};
|
|
6475
|
+
class_1.prototype.set = function(key, value) {
|
|
6476
|
+
var index2 = getIndex(this.__entries__, key);
|
|
6477
|
+
if (~index2) {
|
|
6478
|
+
this.__entries__[index2][1] = value;
|
|
6479
|
+
} else {
|
|
6480
|
+
this.__entries__.push([key, value]);
|
|
6481
|
+
}
|
|
6482
|
+
};
|
|
6483
|
+
class_1.prototype.delete = function(key) {
|
|
6484
|
+
var entries = this.__entries__;
|
|
6485
|
+
var index2 = getIndex(entries, key);
|
|
6486
|
+
if (~index2) {
|
|
6487
|
+
entries.splice(index2, 1);
|
|
6488
|
+
}
|
|
6489
|
+
};
|
|
6490
|
+
class_1.prototype.has = function(key) {
|
|
6491
|
+
return !!~getIndex(this.__entries__, key);
|
|
6492
|
+
};
|
|
6493
|
+
class_1.prototype.clear = function() {
|
|
6494
|
+
this.__entries__.splice(0);
|
|
6495
|
+
};
|
|
6496
|
+
class_1.prototype.forEach = function(callback, ctx) {
|
|
6497
|
+
if (ctx === void 0) {
|
|
6498
|
+
ctx = null;
|
|
6499
|
+
}
|
|
6500
|
+
for (var _i = 0, _a = this.__entries__; _i < _a.length; _i++) {
|
|
6501
|
+
var entry = _a[_i];
|
|
6502
|
+
callback.call(ctx, entry[1], entry[0]);
|
|
6503
|
+
}
|
|
6504
|
+
};
|
|
6505
|
+
return class_1;
|
|
6506
|
+
}()
|
|
6507
|
+
);
|
|
6508
|
+
}();
|
|
6509
|
+
var isBrowser = typeof window !== "undefined" && typeof document !== "undefined" && window.document === document;
|
|
6510
|
+
var global$1 = function() {
|
|
6511
|
+
if (typeof global !== "undefined" && global.Math === Math) {
|
|
6512
|
+
return global;
|
|
6513
|
+
}
|
|
6514
|
+
if (typeof self !== "undefined" && self.Math === Math) {
|
|
6515
|
+
return self;
|
|
6516
|
+
}
|
|
6517
|
+
if (typeof window !== "undefined" && window.Math === Math) {
|
|
6518
|
+
return window;
|
|
6519
|
+
}
|
|
6520
|
+
return Function("return this")();
|
|
6521
|
+
}();
|
|
6522
|
+
var requestAnimationFrame$1 = function() {
|
|
6523
|
+
if (typeof requestAnimationFrame === "function") {
|
|
6524
|
+
return requestAnimationFrame.bind(global$1);
|
|
6525
|
+
}
|
|
6526
|
+
return function(callback) {
|
|
6527
|
+
return setTimeout(function() {
|
|
6528
|
+
return callback(Date.now());
|
|
6529
|
+
}, 1e3 / 60);
|
|
6530
|
+
};
|
|
6531
|
+
}();
|
|
6532
|
+
var trailingTimeout = 2;
|
|
6533
|
+
function throttle(callback, delay) {
|
|
6534
|
+
var leadingCall = false, trailingCall = false, lastCallTime = 0;
|
|
6535
|
+
function resolvePending() {
|
|
6536
|
+
if (leadingCall) {
|
|
6537
|
+
leadingCall = false;
|
|
6538
|
+
callback();
|
|
6539
|
+
}
|
|
6540
|
+
if (trailingCall) {
|
|
6541
|
+
proxy();
|
|
6542
|
+
}
|
|
6543
|
+
}
|
|
6544
|
+
function timeoutCallback() {
|
|
6545
|
+
requestAnimationFrame$1(resolvePending);
|
|
6546
|
+
}
|
|
6547
|
+
function proxy() {
|
|
6548
|
+
var timeStamp = Date.now();
|
|
6549
|
+
if (leadingCall) {
|
|
6550
|
+
if (timeStamp - lastCallTime < trailingTimeout) {
|
|
6551
|
+
return;
|
|
6552
|
+
}
|
|
6553
|
+
trailingCall = true;
|
|
6554
|
+
} else {
|
|
6555
|
+
leadingCall = true;
|
|
6556
|
+
trailingCall = false;
|
|
6557
|
+
setTimeout(timeoutCallback, delay);
|
|
6558
|
+
}
|
|
6559
|
+
lastCallTime = timeStamp;
|
|
6560
|
+
}
|
|
6561
|
+
return proxy;
|
|
6562
|
+
}
|
|
6563
|
+
var REFRESH_DELAY = 20;
|
|
6564
|
+
var transitionKeys = ["top", "right", "bottom", "left", "width", "height", "size", "weight"];
|
|
6565
|
+
var mutationObserverSupported = typeof MutationObserver !== "undefined";
|
|
6566
|
+
var ResizeObserverController = (
|
|
6567
|
+
/** @class */
|
|
6568
|
+
function() {
|
|
6569
|
+
function ResizeObserverController2() {
|
|
6570
|
+
this.connected_ = false;
|
|
6571
|
+
this.mutationEventsAdded_ = false;
|
|
6572
|
+
this.mutationsObserver_ = null;
|
|
6573
|
+
this.observers_ = [];
|
|
6574
|
+
this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);
|
|
6575
|
+
this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY);
|
|
6576
|
+
}
|
|
6577
|
+
ResizeObserverController2.prototype.addObserver = function(observer) {
|
|
6578
|
+
if (!~this.observers_.indexOf(observer)) {
|
|
6579
|
+
this.observers_.push(observer);
|
|
6580
|
+
}
|
|
6581
|
+
if (!this.connected_) {
|
|
6582
|
+
this.connect_();
|
|
6583
|
+
}
|
|
6584
|
+
};
|
|
6585
|
+
ResizeObserverController2.prototype.removeObserver = function(observer) {
|
|
6586
|
+
var observers2 = this.observers_;
|
|
6587
|
+
var index2 = observers2.indexOf(observer);
|
|
6588
|
+
if (~index2) {
|
|
6589
|
+
observers2.splice(index2, 1);
|
|
6590
|
+
}
|
|
6591
|
+
if (!observers2.length && this.connected_) {
|
|
6592
|
+
this.disconnect_();
|
|
6593
|
+
}
|
|
6594
|
+
};
|
|
6595
|
+
ResizeObserverController2.prototype.refresh = function() {
|
|
6596
|
+
var changesDetected = this.updateObservers_();
|
|
6597
|
+
if (changesDetected) {
|
|
6598
|
+
this.refresh();
|
|
6599
|
+
}
|
|
6600
|
+
};
|
|
6601
|
+
ResizeObserverController2.prototype.updateObservers_ = function() {
|
|
6602
|
+
var activeObservers = this.observers_.filter(function(observer) {
|
|
6603
|
+
return observer.gatherActive(), observer.hasActive();
|
|
6604
|
+
});
|
|
6605
|
+
activeObservers.forEach(function(observer) {
|
|
6606
|
+
return observer.broadcastActive();
|
|
6607
|
+
});
|
|
6608
|
+
return activeObservers.length > 0;
|
|
6609
|
+
};
|
|
6610
|
+
ResizeObserverController2.prototype.connect_ = function() {
|
|
6611
|
+
if (!isBrowser || this.connected_) {
|
|
6612
|
+
return;
|
|
6613
|
+
}
|
|
6614
|
+
document.addEventListener("transitionend", this.onTransitionEnd_);
|
|
6615
|
+
window.addEventListener("resize", this.refresh);
|
|
6616
|
+
if (mutationObserverSupported) {
|
|
6617
|
+
this.mutationsObserver_ = new MutationObserver(this.refresh);
|
|
6618
|
+
this.mutationsObserver_.observe(document, {
|
|
6619
|
+
attributes: true,
|
|
6620
|
+
childList: true,
|
|
6621
|
+
characterData: true,
|
|
6622
|
+
subtree: true
|
|
6623
|
+
});
|
|
6624
|
+
} else {
|
|
6625
|
+
document.addEventListener("DOMSubtreeModified", this.refresh);
|
|
6626
|
+
this.mutationEventsAdded_ = true;
|
|
6627
|
+
}
|
|
6628
|
+
this.connected_ = true;
|
|
6629
|
+
};
|
|
6630
|
+
ResizeObserverController2.prototype.disconnect_ = function() {
|
|
6631
|
+
if (!isBrowser || !this.connected_) {
|
|
6632
|
+
return;
|
|
6633
|
+
}
|
|
6634
|
+
document.removeEventListener("transitionend", this.onTransitionEnd_);
|
|
6635
|
+
window.removeEventListener("resize", this.refresh);
|
|
6636
|
+
if (this.mutationsObserver_) {
|
|
6637
|
+
this.mutationsObserver_.disconnect();
|
|
6638
|
+
}
|
|
6639
|
+
if (this.mutationEventsAdded_) {
|
|
6640
|
+
document.removeEventListener("DOMSubtreeModified", this.refresh);
|
|
6641
|
+
}
|
|
6642
|
+
this.mutationsObserver_ = null;
|
|
6643
|
+
this.mutationEventsAdded_ = false;
|
|
6644
|
+
this.connected_ = false;
|
|
6645
|
+
};
|
|
6646
|
+
ResizeObserverController2.prototype.onTransitionEnd_ = function(_a) {
|
|
6647
|
+
var _b = _a.propertyName, propertyName = _b === void 0 ? "" : _b;
|
|
6648
|
+
var isReflowProperty = transitionKeys.some(function(key) {
|
|
6649
|
+
return !!~propertyName.indexOf(key);
|
|
6650
|
+
});
|
|
6651
|
+
if (isReflowProperty) {
|
|
6652
|
+
this.refresh();
|
|
6653
|
+
}
|
|
6654
|
+
};
|
|
6655
|
+
ResizeObserverController2.getInstance = function() {
|
|
6656
|
+
if (!this.instance_) {
|
|
6657
|
+
this.instance_ = new ResizeObserverController2();
|
|
6658
|
+
}
|
|
6659
|
+
return this.instance_;
|
|
6660
|
+
};
|
|
6661
|
+
ResizeObserverController2.instance_ = null;
|
|
6662
|
+
return ResizeObserverController2;
|
|
6663
|
+
}()
|
|
6664
|
+
);
|
|
6665
|
+
var defineConfigurable = function(target, props) {
|
|
6666
|
+
for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) {
|
|
6667
|
+
var key = _a[_i];
|
|
6668
|
+
Object.defineProperty(target, key, {
|
|
6669
|
+
value: props[key],
|
|
6670
|
+
enumerable: false,
|
|
6671
|
+
writable: false,
|
|
6672
|
+
configurable: true
|
|
6673
|
+
});
|
|
6674
|
+
}
|
|
6675
|
+
return target;
|
|
6676
|
+
};
|
|
6677
|
+
var getWindowOf = function(target) {
|
|
6678
|
+
var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView;
|
|
6679
|
+
return ownerGlobal || global$1;
|
|
6680
|
+
};
|
|
6681
|
+
var emptyRect = createRectInit(0, 0, 0, 0);
|
|
6682
|
+
function toFloat(value) {
|
|
6683
|
+
return parseFloat(value) || 0;
|
|
6684
|
+
}
|
|
6685
|
+
function getBordersSize(styles) {
|
|
6686
|
+
var positions = [];
|
|
6687
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
6688
|
+
positions[_i - 1] = arguments[_i];
|
|
6689
|
+
}
|
|
6690
|
+
return positions.reduce(function(size, position) {
|
|
6691
|
+
var value = styles["border-" + position + "-width"];
|
|
6692
|
+
return size + toFloat(value);
|
|
6693
|
+
}, 0);
|
|
6694
|
+
}
|
|
6695
|
+
function getPaddings(styles) {
|
|
6696
|
+
var positions = ["top", "right", "bottom", "left"];
|
|
6697
|
+
var paddings = {};
|
|
6698
|
+
for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) {
|
|
6699
|
+
var position = positions_1[_i];
|
|
6700
|
+
var value = styles["padding-" + position];
|
|
6701
|
+
paddings[position] = toFloat(value);
|
|
6702
|
+
}
|
|
6703
|
+
return paddings;
|
|
6704
|
+
}
|
|
6705
|
+
function getSVGContentRect(target) {
|
|
6706
|
+
var bbox = target.getBBox();
|
|
6707
|
+
return createRectInit(0, 0, bbox.width, bbox.height);
|
|
6708
|
+
}
|
|
6709
|
+
function getHTMLElementContentRect(target) {
|
|
6710
|
+
var clientWidth = target.clientWidth, clientHeight = target.clientHeight;
|
|
6711
|
+
if (!clientWidth && !clientHeight) {
|
|
6712
|
+
return emptyRect;
|
|
6713
|
+
}
|
|
6714
|
+
var styles = getWindowOf(target).getComputedStyle(target);
|
|
6715
|
+
var paddings = getPaddings(styles);
|
|
6716
|
+
var horizPad = paddings.left + paddings.right;
|
|
6717
|
+
var vertPad = paddings.top + paddings.bottom;
|
|
6718
|
+
var width = toFloat(styles.width), height = toFloat(styles.height);
|
|
6719
|
+
if (styles.boxSizing === "border-box") {
|
|
6720
|
+
if (Math.round(width + horizPad) !== clientWidth) {
|
|
6721
|
+
width -= getBordersSize(styles, "left", "right") + horizPad;
|
|
6722
|
+
}
|
|
6723
|
+
if (Math.round(height + vertPad) !== clientHeight) {
|
|
6724
|
+
height -= getBordersSize(styles, "top", "bottom") + vertPad;
|
|
6725
|
+
}
|
|
6726
|
+
}
|
|
6727
|
+
if (!isDocumentElement(target)) {
|
|
6728
|
+
var vertScrollbar = Math.round(width + horizPad) - clientWidth;
|
|
6729
|
+
var horizScrollbar = Math.round(height + vertPad) - clientHeight;
|
|
6730
|
+
if (Math.abs(vertScrollbar) !== 1) {
|
|
6731
|
+
width -= vertScrollbar;
|
|
6732
|
+
}
|
|
6733
|
+
if (Math.abs(horizScrollbar) !== 1) {
|
|
6734
|
+
height -= horizScrollbar;
|
|
6735
|
+
}
|
|
6736
|
+
}
|
|
6737
|
+
return createRectInit(paddings.left, paddings.top, width, height);
|
|
6738
|
+
}
|
|
6739
|
+
var isSVGGraphicsElement = function() {
|
|
6740
|
+
if (typeof SVGGraphicsElement !== "undefined") {
|
|
6741
|
+
return function(target) {
|
|
6742
|
+
return target instanceof getWindowOf(target).SVGGraphicsElement;
|
|
6743
|
+
};
|
|
6744
|
+
}
|
|
6745
|
+
return function(target) {
|
|
6746
|
+
return target instanceof getWindowOf(target).SVGElement && typeof target.getBBox === "function";
|
|
6747
|
+
};
|
|
6748
|
+
}();
|
|
6749
|
+
function isDocumentElement(target) {
|
|
6750
|
+
return target === getWindowOf(target).document.documentElement;
|
|
6751
|
+
}
|
|
6752
|
+
function getContentRect(target) {
|
|
6753
|
+
if (!isBrowser) {
|
|
6754
|
+
return emptyRect;
|
|
6755
|
+
}
|
|
6756
|
+
if (isSVGGraphicsElement(target)) {
|
|
6757
|
+
return getSVGContentRect(target);
|
|
6758
|
+
}
|
|
6759
|
+
return getHTMLElementContentRect(target);
|
|
6760
|
+
}
|
|
6761
|
+
function createReadOnlyRect(_a) {
|
|
6762
|
+
var x = _a.x, y = _a.y, width = _a.width, height = _a.height;
|
|
6763
|
+
var Constr = typeof DOMRectReadOnly !== "undefined" ? DOMRectReadOnly : Object;
|
|
6764
|
+
var rect = Object.create(Constr.prototype);
|
|
6765
|
+
defineConfigurable(rect, {
|
|
6766
|
+
x,
|
|
6767
|
+
y,
|
|
6768
|
+
width,
|
|
6769
|
+
height,
|
|
6770
|
+
top: y,
|
|
6771
|
+
right: x + width,
|
|
6772
|
+
bottom: height + y,
|
|
6773
|
+
left: x
|
|
6774
|
+
});
|
|
6775
|
+
return rect;
|
|
6776
|
+
}
|
|
6777
|
+
function createRectInit(x, y, width, height) {
|
|
6778
|
+
return {
|
|
6779
|
+
x,
|
|
6780
|
+
y,
|
|
6781
|
+
width,
|
|
6782
|
+
height
|
|
6783
|
+
};
|
|
6784
|
+
}
|
|
6785
|
+
var ResizeObservation = (
|
|
6786
|
+
/** @class */
|
|
6787
|
+
function() {
|
|
6788
|
+
function ResizeObservation2(target) {
|
|
6789
|
+
this.broadcastWidth = 0;
|
|
6790
|
+
this.broadcastHeight = 0;
|
|
6791
|
+
this.contentRect_ = createRectInit(0, 0, 0, 0);
|
|
6792
|
+
this.target = target;
|
|
6793
|
+
}
|
|
6794
|
+
ResizeObservation2.prototype.isActive = function() {
|
|
6795
|
+
var rect = getContentRect(this.target);
|
|
6796
|
+
this.contentRect_ = rect;
|
|
6797
|
+
return rect.width !== this.broadcastWidth || rect.height !== this.broadcastHeight;
|
|
6798
|
+
};
|
|
6799
|
+
ResizeObservation2.prototype.broadcastRect = function() {
|
|
6800
|
+
var rect = this.contentRect_;
|
|
6801
|
+
this.broadcastWidth = rect.width;
|
|
6802
|
+
this.broadcastHeight = rect.height;
|
|
6803
|
+
return rect;
|
|
6804
|
+
};
|
|
6805
|
+
return ResizeObservation2;
|
|
6806
|
+
}()
|
|
6807
|
+
);
|
|
6808
|
+
var ResizeObserverEntry = (
|
|
6809
|
+
/** @class */
|
|
6810
|
+
function() {
|
|
6811
|
+
function ResizeObserverEntry2(target, rectInit) {
|
|
6812
|
+
var contentRect = createReadOnlyRect(rectInit);
|
|
6813
|
+
defineConfigurable(this, {
|
|
6814
|
+
target,
|
|
6815
|
+
contentRect
|
|
6816
|
+
});
|
|
6817
|
+
}
|
|
6818
|
+
return ResizeObserverEntry2;
|
|
6819
|
+
}()
|
|
6820
|
+
);
|
|
6821
|
+
var ResizeObserverSPI = (
|
|
6822
|
+
/** @class */
|
|
6823
|
+
function() {
|
|
6824
|
+
function ResizeObserverSPI2(callback, controller, callbackCtx) {
|
|
6825
|
+
this.activeObservations_ = [];
|
|
6826
|
+
this.observations_ = new MapShim();
|
|
6827
|
+
if (typeof callback !== "function") {
|
|
6828
|
+
throw new TypeError("The callback provided as parameter 1 is not a function.");
|
|
6829
|
+
}
|
|
6830
|
+
this.callback_ = callback;
|
|
6831
|
+
this.controller_ = controller;
|
|
6832
|
+
this.callbackCtx_ = callbackCtx;
|
|
6833
|
+
}
|
|
6834
|
+
ResizeObserverSPI2.prototype.observe = function(target) {
|
|
6835
|
+
if (!arguments.length) {
|
|
6836
|
+
throw new TypeError("1 argument required, but only 0 present.");
|
|
6837
|
+
}
|
|
6838
|
+
if (typeof Element === "undefined" || !(Element instanceof Object)) {
|
|
6839
|
+
return;
|
|
6840
|
+
}
|
|
6841
|
+
if (!(target instanceof getWindowOf(target).Element)) {
|
|
6842
|
+
throw new TypeError('parameter 1 is not of type "Element".');
|
|
6843
|
+
}
|
|
6844
|
+
var observations = this.observations_;
|
|
6845
|
+
if (observations.has(target)) {
|
|
6846
|
+
return;
|
|
6847
|
+
}
|
|
6848
|
+
observations.set(target, new ResizeObservation(target));
|
|
6849
|
+
this.controller_.addObserver(this);
|
|
6850
|
+
this.controller_.refresh();
|
|
6851
|
+
};
|
|
6852
|
+
ResizeObserverSPI2.prototype.unobserve = function(target) {
|
|
6853
|
+
if (!arguments.length) {
|
|
6854
|
+
throw new TypeError("1 argument required, but only 0 present.");
|
|
6855
|
+
}
|
|
6856
|
+
if (typeof Element === "undefined" || !(Element instanceof Object)) {
|
|
6857
|
+
return;
|
|
6858
|
+
}
|
|
6859
|
+
if (!(target instanceof getWindowOf(target).Element)) {
|
|
6860
|
+
throw new TypeError('parameter 1 is not of type "Element".');
|
|
6861
|
+
}
|
|
6862
|
+
var observations = this.observations_;
|
|
6863
|
+
if (!observations.has(target)) {
|
|
6864
|
+
return;
|
|
6865
|
+
}
|
|
6866
|
+
observations.delete(target);
|
|
6867
|
+
if (!observations.size) {
|
|
6868
|
+
this.controller_.removeObserver(this);
|
|
6869
|
+
}
|
|
6870
|
+
};
|
|
6871
|
+
ResizeObserverSPI2.prototype.disconnect = function() {
|
|
6872
|
+
this.clearActive();
|
|
6873
|
+
this.observations_.clear();
|
|
6874
|
+
this.controller_.removeObserver(this);
|
|
6875
|
+
};
|
|
6876
|
+
ResizeObserverSPI2.prototype.gatherActive = function() {
|
|
6877
|
+
var _this = this;
|
|
6878
|
+
this.clearActive();
|
|
6879
|
+
this.observations_.forEach(function(observation) {
|
|
6880
|
+
if (observation.isActive()) {
|
|
6881
|
+
_this.activeObservations_.push(observation);
|
|
6882
|
+
}
|
|
6883
|
+
});
|
|
6884
|
+
};
|
|
6885
|
+
ResizeObserverSPI2.prototype.broadcastActive = function() {
|
|
6886
|
+
if (!this.hasActive()) {
|
|
6887
|
+
return;
|
|
6888
|
+
}
|
|
6889
|
+
var ctx = this.callbackCtx_;
|
|
6890
|
+
var entries = this.activeObservations_.map(function(observation) {
|
|
6891
|
+
return new ResizeObserverEntry(observation.target, observation.broadcastRect());
|
|
6892
|
+
});
|
|
6893
|
+
this.callback_.call(ctx, entries, ctx);
|
|
6894
|
+
this.clearActive();
|
|
6895
|
+
};
|
|
6896
|
+
ResizeObserverSPI2.prototype.clearActive = function() {
|
|
6897
|
+
this.activeObservations_.splice(0);
|
|
6898
|
+
};
|
|
6899
|
+
ResizeObserverSPI2.prototype.hasActive = function() {
|
|
6900
|
+
return this.activeObservations_.length > 0;
|
|
6901
|
+
};
|
|
6902
|
+
return ResizeObserverSPI2;
|
|
6903
|
+
}()
|
|
6904
|
+
);
|
|
6905
|
+
var observers = typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : new MapShim();
|
|
6906
|
+
var ResizeObserver = (
|
|
6907
|
+
/** @class */
|
|
6908
|
+
function() {
|
|
6909
|
+
function ResizeObserver2(callback) {
|
|
6910
|
+
if (!(this instanceof ResizeObserver2)) {
|
|
6911
|
+
throw new TypeError("Cannot call a class as a function.");
|
|
6912
|
+
}
|
|
6913
|
+
if (!arguments.length) {
|
|
6914
|
+
throw new TypeError("1 argument required, but only 0 present.");
|
|
6915
|
+
}
|
|
6916
|
+
var controller = ResizeObserverController.getInstance();
|
|
6917
|
+
var observer = new ResizeObserverSPI(callback, controller, this);
|
|
6918
|
+
observers.set(this, observer);
|
|
6919
|
+
}
|
|
6920
|
+
return ResizeObserver2;
|
|
6921
|
+
}()
|
|
6922
|
+
);
|
|
6923
|
+
["observe", "unobserve", "disconnect"].forEach(function(method) {
|
|
6924
|
+
ResizeObserver.prototype[method] = function() {
|
|
6925
|
+
var _a;
|
|
6926
|
+
return (_a = observers.get(this))[method].apply(_a, arguments);
|
|
6927
|
+
};
|
|
6928
|
+
});
|
|
6929
|
+
var index = function() {
|
|
6930
|
+
if (typeof global$1.ResizeObserver !== "undefined") {
|
|
6931
|
+
return global$1.ResizeObserver;
|
|
6932
|
+
}
|
|
6933
|
+
return ResizeObserver;
|
|
6934
|
+
}();
|
|
6439
6935
|
const __sfc_main = defineComponent({
|
|
6440
6936
|
name: "nf-search-form"
|
|
6441
6937
|
});
|
|
@@ -7231,16 +7727,31 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
7231
7727
|
await nextTick();
|
|
7232
7728
|
onResize();
|
|
7233
7729
|
};
|
|
7234
|
-
const
|
|
7730
|
+
const domWidth = ref();
|
|
7731
|
+
const topDom = ref();
|
|
7732
|
+
const onResize = (params = {}) => {
|
|
7733
|
+
console.log(params, "resize");
|
|
7734
|
+
const {
|
|
7735
|
+
width
|
|
7736
|
+
} = params || {};
|
|
7737
|
+
if (width && domWidth.value && width === domWidth.value) {
|
|
7738
|
+
return;
|
|
7739
|
+
}
|
|
7235
7740
|
if (props.btnModel === "inline" && !props.btnBoxLabel && props.labelPosition === "top") {
|
|
7236
7741
|
if (nfSearchFormRef.value.$el.getBoundingClientRect().left === defaultButtonSlot.value.$el.getBoundingClientRect().left) {
|
|
7237
7742
|
showBtnBoxLabel.value = "";
|
|
7238
7743
|
} else {
|
|
7239
|
-
showBtnBoxLabel.value = "
|
|
7744
|
+
showBtnBoxLabel.value = ".";
|
|
7240
7745
|
}
|
|
7241
7746
|
}
|
|
7242
7747
|
};
|
|
7243
|
-
const calcColumns = () => {
|
|
7748
|
+
const calcColumns = (params = {}) => {
|
|
7749
|
+
const {
|
|
7750
|
+
width
|
|
7751
|
+
} = params || {};
|
|
7752
|
+
if (width && domWidth.value && width === domWidth.value) {
|
|
7753
|
+
return;
|
|
7754
|
+
}
|
|
7244
7755
|
if (props.columns) {
|
|
7245
7756
|
newColumns.value = props.columns;
|
|
7246
7757
|
return;
|
|
@@ -7258,18 +7769,23 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
7258
7769
|
}, 0);
|
|
7259
7770
|
newColumns.value = count;
|
|
7260
7771
|
};
|
|
7261
|
-
const
|
|
7262
|
-
|
|
7772
|
+
const resizeOpterate = (params) => {
|
|
7773
|
+
onResize(params);
|
|
7774
|
+
calcColumns(params);
|
|
7775
|
+
};
|
|
7776
|
+
const debounceResize = debounce(resizeOpterate, 100, false);
|
|
7777
|
+
const observer = ref();
|
|
7263
7778
|
onMounted(async () => {
|
|
7264
|
-
window.addEventListener("resize", debounceResize);
|
|
7265
|
-
window.addEventListener("resize", debounceCalcColumns);
|
|
7266
7779
|
await nextTick();
|
|
7267
|
-
|
|
7268
|
-
|
|
7780
|
+
observer.value = new index(debounceResize);
|
|
7781
|
+
observer.value.observe(topDom.value, {
|
|
7782
|
+
box: "border-box"
|
|
7783
|
+
});
|
|
7784
|
+
domWidth.value = topDom.value.offsetWidth;
|
|
7269
7785
|
});
|
|
7270
|
-
|
|
7271
|
-
|
|
7272
|
-
|
|
7786
|
+
onBeforeUnmount(() => {
|
|
7787
|
+
var _a2;
|
|
7788
|
+
(_a2 = observer.value) == null ? void 0 : _a2.unobserve(topDom.value);
|
|
7273
7789
|
});
|
|
7274
7790
|
const resetNfSearchFormModel = () => {
|
|
7275
7791
|
var _a2;
|
|
@@ -7365,6 +7881,7 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
7365
7881
|
itemIsShow,
|
|
7366
7882
|
showBtnBoxLabel,
|
|
7367
7883
|
isCollapseChange,
|
|
7884
|
+
topDom,
|
|
7368
7885
|
resetNfSearchFormModel,
|
|
7369
7886
|
onNfSearchFormSearch,
|
|
7370
7887
|
onNfSearchFormExport,
|
|
@@ -7457,6 +7974,7 @@ var _sfc_render = function render6() {
|
|
|
7457
7974
|
var _vm = this, _c = _vm._self._c;
|
|
7458
7975
|
_vm._self._setupProxy;
|
|
7459
7976
|
return _c("div", {
|
|
7977
|
+
ref: "topDom",
|
|
7460
7978
|
staticClass: "nf-search-form"
|
|
7461
7979
|
}, [_c("nf-form", {
|
|
7462
7980
|
ref: "nfSearchFormRef",
|