tg-controls_cli 0.0.95 → 0.0.97
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/myLib.common.js +3229 -7
- package/dist/myLib.common.js.map +1 -1
- package/dist/myLib.css +1 -1
- package/dist/myLib.umd.js +3229 -7
- package/dist/myLib.umd.js.map +1 -1
- package/dist/myLib.umd.min.js +5 -5
- package/dist/myLib.umd.min.js.map +1 -1
- package/package.json +1 -1
package/dist/myLib.common.js
CHANGED
|
@@ -335,7 +335,7 @@ var buildURL = __webpack_require__("30b5");
|
|
|
335
335
|
var InterceptorManager = __webpack_require__("f6b4");
|
|
336
336
|
var dispatchRequest = __webpack_require__("5270");
|
|
337
337
|
var mergeConfig = __webpack_require__("4a7b");
|
|
338
|
-
var buildFullPath = __webpack_require__("
|
|
338
|
+
var buildFullPath = __webpack_require__("83b9e");
|
|
339
339
|
var validator = __webpack_require__("848b");
|
|
340
340
|
|
|
341
341
|
var validators = validator.validators;
|
|
@@ -1008,6 +1008,46 @@ function once(func) {
|
|
|
1008
1008
|
module.exports = once;
|
|
1009
1009
|
|
|
1010
1010
|
|
|
1011
|
+
/***/ }),
|
|
1012
|
+
|
|
1013
|
+
/***/ "1e5a":
|
|
1014
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1015
|
+
|
|
1016
|
+
"use strict";
|
|
1017
|
+
|
|
1018
|
+
var $ = __webpack_require__("23e7");
|
|
1019
|
+
var symmetricDifference = __webpack_require__("9961");
|
|
1020
|
+
var setMethodAcceptSetLike = __webpack_require__("dad2");
|
|
1021
|
+
|
|
1022
|
+
// `Set.prototype.symmetricDifference` method
|
|
1023
|
+
// https://tc39.es/ecma262/#sec-set.prototype.symmetricdifference
|
|
1024
|
+
$({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike('symmetricDifference') }, {
|
|
1025
|
+
symmetricDifference: symmetricDifference
|
|
1026
|
+
});
|
|
1027
|
+
|
|
1028
|
+
|
|
1029
|
+
/***/ }),
|
|
1030
|
+
|
|
1031
|
+
/***/ "1e70":
|
|
1032
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1033
|
+
|
|
1034
|
+
"use strict";
|
|
1035
|
+
|
|
1036
|
+
var $ = __webpack_require__("23e7");
|
|
1037
|
+
var difference = __webpack_require__("a5f7");
|
|
1038
|
+
var setMethodAcceptSetLike = __webpack_require__("dad2");
|
|
1039
|
+
|
|
1040
|
+
var INCORRECT = !setMethodAcceptSetLike('difference', function (result) {
|
|
1041
|
+
return result.size === 0;
|
|
1042
|
+
});
|
|
1043
|
+
|
|
1044
|
+
// `Set.prototype.difference` method
|
|
1045
|
+
// https://tc39.es/ecma262/#sec-set.prototype.difference
|
|
1046
|
+
$({ target: 'Set', proto: true, real: true, forced: INCORRECT }, {
|
|
1047
|
+
difference: difference
|
|
1048
|
+
});
|
|
1049
|
+
|
|
1050
|
+
|
|
1011
1051
|
/***/ }),
|
|
1012
1052
|
|
|
1013
1053
|
/***/ "1fb5":
|
|
@@ -1653,6 +1693,25 @@ module.exports = JSON.parse("{\"code\":\"bg\",\"messages\":{\"alpha\":\"Поле
|
|
|
1653
1693
|
|
|
1654
1694
|
module.exports = JSON.parse("{\"code\":\"pt_PT\",\"messages\":{\"alpha\":\"O campo {_field_} deve conter somente letras\",\"alpha_dash\":\"O campo {_field_} deve conter letras, números e traços\",\"alpha_num\":\"O campo {_field_} deve conter somente letras e números\",\"alpha_spaces\":\"O {_field_} só pode conter caracteres alfabéticos e espaços\",\"between\":\"O campo {_field_} deve estar entre {min} e {max}\",\"confirmed\":\"A confirmação do campo {_field_} deve ser igual\",\"digits\":\"O campo {_field_} deve ser numérico e ter {length} dígitos\",\"dimensions\":\"O campo {_field_} deve ter {width} pixels de largura por {height} pixels de altura\",\"email\":\"O campo {_field_} deve ser um email válido\",\"excluded\":\"O campo {_field_} deve ser um valor válido\",\"ext\":\"O campo {_field_} deve ser um ficheiro válido\",\"image\":\"O campo {_field_} deve ser uma imagem\",\"is\":\"O valor inserido no campo {_field_} não é válido\",\"oneOf\":\"O campo {_field_} deve ter um valor válido\",\"max\":\"O campo {_field_} não deve ter mais que {length} caracteres\",\"max_value\":\"O campo {_field_} precisa ser {max} ou menor\",\"mimes\":\"O campo {_field_} deve ser um tipo de ficheiro válido\",\"min\":\"O campo {_field_} deve conter pelo menos {length} caracteres\",\"min_value\":\"O campo {_field_} precisa ser {min} ou maior\",\"numeric\":\"O campo {_field_} deve conter apenas números\",\"regex\":\"O campo {_field_} possui um formato inválido\",\"required\":\"O campo {_field_} é obrigatório\",\"required_if\":\"O campo {_field_} é obrigatório\",\"size\":\"O campo {_field_} deve ser menor que {size}KB\",\"double\":\"O campo {_field_} deve conter um numero decimal válido\"}}");
|
|
1655
1695
|
|
|
1696
|
+
/***/ }),
|
|
1697
|
+
|
|
1698
|
+
/***/ "34e1":
|
|
1699
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1700
|
+
|
|
1701
|
+
"use strict";
|
|
1702
|
+
|
|
1703
|
+
var call = __webpack_require__("c65b");
|
|
1704
|
+
var anObject = __webpack_require__("825a");
|
|
1705
|
+
var getIteratorDirect = __webpack_require__("46c4");
|
|
1706
|
+
var getIteratorMethod = __webpack_require__("35a1");
|
|
1707
|
+
|
|
1708
|
+
module.exports = function (obj, stringHandling) {
|
|
1709
|
+
if (!stringHandling || typeof obj !== 'string') anObject(obj);
|
|
1710
|
+
var method = getIteratorMethod(obj);
|
|
1711
|
+
return getIteratorDirect(anObject(method !== undefined ? call(method, obj) : obj));
|
|
1712
|
+
};
|
|
1713
|
+
|
|
1714
|
+
|
|
1656
1715
|
/***/ }),
|
|
1657
1716
|
|
|
1658
1717
|
/***/ "3511":
|
|
@@ -1776,6 +1835,28 @@ exports.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties :
|
|
|
1776
1835
|
};
|
|
1777
1836
|
|
|
1778
1837
|
|
|
1838
|
+
/***/ }),
|
|
1839
|
+
|
|
1840
|
+
/***/ "384f":
|
|
1841
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1842
|
+
|
|
1843
|
+
"use strict";
|
|
1844
|
+
|
|
1845
|
+
var uncurryThis = __webpack_require__("e330");
|
|
1846
|
+
var iterateSimple = __webpack_require__("5388");
|
|
1847
|
+
var SetHelpers = __webpack_require__("cb27");
|
|
1848
|
+
|
|
1849
|
+
var Set = SetHelpers.Set;
|
|
1850
|
+
var SetPrototype = SetHelpers.proto;
|
|
1851
|
+
var forEach = uncurryThis(SetPrototype.forEach);
|
|
1852
|
+
var keys = uncurryThis(SetPrototype.keys);
|
|
1853
|
+
var next = keys(new Set()).next;
|
|
1854
|
+
|
|
1855
|
+
module.exports = function (set, fn, interruptible) {
|
|
1856
|
+
return interruptible ? iterateSimple({ iterator: keys(set), next: next }, fn) : forEach(set, fn);
|
|
1857
|
+
};
|
|
1858
|
+
|
|
1859
|
+
|
|
1779
1860
|
/***/ }),
|
|
1780
1861
|
|
|
1781
1862
|
/***/ "38a9":
|
|
@@ -1859,6 +1940,33 @@ module.exports = (
|
|
|
1859
1940
|
);
|
|
1860
1941
|
|
|
1861
1942
|
|
|
1943
|
+
/***/ }),
|
|
1944
|
+
|
|
1945
|
+
/***/ "395e":
|
|
1946
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1947
|
+
|
|
1948
|
+
"use strict";
|
|
1949
|
+
|
|
1950
|
+
var aSet = __webpack_require__("dc19");
|
|
1951
|
+
var has = __webpack_require__("cb27").has;
|
|
1952
|
+
var size = __webpack_require__("8e16");
|
|
1953
|
+
var getSetRecord = __webpack_require__("7f65");
|
|
1954
|
+
var iterateSimple = __webpack_require__("5388");
|
|
1955
|
+
var iteratorClose = __webpack_require__("2a62");
|
|
1956
|
+
|
|
1957
|
+
// `Set.prototype.isSupersetOf` method
|
|
1958
|
+
// https://tc39.github.io/proposal-set-methods/#Set.prototype.isSupersetOf
|
|
1959
|
+
module.exports = function isSupersetOf(other) {
|
|
1960
|
+
var O = aSet(this);
|
|
1961
|
+
var otherRec = getSetRecord(other);
|
|
1962
|
+
if (size(O) < otherRec.size) return false;
|
|
1963
|
+
var iterator = otherRec.getIterator();
|
|
1964
|
+
return iterateSimple(iterator, function (e) {
|
|
1965
|
+
if (!has(O, e)) return iteratorClose(iterator, 'normal', false);
|
|
1966
|
+
}) !== false;
|
|
1967
|
+
};
|
|
1968
|
+
|
|
1969
|
+
|
|
1862
1970
|
/***/ }),
|
|
1863
1971
|
|
|
1864
1972
|
/***/ "3a34":
|
|
@@ -23818,6 +23926,26 @@ module.exports = function dispatchRequest(config) {
|
|
|
23818
23926
|
|
|
23819
23927
|
module.exports = JSON.parse("{\"code\":\"ne\",\"messages\":{\"alpha\":\"{_field_} फिल्डले वर्णमाला अक्षरहरू मात्र समावेश गर्न सक्छ।\",\"alpha_dash\":\"{_field_} फील्डलमा वर्ण-संख्या अक्षरहरू साथै ड्याश र अन्डरसेर्सहरू समावेश गर्न सक्छ।\",\"alpha_num\":\"{_field_} फील्डमा वर्ण-संख्या अक्षरहरू मात्र समावेश गर्न सक्छ।\",\"alpha_spaces\":\"{_field_} फिल्डमा वर्णमाला अक्षरहरू र स्पेसहरूमा मात्र समावेश गर्न सक्छ।\",\"between\":\"{_field_} फिल्ड {min} र {max} को बीच हुनुपर्दछ।\",\"confirmed\":\"{_field_} पुष्टिकरण मेल खाँदैन।\",\"digits\":\"{_field_} फिल्ड संख्यात्मक हुनुपर्छ र {length} अङ्क समावेश गर्दछ।\",\"dimensions\":\"{_field_} फिल्ड {width} पिक्सेलमा {height} पिक्सेल हुनु पर्दछ।\",\"email\":\"{_field_} फिल्ड मान्य ईमेल हुनु पर्छ।\",\"excluded\":\"{_field_} फिल्ड मान्य मान हुनुपर्छ।\",\"ext\":\"{_field_} फिल्ड मान्य फाइल हुनु पर्छ।\",\"image\":\"{_field_} फिल्ड मान्य फोटो हुनु पर्छ।\",\"oneOf\":\"{_field_} फिल्ड मान्य परिमाण हुनु पर्छ।\",\"integer\":\"{_field_} फिल्ड मान्य पूर्णांक हुनु पर्छ।\",\"length\":\"{_field_} लम्बाई {length} हुनुपर्दछ।\",\"max\":\"{_field_} फिल्ड {length} अक्षरहरू भन्दा ठूलो हुन सक्छ।\",\"max_value\":\"{_field_} फिल्ड {max} वा कम हुनुपर्दछ।\",\"mimes\":\"{_field_} फिल्ड मान्य फाइल प्रकार हुनु पर्दछ।\",\"min\":\"{_field_} फिल्ड कम्तिमा {length} अक्षरहरू हुनुपर्दछ।\",\"min_value\":\"{_field_} इमेल फिल्ड {min} वा बढी हुनुपर्दछ।\",\"numeric\":\"{_field_} फिल्डले संख्यात्मक अक्षरहरूमा मात्र समावेश गर्न सक्छ।\",\"regex\":\"{_field_} फिल्ड ढाँचा अमान्य छ।\",\"required\":\"{_field_} फिल्ड आवश्यक छ।\",\"required_if\":\"{_field_} फिल्ड आवश्यक छ।\",\"size\":\"{_field_} परिणाम {size}KB भन्दा कम हुनुपर्दछ।\",\"double\":\"{_field_} क्षेत्र वैध दशमलव हुनुपर्दछ\"}}");
|
|
23820
23928
|
|
|
23929
|
+
/***/ }),
|
|
23930
|
+
|
|
23931
|
+
/***/ "5388":
|
|
23932
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
23933
|
+
|
|
23934
|
+
"use strict";
|
|
23935
|
+
|
|
23936
|
+
var call = __webpack_require__("c65b");
|
|
23937
|
+
|
|
23938
|
+
module.exports = function (record, fn, ITERATOR_INSTEAD_OF_RECORD) {
|
|
23939
|
+
var iterator = ITERATOR_INSTEAD_OF_RECORD ? record : record.iterator;
|
|
23940
|
+
var next = record.next;
|
|
23941
|
+
var step, result;
|
|
23942
|
+
while (!(step = call(next, iterator)).done) {
|
|
23943
|
+
result = fn(step.value);
|
|
23944
|
+
if (result !== undefined) return result;
|
|
23945
|
+
}
|
|
23946
|
+
};
|
|
23947
|
+
|
|
23948
|
+
|
|
23821
23949
|
/***/ }),
|
|
23822
23950
|
|
|
23823
23951
|
/***/ "55f0":
|
|
@@ -24172,6 +24300,30 @@ function _unsupportedIterableToArray(r, a) {
|
|
|
24172
24300
|
}
|
|
24173
24301
|
module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
24174
24302
|
|
|
24303
|
+
/***/ }),
|
|
24304
|
+
|
|
24305
|
+
/***/ "68df":
|
|
24306
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
24307
|
+
|
|
24308
|
+
"use strict";
|
|
24309
|
+
|
|
24310
|
+
var aSet = __webpack_require__("dc19");
|
|
24311
|
+
var size = __webpack_require__("8e16");
|
|
24312
|
+
var iterate = __webpack_require__("384f");
|
|
24313
|
+
var getSetRecord = __webpack_require__("7f65");
|
|
24314
|
+
|
|
24315
|
+
// `Set.prototype.isSubsetOf` method
|
|
24316
|
+
// https://tc39.github.io/proposal-set-methods/#Set.prototype.isSubsetOf
|
|
24317
|
+
module.exports = function isSubsetOf(other) {
|
|
24318
|
+
var O = aSet(this);
|
|
24319
|
+
var otherRec = getSetRecord(other);
|
|
24320
|
+
if (size(O) > otherRec.size) return false;
|
|
24321
|
+
return iterate(O, function (e) {
|
|
24322
|
+
if (!otherRec.includes(e)) return false;
|
|
24323
|
+
}, true) !== false;
|
|
24324
|
+
};
|
|
24325
|
+
|
|
24326
|
+
|
|
24175
24327
|
/***/ }),
|
|
24176
24328
|
|
|
24177
24329
|
/***/ "6964":
|
|
@@ -24384,6 +24536,24 @@ module.exports = function (object, key, method) {
|
|
|
24384
24536
|
};
|
|
24385
24537
|
|
|
24386
24538
|
|
|
24539
|
+
/***/ }),
|
|
24540
|
+
|
|
24541
|
+
/***/ "72c3":
|
|
24542
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
24543
|
+
|
|
24544
|
+
"use strict";
|
|
24545
|
+
|
|
24546
|
+
var $ = __webpack_require__("23e7");
|
|
24547
|
+
var union = __webpack_require__("e9bc");
|
|
24548
|
+
var setMethodAcceptSetLike = __webpack_require__("dad2");
|
|
24549
|
+
|
|
24550
|
+
// `Set.prototype.union` method
|
|
24551
|
+
// https://tc39.es/ecma262/#sec-set.prototype.union
|
|
24552
|
+
$({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike('union') }, {
|
|
24553
|
+
union: union
|
|
24554
|
+
});
|
|
24555
|
+
|
|
24556
|
+
|
|
24387
24557
|
/***/ }),
|
|
24388
24558
|
|
|
24389
24559
|
/***/ "72f0":
|
|
@@ -24541,6 +24711,85 @@ AxiosError.from = function(error, code, config, request, response, customProps)
|
|
|
24541
24711
|
module.exports = AxiosError;
|
|
24542
24712
|
|
|
24543
24713
|
|
|
24714
|
+
/***/ }),
|
|
24715
|
+
|
|
24716
|
+
/***/ "796d":
|
|
24717
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
24718
|
+
|
|
24719
|
+
"use strict";
|
|
24720
|
+
|
|
24721
|
+
var $ = __webpack_require__("23e7");
|
|
24722
|
+
var call = __webpack_require__("c65b");
|
|
24723
|
+
var aCallable = __webpack_require__("59ed");
|
|
24724
|
+
var anObject = __webpack_require__("825a");
|
|
24725
|
+
var getIteratorDirect = __webpack_require__("46c4");
|
|
24726
|
+
var getIteratorFlattenable = __webpack_require__("34e1");
|
|
24727
|
+
var createIteratorProxy = __webpack_require__("c5cc");
|
|
24728
|
+
var iteratorClose = __webpack_require__("2a62");
|
|
24729
|
+
var IS_PURE = __webpack_require__("c430");
|
|
24730
|
+
|
|
24731
|
+
var IteratorProxy = createIteratorProxy(function () {
|
|
24732
|
+
var iterator = this.iterator;
|
|
24733
|
+
var mapper = this.mapper;
|
|
24734
|
+
var result, inner;
|
|
24735
|
+
|
|
24736
|
+
while (true) {
|
|
24737
|
+
if (inner = this.inner) try {
|
|
24738
|
+
result = anObject(call(inner.next, inner.iterator));
|
|
24739
|
+
if (!result.done) return result.value;
|
|
24740
|
+
this.inner = null;
|
|
24741
|
+
} catch (error) { iteratorClose(iterator, 'throw', error); }
|
|
24742
|
+
|
|
24743
|
+
result = anObject(call(this.next, iterator));
|
|
24744
|
+
|
|
24745
|
+
if (this.done = !!result.done) return;
|
|
24746
|
+
|
|
24747
|
+
try {
|
|
24748
|
+
this.inner = getIteratorFlattenable(mapper(result.value, this.counter++), false);
|
|
24749
|
+
} catch (error) { iteratorClose(iterator, 'throw', error); }
|
|
24750
|
+
}
|
|
24751
|
+
});
|
|
24752
|
+
|
|
24753
|
+
// `Iterator.prototype.flatMap` method
|
|
24754
|
+
// https://tc39.es/ecma262/#sec-iterator.prototype.flatmap
|
|
24755
|
+
$({ target: 'Iterator', proto: true, real: true, forced: IS_PURE }, {
|
|
24756
|
+
flatMap: function flatMap(mapper) {
|
|
24757
|
+
anObject(this);
|
|
24758
|
+
aCallable(mapper);
|
|
24759
|
+
return new IteratorProxy(getIteratorDirect(this), {
|
|
24760
|
+
mapper: mapper,
|
|
24761
|
+
inner: null
|
|
24762
|
+
});
|
|
24763
|
+
}
|
|
24764
|
+
});
|
|
24765
|
+
|
|
24766
|
+
|
|
24767
|
+
/***/ }),
|
|
24768
|
+
|
|
24769
|
+
/***/ "79a4":
|
|
24770
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
24771
|
+
|
|
24772
|
+
"use strict";
|
|
24773
|
+
|
|
24774
|
+
var $ = __webpack_require__("23e7");
|
|
24775
|
+
var fails = __webpack_require__("d039");
|
|
24776
|
+
var intersection = __webpack_require__("953b");
|
|
24777
|
+
var setMethodAcceptSetLike = __webpack_require__("dad2");
|
|
24778
|
+
|
|
24779
|
+
var INCORRECT = !setMethodAcceptSetLike('intersection', function (result) {
|
|
24780
|
+
return result.size === 2 && result.has(1) && result.has(2);
|
|
24781
|
+
}) || fails(function () {
|
|
24782
|
+
// eslint-disable-next-line es/no-array-from, es/no-set, es/no-set-prototype-intersection -- testing
|
|
24783
|
+
return String(Array.from(new Set([1, 2, 3]).intersection(new Set([3, 2])))) !== '3,2';
|
|
24784
|
+
});
|
|
24785
|
+
|
|
24786
|
+
// `Set.prototype.intersection` method
|
|
24787
|
+
// https://tc39.es/ecma262/#sec-set.prototype.intersection
|
|
24788
|
+
$({ target: 'Set', proto: true, real: true, forced: INCORRECT }, {
|
|
24789
|
+
intersection: intersection
|
|
24790
|
+
});
|
|
24791
|
+
|
|
24792
|
+
|
|
24544
24793
|
/***/ }),
|
|
24545
24794
|
|
|
24546
24795
|
/***/ "7a70":
|
|
@@ -24748,6 +24997,54 @@ $({ target: 'Iterator', proto: true, real: true }, {
|
|
|
24748
24997
|
});
|
|
24749
24998
|
|
|
24750
24999
|
|
|
25000
|
+
/***/ }),
|
|
25001
|
+
|
|
25002
|
+
/***/ "7f65":
|
|
25003
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
25004
|
+
|
|
25005
|
+
"use strict";
|
|
25006
|
+
|
|
25007
|
+
var aCallable = __webpack_require__("59ed");
|
|
25008
|
+
var anObject = __webpack_require__("825a");
|
|
25009
|
+
var call = __webpack_require__("c65b");
|
|
25010
|
+
var toIntegerOrInfinity = __webpack_require__("5926");
|
|
25011
|
+
var getIteratorDirect = __webpack_require__("46c4");
|
|
25012
|
+
|
|
25013
|
+
var INVALID_SIZE = 'Invalid size';
|
|
25014
|
+
var $RangeError = RangeError;
|
|
25015
|
+
var $TypeError = TypeError;
|
|
25016
|
+
var max = Math.max;
|
|
25017
|
+
|
|
25018
|
+
var SetRecord = function (set, intSize) {
|
|
25019
|
+
this.set = set;
|
|
25020
|
+
this.size = max(intSize, 0);
|
|
25021
|
+
this.has = aCallable(set.has);
|
|
25022
|
+
this.keys = aCallable(set.keys);
|
|
25023
|
+
};
|
|
25024
|
+
|
|
25025
|
+
SetRecord.prototype = {
|
|
25026
|
+
getIterator: function () {
|
|
25027
|
+
return getIteratorDirect(anObject(call(this.keys, this.set)));
|
|
25028
|
+
},
|
|
25029
|
+
includes: function (it) {
|
|
25030
|
+
return call(this.has, this.set, it);
|
|
25031
|
+
}
|
|
25032
|
+
};
|
|
25033
|
+
|
|
25034
|
+
// `GetSetRecord` abstract operation
|
|
25035
|
+
// https://tc39.es/proposal-set-methods/#sec-getsetrecord
|
|
25036
|
+
module.exports = function (obj) {
|
|
25037
|
+
anObject(obj);
|
|
25038
|
+
var numSize = +obj.size;
|
|
25039
|
+
// NOTE: If size is undefined, then numSize will be NaN
|
|
25040
|
+
// eslint-disable-next-line no-self-compare -- NaN check
|
|
25041
|
+
if (numSize !== numSize) throw new $TypeError(INVALID_SIZE);
|
|
25042
|
+
var intSize = toIntegerOrInfinity(numSize);
|
|
25043
|
+
if (intSize < 0) throw new $RangeError(INVALID_SIZE);
|
|
25044
|
+
return new SetRecord(obj, intSize);
|
|
25045
|
+
};
|
|
25046
|
+
|
|
25047
|
+
|
|
24751
25048
|
/***/ }),
|
|
24752
25049
|
|
|
24753
25050
|
/***/ "825a":
|
|
@@ -24790,6 +25087,28 @@ module.exports = !fails(function () {
|
|
|
24790
25087
|
|
|
24791
25088
|
"use strict";
|
|
24792
25089
|
|
|
25090
|
+
var SetHelpers = __webpack_require__("cb27");
|
|
25091
|
+
var iterate = __webpack_require__("384f");
|
|
25092
|
+
|
|
25093
|
+
var Set = SetHelpers.Set;
|
|
25094
|
+
var add = SetHelpers.add;
|
|
25095
|
+
|
|
25096
|
+
module.exports = function (set) {
|
|
25097
|
+
var result = new Set();
|
|
25098
|
+
iterate(set, function (it) {
|
|
25099
|
+
add(result, it);
|
|
25100
|
+
});
|
|
25101
|
+
return result;
|
|
25102
|
+
};
|
|
25103
|
+
|
|
25104
|
+
|
|
25105
|
+
/***/ }),
|
|
25106
|
+
|
|
25107
|
+
/***/ "83b9e":
|
|
25108
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
25109
|
+
|
|
25110
|
+
"use strict";
|
|
25111
|
+
|
|
24793
25112
|
|
|
24794
25113
|
var isAbsoluteURL = __webpack_require__("d925");
|
|
24795
25114
|
var combineURLs = __webpack_require__("e683");
|
|
@@ -24973,6 +25292,46 @@ if (!isCallable(store.inspectSource)) {
|
|
|
24973
25292
|
module.exports = store.inspectSource;
|
|
24974
25293
|
|
|
24975
25294
|
|
|
25295
|
+
/***/ }),
|
|
25296
|
+
|
|
25297
|
+
/***/ "8958":
|
|
25298
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
25299
|
+
|
|
25300
|
+
"use strict";
|
|
25301
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SearchableSelect_vue_vue_type_style_index_0_id_688f213e_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("89e0");
|
|
25302
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SearchableSelect_vue_vue_type_style_index_0_id_688f213e_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SearchableSelect_vue_vue_type_style_index_0_id_688f213e_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__);
|
|
25303
|
+
/* unused harmony reexport * */
|
|
25304
|
+
|
|
25305
|
+
|
|
25306
|
+
/***/ }),
|
|
25307
|
+
|
|
25308
|
+
/***/ "89e0":
|
|
25309
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
25310
|
+
|
|
25311
|
+
// extracted by mini-css-extract-plugin
|
|
25312
|
+
|
|
25313
|
+
/***/ }),
|
|
25314
|
+
|
|
25315
|
+
/***/ "8b00":
|
|
25316
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
25317
|
+
|
|
25318
|
+
"use strict";
|
|
25319
|
+
|
|
25320
|
+
var $ = __webpack_require__("23e7");
|
|
25321
|
+
var isSubsetOf = __webpack_require__("68df");
|
|
25322
|
+
var setMethodAcceptSetLike = __webpack_require__("dad2");
|
|
25323
|
+
|
|
25324
|
+
var INCORRECT = !setMethodAcceptSetLike('isSubsetOf', function (result) {
|
|
25325
|
+
return result;
|
|
25326
|
+
});
|
|
25327
|
+
|
|
25328
|
+
// `Set.prototype.isSubsetOf` method
|
|
25329
|
+
// https://tc39.es/ecma262/#sec-set.prototype.issubsetof
|
|
25330
|
+
$({ target: 'Set', proto: true, real: true, forced: INCORRECT }, {
|
|
25331
|
+
isSubsetOf: isSubsetOf
|
|
25332
|
+
});
|
|
25333
|
+
|
|
25334
|
+
|
|
24976
25335
|
/***/ }),
|
|
24977
25336
|
|
|
24978
25337
|
/***/ "8bbf":
|
|
@@ -25140,6 +25499,21 @@ CancelToken.source = function source() {
|
|
|
25140
25499
|
module.exports = CancelToken;
|
|
25141
25500
|
|
|
25142
25501
|
|
|
25502
|
+
/***/ }),
|
|
25503
|
+
|
|
25504
|
+
/***/ "8e16":
|
|
25505
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
25506
|
+
|
|
25507
|
+
"use strict";
|
|
25508
|
+
|
|
25509
|
+
var uncurryThisAccessor = __webpack_require__("7282");
|
|
25510
|
+
var SetHelpers = __webpack_require__("cb27");
|
|
25511
|
+
|
|
25512
|
+
module.exports = uncurryThisAccessor(SetHelpers.proto, 'size', 'get') || function (set) {
|
|
25513
|
+
return set.size;
|
|
25514
|
+
};
|
|
25515
|
+
|
|
25516
|
+
|
|
25143
25517
|
/***/ }),
|
|
25144
25518
|
|
|
25145
25519
|
/***/ "8e5f":
|
|
@@ -25437,6 +25811,76 @@ function _defineProperty(e, r, t) {
|
|
|
25437
25811
|
}
|
|
25438
25812
|
module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
25439
25813
|
|
|
25814
|
+
/***/ }),
|
|
25815
|
+
|
|
25816
|
+
/***/ "953b":
|
|
25817
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
25818
|
+
|
|
25819
|
+
"use strict";
|
|
25820
|
+
|
|
25821
|
+
var aSet = __webpack_require__("dc19");
|
|
25822
|
+
var SetHelpers = __webpack_require__("cb27");
|
|
25823
|
+
var size = __webpack_require__("8e16");
|
|
25824
|
+
var getSetRecord = __webpack_require__("7f65");
|
|
25825
|
+
var iterateSet = __webpack_require__("384f");
|
|
25826
|
+
var iterateSimple = __webpack_require__("5388");
|
|
25827
|
+
|
|
25828
|
+
var Set = SetHelpers.Set;
|
|
25829
|
+
var add = SetHelpers.add;
|
|
25830
|
+
var has = SetHelpers.has;
|
|
25831
|
+
|
|
25832
|
+
// `Set.prototype.intersection` method
|
|
25833
|
+
// https://github.com/tc39/proposal-set-methods
|
|
25834
|
+
module.exports = function intersection(other) {
|
|
25835
|
+
var O = aSet(this);
|
|
25836
|
+
var otherRec = getSetRecord(other);
|
|
25837
|
+
var result = new Set();
|
|
25838
|
+
|
|
25839
|
+
if (size(O) > otherRec.size) {
|
|
25840
|
+
iterateSimple(otherRec.getIterator(), function (e) {
|
|
25841
|
+
if (has(O, e)) add(result, e);
|
|
25842
|
+
});
|
|
25843
|
+
} else {
|
|
25844
|
+
iterateSet(O, function (e) {
|
|
25845
|
+
if (otherRec.includes(e)) add(result, e);
|
|
25846
|
+
});
|
|
25847
|
+
}
|
|
25848
|
+
|
|
25849
|
+
return result;
|
|
25850
|
+
};
|
|
25851
|
+
|
|
25852
|
+
|
|
25853
|
+
/***/ }),
|
|
25854
|
+
|
|
25855
|
+
/***/ "9961":
|
|
25856
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
25857
|
+
|
|
25858
|
+
"use strict";
|
|
25859
|
+
|
|
25860
|
+
var aSet = __webpack_require__("dc19");
|
|
25861
|
+
var SetHelpers = __webpack_require__("cb27");
|
|
25862
|
+
var clone = __webpack_require__("83b9");
|
|
25863
|
+
var getSetRecord = __webpack_require__("7f65");
|
|
25864
|
+
var iterateSimple = __webpack_require__("5388");
|
|
25865
|
+
|
|
25866
|
+
var add = SetHelpers.add;
|
|
25867
|
+
var has = SetHelpers.has;
|
|
25868
|
+
var remove = SetHelpers.remove;
|
|
25869
|
+
|
|
25870
|
+
// `Set.prototype.symmetricDifference` method
|
|
25871
|
+
// https://github.com/tc39/proposal-set-methods
|
|
25872
|
+
module.exports = function symmetricDifference(other) {
|
|
25873
|
+
var O = aSet(this);
|
|
25874
|
+
var keysIter = getSetRecord(other).getIterator();
|
|
25875
|
+
var result = clone(O);
|
|
25876
|
+
iterateSimple(keysIter, function (e) {
|
|
25877
|
+
if (has(O, e)) remove(result, e);
|
|
25878
|
+
else add(result, e);
|
|
25879
|
+
});
|
|
25880
|
+
return result;
|
|
25881
|
+
};
|
|
25882
|
+
|
|
25883
|
+
|
|
25440
25884
|
/***/ }),
|
|
25441
25885
|
|
|
25442
25886
|
/***/ "9a1f":
|
|
@@ -25617,6 +26061,13 @@ module.exports = function (argument) {
|
|
|
25617
26061
|
|
|
25618
26062
|
/***/ }),
|
|
25619
26063
|
|
|
26064
|
+
/***/ "a354":
|
|
26065
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
26066
|
+
|
|
26067
|
+
// extracted by mini-css-extract-plugin
|
|
26068
|
+
|
|
26069
|
+
/***/ }),
|
|
26070
|
+
|
|
25620
26071
|
/***/ "a395":
|
|
25621
26072
|
/***/ (function(module, exports, __webpack_require__) {
|
|
25622
26073
|
|
|
@@ -25628,6 +26079,90 @@ function toPropertyKey(t) {
|
|
|
25628
26079
|
}
|
|
25629
26080
|
module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
25630
26081
|
|
|
26082
|
+
/***/ }),
|
|
26083
|
+
|
|
26084
|
+
/***/ "a4e7":
|
|
26085
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
26086
|
+
|
|
26087
|
+
"use strict";
|
|
26088
|
+
|
|
26089
|
+
var $ = __webpack_require__("23e7");
|
|
26090
|
+
var isSupersetOf = __webpack_require__("395e");
|
|
26091
|
+
var setMethodAcceptSetLike = __webpack_require__("dad2");
|
|
26092
|
+
|
|
26093
|
+
var INCORRECT = !setMethodAcceptSetLike('isSupersetOf', function (result) {
|
|
26094
|
+
return !result;
|
|
26095
|
+
});
|
|
26096
|
+
|
|
26097
|
+
// `Set.prototype.isSupersetOf` method
|
|
26098
|
+
// https://tc39.es/ecma262/#sec-set.prototype.issupersetof
|
|
26099
|
+
$({ target: 'Set', proto: true, real: true, forced: INCORRECT }, {
|
|
26100
|
+
isSupersetOf: isSupersetOf
|
|
26101
|
+
});
|
|
26102
|
+
|
|
26103
|
+
|
|
26104
|
+
/***/ }),
|
|
26105
|
+
|
|
26106
|
+
/***/ "a5f7":
|
|
26107
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
26108
|
+
|
|
26109
|
+
"use strict";
|
|
26110
|
+
|
|
26111
|
+
var aSet = __webpack_require__("dc19");
|
|
26112
|
+
var SetHelpers = __webpack_require__("cb27");
|
|
26113
|
+
var clone = __webpack_require__("83b9");
|
|
26114
|
+
var size = __webpack_require__("8e16");
|
|
26115
|
+
var getSetRecord = __webpack_require__("7f65");
|
|
26116
|
+
var iterateSet = __webpack_require__("384f");
|
|
26117
|
+
var iterateSimple = __webpack_require__("5388");
|
|
26118
|
+
|
|
26119
|
+
var has = SetHelpers.has;
|
|
26120
|
+
var remove = SetHelpers.remove;
|
|
26121
|
+
|
|
26122
|
+
// `Set.prototype.difference` method
|
|
26123
|
+
// https://github.com/tc39/proposal-set-methods
|
|
26124
|
+
module.exports = function difference(other) {
|
|
26125
|
+
var O = aSet(this);
|
|
26126
|
+
var otherRec = getSetRecord(other);
|
|
26127
|
+
var result = clone(O);
|
|
26128
|
+
if (size(O) <= otherRec.size) iterateSet(O, function (e) {
|
|
26129
|
+
if (otherRec.includes(e)) remove(result, e);
|
|
26130
|
+
});
|
|
26131
|
+
else iterateSimple(otherRec.getIterator(), function (e) {
|
|
26132
|
+
if (has(O, e)) remove(result, e);
|
|
26133
|
+
});
|
|
26134
|
+
return result;
|
|
26135
|
+
};
|
|
26136
|
+
|
|
26137
|
+
|
|
26138
|
+
/***/ }),
|
|
26139
|
+
|
|
26140
|
+
/***/ "a732":
|
|
26141
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
26142
|
+
|
|
26143
|
+
"use strict";
|
|
26144
|
+
|
|
26145
|
+
var $ = __webpack_require__("23e7");
|
|
26146
|
+
var iterate = __webpack_require__("2266");
|
|
26147
|
+
var aCallable = __webpack_require__("59ed");
|
|
26148
|
+
var anObject = __webpack_require__("825a");
|
|
26149
|
+
var getIteratorDirect = __webpack_require__("46c4");
|
|
26150
|
+
|
|
26151
|
+
// `Iterator.prototype.some` method
|
|
26152
|
+
// https://tc39.es/ecma262/#sec-iterator.prototype.some
|
|
26153
|
+
$({ target: 'Iterator', proto: true, real: true }, {
|
|
26154
|
+
some: function some(predicate) {
|
|
26155
|
+
anObject(this);
|
|
26156
|
+
aCallable(predicate);
|
|
26157
|
+
var record = getIteratorDirect(this);
|
|
26158
|
+
var counter = 0;
|
|
26159
|
+
return iterate(record, function (value, stop) {
|
|
26160
|
+
if (predicate(value, counter++)) return stop();
|
|
26161
|
+
}, { IS_RECORD: true, INTERRUPTED: true }).stopped;
|
|
26162
|
+
}
|
|
26163
|
+
});
|
|
26164
|
+
|
|
26165
|
+
|
|
25631
26166
|
/***/ }),
|
|
25632
26167
|
|
|
25633
26168
|
/***/ "ab36":
|
|
@@ -26049,6 +26584,36 @@ function toNumber(value) {
|
|
|
26049
26584
|
module.exports = toNumber;
|
|
26050
26585
|
|
|
26051
26586
|
|
|
26587
|
+
/***/ }),
|
|
26588
|
+
|
|
26589
|
+
/***/ "b4bc":
|
|
26590
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
26591
|
+
|
|
26592
|
+
"use strict";
|
|
26593
|
+
|
|
26594
|
+
var aSet = __webpack_require__("dc19");
|
|
26595
|
+
var has = __webpack_require__("cb27").has;
|
|
26596
|
+
var size = __webpack_require__("8e16");
|
|
26597
|
+
var getSetRecord = __webpack_require__("7f65");
|
|
26598
|
+
var iterateSet = __webpack_require__("384f");
|
|
26599
|
+
var iterateSimple = __webpack_require__("5388");
|
|
26600
|
+
var iteratorClose = __webpack_require__("2a62");
|
|
26601
|
+
|
|
26602
|
+
// `Set.prototype.isDisjointFrom` method
|
|
26603
|
+
// https://tc39.github.io/proposal-set-methods/#Set.prototype.isDisjointFrom
|
|
26604
|
+
module.exports = function isDisjointFrom(other) {
|
|
26605
|
+
var O = aSet(this);
|
|
26606
|
+
var otherRec = getSetRecord(other);
|
|
26607
|
+
if (size(O) <= otherRec.size) return iterateSet(O, function (e) {
|
|
26608
|
+
if (otherRec.includes(e)) return false;
|
|
26609
|
+
}, true) !== false;
|
|
26610
|
+
var iterator = otherRec.getIterator();
|
|
26611
|
+
return iterateSimple(iterator, function (e) {
|
|
26612
|
+
if (has(O, e)) return iteratorClose(iterator, 'normal', false);
|
|
26613
|
+
}) !== false;
|
|
26614
|
+
};
|
|
26615
|
+
|
|
26616
|
+
|
|
26052
26617
|
/***/ }),
|
|
26053
26618
|
|
|
26054
26619
|
/***/ "b50d":
|
|
@@ -26061,7 +26626,7 @@ var utils = __webpack_require__("c532");
|
|
|
26061
26626
|
var settle = __webpack_require__("467f");
|
|
26062
26627
|
var cookies = __webpack_require__("7aac");
|
|
26063
26628
|
var buildURL = __webpack_require__("30b5");
|
|
26064
|
-
var buildFullPath = __webpack_require__("
|
|
26629
|
+
var buildFullPath = __webpack_require__("83b9e");
|
|
26065
26630
|
var parseHeaders = __webpack_require__("c345");
|
|
26066
26631
|
var isURLSameOrigin = __webpack_require__("3934");
|
|
26067
26632
|
var transitionalDefaults = __webpack_require__("cafa");
|
|
@@ -29140,6 +29705,28 @@ function _arrayWithHoles(r) {
|
|
|
29140
29705
|
}
|
|
29141
29706
|
module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
29142
29707
|
|
|
29708
|
+
/***/ }),
|
|
29709
|
+
|
|
29710
|
+
/***/ "c1a1":
|
|
29711
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
29712
|
+
|
|
29713
|
+
"use strict";
|
|
29714
|
+
|
|
29715
|
+
var $ = __webpack_require__("23e7");
|
|
29716
|
+
var isDisjointFrom = __webpack_require__("b4bc");
|
|
29717
|
+
var setMethodAcceptSetLike = __webpack_require__("dad2");
|
|
29718
|
+
|
|
29719
|
+
var INCORRECT = !setMethodAcceptSetLike('isDisjointFrom', function (result) {
|
|
29720
|
+
return !result;
|
|
29721
|
+
});
|
|
29722
|
+
|
|
29723
|
+
// `Set.prototype.isDisjointFrom` method
|
|
29724
|
+
// https://tc39.es/ecma262/#sec-set.prototype.isdisjointfrom
|
|
29725
|
+
$({ target: 'Set', proto: true, real: true, forced: INCORRECT }, {
|
|
29726
|
+
isDisjointFrom: isDisjointFrom
|
|
29727
|
+
});
|
|
29728
|
+
|
|
29729
|
+
|
|
29143
29730
|
/***/ }),
|
|
29144
29731
|
|
|
29145
29732
|
/***/ "c240":
|
|
@@ -33879,6 +34466,28 @@ module.exports = {
|
|
|
33879
34466
|
};
|
|
33880
34467
|
|
|
33881
34468
|
|
|
34469
|
+
/***/ }),
|
|
34470
|
+
|
|
34471
|
+
/***/ "cb27":
|
|
34472
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
34473
|
+
|
|
34474
|
+
"use strict";
|
|
34475
|
+
|
|
34476
|
+
var uncurryThis = __webpack_require__("e330");
|
|
34477
|
+
|
|
34478
|
+
// eslint-disable-next-line es/no-set -- safe
|
|
34479
|
+
var SetPrototype = Set.prototype;
|
|
34480
|
+
|
|
34481
|
+
module.exports = {
|
|
34482
|
+
// eslint-disable-next-line es/no-set -- safe
|
|
34483
|
+
Set: Set,
|
|
34484
|
+
add: uncurryThis(SetPrototype.add),
|
|
34485
|
+
has: uncurryThis(SetPrototype.has),
|
|
34486
|
+
remove: uncurryThis(SetPrototype['delete']),
|
|
34487
|
+
proto: SetPrototype
|
|
34488
|
+
};
|
|
34489
|
+
|
|
34490
|
+
|
|
33882
34491
|
/***/ }),
|
|
33883
34492
|
|
|
33884
34493
|
/***/ "cb2d":
|
|
@@ -34235,6 +34844,34 @@ module.exports = JSON.parse("{\"code\":\"he\",\"messages\":{\"alpha\":\"השדה
|
|
|
34235
34844
|
/* unused harmony reexport * */
|
|
34236
34845
|
|
|
34237
34846
|
|
|
34847
|
+
/***/ }),
|
|
34848
|
+
|
|
34849
|
+
/***/ "d866":
|
|
34850
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
34851
|
+
|
|
34852
|
+
"use strict";
|
|
34853
|
+
|
|
34854
|
+
var $ = __webpack_require__("23e7");
|
|
34855
|
+
var iterate = __webpack_require__("2266");
|
|
34856
|
+
var aCallable = __webpack_require__("59ed");
|
|
34857
|
+
var anObject = __webpack_require__("825a");
|
|
34858
|
+
var getIteratorDirect = __webpack_require__("46c4");
|
|
34859
|
+
|
|
34860
|
+
// `Iterator.prototype.every` method
|
|
34861
|
+
// https://tc39.es/ecma262/#sec-iterator.prototype.every
|
|
34862
|
+
$({ target: 'Iterator', proto: true, real: true }, {
|
|
34863
|
+
every: function every(predicate) {
|
|
34864
|
+
anObject(this);
|
|
34865
|
+
aCallable(predicate);
|
|
34866
|
+
var record = getIteratorDirect(this);
|
|
34867
|
+
var counter = 0;
|
|
34868
|
+
return !iterate(record, function (value, stop) {
|
|
34869
|
+
if (!predicate(value, counter++)) return stop();
|
|
34870
|
+
}, { IS_RECORD: true, INTERRUPTED: true }).stopped;
|
|
34871
|
+
}
|
|
34872
|
+
});
|
|
34873
|
+
|
|
34874
|
+
|
|
34238
34875
|
/***/ }),
|
|
34239
34876
|
|
|
34240
34877
|
/***/ "d925":
|
|
@@ -34345,6 +34982,88 @@ exportWebAssemblyErrorCauseWrapper('RuntimeError', function (init) {
|
|
|
34345
34982
|
});
|
|
34346
34983
|
|
|
34347
34984
|
|
|
34985
|
+
/***/ }),
|
|
34986
|
+
|
|
34987
|
+
/***/ "dad2":
|
|
34988
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
34989
|
+
|
|
34990
|
+
"use strict";
|
|
34991
|
+
|
|
34992
|
+
var getBuiltIn = __webpack_require__("d066");
|
|
34993
|
+
|
|
34994
|
+
var createSetLike = function (size) {
|
|
34995
|
+
return {
|
|
34996
|
+
size: size,
|
|
34997
|
+
has: function () {
|
|
34998
|
+
return false;
|
|
34999
|
+
},
|
|
35000
|
+
keys: function () {
|
|
35001
|
+
return {
|
|
35002
|
+
next: function () {
|
|
35003
|
+
return { done: true };
|
|
35004
|
+
}
|
|
35005
|
+
};
|
|
35006
|
+
}
|
|
35007
|
+
};
|
|
35008
|
+
};
|
|
35009
|
+
|
|
35010
|
+
var createSetLikeWithInfinitySize = function (size) {
|
|
35011
|
+
return {
|
|
35012
|
+
size: size,
|
|
35013
|
+
has: function () {
|
|
35014
|
+
return true;
|
|
35015
|
+
},
|
|
35016
|
+
keys: function () {
|
|
35017
|
+
throw new Error('e');
|
|
35018
|
+
}
|
|
35019
|
+
};
|
|
35020
|
+
};
|
|
35021
|
+
|
|
35022
|
+
module.exports = function (name, callback) {
|
|
35023
|
+
var Set = getBuiltIn('Set');
|
|
35024
|
+
try {
|
|
35025
|
+
new Set()[name](createSetLike(0));
|
|
35026
|
+
try {
|
|
35027
|
+
// late spec change, early WebKit ~ Safari 17.0 beta implementation does not pass it
|
|
35028
|
+
// https://github.com/tc39/proposal-set-methods/pull/88
|
|
35029
|
+
new Set()[name](createSetLike(-1));
|
|
35030
|
+
return false;
|
|
35031
|
+
} catch (error2) {
|
|
35032
|
+
if (!callback) return true;
|
|
35033
|
+
// early V8 implementation bug
|
|
35034
|
+
// https://issues.chromium.org/issues/351332634
|
|
35035
|
+
try {
|
|
35036
|
+
new Set()[name](createSetLikeWithInfinitySize(-Infinity));
|
|
35037
|
+
return false;
|
|
35038
|
+
} catch (error) {
|
|
35039
|
+
var set = new Set();
|
|
35040
|
+
set.add(1);
|
|
35041
|
+
set.add(2);
|
|
35042
|
+
return callback(set[name](createSetLikeWithInfinitySize(Infinity)));
|
|
35043
|
+
}
|
|
35044
|
+
}
|
|
35045
|
+
} catch (error) {
|
|
35046
|
+
return false;
|
|
35047
|
+
}
|
|
35048
|
+
};
|
|
35049
|
+
|
|
35050
|
+
|
|
35051
|
+
/***/ }),
|
|
35052
|
+
|
|
35053
|
+
/***/ "dc19":
|
|
35054
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
35055
|
+
|
|
35056
|
+
"use strict";
|
|
35057
|
+
|
|
35058
|
+
var has = __webpack_require__("cb27").has;
|
|
35059
|
+
|
|
35060
|
+
// Perform ? RequireInternalSlot(M, [[SetData]])
|
|
35061
|
+
module.exports = function (it) {
|
|
35062
|
+
has(it);
|
|
35063
|
+
return it;
|
|
35064
|
+
};
|
|
35065
|
+
|
|
35066
|
+
|
|
34348
35067
|
/***/ }),
|
|
34349
35068
|
|
|
34350
35069
|
/***/ "dc20":
|
|
@@ -35197,6 +35916,32 @@ module.exports = function (it) {
|
|
|
35197
35916
|
};
|
|
35198
35917
|
|
|
35199
35918
|
|
|
35919
|
+
/***/ }),
|
|
35920
|
+
|
|
35921
|
+
/***/ "e9bc":
|
|
35922
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
35923
|
+
|
|
35924
|
+
"use strict";
|
|
35925
|
+
|
|
35926
|
+
var aSet = __webpack_require__("dc19");
|
|
35927
|
+
var add = __webpack_require__("cb27").add;
|
|
35928
|
+
var clone = __webpack_require__("83b9");
|
|
35929
|
+
var getSetRecord = __webpack_require__("7f65");
|
|
35930
|
+
var iterateSimple = __webpack_require__("5388");
|
|
35931
|
+
|
|
35932
|
+
// `Set.prototype.union` method
|
|
35933
|
+
// https://github.com/tc39/proposal-set-methods
|
|
35934
|
+
module.exports = function union(other) {
|
|
35935
|
+
var O = aSet(this);
|
|
35936
|
+
var keysIter = getSetRecord(other).getIterator();
|
|
35937
|
+
var result = clone(O);
|
|
35938
|
+
iterateSimple(keysIter, function (it) {
|
|
35939
|
+
add(result, it);
|
|
35940
|
+
});
|
|
35941
|
+
return result;
|
|
35942
|
+
};
|
|
35943
|
+
|
|
35944
|
+
|
|
35200
35945
|
/***/ }),
|
|
35201
35946
|
|
|
35202
35947
|
/***/ "e9cd":
|
|
@@ -35364,6 +36109,34 @@ module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
|
|
|
35364
36109
|
};
|
|
35365
36110
|
|
|
35366
36111
|
|
|
36112
|
+
/***/ }),
|
|
36113
|
+
|
|
36114
|
+
/***/ "f665":
|
|
36115
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
36116
|
+
|
|
36117
|
+
"use strict";
|
|
36118
|
+
|
|
36119
|
+
var $ = __webpack_require__("23e7");
|
|
36120
|
+
var iterate = __webpack_require__("2266");
|
|
36121
|
+
var aCallable = __webpack_require__("59ed");
|
|
36122
|
+
var anObject = __webpack_require__("825a");
|
|
36123
|
+
var getIteratorDirect = __webpack_require__("46c4");
|
|
36124
|
+
|
|
36125
|
+
// `Iterator.prototype.find` method
|
|
36126
|
+
// https://tc39.es/ecma262/#sec-iterator.prototype.find
|
|
36127
|
+
$({ target: 'Iterator', proto: true, real: true }, {
|
|
36128
|
+
find: function find(predicate) {
|
|
36129
|
+
anObject(this);
|
|
36130
|
+
aCallable(predicate);
|
|
36131
|
+
var record = getIteratorDirect(this);
|
|
36132
|
+
var counter = 0;
|
|
36133
|
+
return iterate(record, function (value, stop) {
|
|
36134
|
+
if (predicate(value, counter++)) return stop(value);
|
|
36135
|
+
}, { IS_RECORD: true, INTERRUPTED: true }).result;
|
|
36136
|
+
}
|
|
36137
|
+
});
|
|
36138
|
+
|
|
36139
|
+
|
|
35367
36140
|
/***/ }),
|
|
35368
36141
|
|
|
35369
36142
|
/***/ "f694":
|
|
@@ -35450,6 +36223,17 @@ module.exports = function (key) {
|
|
|
35450
36223
|
};
|
|
35451
36224
|
|
|
35452
36225
|
|
|
36226
|
+
/***/ }),
|
|
36227
|
+
|
|
36228
|
+
/***/ "f9c7":
|
|
36229
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
36230
|
+
|
|
36231
|
+
"use strict";
|
|
36232
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Autocomplete_vue_vue_type_style_index_0_id_723cadb2_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("a354");
|
|
36233
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Autocomplete_vue_vue_type_style_index_0_id_723cadb2_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Autocomplete_vue_vue_type_style_index_0_id_723cadb2_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__);
|
|
36234
|
+
/* unused harmony reexport * */
|
|
36235
|
+
|
|
36236
|
+
|
|
35453
36237
|
/***/ }),
|
|
35454
36238
|
|
|
35455
36239
|
/***/ "fae6":
|
|
@@ -35532,7 +36316,7 @@ if (typeof window !== 'undefined') {
|
|
|
35532
36316
|
// Indicate to webpack that this file can be concatenated
|
|
35533
36317
|
/* harmony default export */ var setPublicPath = (null);
|
|
35534
36318
|
|
|
35535
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4289e630-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/DynamicForm.vue?vue&type=template&id=
|
|
36319
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4289e630-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/DynamicForm.vue?vue&type=template&id=228fd06e
|
|
35536
36320
|
var render = function render() {
|
|
35537
36321
|
var _vm = this,
|
|
35538
36322
|
_c = _vm._self._c;
|
|
@@ -35677,7 +36461,7 @@ var render = function render() {
|
|
|
35677
36461
|
})], 2) : _vm._e(), _vm.mandatorytext != false ? _c('div', {
|
|
35678
36462
|
staticClass: "col-lg-6 col-md-6"
|
|
35679
36463
|
}, [_c('div', {
|
|
35680
|
-
staticClass: "py-2"
|
|
36464
|
+
staticClass: "py-2 mandatory"
|
|
35681
36465
|
}, [_vm._v(_vm._s(_vm.mandatorytext))])]) : _vm._e()])]) : _vm._e()])];
|
|
35682
36466
|
}
|
|
35683
36467
|
}])
|
|
@@ -35685,7 +36469,7 @@ var render = function render() {
|
|
|
35685
36469
|
};
|
|
35686
36470
|
var staticRenderFns = [];
|
|
35687
36471
|
|
|
35688
|
-
// CONCATENATED MODULE: ./src/components/DynamicForm.vue?vue&type=template&id=
|
|
36472
|
+
// CONCATENATED MODULE: ./src/components/DynamicForm.vue?vue&type=template&id=228fd06e
|
|
35689
36473
|
|
|
35690
36474
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.push.js
|
|
35691
36475
|
var es_array_push = __webpack_require__("14d9");
|
|
@@ -42129,7 +42913,2444 @@ var SlotField_component = normalizeComponent(
|
|
|
42129
42913
|
)
|
|
42130
42914
|
|
|
42131
42915
|
/* harmony default export */ var SlotField = (SlotField_component.exports);
|
|
42132
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/
|
|
42916
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4289e630-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/SearchableSelectField.vue?vue&type=template&id=b5b1bf16
|
|
42917
|
+
var SearchableSelectFieldvue_type_template_id_b5b1bf16_render = function render() {
|
|
42918
|
+
var _vm = this,
|
|
42919
|
+
_c = _vm._self._c;
|
|
42920
|
+
return _c('Field', {
|
|
42921
|
+
staticClass: "w-100",
|
|
42922
|
+
attrs: {
|
|
42923
|
+
"name": _vm.GetDisplayLabel(_vm.fieldInfo),
|
|
42924
|
+
"rules": _vm.fieldInfo.validationRules
|
|
42925
|
+
},
|
|
42926
|
+
scopedSlots: _vm._u([{
|
|
42927
|
+
key: "default",
|
|
42928
|
+
fn: function ({
|
|
42929
|
+
errors
|
|
42930
|
+
}) {
|
|
42931
|
+
return [_c('div', {
|
|
42932
|
+
staticClass: "w-100 d-flex"
|
|
42933
|
+
}, [_c('SearchableSelect', {
|
|
42934
|
+
attrs: {
|
|
42935
|
+
"items": _vm.fieldInfo.config.OptionsForBind,
|
|
42936
|
+
"max-visible-chips": 2,
|
|
42937
|
+
"action-buttons": _vm.computedActionButtons(_vm.fieldInfo),
|
|
42938
|
+
"item-fields": _vm.computedItemFields(_vm.fieldInfo),
|
|
42939
|
+
"group-fields": _vm.computedGroupFields(_vm.fieldInfo),
|
|
42940
|
+
"max-render-items": _vm.computedMaxRenderItems(_vm.fieldInfo),
|
|
42941
|
+
"lazy-load": true,
|
|
42942
|
+
"multiple": _vm.fieldInfo.config.isMultiple,
|
|
42943
|
+
"label": _vm.fieldInfo.label,
|
|
42944
|
+
"placeholder": _vm.fieldInfo.placeholder,
|
|
42945
|
+
"status-field-config": _vm.fieldInfo.config.statusFieldConfig,
|
|
42946
|
+
"min-search-length": _vm.fieldInfo.config.minSearchLength
|
|
42947
|
+
},
|
|
42948
|
+
on: {
|
|
42949
|
+
"change": function ($event) {
|
|
42950
|
+
return _vm.onSearchableChange($event, _vm.field);
|
|
42951
|
+
}
|
|
42952
|
+
},
|
|
42953
|
+
model: {
|
|
42954
|
+
value: _vm.fieldInfo.value,
|
|
42955
|
+
callback: function ($$v) {
|
|
42956
|
+
_vm.$set(_vm.fieldInfo, "value", $$v);
|
|
42957
|
+
},
|
|
42958
|
+
expression: "fieldInfo.value"
|
|
42959
|
+
}
|
|
42960
|
+
})], 1), errors[0] ? _c('span', {
|
|
42961
|
+
staticClass: "invalid-feedback d-block"
|
|
42962
|
+
}, [_vm._v(_vm._s(errors[0]))]) : _vm._e()];
|
|
42963
|
+
}
|
|
42964
|
+
}])
|
|
42965
|
+
});
|
|
42966
|
+
};
|
|
42967
|
+
var SearchableSelectFieldvue_type_template_id_b5b1bf16_staticRenderFns = [];
|
|
42968
|
+
|
|
42969
|
+
// CONCATENATED MODULE: ./src/components/SearchableSelectField.vue?vue&type=template&id=b5b1bf16
|
|
42970
|
+
|
|
42971
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4289e630-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/SearchableSelect.vue?vue&type=template&id=688f213e&scoped=true
|
|
42972
|
+
var SearchableSelectvue_type_template_id_688f213e_scoped_true_render = function render() {
|
|
42973
|
+
var _vm = this,
|
|
42974
|
+
_c = _vm._self._c;
|
|
42975
|
+
return _c('div', {
|
|
42976
|
+
staticClass: "searchable-select"
|
|
42977
|
+
}, [_c('Autocomplete', {
|
|
42978
|
+
attrs: {
|
|
42979
|
+
"value": _vm.internalValue,
|
|
42980
|
+
"model-value": _vm.internalValue,
|
|
42981
|
+
"items": _vm.displayItems,
|
|
42982
|
+
"all-items": _vm.allItems,
|
|
42983
|
+
"loading": _vm.loading,
|
|
42984
|
+
"placeholder": _vm.placeholder,
|
|
42985
|
+
"label": _vm.label,
|
|
42986
|
+
"disabled": _vm.disabled,
|
|
42987
|
+
"clearable": _vm.clearable,
|
|
42988
|
+
"density": _vm.density,
|
|
42989
|
+
"variant": _vm.variant,
|
|
42990
|
+
"multiple": _vm.multiple,
|
|
42991
|
+
"item-title": _vm.itemTitle,
|
|
42992
|
+
"item-value": _vm.itemValue,
|
|
42993
|
+
"menu-props": _vm.menuProps,
|
|
42994
|
+
"no-data-text": _vm.noDataText,
|
|
42995
|
+
"hide-details": _vm.hideDetails,
|
|
42996
|
+
"error-messages": _vm.errorMessages,
|
|
42997
|
+
"rules": _vm.rules,
|
|
42998
|
+
"min-search-length": _vm.minSearchLength,
|
|
42999
|
+
"max-visible-chips": _vm.maxVisibleChips,
|
|
43000
|
+
"action-buttons": _vm.actionButtons,
|
|
43001
|
+
"item-fields": _vm.itemFields,
|
|
43002
|
+
"group-fields": _vm.groupFields,
|
|
43003
|
+
"max-render-items": _vm.maxRenderItems,
|
|
43004
|
+
"lazy-load": _vm.lazyLoad,
|
|
43005
|
+
"status-field-config": _vm.statusFieldConfig
|
|
43006
|
+
},
|
|
43007
|
+
on: {
|
|
43008
|
+
"input": _vm.onSelectionChange,
|
|
43009
|
+
"update:model-value": _vm.onSelectionChange,
|
|
43010
|
+
"update:search": _vm.onSearch,
|
|
43011
|
+
"focus": _vm.onFocus,
|
|
43012
|
+
"blur": _vm.onBlur,
|
|
43013
|
+
"search": _vm.onSearch
|
|
43014
|
+
}
|
|
43015
|
+
})], 1);
|
|
43016
|
+
};
|
|
43017
|
+
var SearchableSelectvue_type_template_id_688f213e_scoped_true_staticRenderFns = [];
|
|
43018
|
+
|
|
43019
|
+
// CONCATENATED MODULE: ./src/components/SearchableSelect.vue?vue&type=template&id=688f213e&scoped=true
|
|
43020
|
+
|
|
43021
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4289e630-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Autocomplete.vue?vue&type=template&id=723cadb2&scoped=true
|
|
43022
|
+
var Autocompletevue_type_template_id_723cadb2_scoped_true_render = function render() {
|
|
43023
|
+
var _vm = this,
|
|
43024
|
+
_c = _vm._self._c;
|
|
43025
|
+
return _c('div', {
|
|
43026
|
+
staticClass: "custom-autocomplete mt-0",
|
|
43027
|
+
class: {
|
|
43028
|
+
'is-disabled': _vm.disabled,
|
|
43029
|
+
'has-error': _vm.hasError
|
|
43030
|
+
}
|
|
43031
|
+
}, [!_vm.multiple ? _c('div', {
|
|
43032
|
+
staticClass: "autocomplete-wrapper"
|
|
43033
|
+
}, [_c('div', {
|
|
43034
|
+
staticClass: "input-group"
|
|
43035
|
+
}, [_c('input', {
|
|
43036
|
+
ref: "input",
|
|
43037
|
+
staticClass: "form-control",
|
|
43038
|
+
class: {
|
|
43039
|
+
'is-invalid': _vm.hasError,
|
|
43040
|
+
'form-control-sm': _vm.density === 'compact',
|
|
43041
|
+
'form-control-lg': _vm.density === 'comfortable'
|
|
43042
|
+
},
|
|
43043
|
+
attrs: {
|
|
43044
|
+
"type": "text",
|
|
43045
|
+
"placeholder": _vm.placeholder,
|
|
43046
|
+
"disabled": _vm.disabled
|
|
43047
|
+
},
|
|
43048
|
+
domProps: {
|
|
43049
|
+
"value": _vm.displayText
|
|
43050
|
+
},
|
|
43051
|
+
on: {
|
|
43052
|
+
"input": _vm.onInput,
|
|
43053
|
+
"focus": _vm.onFocus,
|
|
43054
|
+
"blur": _vm.onBlur,
|
|
43055
|
+
"keydown": [function ($event) {
|
|
43056
|
+
if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")) return null;
|
|
43057
|
+
$event.preventDefault();
|
|
43058
|
+
return _vm.handleEnter.apply(null, arguments);
|
|
43059
|
+
}, function ($event) {
|
|
43060
|
+
if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "arrow-down", undefined, $event.key, undefined)) return null;
|
|
43061
|
+
$event.preventDefault();
|
|
43062
|
+
return _vm.navigateDown.apply(null, arguments);
|
|
43063
|
+
}, function ($event) {
|
|
43064
|
+
if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "arrow-up", undefined, $event.key, undefined)) return null;
|
|
43065
|
+
$event.preventDefault();
|
|
43066
|
+
return _vm.navigateUp.apply(null, arguments);
|
|
43067
|
+
}, function ($event) {
|
|
43068
|
+
if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "escape", undefined, $event.key, undefined)) return null;
|
|
43069
|
+
return _vm.closeMenu.apply(null, arguments);
|
|
43070
|
+
}]
|
|
43071
|
+
}
|
|
43072
|
+
}), _c('div', {
|
|
43073
|
+
staticClass: "input-group-append"
|
|
43074
|
+
}, [_vm.clearable && _vm.selectedValue ? _c('button', {
|
|
43075
|
+
staticClass: "btn btn-outline-secondary",
|
|
43076
|
+
attrs: {
|
|
43077
|
+
"type": "button",
|
|
43078
|
+
"tabindex": "-1"
|
|
43079
|
+
},
|
|
43080
|
+
on: {
|
|
43081
|
+
"click": _vm.clearSelection
|
|
43082
|
+
}
|
|
43083
|
+
}, [_c('i', {
|
|
43084
|
+
staticClass: "fa fa-times"
|
|
43085
|
+
})]) : _vm._e(), _c('button', {
|
|
43086
|
+
staticClass: "btn btn-outline-secondary dropdown-toggle",
|
|
43087
|
+
class: {
|
|
43088
|
+
'active': _vm.isMenuOpen
|
|
43089
|
+
},
|
|
43090
|
+
attrs: {
|
|
43091
|
+
"type": "button",
|
|
43092
|
+
"tabindex": "-1"
|
|
43093
|
+
},
|
|
43094
|
+
on: {
|
|
43095
|
+
"click": _vm.toggleMenu
|
|
43096
|
+
}
|
|
43097
|
+
}, [_c('i', {
|
|
43098
|
+
staticClass: "fa",
|
|
43099
|
+
class: _vm.loading ? 'fa-spinner fa-spin' : 'fa-chevron-down'
|
|
43100
|
+
})])])]), _vm.isMenuOpen ? _c('div', {
|
|
43101
|
+
ref: "menu",
|
|
43102
|
+
staticClass: "autocomplete-menu",
|
|
43103
|
+
style: {
|
|
43104
|
+
maxHeight: _vm.menuMaxHeight + 'px'
|
|
43105
|
+
},
|
|
43106
|
+
on: {
|
|
43107
|
+
"scroll": _vm.onMenuScroll
|
|
43108
|
+
}
|
|
43109
|
+
}, [_vm.loading && !_vm.hasItems ? _c('div', {
|
|
43110
|
+
staticClass: "autocomplete-loading"
|
|
43111
|
+
}, [_vm._m(0), _c('div', {
|
|
43112
|
+
staticClass: "mt-2 text-muted small"
|
|
43113
|
+
}, [_vm._v("Loading...")])]) : !_vm.loading && !_vm.hasItems && _vm.searchTerm.length >= _vm.minSearchLength ? _c('div', {
|
|
43114
|
+
staticClass: "autocomplete-no-data"
|
|
43115
|
+
}, [_c('i', {
|
|
43116
|
+
staticClass: "fa fa-search text-muted",
|
|
43117
|
+
staticStyle: {
|
|
43118
|
+
"font-size": "2rem"
|
|
43119
|
+
}
|
|
43120
|
+
}), _c('div', {
|
|
43121
|
+
staticClass: "mt-2 text-muted"
|
|
43122
|
+
}, [_vm._v(_vm._s(_vm.noDataText))]), _c('div', {
|
|
43123
|
+
staticClass: "text-muted small"
|
|
43124
|
+
}, [_vm._v("Try adjusting your search terms")])]) : _vm.hasGrouping ? _c('div', {
|
|
43125
|
+
staticClass: "autocomplete-grouped"
|
|
43126
|
+
}, _vm._l(_vm.paginatedGroupedItems, function (group, groupIndex) {
|
|
43127
|
+
return _c('div', {
|
|
43128
|
+
key: group.group || groupIndex,
|
|
43129
|
+
staticClass: "autocomplete-group"
|
|
43130
|
+
}, [_c('div', {
|
|
43131
|
+
staticClass: "autocomplete-group-header"
|
|
43132
|
+
}, [_vm.groupFields.length > 0 ? _c('div', {
|
|
43133
|
+
staticClass: "d-flex flex-column"
|
|
43134
|
+
}, [_c('div', {
|
|
43135
|
+
staticClass: "font-weight-bold"
|
|
43136
|
+
}, [_vm._v(_vm._s(group.group))]), _c('div', {
|
|
43137
|
+
staticClass: "small text-muted mt-1"
|
|
43138
|
+
}, _vm._l(_vm.groupFields, function (field, idx) {
|
|
43139
|
+
return _c('span', {
|
|
43140
|
+
key: field
|
|
43141
|
+
}, [idx > 0 ? _c('span', [_vm._v(" • ")]) : _vm._e(), _vm.getGroupFieldValue(group, field) ? _c('span', [_vm._v(_vm._s(field) + ": " + _vm._s(_vm.getGroupFieldValue(group, field)))]) : _vm._e()]);
|
|
43142
|
+
}), 0)]) : _c('div', [_vm._v(_vm._s(group.group))])]), _c('ul', {
|
|
43143
|
+
staticClass: "list-group list-group-flush"
|
|
43144
|
+
}, _vm._l(group.items, function (item, itemIndex) {
|
|
43145
|
+
return _c('li', {
|
|
43146
|
+
key: _vm.getItemValue(item),
|
|
43147
|
+
staticClass: "list-group-item autocomplete-item",
|
|
43148
|
+
class: {
|
|
43149
|
+
'active': _vm.getFlatIndex(groupIndex, itemIndex) === _vm.highlightedIndex,
|
|
43150
|
+
'selected': _vm.isSelected(item)
|
|
43151
|
+
},
|
|
43152
|
+
staticStyle: {
|
|
43153
|
+
"cursor": "pointer"
|
|
43154
|
+
},
|
|
43155
|
+
on: {
|
|
43156
|
+
"click": function ($event) {
|
|
43157
|
+
$event.preventDefault();
|
|
43158
|
+
return _vm.selectItem(item, $event);
|
|
43159
|
+
},
|
|
43160
|
+
"mouseenter": function ($event) {
|
|
43161
|
+
_vm.highlightedIndex = _vm.getFlatIndex(groupIndex, itemIndex);
|
|
43162
|
+
}
|
|
43163
|
+
}
|
|
43164
|
+
}, [_c('div', {
|
|
43165
|
+
staticClass: "d-flex align-items-center"
|
|
43166
|
+
}, [_vm.multiple ? _c('div', {
|
|
43167
|
+
staticClass: "autocomplete-checkbox-wrapper mr-2"
|
|
43168
|
+
}, [_c('input', {
|
|
43169
|
+
staticClass: "autocomplete-checkbox",
|
|
43170
|
+
attrs: {
|
|
43171
|
+
"type": "checkbox",
|
|
43172
|
+
"tabindex": "-1"
|
|
43173
|
+
},
|
|
43174
|
+
domProps: {
|
|
43175
|
+
"checked": _vm.isSelected(item)
|
|
43176
|
+
},
|
|
43177
|
+
on: {
|
|
43178
|
+
"click": function ($event) {
|
|
43179
|
+
$event.stopPropagation();
|
|
43180
|
+
$event.preventDefault();
|
|
43181
|
+
return _vm.selectItem(item, $event);
|
|
43182
|
+
}
|
|
43183
|
+
}
|
|
43184
|
+
}), _vm.isSelected(item) ? _c('i', {
|
|
43185
|
+
staticClass: "fa fa-check autocomplete-check-icon"
|
|
43186
|
+
}) : _vm._e()]) : _vm._e(), item.raw && item.raw.category ? _c('span', {
|
|
43187
|
+
staticClass: "badge badge-secondary mr-2",
|
|
43188
|
+
staticStyle: {
|
|
43189
|
+
"font-size": "0.75rem"
|
|
43190
|
+
}
|
|
43191
|
+
}, [_vm._v(" " + _vm._s(item.raw.category) + " ")]) : _vm._e(), _c('div', {
|
|
43192
|
+
staticClass: "flex-grow-1"
|
|
43193
|
+
}, [_vm.itemFields.length > 0 ? _c('div', {
|
|
43194
|
+
staticClass: "font-weight-400",
|
|
43195
|
+
class: {
|
|
43196
|
+
'text-dark': _vm.isSelected(item)
|
|
43197
|
+
},
|
|
43198
|
+
domProps: {
|
|
43199
|
+
"innerHTML": _vm._s(_vm.formatItemFields(item))
|
|
43200
|
+
}
|
|
43201
|
+
}) : _c('div', {
|
|
43202
|
+
staticClass: "font-weight-400",
|
|
43203
|
+
class: {
|
|
43204
|
+
'text-dark': _vm.isSelected(item)
|
|
43205
|
+
}
|
|
43206
|
+
}, [_vm._v(_vm._s(_vm.getItemText(item)))]), !_vm.itemFields.length && _vm.getItemDescription(item) ? _c('div', {
|
|
43207
|
+
staticClass: "text-muted small mt-1"
|
|
43208
|
+
}, [_vm._v(_vm._s(_vm.getItemDescription(item)))]) : _vm._e()]), _vm.isSelected(item) && !_vm.multiple ? _c('i', {
|
|
43209
|
+
staticClass: "fa fa-check text-success ml-2",
|
|
43210
|
+
staticStyle: {
|
|
43211
|
+
"font-size": "1.1rem"
|
|
43212
|
+
}
|
|
43213
|
+
}) : _vm._e()])]);
|
|
43214
|
+
}), 0)]);
|
|
43215
|
+
}), 0) : _c('ul', {
|
|
43216
|
+
staticClass: "list-group list-group-flush"
|
|
43217
|
+
}, _vm._l(_vm.paginatedDisplayItems, function (item, index) {
|
|
43218
|
+
return _c('li', {
|
|
43219
|
+
key: _vm.getItemValue(item),
|
|
43220
|
+
staticClass: "list-group-item autocomplete-item",
|
|
43221
|
+
class: {
|
|
43222
|
+
'active': index === _vm.highlightedIndex,
|
|
43223
|
+
'selected': _vm.isSelected(item)
|
|
43224
|
+
},
|
|
43225
|
+
staticStyle: {
|
|
43226
|
+
"cursor": "pointer"
|
|
43227
|
+
},
|
|
43228
|
+
on: {
|
|
43229
|
+
"click": function ($event) {
|
|
43230
|
+
$event.preventDefault();
|
|
43231
|
+
return _vm.selectItem(item, $event);
|
|
43232
|
+
},
|
|
43233
|
+
"mouseenter": function ($event) {
|
|
43234
|
+
_vm.highlightedIndex = index;
|
|
43235
|
+
}
|
|
43236
|
+
}
|
|
43237
|
+
}, [_c('div', {
|
|
43238
|
+
staticClass: "d-flex align-items-center"
|
|
43239
|
+
}, [_vm.multiple ? _c('input', {
|
|
43240
|
+
staticClass: "mr-2",
|
|
43241
|
+
attrs: {
|
|
43242
|
+
"type": "checkbox",
|
|
43243
|
+
"tabindex": "-1"
|
|
43244
|
+
},
|
|
43245
|
+
domProps: {
|
|
43246
|
+
"checked": _vm.isSelected(item)
|
|
43247
|
+
},
|
|
43248
|
+
on: {
|
|
43249
|
+
"click": function ($event) {
|
|
43250
|
+
$event.stopPropagation();
|
|
43251
|
+
$event.preventDefault();
|
|
43252
|
+
return _vm.selectItem(item);
|
|
43253
|
+
}
|
|
43254
|
+
}
|
|
43255
|
+
}) : _vm._e(), item.raw && item.raw.category ? _c('span', {
|
|
43256
|
+
staticClass: "badge badge-primary mr-2"
|
|
43257
|
+
}, [_vm._v(" " + _vm._s(item.raw.category) + " ")]) : _vm._e(), _c('div', {
|
|
43258
|
+
staticClass: "flex-grow-1"
|
|
43259
|
+
}, [_vm.itemFields.length > 0 ? _c('div', {
|
|
43260
|
+
staticClass: "font-weight-400",
|
|
43261
|
+
domProps: {
|
|
43262
|
+
"innerHTML": _vm._s(_vm.formatItemFields(item))
|
|
43263
|
+
}
|
|
43264
|
+
}) : _c('div', {
|
|
43265
|
+
staticClass: "font-weight-400"
|
|
43266
|
+
}, [_vm._v(_vm._s(_vm.getItemText(item)))]), !_vm.itemFields.length && _vm.getItemDescription(item) ? _c('div', {
|
|
43267
|
+
staticClass: "text-muted small mt-1"
|
|
43268
|
+
}, [_vm._v(_vm._s(_vm.getItemDescription(item)))]) : _vm._e()]), _vm.isSelected(item) && !_vm.multiple ? _c('i', {
|
|
43269
|
+
staticClass: "fa fa-check text-primary ml-2"
|
|
43270
|
+
}) : _vm._e()])]);
|
|
43271
|
+
}), 0)]) : _vm._e()]) : _c('div', {
|
|
43272
|
+
staticClass: "autocomplete-wrapper"
|
|
43273
|
+
}, [_c('div', {
|
|
43274
|
+
staticClass: "input-group"
|
|
43275
|
+
}, [_c('div', {
|
|
43276
|
+
staticClass: "form-control autocomplete-chips-container",
|
|
43277
|
+
class: {
|
|
43278
|
+
'is-invalid': _vm.hasError,
|
|
43279
|
+
'form-control-sm': _vm.density === 'compact',
|
|
43280
|
+
'form-control-lg': _vm.density === 'comfortable'
|
|
43281
|
+
}
|
|
43282
|
+
}, [_c('div', {
|
|
43283
|
+
staticClass: "d-flex flex-wrap align-items-center"
|
|
43284
|
+
}, [_vm._l(_vm.visibleChips, function (selectedItem, index) {
|
|
43285
|
+
return [index < _vm.maxVisibleChipsCount ? _c('span', {
|
|
43286
|
+
key: _vm.getItemValue(selectedItem),
|
|
43287
|
+
staticClass: "badge badge-primary mr-1 mb-1 pl-2 autocomplete-chip",
|
|
43288
|
+
attrs: {
|
|
43289
|
+
"title": _vm.getChipText(selectedItem)
|
|
43290
|
+
}
|
|
43291
|
+
}, [_c('span', {
|
|
43292
|
+
staticClass: "autocomplete-chip-text",
|
|
43293
|
+
domProps: {
|
|
43294
|
+
"innerHTML": _vm._s(_vm.getChipText(selectedItem))
|
|
43295
|
+
}
|
|
43296
|
+
}), _c('button', {
|
|
43297
|
+
staticClass: "close ml-1 autocomplete-chip-close",
|
|
43298
|
+
attrs: {
|
|
43299
|
+
"type": "button",
|
|
43300
|
+
"tabindex": "-1",
|
|
43301
|
+
"aria-label": 'Remove ' + _vm.getChipText(selectedItem).replace(/<[^>]*>/g, '')
|
|
43302
|
+
},
|
|
43303
|
+
on: {
|
|
43304
|
+
"click": function ($event) {
|
|
43305
|
+
$event.stopPropagation();
|
|
43306
|
+
_vm.removeItem(_vm.getItemValue(selectedItem));
|
|
43307
|
+
}
|
|
43308
|
+
}
|
|
43309
|
+
}, [_c('span', {
|
|
43310
|
+
attrs: {
|
|
43311
|
+
"aria-hidden": "true"
|
|
43312
|
+
}
|
|
43313
|
+
}, [_vm._v("×")])])]) : _vm._e()];
|
|
43314
|
+
}), _vm.remainingChipsCount > 0 ? _c('span', {
|
|
43315
|
+
staticClass: "badge badge-secondary mr-1 mb-1 pl-2 autocomplete-chip autocomplete-chip-more",
|
|
43316
|
+
attrs: {
|
|
43317
|
+
"title": `${_vm.remainingChipsCount} more selected`
|
|
43318
|
+
}
|
|
43319
|
+
}, [_c('span', {
|
|
43320
|
+
staticClass: "autocomplete-chip-text"
|
|
43321
|
+
}, [_vm._v("+ " + _vm._s(_vm.remainingChipsCount) + " more")])]) : _vm._e(), _c('input', {
|
|
43322
|
+
ref: "input",
|
|
43323
|
+
staticClass: "autocomplete-input-inline",
|
|
43324
|
+
attrs: {
|
|
43325
|
+
"type": "text",
|
|
43326
|
+
"placeholder": _vm.selectedItems.length === 0 ? _vm.placeholder : '',
|
|
43327
|
+
"disabled": _vm.disabled
|
|
43328
|
+
},
|
|
43329
|
+
domProps: {
|
|
43330
|
+
"value": _vm.searchTerm
|
|
43331
|
+
},
|
|
43332
|
+
on: {
|
|
43333
|
+
"input": _vm.onInput,
|
|
43334
|
+
"focus": _vm.onFocus,
|
|
43335
|
+
"blur": _vm.onBlur,
|
|
43336
|
+
"keydown": [function ($event) {
|
|
43337
|
+
if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")) return null;
|
|
43338
|
+
$event.preventDefault();
|
|
43339
|
+
return _vm.handleEnter.apply(null, arguments);
|
|
43340
|
+
}, function ($event) {
|
|
43341
|
+
if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "arrow-down", undefined, $event.key, undefined)) return null;
|
|
43342
|
+
$event.preventDefault();
|
|
43343
|
+
return _vm.navigateDown.apply(null, arguments);
|
|
43344
|
+
}, function ($event) {
|
|
43345
|
+
if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "arrow-up", undefined, $event.key, undefined)) return null;
|
|
43346
|
+
$event.preventDefault();
|
|
43347
|
+
return _vm.navigateUp.apply(null, arguments);
|
|
43348
|
+
}, function ($event) {
|
|
43349
|
+
if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "escape", undefined, $event.key, undefined)) return null;
|
|
43350
|
+
return _vm.closeMenu.apply(null, arguments);
|
|
43351
|
+
}, function ($event) {
|
|
43352
|
+
if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "backspace", undefined, $event.key, undefined)) return null;
|
|
43353
|
+
return _vm.handleBackspace.apply(null, arguments);
|
|
43354
|
+
}]
|
|
43355
|
+
}
|
|
43356
|
+
})], 2)]), _c('div', {
|
|
43357
|
+
staticClass: "input-group-append"
|
|
43358
|
+
}, [_vm.clearable && _vm.currentValue && (Array.isArray(_vm.currentValue) ? _vm.currentValue.length > 0 : true) ? _c('button', {
|
|
43359
|
+
staticClass: "btn btn-outline-secondary",
|
|
43360
|
+
attrs: {
|
|
43361
|
+
"type": "button",
|
|
43362
|
+
"tabindex": "-1"
|
|
43363
|
+
},
|
|
43364
|
+
on: {
|
|
43365
|
+
"click": _vm.clearSelection
|
|
43366
|
+
}
|
|
43367
|
+
}, [_c('i', {
|
|
43368
|
+
staticClass: "fa fa-times"
|
|
43369
|
+
})]) : _vm._e(), _c('button', {
|
|
43370
|
+
staticClass: "btn btn-outline-secondary dropdown-toggle",
|
|
43371
|
+
class: {
|
|
43372
|
+
'active': _vm.isMenuOpen
|
|
43373
|
+
},
|
|
43374
|
+
attrs: {
|
|
43375
|
+
"type": "button",
|
|
43376
|
+
"tabindex": "-1"
|
|
43377
|
+
},
|
|
43378
|
+
on: {
|
|
43379
|
+
"click": _vm.toggleMenu
|
|
43380
|
+
}
|
|
43381
|
+
}, [_c('i', {
|
|
43382
|
+
staticClass: "fa",
|
|
43383
|
+
class: _vm.loading ? 'fa-spinner fa-spin' : 'fa-chevron-down'
|
|
43384
|
+
})])])]), _vm.isMenuOpen ? _c('div', {
|
|
43385
|
+
ref: "menu",
|
|
43386
|
+
staticClass: "autocomplete-menu",
|
|
43387
|
+
style: {
|
|
43388
|
+
maxHeight: _vm.menuMaxHeight + 'px'
|
|
43389
|
+
},
|
|
43390
|
+
on: {
|
|
43391
|
+
"scroll": _vm.onMenuScroll
|
|
43392
|
+
}
|
|
43393
|
+
}, [_vm.hasActionButtons ? _c('div', {
|
|
43394
|
+
staticClass: "autocomplete-actions p-2 border-bottom"
|
|
43395
|
+
}, [_c('div', {
|
|
43396
|
+
staticClass: "d-flex flex-wrap gap-1"
|
|
43397
|
+
}, [_vm.actionButtons.selectAll ? _c('button', {
|
|
43398
|
+
staticClass: "btn btn-sm btn-outline-primary",
|
|
43399
|
+
attrs: {
|
|
43400
|
+
"type": "button",
|
|
43401
|
+
"disabled": _vm.disabled || _vm.allSelected
|
|
43402
|
+
},
|
|
43403
|
+
on: {
|
|
43404
|
+
"click": function ($event) {
|
|
43405
|
+
$event.stopPropagation();
|
|
43406
|
+
$event.preventDefault();
|
|
43407
|
+
return _vm.selectAll($event);
|
|
43408
|
+
}
|
|
43409
|
+
}
|
|
43410
|
+
}, [_c('i', {
|
|
43411
|
+
staticClass: "fa fa-check-square mr-1"
|
|
43412
|
+
}), _vm._v(" Select All ")]) : _vm._e(), _vm.actionButtons.active ? _c('button', {
|
|
43413
|
+
staticClass: "btn btn-sm btn-outline-success",
|
|
43414
|
+
class: {
|
|
43415
|
+
'active': _vm.filterStatus === 'active'
|
|
43416
|
+
},
|
|
43417
|
+
attrs: {
|
|
43418
|
+
"type": "button",
|
|
43419
|
+
"disabled": _vm.disabled
|
|
43420
|
+
},
|
|
43421
|
+
on: {
|
|
43422
|
+
"click": function ($event) {
|
|
43423
|
+
return _vm.filterByStatus('active');
|
|
43424
|
+
}
|
|
43425
|
+
}
|
|
43426
|
+
}, [_c('i', {
|
|
43427
|
+
staticClass: "fa fa-check-circle mr-1"
|
|
43428
|
+
}), _vm._v(" Active ")]) : _vm._e(), _vm.actionButtons.inactive ? _c('button', {
|
|
43429
|
+
staticClass: "btn btn-sm btn-outline-secondary",
|
|
43430
|
+
class: {
|
|
43431
|
+
'active': _vm.filterStatus === 'inactive'
|
|
43432
|
+
},
|
|
43433
|
+
attrs: {
|
|
43434
|
+
"type": "button",
|
|
43435
|
+
"disabled": _vm.disabled
|
|
43436
|
+
},
|
|
43437
|
+
on: {
|
|
43438
|
+
"click": function ($event) {
|
|
43439
|
+
return _vm.filterByStatus('inactive');
|
|
43440
|
+
}
|
|
43441
|
+
}
|
|
43442
|
+
}, [_c('i', {
|
|
43443
|
+
staticClass: "fa fa-times-circle mr-1"
|
|
43444
|
+
}), _vm._v(" Inactive ")]) : _vm._e(), _vm.actionButtons.clear ? _c('button', {
|
|
43445
|
+
staticClass: "btn btn-sm btn-outline-danger",
|
|
43446
|
+
attrs: {
|
|
43447
|
+
"type": "button",
|
|
43448
|
+
"disabled": _vm.disabled || !_vm.hasSelectedItems
|
|
43449
|
+
},
|
|
43450
|
+
on: {
|
|
43451
|
+
"click": _vm.clearSelection
|
|
43452
|
+
}
|
|
43453
|
+
}, [_c('i', {
|
|
43454
|
+
staticClass: "fa fa-times mr-1"
|
|
43455
|
+
}), _vm._v(" Clear ")]) : _vm._e()])]) : _vm._e(), _vm.loading && !_vm.hasItems ? _c('div', {
|
|
43456
|
+
staticClass: "autocomplete-loading"
|
|
43457
|
+
}, [_vm._m(1), _c('div', {
|
|
43458
|
+
staticClass: "mt-2 text-muted small"
|
|
43459
|
+
}, [_vm._v("Loading...")])]) : !_vm.loading && !_vm.hasItems && _vm.searchTerm.length >= _vm.minSearchLength ? _c('div', {
|
|
43460
|
+
staticClass: "autocomplete-no-data"
|
|
43461
|
+
}, [_c('i', {
|
|
43462
|
+
staticClass: "fa fa-search text-muted",
|
|
43463
|
+
staticStyle: {
|
|
43464
|
+
"font-size": "2rem"
|
|
43465
|
+
}
|
|
43466
|
+
}), _c('div', {
|
|
43467
|
+
staticClass: "mt-2 text-muted"
|
|
43468
|
+
}, [_vm._v(_vm._s(_vm.noDataText))]), _c('div', {
|
|
43469
|
+
staticClass: "text-muted small"
|
|
43470
|
+
}, [_vm._v("Try adjusting your search terms")])]) : _vm.hasGrouping ? _c('div', {
|
|
43471
|
+
staticClass: "autocomplete-grouped"
|
|
43472
|
+
}, _vm._l(_vm.paginatedGroupedItems, function (group, groupIndex) {
|
|
43473
|
+
return _c('div', {
|
|
43474
|
+
key: group.group || groupIndex,
|
|
43475
|
+
staticClass: "autocomplete-group"
|
|
43476
|
+
}, [_c('div', {
|
|
43477
|
+
staticClass: "autocomplete-group-header"
|
|
43478
|
+
}, [_vm.groupFields.length > 0 ? _c('div', {
|
|
43479
|
+
staticClass: "d-flex flex-column"
|
|
43480
|
+
}, [_c('div', {
|
|
43481
|
+
staticClass: "font-weight-bold"
|
|
43482
|
+
}, [_vm._v(_vm._s(group.group))]), _c('div', {
|
|
43483
|
+
staticClass: "small text-muted mt-1"
|
|
43484
|
+
}, _vm._l(_vm.groupFields, function (field, idx) {
|
|
43485
|
+
return _c('span', {
|
|
43486
|
+
key: field
|
|
43487
|
+
}, [idx > 0 ? _c('span', [_vm._v(" • ")]) : _vm._e(), _vm.getGroupFieldValue(group, field) ? _c('span', [_vm._v(_vm._s(field) + ": " + _vm._s(_vm.getGroupFieldValue(group, field)))]) : _vm._e()]);
|
|
43488
|
+
}), 0)]) : _c('div', [_vm._v(_vm._s(group.group))])]), _c('ul', {
|
|
43489
|
+
staticClass: "list-group list-group-flush"
|
|
43490
|
+
}, _vm._l(group.items, function (item, itemIndex) {
|
|
43491
|
+
return _c('li', {
|
|
43492
|
+
key: _vm.getItemValue(item),
|
|
43493
|
+
staticClass: "list-group-item autocomplete-item",
|
|
43494
|
+
class: {
|
|
43495
|
+
'active': _vm.getFlatIndex(groupIndex, itemIndex) === _vm.highlightedIndex,
|
|
43496
|
+
'selected': _vm.isSelected(item)
|
|
43497
|
+
},
|
|
43498
|
+
staticStyle: {
|
|
43499
|
+
"cursor": "pointer"
|
|
43500
|
+
},
|
|
43501
|
+
on: {
|
|
43502
|
+
"click": function ($event) {
|
|
43503
|
+
$event.preventDefault();
|
|
43504
|
+
return _vm.selectItem(item, $event);
|
|
43505
|
+
},
|
|
43506
|
+
"mouseenter": function ($event) {
|
|
43507
|
+
_vm.highlightedIndex = _vm.getFlatIndex(groupIndex, itemIndex);
|
|
43508
|
+
}
|
|
43509
|
+
}
|
|
43510
|
+
}, [_c('div', {
|
|
43511
|
+
staticClass: "d-flex align-items-center"
|
|
43512
|
+
}, [_vm.multiple ? _c('div', {
|
|
43513
|
+
staticClass: "autocomplete-checkbox-wrapper mr-2"
|
|
43514
|
+
}, [_c('input', {
|
|
43515
|
+
staticClass: "autocomplete-checkbox",
|
|
43516
|
+
attrs: {
|
|
43517
|
+
"type": "checkbox",
|
|
43518
|
+
"tabindex": "-1"
|
|
43519
|
+
},
|
|
43520
|
+
domProps: {
|
|
43521
|
+
"checked": _vm.isSelected(item)
|
|
43522
|
+
},
|
|
43523
|
+
on: {
|
|
43524
|
+
"click": function ($event) {
|
|
43525
|
+
$event.stopPropagation();
|
|
43526
|
+
$event.preventDefault();
|
|
43527
|
+
return _vm.selectItem(item, $event);
|
|
43528
|
+
}
|
|
43529
|
+
}
|
|
43530
|
+
}), _vm.isSelected(item) ? _c('i', {
|
|
43531
|
+
staticClass: "fa fa-check autocomplete-check-icon"
|
|
43532
|
+
}) : _vm._e()]) : _vm._e(), item.raw && item.raw.category ? _c('span', {
|
|
43533
|
+
staticClass: "badge badge-secondary mr-2",
|
|
43534
|
+
staticStyle: {
|
|
43535
|
+
"font-size": "0.75rem"
|
|
43536
|
+
}
|
|
43537
|
+
}, [_vm._v(" " + _vm._s(item.raw.category) + " ")]) : _vm._e(), _c('div', {
|
|
43538
|
+
staticClass: "flex-grow-1"
|
|
43539
|
+
}, [_vm.itemFields.length > 0 ? _c('div', {
|
|
43540
|
+
staticClass: "font-weight-400",
|
|
43541
|
+
class: {
|
|
43542
|
+
'text-dark': _vm.isSelected(item)
|
|
43543
|
+
},
|
|
43544
|
+
domProps: {
|
|
43545
|
+
"innerHTML": _vm._s(_vm.formatItemFields(item))
|
|
43546
|
+
}
|
|
43547
|
+
}) : _c('div', {
|
|
43548
|
+
staticClass: "font-weight-400",
|
|
43549
|
+
class: {
|
|
43550
|
+
'text-dark': _vm.isSelected(item)
|
|
43551
|
+
}
|
|
43552
|
+
}, [_vm._v(_vm._s(_vm.getItemText(item)))]), !_vm.itemFields.length && _vm.getItemDescription(item) ? _c('div', {
|
|
43553
|
+
staticClass: "text-muted small mt-1"
|
|
43554
|
+
}, [_vm._v(_vm._s(_vm.getItemDescription(item)))]) : _vm._e()]), _vm.isSelected(item) && !_vm.multiple ? _c('i', {
|
|
43555
|
+
staticClass: "fa fa-check text-success ml-2",
|
|
43556
|
+
staticStyle: {
|
|
43557
|
+
"font-size": "1.1rem"
|
|
43558
|
+
}
|
|
43559
|
+
}) : _vm._e()])]);
|
|
43560
|
+
}), 0)]);
|
|
43561
|
+
}), 0) : _c('ul', {
|
|
43562
|
+
staticClass: "list-group list-group-flush"
|
|
43563
|
+
}, _vm._l(_vm.paginatedDisplayItems, function (item, index) {
|
|
43564
|
+
return _c('li', {
|
|
43565
|
+
key: _vm.getItemValue(item),
|
|
43566
|
+
staticClass: "list-group-item autocomplete-item",
|
|
43567
|
+
class: {
|
|
43568
|
+
'active': index === _vm.highlightedIndex,
|
|
43569
|
+
'selected': _vm.isSelected(item)
|
|
43570
|
+
},
|
|
43571
|
+
staticStyle: {
|
|
43572
|
+
"cursor": "pointer"
|
|
43573
|
+
},
|
|
43574
|
+
on: {
|
|
43575
|
+
"click": function ($event) {
|
|
43576
|
+
$event.preventDefault();
|
|
43577
|
+
return _vm.selectItem(item, $event);
|
|
43578
|
+
},
|
|
43579
|
+
"mouseenter": function ($event) {
|
|
43580
|
+
_vm.highlightedIndex = index;
|
|
43581
|
+
}
|
|
43582
|
+
}
|
|
43583
|
+
}, [_c('div', {
|
|
43584
|
+
staticClass: "d-flex align-items-center"
|
|
43585
|
+
}, [_vm.multiple ? _c('input', {
|
|
43586
|
+
staticClass: "mr-2",
|
|
43587
|
+
attrs: {
|
|
43588
|
+
"type": "checkbox",
|
|
43589
|
+
"tabindex": "-1"
|
|
43590
|
+
},
|
|
43591
|
+
domProps: {
|
|
43592
|
+
"checked": _vm.isSelected(item)
|
|
43593
|
+
},
|
|
43594
|
+
on: {
|
|
43595
|
+
"click": function ($event) {
|
|
43596
|
+
$event.stopPropagation();
|
|
43597
|
+
$event.preventDefault();
|
|
43598
|
+
return _vm.selectItem(item);
|
|
43599
|
+
}
|
|
43600
|
+
}
|
|
43601
|
+
}) : _vm._e(), item.raw && item.raw.category ? _c('span', {
|
|
43602
|
+
staticClass: "badge badge-primary mr-2"
|
|
43603
|
+
}, [_vm._v(" " + _vm._s(item.raw.category) + " ")]) : _vm._e(), _c('div', {
|
|
43604
|
+
staticClass: "flex-grow-1"
|
|
43605
|
+
}, [_vm.itemFields.length > 0 ? _c('div', {
|
|
43606
|
+
staticClass: "font-weight-400",
|
|
43607
|
+
domProps: {
|
|
43608
|
+
"innerHTML": _vm._s(_vm.formatItemFields(item))
|
|
43609
|
+
}
|
|
43610
|
+
}) : _c('div', {
|
|
43611
|
+
staticClass: "font-weight-400"
|
|
43612
|
+
}, [_vm._v(_vm._s(_vm.getItemText(item)))]), !_vm.itemFields.length && _vm.getItemDescription(item) ? _c('div', {
|
|
43613
|
+
staticClass: "text-muted small mt-1"
|
|
43614
|
+
}, [_vm._v(_vm._s(_vm.getItemDescription(item)))]) : _vm._e()]), _vm.isSelected(item) && !_vm.multiple ? _c('i', {
|
|
43615
|
+
staticClass: "fa fa-check text-primary ml-2"
|
|
43616
|
+
}) : _vm._e()])]);
|
|
43617
|
+
}), 0)]) : _vm._e()]), !_vm.hideDetails && _vm.hasError ? _c('div', {
|
|
43618
|
+
staticClass: "invalid-feedback d-block"
|
|
43619
|
+
}, _vm._l(_vm.errorMessagesArray, function (error, index) {
|
|
43620
|
+
return _c('div', {
|
|
43621
|
+
key: index
|
|
43622
|
+
}, [_vm._v(_vm._s(error))]);
|
|
43623
|
+
}), 0) : _vm._e()]);
|
|
43624
|
+
};
|
|
43625
|
+
var Autocompletevue_type_template_id_723cadb2_scoped_true_staticRenderFns = [function () {
|
|
43626
|
+
var _vm = this,
|
|
43627
|
+
_c = _vm._self._c;
|
|
43628
|
+
return _c('div', {
|
|
43629
|
+
staticClass: "spinner-border spinner-border-sm text-primary",
|
|
43630
|
+
attrs: {
|
|
43631
|
+
"role": "status"
|
|
43632
|
+
}
|
|
43633
|
+
}, [_c('span', {
|
|
43634
|
+
staticClass: "sr-only"
|
|
43635
|
+
}, [_vm._v("Loading...")])]);
|
|
43636
|
+
}, function () {
|
|
43637
|
+
var _vm = this,
|
|
43638
|
+
_c = _vm._self._c;
|
|
43639
|
+
return _c('div', {
|
|
43640
|
+
staticClass: "spinner-border spinner-border-sm text-primary",
|
|
43641
|
+
attrs: {
|
|
43642
|
+
"role": "status"
|
|
43643
|
+
}
|
|
43644
|
+
}, [_c('span', {
|
|
43645
|
+
staticClass: "sr-only"
|
|
43646
|
+
}, [_vm._v("Loading...")])]);
|
|
43647
|
+
}];
|
|
43648
|
+
|
|
43649
|
+
// CONCATENATED MODULE: ./src/components/Autocomplete.vue?vue&type=template&id=723cadb2&scoped=true
|
|
43650
|
+
|
|
43651
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.every.js
|
|
43652
|
+
var es_iterator_every = __webpack_require__("d866");
|
|
43653
|
+
|
|
43654
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.find.js
|
|
43655
|
+
var es_iterator_find = __webpack_require__("f665");
|
|
43656
|
+
|
|
43657
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.flat-map.js
|
|
43658
|
+
var es_iterator_flat_map = __webpack_require__("796d");
|
|
43659
|
+
|
|
43660
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.some.js
|
|
43661
|
+
var es_iterator_some = __webpack_require__("a732");
|
|
43662
|
+
|
|
43663
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.set.difference.v2.js
|
|
43664
|
+
var es_set_difference_v2 = __webpack_require__("1e70");
|
|
43665
|
+
|
|
43666
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.set.intersection.v2.js
|
|
43667
|
+
var es_set_intersection_v2 = __webpack_require__("79a4");
|
|
43668
|
+
|
|
43669
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.set.is-disjoint-from.v2.js
|
|
43670
|
+
var es_set_is_disjoint_from_v2 = __webpack_require__("c1a1");
|
|
43671
|
+
|
|
43672
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.set.is-subset-of.v2.js
|
|
43673
|
+
var es_set_is_subset_of_v2 = __webpack_require__("8b00");
|
|
43674
|
+
|
|
43675
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.set.is-superset-of.v2.js
|
|
43676
|
+
var es_set_is_superset_of_v2 = __webpack_require__("a4e7");
|
|
43677
|
+
|
|
43678
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.set.symmetric-difference.v2.js
|
|
43679
|
+
var es_set_symmetric_difference_v2 = __webpack_require__("1e5a");
|
|
43680
|
+
|
|
43681
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.set.union.v2.js
|
|
43682
|
+
var es_set_union_v2 = __webpack_require__("72c3");
|
|
43683
|
+
|
|
43684
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Autocomplete.vue?vue&type=script&lang=js
|
|
43685
|
+
|
|
43686
|
+
|
|
43687
|
+
|
|
43688
|
+
|
|
43689
|
+
|
|
43690
|
+
|
|
43691
|
+
|
|
43692
|
+
|
|
43693
|
+
|
|
43694
|
+
|
|
43695
|
+
|
|
43696
|
+
|
|
43697
|
+
|
|
43698
|
+
|
|
43699
|
+
|
|
43700
|
+
|
|
43701
|
+
/* harmony default export */ var Autocompletevue_type_script_lang_js = ({
|
|
43702
|
+
name: 'Autocomplete',
|
|
43703
|
+
// Vue 2 v-model uses value/input by default
|
|
43704
|
+
props: {
|
|
43705
|
+
value: {
|
|
43706
|
+
type: [String, Number, Array],
|
|
43707
|
+
default: null
|
|
43708
|
+
},
|
|
43709
|
+
// Also support modelValue for Vue 3 compatibility
|
|
43710
|
+
modelValue: {
|
|
43711
|
+
type: [String, Number, Array],
|
|
43712
|
+
default: null
|
|
43713
|
+
},
|
|
43714
|
+
items: {
|
|
43715
|
+
type: Array,
|
|
43716
|
+
default: () => []
|
|
43717
|
+
},
|
|
43718
|
+
// All items (unfiltered) - used for finding selected items
|
|
43719
|
+
allItems: {
|
|
43720
|
+
type: Array,
|
|
43721
|
+
default: null
|
|
43722
|
+
},
|
|
43723
|
+
loading: {
|
|
43724
|
+
type: Boolean,
|
|
43725
|
+
default: false
|
|
43726
|
+
},
|
|
43727
|
+
placeholder: {
|
|
43728
|
+
type: String,
|
|
43729
|
+
default: 'Search and select...'
|
|
43730
|
+
},
|
|
43731
|
+
label: {
|
|
43732
|
+
type: String,
|
|
43733
|
+
default: null
|
|
43734
|
+
},
|
|
43735
|
+
disabled: {
|
|
43736
|
+
type: Boolean,
|
|
43737
|
+
default: false
|
|
43738
|
+
},
|
|
43739
|
+
clearable: {
|
|
43740
|
+
type: Boolean,
|
|
43741
|
+
default: true
|
|
43742
|
+
},
|
|
43743
|
+
density: {
|
|
43744
|
+
type: String,
|
|
43745
|
+
default: 'default',
|
|
43746
|
+
validator: value => ['compact', 'comfortable', 'default'].includes(value)
|
|
43747
|
+
},
|
|
43748
|
+
variant: {
|
|
43749
|
+
type: String,
|
|
43750
|
+
default: 'outlined',
|
|
43751
|
+
validator: value => ['outlined', 'filled', 'underlined', 'solo', 'solo-inverted', 'solo-filled'].includes(value)
|
|
43752
|
+
},
|
|
43753
|
+
multiple: {
|
|
43754
|
+
type: Boolean,
|
|
43755
|
+
default: false
|
|
43756
|
+
},
|
|
43757
|
+
itemTitle: {
|
|
43758
|
+
type: String,
|
|
43759
|
+
default: 'title'
|
|
43760
|
+
},
|
|
43761
|
+
itemValue: {
|
|
43762
|
+
type: String,
|
|
43763
|
+
default: 'value'
|
|
43764
|
+
},
|
|
43765
|
+
noDataText: {
|
|
43766
|
+
type: String,
|
|
43767
|
+
default: 'No data available'
|
|
43768
|
+
},
|
|
43769
|
+
hideDetails: {
|
|
43770
|
+
type: Boolean,
|
|
43771
|
+
default: false
|
|
43772
|
+
},
|
|
43773
|
+
errorMessages: {
|
|
43774
|
+
type: [String, Array],
|
|
43775
|
+
default: null
|
|
43776
|
+
},
|
|
43777
|
+
rules: {
|
|
43778
|
+
type: Array,
|
|
43779
|
+
default: () => []
|
|
43780
|
+
},
|
|
43781
|
+
menuProps: {
|
|
43782
|
+
type: Object,
|
|
43783
|
+
default: () => ({
|
|
43784
|
+
maxHeight: 300
|
|
43785
|
+
})
|
|
43786
|
+
},
|
|
43787
|
+
minSearchLength: {
|
|
43788
|
+
type: Number,
|
|
43789
|
+
default: 0
|
|
43790
|
+
},
|
|
43791
|
+
// Maximum number of chips to display before showing "+ n more"
|
|
43792
|
+
maxVisibleChips: {
|
|
43793
|
+
type: Number,
|
|
43794
|
+
default: null // null means show all
|
|
43795
|
+
},
|
|
43796
|
+
// Action buttons configuration
|
|
43797
|
+
actionButtons: {
|
|
43798
|
+
type: Object,
|
|
43799
|
+
default: () => ({
|
|
43800
|
+
selectAll: false,
|
|
43801
|
+
active: false,
|
|
43802
|
+
inactive: false,
|
|
43803
|
+
clear: false
|
|
43804
|
+
})
|
|
43805
|
+
},
|
|
43806
|
+
// Item display fields - array of field names to display
|
|
43807
|
+
itemFields: {
|
|
43808
|
+
type: Array,
|
|
43809
|
+
default: () => [] // e.g., ['name', 'number', 'status']
|
|
43810
|
+
},
|
|
43811
|
+
// Group display fields - array of field names to display in group header
|
|
43812
|
+
groupFields: {
|
|
43813
|
+
type: Array,
|
|
43814
|
+
default: () => [] // e.g., ['accountName', 'accountNumber']
|
|
43815
|
+
},
|
|
43816
|
+
// Performance: Maximum items to render at once (virtualization)
|
|
43817
|
+
maxRenderItems: {
|
|
43818
|
+
type: Number,
|
|
43819
|
+
default: 100 // Render first 100 items, load more on scroll
|
|
43820
|
+
},
|
|
43821
|
+
// Performance: Enable lazy loading
|
|
43822
|
+
lazyLoad: {
|
|
43823
|
+
type: Boolean,
|
|
43824
|
+
default: false
|
|
43825
|
+
},
|
|
43826
|
+
// Status field configuration for dynamic color formatting
|
|
43827
|
+
statusFieldConfig: {
|
|
43828
|
+
type: Object,
|
|
43829
|
+
default: () => ({
|
|
43830
|
+
fieldName: 'status',
|
|
43831
|
+
// Field name to check for status
|
|
43832
|
+
activeValues: ['active', 'Active', 'true', '1'],
|
|
43833
|
+
// Values considered as active
|
|
43834
|
+
inactiveValues: ['inactive', 'Inactive', 'false', '0'],
|
|
43835
|
+
// Values considered as inactive
|
|
43836
|
+
activeColor: '#28a745',
|
|
43837
|
+
// Green color for active
|
|
43838
|
+
inactiveColor: '#dc3545' // Red color for inactive
|
|
43839
|
+
})
|
|
43840
|
+
}
|
|
43841
|
+
},
|
|
43842
|
+
data() {
|
|
43843
|
+
return {
|
|
43844
|
+
isMenuOpen: false,
|
|
43845
|
+
searchTerm: '',
|
|
43846
|
+
highlightedIndex: -1,
|
|
43847
|
+
renderedItemCount: this.maxRenderItems,
|
|
43848
|
+
filterStatus: null // 'active', 'inactive', or null for all
|
|
43849
|
+
};
|
|
43850
|
+
},
|
|
43851
|
+
computed: {
|
|
43852
|
+
// Get the current value (Vue 2 uses 'value', Vue 3 uses 'modelValue')
|
|
43853
|
+
currentValue() {
|
|
43854
|
+
return this.value !== null && this.value !== undefined ? this.value : this.modelValue;
|
|
43855
|
+
},
|
|
43856
|
+
// Selected value for single select mode
|
|
43857
|
+
selectedValue() {
|
|
43858
|
+
if (this.multiple) return null;
|
|
43859
|
+
return this.currentValue;
|
|
43860
|
+
},
|
|
43861
|
+
displayItems() {
|
|
43862
|
+
return this.items.map(item => ({
|
|
43863
|
+
...item,
|
|
43864
|
+
title: this.getItemText(item),
|
|
43865
|
+
value: this.getItemValue(item)
|
|
43866
|
+
}));
|
|
43867
|
+
},
|
|
43868
|
+
groupedItems() {
|
|
43869
|
+
// Check if items are already grouped (array of groups) or flat with group property
|
|
43870
|
+
if (this.items.length > 0 && Array.isArray(this.items[0].items)) {
|
|
43871
|
+
// Items are already in grouped format: [{ group: 'Group1', items: [...] }, ...]
|
|
43872
|
+
// Preserve all group properties for groupFields display
|
|
43873
|
+
return this.items.map(group => ({
|
|
43874
|
+
...group,
|
|
43875
|
+
raw: group,
|
|
43876
|
+
// Preserve original group data for groupFields
|
|
43877
|
+
group: group.group || group.groupName || ''
|
|
43878
|
+
}));
|
|
43879
|
+
}
|
|
43880
|
+
|
|
43881
|
+
// Group flat items by group property
|
|
43882
|
+
const groups = {};
|
|
43883
|
+
const groupMetadata = {}; // Store metadata for each group (for groupFields display)
|
|
43884
|
+
|
|
43885
|
+
this.displayItems.forEach(item => {
|
|
43886
|
+
const groupName = this.getItemGroup(item) || 'Other';
|
|
43887
|
+
if (!groups[groupName]) {
|
|
43888
|
+
groups[groupName] = [];
|
|
43889
|
+
// Store first item's group metadata for display
|
|
43890
|
+
if (item.raw) {
|
|
43891
|
+
groupMetadata[groupName] = {
|
|
43892
|
+
...item.raw
|
|
43893
|
+
};
|
|
43894
|
+
} else {
|
|
43895
|
+
groupMetadata[groupName] = {
|
|
43896
|
+
...item
|
|
43897
|
+
};
|
|
43898
|
+
}
|
|
43899
|
+
}
|
|
43900
|
+
groups[groupName].push(item);
|
|
43901
|
+
});
|
|
43902
|
+
|
|
43903
|
+
// Convert to array format with metadata
|
|
43904
|
+
return Object.keys(groups).map(groupName => ({
|
|
43905
|
+
group: groupName,
|
|
43906
|
+
items: groups[groupName],
|
|
43907
|
+
raw: groupMetadata[groupName] // Preserve group metadata for groupFields display
|
|
43908
|
+
}));
|
|
43909
|
+
},
|
|
43910
|
+
hasGrouping() {
|
|
43911
|
+
if (this.items.length === 0) return false;
|
|
43912
|
+
// Check if items are in grouped format
|
|
43913
|
+
if (Array.isArray(this.items[0].items)) return true;
|
|
43914
|
+
// Check if items have group property or groupFields is defined
|
|
43915
|
+
if (this.groupFields && this.groupFields.length > 0) {
|
|
43916
|
+
// If groupFields is defined, we should group by the first field
|
|
43917
|
+
return true;
|
|
43918
|
+
}
|
|
43919
|
+
// Check if items have explicit group property
|
|
43920
|
+
return this.displayItems.some(item => this.getItemGroup(item));
|
|
43921
|
+
},
|
|
43922
|
+
flatDisplayItems() {
|
|
43923
|
+
// Flatten grouped items for easier iteration
|
|
43924
|
+
if (this.hasGrouping) {
|
|
43925
|
+
return this.groupedItems.flatMap(group => group.items);
|
|
43926
|
+
}
|
|
43927
|
+
return this.displayItems;
|
|
43928
|
+
},
|
|
43929
|
+
hasItems() {
|
|
43930
|
+
return this.displayItems.length > 0;
|
|
43931
|
+
},
|
|
43932
|
+
menuMaxHeight() {
|
|
43933
|
+
return this.menuProps && this.menuProps.maxHeight || 300;
|
|
43934
|
+
},
|
|
43935
|
+
selectedItems() {
|
|
43936
|
+
if (!this.multiple) return [];
|
|
43937
|
+
|
|
43938
|
+
// Get selected values from currentValue (supports both value and modelValue props)
|
|
43939
|
+
const currentVal = this.currentValue;
|
|
43940
|
+
const selectedValues = Array.isArray(currentVal) ? currentVal : currentVal ? [currentVal] : [];
|
|
43941
|
+
if (selectedValues.length === 0) {
|
|
43942
|
+
return [];
|
|
43943
|
+
}
|
|
43944
|
+
|
|
43945
|
+
// Look through ALL items (unfiltered), not just displayItems (which might be filtered)
|
|
43946
|
+
let itemsToSearch = this.allItems && this.allItems.length > 0 ? this.allItems : this.items;
|
|
43947
|
+
|
|
43948
|
+
// Flatten grouped items if needed
|
|
43949
|
+
if (itemsToSearch.length > 0 && Array.isArray(itemsToSearch[0].items)) {
|
|
43950
|
+
// Items are in grouped format - flatten them
|
|
43951
|
+
itemsToSearch = itemsToSearch.flatMap(group => group.items || []);
|
|
43952
|
+
}
|
|
43953
|
+
const filtered = itemsToSearch.filter(item => {
|
|
43954
|
+
const itemValue = this.getItemValue(item);
|
|
43955
|
+
return selectedValues.some(sv => String(sv) === String(itemValue));
|
|
43956
|
+
});
|
|
43957
|
+
return filtered.map(item => ({
|
|
43958
|
+
...item,
|
|
43959
|
+
title: this.getItemText(item),
|
|
43960
|
+
value: this.getItemValue(item)
|
|
43961
|
+
}));
|
|
43962
|
+
},
|
|
43963
|
+
displayText() {
|
|
43964
|
+
if (this.multiple) return '';
|
|
43965
|
+
const currentVal = this.currentValue;
|
|
43966
|
+
if (!currentVal) return this.searchTerm;
|
|
43967
|
+
const selected = this.displayItems.find(item => String(this.getItemValue(item)) === String(currentVal));
|
|
43968
|
+
return selected ? this.getItemText(selected) : this.searchTerm;
|
|
43969
|
+
},
|
|
43970
|
+
hasError() {
|
|
43971
|
+
return this.errorMessages && this.errorMessages.length > 0 || this.rules && this.rules.length > 0 && this.validateRules().length > 0;
|
|
43972
|
+
},
|
|
43973
|
+
errorMessagesArray() {
|
|
43974
|
+
if (this.errorMessages) {
|
|
43975
|
+
return Array.isArray(this.errorMessages) ? this.errorMessages : [this.errorMessages];
|
|
43976
|
+
}
|
|
43977
|
+
return this.validateRules();
|
|
43978
|
+
},
|
|
43979
|
+
// Chips display logic
|
|
43980
|
+
visibleChips() {
|
|
43981
|
+
return this.selectedItems;
|
|
43982
|
+
},
|
|
43983
|
+
maxVisibleChipsCount() {
|
|
43984
|
+
return this.maxVisibleChips !== null && this.maxVisibleChips !== undefined ? this.maxVisibleChips : this.selectedItems.length;
|
|
43985
|
+
},
|
|
43986
|
+
remainingChipsCount() {
|
|
43987
|
+
if (this.maxVisibleChips === null || this.maxVisibleChips === undefined) return 0;
|
|
43988
|
+
return Math.max(0, this.selectedItems.length - this.maxVisibleChips);
|
|
43989
|
+
},
|
|
43990
|
+
// Action buttons
|
|
43991
|
+
hasActionButtons() {
|
|
43992
|
+
return this.actionButtons && (this.actionButtons.selectAll || this.actionButtons.active || this.actionButtons.inactive || this.actionButtons.clear);
|
|
43993
|
+
},
|
|
43994
|
+
allSelected() {
|
|
43995
|
+
if (!this.multiple) return false;
|
|
43996
|
+
// Check if all filtered items are selected
|
|
43997
|
+
const filteredItems = this.filteredDisplayItems;
|
|
43998
|
+
const selectedValues = Array.isArray(this.currentValue) ? this.currentValue : [];
|
|
43999
|
+
return filteredItems.length > 0 && filteredItems.every(item => {
|
|
44000
|
+
const itemValue = this.getItemValue(item);
|
|
44001
|
+
return selectedValues.some(sv => String(sv) === String(itemValue));
|
|
44002
|
+
});
|
|
44003
|
+
},
|
|
44004
|
+
hasSelectedItems() {
|
|
44005
|
+
if (!this.multiple) return false;
|
|
44006
|
+
const selectedValues = Array.isArray(this.currentValue) ? this.currentValue : [];
|
|
44007
|
+
return selectedValues.length > 0;
|
|
44008
|
+
},
|
|
44009
|
+
// Performance: Filter and paginate items
|
|
44010
|
+
filteredDisplayItems() {
|
|
44011
|
+
let items = this.displayItems;
|
|
44012
|
+
|
|
44013
|
+
// Apply status filter if active
|
|
44014
|
+
if (this.filterStatus) {
|
|
44015
|
+
items = items.filter(item => {
|
|
44016
|
+
// Check status field (case-insensitive)
|
|
44017
|
+
const status = this.getItemFieldValue(item, 'status') || this.getItemFieldValue(item, 'Status') || this.getItemFieldValue(item, 'isActive');
|
|
44018
|
+
const statusStr = String(status).toLowerCase().trim();
|
|
44019
|
+
if (this.filterStatus === 'active') {
|
|
44020
|
+
return statusStr === 'active' || statusStr === 'true' || statusStr === '1';
|
|
44021
|
+
} else if (this.filterStatus === 'inactive') {
|
|
44022
|
+
return statusStr === 'inactive' || statusStr === 'false' || statusStr === '0';
|
|
44023
|
+
}
|
|
44024
|
+
return true;
|
|
44025
|
+
});
|
|
44026
|
+
}
|
|
44027
|
+
return items;
|
|
44028
|
+
},
|
|
44029
|
+
// Performance: Limit rendered items
|
|
44030
|
+
paginatedDisplayItems() {
|
|
44031
|
+
if (this.lazyLoad && this.filteredDisplayItems.length > this.renderedItemCount) {
|
|
44032
|
+
return this.filteredDisplayItems.slice(0, this.renderedItemCount);
|
|
44033
|
+
}
|
|
44034
|
+
return this.filteredDisplayItems;
|
|
44035
|
+
},
|
|
44036
|
+
// Update grouped items to use paginated/filtered items
|
|
44037
|
+
paginatedGroupedItems() {
|
|
44038
|
+
if (!this.hasGrouping) return [];
|
|
44039
|
+
let groups = this.groupedItems;
|
|
44040
|
+
|
|
44041
|
+
// Apply status filter if active
|
|
44042
|
+
if (this.filterStatus) {
|
|
44043
|
+
groups = groups.map(group => ({
|
|
44044
|
+
...group,
|
|
44045
|
+
items: group.items.filter(item => {
|
|
44046
|
+
// Check status field (case-insensitive)
|
|
44047
|
+
const status = this.getItemFieldValue(item, 'status') || this.getItemFieldValue(item, 'Status') || this.getItemFieldValue(item, 'isActive');
|
|
44048
|
+
const statusStr = String(status).toLowerCase().trim();
|
|
44049
|
+
if (this.filterStatus === 'active') {
|
|
44050
|
+
return statusStr === 'active' || statusStr === 'true' || statusStr === '1';
|
|
44051
|
+
} else if (this.filterStatus === 'inactive') {
|
|
44052
|
+
return statusStr === 'inactive' || statusStr === 'false' || statusStr === '0';
|
|
44053
|
+
}
|
|
44054
|
+
return true;
|
|
44055
|
+
})
|
|
44056
|
+
})).filter(group => group.items.length > 0);
|
|
44057
|
+
}
|
|
44058
|
+
|
|
44059
|
+
// Apply pagination if lazy load is enabled
|
|
44060
|
+
if (this.lazyLoad) {
|
|
44061
|
+
let itemCount = 0;
|
|
44062
|
+
const result = [];
|
|
44063
|
+
for (const group of groups) {
|
|
44064
|
+
if (itemCount >= this.renderedItemCount) break;
|
|
44065
|
+
const remaining = this.renderedItemCount - itemCount;
|
|
44066
|
+
result.push({
|
|
44067
|
+
...group,
|
|
44068
|
+
items: group.items.slice(0, remaining)
|
|
44069
|
+
});
|
|
44070
|
+
itemCount += group.items.length;
|
|
44071
|
+
}
|
|
44072
|
+
return result;
|
|
44073
|
+
}
|
|
44074
|
+
return groups;
|
|
44075
|
+
}
|
|
44076
|
+
},
|
|
44077
|
+
watch: {
|
|
44078
|
+
items() {
|
|
44079
|
+
// Reset highlight when items change
|
|
44080
|
+
this.highlightedIndex = -1;
|
|
44081
|
+
},
|
|
44082
|
+
hasGrouping() {
|
|
44083
|
+
// Reset highlight when grouping changes
|
|
44084
|
+
this.highlightedIndex = -1;
|
|
44085
|
+
},
|
|
44086
|
+
modelValue: {
|
|
44087
|
+
handler(newVal, oldVal) {
|
|
44088
|
+
// Reset search term when value changes externally
|
|
44089
|
+
if (this.multiple) {
|
|
44090
|
+
// For multiple, keep search term
|
|
44091
|
+
} else {
|
|
44092
|
+
// For single select, clear search term if value is cleared
|
|
44093
|
+
if (!newVal && this.searchTerm) {
|
|
44094
|
+
this.searchTerm = '';
|
|
44095
|
+
}
|
|
44096
|
+
}
|
|
44097
|
+
},
|
|
44098
|
+
immediate: true,
|
|
44099
|
+
deep: true
|
|
44100
|
+
},
|
|
44101
|
+
value: {
|
|
44102
|
+
handler(newVal, oldVal) {
|
|
44103
|
+
// Reset search term when value changes externally
|
|
44104
|
+
if (this.multiple) {
|
|
44105
|
+
// For multiple, keep search term
|
|
44106
|
+
} else {
|
|
44107
|
+
// For single select, clear search term if value is cleared
|
|
44108
|
+
if (!newVal && this.searchTerm) {
|
|
44109
|
+
this.searchTerm = '';
|
|
44110
|
+
}
|
|
44111
|
+
}
|
|
44112
|
+
},
|
|
44113
|
+
immediate: true,
|
|
44114
|
+
deep: true
|
|
44115
|
+
}
|
|
44116
|
+
},
|
|
44117
|
+
mounted() {
|
|
44118
|
+
// Close menu when clicking outside
|
|
44119
|
+
document.addEventListener('click', this.handleClickOutside);
|
|
44120
|
+
},
|
|
44121
|
+
beforeDestroy() {
|
|
44122
|
+
document.removeEventListener('click', this.handleClickOutside);
|
|
44123
|
+
},
|
|
44124
|
+
methods: {
|
|
44125
|
+
getItemText(item) {
|
|
44126
|
+
if (item.raw) {
|
|
44127
|
+
return item.raw.text || item.raw.title || item.raw[this.itemTitle] || '';
|
|
44128
|
+
}
|
|
44129
|
+
return item.text || item.title || item[this.itemTitle] || '';
|
|
44130
|
+
},
|
|
44131
|
+
getItemValue(item) {
|
|
44132
|
+
let value;
|
|
44133
|
+
if (item.raw) {
|
|
44134
|
+
value = item.raw.value !== undefined && item.raw.value !== null ? item.raw.value : item.raw[this.itemValue] !== undefined && item.raw[this.itemValue] !== null ? item.raw[this.itemValue] : null;
|
|
44135
|
+
} else {
|
|
44136
|
+
value = item.value !== undefined && item.value !== null ? item.value : item[this.itemValue] !== undefined && item[this.itemValue] !== null ? item[this.itemValue] : null;
|
|
44137
|
+
}
|
|
44138
|
+
|
|
44139
|
+
// Ensure we have a valid value - use index as fallback if needed
|
|
44140
|
+
if (value === null || value === undefined) {
|
|
44141
|
+
// Try to find the item's index in the items array
|
|
44142
|
+
const itemIndex = this.items.findIndex(i => i === item || item.raw && i === item.raw);
|
|
44143
|
+
if (itemIndex > -1) {
|
|
44144
|
+
value = `item-${itemIndex}`;
|
|
44145
|
+
} else {
|
|
44146
|
+
console.warn('Autocomplete: Item has no value and could not determine index', item);
|
|
44147
|
+
value = `item-${Date.now()}-${Math.random()}`;
|
|
44148
|
+
}
|
|
44149
|
+
}
|
|
44150
|
+
return value;
|
|
44151
|
+
},
|
|
44152
|
+
getItemDescription(item) {
|
|
44153
|
+
if (item.raw) {
|
|
44154
|
+
return item.raw.description || item.raw.subtitle || '';
|
|
44155
|
+
}
|
|
44156
|
+
return item.description || item.subtitle || '';
|
|
44157
|
+
},
|
|
44158
|
+
getItemGroup(item) {
|
|
44159
|
+
if (item.raw) {
|
|
44160
|
+
// Priority: groupFields > group/groupName
|
|
44161
|
+
// If groupFields is defined, use the first field as grouping field (highest priority)
|
|
44162
|
+
if (this.groupFields && this.groupFields.length > 0) {
|
|
44163
|
+
const groupValue = item.raw[this.groupFields[0]];
|
|
44164
|
+
if (groupValue !== undefined && groupValue !== null && groupValue !== '') {
|
|
44165
|
+
return String(groupValue);
|
|
44166
|
+
}
|
|
44167
|
+
}
|
|
44168
|
+
// Fallback to explicit group/groupName
|
|
44169
|
+
if (item.raw.group || item.raw.groupName) {
|
|
44170
|
+
return item.raw.group || item.raw.groupName;
|
|
44171
|
+
}
|
|
44172
|
+
return '';
|
|
44173
|
+
}
|
|
44174
|
+
// Priority: groupFields > group/groupName
|
|
44175
|
+
// If groupFields is defined, use the first field as grouping field (highest priority)
|
|
44176
|
+
if (this.groupFields && this.groupFields.length > 0) {
|
|
44177
|
+
const groupValue = item[this.groupFields[0]];
|
|
44178
|
+
if (groupValue !== undefined && groupValue !== null && groupValue !== '') {
|
|
44179
|
+
return String(groupValue);
|
|
44180
|
+
}
|
|
44181
|
+
}
|
|
44182
|
+
// Fallback to explicit group/groupName
|
|
44183
|
+
if (item.group || item.groupName) {
|
|
44184
|
+
return item.group || item.groupName;
|
|
44185
|
+
}
|
|
44186
|
+
return '';
|
|
44187
|
+
},
|
|
44188
|
+
getItemFieldValue(item, field) {
|
|
44189
|
+
if (item.raw) {
|
|
44190
|
+
return item.raw[field] || '';
|
|
44191
|
+
}
|
|
44192
|
+
return item[field] || '';
|
|
44193
|
+
},
|
|
44194
|
+
getGroupFieldValue(group, field) {
|
|
44195
|
+
if (group.raw) {
|
|
44196
|
+
return group.raw[field] || '';
|
|
44197
|
+
}
|
|
44198
|
+
return group[field] || '';
|
|
44199
|
+
},
|
|
44200
|
+
isSelected(item) {
|
|
44201
|
+
const value = this.getItemValue(item);
|
|
44202
|
+
const currentVal = this.currentValue;
|
|
44203
|
+
if (this.multiple) {
|
|
44204
|
+
const selectedValues = Array.isArray(currentVal) ? currentVal : currentVal ? [currentVal] : [];
|
|
44205
|
+
// Compare values with type coercion to handle string/number mismatches
|
|
44206
|
+
return selectedValues.some(sv => String(sv) === String(value));
|
|
44207
|
+
}
|
|
44208
|
+
return currentVal !== null && currentVal !== undefined && String(currentVal) === String(value);
|
|
44209
|
+
},
|
|
44210
|
+
onInput(event) {
|
|
44211
|
+
this.searchTerm = event.target.value;
|
|
44212
|
+
this.isMenuOpen = true;
|
|
44213
|
+
this.$emit('update:search', this.searchTerm);
|
|
44214
|
+
this.$emit('search', this.searchTerm);
|
|
44215
|
+
},
|
|
44216
|
+
onFocus() {
|
|
44217
|
+
this.isMenuOpen = true;
|
|
44218
|
+
this.$emit('focus');
|
|
44219
|
+
},
|
|
44220
|
+
onBlur() {
|
|
44221
|
+
// Delay to allow click events to fire
|
|
44222
|
+
setTimeout(() => {
|
|
44223
|
+
if (!this.multiple) {
|
|
44224
|
+
// Restore selected value text if no selection made
|
|
44225
|
+
if (this.selectedValue) {
|
|
44226
|
+
const selected = this.displayItems.find(item => this.getItemValue(item) === this.selectedValue);
|
|
44227
|
+
if (selected && this.searchTerm !== this.getItemText(selected)) {
|
|
44228
|
+
this.searchTerm = '';
|
|
44229
|
+
}
|
|
44230
|
+
}
|
|
44231
|
+
}
|
|
44232
|
+
this.$emit('blur');
|
|
44233
|
+
}, 200);
|
|
44234
|
+
},
|
|
44235
|
+
toggleMenu() {
|
|
44236
|
+
if (this.disabled) return;
|
|
44237
|
+
this.isMenuOpen = !this.isMenuOpen;
|
|
44238
|
+
if (this.isMenuOpen) {
|
|
44239
|
+
this.$nextTick(() => {
|
|
44240
|
+
var _this$$refs$input;
|
|
44241
|
+
(_this$$refs$input = this.$refs.input) === null || _this$$refs$input === void 0 || _this$$refs$input.focus();
|
|
44242
|
+
});
|
|
44243
|
+
}
|
|
44244
|
+
},
|
|
44245
|
+
closeMenu() {
|
|
44246
|
+
this.isMenuOpen = false;
|
|
44247
|
+
this.highlightedIndex = -1;
|
|
44248
|
+
},
|
|
44249
|
+
selectItem(item, event) {
|
|
44250
|
+
// Prevent event from bubbling and default behavior
|
|
44251
|
+
if (event) {
|
|
44252
|
+
event.preventDefault();
|
|
44253
|
+
event.stopPropagation();
|
|
44254
|
+
event.stopImmediatePropagation();
|
|
44255
|
+
}
|
|
44256
|
+
|
|
44257
|
+
// Debug logging
|
|
44258
|
+
console.log('selectItem called for single item:', item);
|
|
44259
|
+
console.log('Item value:', this.getItemValue(item));
|
|
44260
|
+
const value = this.getItemValue(item);
|
|
44261
|
+
const currentVal = this.currentValue;
|
|
44262
|
+
if (this.multiple) {
|
|
44263
|
+
// Ensure we start with an array
|
|
44264
|
+
const currentValues = Array.isArray(currentVal) ? [...currentVal] : currentVal ? [currentVal] : [];
|
|
44265
|
+
const selectedValues = [...currentValues];
|
|
44266
|
+
|
|
44267
|
+
// Find index with type coercion
|
|
44268
|
+
const index = selectedValues.findIndex(sv => String(sv) === String(value));
|
|
44269
|
+
console.log('Current selected values:', selectedValues);
|
|
44270
|
+
console.log('Item value to toggle:', value);
|
|
44271
|
+
console.log('Index found:', index);
|
|
44272
|
+
if (index > -1) {
|
|
44273
|
+
// Remove if already selected
|
|
44274
|
+
selectedValues.splice(index, 1);
|
|
44275
|
+
console.log('Removed item. New selection:', selectedValues);
|
|
44276
|
+
} else {
|
|
44277
|
+
// Add if not selected - ONLY this single item
|
|
44278
|
+
selectedValues.push(value);
|
|
44279
|
+
console.log('Added single item. New selection:', selectedValues);
|
|
44280
|
+
}
|
|
44281
|
+
|
|
44282
|
+
// Emit both events for Vue 2 and Vue 3 compatibility
|
|
44283
|
+
this.$emit('input', selectedValues);
|
|
44284
|
+
this.$emit('update:modelValue', selectedValues);
|
|
44285
|
+
this.$emit('change', selectedValues);
|
|
44286
|
+
} else {
|
|
44287
|
+
this.searchTerm = '';
|
|
44288
|
+
this.isMenuOpen = false;
|
|
44289
|
+
// Emit both events for Vue 2 and Vue 3 compatibility
|
|
44290
|
+
this.$emit('input', value);
|
|
44291
|
+
this.$emit('update:modelValue', value);
|
|
44292
|
+
this.$emit('change', value);
|
|
44293
|
+
}
|
|
44294
|
+
},
|
|
44295
|
+
removeItem(value) {
|
|
44296
|
+
if (this.multiple) {
|
|
44297
|
+
const currentVal = this.currentValue;
|
|
44298
|
+
const selectedValues = Array.isArray(currentVal) ? [...currentVal] : [];
|
|
44299
|
+
const index = selectedValues.findIndex(sv => String(sv) === String(value));
|
|
44300
|
+
if (index > -1) {
|
|
44301
|
+
selectedValues.splice(index, 1);
|
|
44302
|
+
// Emit both events for Vue 2 and Vue 3 compatibility
|
|
44303
|
+
this.$emit('input', selectedValues);
|
|
44304
|
+
this.$emit('update:modelValue', selectedValues);
|
|
44305
|
+
this.$emit('change', selectedValues);
|
|
44306
|
+
}
|
|
44307
|
+
}
|
|
44308
|
+
},
|
|
44309
|
+
clearSelection() {
|
|
44310
|
+
if (this.multiple) {
|
|
44311
|
+
// Emit both events for Vue 2 and Vue 3 compatibility
|
|
44312
|
+
this.$emit('input', []);
|
|
44313
|
+
this.$emit('update:modelValue', []);
|
|
44314
|
+
this.$emit('change', []);
|
|
44315
|
+
} else {
|
|
44316
|
+
this.searchTerm = '';
|
|
44317
|
+
// Emit both events for Vue 2 and Vue 3 compatibility
|
|
44318
|
+
this.$emit('input', null);
|
|
44319
|
+
this.$emit('update:modelValue', null);
|
|
44320
|
+
this.$emit('change', null);
|
|
44321
|
+
}
|
|
44322
|
+
this.isMenuOpen = false;
|
|
44323
|
+
},
|
|
44324
|
+
getFlatIndex(groupIndex, itemIndex) {
|
|
44325
|
+
// Calculate flat index from group and item indices
|
|
44326
|
+
let flatIndex = 0;
|
|
44327
|
+
for (let i = 0; i < groupIndex; i++) {
|
|
44328
|
+
flatIndex += this.groupedItems[i].items.length;
|
|
44329
|
+
}
|
|
44330
|
+
return flatIndex + itemIndex;
|
|
44331
|
+
},
|
|
44332
|
+
getItemFromFlatIndex(flatIndex) {
|
|
44333
|
+
// Get item from flat index when items are grouped
|
|
44334
|
+
if (!this.hasGrouping) {
|
|
44335
|
+
return this.displayItems[flatIndex];
|
|
44336
|
+
}
|
|
44337
|
+
let currentIndex = 0;
|
|
44338
|
+
for (const group of this.groupedItems) {
|
|
44339
|
+
if (flatIndex < currentIndex + group.items.length) {
|
|
44340
|
+
return group.items[flatIndex - currentIndex];
|
|
44341
|
+
}
|
|
44342
|
+
currentIndex += group.items.length;
|
|
44343
|
+
}
|
|
44344
|
+
return null;
|
|
44345
|
+
},
|
|
44346
|
+
handleEnter() {
|
|
44347
|
+
if (this.isMenuOpen && this.highlightedIndex >= 0) {
|
|
44348
|
+
const item = this.hasGrouping ? this.getItemFromFlatIndex(this.highlightedIndex) : this.displayItems[this.highlightedIndex];
|
|
44349
|
+
if (item) {
|
|
44350
|
+
this.selectItem(item, null);
|
|
44351
|
+
}
|
|
44352
|
+
} else if (this.isMenuOpen && this.flatDisplayItems.length === 1) {
|
|
44353
|
+
this.selectItem(this.flatDisplayItems[0], null);
|
|
44354
|
+
}
|
|
44355
|
+
},
|
|
44356
|
+
navigateDown() {
|
|
44357
|
+
if (!this.isMenuOpen) {
|
|
44358
|
+
this.isMenuOpen = true;
|
|
44359
|
+
return;
|
|
44360
|
+
}
|
|
44361
|
+
const maxIndex = this.flatDisplayItems.length - 1;
|
|
44362
|
+
if (this.highlightedIndex < maxIndex) {
|
|
44363
|
+
this.highlightedIndex++;
|
|
44364
|
+
this.scrollToHighlighted();
|
|
44365
|
+
}
|
|
44366
|
+
},
|
|
44367
|
+
navigateUp() {
|
|
44368
|
+
if (this.highlightedIndex > 0) {
|
|
44369
|
+
this.highlightedIndex--;
|
|
44370
|
+
this.scrollToHighlighted();
|
|
44371
|
+
}
|
|
44372
|
+
},
|
|
44373
|
+
scrollToHighlighted() {
|
|
44374
|
+
this.$nextTick(() => {
|
|
44375
|
+
if (this.$refs.menu) {
|
|
44376
|
+
const items = this.$refs.menu.querySelectorAll('.autocomplete-item');
|
|
44377
|
+
if (items[this.highlightedIndex]) {
|
|
44378
|
+
items[this.highlightedIndex].scrollIntoView({
|
|
44379
|
+
block: 'nearest',
|
|
44380
|
+
behavior: 'smooth'
|
|
44381
|
+
});
|
|
44382
|
+
}
|
|
44383
|
+
}
|
|
44384
|
+
});
|
|
44385
|
+
},
|
|
44386
|
+
handleBackspace() {
|
|
44387
|
+
if (this.multiple && this.searchTerm === '') {
|
|
44388
|
+
const currentVal = this.currentValue;
|
|
44389
|
+
const selectedValues = Array.isArray(currentVal) ? currentVal : [];
|
|
44390
|
+
if (selectedValues.length > 0) {
|
|
44391
|
+
this.removeItem(selectedValues[selectedValues.length - 1]);
|
|
44392
|
+
}
|
|
44393
|
+
}
|
|
44394
|
+
},
|
|
44395
|
+
handleClickOutside(event) {
|
|
44396
|
+
if (this.$el && !this.$el.contains(event.target)) {
|
|
44397
|
+
this.closeMenu();
|
|
44398
|
+
}
|
|
44399
|
+
},
|
|
44400
|
+
validateRules() {
|
|
44401
|
+
if (!this.rules || this.rules.length === 0) return [];
|
|
44402
|
+
const errors = [];
|
|
44403
|
+
const value = this.currentValue;
|
|
44404
|
+
this.rules.forEach(rule => {
|
|
44405
|
+
if (typeof rule === 'function') {
|
|
44406
|
+
const result = rule(value);
|
|
44407
|
+
if (result !== true && result !== undefined) {
|
|
44408
|
+
errors.push(result);
|
|
44409
|
+
}
|
|
44410
|
+
}
|
|
44411
|
+
});
|
|
44412
|
+
return errors;
|
|
44413
|
+
},
|
|
44414
|
+
// Action button methods
|
|
44415
|
+
selectAll(event) {
|
|
44416
|
+
// Prevent event from bubbling
|
|
44417
|
+
if (event) {
|
|
44418
|
+
event.preventDefault();
|
|
44419
|
+
event.stopPropagation();
|
|
44420
|
+
event.stopImmediatePropagation();
|
|
44421
|
+
}
|
|
44422
|
+
console.log('selectAll called - this should only be called from the Select All button');
|
|
44423
|
+
if (!this.multiple) return;
|
|
44424
|
+
// Select all items from the currently filtered/displayed items
|
|
44425
|
+
const allItems = this.filteredDisplayItems;
|
|
44426
|
+
const allValues = allItems.map(item => this.getItemValue(item));
|
|
44427
|
+
// Merge with existing selections to avoid deselecting items not in current filter
|
|
44428
|
+
const currentValues = Array.isArray(this.currentValue) ? this.currentValue : [];
|
|
44429
|
+
const mergedValues = [...new Set([...currentValues, ...allValues])];
|
|
44430
|
+
console.log('Select All - all values:', mergedValues);
|
|
44431
|
+
this.$emit('input', mergedValues);
|
|
44432
|
+
this.$emit('update:modelValue', mergedValues);
|
|
44433
|
+
this.$emit('change', mergedValues);
|
|
44434
|
+
},
|
|
44435
|
+
filterByStatus(status) {
|
|
44436
|
+
if (this.filterStatus === status) {
|
|
44437
|
+
// Toggle off if clicking the same filter
|
|
44438
|
+
this.filterStatus = null;
|
|
44439
|
+
} else {
|
|
44440
|
+
this.filterStatus = status;
|
|
44441
|
+
}
|
|
44442
|
+
// Reset pagination when filter changes
|
|
44443
|
+
this.renderedItemCount = this.maxRenderItems;
|
|
44444
|
+
// Reset highlight when filter changes
|
|
44445
|
+
this.highlightedIndex = -1;
|
|
44446
|
+
},
|
|
44447
|
+
formatItemFields(item) {
|
|
44448
|
+
if (!this.itemFields || this.itemFields.length === 0) return '';
|
|
44449
|
+
const formattedValues = this.itemFields.map((field, index) => {
|
|
44450
|
+
const value = this.getItemFieldValue(item, field);
|
|
44451
|
+
if (!value && value !== 0) return '';
|
|
44452
|
+
|
|
44453
|
+
// Check if this field is the status field and apply color formatting
|
|
44454
|
+
if (field.toLowerCase() === this.statusFieldConfig.fieldName.toLowerCase()) {
|
|
44455
|
+
const statusStr = String(value).toLowerCase().trim();
|
|
44456
|
+
const isActive = this.statusFieldConfig.activeValues.some(av => String(av).toLowerCase() === statusStr);
|
|
44457
|
+
const isInactive = this.statusFieldConfig.inactiveValues.some(iv => String(iv).toLowerCase() === statusStr);
|
|
44458
|
+
let color = '';
|
|
44459
|
+
if (isActive) {
|
|
44460
|
+
color = this.statusFieldConfig.activeColor;
|
|
44461
|
+
} else if (isInactive) {
|
|
44462
|
+
color = this.statusFieldConfig.inactiveColor;
|
|
44463
|
+
}
|
|
44464
|
+
if (color) {
|
|
44465
|
+
return `<span style="color: ${color};">${value}</span>`;
|
|
44466
|
+
}
|
|
44467
|
+
}
|
|
44468
|
+
return String(value);
|
|
44469
|
+
}).filter(v => v !== '');
|
|
44470
|
+
if (formattedValues.length === 0) return '';
|
|
44471
|
+
|
|
44472
|
+
// Format: {field1} - {field2} ({field3})
|
|
44473
|
+
// Example: customerName - customerNumber (Status)
|
|
44474
|
+
if (formattedValues.length === 1) {
|
|
44475
|
+
return formattedValues[0];
|
|
44476
|
+
} else if (formattedValues.length === 2) {
|
|
44477
|
+
// field1 - field2
|
|
44478
|
+
return `${formattedValues[0]} - ${formattedValues[1]}`;
|
|
44479
|
+
} else if (formattedValues.length >= 3) {
|
|
44480
|
+
// field1 - field2 (field3, field4, ...)
|
|
44481
|
+
const firstTwo = formattedValues.slice(0, 2).filter(v => v).join(' - ');
|
|
44482
|
+
const rest = formattedValues.slice(2).filter(v => v).join(', ');
|
|
44483
|
+
if (rest) {
|
|
44484
|
+
return `${firstTwo} (${rest})`;
|
|
44485
|
+
}
|
|
44486
|
+
return firstTwo;
|
|
44487
|
+
}
|
|
44488
|
+
return '';
|
|
44489
|
+
},
|
|
44490
|
+
getChipText(item) {
|
|
44491
|
+
// If itemFields is provided, use formatItemFields, otherwise use getItemText
|
|
44492
|
+
if (this.itemFields && this.itemFields.length > 0) {
|
|
44493
|
+
return this.formatItemFields(item) || this.getItemText(item);
|
|
44494
|
+
}
|
|
44495
|
+
return this.getItemText(item);
|
|
44496
|
+
},
|
|
44497
|
+
onMenuScroll(event) {
|
|
44498
|
+
if (!this.lazyLoad) return;
|
|
44499
|
+
const target = event.target;
|
|
44500
|
+
const scrollBottom = target.scrollHeight - target.scrollTop - target.clientHeight;
|
|
44501
|
+
|
|
44502
|
+
// Load more items when scrolled near bottom (within 50px)
|
|
44503
|
+
if (scrollBottom < 50 && this.renderedItemCount < this.filteredDisplayItems.length) {
|
|
44504
|
+
this.renderedItemCount = Math.min(this.renderedItemCount + this.maxRenderItems, this.filteredDisplayItems.length);
|
|
44505
|
+
}
|
|
44506
|
+
}
|
|
44507
|
+
}
|
|
44508
|
+
});
|
|
44509
|
+
// CONCATENATED MODULE: ./src/components/Autocomplete.vue?vue&type=script&lang=js
|
|
44510
|
+
/* harmony default export */ var components_Autocompletevue_type_script_lang_js = (Autocompletevue_type_script_lang_js);
|
|
44511
|
+
// EXTERNAL MODULE: ./src/components/Autocomplete.vue?vue&type=style&index=0&id=723cadb2&prod&scoped=true&lang=css
|
|
44512
|
+
var Autocompletevue_type_style_index_0_id_723cadb2_prod_scoped_true_lang_css = __webpack_require__("f9c7");
|
|
44513
|
+
|
|
44514
|
+
// CONCATENATED MODULE: ./src/components/Autocomplete.vue
|
|
44515
|
+
|
|
44516
|
+
|
|
44517
|
+
|
|
44518
|
+
|
|
44519
|
+
|
|
44520
|
+
|
|
44521
|
+
/* normalize component */
|
|
44522
|
+
|
|
44523
|
+
var Autocomplete_component = normalizeComponent(
|
|
44524
|
+
components_Autocompletevue_type_script_lang_js,
|
|
44525
|
+
Autocompletevue_type_template_id_723cadb2_scoped_true_render,
|
|
44526
|
+
Autocompletevue_type_template_id_723cadb2_scoped_true_staticRenderFns,
|
|
44527
|
+
false,
|
|
44528
|
+
null,
|
|
44529
|
+
"723cadb2",
|
|
44530
|
+
null
|
|
44531
|
+
|
|
44532
|
+
)
|
|
44533
|
+
|
|
44534
|
+
/* harmony default export */ var Autocomplete = (Autocomplete_component.exports);
|
|
44535
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/SearchableSelect.vue?vue&type=script&lang=js
|
|
44536
|
+
|
|
44537
|
+
|
|
44538
|
+
|
|
44539
|
+
|
|
44540
|
+
|
|
44541
|
+
|
|
44542
|
+
//import { lookupService } from '../../services/locateBillingService'
|
|
44543
|
+
|
|
44544
|
+
// Simple debounce function
|
|
44545
|
+
function SearchableSelectvue_type_script_lang_js_debounce(func, wait) {
|
|
44546
|
+
let timeout;
|
|
44547
|
+
return function executedFunction(...args) {
|
|
44548
|
+
const later = () => {
|
|
44549
|
+
clearTimeout(timeout);
|
|
44550
|
+
func(...args);
|
|
44551
|
+
};
|
|
44552
|
+
clearTimeout(timeout);
|
|
44553
|
+
timeout = setTimeout(later, wait);
|
|
44554
|
+
};
|
|
44555
|
+
}
|
|
44556
|
+
/* harmony default export */ var SearchableSelectvue_type_script_lang_js = ({
|
|
44557
|
+
name: 'SearchableSelect',
|
|
44558
|
+
components: {
|
|
44559
|
+
Autocomplete: Autocomplete
|
|
44560
|
+
},
|
|
44561
|
+
// Vue 2 v-model uses value/input by default - no model option needed
|
|
44562
|
+
props: {
|
|
44563
|
+
value: {
|
|
44564
|
+
type: [String, Number, Array],
|
|
44565
|
+
default: null
|
|
44566
|
+
},
|
|
44567
|
+
// Local items array - if provided, will use these instead of remote lookup
|
|
44568
|
+
items: {
|
|
44569
|
+
type: Array,
|
|
44570
|
+
default: () => null
|
|
44571
|
+
},
|
|
44572
|
+
// Remote lookup type - required only if items prop is not provided
|
|
44573
|
+
type: {
|
|
44574
|
+
type: String,
|
|
44575
|
+
required: false,
|
|
44576
|
+
default: null
|
|
44577
|
+
},
|
|
44578
|
+
category: {
|
|
44579
|
+
type: String,
|
|
44580
|
+
default: null
|
|
44581
|
+
},
|
|
44582
|
+
multiple: {
|
|
44583
|
+
type: Boolean,
|
|
44584
|
+
default: false
|
|
44585
|
+
},
|
|
44586
|
+
placeholder: {
|
|
44587
|
+
type: String,
|
|
44588
|
+
default: 'Search and select...'
|
|
44589
|
+
},
|
|
44590
|
+
label: {
|
|
44591
|
+
type: String,
|
|
44592
|
+
default: null
|
|
44593
|
+
},
|
|
44594
|
+
disabled: {
|
|
44595
|
+
type: Boolean,
|
|
44596
|
+
default: false
|
|
44597
|
+
},
|
|
44598
|
+
clearable: {
|
|
44599
|
+
type: Boolean,
|
|
44600
|
+
default: true
|
|
44601
|
+
},
|
|
44602
|
+
density: {
|
|
44603
|
+
type: String,
|
|
44604
|
+
default: 'default',
|
|
44605
|
+
validator: value => ['compact', 'comfortable', 'default'].includes(value)
|
|
44606
|
+
},
|
|
44607
|
+
variant: {
|
|
44608
|
+
type: String,
|
|
44609
|
+
default: 'outlined',
|
|
44610
|
+
validator: value => ['outlined', 'filled', 'underlined', 'solo', 'solo-inverted', 'solo-filled'].includes(value)
|
|
44611
|
+
},
|
|
44612
|
+
minSearchLength: {
|
|
44613
|
+
type: Number,
|
|
44614
|
+
default: 2
|
|
44615
|
+
},
|
|
44616
|
+
debounceMs: {
|
|
44617
|
+
type: Number,
|
|
44618
|
+
default: 300
|
|
44619
|
+
},
|
|
44620
|
+
pageSize: {
|
|
44621
|
+
type: Number,
|
|
44622
|
+
default: 50
|
|
44623
|
+
},
|
|
44624
|
+
maxItems: {
|
|
44625
|
+
type: Number,
|
|
44626
|
+
default: 1000
|
|
44627
|
+
},
|
|
44628
|
+
noDataText: {
|
|
44629
|
+
type: String,
|
|
44630
|
+
default: 'No data available'
|
|
44631
|
+
},
|
|
44632
|
+
hideDetails: {
|
|
44633
|
+
type: Boolean,
|
|
44634
|
+
default: false
|
|
44635
|
+
},
|
|
44636
|
+
errorMessages: {
|
|
44637
|
+
type: [String, Array],
|
|
44638
|
+
default: null
|
|
44639
|
+
},
|
|
44640
|
+
rules: {
|
|
44641
|
+
type: Array,
|
|
44642
|
+
default: () => []
|
|
44643
|
+
},
|
|
44644
|
+
filters: {
|
|
44645
|
+
type: Object,
|
|
44646
|
+
default: () => ({})
|
|
44647
|
+
},
|
|
44648
|
+
// Maximum number of chips to display before showing "+ n more"
|
|
44649
|
+
maxVisibleChips: {
|
|
44650
|
+
type: Number,
|
|
44651
|
+
default: null // null means show all
|
|
44652
|
+
},
|
|
44653
|
+
// Action buttons configuration
|
|
44654
|
+
actionButtons: {
|
|
44655
|
+
type: Object,
|
|
44656
|
+
default: () => ({
|
|
44657
|
+
selectAll: false,
|
|
44658
|
+
active: false,
|
|
44659
|
+
inactive: false,
|
|
44660
|
+
clear: false
|
|
44661
|
+
})
|
|
44662
|
+
},
|
|
44663
|
+
// Item display fields - array of field names to display
|
|
44664
|
+
itemFields: {
|
|
44665
|
+
type: Array,
|
|
44666
|
+
default: () => [] // e.g., ['name', 'number', 'status']
|
|
44667
|
+
},
|
|
44668
|
+
// Group display fields - array of field names to display in group header
|
|
44669
|
+
groupFields: {
|
|
44670
|
+
type: Array,
|
|
44671
|
+
default: () => [] // e.g., ['accountName', 'accountNumber']
|
|
44672
|
+
},
|
|
44673
|
+
// Performance: Maximum items to render at once (virtualization)
|
|
44674
|
+
maxRenderItems: {
|
|
44675
|
+
type: Number,
|
|
44676
|
+
default: 100 // Render first 100 items, load more on scroll
|
|
44677
|
+
},
|
|
44678
|
+
// Performance: Enable lazy loading
|
|
44679
|
+
lazyLoad: {
|
|
44680
|
+
type: Boolean,
|
|
44681
|
+
default: false
|
|
44682
|
+
},
|
|
44683
|
+
// Status field configuration for dynamic color formatting
|
|
44684
|
+
statusFieldConfig: {
|
|
44685
|
+
type: Object,
|
|
44686
|
+
default: () => ({
|
|
44687
|
+
fieldName: 'status',
|
|
44688
|
+
// Field name to check for status
|
|
44689
|
+
activeValues: ['active', 'Active', 'true', '1'],
|
|
44690
|
+
// Values considered as active
|
|
44691
|
+
inactiveValues: ['inactive', 'Inactive', 'false', '0'],
|
|
44692
|
+
// Values considered as inactive
|
|
44693
|
+
activeColor: '#28a745',
|
|
44694
|
+
// Green color for active
|
|
44695
|
+
inactiveColor: '#dc3545' // Red color for inactive
|
|
44696
|
+
})
|
|
44697
|
+
}
|
|
44698
|
+
},
|
|
44699
|
+
data() {
|
|
44700
|
+
return {
|
|
44701
|
+
remoteItems: [],
|
|
44702
|
+
// This will hold remote items from API
|
|
44703
|
+
loading: false,
|
|
44704
|
+
searchTerm: '',
|
|
44705
|
+
currentPage: 1,
|
|
44706
|
+
hasMore: false,
|
|
44707
|
+
totalItems: 0
|
|
44708
|
+
};
|
|
44709
|
+
},
|
|
44710
|
+
computed: {
|
|
44711
|
+
internalValue: {
|
|
44712
|
+
get() {
|
|
44713
|
+
// Use value prop (Vue 2 v-model default)
|
|
44714
|
+
const value = this.value !== null && this.value !== undefined ? this.value : this.multiple ? [] : null;
|
|
44715
|
+
return value;
|
|
44716
|
+
},
|
|
44717
|
+
set(value) {
|
|
44718
|
+
// Emit input event (Vue 2 v-model default)
|
|
44719
|
+
console.log('=== internalValue setter ===');
|
|
44720
|
+
console.log('Setting internalValue to:', value);
|
|
44721
|
+
console.log('Current value prop:', this.value);
|
|
44722
|
+
console.log('Emitting input event (Vue 2 v-model) with:', value);
|
|
44723
|
+
this.$emit('input', value);
|
|
44724
|
+
this.$emit('update:modelValue', value);
|
|
44725
|
+
this.$emit('change', value);
|
|
44726
|
+
}
|
|
44727
|
+
},
|
|
44728
|
+
useLocalItems() {
|
|
44729
|
+
// Use local items if provided, otherwise use remote lookup
|
|
44730
|
+
// In Vue 2, props are directly accessible via this.items
|
|
44731
|
+
return this.items !== null && this.items !== undefined && Array.isArray(this.items);
|
|
44732
|
+
},
|
|
44733
|
+
normalizedLocalItems() {
|
|
44734
|
+
// Normalize local items - handle both flat and pre-grouped formats
|
|
44735
|
+
if (!this.useLocalItems) return [];
|
|
44736
|
+
|
|
44737
|
+
// Check if items are in pre-grouped format: [{ group: 'Group1', items: [...] }, ...]
|
|
44738
|
+
if (this.items.length > 0 && this.items[0].items && Array.isArray(this.items[0].items)) {
|
|
44739
|
+
// Pre-grouped format - flatten it
|
|
44740
|
+
const flattened = [];
|
|
44741
|
+
this.items.forEach(group => {
|
|
44742
|
+
if (group.items && Array.isArray(group.items)) {
|
|
44743
|
+
group.items.forEach(item => {
|
|
44744
|
+
flattened.push({
|
|
44745
|
+
...item,
|
|
44746
|
+
group: group.group || group.groupName || ''
|
|
44747
|
+
});
|
|
44748
|
+
});
|
|
44749
|
+
}
|
|
44750
|
+
});
|
|
44751
|
+
return flattened;
|
|
44752
|
+
}
|
|
44753
|
+
|
|
44754
|
+
// Flat format - return as is
|
|
44755
|
+
return this.items;
|
|
44756
|
+
},
|
|
44757
|
+
allItems() {
|
|
44758
|
+
// Return all items (not filtered) - used for finding selected items
|
|
44759
|
+
let sourceItems;
|
|
44760
|
+
if (this.useLocalItems) {
|
|
44761
|
+
sourceItems = this.normalizedLocalItems;
|
|
44762
|
+
} else {
|
|
44763
|
+
sourceItems = this.remoteItems;
|
|
44764
|
+
}
|
|
44765
|
+
return sourceItems.map((item, index) => {
|
|
44766
|
+
// Ensure value is always set - use index as fallback if no value/id
|
|
44767
|
+
const itemValue = item.value !== undefined && item.value !== null ? item.value : item.id !== undefined && item.id !== null ? item.id : `item-${index}`;
|
|
44768
|
+
|
|
44769
|
+
// Determine group value - Priority: groupFields > group/groupName
|
|
44770
|
+
let groupValue = '';
|
|
44771
|
+
if (this.groupFields && this.groupFields.length > 0) {
|
|
44772
|
+
// groupFields has highest priority
|
|
44773
|
+
groupValue = item[this.groupFields[0]] || '';
|
|
44774
|
+
}
|
|
44775
|
+
// Fallback to explicit group/groupName if groupFields didn't provide a value
|
|
44776
|
+
if (!groupValue) {
|
|
44777
|
+
groupValue = item.group || item.groupName || '';
|
|
44778
|
+
}
|
|
44779
|
+
return {
|
|
44780
|
+
raw: item,
|
|
44781
|
+
text: item.text || item.name || item.label || '',
|
|
44782
|
+
value: itemValue,
|
|
44783
|
+
description: item.description || item.subtitle || '',
|
|
44784
|
+
category: item.category || '',
|
|
44785
|
+
group: groupValue,
|
|
44786
|
+
title: item.text || item.name || item.label || '',
|
|
44787
|
+
subtitle: item.description || item.subtitle || ''
|
|
44788
|
+
};
|
|
44789
|
+
});
|
|
44790
|
+
},
|
|
44791
|
+
displayItems() {
|
|
44792
|
+
// Use local items or remote items (filtered for display)
|
|
44793
|
+
let sourceItems;
|
|
44794
|
+
if (this.useLocalItems) {
|
|
44795
|
+
// Filter local items based on search term
|
|
44796
|
+
sourceItems = this.filterLocalItems(this.searchTerm);
|
|
44797
|
+
} else {
|
|
44798
|
+
sourceItems = this.remoteItems;
|
|
44799
|
+
}
|
|
44800
|
+
return sourceItems.map((item, index) => {
|
|
44801
|
+
// Ensure value is always set - use index as fallback if no value/id
|
|
44802
|
+
const itemValue = item.value !== undefined && item.value !== null ? item.value : item.id !== undefined && item.id !== null ? item.id : `item-${index}`;
|
|
44803
|
+
|
|
44804
|
+
// Determine group value - Priority: groupFields > group/groupName
|
|
44805
|
+
let groupValue = '';
|
|
44806
|
+
if (this.groupFields && this.groupFields.length > 0) {
|
|
44807
|
+
// groupFields has highest priority
|
|
44808
|
+
groupValue = item[this.groupFields[0]] || '';
|
|
44809
|
+
}
|
|
44810
|
+
// Fallback to explicit group/groupName if groupFields didn't provide a value
|
|
44811
|
+
if (!groupValue) {
|
|
44812
|
+
groupValue = item.group || item.groupName || '';
|
|
44813
|
+
}
|
|
44814
|
+
return {
|
|
44815
|
+
raw: item,
|
|
44816
|
+
text: item.text || item.name || item.label || '',
|
|
44817
|
+
value: itemValue,
|
|
44818
|
+
description: item.description || item.subtitle || '',
|
|
44819
|
+
category: item.category || '',
|
|
44820
|
+
group: groupValue,
|
|
44821
|
+
title: item.text || item.name || item.label || '',
|
|
44822
|
+
subtitle: item.description || item.subtitle || ''
|
|
44823
|
+
};
|
|
44824
|
+
});
|
|
44825
|
+
},
|
|
44826
|
+
hasItems() {
|
|
44827
|
+
return this.displayItems.length > 0;
|
|
44828
|
+
},
|
|
44829
|
+
itemTitle() {
|
|
44830
|
+
return 'title';
|
|
44831
|
+
},
|
|
44832
|
+
itemValue() {
|
|
44833
|
+
return 'value';
|
|
44834
|
+
},
|
|
44835
|
+
menuProps() {
|
|
44836
|
+
return {
|
|
44837
|
+
maxHeight: 300,
|
|
44838
|
+
virtual: true,
|
|
44839
|
+
itemHeight: 48
|
|
44840
|
+
};
|
|
44841
|
+
}
|
|
44842
|
+
},
|
|
44843
|
+
methods: {
|
|
44844
|
+
filterLocalItems(search = '') {
|
|
44845
|
+
// Filter local items based on search term
|
|
44846
|
+
if (!this.useLocalItems) {
|
|
44847
|
+
return [];
|
|
44848
|
+
}
|
|
44849
|
+
|
|
44850
|
+
// Use normalized items (handles both flat and pre-grouped formats)
|
|
44851
|
+
const itemsToFilter = this.normalizedLocalItems;
|
|
44852
|
+
if (!search || search.trim() === '') {
|
|
44853
|
+
return itemsToFilter;
|
|
44854
|
+
}
|
|
44855
|
+
const searchLower = search.toLowerCase();
|
|
44856
|
+
return itemsToFilter.filter(item => {
|
|
44857
|
+
const text = (item.text || item.name || item.label || '').toLowerCase();
|
|
44858
|
+
const description = (item.description || item.subtitle || '').toLowerCase();
|
|
44859
|
+
return text.includes(searchLower) || description.includes(searchLower);
|
|
44860
|
+
});
|
|
44861
|
+
},
|
|
44862
|
+
async loadItems(search = '', page = 1, append = false) {
|
|
44863
|
+
// If using local items, filter them instead of making API call
|
|
44864
|
+
if (this.useLocalItems) {
|
|
44865
|
+
const filtered = this.filterLocalItems(search);
|
|
44866
|
+
// For local items, we don't modify the prop, just return filtered results
|
|
44867
|
+
// The displayItems computed will handle showing filtered items
|
|
44868
|
+
this.totalItems = filtered.length;
|
|
44869
|
+
this.hasMore = false;
|
|
44870
|
+
this.$emit('search', {
|
|
44871
|
+
search,
|
|
44872
|
+
results: filtered.length,
|
|
44873
|
+
total: filtered.length
|
|
44874
|
+
});
|
|
44875
|
+
return;
|
|
44876
|
+
}
|
|
44877
|
+
|
|
44878
|
+
// Remote lookup - validate type is provided
|
|
44879
|
+
if (!this.type) {
|
|
44880
|
+
console.warn('SearchableSelect: type prop is required when items prop is not provided');
|
|
44881
|
+
return;
|
|
44882
|
+
}
|
|
44883
|
+
if (this.loading) return;
|
|
44884
|
+
this.loading = true;
|
|
44885
|
+
|
|
44886
|
+
// try {
|
|
44887
|
+
// const response = await lookupService.getLookupItems({
|
|
44888
|
+
// type: this.type,
|
|
44889
|
+
// category: this.category,
|
|
44890
|
+
// search: search,
|
|
44891
|
+
// page: page,
|
|
44892
|
+
// limit: this.pageSize,
|
|
44893
|
+
// filters: this.filters
|
|
44894
|
+
// });
|
|
44895
|
+
|
|
44896
|
+
// // Handle response - adjust based on your actual API response structure
|
|
44897
|
+
// if (response && response.data) {
|
|
44898
|
+
// const responseData = response.data
|
|
44899
|
+
// // Check if response has result property (common pattern in this project)
|
|
44900
|
+
// const data = responseData.result || responseData.data || responseData
|
|
44901
|
+
// const newItems = data.items || data.DATA || data || []
|
|
44902
|
+
|
|
44903
|
+
// if (append) {
|
|
44904
|
+
// this.remoteItems = [...this.remoteItems, ...newItems]
|
|
44905
|
+
// } else {
|
|
44906
|
+
// this.remoteItems = newItems
|
|
44907
|
+
// }
|
|
44908
|
+
|
|
44909
|
+
// this.currentPage = data.page || page
|
|
44910
|
+
// this.hasMore = !!data.hasMore
|
|
44911
|
+
// this.totalItems = data.total || data.TOTAL || newItems.length
|
|
44912
|
+
|
|
44913
|
+
// this.$emit('search', { search, results: newItems.length, total: this.totalItems })
|
|
44914
|
+
// } else {
|
|
44915
|
+
// console.error('Lookup API error:', response)
|
|
44916
|
+
// this.remoteItems = []
|
|
44917
|
+
// }
|
|
44918
|
+
// } catch (error) {
|
|
44919
|
+
// console.error('Error loading lookup items:', error)
|
|
44920
|
+
// this.remoteItems = []
|
|
44921
|
+
// } finally {
|
|
44922
|
+
// this.loading = false
|
|
44923
|
+
// }
|
|
44924
|
+
},
|
|
44925
|
+
onSearch(search) {
|
|
44926
|
+
this.searchTerm = search;
|
|
44927
|
+
if (this.useLocalItems) {
|
|
44928
|
+
// For local items, filtering is handled by displayItems computed property
|
|
44929
|
+
const filtered = this.filterLocalItems(search);
|
|
44930
|
+
this.$emit('search', {
|
|
44931
|
+
search,
|
|
44932
|
+
results: filtered.length,
|
|
44933
|
+
total: filtered.length
|
|
44934
|
+
});
|
|
44935
|
+
} else {
|
|
44936
|
+
// For remote items, debounce the API call
|
|
44937
|
+
this.debouncedLoadItems(search, 1, false);
|
|
44938
|
+
}
|
|
44939
|
+
},
|
|
44940
|
+
onSelectionChange(value) {
|
|
44941
|
+
// Ensure value is an array for multiple mode
|
|
44942
|
+
const finalValue = this.multiple && !Array.isArray(value) ? [value] : value;
|
|
44943
|
+
|
|
44944
|
+
// Emit both events for Vue 2 and Vue 3 compatibility
|
|
44945
|
+
this.$emit('input', finalValue);
|
|
44946
|
+
this.$emit('update:modelValue', finalValue);
|
|
44947
|
+
this.$emit('change', finalValue);
|
|
44948
|
+
},
|
|
44949
|
+
onFocus() {
|
|
44950
|
+
this.$emit('focus');
|
|
44951
|
+
if (this.useLocalItems) {
|
|
44952
|
+
// For local items, displayItems will show all items when searchTerm is empty
|
|
44953
|
+
// No action needed
|
|
44954
|
+
} else {
|
|
44955
|
+
// For remote items, load if needed
|
|
44956
|
+
if (this.remoteItems.length === 0 && this.searchTerm.length < this.minSearchLength) {
|
|
44957
|
+
this.loadItems('', 1, false);
|
|
44958
|
+
}
|
|
44959
|
+
}
|
|
44960
|
+
},
|
|
44961
|
+
onBlur() {
|
|
44962
|
+
this.$emit('blur');
|
|
44963
|
+
},
|
|
44964
|
+
removeItem(value) {
|
|
44965
|
+
if (this.multiple) {
|
|
44966
|
+
const newValues = (this.modelValue || []).filter(v => v !== value);
|
|
44967
|
+
this.$emit('update:modelValue', newValues);
|
|
44968
|
+
}
|
|
44969
|
+
},
|
|
44970
|
+
loadMore() {
|
|
44971
|
+
if (this.hasMore && !this.loading) {
|
|
44972
|
+
this.loadItems(this.searchTerm, this.currentPage + 1, true);
|
|
44973
|
+
}
|
|
44974
|
+
},
|
|
44975
|
+
clear() {
|
|
44976
|
+
if (this.useLocalItems) {
|
|
44977
|
+
// For local items, just clear search term
|
|
44978
|
+
this.searchTerm = '';
|
|
44979
|
+
} else {
|
|
44980
|
+
this.remoteItems = [];
|
|
44981
|
+
this.searchTerm = '';
|
|
44982
|
+
this.currentPage = 1;
|
|
44983
|
+
this.hasMore = false;
|
|
44984
|
+
this.totalItems = 0;
|
|
44985
|
+
}
|
|
44986
|
+
},
|
|
44987
|
+
refresh() {
|
|
44988
|
+
this.loadItems(this.searchTerm, 1, false);
|
|
44989
|
+
}
|
|
44990
|
+
},
|
|
44991
|
+
watch: {
|
|
44992
|
+
items: {
|
|
44993
|
+
handler(newItems) {
|
|
44994
|
+
// When local items prop changes, update totalItems
|
|
44995
|
+
if (this.useLocalItems) {
|
|
44996
|
+
const filtered = this.filterLocalItems(this.searchTerm);
|
|
44997
|
+
this.totalItems = filtered.length;
|
|
44998
|
+
// Force reactivity update
|
|
44999
|
+
this.$forceUpdate();
|
|
45000
|
+
}
|
|
45001
|
+
},
|
|
45002
|
+
deep: true,
|
|
45003
|
+
immediate: true
|
|
45004
|
+
},
|
|
45005
|
+
type() {
|
|
45006
|
+
if (!this.useLocalItems) {
|
|
45007
|
+
this.remoteItems = [];
|
|
45008
|
+
this.searchTerm = '';
|
|
45009
|
+
this.currentPage = 1;
|
|
45010
|
+
this.hasMore = false;
|
|
45011
|
+
this.totalItems = 0;
|
|
45012
|
+
}
|
|
45013
|
+
},
|
|
45014
|
+
category() {
|
|
45015
|
+
if (!this.useLocalItems) {
|
|
45016
|
+
this.remoteItems = [];
|
|
45017
|
+
this.searchTerm = '';
|
|
45018
|
+
this.currentPage = 1;
|
|
45019
|
+
this.hasMore = false;
|
|
45020
|
+
this.totalItems = 0;
|
|
45021
|
+
}
|
|
45022
|
+
},
|
|
45023
|
+
filters: {
|
|
45024
|
+
handler() {
|
|
45025
|
+
if (!this.useLocalItems) {
|
|
45026
|
+
this.remoteItems = [];
|
|
45027
|
+
this.searchTerm = '';
|
|
45028
|
+
this.currentPage = 1;
|
|
45029
|
+
this.hasMore = false;
|
|
45030
|
+
this.totalItems = 0;
|
|
45031
|
+
}
|
|
45032
|
+
},
|
|
45033
|
+
deep: true
|
|
45034
|
+
},
|
|
45035
|
+
value: {
|
|
45036
|
+
handler: async function (newValue, oldValue) {
|
|
45037
|
+
console.log('=== SearchableSelect value watcher ===');
|
|
45038
|
+
console.log('New value:', newValue, 'type:', Array.isArray(newValue) ? 'array' : typeof newValue);
|
|
45039
|
+
console.log('Old value:', oldValue);
|
|
45040
|
+
console.log('=== End watcher ===');
|
|
45041
|
+
|
|
45042
|
+
// Only load remote items if not using local items
|
|
45043
|
+
if (!this.useLocalItems && newValue && this.remoteItems.length === 0 && !this.loading && this.type) {
|
|
45044
|
+
// try {
|
|
45045
|
+
// this.loading = true
|
|
45046
|
+
// const response = await lookupService.getLookupItems({
|
|
45047
|
+
// type: this.type,
|
|
45048
|
+
// category: this.category,
|
|
45049
|
+
// search: '',
|
|
45050
|
+
// page: 1,
|
|
45051
|
+
// limit: this.pageSize,
|
|
45052
|
+
// filters: this.filters
|
|
45053
|
+
// })
|
|
45054
|
+
|
|
45055
|
+
// // Handle response - adjust based on your actual API response structure
|
|
45056
|
+
// if (response && response.data) {
|
|
45057
|
+
// const responseData = response.data
|
|
45058
|
+
// const data = responseData.result || responseData.data || responseData
|
|
45059
|
+
// this.remoteItems = data.items || data.DATA || data || []
|
|
45060
|
+
// this.totalItems = data.total || data.TOTAL || this.remoteItems.length
|
|
45061
|
+
// this.hasMore = !!data.hasMore
|
|
45062
|
+
// }
|
|
45063
|
+
// } catch (error) {
|
|
45064
|
+
// console.error('Error loading initial items:', error)
|
|
45065
|
+
// } finally {
|
|
45066
|
+
// this.loading = false
|
|
45067
|
+
// }
|
|
45068
|
+
}
|
|
45069
|
+
},
|
|
45070
|
+
immediate: true
|
|
45071
|
+
}
|
|
45072
|
+
},
|
|
45073
|
+
created() {
|
|
45074
|
+
this.debouncedLoadItems = SearchableSelectvue_type_script_lang_js_debounce(this.loadItems, this.debounceMs);
|
|
45075
|
+
},
|
|
45076
|
+
mounted() {
|
|
45077
|
+
// Initialize items based on mode
|
|
45078
|
+
if (this.useLocalItems) {
|
|
45079
|
+
// For local items, displayItems computed will handle showing items
|
|
45080
|
+
const filtered = this.filterLocalItems(this.searchTerm);
|
|
45081
|
+
this.totalItems = filtered.length;
|
|
45082
|
+
} else if (this.minSearchLength === 0 && this.type) {
|
|
45083
|
+
// For remote items, load if minSearchLength is 0
|
|
45084
|
+
this.loadItems('', 1, false);
|
|
45085
|
+
}
|
|
45086
|
+
}
|
|
45087
|
+
});
|
|
45088
|
+
// CONCATENATED MODULE: ./src/components/SearchableSelect.vue?vue&type=script&lang=js
|
|
45089
|
+
/* harmony default export */ var components_SearchableSelectvue_type_script_lang_js = (SearchableSelectvue_type_script_lang_js);
|
|
45090
|
+
// EXTERNAL MODULE: ./src/components/SearchableSelect.vue?vue&type=style&index=0&id=688f213e&prod&scoped=true&lang=css
|
|
45091
|
+
var SearchableSelectvue_type_style_index_0_id_688f213e_prod_scoped_true_lang_css = __webpack_require__("8958");
|
|
45092
|
+
|
|
45093
|
+
// CONCATENATED MODULE: ./src/components/SearchableSelect.vue
|
|
45094
|
+
|
|
45095
|
+
|
|
45096
|
+
|
|
45097
|
+
|
|
45098
|
+
|
|
45099
|
+
|
|
45100
|
+
/* normalize component */
|
|
45101
|
+
|
|
45102
|
+
var SearchableSelect_component = normalizeComponent(
|
|
45103
|
+
components_SearchableSelectvue_type_script_lang_js,
|
|
45104
|
+
SearchableSelectvue_type_template_id_688f213e_scoped_true_render,
|
|
45105
|
+
SearchableSelectvue_type_template_id_688f213e_scoped_true_staticRenderFns,
|
|
45106
|
+
false,
|
|
45107
|
+
null,
|
|
45108
|
+
"688f213e",
|
|
45109
|
+
null
|
|
45110
|
+
|
|
45111
|
+
)
|
|
45112
|
+
|
|
45113
|
+
/* harmony default export */ var SearchableSelect = (SearchableSelect_component.exports);
|
|
45114
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/SearchableSelectField.vue?vue&type=script&lang=js
|
|
45115
|
+
|
|
45116
|
+
|
|
45117
|
+
|
|
45118
|
+
|
|
45119
|
+
|
|
45120
|
+
|
|
45121
|
+
/* harmony default export */ var SearchableSelectFieldvue_type_script_lang_js = ({
|
|
45122
|
+
components: {
|
|
45123
|
+
Field: ValidationProvider,
|
|
45124
|
+
SearchableSelect: SearchableSelect
|
|
45125
|
+
},
|
|
45126
|
+
props: {
|
|
45127
|
+
lang: {
|
|
45128
|
+
type: String,
|
|
45129
|
+
default: 'en'
|
|
45130
|
+
},
|
|
45131
|
+
fieldInfo: {
|
|
45132
|
+
type: Object,
|
|
45133
|
+
required: true
|
|
45134
|
+
}
|
|
45135
|
+
},
|
|
45136
|
+
watch: {
|
|
45137
|
+
fieldInfo: {
|
|
45138
|
+
handler: function () {
|
|
45139
|
+
this.GetSelectOptions();
|
|
45140
|
+
},
|
|
45141
|
+
deep: true
|
|
45142
|
+
}
|
|
45143
|
+
},
|
|
45144
|
+
data() {
|
|
45145
|
+
return {
|
|
45146
|
+
optionList: [],
|
|
45147
|
+
dependentOptions: []
|
|
45148
|
+
};
|
|
45149
|
+
},
|
|
45150
|
+
created: async function () {
|
|
45151
|
+
await this.GetSelectOptions();
|
|
45152
|
+
},
|
|
45153
|
+
mounted: function () {
|
|
45154
|
+
this.fieldInfo.validationRules = getValidationRules(this.fieldInfo.validationRules, this.lang);
|
|
45155
|
+
},
|
|
45156
|
+
methods: {
|
|
45157
|
+
GetDisplayLabel(field) {
|
|
45158
|
+
var labelName = '';
|
|
45159
|
+
if (field.hasOwnProperty('label') && field.label) {
|
|
45160
|
+
labelName = field.label;
|
|
45161
|
+
} else if (field.hasOwnProperty('display_name') && field.display_name) {
|
|
45162
|
+
labelName = field.display_name;
|
|
45163
|
+
}
|
|
45164
|
+
return labelName;
|
|
45165
|
+
},
|
|
45166
|
+
onChange(e) {
|
|
45167
|
+
if (this.fieldInfo && this.fieldInfo.config && this.fieldInfo.config.onChange) {
|
|
45168
|
+
this.fieldInfo.config.onChange(e, this.fieldInfo);
|
|
45169
|
+
}
|
|
45170
|
+
this.$emit('UpdateKeyValue', 1);
|
|
45171
|
+
},
|
|
45172
|
+
showAddIcon: function () {
|
|
45173
|
+
if (this.fieldInfo.config && this.fieldInfo.config.showAddIcon) {
|
|
45174
|
+
return this.fieldInfo.config.showAddIcon;
|
|
45175
|
+
}
|
|
45176
|
+
},
|
|
45177
|
+
onAddButtonClick: function (e) {
|
|
45178
|
+
if (this.fieldInfo && this.fieldInfo.config && this.fieldInfo.config.onAddButtonClick) {
|
|
45179
|
+
this.fieldInfo.config.onAddButtonClick(e, this.fieldInfo);
|
|
45180
|
+
}
|
|
45181
|
+
},
|
|
45182
|
+
addButtonClass: function () {
|
|
45183
|
+
if (this.fieldInfo.config && this.fieldInfo.config.addIconBackground) {
|
|
45184
|
+
return "round-icon-small theme-primary " + this.fieldInfo.config.addIconBackground;
|
|
45185
|
+
} else {
|
|
45186
|
+
return "round-icon-small btn-dark theme-primary";
|
|
45187
|
+
}
|
|
45188
|
+
},
|
|
45189
|
+
addIconClass: function () {
|
|
45190
|
+
if (this.fieldInfo.config && this.fieldInfo.config.addIcon) {
|
|
45191
|
+
return "fa text-white pt-7 font-18 " + this.fieldInfo.config.addIcon;
|
|
45192
|
+
} else {
|
|
45193
|
+
return "fa fa-plus text-white pt-7 font-18";
|
|
45194
|
+
}
|
|
45195
|
+
},
|
|
45196
|
+
GetSelectOptions: async function () {
|
|
45197
|
+
var vm = this;
|
|
45198
|
+
if (vm.fieldInfo.hasOwnProperty('config') && vm.fieldInfo.config.hasOwnProperty('OptionsForBind') == false) {
|
|
45199
|
+
vm.fieldInfo.config.OptionsForBind = [];
|
|
45200
|
+
}
|
|
45201
|
+
if (vm.fieldInfo.hasOwnProperty('picklist_options') && vm.fieldInfo.picklist_options != 'Lookup') {
|
|
45202
|
+
vm.fieldInfo.config.OptionsForBind = vm.MakeArray(vm.fieldInfo.picklist_options);
|
|
45203
|
+
} else if (vm.fieldInfo.hasOwnProperty('select_options') && vm.fieldInfo.select_options.length > 0) {
|
|
45204
|
+
vm.fieldInfo.config.OptionsForBind = vm.MakeNormalArray(vm.fieldInfo.select_options);
|
|
45205
|
+
} else if (vm.fieldInfo.hasOwnProperty('config') && vm.fieldInfo.config.hasOwnProperty('OptionsForBind') && vm.fieldInfo.config.OptionsForBind.length > 0) {
|
|
45206
|
+
vm.fieldInfo.config.OptionsForBind = vm.fieldInfo.config.OptionsForBind;
|
|
45207
|
+
} else if (vm.fieldInfo.hasOwnProperty('config') && vm.fieldInfo.config.hasOwnProperty('option_request_url') && vm.fieldInfo.config.option_request_url.length > 0) {
|
|
45208
|
+
await axios_default.a.get(vm.fieldInfo.config.option_request_url, {
|
|
45209
|
+
headers: {
|
|
45210
|
+
"Authorization": `Bearer ${vm.fieldInfo.config.token}`
|
|
45211
|
+
}
|
|
45212
|
+
}).then(res => {
|
|
45213
|
+
console.log(res.data);
|
|
45214
|
+
if (res.data && res.data.hasOwnProperty('DATA')) {
|
|
45215
|
+
vm.fieldInfo.config.OptionsForBind = res.data.DATA;
|
|
45216
|
+
} else {
|
|
45217
|
+
vm.fieldInfo.config.OptionsForBind = res.data;
|
|
45218
|
+
}
|
|
45219
|
+
}).catch(error => {
|
|
45220
|
+
console.log('Error on binding slect option in tg-control- ' + error);
|
|
45221
|
+
});
|
|
45222
|
+
}
|
|
45223
|
+
this.$forceUpdate();
|
|
45224
|
+
},
|
|
45225
|
+
MakeNormalArray: function (value) {
|
|
45226
|
+
if (value) {
|
|
45227
|
+
try {
|
|
45228
|
+
return JSON.parse(value);
|
|
45229
|
+
} catch (ex) {
|
|
45230
|
+
return value;
|
|
45231
|
+
}
|
|
45232
|
+
} else {
|
|
45233
|
+
value = [];
|
|
45234
|
+
}
|
|
45235
|
+
},
|
|
45236
|
+
MakeArray: function (value, type) {
|
|
45237
|
+
var array = [];
|
|
45238
|
+
var arr = String(value).split(',');
|
|
45239
|
+
if (type == "radio" || type == "checkbox") {
|
|
45240
|
+
if (arr.length > 0) {
|
|
45241
|
+
for (let item of arr) {
|
|
45242
|
+
if (item.split("|").length > 1) {
|
|
45243
|
+
var person = {
|
|
45244
|
+
name: item.split("|")[0].trim(),
|
|
45245
|
+
value: item.split("|")[1].trim()
|
|
45246
|
+
};
|
|
45247
|
+
array.push(person);
|
|
45248
|
+
} else {
|
|
45249
|
+
var person = {
|
|
45250
|
+
name: item.trim(),
|
|
45251
|
+
value: item.trim()
|
|
45252
|
+
};
|
|
45253
|
+
array.push(person);
|
|
45254
|
+
}
|
|
45255
|
+
}
|
|
45256
|
+
}
|
|
45257
|
+
} else {
|
|
45258
|
+
if (arr.length > 0) {
|
|
45259
|
+
for (let item of arr) {
|
|
45260
|
+
var person = {
|
|
45261
|
+
name: item.trim(),
|
|
45262
|
+
value: item.trim()
|
|
45263
|
+
};
|
|
45264
|
+
array.push(person);
|
|
45265
|
+
}
|
|
45266
|
+
}
|
|
45267
|
+
}
|
|
45268
|
+
return array;
|
|
45269
|
+
},
|
|
45270
|
+
computedActionButtons(field) {
|
|
45271
|
+
if (field && field.hasOwnProperty("config") && field.config.hasOwnProperty("actionButtons")) {
|
|
45272
|
+
return field.config.actionButtons;
|
|
45273
|
+
} else {
|
|
45274
|
+
return {
|
|
45275
|
+
selectAll: false,
|
|
45276
|
+
active: false,
|
|
45277
|
+
inactive: false,
|
|
45278
|
+
clear: false
|
|
45279
|
+
};
|
|
45280
|
+
}
|
|
45281
|
+
},
|
|
45282
|
+
computedItemFields(field) {
|
|
45283
|
+
if (field && field.hasOwnProperty("config") && field.config.hasOwnProperty("itemFields")) {
|
|
45284
|
+
return field.config.itemFields;
|
|
45285
|
+
} else {
|
|
45286
|
+
return ['text'];
|
|
45287
|
+
}
|
|
45288
|
+
},
|
|
45289
|
+
computedGroupFields(field) {
|
|
45290
|
+
if (field && field.hasOwnProperty("config") && field.config.hasOwnProperty("groupFields")) {
|
|
45291
|
+
return field.config.groupFields;
|
|
45292
|
+
} else {
|
|
45293
|
+
return ['group'];
|
|
45294
|
+
}
|
|
45295
|
+
},
|
|
45296
|
+
computedMaxRenderItems(field) {
|
|
45297
|
+
if (field && field.hasOwnProperty("config") && field.config.hasOwnProperty("maxRenderItems")) {
|
|
45298
|
+
return field.config.maxRenderItems;
|
|
45299
|
+
} else {
|
|
45300
|
+
return 50;
|
|
45301
|
+
}
|
|
45302
|
+
},
|
|
45303
|
+
onSearchableChange: function (x, field, e) {
|
|
45304
|
+
if (field && field.hasOwnProperty("config") && field.config.hasOwnProperty("onChange")) {
|
|
45305
|
+
field.onChange(field, x);
|
|
45306
|
+
}
|
|
45307
|
+
},
|
|
45308
|
+
RenderOptions() {
|
|
45309
|
+
var options = [];
|
|
45310
|
+
var vm = this;
|
|
45311
|
+
if (this.optionList.length > 0) {
|
|
45312
|
+
if (Array.isArray(this.optionList)) {
|
|
45313
|
+
this.optionList.forEach((item, index) => {
|
|
45314
|
+
options.push({
|
|
45315
|
+
value: item.value,
|
|
45316
|
+
name: item.hasOwnProperty('text') ? item.text : item.name
|
|
45317
|
+
});
|
|
45318
|
+
});
|
|
45319
|
+
if (!vm.fieldInfo.hasOwnProperty('select_options')) {
|
|
45320
|
+
vm.fieldInfo.select_options = [];
|
|
45321
|
+
}
|
|
45322
|
+
vm.fieldInfo.select_options = options;
|
|
45323
|
+
} else console.log(' type of the optionList is not array - ' + typeof this.optionList);
|
|
45324
|
+
} else {
|
|
45325
|
+
console.log(' No select options found for the - ' + vm.fieldInfo.name);
|
|
45326
|
+
}
|
|
45327
|
+
}
|
|
45328
|
+
}
|
|
45329
|
+
});
|
|
45330
|
+
// CONCATENATED MODULE: ./src/components/SearchableSelectField.vue?vue&type=script&lang=js
|
|
45331
|
+
/* harmony default export */ var components_SearchableSelectFieldvue_type_script_lang_js = (SearchableSelectFieldvue_type_script_lang_js);
|
|
45332
|
+
// CONCATENATED MODULE: ./src/components/SearchableSelectField.vue
|
|
45333
|
+
|
|
45334
|
+
|
|
45335
|
+
|
|
45336
|
+
|
|
45337
|
+
|
|
45338
|
+
/* normalize component */
|
|
45339
|
+
|
|
45340
|
+
var SearchableSelectField_component = normalizeComponent(
|
|
45341
|
+
components_SearchableSelectFieldvue_type_script_lang_js,
|
|
45342
|
+
SearchableSelectFieldvue_type_template_id_b5b1bf16_render,
|
|
45343
|
+
SearchableSelectFieldvue_type_template_id_b5b1bf16_staticRenderFns,
|
|
45344
|
+
false,
|
|
45345
|
+
null,
|
|
45346
|
+
null,
|
|
45347
|
+
null
|
|
45348
|
+
|
|
45349
|
+
)
|
|
45350
|
+
|
|
45351
|
+
/* harmony default export */ var SearchableSelectField = (SearchableSelectField_component.exports);
|
|
45352
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/DynamicForm.vue?vue&type=script&lang=js
|
|
45353
|
+
|
|
42133
45354
|
|
|
42134
45355
|
|
|
42135
45356
|
|
|
@@ -42172,7 +45393,8 @@ var SlotField_component = normalizeComponent(
|
|
|
42172
45393
|
FileField: FileField,
|
|
42173
45394
|
TreeSelectField: TreeSelectField,
|
|
42174
45395
|
SlotField: SlotField,
|
|
42175
|
-
PasswordField: PasswordField
|
|
45396
|
+
PasswordField: PasswordField,
|
|
45397
|
+
SearchableSelectField: SearchableSelectField
|
|
42176
45398
|
},
|
|
42177
45399
|
data: function () {
|
|
42178
45400
|
return {
|