@cas-smartdesign/token-selector 0.16.1 → 0.16.2
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/docs/4_dnd.js +1 -1
- package/dist/docs/doc.mjs +19 -9
- package/dist/drag-and-drop-extension.d.ts +1 -1
- package/dist/token-selector-with-externals.js +2 -2
- package/dist/token-selector-with-externals.js.map +3 -3
- package/dist/token-selector.mjs +113 -110
- package/dist/token-selector.mjs.map +1 -1
- package/package.json +5 -5
package/dist/token-selector.mjs
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { LitElement as
|
|
1
|
+
import { LitElement as x, unsafeCSS as T, html as m, nothing as w } from "lit";
|
|
2
2
|
import { property as a } from "lit/decorators/property.js";
|
|
3
3
|
import "@cas-smartdesign/lit-input";
|
|
4
|
-
import
|
|
5
|
-
import { generator as
|
|
6
|
-
import
|
|
4
|
+
import S from "@cas-smartdesign/field-validation-message";
|
|
5
|
+
import { generator as _ } from "@cas-smartdesign/list-item";
|
|
6
|
+
import C from "@cas-smartdesign/popover";
|
|
7
7
|
import I from "@cas-smartdesign/list";
|
|
8
|
-
import { KeyDownDelegator as
|
|
9
|
-
import { ifDefined as
|
|
10
|
-
import { unsafeSVG as
|
|
11
|
-
import
|
|
12
|
-
class
|
|
8
|
+
import { KeyDownDelegator as A } from "@cas-smartdesign/element-utils";
|
|
9
|
+
import { ifDefined as P } from "lit/directives/if-defined.js";
|
|
10
|
+
import { unsafeSVG as L } from "lit/directives/unsafe-svg.js";
|
|
11
|
+
import D from "@cas-smartdesign/image-tools";
|
|
12
|
+
class O {
|
|
13
13
|
constructor(e, t, i, s) {
|
|
14
|
-
this.inputElement = e, this.notSelectedTokensProvider = t, this.initializeCallback = s, this.filter = (n,
|
|
15
|
-
const
|
|
16
|
-
i(
|
|
17
|
-
}), new
|
|
18
|
-
this._tokenList.dispatchEvent(new KeyboardEvent(n.type, n)), !
|
|
14
|
+
this.inputElement = e, this.notSelectedTokensProvider = t, this.initializeCallback = s, this.filter = (n, o) => n ? o.filter((d) => d.disabled || d.deactivated ? !1 : d.caption && d.caption.toLowerCase().includes(n)) : o, I.ensureDefined(), this._tokenList = new I(), this._tokenList.style.minWidth = "250px", this._tokenList.addEventListener("selection", (n) => {
|
|
15
|
+
const o = n.detail.index, d = this._suggestItems[o];
|
|
16
|
+
i(d), this.hide();
|
|
17
|
+
}), new A(this._tokenList, (n, o, d) => {
|
|
18
|
+
this._tokenList.dispatchEvent(new KeyboardEvent(n.type, n)), !d && !this.isOpened && this.show();
|
|
19
19
|
}).connect(e);
|
|
20
20
|
}
|
|
21
21
|
show() {
|
|
@@ -41,7 +41,7 @@ class D {
|
|
|
41
41
|
return this._popover || (this._popover = this.createPopover(), this.initializeCallback(this)), this._popover;
|
|
42
42
|
}
|
|
43
43
|
createPopover() {
|
|
44
|
-
const e = new
|
|
44
|
+
const e = new C();
|
|
45
45
|
return e.setAttribute("trigger-type", "manual"), e.setAttribute("placement", "bottom-start"), e.setAttribute("modal", ""), e.setAttribute("popover-for", "token-autosuggest-popover"), e.setAttribute("offset", "-2"), e.targetElement = this.inputElement, e.appendChild(this._tokenList), e;
|
|
46
46
|
}
|
|
47
47
|
get isOpened() {
|
|
@@ -51,25 +51,25 @@ class D {
|
|
|
51
51
|
return this._suggestItems[this._tokenList.focusIndex];
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
const
|
|
54
|
+
const M = ":host{flex-shrink:0;max-width:100%}.container{display:flex;height:28px;background-color:var(--token-background-color, #f3f3f3);border:var(--token-border);box-sizing:border-box}.container .icon-wrapper{display:flex;flex-shrink:0;justify-content:center;align-items:center;width:28px;height:100%;overflow:hidden;background-color:var(--token-icon-background-color, transparent)}.container .icon-wrapper .icon{height:100%;width:100%;object-fit:contain;background-size:cover;background-repeat:no-repeat;background-position:center}.container .value{display:inline-block;align-self:center;padding:0 8px;font-family:Segoe UI,Lucida Sans,Arial,sans-serif;font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.container .delete-button-wrapper{display:flex;align-self:center;height:16px;width:16px;padding-right:8px;opacity:.5}.container .delete-button-wrapper:hover{cursor:pointer;filter:brightness(10%);opacity:1}", $ = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">\r
|
|
55
55
|
<path d="m3.5 12.5 9-9m-9 0 9 9" style="fill:none;stroke:#333;stroke-linecap:square;stroke-width:1.1px"/>\r
|
|
56
56
|
</svg>`;
|
|
57
|
-
var
|
|
58
|
-
for (var s = i > 1 ? void 0 : i ?
|
|
59
|
-
(
|
|
60
|
-
return i && s &&
|
|
57
|
+
var q = Object.defineProperty, G = Object.getOwnPropertyDescriptor, g = (r, e, t, i) => {
|
|
58
|
+
for (var s = i > 1 ? void 0 : i ? G(e, t) : e, n = r.length - 1, o; n >= 0; n--)
|
|
59
|
+
(o = r[n]) && (s = (i ? o(e, t, s) : o(s)) || s);
|
|
60
|
+
return i && s && q(e, t, s), s;
|
|
61
61
|
};
|
|
62
|
-
const
|
|
63
|
-
fromAttribute: (
|
|
64
|
-
toAttribute: (
|
|
62
|
+
const y = {
|
|
63
|
+
fromAttribute: (r) => r == "true",
|
|
64
|
+
toAttribute: (r) => r
|
|
65
65
|
};
|
|
66
66
|
var u;
|
|
67
|
-
const p = (u = class extends
|
|
67
|
+
const p = (u = class extends x {
|
|
68
68
|
constructor() {
|
|
69
69
|
super(...arguments), this.value = "", this.type = "", this.icon = "", this.iconPlaceholder = "", this.iconBackgroundColor = "", this._checked = !1;
|
|
70
70
|
}
|
|
71
71
|
static get styles() {
|
|
72
|
-
return T(
|
|
72
|
+
return T(M);
|
|
73
73
|
}
|
|
74
74
|
set checked(e) {
|
|
75
75
|
const t = this._checked;
|
|
@@ -88,21 +88,21 @@ const p = (u = class extends b {
|
|
|
88
88
|
});
|
|
89
89
|
}
|
|
90
90
|
render() {
|
|
91
|
-
return
|
|
91
|
+
return m`
|
|
92
92
|
<div class="container">
|
|
93
93
|
<slot name="before-icon"></slot>
|
|
94
94
|
${this.renderIcon()}
|
|
95
95
|
<slot name="after-icon"></slot>
|
|
96
96
|
<div class="value">${this.value}</div>
|
|
97
|
-
${this.disabled ? w :
|
|
97
|
+
${this.disabled ? w : m` <div class="delete-button-wrapper">${L($)}</div> `}
|
|
98
98
|
</div>
|
|
99
99
|
`;
|
|
100
100
|
}
|
|
101
101
|
renderIcon() {
|
|
102
102
|
if (this.icon || this.iconPlaceholder) {
|
|
103
103
|
const e = this.iconBackgroundColor != null ? `--token-icon-background-color: ${this.iconBackgroundColor}` : void 0;
|
|
104
|
-
return
|
|
105
|
-
<div class="icon-wrapper" style="${
|
|
104
|
+
return m`
|
|
105
|
+
<div class="icon-wrapper" style="${P(e)}" role="img">
|
|
106
106
|
<div class="icon"></div>
|
|
107
107
|
</div>
|
|
108
108
|
`;
|
|
@@ -110,7 +110,7 @@ const p = (u = class extends b {
|
|
|
110
110
|
return w;
|
|
111
111
|
}
|
|
112
112
|
updated(e) {
|
|
113
|
-
super.updated(e), (e.has("icon") || e.has("iconPlaceholder")) && (this.icon || this.iconPlaceholder) &&
|
|
113
|
+
super.updated(e), (e.has("icon") || e.has("iconPlaceholder")) && (this.icon || this.iconPlaceholder) && D.showImage(this.shadowRoot.querySelector(".icon"), this.icon, this.iconPlaceholder), e.has("disabled") && !this.disabled && this.checked && (this.checked = !1);
|
|
114
114
|
}
|
|
115
115
|
setClickHandler(e) {
|
|
116
116
|
this._tokenClickHandler = e;
|
|
@@ -137,22 +137,22 @@ g([
|
|
|
137
137
|
a({ type: String })
|
|
138
138
|
], p.prototype, "iconBackgroundColor", 2);
|
|
139
139
|
g([
|
|
140
|
-
a({ converter:
|
|
140
|
+
a({ converter: y, reflect: !0, attribute: "aria-disabled" })
|
|
141
141
|
], p.prototype, "disabled", 2);
|
|
142
142
|
g([
|
|
143
|
-
a({ converter:
|
|
143
|
+
a({ converter: y, reflect: !0, attribute: "aria-current" })
|
|
144
144
|
], p.prototype, "current", 2);
|
|
145
145
|
g([
|
|
146
|
-
a({ converter:
|
|
146
|
+
a({ converter: y, reflect: !0, attribute: "aria-checked" })
|
|
147
147
|
], p.prototype, "checked", 1);
|
|
148
|
-
let
|
|
149
|
-
const
|
|
150
|
-
const t = document.createElement(
|
|
151
|
-
return
|
|
148
|
+
let b = p;
|
|
149
|
+
const B = (r, e) => {
|
|
150
|
+
const t = document.createElement(b.ID);
|
|
151
|
+
return r && (t.value = r.caption, t.type = r.type, t.icon = r.icon, t.iconPlaceholder = r.iconPlaceholder, t.iconBackgroundColor = r.iconBackgroundColor, t.disabled = r.disabled, t.index = e), t;
|
|
152
152
|
};
|
|
153
|
-
|
|
154
|
-
const
|
|
155
|
-
class
|
|
153
|
+
b.ensureDefined();
|
|
154
|
+
const k = "web application/json";
|
|
155
|
+
class F {
|
|
156
156
|
constructor(e, t, i) {
|
|
157
157
|
navigator.clipboard && (e.addEventListener("copy", () => {
|
|
158
158
|
t() || this.writeToClipboard(e);
|
|
@@ -171,10 +171,10 @@ class B {
|
|
|
171
171
|
s && i.push(s.index);
|
|
172
172
|
}
|
|
173
173
|
if (i.length > 0) {
|
|
174
|
-
const s = JSON.stringify(i.map((
|
|
174
|
+
const s = JSON.stringify(i.map((o) => e.items[o])), n = new Blob([s], { type: k });
|
|
175
175
|
navigator.clipboard.write([
|
|
176
176
|
new ClipboardItem({
|
|
177
|
-
[
|
|
177
|
+
[k]: n
|
|
178
178
|
})
|
|
179
179
|
]);
|
|
180
180
|
}
|
|
@@ -182,37 +182,40 @@ class B {
|
|
|
182
182
|
async readFromClipboard(e) {
|
|
183
183
|
const t = await navigator.clipboard.read();
|
|
184
184
|
for (const i of t)
|
|
185
|
-
if (i.types.includes(
|
|
186
|
-
const n = await (await i.getType(
|
|
187
|
-
Array.isArray(
|
|
185
|
+
if (i.types.includes(k)) {
|
|
186
|
+
const n = await (await i.getType(k)).text(), o = JSON.parse(n);
|
|
187
|
+
Array.isArray(o) && e(o);
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
|
-
const
|
|
192
|
-
class
|
|
191
|
+
const H = ":host{display:flex;contain:layout style}:host .additonal-content::slotted(*){align-self:end;flex-shrink:0}:host([drop]) ::slotted(*){pointer-events:none}:host(:not([readonly])) ::slotted(sd-token:last-of-type){margin-right:24px;margin-bottom:4px}.container{display:flex;flex-wrap:wrap;gap:8px;flex-grow:1;min-width:0;margin-top:auto}.container .placeholder{color:#767676;line-height:24px;align-self:flex-end}.input{flex-grow:1;min-width:0;width:100%;margin-top:auto}.input .token-wrapper{display:flex;flex-wrap:wrap;flex:1 0 auto;width:100%;gap:8px}";
|
|
192
|
+
class N {
|
|
193
193
|
constructor(e, t) {
|
|
194
194
|
this.tokenSelector = e;
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
195
|
+
const i = /* @__PURE__ */ new Map(), s = (n) => {
|
|
196
|
+
const o = n.target;
|
|
197
|
+
if (!e.contains(o)) {
|
|
198
|
+
const d = n.addedIndexes;
|
|
199
|
+
d && e.removeTokens(d.map((v) => i.get(v)));
|
|
200
|
+
}
|
|
201
|
+
i.clear();
|
|
199
202
|
};
|
|
200
203
|
e.addEventListener("dragstart", (n) => {
|
|
201
|
-
const
|
|
202
|
-
if (
|
|
203
|
-
if (
|
|
204
|
+
const o = n.target;
|
|
205
|
+
if (o instanceof b) {
|
|
206
|
+
if (o.disabled) {
|
|
204
207
|
n.preventDefault();
|
|
205
208
|
return;
|
|
206
209
|
}
|
|
207
|
-
|
|
208
|
-
const
|
|
209
|
-
if (
|
|
210
|
-
const
|
|
211
|
-
if (n.dataTransfer.setData("text/
|
|
212
|
-
const f = this.createCustomDragImage(
|
|
210
|
+
o.setAttribute("aria-checked", "true");
|
|
211
|
+
const d = e.querySelectorAll("[slot='items'][aria-checked='true']");
|
|
212
|
+
if (d.length > 0) {
|
|
213
|
+
const v = Array.from(d).filter((f) => !f.disabled).map((f, E) => (i.set(E, f.index), e.items[f.index]));
|
|
214
|
+
if (n.dataTransfer.setData("text/sd-token-selector", JSON.stringify(v)), n.dataTransfer.dropEffect = "move", n.dataTransfer.effectAllowed = "move", d.length > 1) {
|
|
215
|
+
const f = this.createCustomDragImage(o, v.length);
|
|
213
216
|
n.dataTransfer.setDragImage(f, -14, -14);
|
|
214
217
|
}
|
|
215
|
-
window.addEventListener("drop", s, {
|
|
218
|
+
window.addEventListener("drop", s, { once: !0 });
|
|
216
219
|
}
|
|
217
220
|
}
|
|
218
221
|
}), e.addEventListener("dragenter", (n) => {
|
|
@@ -221,15 +224,15 @@ class H {
|
|
|
221
224
|
n.target == e && e.removeAttribute("drop");
|
|
222
225
|
}), e.addEventListener("drop", (n) => {
|
|
223
226
|
e.removeAttribute("drop");
|
|
224
|
-
const
|
|
225
|
-
if (
|
|
227
|
+
const o = n.dataTransfer.getData("text/sd-token-selector");
|
|
228
|
+
if (o)
|
|
226
229
|
try {
|
|
227
|
-
const
|
|
228
|
-
Array.isArray(
|
|
230
|
+
const d = JSON.parse(o);
|
|
231
|
+
Array.isArray(d) && (n.addedIndexes = t(d), n.preventDefault());
|
|
229
232
|
} catch {
|
|
230
233
|
}
|
|
231
234
|
}), e.addEventListener("dragend", () => {
|
|
232
|
-
window.removeEventListener("drop", s), i
|
|
235
|
+
window.removeEventListener("drop", s), i.clear();
|
|
233
236
|
});
|
|
234
237
|
}
|
|
235
238
|
createCustomDragImage(e, t) {
|
|
@@ -258,21 +261,21 @@ class H {
|
|
|
258
261
|
}), i.slot = "items", this.tokenSelector.appendChild(i), requestAnimationFrame(() => i.remove()), i;
|
|
259
262
|
}
|
|
260
263
|
}
|
|
261
|
-
var
|
|
262
|
-
for (var s = i > 1 ? void 0 : i ?
|
|
263
|
-
(
|
|
264
|
-
return i && s &&
|
|
264
|
+
var j = Object.defineProperty, K = Object.getOwnPropertyDescriptor, c = (r, e, t, i) => {
|
|
265
|
+
for (var s = i > 1 ? void 0 : i ? K(e, t) : e, n = r.length - 1, o; n >= 0; n--)
|
|
266
|
+
(o = r[n]) && (s = (i ? o(e, t, s) : o(s)) || s);
|
|
267
|
+
return i && s && j(e, t, s), s;
|
|
265
268
|
};
|
|
266
|
-
function
|
|
269
|
+
function R(r, e) {
|
|
267
270
|
let t;
|
|
268
271
|
return function(...i) {
|
|
269
|
-
t != null && clearTimeout(t), t = window.setTimeout(() =>
|
|
272
|
+
t != null && clearTimeout(t), t = window.setTimeout(() => r(...i), e);
|
|
270
273
|
};
|
|
271
274
|
}
|
|
272
|
-
var
|
|
273
|
-
const
|
|
275
|
+
var V = /* @__PURE__ */ ((r) => (r.RemoveOnly = "remove-only", r.Multi = "multi", r))(V || {}), h;
|
|
276
|
+
const l = (h = class extends x {
|
|
274
277
|
constructor() {
|
|
275
|
-
super(...arguments), this.selectionMode = "multi", this.items = [], this.selectedIndexes = [], this._tokenGenerator =
|
|
278
|
+
super(...arguments), this.selectionMode = "multi", this.items = [], this.selectedIndexes = [], this._tokenGenerator = B, this._autoSuggestItemGenerator = _, this.additionalTokenCommittingKeys = [], this._activeTokenIndex = -1, this.handleInputKeyDown = (e, t) => {
|
|
276
279
|
if ((e.key === "Enter" || this.additionalTokenCommittingKeys.includes(e.key)) && t.value) {
|
|
277
280
|
e.preventDefault(), e.stopPropagation(), this.commitTokenValue(t.value);
|
|
278
281
|
return;
|
|
@@ -328,10 +331,10 @@ const d = (h = class extends b {
|
|
|
328
331
|
if (s instanceof HTMLElement && (e.composedPath().indexOf(t) > -1 || s.getAttribute("popover-for") === "token-autosuggest-popover"))
|
|
329
332
|
return !0;
|
|
330
333
|
}) || this.commitTokenValue(t.value);
|
|
331
|
-
}, this.debouncedShowTokenSuggestPopover =
|
|
334
|
+
}, this.debouncedShowTokenSuggestPopover = R(this.showFilteredTokenSuggestions.bind(this), 200);
|
|
332
335
|
}
|
|
333
336
|
static get styles() {
|
|
334
|
-
return T(
|
|
337
|
+
return T(H);
|
|
335
338
|
}
|
|
336
339
|
get tokenGenerator() {
|
|
337
340
|
return this._tokenGenerator;
|
|
@@ -355,14 +358,14 @@ const d = (h = class extends b {
|
|
|
355
358
|
this.inputElement ? this.inputElement.focus() : this.shadowRoot.querySelector(".container").focus();
|
|
356
359
|
}
|
|
357
360
|
render() {
|
|
358
|
-
return this.selectionMode == "remove-only" ?
|
|
361
|
+
return this.selectionMode == "remove-only" ? m`<div class="container" tabindex="0">
|
|
359
362
|
<slot name="items"
|
|
360
|
-
>${this.placeholder ?
|
|
363
|
+
>${this.placeholder ? m`<span part="remove-only-placeholder" class="placeholder"
|
|
361
364
|
>${this.placeholder}</span
|
|
362
365
|
>` : w}</slot
|
|
363
366
|
>
|
|
364
367
|
</div>
|
|
365
|
-
<slot class="additonal-content" name="additional-content"></slot>` :
|
|
368
|
+
<slot class="additonal-content" name="additional-content"></slot>` : m`
|
|
366
369
|
<sd-lit-input
|
|
367
370
|
class="input"
|
|
368
371
|
.extendedPrefix=${!0}
|
|
@@ -385,21 +388,21 @@ const d = (h = class extends b {
|
|
|
385
388
|
!this.contains(i) && !this.shadowRoot.contains(i) && this.querySelectorAll("[slot='items'][aria-checked='true']").forEach(
|
|
386
389
|
(s) => s.checked = !1
|
|
387
390
|
);
|
|
388
|
-
}), new
|
|
391
|
+
}), new F(
|
|
389
392
|
this,
|
|
390
393
|
() => {
|
|
391
394
|
var t;
|
|
392
395
|
return (t = this.inputElement) == null ? void 0 : t.value;
|
|
393
396
|
},
|
|
394
397
|
(t) => this.addMatchingItems(t)
|
|
395
|
-
), new
|
|
398
|
+
), new N(this, (t) => this.addMatchingItems(t));
|
|
396
399
|
}
|
|
397
400
|
addMatchingItems(e) {
|
|
398
|
-
const t = e.map((
|
|
399
|
-
const
|
|
400
|
-
return
|
|
401
|
-
}).filter((
|
|
402
|
-
|
|
401
|
+
const t = [], i = e.map((s, n) => {
|
|
402
|
+
const o = s.caption == null ? -1 : this.findIndex(s);
|
|
403
|
+
return o != -1 && !this.items[o].disabled && !this.selectedIndexes.includes(o) ? (t.push(n), o) : -1;
|
|
404
|
+
}).filter((s) => s != -1);
|
|
405
|
+
return i.length > 0 && this.handleTokenSelection(i), t;
|
|
403
406
|
}
|
|
404
407
|
removeSelectionOrActiveToken() {
|
|
405
408
|
if (!this.disabled) {
|
|
@@ -457,7 +460,7 @@ const d = (h = class extends b {
|
|
|
457
460
|
return !this.selectedIndexes.includes(e);
|
|
458
461
|
}
|
|
459
462
|
get tokenSuggestPopover() {
|
|
460
|
-
return !this._tokenSuggestPopover && this.inputElement && (this._tokenSuggestPopover = new
|
|
463
|
+
return !this._tokenSuggestPopover && this.inputElement && (this._tokenSuggestPopover = new O(
|
|
461
464
|
this.inputElement,
|
|
462
465
|
() => this.items.filter((e, t) => !e.disabled && this.isTokenNotSelected(t)),
|
|
463
466
|
(e) => {
|
|
@@ -486,7 +489,7 @@ const d = (h = class extends b {
|
|
|
486
489
|
const n = this.tokenGenerator(s, this.findIndex(s));
|
|
487
490
|
n.slot = "items", t.appendChild(n), n.id || (n.id = window.crypto.getRandomValues(new Uint32Array(1))[0].toString(16)), n.setClickHandler(() => this.onTokenClick(n, !0)), n.addEventListener("click", () => {
|
|
488
491
|
document.activeElement != this && this.focus();
|
|
489
|
-
}), n.setDeleteHandler((
|
|
492
|
+
}), n.setDeleteHandler((o) => this.removeTokens([o]));
|
|
490
493
|
}), this.appendChild(t), this._tokenSuggestPopover && this._tokenSuggestPopover.refreshItems();
|
|
491
494
|
}
|
|
492
495
|
removeTokens(e) {
|
|
@@ -573,58 +576,58 @@ const d = (h = class extends b {
|
|
|
573
576
|
return !!((e = this.inputElement) != null && e.value);
|
|
574
577
|
}
|
|
575
578
|
}, h.ID = "sd-token-selector", h.ensureDefined = () => {
|
|
576
|
-
|
|
579
|
+
b.ensureDefined(), customElements.get(h.ID) || customElements.define(h.ID, h);
|
|
577
580
|
}, h.shadowRootOptions = {
|
|
578
|
-
...
|
|
581
|
+
...x.shadowRootOptions,
|
|
579
582
|
delegatesFocus: !0
|
|
580
583
|
}, h);
|
|
581
584
|
c([
|
|
582
585
|
a({ type: String, attribute: "selection-mode", reflect: !0 })
|
|
583
|
-
],
|
|
586
|
+
], l.prototype, "selectionMode", 2);
|
|
584
587
|
c([
|
|
585
588
|
a({ type: Array, attribute: !1 })
|
|
586
|
-
],
|
|
589
|
+
], l.prototype, "items", 2);
|
|
587
590
|
c([
|
|
588
591
|
a({ type: Array, attribute: !1 })
|
|
589
|
-
],
|
|
592
|
+
], l.prototype, "selectedIndexes", 2);
|
|
590
593
|
c([
|
|
591
594
|
a({ type: String, reflect: !0 })
|
|
592
|
-
],
|
|
595
|
+
], l.prototype, "placeholder", 2);
|
|
593
596
|
c([
|
|
594
597
|
a({ type: String, reflect: !0, attribute: "suggest-list-class" })
|
|
595
|
-
],
|
|
598
|
+
], l.prototype, "suggestListClass", 2);
|
|
596
599
|
c([
|
|
597
600
|
a({ type: String, reflect: !0, attribute: "input-label" })
|
|
598
|
-
],
|
|
601
|
+
], l.prototype, "inputLabel", 2);
|
|
599
602
|
c([
|
|
600
603
|
a({
|
|
601
604
|
converter: {
|
|
602
|
-
fromAttribute: (
|
|
603
|
-
toAttribute: (
|
|
605
|
+
fromAttribute: (r) => r == "true",
|
|
606
|
+
toAttribute: (r) => r
|
|
604
607
|
},
|
|
605
608
|
reflect: !0,
|
|
606
609
|
attribute: "aria-disabled"
|
|
607
610
|
})
|
|
608
|
-
],
|
|
611
|
+
], l.prototype, "disabled", 2);
|
|
609
612
|
c([
|
|
610
613
|
a({ type: String, attribute: !0 })
|
|
611
|
-
],
|
|
614
|
+
], l.prototype, "validationMessage", 2);
|
|
612
615
|
c([
|
|
613
616
|
a({ type: String, attribute: !0 })
|
|
614
|
-
],
|
|
617
|
+
], l.prototype, "validationIconSrc", 2);
|
|
615
618
|
c([
|
|
616
|
-
a({ converter:
|
|
617
|
-
],
|
|
619
|
+
a({ converter: S.levelConverter, attribute: !0, reflect: !0 })
|
|
620
|
+
], l.prototype, "validationLevel", 2);
|
|
618
621
|
c([
|
|
619
622
|
a({ type: String, reflect: !0, attribute: "token-type" })
|
|
620
|
-
],
|
|
623
|
+
], l.prototype, "tokenType", 2);
|
|
621
624
|
c([
|
|
622
625
|
a({ type: Boolean, reflect: !0, attribute: "case-sensitive" })
|
|
623
|
-
],
|
|
624
|
-
let
|
|
626
|
+
], l.prototype, "caseSensitive", 2);
|
|
627
|
+
let se = l;
|
|
625
628
|
export {
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
+
V as SelectionMode,
|
|
630
|
+
se as default,
|
|
631
|
+
B as generator
|
|
629
632
|
};
|
|
630
633
|
//# sourceMappingURL=token-selector.mjs.map
|