@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.
- package/address-input/index.mjs +20 -57
- package/affix/index.mjs +26 -47
- package/aside-menu/index.mjs +18 -43
- package/avatar/index.mjs +27 -49
- package/awesome-button/index.mjs +35 -43
- package/capsule-tab/index.mjs +16 -34
- package/card/index.mjs +21 -76
- package/carousel/index.mjs +14 -49
- package/chat/index.mjs +104 -414
- package/chunk-file-uploader/index.mjs +21 -38
- package/chunks/FormTemp.aa57efb4.mjs +125 -0
- package/code-mirror-editor/index.mjs +69 -79
- package/color-picker/index.mjs +29 -60
- package/comment/index.mjs +17 -48
- package/confirm-button/index.mjs +11 -19
- package/confirmable/index.mjs +12 -20
- package/context-menu/index.mjs +42 -144
- package/count-up/index.mjs +18 -25
- package/custom-scrollbar/index.mjs +13 -22
- package/data-box/index.mjs +15 -66
- package/data-card/index.mjs +16 -65
- package/data-cardtext/index.mjs +16 -52
- package/data-display/index.mjs +18 -62
- package/data-icons/index.mjs +16 -68
- package/data-imgtext/index.mjs +18 -79
- package/data-operatext/index.mjs +18 -75
- package/data-panel/index.mjs +16 -63
- package/data-pay/index.mjs +20 -122
- package/data-price/index.mjs +18 -60
- package/data-progress/index.mjs +16 -67
- package/data-rotate/index.mjs +16 -66
- package/data-table-picker/index.mjs +25 -88
- package/data-tabs/index.mjs +16 -64
- package/dialog-form/index.mjs +48 -94
- package/dynamic-table/index.mjs +43 -127
- package/e-charts/index.mjs +21 -34
- package/easy-popup/index.mjs +35 -61
- package/editable-progress/index.mjs +22 -77
- package/editable-tree/index.mjs +235 -546
- package/egd-collapse/index.mjs +13 -26
- package/egd-collapse-item/index.mjs +27 -87
- package/element-dialog/index.mjs +69 -133
- package/empty-view/index.mjs +13 -33
- package/error-view/index.mjs +14 -34
- package/flex-column/index.mjs +15 -23
- package/flex-item/index.mjs +18 -26
- package/flex-row/index.mjs +23 -31
- package/flex-scroller/index.mjs +16 -27
- package/flow/index.mjs +70 -110
- package/flow-designer/index.mjs +1215 -4804
- package/flow-node/index.mjs +15 -51
- package/flow-viewer/index.mjs +64 -89
- package/form-block/index.mjs +43 -62
- package/form-button/index.mjs +10 -18
- package/form-cascader/index.mjs +49 -100
- package/form-checkbox-group/index.mjs +43 -110
- package/form-date-picker/index.mjs +51 -97
- package/form-holder/index.mjs +25 -42
- package/form-input/index.mjs +40 -90
- package/form-input-email/index.mjs +35 -79
- package/form-input-id-card/index.mjs +40 -87
- package/form-input-number/index.mjs +42 -102
- package/form-input-phone-number/index.mjs +34 -75
- package/form-input-tag/index.mjs +31 -73
- package/form-input-time/index.mjs +42 -87
- package/form-item/index.mjs +70 -89
- package/form-item-config-provider/index.mjs +12 -20
- package/form-item-group/index.mjs +46 -65
- package/form-radio-group/index.mjs +50 -108
- package/form-select/index.mjs +44 -95
- package/form-switch/index.mjs +38 -85
- package/form-textarea/index.mjs +31 -75
- package/form-view/index.mjs +112 -260
- package/fy-array/index.mjs +35 -121
- package/fy-article/index.mjs +12 -43
- package/fy-cascader/index.mjs +26 -67
- package/fy-checkbox/index.mjs +27 -77
- package/fy-code/index.mjs +19 -33
- package/fy-curd/index.mjs +810 -2017
- package/fy-date/index.mjs +18 -59
- package/fy-draggable/index.mjs +81 -140
- package/fy-dynamic/index.mjs +85 -204
- package/fy-empty/index.mjs +14 -35
- package/fy-form/index.mjs +254 -571
- package/fy-form-design/index.mjs +1489 -6084
- package/fy-form-design/style.css +1 -1
- package/fy-input/index.mjs +34 -104
- package/fy-input-color/index.mjs +22 -67
- package/fy-input-icon/index.mjs +37 -122
- package/fy-input-map/index.mjs +57 -149
- package/fy-input-number/index.mjs +18 -53
- package/fy-input-table/index.mjs +36 -102
- package/fy-input-tree/index.mjs +51 -138
- package/fy-progress/index.mjs +12 -31
- package/fy-radio/index.mjs +20 -51
- package/fy-rate/index.mjs +18 -51
- package/fy-select/index.mjs +49 -134
- package/fy-slider/index.mjs +19 -52
- package/fy-switch/index.mjs +18 -48
- package/fy-tabs/index.mjs +19 -51
- package/fy-time/index.mjs +22 -62
- package/fy-title/index.mjs +14 -25
- package/fy-tree/index.mjs +74 -216
- package/fy-u-editor/index.mjs +50 -64
- package/fy-upload/index.mjs +167 -338
- package/guide-steps/index.mjs +33 -53
- package/highlight-j-s/index.mjs +13 -27
- package/icon-card/index.mjs +12 -36
- package/icon-temp/index.mjs +12 -34
- package/iframe-window/index.mjs +13 -40
- package/image-cropper/index.mjs +46 -171
- package/image-preview/index.mjs +54 -168
- package/image-viewer/index.mjs +24 -50
- package/index.css +1 -0
- package/index.mjs +3973 -501
- package/input-number/index.mjs +84 -173
- package/input-number-range/index.mjs +20 -70
- package/j-s-x-component/index.mjs +3 -3
- package/keep-view-alive/index.mjs +47 -55
- package/keyboard/index.mjs +100 -113
- package/license/index.mjs +34 -51
- package/loading-view/index.mjs +14 -34
- package/login/index.mjs +33 -161
- package/monaco-editor/index.mjs +13 -21
- package/name-avatar/index.mjs +13 -32
- package/nav-bar/index.mjs +12 -31
- package/not-implement/index.mjs +14 -25
- package/notice/index.mjs +32 -80
- package/package.json +1 -1
- package/page/index.mjs +11 -23
- package/page-header/index.mjs +16 -37
- package/page-index/index.mjs +42 -93
- package/page-index-top/index.mjs +42 -84
- package/page-skeleton/index.mjs +24 -39
- package/page-skeleton-new/index.mjs +21 -68
- package/pageable-table/index.mjs +105 -227
- package/pageable-view/index.mjs +30 -83
- package/photo-swipe/index.mjs +62 -87
- package/present-view/index.mjs +114 -267
- package/queue/index.mjs +14 -29
- package/record-video/index.mjs +29 -66
- package/resize-observer/index.mjs +18 -30
- package/search/index.mjs +47 -81
- package/search-popover/index.mjs +57 -329
- package/sign/index.mjs +43 -60
- package/sign-panel/index.mjs +40 -151
- package/skeleton/index.mjs +18 -44
- package/split-pane/index.mjs +45 -129
- package/stateful/index.mjs +18 -26
- package/static-pageable-table/index.mjs +18 -44
- package/swiper/index.mjs +53 -94
- package/tab/index.mjs +13 -39
- package/tab-item/index.mjs +23 -37
- package/table-column/index.mjs +27 -35
- package/table-view/index.mjs +89 -209
- package/tag-render/index.mjs +34 -69
- package/text-ellipsis/index.mjs +22 -47
- package/tinymce-editor/index.mjs +174 -285
- package/toolbar/index.mjs +21 -42
- package/toolbar-button/index.mjs +25 -54
- package/verify/index.mjs +16 -29
- package/vue-cron/index.mjs +272 -1089
- package/vue-qr-code/index.mjs +19 -27
- package/vue-quill-editor/index.mjs +15 -27
- package/vue-tags-input/index.mjs +104 -224
- package/vue-tree-select/index.mjs +595 -742
- package/vue-video-player/index.mjs +42 -57
- package/watermark/index.mjs +27 -35
- package/web-types.json +1 -1
- package/x-input-tag/index.mjs +50 -112
- package/chunks/FormTemp.7f91629d.mjs +0 -165
- /package/chunks/{vueComponentNormalizer.446f5dc4.mjs → _plugin-vue2_normalizer.446f5dc4.mjs} +0 -0
package/vue-qr-code/index.mjs
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
var o = (t,
|
|
2
|
-
var c = (
|
|
1
|
+
var o = (t, n, a) => new Promise((l, r) => {
|
|
2
|
+
var c = (e) => {
|
|
3
3
|
try {
|
|
4
|
-
a
|
|
4
|
+
s(a.next(e));
|
|
5
5
|
} catch (i) {
|
|
6
6
|
r(i);
|
|
7
7
|
}
|
|
8
|
-
},
|
|
8
|
+
}, p = (e) => {
|
|
9
9
|
try {
|
|
10
|
-
a
|
|
10
|
+
s(a.throw(e));
|
|
11
11
|
} catch (i) {
|
|
12
12
|
r(i);
|
|
13
13
|
}
|
|
14
|
-
},
|
|
15
|
-
|
|
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
|
|
18
|
-
import { n as
|
|
19
|
-
const
|
|
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:
|
|
54
|
-
|
|
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
|
-
|
|
63
|
-
|
|
64
|
-
var x = /* @__PURE__ */ f(
|
|
65
|
-
m,
|
|
61
|
+
}, g = null, _ = null;
|
|
62
|
+
var x = /* @__PURE__ */ m(
|
|
63
|
+
f,
|
|
66
64
|
g,
|
|
67
|
-
|
|
65
|
+
_,
|
|
68
66
|
!1,
|
|
69
|
-
|
|
67
|
+
null,
|
|
70
68
|
null,
|
|
71
69
|
null,
|
|
72
70
|
null
|
|
73
71
|
);
|
|
74
|
-
|
|
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
|
-
|
|
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
|
|
5
|
-
import { n } from "../chunks/
|
|
6
|
-
|
|
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
|
-
},
|
|
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:
|
|
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
|
|
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
|
-
}
|
|
98
|
-
var
|
|
99
|
-
|
|
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
|
-
|
|
97
|
+
null,
|
|
104
98
|
null,
|
|
105
99
|
null,
|
|
106
100
|
null
|
|
107
101
|
);
|
|
108
|
-
|
|
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
|
-
|
|
104
|
+
q as default
|
|
117
105
|
};
|
package/vue-tags-input/index.mjs
CHANGED
|
@@ -1,162 +1,5 @@
|
|
|
1
|
-
import { n as
|
|
2
|
-
|
|
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(
|
|
270
|
-
this.$emit("input-changed",
|
|
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(
|
|
279
|
-
|
|
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(
|
|
294
|
-
return
|
|
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(
|
|
303
|
-
if (this.searchResults.length && this.searchSelection >= 0 && !
|
|
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
|
|
307
|
-
if (!this.onlyExistingTags &&
|
|
149
|
+
const e = this.input.trim();
|
|
150
|
+
if (!this.onlyExistingTags && e.length && this.validate(e)) {
|
|
308
151
|
this.input = "";
|
|
309
|
-
let
|
|
152
|
+
let s = {
|
|
310
153
|
key: "",
|
|
311
|
-
value:
|
|
154
|
+
value: e
|
|
312
155
|
};
|
|
313
|
-
const
|
|
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 (
|
|
317
|
-
|
|
159
|
+
if (a === n) {
|
|
160
|
+
s = Object.assign({}, i);
|
|
318
161
|
break;
|
|
319
162
|
}
|
|
320
163
|
}
|
|
321
|
-
this.addTag(
|
|
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(
|
|
332
|
-
this.tagFromSearch(
|
|
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(
|
|
343
|
-
this.clearSearchResults(), this.addTag(
|
|
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(
|
|
354
|
-
if (!this.beforeAddingTag(
|
|
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(
|
|
359
|
-
this.$emit("tag-added",
|
|
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(
|
|
377
|
-
const
|
|
378
|
-
if (!this.beforeRemovingTag(
|
|
219
|
+
removeTag(t) {
|
|
220
|
+
const e = this.tags[t];
|
|
221
|
+
if (!this.beforeRemovingTag(e))
|
|
379
222
|
return !1;
|
|
380
|
-
this.tags.splice(
|
|
381
|
-
this.$emit("tag-removed",
|
|
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
|
|
395
|
-
if (
|
|
396
|
-
const
|
|
397
|
-
for (const
|
|
398
|
-
(this.caseSensitiveTags ?
|
|
399
|
-
this.sortSearchResults && this.searchResults.sort((
|
|
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
|
|
460
|
-
if (this.tags ===
|
|
302
|
+
const t = this.value;
|
|
303
|
+
if (this.tags === t)
|
|
461
304
|
return;
|
|
462
305
|
this.clearTags();
|
|
463
|
-
for (const
|
|
464
|
-
this.addTag(
|
|
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(
|
|
478
|
-
if (this.allowDuplicates || !
|
|
320
|
+
tagSelected(t) {
|
|
321
|
+
if (this.allowDuplicates || !t)
|
|
479
322
|
return !1;
|
|
480
|
-
const
|
|
481
|
-
for (const
|
|
482
|
-
const
|
|
483
|
-
if (
|
|
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(
|
|
503
|
-
this.$emit("keyup",
|
|
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(
|
|
512
|
-
this.$emit("keydown",
|
|
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(
|
|
521
|
-
this.$emit("focus",
|
|
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(
|
|
530
|
-
this.$emit("blur",
|
|
372
|
+
onBlur(t) {
|
|
373
|
+
this.$emit("blur", t), this.addTagsOnBlur && this.tagFromInput(!0), this.typeaheadAlwaysShow ? this.searchTag() : this.hideTypeahead();
|
|
531
374
|
}
|
|
532
375
|
}
|
|
533
|
-
}
|
|
534
|
-
var
|
|
535
|
-
|
|
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
|
-
|
|
425
|
+
null,
|
|
540
426
|
null,
|
|
541
427
|
null,
|
|
542
428
|
null
|
|
543
429
|
);
|
|
544
|
-
|
|
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
|
-
|
|
432
|
+
p as default
|
|
553
433
|
};
|