tg-controls_cli 0.0.96 → 0.0.98
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 +3836 -204
- package/dist/myLib.common.js.map +1 -1
- package/dist/myLib.css +1 -1
- package/dist/myLib.umd.js +3836 -204
- 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,41 @@ 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
|
+
/***/ "663a":
|
|
24306
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
24307
|
+
|
|
24308
|
+
"use strict";
|
|
24309
|
+
/* 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_c293aa98_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("fffa");
|
|
24310
|
+
/* 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_c293aa98_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_c293aa98_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__);
|
|
24311
|
+
/* unused harmony reexport * */
|
|
24312
|
+
|
|
24313
|
+
|
|
24314
|
+
/***/ }),
|
|
24315
|
+
|
|
24316
|
+
/***/ "68df":
|
|
24317
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
24318
|
+
|
|
24319
|
+
"use strict";
|
|
24320
|
+
|
|
24321
|
+
var aSet = __webpack_require__("dc19");
|
|
24322
|
+
var size = __webpack_require__("8e16");
|
|
24323
|
+
var iterate = __webpack_require__("384f");
|
|
24324
|
+
var getSetRecord = __webpack_require__("7f65");
|
|
24325
|
+
|
|
24326
|
+
// `Set.prototype.isSubsetOf` method
|
|
24327
|
+
// https://tc39.github.io/proposal-set-methods/#Set.prototype.isSubsetOf
|
|
24328
|
+
module.exports = function isSubsetOf(other) {
|
|
24329
|
+
var O = aSet(this);
|
|
24330
|
+
var otherRec = getSetRecord(other);
|
|
24331
|
+
if (size(O) > otherRec.size) return false;
|
|
24332
|
+
return iterate(O, function (e) {
|
|
24333
|
+
if (!otherRec.includes(e)) return false;
|
|
24334
|
+
}, true) !== false;
|
|
24335
|
+
};
|
|
24336
|
+
|
|
24337
|
+
|
|
24175
24338
|
/***/ }),
|
|
24176
24339
|
|
|
24177
24340
|
/***/ "6964":
|
|
@@ -24384,6 +24547,24 @@ module.exports = function (object, key, method) {
|
|
|
24384
24547
|
};
|
|
24385
24548
|
|
|
24386
24549
|
|
|
24550
|
+
/***/ }),
|
|
24551
|
+
|
|
24552
|
+
/***/ "72c3":
|
|
24553
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
24554
|
+
|
|
24555
|
+
"use strict";
|
|
24556
|
+
|
|
24557
|
+
var $ = __webpack_require__("23e7");
|
|
24558
|
+
var union = __webpack_require__("e9bc");
|
|
24559
|
+
var setMethodAcceptSetLike = __webpack_require__("dad2");
|
|
24560
|
+
|
|
24561
|
+
// `Set.prototype.union` method
|
|
24562
|
+
// https://tc39.es/ecma262/#sec-set.prototype.union
|
|
24563
|
+
$({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike('union') }, {
|
|
24564
|
+
union: union
|
|
24565
|
+
});
|
|
24566
|
+
|
|
24567
|
+
|
|
24387
24568
|
/***/ }),
|
|
24388
24569
|
|
|
24389
24570
|
/***/ "72f0":
|
|
@@ -24541,6 +24722,85 @@ AxiosError.from = function(error, code, config, request, response, customProps)
|
|
|
24541
24722
|
module.exports = AxiosError;
|
|
24542
24723
|
|
|
24543
24724
|
|
|
24725
|
+
/***/ }),
|
|
24726
|
+
|
|
24727
|
+
/***/ "796d":
|
|
24728
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
24729
|
+
|
|
24730
|
+
"use strict";
|
|
24731
|
+
|
|
24732
|
+
var $ = __webpack_require__("23e7");
|
|
24733
|
+
var call = __webpack_require__("c65b");
|
|
24734
|
+
var aCallable = __webpack_require__("59ed");
|
|
24735
|
+
var anObject = __webpack_require__("825a");
|
|
24736
|
+
var getIteratorDirect = __webpack_require__("46c4");
|
|
24737
|
+
var getIteratorFlattenable = __webpack_require__("34e1");
|
|
24738
|
+
var createIteratorProxy = __webpack_require__("c5cc");
|
|
24739
|
+
var iteratorClose = __webpack_require__("2a62");
|
|
24740
|
+
var IS_PURE = __webpack_require__("c430");
|
|
24741
|
+
|
|
24742
|
+
var IteratorProxy = createIteratorProxy(function () {
|
|
24743
|
+
var iterator = this.iterator;
|
|
24744
|
+
var mapper = this.mapper;
|
|
24745
|
+
var result, inner;
|
|
24746
|
+
|
|
24747
|
+
while (true) {
|
|
24748
|
+
if (inner = this.inner) try {
|
|
24749
|
+
result = anObject(call(inner.next, inner.iterator));
|
|
24750
|
+
if (!result.done) return result.value;
|
|
24751
|
+
this.inner = null;
|
|
24752
|
+
} catch (error) { iteratorClose(iterator, 'throw', error); }
|
|
24753
|
+
|
|
24754
|
+
result = anObject(call(this.next, iterator));
|
|
24755
|
+
|
|
24756
|
+
if (this.done = !!result.done) return;
|
|
24757
|
+
|
|
24758
|
+
try {
|
|
24759
|
+
this.inner = getIteratorFlattenable(mapper(result.value, this.counter++), false);
|
|
24760
|
+
} catch (error) { iteratorClose(iterator, 'throw', error); }
|
|
24761
|
+
}
|
|
24762
|
+
});
|
|
24763
|
+
|
|
24764
|
+
// `Iterator.prototype.flatMap` method
|
|
24765
|
+
// https://tc39.es/ecma262/#sec-iterator.prototype.flatmap
|
|
24766
|
+
$({ target: 'Iterator', proto: true, real: true, forced: IS_PURE }, {
|
|
24767
|
+
flatMap: function flatMap(mapper) {
|
|
24768
|
+
anObject(this);
|
|
24769
|
+
aCallable(mapper);
|
|
24770
|
+
return new IteratorProxy(getIteratorDirect(this), {
|
|
24771
|
+
mapper: mapper,
|
|
24772
|
+
inner: null
|
|
24773
|
+
});
|
|
24774
|
+
}
|
|
24775
|
+
});
|
|
24776
|
+
|
|
24777
|
+
|
|
24778
|
+
/***/ }),
|
|
24779
|
+
|
|
24780
|
+
/***/ "79a4":
|
|
24781
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
24782
|
+
|
|
24783
|
+
"use strict";
|
|
24784
|
+
|
|
24785
|
+
var $ = __webpack_require__("23e7");
|
|
24786
|
+
var fails = __webpack_require__("d039");
|
|
24787
|
+
var intersection = __webpack_require__("953b");
|
|
24788
|
+
var setMethodAcceptSetLike = __webpack_require__("dad2");
|
|
24789
|
+
|
|
24790
|
+
var INCORRECT = !setMethodAcceptSetLike('intersection', function (result) {
|
|
24791
|
+
return result.size === 2 && result.has(1) && result.has(2);
|
|
24792
|
+
}) || fails(function () {
|
|
24793
|
+
// eslint-disable-next-line es/no-array-from, es/no-set, es/no-set-prototype-intersection -- testing
|
|
24794
|
+
return String(Array.from(new Set([1, 2, 3]).intersection(new Set([3, 2])))) !== '3,2';
|
|
24795
|
+
});
|
|
24796
|
+
|
|
24797
|
+
// `Set.prototype.intersection` method
|
|
24798
|
+
// https://tc39.es/ecma262/#sec-set.prototype.intersection
|
|
24799
|
+
$({ target: 'Set', proto: true, real: true, forced: INCORRECT }, {
|
|
24800
|
+
intersection: intersection
|
|
24801
|
+
});
|
|
24802
|
+
|
|
24803
|
+
|
|
24544
24804
|
/***/ }),
|
|
24545
24805
|
|
|
24546
24806
|
/***/ "7a70":
|
|
@@ -24748,6 +25008,54 @@ $({ target: 'Iterator', proto: true, real: true }, {
|
|
|
24748
25008
|
});
|
|
24749
25009
|
|
|
24750
25010
|
|
|
25011
|
+
/***/ }),
|
|
25012
|
+
|
|
25013
|
+
/***/ "7f65":
|
|
25014
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
25015
|
+
|
|
25016
|
+
"use strict";
|
|
25017
|
+
|
|
25018
|
+
var aCallable = __webpack_require__("59ed");
|
|
25019
|
+
var anObject = __webpack_require__("825a");
|
|
25020
|
+
var call = __webpack_require__("c65b");
|
|
25021
|
+
var toIntegerOrInfinity = __webpack_require__("5926");
|
|
25022
|
+
var getIteratorDirect = __webpack_require__("46c4");
|
|
25023
|
+
|
|
25024
|
+
var INVALID_SIZE = 'Invalid size';
|
|
25025
|
+
var $RangeError = RangeError;
|
|
25026
|
+
var $TypeError = TypeError;
|
|
25027
|
+
var max = Math.max;
|
|
25028
|
+
|
|
25029
|
+
var SetRecord = function (set, intSize) {
|
|
25030
|
+
this.set = set;
|
|
25031
|
+
this.size = max(intSize, 0);
|
|
25032
|
+
this.has = aCallable(set.has);
|
|
25033
|
+
this.keys = aCallable(set.keys);
|
|
25034
|
+
};
|
|
25035
|
+
|
|
25036
|
+
SetRecord.prototype = {
|
|
25037
|
+
getIterator: function () {
|
|
25038
|
+
return getIteratorDirect(anObject(call(this.keys, this.set)));
|
|
25039
|
+
},
|
|
25040
|
+
includes: function (it) {
|
|
25041
|
+
return call(this.has, this.set, it);
|
|
25042
|
+
}
|
|
25043
|
+
};
|
|
25044
|
+
|
|
25045
|
+
// `GetSetRecord` abstract operation
|
|
25046
|
+
// https://tc39.es/proposal-set-methods/#sec-getsetrecord
|
|
25047
|
+
module.exports = function (obj) {
|
|
25048
|
+
anObject(obj);
|
|
25049
|
+
var numSize = +obj.size;
|
|
25050
|
+
// NOTE: If size is undefined, then numSize will be NaN
|
|
25051
|
+
// eslint-disable-next-line no-self-compare -- NaN check
|
|
25052
|
+
if (numSize !== numSize) throw new $TypeError(INVALID_SIZE);
|
|
25053
|
+
var intSize = toIntegerOrInfinity(numSize);
|
|
25054
|
+
if (intSize < 0) throw new $RangeError(INVALID_SIZE);
|
|
25055
|
+
return new SetRecord(obj, intSize);
|
|
25056
|
+
};
|
|
25057
|
+
|
|
25058
|
+
|
|
24751
25059
|
/***/ }),
|
|
24752
25060
|
|
|
24753
25061
|
/***/ "825a":
|
|
@@ -24790,6 +25098,28 @@ module.exports = !fails(function () {
|
|
|
24790
25098
|
|
|
24791
25099
|
"use strict";
|
|
24792
25100
|
|
|
25101
|
+
var SetHelpers = __webpack_require__("cb27");
|
|
25102
|
+
var iterate = __webpack_require__("384f");
|
|
25103
|
+
|
|
25104
|
+
var Set = SetHelpers.Set;
|
|
25105
|
+
var add = SetHelpers.add;
|
|
25106
|
+
|
|
25107
|
+
module.exports = function (set) {
|
|
25108
|
+
var result = new Set();
|
|
25109
|
+
iterate(set, function (it) {
|
|
25110
|
+
add(result, it);
|
|
25111
|
+
});
|
|
25112
|
+
return result;
|
|
25113
|
+
};
|
|
25114
|
+
|
|
25115
|
+
|
|
25116
|
+
/***/ }),
|
|
25117
|
+
|
|
25118
|
+
/***/ "83b9e":
|
|
25119
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
25120
|
+
|
|
25121
|
+
"use strict";
|
|
25122
|
+
|
|
24793
25123
|
|
|
24794
25124
|
var isAbsoluteURL = __webpack_require__("d925");
|
|
24795
25125
|
var combineURLs = __webpack_require__("e683");
|
|
@@ -24973,6 +25303,46 @@ if (!isCallable(store.inspectSource)) {
|
|
|
24973
25303
|
module.exports = store.inspectSource;
|
|
24974
25304
|
|
|
24975
25305
|
|
|
25306
|
+
/***/ }),
|
|
25307
|
+
|
|
25308
|
+
/***/ "8958":
|
|
25309
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
25310
|
+
|
|
25311
|
+
"use strict";
|
|
25312
|
+
/* 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");
|
|
25313
|
+
/* 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__);
|
|
25314
|
+
/* unused harmony reexport * */
|
|
25315
|
+
|
|
25316
|
+
|
|
25317
|
+
/***/ }),
|
|
25318
|
+
|
|
25319
|
+
/***/ "89e0":
|
|
25320
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
25321
|
+
|
|
25322
|
+
// extracted by mini-css-extract-plugin
|
|
25323
|
+
|
|
25324
|
+
/***/ }),
|
|
25325
|
+
|
|
25326
|
+
/***/ "8b00":
|
|
25327
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
25328
|
+
|
|
25329
|
+
"use strict";
|
|
25330
|
+
|
|
25331
|
+
var $ = __webpack_require__("23e7");
|
|
25332
|
+
var isSubsetOf = __webpack_require__("68df");
|
|
25333
|
+
var setMethodAcceptSetLike = __webpack_require__("dad2");
|
|
25334
|
+
|
|
25335
|
+
var INCORRECT = !setMethodAcceptSetLike('isSubsetOf', function (result) {
|
|
25336
|
+
return result;
|
|
25337
|
+
});
|
|
25338
|
+
|
|
25339
|
+
// `Set.prototype.isSubsetOf` method
|
|
25340
|
+
// https://tc39.es/ecma262/#sec-set.prototype.issubsetof
|
|
25341
|
+
$({ target: 'Set', proto: true, real: true, forced: INCORRECT }, {
|
|
25342
|
+
isSubsetOf: isSubsetOf
|
|
25343
|
+
});
|
|
25344
|
+
|
|
25345
|
+
|
|
24976
25346
|
/***/ }),
|
|
24977
25347
|
|
|
24978
25348
|
/***/ "8bbf":
|
|
@@ -25140,6 +25510,21 @@ CancelToken.source = function source() {
|
|
|
25140
25510
|
module.exports = CancelToken;
|
|
25141
25511
|
|
|
25142
25512
|
|
|
25513
|
+
/***/ }),
|
|
25514
|
+
|
|
25515
|
+
/***/ "8e16":
|
|
25516
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
25517
|
+
|
|
25518
|
+
"use strict";
|
|
25519
|
+
|
|
25520
|
+
var uncurryThisAccessor = __webpack_require__("7282");
|
|
25521
|
+
var SetHelpers = __webpack_require__("cb27");
|
|
25522
|
+
|
|
25523
|
+
module.exports = uncurryThisAccessor(SetHelpers.proto, 'size', 'get') || function (set) {
|
|
25524
|
+
return set.size;
|
|
25525
|
+
};
|
|
25526
|
+
|
|
25527
|
+
|
|
25143
25528
|
/***/ }),
|
|
25144
25529
|
|
|
25145
25530
|
/***/ "8e5f":
|
|
@@ -25437,6 +25822,76 @@ function _defineProperty(e, r, t) {
|
|
|
25437
25822
|
}
|
|
25438
25823
|
module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
25439
25824
|
|
|
25825
|
+
/***/ }),
|
|
25826
|
+
|
|
25827
|
+
/***/ "953b":
|
|
25828
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
25829
|
+
|
|
25830
|
+
"use strict";
|
|
25831
|
+
|
|
25832
|
+
var aSet = __webpack_require__("dc19");
|
|
25833
|
+
var SetHelpers = __webpack_require__("cb27");
|
|
25834
|
+
var size = __webpack_require__("8e16");
|
|
25835
|
+
var getSetRecord = __webpack_require__("7f65");
|
|
25836
|
+
var iterateSet = __webpack_require__("384f");
|
|
25837
|
+
var iterateSimple = __webpack_require__("5388");
|
|
25838
|
+
|
|
25839
|
+
var Set = SetHelpers.Set;
|
|
25840
|
+
var add = SetHelpers.add;
|
|
25841
|
+
var has = SetHelpers.has;
|
|
25842
|
+
|
|
25843
|
+
// `Set.prototype.intersection` method
|
|
25844
|
+
// https://github.com/tc39/proposal-set-methods
|
|
25845
|
+
module.exports = function intersection(other) {
|
|
25846
|
+
var O = aSet(this);
|
|
25847
|
+
var otherRec = getSetRecord(other);
|
|
25848
|
+
var result = new Set();
|
|
25849
|
+
|
|
25850
|
+
if (size(O) > otherRec.size) {
|
|
25851
|
+
iterateSimple(otherRec.getIterator(), function (e) {
|
|
25852
|
+
if (has(O, e)) add(result, e);
|
|
25853
|
+
});
|
|
25854
|
+
} else {
|
|
25855
|
+
iterateSet(O, function (e) {
|
|
25856
|
+
if (otherRec.includes(e)) add(result, e);
|
|
25857
|
+
});
|
|
25858
|
+
}
|
|
25859
|
+
|
|
25860
|
+
return result;
|
|
25861
|
+
};
|
|
25862
|
+
|
|
25863
|
+
|
|
25864
|
+
/***/ }),
|
|
25865
|
+
|
|
25866
|
+
/***/ "9961":
|
|
25867
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
25868
|
+
|
|
25869
|
+
"use strict";
|
|
25870
|
+
|
|
25871
|
+
var aSet = __webpack_require__("dc19");
|
|
25872
|
+
var SetHelpers = __webpack_require__("cb27");
|
|
25873
|
+
var clone = __webpack_require__("83b9");
|
|
25874
|
+
var getSetRecord = __webpack_require__("7f65");
|
|
25875
|
+
var iterateSimple = __webpack_require__("5388");
|
|
25876
|
+
|
|
25877
|
+
var add = SetHelpers.add;
|
|
25878
|
+
var has = SetHelpers.has;
|
|
25879
|
+
var remove = SetHelpers.remove;
|
|
25880
|
+
|
|
25881
|
+
// `Set.prototype.symmetricDifference` method
|
|
25882
|
+
// https://github.com/tc39/proposal-set-methods
|
|
25883
|
+
module.exports = function symmetricDifference(other) {
|
|
25884
|
+
var O = aSet(this);
|
|
25885
|
+
var keysIter = getSetRecord(other).getIterator();
|
|
25886
|
+
var result = clone(O);
|
|
25887
|
+
iterateSimple(keysIter, function (e) {
|
|
25888
|
+
if (has(O, e)) remove(result, e);
|
|
25889
|
+
else add(result, e);
|
|
25890
|
+
});
|
|
25891
|
+
return result;
|
|
25892
|
+
};
|
|
25893
|
+
|
|
25894
|
+
|
|
25440
25895
|
/***/ }),
|
|
25441
25896
|
|
|
25442
25897
|
/***/ "9a1f":
|
|
@@ -25628,6 +26083,90 @@ function toPropertyKey(t) {
|
|
|
25628
26083
|
}
|
|
25629
26084
|
module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
25630
26085
|
|
|
26086
|
+
/***/ }),
|
|
26087
|
+
|
|
26088
|
+
/***/ "a4e7":
|
|
26089
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
26090
|
+
|
|
26091
|
+
"use strict";
|
|
26092
|
+
|
|
26093
|
+
var $ = __webpack_require__("23e7");
|
|
26094
|
+
var isSupersetOf = __webpack_require__("395e");
|
|
26095
|
+
var setMethodAcceptSetLike = __webpack_require__("dad2");
|
|
26096
|
+
|
|
26097
|
+
var INCORRECT = !setMethodAcceptSetLike('isSupersetOf', function (result) {
|
|
26098
|
+
return !result;
|
|
26099
|
+
});
|
|
26100
|
+
|
|
26101
|
+
// `Set.prototype.isSupersetOf` method
|
|
26102
|
+
// https://tc39.es/ecma262/#sec-set.prototype.issupersetof
|
|
26103
|
+
$({ target: 'Set', proto: true, real: true, forced: INCORRECT }, {
|
|
26104
|
+
isSupersetOf: isSupersetOf
|
|
26105
|
+
});
|
|
26106
|
+
|
|
26107
|
+
|
|
26108
|
+
/***/ }),
|
|
26109
|
+
|
|
26110
|
+
/***/ "a5f7":
|
|
26111
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
26112
|
+
|
|
26113
|
+
"use strict";
|
|
26114
|
+
|
|
26115
|
+
var aSet = __webpack_require__("dc19");
|
|
26116
|
+
var SetHelpers = __webpack_require__("cb27");
|
|
26117
|
+
var clone = __webpack_require__("83b9");
|
|
26118
|
+
var size = __webpack_require__("8e16");
|
|
26119
|
+
var getSetRecord = __webpack_require__("7f65");
|
|
26120
|
+
var iterateSet = __webpack_require__("384f");
|
|
26121
|
+
var iterateSimple = __webpack_require__("5388");
|
|
26122
|
+
|
|
26123
|
+
var has = SetHelpers.has;
|
|
26124
|
+
var remove = SetHelpers.remove;
|
|
26125
|
+
|
|
26126
|
+
// `Set.prototype.difference` method
|
|
26127
|
+
// https://github.com/tc39/proposal-set-methods
|
|
26128
|
+
module.exports = function difference(other) {
|
|
26129
|
+
var O = aSet(this);
|
|
26130
|
+
var otherRec = getSetRecord(other);
|
|
26131
|
+
var result = clone(O);
|
|
26132
|
+
if (size(O) <= otherRec.size) iterateSet(O, function (e) {
|
|
26133
|
+
if (otherRec.includes(e)) remove(result, e);
|
|
26134
|
+
});
|
|
26135
|
+
else iterateSimple(otherRec.getIterator(), function (e) {
|
|
26136
|
+
if (has(O, e)) remove(result, e);
|
|
26137
|
+
});
|
|
26138
|
+
return result;
|
|
26139
|
+
};
|
|
26140
|
+
|
|
26141
|
+
|
|
26142
|
+
/***/ }),
|
|
26143
|
+
|
|
26144
|
+
/***/ "a732":
|
|
26145
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
26146
|
+
|
|
26147
|
+
"use strict";
|
|
26148
|
+
|
|
26149
|
+
var $ = __webpack_require__("23e7");
|
|
26150
|
+
var iterate = __webpack_require__("2266");
|
|
26151
|
+
var aCallable = __webpack_require__("59ed");
|
|
26152
|
+
var anObject = __webpack_require__("825a");
|
|
26153
|
+
var getIteratorDirect = __webpack_require__("46c4");
|
|
26154
|
+
|
|
26155
|
+
// `Iterator.prototype.some` method
|
|
26156
|
+
// https://tc39.es/ecma262/#sec-iterator.prototype.some
|
|
26157
|
+
$({ target: 'Iterator', proto: true, real: true }, {
|
|
26158
|
+
some: function some(predicate) {
|
|
26159
|
+
anObject(this);
|
|
26160
|
+
aCallable(predicate);
|
|
26161
|
+
var record = getIteratorDirect(this);
|
|
26162
|
+
var counter = 0;
|
|
26163
|
+
return iterate(record, function (value, stop) {
|
|
26164
|
+
if (predicate(value, counter++)) return stop();
|
|
26165
|
+
}, { IS_RECORD: true, INTERRUPTED: true }).stopped;
|
|
26166
|
+
}
|
|
26167
|
+
});
|
|
26168
|
+
|
|
26169
|
+
|
|
25631
26170
|
/***/ }),
|
|
25632
26171
|
|
|
25633
26172
|
/***/ "ab36":
|
|
@@ -26049,6 +26588,36 @@ function toNumber(value) {
|
|
|
26049
26588
|
module.exports = toNumber;
|
|
26050
26589
|
|
|
26051
26590
|
|
|
26591
|
+
/***/ }),
|
|
26592
|
+
|
|
26593
|
+
/***/ "b4bc":
|
|
26594
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
26595
|
+
|
|
26596
|
+
"use strict";
|
|
26597
|
+
|
|
26598
|
+
var aSet = __webpack_require__("dc19");
|
|
26599
|
+
var has = __webpack_require__("cb27").has;
|
|
26600
|
+
var size = __webpack_require__("8e16");
|
|
26601
|
+
var getSetRecord = __webpack_require__("7f65");
|
|
26602
|
+
var iterateSet = __webpack_require__("384f");
|
|
26603
|
+
var iterateSimple = __webpack_require__("5388");
|
|
26604
|
+
var iteratorClose = __webpack_require__("2a62");
|
|
26605
|
+
|
|
26606
|
+
// `Set.prototype.isDisjointFrom` method
|
|
26607
|
+
// https://tc39.github.io/proposal-set-methods/#Set.prototype.isDisjointFrom
|
|
26608
|
+
module.exports = function isDisjointFrom(other) {
|
|
26609
|
+
var O = aSet(this);
|
|
26610
|
+
var otherRec = getSetRecord(other);
|
|
26611
|
+
if (size(O) <= otherRec.size) return iterateSet(O, function (e) {
|
|
26612
|
+
if (otherRec.includes(e)) return false;
|
|
26613
|
+
}, true) !== false;
|
|
26614
|
+
var iterator = otherRec.getIterator();
|
|
26615
|
+
return iterateSimple(iterator, function (e) {
|
|
26616
|
+
if (has(O, e)) return iteratorClose(iterator, 'normal', false);
|
|
26617
|
+
}) !== false;
|
|
26618
|
+
};
|
|
26619
|
+
|
|
26620
|
+
|
|
26052
26621
|
/***/ }),
|
|
26053
26622
|
|
|
26054
26623
|
/***/ "b50d":
|
|
@@ -26061,7 +26630,7 @@ var utils = __webpack_require__("c532");
|
|
|
26061
26630
|
var settle = __webpack_require__("467f");
|
|
26062
26631
|
var cookies = __webpack_require__("7aac");
|
|
26063
26632
|
var buildURL = __webpack_require__("30b5");
|
|
26064
|
-
var buildFullPath = __webpack_require__("
|
|
26633
|
+
var buildFullPath = __webpack_require__("83b9e");
|
|
26065
26634
|
var parseHeaders = __webpack_require__("c345");
|
|
26066
26635
|
var isURLSameOrigin = __webpack_require__("3934");
|
|
26067
26636
|
var transitionalDefaults = __webpack_require__("cafa");
|
|
@@ -29140,6 +29709,28 @@ function _arrayWithHoles(r) {
|
|
|
29140
29709
|
}
|
|
29141
29710
|
module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
29142
29711
|
|
|
29712
|
+
/***/ }),
|
|
29713
|
+
|
|
29714
|
+
/***/ "c1a1":
|
|
29715
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
29716
|
+
|
|
29717
|
+
"use strict";
|
|
29718
|
+
|
|
29719
|
+
var $ = __webpack_require__("23e7");
|
|
29720
|
+
var isDisjointFrom = __webpack_require__("b4bc");
|
|
29721
|
+
var setMethodAcceptSetLike = __webpack_require__("dad2");
|
|
29722
|
+
|
|
29723
|
+
var INCORRECT = !setMethodAcceptSetLike('isDisjointFrom', function (result) {
|
|
29724
|
+
return !result;
|
|
29725
|
+
});
|
|
29726
|
+
|
|
29727
|
+
// `Set.prototype.isDisjointFrom` method
|
|
29728
|
+
// https://tc39.es/ecma262/#sec-set.prototype.isdisjointfrom
|
|
29729
|
+
$({ target: 'Set', proto: true, real: true, forced: INCORRECT }, {
|
|
29730
|
+
isDisjointFrom: isDisjointFrom
|
|
29731
|
+
});
|
|
29732
|
+
|
|
29733
|
+
|
|
29143
29734
|
/***/ }),
|
|
29144
29735
|
|
|
29145
29736
|
/***/ "c240":
|
|
@@ -33879,6 +34470,28 @@ module.exports = {
|
|
|
33879
34470
|
};
|
|
33880
34471
|
|
|
33881
34472
|
|
|
34473
|
+
/***/ }),
|
|
34474
|
+
|
|
34475
|
+
/***/ "cb27":
|
|
34476
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
34477
|
+
|
|
34478
|
+
"use strict";
|
|
34479
|
+
|
|
34480
|
+
var uncurryThis = __webpack_require__("e330");
|
|
34481
|
+
|
|
34482
|
+
// eslint-disable-next-line es/no-set -- safe
|
|
34483
|
+
var SetPrototype = Set.prototype;
|
|
34484
|
+
|
|
34485
|
+
module.exports = {
|
|
34486
|
+
// eslint-disable-next-line es/no-set -- safe
|
|
34487
|
+
Set: Set,
|
|
34488
|
+
add: uncurryThis(SetPrototype.add),
|
|
34489
|
+
has: uncurryThis(SetPrototype.has),
|
|
34490
|
+
remove: uncurryThis(SetPrototype['delete']),
|
|
34491
|
+
proto: SetPrototype
|
|
34492
|
+
};
|
|
34493
|
+
|
|
34494
|
+
|
|
33882
34495
|
/***/ }),
|
|
33883
34496
|
|
|
33884
34497
|
/***/ "cb2d":
|
|
@@ -34235,6 +34848,34 @@ module.exports = JSON.parse("{\"code\":\"he\",\"messages\":{\"alpha\":\"השדה
|
|
|
34235
34848
|
/* unused harmony reexport * */
|
|
34236
34849
|
|
|
34237
34850
|
|
|
34851
|
+
/***/ }),
|
|
34852
|
+
|
|
34853
|
+
/***/ "d866":
|
|
34854
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
34855
|
+
|
|
34856
|
+
"use strict";
|
|
34857
|
+
|
|
34858
|
+
var $ = __webpack_require__("23e7");
|
|
34859
|
+
var iterate = __webpack_require__("2266");
|
|
34860
|
+
var aCallable = __webpack_require__("59ed");
|
|
34861
|
+
var anObject = __webpack_require__("825a");
|
|
34862
|
+
var getIteratorDirect = __webpack_require__("46c4");
|
|
34863
|
+
|
|
34864
|
+
// `Iterator.prototype.every` method
|
|
34865
|
+
// https://tc39.es/ecma262/#sec-iterator.prototype.every
|
|
34866
|
+
$({ target: 'Iterator', proto: true, real: true }, {
|
|
34867
|
+
every: function every(predicate) {
|
|
34868
|
+
anObject(this);
|
|
34869
|
+
aCallable(predicate);
|
|
34870
|
+
var record = getIteratorDirect(this);
|
|
34871
|
+
var counter = 0;
|
|
34872
|
+
return !iterate(record, function (value, stop) {
|
|
34873
|
+
if (!predicate(value, counter++)) return stop();
|
|
34874
|
+
}, { IS_RECORD: true, INTERRUPTED: true }).stopped;
|
|
34875
|
+
}
|
|
34876
|
+
});
|
|
34877
|
+
|
|
34878
|
+
|
|
34238
34879
|
/***/ }),
|
|
34239
34880
|
|
|
34240
34881
|
/***/ "d925":
|
|
@@ -34345,6 +34986,88 @@ exportWebAssemblyErrorCauseWrapper('RuntimeError', function (init) {
|
|
|
34345
34986
|
});
|
|
34346
34987
|
|
|
34347
34988
|
|
|
34989
|
+
/***/ }),
|
|
34990
|
+
|
|
34991
|
+
/***/ "dad2":
|
|
34992
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
34993
|
+
|
|
34994
|
+
"use strict";
|
|
34995
|
+
|
|
34996
|
+
var getBuiltIn = __webpack_require__("d066");
|
|
34997
|
+
|
|
34998
|
+
var createSetLike = function (size) {
|
|
34999
|
+
return {
|
|
35000
|
+
size: size,
|
|
35001
|
+
has: function () {
|
|
35002
|
+
return false;
|
|
35003
|
+
},
|
|
35004
|
+
keys: function () {
|
|
35005
|
+
return {
|
|
35006
|
+
next: function () {
|
|
35007
|
+
return { done: true };
|
|
35008
|
+
}
|
|
35009
|
+
};
|
|
35010
|
+
}
|
|
35011
|
+
};
|
|
35012
|
+
};
|
|
35013
|
+
|
|
35014
|
+
var createSetLikeWithInfinitySize = function (size) {
|
|
35015
|
+
return {
|
|
35016
|
+
size: size,
|
|
35017
|
+
has: function () {
|
|
35018
|
+
return true;
|
|
35019
|
+
},
|
|
35020
|
+
keys: function () {
|
|
35021
|
+
throw new Error('e');
|
|
35022
|
+
}
|
|
35023
|
+
};
|
|
35024
|
+
};
|
|
35025
|
+
|
|
35026
|
+
module.exports = function (name, callback) {
|
|
35027
|
+
var Set = getBuiltIn('Set');
|
|
35028
|
+
try {
|
|
35029
|
+
new Set()[name](createSetLike(0));
|
|
35030
|
+
try {
|
|
35031
|
+
// late spec change, early WebKit ~ Safari 17.0 beta implementation does not pass it
|
|
35032
|
+
// https://github.com/tc39/proposal-set-methods/pull/88
|
|
35033
|
+
new Set()[name](createSetLike(-1));
|
|
35034
|
+
return false;
|
|
35035
|
+
} catch (error2) {
|
|
35036
|
+
if (!callback) return true;
|
|
35037
|
+
// early V8 implementation bug
|
|
35038
|
+
// https://issues.chromium.org/issues/351332634
|
|
35039
|
+
try {
|
|
35040
|
+
new Set()[name](createSetLikeWithInfinitySize(-Infinity));
|
|
35041
|
+
return false;
|
|
35042
|
+
} catch (error) {
|
|
35043
|
+
var set = new Set();
|
|
35044
|
+
set.add(1);
|
|
35045
|
+
set.add(2);
|
|
35046
|
+
return callback(set[name](createSetLikeWithInfinitySize(Infinity)));
|
|
35047
|
+
}
|
|
35048
|
+
}
|
|
35049
|
+
} catch (error) {
|
|
35050
|
+
return false;
|
|
35051
|
+
}
|
|
35052
|
+
};
|
|
35053
|
+
|
|
35054
|
+
|
|
35055
|
+
/***/ }),
|
|
35056
|
+
|
|
35057
|
+
/***/ "dc19":
|
|
35058
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
35059
|
+
|
|
35060
|
+
"use strict";
|
|
35061
|
+
|
|
35062
|
+
var has = __webpack_require__("cb27").has;
|
|
35063
|
+
|
|
35064
|
+
// Perform ? RequireInternalSlot(M, [[SetData]])
|
|
35065
|
+
module.exports = function (it) {
|
|
35066
|
+
has(it);
|
|
35067
|
+
return it;
|
|
35068
|
+
};
|
|
35069
|
+
|
|
35070
|
+
|
|
34348
35071
|
/***/ }),
|
|
34349
35072
|
|
|
34350
35073
|
/***/ "dc20":
|
|
@@ -35197,6 +35920,32 @@ module.exports = function (it) {
|
|
|
35197
35920
|
};
|
|
35198
35921
|
|
|
35199
35922
|
|
|
35923
|
+
/***/ }),
|
|
35924
|
+
|
|
35925
|
+
/***/ "e9bc":
|
|
35926
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
35927
|
+
|
|
35928
|
+
"use strict";
|
|
35929
|
+
|
|
35930
|
+
var aSet = __webpack_require__("dc19");
|
|
35931
|
+
var add = __webpack_require__("cb27").add;
|
|
35932
|
+
var clone = __webpack_require__("83b9");
|
|
35933
|
+
var getSetRecord = __webpack_require__("7f65");
|
|
35934
|
+
var iterateSimple = __webpack_require__("5388");
|
|
35935
|
+
|
|
35936
|
+
// `Set.prototype.union` method
|
|
35937
|
+
// https://github.com/tc39/proposal-set-methods
|
|
35938
|
+
module.exports = function union(other) {
|
|
35939
|
+
var O = aSet(this);
|
|
35940
|
+
var keysIter = getSetRecord(other).getIterator();
|
|
35941
|
+
var result = clone(O);
|
|
35942
|
+
iterateSimple(keysIter, function (it) {
|
|
35943
|
+
add(result, it);
|
|
35944
|
+
});
|
|
35945
|
+
return result;
|
|
35946
|
+
};
|
|
35947
|
+
|
|
35948
|
+
|
|
35200
35949
|
/***/ }),
|
|
35201
35950
|
|
|
35202
35951
|
/***/ "e9cd":
|
|
@@ -35364,6 +36113,34 @@ module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
|
|
|
35364
36113
|
};
|
|
35365
36114
|
|
|
35366
36115
|
|
|
36116
|
+
/***/ }),
|
|
36117
|
+
|
|
36118
|
+
/***/ "f665":
|
|
36119
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
36120
|
+
|
|
36121
|
+
"use strict";
|
|
36122
|
+
|
|
36123
|
+
var $ = __webpack_require__("23e7");
|
|
36124
|
+
var iterate = __webpack_require__("2266");
|
|
36125
|
+
var aCallable = __webpack_require__("59ed");
|
|
36126
|
+
var anObject = __webpack_require__("825a");
|
|
36127
|
+
var getIteratorDirect = __webpack_require__("46c4");
|
|
36128
|
+
|
|
36129
|
+
// `Iterator.prototype.find` method
|
|
36130
|
+
// https://tc39.es/ecma262/#sec-iterator.prototype.find
|
|
36131
|
+
$({ target: 'Iterator', proto: true, real: true }, {
|
|
36132
|
+
find: function find(predicate) {
|
|
36133
|
+
anObject(this);
|
|
36134
|
+
aCallable(predicate);
|
|
36135
|
+
var record = getIteratorDirect(this);
|
|
36136
|
+
var counter = 0;
|
|
36137
|
+
return iterate(record, function (value, stop) {
|
|
36138
|
+
if (predicate(value, counter++)) return stop(value);
|
|
36139
|
+
}, { IS_RECORD: true, INTERRUPTED: true }).result;
|
|
36140
|
+
}
|
|
36141
|
+
});
|
|
36142
|
+
|
|
36143
|
+
|
|
35367
36144
|
/***/ }),
|
|
35368
36145
|
|
|
35369
36146
|
/***/ "f694":
|
|
@@ -35532,7 +36309,7 @@ if (typeof window !== 'undefined') {
|
|
|
35532
36309
|
// Indicate to webpack that this file can be concatenated
|
|
35533
36310
|
/* harmony default export */ var setPublicPath = (null);
|
|
35534
36311
|
|
|
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=
|
|
36312
|
+
// 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=25cf8cc7
|
|
35536
36313
|
var render = function render() {
|
|
35537
36314
|
var _vm = this,
|
|
35538
36315
|
_c = _vm._self._c;
|
|
@@ -35685,7 +36462,7 @@ var render = function render() {
|
|
|
35685
36462
|
};
|
|
35686
36463
|
var staticRenderFns = [];
|
|
35687
36464
|
|
|
35688
|
-
// CONCATENATED MODULE: ./src/components/DynamicForm.vue?vue&type=template&id=
|
|
36465
|
+
// CONCATENATED MODULE: ./src/components/DynamicForm.vue?vue&type=template&id=25cf8cc7
|
|
35689
36466
|
|
|
35690
36467
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.push.js
|
|
35691
36468
|
var es_array_push = __webpack_require__("14d9");
|
|
@@ -41887,72 +42664,52 @@ var FileField_component = normalizeComponent(
|
|
|
41887
42664
|
)
|
|
41888
42665
|
|
|
41889
42666
|
/* harmony default export */ var FileField = (FileField_component.exports);
|
|
41890
|
-
// 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/
|
|
41891
|
-
var
|
|
42667
|
+
// 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/NormalFileField.vue?vue&type=template&id=53457fd3
|
|
42668
|
+
var NormalFileFieldvue_type_template_id_53457fd3_render = function render() {
|
|
41892
42669
|
var _vm = this,
|
|
41893
42670
|
_c = _vm._self._c;
|
|
41894
|
-
return _c('
|
|
41895
|
-
staticClass: "
|
|
42671
|
+
return _c('div', {
|
|
42672
|
+
staticClass: "col-12 p-0 fileFieldAttachment",
|
|
41896
42673
|
attrs: {
|
|
41897
|
-
"
|
|
41898
|
-
|
|
42674
|
+
"id": 'File_' + _vm.fieldInfo.name
|
|
42675
|
+
}
|
|
42676
|
+
}, [_c('div', {
|
|
42677
|
+
staticClass: "custom-file"
|
|
42678
|
+
}, [_c('input', {
|
|
42679
|
+
staticClass: "custom-file-input",
|
|
42680
|
+
attrs: {
|
|
42681
|
+
"type": "file",
|
|
42682
|
+
"id": 'NormalFile_' + _vm.fieldInfo.name,
|
|
42683
|
+
"disabled": _vm.fieldInfo.disabled,
|
|
42684
|
+
"multiple": _vm.canUploadMultipleFile(),
|
|
42685
|
+
"aria-describedby": 'NormalFile_' + _vm.fieldInfo.name
|
|
41899
42686
|
},
|
|
41900
|
-
|
|
41901
|
-
|
|
41902
|
-
|
|
41903
|
-
errors
|
|
41904
|
-
}) {
|
|
41905
|
-
return [_c('div', {
|
|
41906
|
-
staticClass: "w-100 d-flex dynamic-multiselect"
|
|
41907
|
-
}, [_vm.options && _vm.options.length > 0 ? _c('tree-select', {
|
|
41908
|
-
staticClass: "w-100 form-control border-0 p-0",
|
|
41909
|
-
attrs: {
|
|
41910
|
-
"multiple": false,
|
|
41911
|
-
"options": _vm.options,
|
|
41912
|
-
"placeholder": _vm.fieldInfo.placeholder
|
|
41913
|
-
},
|
|
41914
|
-
model: {
|
|
41915
|
-
value: _vm.fieldInfo.value,
|
|
41916
|
-
callback: function ($$v) {
|
|
41917
|
-
_vm.$set(_vm.fieldInfo, "value", $$v);
|
|
41918
|
-
},
|
|
41919
|
-
expression: "fieldInfo.value"
|
|
41920
|
-
}
|
|
41921
|
-
}) : _vm._e(), _vm.showAddIcon() ? _c('div', {
|
|
41922
|
-
staticClass: "ml-2 mt-1"
|
|
41923
|
-
}, [_c('a', {
|
|
41924
|
-
class: _vm.addButtonClass()
|
|
41925
|
-
}, [_c('i', {
|
|
41926
|
-
class: _vm.addIconClass(),
|
|
41927
|
-
attrs: {
|
|
41928
|
-
"alt": "+"
|
|
41929
|
-
},
|
|
41930
|
-
on: {
|
|
41931
|
-
"click": function ($event) {
|
|
41932
|
-
return _vm.onAddButtonClick($event);
|
|
41933
|
-
}
|
|
41934
|
-
}
|
|
41935
|
-
})])]) : _vm._e(), errors[0] ? _c('span', {
|
|
41936
|
-
staticClass: "invalid-feedback d-block"
|
|
41937
|
-
}, [_vm._v(_vm._s(errors[0]))]) : _vm._e()], 1)];
|
|
42687
|
+
on: {
|
|
42688
|
+
"change": function ($event) {
|
|
42689
|
+
return _vm.onChange($event);
|
|
41938
42690
|
}
|
|
41939
|
-
}
|
|
41940
|
-
})
|
|
42691
|
+
}
|
|
42692
|
+
}), _c('label', {
|
|
42693
|
+
staticClass: "custom-file-label",
|
|
42694
|
+
attrs: {
|
|
42695
|
+
"for": 'NormalFile_' + _vm.fieldInfo.name
|
|
42696
|
+
}
|
|
42697
|
+
}, [_vm._v("Choose file")])]), _vm.errors.length > 0 ? _c('div', _vm._l(_vm.errors, function (error, index) {
|
|
42698
|
+
return _c('div', {
|
|
42699
|
+
key: index,
|
|
42700
|
+
staticClass: "file-upload__error"
|
|
42701
|
+
}, [_c('span', [_vm._v(_vm._s(error))])]);
|
|
42702
|
+
}), 0) : _vm._e()]);
|
|
41941
42703
|
};
|
|
41942
|
-
var
|
|
41943
|
-
|
|
41944
|
-
// CONCATENATED MODULE: ./src/components/TreeSelectField.vue?vue&type=template&id=4975b454
|
|
42704
|
+
var NormalFileFieldvue_type_template_id_53457fd3_staticRenderFns = [];
|
|
41945
42705
|
|
|
41946
|
-
//
|
|
41947
|
-
var vue_treeselect_cjs = __webpack_require__("ca17");
|
|
41948
|
-
var vue_treeselect_cjs_default = /*#__PURE__*/__webpack_require__.n(vue_treeselect_cjs);
|
|
42706
|
+
// CONCATENATED MODULE: ./src/components/NormalFileField.vue?vue&type=template&id=53457fd3
|
|
41949
42707
|
|
|
41950
|
-
// 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/
|
|
42708
|
+
// 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/NormalFileField.vue?vue&type=script&lang=js
|
|
41951
42709
|
|
|
41952
42710
|
|
|
41953
|
-
/* harmony default export */ var
|
|
42711
|
+
/* harmony default export */ var NormalFileFieldvue_type_script_lang_js = ({
|
|
41954
42712
|
components: {
|
|
41955
|
-
'tree-select': vue_treeselect_cjs_default.a,
|
|
41956
42713
|
Field: ValidationProvider
|
|
41957
42714
|
},
|
|
41958
42715
|
props: {
|
|
@@ -41965,172 +42722,3038 @@ var vue_treeselect_cjs_default = /*#__PURE__*/__webpack_require__.n(vue_treesele
|
|
|
41965
42722
|
required: true
|
|
41966
42723
|
}
|
|
41967
42724
|
},
|
|
41968
|
-
data() {
|
|
42725
|
+
data: function () {
|
|
41969
42726
|
return {
|
|
41970
|
-
|
|
41971
|
-
|
|
41972
|
-
|
|
41973
|
-
|
|
41974
|
-
|
|
41975
|
-
|
|
41976
|
-
|
|
42727
|
+
isDragging: false,
|
|
42728
|
+
maxSize: 0,
|
|
42729
|
+
accept: '',
|
|
42730
|
+
reject: '',
|
|
42731
|
+
errors: [],
|
|
42732
|
+
file: {
|
|
42733
|
+
name: "",
|
|
42734
|
+
size: 0,
|
|
42735
|
+
type: "",
|
|
42736
|
+
fileExtention: "",
|
|
42737
|
+
url: "",
|
|
42738
|
+
isImage: false,
|
|
42739
|
+
isUploaded: false
|
|
42740
|
+
},
|
|
42741
|
+
previewFiles: []
|
|
41977
42742
|
};
|
|
41978
42743
|
},
|
|
41979
|
-
mounted() {
|
|
42744
|
+
mounted: function () {
|
|
41980
42745
|
this.fieldInfo.validationRules = getValidationRules(this.fieldInfo.validationRules, this.lang);
|
|
41981
|
-
if (this.fieldInfo.
|
|
41982
|
-
|
|
41983
|
-
this.options = this.fieldInfo.config.OptionsForBind;
|
|
41984
|
-
} else {
|
|
41985
|
-
this.options = this.fieldInfo.config.options;
|
|
41986
|
-
}
|
|
42746
|
+
if (this.fieldInfo.placeholder) {
|
|
42747
|
+
this.fileName = this.fieldInfo.placeholder;
|
|
41987
42748
|
}
|
|
41988
|
-
if (
|
|
41989
|
-
this.
|
|
42749
|
+
if (this.fieldInfo && this.fieldInfo.config && this.fieldInfo.config.hasOwnProperty('maxSize')) {
|
|
42750
|
+
this.maxSize = this.fieldInfo.config.maxSize;
|
|
42751
|
+
}
|
|
42752
|
+
if (this.fieldInfo && this.fieldInfo.config && this.fieldInfo.config.hasOwnProperty('accept')) {
|
|
42753
|
+
this.accept = Array.prototype.map.call(this.fieldInfo.config.accept, function (item) {
|
|
42754
|
+
return item.fileType;
|
|
42755
|
+
}).join(",");
|
|
42756
|
+
}
|
|
42757
|
+
if (this.fieldInfo && this.fieldInfo.config && this.fieldInfo.config.hasOwnProperty('reject')) {
|
|
42758
|
+
this.reject = Array.prototype.map.call(this.fieldInfo.config.reject, function (item) {
|
|
42759
|
+
return item.fileType;
|
|
42760
|
+
}).join(",");
|
|
41990
42761
|
}
|
|
41991
42762
|
},
|
|
41992
42763
|
methods: {
|
|
41993
|
-
|
|
41994
|
-
|
|
41995
|
-
if (field.hasOwnProperty('label') && field.label) {
|
|
41996
|
-
labelName = field.label;
|
|
41997
|
-
} else if (field.hasOwnProperty('display_name') && field.display_name) {
|
|
41998
|
-
labelName = field.display_name;
|
|
41999
|
-
}
|
|
42000
|
-
return labelName;
|
|
42764
|
+
openFilePopup() {
|
|
42765
|
+
document.querySelectorAll('#File_' + this.fieldInfo.name + ' [type="file"]')[0].click();
|
|
42001
42766
|
},
|
|
42002
|
-
|
|
42003
|
-
|
|
42004
|
-
|
|
42767
|
+
RemoveFile(event, index) {
|
|
42768
|
+
event.stopPropagation();
|
|
42769
|
+
const dt = new DataTransfer();
|
|
42770
|
+
const input = document.querySelectorAll('#File_' + this.fieldInfo.name + ' [type="file"]')[0];
|
|
42771
|
+
const {
|
|
42772
|
+
files
|
|
42773
|
+
} = input;
|
|
42774
|
+
this.previewFiles = [];
|
|
42775
|
+
for (let i = 0; i < files.length; i++) {
|
|
42776
|
+
const file = files[i];
|
|
42777
|
+
if (index !== i) {
|
|
42778
|
+
dt.items.add(file);
|
|
42779
|
+
var fileExtention = file.name.split(".").pop();
|
|
42780
|
+
var isImage = ["jpg", "jpeg", "png", "gif"].includes(fileExtention);
|
|
42781
|
+
let reader = new FileReader();
|
|
42782
|
+
reader.addEventListener("load", () => {
|
|
42783
|
+
// Set file data
|
|
42784
|
+
this.file = {
|
|
42785
|
+
name: file.name.split(".").shift(),
|
|
42786
|
+
size: Math.round(file.size / 1024 / 1024 * 100) / 100,
|
|
42787
|
+
type: file.type,
|
|
42788
|
+
fileExtention: fileExtention,
|
|
42789
|
+
isImage: isImage,
|
|
42790
|
+
url: reader.result,
|
|
42791
|
+
isUploaded: true
|
|
42792
|
+
};
|
|
42793
|
+
this.previewFiles.push(this.file);
|
|
42794
|
+
}, false);
|
|
42795
|
+
// Read uploaded file
|
|
42796
|
+
reader.readAsDataURL(file);
|
|
42797
|
+
}
|
|
42798
|
+
// here you exclude the file. thus removing it.
|
|
42799
|
+
}
|
|
42800
|
+
input.files = dt.files; // Assign the updates list
|
|
42801
|
+
|
|
42802
|
+
if (this.fieldInfo && this.fieldInfo.config && this.fieldInfo.config.onRemoveFile) {
|
|
42803
|
+
this.fieldInfo.config.onRemoveFile(event, index, this.fieldInfo);
|
|
42005
42804
|
}
|
|
42006
42805
|
},
|
|
42007
|
-
|
|
42008
|
-
|
|
42009
|
-
|
|
42806
|
+
onChange(e) {
|
|
42807
|
+
this.errors = [];
|
|
42808
|
+
// Check if file is selected
|
|
42809
|
+
if (e.target.files && e.target.files[0]) {
|
|
42810
|
+
// Check if file is valid
|
|
42811
|
+
for (let index = 0; index < e.target.files.length; index++) {
|
|
42812
|
+
const file = e.target.files[index];
|
|
42813
|
+
if (this.isFileValid(file)) {
|
|
42814
|
+
// Get uploaded file
|
|
42815
|
+
// Get file size
|
|
42816
|
+
var fileSize = Math.round(file.size / 1024 / 1024 * 100) / 100;
|
|
42817
|
+
// Get file extention
|
|
42818
|
+
var fileExtention = file.name.split(".").pop();
|
|
42819
|
+
// Get file name
|
|
42820
|
+
var fileName = file.name.split(".").shift();
|
|
42821
|
+
// Check if file is an image
|
|
42822
|
+
var isImage = ["jpg", "jpeg", "png", "gif"].includes(fileExtention);
|
|
42823
|
+
// Print to console
|
|
42824
|
+
console.log(fileSize, fileExtention, fileName, isImage);
|
|
42825
|
+
// Load the FileReader API
|
|
42826
|
+
let reader = new FileReader();
|
|
42827
|
+
reader.addEventListener("load", () => {
|
|
42828
|
+
// Set file data
|
|
42829
|
+
this.file = {
|
|
42830
|
+
name: fileName,
|
|
42831
|
+
size: fileSize,
|
|
42832
|
+
type: file.type,
|
|
42833
|
+
fileExtention: fileExtention,
|
|
42834
|
+
isImage: isImage,
|
|
42835
|
+
url: reader.result,
|
|
42836
|
+
isUploaded: true
|
|
42837
|
+
};
|
|
42838
|
+
if (this.canUploadMultipleFile() == false) {
|
|
42839
|
+
this.previewFiles = [];
|
|
42840
|
+
}
|
|
42841
|
+
this.previewFiles.push(this.file);
|
|
42842
|
+
}, false);
|
|
42843
|
+
// Read uploaded file
|
|
42844
|
+
reader.readAsDataURL(file);
|
|
42845
|
+
} else {
|
|
42846
|
+
console.log("Invalid file");
|
|
42847
|
+
}
|
|
42848
|
+
}
|
|
42849
|
+
var fileName = document.getElementById('NormalFile_' + this.fieldInfo.name).files[0].name;
|
|
42850
|
+
var nextSibling = e.target.nextElementSibling;
|
|
42851
|
+
nextSibling.innerText = fileName;
|
|
42852
|
+
if (this.errors.length == 0) {
|
|
42853
|
+
this.fieldInfo.value = e.target.files;
|
|
42854
|
+
if (this.fieldInfo && this.fieldInfo.config && this.fieldInfo.config.onChange) {
|
|
42855
|
+
this.fieldInfo.config.onChange(e, this.fieldInfo);
|
|
42856
|
+
}
|
|
42857
|
+
}
|
|
42010
42858
|
}
|
|
42011
42859
|
},
|
|
42012
|
-
|
|
42013
|
-
if (
|
|
42014
|
-
|
|
42860
|
+
isFileSizeValid(fileSize) {
|
|
42861
|
+
if (fileSize <= this.maxSize) {
|
|
42862
|
+
console.log("File size is valid");
|
|
42015
42863
|
} else {
|
|
42016
|
-
|
|
42864
|
+
this.errors.push(`File size should be less than ${this.maxSize} MB`);
|
|
42017
42865
|
}
|
|
42018
42866
|
},
|
|
42019
|
-
|
|
42020
|
-
if (this.
|
|
42021
|
-
|
|
42867
|
+
isFileTypeValid(fileExtention) {
|
|
42868
|
+
if (this.reject != "" && this.reject.split(",").length > 0 && this.reject.split(",").includes(fileExtention)) {
|
|
42869
|
+
this.errors.push(`File type should not be ${this.reject}`);
|
|
42870
|
+
}
|
|
42871
|
+
if (this.accept != "" && this.accept.split(",").length > 0) {
|
|
42872
|
+
if (this.accept.split(",").includes(fileExtention)) {
|
|
42873
|
+
console.log("File type is valid");
|
|
42874
|
+
} else {
|
|
42875
|
+
this.errors.push(`File type should be ${this.accept}`);
|
|
42876
|
+
}
|
|
42877
|
+
}
|
|
42878
|
+
},
|
|
42879
|
+
isFileValid(file) {
|
|
42880
|
+
this.isFileSizeValid(Math.round(file.size / 1024 / 1024 * 100) / 100);
|
|
42881
|
+
this.isFileTypeValid(file.name.split(".").pop());
|
|
42882
|
+
if (this.errors.length === 0) {
|
|
42883
|
+
return true;
|
|
42022
42884
|
} else {
|
|
42023
|
-
return
|
|
42885
|
+
return false;
|
|
42024
42886
|
}
|
|
42025
|
-
}
|
|
42026
|
-
}
|
|
42027
|
-
});
|
|
42028
|
-
// CONCATENATED MODULE: ./src/components/TreeSelectField.vue?vue&type=script&lang=js
|
|
42029
|
-
/* harmony default export */ var components_TreeSelectFieldvue_type_script_lang_js = (TreeSelectFieldvue_type_script_lang_js);
|
|
42030
|
-
// CONCATENATED MODULE: ./src/components/TreeSelectField.vue
|
|
42031
|
-
|
|
42032
|
-
|
|
42033
|
-
|
|
42034
|
-
|
|
42035
|
-
|
|
42036
|
-
/* normalize component */
|
|
42037
|
-
|
|
42038
|
-
var TreeSelectField_component = normalizeComponent(
|
|
42039
|
-
components_TreeSelectFieldvue_type_script_lang_js,
|
|
42040
|
-
TreeSelectFieldvue_type_template_id_4975b454_render,
|
|
42041
|
-
TreeSelectFieldvue_type_template_id_4975b454_staticRenderFns,
|
|
42042
|
-
false,
|
|
42043
|
-
null,
|
|
42044
|
-
null,
|
|
42045
|
-
null
|
|
42046
|
-
|
|
42047
|
-
)
|
|
42048
|
-
|
|
42049
|
-
/* harmony default export */ var TreeSelectField = (TreeSelectField_component.exports);
|
|
42050
|
-
// 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/SlotField.vue?vue&type=template&id=552c7e65
|
|
42051
|
-
var SlotFieldvue_type_template_id_552c7e65_render = function render() {
|
|
42052
|
-
var _vm = this,
|
|
42053
|
-
_c = _vm._self._c;
|
|
42054
|
-
return _c('Field', {
|
|
42055
|
-
staticClass: "w-100",
|
|
42056
|
-
attrs: {
|
|
42057
|
-
"name": _vm.GetDisplayLabel(_vm.fieldInfo),
|
|
42058
|
-
"rules": _vm.fieldInfo.validationRules
|
|
42059
42887
|
},
|
|
42060
|
-
|
|
42061
|
-
|
|
42062
|
-
|
|
42063
|
-
errors
|
|
42064
|
-
}) {
|
|
42065
|
-
return [_vm._t("tgslot", null, {
|
|
42066
|
-
"data": {
|
|
42067
|
-
fieldInfo: _vm.fieldInfo,
|
|
42068
|
-
error: errors.length > 0 ? errors[0] : ''
|
|
42069
|
-
}
|
|
42070
|
-
})];
|
|
42888
|
+
canUploadMultipleFile() {
|
|
42889
|
+
if (this.fieldInfo.config && this.fieldInfo.config.hasOwnProperty('multiple')) {
|
|
42890
|
+
return this.fieldInfo.config.multiple;
|
|
42071
42891
|
}
|
|
42072
|
-
|
|
42073
|
-
});
|
|
42074
|
-
};
|
|
42075
|
-
var SlotFieldvue_type_template_id_552c7e65_staticRenderFns = [];
|
|
42076
|
-
|
|
42077
|
-
// CONCATENATED MODULE: ./src/components/SlotField.vue?vue&type=template&id=552c7e65
|
|
42078
|
-
|
|
42079
|
-
// 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/SlotField.vue?vue&type=script&lang=js
|
|
42080
|
-
|
|
42081
|
-
/* harmony default export */ var SlotFieldvue_type_script_lang_js = ({
|
|
42082
|
-
components: {
|
|
42083
|
-
Field: ValidationProvider
|
|
42084
|
-
},
|
|
42085
|
-
props: {
|
|
42086
|
-
lang: {
|
|
42087
|
-
type: String,
|
|
42088
|
-
default: 'en'
|
|
42892
|
+
return false;
|
|
42089
42893
|
},
|
|
42090
|
-
|
|
42091
|
-
|
|
42092
|
-
|
|
42093
|
-
|
|
42094
|
-
|
|
42095
|
-
|
|
42096
|
-
|
|
42097
|
-
|
|
42098
|
-
|
|
42099
|
-
labelName = field.label;
|
|
42100
|
-
} else if (field.hasOwnProperty('display_name') && field.display_name) {
|
|
42101
|
-
labelName = field.display_name;
|
|
42894
|
+
getSelectedFile: function () {
|
|
42895
|
+
try {
|
|
42896
|
+
if (this.fieldInfo.config && this.fieldInfo.config.hasOwnProperty('showSelectedFiles')) {
|
|
42897
|
+
return this.fieldInfo.config.showSelectedFiles;
|
|
42898
|
+
}
|
|
42899
|
+
return [];
|
|
42900
|
+
} catch (ex) {
|
|
42901
|
+
console.log(ex);
|
|
42902
|
+
return [];
|
|
42102
42903
|
}
|
|
42103
|
-
|
|
42104
|
-
|
|
42105
|
-
|
|
42106
|
-
|
|
42107
|
-
|
|
42108
|
-
|
|
42109
|
-
|
|
42110
|
-
|
|
42111
|
-
|
|
42112
|
-
|
|
42113
|
-
|
|
42114
|
-
|
|
42115
|
-
|
|
42116
|
-
|
|
42117
|
-
|
|
42118
|
-
|
|
42119
|
-
|
|
42120
|
-
|
|
42121
|
-
|
|
42122
|
-
|
|
42123
|
-
|
|
42124
|
-
|
|
42125
|
-
|
|
42126
|
-
|
|
42127
|
-
|
|
42128
|
-
|
|
42129
|
-
|
|
42130
|
-
|
|
42131
|
-
|
|
42132
|
-
|
|
42133
|
-
|
|
42904
|
+
},
|
|
42905
|
+
isShowCrossOnSelectedFile: function () {
|
|
42906
|
+
try {
|
|
42907
|
+
if (this.fieldInfo.config && this.fieldInfo.config.hasOwnProperty('showCrossOnSelectedFiles')) {
|
|
42908
|
+
return this.fieldInfo.config.showCrossOnSelectedFiles;
|
|
42909
|
+
}
|
|
42910
|
+
return true;
|
|
42911
|
+
} catch (ex) {
|
|
42912
|
+
console.log(ex);
|
|
42913
|
+
return true;
|
|
42914
|
+
}
|
|
42915
|
+
},
|
|
42916
|
+
getFileName: function (name) {
|
|
42917
|
+
try {
|
|
42918
|
+
let arr = name.split(".");
|
|
42919
|
+
let path = arr[0].length > 4 ? arr[0].substring(0, 4) + "..." + arr[1] : arr[0] + "." + arr[1];
|
|
42920
|
+
return path;
|
|
42921
|
+
} catch (ex) {
|
|
42922
|
+
return name;
|
|
42923
|
+
}
|
|
42924
|
+
},
|
|
42925
|
+
getFileIcon: function (name) {
|
|
42926
|
+
let arr = name.split(".");
|
|
42927
|
+
let icon = "";
|
|
42928
|
+
switch (arr[1]) {
|
|
42929
|
+
case "jpg":
|
|
42930
|
+
case "png":
|
|
42931
|
+
case "jpeg":
|
|
42932
|
+
case "gif":
|
|
42933
|
+
icon = "fa-file-image-o";
|
|
42934
|
+
break;
|
|
42935
|
+
case "doc":
|
|
42936
|
+
case "docs":
|
|
42937
|
+
icon = "fa-file-word-o";
|
|
42938
|
+
break;
|
|
42939
|
+
case "pdf":
|
|
42940
|
+
icon = "fa-file-pdf-o";
|
|
42941
|
+
break;
|
|
42942
|
+
case "xlsx":
|
|
42943
|
+
case "xlsm":
|
|
42944
|
+
case "xlsb":
|
|
42945
|
+
case "xltx":
|
|
42946
|
+
case "xls":
|
|
42947
|
+
case "xlt":
|
|
42948
|
+
icon = "fa-file-excel-o";
|
|
42949
|
+
break;
|
|
42950
|
+
case "mp4":
|
|
42951
|
+
case "mov":
|
|
42952
|
+
case "wmv":
|
|
42953
|
+
case "flv":
|
|
42954
|
+
case "avi":
|
|
42955
|
+
case "webm":
|
|
42956
|
+
case "mkv":
|
|
42957
|
+
case "avchd":
|
|
42958
|
+
icon = "fa-file-video-o";
|
|
42959
|
+
break;
|
|
42960
|
+
case "pptx":
|
|
42961
|
+
icon = "fa-file-powerpoint-o";
|
|
42962
|
+
break;
|
|
42963
|
+
case "mp3":
|
|
42964
|
+
case "aac":
|
|
42965
|
+
case "wav":
|
|
42966
|
+
case "aiff":
|
|
42967
|
+
case "dsd":
|
|
42968
|
+
case "pcm":
|
|
42969
|
+
icon = "fa-file-audio-o";
|
|
42970
|
+
break;
|
|
42971
|
+
default:
|
|
42972
|
+
icon = "fa-file-o";
|
|
42973
|
+
}
|
|
42974
|
+
return icon;
|
|
42975
|
+
},
|
|
42976
|
+
onDelete: function (item) {
|
|
42977
|
+
try {
|
|
42978
|
+
if (this.fieldInfo.config && this.fieldInfo.config.hasOwnProperty('onDeleteSelectedFiles')) {
|
|
42979
|
+
this.fieldInfo.config.onDeleteSelectedFiles(item);
|
|
42980
|
+
}
|
|
42981
|
+
} catch (ex) {
|
|
42982
|
+
console.log(ex);
|
|
42983
|
+
}
|
|
42984
|
+
},
|
|
42985
|
+
onClickSelectedFile: function (item) {
|
|
42986
|
+
try {
|
|
42987
|
+
if (this.fieldInfo.config && this.fieldInfo.config.hasOwnProperty('onClickSelectedFiles')) {
|
|
42988
|
+
this.fieldInfo.config.onClickSelectedFiles(item);
|
|
42989
|
+
}
|
|
42990
|
+
} catch (ex) {
|
|
42991
|
+
console.log(ex);
|
|
42992
|
+
}
|
|
42993
|
+
},
|
|
42994
|
+
dragOver: function () {
|
|
42995
|
+
this.isDragging = true;
|
|
42996
|
+
},
|
|
42997
|
+
dragLeave: function () {
|
|
42998
|
+
this.isDragging = false;
|
|
42999
|
+
},
|
|
43000
|
+
handleDrop: function (event) {
|
|
43001
|
+
event.preventDefault();
|
|
43002
|
+
this.isDragging = false;
|
|
43003
|
+
const files = event.target.files || event.dataTransfer.files;
|
|
43004
|
+
if (files.length) {
|
|
43005
|
+
for (let index = 0; index < files.length; index++) {
|
|
43006
|
+
const file = files[index];
|
|
43007
|
+
if (this.isFileValid(file)) {
|
|
43008
|
+
// Get uploaded file
|
|
43009
|
+
// Get file size
|
|
43010
|
+
var fileSize = Math.round(file.size / 1024 / 1024 * 100) / 100;
|
|
43011
|
+
// Get file extention
|
|
43012
|
+
var fileExtention = file.name.split(".").pop();
|
|
43013
|
+
// Get file name
|
|
43014
|
+
var fileName = file.name.split(".").shift();
|
|
43015
|
+
// Check if file is an image
|
|
43016
|
+
var isImage = ["jpg", "jpeg", "png", "gif"].includes(fileExtention);
|
|
43017
|
+
// Print to console
|
|
43018
|
+
console.log(fileSize, fileExtention, fileName, isImage);
|
|
43019
|
+
// Load the FileReader API
|
|
43020
|
+
let reader = new FileReader();
|
|
43021
|
+
reader.addEventListener("load", () => {
|
|
43022
|
+
// Set file data
|
|
43023
|
+
this.file = {
|
|
43024
|
+
name: fileName,
|
|
43025
|
+
size: fileSize,
|
|
43026
|
+
type: file.type,
|
|
43027
|
+
fileExtention: fileExtention,
|
|
43028
|
+
isImage: isImage,
|
|
43029
|
+
url: reader.result,
|
|
43030
|
+
isUploaded: true
|
|
43031
|
+
};
|
|
43032
|
+
if (this.canUploadMultipleFile() == false) {
|
|
43033
|
+
this.previewFiles = [];
|
|
43034
|
+
}
|
|
43035
|
+
this.previewFiles.push(this.file);
|
|
43036
|
+
}, false);
|
|
43037
|
+
// Read uploaded file
|
|
43038
|
+
reader.readAsDataURL(file);
|
|
43039
|
+
} else {
|
|
43040
|
+
console.log("Invalid file");
|
|
43041
|
+
}
|
|
43042
|
+
}
|
|
43043
|
+
if (this.errors.length == 0) {
|
|
43044
|
+
this.fieldInfo.value = files;
|
|
43045
|
+
if (this.fieldInfo && this.fieldInfo.config && this.fieldInfo.config.onChange) {
|
|
43046
|
+
this.fieldInfo.config.onChange(e, this.fieldInfo);
|
|
43047
|
+
}
|
|
43048
|
+
}
|
|
43049
|
+
}
|
|
43050
|
+
}
|
|
43051
|
+
}
|
|
43052
|
+
});
|
|
43053
|
+
// CONCATENATED MODULE: ./src/components/NormalFileField.vue?vue&type=script&lang=js
|
|
43054
|
+
/* harmony default export */ var components_NormalFileFieldvue_type_script_lang_js = (NormalFileFieldvue_type_script_lang_js);
|
|
43055
|
+
// CONCATENATED MODULE: ./src/components/NormalFileField.vue
|
|
43056
|
+
|
|
43057
|
+
|
|
43058
|
+
|
|
43059
|
+
|
|
43060
|
+
|
|
43061
|
+
/* normalize component */
|
|
43062
|
+
|
|
43063
|
+
var NormalFileField_component = normalizeComponent(
|
|
43064
|
+
components_NormalFileFieldvue_type_script_lang_js,
|
|
43065
|
+
NormalFileFieldvue_type_template_id_53457fd3_render,
|
|
43066
|
+
NormalFileFieldvue_type_template_id_53457fd3_staticRenderFns,
|
|
43067
|
+
false,
|
|
43068
|
+
null,
|
|
43069
|
+
null,
|
|
43070
|
+
null
|
|
43071
|
+
|
|
43072
|
+
)
|
|
43073
|
+
|
|
43074
|
+
/* harmony default export */ var NormalFileField = (NormalFileField_component.exports);
|
|
43075
|
+
// 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/TreeSelectField.vue?vue&type=template&id=4975b454
|
|
43076
|
+
var TreeSelectFieldvue_type_template_id_4975b454_render = function render() {
|
|
43077
|
+
var _vm = this,
|
|
43078
|
+
_c = _vm._self._c;
|
|
43079
|
+
return _c('Field', {
|
|
43080
|
+
staticClass: "w-100",
|
|
43081
|
+
attrs: {
|
|
43082
|
+
"name": _vm.GetDisplayLabel(_vm.fieldInfo),
|
|
43083
|
+
"rules": _vm.fieldInfo.validationRules
|
|
43084
|
+
},
|
|
43085
|
+
scopedSlots: _vm._u([{
|
|
43086
|
+
key: "default",
|
|
43087
|
+
fn: function ({
|
|
43088
|
+
errors
|
|
43089
|
+
}) {
|
|
43090
|
+
return [_c('div', {
|
|
43091
|
+
staticClass: "w-100 d-flex dynamic-multiselect"
|
|
43092
|
+
}, [_vm.options && _vm.options.length > 0 ? _c('tree-select', {
|
|
43093
|
+
staticClass: "w-100 form-control border-0 p-0",
|
|
43094
|
+
attrs: {
|
|
43095
|
+
"multiple": false,
|
|
43096
|
+
"options": _vm.options,
|
|
43097
|
+
"placeholder": _vm.fieldInfo.placeholder
|
|
43098
|
+
},
|
|
43099
|
+
model: {
|
|
43100
|
+
value: _vm.fieldInfo.value,
|
|
43101
|
+
callback: function ($$v) {
|
|
43102
|
+
_vm.$set(_vm.fieldInfo, "value", $$v);
|
|
43103
|
+
},
|
|
43104
|
+
expression: "fieldInfo.value"
|
|
43105
|
+
}
|
|
43106
|
+
}) : _vm._e(), _vm.showAddIcon() ? _c('div', {
|
|
43107
|
+
staticClass: "ml-2 mt-1"
|
|
43108
|
+
}, [_c('a', {
|
|
43109
|
+
class: _vm.addButtonClass()
|
|
43110
|
+
}, [_c('i', {
|
|
43111
|
+
class: _vm.addIconClass(),
|
|
43112
|
+
attrs: {
|
|
43113
|
+
"alt": "+"
|
|
43114
|
+
},
|
|
43115
|
+
on: {
|
|
43116
|
+
"click": function ($event) {
|
|
43117
|
+
return _vm.onAddButtonClick($event);
|
|
43118
|
+
}
|
|
43119
|
+
}
|
|
43120
|
+
})])]) : _vm._e(), errors[0] ? _c('span', {
|
|
43121
|
+
staticClass: "invalid-feedback d-block"
|
|
43122
|
+
}, [_vm._v(_vm._s(errors[0]))]) : _vm._e()], 1)];
|
|
43123
|
+
}
|
|
43124
|
+
}])
|
|
43125
|
+
});
|
|
43126
|
+
};
|
|
43127
|
+
var TreeSelectFieldvue_type_template_id_4975b454_staticRenderFns = [];
|
|
43128
|
+
|
|
43129
|
+
// CONCATENATED MODULE: ./src/components/TreeSelectField.vue?vue&type=template&id=4975b454
|
|
43130
|
+
|
|
43131
|
+
// EXTERNAL MODULE: ./node_modules/@riophae/vue-treeselect/dist/vue-treeselect.cjs.js
|
|
43132
|
+
var vue_treeselect_cjs = __webpack_require__("ca17");
|
|
43133
|
+
var vue_treeselect_cjs_default = /*#__PURE__*/__webpack_require__.n(vue_treeselect_cjs);
|
|
43134
|
+
|
|
43135
|
+
// 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/TreeSelectField.vue?vue&type=script&lang=js
|
|
43136
|
+
|
|
43137
|
+
|
|
43138
|
+
/* harmony default export */ var TreeSelectFieldvue_type_script_lang_js = ({
|
|
43139
|
+
components: {
|
|
43140
|
+
'tree-select': vue_treeselect_cjs_default.a,
|
|
43141
|
+
Field: ValidationProvider
|
|
43142
|
+
},
|
|
43143
|
+
props: {
|
|
43144
|
+
lang: {
|
|
43145
|
+
type: String,
|
|
43146
|
+
default: 'en'
|
|
43147
|
+
},
|
|
43148
|
+
fieldInfo: {
|
|
43149
|
+
type: Object,
|
|
43150
|
+
required: true
|
|
43151
|
+
}
|
|
43152
|
+
},
|
|
43153
|
+
data() {
|
|
43154
|
+
return {
|
|
43155
|
+
options: [],
|
|
43156
|
+
scrollops: {
|
|
43157
|
+
maxHeight: 200,
|
|
43158
|
+
vuescroll: {
|
|
43159
|
+
sizeStrategy: 'number'
|
|
43160
|
+
}
|
|
43161
|
+
}
|
|
43162
|
+
};
|
|
43163
|
+
},
|
|
43164
|
+
mounted() {
|
|
43165
|
+
this.fieldInfo.validationRules = getValidationRules(this.fieldInfo.validationRules, this.lang);
|
|
43166
|
+
if (this.fieldInfo.hasOwnProperty('config') && this.fieldInfo.config.hasOwnProperty('options')) {
|
|
43167
|
+
if (typeof this.fieldInfo.config.OptionsForBind != 'undefined') {
|
|
43168
|
+
this.options = this.fieldInfo.config.OptionsForBind;
|
|
43169
|
+
} else {
|
|
43170
|
+
this.options = this.fieldInfo.config.options;
|
|
43171
|
+
}
|
|
43172
|
+
}
|
|
43173
|
+
if (!this.fieldInfo.hasOwnProperty('placeholder')) {
|
|
43174
|
+
this.fieldInfo.placeholder = 'Select Location';
|
|
43175
|
+
}
|
|
43176
|
+
},
|
|
43177
|
+
methods: {
|
|
43178
|
+
GetDisplayLabel(field) {
|
|
43179
|
+
var labelName = '';
|
|
43180
|
+
if (field.hasOwnProperty('label') && field.label) {
|
|
43181
|
+
labelName = field.label;
|
|
43182
|
+
} else if (field.hasOwnProperty('display_name') && field.display_name) {
|
|
43183
|
+
labelName = field.display_name;
|
|
43184
|
+
}
|
|
43185
|
+
return labelName;
|
|
43186
|
+
},
|
|
43187
|
+
showAddIcon: function () {
|
|
43188
|
+
if (this.fieldInfo.config && this.fieldInfo.config.showAddIcon) {
|
|
43189
|
+
return this.fieldInfo.config.showAddIcon;
|
|
43190
|
+
}
|
|
43191
|
+
},
|
|
43192
|
+
onAddButtonClick: function (e) {
|
|
43193
|
+
if (this.fieldInfo && this.fieldInfo.config && this.fieldInfo.config.onAddButtonClick) {
|
|
43194
|
+
this.fieldInfo.config.onAddButtonClick(e, this.fieldInfo);
|
|
43195
|
+
}
|
|
43196
|
+
},
|
|
43197
|
+
addButtonClass: function () {
|
|
43198
|
+
if (this.fieldInfo.config && this.fieldInfo.config.addIconBackground) {
|
|
43199
|
+
return "round-icon-small theme-primary " + this.fieldInfo.config.addIconBackground;
|
|
43200
|
+
} else {
|
|
43201
|
+
return "round-icon-small btn-dark theme-primary";
|
|
43202
|
+
}
|
|
43203
|
+
},
|
|
43204
|
+
addIconClass: function () {
|
|
43205
|
+
if (this.fieldInfo.config && this.fieldInfo.config.addIcon) {
|
|
43206
|
+
return "fa text-white pt-7 font-18 " + this.fieldInfo.config.addIcon;
|
|
43207
|
+
} else {
|
|
43208
|
+
return "fa fa-plus text-white pt-7 font-18";
|
|
43209
|
+
}
|
|
43210
|
+
}
|
|
43211
|
+
}
|
|
43212
|
+
});
|
|
43213
|
+
// CONCATENATED MODULE: ./src/components/TreeSelectField.vue?vue&type=script&lang=js
|
|
43214
|
+
/* harmony default export */ var components_TreeSelectFieldvue_type_script_lang_js = (TreeSelectFieldvue_type_script_lang_js);
|
|
43215
|
+
// CONCATENATED MODULE: ./src/components/TreeSelectField.vue
|
|
43216
|
+
|
|
43217
|
+
|
|
43218
|
+
|
|
43219
|
+
|
|
43220
|
+
|
|
43221
|
+
/* normalize component */
|
|
43222
|
+
|
|
43223
|
+
var TreeSelectField_component = normalizeComponent(
|
|
43224
|
+
components_TreeSelectFieldvue_type_script_lang_js,
|
|
43225
|
+
TreeSelectFieldvue_type_template_id_4975b454_render,
|
|
43226
|
+
TreeSelectFieldvue_type_template_id_4975b454_staticRenderFns,
|
|
43227
|
+
false,
|
|
43228
|
+
null,
|
|
43229
|
+
null,
|
|
43230
|
+
null
|
|
43231
|
+
|
|
43232
|
+
)
|
|
43233
|
+
|
|
43234
|
+
/* harmony default export */ var TreeSelectField = (TreeSelectField_component.exports);
|
|
43235
|
+
// 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/SlotField.vue?vue&type=template&id=552c7e65
|
|
43236
|
+
var SlotFieldvue_type_template_id_552c7e65_render = function render() {
|
|
43237
|
+
var _vm = this,
|
|
43238
|
+
_c = _vm._self._c;
|
|
43239
|
+
return _c('Field', {
|
|
43240
|
+
staticClass: "w-100",
|
|
43241
|
+
attrs: {
|
|
43242
|
+
"name": _vm.GetDisplayLabel(_vm.fieldInfo),
|
|
43243
|
+
"rules": _vm.fieldInfo.validationRules
|
|
43244
|
+
},
|
|
43245
|
+
scopedSlots: _vm._u([{
|
|
43246
|
+
key: "default",
|
|
43247
|
+
fn: function ({
|
|
43248
|
+
errors
|
|
43249
|
+
}) {
|
|
43250
|
+
return [_vm._t("tgslot", null, {
|
|
43251
|
+
"data": {
|
|
43252
|
+
fieldInfo: _vm.fieldInfo,
|
|
43253
|
+
error: errors.length > 0 ? errors[0] : ''
|
|
43254
|
+
}
|
|
43255
|
+
})];
|
|
43256
|
+
}
|
|
43257
|
+
}], null, true)
|
|
43258
|
+
});
|
|
43259
|
+
};
|
|
43260
|
+
var SlotFieldvue_type_template_id_552c7e65_staticRenderFns = [];
|
|
43261
|
+
|
|
43262
|
+
// CONCATENATED MODULE: ./src/components/SlotField.vue?vue&type=template&id=552c7e65
|
|
43263
|
+
|
|
43264
|
+
// 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/SlotField.vue?vue&type=script&lang=js
|
|
43265
|
+
|
|
43266
|
+
/* harmony default export */ var SlotFieldvue_type_script_lang_js = ({
|
|
43267
|
+
components: {
|
|
43268
|
+
Field: ValidationProvider
|
|
43269
|
+
},
|
|
43270
|
+
props: {
|
|
43271
|
+
lang: {
|
|
43272
|
+
type: String,
|
|
43273
|
+
default: 'en'
|
|
43274
|
+
},
|
|
43275
|
+
fieldInfo: {
|
|
43276
|
+
type: Object,
|
|
43277
|
+
required: true
|
|
43278
|
+
}
|
|
43279
|
+
},
|
|
43280
|
+
methods: {
|
|
43281
|
+
GetDisplayLabel: function (field) {
|
|
43282
|
+
var labelName = '';
|
|
43283
|
+
if (field.hasOwnProperty('label') && field.label) {
|
|
43284
|
+
labelName = field.label;
|
|
43285
|
+
} else if (field.hasOwnProperty('display_name') && field.display_name) {
|
|
43286
|
+
labelName = field.display_name;
|
|
43287
|
+
}
|
|
43288
|
+
return labelName;
|
|
43289
|
+
}
|
|
43290
|
+
},
|
|
43291
|
+
mounted: function () {
|
|
43292
|
+
this.fieldInfo.validationRules = getValidationRules(this.fieldInfo.validationRules, this.lang);
|
|
43293
|
+
}
|
|
43294
|
+
});
|
|
43295
|
+
// CONCATENATED MODULE: ./src/components/SlotField.vue?vue&type=script&lang=js
|
|
43296
|
+
/* harmony default export */ var components_SlotFieldvue_type_script_lang_js = (SlotFieldvue_type_script_lang_js);
|
|
43297
|
+
// CONCATENATED MODULE: ./src/components/SlotField.vue
|
|
43298
|
+
|
|
43299
|
+
|
|
43300
|
+
|
|
43301
|
+
|
|
43302
|
+
|
|
43303
|
+
/* normalize component */
|
|
43304
|
+
|
|
43305
|
+
var SlotField_component = normalizeComponent(
|
|
43306
|
+
components_SlotFieldvue_type_script_lang_js,
|
|
43307
|
+
SlotFieldvue_type_template_id_552c7e65_render,
|
|
43308
|
+
SlotFieldvue_type_template_id_552c7e65_staticRenderFns,
|
|
43309
|
+
false,
|
|
43310
|
+
null,
|
|
43311
|
+
null,
|
|
43312
|
+
null
|
|
43313
|
+
|
|
43314
|
+
)
|
|
43315
|
+
|
|
43316
|
+
/* harmony default export */ var SlotField = (SlotField_component.exports);
|
|
43317
|
+
// 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=6f324aae
|
|
43318
|
+
var SearchableSelectFieldvue_type_template_id_6f324aae_render = function render() {
|
|
43319
|
+
var _vm = this,
|
|
43320
|
+
_c = _vm._self._c;
|
|
43321
|
+
return _c('Field', {
|
|
43322
|
+
staticClass: "w-100",
|
|
43323
|
+
attrs: {
|
|
43324
|
+
"name": _vm.GetDisplayLabel(_vm.fieldInfo),
|
|
43325
|
+
"rules": _vm.fieldInfo.validationRules
|
|
43326
|
+
},
|
|
43327
|
+
scopedSlots: _vm._u([{
|
|
43328
|
+
key: "default",
|
|
43329
|
+
fn: function ({
|
|
43330
|
+
errors
|
|
43331
|
+
}) {
|
|
43332
|
+
return [_c('div', {
|
|
43333
|
+
staticClass: "w-100"
|
|
43334
|
+
}, [_c('SearchableSelect', {
|
|
43335
|
+
attrs: {
|
|
43336
|
+
"items": _vm.fieldInfo.config.OptionsForBind,
|
|
43337
|
+
"max-visible-chips": 2,
|
|
43338
|
+
"action-buttons": _vm.computedActionButtons(_vm.fieldInfo),
|
|
43339
|
+
"item-fields": _vm.computedItemFields(_vm.fieldInfo),
|
|
43340
|
+
"group-fields": _vm.computedGroupFields(_vm.fieldInfo),
|
|
43341
|
+
"max-render-items": _vm.computedMaxRenderItems(_vm.fieldInfo),
|
|
43342
|
+
"lazy-load": true,
|
|
43343
|
+
"multiple": _vm.fieldInfo.config.isMultiple,
|
|
43344
|
+
"label": _vm.fieldInfo.label,
|
|
43345
|
+
"placeholder": _vm.fieldInfo.placeholder,
|
|
43346
|
+
"status-field-config": _vm.fieldInfo.config.statusFieldConfig,
|
|
43347
|
+
"min-search-length": _vm.fieldInfo.config.minSearchLength
|
|
43348
|
+
},
|
|
43349
|
+
on: {
|
|
43350
|
+
"change": function ($event) {
|
|
43351
|
+
return _vm.onSearchableChange($event, _vm.fieldInfo);
|
|
43352
|
+
}
|
|
43353
|
+
},
|
|
43354
|
+
model: {
|
|
43355
|
+
value: _vm.fieldInfo.value,
|
|
43356
|
+
callback: function ($$v) {
|
|
43357
|
+
_vm.$set(_vm.fieldInfo, "value", $$v);
|
|
43358
|
+
},
|
|
43359
|
+
expression: "fieldInfo.value"
|
|
43360
|
+
}
|
|
43361
|
+
})], 1), errors[0] ? _c('span', {
|
|
43362
|
+
staticClass: "invalid-feedback d-block"
|
|
43363
|
+
}, [_vm._v(_vm._s(errors[0]))]) : _vm._e()];
|
|
43364
|
+
}
|
|
43365
|
+
}])
|
|
43366
|
+
});
|
|
43367
|
+
};
|
|
43368
|
+
var SearchableSelectFieldvue_type_template_id_6f324aae_staticRenderFns = [];
|
|
43369
|
+
|
|
43370
|
+
// CONCATENATED MODULE: ./src/components/SearchableSelectField.vue?vue&type=template&id=6f324aae
|
|
43371
|
+
|
|
43372
|
+
// 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
|
|
43373
|
+
var SearchableSelectvue_type_template_id_688f213e_scoped_true_render = function render() {
|
|
43374
|
+
var _vm = this,
|
|
43375
|
+
_c = _vm._self._c;
|
|
43376
|
+
return _c('div', {
|
|
43377
|
+
staticClass: "searchable-select"
|
|
43378
|
+
}, [_c('Autocomplete', {
|
|
43379
|
+
attrs: {
|
|
43380
|
+
"value": _vm.internalValue,
|
|
43381
|
+
"model-value": _vm.internalValue,
|
|
43382
|
+
"items": _vm.displayItems,
|
|
43383
|
+
"all-items": _vm.allItems,
|
|
43384
|
+
"loading": _vm.loading,
|
|
43385
|
+
"placeholder": _vm.placeholder,
|
|
43386
|
+
"label": _vm.label,
|
|
43387
|
+
"disabled": _vm.disabled,
|
|
43388
|
+
"clearable": _vm.clearable,
|
|
43389
|
+
"density": _vm.density,
|
|
43390
|
+
"variant": _vm.variant,
|
|
43391
|
+
"multiple": _vm.multiple,
|
|
43392
|
+
"item-title": _vm.itemTitle,
|
|
43393
|
+
"item-value": _vm.itemValue,
|
|
43394
|
+
"menu-props": _vm.menuProps,
|
|
43395
|
+
"no-data-text": _vm.noDataText,
|
|
43396
|
+
"hide-details": _vm.hideDetails,
|
|
43397
|
+
"error-messages": _vm.errorMessages,
|
|
43398
|
+
"rules": _vm.rules,
|
|
43399
|
+
"min-search-length": _vm.minSearchLength,
|
|
43400
|
+
"max-visible-chips": _vm.maxVisibleChips,
|
|
43401
|
+
"action-buttons": _vm.actionButtons,
|
|
43402
|
+
"item-fields": _vm.itemFields,
|
|
43403
|
+
"group-fields": _vm.groupFields,
|
|
43404
|
+
"max-render-items": _vm.maxRenderItems,
|
|
43405
|
+
"lazy-load": _vm.lazyLoad,
|
|
43406
|
+
"status-field-config": _vm.statusFieldConfig
|
|
43407
|
+
},
|
|
43408
|
+
on: {
|
|
43409
|
+
"input": _vm.onSelectionChange,
|
|
43410
|
+
"update:model-value": _vm.onSelectionChange,
|
|
43411
|
+
"update:search": _vm.onSearch,
|
|
43412
|
+
"focus": _vm.onFocus,
|
|
43413
|
+
"blur": _vm.onBlur,
|
|
43414
|
+
"search": _vm.onSearch
|
|
43415
|
+
}
|
|
43416
|
+
})], 1);
|
|
43417
|
+
};
|
|
43418
|
+
var SearchableSelectvue_type_template_id_688f213e_scoped_true_staticRenderFns = [];
|
|
43419
|
+
|
|
43420
|
+
// CONCATENATED MODULE: ./src/components/SearchableSelect.vue?vue&type=template&id=688f213e&scoped=true
|
|
43421
|
+
|
|
43422
|
+
// 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=c293aa98&scoped=true
|
|
43423
|
+
var Autocompletevue_type_template_id_c293aa98_scoped_true_render = function render() {
|
|
43424
|
+
var _vm = this,
|
|
43425
|
+
_c = _vm._self._c;
|
|
43426
|
+
return _c('div', {
|
|
43427
|
+
staticClass: "custom-autocomplete mt-0",
|
|
43428
|
+
class: {
|
|
43429
|
+
'is-disabled': _vm.disabled,
|
|
43430
|
+
'has-error': _vm.hasError
|
|
43431
|
+
}
|
|
43432
|
+
}, [!_vm.multiple ? _c('div', {
|
|
43433
|
+
staticClass: "autocomplete-wrapper"
|
|
43434
|
+
}, [_c('div', {
|
|
43435
|
+
staticClass: "input-group"
|
|
43436
|
+
}, [_c('input', {
|
|
43437
|
+
ref: "input",
|
|
43438
|
+
staticClass: "form-control",
|
|
43439
|
+
class: {
|
|
43440
|
+
'is-invalid': _vm.hasError,
|
|
43441
|
+
'form-control-sm': _vm.density === 'compact',
|
|
43442
|
+
'form-control-lg': _vm.density === 'comfortable'
|
|
43443
|
+
},
|
|
43444
|
+
attrs: {
|
|
43445
|
+
"type": "text",
|
|
43446
|
+
"placeholder": _vm.placeholder,
|
|
43447
|
+
"disabled": _vm.disabled
|
|
43448
|
+
},
|
|
43449
|
+
domProps: {
|
|
43450
|
+
"value": _vm.displayText
|
|
43451
|
+
},
|
|
43452
|
+
on: {
|
|
43453
|
+
"input": _vm.onInput,
|
|
43454
|
+
"focus": _vm.onFocus,
|
|
43455
|
+
"blur": _vm.onBlur,
|
|
43456
|
+
"keydown": [function ($event) {
|
|
43457
|
+
if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")) return null;
|
|
43458
|
+
$event.preventDefault();
|
|
43459
|
+
return _vm.handleEnter.apply(null, arguments);
|
|
43460
|
+
}, function ($event) {
|
|
43461
|
+
if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "arrow-down", undefined, $event.key, undefined)) return null;
|
|
43462
|
+
$event.preventDefault();
|
|
43463
|
+
return _vm.navigateDown.apply(null, arguments);
|
|
43464
|
+
}, function ($event) {
|
|
43465
|
+
if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "arrow-up", undefined, $event.key, undefined)) return null;
|
|
43466
|
+
$event.preventDefault();
|
|
43467
|
+
return _vm.navigateUp.apply(null, arguments);
|
|
43468
|
+
}, function ($event) {
|
|
43469
|
+
if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "escape", undefined, $event.key, undefined)) return null;
|
|
43470
|
+
return _vm.closeMenu.apply(null, arguments);
|
|
43471
|
+
}]
|
|
43472
|
+
}
|
|
43473
|
+
}), _c('div', {
|
|
43474
|
+
staticClass: "input-group-append"
|
|
43475
|
+
}, [_vm.clearable && _vm.selectedValue ? _c('button', {
|
|
43476
|
+
staticClass: "btn btn-outline-secondary",
|
|
43477
|
+
attrs: {
|
|
43478
|
+
"type": "button",
|
|
43479
|
+
"tabindex": "-1"
|
|
43480
|
+
},
|
|
43481
|
+
on: {
|
|
43482
|
+
"click": _vm.clearSelection
|
|
43483
|
+
}
|
|
43484
|
+
}, [_c('i', {
|
|
43485
|
+
staticClass: "fa fa-times"
|
|
43486
|
+
})]) : _vm._e(), _c('button', {
|
|
43487
|
+
staticClass: "btn btn-outline-secondary dropdown-toggle",
|
|
43488
|
+
class: {
|
|
43489
|
+
'active': _vm.isMenuOpen
|
|
43490
|
+
},
|
|
43491
|
+
attrs: {
|
|
43492
|
+
"type": "button",
|
|
43493
|
+
"tabindex": "-1"
|
|
43494
|
+
},
|
|
43495
|
+
on: {
|
|
43496
|
+
"click": _vm.toggleMenu
|
|
43497
|
+
}
|
|
43498
|
+
}, [_c('i', {
|
|
43499
|
+
staticClass: "fa",
|
|
43500
|
+
class: _vm.loading ? 'fa-spinner fa-spin' : 'fa-chevron-down'
|
|
43501
|
+
})])])]), _vm.isMenuOpen ? _c('div', {
|
|
43502
|
+
ref: "menu",
|
|
43503
|
+
staticClass: "autocomplete-menu",
|
|
43504
|
+
style: {
|
|
43505
|
+
maxHeight: _vm.menuMaxHeight + 'px'
|
|
43506
|
+
},
|
|
43507
|
+
on: {
|
|
43508
|
+
"scroll": _vm.onMenuScroll
|
|
43509
|
+
}
|
|
43510
|
+
}, [_vm.loading && !_vm.hasItems ? _c('div', {
|
|
43511
|
+
staticClass: "autocomplete-loading"
|
|
43512
|
+
}, [_vm._m(0), _c('div', {
|
|
43513
|
+
staticClass: "mt-2 text-muted small"
|
|
43514
|
+
}, [_vm._v("Loading...")])]) : !_vm.loading && !_vm.hasItems && _vm.searchTerm.length >= _vm.minSearchLength ? _c('div', {
|
|
43515
|
+
staticClass: "autocomplete-no-data"
|
|
43516
|
+
}, [_c('i', {
|
|
43517
|
+
staticClass: "fa fa-search text-muted",
|
|
43518
|
+
staticStyle: {
|
|
43519
|
+
"font-size": "2rem"
|
|
43520
|
+
}
|
|
43521
|
+
}), _c('div', {
|
|
43522
|
+
staticClass: "mt-2 text-muted"
|
|
43523
|
+
}, [_vm._v(_vm._s(_vm.noDataText))]), _c('div', {
|
|
43524
|
+
staticClass: "text-muted small"
|
|
43525
|
+
}, [_vm._v("Try adjusting your search terms")])]) : _vm.hasGrouping ? _c('div', {
|
|
43526
|
+
staticClass: "autocomplete-grouped"
|
|
43527
|
+
}, _vm._l(_vm.paginatedGroupedItems, function (group, groupIndex) {
|
|
43528
|
+
return _c('div', {
|
|
43529
|
+
key: group.group || groupIndex,
|
|
43530
|
+
staticClass: "autocomplete-group"
|
|
43531
|
+
}, [_c('div', {
|
|
43532
|
+
staticClass: "autocomplete-group-header"
|
|
43533
|
+
}, [_vm.groupFields.length > 0 ? _c('div', {
|
|
43534
|
+
staticClass: "d-flex flex-column"
|
|
43535
|
+
}, [_c('div', {
|
|
43536
|
+
staticClass: "font-weight-bold font-14"
|
|
43537
|
+
}, [_vm._v(_vm._s(group.group))]), _vm.groupFields.length > 1 ? _c('div', {
|
|
43538
|
+
staticClass: "small text-muted mt-1"
|
|
43539
|
+
}, _vm._l(_vm.groupFields, function (field, idx) {
|
|
43540
|
+
return _c('span', {
|
|
43541
|
+
key: field
|
|
43542
|
+
}, [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()]);
|
|
43543
|
+
}), 0) : _vm._e()]) : _c('div', [_vm._v(_vm._s(group.group))])]), _c('ul', {
|
|
43544
|
+
staticClass: "list-group list-group-flush"
|
|
43545
|
+
}, _vm._l(group.items, function (item, itemIndex) {
|
|
43546
|
+
return _c('li', {
|
|
43547
|
+
key: _vm.getItemValue(item),
|
|
43548
|
+
staticClass: "list-group-item autocomplete-item",
|
|
43549
|
+
class: {
|
|
43550
|
+
'active': _vm.getFlatIndex(groupIndex, itemIndex) === _vm.highlightedIndex,
|
|
43551
|
+
'selected': _vm.isSelected(item)
|
|
43552
|
+
},
|
|
43553
|
+
staticStyle: {
|
|
43554
|
+
"cursor": "pointer"
|
|
43555
|
+
},
|
|
43556
|
+
on: {
|
|
43557
|
+
"click": function ($event) {
|
|
43558
|
+
$event.preventDefault();
|
|
43559
|
+
return _vm.selectItem(item, $event);
|
|
43560
|
+
},
|
|
43561
|
+
"mouseenter": function ($event) {
|
|
43562
|
+
_vm.highlightedIndex = _vm.getFlatIndex(groupIndex, itemIndex);
|
|
43563
|
+
}
|
|
43564
|
+
}
|
|
43565
|
+
}, [_c('div', {
|
|
43566
|
+
staticClass: "d-flex align-items-center"
|
|
43567
|
+
}, [_vm.multiple ? _c('div', {
|
|
43568
|
+
staticClass: "autocomplete-checkbox-wrapper mr-2"
|
|
43569
|
+
}, [_c('input', {
|
|
43570
|
+
staticClass: "autocomplete-checkbox",
|
|
43571
|
+
attrs: {
|
|
43572
|
+
"type": "checkbox",
|
|
43573
|
+
"tabindex": "-1"
|
|
43574
|
+
},
|
|
43575
|
+
domProps: {
|
|
43576
|
+
"checked": _vm.isSelected(item)
|
|
43577
|
+
},
|
|
43578
|
+
on: {
|
|
43579
|
+
"click": function ($event) {
|
|
43580
|
+
$event.stopPropagation();
|
|
43581
|
+
$event.preventDefault();
|
|
43582
|
+
return _vm.selectItem(item, $event);
|
|
43583
|
+
}
|
|
43584
|
+
}
|
|
43585
|
+
}), _vm.isSelected(item) ? _c('i', {
|
|
43586
|
+
staticClass: "fa fa-check autocomplete-check-icon"
|
|
43587
|
+
}) : _vm._e()]) : _vm._e(), item.raw && item.raw.category ? _c('span', {
|
|
43588
|
+
staticClass: "badge badge-secondary mr-2",
|
|
43589
|
+
staticStyle: {
|
|
43590
|
+
"font-size": "0.75rem"
|
|
43591
|
+
}
|
|
43592
|
+
}, [_vm._v(" " + _vm._s(item.raw.category) + " ")]) : _vm._e(), _c('div', {
|
|
43593
|
+
staticClass: "flex-grow-1"
|
|
43594
|
+
}, [_vm.itemFields.length > 0 ? _c('div', {
|
|
43595
|
+
staticClass: "font-weight-400",
|
|
43596
|
+
class: {
|
|
43597
|
+
'text-dark': _vm.isSelected(item)
|
|
43598
|
+
},
|
|
43599
|
+
domProps: {
|
|
43600
|
+
"innerHTML": _vm._s(_vm.formatItemFields(item))
|
|
43601
|
+
}
|
|
43602
|
+
}) : _c('div', {
|
|
43603
|
+
staticClass: "font-weight-400",
|
|
43604
|
+
class: {
|
|
43605
|
+
'text-dark': _vm.isSelected(item)
|
|
43606
|
+
}
|
|
43607
|
+
}, [_vm._v(_vm._s(_vm.getItemText(item)))]), !_vm.itemFields.length && _vm.getItemDescription(item) ? _c('div', {
|
|
43608
|
+
staticClass: "text-muted small mt-1"
|
|
43609
|
+
}, [_vm._v(_vm._s(_vm.getItemDescription(item)))]) : _vm._e()]), _vm.isSelected(item) && !_vm.multiple ? _c('i', {
|
|
43610
|
+
staticClass: "fa fa-check text-success ml-2",
|
|
43611
|
+
staticStyle: {
|
|
43612
|
+
"font-size": "1.1rem"
|
|
43613
|
+
}
|
|
43614
|
+
}) : _vm._e()])]);
|
|
43615
|
+
}), 0)]);
|
|
43616
|
+
}), 0) : _c('ul', {
|
|
43617
|
+
staticClass: "list-group list-group-flush"
|
|
43618
|
+
}, _vm._l(_vm.paginatedDisplayItems, function (item, index) {
|
|
43619
|
+
return _c('li', {
|
|
43620
|
+
key: _vm.getItemValue(item),
|
|
43621
|
+
staticClass: "list-group-item autocomplete-item",
|
|
43622
|
+
class: {
|
|
43623
|
+
'active': index === _vm.highlightedIndex,
|
|
43624
|
+
'selected': _vm.isSelected(item)
|
|
43625
|
+
},
|
|
43626
|
+
staticStyle: {
|
|
43627
|
+
"cursor": "pointer"
|
|
43628
|
+
},
|
|
43629
|
+
on: {
|
|
43630
|
+
"click": function ($event) {
|
|
43631
|
+
$event.preventDefault();
|
|
43632
|
+
return _vm.selectItem(item, $event);
|
|
43633
|
+
},
|
|
43634
|
+
"mouseenter": function ($event) {
|
|
43635
|
+
_vm.highlightedIndex = index;
|
|
43636
|
+
}
|
|
43637
|
+
}
|
|
43638
|
+
}, [_c('div', {
|
|
43639
|
+
staticClass: "d-flex align-items-center"
|
|
43640
|
+
}, [_vm.multiple ? _c('input', {
|
|
43641
|
+
staticClass: "mr-2",
|
|
43642
|
+
attrs: {
|
|
43643
|
+
"type": "checkbox",
|
|
43644
|
+
"tabindex": "-1"
|
|
43645
|
+
},
|
|
43646
|
+
domProps: {
|
|
43647
|
+
"checked": _vm.isSelected(item)
|
|
43648
|
+
},
|
|
43649
|
+
on: {
|
|
43650
|
+
"click": function ($event) {
|
|
43651
|
+
$event.stopPropagation();
|
|
43652
|
+
$event.preventDefault();
|
|
43653
|
+
return _vm.selectItem(item);
|
|
43654
|
+
}
|
|
43655
|
+
}
|
|
43656
|
+
}) : _vm._e(), item.raw && item.raw.category ? _c('span', {
|
|
43657
|
+
staticClass: "badge badge-primary mr-2"
|
|
43658
|
+
}, [_vm._v(" " + _vm._s(item.raw.category) + " ")]) : _vm._e(), _c('div', {
|
|
43659
|
+
staticClass: "flex-grow-1"
|
|
43660
|
+
}, [_vm.itemFields.length > 0 ? _c('div', {
|
|
43661
|
+
staticClass: "font-weight-400",
|
|
43662
|
+
domProps: {
|
|
43663
|
+
"innerHTML": _vm._s(_vm.formatItemFields(item))
|
|
43664
|
+
}
|
|
43665
|
+
}) : _c('div', {
|
|
43666
|
+
staticClass: "font-weight-400"
|
|
43667
|
+
}, [_vm._v(_vm._s(_vm.getItemText(item)))]), !_vm.itemFields.length && _vm.getItemDescription(item) ? _c('div', {
|
|
43668
|
+
staticClass: "text-muted small mt-1"
|
|
43669
|
+
}, [_vm._v(_vm._s(_vm.getItemDescription(item)))]) : _vm._e()]), _vm.isSelected(item) && !_vm.multiple ? _c('i', {
|
|
43670
|
+
staticClass: "fa fa-check text-primary ml-2"
|
|
43671
|
+
}) : _vm._e()])]);
|
|
43672
|
+
}), 0)]) : _vm._e()]) : _c('div', {
|
|
43673
|
+
staticClass: "autocomplete-wrapper"
|
|
43674
|
+
}, [_c('div', {
|
|
43675
|
+
staticClass: "input-group"
|
|
43676
|
+
}, [_c('div', {
|
|
43677
|
+
staticClass: "form-control autocomplete-chips-container",
|
|
43678
|
+
class: {
|
|
43679
|
+
'is-invalid': _vm.hasError,
|
|
43680
|
+
'form-control-sm': _vm.density === 'compact',
|
|
43681
|
+
'form-control-lg': _vm.density === 'comfortable'
|
|
43682
|
+
}
|
|
43683
|
+
}, [_c('div', {
|
|
43684
|
+
staticClass: "d-flex flex-wrap align-items-center"
|
|
43685
|
+
}, [_vm._l(_vm.visibleChips, function (selectedItem, index) {
|
|
43686
|
+
return [index < _vm.maxVisibleChipsCount ? _c('span', {
|
|
43687
|
+
key: _vm.getItemValue(selectedItem),
|
|
43688
|
+
staticClass: "badge badge-primary mr-1 mb-1 pl-2 autocomplete-chip",
|
|
43689
|
+
attrs: {
|
|
43690
|
+
"title": _vm.getChipText(selectedItem)
|
|
43691
|
+
}
|
|
43692
|
+
}, [_c('span', {
|
|
43693
|
+
staticClass: "autocomplete-chip-text",
|
|
43694
|
+
domProps: {
|
|
43695
|
+
"innerHTML": _vm._s(_vm.getChipText(selectedItem))
|
|
43696
|
+
}
|
|
43697
|
+
}), _c('button', {
|
|
43698
|
+
staticClass: "close ml-1 autocomplete-chip-close",
|
|
43699
|
+
attrs: {
|
|
43700
|
+
"type": "button",
|
|
43701
|
+
"tabindex": "-1",
|
|
43702
|
+
"aria-label": 'Remove ' + _vm.getChipText(selectedItem).replace(/<[^>]*>/g, '')
|
|
43703
|
+
},
|
|
43704
|
+
on: {
|
|
43705
|
+
"click": function ($event) {
|
|
43706
|
+
$event.stopPropagation();
|
|
43707
|
+
_vm.removeItem(_vm.getItemValue(selectedItem));
|
|
43708
|
+
}
|
|
43709
|
+
}
|
|
43710
|
+
}, [_c('span', {
|
|
43711
|
+
attrs: {
|
|
43712
|
+
"aria-hidden": "true"
|
|
43713
|
+
}
|
|
43714
|
+
}, [_vm._v("×")])])]) : _vm._e()];
|
|
43715
|
+
}), _vm.remainingChipsCount > 0 ? _c('span', {
|
|
43716
|
+
staticClass: "badge badge-secondary mr-1 mb-1 pl-2 autocomplete-chip autocomplete-chip-more",
|
|
43717
|
+
attrs: {
|
|
43718
|
+
"title": `${_vm.remainingChipsCount} more selected`
|
|
43719
|
+
}
|
|
43720
|
+
}, [_c('span', {
|
|
43721
|
+
staticClass: "autocomplete-chip-text"
|
|
43722
|
+
}, [_vm._v("+ " + _vm._s(_vm.remainingChipsCount) + " more")])]) : _vm._e(), _c('input', {
|
|
43723
|
+
ref: "input",
|
|
43724
|
+
staticClass: "autocomplete-input-inline",
|
|
43725
|
+
attrs: {
|
|
43726
|
+
"type": "text",
|
|
43727
|
+
"placeholder": _vm.selectedItems.length === 0 ? _vm.placeholder : '',
|
|
43728
|
+
"disabled": _vm.disabled
|
|
43729
|
+
},
|
|
43730
|
+
domProps: {
|
|
43731
|
+
"value": _vm.searchTerm
|
|
43732
|
+
},
|
|
43733
|
+
on: {
|
|
43734
|
+
"input": _vm.onInput,
|
|
43735
|
+
"focus": _vm.onFocus,
|
|
43736
|
+
"blur": _vm.onBlur,
|
|
43737
|
+
"keydown": [function ($event) {
|
|
43738
|
+
if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")) return null;
|
|
43739
|
+
$event.preventDefault();
|
|
43740
|
+
return _vm.handleEnter.apply(null, arguments);
|
|
43741
|
+
}, function ($event) {
|
|
43742
|
+
if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "arrow-down", undefined, $event.key, undefined)) return null;
|
|
43743
|
+
$event.preventDefault();
|
|
43744
|
+
return _vm.navigateDown.apply(null, arguments);
|
|
43745
|
+
}, function ($event) {
|
|
43746
|
+
if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "arrow-up", undefined, $event.key, undefined)) return null;
|
|
43747
|
+
$event.preventDefault();
|
|
43748
|
+
return _vm.navigateUp.apply(null, arguments);
|
|
43749
|
+
}, function ($event) {
|
|
43750
|
+
if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "escape", undefined, $event.key, undefined)) return null;
|
|
43751
|
+
return _vm.closeMenu.apply(null, arguments);
|
|
43752
|
+
}, function ($event) {
|
|
43753
|
+
if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "backspace", undefined, $event.key, undefined)) return null;
|
|
43754
|
+
return _vm.handleBackspace.apply(null, arguments);
|
|
43755
|
+
}]
|
|
43756
|
+
}
|
|
43757
|
+
})], 2)]), _c('div', {
|
|
43758
|
+
staticClass: "input-group-append"
|
|
43759
|
+
}, [_vm.clearable && _vm.currentValue && (Array.isArray(_vm.currentValue) ? _vm.currentValue.length > 0 : true) ? _c('button', {
|
|
43760
|
+
staticClass: "btn btn-outline-secondary",
|
|
43761
|
+
attrs: {
|
|
43762
|
+
"type": "button",
|
|
43763
|
+
"tabindex": "-1"
|
|
43764
|
+
},
|
|
43765
|
+
on: {
|
|
43766
|
+
"click": _vm.clearSelection
|
|
43767
|
+
}
|
|
43768
|
+
}, [_c('i', {
|
|
43769
|
+
staticClass: "fa fa-times"
|
|
43770
|
+
})]) : _vm._e(), _c('button', {
|
|
43771
|
+
staticClass: "btn btn-outline-secondary dropdown-toggle",
|
|
43772
|
+
class: {
|
|
43773
|
+
'active': _vm.isMenuOpen
|
|
43774
|
+
},
|
|
43775
|
+
attrs: {
|
|
43776
|
+
"type": "button",
|
|
43777
|
+
"tabindex": "-1"
|
|
43778
|
+
},
|
|
43779
|
+
on: {
|
|
43780
|
+
"click": _vm.toggleMenu
|
|
43781
|
+
}
|
|
43782
|
+
}, [_c('i', {
|
|
43783
|
+
staticClass: "fa",
|
|
43784
|
+
class: _vm.loading ? 'fa-spinner fa-spin' : 'fa-chevron-down'
|
|
43785
|
+
})])])]), _vm.isMenuOpen ? _c('div', {
|
|
43786
|
+
ref: "menu",
|
|
43787
|
+
staticClass: "autocomplete-menu",
|
|
43788
|
+
style: {
|
|
43789
|
+
maxHeight: _vm.menuMaxHeight + 'px'
|
|
43790
|
+
},
|
|
43791
|
+
on: {
|
|
43792
|
+
"scroll": _vm.onMenuScroll
|
|
43793
|
+
}
|
|
43794
|
+
}, [_vm.hasActionButtons ? _c('div', {
|
|
43795
|
+
staticClass: "autocomplete-actions p-2 border-bottom"
|
|
43796
|
+
}, [_c('div', {
|
|
43797
|
+
staticClass: "d-flex flex-wrap gap-1"
|
|
43798
|
+
}, [_vm.actionButtons.selectAll ? _c('button', {
|
|
43799
|
+
staticClass: "btn btn-sm btn-outline-primary",
|
|
43800
|
+
attrs: {
|
|
43801
|
+
"type": "button",
|
|
43802
|
+
"disabled": _vm.disabled || _vm.allSelected
|
|
43803
|
+
},
|
|
43804
|
+
on: {
|
|
43805
|
+
"click": function ($event) {
|
|
43806
|
+
$event.stopPropagation();
|
|
43807
|
+
$event.preventDefault();
|
|
43808
|
+
return _vm.selectAll($event);
|
|
43809
|
+
}
|
|
43810
|
+
}
|
|
43811
|
+
}, [_c('i', {
|
|
43812
|
+
staticClass: "fa fa-check-square mr-1"
|
|
43813
|
+
}), _vm._v(" Select All ")]) : _vm._e(), _vm.actionButtons.active ? _c('button', {
|
|
43814
|
+
staticClass: "btn btn-sm btn-outline-success",
|
|
43815
|
+
class: {
|
|
43816
|
+
'active': _vm.filterStatus === 'active'
|
|
43817
|
+
},
|
|
43818
|
+
attrs: {
|
|
43819
|
+
"type": "button",
|
|
43820
|
+
"disabled": _vm.disabled
|
|
43821
|
+
},
|
|
43822
|
+
on: {
|
|
43823
|
+
"click": function ($event) {
|
|
43824
|
+
return _vm.filterByStatus('active');
|
|
43825
|
+
}
|
|
43826
|
+
}
|
|
43827
|
+
}, [_c('i', {
|
|
43828
|
+
staticClass: "fa fa-check-circle mr-1"
|
|
43829
|
+
}), _vm._v(" Active ")]) : _vm._e(), _vm.actionButtons.inactive ? _c('button', {
|
|
43830
|
+
staticClass: "btn btn-sm btn-outline-secondary",
|
|
43831
|
+
class: {
|
|
43832
|
+
'active': _vm.filterStatus === 'inactive'
|
|
43833
|
+
},
|
|
43834
|
+
attrs: {
|
|
43835
|
+
"type": "button",
|
|
43836
|
+
"disabled": _vm.disabled
|
|
43837
|
+
},
|
|
43838
|
+
on: {
|
|
43839
|
+
"click": function ($event) {
|
|
43840
|
+
return _vm.filterByStatus('inactive');
|
|
43841
|
+
}
|
|
43842
|
+
}
|
|
43843
|
+
}, [_c('i', {
|
|
43844
|
+
staticClass: "fa fa-times-circle mr-1"
|
|
43845
|
+
}), _vm._v(" Inactive ")]) : _vm._e(), _vm.actionButtons.clear ? _c('button', {
|
|
43846
|
+
staticClass: "btn btn-sm btn-outline-danger",
|
|
43847
|
+
attrs: {
|
|
43848
|
+
"type": "button",
|
|
43849
|
+
"disabled": _vm.disabled || !_vm.hasSelectedItems
|
|
43850
|
+
},
|
|
43851
|
+
on: {
|
|
43852
|
+
"click": _vm.clearSelection
|
|
43853
|
+
}
|
|
43854
|
+
}, [_c('i', {
|
|
43855
|
+
staticClass: "fa fa-times mr-1"
|
|
43856
|
+
}), _vm._v(" Clear ")]) : _vm._e()])]) : _vm._e(), _vm.loading && !_vm.hasItems ? _c('div', {
|
|
43857
|
+
staticClass: "autocomplete-loading"
|
|
43858
|
+
}, [_vm._m(1), _c('div', {
|
|
43859
|
+
staticClass: "mt-2 text-muted small"
|
|
43860
|
+
}, [_vm._v("Loading...")])]) : !_vm.loading && !_vm.hasItems && _vm.searchTerm.length >= _vm.minSearchLength ? _c('div', {
|
|
43861
|
+
staticClass: "autocomplete-no-data"
|
|
43862
|
+
}, [_c('i', {
|
|
43863
|
+
staticClass: "fa fa-search text-muted",
|
|
43864
|
+
staticStyle: {
|
|
43865
|
+
"font-size": "2rem"
|
|
43866
|
+
}
|
|
43867
|
+
}), _c('div', {
|
|
43868
|
+
staticClass: "mt-2 text-muted"
|
|
43869
|
+
}, [_vm._v(_vm._s(_vm.noDataText))]), _c('div', {
|
|
43870
|
+
staticClass: "text-muted small"
|
|
43871
|
+
}, [_vm._v("Try adjusting your search terms")])]) : _vm.hasGrouping ? _c('div', {
|
|
43872
|
+
staticClass: "autocomplete-grouped"
|
|
43873
|
+
}, _vm._l(_vm.paginatedGroupedItems, function (group, groupIndex) {
|
|
43874
|
+
return _c('div', {
|
|
43875
|
+
key: group.group || groupIndex,
|
|
43876
|
+
staticClass: "autocomplete-group"
|
|
43877
|
+
}, [_c('div', {
|
|
43878
|
+
staticClass: "autocomplete-group-header"
|
|
43879
|
+
}, [_vm.groupFields.length > 0 ? _c('div', {
|
|
43880
|
+
staticClass: "d-flex flex-column"
|
|
43881
|
+
}, [_c('div', {
|
|
43882
|
+
staticClass: "font-weight-bold font-14"
|
|
43883
|
+
}, [_vm._v(_vm._s(group.group))]), _vm.groupFields.length > 1 ? _c('div', {
|
|
43884
|
+
staticClass: "small text-muted mt-1"
|
|
43885
|
+
}, _vm._l(_vm.groupFields, function (field, idx) {
|
|
43886
|
+
return _c('span', {
|
|
43887
|
+
key: field
|
|
43888
|
+
}, [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()]);
|
|
43889
|
+
}), 0) : _vm._e()]) : _c('div', [_vm._v(_vm._s(group.group))])]), _c('ul', {
|
|
43890
|
+
staticClass: "list-group list-group-flush"
|
|
43891
|
+
}, _vm._l(group.items, function (item, itemIndex) {
|
|
43892
|
+
return _c('li', {
|
|
43893
|
+
key: _vm.getItemValue(item),
|
|
43894
|
+
staticClass: "list-group-item autocomplete-item",
|
|
43895
|
+
class: {
|
|
43896
|
+
'active': _vm.getFlatIndex(groupIndex, itemIndex) === _vm.highlightedIndex,
|
|
43897
|
+
'selected': _vm.isSelected(item)
|
|
43898
|
+
},
|
|
43899
|
+
staticStyle: {
|
|
43900
|
+
"cursor": "pointer"
|
|
43901
|
+
},
|
|
43902
|
+
on: {
|
|
43903
|
+
"click": function ($event) {
|
|
43904
|
+
$event.preventDefault();
|
|
43905
|
+
return _vm.selectItem(item, $event);
|
|
43906
|
+
},
|
|
43907
|
+
"mouseenter": function ($event) {
|
|
43908
|
+
_vm.highlightedIndex = _vm.getFlatIndex(groupIndex, itemIndex);
|
|
43909
|
+
}
|
|
43910
|
+
}
|
|
43911
|
+
}, [_c('div', {
|
|
43912
|
+
staticClass: "d-flex align-items-center"
|
|
43913
|
+
}, [_vm.multiple ? _c('div', {
|
|
43914
|
+
staticClass: "autocomplete-checkbox-wrapper mr-2"
|
|
43915
|
+
}, [_c('input', {
|
|
43916
|
+
staticClass: "autocomplete-checkbox",
|
|
43917
|
+
attrs: {
|
|
43918
|
+
"type": "checkbox",
|
|
43919
|
+
"tabindex": "-1"
|
|
43920
|
+
},
|
|
43921
|
+
domProps: {
|
|
43922
|
+
"checked": _vm.isSelected(item)
|
|
43923
|
+
},
|
|
43924
|
+
on: {
|
|
43925
|
+
"click": function ($event) {
|
|
43926
|
+
$event.stopPropagation();
|
|
43927
|
+
$event.preventDefault();
|
|
43928
|
+
return _vm.selectItem(item, $event);
|
|
43929
|
+
}
|
|
43930
|
+
}
|
|
43931
|
+
}), _vm.isSelected(item) ? _c('i', {
|
|
43932
|
+
staticClass: "fa fa-check autocomplete-check-icon"
|
|
43933
|
+
}) : _vm._e()]) : _vm._e(), item.raw && item.raw.category ? _c('span', {
|
|
43934
|
+
staticClass: "badge badge-secondary mr-2",
|
|
43935
|
+
staticStyle: {
|
|
43936
|
+
"font-size": "0.75rem"
|
|
43937
|
+
}
|
|
43938
|
+
}, [_vm._v(" " + _vm._s(item.raw.category) + " ")]) : _vm._e(), _c('div', {
|
|
43939
|
+
staticClass: "flex-grow-1"
|
|
43940
|
+
}, [_vm.itemFields.length > 0 ? _c('div', {
|
|
43941
|
+
staticClass: "font-weight-400",
|
|
43942
|
+
class: {
|
|
43943
|
+
'text-dark': _vm.isSelected(item)
|
|
43944
|
+
},
|
|
43945
|
+
domProps: {
|
|
43946
|
+
"innerHTML": _vm._s(_vm.formatItemFields(item))
|
|
43947
|
+
}
|
|
43948
|
+
}) : _c('div', {
|
|
43949
|
+
staticClass: "font-weight-400",
|
|
43950
|
+
class: {
|
|
43951
|
+
'text-dark': _vm.isSelected(item)
|
|
43952
|
+
}
|
|
43953
|
+
}, [_vm._v(_vm._s(_vm.getItemText(item)))]), !_vm.itemFields.length && _vm.getItemDescription(item) ? _c('div', {
|
|
43954
|
+
staticClass: "text-muted small mt-1"
|
|
43955
|
+
}, [_vm._v(_vm._s(_vm.getItemDescription(item)))]) : _vm._e()]), _vm.isSelected(item) && !_vm.multiple ? _c('i', {
|
|
43956
|
+
staticClass: "fa fa-check text-success ml-2",
|
|
43957
|
+
staticStyle: {
|
|
43958
|
+
"font-size": "1.1rem"
|
|
43959
|
+
}
|
|
43960
|
+
}) : _vm._e()])]);
|
|
43961
|
+
}), 0)]);
|
|
43962
|
+
}), 0) : _c('ul', {
|
|
43963
|
+
staticClass: "list-group list-group-flush"
|
|
43964
|
+
}, _vm._l(_vm.paginatedDisplayItems, function (item, index) {
|
|
43965
|
+
return _c('li', {
|
|
43966
|
+
key: _vm.getItemValue(item),
|
|
43967
|
+
staticClass: "list-group-item autocomplete-item",
|
|
43968
|
+
class: {
|
|
43969
|
+
'active': index === _vm.highlightedIndex,
|
|
43970
|
+
'selected': _vm.isSelected(item)
|
|
43971
|
+
},
|
|
43972
|
+
staticStyle: {
|
|
43973
|
+
"cursor": "pointer"
|
|
43974
|
+
},
|
|
43975
|
+
on: {
|
|
43976
|
+
"click": function ($event) {
|
|
43977
|
+
$event.preventDefault();
|
|
43978
|
+
return _vm.selectItem(item, $event);
|
|
43979
|
+
},
|
|
43980
|
+
"mouseenter": function ($event) {
|
|
43981
|
+
_vm.highlightedIndex = index;
|
|
43982
|
+
}
|
|
43983
|
+
}
|
|
43984
|
+
}, [_c('div', {
|
|
43985
|
+
staticClass: "d-flex align-items-center"
|
|
43986
|
+
}, [_vm.multiple ? _c('input', {
|
|
43987
|
+
staticClass: "mr-2",
|
|
43988
|
+
attrs: {
|
|
43989
|
+
"type": "checkbox",
|
|
43990
|
+
"tabindex": "-1"
|
|
43991
|
+
},
|
|
43992
|
+
domProps: {
|
|
43993
|
+
"checked": _vm.isSelected(item)
|
|
43994
|
+
},
|
|
43995
|
+
on: {
|
|
43996
|
+
"click": function ($event) {
|
|
43997
|
+
$event.stopPropagation();
|
|
43998
|
+
$event.preventDefault();
|
|
43999
|
+
return _vm.selectItem(item);
|
|
44000
|
+
}
|
|
44001
|
+
}
|
|
44002
|
+
}) : _vm._e(), item.raw && item.raw.category ? _c('span', {
|
|
44003
|
+
staticClass: "badge badge-primary mr-2"
|
|
44004
|
+
}, [_vm._v(" " + _vm._s(item.raw.category) + " ")]) : _vm._e(), _c('div', {
|
|
44005
|
+
staticClass: "flex-grow-1"
|
|
44006
|
+
}, [_vm.itemFields.length > 0 ? _c('div', {
|
|
44007
|
+
staticClass: "font-weight-400",
|
|
44008
|
+
domProps: {
|
|
44009
|
+
"innerHTML": _vm._s(_vm.formatItemFields(item))
|
|
44010
|
+
}
|
|
44011
|
+
}) : _c('div', {
|
|
44012
|
+
staticClass: "font-weight-400"
|
|
44013
|
+
}, [_vm._v(_vm._s(_vm.getItemText(item)))]), !_vm.itemFields.length && _vm.getItemDescription(item) ? _c('div', {
|
|
44014
|
+
staticClass: "text-muted small mt-1"
|
|
44015
|
+
}, [_vm._v(_vm._s(_vm.getItemDescription(item)))]) : _vm._e()]), _vm.isSelected(item) && !_vm.multiple ? _c('i', {
|
|
44016
|
+
staticClass: "fa fa-check text-primary ml-2"
|
|
44017
|
+
}) : _vm._e()])]);
|
|
44018
|
+
}), 0)]) : _vm._e()]), !_vm.hideDetails && _vm.hasError ? _c('div', {
|
|
44019
|
+
staticClass: "invalid-feedback d-block"
|
|
44020
|
+
}, _vm._l(_vm.errorMessagesArray, function (error, index) {
|
|
44021
|
+
return _c('div', {
|
|
44022
|
+
key: index
|
|
44023
|
+
}, [_vm._v(_vm._s(error))]);
|
|
44024
|
+
}), 0) : _vm._e()]);
|
|
44025
|
+
};
|
|
44026
|
+
var Autocompletevue_type_template_id_c293aa98_scoped_true_staticRenderFns = [function () {
|
|
44027
|
+
var _vm = this,
|
|
44028
|
+
_c = _vm._self._c;
|
|
44029
|
+
return _c('div', {
|
|
44030
|
+
staticClass: "spinner-border spinner-border-sm text-primary",
|
|
44031
|
+
attrs: {
|
|
44032
|
+
"role": "status"
|
|
44033
|
+
}
|
|
44034
|
+
}, [_c('span', {
|
|
44035
|
+
staticClass: "sr-only"
|
|
44036
|
+
}, [_vm._v("Loading...")])]);
|
|
44037
|
+
}, function () {
|
|
44038
|
+
var _vm = this,
|
|
44039
|
+
_c = _vm._self._c;
|
|
44040
|
+
return _c('div', {
|
|
44041
|
+
staticClass: "spinner-border spinner-border-sm text-primary",
|
|
44042
|
+
attrs: {
|
|
44043
|
+
"role": "status"
|
|
44044
|
+
}
|
|
44045
|
+
}, [_c('span', {
|
|
44046
|
+
staticClass: "sr-only"
|
|
44047
|
+
}, [_vm._v("Loading...")])]);
|
|
44048
|
+
}];
|
|
44049
|
+
|
|
44050
|
+
// CONCATENATED MODULE: ./src/components/Autocomplete.vue?vue&type=template&id=c293aa98&scoped=true
|
|
44051
|
+
|
|
44052
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.every.js
|
|
44053
|
+
var es_iterator_every = __webpack_require__("d866");
|
|
44054
|
+
|
|
44055
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.find.js
|
|
44056
|
+
var es_iterator_find = __webpack_require__("f665");
|
|
44057
|
+
|
|
44058
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.flat-map.js
|
|
44059
|
+
var es_iterator_flat_map = __webpack_require__("796d");
|
|
44060
|
+
|
|
44061
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.some.js
|
|
44062
|
+
var es_iterator_some = __webpack_require__("a732");
|
|
44063
|
+
|
|
44064
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.set.difference.v2.js
|
|
44065
|
+
var es_set_difference_v2 = __webpack_require__("1e70");
|
|
44066
|
+
|
|
44067
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.set.intersection.v2.js
|
|
44068
|
+
var es_set_intersection_v2 = __webpack_require__("79a4");
|
|
44069
|
+
|
|
44070
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.set.is-disjoint-from.v2.js
|
|
44071
|
+
var es_set_is_disjoint_from_v2 = __webpack_require__("c1a1");
|
|
44072
|
+
|
|
44073
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.set.is-subset-of.v2.js
|
|
44074
|
+
var es_set_is_subset_of_v2 = __webpack_require__("8b00");
|
|
44075
|
+
|
|
44076
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.set.is-superset-of.v2.js
|
|
44077
|
+
var es_set_is_superset_of_v2 = __webpack_require__("a4e7");
|
|
44078
|
+
|
|
44079
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.set.symmetric-difference.v2.js
|
|
44080
|
+
var es_set_symmetric_difference_v2 = __webpack_require__("1e5a");
|
|
44081
|
+
|
|
44082
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.set.union.v2.js
|
|
44083
|
+
var es_set_union_v2 = __webpack_require__("72c3");
|
|
44084
|
+
|
|
44085
|
+
// 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
|
|
44086
|
+
|
|
44087
|
+
|
|
44088
|
+
|
|
44089
|
+
|
|
44090
|
+
|
|
44091
|
+
|
|
44092
|
+
|
|
44093
|
+
|
|
44094
|
+
|
|
44095
|
+
|
|
44096
|
+
|
|
44097
|
+
|
|
44098
|
+
|
|
44099
|
+
|
|
44100
|
+
|
|
44101
|
+
|
|
44102
|
+
/* harmony default export */ var Autocompletevue_type_script_lang_js = ({
|
|
44103
|
+
name: 'Autocomplete',
|
|
44104
|
+
// Vue 2 v-model uses value/input by default
|
|
44105
|
+
props: {
|
|
44106
|
+
value: {
|
|
44107
|
+
type: [String, Number, Array],
|
|
44108
|
+
default: null
|
|
44109
|
+
},
|
|
44110
|
+
// Also support modelValue for Vue 3 compatibility
|
|
44111
|
+
modelValue: {
|
|
44112
|
+
type: [String, Number, Array],
|
|
44113
|
+
default: null
|
|
44114
|
+
},
|
|
44115
|
+
items: {
|
|
44116
|
+
type: Array,
|
|
44117
|
+
default: () => []
|
|
44118
|
+
},
|
|
44119
|
+
// All items (unfiltered) - used for finding selected items
|
|
44120
|
+
allItems: {
|
|
44121
|
+
type: Array,
|
|
44122
|
+
default: null
|
|
44123
|
+
},
|
|
44124
|
+
loading: {
|
|
44125
|
+
type: Boolean,
|
|
44126
|
+
default: false
|
|
44127
|
+
},
|
|
44128
|
+
placeholder: {
|
|
44129
|
+
type: String,
|
|
44130
|
+
default: 'Search and select...'
|
|
44131
|
+
},
|
|
44132
|
+
label: {
|
|
44133
|
+
type: String,
|
|
44134
|
+
default: null
|
|
44135
|
+
},
|
|
44136
|
+
disabled: {
|
|
44137
|
+
type: Boolean,
|
|
44138
|
+
default: false
|
|
44139
|
+
},
|
|
44140
|
+
clearable: {
|
|
44141
|
+
type: Boolean,
|
|
44142
|
+
default: true
|
|
44143
|
+
},
|
|
44144
|
+
density: {
|
|
44145
|
+
type: String,
|
|
44146
|
+
default: 'default',
|
|
44147
|
+
validator: value => ['compact', 'comfortable', 'default'].includes(value)
|
|
44148
|
+
},
|
|
44149
|
+
variant: {
|
|
44150
|
+
type: String,
|
|
44151
|
+
default: 'outlined',
|
|
44152
|
+
validator: value => ['outlined', 'filled', 'underlined', 'solo', 'solo-inverted', 'solo-filled'].includes(value)
|
|
44153
|
+
},
|
|
44154
|
+
multiple: {
|
|
44155
|
+
type: Boolean,
|
|
44156
|
+
default: false
|
|
44157
|
+
},
|
|
44158
|
+
itemTitle: {
|
|
44159
|
+
type: String,
|
|
44160
|
+
default: 'title'
|
|
44161
|
+
},
|
|
44162
|
+
itemValue: {
|
|
44163
|
+
type: String,
|
|
44164
|
+
default: 'value'
|
|
44165
|
+
},
|
|
44166
|
+
noDataText: {
|
|
44167
|
+
type: String,
|
|
44168
|
+
default: 'No data available'
|
|
44169
|
+
},
|
|
44170
|
+
hideDetails: {
|
|
44171
|
+
type: Boolean,
|
|
44172
|
+
default: false
|
|
44173
|
+
},
|
|
44174
|
+
errorMessages: {
|
|
44175
|
+
type: [String, Array],
|
|
44176
|
+
default: null
|
|
44177
|
+
},
|
|
44178
|
+
rules: {
|
|
44179
|
+
type: Array,
|
|
44180
|
+
default: () => []
|
|
44181
|
+
},
|
|
44182
|
+
menuProps: {
|
|
44183
|
+
type: Object,
|
|
44184
|
+
default: () => ({
|
|
44185
|
+
maxHeight: 300
|
|
44186
|
+
})
|
|
44187
|
+
},
|
|
44188
|
+
minSearchLength: {
|
|
44189
|
+
type: Number,
|
|
44190
|
+
default: 0
|
|
44191
|
+
},
|
|
44192
|
+
// Maximum number of chips to display before showing "+ n more"
|
|
44193
|
+
maxVisibleChips: {
|
|
44194
|
+
type: Number,
|
|
44195
|
+
default: null // null means show all
|
|
44196
|
+
},
|
|
44197
|
+
// Action buttons configuration
|
|
44198
|
+
actionButtons: {
|
|
44199
|
+
type: Object,
|
|
44200
|
+
default: () => ({
|
|
44201
|
+
selectAll: false,
|
|
44202
|
+
active: false,
|
|
44203
|
+
inactive: false,
|
|
44204
|
+
clear: false
|
|
44205
|
+
})
|
|
44206
|
+
},
|
|
44207
|
+
// Item display fields - array of field names to display
|
|
44208
|
+
itemFields: {
|
|
44209
|
+
type: Array,
|
|
44210
|
+
default: () => [] // e.g., ['name', 'number', 'status']
|
|
44211
|
+
},
|
|
44212
|
+
// Group display fields - array of field names to display in group header
|
|
44213
|
+
groupFields: {
|
|
44214
|
+
type: Array,
|
|
44215
|
+
default: () => [] // e.g., ['accountName', 'accountNumber']
|
|
44216
|
+
},
|
|
44217
|
+
// Performance: Maximum items to render at once (virtualization)
|
|
44218
|
+
maxRenderItems: {
|
|
44219
|
+
type: Number,
|
|
44220
|
+
default: 100 // Render first 100 items, load more on scroll
|
|
44221
|
+
},
|
|
44222
|
+
// Performance: Enable lazy loading
|
|
44223
|
+
lazyLoad: {
|
|
44224
|
+
type: Boolean,
|
|
44225
|
+
default: false
|
|
44226
|
+
},
|
|
44227
|
+
// Status field configuration for dynamic color formatting
|
|
44228
|
+
statusFieldConfig: {
|
|
44229
|
+
type: Object,
|
|
44230
|
+
default: () => ({
|
|
44231
|
+
fieldName: 'status',
|
|
44232
|
+
// Field name to check for status
|
|
44233
|
+
activeValues: ['active', 'Active', 'true', '1'],
|
|
44234
|
+
// Values considered as active
|
|
44235
|
+
inactiveValues: ['inactive', 'Inactive', 'false', '0'],
|
|
44236
|
+
// Values considered as inactive
|
|
44237
|
+
activeColor: '#28a745',
|
|
44238
|
+
// Green color for active
|
|
44239
|
+
inactiveColor: '#dc3545' // Red color for inactive
|
|
44240
|
+
})
|
|
44241
|
+
}
|
|
44242
|
+
},
|
|
44243
|
+
data() {
|
|
44244
|
+
return {
|
|
44245
|
+
isMenuOpen: false,
|
|
44246
|
+
searchTerm: '',
|
|
44247
|
+
highlightedIndex: -1,
|
|
44248
|
+
renderedItemCount: this.maxRenderItems,
|
|
44249
|
+
filterStatus: null // 'active', 'inactive', or null for all
|
|
44250
|
+
};
|
|
44251
|
+
},
|
|
44252
|
+
computed: {
|
|
44253
|
+
// Get the current value (Vue 2 uses 'value', Vue 3 uses 'modelValue')
|
|
44254
|
+
currentValue() {
|
|
44255
|
+
return this.value !== null && this.value !== undefined ? this.value : this.modelValue;
|
|
44256
|
+
},
|
|
44257
|
+
// Selected value for single select mode
|
|
44258
|
+
selectedValue() {
|
|
44259
|
+
if (this.multiple) return null;
|
|
44260
|
+
return this.currentValue;
|
|
44261
|
+
},
|
|
44262
|
+
displayItems() {
|
|
44263
|
+
return this.items.map(item => ({
|
|
44264
|
+
...item,
|
|
44265
|
+
title: this.getItemText(item),
|
|
44266
|
+
value: this.getItemValue(item)
|
|
44267
|
+
}));
|
|
44268
|
+
},
|
|
44269
|
+
groupedItems() {
|
|
44270
|
+
// Check if items are already grouped (array of groups) or flat with group property
|
|
44271
|
+
if (this.items.length > 0 && Array.isArray(this.items[0].items)) {
|
|
44272
|
+
// Items are already in grouped format: [{ group: 'Group1', items: [...] }, ...]
|
|
44273
|
+
// Preserve all group properties for groupFields display
|
|
44274
|
+
return this.items.map(group => ({
|
|
44275
|
+
...group,
|
|
44276
|
+
raw: group,
|
|
44277
|
+
// Preserve original group data for groupFields
|
|
44278
|
+
group: group.group || group.groupName || ''
|
|
44279
|
+
}));
|
|
44280
|
+
}
|
|
44281
|
+
|
|
44282
|
+
// Group flat items by group property
|
|
44283
|
+
const groups = {};
|
|
44284
|
+
const groupMetadata = {}; // Store metadata for each group (for groupFields display)
|
|
44285
|
+
|
|
44286
|
+
this.displayItems.forEach(item => {
|
|
44287
|
+
const groupName = this.getItemGroup(item) || 'Other';
|
|
44288
|
+
if (!groups[groupName]) {
|
|
44289
|
+
groups[groupName] = [];
|
|
44290
|
+
// Store first item's group metadata for display
|
|
44291
|
+
if (item.raw) {
|
|
44292
|
+
groupMetadata[groupName] = {
|
|
44293
|
+
...item.raw
|
|
44294
|
+
};
|
|
44295
|
+
} else {
|
|
44296
|
+
groupMetadata[groupName] = {
|
|
44297
|
+
...item
|
|
44298
|
+
};
|
|
44299
|
+
}
|
|
44300
|
+
}
|
|
44301
|
+
groups[groupName].push(item);
|
|
44302
|
+
});
|
|
44303
|
+
|
|
44304
|
+
// Convert to array format with metadata
|
|
44305
|
+
return Object.keys(groups).map(groupName => ({
|
|
44306
|
+
group: groupName,
|
|
44307
|
+
items: groups[groupName],
|
|
44308
|
+
raw: groupMetadata[groupName] // Preserve group metadata for groupFields display
|
|
44309
|
+
}));
|
|
44310
|
+
},
|
|
44311
|
+
hasGrouping() {
|
|
44312
|
+
if (this.items.length === 0) return false;
|
|
44313
|
+
// Check if items are in grouped format
|
|
44314
|
+
if (Array.isArray(this.items[0].items)) return true;
|
|
44315
|
+
// Check if items have group property or groupFields is defined
|
|
44316
|
+
if (this.groupFields && this.groupFields.length > 0) {
|
|
44317
|
+
// If groupFields is defined, we should group by the first field
|
|
44318
|
+
return true;
|
|
44319
|
+
}
|
|
44320
|
+
// Check if items have explicit group property
|
|
44321
|
+
return this.displayItems.some(item => this.getItemGroup(item));
|
|
44322
|
+
},
|
|
44323
|
+
flatDisplayItems() {
|
|
44324
|
+
// Flatten grouped items for easier iteration
|
|
44325
|
+
if (this.hasGrouping) {
|
|
44326
|
+
return this.groupedItems.flatMap(group => group.items);
|
|
44327
|
+
}
|
|
44328
|
+
return this.displayItems;
|
|
44329
|
+
},
|
|
44330
|
+
hasItems() {
|
|
44331
|
+
return this.displayItems.length > 0;
|
|
44332
|
+
},
|
|
44333
|
+
menuMaxHeight() {
|
|
44334
|
+
return this.menuProps && this.menuProps.maxHeight || 300;
|
|
44335
|
+
},
|
|
44336
|
+
selectedItems() {
|
|
44337
|
+
if (!this.multiple) return [];
|
|
44338
|
+
|
|
44339
|
+
// Get selected values from currentValue (supports both value and modelValue props)
|
|
44340
|
+
const currentVal = this.currentValue;
|
|
44341
|
+
const selectedValues = Array.isArray(currentVal) ? currentVal : currentVal ? [currentVal] : [];
|
|
44342
|
+
if (selectedValues.length === 0) {
|
|
44343
|
+
return [];
|
|
44344
|
+
}
|
|
44345
|
+
|
|
44346
|
+
// Look through ALL items (unfiltered), not just displayItems (which might be filtered)
|
|
44347
|
+
let itemsToSearch = this.allItems && this.allItems.length > 0 ? this.allItems : this.items;
|
|
44348
|
+
|
|
44349
|
+
// Flatten grouped items if needed
|
|
44350
|
+
if (itemsToSearch.length > 0 && Array.isArray(itemsToSearch[0].items)) {
|
|
44351
|
+
// Items are in grouped format - flatten them
|
|
44352
|
+
itemsToSearch = itemsToSearch.flatMap(group => group.items || []);
|
|
44353
|
+
}
|
|
44354
|
+
const filtered = itemsToSearch.filter(item => {
|
|
44355
|
+
const itemValue = this.getItemValue(item);
|
|
44356
|
+
return selectedValues.some(sv => String(sv) === String(itemValue));
|
|
44357
|
+
});
|
|
44358
|
+
return filtered.map(item => ({
|
|
44359
|
+
...item,
|
|
44360
|
+
title: this.getItemText(item),
|
|
44361
|
+
value: this.getItemValue(item)
|
|
44362
|
+
}));
|
|
44363
|
+
},
|
|
44364
|
+
displayText() {
|
|
44365
|
+
if (this.multiple) return '';
|
|
44366
|
+
const currentVal = this.currentValue;
|
|
44367
|
+
if (!currentVal) return this.searchTerm;
|
|
44368
|
+
const selected = this.displayItems.find(item => String(this.getItemValue(item)) === String(currentVal));
|
|
44369
|
+
return selected ? this.getItemText(selected) : this.searchTerm;
|
|
44370
|
+
},
|
|
44371
|
+
hasError() {
|
|
44372
|
+
return this.errorMessages && this.errorMessages.length > 0 || this.rules && this.rules.length > 0 && this.validateRules().length > 0;
|
|
44373
|
+
},
|
|
44374
|
+
errorMessagesArray() {
|
|
44375
|
+
if (this.errorMessages) {
|
|
44376
|
+
return Array.isArray(this.errorMessages) ? this.errorMessages : [this.errorMessages];
|
|
44377
|
+
}
|
|
44378
|
+
return this.validateRules();
|
|
44379
|
+
},
|
|
44380
|
+
// Chips display logic
|
|
44381
|
+
visibleChips() {
|
|
44382
|
+
return this.selectedItems;
|
|
44383
|
+
},
|
|
44384
|
+
maxVisibleChipsCount() {
|
|
44385
|
+
return this.maxVisibleChips !== null && this.maxVisibleChips !== undefined ? this.maxVisibleChips : this.selectedItems.length;
|
|
44386
|
+
},
|
|
44387
|
+
remainingChipsCount() {
|
|
44388
|
+
if (this.maxVisibleChips === null || this.maxVisibleChips === undefined) return 0;
|
|
44389
|
+
return Math.max(0, this.selectedItems.length - this.maxVisibleChips);
|
|
44390
|
+
},
|
|
44391
|
+
// Action buttons
|
|
44392
|
+
hasActionButtons() {
|
|
44393
|
+
return this.actionButtons && (this.actionButtons.selectAll || this.actionButtons.active || this.actionButtons.inactive || this.actionButtons.clear);
|
|
44394
|
+
},
|
|
44395
|
+
allSelected() {
|
|
44396
|
+
if (!this.multiple) return false;
|
|
44397
|
+
// Check if all filtered items are selected
|
|
44398
|
+
const filteredItems = this.filteredDisplayItems;
|
|
44399
|
+
const selectedValues = Array.isArray(this.currentValue) ? this.currentValue : [];
|
|
44400
|
+
return filteredItems.length > 0 && filteredItems.every(item => {
|
|
44401
|
+
const itemValue = this.getItemValue(item);
|
|
44402
|
+
return selectedValues.some(sv => String(sv) === String(itemValue));
|
|
44403
|
+
});
|
|
44404
|
+
},
|
|
44405
|
+
hasSelectedItems() {
|
|
44406
|
+
if (!this.multiple) return false;
|
|
44407
|
+
const selectedValues = Array.isArray(this.currentValue) ? this.currentValue : [];
|
|
44408
|
+
return selectedValues.length > 0;
|
|
44409
|
+
},
|
|
44410
|
+
// Performance: Filter and paginate items
|
|
44411
|
+
filteredDisplayItems() {
|
|
44412
|
+
let items = this.displayItems;
|
|
44413
|
+
|
|
44414
|
+
// Apply status filter if active
|
|
44415
|
+
if (this.filterStatus) {
|
|
44416
|
+
items = items.filter(item => {
|
|
44417
|
+
// Check status field (case-insensitive)
|
|
44418
|
+
const status = this.getItemFieldValue(item, 'status') || this.getItemFieldValue(item, 'Status') || this.getItemFieldValue(item, 'isActive');
|
|
44419
|
+
const statusStr = String(status).toLowerCase().trim();
|
|
44420
|
+
if (this.filterStatus === 'active') {
|
|
44421
|
+
return statusStr === 'active' || statusStr === 'true' || statusStr === '1';
|
|
44422
|
+
} else if (this.filterStatus === 'inactive') {
|
|
44423
|
+
return statusStr === 'inactive' || statusStr === 'false' || statusStr === '0';
|
|
44424
|
+
}
|
|
44425
|
+
return true;
|
|
44426
|
+
});
|
|
44427
|
+
}
|
|
44428
|
+
return items;
|
|
44429
|
+
},
|
|
44430
|
+
// Performance: Limit rendered items
|
|
44431
|
+
paginatedDisplayItems() {
|
|
44432
|
+
if (this.lazyLoad && this.filteredDisplayItems.length > this.renderedItemCount) {
|
|
44433
|
+
return this.filteredDisplayItems.slice(0, this.renderedItemCount);
|
|
44434
|
+
}
|
|
44435
|
+
return this.filteredDisplayItems;
|
|
44436
|
+
},
|
|
44437
|
+
// Update grouped items to use paginated/filtered items
|
|
44438
|
+
paginatedGroupedItems() {
|
|
44439
|
+
if (!this.hasGrouping) return [];
|
|
44440
|
+
let groups = this.groupedItems;
|
|
44441
|
+
|
|
44442
|
+
// Apply status filter if active
|
|
44443
|
+
if (this.filterStatus) {
|
|
44444
|
+
groups = groups.map(group => ({
|
|
44445
|
+
...group,
|
|
44446
|
+
items: group.items.filter(item => {
|
|
44447
|
+
// Check status field (case-insensitive)
|
|
44448
|
+
const status = this.getItemFieldValue(item, 'status') || this.getItemFieldValue(item, 'Status') || this.getItemFieldValue(item, 'isActive');
|
|
44449
|
+
const statusStr = String(status).toLowerCase().trim();
|
|
44450
|
+
if (this.filterStatus === 'active') {
|
|
44451
|
+
return statusStr === 'active' || statusStr === 'true' || statusStr === '1';
|
|
44452
|
+
} else if (this.filterStatus === 'inactive') {
|
|
44453
|
+
return statusStr === 'inactive' || statusStr === 'false' || statusStr === '0';
|
|
44454
|
+
}
|
|
44455
|
+
return true;
|
|
44456
|
+
})
|
|
44457
|
+
})).filter(group => group.items.length > 0);
|
|
44458
|
+
}
|
|
44459
|
+
|
|
44460
|
+
// Apply pagination if lazy load is enabled
|
|
44461
|
+
if (this.lazyLoad) {
|
|
44462
|
+
let itemCount = 0;
|
|
44463
|
+
const result = [];
|
|
44464
|
+
for (const group of groups) {
|
|
44465
|
+
if (itemCount >= this.renderedItemCount) break;
|
|
44466
|
+
const remaining = this.renderedItemCount - itemCount;
|
|
44467
|
+
result.push({
|
|
44468
|
+
...group,
|
|
44469
|
+
items: group.items.slice(0, remaining)
|
|
44470
|
+
});
|
|
44471
|
+
itemCount += group.items.length;
|
|
44472
|
+
}
|
|
44473
|
+
return result;
|
|
44474
|
+
}
|
|
44475
|
+
return groups;
|
|
44476
|
+
}
|
|
44477
|
+
},
|
|
44478
|
+
watch: {
|
|
44479
|
+
items() {
|
|
44480
|
+
// Reset highlight when items change
|
|
44481
|
+
this.highlightedIndex = -1;
|
|
44482
|
+
},
|
|
44483
|
+
hasGrouping() {
|
|
44484
|
+
// Reset highlight when grouping changes
|
|
44485
|
+
this.highlightedIndex = -1;
|
|
44486
|
+
},
|
|
44487
|
+
modelValue: {
|
|
44488
|
+
handler(newVal, oldVal) {
|
|
44489
|
+
// Reset search term when value changes externally
|
|
44490
|
+
if (this.multiple) {
|
|
44491
|
+
// For multiple, keep search term
|
|
44492
|
+
} else {
|
|
44493
|
+
// For single select, clear search term if value is cleared
|
|
44494
|
+
if (!newVal && this.searchTerm) {
|
|
44495
|
+
this.searchTerm = '';
|
|
44496
|
+
}
|
|
44497
|
+
}
|
|
44498
|
+
},
|
|
44499
|
+
immediate: true,
|
|
44500
|
+
deep: true
|
|
44501
|
+
},
|
|
44502
|
+
value: {
|
|
44503
|
+
handler(newVal, oldVal) {
|
|
44504
|
+
// Reset search term when value changes externally
|
|
44505
|
+
if (this.multiple) {
|
|
44506
|
+
// For multiple, keep search term
|
|
44507
|
+
} else {
|
|
44508
|
+
// For single select, clear search term if value is cleared
|
|
44509
|
+
if (!newVal && this.searchTerm) {
|
|
44510
|
+
this.searchTerm = '';
|
|
44511
|
+
}
|
|
44512
|
+
}
|
|
44513
|
+
},
|
|
44514
|
+
immediate: true,
|
|
44515
|
+
deep: true
|
|
44516
|
+
}
|
|
44517
|
+
},
|
|
44518
|
+
mounted() {
|
|
44519
|
+
// Close menu when clicking outside
|
|
44520
|
+
document.addEventListener('click', this.handleClickOutside);
|
|
44521
|
+
},
|
|
44522
|
+
beforeDestroy() {
|
|
44523
|
+
document.removeEventListener('click', this.handleClickOutside);
|
|
44524
|
+
},
|
|
44525
|
+
methods: {
|
|
44526
|
+
getItemText(item) {
|
|
44527
|
+
if (item.raw) {
|
|
44528
|
+
return item.raw.text || item.raw.title || item.raw[this.itemTitle] || '';
|
|
44529
|
+
}
|
|
44530
|
+
return item.text || item.title || item[this.itemTitle] || '';
|
|
44531
|
+
},
|
|
44532
|
+
getItemValue(item) {
|
|
44533
|
+
let value;
|
|
44534
|
+
if (item.raw) {
|
|
44535
|
+
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;
|
|
44536
|
+
} else {
|
|
44537
|
+
value = item.value !== undefined && item.value !== null ? item.value : item[this.itemValue] !== undefined && item[this.itemValue] !== null ? item[this.itemValue] : null;
|
|
44538
|
+
}
|
|
44539
|
+
|
|
44540
|
+
// Ensure we have a valid value - use index as fallback if needed
|
|
44541
|
+
if (value === null || value === undefined) {
|
|
44542
|
+
// Try to find the item's index in the items array
|
|
44543
|
+
const itemIndex = this.items.findIndex(i => i === item || item.raw && i === item.raw);
|
|
44544
|
+
if (itemIndex > -1) {
|
|
44545
|
+
value = `item-${itemIndex}`;
|
|
44546
|
+
} else {
|
|
44547
|
+
console.warn('Autocomplete: Item has no value and could not determine index', item);
|
|
44548
|
+
value = `item-${Date.now()}-${Math.random()}`;
|
|
44549
|
+
}
|
|
44550
|
+
}
|
|
44551
|
+
return value;
|
|
44552
|
+
},
|
|
44553
|
+
getItemDescription(item) {
|
|
44554
|
+
if (item.raw) {
|
|
44555
|
+
return item.raw.description || item.raw.subtitle || '';
|
|
44556
|
+
}
|
|
44557
|
+
return item.description || item.subtitle || '';
|
|
44558
|
+
},
|
|
44559
|
+
getItemGroup(item) {
|
|
44560
|
+
if (item.raw) {
|
|
44561
|
+
// Priority: groupFields > group/groupName
|
|
44562
|
+
// If groupFields is defined, use the first field as grouping field (highest priority)
|
|
44563
|
+
if (this.groupFields && this.groupFields.length > 0) {
|
|
44564
|
+
const groupValue = item.raw[this.groupFields[0]];
|
|
44565
|
+
if (groupValue !== undefined && groupValue !== null && groupValue !== '') {
|
|
44566
|
+
return String(groupValue);
|
|
44567
|
+
}
|
|
44568
|
+
}
|
|
44569
|
+
// Fallback to explicit group/groupName
|
|
44570
|
+
if (item.raw.group || item.raw.groupName) {
|
|
44571
|
+
return item.raw.group || item.raw.groupName;
|
|
44572
|
+
}
|
|
44573
|
+
return '';
|
|
44574
|
+
}
|
|
44575
|
+
// Priority: groupFields > group/groupName
|
|
44576
|
+
// If groupFields is defined, use the first field as grouping field (highest priority)
|
|
44577
|
+
if (this.groupFields && this.groupFields.length > 0) {
|
|
44578
|
+
const groupValue = item[this.groupFields[0]];
|
|
44579
|
+
if (groupValue !== undefined && groupValue !== null && groupValue !== '') {
|
|
44580
|
+
return String(groupValue);
|
|
44581
|
+
}
|
|
44582
|
+
}
|
|
44583
|
+
// Fallback to explicit group/groupName
|
|
44584
|
+
if (item.group || item.groupName) {
|
|
44585
|
+
return item.group || item.groupName;
|
|
44586
|
+
}
|
|
44587
|
+
return '';
|
|
44588
|
+
},
|
|
44589
|
+
getItemFieldValue(item, field) {
|
|
44590
|
+
if (item.raw) {
|
|
44591
|
+
return item.raw[field] || '';
|
|
44592
|
+
}
|
|
44593
|
+
return item[field] || '';
|
|
44594
|
+
},
|
|
44595
|
+
getGroupFieldValue(group, field) {
|
|
44596
|
+
if (group.raw) {
|
|
44597
|
+
return group.raw[field] || '';
|
|
44598
|
+
}
|
|
44599
|
+
return group[field] || '';
|
|
44600
|
+
},
|
|
44601
|
+
isSelected(item) {
|
|
44602
|
+
const value = this.getItemValue(item);
|
|
44603
|
+
const currentVal = this.currentValue;
|
|
44604
|
+
if (this.multiple) {
|
|
44605
|
+
const selectedValues = Array.isArray(currentVal) ? currentVal : currentVal ? [currentVal] : [];
|
|
44606
|
+
// Compare values with type coercion to handle string/number mismatches
|
|
44607
|
+
return selectedValues.some(sv => String(sv) === String(value));
|
|
44608
|
+
}
|
|
44609
|
+
return currentVal !== null && currentVal !== undefined && String(currentVal) === String(value);
|
|
44610
|
+
},
|
|
44611
|
+
onInput(event) {
|
|
44612
|
+
this.searchTerm = event.target.value;
|
|
44613
|
+
this.isMenuOpen = true;
|
|
44614
|
+
this.$emit('update:search', this.searchTerm);
|
|
44615
|
+
this.$emit('search', this.searchTerm);
|
|
44616
|
+
},
|
|
44617
|
+
onFocus() {
|
|
44618
|
+
this.isMenuOpen = true;
|
|
44619
|
+
this.$emit('focus');
|
|
44620
|
+
},
|
|
44621
|
+
onBlur() {
|
|
44622
|
+
// Delay to allow click events to fire
|
|
44623
|
+
setTimeout(() => {
|
|
44624
|
+
if (!this.multiple) {
|
|
44625
|
+
// Restore selected value text if no selection made
|
|
44626
|
+
if (this.selectedValue) {
|
|
44627
|
+
const selected = this.displayItems.find(item => this.getItemValue(item) === this.selectedValue);
|
|
44628
|
+
if (selected && this.searchTerm !== this.getItemText(selected)) {
|
|
44629
|
+
this.searchTerm = '';
|
|
44630
|
+
}
|
|
44631
|
+
}
|
|
44632
|
+
}
|
|
44633
|
+
this.$emit('blur');
|
|
44634
|
+
}, 200);
|
|
44635
|
+
},
|
|
44636
|
+
toggleMenu() {
|
|
44637
|
+
if (this.disabled) return;
|
|
44638
|
+
this.isMenuOpen = !this.isMenuOpen;
|
|
44639
|
+
if (this.isMenuOpen) {
|
|
44640
|
+
this.$nextTick(() => {
|
|
44641
|
+
var _this$$refs$input;
|
|
44642
|
+
(_this$$refs$input = this.$refs.input) === null || _this$$refs$input === void 0 || _this$$refs$input.focus();
|
|
44643
|
+
});
|
|
44644
|
+
}
|
|
44645
|
+
},
|
|
44646
|
+
closeMenu() {
|
|
44647
|
+
this.isMenuOpen = false;
|
|
44648
|
+
this.highlightedIndex = -1;
|
|
44649
|
+
},
|
|
44650
|
+
selectItem(item, event) {
|
|
44651
|
+
// Prevent event from bubbling and default behavior
|
|
44652
|
+
if (event) {
|
|
44653
|
+
event.preventDefault();
|
|
44654
|
+
event.stopPropagation();
|
|
44655
|
+
event.stopImmediatePropagation();
|
|
44656
|
+
}
|
|
44657
|
+
|
|
44658
|
+
// Debug logging
|
|
44659
|
+
console.log('selectItem called for single item:', item);
|
|
44660
|
+
console.log('Item value:', this.getItemValue(item));
|
|
44661
|
+
const value = this.getItemValue(item);
|
|
44662
|
+
const currentVal = this.currentValue;
|
|
44663
|
+
if (this.multiple) {
|
|
44664
|
+
// Ensure we start with an array
|
|
44665
|
+
const currentValues = Array.isArray(currentVal) ? [...currentVal] : currentVal ? [currentVal] : [];
|
|
44666
|
+
const selectedValues = [...currentValues];
|
|
44667
|
+
|
|
44668
|
+
// Find index with type coercion
|
|
44669
|
+
const index = selectedValues.findIndex(sv => String(sv) === String(value));
|
|
44670
|
+
console.log('Current selected values:', selectedValues);
|
|
44671
|
+
console.log('Item value to toggle:', value);
|
|
44672
|
+
console.log('Index found:', index);
|
|
44673
|
+
if (index > -1) {
|
|
44674
|
+
// Remove if already selected
|
|
44675
|
+
selectedValues.splice(index, 1);
|
|
44676
|
+
console.log('Removed item. New selection:', selectedValues);
|
|
44677
|
+
} else {
|
|
44678
|
+
// Add if not selected - ONLY this single item
|
|
44679
|
+
selectedValues.push(value);
|
|
44680
|
+
console.log('Added single item. New selection:', selectedValues);
|
|
44681
|
+
}
|
|
44682
|
+
|
|
44683
|
+
// Emit both events for Vue 2 and Vue 3 compatibility
|
|
44684
|
+
this.$emit('input', selectedValues);
|
|
44685
|
+
this.$emit('update:modelValue', selectedValues);
|
|
44686
|
+
this.$emit('change', selectedValues);
|
|
44687
|
+
} else {
|
|
44688
|
+
this.searchTerm = '';
|
|
44689
|
+
this.isMenuOpen = false;
|
|
44690
|
+
// Emit both events for Vue 2 and Vue 3 compatibility
|
|
44691
|
+
this.$emit('input', value);
|
|
44692
|
+
this.$emit('update:modelValue', value);
|
|
44693
|
+
this.$emit('change', value);
|
|
44694
|
+
}
|
|
44695
|
+
},
|
|
44696
|
+
removeItem(value) {
|
|
44697
|
+
if (this.multiple) {
|
|
44698
|
+
const currentVal = this.currentValue;
|
|
44699
|
+
const selectedValues = Array.isArray(currentVal) ? [...currentVal] : [];
|
|
44700
|
+
const index = selectedValues.findIndex(sv => String(sv) === String(value));
|
|
44701
|
+
if (index > -1) {
|
|
44702
|
+
selectedValues.splice(index, 1);
|
|
44703
|
+
// Emit both events for Vue 2 and Vue 3 compatibility
|
|
44704
|
+
this.$emit('input', selectedValues);
|
|
44705
|
+
this.$emit('update:modelValue', selectedValues);
|
|
44706
|
+
this.$emit('change', selectedValues);
|
|
44707
|
+
}
|
|
44708
|
+
}
|
|
44709
|
+
},
|
|
44710
|
+
clearSelection() {
|
|
44711
|
+
if (this.multiple) {
|
|
44712
|
+
// Emit both events for Vue 2 and Vue 3 compatibility
|
|
44713
|
+
this.$emit('input', []);
|
|
44714
|
+
this.$emit('update:modelValue', []);
|
|
44715
|
+
this.$emit('change', []);
|
|
44716
|
+
} else {
|
|
44717
|
+
this.searchTerm = '';
|
|
44718
|
+
// Emit both events for Vue 2 and Vue 3 compatibility
|
|
44719
|
+
this.$emit('input', null);
|
|
44720
|
+
this.$emit('update:modelValue', null);
|
|
44721
|
+
this.$emit('change', null);
|
|
44722
|
+
}
|
|
44723
|
+
this.isMenuOpen = false;
|
|
44724
|
+
},
|
|
44725
|
+
getFlatIndex(groupIndex, itemIndex) {
|
|
44726
|
+
// Calculate flat index from group and item indices
|
|
44727
|
+
let flatIndex = 0;
|
|
44728
|
+
for (let i = 0; i < groupIndex; i++) {
|
|
44729
|
+
flatIndex += this.groupedItems[i].items.length;
|
|
44730
|
+
}
|
|
44731
|
+
return flatIndex + itemIndex;
|
|
44732
|
+
},
|
|
44733
|
+
getItemFromFlatIndex(flatIndex) {
|
|
44734
|
+
// Get item from flat index when items are grouped
|
|
44735
|
+
if (!this.hasGrouping) {
|
|
44736
|
+
return this.displayItems[flatIndex];
|
|
44737
|
+
}
|
|
44738
|
+
let currentIndex = 0;
|
|
44739
|
+
for (const group of this.groupedItems) {
|
|
44740
|
+
if (flatIndex < currentIndex + group.items.length) {
|
|
44741
|
+
return group.items[flatIndex - currentIndex];
|
|
44742
|
+
}
|
|
44743
|
+
currentIndex += group.items.length;
|
|
44744
|
+
}
|
|
44745
|
+
return null;
|
|
44746
|
+
},
|
|
44747
|
+
handleEnter() {
|
|
44748
|
+
if (this.isMenuOpen && this.highlightedIndex >= 0) {
|
|
44749
|
+
const item = this.hasGrouping ? this.getItemFromFlatIndex(this.highlightedIndex) : this.displayItems[this.highlightedIndex];
|
|
44750
|
+
if (item) {
|
|
44751
|
+
this.selectItem(item, null);
|
|
44752
|
+
}
|
|
44753
|
+
} else if (this.isMenuOpen && this.flatDisplayItems.length === 1) {
|
|
44754
|
+
this.selectItem(this.flatDisplayItems[0], null);
|
|
44755
|
+
}
|
|
44756
|
+
},
|
|
44757
|
+
navigateDown() {
|
|
44758
|
+
if (!this.isMenuOpen) {
|
|
44759
|
+
this.isMenuOpen = true;
|
|
44760
|
+
return;
|
|
44761
|
+
}
|
|
44762
|
+
const maxIndex = this.flatDisplayItems.length - 1;
|
|
44763
|
+
if (this.highlightedIndex < maxIndex) {
|
|
44764
|
+
this.highlightedIndex++;
|
|
44765
|
+
this.scrollToHighlighted();
|
|
44766
|
+
}
|
|
44767
|
+
},
|
|
44768
|
+
navigateUp() {
|
|
44769
|
+
if (this.highlightedIndex > 0) {
|
|
44770
|
+
this.highlightedIndex--;
|
|
44771
|
+
this.scrollToHighlighted();
|
|
44772
|
+
}
|
|
44773
|
+
},
|
|
44774
|
+
scrollToHighlighted() {
|
|
44775
|
+
this.$nextTick(() => {
|
|
44776
|
+
if (this.$refs.menu) {
|
|
44777
|
+
const items = this.$refs.menu.querySelectorAll('.autocomplete-item');
|
|
44778
|
+
if (items[this.highlightedIndex]) {
|
|
44779
|
+
items[this.highlightedIndex].scrollIntoView({
|
|
44780
|
+
block: 'nearest',
|
|
44781
|
+
behavior: 'smooth'
|
|
44782
|
+
});
|
|
44783
|
+
}
|
|
44784
|
+
}
|
|
44785
|
+
});
|
|
44786
|
+
},
|
|
44787
|
+
handleBackspace() {
|
|
44788
|
+
if (this.multiple && this.searchTerm === '') {
|
|
44789
|
+
const currentVal = this.currentValue;
|
|
44790
|
+
const selectedValues = Array.isArray(currentVal) ? currentVal : [];
|
|
44791
|
+
if (selectedValues.length > 0) {
|
|
44792
|
+
this.removeItem(selectedValues[selectedValues.length - 1]);
|
|
44793
|
+
}
|
|
44794
|
+
}
|
|
44795
|
+
},
|
|
44796
|
+
handleClickOutside(event) {
|
|
44797
|
+
if (this.$el && !this.$el.contains(event.target)) {
|
|
44798
|
+
this.closeMenu();
|
|
44799
|
+
}
|
|
44800
|
+
},
|
|
44801
|
+
validateRules() {
|
|
44802
|
+
if (!this.rules || this.rules.length === 0) return [];
|
|
44803
|
+
const errors = [];
|
|
44804
|
+
const value = this.currentValue;
|
|
44805
|
+
this.rules.forEach(rule => {
|
|
44806
|
+
if (typeof rule === 'function') {
|
|
44807
|
+
const result = rule(value);
|
|
44808
|
+
if (result !== true && result !== undefined) {
|
|
44809
|
+
errors.push(result);
|
|
44810
|
+
}
|
|
44811
|
+
}
|
|
44812
|
+
});
|
|
44813
|
+
return errors;
|
|
44814
|
+
},
|
|
44815
|
+
// Action button methods
|
|
44816
|
+
selectAll(event) {
|
|
44817
|
+
// Prevent event from bubbling
|
|
44818
|
+
if (event) {
|
|
44819
|
+
event.preventDefault();
|
|
44820
|
+
event.stopPropagation();
|
|
44821
|
+
event.stopImmediatePropagation();
|
|
44822
|
+
}
|
|
44823
|
+
console.log('selectAll called - this should only be called from the Select All button');
|
|
44824
|
+
if (!this.multiple) return;
|
|
44825
|
+
// Select all items from the currently filtered/displayed items
|
|
44826
|
+
const allItems = this.filteredDisplayItems;
|
|
44827
|
+
const allValues = allItems.map(item => this.getItemValue(item));
|
|
44828
|
+
// Merge with existing selections to avoid deselecting items not in current filter
|
|
44829
|
+
const currentValues = Array.isArray(this.currentValue) ? this.currentValue : [];
|
|
44830
|
+
const mergedValues = [...new Set([...currentValues, ...allValues])];
|
|
44831
|
+
console.log('Select All - all values:', mergedValues);
|
|
44832
|
+
this.$emit('input', mergedValues);
|
|
44833
|
+
this.$emit('update:modelValue', mergedValues);
|
|
44834
|
+
this.$emit('change', mergedValues);
|
|
44835
|
+
},
|
|
44836
|
+
filterByStatus(status) {
|
|
44837
|
+
if (this.filterStatus === status) {
|
|
44838
|
+
// Toggle off if clicking the same filter
|
|
44839
|
+
this.filterStatus = null;
|
|
44840
|
+
} else {
|
|
44841
|
+
this.filterStatus = status;
|
|
44842
|
+
}
|
|
44843
|
+
// Reset pagination when filter changes
|
|
44844
|
+
this.renderedItemCount = this.maxRenderItems;
|
|
44845
|
+
// Reset highlight when filter changes
|
|
44846
|
+
this.highlightedIndex = -1;
|
|
44847
|
+
},
|
|
44848
|
+
formatItemFields(item) {
|
|
44849
|
+
if (!this.itemFields || this.itemFields.length === 0) return '';
|
|
44850
|
+
const formattedValues = this.itemFields.map((field, index) => {
|
|
44851
|
+
const value = this.getItemFieldValue(item, field);
|
|
44852
|
+
if (!value && value !== 0) return '';
|
|
44853
|
+
|
|
44854
|
+
// Check if this field is the status field and apply color formatting
|
|
44855
|
+
if (field.toLowerCase() === this.statusFieldConfig.fieldName.toLowerCase()) {
|
|
44856
|
+
const statusStr = String(value).toLowerCase().trim();
|
|
44857
|
+
const isActive = this.statusFieldConfig.activeValues.some(av => String(av).toLowerCase() === statusStr);
|
|
44858
|
+
const isInactive = this.statusFieldConfig.inactiveValues.some(iv => String(iv).toLowerCase() === statusStr);
|
|
44859
|
+
let color = '';
|
|
44860
|
+
if (isActive) {
|
|
44861
|
+
color = this.statusFieldConfig.activeColor;
|
|
44862
|
+
} else if (isInactive) {
|
|
44863
|
+
color = this.statusFieldConfig.inactiveColor;
|
|
44864
|
+
}
|
|
44865
|
+
if (color) {
|
|
44866
|
+
return `<span style="color: ${color};">${value}</span>`;
|
|
44867
|
+
}
|
|
44868
|
+
}
|
|
44869
|
+
return String(value);
|
|
44870
|
+
}).filter(v => v !== '');
|
|
44871
|
+
if (formattedValues.length === 0) return '';
|
|
44872
|
+
|
|
44873
|
+
// Format: {field1} - {field2} ({field3})
|
|
44874
|
+
// Example: customerName - customerNumber (Status)
|
|
44875
|
+
if (formattedValues.length === 1) {
|
|
44876
|
+
return formattedValues[0];
|
|
44877
|
+
} else if (formattedValues.length === 2) {
|
|
44878
|
+
// field1 - field2
|
|
44879
|
+
return `${formattedValues[0]} - ${formattedValues[1]}`;
|
|
44880
|
+
} else if (formattedValues.length >= 3) {
|
|
44881
|
+
// field1 - field2 (field3, field4, ...)
|
|
44882
|
+
const firstTwo = formattedValues.slice(0, 2).filter(v => v).join(' - ');
|
|
44883
|
+
const rest = formattedValues.slice(2).filter(v => v).join(', ');
|
|
44884
|
+
if (rest) {
|
|
44885
|
+
return `${firstTwo} (${rest})`;
|
|
44886
|
+
}
|
|
44887
|
+
return firstTwo;
|
|
44888
|
+
}
|
|
44889
|
+
return '';
|
|
44890
|
+
},
|
|
44891
|
+
getChipText(item) {
|
|
44892
|
+
// If itemFields is provided, use formatItemFields, otherwise use getItemText
|
|
44893
|
+
if (this.itemFields && this.itemFields.length > 0) {
|
|
44894
|
+
return this.formatItemFields(item) || this.getItemText(item);
|
|
44895
|
+
}
|
|
44896
|
+
return this.getItemText(item);
|
|
44897
|
+
},
|
|
44898
|
+
onMenuScroll(event) {
|
|
44899
|
+
if (!this.lazyLoad) return;
|
|
44900
|
+
const target = event.target;
|
|
44901
|
+
const scrollBottom = target.scrollHeight - target.scrollTop - target.clientHeight;
|
|
44902
|
+
|
|
44903
|
+
// Load more items when scrolled near bottom (within 50px)
|
|
44904
|
+
if (scrollBottom < 50 && this.renderedItemCount < this.filteredDisplayItems.length) {
|
|
44905
|
+
this.renderedItemCount = Math.min(this.renderedItemCount + this.maxRenderItems, this.filteredDisplayItems.length);
|
|
44906
|
+
}
|
|
44907
|
+
}
|
|
44908
|
+
}
|
|
44909
|
+
});
|
|
44910
|
+
// CONCATENATED MODULE: ./src/components/Autocomplete.vue?vue&type=script&lang=js
|
|
44911
|
+
/* harmony default export */ var components_Autocompletevue_type_script_lang_js = (Autocompletevue_type_script_lang_js);
|
|
44912
|
+
// EXTERNAL MODULE: ./src/components/Autocomplete.vue?vue&type=style&index=0&id=c293aa98&prod&scoped=true&lang=css
|
|
44913
|
+
var Autocompletevue_type_style_index_0_id_c293aa98_prod_scoped_true_lang_css = __webpack_require__("663a");
|
|
44914
|
+
|
|
44915
|
+
// CONCATENATED MODULE: ./src/components/Autocomplete.vue
|
|
44916
|
+
|
|
44917
|
+
|
|
44918
|
+
|
|
44919
|
+
|
|
44920
|
+
|
|
44921
|
+
|
|
44922
|
+
/* normalize component */
|
|
44923
|
+
|
|
44924
|
+
var Autocomplete_component = normalizeComponent(
|
|
44925
|
+
components_Autocompletevue_type_script_lang_js,
|
|
44926
|
+
Autocompletevue_type_template_id_c293aa98_scoped_true_render,
|
|
44927
|
+
Autocompletevue_type_template_id_c293aa98_scoped_true_staticRenderFns,
|
|
44928
|
+
false,
|
|
44929
|
+
null,
|
|
44930
|
+
"c293aa98",
|
|
44931
|
+
null
|
|
44932
|
+
|
|
44933
|
+
)
|
|
44934
|
+
|
|
44935
|
+
/* harmony default export */ var Autocomplete = (Autocomplete_component.exports);
|
|
44936
|
+
// 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
|
|
44937
|
+
|
|
44938
|
+
|
|
44939
|
+
|
|
44940
|
+
|
|
44941
|
+
|
|
44942
|
+
|
|
44943
|
+
//import { lookupService } from '../../services/locateBillingService'
|
|
44944
|
+
|
|
44945
|
+
// Simple debounce function
|
|
44946
|
+
function SearchableSelectvue_type_script_lang_js_debounce(func, wait) {
|
|
44947
|
+
let timeout;
|
|
44948
|
+
return function executedFunction(...args) {
|
|
44949
|
+
const later = () => {
|
|
44950
|
+
clearTimeout(timeout);
|
|
44951
|
+
func(...args);
|
|
44952
|
+
};
|
|
44953
|
+
clearTimeout(timeout);
|
|
44954
|
+
timeout = setTimeout(later, wait);
|
|
44955
|
+
};
|
|
44956
|
+
}
|
|
44957
|
+
/* harmony default export */ var SearchableSelectvue_type_script_lang_js = ({
|
|
44958
|
+
name: 'SearchableSelect',
|
|
44959
|
+
components: {
|
|
44960
|
+
Autocomplete: Autocomplete
|
|
44961
|
+
},
|
|
44962
|
+
// Vue 2 v-model uses value/input by default - no model option needed
|
|
44963
|
+
props: {
|
|
44964
|
+
value: {
|
|
44965
|
+
type: [String, Number, Array],
|
|
44966
|
+
default: null
|
|
44967
|
+
},
|
|
44968
|
+
// Local items array - if provided, will use these instead of remote lookup
|
|
44969
|
+
items: {
|
|
44970
|
+
type: Array,
|
|
44971
|
+
default: () => null
|
|
44972
|
+
},
|
|
44973
|
+
// Remote lookup type - required only if items prop is not provided
|
|
44974
|
+
type: {
|
|
44975
|
+
type: String,
|
|
44976
|
+
required: false,
|
|
44977
|
+
default: null
|
|
44978
|
+
},
|
|
44979
|
+
category: {
|
|
44980
|
+
type: String,
|
|
44981
|
+
default: null
|
|
44982
|
+
},
|
|
44983
|
+
multiple: {
|
|
44984
|
+
type: Boolean,
|
|
44985
|
+
default: false
|
|
44986
|
+
},
|
|
44987
|
+
placeholder: {
|
|
44988
|
+
type: String,
|
|
44989
|
+
default: 'Search and select...'
|
|
44990
|
+
},
|
|
44991
|
+
label: {
|
|
44992
|
+
type: String,
|
|
44993
|
+
default: null
|
|
44994
|
+
},
|
|
44995
|
+
disabled: {
|
|
44996
|
+
type: Boolean,
|
|
44997
|
+
default: false
|
|
44998
|
+
},
|
|
44999
|
+
clearable: {
|
|
45000
|
+
type: Boolean,
|
|
45001
|
+
default: true
|
|
45002
|
+
},
|
|
45003
|
+
density: {
|
|
45004
|
+
type: String,
|
|
45005
|
+
default: 'default',
|
|
45006
|
+
validator: value => ['compact', 'comfortable', 'default'].includes(value)
|
|
45007
|
+
},
|
|
45008
|
+
variant: {
|
|
45009
|
+
type: String,
|
|
45010
|
+
default: 'outlined',
|
|
45011
|
+
validator: value => ['outlined', 'filled', 'underlined', 'solo', 'solo-inverted', 'solo-filled'].includes(value)
|
|
45012
|
+
},
|
|
45013
|
+
minSearchLength: {
|
|
45014
|
+
type: Number,
|
|
45015
|
+
default: 2
|
|
45016
|
+
},
|
|
45017
|
+
debounceMs: {
|
|
45018
|
+
type: Number,
|
|
45019
|
+
default: 300
|
|
45020
|
+
},
|
|
45021
|
+
pageSize: {
|
|
45022
|
+
type: Number,
|
|
45023
|
+
default: 50
|
|
45024
|
+
},
|
|
45025
|
+
maxItems: {
|
|
45026
|
+
type: Number,
|
|
45027
|
+
default: 1000
|
|
45028
|
+
},
|
|
45029
|
+
noDataText: {
|
|
45030
|
+
type: String,
|
|
45031
|
+
default: 'No data available'
|
|
45032
|
+
},
|
|
45033
|
+
hideDetails: {
|
|
45034
|
+
type: Boolean,
|
|
45035
|
+
default: false
|
|
45036
|
+
},
|
|
45037
|
+
errorMessages: {
|
|
45038
|
+
type: [String, Array],
|
|
45039
|
+
default: null
|
|
45040
|
+
},
|
|
45041
|
+
rules: {
|
|
45042
|
+
type: Array,
|
|
45043
|
+
default: () => []
|
|
45044
|
+
},
|
|
45045
|
+
filters: {
|
|
45046
|
+
type: Object,
|
|
45047
|
+
default: () => ({})
|
|
45048
|
+
},
|
|
45049
|
+
// Maximum number of chips to display before showing "+ n more"
|
|
45050
|
+
maxVisibleChips: {
|
|
45051
|
+
type: Number,
|
|
45052
|
+
default: null // null means show all
|
|
45053
|
+
},
|
|
45054
|
+
// Action buttons configuration
|
|
45055
|
+
actionButtons: {
|
|
45056
|
+
type: Object,
|
|
45057
|
+
default: () => ({
|
|
45058
|
+
selectAll: false,
|
|
45059
|
+
active: false,
|
|
45060
|
+
inactive: false,
|
|
45061
|
+
clear: false
|
|
45062
|
+
})
|
|
45063
|
+
},
|
|
45064
|
+
// Item display fields - array of field names to display
|
|
45065
|
+
itemFields: {
|
|
45066
|
+
type: Array,
|
|
45067
|
+
default: () => [] // e.g., ['name', 'number', 'status']
|
|
45068
|
+
},
|
|
45069
|
+
// Group display fields - array of field names to display in group header
|
|
45070
|
+
groupFields: {
|
|
45071
|
+
type: Array,
|
|
45072
|
+
default: () => [] // e.g., ['accountName', 'accountNumber']
|
|
45073
|
+
},
|
|
45074
|
+
// Performance: Maximum items to render at once (virtualization)
|
|
45075
|
+
maxRenderItems: {
|
|
45076
|
+
type: Number,
|
|
45077
|
+
default: 100 // Render first 100 items, load more on scroll
|
|
45078
|
+
},
|
|
45079
|
+
// Performance: Enable lazy loading
|
|
45080
|
+
lazyLoad: {
|
|
45081
|
+
type: Boolean,
|
|
45082
|
+
default: false
|
|
45083
|
+
},
|
|
45084
|
+
// Status field configuration for dynamic color formatting
|
|
45085
|
+
statusFieldConfig: {
|
|
45086
|
+
type: Object,
|
|
45087
|
+
default: () => ({
|
|
45088
|
+
fieldName: 'status',
|
|
45089
|
+
// Field name to check for status
|
|
45090
|
+
activeValues: ['active', 'Active', 'true', '1'],
|
|
45091
|
+
// Values considered as active
|
|
45092
|
+
inactiveValues: ['inactive', 'Inactive', 'false', '0'],
|
|
45093
|
+
// Values considered as inactive
|
|
45094
|
+
activeColor: '#28a745',
|
|
45095
|
+
// Green color for active
|
|
45096
|
+
inactiveColor: '#dc3545' // Red color for inactive
|
|
45097
|
+
})
|
|
45098
|
+
}
|
|
45099
|
+
},
|
|
45100
|
+
data() {
|
|
45101
|
+
return {
|
|
45102
|
+
remoteItems: [],
|
|
45103
|
+
// This will hold remote items from API
|
|
45104
|
+
loading: false,
|
|
45105
|
+
searchTerm: '',
|
|
45106
|
+
currentPage: 1,
|
|
45107
|
+
hasMore: false,
|
|
45108
|
+
totalItems: 0
|
|
45109
|
+
};
|
|
45110
|
+
},
|
|
45111
|
+
computed: {
|
|
45112
|
+
internalValue: {
|
|
45113
|
+
get() {
|
|
45114
|
+
// Use value prop (Vue 2 v-model default)
|
|
45115
|
+
const value = this.value !== null && this.value !== undefined ? this.value : this.multiple ? [] : null;
|
|
45116
|
+
return value;
|
|
45117
|
+
},
|
|
45118
|
+
set(value) {
|
|
45119
|
+
// Emit input event (Vue 2 v-model default)
|
|
45120
|
+
console.log('=== internalValue setter ===');
|
|
45121
|
+
console.log('Setting internalValue to:', value);
|
|
45122
|
+
console.log('Current value prop:', this.value);
|
|
45123
|
+
console.log('Emitting input event (Vue 2 v-model) with:', value);
|
|
45124
|
+
this.$emit('input', value);
|
|
45125
|
+
this.$emit('update:modelValue', value);
|
|
45126
|
+
this.$emit('change', value);
|
|
45127
|
+
}
|
|
45128
|
+
},
|
|
45129
|
+
useLocalItems() {
|
|
45130
|
+
// Use local items if provided, otherwise use remote lookup
|
|
45131
|
+
// In Vue 2, props are directly accessible via this.items
|
|
45132
|
+
return this.items !== null && this.items !== undefined && Array.isArray(this.items);
|
|
45133
|
+
},
|
|
45134
|
+
normalizedLocalItems() {
|
|
45135
|
+
// Normalize local items - handle both flat and pre-grouped formats
|
|
45136
|
+
if (!this.useLocalItems) return [];
|
|
45137
|
+
|
|
45138
|
+
// Check if items are in pre-grouped format: [{ group: 'Group1', items: [...] }, ...]
|
|
45139
|
+
if (this.items.length > 0 && this.items[0].items && Array.isArray(this.items[0].items)) {
|
|
45140
|
+
// Pre-grouped format - flatten it
|
|
45141
|
+
const flattened = [];
|
|
45142
|
+
this.items.forEach(group => {
|
|
45143
|
+
if (group.items && Array.isArray(group.items)) {
|
|
45144
|
+
group.items.forEach(item => {
|
|
45145
|
+
flattened.push({
|
|
45146
|
+
...item,
|
|
45147
|
+
group: group.group || group.groupName || ''
|
|
45148
|
+
});
|
|
45149
|
+
});
|
|
45150
|
+
}
|
|
45151
|
+
});
|
|
45152
|
+
return flattened;
|
|
45153
|
+
}
|
|
45154
|
+
|
|
45155
|
+
// Flat format - return as is
|
|
45156
|
+
return this.items;
|
|
45157
|
+
},
|
|
45158
|
+
allItems() {
|
|
45159
|
+
// Return all items (not filtered) - used for finding selected items
|
|
45160
|
+
let sourceItems;
|
|
45161
|
+
if (this.useLocalItems) {
|
|
45162
|
+
sourceItems = this.normalizedLocalItems;
|
|
45163
|
+
} else {
|
|
45164
|
+
sourceItems = this.remoteItems;
|
|
45165
|
+
}
|
|
45166
|
+
return sourceItems.map((item, index) => {
|
|
45167
|
+
// Ensure value is always set - use index as fallback if no value/id
|
|
45168
|
+
const itemValue = item.value !== undefined && item.value !== null ? item.value : item.id !== undefined && item.id !== null ? item.id : `item-${index}`;
|
|
45169
|
+
|
|
45170
|
+
// Determine group value - Priority: groupFields > group/groupName
|
|
45171
|
+
let groupValue = '';
|
|
45172
|
+
if (this.groupFields && this.groupFields.length > 0) {
|
|
45173
|
+
// groupFields has highest priority
|
|
45174
|
+
groupValue = item[this.groupFields[0]] || '';
|
|
45175
|
+
}
|
|
45176
|
+
// Fallback to explicit group/groupName if groupFields didn't provide a value
|
|
45177
|
+
if (!groupValue) {
|
|
45178
|
+
groupValue = item.group || item.groupName || '';
|
|
45179
|
+
}
|
|
45180
|
+
return {
|
|
45181
|
+
raw: item,
|
|
45182
|
+
text: item.text || item.name || item.label || '',
|
|
45183
|
+
value: itemValue,
|
|
45184
|
+
description: item.description || item.subtitle || '',
|
|
45185
|
+
category: item.category || '',
|
|
45186
|
+
group: groupValue,
|
|
45187
|
+
title: item.text || item.name || item.label || '',
|
|
45188
|
+
subtitle: item.description || item.subtitle || ''
|
|
45189
|
+
};
|
|
45190
|
+
});
|
|
45191
|
+
},
|
|
45192
|
+
displayItems() {
|
|
45193
|
+
// Use local items or remote items (filtered for display)
|
|
45194
|
+
let sourceItems;
|
|
45195
|
+
if (this.useLocalItems) {
|
|
45196
|
+
// Filter local items based on search term
|
|
45197
|
+
sourceItems = this.filterLocalItems(this.searchTerm);
|
|
45198
|
+
} else {
|
|
45199
|
+
sourceItems = this.remoteItems;
|
|
45200
|
+
}
|
|
45201
|
+
return sourceItems.map((item, index) => {
|
|
45202
|
+
// Ensure value is always set - use index as fallback if no value/id
|
|
45203
|
+
const itemValue = item.value !== undefined && item.value !== null ? item.value : item.id !== undefined && item.id !== null ? item.id : `item-${index}`;
|
|
45204
|
+
|
|
45205
|
+
// Determine group value - Priority: groupFields > group/groupName
|
|
45206
|
+
let groupValue = '';
|
|
45207
|
+
if (this.groupFields && this.groupFields.length > 0) {
|
|
45208
|
+
// groupFields has highest priority
|
|
45209
|
+
groupValue = item[this.groupFields[0]] || '';
|
|
45210
|
+
}
|
|
45211
|
+
// Fallback to explicit group/groupName if groupFields didn't provide a value
|
|
45212
|
+
if (!groupValue) {
|
|
45213
|
+
groupValue = item.group || item.groupName || '';
|
|
45214
|
+
}
|
|
45215
|
+
return {
|
|
45216
|
+
raw: item,
|
|
45217
|
+
text: item.text || item.name || item.label || '',
|
|
45218
|
+
value: itemValue,
|
|
45219
|
+
description: item.description || item.subtitle || '',
|
|
45220
|
+
category: item.category || '',
|
|
45221
|
+
group: groupValue,
|
|
45222
|
+
title: item.text || item.name || item.label || '',
|
|
45223
|
+
subtitle: item.description || item.subtitle || ''
|
|
45224
|
+
};
|
|
45225
|
+
});
|
|
45226
|
+
},
|
|
45227
|
+
hasItems() {
|
|
45228
|
+
return this.displayItems.length > 0;
|
|
45229
|
+
},
|
|
45230
|
+
itemTitle() {
|
|
45231
|
+
return 'title';
|
|
45232
|
+
},
|
|
45233
|
+
itemValue() {
|
|
45234
|
+
return 'value';
|
|
45235
|
+
},
|
|
45236
|
+
menuProps() {
|
|
45237
|
+
return {
|
|
45238
|
+
maxHeight: 300,
|
|
45239
|
+
virtual: true,
|
|
45240
|
+
itemHeight: 48
|
|
45241
|
+
};
|
|
45242
|
+
}
|
|
45243
|
+
},
|
|
45244
|
+
methods: {
|
|
45245
|
+
filterLocalItems(search = '') {
|
|
45246
|
+
// Filter local items based on search term
|
|
45247
|
+
if (!this.useLocalItems) {
|
|
45248
|
+
return [];
|
|
45249
|
+
}
|
|
45250
|
+
|
|
45251
|
+
// Use normalized items (handles both flat and pre-grouped formats)
|
|
45252
|
+
const itemsToFilter = this.normalizedLocalItems;
|
|
45253
|
+
if (!search || search.trim() === '') {
|
|
45254
|
+
return itemsToFilter;
|
|
45255
|
+
}
|
|
45256
|
+
const searchLower = search.toLowerCase();
|
|
45257
|
+
return itemsToFilter.filter(item => {
|
|
45258
|
+
const text = (item.text || item.name || item.label || '').toLowerCase();
|
|
45259
|
+
const description = (item.description || item.subtitle || '').toLowerCase();
|
|
45260
|
+
return text.includes(searchLower) || description.includes(searchLower);
|
|
45261
|
+
});
|
|
45262
|
+
},
|
|
45263
|
+
async loadItems(search = '', page = 1, append = false) {
|
|
45264
|
+
// If using local items, filter them instead of making API call
|
|
45265
|
+
if (this.useLocalItems) {
|
|
45266
|
+
const filtered = this.filterLocalItems(search);
|
|
45267
|
+
// For local items, we don't modify the prop, just return filtered results
|
|
45268
|
+
// The displayItems computed will handle showing filtered items
|
|
45269
|
+
this.totalItems = filtered.length;
|
|
45270
|
+
this.hasMore = false;
|
|
45271
|
+
this.$emit('search', {
|
|
45272
|
+
search,
|
|
45273
|
+
results: filtered.length,
|
|
45274
|
+
total: filtered.length
|
|
45275
|
+
});
|
|
45276
|
+
return;
|
|
45277
|
+
}
|
|
45278
|
+
|
|
45279
|
+
// Remote lookup - validate type is provided
|
|
45280
|
+
if (!this.type) {
|
|
45281
|
+
console.warn('SearchableSelect: type prop is required when items prop is not provided');
|
|
45282
|
+
return;
|
|
45283
|
+
}
|
|
45284
|
+
if (this.loading) return;
|
|
45285
|
+
this.loading = true;
|
|
45286
|
+
|
|
45287
|
+
// try {
|
|
45288
|
+
// const response = await lookupService.getLookupItems({
|
|
45289
|
+
// type: this.type,
|
|
45290
|
+
// category: this.category,
|
|
45291
|
+
// search: search,
|
|
45292
|
+
// page: page,
|
|
45293
|
+
// limit: this.pageSize,
|
|
45294
|
+
// filters: this.filters
|
|
45295
|
+
// });
|
|
45296
|
+
|
|
45297
|
+
// // Handle response - adjust based on your actual API response structure
|
|
45298
|
+
// if (response && response.data) {
|
|
45299
|
+
// const responseData = response.data
|
|
45300
|
+
// // Check if response has result property (common pattern in this project)
|
|
45301
|
+
// const data = responseData.result || responseData.data || responseData
|
|
45302
|
+
// const newItems = data.items || data.DATA || data || []
|
|
45303
|
+
|
|
45304
|
+
// if (append) {
|
|
45305
|
+
// this.remoteItems = [...this.remoteItems, ...newItems]
|
|
45306
|
+
// } else {
|
|
45307
|
+
// this.remoteItems = newItems
|
|
45308
|
+
// }
|
|
45309
|
+
|
|
45310
|
+
// this.currentPage = data.page || page
|
|
45311
|
+
// this.hasMore = !!data.hasMore
|
|
45312
|
+
// this.totalItems = data.total || data.TOTAL || newItems.length
|
|
45313
|
+
|
|
45314
|
+
// this.$emit('search', { search, results: newItems.length, total: this.totalItems })
|
|
45315
|
+
// } else {
|
|
45316
|
+
// console.error('Lookup API error:', response)
|
|
45317
|
+
// this.remoteItems = []
|
|
45318
|
+
// }
|
|
45319
|
+
// } catch (error) {
|
|
45320
|
+
// console.error('Error loading lookup items:', error)
|
|
45321
|
+
// this.remoteItems = []
|
|
45322
|
+
// } finally {
|
|
45323
|
+
// this.loading = false
|
|
45324
|
+
// }
|
|
45325
|
+
},
|
|
45326
|
+
onSearch(search) {
|
|
45327
|
+
this.searchTerm = search;
|
|
45328
|
+
if (this.useLocalItems) {
|
|
45329
|
+
// For local items, filtering is handled by displayItems computed property
|
|
45330
|
+
const filtered = this.filterLocalItems(search);
|
|
45331
|
+
this.$emit('search', {
|
|
45332
|
+
search,
|
|
45333
|
+
results: filtered.length,
|
|
45334
|
+
total: filtered.length
|
|
45335
|
+
});
|
|
45336
|
+
} else {
|
|
45337
|
+
// For remote items, debounce the API call
|
|
45338
|
+
this.debouncedLoadItems(search, 1, false);
|
|
45339
|
+
}
|
|
45340
|
+
},
|
|
45341
|
+
onSelectionChange(value) {
|
|
45342
|
+
// Ensure value is an array for multiple mode
|
|
45343
|
+
const finalValue = this.multiple && !Array.isArray(value) ? [value] : value;
|
|
45344
|
+
|
|
45345
|
+
// Emit both events for Vue 2 and Vue 3 compatibility
|
|
45346
|
+
this.$emit('input', finalValue);
|
|
45347
|
+
this.$emit('update:modelValue', finalValue);
|
|
45348
|
+
this.$emit('change', finalValue);
|
|
45349
|
+
},
|
|
45350
|
+
onFocus() {
|
|
45351
|
+
this.$emit('focus');
|
|
45352
|
+
if (this.useLocalItems) {
|
|
45353
|
+
// For local items, displayItems will show all items when searchTerm is empty
|
|
45354
|
+
// No action needed
|
|
45355
|
+
} else {
|
|
45356
|
+
// For remote items, load if needed
|
|
45357
|
+
if (this.remoteItems.length === 0 && this.searchTerm.length < this.minSearchLength) {
|
|
45358
|
+
this.loadItems('', 1, false);
|
|
45359
|
+
}
|
|
45360
|
+
}
|
|
45361
|
+
},
|
|
45362
|
+
onBlur() {
|
|
45363
|
+
this.$emit('blur');
|
|
45364
|
+
},
|
|
45365
|
+
removeItem(value) {
|
|
45366
|
+
if (this.multiple) {
|
|
45367
|
+
const newValues = (this.modelValue || []).filter(v => v !== value);
|
|
45368
|
+
this.$emit('update:modelValue', newValues);
|
|
45369
|
+
}
|
|
45370
|
+
},
|
|
45371
|
+
loadMore() {
|
|
45372
|
+
if (this.hasMore && !this.loading) {
|
|
45373
|
+
this.loadItems(this.searchTerm, this.currentPage + 1, true);
|
|
45374
|
+
}
|
|
45375
|
+
},
|
|
45376
|
+
clear() {
|
|
45377
|
+
if (this.useLocalItems) {
|
|
45378
|
+
// For local items, just clear search term
|
|
45379
|
+
this.searchTerm = '';
|
|
45380
|
+
} else {
|
|
45381
|
+
this.remoteItems = [];
|
|
45382
|
+
this.searchTerm = '';
|
|
45383
|
+
this.currentPage = 1;
|
|
45384
|
+
this.hasMore = false;
|
|
45385
|
+
this.totalItems = 0;
|
|
45386
|
+
}
|
|
45387
|
+
},
|
|
45388
|
+
refresh() {
|
|
45389
|
+
this.loadItems(this.searchTerm, 1, false);
|
|
45390
|
+
}
|
|
45391
|
+
},
|
|
45392
|
+
watch: {
|
|
45393
|
+
items: {
|
|
45394
|
+
handler(newItems) {
|
|
45395
|
+
// When local items prop changes, update totalItems
|
|
45396
|
+
if (this.useLocalItems) {
|
|
45397
|
+
const filtered = this.filterLocalItems(this.searchTerm);
|
|
45398
|
+
this.totalItems = filtered.length;
|
|
45399
|
+
// Force reactivity update
|
|
45400
|
+
this.$forceUpdate();
|
|
45401
|
+
}
|
|
45402
|
+
},
|
|
45403
|
+
deep: true,
|
|
45404
|
+
immediate: true
|
|
45405
|
+
},
|
|
45406
|
+
type() {
|
|
45407
|
+
if (!this.useLocalItems) {
|
|
45408
|
+
this.remoteItems = [];
|
|
45409
|
+
this.searchTerm = '';
|
|
45410
|
+
this.currentPage = 1;
|
|
45411
|
+
this.hasMore = false;
|
|
45412
|
+
this.totalItems = 0;
|
|
45413
|
+
}
|
|
45414
|
+
},
|
|
45415
|
+
category() {
|
|
45416
|
+
if (!this.useLocalItems) {
|
|
45417
|
+
this.remoteItems = [];
|
|
45418
|
+
this.searchTerm = '';
|
|
45419
|
+
this.currentPage = 1;
|
|
45420
|
+
this.hasMore = false;
|
|
45421
|
+
this.totalItems = 0;
|
|
45422
|
+
}
|
|
45423
|
+
},
|
|
45424
|
+
filters: {
|
|
45425
|
+
handler() {
|
|
45426
|
+
if (!this.useLocalItems) {
|
|
45427
|
+
this.remoteItems = [];
|
|
45428
|
+
this.searchTerm = '';
|
|
45429
|
+
this.currentPage = 1;
|
|
45430
|
+
this.hasMore = false;
|
|
45431
|
+
this.totalItems = 0;
|
|
45432
|
+
}
|
|
45433
|
+
},
|
|
45434
|
+
deep: true
|
|
45435
|
+
},
|
|
45436
|
+
value: {
|
|
45437
|
+
handler: async function (newValue, oldValue) {
|
|
45438
|
+
console.log('=== SearchableSelect value watcher ===');
|
|
45439
|
+
console.log('New value:', newValue, 'type:', Array.isArray(newValue) ? 'array' : typeof newValue);
|
|
45440
|
+
console.log('Old value:', oldValue);
|
|
45441
|
+
console.log('=== End watcher ===');
|
|
45442
|
+
|
|
45443
|
+
// Only load remote items if not using local items
|
|
45444
|
+
if (!this.useLocalItems && newValue && this.remoteItems.length === 0 && !this.loading && this.type) {
|
|
45445
|
+
// try {
|
|
45446
|
+
// this.loading = true
|
|
45447
|
+
// const response = await lookupService.getLookupItems({
|
|
45448
|
+
// type: this.type,
|
|
45449
|
+
// category: this.category,
|
|
45450
|
+
// search: '',
|
|
45451
|
+
// page: 1,
|
|
45452
|
+
// limit: this.pageSize,
|
|
45453
|
+
// filters: this.filters
|
|
45454
|
+
// })
|
|
45455
|
+
|
|
45456
|
+
// // Handle response - adjust based on your actual API response structure
|
|
45457
|
+
// if (response && response.data) {
|
|
45458
|
+
// const responseData = response.data
|
|
45459
|
+
// const data = responseData.result || responseData.data || responseData
|
|
45460
|
+
// this.remoteItems = data.items || data.DATA || data || []
|
|
45461
|
+
// this.totalItems = data.total || data.TOTAL || this.remoteItems.length
|
|
45462
|
+
// this.hasMore = !!data.hasMore
|
|
45463
|
+
// }
|
|
45464
|
+
// } catch (error) {
|
|
45465
|
+
// console.error('Error loading initial items:', error)
|
|
45466
|
+
// } finally {
|
|
45467
|
+
// this.loading = false
|
|
45468
|
+
// }
|
|
45469
|
+
}
|
|
45470
|
+
},
|
|
45471
|
+
immediate: true
|
|
45472
|
+
}
|
|
45473
|
+
},
|
|
45474
|
+
created() {
|
|
45475
|
+
this.debouncedLoadItems = SearchableSelectvue_type_script_lang_js_debounce(this.loadItems, this.debounceMs);
|
|
45476
|
+
},
|
|
45477
|
+
mounted() {
|
|
45478
|
+
// Initialize items based on mode
|
|
45479
|
+
if (this.useLocalItems) {
|
|
45480
|
+
// For local items, displayItems computed will handle showing items
|
|
45481
|
+
const filtered = this.filterLocalItems(this.searchTerm);
|
|
45482
|
+
this.totalItems = filtered.length;
|
|
45483
|
+
} else if (this.minSearchLength === 0 && this.type) {
|
|
45484
|
+
// For remote items, load if minSearchLength is 0
|
|
45485
|
+
this.loadItems('', 1, false);
|
|
45486
|
+
}
|
|
45487
|
+
}
|
|
45488
|
+
});
|
|
45489
|
+
// CONCATENATED MODULE: ./src/components/SearchableSelect.vue?vue&type=script&lang=js
|
|
45490
|
+
/* harmony default export */ var components_SearchableSelectvue_type_script_lang_js = (SearchableSelectvue_type_script_lang_js);
|
|
45491
|
+
// EXTERNAL MODULE: ./src/components/SearchableSelect.vue?vue&type=style&index=0&id=688f213e&prod&scoped=true&lang=css
|
|
45492
|
+
var SearchableSelectvue_type_style_index_0_id_688f213e_prod_scoped_true_lang_css = __webpack_require__("8958");
|
|
45493
|
+
|
|
45494
|
+
// CONCATENATED MODULE: ./src/components/SearchableSelect.vue
|
|
45495
|
+
|
|
45496
|
+
|
|
45497
|
+
|
|
45498
|
+
|
|
45499
|
+
|
|
45500
|
+
|
|
45501
|
+
/* normalize component */
|
|
45502
|
+
|
|
45503
|
+
var SearchableSelect_component = normalizeComponent(
|
|
45504
|
+
components_SearchableSelectvue_type_script_lang_js,
|
|
45505
|
+
SearchableSelectvue_type_template_id_688f213e_scoped_true_render,
|
|
45506
|
+
SearchableSelectvue_type_template_id_688f213e_scoped_true_staticRenderFns,
|
|
45507
|
+
false,
|
|
45508
|
+
null,
|
|
45509
|
+
"688f213e",
|
|
45510
|
+
null
|
|
45511
|
+
|
|
45512
|
+
)
|
|
45513
|
+
|
|
45514
|
+
/* harmony default export */ var SearchableSelect = (SearchableSelect_component.exports);
|
|
45515
|
+
// 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
|
|
45516
|
+
|
|
45517
|
+
|
|
45518
|
+
|
|
45519
|
+
|
|
45520
|
+
|
|
45521
|
+
|
|
45522
|
+
/* harmony default export */ var SearchableSelectFieldvue_type_script_lang_js = ({
|
|
45523
|
+
components: {
|
|
45524
|
+
Field: ValidationProvider,
|
|
45525
|
+
SearchableSelect: SearchableSelect
|
|
45526
|
+
},
|
|
45527
|
+
props: {
|
|
45528
|
+
lang: {
|
|
45529
|
+
type: String,
|
|
45530
|
+
default: 'en'
|
|
45531
|
+
},
|
|
45532
|
+
fieldInfo: {
|
|
45533
|
+
type: Object,
|
|
45534
|
+
required: true
|
|
45535
|
+
}
|
|
45536
|
+
},
|
|
45537
|
+
watch: {
|
|
45538
|
+
fieldInfo: {
|
|
45539
|
+
handler: function () {
|
|
45540
|
+
this.GetSelectOptions();
|
|
45541
|
+
},
|
|
45542
|
+
deep: true
|
|
45543
|
+
}
|
|
45544
|
+
},
|
|
45545
|
+
data() {
|
|
45546
|
+
return {
|
|
45547
|
+
optionList: [],
|
|
45548
|
+
dependentOptions: []
|
|
45549
|
+
};
|
|
45550
|
+
},
|
|
45551
|
+
created: async function () {
|
|
45552
|
+
await this.GetSelectOptions();
|
|
45553
|
+
},
|
|
45554
|
+
mounted: function () {
|
|
45555
|
+
this.fieldInfo.validationRules = getValidationRules(this.fieldInfo.validationRules, this.lang);
|
|
45556
|
+
},
|
|
45557
|
+
methods: {
|
|
45558
|
+
GetDisplayLabel(field) {
|
|
45559
|
+
var labelName = '';
|
|
45560
|
+
if (field.hasOwnProperty('label') && field.label) {
|
|
45561
|
+
labelName = field.label;
|
|
45562
|
+
} else if (field.hasOwnProperty('display_name') && field.display_name) {
|
|
45563
|
+
labelName = field.display_name;
|
|
45564
|
+
}
|
|
45565
|
+
return labelName;
|
|
45566
|
+
},
|
|
45567
|
+
onChange(e) {
|
|
45568
|
+
if (this.fieldInfo && this.fieldInfo.config && this.fieldInfo.config.onChange) {
|
|
45569
|
+
this.fieldInfo.config.onChange(e, this.fieldInfo);
|
|
45570
|
+
}
|
|
45571
|
+
this.$emit('UpdateKeyValue', 1);
|
|
45572
|
+
},
|
|
45573
|
+
showAddIcon: function () {
|
|
45574
|
+
if (this.fieldInfo.config && this.fieldInfo.config.showAddIcon) {
|
|
45575
|
+
return this.fieldInfo.config.showAddIcon;
|
|
45576
|
+
}
|
|
45577
|
+
},
|
|
45578
|
+
onAddButtonClick: function (e) {
|
|
45579
|
+
if (this.fieldInfo && this.fieldInfo.config && this.fieldInfo.config.onAddButtonClick) {
|
|
45580
|
+
this.fieldInfo.config.onAddButtonClick(e, this.fieldInfo);
|
|
45581
|
+
}
|
|
45582
|
+
},
|
|
45583
|
+
addButtonClass: function () {
|
|
45584
|
+
if (this.fieldInfo.config && this.fieldInfo.config.addIconBackground) {
|
|
45585
|
+
return "round-icon-small theme-primary " + this.fieldInfo.config.addIconBackground;
|
|
45586
|
+
} else {
|
|
45587
|
+
return "round-icon-small btn-dark theme-primary";
|
|
45588
|
+
}
|
|
45589
|
+
},
|
|
45590
|
+
addIconClass: function () {
|
|
45591
|
+
if (this.fieldInfo.config && this.fieldInfo.config.addIcon) {
|
|
45592
|
+
return "fa text-white pt-7 font-18 " + this.fieldInfo.config.addIcon;
|
|
45593
|
+
} else {
|
|
45594
|
+
return "fa fa-plus text-white pt-7 font-18";
|
|
45595
|
+
}
|
|
45596
|
+
},
|
|
45597
|
+
GetSelectOptions: async function () {
|
|
45598
|
+
var vm = this;
|
|
45599
|
+
if (vm.fieldInfo.hasOwnProperty('config') && vm.fieldInfo.config.hasOwnProperty('OptionsForBind') == false) {
|
|
45600
|
+
vm.fieldInfo.config.OptionsForBind = [];
|
|
45601
|
+
}
|
|
45602
|
+
if (vm.fieldInfo.hasOwnProperty('picklist_options') && vm.fieldInfo.picklist_options != 'Lookup') {
|
|
45603
|
+
vm.fieldInfo.config.OptionsForBind = vm.MakeArray(vm.fieldInfo.picklist_options);
|
|
45604
|
+
} else if (vm.fieldInfo.hasOwnProperty('select_options') && vm.fieldInfo.select_options.length > 0) {
|
|
45605
|
+
vm.fieldInfo.config.OptionsForBind = vm.MakeNormalArray(vm.fieldInfo.select_options);
|
|
45606
|
+
} else if (vm.fieldInfo.hasOwnProperty('config') && vm.fieldInfo.config.hasOwnProperty('OptionsForBind') && vm.fieldInfo.config.OptionsForBind.length > 0) {
|
|
45607
|
+
vm.fieldInfo.config.OptionsForBind = vm.fieldInfo.config.OptionsForBind;
|
|
45608
|
+
} else if (vm.fieldInfo.hasOwnProperty('config') && vm.fieldInfo.config.hasOwnProperty('option_request_url') && vm.fieldInfo.config.option_request_url.length > 0) {
|
|
45609
|
+
await axios_default.a.get(vm.fieldInfo.config.option_request_url, {
|
|
45610
|
+
headers: {
|
|
45611
|
+
"Authorization": `Bearer ${vm.fieldInfo.config.token}`
|
|
45612
|
+
}
|
|
45613
|
+
}).then(res => {
|
|
45614
|
+
console.log(res.data);
|
|
45615
|
+
if (res.data && res.data.hasOwnProperty('DATA')) {
|
|
45616
|
+
vm.fieldInfo.config.OptionsForBind = res.data.DATA;
|
|
45617
|
+
} else {
|
|
45618
|
+
vm.fieldInfo.config.OptionsForBind = res.data;
|
|
45619
|
+
}
|
|
45620
|
+
}).catch(error => {
|
|
45621
|
+
console.log('Error on binding slect option in tg-control- ' + error);
|
|
45622
|
+
});
|
|
45623
|
+
}
|
|
45624
|
+
this.$forceUpdate();
|
|
45625
|
+
},
|
|
45626
|
+
MakeNormalArray: function (value) {
|
|
45627
|
+
if (value) {
|
|
45628
|
+
try {
|
|
45629
|
+
return JSON.parse(value);
|
|
45630
|
+
} catch (ex) {
|
|
45631
|
+
return value;
|
|
45632
|
+
}
|
|
45633
|
+
} else {
|
|
45634
|
+
value = [];
|
|
45635
|
+
}
|
|
45636
|
+
},
|
|
45637
|
+
MakeArray: function (value, type) {
|
|
45638
|
+
var array = [];
|
|
45639
|
+
var arr = String(value).split(',');
|
|
45640
|
+
if (type == "radio" || type == "checkbox") {
|
|
45641
|
+
if (arr.length > 0) {
|
|
45642
|
+
for (let item of arr) {
|
|
45643
|
+
if (item.split("|").length > 1) {
|
|
45644
|
+
var person = {
|
|
45645
|
+
name: item.split("|")[0].trim(),
|
|
45646
|
+
value: item.split("|")[1].trim()
|
|
45647
|
+
};
|
|
45648
|
+
array.push(person);
|
|
45649
|
+
} else {
|
|
45650
|
+
var person = {
|
|
45651
|
+
name: item.trim(),
|
|
45652
|
+
value: item.trim()
|
|
45653
|
+
};
|
|
45654
|
+
array.push(person);
|
|
45655
|
+
}
|
|
45656
|
+
}
|
|
45657
|
+
}
|
|
45658
|
+
} else {
|
|
45659
|
+
if (arr.length > 0) {
|
|
45660
|
+
for (let item of arr) {
|
|
45661
|
+
var person = {
|
|
45662
|
+
name: item.trim(),
|
|
45663
|
+
value: item.trim()
|
|
45664
|
+
};
|
|
45665
|
+
array.push(person);
|
|
45666
|
+
}
|
|
45667
|
+
}
|
|
45668
|
+
}
|
|
45669
|
+
return array;
|
|
45670
|
+
},
|
|
45671
|
+
computedActionButtons(field) {
|
|
45672
|
+
if (field && field.hasOwnProperty("config") && field.config.hasOwnProperty("actionButtons")) {
|
|
45673
|
+
return field.config.actionButtons;
|
|
45674
|
+
} else {
|
|
45675
|
+
return {
|
|
45676
|
+
selectAll: false,
|
|
45677
|
+
active: false,
|
|
45678
|
+
inactive: false,
|
|
45679
|
+
clear: false
|
|
45680
|
+
};
|
|
45681
|
+
}
|
|
45682
|
+
},
|
|
45683
|
+
computedItemFields(field) {
|
|
45684
|
+
if (field && field.hasOwnProperty("config") && field.config.hasOwnProperty("itemFields")) {
|
|
45685
|
+
return field.config.itemFields;
|
|
45686
|
+
} else {
|
|
45687
|
+
return ['text'];
|
|
45688
|
+
}
|
|
45689
|
+
},
|
|
45690
|
+
computedGroupFields(field) {
|
|
45691
|
+
if (field && field.hasOwnProperty("config") && field.config.hasOwnProperty("groupFields")) {
|
|
45692
|
+
return field.config.groupFields;
|
|
45693
|
+
} else {
|
|
45694
|
+
return ['group'];
|
|
45695
|
+
}
|
|
45696
|
+
},
|
|
45697
|
+
computedMaxRenderItems(field) {
|
|
45698
|
+
if (field && field.hasOwnProperty("config") && field.config.hasOwnProperty("maxRenderItems")) {
|
|
45699
|
+
return field.config.maxRenderItems;
|
|
45700
|
+
} else {
|
|
45701
|
+
return 50;
|
|
45702
|
+
}
|
|
45703
|
+
},
|
|
45704
|
+
onSearchableChange: function (x, field, e) {
|
|
45705
|
+
if (field && field.hasOwnProperty("config") && field.config.hasOwnProperty("onChange")) {
|
|
45706
|
+
field.config.onChange(field, x);
|
|
45707
|
+
}
|
|
45708
|
+
},
|
|
45709
|
+
RenderOptions() {
|
|
45710
|
+
var options = [];
|
|
45711
|
+
var vm = this;
|
|
45712
|
+
if (this.optionList.length > 0) {
|
|
45713
|
+
if (Array.isArray(this.optionList)) {
|
|
45714
|
+
this.optionList.forEach((item, index) => {
|
|
45715
|
+
options.push({
|
|
45716
|
+
value: item.value,
|
|
45717
|
+
name: item.hasOwnProperty('text') ? item.text : item.name
|
|
45718
|
+
});
|
|
45719
|
+
});
|
|
45720
|
+
if (!vm.fieldInfo.hasOwnProperty('select_options')) {
|
|
45721
|
+
vm.fieldInfo.select_options = [];
|
|
45722
|
+
}
|
|
45723
|
+
vm.fieldInfo.select_options = options;
|
|
45724
|
+
} else console.log(' type of the optionList is not array - ' + typeof this.optionList);
|
|
45725
|
+
} else {
|
|
45726
|
+
console.log(' No select options found for the - ' + vm.fieldInfo.name);
|
|
45727
|
+
}
|
|
45728
|
+
}
|
|
45729
|
+
}
|
|
45730
|
+
});
|
|
45731
|
+
// CONCATENATED MODULE: ./src/components/SearchableSelectField.vue?vue&type=script&lang=js
|
|
45732
|
+
/* harmony default export */ var components_SearchableSelectFieldvue_type_script_lang_js = (SearchableSelectFieldvue_type_script_lang_js);
|
|
45733
|
+
// CONCATENATED MODULE: ./src/components/SearchableSelectField.vue
|
|
45734
|
+
|
|
45735
|
+
|
|
45736
|
+
|
|
45737
|
+
|
|
45738
|
+
|
|
45739
|
+
/* normalize component */
|
|
45740
|
+
|
|
45741
|
+
var SearchableSelectField_component = normalizeComponent(
|
|
45742
|
+
components_SearchableSelectFieldvue_type_script_lang_js,
|
|
45743
|
+
SearchableSelectFieldvue_type_template_id_6f324aae_render,
|
|
45744
|
+
SearchableSelectFieldvue_type_template_id_6f324aae_staticRenderFns,
|
|
45745
|
+
false,
|
|
45746
|
+
null,
|
|
45747
|
+
null,
|
|
45748
|
+
null
|
|
45749
|
+
|
|
45750
|
+
)
|
|
45751
|
+
|
|
45752
|
+
/* harmony default export */ var SearchableSelectField = (SearchableSelectField_component.exports);
|
|
45753
|
+
// 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
|
|
45754
|
+
|
|
45755
|
+
|
|
45756
|
+
|
|
42134
45757
|
|
|
42135
45758
|
|
|
42136
45759
|
|
|
@@ -42170,9 +45793,11 @@ var SlotField_component = normalizeComponent(
|
|
|
42170
45793
|
TextAreaField: TextAreaField,
|
|
42171
45794
|
ColorField: ColorField,
|
|
42172
45795
|
FileField: FileField,
|
|
45796
|
+
NormalFileField: NormalFileField,
|
|
42173
45797
|
TreeSelectField: TreeSelectField,
|
|
42174
45798
|
SlotField: SlotField,
|
|
42175
|
-
PasswordField: PasswordField
|
|
45799
|
+
PasswordField: PasswordField,
|
|
45800
|
+
SearchableSelectField: SearchableSelectField
|
|
42176
45801
|
},
|
|
42177
45802
|
data: function () {
|
|
42178
45803
|
return {
|
|
@@ -42893,6 +46518,13 @@ function isSymbol(value) {
|
|
|
42893
46518
|
module.exports = isSymbol;
|
|
42894
46519
|
|
|
42895
46520
|
|
|
46521
|
+
/***/ }),
|
|
46522
|
+
|
|
46523
|
+
/***/ "fffa":
|
|
46524
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
46525
|
+
|
|
46526
|
+
// extracted by mini-css-extract-plugin
|
|
46527
|
+
|
|
42896
46528
|
/***/ })
|
|
42897
46529
|
|
|
42898
46530
|
/******/ });
|