@weni/unnnic-system 1.16.30-develop.0 → 1.16.31-develop.0
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/unnnic.common.js +776 -34
- package/dist/unnnic.common.js.map +1 -1
- package/dist/unnnic.css +1 -1
- package/dist/unnnic.umd.js +776 -34
- package/dist/unnnic.umd.js.map +1 -1
- package/dist/unnnic.umd.min.js +14 -14
- package/dist/unnnic.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/index.js +3 -0
package/dist/unnnic.common.js
CHANGED
|
@@ -2830,6 +2830,17 @@ module.exports = {"unnnicColorBackgroundSolo":"#E8F4F4"};
|
|
|
2830
2830
|
|
|
2831
2831
|
// extracted by mini-css-extract-plugin
|
|
2832
2832
|
|
|
2833
|
+
/***/ }),
|
|
2834
|
+
|
|
2835
|
+
/***/ "1f90":
|
|
2836
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2837
|
+
|
|
2838
|
+
"use strict";
|
|
2839
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SelectSmart_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("e59e");
|
|
2840
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SelectSmart_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SelectSmart_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__);
|
|
2841
|
+
/* unused harmony reexport * */
|
|
2842
|
+
|
|
2843
|
+
|
|
2833
2844
|
/***/ }),
|
|
2834
2845
|
|
|
2835
2846
|
/***/ "1fc1":
|
|
@@ -4312,6 +4323,14 @@ module.exports = "<svg viewBox=\"0 0 40 40\" fill=\"none\" xmlns=\"http://www.w3
|
|
|
4312
4323
|
|
|
4313
4324
|
/***/ }),
|
|
4314
4325
|
|
|
4326
|
+
/***/ "2d90":
|
|
4327
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
4328
|
+
|
|
4329
|
+
// extracted by mini-css-extract-plugin
|
|
4330
|
+
module.exports = {"unnnicColorBackgroundSolo":"#E8F4F4"};
|
|
4331
|
+
|
|
4332
|
+
/***/ }),
|
|
4333
|
+
|
|
4315
4334
|
/***/ "2e8c":
|
|
4316
4335
|
/***/ (function(module, exports, __webpack_require__) {
|
|
4317
4336
|
|
|
@@ -14055,6 +14074,13 @@ module.exports = function (argument) {
|
|
|
14055
14074
|
};
|
|
14056
14075
|
|
|
14057
14076
|
|
|
14077
|
+
/***/ }),
|
|
14078
|
+
|
|
14079
|
+
/***/ "82d6":
|
|
14080
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
14081
|
+
|
|
14082
|
+
// extracted by mini-css-extract-plugin
|
|
14083
|
+
|
|
14058
14084
|
/***/ }),
|
|
14059
14085
|
|
|
14060
14086
|
/***/ "83ab":
|
|
@@ -16693,6 +16719,17 @@ module.exports = "<svg viewBox=\"0 0 40 40\" fill=\"none\" xmlns=\"http://www.w3
|
|
|
16693
16719
|
|
|
16694
16720
|
// extracted by mini-css-extract-plugin
|
|
16695
16721
|
|
|
16722
|
+
/***/ }),
|
|
16723
|
+
|
|
16724
|
+
/***/ "9a03":
|
|
16725
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
16726
|
+
|
|
16727
|
+
"use strict";
|
|
16728
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SelectSmartMultipleHeader_vue_vue_type_style_index_0_id_81250f70_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("82d6");
|
|
16729
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SelectSmartMultipleHeader_vue_vue_type_style_index_0_id_81250f70_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SelectSmartMultipleHeader_vue_vue_type_style_index_0_id_81250f70_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__);
|
|
16730
|
+
/* unused harmony reexport * */
|
|
16731
|
+
|
|
16732
|
+
|
|
16696
16733
|
/***/ }),
|
|
16697
16734
|
|
|
16698
16735
|
/***/ "9a15":
|
|
@@ -28380,11 +28417,30 @@ module.exports = "<svg viewBox=\"0 0 40 40\" fill=\"none\" xmlns=\"http://www.w3
|
|
|
28380
28417
|
|
|
28381
28418
|
/***/ }),
|
|
28382
28419
|
|
|
28420
|
+
/***/ "e59e":
|
|
28421
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
28422
|
+
|
|
28423
|
+
// extracted by mini-css-extract-plugin
|
|
28424
|
+
module.exports = {"unnnicColorBackgroundSolo":"#E8F4F4"};
|
|
28425
|
+
|
|
28426
|
+
/***/ }),
|
|
28427
|
+
|
|
28383
28428
|
/***/ "e6a0":
|
|
28384
28429
|
/***/ (function(module, exports) {
|
|
28385
28430
|
|
|
28386
28431
|
module.exports = "<svg viewBox=\"0 0 40 40\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M19.8222 31.9333C14.8875 31.9333 9.52286 30.5671 6.47305 28.5335C4.31694 27.0948 4.52567 22.9763 7.11301 15.943C7.93671 13.6919 9.12788 11.6133 10.654 9.7634C11.549 8.68472 12.8639 8.06726 14.2626 8.06726H18.1261C20.7109 8.06726 22.8133 10.1696 22.8133 12.7545C22.8133 15.3393 20.7109 17.4417 18.1261 17.4417H15.7437C15.135 18.1941 14.7075 19.0828 14.495 20.024C15.5312 19.3528 16.5937 19.0141 17.6623 19.0141C18.8548 19.0141 20.0372 19.4378 21.1859 20.274C22.0096 17.2742 24.7956 15.0943 27.9617 15.0918C29.8453 15.0918 31.609 15.8205 32.9351 17.1454C34.265 18.4716 34.9987 20.2365 35 22.1151C35.0012 23.82 34.3863 25.4624 33.2676 26.7461C33.2526 26.7661 33.2376 26.7861 33.2214 26.8048C30.409 30.1109 25.6493 31.9333 19.8222 31.9333ZM14.2651 9.94214C13.4251 9.94214 12.6352 10.3134 12.1002 10.9596C10.709 12.642 9.6241 14.5369 8.87415 16.588C6.4143 23.2738 6.5593 26.3361 7.51424 26.9723C10.3153 28.8397 15.0688 30.0584 19.6235 30.0759H19.731C24.9994 30.0759 29.2604 28.5072 31.7315 25.6599C31.754 25.6274 31.779 25.5962 31.8065 25.5662C32.6589 24.6175 33.1289 23.3913 33.1264 22.1151C33.1251 20.7377 32.5877 19.444 31.6127 18.4704C30.639 17.4992 29.3454 16.9642 27.9704 16.9642C25.1219 16.9679 22.812 19.2828 22.8145 22.1264C22.8145 22.5113 22.5845 22.8526 22.2283 22.9976C22.1158 23.0426 21.9983 23.0663 21.8771 23.0663C21.6233 23.0663 21.3771 22.9613 21.2009 22.7776C19.9972 21.5239 18.8073 20.8889 17.6636 20.8889C16.5149 20.8889 15.3212 21.5252 14.1151 22.7788C13.9388 22.9613 13.6926 23.0663 13.4401 23.0663C13.3351 23.0663 13.2314 23.0488 13.1326 23.0138C12.7902 22.8951 12.5439 22.5838 12.5077 22.2226C12.3014 20.184 12.8864 18.1104 14.1176 16.478C13.2826 15.0856 13.4851 13.2582 14.6525 12.0908C14.83 11.9133 15.065 11.8158 15.3162 11.8158C15.5662 11.8158 15.8012 11.9133 15.9787 12.0895C16.1562 12.267 16.2537 12.502 16.2537 12.7532C16.2537 13.0032 16.1562 13.2394 15.98 13.4157C15.405 13.9906 15.3237 14.8981 15.7587 15.5655H18.1286C19.6797 15.5655 20.9409 14.3044 20.9409 12.7532C20.9409 11.2021 19.6797 9.94089 18.1286 9.94089H14.2651V9.94214Z\" fill=\"#3B414D\" class=\"primary\"></path></svg>"
|
|
28387
28432
|
|
|
28433
|
+
/***/ }),
|
|
28434
|
+
|
|
28435
|
+
/***/ "e757":
|
|
28436
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
28437
|
+
|
|
28438
|
+
"use strict";
|
|
28439
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SelectSmartOption_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("2d90");
|
|
28440
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SelectSmartOption_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SelectSmartOption_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__);
|
|
28441
|
+
/* unused harmony reexport * */
|
|
28442
|
+
|
|
28443
|
+
|
|
28388
28444
|
/***/ }),
|
|
28389
28445
|
|
|
28390
28446
|
/***/ "e773":
|
|
@@ -29762,6 +29818,7 @@ __webpack_require__.d(__webpack_exports__, "unnniclanguageSelect", function() {
|
|
|
29762
29818
|
__webpack_require__.d(__webpack_exports__, "unnnicModal", function() { return /* reexport */ unnnicModal; });
|
|
29763
29819
|
__webpack_require__.d(__webpack_exports__, "unnnicModalNext", function() { return /* reexport */ unnnicModalNext; });
|
|
29764
29820
|
__webpack_require__.d(__webpack_exports__, "unnnicModalUpload", function() { return /* reexport */ unnnicModalUpload; });
|
|
29821
|
+
__webpack_require__.d(__webpack_exports__, "unnnicSelectSmart", function() { return /* reexport */ unnnicSelectSmart; });
|
|
29765
29822
|
__webpack_require__.d(__webpack_exports__, "unnnicSelect", function() { return /* reexport */ unnnicSelect; });
|
|
29766
29823
|
__webpack_require__.d(__webpack_exports__, "unnnicSelectItem", function() { return /* reexport */ unnnicSelectItem; });
|
|
29767
29824
|
__webpack_require__.d(__webpack_exports__, "unnnicSelectListItem", function() { return /* reexport */ unnnicSelectListItem; });
|
|
@@ -37679,31 +37736,55 @@ var Alert_component = normalizeComponent(
|
|
|
37679
37736
|
document.body.appendChild(instance.$el);
|
|
37680
37737
|
}
|
|
37681
37738
|
});
|
|
37682
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3be1353e-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/
|
|
37683
|
-
var
|
|
37684
|
-
'unnnic-
|
|
37685
|
-
|
|
37686
|
-
|
|
37687
|
-
},style:({ width: props.width })},[_c('div',{style:({ overflow: 'auto' })},[(_vm.
|
|
37688
|
-
|
|
37689
|
-
|
|
37690
|
-
|
|
37691
|
-
|
|
37692
|
-
|
|
37693
|
-
|
|
37694
|
-
|
|
37695
|
-
|
|
37696
|
-
|
|
37739
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3be1353e-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/SelectSmart/SelectSmart.vue?vue&type=template&id=672daeb4&
|
|
37740
|
+
var SelectSmartvue_type_template_id_672daeb4_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{directives:[{name:"click-outside",rawName:"v-click-outside",value:(_vm.onClickOutside),expression:"onClickOutside"}],staticClass:"unnnic-select-smart",on:{"keydown":_vm.onKeyDownSelect}},[_c('dropdown-skeleton',{ref:"dropdown-skeleton",attrs:{"type":"manual","value":_vm.active,"position":"bottom"},scopedSlots:_vm._u([{key:"inside",fn:function(props){return [(_vm.active)?_c('div',{class:{
|
|
37741
|
+
'unnnic-select-smart__options': true,
|
|
37742
|
+
active: _vm.active,
|
|
37743
|
+
inactive: !_vm.active,
|
|
37744
|
+
},style:({ width: props.width })},[_c('div',{style:({ overflow: 'auto' })},[(_vm.multiple)?_c('select-smart-multiple-header',{attrs:{"selectedOptions":_vm.selectedOptions,"withoutSelectsMessage":_vm.multipleWithoutSelectsMessage},on:{"clear-selected-options":_vm.clearSelectedOptions,"unselect-option":_vm.unselectOption}}):_vm._e(),_c('div',{ref:"selectSmartOptionsScrollArea",class:[
|
|
37745
|
+
'unnnic-select-smart__options__scroll-area',
|
|
37746
|
+
("size-" + _vm.size),
|
|
37747
|
+
{
|
|
37748
|
+
'with-descriptions': _vm.hasDescriptionOptions,
|
|
37749
|
+
} ]},[_vm._l((_vm.filterOptions(_vm.options)),function(option,index){return _c('select-smart-option',{key:option.value,attrs:{"label":option.label,"description":option.description,"tabindex":index,"size":_vm.size,"active":option.value === _vm.value || _vm.optionIsSelected(option),"focused":_vm.focusedOption && _vm.focusedOption.value === option.value,"allowCheckbox":!!_vm.multiple},on:{"click":function($event){return _vm.handleSelect(option)}}})}),(_vm.filterOptions(_vm.options).length === 0)?_c('p',{staticClass:"unnnic-select-smart__options--no-results"},[_vm._v(" "+_vm._s(_vm.$t('select_smart.without_results'))+" ")]):_vm._e()],2)],1)]):_vm._e()]}}])},[_c('text-input',{ref:"selectSmartInput",staticClass:"unnnic-select-smart__input",attrs:{"value":_vm.inputValue,"placeholder":_vm.autocompletePlaceholder || _vm.selectedLabel,"type":_vm.type,"size":_vm.size,"disabled":_vm.disabled,"readonly":!_vm.isAutocompleteAllowed,"icon-left":_vm.isAutocompleteAllowed && _vm.autocompleteIconLeft ? 'search-1' : '',"icon-right":_vm.active ? 'arrow-button-up-1' : 'arrow-button-down-1',"icon-right-clickable":!_vm.disabled},on:{"icon-right-click":_vm.handleClickInput,"click":_vm.handleClickInput,"input":function($event){_vm.searchValue = $event}}})],1)],1)}
|
|
37750
|
+
var SelectSmartvue_type_template_id_672daeb4_staticRenderFns = []
|
|
37751
|
+
|
|
37752
|
+
|
|
37753
|
+
// CONCATENATED MODULE: ./src/components/SelectSmart/SelectSmart.vue?vue&type=template&id=672daeb4&
|
|
37754
|
+
|
|
37755
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3be1353e-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/SelectSmart/SelectSmartOption.vue?vue&type=template&id=7963bbce&
|
|
37756
|
+
var SelectSmartOptionvue_type_template_id_7963bbce_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{class:{
|
|
37757
|
+
'unnnic-select-smart-option': true,
|
|
37758
|
+
'unnnic-select-smart-option--focused': _vm.focused,
|
|
37759
|
+
'unnnic-select-smart-option--active': _vm.active,
|
|
37697
37760
|
'unnnic--clickable': _vm.selectable,
|
|
37698
|
-
'unnnic-select-
|
|
37699
|
-
'
|
|
37700
|
-
},on:{"click":function($event){return _vm.$emit('click')}}},[_c('span',{class:['unnnic-select-
|
|
37701
|
-
|
|
37761
|
+
'unnnic-select-smart-option--selectable': _vm.selectable,
|
|
37762
|
+
'unnnic-select-smart-option--with-checkbox': _vm.allowCheckbox,
|
|
37763
|
+
},attrs:{"title":_vm.label},on:{"click":function($event){return _vm.$emit('click')}}},[(_vm.allowCheckbox)?_c('unnnic-checkbox',{ref:"checkbox",attrs:{"value":_vm.active,"size":_vm.size}}):_vm._e(),_c('div',[_c('span',{class:['unnnic-select-smart-option__label', ("unnnic-select-smart-option__label--" + _vm.size)]},[_vm._v(_vm._s(_vm.label))]),(_vm.description)?_c('p',{class:[
|
|
37764
|
+
'unnnic-select-smart-option__description',
|
|
37765
|
+
("unnnic-select-smart-option__description--" + _vm.size) ]},[_vm._v(" "+_vm._s(_vm.description)+" ")]):_vm._e()])],1)}
|
|
37766
|
+
var SelectSmartOptionvue_type_template_id_7963bbce_staticRenderFns = []
|
|
37702
37767
|
|
|
37703
37768
|
|
|
37704
|
-
// CONCATENATED MODULE: ./src/components/
|
|
37769
|
+
// CONCATENATED MODULE: ./src/components/SelectSmart/SelectSmartOption.vue?vue&type=template&id=7963bbce&
|
|
37705
37770
|
|
|
37706
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/
|
|
37771
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/SelectSmart/SelectSmartOption.vue?vue&type=script&lang=js&
|
|
37772
|
+
//
|
|
37773
|
+
//
|
|
37774
|
+
//
|
|
37775
|
+
//
|
|
37776
|
+
//
|
|
37777
|
+
//
|
|
37778
|
+
//
|
|
37779
|
+
//
|
|
37780
|
+
//
|
|
37781
|
+
//
|
|
37782
|
+
//
|
|
37783
|
+
//
|
|
37784
|
+
//
|
|
37785
|
+
//
|
|
37786
|
+
//
|
|
37787
|
+
//
|
|
37707
37788
|
//
|
|
37708
37789
|
//
|
|
37709
37790
|
//
|
|
@@ -37721,9 +37802,23 @@ var SelectItemvue_type_template_id_d2fb7cfc_staticRenderFns = []
|
|
|
37721
37802
|
//
|
|
37722
37803
|
//
|
|
37723
37804
|
|
|
37724
|
-
|
|
37725
|
-
|
|
37805
|
+
|
|
37806
|
+
/* harmony default export */ var SelectSmartOptionvue_type_script_lang_js_ = ({
|
|
37807
|
+
name: 'UnnnicSelectSmartOption',
|
|
37808
|
+
components: {
|
|
37809
|
+
UnnnicCheckbox: Checkbox
|
|
37810
|
+
},
|
|
37726
37811
|
props: {
|
|
37812
|
+
label: {
|
|
37813
|
+
type: String,
|
|
37814
|
+
default: 'Option',
|
|
37815
|
+
required: true
|
|
37816
|
+
},
|
|
37817
|
+
description: {
|
|
37818
|
+
type: String,
|
|
37819
|
+
default: '',
|
|
37820
|
+
required: false
|
|
37821
|
+
},
|
|
37727
37822
|
size: {
|
|
37728
37823
|
type: String,
|
|
37729
37824
|
default: ''
|
|
@@ -37732,22 +37827,26 @@ var SelectItemvue_type_template_id_d2fb7cfc_staticRenderFns = []
|
|
|
37732
37827
|
type: Boolean,
|
|
37733
37828
|
default: true
|
|
37734
37829
|
},
|
|
37830
|
+
focused: {
|
|
37831
|
+
type: Boolean,
|
|
37832
|
+
default: false
|
|
37833
|
+
},
|
|
37735
37834
|
active: {
|
|
37736
37835
|
type: Boolean,
|
|
37737
37836
|
default: false
|
|
37738
37837
|
},
|
|
37739
|
-
|
|
37838
|
+
allowCheckbox: {
|
|
37740
37839
|
type: Boolean,
|
|
37741
37840
|
default: false
|
|
37742
37841
|
}
|
|
37743
37842
|
}
|
|
37744
37843
|
});
|
|
37745
|
-
// CONCATENATED MODULE: ./src/components/
|
|
37746
|
-
/* harmony default export */ var
|
|
37747
|
-
// EXTERNAL MODULE: ./src/components/
|
|
37748
|
-
var
|
|
37844
|
+
// CONCATENATED MODULE: ./src/components/SelectSmart/SelectSmartOption.vue?vue&type=script&lang=js&
|
|
37845
|
+
/* harmony default export */ var SelectSmart_SelectSmartOptionvue_type_script_lang_js_ = (SelectSmartOptionvue_type_script_lang_js_);
|
|
37846
|
+
// EXTERNAL MODULE: ./src/components/SelectSmart/SelectSmartOption.vue?vue&type=style&index=0&lang=scss&
|
|
37847
|
+
var SelectSmartOptionvue_type_style_index_0_lang_scss_ = __webpack_require__("e757");
|
|
37749
37848
|
|
|
37750
|
-
// CONCATENATED MODULE: ./src/components/
|
|
37849
|
+
// CONCATENATED MODULE: ./src/components/SelectSmart/SelectSmartOption.vue
|
|
37751
37850
|
|
|
37752
37851
|
|
|
37753
37852
|
|
|
@@ -37756,10 +37855,10 @@ var SelectItemvue_type_style_index_0_lang_scss_ = __webpack_require__("4cd7");
|
|
|
37756
37855
|
|
|
37757
37856
|
/* normalize component */
|
|
37758
37857
|
|
|
37759
|
-
var
|
|
37760
|
-
|
|
37761
|
-
|
|
37762
|
-
|
|
37858
|
+
var SelectSmartOption_component = normalizeComponent(
|
|
37859
|
+
SelectSmart_SelectSmartOptionvue_type_script_lang_js_,
|
|
37860
|
+
SelectSmartOptionvue_type_template_id_7963bbce_render,
|
|
37861
|
+
SelectSmartOptionvue_type_template_id_7963bbce_staticRenderFns,
|
|
37763
37862
|
false,
|
|
37764
37863
|
null,
|
|
37765
37864
|
null,
|
|
@@ -37767,7 +37866,123 @@ var SelectItem_component = normalizeComponent(
|
|
|
37767
37866
|
|
|
37768
37867
|
)
|
|
37769
37868
|
|
|
37770
|
-
/* harmony default export */ var
|
|
37869
|
+
/* harmony default export */ var SelectSmartOption = (SelectSmartOption_component.exports);
|
|
37870
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3be1353e-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/SelectSmart/SelectSmartMultipleHeader.vue?vue&type=template&id=81250f70&scoped=true&
|
|
37871
|
+
var SelectSmartMultipleHeadervue_type_template_id_81250f70_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"unnnic-select-smart__options__multiple"},[(_vm.selectedOptions[0])?_c('div',{staticClass:"unnnic-select-smart__options__multiple__selecteds__container"},[_c('div',{staticClass:"unnnic-select-smart__options__multiple__selecteds"},[_vm._l((_vm.firstMultipleSelecteds),function(option){return _c('tag',{key:option.value,staticClass:"unnnic-select-smart__options__multiple__selecteds__option",attrs:{"text":option.label,"hasCloseIcon":""},on:{"close":function($event){return _vm.unselectOption(option)}}})}),(_vm.selectedOptions.length > _vm.multipleSelectedsTags)?_c('p',{staticClass:"unnnic-select-smart__options__multiple__selecteds__remaining"},[_vm._v(" +"+_vm._s(_vm.selectedOptions.length - _vm.multipleSelectedsTags)+" ")]):_vm._e()],2),_c('icon-svg',{staticClass:"unnnic-select-smart__options__multiple__selecteds__clear",attrs:{"icon":"close-1","size":"xs","clickable":""},on:{"click":_vm.clearSelectedOptions}})],1):_vm._e(),(!_vm.selectedOptions[0])?_c('p',{staticClass:"unnnic-select-smart__options__multiple--without-multiples"},[_vm._v(" "+_vm._s(_vm.withoutSelectsMessage || _vm.$t('select_smart.without_multiple_selected'))+" ")]):_vm._e()])}
|
|
37872
|
+
var SelectSmartMultipleHeadervue_type_template_id_81250f70_scoped_true_staticRenderFns = []
|
|
37873
|
+
|
|
37874
|
+
|
|
37875
|
+
// CONCATENATED MODULE: ./src/components/SelectSmart/SelectSmartMultipleHeader.vue?vue&type=template&id=81250f70&scoped=true&
|
|
37876
|
+
|
|
37877
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/SelectSmart/SelectSmartMultipleHeader.vue?vue&type=script&lang=js&
|
|
37878
|
+
//
|
|
37879
|
+
//
|
|
37880
|
+
//
|
|
37881
|
+
//
|
|
37882
|
+
//
|
|
37883
|
+
//
|
|
37884
|
+
//
|
|
37885
|
+
//
|
|
37886
|
+
//
|
|
37887
|
+
//
|
|
37888
|
+
//
|
|
37889
|
+
//
|
|
37890
|
+
//
|
|
37891
|
+
//
|
|
37892
|
+
//
|
|
37893
|
+
//
|
|
37894
|
+
//
|
|
37895
|
+
//
|
|
37896
|
+
//
|
|
37897
|
+
//
|
|
37898
|
+
//
|
|
37899
|
+
//
|
|
37900
|
+
//
|
|
37901
|
+
//
|
|
37902
|
+
//
|
|
37903
|
+
//
|
|
37904
|
+
//
|
|
37905
|
+
//
|
|
37906
|
+
//
|
|
37907
|
+
//
|
|
37908
|
+
//
|
|
37909
|
+
//
|
|
37910
|
+
//
|
|
37911
|
+
//
|
|
37912
|
+
//
|
|
37913
|
+
//
|
|
37914
|
+
|
|
37915
|
+
|
|
37916
|
+
|
|
37917
|
+
/* harmony default export */ var SelectSmartMultipleHeadervue_type_script_lang_js_ = ({
|
|
37918
|
+
name: 'UnnnicSelectSmartMultipleHeader',
|
|
37919
|
+
components: {
|
|
37920
|
+
Tag: Tag,
|
|
37921
|
+
IconSvg: Icon
|
|
37922
|
+
},
|
|
37923
|
+
props: {
|
|
37924
|
+
selectedOptions: {
|
|
37925
|
+
type: Array,
|
|
37926
|
+
required: true
|
|
37927
|
+
},
|
|
37928
|
+
withoutSelectsMessage: {
|
|
37929
|
+
type: String,
|
|
37930
|
+
default: ''
|
|
37931
|
+
}
|
|
37932
|
+
},
|
|
37933
|
+
data() {
|
|
37934
|
+
return {
|
|
37935
|
+
multipleSelectedsTags: 2
|
|
37936
|
+
};
|
|
37937
|
+
},
|
|
37938
|
+
computed: {
|
|
37939
|
+
firstMultipleSelecteds() {
|
|
37940
|
+
const {
|
|
37941
|
+
selectedOptions,
|
|
37942
|
+
multipleSelectedsTags
|
|
37943
|
+
} = this;
|
|
37944
|
+
const selectedArray = [];
|
|
37945
|
+
for (let i = 0; i < multipleSelectedsTags; i += 1) {
|
|
37946
|
+
selectedArray.push(selectedOptions === null || selectedOptions === void 0 ? void 0 : selectedOptions[i]);
|
|
37947
|
+
}
|
|
37948
|
+
return selectedArray.filter(option => option !== undefined);
|
|
37949
|
+
}
|
|
37950
|
+
},
|
|
37951
|
+
methods: {
|
|
37952
|
+
clearSelectedOptions() {
|
|
37953
|
+
this.$emit('clear-selected-options');
|
|
37954
|
+
},
|
|
37955
|
+
unselectOption(option) {
|
|
37956
|
+
this.$emit('unselect-option', option);
|
|
37957
|
+
}
|
|
37958
|
+
}
|
|
37959
|
+
});
|
|
37960
|
+
// CONCATENATED MODULE: ./src/components/SelectSmart/SelectSmartMultipleHeader.vue?vue&type=script&lang=js&
|
|
37961
|
+
/* harmony default export */ var SelectSmart_SelectSmartMultipleHeadervue_type_script_lang_js_ = (SelectSmartMultipleHeadervue_type_script_lang_js_);
|
|
37962
|
+
// EXTERNAL MODULE: ./src/components/SelectSmart/SelectSmartMultipleHeader.vue?vue&type=style&index=0&id=81250f70&lang=scss&scoped=true&
|
|
37963
|
+
var SelectSmartMultipleHeadervue_type_style_index_0_id_81250f70_lang_scss_scoped_true_ = __webpack_require__("9a03");
|
|
37964
|
+
|
|
37965
|
+
// CONCATENATED MODULE: ./src/components/SelectSmart/SelectSmartMultipleHeader.vue
|
|
37966
|
+
|
|
37967
|
+
|
|
37968
|
+
|
|
37969
|
+
|
|
37970
|
+
|
|
37971
|
+
|
|
37972
|
+
/* normalize component */
|
|
37973
|
+
|
|
37974
|
+
var SelectSmartMultipleHeader_component = normalizeComponent(
|
|
37975
|
+
SelectSmart_SelectSmartMultipleHeadervue_type_script_lang_js_,
|
|
37976
|
+
SelectSmartMultipleHeadervue_type_template_id_81250f70_scoped_true_render,
|
|
37977
|
+
SelectSmartMultipleHeadervue_type_template_id_81250f70_scoped_true_staticRenderFns,
|
|
37978
|
+
false,
|
|
37979
|
+
null,
|
|
37980
|
+
"81250f70",
|
|
37981
|
+
null
|
|
37982
|
+
|
|
37983
|
+
)
|
|
37984
|
+
|
|
37985
|
+
/* harmony default export */ var SelectSmartMultipleHeader = (SelectSmartMultipleHeader_component.exports);
|
|
37771
37986
|
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3be1353e-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Dropdown/DropdownSkeleton.vue?vue&type=template&id=6fe2671f&scoped=true&
|
|
37772
37987
|
var DropdownSkeletonvue_type_template_id_6fe2671f_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',{ref:"dropdown",class:['dropdown', { active: _vm.active }]},[_vm._t("default"),_c('div',{ref:"dropdown-data",staticClass:"dropdown-data",style:(Object.assign({}, {position: 'fixed'}, _vm.positions))},[_vm._t("inside",null,{"width":(_vm.width + "px"),"height":(_vm.height + "px")})],2)],2)}
|
|
37773
37988
|
var DropdownSkeletonvue_type_template_id_6fe2671f_scoped_true_staticRenderFns = []
|
|
@@ -37920,6 +38135,530 @@ var DropdownSkeleton_component = normalizeComponent(
|
|
|
37920
38135
|
)
|
|
37921
38136
|
|
|
37922
38137
|
/* harmony default export */ var DropdownSkeleton = (DropdownSkeleton_component.exports);
|
|
38138
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/SelectSmart/SelectSmart.vue?vue&type=script&lang=js&
|
|
38139
|
+
|
|
38140
|
+
|
|
38141
|
+
//
|
|
38142
|
+
//
|
|
38143
|
+
//
|
|
38144
|
+
//
|
|
38145
|
+
//
|
|
38146
|
+
//
|
|
38147
|
+
//
|
|
38148
|
+
//
|
|
38149
|
+
//
|
|
38150
|
+
//
|
|
38151
|
+
//
|
|
38152
|
+
//
|
|
38153
|
+
//
|
|
38154
|
+
//
|
|
38155
|
+
//
|
|
38156
|
+
//
|
|
38157
|
+
//
|
|
38158
|
+
//
|
|
38159
|
+
//
|
|
38160
|
+
//
|
|
38161
|
+
//
|
|
38162
|
+
//
|
|
38163
|
+
//
|
|
38164
|
+
//
|
|
38165
|
+
//
|
|
38166
|
+
//
|
|
38167
|
+
//
|
|
38168
|
+
//
|
|
38169
|
+
//
|
|
38170
|
+
//
|
|
38171
|
+
//
|
|
38172
|
+
//
|
|
38173
|
+
//
|
|
38174
|
+
//
|
|
38175
|
+
//
|
|
38176
|
+
//
|
|
38177
|
+
//
|
|
38178
|
+
//
|
|
38179
|
+
//
|
|
38180
|
+
//
|
|
38181
|
+
//
|
|
38182
|
+
//
|
|
38183
|
+
//
|
|
38184
|
+
//
|
|
38185
|
+
//
|
|
38186
|
+
//
|
|
38187
|
+
//
|
|
38188
|
+
//
|
|
38189
|
+
//
|
|
38190
|
+
//
|
|
38191
|
+
//
|
|
38192
|
+
//
|
|
38193
|
+
//
|
|
38194
|
+
//
|
|
38195
|
+
//
|
|
38196
|
+
//
|
|
38197
|
+
//
|
|
38198
|
+
//
|
|
38199
|
+
//
|
|
38200
|
+
//
|
|
38201
|
+
//
|
|
38202
|
+
//
|
|
38203
|
+
//
|
|
38204
|
+
//
|
|
38205
|
+
//
|
|
38206
|
+
//
|
|
38207
|
+
//
|
|
38208
|
+
//
|
|
38209
|
+
//
|
|
38210
|
+
//
|
|
38211
|
+
//
|
|
38212
|
+
//
|
|
38213
|
+
//
|
|
38214
|
+
//
|
|
38215
|
+
|
|
38216
|
+
|
|
38217
|
+
|
|
38218
|
+
|
|
38219
|
+
|
|
38220
|
+
|
|
38221
|
+
/* harmony default export */ var SelectSmartvue_type_script_lang_js_ = ({
|
|
38222
|
+
name: 'UnnnicSelectSmart',
|
|
38223
|
+
components: {
|
|
38224
|
+
TextInput: TextInput,
|
|
38225
|
+
SelectSmartOption: SelectSmartOption,
|
|
38226
|
+
SelectSmartMultipleHeader: SelectSmartMultipleHeader,
|
|
38227
|
+
DropdownSkeleton: DropdownSkeleton
|
|
38228
|
+
},
|
|
38229
|
+
props: {
|
|
38230
|
+
options: {
|
|
38231
|
+
type: Array,
|
|
38232
|
+
required: true,
|
|
38233
|
+
default: () => [{
|
|
38234
|
+
value: '',
|
|
38235
|
+
label: 'Initial value'
|
|
38236
|
+
}, {
|
|
38237
|
+
value: 'option1',
|
|
38238
|
+
label: 'Option1'
|
|
38239
|
+
}]
|
|
38240
|
+
},
|
|
38241
|
+
value: {
|
|
38242
|
+
type: null
|
|
38243
|
+
},
|
|
38244
|
+
size: {
|
|
38245
|
+
type: String,
|
|
38246
|
+
default: 'md'
|
|
38247
|
+
},
|
|
38248
|
+
type: {
|
|
38249
|
+
type: String,
|
|
38250
|
+
default: 'normal',
|
|
38251
|
+
validator(value) {
|
|
38252
|
+
return ['normal', 'error'].indexOf(value) !== -1;
|
|
38253
|
+
}
|
|
38254
|
+
},
|
|
38255
|
+
disabled: {
|
|
38256
|
+
type: Boolean,
|
|
38257
|
+
default: false
|
|
38258
|
+
},
|
|
38259
|
+
multiple: {
|
|
38260
|
+
type: Boolean,
|
|
38261
|
+
default: false
|
|
38262
|
+
},
|
|
38263
|
+
multipleWithoutSelectsMessage: {
|
|
38264
|
+
type: String,
|
|
38265
|
+
default: ''
|
|
38266
|
+
},
|
|
38267
|
+
autocomplete: {
|
|
38268
|
+
type: Boolean,
|
|
38269
|
+
default: false
|
|
38270
|
+
},
|
|
38271
|
+
autocompleteIconLeft: {
|
|
38272
|
+
type: Boolean,
|
|
38273
|
+
default: false
|
|
38274
|
+
},
|
|
38275
|
+
autocompleteClearOnFocus: {
|
|
38276
|
+
type: Boolean,
|
|
38277
|
+
default: false
|
|
38278
|
+
}
|
|
38279
|
+
},
|
|
38280
|
+
data() {
|
|
38281
|
+
return {
|
|
38282
|
+
active: false,
|
|
38283
|
+
status: 'not-mounted',
|
|
38284
|
+
focusedOption: null,
|
|
38285
|
+
searchValue: '',
|
|
38286
|
+
isAutocompleteAllowed: false,
|
|
38287
|
+
selectedOptions: [],
|
|
38288
|
+
multipleSelectedsTags: 2
|
|
38289
|
+
};
|
|
38290
|
+
},
|
|
38291
|
+
mounted() {
|
|
38292
|
+
this.status = 'mounted';
|
|
38293
|
+
if (this.multiple || this.autocomplete) {
|
|
38294
|
+
// The "multiple" variation only exists with autocomplete, so it can't be false
|
|
38295
|
+
this.isAutocompleteAllowed = true;
|
|
38296
|
+
}
|
|
38297
|
+
if (this.options[0].value) {
|
|
38298
|
+
this.selectOption(this.options[0]);
|
|
38299
|
+
}
|
|
38300
|
+
},
|
|
38301
|
+
watch: {
|
|
38302
|
+
active(newValue) {
|
|
38303
|
+
this.$nextTick(() => {
|
|
38304
|
+
this.$refs['dropdown-skeleton'].calculatePosition();
|
|
38305
|
+
if (newValue && !this.multiple) {
|
|
38306
|
+
const activeOptionIndex = this.getOptionIndex('active');
|
|
38307
|
+
if (activeOptionIndex !== -1) {
|
|
38308
|
+
this.scrollToOption(activeOptionIndex, 'center');
|
|
38309
|
+
}
|
|
38310
|
+
}
|
|
38311
|
+
});
|
|
38312
|
+
},
|
|
38313
|
+
searchValue() {
|
|
38314
|
+
this.$nextTick(() => {
|
|
38315
|
+
this.$refs['dropdown-skeleton'].calculatePosition();
|
|
38316
|
+
});
|
|
38317
|
+
this.focusedOption = null;
|
|
38318
|
+
if (!this.active) this.active = true;
|
|
38319
|
+
},
|
|
38320
|
+
selectedOptions(newSelectedOptions) {
|
|
38321
|
+
this.$emit('onChange', newSelectedOptions);
|
|
38322
|
+
this.$emit('input', newSelectedOptions);
|
|
38323
|
+
this.onSelectOption(newSelectedOptions.at(-1));
|
|
38324
|
+
},
|
|
38325
|
+
autocomplete(newAutocomplete) {
|
|
38326
|
+
if (!this.multiple) {
|
|
38327
|
+
// The "multiple" variation only exists with autocomplete, so it can't be false
|
|
38328
|
+
this.isAutocompleteAllowed = newAutocomplete;
|
|
38329
|
+
}
|
|
38330
|
+
}
|
|
38331
|
+
},
|
|
38332
|
+
computed: {
|
|
38333
|
+
selectedLabel() {
|
|
38334
|
+
var _this$selectedOptions;
|
|
38335
|
+
if (this.status !== 'mounted') {
|
|
38336
|
+
return '';
|
|
38337
|
+
}
|
|
38338
|
+
const selected = this.options.find(option => {
|
|
38339
|
+
const isValueMatch = option.value === this.value;
|
|
38340
|
+
if (this.isAutocompleteAllowed) {
|
|
38341
|
+
return isValueMatch && option.value !== '';
|
|
38342
|
+
}
|
|
38343
|
+
const isEmptyOption = option.value === '' && this.value == null;
|
|
38344
|
+
return isEmptyOption || isValueMatch;
|
|
38345
|
+
});
|
|
38346
|
+
if (selected) {
|
|
38347
|
+
return selected.label;
|
|
38348
|
+
}
|
|
38349
|
+
if (this.multiple) {
|
|
38350
|
+
const labels = this.selectedOptions.map(item => item.label);
|
|
38351
|
+
return labels.join(', ');
|
|
38352
|
+
}
|
|
38353
|
+
const label = ((_this$selectedOptions = this.selectedOptions.at(-1)) === null || _this$selectedOptions === void 0 ? void 0 : _this$selectedOptions.label) || '';
|
|
38354
|
+
return label;
|
|
38355
|
+
},
|
|
38356
|
+
hasDescriptionOptions() {
|
|
38357
|
+
return this.options.some(item => typeof item.description !== 'undefined');
|
|
38358
|
+
},
|
|
38359
|
+
autocompletePlaceholder() {
|
|
38360
|
+
if (this.isAutocompleteAllowed) {
|
|
38361
|
+
const selected = this.options.find(option => option.value === '');
|
|
38362
|
+
if (selected) {
|
|
38363
|
+
return selected.label;
|
|
38364
|
+
}
|
|
38365
|
+
}
|
|
38366
|
+
return '';
|
|
38367
|
+
},
|
|
38368
|
+
inputValue() {
|
|
38369
|
+
const {
|
|
38370
|
+
isAutocompleteAllowed,
|
|
38371
|
+
searchValue,
|
|
38372
|
+
multiple,
|
|
38373
|
+
selectedOptions
|
|
38374
|
+
} = this;
|
|
38375
|
+
if (isAutocompleteAllowed || multiple) {
|
|
38376
|
+
return searchValue;
|
|
38377
|
+
}
|
|
38378
|
+
if (!multiple && selectedOptions.length !== 0) {
|
|
38379
|
+
return selectedOptions[0].label;
|
|
38380
|
+
}
|
|
38381
|
+
return '';
|
|
38382
|
+
}
|
|
38383
|
+
},
|
|
38384
|
+
directives: {
|
|
38385
|
+
clickOutside: v_click_outside_umd_default.a.directive
|
|
38386
|
+
},
|
|
38387
|
+
methods: {
|
|
38388
|
+
optionIsSelected(option) {
|
|
38389
|
+
return this.selectedOptions.some(selectedOption => selectedOption.value === option.value);
|
|
38390
|
+
},
|
|
38391
|
+
clearSelectedOptions() {
|
|
38392
|
+
this.selectedOptions = [];
|
|
38393
|
+
},
|
|
38394
|
+
handleSelect(option) {
|
|
38395
|
+
if (option) {
|
|
38396
|
+
if (this.multiple && this.optionIsSelected(option)) {
|
|
38397
|
+
this.unselectOption(option);
|
|
38398
|
+
return;
|
|
38399
|
+
}
|
|
38400
|
+
this.selectOption(option);
|
|
38401
|
+
}
|
|
38402
|
+
},
|
|
38403
|
+
handleClickInput() {
|
|
38404
|
+
if (this.isAutocompleteAllowed) {
|
|
38405
|
+
if (this.active) {
|
|
38406
|
+
return;
|
|
38407
|
+
}
|
|
38408
|
+
if (this.autocompleteClearOnFocus || this.multiple) {
|
|
38409
|
+
this.searchValue = '';
|
|
38410
|
+
}
|
|
38411
|
+
}
|
|
38412
|
+
this.active = !this.active;
|
|
38413
|
+
},
|
|
38414
|
+
filterOptions(options) {
|
|
38415
|
+
const searchValue = this.searchValue.toLowerCase();
|
|
38416
|
+
const searchTerms = searchValue.normalize('NFD').replace(/[\u0300-\u036f]/g, '').split(' ');
|
|
38417
|
+
const normalizeLabel = label => label.toString().toLowerCase().normalize('NFD').replace(/[\u0300-\u036f]/g, '');
|
|
38418
|
+
const getNumber = str => {
|
|
38419
|
+
var _str$match;
|
|
38420
|
+
return parseInt((_str$match = str.match(/\d+/)) === null || _str$match === void 0 ? void 0 : _str$match[0], 10) || 0;
|
|
38421
|
+
};
|
|
38422
|
+
const filteredOptions = options.filter(({
|
|
38423
|
+
value,
|
|
38424
|
+
label
|
|
38425
|
+
}, index, self) => {
|
|
38426
|
+
const labelWithoutAccents = normalizeLabel(label);
|
|
38427
|
+
const isValueUnique = self.findIndex(option => option.value === value) === index;
|
|
38428
|
+
const matchesSearchTerms = searchTerms.every(term => labelWithoutAccents.includes(term));
|
|
38429
|
+
return isValueUnique && matchesSearchTerms && value;
|
|
38430
|
+
});
|
|
38431
|
+
const sortedOptions = filteredOptions.sort((a, b) => {
|
|
38432
|
+
const labelA = normalizeLabel(a.label);
|
|
38433
|
+
const labelB = normalizeLabel(b.label);
|
|
38434
|
+
const numberA = getNumber(labelA);
|
|
38435
|
+
const numberB = getNumber(labelB);
|
|
38436
|
+
return numberA - numberB || labelA.localeCompare(labelB);
|
|
38437
|
+
});
|
|
38438
|
+
return sortedOptions;
|
|
38439
|
+
},
|
|
38440
|
+
onClickOutside() {
|
|
38441
|
+
if (this.active) {
|
|
38442
|
+
if (this.isAutocompleteAllowed) {
|
|
38443
|
+
this.searchValue = this.selectedLabel;
|
|
38444
|
+
}
|
|
38445
|
+
this.$nextTick(() => {
|
|
38446
|
+
this.active = false;
|
|
38447
|
+
});
|
|
38448
|
+
}
|
|
38449
|
+
},
|
|
38450
|
+
getOptionIndex(type) {
|
|
38451
|
+
const options = this.filterOptions(this.options);
|
|
38452
|
+
let valueByType = '';
|
|
38453
|
+
if (type === 'active') {
|
|
38454
|
+
var _this$value, _this$value$;
|
|
38455
|
+
valueByType = (_this$value = this.value) === null || _this$value === void 0 ? void 0 : (_this$value$ = _this$value[0]) === null || _this$value$ === void 0 ? void 0 : _this$value$.value;
|
|
38456
|
+
}
|
|
38457
|
+
if (type === 'focused') {
|
|
38458
|
+
var _this$focusedOption, _this$selectedOptions2;
|
|
38459
|
+
valueByType = ((_this$focusedOption = this.focusedOption) === null || _this$focusedOption === void 0 ? void 0 : _this$focusedOption.value) || ((_this$selectedOptions2 = this.selectedOptions.at(-1)) === null || _this$selectedOptions2 === void 0 ? void 0 : _this$selectedOptions2.value);
|
|
38460
|
+
}
|
|
38461
|
+
return options.findIndex(option => option.value === valueByType);
|
|
38462
|
+
},
|
|
38463
|
+
scrollToOption(optionIndex, scrollBlock = 'nearest') {
|
|
38464
|
+
const elementScroll = this.$refs.selectSmartOptionsScrollArea;
|
|
38465
|
+
if (elementScroll && optionIndex >= 0 && optionIndex < elementScroll.childNodes.length) {
|
|
38466
|
+
const optionElement = elementScroll.childNodes[optionIndex];
|
|
38467
|
+
if (optionElement instanceof HTMLElement) {
|
|
38468
|
+
optionElement.scrollIntoView({
|
|
38469
|
+
block: scrollBlock
|
|
38470
|
+
});
|
|
38471
|
+
}
|
|
38472
|
+
}
|
|
38473
|
+
},
|
|
38474
|
+
selectOption(option) {
|
|
38475
|
+
const selectedOption = option.value === null || option.value.length === 0 ? null : option;
|
|
38476
|
+
this.selectedOptions = this.multiple ? [...this.selectedOptions, selectedOption] : [selectedOption];
|
|
38477
|
+
},
|
|
38478
|
+
unselectOption(option) {
|
|
38479
|
+
const indexToRemove = this.selectedOptions.findIndex(selectedOption => selectedOption === option);
|
|
38480
|
+
if (indexToRemove !== -1) {
|
|
38481
|
+
this.selectedOptions.splice(indexToRemove, 1);
|
|
38482
|
+
}
|
|
38483
|
+
if (this.multiple) {
|
|
38484
|
+
this.searchValue = '';
|
|
38485
|
+
}
|
|
38486
|
+
},
|
|
38487
|
+
onSelectOption(newOption) {
|
|
38488
|
+
this.$nextTick(() => {
|
|
38489
|
+
if (!this.multiple) {
|
|
38490
|
+
this.active = false;
|
|
38491
|
+
}
|
|
38492
|
+
});
|
|
38493
|
+
if (this.isAutocompleteAllowed && !this.multiple) {
|
|
38494
|
+
this.searchValue = newOption.label;
|
|
38495
|
+
return;
|
|
38496
|
+
}
|
|
38497
|
+
if (this.multiple) {
|
|
38498
|
+
this.searchValue = '';
|
|
38499
|
+
}
|
|
38500
|
+
},
|
|
38501
|
+
async onKeyDownSelect(event) {
|
|
38502
|
+
const {
|
|
38503
|
+
key
|
|
38504
|
+
} = event;
|
|
38505
|
+
const validKeys = ['Escape', 'Enter', 'ArrowUp', 'ArrowDown'];
|
|
38506
|
+
if (validKeys.includes(key)) {
|
|
38507
|
+
event.preventDefault();
|
|
38508
|
+
const options = this.filterOptions(this.options);
|
|
38509
|
+
const focusedOptionIndex = this.getOptionIndex('focused');
|
|
38510
|
+
let newIndex;
|
|
38511
|
+
|
|
38512
|
+
// eslint-disable-next-line default-case
|
|
38513
|
+
switch (key) {
|
|
38514
|
+
case 'Escape':
|
|
38515
|
+
this.active = false;
|
|
38516
|
+
this.searchValue = '';
|
|
38517
|
+
break;
|
|
38518
|
+
case 'Enter':
|
|
38519
|
+
if (this.focusedOption && this.active) {
|
|
38520
|
+
this.handleSelect(this.focusedOption);
|
|
38521
|
+
}
|
|
38522
|
+
if (!this.active) {
|
|
38523
|
+
this.active = true;
|
|
38524
|
+
}
|
|
38525
|
+
break;
|
|
38526
|
+
case 'ArrowUp':
|
|
38527
|
+
case 'ArrowDown':
|
|
38528
|
+
if (this.multiple && !this.active) {
|
|
38529
|
+
this.active = true;
|
|
38530
|
+
await this.$nextTick();
|
|
38531
|
+
}
|
|
38532
|
+
newIndex = key === 'ArrowUp' ? Math.max(focusedOptionIndex - 1, 0) : Math.min(focusedOptionIndex + 1, options.length - 1);
|
|
38533
|
+
if (!this.active) {
|
|
38534
|
+
this.handleSelect(options[newIndex]);
|
|
38535
|
+
}
|
|
38536
|
+
break;
|
|
38537
|
+
}
|
|
38538
|
+
if (newIndex !== undefined && this.active) {
|
|
38539
|
+
this.scrollToOption(newIndex);
|
|
38540
|
+
}
|
|
38541
|
+
const newOption = options[newIndex === undefined ? focusedOptionIndex : newIndex];
|
|
38542
|
+
this.focusedOption = newOption;
|
|
38543
|
+
}
|
|
38544
|
+
}
|
|
38545
|
+
}
|
|
38546
|
+
});
|
|
38547
|
+
// CONCATENATED MODULE: ./src/components/SelectSmart/SelectSmart.vue?vue&type=script&lang=js&
|
|
38548
|
+
/* harmony default export */ var SelectSmart_SelectSmartvue_type_script_lang_js_ = (SelectSmartvue_type_script_lang_js_);
|
|
38549
|
+
// EXTERNAL MODULE: ./src/components/SelectSmart/SelectSmart.vue?vue&type=style&index=0&lang=scss&
|
|
38550
|
+
var SelectSmartvue_type_style_index_0_lang_scss_ = __webpack_require__("1f90");
|
|
38551
|
+
|
|
38552
|
+
// CONCATENATED MODULE: ./src/components/SelectSmart/SelectSmart.vue
|
|
38553
|
+
|
|
38554
|
+
|
|
38555
|
+
|
|
38556
|
+
|
|
38557
|
+
|
|
38558
|
+
|
|
38559
|
+
/* normalize component */
|
|
38560
|
+
|
|
38561
|
+
var SelectSmart_component = normalizeComponent(
|
|
38562
|
+
SelectSmart_SelectSmartvue_type_script_lang_js_,
|
|
38563
|
+
SelectSmartvue_type_template_id_672daeb4_render,
|
|
38564
|
+
SelectSmartvue_type_template_id_672daeb4_staticRenderFns,
|
|
38565
|
+
false,
|
|
38566
|
+
null,
|
|
38567
|
+
null,
|
|
38568
|
+
null
|
|
38569
|
+
|
|
38570
|
+
)
|
|
38571
|
+
|
|
38572
|
+
/* harmony default export */ var SelectSmart = (SelectSmart_component.exports);
|
|
38573
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3be1353e-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Select/Select.vue?vue&type=template&id=36a43709&
|
|
38574
|
+
var Selectvue_type_template_id_36a43709_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{directives:[{name:"click-outside",rawName:"v-click-outside",value:(_vm.onClickOutside),expression:"onClickOutside"}],staticClass:"unnnic-select",on:{"keydown":_vm.onKeyDownSelect}},[(_vm.label)?_c('p',{staticClass:"unnnic-form__label"},[_vm._v(_vm._s(_vm.label))]):_vm._e(),_c('dropdown-skeleton',{ref:"dropdown-skeleton",attrs:{"type":"manual","value":_vm.active,"position":"bottom"},scopedSlots:_vm._u([{key:"inside",fn:function(props){return [(_vm.active)?_c('div',{class:{
|
|
38575
|
+
'unnnic-select__options': true,
|
|
38576
|
+
'unnnic-select__options--active': _vm.active,
|
|
38577
|
+
'unnnic-select__options--inactive': !_vm.active,
|
|
38578
|
+
},style:({ width: props.width })},[_c('div',{style:({ overflow: 'auto' })},[(_vm.search)?_c('select-item',{staticClass:"unnnic-select__header",attrs:{"selectable":false,"size":_vm.size}},[_c('text-input',{attrs:{"placeholder":_vm.searchPlaceholder,"icon-left":_vm.searchIconLeft,"size":_vm.searchSize},model:{value:(_vm.searchValue),callback:function ($$v) {_vm.searchValue=$$v},expression:"searchValue"}})],1):_vm._e(),_vm._l((_vm.optionsHeader),function(option,index){return _c('select-item',{key:index,attrs:{"tabindex":index,"size":_vm.size,"title":option.text},on:{"click":function($event){return _vm.onSelectOption(option, 'header')}}},[_vm._v(" "+_vm._s(option.text)+" ")])}),(_vm.hasHeader())?_c('select-item',{staticClass:"unnnic-select__header",attrs:{"selectable":false,"size":_vm.size}},[_vm._t("header")],2):_vm._e(),_c('div',{staticClass:"unnnic-select__options__scroll-area"},_vm._l((_vm.filterOptions(_vm.options())),function(option,index){return _c('select-item',{key:option.value,attrs:{"tabindex":index,"size":_vm.size,"active":option.value === _vm.value,"title":option.text},on:{"click":function($event){return _vm.onSelectOption(option)}}},[_vm._v(" "+_vm._s(option.text)+" ")])}),1)],2)]):_vm._e()]}}],null,true)},[_c('text-input',{attrs:{"value":_vm.valueLabel || _vm.labelForValue,"placeholder":_vm.placeholder,"icon-right":_vm.active ? 'arrow-button-up-1' : 'arrow-button-down-1',"type":_vm.type,"icon-right-clickable":"","hasCloudyColor":_vm.hasCloudyColor,"size":_vm.size,"disabled":_vm.disabled,"readonly":""},on:{"icon-right-click":function($event){_vm.active = !_vm.active},"focus":function($event){_vm.active = true}}}),_vm._t("default")],2),(_vm.message)?_c('p',{staticClass:"unnnic-form__message"},[_vm._v(_vm._s(_vm.message))]):_vm._e()],1)}
|
|
38579
|
+
var Selectvue_type_template_id_36a43709_staticRenderFns = []
|
|
38580
|
+
|
|
38581
|
+
|
|
38582
|
+
// CONCATENATED MODULE: ./src/components/Select/Select.vue?vue&type=template&id=36a43709&
|
|
38583
|
+
|
|
38584
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3be1353e-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Select/SelectItem.vue?vue&type=template&id=d2fb7cfc&
|
|
38585
|
+
var SelectItemvue_type_template_id_d2fb7cfc_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{class:{
|
|
38586
|
+
'unnnic-select-item': true,
|
|
38587
|
+
'unnnic-select-item__active': _vm.active,
|
|
38588
|
+
'unnnic--clickable': _vm.selectable,
|
|
38589
|
+
'unnnic-select-item--selectable': _vm.selectable,
|
|
38590
|
+
'text-focused': _vm.textFocused,
|
|
38591
|
+
},on:{"click":function($event){return _vm.$emit('click')}}},[_c('span',{class:['unnnic-select-item__label', ("unnnic-select-item__label--" + _vm.size)]},[_vm._t("default")],2)])}
|
|
38592
|
+
var SelectItemvue_type_template_id_d2fb7cfc_staticRenderFns = []
|
|
38593
|
+
|
|
38594
|
+
|
|
38595
|
+
// CONCATENATED MODULE: ./src/components/Select/SelectItem.vue?vue&type=template&id=d2fb7cfc&
|
|
38596
|
+
|
|
38597
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Select/SelectItem.vue?vue&type=script&lang=js&
|
|
38598
|
+
//
|
|
38599
|
+
//
|
|
38600
|
+
//
|
|
38601
|
+
//
|
|
38602
|
+
//
|
|
38603
|
+
//
|
|
38604
|
+
//
|
|
38605
|
+
//
|
|
38606
|
+
//
|
|
38607
|
+
//
|
|
38608
|
+
//
|
|
38609
|
+
//
|
|
38610
|
+
//
|
|
38611
|
+
//
|
|
38612
|
+
//
|
|
38613
|
+
//
|
|
38614
|
+
|
|
38615
|
+
/* harmony default export */ var SelectItemvue_type_script_lang_js_ = ({
|
|
38616
|
+
name: 'UnnicSelectItem',
|
|
38617
|
+
props: {
|
|
38618
|
+
size: {
|
|
38619
|
+
type: String,
|
|
38620
|
+
default: ''
|
|
38621
|
+
},
|
|
38622
|
+
selectable: {
|
|
38623
|
+
type: Boolean,
|
|
38624
|
+
default: true
|
|
38625
|
+
},
|
|
38626
|
+
active: {
|
|
38627
|
+
type: Boolean,
|
|
38628
|
+
default: false
|
|
38629
|
+
},
|
|
38630
|
+
textFocused: {
|
|
38631
|
+
type: Boolean,
|
|
38632
|
+
default: false
|
|
38633
|
+
}
|
|
38634
|
+
}
|
|
38635
|
+
});
|
|
38636
|
+
// CONCATENATED MODULE: ./src/components/Select/SelectItem.vue?vue&type=script&lang=js&
|
|
38637
|
+
/* harmony default export */ var Select_SelectItemvue_type_script_lang_js_ = (SelectItemvue_type_script_lang_js_);
|
|
38638
|
+
// EXTERNAL MODULE: ./src/components/Select/SelectItem.vue?vue&type=style&index=0&lang=scss&
|
|
38639
|
+
var SelectItemvue_type_style_index_0_lang_scss_ = __webpack_require__("4cd7");
|
|
38640
|
+
|
|
38641
|
+
// CONCATENATED MODULE: ./src/components/Select/SelectItem.vue
|
|
38642
|
+
|
|
38643
|
+
|
|
38644
|
+
|
|
38645
|
+
|
|
38646
|
+
|
|
38647
|
+
|
|
38648
|
+
/* normalize component */
|
|
38649
|
+
|
|
38650
|
+
var SelectItem_component = normalizeComponent(
|
|
38651
|
+
Select_SelectItemvue_type_script_lang_js_,
|
|
38652
|
+
SelectItemvue_type_template_id_d2fb7cfc_render,
|
|
38653
|
+
SelectItemvue_type_template_id_d2fb7cfc_staticRenderFns,
|
|
38654
|
+
false,
|
|
38655
|
+
null,
|
|
38656
|
+
null,
|
|
38657
|
+
null
|
|
38658
|
+
|
|
38659
|
+
)
|
|
38660
|
+
|
|
38661
|
+
/* harmony default export */ var SelectItem = (SelectItem_component.exports);
|
|
37923
38662
|
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Select/Select.vue?vue&type=script&lang=js&
|
|
37924
38663
|
|
|
37925
38664
|
//
|
|
@@ -43231,6 +43970,7 @@ var ProgressBar_component = normalizeComponent(
|
|
|
43231
43970
|
|
|
43232
43971
|
|
|
43233
43972
|
|
|
43973
|
+
|
|
43234
43974
|
|
|
43235
43975
|
|
|
43236
43976
|
const components = {
|
|
@@ -43265,6 +44005,7 @@ const components = {
|
|
|
43265
44005
|
unnnicModal: Modal,
|
|
43266
44006
|
unnnicModalNext: ModalNext,
|
|
43267
44007
|
unnnicModalUpload: ModalUpload,
|
|
44008
|
+
unnnicSelectSmart: SelectSmart,
|
|
43268
44009
|
unnnicSelect: Select,
|
|
43269
44010
|
unnnicSelectItem: SelectItem,
|
|
43270
44011
|
unnnicSelectListItem: SelectListItem,
|
|
@@ -43339,6 +44080,7 @@ const unnniclanguageSelect = LanguageSelect;
|
|
|
43339
44080
|
const unnnicModal = Modal;
|
|
43340
44081
|
const unnnicModalNext = ModalNext;
|
|
43341
44082
|
const unnnicModalUpload = ModalUpload;
|
|
44083
|
+
const unnnicSelectSmart = SelectSmart;
|
|
43342
44084
|
const unnnicSelect = Select;
|
|
43343
44085
|
const unnnicSelectItem = SelectItem;
|
|
43344
44086
|
const unnnicSelectListItem = SelectListItem;
|