@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.umd.js
CHANGED
|
@@ -2839,6 +2839,17 @@ module.exports = {"unnnicColorBackgroundSolo":"#E8F4F4"};
|
|
|
2839
2839
|
|
|
2840
2840
|
// extracted by mini-css-extract-plugin
|
|
2841
2841
|
|
|
2842
|
+
/***/ }),
|
|
2843
|
+
|
|
2844
|
+
/***/ "1f90":
|
|
2845
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2846
|
+
|
|
2847
|
+
"use strict";
|
|
2848
|
+
/* 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");
|
|
2849
|
+
/* 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__);
|
|
2850
|
+
/* unused harmony reexport * */
|
|
2851
|
+
|
|
2852
|
+
|
|
2842
2853
|
/***/ }),
|
|
2843
2854
|
|
|
2844
2855
|
/***/ "1fc1":
|
|
@@ -4321,6 +4332,14 @@ module.exports = "<svg viewBox=\"0 0 40 40\" fill=\"none\" xmlns=\"http://www.w3
|
|
|
4321
4332
|
|
|
4322
4333
|
/***/ }),
|
|
4323
4334
|
|
|
4335
|
+
/***/ "2d90":
|
|
4336
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
4337
|
+
|
|
4338
|
+
// extracted by mini-css-extract-plugin
|
|
4339
|
+
module.exports = {"unnnicColorBackgroundSolo":"#E8F4F4"};
|
|
4340
|
+
|
|
4341
|
+
/***/ }),
|
|
4342
|
+
|
|
4324
4343
|
/***/ "2e8c":
|
|
4325
4344
|
/***/ (function(module, exports, __webpack_require__) {
|
|
4326
4345
|
|
|
@@ -14064,6 +14083,13 @@ module.exports = function (argument) {
|
|
|
14064
14083
|
};
|
|
14065
14084
|
|
|
14066
14085
|
|
|
14086
|
+
/***/ }),
|
|
14087
|
+
|
|
14088
|
+
/***/ "82d6":
|
|
14089
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
14090
|
+
|
|
14091
|
+
// extracted by mini-css-extract-plugin
|
|
14092
|
+
|
|
14067
14093
|
/***/ }),
|
|
14068
14094
|
|
|
14069
14095
|
/***/ "83ab":
|
|
@@ -16702,6 +16728,17 @@ module.exports = "<svg viewBox=\"0 0 40 40\" fill=\"none\" xmlns=\"http://www.w3
|
|
|
16702
16728
|
|
|
16703
16729
|
// extracted by mini-css-extract-plugin
|
|
16704
16730
|
|
|
16731
|
+
/***/ }),
|
|
16732
|
+
|
|
16733
|
+
/***/ "9a03":
|
|
16734
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
16735
|
+
|
|
16736
|
+
"use strict";
|
|
16737
|
+
/* 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");
|
|
16738
|
+
/* 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__);
|
|
16739
|
+
/* unused harmony reexport * */
|
|
16740
|
+
|
|
16741
|
+
|
|
16705
16742
|
/***/ }),
|
|
16706
16743
|
|
|
16707
16744
|
/***/ "9a15":
|
|
@@ -28389,11 +28426,30 @@ module.exports = "<svg viewBox=\"0 0 40 40\" fill=\"none\" xmlns=\"http://www.w3
|
|
|
28389
28426
|
|
|
28390
28427
|
/***/ }),
|
|
28391
28428
|
|
|
28429
|
+
/***/ "e59e":
|
|
28430
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
28431
|
+
|
|
28432
|
+
// extracted by mini-css-extract-plugin
|
|
28433
|
+
module.exports = {"unnnicColorBackgroundSolo":"#E8F4F4"};
|
|
28434
|
+
|
|
28435
|
+
/***/ }),
|
|
28436
|
+
|
|
28392
28437
|
/***/ "e6a0":
|
|
28393
28438
|
/***/ (function(module, exports) {
|
|
28394
28439
|
|
|
28395
28440
|
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>"
|
|
28396
28441
|
|
|
28442
|
+
/***/ }),
|
|
28443
|
+
|
|
28444
|
+
/***/ "e757":
|
|
28445
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
28446
|
+
|
|
28447
|
+
"use strict";
|
|
28448
|
+
/* 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");
|
|
28449
|
+
/* 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__);
|
|
28450
|
+
/* unused harmony reexport * */
|
|
28451
|
+
|
|
28452
|
+
|
|
28397
28453
|
/***/ }),
|
|
28398
28454
|
|
|
28399
28455
|
/***/ "e773":
|
|
@@ -29771,6 +29827,7 @@ __webpack_require__.d(__webpack_exports__, "unnniclanguageSelect", function() {
|
|
|
29771
29827
|
__webpack_require__.d(__webpack_exports__, "unnnicModal", function() { return /* reexport */ unnnicModal; });
|
|
29772
29828
|
__webpack_require__.d(__webpack_exports__, "unnnicModalNext", function() { return /* reexport */ unnnicModalNext; });
|
|
29773
29829
|
__webpack_require__.d(__webpack_exports__, "unnnicModalUpload", function() { return /* reexport */ unnnicModalUpload; });
|
|
29830
|
+
__webpack_require__.d(__webpack_exports__, "unnnicSelectSmart", function() { return /* reexport */ unnnicSelectSmart; });
|
|
29774
29831
|
__webpack_require__.d(__webpack_exports__, "unnnicSelect", function() { return /* reexport */ unnnicSelect; });
|
|
29775
29832
|
__webpack_require__.d(__webpack_exports__, "unnnicSelectItem", function() { return /* reexport */ unnnicSelectItem; });
|
|
29776
29833
|
__webpack_require__.d(__webpack_exports__, "unnnicSelectListItem", function() { return /* reexport */ unnnicSelectListItem; });
|
|
@@ -37688,31 +37745,55 @@ var Alert_component = normalizeComponent(
|
|
|
37688
37745
|
document.body.appendChild(instance.$el);
|
|
37689
37746
|
}
|
|
37690
37747
|
});
|
|
37691
|
-
// 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/
|
|
37692
|
-
var
|
|
37693
|
-
'unnnic-
|
|
37694
|
-
|
|
37695
|
-
|
|
37696
|
-
},style:({ width: props.width })},[_c('div',{style:({ overflow: 'auto' })},[(_vm.
|
|
37697
|
-
|
|
37698
|
-
|
|
37699
|
-
|
|
37700
|
-
|
|
37701
|
-
|
|
37702
|
-
|
|
37703
|
-
|
|
37704
|
-
|
|
37705
|
-
|
|
37748
|
+
// 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&
|
|
37749
|
+
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:{
|
|
37750
|
+
'unnnic-select-smart__options': true,
|
|
37751
|
+
active: _vm.active,
|
|
37752
|
+
inactive: !_vm.active,
|
|
37753
|
+
},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:[
|
|
37754
|
+
'unnnic-select-smart__options__scroll-area',
|
|
37755
|
+
("size-" + _vm.size),
|
|
37756
|
+
{
|
|
37757
|
+
'with-descriptions': _vm.hasDescriptionOptions,
|
|
37758
|
+
} ]},[_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)}
|
|
37759
|
+
var SelectSmartvue_type_template_id_672daeb4_staticRenderFns = []
|
|
37760
|
+
|
|
37761
|
+
|
|
37762
|
+
// CONCATENATED MODULE: ./src/components/SelectSmart/SelectSmart.vue?vue&type=template&id=672daeb4&
|
|
37763
|
+
|
|
37764
|
+
// 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&
|
|
37765
|
+
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:{
|
|
37766
|
+
'unnnic-select-smart-option': true,
|
|
37767
|
+
'unnnic-select-smart-option--focused': _vm.focused,
|
|
37768
|
+
'unnnic-select-smart-option--active': _vm.active,
|
|
37706
37769
|
'unnnic--clickable': _vm.selectable,
|
|
37707
|
-
'unnnic-select-
|
|
37708
|
-
'
|
|
37709
|
-
},on:{"click":function($event){return _vm.$emit('click')}}},[_c('span',{class:['unnnic-select-
|
|
37710
|
-
|
|
37770
|
+
'unnnic-select-smart-option--selectable': _vm.selectable,
|
|
37771
|
+
'unnnic-select-smart-option--with-checkbox': _vm.allowCheckbox,
|
|
37772
|
+
},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:[
|
|
37773
|
+
'unnnic-select-smart-option__description',
|
|
37774
|
+
("unnnic-select-smart-option__description--" + _vm.size) ]},[_vm._v(" "+_vm._s(_vm.description)+" ")]):_vm._e()])],1)}
|
|
37775
|
+
var SelectSmartOptionvue_type_template_id_7963bbce_staticRenderFns = []
|
|
37711
37776
|
|
|
37712
37777
|
|
|
37713
|
-
// CONCATENATED MODULE: ./src/components/
|
|
37778
|
+
// CONCATENATED MODULE: ./src/components/SelectSmart/SelectSmartOption.vue?vue&type=template&id=7963bbce&
|
|
37714
37779
|
|
|
37715
|
-
// 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/
|
|
37780
|
+
// 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&
|
|
37781
|
+
//
|
|
37782
|
+
//
|
|
37783
|
+
//
|
|
37784
|
+
//
|
|
37785
|
+
//
|
|
37786
|
+
//
|
|
37787
|
+
//
|
|
37788
|
+
//
|
|
37789
|
+
//
|
|
37790
|
+
//
|
|
37791
|
+
//
|
|
37792
|
+
//
|
|
37793
|
+
//
|
|
37794
|
+
//
|
|
37795
|
+
//
|
|
37796
|
+
//
|
|
37716
37797
|
//
|
|
37717
37798
|
//
|
|
37718
37799
|
//
|
|
@@ -37730,9 +37811,23 @@ var SelectItemvue_type_template_id_d2fb7cfc_staticRenderFns = []
|
|
|
37730
37811
|
//
|
|
37731
37812
|
//
|
|
37732
37813
|
|
|
37733
|
-
|
|
37734
|
-
|
|
37814
|
+
|
|
37815
|
+
/* harmony default export */ var SelectSmartOptionvue_type_script_lang_js_ = ({
|
|
37816
|
+
name: 'UnnnicSelectSmartOption',
|
|
37817
|
+
components: {
|
|
37818
|
+
UnnnicCheckbox: Checkbox
|
|
37819
|
+
},
|
|
37735
37820
|
props: {
|
|
37821
|
+
label: {
|
|
37822
|
+
type: String,
|
|
37823
|
+
default: 'Option',
|
|
37824
|
+
required: true
|
|
37825
|
+
},
|
|
37826
|
+
description: {
|
|
37827
|
+
type: String,
|
|
37828
|
+
default: '',
|
|
37829
|
+
required: false
|
|
37830
|
+
},
|
|
37736
37831
|
size: {
|
|
37737
37832
|
type: String,
|
|
37738
37833
|
default: ''
|
|
@@ -37741,22 +37836,26 @@ var SelectItemvue_type_template_id_d2fb7cfc_staticRenderFns = []
|
|
|
37741
37836
|
type: Boolean,
|
|
37742
37837
|
default: true
|
|
37743
37838
|
},
|
|
37839
|
+
focused: {
|
|
37840
|
+
type: Boolean,
|
|
37841
|
+
default: false
|
|
37842
|
+
},
|
|
37744
37843
|
active: {
|
|
37745
37844
|
type: Boolean,
|
|
37746
37845
|
default: false
|
|
37747
37846
|
},
|
|
37748
|
-
|
|
37847
|
+
allowCheckbox: {
|
|
37749
37848
|
type: Boolean,
|
|
37750
37849
|
default: false
|
|
37751
37850
|
}
|
|
37752
37851
|
}
|
|
37753
37852
|
});
|
|
37754
|
-
// CONCATENATED MODULE: ./src/components/
|
|
37755
|
-
/* harmony default export */ var
|
|
37756
|
-
// EXTERNAL MODULE: ./src/components/
|
|
37757
|
-
var
|
|
37853
|
+
// CONCATENATED MODULE: ./src/components/SelectSmart/SelectSmartOption.vue?vue&type=script&lang=js&
|
|
37854
|
+
/* harmony default export */ var SelectSmart_SelectSmartOptionvue_type_script_lang_js_ = (SelectSmartOptionvue_type_script_lang_js_);
|
|
37855
|
+
// EXTERNAL MODULE: ./src/components/SelectSmart/SelectSmartOption.vue?vue&type=style&index=0&lang=scss&
|
|
37856
|
+
var SelectSmartOptionvue_type_style_index_0_lang_scss_ = __webpack_require__("e757");
|
|
37758
37857
|
|
|
37759
|
-
// CONCATENATED MODULE: ./src/components/
|
|
37858
|
+
// CONCATENATED MODULE: ./src/components/SelectSmart/SelectSmartOption.vue
|
|
37760
37859
|
|
|
37761
37860
|
|
|
37762
37861
|
|
|
@@ -37765,10 +37864,10 @@ var SelectItemvue_type_style_index_0_lang_scss_ = __webpack_require__("4cd7");
|
|
|
37765
37864
|
|
|
37766
37865
|
/* normalize component */
|
|
37767
37866
|
|
|
37768
|
-
var
|
|
37769
|
-
|
|
37770
|
-
|
|
37771
|
-
|
|
37867
|
+
var SelectSmartOption_component = normalizeComponent(
|
|
37868
|
+
SelectSmart_SelectSmartOptionvue_type_script_lang_js_,
|
|
37869
|
+
SelectSmartOptionvue_type_template_id_7963bbce_render,
|
|
37870
|
+
SelectSmartOptionvue_type_template_id_7963bbce_staticRenderFns,
|
|
37772
37871
|
false,
|
|
37773
37872
|
null,
|
|
37774
37873
|
null,
|
|
@@ -37776,7 +37875,123 @@ var SelectItem_component = normalizeComponent(
|
|
|
37776
37875
|
|
|
37777
37876
|
)
|
|
37778
37877
|
|
|
37779
|
-
/* harmony default export */ var
|
|
37878
|
+
/* harmony default export */ var SelectSmartOption = (SelectSmartOption_component.exports);
|
|
37879
|
+
// 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&
|
|
37880
|
+
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()])}
|
|
37881
|
+
var SelectSmartMultipleHeadervue_type_template_id_81250f70_scoped_true_staticRenderFns = []
|
|
37882
|
+
|
|
37883
|
+
|
|
37884
|
+
// CONCATENATED MODULE: ./src/components/SelectSmart/SelectSmartMultipleHeader.vue?vue&type=template&id=81250f70&scoped=true&
|
|
37885
|
+
|
|
37886
|
+
// 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&
|
|
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
|
+
//
|
|
37918
|
+
//
|
|
37919
|
+
//
|
|
37920
|
+
//
|
|
37921
|
+
//
|
|
37922
|
+
//
|
|
37923
|
+
|
|
37924
|
+
|
|
37925
|
+
|
|
37926
|
+
/* harmony default export */ var SelectSmartMultipleHeadervue_type_script_lang_js_ = ({
|
|
37927
|
+
name: 'UnnnicSelectSmartMultipleHeader',
|
|
37928
|
+
components: {
|
|
37929
|
+
Tag: Tag,
|
|
37930
|
+
IconSvg: Icon
|
|
37931
|
+
},
|
|
37932
|
+
props: {
|
|
37933
|
+
selectedOptions: {
|
|
37934
|
+
type: Array,
|
|
37935
|
+
required: true
|
|
37936
|
+
},
|
|
37937
|
+
withoutSelectsMessage: {
|
|
37938
|
+
type: String,
|
|
37939
|
+
default: ''
|
|
37940
|
+
}
|
|
37941
|
+
},
|
|
37942
|
+
data() {
|
|
37943
|
+
return {
|
|
37944
|
+
multipleSelectedsTags: 2
|
|
37945
|
+
};
|
|
37946
|
+
},
|
|
37947
|
+
computed: {
|
|
37948
|
+
firstMultipleSelecteds() {
|
|
37949
|
+
const {
|
|
37950
|
+
selectedOptions,
|
|
37951
|
+
multipleSelectedsTags
|
|
37952
|
+
} = this;
|
|
37953
|
+
const selectedArray = [];
|
|
37954
|
+
for (let i = 0; i < multipleSelectedsTags; i += 1) {
|
|
37955
|
+
selectedArray.push(selectedOptions === null || selectedOptions === void 0 ? void 0 : selectedOptions[i]);
|
|
37956
|
+
}
|
|
37957
|
+
return selectedArray.filter(option => option !== undefined);
|
|
37958
|
+
}
|
|
37959
|
+
},
|
|
37960
|
+
methods: {
|
|
37961
|
+
clearSelectedOptions() {
|
|
37962
|
+
this.$emit('clear-selected-options');
|
|
37963
|
+
},
|
|
37964
|
+
unselectOption(option) {
|
|
37965
|
+
this.$emit('unselect-option', option);
|
|
37966
|
+
}
|
|
37967
|
+
}
|
|
37968
|
+
});
|
|
37969
|
+
// CONCATENATED MODULE: ./src/components/SelectSmart/SelectSmartMultipleHeader.vue?vue&type=script&lang=js&
|
|
37970
|
+
/* harmony default export */ var SelectSmart_SelectSmartMultipleHeadervue_type_script_lang_js_ = (SelectSmartMultipleHeadervue_type_script_lang_js_);
|
|
37971
|
+
// EXTERNAL MODULE: ./src/components/SelectSmart/SelectSmartMultipleHeader.vue?vue&type=style&index=0&id=81250f70&lang=scss&scoped=true&
|
|
37972
|
+
var SelectSmartMultipleHeadervue_type_style_index_0_id_81250f70_lang_scss_scoped_true_ = __webpack_require__("9a03");
|
|
37973
|
+
|
|
37974
|
+
// CONCATENATED MODULE: ./src/components/SelectSmart/SelectSmartMultipleHeader.vue
|
|
37975
|
+
|
|
37976
|
+
|
|
37977
|
+
|
|
37978
|
+
|
|
37979
|
+
|
|
37980
|
+
|
|
37981
|
+
/* normalize component */
|
|
37982
|
+
|
|
37983
|
+
var SelectSmartMultipleHeader_component = normalizeComponent(
|
|
37984
|
+
SelectSmart_SelectSmartMultipleHeadervue_type_script_lang_js_,
|
|
37985
|
+
SelectSmartMultipleHeadervue_type_template_id_81250f70_scoped_true_render,
|
|
37986
|
+
SelectSmartMultipleHeadervue_type_template_id_81250f70_scoped_true_staticRenderFns,
|
|
37987
|
+
false,
|
|
37988
|
+
null,
|
|
37989
|
+
"81250f70",
|
|
37990
|
+
null
|
|
37991
|
+
|
|
37992
|
+
)
|
|
37993
|
+
|
|
37994
|
+
/* harmony default export */ var SelectSmartMultipleHeader = (SelectSmartMultipleHeader_component.exports);
|
|
37780
37995
|
// 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&
|
|
37781
37996
|
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)}
|
|
37782
37997
|
var DropdownSkeletonvue_type_template_id_6fe2671f_scoped_true_staticRenderFns = []
|
|
@@ -37929,6 +38144,530 @@ var DropdownSkeleton_component = normalizeComponent(
|
|
|
37929
38144
|
)
|
|
37930
38145
|
|
|
37931
38146
|
/* harmony default export */ var DropdownSkeleton = (DropdownSkeleton_component.exports);
|
|
38147
|
+
// 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&
|
|
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
|
+
//
|
|
38222
|
+
//
|
|
38223
|
+
//
|
|
38224
|
+
|
|
38225
|
+
|
|
38226
|
+
|
|
38227
|
+
|
|
38228
|
+
|
|
38229
|
+
|
|
38230
|
+
/* harmony default export */ var SelectSmartvue_type_script_lang_js_ = ({
|
|
38231
|
+
name: 'UnnnicSelectSmart',
|
|
38232
|
+
components: {
|
|
38233
|
+
TextInput: TextInput,
|
|
38234
|
+
SelectSmartOption: SelectSmartOption,
|
|
38235
|
+
SelectSmartMultipleHeader: SelectSmartMultipleHeader,
|
|
38236
|
+
DropdownSkeleton: DropdownSkeleton
|
|
38237
|
+
},
|
|
38238
|
+
props: {
|
|
38239
|
+
options: {
|
|
38240
|
+
type: Array,
|
|
38241
|
+
required: true,
|
|
38242
|
+
default: () => [{
|
|
38243
|
+
value: '',
|
|
38244
|
+
label: 'Initial value'
|
|
38245
|
+
}, {
|
|
38246
|
+
value: 'option1',
|
|
38247
|
+
label: 'Option1'
|
|
38248
|
+
}]
|
|
38249
|
+
},
|
|
38250
|
+
value: {
|
|
38251
|
+
type: null
|
|
38252
|
+
},
|
|
38253
|
+
size: {
|
|
38254
|
+
type: String,
|
|
38255
|
+
default: 'md'
|
|
38256
|
+
},
|
|
38257
|
+
type: {
|
|
38258
|
+
type: String,
|
|
38259
|
+
default: 'normal',
|
|
38260
|
+
validator(value) {
|
|
38261
|
+
return ['normal', 'error'].indexOf(value) !== -1;
|
|
38262
|
+
}
|
|
38263
|
+
},
|
|
38264
|
+
disabled: {
|
|
38265
|
+
type: Boolean,
|
|
38266
|
+
default: false
|
|
38267
|
+
},
|
|
38268
|
+
multiple: {
|
|
38269
|
+
type: Boolean,
|
|
38270
|
+
default: false
|
|
38271
|
+
},
|
|
38272
|
+
multipleWithoutSelectsMessage: {
|
|
38273
|
+
type: String,
|
|
38274
|
+
default: ''
|
|
38275
|
+
},
|
|
38276
|
+
autocomplete: {
|
|
38277
|
+
type: Boolean,
|
|
38278
|
+
default: false
|
|
38279
|
+
},
|
|
38280
|
+
autocompleteIconLeft: {
|
|
38281
|
+
type: Boolean,
|
|
38282
|
+
default: false
|
|
38283
|
+
},
|
|
38284
|
+
autocompleteClearOnFocus: {
|
|
38285
|
+
type: Boolean,
|
|
38286
|
+
default: false
|
|
38287
|
+
}
|
|
38288
|
+
},
|
|
38289
|
+
data() {
|
|
38290
|
+
return {
|
|
38291
|
+
active: false,
|
|
38292
|
+
status: 'not-mounted',
|
|
38293
|
+
focusedOption: null,
|
|
38294
|
+
searchValue: '',
|
|
38295
|
+
isAutocompleteAllowed: false,
|
|
38296
|
+
selectedOptions: [],
|
|
38297
|
+
multipleSelectedsTags: 2
|
|
38298
|
+
};
|
|
38299
|
+
},
|
|
38300
|
+
mounted() {
|
|
38301
|
+
this.status = 'mounted';
|
|
38302
|
+
if (this.multiple || this.autocomplete) {
|
|
38303
|
+
// The "multiple" variation only exists with autocomplete, so it can't be false
|
|
38304
|
+
this.isAutocompleteAllowed = true;
|
|
38305
|
+
}
|
|
38306
|
+
if (this.options[0].value) {
|
|
38307
|
+
this.selectOption(this.options[0]);
|
|
38308
|
+
}
|
|
38309
|
+
},
|
|
38310
|
+
watch: {
|
|
38311
|
+
active(newValue) {
|
|
38312
|
+
this.$nextTick(() => {
|
|
38313
|
+
this.$refs['dropdown-skeleton'].calculatePosition();
|
|
38314
|
+
if (newValue && !this.multiple) {
|
|
38315
|
+
const activeOptionIndex = this.getOptionIndex('active');
|
|
38316
|
+
if (activeOptionIndex !== -1) {
|
|
38317
|
+
this.scrollToOption(activeOptionIndex, 'center');
|
|
38318
|
+
}
|
|
38319
|
+
}
|
|
38320
|
+
});
|
|
38321
|
+
},
|
|
38322
|
+
searchValue() {
|
|
38323
|
+
this.$nextTick(() => {
|
|
38324
|
+
this.$refs['dropdown-skeleton'].calculatePosition();
|
|
38325
|
+
});
|
|
38326
|
+
this.focusedOption = null;
|
|
38327
|
+
if (!this.active) this.active = true;
|
|
38328
|
+
},
|
|
38329
|
+
selectedOptions(newSelectedOptions) {
|
|
38330
|
+
this.$emit('onChange', newSelectedOptions);
|
|
38331
|
+
this.$emit('input', newSelectedOptions);
|
|
38332
|
+
this.onSelectOption(newSelectedOptions.at(-1));
|
|
38333
|
+
},
|
|
38334
|
+
autocomplete(newAutocomplete) {
|
|
38335
|
+
if (!this.multiple) {
|
|
38336
|
+
// The "multiple" variation only exists with autocomplete, so it can't be false
|
|
38337
|
+
this.isAutocompleteAllowed = newAutocomplete;
|
|
38338
|
+
}
|
|
38339
|
+
}
|
|
38340
|
+
},
|
|
38341
|
+
computed: {
|
|
38342
|
+
selectedLabel() {
|
|
38343
|
+
var _this$selectedOptions;
|
|
38344
|
+
if (this.status !== 'mounted') {
|
|
38345
|
+
return '';
|
|
38346
|
+
}
|
|
38347
|
+
const selected = this.options.find(option => {
|
|
38348
|
+
const isValueMatch = option.value === this.value;
|
|
38349
|
+
if (this.isAutocompleteAllowed) {
|
|
38350
|
+
return isValueMatch && option.value !== '';
|
|
38351
|
+
}
|
|
38352
|
+
const isEmptyOption = option.value === '' && this.value == null;
|
|
38353
|
+
return isEmptyOption || isValueMatch;
|
|
38354
|
+
});
|
|
38355
|
+
if (selected) {
|
|
38356
|
+
return selected.label;
|
|
38357
|
+
}
|
|
38358
|
+
if (this.multiple) {
|
|
38359
|
+
const labels = this.selectedOptions.map(item => item.label);
|
|
38360
|
+
return labels.join(', ');
|
|
38361
|
+
}
|
|
38362
|
+
const label = ((_this$selectedOptions = this.selectedOptions.at(-1)) === null || _this$selectedOptions === void 0 ? void 0 : _this$selectedOptions.label) || '';
|
|
38363
|
+
return label;
|
|
38364
|
+
},
|
|
38365
|
+
hasDescriptionOptions() {
|
|
38366
|
+
return this.options.some(item => typeof item.description !== 'undefined');
|
|
38367
|
+
},
|
|
38368
|
+
autocompletePlaceholder() {
|
|
38369
|
+
if (this.isAutocompleteAllowed) {
|
|
38370
|
+
const selected = this.options.find(option => option.value === '');
|
|
38371
|
+
if (selected) {
|
|
38372
|
+
return selected.label;
|
|
38373
|
+
}
|
|
38374
|
+
}
|
|
38375
|
+
return '';
|
|
38376
|
+
},
|
|
38377
|
+
inputValue() {
|
|
38378
|
+
const {
|
|
38379
|
+
isAutocompleteAllowed,
|
|
38380
|
+
searchValue,
|
|
38381
|
+
multiple,
|
|
38382
|
+
selectedOptions
|
|
38383
|
+
} = this;
|
|
38384
|
+
if (isAutocompleteAllowed || multiple) {
|
|
38385
|
+
return searchValue;
|
|
38386
|
+
}
|
|
38387
|
+
if (!multiple && selectedOptions.length !== 0) {
|
|
38388
|
+
return selectedOptions[0].label;
|
|
38389
|
+
}
|
|
38390
|
+
return '';
|
|
38391
|
+
}
|
|
38392
|
+
},
|
|
38393
|
+
directives: {
|
|
38394
|
+
clickOutside: v_click_outside_umd_default.a.directive
|
|
38395
|
+
},
|
|
38396
|
+
methods: {
|
|
38397
|
+
optionIsSelected(option) {
|
|
38398
|
+
return this.selectedOptions.some(selectedOption => selectedOption.value === option.value);
|
|
38399
|
+
},
|
|
38400
|
+
clearSelectedOptions() {
|
|
38401
|
+
this.selectedOptions = [];
|
|
38402
|
+
},
|
|
38403
|
+
handleSelect(option) {
|
|
38404
|
+
if (option) {
|
|
38405
|
+
if (this.multiple && this.optionIsSelected(option)) {
|
|
38406
|
+
this.unselectOption(option);
|
|
38407
|
+
return;
|
|
38408
|
+
}
|
|
38409
|
+
this.selectOption(option);
|
|
38410
|
+
}
|
|
38411
|
+
},
|
|
38412
|
+
handleClickInput() {
|
|
38413
|
+
if (this.isAutocompleteAllowed) {
|
|
38414
|
+
if (this.active) {
|
|
38415
|
+
return;
|
|
38416
|
+
}
|
|
38417
|
+
if (this.autocompleteClearOnFocus || this.multiple) {
|
|
38418
|
+
this.searchValue = '';
|
|
38419
|
+
}
|
|
38420
|
+
}
|
|
38421
|
+
this.active = !this.active;
|
|
38422
|
+
},
|
|
38423
|
+
filterOptions(options) {
|
|
38424
|
+
const searchValue = this.searchValue.toLowerCase();
|
|
38425
|
+
const searchTerms = searchValue.normalize('NFD').replace(/[\u0300-\u036f]/g, '').split(' ');
|
|
38426
|
+
const normalizeLabel = label => label.toString().toLowerCase().normalize('NFD').replace(/[\u0300-\u036f]/g, '');
|
|
38427
|
+
const getNumber = str => {
|
|
38428
|
+
var _str$match;
|
|
38429
|
+
return parseInt((_str$match = str.match(/\d+/)) === null || _str$match === void 0 ? void 0 : _str$match[0], 10) || 0;
|
|
38430
|
+
};
|
|
38431
|
+
const filteredOptions = options.filter(({
|
|
38432
|
+
value,
|
|
38433
|
+
label
|
|
38434
|
+
}, index, self) => {
|
|
38435
|
+
const labelWithoutAccents = normalizeLabel(label);
|
|
38436
|
+
const isValueUnique = self.findIndex(option => option.value === value) === index;
|
|
38437
|
+
const matchesSearchTerms = searchTerms.every(term => labelWithoutAccents.includes(term));
|
|
38438
|
+
return isValueUnique && matchesSearchTerms && value;
|
|
38439
|
+
});
|
|
38440
|
+
const sortedOptions = filteredOptions.sort((a, b) => {
|
|
38441
|
+
const labelA = normalizeLabel(a.label);
|
|
38442
|
+
const labelB = normalizeLabel(b.label);
|
|
38443
|
+
const numberA = getNumber(labelA);
|
|
38444
|
+
const numberB = getNumber(labelB);
|
|
38445
|
+
return numberA - numberB || labelA.localeCompare(labelB);
|
|
38446
|
+
});
|
|
38447
|
+
return sortedOptions;
|
|
38448
|
+
},
|
|
38449
|
+
onClickOutside() {
|
|
38450
|
+
if (this.active) {
|
|
38451
|
+
if (this.isAutocompleteAllowed) {
|
|
38452
|
+
this.searchValue = this.selectedLabel;
|
|
38453
|
+
}
|
|
38454
|
+
this.$nextTick(() => {
|
|
38455
|
+
this.active = false;
|
|
38456
|
+
});
|
|
38457
|
+
}
|
|
38458
|
+
},
|
|
38459
|
+
getOptionIndex(type) {
|
|
38460
|
+
const options = this.filterOptions(this.options);
|
|
38461
|
+
let valueByType = '';
|
|
38462
|
+
if (type === 'active') {
|
|
38463
|
+
var _this$value, _this$value$;
|
|
38464
|
+
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;
|
|
38465
|
+
}
|
|
38466
|
+
if (type === 'focused') {
|
|
38467
|
+
var _this$focusedOption, _this$selectedOptions2;
|
|
38468
|
+
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);
|
|
38469
|
+
}
|
|
38470
|
+
return options.findIndex(option => option.value === valueByType);
|
|
38471
|
+
},
|
|
38472
|
+
scrollToOption(optionIndex, scrollBlock = 'nearest') {
|
|
38473
|
+
const elementScroll = this.$refs.selectSmartOptionsScrollArea;
|
|
38474
|
+
if (elementScroll && optionIndex >= 0 && optionIndex < elementScroll.childNodes.length) {
|
|
38475
|
+
const optionElement = elementScroll.childNodes[optionIndex];
|
|
38476
|
+
if (optionElement instanceof HTMLElement) {
|
|
38477
|
+
optionElement.scrollIntoView({
|
|
38478
|
+
block: scrollBlock
|
|
38479
|
+
});
|
|
38480
|
+
}
|
|
38481
|
+
}
|
|
38482
|
+
},
|
|
38483
|
+
selectOption(option) {
|
|
38484
|
+
const selectedOption = option.value === null || option.value.length === 0 ? null : option;
|
|
38485
|
+
this.selectedOptions = this.multiple ? [...this.selectedOptions, selectedOption] : [selectedOption];
|
|
38486
|
+
},
|
|
38487
|
+
unselectOption(option) {
|
|
38488
|
+
const indexToRemove = this.selectedOptions.findIndex(selectedOption => selectedOption === option);
|
|
38489
|
+
if (indexToRemove !== -1) {
|
|
38490
|
+
this.selectedOptions.splice(indexToRemove, 1);
|
|
38491
|
+
}
|
|
38492
|
+
if (this.multiple) {
|
|
38493
|
+
this.searchValue = '';
|
|
38494
|
+
}
|
|
38495
|
+
},
|
|
38496
|
+
onSelectOption(newOption) {
|
|
38497
|
+
this.$nextTick(() => {
|
|
38498
|
+
if (!this.multiple) {
|
|
38499
|
+
this.active = false;
|
|
38500
|
+
}
|
|
38501
|
+
});
|
|
38502
|
+
if (this.isAutocompleteAllowed && !this.multiple) {
|
|
38503
|
+
this.searchValue = newOption.label;
|
|
38504
|
+
return;
|
|
38505
|
+
}
|
|
38506
|
+
if (this.multiple) {
|
|
38507
|
+
this.searchValue = '';
|
|
38508
|
+
}
|
|
38509
|
+
},
|
|
38510
|
+
async onKeyDownSelect(event) {
|
|
38511
|
+
const {
|
|
38512
|
+
key
|
|
38513
|
+
} = event;
|
|
38514
|
+
const validKeys = ['Escape', 'Enter', 'ArrowUp', 'ArrowDown'];
|
|
38515
|
+
if (validKeys.includes(key)) {
|
|
38516
|
+
event.preventDefault();
|
|
38517
|
+
const options = this.filterOptions(this.options);
|
|
38518
|
+
const focusedOptionIndex = this.getOptionIndex('focused');
|
|
38519
|
+
let newIndex;
|
|
38520
|
+
|
|
38521
|
+
// eslint-disable-next-line default-case
|
|
38522
|
+
switch (key) {
|
|
38523
|
+
case 'Escape':
|
|
38524
|
+
this.active = false;
|
|
38525
|
+
this.searchValue = '';
|
|
38526
|
+
break;
|
|
38527
|
+
case 'Enter':
|
|
38528
|
+
if (this.focusedOption && this.active) {
|
|
38529
|
+
this.handleSelect(this.focusedOption);
|
|
38530
|
+
}
|
|
38531
|
+
if (!this.active) {
|
|
38532
|
+
this.active = true;
|
|
38533
|
+
}
|
|
38534
|
+
break;
|
|
38535
|
+
case 'ArrowUp':
|
|
38536
|
+
case 'ArrowDown':
|
|
38537
|
+
if (this.multiple && !this.active) {
|
|
38538
|
+
this.active = true;
|
|
38539
|
+
await this.$nextTick();
|
|
38540
|
+
}
|
|
38541
|
+
newIndex = key === 'ArrowUp' ? Math.max(focusedOptionIndex - 1, 0) : Math.min(focusedOptionIndex + 1, options.length - 1);
|
|
38542
|
+
if (!this.active) {
|
|
38543
|
+
this.handleSelect(options[newIndex]);
|
|
38544
|
+
}
|
|
38545
|
+
break;
|
|
38546
|
+
}
|
|
38547
|
+
if (newIndex !== undefined && this.active) {
|
|
38548
|
+
this.scrollToOption(newIndex);
|
|
38549
|
+
}
|
|
38550
|
+
const newOption = options[newIndex === undefined ? focusedOptionIndex : newIndex];
|
|
38551
|
+
this.focusedOption = newOption;
|
|
38552
|
+
}
|
|
38553
|
+
}
|
|
38554
|
+
}
|
|
38555
|
+
});
|
|
38556
|
+
// CONCATENATED MODULE: ./src/components/SelectSmart/SelectSmart.vue?vue&type=script&lang=js&
|
|
38557
|
+
/* harmony default export */ var SelectSmart_SelectSmartvue_type_script_lang_js_ = (SelectSmartvue_type_script_lang_js_);
|
|
38558
|
+
// EXTERNAL MODULE: ./src/components/SelectSmart/SelectSmart.vue?vue&type=style&index=0&lang=scss&
|
|
38559
|
+
var SelectSmartvue_type_style_index_0_lang_scss_ = __webpack_require__("1f90");
|
|
38560
|
+
|
|
38561
|
+
// CONCATENATED MODULE: ./src/components/SelectSmart/SelectSmart.vue
|
|
38562
|
+
|
|
38563
|
+
|
|
38564
|
+
|
|
38565
|
+
|
|
38566
|
+
|
|
38567
|
+
|
|
38568
|
+
/* normalize component */
|
|
38569
|
+
|
|
38570
|
+
var SelectSmart_component = normalizeComponent(
|
|
38571
|
+
SelectSmart_SelectSmartvue_type_script_lang_js_,
|
|
38572
|
+
SelectSmartvue_type_template_id_672daeb4_render,
|
|
38573
|
+
SelectSmartvue_type_template_id_672daeb4_staticRenderFns,
|
|
38574
|
+
false,
|
|
38575
|
+
null,
|
|
38576
|
+
null,
|
|
38577
|
+
null
|
|
38578
|
+
|
|
38579
|
+
)
|
|
38580
|
+
|
|
38581
|
+
/* harmony default export */ var SelectSmart = (SelectSmart_component.exports);
|
|
38582
|
+
// 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&
|
|
38583
|
+
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:{
|
|
38584
|
+
'unnnic-select__options': true,
|
|
38585
|
+
'unnnic-select__options--active': _vm.active,
|
|
38586
|
+
'unnnic-select__options--inactive': !_vm.active,
|
|
38587
|
+
},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)}
|
|
38588
|
+
var Selectvue_type_template_id_36a43709_staticRenderFns = []
|
|
38589
|
+
|
|
38590
|
+
|
|
38591
|
+
// CONCATENATED MODULE: ./src/components/Select/Select.vue?vue&type=template&id=36a43709&
|
|
38592
|
+
|
|
38593
|
+
// 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&
|
|
38594
|
+
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:{
|
|
38595
|
+
'unnnic-select-item': true,
|
|
38596
|
+
'unnnic-select-item__active': _vm.active,
|
|
38597
|
+
'unnnic--clickable': _vm.selectable,
|
|
38598
|
+
'unnnic-select-item--selectable': _vm.selectable,
|
|
38599
|
+
'text-focused': _vm.textFocused,
|
|
38600
|
+
},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)])}
|
|
38601
|
+
var SelectItemvue_type_template_id_d2fb7cfc_staticRenderFns = []
|
|
38602
|
+
|
|
38603
|
+
|
|
38604
|
+
// CONCATENATED MODULE: ./src/components/Select/SelectItem.vue?vue&type=template&id=d2fb7cfc&
|
|
38605
|
+
|
|
38606
|
+
// 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&
|
|
38607
|
+
//
|
|
38608
|
+
//
|
|
38609
|
+
//
|
|
38610
|
+
//
|
|
38611
|
+
//
|
|
38612
|
+
//
|
|
38613
|
+
//
|
|
38614
|
+
//
|
|
38615
|
+
//
|
|
38616
|
+
//
|
|
38617
|
+
//
|
|
38618
|
+
//
|
|
38619
|
+
//
|
|
38620
|
+
//
|
|
38621
|
+
//
|
|
38622
|
+
//
|
|
38623
|
+
|
|
38624
|
+
/* harmony default export */ var SelectItemvue_type_script_lang_js_ = ({
|
|
38625
|
+
name: 'UnnicSelectItem',
|
|
38626
|
+
props: {
|
|
38627
|
+
size: {
|
|
38628
|
+
type: String,
|
|
38629
|
+
default: ''
|
|
38630
|
+
},
|
|
38631
|
+
selectable: {
|
|
38632
|
+
type: Boolean,
|
|
38633
|
+
default: true
|
|
38634
|
+
},
|
|
38635
|
+
active: {
|
|
38636
|
+
type: Boolean,
|
|
38637
|
+
default: false
|
|
38638
|
+
},
|
|
38639
|
+
textFocused: {
|
|
38640
|
+
type: Boolean,
|
|
38641
|
+
default: false
|
|
38642
|
+
}
|
|
38643
|
+
}
|
|
38644
|
+
});
|
|
38645
|
+
// CONCATENATED MODULE: ./src/components/Select/SelectItem.vue?vue&type=script&lang=js&
|
|
38646
|
+
/* harmony default export */ var Select_SelectItemvue_type_script_lang_js_ = (SelectItemvue_type_script_lang_js_);
|
|
38647
|
+
// EXTERNAL MODULE: ./src/components/Select/SelectItem.vue?vue&type=style&index=0&lang=scss&
|
|
38648
|
+
var SelectItemvue_type_style_index_0_lang_scss_ = __webpack_require__("4cd7");
|
|
38649
|
+
|
|
38650
|
+
// CONCATENATED MODULE: ./src/components/Select/SelectItem.vue
|
|
38651
|
+
|
|
38652
|
+
|
|
38653
|
+
|
|
38654
|
+
|
|
38655
|
+
|
|
38656
|
+
|
|
38657
|
+
/* normalize component */
|
|
38658
|
+
|
|
38659
|
+
var SelectItem_component = normalizeComponent(
|
|
38660
|
+
Select_SelectItemvue_type_script_lang_js_,
|
|
38661
|
+
SelectItemvue_type_template_id_d2fb7cfc_render,
|
|
38662
|
+
SelectItemvue_type_template_id_d2fb7cfc_staticRenderFns,
|
|
38663
|
+
false,
|
|
38664
|
+
null,
|
|
38665
|
+
null,
|
|
38666
|
+
null
|
|
38667
|
+
|
|
38668
|
+
)
|
|
38669
|
+
|
|
38670
|
+
/* harmony default export */ var SelectItem = (SelectItem_component.exports);
|
|
37932
38671
|
// 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&
|
|
37933
38672
|
|
|
37934
38673
|
//
|
|
@@ -43240,6 +43979,7 @@ var ProgressBar_component = normalizeComponent(
|
|
|
43240
43979
|
|
|
43241
43980
|
|
|
43242
43981
|
|
|
43982
|
+
|
|
43243
43983
|
|
|
43244
43984
|
|
|
43245
43985
|
const components = {
|
|
@@ -43274,6 +44014,7 @@ const components = {
|
|
|
43274
44014
|
unnnicModal: Modal,
|
|
43275
44015
|
unnnicModalNext: ModalNext,
|
|
43276
44016
|
unnnicModalUpload: ModalUpload,
|
|
44017
|
+
unnnicSelectSmart: SelectSmart,
|
|
43277
44018
|
unnnicSelect: Select,
|
|
43278
44019
|
unnnicSelectItem: SelectItem,
|
|
43279
44020
|
unnnicSelectListItem: SelectListItem,
|
|
@@ -43348,6 +44089,7 @@ const unnniclanguageSelect = LanguageSelect;
|
|
|
43348
44089
|
const unnnicModal = Modal;
|
|
43349
44090
|
const unnnicModalNext = ModalNext;
|
|
43350
44091
|
const unnnicModalUpload = ModalUpload;
|
|
44092
|
+
const unnnicSelectSmart = SelectSmart;
|
|
43351
44093
|
const unnnicSelect = Select;
|
|
43352
44094
|
const unnnicSelectItem = SelectItem;
|
|
43353
44095
|
const unnnicSelectListItem = SelectListItem;
|