@94ai/nf-search-form 3.2.40 → 3.2.44
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 +2 -2
- package/lib/nf-search-form.cjs.js +550 -67
- package/lib/nf-search-form.esm-bundler.js +551 -68
- package/lib/nf-search-form.vue.d.ts +1 -1
- package/package/nf-search-form.vue +26 -18
- 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({
|
|
@@ -274,34 +274,6 @@ const TimeRange = __component__$4.exports;
|
|
|
274
274
|
function createUniqueString(randomLength = 36) {
|
|
275
275
|
return Number(Math.random().toString().substr(3, randomLength) + Date.now()).toString(36);
|
|
276
276
|
}
|
|
277
|
-
function debounce(func, wait, immediate) {
|
|
278
|
-
let timeout, args, context, timestamp, result;
|
|
279
|
-
const later = function() {
|
|
280
|
-
const last = +/* @__PURE__ */ new Date() - timestamp;
|
|
281
|
-
if (last < wait && last > 0) {
|
|
282
|
-
timeout = setTimeout(later, wait - last);
|
|
283
|
-
} else {
|
|
284
|
-
timeout = null;
|
|
285
|
-
if (!immediate) {
|
|
286
|
-
result = func.apply(context, args);
|
|
287
|
-
if (!timeout)
|
|
288
|
-
context = args = null;
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
};
|
|
292
|
-
return function(...args2) {
|
|
293
|
-
context = this;
|
|
294
|
-
timestamp = +/* @__PURE__ */ new Date();
|
|
295
|
-
const callNow = immediate && !timeout;
|
|
296
|
-
if (!timeout)
|
|
297
|
-
timeout = setTimeout(later, wait);
|
|
298
|
-
if (callNow) {
|
|
299
|
-
result = func.apply(context, args2);
|
|
300
|
-
context = args2 = null;
|
|
301
|
-
}
|
|
302
|
-
return result;
|
|
303
|
-
};
|
|
304
|
-
}
|
|
305
277
|
function deepClone(source) {
|
|
306
278
|
if (!source && typeof source !== "object") {
|
|
307
279
|
throw new Error("error arguments shallowClone");
|
|
@@ -1433,7 +1405,7 @@ function lastChild(el, selector) {
|
|
|
1433
1405
|
}
|
|
1434
1406
|
return last || null;
|
|
1435
1407
|
}
|
|
1436
|
-
function index(el, selector) {
|
|
1408
|
+
function index$1(el, selector) {
|
|
1437
1409
|
var index2 = 0;
|
|
1438
1410
|
if (!el || !el.parentNode) {
|
|
1439
1411
|
return -1;
|
|
@@ -1500,7 +1472,7 @@ function isRectEqual(rect1, rect2) {
|
|
|
1500
1472
|
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
1473
|
}
|
|
1502
1474
|
var _throttleTimeout;
|
|
1503
|
-
function throttle(callback, ms) {
|
|
1475
|
+
function throttle$1(callback, ms) {
|
|
1504
1476
|
return function() {
|
|
1505
1477
|
if (!_throttleTimeout) {
|
|
1506
1478
|
var args = arguments, _this = this;
|
|
@@ -2050,8 +2022,8 @@ Sortable.prototype = /** @lends Sortable.prototype */
|
|
|
2050
2022
|
if (lastDownEl === target) {
|
|
2051
2023
|
return;
|
|
2052
2024
|
}
|
|
2053
|
-
oldIndex = index(target);
|
|
2054
|
-
oldDraggableIndex = index(target, options.draggable);
|
|
2025
|
+
oldIndex = index$1(target);
|
|
2026
|
+
oldDraggableIndex = index$1(target, options.draggable);
|
|
2055
2027
|
if (typeof filter === "function") {
|
|
2056
2028
|
if (filter.call(this, evt, target, this)) {
|
|
2057
2029
|
_dispatchEvent({
|
|
@@ -2474,8 +2446,8 @@ Sortable.prototype = /** @lends Sortable.prototype */
|
|
|
2474
2446
|
return completedFired = true;
|
|
2475
2447
|
}
|
|
2476
2448
|
function changed() {
|
|
2477
|
-
newIndex = index(dragEl);
|
|
2478
|
-
newDraggableIndex = index(dragEl, options.draggable);
|
|
2449
|
+
newIndex = index$1(dragEl);
|
|
2450
|
+
newDraggableIndex = index$1(dragEl, options.draggable);
|
|
2479
2451
|
_dispatchEvent({
|
|
2480
2452
|
sortable: _this,
|
|
2481
2453
|
name: "change",
|
|
@@ -2545,7 +2517,7 @@ Sortable.prototype = /** @lends Sortable.prototype */
|
|
|
2545
2517
|
direction = _getSwapDirection(evt, target, targetRect, vertical, differentRowCol ? 1 : options.swapThreshold, options.invertedSwapThreshold == null ? options.swapThreshold : options.invertedSwapThreshold, isCircumstantialInvert, lastTarget === target);
|
|
2546
2518
|
var sibling;
|
|
2547
2519
|
if (direction !== 0) {
|
|
2548
|
-
var dragIndex = index(dragEl);
|
|
2520
|
+
var dragIndex = index$1(dragEl);
|
|
2549
2521
|
do {
|
|
2550
2522
|
dragIndex -= direction;
|
|
2551
2523
|
sibling = parentEl.children[dragIndex];
|
|
@@ -2607,14 +2579,14 @@ Sortable.prototype = /** @lends Sortable.prototype */
|
|
|
2607
2579
|
},
|
|
2608
2580
|
_onDrop: function _onDrop(evt) {
|
|
2609
2581
|
var el = this.el, options = this.options;
|
|
2610
|
-
newIndex = index(dragEl);
|
|
2611
|
-
newDraggableIndex = index(dragEl, options.draggable);
|
|
2582
|
+
newIndex = index$1(dragEl);
|
|
2583
|
+
newDraggableIndex = index$1(dragEl, options.draggable);
|
|
2612
2584
|
pluginEvent2("drop", this, {
|
|
2613
2585
|
evt
|
|
2614
2586
|
});
|
|
2615
2587
|
parentEl = dragEl && dragEl.parentNode;
|
|
2616
|
-
newIndex = index(dragEl);
|
|
2617
|
-
newDraggableIndex = index(dragEl, options.draggable);
|
|
2588
|
+
newIndex = index$1(dragEl);
|
|
2589
|
+
newDraggableIndex = index$1(dragEl, options.draggable);
|
|
2618
2590
|
if (Sortable.eventCanceled) {
|
|
2619
2591
|
this._nulling();
|
|
2620
2592
|
return;
|
|
@@ -2954,7 +2926,7 @@ function _getSwapDirection(evt, target, targetRect, vertical, swapThreshold, inv
|
|
|
2954
2926
|
return 0;
|
|
2955
2927
|
}
|
|
2956
2928
|
function _getInsertDirection(target) {
|
|
2957
|
-
if (index(dragEl) < index(target)) {
|
|
2929
|
+
if (index$1(dragEl) < index$1(target)) {
|
|
2958
2930
|
return 1;
|
|
2959
2931
|
} else {
|
|
2960
2932
|
return -1;
|
|
@@ -2998,11 +2970,11 @@ Sortable.utils = {
|
|
|
2998
2970
|
return !!closest(el, selector, el, false);
|
|
2999
2971
|
},
|
|
3000
2972
|
extend,
|
|
3001
|
-
throttle,
|
|
2973
|
+
throttle: throttle$1,
|
|
3002
2974
|
closest,
|
|
3003
2975
|
toggleClass,
|
|
3004
2976
|
clone,
|
|
3005
|
-
index,
|
|
2977
|
+
index: index$1,
|
|
3006
2978
|
nextTick: _nextTick,
|
|
3007
2979
|
cancelNextTick: _cancelNextTick,
|
|
3008
2980
|
detectDirection: _detectDirection,
|
|
@@ -3128,7 +3100,7 @@ function clearAutoScrolls() {
|
|
|
3128
3100
|
function clearPointerElemChangedInterval() {
|
|
3129
3101
|
clearInterval(pointerElemChangedInterval);
|
|
3130
3102
|
}
|
|
3131
|
-
var autoScroll = throttle(function(evt, options, rootEl2, isFallback) {
|
|
3103
|
+
var autoScroll = throttle$1(function(evt, options, rootEl2, isFallback) {
|
|
3132
3104
|
if (!options.scroll)
|
|
3133
3105
|
return;
|
|
3134
3106
|
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 +3291,8 @@ function swapNodes(n1, n2) {
|
|
|
3319
3291
|
var p1 = n1.parentNode, p2 = n2.parentNode, i1, i2;
|
|
3320
3292
|
if (!p1 || !p2 || p1.isEqualNode(n2) || p2.isEqualNode(n1))
|
|
3321
3293
|
return;
|
|
3322
|
-
i1 = index(n1);
|
|
3323
|
-
i2 = index(n2);
|
|
3294
|
+
i1 = index$1(n1);
|
|
3295
|
+
i2 = index$1(n2);
|
|
3324
3296
|
if (p1.isEqualNode(p2) && i1 < i2) {
|
|
3325
3297
|
i2++;
|
|
3326
3298
|
}
|
|
@@ -3430,7 +3402,7 @@ function MultiDragPlugin() {
|
|
|
3430
3402
|
multiDragSortable.multiDrag._deselectMultiDrag();
|
|
3431
3403
|
}
|
|
3432
3404
|
multiDragElements.forEach(function(multiDragElement) {
|
|
3433
|
-
multiDragElement.sortableIndex = index(multiDragElement);
|
|
3405
|
+
multiDragElement.sortableIndex = index$1(multiDragElement);
|
|
3434
3406
|
});
|
|
3435
3407
|
multiDragElements = multiDragElements.sort(function(a, b) {
|
|
3436
3408
|
return a.sortableIndex - b.sortableIndex;
|
|
@@ -3576,7 +3548,7 @@ function MultiDragPlugin() {
|
|
|
3576
3548
|
originalEvt: evt
|
|
3577
3549
|
});
|
|
3578
3550
|
if (evt.shiftKey && lastMultiDragSelect && sortable.el.contains(lastMultiDragSelect)) {
|
|
3579
|
-
var lastIndex = index(lastMultiDragSelect), currentIndex = index(dragEl$1);
|
|
3551
|
+
var lastIndex = index$1(lastMultiDragSelect), currentIndex = index$1(dragEl$1);
|
|
3580
3552
|
if (~lastIndex && ~currentIndex && lastIndex !== currentIndex) {
|
|
3581
3553
|
var n, i;
|
|
3582
3554
|
if (currentIndex > lastIndex) {
|
|
@@ -3618,7 +3590,7 @@ function MultiDragPlugin() {
|
|
|
3618
3590
|
}
|
|
3619
3591
|
if (dragStarted && this.isMultiDrag) {
|
|
3620
3592
|
if ((parentEl2[expando].options.sort || parentEl2 !== rootEl2) && multiDragElements.length > 1) {
|
|
3621
|
-
var dragRect = getRect(dragEl$1), multiDragIndex = index(dragEl$1, ":not(." + this.options.selectedClass + ")");
|
|
3593
|
+
var dragRect = getRect(dragEl$1), multiDragIndex = index$1(dragEl$1, ":not(." + this.options.selectedClass + ")");
|
|
3622
3594
|
if (!initialFolding && options.animation)
|
|
3623
3595
|
dragEl$1.thisAnimationDuration = null;
|
|
3624
3596
|
toSortable.captureAnimationState();
|
|
@@ -3646,10 +3618,10 @@ function MultiDragPlugin() {
|
|
|
3646
3618
|
}
|
|
3647
3619
|
multiDragIndex++;
|
|
3648
3620
|
});
|
|
3649
|
-
if (oldIndex2 === index(dragEl$1)) {
|
|
3621
|
+
if (oldIndex2 === index$1(dragEl$1)) {
|
|
3650
3622
|
var update = false;
|
|
3651
3623
|
multiDragElements.forEach(function(multiDragElement) {
|
|
3652
|
-
if (multiDragElement.sortableIndex !== index(multiDragElement)) {
|
|
3624
|
+
if (multiDragElement.sortableIndex !== index$1(multiDragElement)) {
|
|
3653
3625
|
update = true;
|
|
3654
3626
|
return;
|
|
3655
3627
|
}
|
|
@@ -3760,9 +3732,9 @@ function MultiDragPlugin() {
|
|
|
3760
3732
|
if (folding && multiDragElement !== dragEl$1) {
|
|
3761
3733
|
newIndex2 = -1;
|
|
3762
3734
|
} else if (folding) {
|
|
3763
|
-
newIndex2 = index(multiDragElement, ":not(." + _this3.options.selectedClass + ")");
|
|
3735
|
+
newIndex2 = index$1(multiDragElement, ":not(." + _this3.options.selectedClass + ")");
|
|
3764
3736
|
} else {
|
|
3765
|
-
newIndex2 = index(multiDragElement);
|
|
3737
|
+
newIndex2 = index$1(multiDragElement);
|
|
3766
3738
|
}
|
|
3767
3739
|
newIndicies.push({
|
|
3768
3740
|
multiDragElement,
|
|
@@ -6436,6 +6408,502 @@ var _sfc_render$1 = function render5() {
|
|
|
6436
6408
|
var _sfc_staticRenderFns$1 = [];
|
|
6437
6409
|
var __component__$1 = /* @__PURE__ */ normalizeComponent(__sfc_main$1, _sfc_render$1, _sfc_staticRenderFns$1, false, null, null, null, null);
|
|
6438
6410
|
const ColumnCheckDrawer = __component__$1.exports;
|
|
6411
|
+
var MapShim = function() {
|
|
6412
|
+
if (typeof Map !== "undefined") {
|
|
6413
|
+
return Map;
|
|
6414
|
+
}
|
|
6415
|
+
function getIndex(arr, key) {
|
|
6416
|
+
var result = -1;
|
|
6417
|
+
arr.some(function(entry, index2) {
|
|
6418
|
+
if (entry[0] === key) {
|
|
6419
|
+
result = index2;
|
|
6420
|
+
return true;
|
|
6421
|
+
}
|
|
6422
|
+
return false;
|
|
6423
|
+
});
|
|
6424
|
+
return result;
|
|
6425
|
+
}
|
|
6426
|
+
return (
|
|
6427
|
+
/** @class */
|
|
6428
|
+
function() {
|
|
6429
|
+
function class_1() {
|
|
6430
|
+
this.__entries__ = [];
|
|
6431
|
+
}
|
|
6432
|
+
Object.defineProperty(class_1.prototype, "size", {
|
|
6433
|
+
/**
|
|
6434
|
+
* @returns {boolean}
|
|
6435
|
+
*/
|
|
6436
|
+
get: function() {
|
|
6437
|
+
return this.__entries__.length;
|
|
6438
|
+
},
|
|
6439
|
+
enumerable: true,
|
|
6440
|
+
configurable: true
|
|
6441
|
+
});
|
|
6442
|
+
class_1.prototype.get = function(key) {
|
|
6443
|
+
var index2 = getIndex(this.__entries__, key);
|
|
6444
|
+
var entry = this.__entries__[index2];
|
|
6445
|
+
return entry && entry[1];
|
|
6446
|
+
};
|
|
6447
|
+
class_1.prototype.set = function(key, value) {
|
|
6448
|
+
var index2 = getIndex(this.__entries__, key);
|
|
6449
|
+
if (~index2) {
|
|
6450
|
+
this.__entries__[index2][1] = value;
|
|
6451
|
+
} else {
|
|
6452
|
+
this.__entries__.push([key, value]);
|
|
6453
|
+
}
|
|
6454
|
+
};
|
|
6455
|
+
class_1.prototype.delete = function(key) {
|
|
6456
|
+
var entries = this.__entries__;
|
|
6457
|
+
var index2 = getIndex(entries, key);
|
|
6458
|
+
if (~index2) {
|
|
6459
|
+
entries.splice(index2, 1);
|
|
6460
|
+
}
|
|
6461
|
+
};
|
|
6462
|
+
class_1.prototype.has = function(key) {
|
|
6463
|
+
return !!~getIndex(this.__entries__, key);
|
|
6464
|
+
};
|
|
6465
|
+
class_1.prototype.clear = function() {
|
|
6466
|
+
this.__entries__.splice(0);
|
|
6467
|
+
};
|
|
6468
|
+
class_1.prototype.forEach = function(callback, ctx) {
|
|
6469
|
+
if (ctx === void 0) {
|
|
6470
|
+
ctx = null;
|
|
6471
|
+
}
|
|
6472
|
+
for (var _i = 0, _a = this.__entries__; _i < _a.length; _i++) {
|
|
6473
|
+
var entry = _a[_i];
|
|
6474
|
+
callback.call(ctx, entry[1], entry[0]);
|
|
6475
|
+
}
|
|
6476
|
+
};
|
|
6477
|
+
return class_1;
|
|
6478
|
+
}()
|
|
6479
|
+
);
|
|
6480
|
+
}();
|
|
6481
|
+
var isBrowser = typeof window !== "undefined" && typeof document !== "undefined" && window.document === document;
|
|
6482
|
+
var global$1 = function() {
|
|
6483
|
+
if (typeof global !== "undefined" && global.Math === Math) {
|
|
6484
|
+
return global;
|
|
6485
|
+
}
|
|
6486
|
+
if (typeof self !== "undefined" && self.Math === Math) {
|
|
6487
|
+
return self;
|
|
6488
|
+
}
|
|
6489
|
+
if (typeof window !== "undefined" && window.Math === Math) {
|
|
6490
|
+
return window;
|
|
6491
|
+
}
|
|
6492
|
+
return Function("return this")();
|
|
6493
|
+
}();
|
|
6494
|
+
var requestAnimationFrame$1 = function() {
|
|
6495
|
+
if (typeof requestAnimationFrame === "function") {
|
|
6496
|
+
return requestAnimationFrame.bind(global$1);
|
|
6497
|
+
}
|
|
6498
|
+
return function(callback) {
|
|
6499
|
+
return setTimeout(function() {
|
|
6500
|
+
return callback(Date.now());
|
|
6501
|
+
}, 1e3 / 60);
|
|
6502
|
+
};
|
|
6503
|
+
}();
|
|
6504
|
+
var trailingTimeout = 2;
|
|
6505
|
+
function throttle(callback, delay) {
|
|
6506
|
+
var leadingCall = false, trailingCall = false, lastCallTime = 0;
|
|
6507
|
+
function resolvePending() {
|
|
6508
|
+
if (leadingCall) {
|
|
6509
|
+
leadingCall = false;
|
|
6510
|
+
callback();
|
|
6511
|
+
}
|
|
6512
|
+
if (trailingCall) {
|
|
6513
|
+
proxy();
|
|
6514
|
+
}
|
|
6515
|
+
}
|
|
6516
|
+
function timeoutCallback() {
|
|
6517
|
+
requestAnimationFrame$1(resolvePending);
|
|
6518
|
+
}
|
|
6519
|
+
function proxy() {
|
|
6520
|
+
var timeStamp = Date.now();
|
|
6521
|
+
if (leadingCall) {
|
|
6522
|
+
if (timeStamp - lastCallTime < trailingTimeout) {
|
|
6523
|
+
return;
|
|
6524
|
+
}
|
|
6525
|
+
trailingCall = true;
|
|
6526
|
+
} else {
|
|
6527
|
+
leadingCall = true;
|
|
6528
|
+
trailingCall = false;
|
|
6529
|
+
setTimeout(timeoutCallback, delay);
|
|
6530
|
+
}
|
|
6531
|
+
lastCallTime = timeStamp;
|
|
6532
|
+
}
|
|
6533
|
+
return proxy;
|
|
6534
|
+
}
|
|
6535
|
+
var REFRESH_DELAY = 20;
|
|
6536
|
+
var transitionKeys = ["top", "right", "bottom", "left", "width", "height", "size", "weight"];
|
|
6537
|
+
var mutationObserverSupported = typeof MutationObserver !== "undefined";
|
|
6538
|
+
var ResizeObserverController = (
|
|
6539
|
+
/** @class */
|
|
6540
|
+
function() {
|
|
6541
|
+
function ResizeObserverController2() {
|
|
6542
|
+
this.connected_ = false;
|
|
6543
|
+
this.mutationEventsAdded_ = false;
|
|
6544
|
+
this.mutationsObserver_ = null;
|
|
6545
|
+
this.observers_ = [];
|
|
6546
|
+
this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);
|
|
6547
|
+
this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY);
|
|
6548
|
+
}
|
|
6549
|
+
ResizeObserverController2.prototype.addObserver = function(observer) {
|
|
6550
|
+
if (!~this.observers_.indexOf(observer)) {
|
|
6551
|
+
this.observers_.push(observer);
|
|
6552
|
+
}
|
|
6553
|
+
if (!this.connected_) {
|
|
6554
|
+
this.connect_();
|
|
6555
|
+
}
|
|
6556
|
+
};
|
|
6557
|
+
ResizeObserverController2.prototype.removeObserver = function(observer) {
|
|
6558
|
+
var observers2 = this.observers_;
|
|
6559
|
+
var index2 = observers2.indexOf(observer);
|
|
6560
|
+
if (~index2) {
|
|
6561
|
+
observers2.splice(index2, 1);
|
|
6562
|
+
}
|
|
6563
|
+
if (!observers2.length && this.connected_) {
|
|
6564
|
+
this.disconnect_();
|
|
6565
|
+
}
|
|
6566
|
+
};
|
|
6567
|
+
ResizeObserverController2.prototype.refresh = function() {
|
|
6568
|
+
var changesDetected = this.updateObservers_();
|
|
6569
|
+
if (changesDetected) {
|
|
6570
|
+
this.refresh();
|
|
6571
|
+
}
|
|
6572
|
+
};
|
|
6573
|
+
ResizeObserverController2.prototype.updateObservers_ = function() {
|
|
6574
|
+
var activeObservers = this.observers_.filter(function(observer) {
|
|
6575
|
+
return observer.gatherActive(), observer.hasActive();
|
|
6576
|
+
});
|
|
6577
|
+
activeObservers.forEach(function(observer) {
|
|
6578
|
+
return observer.broadcastActive();
|
|
6579
|
+
});
|
|
6580
|
+
return activeObservers.length > 0;
|
|
6581
|
+
};
|
|
6582
|
+
ResizeObserverController2.prototype.connect_ = function() {
|
|
6583
|
+
if (!isBrowser || this.connected_) {
|
|
6584
|
+
return;
|
|
6585
|
+
}
|
|
6586
|
+
document.addEventListener("transitionend", this.onTransitionEnd_);
|
|
6587
|
+
window.addEventListener("resize", this.refresh);
|
|
6588
|
+
if (mutationObserverSupported) {
|
|
6589
|
+
this.mutationsObserver_ = new MutationObserver(this.refresh);
|
|
6590
|
+
this.mutationsObserver_.observe(document, {
|
|
6591
|
+
attributes: true,
|
|
6592
|
+
childList: true,
|
|
6593
|
+
characterData: true,
|
|
6594
|
+
subtree: true
|
|
6595
|
+
});
|
|
6596
|
+
} else {
|
|
6597
|
+
document.addEventListener("DOMSubtreeModified", this.refresh);
|
|
6598
|
+
this.mutationEventsAdded_ = true;
|
|
6599
|
+
}
|
|
6600
|
+
this.connected_ = true;
|
|
6601
|
+
};
|
|
6602
|
+
ResizeObserverController2.prototype.disconnect_ = function() {
|
|
6603
|
+
if (!isBrowser || !this.connected_) {
|
|
6604
|
+
return;
|
|
6605
|
+
}
|
|
6606
|
+
document.removeEventListener("transitionend", this.onTransitionEnd_);
|
|
6607
|
+
window.removeEventListener("resize", this.refresh);
|
|
6608
|
+
if (this.mutationsObserver_) {
|
|
6609
|
+
this.mutationsObserver_.disconnect();
|
|
6610
|
+
}
|
|
6611
|
+
if (this.mutationEventsAdded_) {
|
|
6612
|
+
document.removeEventListener("DOMSubtreeModified", this.refresh);
|
|
6613
|
+
}
|
|
6614
|
+
this.mutationsObserver_ = null;
|
|
6615
|
+
this.mutationEventsAdded_ = false;
|
|
6616
|
+
this.connected_ = false;
|
|
6617
|
+
};
|
|
6618
|
+
ResizeObserverController2.prototype.onTransitionEnd_ = function(_a) {
|
|
6619
|
+
var _b = _a.propertyName, propertyName = _b === void 0 ? "" : _b;
|
|
6620
|
+
var isReflowProperty = transitionKeys.some(function(key) {
|
|
6621
|
+
return !!~propertyName.indexOf(key);
|
|
6622
|
+
});
|
|
6623
|
+
if (isReflowProperty) {
|
|
6624
|
+
this.refresh();
|
|
6625
|
+
}
|
|
6626
|
+
};
|
|
6627
|
+
ResizeObserverController2.getInstance = function() {
|
|
6628
|
+
if (!this.instance_) {
|
|
6629
|
+
this.instance_ = new ResizeObserverController2();
|
|
6630
|
+
}
|
|
6631
|
+
return this.instance_;
|
|
6632
|
+
};
|
|
6633
|
+
ResizeObserverController2.instance_ = null;
|
|
6634
|
+
return ResizeObserverController2;
|
|
6635
|
+
}()
|
|
6636
|
+
);
|
|
6637
|
+
var defineConfigurable = function(target, props) {
|
|
6638
|
+
for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) {
|
|
6639
|
+
var key = _a[_i];
|
|
6640
|
+
Object.defineProperty(target, key, {
|
|
6641
|
+
value: props[key],
|
|
6642
|
+
enumerable: false,
|
|
6643
|
+
writable: false,
|
|
6644
|
+
configurable: true
|
|
6645
|
+
});
|
|
6646
|
+
}
|
|
6647
|
+
return target;
|
|
6648
|
+
};
|
|
6649
|
+
var getWindowOf = function(target) {
|
|
6650
|
+
var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView;
|
|
6651
|
+
return ownerGlobal || global$1;
|
|
6652
|
+
};
|
|
6653
|
+
var emptyRect = createRectInit(0, 0, 0, 0);
|
|
6654
|
+
function toFloat(value) {
|
|
6655
|
+
return parseFloat(value) || 0;
|
|
6656
|
+
}
|
|
6657
|
+
function getBordersSize(styles) {
|
|
6658
|
+
var positions = [];
|
|
6659
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
6660
|
+
positions[_i - 1] = arguments[_i];
|
|
6661
|
+
}
|
|
6662
|
+
return positions.reduce(function(size, position) {
|
|
6663
|
+
var value = styles["border-" + position + "-width"];
|
|
6664
|
+
return size + toFloat(value);
|
|
6665
|
+
}, 0);
|
|
6666
|
+
}
|
|
6667
|
+
function getPaddings(styles) {
|
|
6668
|
+
var positions = ["top", "right", "bottom", "left"];
|
|
6669
|
+
var paddings = {};
|
|
6670
|
+
for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) {
|
|
6671
|
+
var position = positions_1[_i];
|
|
6672
|
+
var value = styles["padding-" + position];
|
|
6673
|
+
paddings[position] = toFloat(value);
|
|
6674
|
+
}
|
|
6675
|
+
return paddings;
|
|
6676
|
+
}
|
|
6677
|
+
function getSVGContentRect(target) {
|
|
6678
|
+
var bbox = target.getBBox();
|
|
6679
|
+
return createRectInit(0, 0, bbox.width, bbox.height);
|
|
6680
|
+
}
|
|
6681
|
+
function getHTMLElementContentRect(target) {
|
|
6682
|
+
var clientWidth = target.clientWidth, clientHeight = target.clientHeight;
|
|
6683
|
+
if (!clientWidth && !clientHeight) {
|
|
6684
|
+
return emptyRect;
|
|
6685
|
+
}
|
|
6686
|
+
var styles = getWindowOf(target).getComputedStyle(target);
|
|
6687
|
+
var paddings = getPaddings(styles);
|
|
6688
|
+
var horizPad = paddings.left + paddings.right;
|
|
6689
|
+
var vertPad = paddings.top + paddings.bottom;
|
|
6690
|
+
var width = toFloat(styles.width), height = toFloat(styles.height);
|
|
6691
|
+
if (styles.boxSizing === "border-box") {
|
|
6692
|
+
if (Math.round(width + horizPad) !== clientWidth) {
|
|
6693
|
+
width -= getBordersSize(styles, "left", "right") + horizPad;
|
|
6694
|
+
}
|
|
6695
|
+
if (Math.round(height + vertPad) !== clientHeight) {
|
|
6696
|
+
height -= getBordersSize(styles, "top", "bottom") + vertPad;
|
|
6697
|
+
}
|
|
6698
|
+
}
|
|
6699
|
+
if (!isDocumentElement(target)) {
|
|
6700
|
+
var vertScrollbar = Math.round(width + horizPad) - clientWidth;
|
|
6701
|
+
var horizScrollbar = Math.round(height + vertPad) - clientHeight;
|
|
6702
|
+
if (Math.abs(vertScrollbar) !== 1) {
|
|
6703
|
+
width -= vertScrollbar;
|
|
6704
|
+
}
|
|
6705
|
+
if (Math.abs(horizScrollbar) !== 1) {
|
|
6706
|
+
height -= horizScrollbar;
|
|
6707
|
+
}
|
|
6708
|
+
}
|
|
6709
|
+
return createRectInit(paddings.left, paddings.top, width, height);
|
|
6710
|
+
}
|
|
6711
|
+
var isSVGGraphicsElement = function() {
|
|
6712
|
+
if (typeof SVGGraphicsElement !== "undefined") {
|
|
6713
|
+
return function(target) {
|
|
6714
|
+
return target instanceof getWindowOf(target).SVGGraphicsElement;
|
|
6715
|
+
};
|
|
6716
|
+
}
|
|
6717
|
+
return function(target) {
|
|
6718
|
+
return target instanceof getWindowOf(target).SVGElement && typeof target.getBBox === "function";
|
|
6719
|
+
};
|
|
6720
|
+
}();
|
|
6721
|
+
function isDocumentElement(target) {
|
|
6722
|
+
return target === getWindowOf(target).document.documentElement;
|
|
6723
|
+
}
|
|
6724
|
+
function getContentRect(target) {
|
|
6725
|
+
if (!isBrowser) {
|
|
6726
|
+
return emptyRect;
|
|
6727
|
+
}
|
|
6728
|
+
if (isSVGGraphicsElement(target)) {
|
|
6729
|
+
return getSVGContentRect(target);
|
|
6730
|
+
}
|
|
6731
|
+
return getHTMLElementContentRect(target);
|
|
6732
|
+
}
|
|
6733
|
+
function createReadOnlyRect(_a) {
|
|
6734
|
+
var x = _a.x, y = _a.y, width = _a.width, height = _a.height;
|
|
6735
|
+
var Constr = typeof DOMRectReadOnly !== "undefined" ? DOMRectReadOnly : Object;
|
|
6736
|
+
var rect = Object.create(Constr.prototype);
|
|
6737
|
+
defineConfigurable(rect, {
|
|
6738
|
+
x,
|
|
6739
|
+
y,
|
|
6740
|
+
width,
|
|
6741
|
+
height,
|
|
6742
|
+
top: y,
|
|
6743
|
+
right: x + width,
|
|
6744
|
+
bottom: height + y,
|
|
6745
|
+
left: x
|
|
6746
|
+
});
|
|
6747
|
+
return rect;
|
|
6748
|
+
}
|
|
6749
|
+
function createRectInit(x, y, width, height) {
|
|
6750
|
+
return {
|
|
6751
|
+
x,
|
|
6752
|
+
y,
|
|
6753
|
+
width,
|
|
6754
|
+
height
|
|
6755
|
+
};
|
|
6756
|
+
}
|
|
6757
|
+
var ResizeObservation = (
|
|
6758
|
+
/** @class */
|
|
6759
|
+
function() {
|
|
6760
|
+
function ResizeObservation2(target) {
|
|
6761
|
+
this.broadcastWidth = 0;
|
|
6762
|
+
this.broadcastHeight = 0;
|
|
6763
|
+
this.contentRect_ = createRectInit(0, 0, 0, 0);
|
|
6764
|
+
this.target = target;
|
|
6765
|
+
}
|
|
6766
|
+
ResizeObservation2.prototype.isActive = function() {
|
|
6767
|
+
var rect = getContentRect(this.target);
|
|
6768
|
+
this.contentRect_ = rect;
|
|
6769
|
+
return rect.width !== this.broadcastWidth || rect.height !== this.broadcastHeight;
|
|
6770
|
+
};
|
|
6771
|
+
ResizeObservation2.prototype.broadcastRect = function() {
|
|
6772
|
+
var rect = this.contentRect_;
|
|
6773
|
+
this.broadcastWidth = rect.width;
|
|
6774
|
+
this.broadcastHeight = rect.height;
|
|
6775
|
+
return rect;
|
|
6776
|
+
};
|
|
6777
|
+
return ResizeObservation2;
|
|
6778
|
+
}()
|
|
6779
|
+
);
|
|
6780
|
+
var ResizeObserverEntry = (
|
|
6781
|
+
/** @class */
|
|
6782
|
+
function() {
|
|
6783
|
+
function ResizeObserverEntry2(target, rectInit) {
|
|
6784
|
+
var contentRect = createReadOnlyRect(rectInit);
|
|
6785
|
+
defineConfigurable(this, {
|
|
6786
|
+
target,
|
|
6787
|
+
contentRect
|
|
6788
|
+
});
|
|
6789
|
+
}
|
|
6790
|
+
return ResizeObserverEntry2;
|
|
6791
|
+
}()
|
|
6792
|
+
);
|
|
6793
|
+
var ResizeObserverSPI = (
|
|
6794
|
+
/** @class */
|
|
6795
|
+
function() {
|
|
6796
|
+
function ResizeObserverSPI2(callback, controller, callbackCtx) {
|
|
6797
|
+
this.activeObservations_ = [];
|
|
6798
|
+
this.observations_ = new MapShim();
|
|
6799
|
+
if (typeof callback !== "function") {
|
|
6800
|
+
throw new TypeError("The callback provided as parameter 1 is not a function.");
|
|
6801
|
+
}
|
|
6802
|
+
this.callback_ = callback;
|
|
6803
|
+
this.controller_ = controller;
|
|
6804
|
+
this.callbackCtx_ = callbackCtx;
|
|
6805
|
+
}
|
|
6806
|
+
ResizeObserverSPI2.prototype.observe = function(target) {
|
|
6807
|
+
if (!arguments.length) {
|
|
6808
|
+
throw new TypeError("1 argument required, but only 0 present.");
|
|
6809
|
+
}
|
|
6810
|
+
if (typeof Element === "undefined" || !(Element instanceof Object)) {
|
|
6811
|
+
return;
|
|
6812
|
+
}
|
|
6813
|
+
if (!(target instanceof getWindowOf(target).Element)) {
|
|
6814
|
+
throw new TypeError('parameter 1 is not of type "Element".');
|
|
6815
|
+
}
|
|
6816
|
+
var observations = this.observations_;
|
|
6817
|
+
if (observations.has(target)) {
|
|
6818
|
+
return;
|
|
6819
|
+
}
|
|
6820
|
+
observations.set(target, new ResizeObservation(target));
|
|
6821
|
+
this.controller_.addObserver(this);
|
|
6822
|
+
this.controller_.refresh();
|
|
6823
|
+
};
|
|
6824
|
+
ResizeObserverSPI2.prototype.unobserve = function(target) {
|
|
6825
|
+
if (!arguments.length) {
|
|
6826
|
+
throw new TypeError("1 argument required, but only 0 present.");
|
|
6827
|
+
}
|
|
6828
|
+
if (typeof Element === "undefined" || !(Element instanceof Object)) {
|
|
6829
|
+
return;
|
|
6830
|
+
}
|
|
6831
|
+
if (!(target instanceof getWindowOf(target).Element)) {
|
|
6832
|
+
throw new TypeError('parameter 1 is not of type "Element".');
|
|
6833
|
+
}
|
|
6834
|
+
var observations = this.observations_;
|
|
6835
|
+
if (!observations.has(target)) {
|
|
6836
|
+
return;
|
|
6837
|
+
}
|
|
6838
|
+
observations.delete(target);
|
|
6839
|
+
if (!observations.size) {
|
|
6840
|
+
this.controller_.removeObserver(this);
|
|
6841
|
+
}
|
|
6842
|
+
};
|
|
6843
|
+
ResizeObserverSPI2.prototype.disconnect = function() {
|
|
6844
|
+
this.clearActive();
|
|
6845
|
+
this.observations_.clear();
|
|
6846
|
+
this.controller_.removeObserver(this);
|
|
6847
|
+
};
|
|
6848
|
+
ResizeObserverSPI2.prototype.gatherActive = function() {
|
|
6849
|
+
var _this = this;
|
|
6850
|
+
this.clearActive();
|
|
6851
|
+
this.observations_.forEach(function(observation) {
|
|
6852
|
+
if (observation.isActive()) {
|
|
6853
|
+
_this.activeObservations_.push(observation);
|
|
6854
|
+
}
|
|
6855
|
+
});
|
|
6856
|
+
};
|
|
6857
|
+
ResizeObserverSPI2.prototype.broadcastActive = function() {
|
|
6858
|
+
if (!this.hasActive()) {
|
|
6859
|
+
return;
|
|
6860
|
+
}
|
|
6861
|
+
var ctx = this.callbackCtx_;
|
|
6862
|
+
var entries = this.activeObservations_.map(function(observation) {
|
|
6863
|
+
return new ResizeObserverEntry(observation.target, observation.broadcastRect());
|
|
6864
|
+
});
|
|
6865
|
+
this.callback_.call(ctx, entries, ctx);
|
|
6866
|
+
this.clearActive();
|
|
6867
|
+
};
|
|
6868
|
+
ResizeObserverSPI2.prototype.clearActive = function() {
|
|
6869
|
+
this.activeObservations_.splice(0);
|
|
6870
|
+
};
|
|
6871
|
+
ResizeObserverSPI2.prototype.hasActive = function() {
|
|
6872
|
+
return this.activeObservations_.length > 0;
|
|
6873
|
+
};
|
|
6874
|
+
return ResizeObserverSPI2;
|
|
6875
|
+
}()
|
|
6876
|
+
);
|
|
6877
|
+
var observers = typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : new MapShim();
|
|
6878
|
+
var ResizeObserver = (
|
|
6879
|
+
/** @class */
|
|
6880
|
+
function() {
|
|
6881
|
+
function ResizeObserver2(callback) {
|
|
6882
|
+
if (!(this instanceof ResizeObserver2)) {
|
|
6883
|
+
throw new TypeError("Cannot call a class as a function.");
|
|
6884
|
+
}
|
|
6885
|
+
if (!arguments.length) {
|
|
6886
|
+
throw new TypeError("1 argument required, but only 0 present.");
|
|
6887
|
+
}
|
|
6888
|
+
var controller = ResizeObserverController.getInstance();
|
|
6889
|
+
var observer = new ResizeObserverSPI(callback, controller, this);
|
|
6890
|
+
observers.set(this, observer);
|
|
6891
|
+
}
|
|
6892
|
+
return ResizeObserver2;
|
|
6893
|
+
}()
|
|
6894
|
+
);
|
|
6895
|
+
["observe", "unobserve", "disconnect"].forEach(function(method) {
|
|
6896
|
+
ResizeObserver.prototype[method] = function() {
|
|
6897
|
+
var _a;
|
|
6898
|
+
return (_a = observers.get(this))[method].apply(_a, arguments);
|
|
6899
|
+
};
|
|
6900
|
+
});
|
|
6901
|
+
var index = function() {
|
|
6902
|
+
if (typeof global$1.ResizeObserver !== "undefined") {
|
|
6903
|
+
return global$1.ResizeObserver;
|
|
6904
|
+
}
|
|
6905
|
+
return ResizeObserver;
|
|
6906
|
+
}();
|
|
6439
6907
|
const __sfc_main = defineComponent({
|
|
6440
6908
|
name: "nf-search-form"
|
|
6441
6909
|
});
|
|
@@ -7229,17 +7697,28 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
7229
7697
|
const isCollapseChange = async (val) => {
|
|
7230
7698
|
emit("isCollapseChange", val);
|
|
7231
7699
|
await nextTick();
|
|
7232
|
-
|
|
7700
|
+
refreshLabel();
|
|
7233
7701
|
};
|
|
7234
|
-
const
|
|
7702
|
+
const domWidth = ref();
|
|
7703
|
+
const topDom = ref();
|
|
7704
|
+
const refreshLabel = () => {
|
|
7235
7705
|
if (props.btnModel === "inline" && !props.btnBoxLabel && props.labelPosition === "top") {
|
|
7236
7706
|
if (nfSearchFormRef.value.$el.getBoundingClientRect().left === defaultButtonSlot.value.$el.getBoundingClientRect().left) {
|
|
7237
7707
|
showBtnBoxLabel.value = "";
|
|
7238
7708
|
} else {
|
|
7239
|
-
showBtnBoxLabel.value = "
|
|
7709
|
+
showBtnBoxLabel.value = ".";
|
|
7240
7710
|
}
|
|
7241
7711
|
}
|
|
7242
7712
|
};
|
|
7713
|
+
const onResize = (params = {}) => {
|
|
7714
|
+
const {
|
|
7715
|
+
width
|
|
7716
|
+
} = (params == null ? void 0 : params[0].contentRect) || {};
|
|
7717
|
+
if (width && domWidth.value && width === domWidth.value) {
|
|
7718
|
+
return;
|
|
7719
|
+
}
|
|
7720
|
+
refreshLabel();
|
|
7721
|
+
};
|
|
7243
7722
|
const calcColumns = () => {
|
|
7244
7723
|
if (props.columns) {
|
|
7245
7724
|
newColumns.value = props.columns;
|
|
@@ -7258,18 +7737,20 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
7258
7737
|
}, 0);
|
|
7259
7738
|
newColumns.value = count;
|
|
7260
7739
|
};
|
|
7261
|
-
const
|
|
7262
|
-
const debounceCalcColumns = debounce(calcColumns, 100, false);
|
|
7740
|
+
const observer = ref();
|
|
7263
7741
|
onMounted(async () => {
|
|
7264
|
-
window.addEventListener("resize", debounceResize);
|
|
7265
|
-
window.addEventListener("resize", debounceCalcColumns);
|
|
7266
7742
|
await nextTick();
|
|
7267
|
-
onResize();
|
|
7268
7743
|
calcColumns();
|
|
7744
|
+
await nextTick();
|
|
7745
|
+
observer.value = new index(onResize);
|
|
7746
|
+
observer.value.observe(topDom.value, {
|
|
7747
|
+
box: "border-box"
|
|
7748
|
+
});
|
|
7749
|
+
domWidth.value = topDom.value.offsetWidth;
|
|
7269
7750
|
});
|
|
7270
|
-
|
|
7271
|
-
|
|
7272
|
-
|
|
7751
|
+
onBeforeUnmount(() => {
|
|
7752
|
+
var _a2;
|
|
7753
|
+
(_a2 = observer.value) == null ? void 0 : _a2.unobserve(topDom.value);
|
|
7273
7754
|
});
|
|
7274
7755
|
const resetNfSearchFormModel = () => {
|
|
7275
7756
|
var _a2;
|
|
@@ -7302,7 +7783,7 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
7302
7783
|
syncCookiesToSearchFormItemOptions();
|
|
7303
7784
|
refreshNfSearchFormModel();
|
|
7304
7785
|
await nextTick();
|
|
7305
|
-
|
|
7786
|
+
refreshLabel();
|
|
7306
7787
|
}
|
|
7307
7788
|
};
|
|
7308
7789
|
const refreshNfSearchFormModel = async () => {
|
|
@@ -7335,7 +7816,7 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
7335
7816
|
syncCookiesToSearchFormItemOptions();
|
|
7336
7817
|
refreshNfSearchFormModel();
|
|
7337
7818
|
await nextTick();
|
|
7338
|
-
|
|
7819
|
+
refreshLabel();
|
|
7339
7820
|
cb();
|
|
7340
7821
|
} catch (e) {
|
|
7341
7822
|
error();
|
|
@@ -7348,7 +7829,7 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
7348
7829
|
syncCookiesToSearchFormItemOptions();
|
|
7349
7830
|
refreshNfSearchFormModel();
|
|
7350
7831
|
await nextTick();
|
|
7351
|
-
|
|
7832
|
+
refreshLabel();
|
|
7352
7833
|
};
|
|
7353
7834
|
return Object.assign({
|
|
7354
7835
|
defaultButtonSlot,
|
|
@@ -7365,6 +7846,7 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
7365
7846
|
itemIsShow,
|
|
7366
7847
|
showBtnBoxLabel,
|
|
7367
7848
|
isCollapseChange,
|
|
7849
|
+
topDom,
|
|
7368
7850
|
resetNfSearchFormModel,
|
|
7369
7851
|
onNfSearchFormSearch,
|
|
7370
7852
|
onNfSearchFormExport,
|
|
@@ -7445,7 +7927,7 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
7445
7927
|
*/
|
|
7446
7928
|
syncCookiesToSearchFormItemOptions,
|
|
7447
7929
|
onResize,
|
|
7448
|
-
visibleChange:
|
|
7930
|
+
visibleChange: refreshLabel
|
|
7449
7931
|
});
|
|
7450
7932
|
};
|
|
7451
7933
|
__sfc_main.components = Object.assign({
|
|
@@ -7457,6 +7939,7 @@ var _sfc_render = function render6() {
|
|
|
7457
7939
|
var _vm = this, _c = _vm._self._c;
|
|
7458
7940
|
_vm._self._setupProxy;
|
|
7459
7941
|
return _c("div", {
|
|
7942
|
+
ref: "topDom",
|
|
7460
7943
|
staticClass: "nf-search-form"
|
|
7461
7944
|
}, [_c("nf-form", {
|
|
7462
7945
|
ref: "nfSearchFormRef",
|