wave-ui 1.69.0 → 1.70.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.
Files changed (32) hide show
  1. package/dist/wave-ui.cjs.js +1 -1
  2. package/dist/wave-ui.css +1 -1
  3. package/dist/wave-ui.es.js +390 -69
  4. package/dist/wave-ui.umd.js +1 -1
  5. package/package.json +13 -13
  6. package/src/wave-ui/components/index.js +1 -0
  7. package/src/wave-ui/components/transitions/w-transition-expand.vue +2 -4
  8. package/src/wave-ui/components/w-accordion.vue +1 -4
  9. package/src/wave-ui/components/w-alert.vue +1 -4
  10. package/src/wave-ui/components/w-autocomplete.vue +404 -0
  11. package/src/wave-ui/components/w-badge.vue +1 -0
  12. package/src/wave-ui/components/w-button/button.vue +3 -8
  13. package/src/wave-ui/components/w-card.vue +2 -0
  14. package/src/wave-ui/components/w-drawer.vue +2 -8
  15. package/src/wave-ui/components/w-icon.vue +1 -1
  16. package/src/wave-ui/components/w-image.vue +2 -8
  17. package/src/wave-ui/components/w-input.vue +17 -16
  18. package/src/wave-ui/components/w-list.vue +1 -4
  19. package/src/wave-ui/components/w-notification-manager.vue +3 -3
  20. package/src/wave-ui/components/w-progress.vue +2 -8
  21. package/src/wave-ui/components/w-rating.vue +1 -4
  22. package/src/wave-ui/components/w-select.vue +66 -34
  23. package/src/wave-ui/components/w-slider.vue +6 -5
  24. package/src/wave-ui/components/w-spinner.vue +2 -0
  25. package/src/wave-ui/components/w-switch.vue +1 -1
  26. package/src/wave-ui/components/w-table.vue +220 -210
  27. package/src/wave-ui/components/w-tabs/index.vue +1 -4
  28. package/src/wave-ui/components/w-tag.vue +1 -4
  29. package/src/wave-ui/components/w-textarea.vue +0 -1
  30. package/src/wave-ui/components/w-timeline.vue +1 -0
  31. package/src/wave-ui/components/w-tree.vue +7 -7
  32. package/src/wave-ui/scss/_variables.scss +1 -1
@@ -586,7 +586,7 @@ const _WaveUI = class {
586
586
  let WaveUI = _WaveUI;
587
587
  __publicField(WaveUI, "instance", null);
588
588
  __publicField(WaveUI, "vueInstance", null);
589
- var render$S = function() {
589
+ var render$T = function() {
590
590
  var _vm = this;
591
591
  var _h = _vm.$createElement;
592
592
  var _c = _vm._self._c || _h;
@@ -619,7 +619,7 @@ var render$S = function() {
619
619
  }, { "item": _vm.getOriginalItem(item), "expanded": item._expanded, "index": i + 1 })], 2) : _vm._e()])], 1);
620
620
  }), 0);
621
621
  };
622
- var staticRenderFns$S = [];
622
+ var staticRenderFns$T = [];
623
623
  var wAccordion_vue_vue_type_style_index_0_lang = "";
624
624
  function normalizeComponent(scriptExports, render2, staticRenderFns2, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
625
625
  var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports;
@@ -675,7 +675,7 @@ function normalizeComponent(scriptExports, render2, staticRenderFns2, functional
675
675
  options
676
676
  };
677
677
  }
678
- const __vue2_script$S = {
678
+ const __vue2_script$T = {
679
679
  name: "w-accordion",
680
680
  props: {
681
681
  value: { type: Array },
@@ -764,26 +764,26 @@ const __vue2_script$S = {
764
764
  }
765
765
  }
766
766
  };
767
- const __cssModules$S = {};
768
- var __component__$S = /* @__PURE__ */ normalizeComponent(
769
- __vue2_script$S,
770
- render$S,
771
- staticRenderFns$S,
767
+ const __cssModules$T = {};
768
+ var __component__$T = /* @__PURE__ */ normalizeComponent(
769
+ __vue2_script$T,
770
+ render$T,
771
+ staticRenderFns$T,
772
772
  false,
773
- __vue2_injectStyles$S,
773
+ __vue2_injectStyles$T,
774
774
  null,
775
775
  null,
776
776
  null
777
777
  );
778
- function __vue2_injectStyles$S(context) {
779
- for (let o in __cssModules$S) {
780
- this[o] = __cssModules$S[o];
778
+ function __vue2_injectStyles$T(context) {
779
+ for (let o in __cssModules$T) {
780
+ this[o] = __cssModules$T[o];
781
781
  }
782
782
  }
783
783
  var wAccordion = /* @__PURE__ */ function() {
784
- return __component__$S.exports;
784
+ return __component__$T.exports;
785
785
  }();
786
- var render$R = function() {
786
+ var render$S = function() {
787
787
  var _vm = this;
788
788
  var _h = _vm.$createElement;
789
789
  var _c = _vm._self._c || _h;
@@ -793,9 +793,9 @@ var render$R = function() {
793
793
  _vm.$emit("close", false);
794
794
  } } }) : _vm._e()] : _vm._t("default")], 2) : _vm._e();
795
795
  };
796
- var staticRenderFns$R = [];
796
+ var staticRenderFns$S = [];
797
797
  var wAlert_vue_vue_type_style_index_0_lang = "";
798
- const __vue2_script$R = {
798
+ const __vue2_script$S = {
799
799
  name: "w-alert",
800
800
  props: {
801
801
  value: { default: true },
@@ -871,6 +871,282 @@ const __vue2_script$R = {
871
871
  }
872
872
  }
873
873
  };
874
+ const __cssModules$S = {};
875
+ var __component__$S = /* @__PURE__ */ normalizeComponent(
876
+ __vue2_script$S,
877
+ render$S,
878
+ staticRenderFns$S,
879
+ false,
880
+ __vue2_injectStyles$S,
881
+ null,
882
+ null,
883
+ null
884
+ );
885
+ function __vue2_injectStyles$S(context) {
886
+ for (let o in __cssModules$S) {
887
+ this[o] = __cssModules$S[o];
888
+ }
889
+ }
890
+ var wAlert = /* @__PURE__ */ function() {
891
+ return __component__$S.exports;
892
+ }();
893
+ var render$R = function() {
894
+ var _vm = this;
895
+ var _h = _vm.$createElement;
896
+ var _c = _vm._self._c || _h;
897
+ return _c("div", { staticClass: "w-autocomplete", class: _vm.classes, on: { "click": _vm.onClick } }, [_vm.selection.length ? _vm._l(_vm.selection, function(item, i) {
898
+ return _c("div", { staticClass: "w-autocomplete__selection" }, [_vm._t("selection", function() {
899
+ return [_c("span", { domProps: { "innerHTML": _vm._s(item[_vm.itemLabelKey]) } }), _c("w-button", { attrs: { "icon": "wi-cross", "xs": "", "text": "", "color": "currentColor" }, on: { "click": function($event) {
900
+ $event.stopPropagation();
901
+ return _vm.unselectItem(i);
902
+ } } })];
903
+ }, { "item": item, "unselect": function(i2) {
904
+ return _vm.unselectItem(i2);
905
+ } })], 2);
906
+ }) : _vm._e(), !_vm.selection.length && !_vm.keywords && _vm.placeholder ? _c("div", { staticClass: "w-autocomplete__placeholder", domProps: { "innerHTML": _vm._s(_vm.placeholder) } }) : _vm._e(), _c("input", _vm._g({ ref: "input", staticClass: "w-autocomplete__input", domProps: { "value": _vm.keywords } }, _vm.inputEventListeners)), _c("w-transition-slide-fade", [_vm.menuOpen ? _c("ul", { ref: "menu", staticClass: "w-autocomplete__menu", on: { "mousedown": function($event) {
907
+ _vm.menuIsBeingClicked = true;
908
+ }, "mouseup": _vm.setEndOfMenuClick, "touchstart": function($event) {
909
+ _vm.menuIsBeingClicked = true;
910
+ }, "touchend": _vm.setEndOfMenuClick } }, [_vm._l(_vm.filteredItems, function(item, i) {
911
+ return _c("li", { key: i, class: { highlighted: _vm.highlightedItem === item.uid }, on: { "click": function($event) {
912
+ $event.stopPropagation();
913
+ _vm.selectItem(item), _vm.$emit("item-click", item);
914
+ } } }, [_vm._t("item", function() {
915
+ return [_c("span", { domProps: { "innerHTML": _vm._s(item[_vm.itemLabelKey]) } })];
916
+ }, { "item": item, "highlighted": _vm.highlightedItem === item.uid })], 2);
917
+ }), !_vm.filteredItems.length ? _c("li", { staticClass: "w-autocomplete__no-match", class: { "w-autocomplete__no-match--default": !_vm.$slots.noMatch } }, [_vm._t("no-match", function() {
918
+ return [_c("div", { staticClass: "caption", domProps: { "innerHTML": _vm._s(_vm.noMatch !== void 0 ? _vm.noMatch : "No match.") } })];
919
+ })], 2) : _vm._e(), _vm.$slots["extra-item"] ? _c("li", { staticClass: "w-autocomplete__extra-item", class: { highlighted: _vm.highlightedItem === "extra-item" }, on: { "click": _vm.selectExtraItem } }, [_vm._t("extra-item")], 2) : _vm._e()], 2) : _vm._e()])], 2);
920
+ };
921
+ var staticRenderFns$R = [];
922
+ var wAutocomplete_vue_vue_type_style_index_0_lang = "";
923
+ const __vue2_script$R = {
924
+ name: "w-autocomplete",
925
+ props: {
926
+ items: { type: Array, required: true },
927
+ value: { type: [String, Number, Array] },
928
+ placeholder: { type: String },
929
+ openOnKeydown: { type: Boolean },
930
+ multiple: { type: Boolean },
931
+ allowDuplicates: { type: Boolean },
932
+ noMatch: { type: String },
933
+ itemValueKey: { type: String, default: "value" },
934
+ itemLabelKey: { type: String, default: "label" },
935
+ itemSearchableKey: { type: String, default: "searchable" }
936
+ },
937
+ emits: ["update:modelValue", "input", "focus", "blur", "keydown", "item-click", "item-select", "extra-item-select"],
938
+ data: () => ({
939
+ keywords: "",
940
+ selection: [],
941
+ menuOpen: false,
942
+ highlightedItem: null,
943
+ menuIsBeingClicked: false
944
+ }),
945
+ computed: {
946
+ normalizedKeywords() {
947
+ return this.normalize(this.keywords);
948
+ },
949
+ normalizedSelection() {
950
+ return this.selection.map((item) => this.normalize(item == null ? void 0 : item.searchable));
951
+ },
952
+ optimizedItemsForSearch() {
953
+ return this.items.map((item, i) => ({
954
+ ...item,
955
+ uid: i,
956
+ searchable: this.normalize(item[this.itemSearchableKey] || "")
957
+ }));
958
+ },
959
+ filteredItems() {
960
+ let items = this.optimizedItemsForSearch;
961
+ const selection = this.normalizedSelection.join(",");
962
+ const isItemNotSelected = (item) => !selection.includes(item.searchable);
963
+ if (this.keywords) {
964
+ items = items.filter((item) => {
965
+ if (!item.searchable.includes(this.normalizedKeywords))
966
+ return false;
967
+ else if (this.multiple && !this.allowDuplicates)
968
+ return isItemNotSelected(item);
969
+ else
970
+ return true;
971
+ });
972
+ } else if (this.multiple && !this.allowDuplicates)
973
+ items = items.filter(isItemNotSelected);
974
+ return items;
975
+ },
976
+ highlightedItemIndex() {
977
+ if (this.highlightedItem === null)
978
+ return -1;
979
+ else if (this.highlightedItem === "extra-item")
980
+ return this.filteredItems.length;
981
+ return this.filteredItems.findIndex((item) => item.uid === this.highlightedItem);
982
+ },
983
+ inputEventListeners() {
984
+ return {
985
+ ...this.$attrs,
986
+ input: (e) => {
987
+ this.keywords = e.target.value;
988
+ },
989
+ focus: (e) => {
990
+ if (this.menuIsBeingClicked)
991
+ return;
992
+ this.onFocus(e);
993
+ this.$emit("focus", e);
994
+ },
995
+ blur: (e) => {
996
+ if (!this.menuIsBeingClicked)
997
+ this.$emit("blur", e);
998
+ },
999
+ keydown: (e) => {
1000
+ this.onKeydown(e);
1001
+ this.$emit("keydown", e);
1002
+ },
1003
+ drop: this.onDrop,
1004
+ compositionstart: this.onCompositionStart,
1005
+ compositionupdate: this.onCompositionUpdate
1006
+ };
1007
+ },
1008
+ classes() {
1009
+ return {
1010
+ "w-autocomplete--open": this.menuOpen,
1011
+ "w-autocomplete--filled": this.selection.length,
1012
+ "w-autocomplete--has-keywords": this.keywords,
1013
+ "w-autocomplete--empty": !this.selection.length && !this.keywords
1014
+ };
1015
+ }
1016
+ },
1017
+ methods: {
1018
+ normalize(string) {
1019
+ return string.toLowerCase().normalize("NFKD").replace(/\p{Diacritic}/gu, "").replace(/œ/g, "oe");
1020
+ },
1021
+ selectItem(item) {
1022
+ if (!this.multiple)
1023
+ this.selection = [];
1024
+ this.selection.push(item);
1025
+ this.highlightedItem = item.uid;
1026
+ this.keywords = "";
1027
+ const emitPayload = this.multiple ? this.selection.map((item2) => item2[this.itemValueKey]) : item[this.itemValueKey];
1028
+ this.$emit("item-select", item);
1029
+ this.$emit("update:modelValue", emitPayload);
1030
+ this.$emit("input", emitPayload);
1031
+ this.$refs.input.focus();
1032
+ if (!this.multiple)
1033
+ this.closeMenu();
1034
+ },
1035
+ unselectItem(i) {
1036
+ this.selection.splice(i != null ? i : this.selection.length - 1, 1);
1037
+ this.highlightedItem = null;
1038
+ this.$emit("update:modelValue", null);
1039
+ this.$emit("input", null);
1040
+ this.$refs.input.focus();
1041
+ },
1042
+ selectExtraItem() {
1043
+ this.keywords = "";
1044
+ this.$emit("extra-item-select");
1045
+ this.closeMenu();
1046
+ },
1047
+ setEndOfMenuClick() {
1048
+ setTimeout(() => this.menuIsBeingClicked = false, 100);
1049
+ },
1050
+ onClick() {
1051
+ if (!this.openOnKeydown)
1052
+ this.openMenu();
1053
+ this.$refs.input.focus();
1054
+ },
1055
+ onFocus() {
1056
+ if (!this.openOnKeydown)
1057
+ this.openMenu();
1058
+ },
1059
+ onKeydown(e) {
1060
+ var _a;
1061
+ const itemsCount = this.filteredItems.length + (this.$slots["extra-item"] ? 1 : 0);
1062
+ if (!this.openOnKeydown || (this.keywords || e.key.length === 1) && !this.menuOpen)
1063
+ this.openMenu();
1064
+ if (e.keyCode === 9)
1065
+ this.closeMenu();
1066
+ else if (e.keyCode === 8 && (!this.keywords || !e.target.selectionStart && !e.target.selectionEnd)) {
1067
+ this.unselectItem();
1068
+ } else if (e.keyCode === 13) {
1069
+ e.preventDefault();
1070
+ if (this.highlightedItem === "extra-item")
1071
+ this.selectExtraItem();
1072
+ else if (this.highlightedItemIndex >= 0)
1073
+ this.selectItem(this.filteredItems[this.highlightedItemIndex]);
1074
+ } else if ([38, 40].includes(e.keyCode)) {
1075
+ e.preventDefault();
1076
+ let index2 = this.highlightedItemIndex;
1077
+ if (index2 === -1)
1078
+ index2 = e.keyCode === 38 ? itemsCount - 1 : 0;
1079
+ else
1080
+ index2 = (index2 + (e.keyCode === 38 ? -1 : 1) + itemsCount) % itemsCount;
1081
+ if (this.$slots["extra-item"] && index2 === itemsCount - 1)
1082
+ this.highlightedItem = "extra-item";
1083
+ else
1084
+ this.highlightedItem = ((_a = this.filteredItems[index2]) == null ? void 0 : _a.uid) || 0;
1085
+ const menuEl = this.$refs.menu;
1086
+ if (menuEl) {
1087
+ if (this.$slots["extra-item"] && index2 === itemsCount - 1)
1088
+ menuEl.scrollTop = menuEl.scrollHeight;
1089
+ else {
1090
+ const { offsetHeight: itemElHeight, offsetTop: itemElTop } = menuEl.childNodes[index2] || {};
1091
+ if (menuEl.scrollTop + menuEl.offsetHeight - itemElHeight < itemElTop) {
1092
+ menuEl.scrollTop = itemElTop - menuEl.offsetHeight + itemElHeight;
1093
+ } else if (menuEl.scrollTop > itemElTop)
1094
+ menuEl.scrollTop = itemElTop;
1095
+ }
1096
+ }
1097
+ } else if (!this.multiple && this.selection.length && e.key.length === 1)
1098
+ e.preventDefault();
1099
+ },
1100
+ onDrop(e) {
1101
+ if (!this.multiple && this.selection.length)
1102
+ e.preventDefault();
1103
+ },
1104
+ onCompositionStart(e) {
1105
+ if (!this.multiple && this.selection.length)
1106
+ e.target.setAttribute("readonly", true);
1107
+ },
1108
+ onCompositionUpdate(e) {
1109
+ if (!this.multiple && this.selection.length)
1110
+ setTimeout(() => e.target.removeAttribute("readonly"), 200);
1111
+ },
1112
+ openMenu() {
1113
+ if (this.menuOpen)
1114
+ return;
1115
+ this.menuOpen = true;
1116
+ document.addEventListener("click", this.onDocumentClick);
1117
+ },
1118
+ closeMenu() {
1119
+ this.menuOpen = false;
1120
+ document.removeEventListener("click", this.onDocumentClick);
1121
+ },
1122
+ onDocumentClick(e) {
1123
+ if (!this.$el.contains(e.target) && !this.$el.isSameNode(e.target))
1124
+ this.closeMenu();
1125
+ }
1126
+ },
1127
+ created() {
1128
+ if (this.value) {
1129
+ const arrayOfValues = Array.isArray(this.value) ? this.value : [this.value];
1130
+ arrayOfValues.forEach((value) => {
1131
+ this.selection.push(this.optimizedItemsForSearch.find((item) => item[this.itemValueKey] === +value));
1132
+ });
1133
+ }
1134
+ },
1135
+ beforeDestroy() {
1136
+ document.removeEventListener("click", this.onDocumentClick);
1137
+ },
1138
+ watch: {
1139
+ value(value) {
1140
+ this.selection = [];
1141
+ if (value) {
1142
+ const arrayOfValues = Array.isArray(value) ? value : [value];
1143
+ arrayOfValues.forEach((value2) => {
1144
+ this.selection.push(this.optimizedItemsForSearch.find((item) => item[this.itemValueKey] === +value2));
1145
+ });
1146
+ }
1147
+ }
1148
+ }
1149
+ };
874
1150
  const __cssModules$R = {};
875
1151
  var __component__$R = /* @__PURE__ */ normalizeComponent(
876
1152
  __vue2_script$R,
@@ -887,7 +1163,7 @@ function __vue2_injectStyles$R(context) {
887
1163
  this[o] = __cssModules$R[o];
888
1164
  }
889
1165
  }
890
- var wAlert = /* @__PURE__ */ function() {
1166
+ var wAutocomplete = /* @__PURE__ */ function() {
891
1167
  return __component__$R.exports;
892
1168
  }();
893
1169
  var render$Q = function() {
@@ -3032,9 +3308,11 @@ var render$w = function() {
3032
3308
  _vm.inputValue = $event.target.value;
3033
3309
  } } }) : [_vm.labelPosition === "left" ? [_vm.$slots.default || _vm.label ? _c("label", { staticClass: "w-input__label w-input__label--left w-form-el-shakable", class: _vm.labelClasses, attrs: { "for": "w-input--" + _vm._uid } }, [_vm._t("default", function() {
3034
3310
  return [_vm._v(_vm._s(_vm.label))];
3035
- })], 2) : _vm._e()] : _vm._e(), _c("div", { staticClass: "w-input__input-wrap", class: _vm.inputWrapClasses }, [_vm.innerIconLeft ? _c("w-icon", { staticClass: "w-input__icon w-input__icon--inner-left", attrs: { "tag": "label", "for": "w-input--" + _vm._uid }, on: { "click": function($event) {
3036
- return _vm.$emit("click:inner-icon-left", $event);
3037
- } } }, [_vm._v(_vm._s(_vm.innerIconLeft))]) : _vm._e(), _vm.type === "checkbox" && _vm.type !== "file" ? _c("input", _vm._g(_vm._b({ directives: [{ name: "model", rawName: "v-model", value: _vm.inputValue, expression: "inputValue" }], ref: "input", staticClass: "w-input__input", attrs: { "id": "w-input--" + _vm._uid, "name": _vm.inputName, "placeholder": _vm.placeholder || null, "step": _vm.step || null, "min": _vm.min || null, "max": _vm.max || null, "minlength": _vm.minlength || null, "maxlength": _vm.maxlength || null, "readonly": _vm.isReadonly || null, "aria-readonly": _vm.isReadonly ? "true" : "false", "disabled": _vm.isDisabled || null, "required": _vm.required || null, "tabindex": _vm.tabindex || null, "type": "checkbox" }, domProps: { "checked": Array.isArray(_vm.inputValue) ? _vm._i(_vm.inputValue, null) > -1 : _vm.inputValue }, on: { "input": _vm.onInput, "focus": _vm.onFocus, "blur": _vm.onBlur, "change": function($event) {
3311
+ })], 2) : _vm._e()] : _vm._e(), _c("div", { staticClass: "w-input__input-wrap", class: _vm.inputWrapClasses }, [_vm._t("icon-left", function() {
3312
+ return [_vm.innerIconLeft ? _c("w-icon", { staticClass: "w-input__icon w-input__icon--inner-left", attrs: { "tag": "label", "for": "w-input--" + _vm._uid }, on: { "click": function($event) {
3313
+ return _vm.$emit("click:inner-icon-left", $event);
3314
+ } } }, [_vm._v(_vm._s(_vm.innerIconLeft))]) : _vm._e()];
3315
+ }, { "inputId": "w-input--" + _vm._uid }), _vm.type === "checkbox" && _vm.type !== "file" ? _c("input", _vm._g(_vm._b({ directives: [{ name: "model", rawName: "v-model", value: _vm.inputValue, expression: "inputValue" }], ref: "input", staticClass: "w-input__input", attrs: { "id": "w-input--" + _vm._uid, "name": _vm.inputName, "placeholder": _vm.placeholder || null, "step": _vm.step || null, "min": _vm.min || null, "max": _vm.max || null, "minlength": _vm.minlength || null, "maxlength": _vm.maxlength || null, "readonly": _vm.isReadonly || null, "aria-readonly": _vm.isReadonly ? "true" : "false", "disabled": _vm.isDisabled || null, "required": _vm.required || null, "tabindex": _vm.tabindex || null, "type": "checkbox" }, domProps: { "checked": Array.isArray(_vm.inputValue) ? _vm._i(_vm.inputValue, null) > -1 : _vm.inputValue }, on: { "input": _vm.onInput, "focus": _vm.onFocus, "blur": _vm.onBlur, "change": function($event) {
3038
3316
  var $$a = _vm.inputValue, $$el = $event.target, $$c = $$el.checked ? true : false;
3039
3317
  if (Array.isArray($$a)) {
3040
3318
  var $$v = null, $$i = _vm._i($$a, $$v);
@@ -3057,11 +3335,13 @@ var render$w = function() {
3057
3335
  return [_vm.$slots["no-file"] === void 0 ? [_vm._v("No file")] : _vm._e()];
3058
3336
  })], 2) : _vm._e(), _vm._l(_vm.inputFiles, function(file, i) {
3059
3337
  return _c("span", { key: file.lastModified }, [_vm._v(_vm._s(i ? ", " : "")), _c("span", { key: i + "b", staticClass: "filename" }, [_vm._v(_vm._s(file.base))]), _vm._v(_vm._s(file.extension ? "." + file.extension : ""))]);
3060
- })], 2)], _vm.labelPosition === "inside" && _vm.showLabelInside ? [_vm.$slots.default || _vm.label ? _c("label", { staticClass: "w-input__label w-input__label--inside w-form-el-shakable", class: _vm.labelClasses, attrs: { "for": "w-input--" + _vm._uid } }, [_vm._t("default", function() {
3338
+ })], 2)], _vm.labelPosition === "inside" && _vm.showLabelInside && (_vm.$slots.default || _vm.label) ? _c("label", { staticClass: "w-input__label w-input__label--inside w-form-el-shakable", class: _vm.labelClasses }, [_vm._t("default", function() {
3061
3339
  return [_vm._v(_vm._s(_vm.label))];
3062
- })], 2) : _vm._e()] : _vm._e(), _vm.innerIconRight ? _c("w-icon", { staticClass: "w-input__icon w-input__icon--inner-right", attrs: { "tag": "label", "for": "w-input--" + _vm._uid }, on: { "click": function($event) {
3063
- return _vm.$emit("click:inner-icon-right", $event);
3064
- } } }, [_vm._v(_vm._s(_vm.innerIconRight))]) : _vm._e(), _vm.hasLoading || _vm.showProgress && (_vm.uploadInProgress || _vm.uploadComplete) ? _c("w-progress", { staticClass: "fill-width", attrs: { "size": "2", "color": _vm.progressColor || _vm.color, "value": _vm.showProgress ? (_vm.uploadInProgress || _vm.uploadComplete) && _vm.overallFilesProgress : _vm.loadingValue } }) : _vm._e()], 2), _vm.type === "file" && _vm.preview && _vm.inputFiles.length ? _c("label", { staticClass: "d-flex", attrs: { "for": "w-input--" + _vm._uid } }, [_vm._l(_vm.inputFiles, function(file, i) {
3340
+ })], 2) : _vm._e(), _vm._t("icon-right", function() {
3341
+ return [_vm.innerIconRight ? _c("w-icon", { staticClass: "w-input__icon w-input__icon--inner-right", attrs: { "tag": "label", "for": "w-input--" + _vm._uid }, on: { "click": function($event) {
3342
+ return _vm.$emit("click:inner-icon-right", $event);
3343
+ } } }, [_vm._v(_vm._s(_vm.innerIconRight))]) : _vm._e()];
3344
+ }, { "inputId": "w-input--" + _vm._uid }), _vm.hasLoading || _vm.showProgress && (_vm.uploadInProgress || _vm.uploadComplete) ? _c("w-progress", { staticClass: "fill-width", attrs: { "size": "2", "color": _vm.progressColor || _vm.color, "value": _vm.showProgress ? (_vm.uploadInProgress || _vm.uploadComplete) && _vm.overallFilesProgress : _vm.loadingValue } }) : _vm._e()], 2), _vm.type === "file" && _vm.preview && _vm.inputFiles.length ? _c("label", { staticClass: "d-flex", attrs: { "for": "w-input--" + _vm._uid } }, [_vm._l(_vm.inputFiles, function(file, i) {
3065
3345
  return [file.progress < 100 ? _c("i", { key: i, staticClass: "w-icon wi-spinner w-icon--spin size--sm w-input__file-preview primary" }) : file.preview ? _c("img", { key: i, staticClass: "w-input__file-preview", attrs: { "src": file.preview, "alt": "" } }) : _c("i", { key: i, staticClass: "w-icon w-input__file-preview primary size--md", class: _vm.preview && typeof _vm.preview === "string" ? _vm.preview : "wi-file" })];
3066
3346
  })], 2) : _vm._e(), _vm.labelPosition === "right" ? [_vm.$slots.default || _vm.label ? _c("label", { staticClass: "w-input__label w-input__label--right w-form-el-shakable", class: _vm.labelClasses, attrs: { "for": "w-input--" + _vm._uid } }, [_vm._t("default", function() {
3067
3347
  return [_vm._v(_vm._s(_vm.label))];
@@ -3157,7 +3437,7 @@ const __vue2_script$w = {
3157
3437
  overallFilesProgress() {
3158
3438
  const progress = +this.inputFiles.reduce((total2, file) => total2 + file.progress, 0);
3159
3439
  const total = progress / this.inputFiles.length;
3160
- this.$emit("update:overallProgress", this.inputFiles.length ? total : void 0);
3440
+ this.$emit("update:overallProgress", this.inputFiles.length ? total : 0);
3161
3441
  return total;
3162
3442
  },
3163
3443
  uploadInProgress() {
@@ -5015,24 +5295,23 @@ var render$l = function() {
5015
5295
  return _vm.$refs["selection-input"].click();
5016
5296
  } } }, [_vm._t("default", function() {
5017
5297
  return [_vm._v(_vm._s(_vm.label))];
5018
- })], 2) : _vm._e()] : _vm._e(), _c("w-menu", _vm._b({ attrs: { "menu-class": "w-select__menu " + (_vm.menuClass || ""), "transition": "slide-fade-down", "append-to": (_vm.menuProps || {}).appendTo !== void 0 ? (_vm.menuProps || {}).appendTo : void 0, "align-left": "", "custom": "", "min-width": "activator" }, on: { "close": _vm.closeMenu }, scopedSlots: _vm._u([{ key: "activator", fn: function(ref) {
5019
- ref.on;
5298
+ })], 2) : _vm._e()] : _vm._e(), _c("w-menu", _vm._b({ attrs: { "menu-class": "w-select__menu " + (_vm.menuClass || ""), "transition": "slide-fade-down", "append-to": (_vm.menuProps || {}).appendTo !== void 0 ? (_vm.menuProps || {}).appendTo : void 0, "align-left": "", "custom": "", "min-width": "activator" }, on: { "close": _vm.closeMenu }, scopedSlots: _vm._u([{ key: "activator", fn: function() {
5020
5299
  return [_c("div", { staticClass: "w-select__selection-wrap", class: _vm.inputWrapClasses, attrs: { "role": "button", "aria-haspopup": "listbox", "aria-expanded": _vm.showMenu ? "true" : "false", "aria-owns": "w-select-menu--" + _vm._uid, "aria-activedescendant": "w-select-menu--" + _vm._uid + "_item-1" }, on: { "click": function($event) {
5021
5300
  !_vm.isDisabled && !_vm.isReadonly && _vm.onInputFieldClick();
5022
5301
  } } }, [_vm.innerIconLeft ? _c("w-icon", { staticClass: "w-select__icon w-select__icon--inner-left", attrs: { "tag": "label" }, on: { "click": function($event) {
5023
5302
  return _vm.$emit("click:inner-icon-left", $event);
5024
- } } }, [_vm._v(_vm._s(_vm.innerIconLeft))]) : _vm._e(), _vm.$scopedSlots.selection ? _c("div", { staticClass: "w-select__selection-slot" }, [_vm._t("selection", null, { "item": _vm.multiple ? _vm.inputValue : _vm.inputValue[0] })], 2) : _vm._e(), _c("div", { ref: "selection-input", staticClass: "w-select__selection", class: { "w-select__selection--placeholder": !_vm.$scopedSlots.selection && !_vm.selectionString && _vm.placeholder }, attrs: { "contenteditable": _vm.isDisabled || _vm.isReadonly ? "false" : "true", "disabled": _vm.isDisabled || null, "readonly": "", "aria-readonly": "true", "tabindex": _vm.tabindex || null }, domProps: { "innerHTML": _vm._s((_vm.$scopedSlots.selection ? "" : _vm.selectionString) || _vm.placeholder) }, on: { "focus": function($event) {
5303
+ } } }, [_vm._v(_vm._s(_vm.innerIconLeft))]) : _vm._e(), _vm.$scopedSlots.selection ? _c("div", { staticClass: "w-select__selection-slot" }, [_vm._t("selection", null, { "item": _vm.multiple ? _vm.inputValue : _vm.inputValue[0] })], 2) : _vm._e(), _c("div", _vm._b({ ref: "selection-input", staticClass: "w-select__selection", domProps: { "innerHTML": _vm._s(_vm.selectionHtml) }, on: { "focus": function($event) {
5025
5304
  !_vm.isDisabled && !_vm.isReadonly && _vm.onFocus($event);
5026
5305
  }, "blur": _vm.onBlur, "keydown": function($event) {
5027
5306
  !_vm.isDisabled && !_vm.isReadonly && _vm.onKeydown($event);
5028
- } } }), _vm._l(_vm.inputValue.length ? _vm.inputValue : [{}], function(val, i) {
5307
+ } } }, "div", _vm.selectionAttributes, false)), _vm._l(_vm.inputValue.length ? _vm.inputValue : [{}], function(val, i) {
5029
5308
  return _c("input", { key: i, attrs: { "type": "hidden", "name": _vm.inputName + (_vm.multiple ? "[]" : "") }, domProps: { "value": val.value === void 0 ? "" : val.value.toString() } });
5030
5309
  }), _vm.labelPosition === "inside" && _vm.showLabelInside ? [_vm.$slots.default || _vm.label ? _c("label", { staticClass: "w-select__label w-select__label--inside w-form-el-shakable", class: _vm.labelClasses }, [_vm._t("default", function() {
5031
5310
  return [_vm._v(_vm._s(_vm.label))];
5032
5311
  })], 2) : _vm._e()] : _vm._e(), _vm.innerIconRight ? _c("w-icon", { staticClass: "w-select__icon w-select__icon--inner-right", attrs: { "tag": "label" }, on: { "click": function($event) {
5033
5312
  return _vm.$emit("click:inner-icon-right", $event);
5034
5313
  } } }, [_vm._v(_vm._s(_vm.innerIconRight))]) : _vm._e()], 2)];
5035
- } }], null, true), model: { value: _vm.showMenu, callback: function($$v) {
5314
+ }, proxy: true }], null, true), model: { value: _vm.showMenu, callback: function($$v) {
5036
5315
  _vm.showMenu = $$v;
5037
5316
  }, expression: "showMenu" } }, "w-menu", _vm.menuProps || {}, false), [_c("w-list", { ref: "w-list", attrs: { "value": _vm.inputValue, "items": _vm.selectItems, "multiple": _vm.multiple, "arrows-navigation": "", "return-object": "", "no-unselect": _vm.noUnselect, "selection-color": _vm.selectionColor, "add-ids": "w-select-menu--" + _vm._uid, "item-color-key": _vm.itemColorKey, "role": "listbox", "tabindex": "-1" }, on: { "input": _vm.onInput, "item-click": function($event) {
5038
5317
  return _vm.$emit("item-click", $event);
@@ -5040,6 +5319,8 @@ var render$l = function() {
5040
5319
  _vm.noUnselect && !_vm.multiple && _vm.closeMenu();
5041
5320
  }, "keydown:escape": function($event) {
5042
5321
  _vm.showMenu && (_vm.showMenu = false);
5322
+ } }, nativeOn: { "keydown": function($event) {
5323
+ return _vm.onWListKeydown.apply(null, arguments);
5043
5324
  } }, scopedSlots: _vm._u([_vm._l(_vm.items.length, function(i) {
5044
5325
  return { key: "item." + i, fn: function(ref) {
5045
5326
  var item = ref.item;
@@ -5102,7 +5383,8 @@ const __vue2_script$l = {
5102
5383
  showMenu: false,
5103
5384
  menuMinWidth: 0,
5104
5385
  isFocused: false,
5105
- selectionWrapRef: void 0
5386
+ selectionWrapRef: void 0,
5387
+ quickLookup: { string: "", timeout: null }
5106
5388
  }),
5107
5389
  computed: {
5108
5390
  selectItems() {
@@ -5113,30 +5395,45 @@ const __vue2_script$l = {
5113
5395
  return obj;
5114
5396
  });
5115
5397
  },
5116
- hasValue() {
5117
- return Array.isArray(this.inputValue) ? this.inputValue.length : this.inputValue !== null;
5118
- },
5119
5398
  hasLabel() {
5120
5399
  return this.label || this.$slots.default;
5121
5400
  },
5122
5401
  showLabelInside() {
5123
- return !this.staticLabel || !this.hasValue && !this.placeholder;
5402
+ return !this.staticLabel || !this.inputValue.length && !this.placeholder;
5403
+ },
5404
+ selectionAttributes() {
5405
+ var _a;
5406
+ return {
5407
+ class: { "w-select__selection--placeholder": !this.$scopedSlots.selection && !this.selectionString && this.placeholder },
5408
+ disabled: this.isDisabled || null,
5409
+ readonly: true,
5410
+ ariareadonly: "true",
5411
+ tabindex: (_a = this.tabindex) != null ? _a : null,
5412
+ contenteditable: this.isDisabled || this.isReadonly ? "false" : "true"
5413
+ };
5124
5414
  },
5125
5415
  selectionString() {
5126
- return this.inputValue && this.inputValue.map(
5416
+ return this.inputValue.map(
5127
5417
  (item) => {
5128
5418
  var _a;
5129
5419
  return item[this.itemValueKey] !== void 0 ? item[this.itemLabelKey] : (_a = item[this.itemLabelKey]) != null ? _a : item;
5130
5420
  }
5131
5421
  ).join(", ");
5132
5422
  },
5423
+ selectionHtml() {
5424
+ if (!this.inputValue.length)
5425
+ return this.placeholder || "";
5426
+ if (this.$scopedSlots.selection)
5427
+ return "";
5428
+ return this.selectionString;
5429
+ },
5133
5430
  classes() {
5134
5431
  return {
5135
5432
  "w-select": true,
5136
5433
  "w-select--disabled": this.isDisabled,
5137
5434
  "w-select--fit-to-content": this.fitToContent,
5138
5435
  "w-select--readonly": this.isReadonly,
5139
- [`w-select--${this.hasValue ? "filled" : "empty"}`]: true,
5436
+ [`w-select--${this.inputValue.length ? "filled" : "empty"}`]: true,
5140
5437
  "w-select--focused": (this.isFocused || this.showMenu) && !this.isReadonly,
5141
5438
  "w-select--dark": this.dark,
5142
5439
  "w-select--floating-label": this.hasLabel && this.labelPosition === "inside" && !this.staticLabel,
@@ -5210,6 +5507,26 @@ const __vue2_script$l = {
5210
5507
  if (!allItemsAreDisabled)
5211
5508
  this.onInput(items[index2]);
5212
5509
  }
5510
+ } else if (e.key.length === 1)
5511
+ this.focusItemOnQuickLookup(e);
5512
+ },
5513
+ onWListKeydown(e) {
5514
+ if (e.key.length === 1)
5515
+ this.focusItemOnQuickLookup(e);
5516
+ },
5517
+ focusItemOnQuickLookup(e) {
5518
+ var _a, _b, _c;
5519
+ if (this.quickLookup.timeout)
5520
+ clearTimeout(this.quickLookup.timeout);
5521
+ this.quickLookup.timeout = setTimeout(() => this.quickLookup.string = "", 1e3);
5522
+ this.quickLookup.string += e.key;
5523
+ const re = new RegExp(`^${this.quickLookup.string}`, "i");
5524
+ const itemIndexToFocus = this.selectItems.findIndex(
5525
+ (item) => !item.disabled && item[this.itemLabelKey].match(re)
5526
+ ) + 1;
5527
+ if (itemIndexToFocus) {
5528
+ const selector = `.w-list__item:nth-child(${itemIndexToFocus}) .w-list__item-label`;
5529
+ (_c = (_b = (_a = this.$refs["w-list"]) == null ? void 0 : _a.$el) == null ? void 0 : _b.querySelector(selector)) == null ? void 0 : _c.focus();
5213
5530
  }
5214
5531
  },
5215
5532
  onInput(items) {
@@ -5240,9 +5557,10 @@ const __vue2_script$l = {
5240
5557
  items = Array.isArray(items) ? items : items !== void 0 ? [items] : [];
5241
5558
  const allValues = this.selectItems.map((item) => item.value);
5242
5559
  return items.map((item) => {
5560
+ var _a, _b;
5243
5561
  let value = item;
5244
5562
  if (item && typeof item === "object") {
5245
- value = item[this.itemValueKey] !== void 0 ? item[this.itemValueKey] : item[this.itemLabelKey] !== void 0 ? item[this.itemLabelKey] : item;
5563
+ value = (_b = (_a = item[this.itemValueKey]) != null ? _a : item[this.itemLabelKey]) != null ? _b : item;
5246
5564
  }
5247
5565
  return this.selectItems[allValues.indexOf(value)];
5248
5566
  }).filter((item) => item !== void 0);
@@ -5260,7 +5578,10 @@ const __vue2_script$l = {
5260
5578
  if (((_a = this.menuProps) == null ? void 0 : _a.hideOnMenuClick) === false)
5261
5579
  return;
5262
5580
  this.showMenu = false;
5263
- setTimeout(() => this.$refs["selection-input"].focus(), 50);
5581
+ setTimeout(() => {
5582
+ var _a2;
5583
+ return (_a2 = this.$refs["selection-input"]) == null ? void 0 : _a2.focus();
5584
+ }, 50);
5264
5585
  }
5265
5586
  },
5266
5587
  created() {
@@ -6040,7 +6361,7 @@ var render$e = function() {
6040
6361
  var _vm = this;
6041
6362
  var _h = _vm.$createElement;
6042
6363
  var _c = _vm._self._c || _h;
6043
- return _c("div", { staticClass: "w-table-wrap", class: _vm.wrapClasses }, [_c("table", { staticClass: "w-table", class: _vm.classes, on: { "mousedown": _vm.onMouseDown, "mouseover": _vm.onMouseOver, "mouseout": _vm.onMouseOut } }, [_c("colgroup", { ref: "colgroup" }, _vm._l(_vm.headers, function(header, i) {
6364
+ return _c("div", { staticClass: "w-table w-table--wrap", class: _vm.classes }, [_c("div", { staticClass: "w-table__scroll-wrap" }, [_c("table", { staticClass: "w-table__table", on: { "mousedown": _vm.onMouseDown, "mouseover": _vm.onMouseOver, "mouseout": _vm.onMouseOut } }, [_c("colgroup", { ref: "colgroup" }, _vm._l(_vm.headers, function(header, i) {
6044
6365
  return _c("col", { key: i, staticClass: "w-table__col", class: _vm.colClasses[i], attrs: { "width": header.width || null } });
6045
6366
  }), 0), !_vm.noHeaders ? _c("thead", [_c("tr", _vm._l(_vm.headers, function(header, i) {
6046
6367
  return _c("th", { key: i, staticClass: "w-table__header", class: _vm.headerClasses(header), on: { "click": function($event) {
@@ -6055,7 +6376,7 @@ var render$e = function() {
6055
6376
  })], 2)], 1)]) : !_vm.tableItems.length ? _c("tr", { staticClass: "no-data" }, [_c("td", { staticClass: "w-table__cell text-center", attrs: { "colspan": _vm.headers.length } }, [_vm._t("no-data", function() {
6056
6377
  return [_vm._v("No data to show.")];
6057
6378
  })], 2)]) : _vm._e(), _vm.tableItems.length && _vm.loading !== true ? [_vm._l(_vm.paginatedItems, function(item, i) {
6058
- return [_vm.$scopedSlots["item"] ? _vm._t("item", null, { "item": item, "index": i + 1, "select": function() {
6379
+ return [_vm.$scopedSlots.item ? _vm._t("item", null, { "item": item, "index": i + 1, "select": function() {
6059
6380
  return _vm.doSelectRow(item, i);
6060
6381
  }, "classes": { "w-table__row": true, "w-table__row--selected": _vm.selectedRowsByUid[item._uid] !== void 0, "w-table__row--expanded": _vm.expandedRowsByUid[item._uid] !== void 0 } }) : _c("tr", { key: i, staticClass: "w-table__row", class: { "w-table__row--selected": _vm.selectedRowsByUid[item._uid] !== void 0, "w-table__row--expanded": _vm.expandedRowsByUid[item._uid] !== void 0 }, on: { "click": function($event) {
6061
6382
  return _vm.doSelectRow(item, i);
@@ -6063,21 +6384,27 @@ var render$e = function() {
6063
6384
  var _obj, _obj$1;
6064
6385
  return [_vm.$scopedSlots["item-cell." + header.key] || _vm.$scopedSlots["item-cell." + (j + 1)] || _vm.$scopedSlots["item-cell"] ? _c("td", { key: j + "-a", staticClass: "w-table__cell", class: (_obj = {}, _obj["text-" + (header.align || "left")] = true, _obj["w-table__cell--sticky"] = header.sticky, _obj), attrs: { "data-label": header.label } }, [_vm.$scopedSlots["item-cell." + header.key] ? _vm._t("item-cell." + header.key, null, { "header": header, "item": item, "label": item[header.key] || "", "index": i + 1 }) : _vm.$scopedSlots["item-cell." + (j + 1)] ? _vm._t("item-cell." + (j + 1), null, { "header": header, "item": item, "label": item[header.key] || "", "index": i + 1 }) : _vm.$scopedSlots["item-cell"] ? _vm._t("item-cell", null, { "header": header, "item": item, "label": item[header.key] || "", "index": i + 1 }) : _vm._e(), j < _vm.headers.length - 1 && _vm.resizableColumns ? _c("span", { staticClass: "w-table__col-resizer", class: { "w-table__col-resizer--hover": _vm.colResizing.hover === j, "w-table__col-resizer--active": _vm.colResizing.columnIndex === j } }) : _vm._e()], 2) : _c("td", { key: j + "-b", staticClass: "w-table__cell", class: (_obj$1 = {}, _obj$1["text-" + (header.align || "left")] = true, _obj$1["w-table__cell--sticky"] = header.sticky, _obj$1), attrs: { "data-label": header.label } }, [_c("div", { domProps: { "innerHTML": _vm._s(item[header.key] || "") } }), j < _vm.headers.length - 1 && _vm.resizableColumns ? _c("span", { staticClass: "w-table__col-resizer", class: { "w-table__col-resizer--hover": _vm.colResizing.hover === j, "w-table__col-resizer--active": _vm.colResizing.columnIndex === j } }) : _vm._e()])];
6065
6386
  })], 2), _vm.expandedRowsByUid[item._uid] ? _c("tr", { staticClass: "w-table__row w-table__row--expansion" }, [_c("td", { staticClass: "w-table__cell", attrs: { "colspan": _vm.headers.length } }, [_c("w-transition-expand", { attrs: { "y": "" } }, [_vm.expandedRowsByUid[item._uid] ? _c("div", [_vm._t("row-expansion", null, { "item": item, "index": i + 1 })], 2) : _vm._e(), i < _vm.headers.length - 1 && _vm.resizableColumns ? _c("span", { staticClass: "w-table__col-resizer", class: { "w-table__col-resizer--hover": _vm.colResizing.hover === i, "w-table__col-resizer--active": _vm.colResizing.columnIndex === _vm.j } }) : _vm._e()])], 1)]) : _vm._e()];
6066
- })] : _vm._e(), _vm.$slots["extra-row"] ? _c("div", { staticClass: "w-table__extra-row" }, [_vm._t("extra-row")], 2) : _vm._e()], 2), _vm.$slots.footer || _vm.$slots["footer-row"] || _vm.pagination ? _c("tfoot", { staticClass: "w-table__footer" }, [_vm.$slots["footer-row"] ? _vm._t("footer-row") : _vm.$slots.footer ? _c("tr", { staticClass: "w-table__row" }, [_c("td", { staticClass: "w-table__cell", attrs: { "colspan": _vm.headers.length } }, [_vm._t("footer")], 2)]) : _vm._e(), _vm.pagination && _vm.paginationConfig ? _c("tr", { staticClass: "w-table__row w-table__pagination-wrap" }, [_c("td", { staticClass: "w-table__cell", attrs: { "colspan": _vm.headers.length } }, [_c("div", { staticClass: "w-table__pagination w-pagination" }, [_vm._t("pagination", function() {
6387
+ })] : _vm._e(), _vm.$slots["extra-row"] ? _c("div", { staticClass: "w-table__extra-row" }, [_vm._t("extra-row")], 2) : _vm._e()], 2), _vm.$slots.footer || _vm.$slots["footer-row"] ? _c("tfoot", { staticClass: "w-table__footer" }, [_vm.$slots["footer-row"] ? _vm._t("footer-row") : _vm.$slots.footer ? _c("tr", { staticClass: "w-table__row" }, [_c("td", { staticClass: "w-table__cell", attrs: { "colspan": _vm.headers.length } }, [_vm._t("footer")], 2)]) : _vm._e()], 2) : _vm._e()])]), _vm.pagination && _vm.paginationConfig ? _c("div", { staticClass: "w-table__pagination w-pagination" }, [_vm._t("pagination", function() {
6067
6388
  return [_vm.paginationConfig.itemsPerPageOptions ? _c("w-select", { staticClass: "w-pagination__items-per-page", attrs: { "items": _vm.paginationConfig.itemsPerPageOptions, "label-position": "left", "label": "Items per page", "label-color": "inherit" }, on: { "input": function($event) {
6068
6389
  return _vm.updatePaginationConfig({ itemsPerPage: _vm.paginationConfig.itemsPerPage });
6069
6390
  } }, model: { value: _vm.paginationConfig.itemsPerPage, callback: function($$v) {
6070
6391
  _vm.$set(_vm.paginationConfig, "itemsPerPage", $$v);
6071
6392
  }, expression: "paginationConfig.itemsPerPage" } }) : _vm._e(), _c("div", { staticClass: "pages-wrap" }, [_c("w-button", { staticClass: "w-pagination__arrow w-pagination__arrow--prev", attrs: { "disabled": _vm.paginationConfig.page <= 1, "icon": "wi-chevron-left", "text": "", "lg": "" }, on: { "click": function($event) {
6072
6393
  return _vm.goToPage("-1");
6073
- } } }), _vm._l(_vm.paginationConfig.pagesCount, function(i) {
6394
+ } } }), _vm.paginationConfig.pagesCount > 7 ? [_vm._l(_vm.paginationConfig.pagesCount, function(i) {
6395
+ return [[1, _vm.paginationConfig.pagesCount, _vm.paginationConfig.page - 1, _vm.paginationConfig.page, _vm.paginationConfig.page + 1].includes(i) ? _c("w-button", { key: i, staticClass: "w-pagination__page", class: { "w-pagination__page--active": i === _vm.paginationConfig.page }, attrs: { "round": "", "lg": "" }, on: { "click": function($event) {
6396
+ i !== _vm.paginationConfig.page && _vm.goToPage(i);
6397
+ } } }, [_vm._v(_vm._s(i))]) : [1, _vm.paginationConfig.pagesCount, _vm.paginationConfig.page - 1, _vm.paginationConfig.page, _vm.paginationConfig.page + 1].includes(i - 1) ? _c("w-button", { key: i, staticClass: "w-pagination__page", class: { "w-pagination__page--active": i === _vm.paginationConfig.page }, attrs: { "round": "", "lg": "" }, on: { "click": function($event) {
6398
+ i !== _vm.paginationConfig.page && _vm.goToPage(i);
6399
+ } } }, [_vm._v("...")]) : _vm._e()];
6400
+ })] : _vm._l(_vm.paginationConfig.pagesCount, function(i) {
6074
6401
  return _c("w-button", { key: i, staticClass: "w-pagination__page", class: { "w-pagination__page--active": i === _vm.paginationConfig.page }, attrs: { "round": "", "lg": "" }, on: { "click": function($event) {
6075
6402
  i !== _vm.paginationConfig.page && _vm.goToPage(i);
6076
6403
  } } }, [_vm._v(_vm._s(i))]);
6077
6404
  }), _c("w-button", { staticClass: "w-pagination__arrow w-pagination__arrow--next", attrs: { "disabled": _vm.paginationConfig.page >= _vm.paginationConfig.pagesCount, "icon": "wi-chevron-right", "text": "", "lg": "" }, on: { "click": function($event) {
6078
6405
  return _vm.goToPage("+1");
6079
6406
  } } })], 2), _c("span", { staticClass: "w-pagination__results" }, [_vm._v(_vm._s(_vm.paginationConfig.start) + "-" + _vm._s(_vm.paginationConfig.end || _vm.paginationConfig.total) + " of " + _vm._s(_vm.paginationConfig.total))])];
6080
- }, { "range": _vm.paginationConfig.start + "-" + _vm.paginationConfig.end, "total": _vm.paginationConfig.total })], 2)])]) : _vm._e()], 2) : _vm._e()])]);
6407
+ }, { "range": _vm.paginationConfig.start + "-" + _vm.paginationConfig.end, "total": _vm.paginationConfig.total, "pagesCount": _vm.paginationConfig.pagesCount, "page": _vm.paginationConfig.page, "goToPage": _vm.goToPage })], 2) : _vm._e()]);
6081
6408
  };
6082
6409
  var staticRenderFns$e = [];
6083
6410
  var wTable_vue_vue_type_style_index_0_lang = "";
@@ -6204,16 +6531,6 @@ const __vue2_script$e = {
6204
6531
  return obj;
6205
6532
  }, {});
6206
6533
  },
6207
- wrapClasses() {
6208
- return {
6209
- "w-table-wrap--loading": this.loading
6210
- };
6211
- },
6212
- colClasses() {
6213
- return this.headers.map((header) => {
6214
- return { "w-table__col--highlighted": this.activeSortingKeys[header.key] };
6215
- }) || [];
6216
- },
6217
6534
  classes() {
6218
6535
  return {
6219
6536
  "w-table--loading": this.loading,
@@ -6227,6 +6544,11 @@ const __vue2_script$e = {
6227
6544
  "w-table--sticky-column": this.hasStickyColumn
6228
6545
  };
6229
6546
  },
6547
+ colClasses() {
6548
+ return this.headers.map((header) => {
6549
+ return { "w-table__col--highlighted": this.activeSortingKeys[header.key] };
6550
+ }) || [];
6551
+ },
6230
6552
  isMobile() {
6231
6553
  return ~~this.mobileBreakpoint && this.$waveui.breakpoint.width <= ~~this.mobileBreakpoint;
6232
6554
  },
@@ -6364,7 +6686,7 @@ const __vue2_script$e = {
6364
6686
  document.removeEventListener("mousemove", this.onResizerMouseMove);
6365
6687
  document.removeEventListener("mouseup", this.onResizerMouseUp);
6366
6688
  setTimeout(() => {
6367
- const widths = [...this.$refs.colgroup.childNodes].map((column) => {
6689
+ const widths = [...this.$refs.colgroup.children].map((column) => {
6368
6690
  var _a;
6369
6691
  return ((_a = column.style) == null ? void 0 : _a.width) || column.offsetWidth;
6370
6692
  });
@@ -6410,8 +6732,8 @@ const __vue2_script$e = {
6410
6732
  if (itemsPerPage !== void 0) {
6411
6733
  this.paginationConfig.itemsPerPage = itemsPerPage;
6412
6734
  itemsPerPage = itemsPerPage || this.paginationConfig.total;
6413
- this.paginationConfig.page = 1;
6414
- ({ page } = this.paginationConfig);
6735
+ this.paginationConfig.page = page || this.paginationConfig.page || 1;
6736
+ page = this.paginationConfig.page;
6415
6737
  total = this.paginationConfig.total;
6416
6738
  this.paginationConfig.start = 1;
6417
6739
  this.paginationConfig.end = total >= itemsPerPage * page ? itemsPerPage * page : total % (itemsPerPage * page);
@@ -6617,7 +6939,7 @@ var render$c = function() {
6617
6939
  return;
6618
6940
  }
6619
6941
  _vm.inputValue = $event.target.value;
6620
- }, _vm.onInput], "focus": _vm.onFocus, "blur": _vm.onBlur } }, _vm.listeners)), _vm.labelPosition === "inside" && _vm.showLabelInside ? [_vm.$slots.default || _vm.label ? _c("label", { staticClass: "w-textarea__label w-textarea__label--inside w-form-el-shakable", class: _vm.labelClasses, attrs: { "for": "w-textarea--" + _vm._uid } }, [_vm._t("default", function() {
6942
+ }, _vm.onInput], "focus": _vm.onFocus, "blur": _vm.onBlur } }, _vm.listeners)), _vm.labelPosition === "inside" && _vm.showLabelInside ? [_vm.$slots.default || _vm.label ? _c("label", { staticClass: "w-textarea__label w-textarea__label--inside w-form-el-shakable", class: _vm.labelClasses }, [_vm._t("default", function() {
6621
6943
  return [_vm._v(_vm._s(_vm.label))];
6622
6944
  })], 2) : _vm._e()] : _vm._e(), _vm.innerIconRight ? _c("w-icon", { staticClass: "w-textarea__icon w-textarea__icon--inner-right", attrs: { "tag": "label", "for": "w-textarea--" + _vm._uid }, on: { "click": function($event) {
6623
6945
  return _vm.$emit("click:inner-icon-right", $event);
@@ -7226,18 +7548,16 @@ const __vue2_script$7 = {
7226
7548
  saveOriginalInlineStyles(el) {
7227
7549
  this.el.originalStyles = el.style.cssText;
7228
7550
  },
7229
- show(el, done) {
7551
+ show(el) {
7230
7552
  this.saveComputedStyles(el);
7231
7553
  this.applyHideStyles(el);
7232
7554
  setTimeout(() => this.applyShowStyles(el), 20);
7233
- setTimeout(done, this.duration);
7234
7555
  },
7235
7556
  beforeHide(el) {
7236
7557
  this.applyShowStyles(el);
7237
7558
  },
7238
- hide(el, done) {
7559
+ hide(el) {
7239
7560
  setTimeout(() => this.applyHideStyles(el), 20);
7240
- setTimeout(done, this.duration);
7241
7561
  },
7242
7562
  saveComputedStyles(el) {
7243
7563
  const computedStyles = window.getComputedStyle(el, null);
@@ -7665,20 +7985,20 @@ const __vue2_script = {
7665
7985
  this.emitItemSelection(item, e);
7666
7986
  },
7667
7987
  onLabelKeydown(item, e) {
7668
- if (!(e.metaKey || e.ctrlKey || e.altKey || e.shiftKey) && [13, 32, 37, 38, 39, 40].includes(e.which)) {
7988
+ if (!(e.metaKey || e.ctrlKey || e.altKey || e.shiftKey) && [13, 32, 37, 38, 39, 40].includes(e.keyCode)) {
7669
7989
  if (item.children || item.branch) {
7670
- if ([13, 32].includes(e.which))
7990
+ if ([13, 32].includes(e.keyCode))
7671
7991
  this.expandDepth(item) && e.preventDefault();
7672
- else if (e.which === 37)
7992
+ else if (e.keyCode === 37)
7673
7993
  this.expandDepth(item, false) && e.preventDefault();
7674
- else if (e.which === 39)
7994
+ else if (e.keyCode === 39)
7675
7995
  this.expandDepth(item, true) && e.preventDefault();
7676
7996
  }
7677
- if ([38, 40].includes(e.which)) {
7997
+ if ([38, 40].includes(e.keyCode)) {
7678
7998
  const treeRoot = this.$el.closest(".w-tree--depth0");
7679
7999
  const treeTabbableItems = treeRoot.querySelectorAll('.w-tree__item-label[tabindex="0"]');
7680
8000
  const currLabel = e.target.closest(".w-tree__item-label");
7681
- const indexModifier = e.which === 38 ? -1 : 1;
8001
+ const indexModifier = e.keyCode === 38 ? -1 : 1;
7682
8002
  [...treeTabbableItems].some((item2, i) => {
7683
8003
  if (item2.isSameNode(currLabel)) {
7684
8004
  treeTabbableItems[i + indexModifier] && treeTabbableItems[i + indexModifier].focus();
@@ -7688,7 +8008,7 @@ const __vue2_script = {
7688
8008
  });
7689
8009
  }
7690
8010
  }
7691
- if (e.which === 13) {
8011
+ if (e.keyCode === 13) {
7692
8012
  if (this.selectable)
7693
8013
  item.selected = !item.selected;
7694
8014
  this.emitItemSelection(item, e);
@@ -7782,6 +8102,7 @@ var components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProp
7782
8102
  __proto__: null,
7783
8103
  WAccordion: wAccordion,
7784
8104
  WAlert: wAlert,
8105
+ WAutocomplete: wAutocomplete,
7785
8106
  WApp: wApp,
7786
8107
  WBadge: wBadge,
7787
8108
  WBreadcrumbs: wBreadcrumbs,