@web-utils/component 3.0.6 → 3.1.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 (172) hide show
  1. package/address-input/index.mjs +20 -57
  2. package/affix/index.mjs +26 -47
  3. package/aside-menu/index.mjs +18 -43
  4. package/avatar/index.mjs +27 -49
  5. package/awesome-button/index.mjs +35 -43
  6. package/capsule-tab/index.mjs +16 -34
  7. package/card/index.mjs +21 -76
  8. package/carousel/index.mjs +14 -49
  9. package/chat/index.mjs +104 -414
  10. package/chunk-file-uploader/index.mjs +21 -38
  11. package/chunks/FormTemp.aa57efb4.mjs +125 -0
  12. package/code-mirror-editor/index.mjs +69 -79
  13. package/color-picker/index.mjs +29 -60
  14. package/comment/index.mjs +17 -48
  15. package/confirm-button/index.mjs +11 -19
  16. package/confirmable/index.mjs +12 -20
  17. package/context-menu/index.mjs +42 -144
  18. package/count-up/index.mjs +18 -25
  19. package/custom-scrollbar/index.mjs +13 -22
  20. package/data-box/index.mjs +15 -66
  21. package/data-card/index.mjs +16 -65
  22. package/data-cardtext/index.mjs +16 -52
  23. package/data-display/index.mjs +18 -62
  24. package/data-icons/index.mjs +16 -68
  25. package/data-imgtext/index.mjs +18 -79
  26. package/data-operatext/index.mjs +18 -75
  27. package/data-panel/index.mjs +16 -63
  28. package/data-pay/index.mjs +20 -122
  29. package/data-price/index.mjs +18 -60
  30. package/data-progress/index.mjs +16 -67
  31. package/data-rotate/index.mjs +16 -66
  32. package/data-table-picker/index.mjs +25 -88
  33. package/data-tabs/index.mjs +16 -64
  34. package/dialog-form/index.mjs +48 -94
  35. package/dynamic-table/index.mjs +43 -127
  36. package/e-charts/index.mjs +21 -34
  37. package/easy-popup/index.mjs +35 -61
  38. package/editable-progress/index.mjs +22 -77
  39. package/editable-tree/index.mjs +235 -546
  40. package/egd-collapse/index.mjs +13 -26
  41. package/egd-collapse-item/index.mjs +27 -87
  42. package/element-dialog/index.mjs +69 -133
  43. package/empty-view/index.mjs +13 -33
  44. package/error-view/index.mjs +14 -34
  45. package/flex-column/index.mjs +15 -23
  46. package/flex-item/index.mjs +18 -26
  47. package/flex-row/index.mjs +23 -31
  48. package/flex-scroller/index.mjs +16 -27
  49. package/flow/index.mjs +70 -110
  50. package/flow-designer/index.mjs +1215 -4804
  51. package/flow-node/index.mjs +15 -51
  52. package/flow-viewer/index.mjs +64 -89
  53. package/form-block/index.mjs +43 -62
  54. package/form-button/index.mjs +10 -18
  55. package/form-cascader/index.mjs +49 -100
  56. package/form-checkbox-group/index.mjs +43 -110
  57. package/form-date-picker/index.mjs +51 -97
  58. package/form-holder/index.mjs +25 -42
  59. package/form-input/index.mjs +40 -90
  60. package/form-input-email/index.mjs +35 -79
  61. package/form-input-id-card/index.mjs +40 -87
  62. package/form-input-number/index.mjs +42 -102
  63. package/form-input-phone-number/index.mjs +34 -75
  64. package/form-input-tag/index.mjs +31 -73
  65. package/form-input-time/index.mjs +42 -87
  66. package/form-item/index.mjs +70 -89
  67. package/form-item-config-provider/index.mjs +12 -20
  68. package/form-item-group/index.mjs +46 -65
  69. package/form-radio-group/index.mjs +50 -108
  70. package/form-select/index.mjs +44 -95
  71. package/form-switch/index.mjs +38 -85
  72. package/form-textarea/index.mjs +31 -75
  73. package/form-view/index.mjs +112 -260
  74. package/fy-array/index.mjs +35 -121
  75. package/fy-article/index.mjs +12 -43
  76. package/fy-cascader/index.mjs +26 -67
  77. package/fy-checkbox/index.mjs +27 -77
  78. package/fy-code/index.mjs +19 -33
  79. package/fy-curd/index.mjs +810 -2017
  80. package/fy-date/index.mjs +18 -59
  81. package/fy-draggable/index.mjs +81 -140
  82. package/fy-dynamic/index.mjs +85 -204
  83. package/fy-empty/index.mjs +14 -35
  84. package/fy-form/index.mjs +254 -571
  85. package/fy-form-design/index.mjs +1489 -6084
  86. package/fy-form-design/style.css +1 -1
  87. package/fy-input/index.mjs +34 -104
  88. package/fy-input-color/index.mjs +22 -67
  89. package/fy-input-icon/index.mjs +37 -122
  90. package/fy-input-map/index.mjs +57 -149
  91. package/fy-input-number/index.mjs +18 -53
  92. package/fy-input-table/index.mjs +36 -102
  93. package/fy-input-tree/index.mjs +51 -138
  94. package/fy-progress/index.mjs +12 -31
  95. package/fy-radio/index.mjs +20 -51
  96. package/fy-rate/index.mjs +18 -51
  97. package/fy-select/index.mjs +49 -134
  98. package/fy-slider/index.mjs +19 -52
  99. package/fy-switch/index.mjs +18 -48
  100. package/fy-tabs/index.mjs +19 -51
  101. package/fy-time/index.mjs +22 -62
  102. package/fy-title/index.mjs +14 -25
  103. package/fy-tree/index.mjs +74 -216
  104. package/fy-u-editor/index.mjs +50 -64
  105. package/fy-upload/index.mjs +167 -338
  106. package/guide-steps/index.mjs +33 -53
  107. package/highlight-j-s/index.mjs +13 -27
  108. package/icon-card/index.mjs +12 -36
  109. package/icon-temp/index.mjs +12 -34
  110. package/iframe-window/index.mjs +13 -40
  111. package/image-cropper/index.mjs +46 -171
  112. package/image-preview/index.mjs +54 -168
  113. package/image-viewer/index.mjs +24 -50
  114. package/index.css +1 -0
  115. package/index.mjs +3973 -501
  116. package/input-number/index.mjs +84 -173
  117. package/input-number-range/index.mjs +20 -70
  118. package/j-s-x-component/index.mjs +3 -3
  119. package/keep-view-alive/index.mjs +47 -55
  120. package/keyboard/index.mjs +100 -113
  121. package/license/index.mjs +34 -51
  122. package/loading-view/index.mjs +14 -34
  123. package/login/index.mjs +33 -161
  124. package/monaco-editor/index.mjs +13 -21
  125. package/name-avatar/index.mjs +13 -32
  126. package/nav-bar/index.mjs +12 -31
  127. package/not-implement/index.mjs +14 -25
  128. package/notice/index.mjs +32 -80
  129. package/package.json +1 -1
  130. package/page/index.mjs +11 -23
  131. package/page-header/index.mjs +16 -37
  132. package/page-index/index.mjs +42 -93
  133. package/page-index-top/index.mjs +42 -84
  134. package/page-skeleton/index.mjs +24 -39
  135. package/page-skeleton-new/index.mjs +21 -68
  136. package/pageable-table/index.mjs +105 -227
  137. package/pageable-view/index.mjs +30 -83
  138. package/photo-swipe/index.mjs +62 -87
  139. package/present-view/index.mjs +114 -267
  140. package/queue/index.mjs +14 -29
  141. package/record-video/index.mjs +29 -66
  142. package/resize-observer/index.mjs +18 -30
  143. package/search/index.mjs +47 -81
  144. package/search-popover/index.mjs +57 -329
  145. package/sign/index.mjs +43 -60
  146. package/sign-panel/index.mjs +40 -151
  147. package/skeleton/index.mjs +18 -44
  148. package/split-pane/index.mjs +45 -129
  149. package/stateful/index.mjs +18 -26
  150. package/static-pageable-table/index.mjs +18 -44
  151. package/swiper/index.mjs +53 -94
  152. package/tab/index.mjs +13 -39
  153. package/tab-item/index.mjs +23 -37
  154. package/table-column/index.mjs +27 -35
  155. package/table-view/index.mjs +89 -209
  156. package/tag-render/index.mjs +34 -69
  157. package/text-ellipsis/index.mjs +22 -47
  158. package/tinymce-editor/index.mjs +174 -285
  159. package/toolbar/index.mjs +21 -42
  160. package/toolbar-button/index.mjs +25 -54
  161. package/verify/index.mjs +16 -29
  162. package/vue-cron/index.mjs +272 -1089
  163. package/vue-qr-code/index.mjs +19 -27
  164. package/vue-quill-editor/index.mjs +15 -27
  165. package/vue-tags-input/index.mjs +104 -224
  166. package/vue-tree-select/index.mjs +595 -742
  167. package/vue-video-player/index.mjs +42 -57
  168. package/watermark/index.mjs +27 -35
  169. package/web-types.json +1 -1
  170. package/x-input-tag/index.mjs +50 -112
  171. package/chunks/FormTemp.7f91629d.mjs +0 -165
  172. /package/chunks/{vueComponentNormalizer.446f5dc4.mjs → _plugin-vue2_normalizer.446f5dc4.mjs} +0 -0
@@ -1,22 +1,22 @@
1
- var o = (t, e, s) => new Promise((u, r) => {
2
- var c = (n) => {
1
+ var o = (t, n, a) => new Promise((l, r) => {
2
+ var c = (e) => {
3
3
  try {
4
- a(s.next(n));
4
+ s(a.next(e));
5
5
  } catch (i) {
6
6
  r(i);
7
7
  }
8
- }, _ = (n) => {
8
+ }, p = (e) => {
9
9
  try {
10
- a(s.throw(n));
10
+ s(a.throw(e));
11
11
  } catch (i) {
12
12
  r(i);
13
13
  }
14
- }, a = (n) => n.done ? u(n.value) : Promise.resolve(n.value).then(c, _);
15
- a((s = s.apply(t, e)).next());
14
+ }, s = (e) => e.done ? l(e.value) : Promise.resolve(e.value).then(c, p);
15
+ s((a = a.apply(t, n)).next());
16
16
  });
17
- import { drawToCanvas as p, genDataURL as d, genSVG as h } from "@web-utils/integrations/qrcode";
18
- import { n as f } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
19
- const m = {
17
+ import { drawToCanvas as u, genDataURL as d, genSVG as h } from "@web-utils/integrations/qrcode";
18
+ import { n as m } from "../chunks/_plugin-vue2_normalizer.446f5dc4.mjs";
19
+ const f = {
20
20
  name: "VueQrCode",
21
21
  props: {
22
22
  /**
@@ -50,34 +50,26 @@ const m = {
50
50
  generate() {
51
51
  return o(this, null, function* () {
52
52
  yield this.$nextTick();
53
- const { options: t, tag: e } = this;
54
- e === "canvas" ? yield p(this.$el, this.text, t) : e === "img" ? this.$el.src = yield d(this.text, t) : this.$el.innerHTML = yield h(this.text, t);
53
+ const { options: t, tag: n } = this;
54
+ n === "canvas" ? yield u(this.$el, this.text, t) : n === "img" ? this.$el.src = yield d(this.text, t) : this.$el.innerHTML = yield h(this.text, t);
55
55
  });
56
56
  }
57
57
  },
58
58
  render(t) {
59
59
  return t(this.tag, this.$slots.default);
60
60
  }
61
- };
62
- let g, v;
63
- const l = {};
64
- var x = /* @__PURE__ */ f(
65
- m,
61
+ }, g = null, _ = null;
62
+ var x = /* @__PURE__ */ m(
63
+ f,
66
64
  g,
67
- v,
65
+ _,
68
66
  !1,
69
- w,
67
+ null,
70
68
  null,
71
69
  null,
72
70
  null
73
71
  );
74
- function w(t) {
75
- for (let e in l)
76
- this[e] = l[e];
77
- }
78
- const S = /* @__PURE__ */ function() {
79
- return x.exports;
80
- }();
72
+ const C = x.exports;
81
73
  export {
82
- S as default
74
+ C as default
83
75
  };
@@ -1,18 +1,9 @@
1
1
  import "quill/dist/quill.core.css";
2
2
  import "quill/dist/quill.snow.css";
3
3
  import "quill/dist/quill.bubble.css";
4
- import s from "quill";
5
- import { n } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
6
- var o = function() {
7
- var t = this, i = t.$createElement, e = t._self._c || i;
8
- return e("div", {
9
- staticClass: "vue-quill-editor"
10
- }, [t._t("toolbar"), e("div", {
11
- ref: "editor",
12
- staticClass: "quill-editor"
13
- })], 2);
14
- }, r = [];
15
- const u = {
4
+ import l from "quill";
5
+ import { n as s } from "../chunks/_plugin-vue2_normalizer.446f5dc4.mjs";
6
+ const n = {
16
7
  theme: "snow",
17
8
  boundary: document.body,
18
9
  modules: {
@@ -35,7 +26,7 @@ const u = {
35
26
  },
36
27
  placeholder: "Insert text here ...",
37
28
  readOnly: !1
38
- }, a = {
29
+ }, o = {
39
30
  name: "VueQuillEditor",
40
31
  props: {
41
32
  content: String,
@@ -59,7 +50,7 @@ const u = {
59
50
  return {
60
51
  innerOptions: {},
61
52
  innerContent: "",
62
- defaultOptions: u
53
+ defaultOptions: n
63
54
  };
64
55
  },
65
56
  watch: {
@@ -85,7 +76,7 @@ const u = {
85
76
  methods: {
86
77
  // Init Quill instance
87
78
  initialize() {
88
- this.$el && (this.innerOptions = Object.assign({}, this.defaultOptions, this.globalOptions, this.options), this.quill = new s(this.$refs.editor, this.innerOptions), this.quill.enable(!1), (this.value || this.content) && this.quill.pasteHTML(this.value || this.content), this.disabled || this.quill.enable(!0), this.quill.on("selection-change", (t) => {
79
+ this.$el && (this.innerOptions = Object.assign({}, this.defaultOptions, this.globalOptions, this.options), this.quill = new l(this.$refs.editor, this.innerOptions), this.quill.enable(!1), (this.value || this.content) && this.quill.pasteHTML(this.value || this.content), this.disabled || this.quill.enable(!0), this.quill.on("selection-change", (t) => {
89
80
  t ? this.$emit("focus", this.quill) : this.$emit("blur", this.quill);
90
81
  }), this.quill.on("text-change", () => {
91
82
  let t = this.$refs.editor.children[0].innerHTML;
@@ -94,24 +85,21 @@ const u = {
94
85
  }), this.$emit("ready", this.quill));
95
86
  }
96
87
  }
97
- }, l = {};
98
- var h = /* @__PURE__ */ n(
99
- a,
88
+ };
89
+ var r = function() {
90
+ var i = this, e = i._self._c;
91
+ return e("div", { staticClass: "vue-quill-editor" }, [i._t("toolbar"), e("div", { ref: "editor", staticClass: "quill-editor" })], 2);
92
+ }, u = [], a = /* @__PURE__ */ s(
100
93
  o,
101
94
  r,
95
+ u,
102
96
  !1,
103
- d,
97
+ null,
104
98
  null,
105
99
  null,
106
100
  null
107
101
  );
108
- function d(t) {
109
- for (let i in l)
110
- this[i] = l[i];
111
- }
112
- const _ = /* @__PURE__ */ function() {
113
- return h.exports;
114
- }();
102
+ const q = a.exports;
115
103
  export {
116
- _ as default
104
+ q as default
117
105
  };
@@ -1,162 +1,5 @@
1
- import { n as l } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
2
- var h = function() {
3
- var e = this, s = e.$createElement, a = e._self._c || s;
4
- return a("div", {
5
- staticClass: "tags-input-root"
6
- }, [a("div", {
7
- class: `${e.wrapperClass} tags-input`
8
- }, [e._l(e.tags, function(t, i) {
9
- return a("span", {
10
- key: i,
11
- staticClass: "el-tag el-tag--medium el-tag--light"
12
- }, [a("span", {
13
- domProps: {
14
- innerHTML: e._s(t.value)
15
- }
16
- }), a("i", {
17
- staticClass: "tags-input-remove ov",
18
- attrs: {
19
- href: "#"
20
- },
21
- on: {
22
- click: function(n) {
23
- return n.preventDefault(), e.removeTag(i);
24
- }
25
- }
26
- })]);
27
- }), a("input", {
28
- directives: [{
29
- name: "model",
30
- rawName: "v-model",
31
- value: e.input,
32
- expression: "input"
33
- }],
34
- ref: "taginput",
35
- staticStyle: {
36
- height: "28px",
37
- "margin-top": "5px",
38
- "line-height": "28px"
39
- },
40
- attrs: {
41
- type: "text",
42
- placeholder: e.placeholder
43
- },
44
- domProps: {
45
- value: e.input
46
- },
47
- on: {
48
- keydown: [function(t) {
49
- return !t.type.indexOf("key") && e._k(t.keyCode, "enter", 13, t.key, "Enter") ? null : (t.preventDefault(), e.tagFromInput(!1));
50
- }, function(t) {
51
- return !t.type.indexOf("key") && t.keyCode !== 8 ? null : e.removeLastTag.apply(null, arguments);
52
- }, function(t) {
53
- return !t.type.indexOf("key") && e._k(t.keyCode, "down", 40, t.key, ["Down", "ArrowDown"]) ? null : e.nextSearchResult.apply(null, arguments);
54
- }, function(t) {
55
- return !t.type.indexOf("key") && e._k(t.keyCode, "up", 38, t.key, ["Up", "ArrowUp"]) ? null : e.prevSearchResult.apply(null, arguments);
56
- }, e.onKeyDown],
57
- keyup: [e.onKeyUp, function(t) {
58
- return !t.type.indexOf("key") && e._k(t.keyCode, "esc", 27, t.key, ["Esc", "Escape"]) ? null : e.clearSearchResults.apply(null, arguments);
59
- }],
60
- focus: e.onFocus,
61
- blur: e.onBlur,
62
- value: e.tags,
63
- input: function(t) {
64
- t.target.composing || (e.input = t.target.value);
65
- }
66
- }
67
- }), e.elementId ? a("input", {
68
- directives: [{
69
- name: "model",
70
- rawName: "v-model",
71
- value: e.hiddenInput,
72
- expression: "hiddenInput"
73
- }],
74
- attrs: {
75
- id: e.elementId,
76
- type: "hidden",
77
- name: e.elementId
78
- },
79
- domProps: {
80
- value: e.hiddenInput
81
- },
82
- on: {
83
- input: function(t) {
84
- t.target.composing || (e.hiddenInput = t.target.value);
85
- }
86
- }
87
- }) : e._e()], 2), a("div", {
88
- directives: [{
89
- name: "show",
90
- rawName: "v-show",
91
- value: e.searchResults.length,
92
- expression: "searchResults.length"
93
- }]
94
- }, [e.typeaheadStyle === "badges" ? a("p", {
95
- class: `typeahead-${e.typeaheadStyle}`
96
- }, [e.typeaheadHideDiscard ? e._e() : a("span", {
97
- staticClass: "tags-input-badge typeahead-hide-btn tags-input-typeahead-item-default",
98
- domProps: {
99
- textContent: e._s(e.discardSearchText)
100
- },
101
- on: {
102
- click: function(t) {
103
- return t.preventDefault(), e.clearSearchResults.apply(null, arguments);
104
- }
105
- }
106
- }), e._l(e.searchResults, function(t, i) {
107
- return a("span", {
108
- key: i,
109
- staticClass: "tags-input-badge",
110
- class: {
111
- "tags-input-typeahead-item-default": i != e.searchSelection,
112
- "tags-input-typeahead-item-highlighted-default": i == e.searchSelection
113
- },
114
- domProps: {
115
- innerHTML: e._s(t.value)
116
- },
117
- on: {
118
- mouseover: function(n) {
119
- e.searchSelection = i;
120
- },
121
- mousedown: function(n) {
122
- return n.preventDefault(), e.tagFromSearchOnClick(t);
123
- }
124
- }
125
- });
126
- })], 2) : e.typeaheadStyle === "dropdown" ? a("ul", {
127
- class: `typeahead-${e.typeaheadStyle}`
128
- }, [e.typeaheadHideDiscard ? e._e() : a("li", {
129
- staticClass: "tags-input-typeahead-item-default typeahead-hide-btn",
130
- domProps: {
131
- textContent: e._s(e.discardSearchText)
132
- },
133
- on: {
134
- mousedown: function(t) {
135
- return t.preventDefault(), e.clearSearchResults.apply(null, arguments);
136
- }
137
- }
138
- }), e._l(e.searchResults, function(t, i) {
139
- return a("li", {
140
- key: i,
141
- class: {
142
- "tags-input-typeahead-item-default": i != e.searchSelection,
143
- "tags-input-typeahead-item-highlighted-default": i == e.searchSelection
144
- },
145
- domProps: {
146
- innerHTML: e._s(t.value)
147
- },
148
- on: {
149
- mouseover: function(n) {
150
- e.searchSelection = i;
151
- },
152
- mousedown: function(n) {
153
- return n.preventDefault(), e.tagFromSearchOnClick(t);
154
- }
155
- }
156
- });
157
- })], 2) : e._e()])]);
158
- }, u = [];
159
- const o = {
1
+ import { n as r } from "../chunks/_plugin-vue2_normalizer.446f5dc4.mjs";
2
+ const l = {
160
3
  name: "VueTagsInput",
161
4
  props: {
162
5
  elementId: {
@@ -266,8 +109,8 @@ const o = {
266
109
  };
267
110
  },
268
111
  watch: {
269
- input(e, s) {
270
- this.$emit("input-changed", e), this.searchTag(!1), e.length && e !== s && (this.addTagsOnSpace && e.endsWith(" ") && (this.input = e.trim(), this.tagFromInput(!0)), this.addTagsOnComma && (e = e.trim(), e.endsWith(",") && (this.input = e.substring(0, e.length - 1), this.tagFromInput(!0))), this.$emit("change", e));
112
+ input(t, e) {
113
+ this.$emit("input-changed", t), this.searchTag(!1), t.length && t !== e && (this.addTagsOnSpace && t.endsWith(" ") && (this.input = t.trim(), this.tagFromInput(!0)), this.addTagsOnComma && (t = t.trim(), t.endsWith(",") && (this.input = t.substring(0, t.length - 1), this.tagFromInput(!0))), this.$emit("change", t));
271
114
  },
272
115
  tags() {
273
116
  this.hiddenInput = JSON.stringify(this.tags), this.$emit("input", this.tags);
@@ -275,8 +118,8 @@ const o = {
275
118
  value() {
276
119
  this.tagsFromValue();
277
120
  },
278
- typeaheadAlwaysShow(e) {
279
- e ? this.searchTag(!1) : this.clearSearchResults();
121
+ typeaheadAlwaysShow(t) {
122
+ t ? this.searchTag(!1) : this.clearSearchResults();
280
123
  }
281
124
  },
282
125
  created() {
@@ -290,8 +133,8 @@ const o = {
290
133
  * @param string
291
134
  * @returns String
292
135
  */
293
- escapeRegExp(e) {
294
- return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
136
+ escapeRegExp(t) {
137
+ return t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
295
138
  },
296
139
  /**
297
140
  * Add a tag whether from user input or from search results (typeahead)
@@ -299,26 +142,26 @@ const o = {
299
142
  * @param ignoreSearchResults
300
143
  * @returns void
301
144
  */
302
- tagFromInput(e = !1) {
303
- if (this.searchResults.length && this.searchSelection >= 0 && !e)
145
+ tagFromInput(t = !1) {
146
+ if (this.searchResults.length && this.searchSelection >= 0 && !t)
304
147
  this.tagFromSearch(this.searchResults[this.searchSelection]), this.input = "";
305
148
  else {
306
- const s = this.input.trim();
307
- if (!this.onlyExistingTags && s.length && this.validate(s)) {
149
+ const e = this.input.trim();
150
+ if (!this.onlyExistingTags && e.length && this.validate(e)) {
308
151
  this.input = "";
309
- let a = {
152
+ let s = {
310
153
  key: "",
311
- value: s
154
+ value: e
312
155
  };
313
- const t = this.escapeRegExp(this.caseSensitiveTags ? a.value : a.value.toLowerCase());
156
+ const a = this.escapeRegExp(this.caseSensitiveTags ? s.value : s.value.toLowerCase());
314
157
  for (const i of this.existingTags) {
315
158
  const n = this.caseSensitiveTags ? i.value : i.value.toLowerCase();
316
- if (t === n) {
317
- a = Object.assign({}, i);
159
+ if (a === n) {
160
+ s = Object.assign({}, i);
318
161
  break;
319
162
  }
320
163
  }
321
- this.addTag(a);
164
+ this.addTag(s);
322
165
  }
323
166
  }
324
167
  },
@@ -328,8 +171,8 @@ const o = {
328
171
  * @param tag
329
172
  * @returns void
330
173
  */
331
- tagFromSearchOnClick(e) {
332
- this.tagFromSearch(e), this.$refs.taginput.blur();
174
+ tagFromSearchOnClick(t) {
175
+ this.tagFromSearch(t), this.$refs.taginput.blur();
333
176
  },
334
177
  /**
335
178
  * Add the selected tag from the search results.
@@ -339,8 +182,8 @@ const o = {
339
182
  * @param tag
340
183
  * @return void
341
184
  */
342
- tagFromSearch(e) {
343
- this.clearSearchResults(), this.addTag(e), this.$nextTick(() => {
185
+ tagFromSearch(t) {
186
+ this.clearSearchResults(), this.addTag(t), this.$nextTick(() => {
344
187
  this.input = "", this.oldInput = "";
345
188
  });
346
189
  },
@@ -350,13 +193,13 @@ const o = {
350
193
  * @param tag
351
194
  * @returns void | Boolean
352
195
  */
353
- addTag(e) {
354
- if (!this.beforeAddingTag(e))
196
+ addTag(t) {
197
+ if (!this.beforeAddingTag(t))
355
198
  return !1;
356
199
  if (this.limit > 0 && this.tags.length >= this.limit)
357
200
  return this.$emit("limit-reached"), !1;
358
- this.tagSelected(e) || (this.tags.push(e), this.$nextTick(() => {
359
- this.$emit("tag-added", e), this.$emit("tags-updated");
201
+ this.tagSelected(t) || (this.tags.push(t), this.$nextTick(() => {
202
+ this.$emit("tag-added", t), this.$emit("tags-updated");
360
203
  }));
361
204
  },
362
205
  /**
@@ -373,12 +216,12 @@ const o = {
373
216
  * @param index
374
217
  * @returns void
375
218
  */
376
- removeTag(e) {
377
- const s = this.tags[e];
378
- if (!this.beforeRemovingTag(s))
219
+ removeTag(t) {
220
+ const e = this.tags[t];
221
+ if (!this.beforeRemovingTag(e))
379
222
  return !1;
380
- this.tags.splice(e, 1), this.$nextTick(() => {
381
- this.$emit("tag-removed", s), this.$emit("tags-updated"), this.typeaheadAlwaysShow && this.searchTag();
223
+ this.tags.splice(t, 1), this.$nextTick(() => {
224
+ this.$emit("tag-removed", e), this.$emit("tags-updated"), this.typeaheadAlwaysShow && this.searchTag();
382
225
  });
383
226
  },
384
227
  /**
@@ -391,12 +234,12 @@ const o = {
391
234
  return !1;
392
235
  if (this.oldInput !== this.input || !this.searchResults.length && this.typeaheadActivationThreshold === 0 || this.typeaheadAlwaysShow) {
393
236
  this.searchResults = [], this.searchSelection = 0;
394
- const e = this.input.trim();
395
- if (e.length && e.length >= this.typeaheadActivationThreshold || this.typeaheadActivationThreshold === 0 || this.typeaheadAlwaysShow) {
396
- const s = this.escapeRegExp(this.caseSensitiveTags ? e : e.toLowerCase());
397
- for (const a of this.existingTags)
398
- (this.caseSensitiveTags ? a.value : a.value.toLowerCase()).search(s) > -1 && !this.tagSelected(a) && this.searchResults.push(a);
399
- this.sortSearchResults && this.searchResults.sort((a, t) => a.value < t.value ? -1 : a.value > t.value ? 1 : 0), this.typeaheadMaxResults > 0 && (this.searchResults = this.searchResults.slice(0, this.typeaheadMaxResults));
237
+ const t = this.input.trim();
238
+ if (t.length && t.length >= this.typeaheadActivationThreshold || this.typeaheadActivationThreshold === 0 || this.typeaheadAlwaysShow) {
239
+ const e = this.escapeRegExp(this.caseSensitiveTags ? t : t.toLowerCase());
240
+ for (const s of this.existingTags)
241
+ (this.caseSensitiveTags ? s.value : s.value.toLowerCase()).search(e) > -1 && !this.tagSelected(s) && this.searchResults.push(s);
242
+ this.sortSearchResults && this.searchResults.sort((s, a) => s.value < a.value ? -1 : s.value > a.value ? 1 : 0), this.typeaheadMaxResults > 0 && (this.searchResults = this.searchResults.slice(0, this.typeaheadMaxResults));
400
243
  }
401
244
  this.oldInput = this.input;
402
245
  }
@@ -456,12 +299,12 @@ const o = {
456
299
  console.error("Voerro Tags Input: the v-model value must be an array!");
457
300
  return;
458
301
  }
459
- const e = this.value;
460
- if (this.tags === e)
302
+ const t = this.value;
303
+ if (this.tags === t)
461
304
  return;
462
305
  this.clearTags();
463
- for (const s of e)
464
- this.addTag(s);
306
+ for (const e of t)
307
+ this.addTag(e);
465
308
  } else {
466
309
  if (this.tags.length === 0)
467
310
  return;
@@ -474,13 +317,13 @@ const o = {
474
317
  * @param tag
475
318
  * @returns Boolean
476
319
  */
477
- tagSelected(e) {
478
- if (this.allowDuplicates || !e)
320
+ tagSelected(t) {
321
+ if (this.allowDuplicates || !t)
479
322
  return !1;
480
- const s = this.escapeRegExp(this.caseSensitiveTags ? e.value : e.value.toLowerCase());
481
- for (const a of this.tags) {
482
- const t = this.caseSensitiveTags ? a.value : a.value.toLowerCase();
483
- if (a.key === e.key && t.search(s) > -1)
323
+ const e = this.escapeRegExp(this.caseSensitiveTags ? t.value : t.value.toLowerCase());
324
+ for (const s of this.tags) {
325
+ const a = this.caseSensitiveTags ? s.value : s.value.toLowerCase();
326
+ if (s.key === t.key && a.search(e) > -1)
484
327
  return !0;
485
328
  }
486
329
  return !1;
@@ -499,8 +342,8 @@ const o = {
499
342
  * @param e
500
343
  * @returns void
501
344
  */
502
- onKeyUp(e) {
503
- this.$emit("keyup", e);
345
+ onKeyUp(t) {
346
+ this.$emit("keyup", t);
504
347
  },
505
348
  /**
506
349
  * Process all the keydown events.
@@ -508,8 +351,8 @@ const o = {
508
351
  * @param e
509
352
  * @returns void
510
353
  */
511
- onKeyDown(e) {
512
- this.$emit("keydown", e);
354
+ onKeyDown(t) {
355
+ this.$emit("keydown", t);
513
356
  },
514
357
  /**
515
358
  * Process the onfocus event.
@@ -517,8 +360,8 @@ const o = {
517
360
  * @param e
518
361
  * @returns void
519
362
  */
520
- onFocus(e) {
521
- this.$emit("focus", e), this.searchTag();
363
+ onFocus(t) {
364
+ this.$emit("focus", t), this.searchTag();
522
365
  },
523
366
  /**
524
367
  * Process the onblur event.
@@ -526,28 +369,65 @@ const o = {
526
369
  * @param e
527
370
  * @returns void
528
371
  */
529
- onBlur(e) {
530
- this.$emit("blur", e), this.addTagsOnBlur && this.tagFromInput(!0), this.typeaheadAlwaysShow ? this.searchTag() : this.hideTypeahead();
372
+ onBlur(t) {
373
+ this.$emit("blur", t), this.addTagsOnBlur && this.tagFromInput(!0), this.typeaheadAlwaysShow ? this.searchTag() : this.hideTypeahead();
531
374
  }
532
375
  }
533
- }, r = {};
534
- var c = /* @__PURE__ */ l(
535
- o,
376
+ };
377
+ var h = function() {
378
+ var e = this, s = e._self._c;
379
+ return s("div", { staticClass: "tags-input-root" }, [s("div", { class: `${e.wrapperClass} tags-input` }, [e._l(e.tags, function(a, i) {
380
+ return s("span", { key: i, staticClass: "el-tag el-tag--medium el-tag--light" }, [s("span", { domProps: { innerHTML: e._s(a.value) } }), s("i", { staticClass: "tags-input-remove ov", attrs: { href: "#" }, on: { click: function(n) {
381
+ return n.preventDefault(), e.removeTag(i);
382
+ } } })]);
383
+ }), s("input", { directives: [{ name: "model", rawName: "v-model", value: e.input, expression: "input" }], ref: "taginput", staticStyle: { height: "28px", "margin-top": "5px", "line-height": "28px" }, attrs: { type: "text", placeholder: e.placeholder }, domProps: { value: e.input }, on: { keydown: [function(a) {
384
+ return !a.type.indexOf("key") && e._k(a.keyCode, "enter", 13, a.key, "Enter") ? null : (a.preventDefault(), e.tagFromInput(!1));
385
+ }, function(a) {
386
+ return !a.type.indexOf("key") && a.keyCode !== 8 ? null : e.removeLastTag.apply(null, arguments);
387
+ }, function(a) {
388
+ return !a.type.indexOf("key") && e._k(a.keyCode, "down", 40, a.key, ["Down", "ArrowDown"]) ? null : e.nextSearchResult.apply(null, arguments);
389
+ }, function(a) {
390
+ return !a.type.indexOf("key") && e._k(a.keyCode, "up", 38, a.key, ["Up", "ArrowUp"]) ? null : e.prevSearchResult.apply(null, arguments);
391
+ }, e.onKeyDown], keyup: [e.onKeyUp, function(a) {
392
+ return !a.type.indexOf("key") && e._k(a.keyCode, "esc", 27, a.key, ["Esc", "Escape"]) ? null : e.clearSearchResults.apply(null, arguments);
393
+ }], focus: e.onFocus, blur: e.onBlur, value: e.tags, input: function(a) {
394
+ a.target.composing || (e.input = a.target.value);
395
+ } } }), e.elementId ? s("input", { directives: [{ name: "model", rawName: "v-model", value: e.hiddenInput, expression: "hiddenInput" }], attrs: { id: e.elementId, type: "hidden", name: e.elementId }, domProps: { value: e.hiddenInput }, on: { input: function(a) {
396
+ a.target.composing || (e.hiddenInput = a.target.value);
397
+ } } }) : e._e()], 2), s("div", { directives: [{ name: "show", rawName: "v-show", value: e.searchResults.length, expression: "searchResults.length" }] }, [e.typeaheadStyle === "badges" ? s("p", { class: `typeahead-${e.typeaheadStyle}` }, [e.typeaheadHideDiscard ? e._e() : s("span", { staticClass: "tags-input-badge typeahead-hide-btn tags-input-typeahead-item-default", domProps: { textContent: e._s(e.discardSearchText) }, on: { click: function(a) {
398
+ return a.preventDefault(), e.clearSearchResults.apply(null, arguments);
399
+ } } }), e._l(e.searchResults, function(a, i) {
400
+ return s("span", { key: i, staticClass: "tags-input-badge", class: {
401
+ "tags-input-typeahead-item-default": i != e.searchSelection,
402
+ "tags-input-typeahead-item-highlighted-default": i == e.searchSelection
403
+ }, domProps: { innerHTML: e._s(a.value) }, on: { mouseover: function(n) {
404
+ e.searchSelection = i;
405
+ }, mousedown: function(n) {
406
+ return n.preventDefault(), e.tagFromSearchOnClick(a);
407
+ } } });
408
+ })], 2) : e.typeaheadStyle === "dropdown" ? s("ul", { class: `typeahead-${e.typeaheadStyle}` }, [e.typeaheadHideDiscard ? e._e() : s("li", { staticClass: "tags-input-typeahead-item-default typeahead-hide-btn", domProps: { textContent: e._s(e.discardSearchText) }, on: { mousedown: function(a) {
409
+ return a.preventDefault(), e.clearSearchResults.apply(null, arguments);
410
+ } } }), e._l(e.searchResults, function(a, i) {
411
+ return s("li", { key: i, class: {
412
+ "tags-input-typeahead-item-default": i != e.searchSelection,
413
+ "tags-input-typeahead-item-highlighted-default": i == e.searchSelection
414
+ }, domProps: { innerHTML: e._s(a.value) }, on: { mouseover: function(n) {
415
+ e.searchSelection = i;
416
+ }, mousedown: function(n) {
417
+ return n.preventDefault(), e.tagFromSearchOnClick(a);
418
+ } } });
419
+ })], 2) : e._e()])]);
420
+ }, u = [], o = /* @__PURE__ */ r(
421
+ l,
536
422
  h,
537
423
  u,
538
424
  !1,
539
- p,
425
+ null,
540
426
  null,
541
427
  null,
542
428
  null
543
429
  );
544
- function p(e) {
545
- for (let s in r)
546
- this[s] = r[s];
547
- }
548
- const g = /* @__PURE__ */ function() {
549
- return c.exports;
550
- }();
430
+ const p = o.exports;
551
431
  export {
552
- g as default
432
+ p as default
553
433
  };