@web-utils/component 2.0.13 → 2.7.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/chunks/config.46422d7f.js +73 -0
- package/dist/chunks/confirmable-mixin.3a79781b.js +75 -0
- package/dist/chunks/dataformat.fb35ee10.js +61 -0
- package/dist/chunks/detail.a3249549.js +28 -0
- package/dist/chunks/dic.5f7e3523.js +132 -0
- package/dist/chunks/event.50c365eb.js +235 -0
- package/dist/chunks/form-input-mixin.ff5b58f7.js +24 -0
- package/dist/chunks/form-item-mixin.79f6eaff.js +128 -0
- package/dist/chunks/{822300f3.js → form-pick-mixin.61ad06b2.js} +3 -3
- package/dist/chunks/init.352281f5.js +121 -0
- package/dist/chunks/{44b78389.js → input-number-mixin.41a066be.js} +8 -8
- package/dist/chunks/{e1939731.js → mixins.5a78e0db.js} +5 -6
- package/dist/chunks/packages.5d7a86c4.js +114 -0
- package/dist/chunks/permission.ce5d2121.js +16 -0
- package/dist/chunks/slot.1b8d2b1b.js +27 -0
- package/dist/chunks/tab-mixin.8c0142e0.js +81 -0
- package/dist/chunks/util.5053d54e.js +264 -0
- package/dist/chunks/utils.97652d86.js +26 -0
- package/dist/chunks/utils.fa73de78.js +185 -0
- package/dist/chunks/vueComponentNormalizer.71e2aa87.js +32 -0
- package/dist/components/address-input/index.js +43 -56
- package/dist/components/address-input/style.css +1 -15
- package/dist/components/affix/index.js +102 -0
- package/dist/components/affix/style.css +1 -0
- package/dist/components/array/index.js +156 -0
- package/dist/components/array/style.css +1 -0
- package/dist/components/article/index.js +93 -0
- package/dist/components/article/style.css +1 -0
- package/dist/components/aside-menu/index.js +30 -36
- package/dist/components/aside-menu/style.css +1 -9
- package/dist/components/avatar/index.js +106 -0
- package/dist/components/avatar/style.css +1 -0
- package/dist/components/awesome-button/index.js +32 -35
- package/dist/components/base.css +1 -66
- package/dist/components/capsule-tab/index.js +27 -33
- package/dist/components/capsule-tab/style.css +1 -32
- package/dist/components/card/index.js +130 -0
- package/dist/components/card/style.css +1 -0
- package/dist/components/carousel/index.js +70 -0
- package/dist/components/carousel/style.css +1 -0
- package/dist/components/chat/index.js +567 -0
- package/dist/components/chat/style.css +1 -0
- package/dist/components/chunk-file-uploader/index.js +54 -88
- package/dist/components/chunk-file-uploader/style.css +1 -4
- package/dist/components/chunk-file-uploader-button/index.js +25 -31
- package/dist/components/chunk-file-uploader-button/style.css +1 -17
- package/dist/components/chunk-file-uploader-drop/index.js +28 -42
- package/dist/components/chunk-file-uploader-drop/style.css +1 -12
- package/dist/components/chunk-file-uploader-file/index.js +134 -211
- package/dist/components/chunk-file-uploader-file/style.css +1 -125
- package/dist/components/chunk-file-uploader-files/index.js +28 -34
- package/dist/components/chunk-file-uploader-files/style.css +1 -9
- package/dist/components/chunk-file-uploader-list/index.js +29 -35
- package/dist/components/chunk-file-uploader-list/style.css +1 -9
- package/dist/components/chunk-file-uploader-un-support/index.js +30 -38
- package/dist/components/chunk-file-uploader-un-support/style.css +1 -6
- package/dist/components/code/index.js +66 -0
- package/dist/components/code-mirror-editor/index.js +156 -181
- package/dist/components/code-mirror-editor/style.css +1 -17
- package/dist/components/color-picker/index.js +49 -68
- package/dist/components/column/index.js +114 -0
- package/dist/components/column-default/index.js +105 -0
- package/dist/components/column-dynamic/index.js +93 -0
- package/dist/components/column-menu/index.js +286 -0
- package/dist/components/column-slot/index.js +265 -0
- package/dist/components/comment/index.js +94 -0
- package/dist/components/comment/style.css +1 -0
- package/dist/components/confirm-button/index.js +19 -21
- package/dist/components/confirmable/index.js +18 -19
- package/dist/components/context-menu/index.js +118 -130
- package/dist/components/context-menu/style.css +1 -88
- package/dist/components/count-up/index.js +120 -0
- package/dist/components/custom-scrollbar/index.js +50 -68
- package/dist/components/data-box/index.js +97 -0
- package/dist/components/data-box/style.css +1 -0
- package/dist/components/data-card/index.js +98 -0
- package/dist/components/data-card/style.css +1 -0
- package/dist/components/data-cardtext/index.js +82 -0
- package/dist/components/data-cardtext/style.css +1 -0
- package/dist/components/data-display/index.js +93 -0
- package/dist/components/data-display/style.css +1 -0
- package/dist/components/data-icons/index.js +104 -0
- package/dist/components/data-icons/style.css +1 -0
- package/dist/components/data-imgtext/index.js +106 -0
- package/dist/components/data-imgtext/style.css +1 -0
- package/dist/components/data-operatext/index.js +99 -0
- package/dist/components/data-operatext/style.css +1 -0
- package/dist/components/data-panel/index.js +93 -0
- package/dist/components/data-panel/style.css +1 -0
- package/dist/components/data-pay/index.js +149 -0
- package/dist/components/data-pay/style.css +1 -0
- package/dist/components/data-price/index.js +84 -0
- package/dist/components/data-price/style.css +1 -0
- package/dist/components/data-progress/index.js +97 -0
- package/dist/components/data-progress/style.css +1 -0
- package/dist/components/data-rotate/index.js +96 -0
- package/dist/components/data-rotate/style.css +1 -0
- package/dist/components/data-table-picker/index.js +62 -81
- package/dist/components/data-tabs/index.js +94 -0
- package/dist/components/data-tabs/style.css +1 -0
- package/dist/components/dialog-column/index.js +138 -0
- package/dist/components/dialog-excel/index.js +214 -0
- package/dist/components/dialog-filter/index.js +245 -0
- package/dist/components/dialog-form/index.js +275 -0
- package/dist/components/draggable/index.js +384 -0
- package/dist/components/draggable/style.css +1 -0
- package/dist/components/dynamic-table/index.js +89 -113
- package/dist/components/dynamic-table/style.css +1 -30
- package/dist/components/e-charts/index.js +126 -201
- package/dist/components/e-charts/style.css +1 -10
- package/dist/components/editable-progress/index.js +60 -93
- package/dist/components/editable-progress/style.css +1 -37
- package/dist/components/editable-tree/index.js +423 -638
- package/dist/components/editable-tree/style.css +1 -82
- package/dist/components/egd-collapse/index.js +33 -46
- package/dist/components/egd-collapse-item/index.js +60 -76
- package/dist/components/element-dialog/index.js +95 -147
- package/dist/components/element-dialog/style.css +1 -102
- package/dist/components/empty/index.js +59 -0
- package/dist/components/empty/style.css +1 -0
- package/dist/components/empty-view/index.js +28 -34
- package/dist/components/empty-view/style.css +1 -17
- package/dist/components/error-view/index.js +26 -32
- package/dist/components/error-view/style.css +1 -17
- package/dist/components/flex-column/index.js +25 -40
- package/dist/components/flex-item/index.js +29 -57
- package/dist/components/flex-row/index.js +25 -40
- package/dist/components/flex-scroller/index.js +26 -32
- package/dist/components/flex-scroller/style.css +1 -20
- package/dist/components/flow/index.js +278 -0
- package/dist/components/flow/style.css +1 -0
- package/dist/components/flow-node/index.js +102 -0
- package/dist/components/form-button/index.js +34 -38
- package/dist/components/form-cascader/index.js +71 -81
- package/dist/components/form-checkbox-group/index.js +88 -113
- package/dist/components/form-checkbox-group/style.css +1 -51
- package/dist/components/form-date-picker/index.js +70 -132
- package/dist/components/form-group/index.js +122 -0
- package/dist/components/form-group/style.css +1 -0
- package/dist/components/form-holder/index.js +53 -39
- package/dist/components/form-input/index.js +56 -62
- package/dist/components/form-input-email/index.js +48 -60
- package/dist/components/form-input-id-card/index.js +53 -59
- package/dist/components/form-input-number/index.js +61 -68
- package/dist/components/form-input-number/style.css +1 -12
- package/dist/components/form-input-phone-number/index.js +49 -55
- package/dist/components/form-input-time/index.js +53 -59
- package/dist/components/form-item/index.js +80 -123
- package/dist/components/form-item/style.css +1 -11
- package/dist/components/form-item-config-provider/index.js +25 -26
- package/dist/components/form-item-group/index.js +85 -111
- package/dist/components/form-item-group/style.css +1 -30
- package/dist/components/form-radio-group/index.js +85 -104
- package/dist/components/form-radio-group/style.css +1 -53
- package/dist/components/form-select/index.js +76 -91
- package/dist/components/form-switch/index.js +51 -57
- package/dist/components/form-temp/index.js +149 -0
- package/dist/components/form-textarea/index.js +51 -57
- package/dist/components/form-view/index.js +165 -232
- package/dist/components/form-view/style.css +1 -158
- package/dist/components/fy-cascader/index.js +132 -0
- package/dist/components/fy-checkbox/index.js +116 -0
- package/dist/components/fy-checkbox/style.css +1 -0
- package/dist/components/fy-curd/index.js +846 -0
- package/dist/components/fy-curd/style.css +1 -0
- package/dist/components/fy-date/index.js +84 -0
- package/dist/components/fy-date/style.css +1 -0
- package/dist/components/fy-dialog-form/index.js +278 -0
- package/dist/components/fy-dialog-form/style.css +1 -0
- package/dist/components/fy-dynamic/index.js +335 -0
- package/dist/components/fy-dynamic/style.css +1 -0
- package/dist/components/fy-form/index.js +754 -0
- package/dist/components/fy-form/style.css +1 -0
- package/dist/components/fy-form-menu/index.js +95 -0
- package/dist/components/fy-input/index.js +162 -0
- package/dist/components/fy-input-color/index.js +96 -0
- package/dist/components/fy-input-icon/index.js +161 -0
- package/dist/components/fy-input-icon/style.css +1 -0
- package/dist/components/fy-input-map/index.js +275 -0
- package/dist/components/fy-input-map/style.css +1 -0
- package/dist/components/fy-input-number/index.js +87 -0
- package/dist/components/fy-input-table/index.js +172 -0
- package/dist/components/fy-input-table/style.css +1 -0
- package/dist/components/fy-input-tree/index.js +265 -0
- package/dist/components/fy-input-tree/style.css +1 -0
- package/dist/components/fy-radio/index.js +68 -0
- package/dist/components/fy-radio/style.css +1 -0
- package/dist/components/fy-rate/index.js +105 -0
- package/dist/components/fy-rate/style.css +1 -0
- package/dist/components/fy-select/index.js +223 -0
- package/dist/components/fy-select/style.css +1 -0
- package/dist/components/fy-slider/index.js +79 -0
- package/dist/components/fy-switch/index.js +73 -0
- package/dist/components/fy-time/index.js +95 -0
- package/dist/components/fy-title/index.js +40 -0
- package/dist/components/fy-title/style.css +1 -0
- package/dist/components/fy-upload/index.js +704 -0
- package/dist/components/fy-upload/style.css +1 -0
- package/dist/components/guide-steps/index.js +44 -58
- package/dist/components/guide-steps/style.css +1 -34
- package/dist/components/header-menu/index.js +238 -0
- package/dist/components/header-search/index.js +246 -0
- package/dist/components/icon-card/index.js +29 -35
- package/dist/components/icon-card/style.css +1 -56
- package/dist/components/icon-temp/index.js +50 -0
- package/dist/components/icon-temp/style.css +1 -0
- package/dist/components/iframe-window/index.js +29 -35
- package/dist/components/iframe-window/style.css +1 -20
- package/dist/components/image-viewer/index.js +48 -66
- package/dist/components/image-viewer/style.css +1 -21
- package/dist/components/input-number/index.js +127 -193
- package/dist/components/input-number/style.css +1 -15
- package/dist/components/input-number-range/index.js +45 -57
- package/dist/components/input-number-range/style.css +1 -12
- package/dist/components/j-s-x-component/index.js +4 -4
- package/dist/components/keep-view-alive/index.js +77 -120
- package/dist/components/keyboard/index.js +389 -0
- package/dist/components/keyboard/style.css +1 -0
- package/dist/components/license/index.js +134 -0
- package/dist/components/loading-view/index.js +26 -32
- package/dist/components/loading-view/style.css +1 -17
- package/dist/components/login/index.js +244 -0
- package/dist/components/login/style.css +1 -0
- package/dist/components/name-avatar/index.js +66 -0
- package/dist/components/name-avatar/style.css +1 -0
- package/dist/components/nav-bar/index.js +27 -37
- package/dist/components/nav-bar/style.css +1 -17
- package/dist/components/not-implement/index.js +23 -31
- package/dist/components/not-implement/style.css +1 -15
- package/dist/components/notice/index.js +143 -0
- package/dist/components/notice/style.css +1 -0
- package/dist/components/page/index.js +22 -28
- package/dist/components/page/style.css +1 -12
- package/dist/components/page-header/index.js +30 -36
- package/dist/components/page-header/style.css +1 -14
- package/dist/components/page-index/index.js +62 -83
- package/dist/components/page-index/style.css +1 -23
- package/dist/components/page-index-top/index.js +53 -68
- package/dist/components/page-skeleton/index.js +31 -37
- package/dist/components/page-skeleton/style.css +1 -23
- package/dist/components/page-skeleton-new/index.js +42 -48
- package/dist/components/page-skeleton-new/style.css +1 -42
- package/dist/components/pageable-table/index.js +190 -253
- package/dist/components/pageable-table/style.css +1 -72
- package/dist/components/pageable-view/index.js +134 -199
- package/dist/components/pageable-view/style.css +1 -69
- package/dist/components/photo-swipe/index.js +116 -151
- package/dist/components/photo-swipe/style.css +1 -20
- package/dist/components/progress/index.js +60 -0
- package/dist/components/queue/index.js +76 -0
- package/dist/components/record-video/index.js +173 -0
- package/dist/components/record-video/style.css +1 -0
- package/dist/components/resize-observer/index.js +34 -68
- package/dist/components/resize-observer/style.css +1 -31
- package/dist/components/search/index.js +142 -0
- package/dist/components/search/style.css +1 -0
- package/dist/components/search-popover/index.js +153 -211
- package/dist/components/search-popover/style.css +1 -93
- package/dist/components/sign/index.js +128 -0
- package/dist/components/sign/style.css +1 -0
- package/dist/components/sign-panel/index.js +105 -142
- package/dist/components/sign-panel/style.css +1 -97
- package/dist/components/skeleton/index.js +82 -0
- package/dist/components/skeleton/style.css +1 -0
- package/dist/components/split-pane/index.js +107 -162
- package/dist/components/split-pane/style.css +1 -100
- package/dist/components/stateful/index.js +31 -34
- package/dist/components/stateful/style.css +1 -33
- package/dist/components/static-pageable-table/index.js +37 -44
- package/dist/components/static-pageable-table/style.css +1 -9
- package/dist/components/swiper/index.js +85 -150
- package/dist/components/swiper/style.css +1 -43
- package/dist/components/tab/index.js +56 -72
- package/dist/components/tab/style.css +1 -122
- package/dist/components/tab-item/index.js +30 -35
- package/dist/components/table-column/index.js +30 -32
- package/dist/components/table-page/index.js +129 -0
- package/dist/components/table-view/index.js +156 -227
- package/dist/components/table-view/style.css +1 -95
- package/dist/components/tabs/index.js +90 -0
- package/dist/components/tabs/style.css +0 -0
- package/dist/components/tag-render/index.js +44 -58
- package/dist/components/tag-render/style.css +1 -33
- package/dist/components/text-ellipsis/index.js +107 -0
- package/dist/components/text-ellipsis/style.css +1 -0
- package/dist/components/tinymce-editor/index.js +79 -95
- package/dist/components/tinymce-editor/style.css +1 -43
- package/dist/components/tinymce-wrapper/index.js +92 -121
- package/dist/components/tinymce-wrapper/style.css +1 -36
- package/dist/components/toolbar/index.js +63 -84
- package/dist/components/toolbar/style.css +1 -39
- package/dist/components/toolbar-button/index.js +41 -48
- package/dist/components/toolbar-button/style.css +1 -21
- package/dist/components/tree/index.js +427 -0
- package/dist/components/tree/style.css +1 -0
- package/dist/components/trigger/index.js +29 -36
- package/dist/components/verify/index.js +80 -0
- package/dist/components/verify/style.css +1 -0
- package/dist/components/vue-tags-input/index.js +305 -311
- package/dist/components/vue-tags-input/style.css +1 -682
- package/dist/components/watermark/index.js +43 -37
- package/dist/components/watermark/style.css +1 -11
- package/dist/index.css +4157 -1686
- package/dist/index.es.js +23131 -11014
- package/package.json +20 -4
- package/web-types.json +12777 -2788
- package/dist/chunks/3d28cc08.js +0 -57
- package/dist/chunks/5d33812d.js +0 -147
- package/dist/chunks/9d848bf6.js +0 -99
- package/dist/chunks/a0bb327b.js +0 -96
- package/dist/chunks/a8891d2c.js +0 -30
- package/dist/chunks/c69d5628.js +0 -248
- package/dist/chunks/de9fe802.js +0 -24
- package/dist/components/x-dialog/index.js +0 -199
- package/dist/components/x-dialog/style.css +0 -15
|
@@ -1,186 +1,162 @@
|
|
|
1
|
-
import { n as
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
var _c = _vm._self._c || _h;
|
|
6
|
-
return _c("div", {
|
|
1
|
+
import { n as l } from "../../chunks/vueComponentNormalizer.71e2aa87.js";
|
|
2
|
+
var h = function() {
|
|
3
|
+
var e = this, s = e.$createElement, a = e._self._c || s;
|
|
4
|
+
return a("div", {
|
|
7
5
|
staticClass: "tags-input-root"
|
|
8
|
-
}, [
|
|
9
|
-
class: `${
|
|
10
|
-
}, [
|
|
11
|
-
return
|
|
12
|
-
key:
|
|
6
|
+
}, [a("div", {
|
|
7
|
+
class: `${e.wrapperClass} tags-input`
|
|
8
|
+
}, [e._l(e.tags, function(t, i) {
|
|
9
|
+
return a("span", {
|
|
10
|
+
key: i,
|
|
13
11
|
staticClass: "el-tag el-tag--medium el-tag--light"
|
|
14
|
-
}, [
|
|
12
|
+
}, [a("span", {
|
|
15
13
|
domProps: {
|
|
16
|
-
|
|
14
|
+
innerHTML: e._s(t.value)
|
|
17
15
|
}
|
|
18
|
-
}),
|
|
16
|
+
}), a("i", {
|
|
19
17
|
staticClass: "tags-input-remove ov",
|
|
20
18
|
attrs: {
|
|
21
|
-
|
|
19
|
+
href: "#"
|
|
22
20
|
},
|
|
23
21
|
on: {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
return _vm.removeTag(index);
|
|
22
|
+
click: function(n) {
|
|
23
|
+
return n.preventDefault(), e.removeTag(i);
|
|
27
24
|
}
|
|
28
25
|
}
|
|
29
26
|
})]);
|
|
30
|
-
}),
|
|
27
|
+
}), a("input", {
|
|
31
28
|
directives: [{
|
|
32
29
|
name: "model",
|
|
33
30
|
rawName: "v-model",
|
|
34
|
-
value:
|
|
31
|
+
value: e.input,
|
|
35
32
|
expression: "input"
|
|
36
33
|
}],
|
|
37
34
|
ref: "taginput",
|
|
38
35
|
staticStyle: {
|
|
39
|
-
|
|
36
|
+
height: "28px",
|
|
40
37
|
"margin-top": "5px",
|
|
41
38
|
"line-height": "28px"
|
|
42
39
|
},
|
|
43
40
|
attrs: {
|
|
44
|
-
|
|
45
|
-
|
|
41
|
+
type: "text",
|
|
42
|
+
placeholder: e.placeholder
|
|
46
43
|
},
|
|
47
44
|
domProps: {
|
|
48
|
-
|
|
45
|
+
value: e.input
|
|
49
46
|
},
|
|
50
47
|
on: {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
return null;
|
|
63
|
-
return _vm.nextSearchResult.apply(null, arguments);
|
|
64
|
-
}, function($event) {
|
|
65
|
-
if (!$event.type.indexOf("key") && _vm._k($event.keyCode, "up", 38, $event.key, ["Up", "ArrowUp"]))
|
|
66
|
-
return null;
|
|
67
|
-
return _vm.prevSearchResult.apply(null, arguments);
|
|
68
|
-
}, _vm.onKeyDown],
|
|
69
|
-
"keyup": [_vm.onKeyUp, function($event) {
|
|
70
|
-
if (!$event.type.indexOf("key") && _vm._k($event.keyCode, "esc", 27, $event.key, ["Esc", "Escape"]))
|
|
71
|
-
return null;
|
|
72
|
-
return _vm.clearSearchResults.apply(null, arguments);
|
|
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);
|
|
73
59
|
}],
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
return;
|
|
80
|
-
_vm.input = $event.target.value;
|
|
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);
|
|
81
65
|
}
|
|
82
66
|
}
|
|
83
|
-
}),
|
|
67
|
+
}), e.elementId ? a("input", {
|
|
84
68
|
directives: [{
|
|
85
69
|
name: "model",
|
|
86
70
|
rawName: "v-model",
|
|
87
|
-
value:
|
|
71
|
+
value: e.hiddenInput,
|
|
88
72
|
expression: "hiddenInput"
|
|
89
73
|
}],
|
|
90
74
|
attrs: {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
75
|
+
id: e.elementId,
|
|
76
|
+
type: "hidden",
|
|
77
|
+
name: e.elementId
|
|
94
78
|
},
|
|
95
79
|
domProps: {
|
|
96
|
-
|
|
80
|
+
value: e.hiddenInput
|
|
97
81
|
},
|
|
98
82
|
on: {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
return;
|
|
102
|
-
_vm.hiddenInput = $event.target.value;
|
|
83
|
+
input: function(t) {
|
|
84
|
+
t.target.composing || (e.hiddenInput = t.target.value);
|
|
103
85
|
}
|
|
104
86
|
}
|
|
105
|
-
}) :
|
|
87
|
+
}) : e._e()], 2), a("div", {
|
|
106
88
|
directives: [{
|
|
107
89
|
name: "show",
|
|
108
90
|
rawName: "v-show",
|
|
109
|
-
value:
|
|
91
|
+
value: e.searchResults.length,
|
|
110
92
|
expression: "searchResults.length"
|
|
111
93
|
}]
|
|
112
|
-
}, [
|
|
113
|
-
class: `typeahead-${
|
|
114
|
-
}, [
|
|
94
|
+
}, [e.typeaheadStyle === "badges" ? a("p", {
|
|
95
|
+
class: `typeahead-${e.typeaheadStyle}`
|
|
96
|
+
}, [e.typeaheadHideDiscard ? e._e() : a("span", {
|
|
115
97
|
staticClass: "tags-input-badge typeahead-hide-btn tags-input-typeahead-item-default",
|
|
116
98
|
domProps: {
|
|
117
|
-
|
|
99
|
+
textContent: e._s(e.discardSearchText)
|
|
118
100
|
},
|
|
119
101
|
on: {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
return _vm.clearSearchResults.apply(null, arguments);
|
|
102
|
+
click: function(t) {
|
|
103
|
+
return t.preventDefault(), e.clearSearchResults.apply(null, arguments);
|
|
123
104
|
}
|
|
124
105
|
}
|
|
125
|
-
})
|
|
126
|
-
return
|
|
127
|
-
key:
|
|
106
|
+
}), e._l(e.searchResults, function(t, i) {
|
|
107
|
+
return a("span", {
|
|
108
|
+
key: i,
|
|
128
109
|
staticClass: "tags-input-badge",
|
|
129
110
|
class: {
|
|
130
|
-
"tags-input-typeahead-item-default":
|
|
131
|
-
"tags-input-typeahead-item-highlighted-default":
|
|
111
|
+
"tags-input-typeahead-item-default": i != e.searchSelection,
|
|
112
|
+
"tags-input-typeahead-item-highlighted-default": i == e.searchSelection
|
|
132
113
|
},
|
|
133
114
|
domProps: {
|
|
134
|
-
|
|
115
|
+
innerHTML: e._s(t.value)
|
|
135
116
|
},
|
|
136
117
|
on: {
|
|
137
|
-
|
|
138
|
-
|
|
118
|
+
mouseover: function(n) {
|
|
119
|
+
e.searchSelection = i;
|
|
139
120
|
},
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
return _vm.tagFromSearchOnClick(tag);
|
|
121
|
+
mousedown: function(n) {
|
|
122
|
+
return n.preventDefault(), e.tagFromSearchOnClick(t);
|
|
143
123
|
}
|
|
144
124
|
}
|
|
145
125
|
});
|
|
146
|
-
})], 2) :
|
|
147
|
-
class: `typeahead-${
|
|
148
|
-
}, [
|
|
126
|
+
})], 2) : e.typeaheadStyle === "dropdown" ? a("ul", {
|
|
127
|
+
class: `typeahead-${e.typeaheadStyle}`
|
|
128
|
+
}, [e.typeaheadHideDiscard ? e._e() : a("li", {
|
|
149
129
|
staticClass: "tags-input-typeahead-item-default typeahead-hide-btn",
|
|
150
130
|
domProps: {
|
|
151
|
-
|
|
131
|
+
textContent: e._s(e.discardSearchText)
|
|
152
132
|
},
|
|
153
133
|
on: {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
return _vm.clearSearchResults.apply(null, arguments);
|
|
134
|
+
mousedown: function(t) {
|
|
135
|
+
return t.preventDefault(), e.clearSearchResults.apply(null, arguments);
|
|
157
136
|
}
|
|
158
137
|
}
|
|
159
|
-
})
|
|
160
|
-
return
|
|
161
|
-
key:
|
|
138
|
+
}), e._l(e.searchResults, function(t, i) {
|
|
139
|
+
return a("li", {
|
|
140
|
+
key: i,
|
|
162
141
|
class: {
|
|
163
|
-
"tags-input-typeahead-item-default":
|
|
164
|
-
"tags-input-typeahead-item-highlighted-default":
|
|
142
|
+
"tags-input-typeahead-item-default": i != e.searchSelection,
|
|
143
|
+
"tags-input-typeahead-item-highlighted-default": i == e.searchSelection
|
|
165
144
|
},
|
|
166
145
|
domProps: {
|
|
167
|
-
|
|
146
|
+
innerHTML: e._s(t.value)
|
|
168
147
|
},
|
|
169
148
|
on: {
|
|
170
|
-
|
|
171
|
-
|
|
149
|
+
mouseover: function(n) {
|
|
150
|
+
e.searchSelection = i;
|
|
172
151
|
},
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
return _vm.tagFromSearchOnClick(tag);
|
|
152
|
+
mousedown: function(n) {
|
|
153
|
+
return n.preventDefault(), e.tagFromSearchOnClick(t);
|
|
176
154
|
}
|
|
177
155
|
}
|
|
178
156
|
});
|
|
179
|
-
})], 2) :
|
|
180
|
-
};
|
|
181
|
-
|
|
182
|
-
const VueTagsInput_vue_vue_type_style_index_0_lang = "";
|
|
183
|
-
const __vue2_script = {
|
|
157
|
+
})], 2) : e._e()])]);
|
|
158
|
+
}, u = [];
|
|
159
|
+
const o = {
|
|
184
160
|
name: "VueTagsInput",
|
|
185
161
|
props: {
|
|
186
162
|
elementId: {
|
|
@@ -188,19 +164,15 @@ const __vue2_script = {
|
|
|
188
164
|
},
|
|
189
165
|
existingTags: {
|
|
190
166
|
type: Array,
|
|
191
|
-
default: () =>
|
|
192
|
-
return [];
|
|
193
|
-
}
|
|
167
|
+
default: () => []
|
|
194
168
|
},
|
|
195
169
|
value: {
|
|
196
170
|
type: Array,
|
|
197
|
-
default: () =>
|
|
198
|
-
return [];
|
|
199
|
-
}
|
|
171
|
+
default: () => []
|
|
200
172
|
},
|
|
201
173
|
typeahead: {
|
|
202
174
|
type: Boolean,
|
|
203
|
-
default:
|
|
175
|
+
default: !1
|
|
204
176
|
},
|
|
205
177
|
typeaheadStyle: {
|
|
206
178
|
type: String,
|
|
@@ -216,11 +188,11 @@ const __vue2_script = {
|
|
|
216
188
|
},
|
|
217
189
|
typeaheadAlwaysShow: {
|
|
218
190
|
type: Boolean,
|
|
219
|
-
default:
|
|
191
|
+
default: !1
|
|
220
192
|
},
|
|
221
193
|
typeaheadHideDiscard: {
|
|
222
194
|
type: Boolean,
|
|
223
|
-
default:
|
|
195
|
+
default: !1
|
|
224
196
|
},
|
|
225
197
|
placeholder: {
|
|
226
198
|
type: String,
|
|
@@ -236,31 +208,31 @@ const __vue2_script = {
|
|
|
236
208
|
},
|
|
237
209
|
onlyExistingTags: {
|
|
238
210
|
type: Boolean,
|
|
239
|
-
default:
|
|
211
|
+
default: !1
|
|
240
212
|
},
|
|
241
213
|
deleteOnBackspace: {
|
|
242
214
|
type: Boolean,
|
|
243
|
-
default:
|
|
215
|
+
default: !0
|
|
244
216
|
},
|
|
245
217
|
allowDuplicates: {
|
|
246
218
|
type: Boolean,
|
|
247
|
-
default:
|
|
219
|
+
default: !1
|
|
248
220
|
},
|
|
249
221
|
validate: {
|
|
250
222
|
type: Function,
|
|
251
|
-
default: () =>
|
|
223
|
+
default: () => !0
|
|
252
224
|
},
|
|
253
225
|
addTagsOnComma: {
|
|
254
226
|
type: Boolean,
|
|
255
|
-
default:
|
|
227
|
+
default: !1
|
|
256
228
|
},
|
|
257
229
|
addTagsOnSpace: {
|
|
258
230
|
type: Boolean,
|
|
259
|
-
default:
|
|
231
|
+
default: !1
|
|
260
232
|
},
|
|
261
233
|
addTagsOnBlur: {
|
|
262
234
|
type: Boolean,
|
|
263
|
-
default:
|
|
235
|
+
default: !1
|
|
264
236
|
},
|
|
265
237
|
wrapperClass: {
|
|
266
238
|
type: String,
|
|
@@ -268,19 +240,19 @@ const __vue2_script = {
|
|
|
268
240
|
},
|
|
269
241
|
sortSearchResults: {
|
|
270
242
|
type: Boolean,
|
|
271
|
-
default:
|
|
243
|
+
default: !0
|
|
272
244
|
},
|
|
273
245
|
caseSensitiveTags: {
|
|
274
246
|
type: Boolean,
|
|
275
|
-
default:
|
|
247
|
+
default: !1
|
|
276
248
|
},
|
|
277
249
|
beforeAddingTag: {
|
|
278
250
|
type: Function,
|
|
279
|
-
default: () =>
|
|
251
|
+
default: () => !0
|
|
280
252
|
},
|
|
281
253
|
beforeRemovingTag: {
|
|
282
254
|
type: Function,
|
|
283
|
-
default: () =>
|
|
255
|
+
default: () => !0
|
|
284
256
|
}
|
|
285
257
|
},
|
|
286
258
|
data() {
|
|
@@ -294,266 +266,288 @@ const __vue2_script = {
|
|
|
294
266
|
};
|
|
295
267
|
},
|
|
296
268
|
watch: {
|
|
297
|
-
input(
|
|
298
|
-
this.$emit("input-changed",
|
|
299
|
-
this.searchTag(false);
|
|
300
|
-
if (newVal.length && newVal !== oldVal) {
|
|
301
|
-
if (this.addTagsOnSpace) {
|
|
302
|
-
if (newVal.endsWith(" ")) {
|
|
303
|
-
this.input = newVal.trim();
|
|
304
|
-
this.tagFromInput(true);
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
if (this.addTagsOnComma) {
|
|
308
|
-
newVal = newVal.trim();
|
|
309
|
-
if (newVal.endsWith(",")) {
|
|
310
|
-
this.input = newVal.substring(0, newVal.length - 1);
|
|
311
|
-
this.tagFromInput(true);
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
this.$emit("change", newVal);
|
|
315
|
-
}
|
|
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));
|
|
316
271
|
},
|
|
317
272
|
tags() {
|
|
318
|
-
this.hiddenInput = JSON.stringify(this.tags);
|
|
319
|
-
this.$emit("input", this.tags);
|
|
273
|
+
this.hiddenInput = JSON.stringify(this.tags), this.$emit("input", this.tags);
|
|
320
274
|
},
|
|
321
275
|
value() {
|
|
322
276
|
this.tagsFromValue();
|
|
323
277
|
},
|
|
324
|
-
typeaheadAlwaysShow(
|
|
325
|
-
|
|
326
|
-
this.searchTag(false);
|
|
327
|
-
} else {
|
|
328
|
-
this.clearSearchResults();
|
|
329
|
-
}
|
|
278
|
+
typeaheadAlwaysShow(e) {
|
|
279
|
+
e ? this.searchTag(!1) : this.clearSearchResults();
|
|
330
280
|
}
|
|
331
281
|
},
|
|
332
282
|
created() {
|
|
333
|
-
this.tagsFromValue();
|
|
334
|
-
if (this.typeaheadAlwaysShow) {
|
|
335
|
-
this.searchTag(false);
|
|
336
|
-
}
|
|
337
|
-
this.$emit("initialized");
|
|
283
|
+
this.tagsFromValue(), this.typeaheadAlwaysShow && this.searchTag(!1), this.$emit("initialized");
|
|
338
284
|
},
|
|
339
285
|
methods: {
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
286
|
+
/**
|
|
287
|
+
* Remove reserved regex characters from a string so that they don't
|
|
288
|
+
* affect search results
|
|
289
|
+
*
|
|
290
|
+
* @param string
|
|
291
|
+
* @returns String
|
|
292
|
+
*/
|
|
293
|
+
escapeRegExp(e) {
|
|
294
|
+
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
295
|
+
},
|
|
296
|
+
/**
|
|
297
|
+
* Add a tag whether from user input or from search results (typeahead)
|
|
298
|
+
*
|
|
299
|
+
* @param ignoreSearchResults
|
|
300
|
+
* @returns void
|
|
301
|
+
*/
|
|
302
|
+
tagFromInput(e = !1) {
|
|
303
|
+
if (this.searchResults.length && this.searchSelection >= 0 && !e)
|
|
304
|
+
this.tagFromSearch(this.searchResults[this.searchSelection]), this.input = "";
|
|
305
|
+
else {
|
|
306
|
+
const s = this.input.trim();
|
|
307
|
+
if (!this.onlyExistingTags && s.length && this.validate(s)) {
|
|
350
308
|
this.input = "";
|
|
351
|
-
let
|
|
309
|
+
let a = {
|
|
352
310
|
key: "",
|
|
353
|
-
value:
|
|
311
|
+
value: s
|
|
354
312
|
};
|
|
355
|
-
const
|
|
356
|
-
for (const
|
|
357
|
-
const
|
|
358
|
-
if (
|
|
359
|
-
|
|
313
|
+
const t = this.escapeRegExp(this.caseSensitiveTags ? a.value : a.value.toLowerCase());
|
|
314
|
+
for (const i of this.existingTags) {
|
|
315
|
+
const n = this.caseSensitiveTags ? i.value : i.value.toLowerCase();
|
|
316
|
+
if (t === n) {
|
|
317
|
+
a = Object.assign({}, i);
|
|
360
318
|
break;
|
|
361
319
|
}
|
|
362
320
|
}
|
|
363
|
-
this.addTag(
|
|
321
|
+
this.addTag(a);
|
|
364
322
|
}
|
|
365
323
|
}
|
|
366
324
|
},
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
this.$
|
|
375
|
-
|
|
376
|
-
|
|
325
|
+
/**
|
|
326
|
+
* Add a tag from search results when a user clicks on it
|
|
327
|
+
*
|
|
328
|
+
* @param tag
|
|
329
|
+
* @returns void
|
|
330
|
+
*/
|
|
331
|
+
tagFromSearchOnClick(e) {
|
|
332
|
+
this.tagFromSearch(e), this.$refs.taginput.blur();
|
|
333
|
+
},
|
|
334
|
+
/**
|
|
335
|
+
* Add the selected tag from the search results.
|
|
336
|
+
* Clear search results.
|
|
337
|
+
* Clear user input.
|
|
338
|
+
*
|
|
339
|
+
* @param tag
|
|
340
|
+
* @return void
|
|
341
|
+
*/
|
|
342
|
+
tagFromSearch(e) {
|
|
343
|
+
this.clearSearchResults(), this.addTag(e), this.$nextTick(() => {
|
|
344
|
+
this.input = "", this.oldInput = "";
|
|
377
345
|
});
|
|
378
346
|
},
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
this.$
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
347
|
+
/**
|
|
348
|
+
* Add/Select a tag
|
|
349
|
+
*
|
|
350
|
+
* @param tag
|
|
351
|
+
* @returns void | Boolean
|
|
352
|
+
*/
|
|
353
|
+
addTag(e) {
|
|
354
|
+
if (!this.beforeAddingTag(e))
|
|
355
|
+
return !1;
|
|
356
|
+
if (this.limit > 0 && this.tags.length >= this.limit)
|
|
357
|
+
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");
|
|
360
|
+
}));
|
|
361
|
+
},
|
|
362
|
+
/**
|
|
363
|
+
* Remove the last tag in the tags array.
|
|
364
|
+
*
|
|
365
|
+
* @returns void
|
|
366
|
+
*/
|
|
395
367
|
removeLastTag() {
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
this.tags
|
|
406
|
-
this
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
this.searchTag();
|
|
411
|
-
}
|
|
368
|
+
!this.input.length && this.deleteOnBackspace && this.tags.length && this.removeTag(this.tags.length - 1);
|
|
369
|
+
},
|
|
370
|
+
/**
|
|
371
|
+
* Remove the selected tag at the specified index.
|
|
372
|
+
*
|
|
373
|
+
* @param index
|
|
374
|
+
* @returns void
|
|
375
|
+
*/
|
|
376
|
+
removeTag(e) {
|
|
377
|
+
const s = this.tags[e];
|
|
378
|
+
if (!this.beforeRemovingTag(s))
|
|
379
|
+
return !1;
|
|
380
|
+
this.tags.splice(e, 1), this.$nextTick(() => {
|
|
381
|
+
this.$emit("tag-removed", s), this.$emit("tags-updated"), this.typeaheadAlwaysShow && this.searchTag();
|
|
412
382
|
});
|
|
413
383
|
},
|
|
384
|
+
/**
|
|
385
|
+
* Search the currently entered text in the list of existing tags
|
|
386
|
+
*
|
|
387
|
+
* @returns void | Boolean
|
|
388
|
+
*/
|
|
414
389
|
searchTag() {
|
|
415
|
-
if (this.typeahead !==
|
|
416
|
-
return
|
|
417
|
-
}
|
|
390
|
+
if (this.typeahead !== !0)
|
|
391
|
+
return !1;
|
|
418
392
|
if (this.oldInput !== this.input || !this.searchResults.length && this.typeaheadActivationThreshold === 0 || this.typeaheadAlwaysShow) {
|
|
419
|
-
this.searchResults = [];
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
const
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
if (compareable.search(searchQuery) > -1 && !this.tagSelected(tag)) {
|
|
427
|
-
this.searchResults.push(tag);
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
if (this.sortSearchResults) {
|
|
431
|
-
this.searchResults.sort((a, b) => {
|
|
432
|
-
if (a.value < b.value)
|
|
433
|
-
return -1;
|
|
434
|
-
if (a.value > b.value)
|
|
435
|
-
return 1;
|
|
436
|
-
return 0;
|
|
437
|
-
});
|
|
438
|
-
}
|
|
439
|
-
if (this.typeaheadMaxResults > 0) {
|
|
440
|
-
this.searchResults = this.searchResults.slice(0, this.typeaheadMaxResults);
|
|
441
|
-
}
|
|
393
|
+
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));
|
|
442
400
|
}
|
|
443
401
|
this.oldInput = this.input;
|
|
444
402
|
}
|
|
445
403
|
},
|
|
404
|
+
/**
|
|
405
|
+
* Hide the typeahead if there's nothing intered into the input field.
|
|
406
|
+
*
|
|
407
|
+
* @returns void
|
|
408
|
+
*/
|
|
446
409
|
hideTypeahead() {
|
|
447
|
-
|
|
448
|
-
this
|
|
449
|
-
|
|
450
|
-
});
|
|
451
|
-
}
|
|
410
|
+
this.input.length || this.$nextTick(() => {
|
|
411
|
+
this.clearSearchResults();
|
|
412
|
+
});
|
|
452
413
|
},
|
|
414
|
+
/**
|
|
415
|
+
* Select the next search result in typeahead.
|
|
416
|
+
*
|
|
417
|
+
* @returns void
|
|
418
|
+
*/
|
|
453
419
|
nextSearchResult() {
|
|
454
|
-
|
|
455
|
-
this.searchSelection++;
|
|
456
|
-
}
|
|
420
|
+
this.searchSelection + 1 <= this.searchResults.length - 1 && this.searchSelection++;
|
|
457
421
|
},
|
|
422
|
+
/**
|
|
423
|
+
* Select the previous search result in typeahead.
|
|
424
|
+
*
|
|
425
|
+
* @returns void
|
|
426
|
+
*/
|
|
458
427
|
prevSearchResult() {
|
|
459
|
-
|
|
460
|
-
this.searchSelection--;
|
|
461
|
-
}
|
|
428
|
+
this.searchSelection > 0 && this.searchSelection--;
|
|
462
429
|
},
|
|
430
|
+
/**
|
|
431
|
+
* Clear/Empty the search results.
|
|
432
|
+
*
|
|
433
|
+
* @reutrns void
|
|
434
|
+
*/
|
|
463
435
|
clearSearchResults() {
|
|
464
|
-
this.searchResults = []
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
this.$nextTick(() => {
|
|
468
|
-
this.searchTag();
|
|
469
|
-
});
|
|
470
|
-
}
|
|
436
|
+
this.searchResults = [], this.searchSelection = 0, this.typeaheadAlwaysShow && this.$nextTick(() => {
|
|
437
|
+
this.searchTag();
|
|
438
|
+
});
|
|
471
439
|
},
|
|
440
|
+
/**
|
|
441
|
+
* Clear the list of selected tags.
|
|
442
|
+
*
|
|
443
|
+
* @returns void
|
|
444
|
+
*/
|
|
472
445
|
clearTags() {
|
|
473
446
|
this.tags.splice(0, this.tags.length);
|
|
474
447
|
},
|
|
448
|
+
/**
|
|
449
|
+
* Replace the currently selected tags with the tags from the value.
|
|
450
|
+
*
|
|
451
|
+
* @returns void
|
|
452
|
+
*/
|
|
475
453
|
tagsFromValue() {
|
|
476
454
|
if (this.value && this.value.length) {
|
|
477
455
|
if (!Array.isArray(this.value)) {
|
|
478
456
|
console.error("Voerro Tags Input: the v-model value must be an array!");
|
|
479
457
|
return;
|
|
480
458
|
}
|
|
481
|
-
const
|
|
482
|
-
if (this.tags ===
|
|
459
|
+
const e = this.value;
|
|
460
|
+
if (this.tags === e)
|
|
483
461
|
return;
|
|
484
|
-
}
|
|
485
462
|
this.clearTags();
|
|
486
|
-
for (const
|
|
487
|
-
this.addTag(
|
|
488
|
-
}
|
|
463
|
+
for (const s of e)
|
|
464
|
+
this.addTag(s);
|
|
489
465
|
} else {
|
|
490
|
-
if (this.tags.length === 0)
|
|
466
|
+
if (this.tags.length === 0)
|
|
491
467
|
return;
|
|
492
|
-
}
|
|
493
468
|
this.clearTags();
|
|
494
469
|
}
|
|
495
470
|
},
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
471
|
+
/**
|
|
472
|
+
* Check if a tag is already selected.
|
|
473
|
+
*
|
|
474
|
+
* @param tag
|
|
475
|
+
* @returns Boolean
|
|
476
|
+
*/
|
|
477
|
+
tagSelected(e) {
|
|
478
|
+
if (this.allowDuplicates || !e)
|
|
479
|
+
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)
|
|
484
|
+
return !0;
|
|
502
485
|
}
|
|
503
|
-
|
|
504
|
-
for (const selectedTag of this.tags) {
|
|
505
|
-
const compareable = this.caseSensitiveTags ? selectedTag.value : selectedTag.value.toLowerCase();
|
|
506
|
-
if (selectedTag.key === tag.key && compareable.search(searchQuery) > -1) {
|
|
507
|
-
return true;
|
|
508
|
-
}
|
|
509
|
-
}
|
|
510
|
-
return false;
|
|
486
|
+
return !1;
|
|
511
487
|
},
|
|
488
|
+
/**
|
|
489
|
+
* Clear the input.
|
|
490
|
+
*
|
|
491
|
+
* @returns void
|
|
492
|
+
*/
|
|
512
493
|
clearInput() {
|
|
513
494
|
this.input = "";
|
|
514
495
|
},
|
|
496
|
+
/**
|
|
497
|
+
* Process all the keyup events.
|
|
498
|
+
*
|
|
499
|
+
* @param e
|
|
500
|
+
* @returns void
|
|
501
|
+
*/
|
|
515
502
|
onKeyUp(e) {
|
|
516
503
|
this.$emit("keyup", e);
|
|
517
504
|
},
|
|
505
|
+
/**
|
|
506
|
+
* Process all the keydown events.
|
|
507
|
+
*
|
|
508
|
+
* @param e
|
|
509
|
+
* @returns void
|
|
510
|
+
*/
|
|
518
511
|
onKeyDown(e) {
|
|
519
512
|
this.$emit("keydown", e);
|
|
520
513
|
},
|
|
514
|
+
/**
|
|
515
|
+
* Process the onfocus event.
|
|
516
|
+
*
|
|
517
|
+
* @param e
|
|
518
|
+
* @returns void
|
|
519
|
+
*/
|
|
521
520
|
onFocus(e) {
|
|
522
|
-
this.$emit("focus", e);
|
|
523
|
-
|
|
524
|
-
|
|
521
|
+
this.$emit("focus", e), this.searchTag();
|
|
522
|
+
},
|
|
523
|
+
/**
|
|
524
|
+
* Process the onblur event.
|
|
525
|
+
*
|
|
526
|
+
* @param e
|
|
527
|
+
* @returns void
|
|
528
|
+
*/
|
|
525
529
|
onBlur(e) {
|
|
526
|
-
this.$emit("blur", e);
|
|
527
|
-
if (this.addTagsOnBlur) {
|
|
528
|
-
this.tagFromInput(true);
|
|
529
|
-
}
|
|
530
|
-
if (!this.typeaheadAlwaysShow) {
|
|
531
|
-
this.hideTypeahead();
|
|
532
|
-
} else {
|
|
533
|
-
this.searchTag();
|
|
534
|
-
}
|
|
530
|
+
this.$emit("blur", e), this.addTagsOnBlur && this.tagFromInput(!0), this.typeaheadAlwaysShow ? this.searchTag() : this.hideTypeahead();
|
|
535
531
|
}
|
|
536
532
|
}
|
|
537
|
-
};
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
__vue2_injectStyles,
|
|
533
|
+
}, r = {};
|
|
534
|
+
var c = /* @__PURE__ */ l(
|
|
535
|
+
o,
|
|
536
|
+
h,
|
|
537
|
+
u,
|
|
538
|
+
!1,
|
|
539
|
+
p,
|
|
545
540
|
null,
|
|
546
541
|
null,
|
|
547
542
|
null
|
|
548
543
|
);
|
|
549
|
-
function
|
|
550
|
-
for (let
|
|
551
|
-
this[
|
|
552
|
-
}
|
|
544
|
+
function p(e) {
|
|
545
|
+
for (let s in r)
|
|
546
|
+
this[s] = r[s];
|
|
553
547
|
}
|
|
554
|
-
const
|
|
555
|
-
return
|
|
548
|
+
const g = /* @__PURE__ */ function() {
|
|
549
|
+
return c.exports;
|
|
556
550
|
}();
|
|
557
551
|
export {
|
|
558
|
-
|
|
552
|
+
g as default
|
|
559
553
|
};
|