@everchron/ec-shards 22.0.0 → 22.0.1
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/README.md +0 -30
- package/dist/ec-shards.cjs +1 -1
- package/dist/ec-shards.css +1 -1
- package/dist/ec-shards.js +10 -4
- package/package.json +1 -1
package/dist/ec-shards.js
CHANGED
|
@@ -17827,7 +17827,7 @@ var ib = /*#__PURE__*/ a(tb, [["render", rb], ["__scopeId", "data-v-451fee48"]])
|
|
|
17827
17827
|
},
|
|
17828
17828
|
syncFromDom() {
|
|
17829
17829
|
let e = this.serialize();
|
|
17830
|
-
this.isEmpty = e
|
|
17830
|
+
this.isEmpty = this.isBlank(e);
|
|
17831
17831
|
let t = JSON.stringify(e);
|
|
17832
17832
|
return t !== this.lastSignature && (this.lastSignature = t, this.$emit("update:modelValue", e)), e;
|
|
17833
17833
|
},
|
|
@@ -17835,7 +17835,10 @@ var ib = /*#__PURE__*/ a(tb, [["render", rb], ["__scopeId", "data-v-451fee48"]])
|
|
|
17835
17835
|
let t = this.$refs.editable;
|
|
17836
17836
|
t && (this.clearEditable(), e.forEach((e) => {
|
|
17837
17837
|
e.type === "chip" ? t.appendChild(this.createChipHost(e)) : e.value && t.appendChild(document.createTextNode(e.value));
|
|
17838
|
-
}), this.isEmpty = e
|
|
17838
|
+
}), this.isEmpty = this.isBlank(e));
|
|
17839
|
+
},
|
|
17840
|
+
isBlank(e) {
|
|
17841
|
+
return e.every((e) => e.type === "text" && !e.value.trim());
|
|
17839
17842
|
},
|
|
17840
17843
|
clearEditable() {
|
|
17841
17844
|
let e = this.$refs.editable;
|
|
@@ -17934,7 +17937,10 @@ var ib = /*#__PURE__*/ a(tb, [["render", rb], ["__scopeId", "data-v-451fee48"]])
|
|
|
17934
17937
|
this.chipsOnly && e.inputType && e.inputType.startsWith("insert") && e.preventDefault();
|
|
17935
17938
|
},
|
|
17936
17939
|
onInput() {
|
|
17937
|
-
this.clearChipSelection(), this.syncFromDom();
|
|
17940
|
+
this.clearChipSelection(), this.removeLineBreaks(), this.syncFromDom();
|
|
17941
|
+
},
|
|
17942
|
+
removeLineBreaks() {
|
|
17943
|
+
Array.from(this.$refs.editable.childNodes).filter((e) => e.nodeType === Node.ELEMENT_NODE && e.tagName === "BR").forEach((e) => e.remove());
|
|
17938
17944
|
},
|
|
17939
17945
|
onKeydown(e) {
|
|
17940
17946
|
if (e.key !== "Backspace") {
|
|
@@ -18214,7 +18220,7 @@ function cb(e, t, n, r, i, a) {
|
|
|
18214
18220
|
"aria-hidden": "true"
|
|
18215
18221
|
}, null, 4), [[ue, i.dropCaret.visible]])], 34);
|
|
18216
18222
|
}
|
|
18217
|
-
var lb = /*#__PURE__*/ a(ob, [["render", cb], ["__scopeId", "data-v-
|
|
18223
|
+
var lb = /*#__PURE__*/ a(ob, [["render", cb], ["__scopeId", "data-v-4ebbfce1"]]), ub = "application/x-ecs-chip", db = {
|
|
18218
18224
|
name: "ecs-token-input-source",
|
|
18219
18225
|
emits: ["dragstart", "dragend"],
|
|
18220
18226
|
components: { EcsIcon: r },
|