@bagelink/vue 0.0.612 → 0.0.616
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/components/Drop.vue.d.ts +34 -0
- package/dist/components/Drop.vue.d.ts.map +1 -0
- package/dist/components/FileUploader.vue.d.ts +60 -0
- package/dist/components/FileUploader.vue.d.ts.map +1 -0
- package/dist/components/NavBar.vue.d.ts.map +1 -1
- package/dist/components/form/ItemRef.vue.d.ts +1 -0
- package/dist/components/form/ItemRef.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/Checkbox.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/FileUpload.vue.d.ts +11 -11
- package/dist/components/form/inputs/FileUpload.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/SelectField.vue.d.ts +1 -4
- package/dist/components/form/inputs/SelectField.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/SignaturePad.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/ToggleInput.vue.d.ts.map +1 -1
- package/dist/index.cjs +98 -86
- package/dist/index.mjs +98 -86
- package/dist/style.css +189 -171
- package/package.json +12 -12
- package/src/components/DataPreview.vue +4 -1
- package/src/components/NavBar.vue +6 -0
- package/src/components/form/inputs/CheckInput.vue +5 -0
- package/src/components/form/inputs/Checkbox.vue +19 -24
- package/src/components/form/inputs/DatePicker.vue +3 -0
- package/src/components/form/inputs/FileUpload.vue +6 -4
- package/src/components/form/inputs/SignaturePad.vue +4 -2
- package/src/components/form/inputs/TextInput.vue +1 -1
- package/src/components/form/inputs/ToggleInput.vue +50 -66
- package/src/styles/inputs.css +12 -3
- package/dist/components/Popover.vue.d.ts +0 -10
- package/dist/components/Popover.vue.d.ts.map +0 -1
- package/dist/types/materialIcon.d.ts +0 -2
- package/dist/types/materialIcon.d.ts.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -5540,7 +5540,7 @@ const _export_sfc = (sfc, props2) => {
|
|
|
5540
5540
|
}
|
|
5541
5541
|
return target;
|
|
5542
5542
|
};
|
|
5543
|
-
const NavBar = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["__scopeId", "data-v-
|
|
5543
|
+
const NavBar = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["__scopeId", "data-v-776cab4a"]]);
|
|
5544
5544
|
const _hoisted_1$I = {
|
|
5545
5545
|
key: 0,
|
|
5546
5546
|
class: "loading"
|
|
@@ -6729,7 +6729,7 @@ const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
|
|
|
6729
6729
|
};
|
|
6730
6730
|
}
|
|
6731
6731
|
});
|
|
6732
|
-
const DataPreview = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-
|
|
6732
|
+
const DataPreview = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-d3655508"]]);
|
|
6733
6733
|
const _hoisted_1$z = {
|
|
6734
6734
|
key: 0,
|
|
6735
6735
|
class: "card_label"
|
|
@@ -17122,7 +17122,7 @@ const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
|
|
|
17122
17122
|
};
|
|
17123
17123
|
}
|
|
17124
17124
|
});
|
|
17125
|
-
const CheckInput = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-
|
|
17125
|
+
const CheckInput = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-1aa7e2a8"]]);
|
|
17126
17126
|
function toDate(argument) {
|
|
17127
17127
|
const argStr = Object.prototype.toString.call(argument);
|
|
17128
17128
|
if (argument instanceof Date || typeof argument === "object" && argStr === "[object Date]") {
|
|
@@ -28636,10 +28636,12 @@ const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
|
|
|
28636
28636
|
placeholder: _ctx.placeholder || _ctx.label,
|
|
28637
28637
|
disabled: _ctx.disabled,
|
|
28638
28638
|
required: _ctx.required,
|
|
28639
|
-
pattern: _ctx.pattern
|
|
28639
|
+
pattern: _ctx.pattern
|
|
28640
|
+
}, _ctx.nativeInputAttrs, {
|
|
28640
28641
|
onFocusout: _cache[1] || (_cache[1] = //@ts-ignore
|
|
28641
|
-
(...args) => _ctx.onFocusout && _ctx.onFocusout(...args))
|
|
28642
|
-
|
|
28642
|
+
(...args) => _ctx.onFocusout && _ctx.onFocusout(...args)),
|
|
28643
|
+
onInput: updateInputVal
|
|
28644
|
+
}), null, 16, _hoisted_3$d)), [
|
|
28643
28645
|
[vue.vModelDynamic, vue.unref(inputVal)]
|
|
28644
28646
|
]) : vue.withDirectives((vue.openBlock(), vue.createElementBlock("textarea", vue.mergeProps({
|
|
28645
28647
|
key: 1,
|
|
@@ -28672,7 +28674,7 @@ const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
|
|
|
28672
28674
|
};
|
|
28673
28675
|
}
|
|
28674
28676
|
});
|
|
28675
|
-
const TextInput = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-
|
|
28677
|
+
const TextInput = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-5e9a753f"]]);
|
|
28676
28678
|
const _hoisted_1$n = { class: "primary-checkbox" };
|
|
28677
28679
|
const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
|
|
28678
28680
|
__name: "Checkbox",
|
|
@@ -28693,15 +28695,12 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
|
|
|
28693
28695
|
type: "checkbox"
|
|
28694
28696
|
}, null, 512), [
|
|
28695
28697
|
[vue.vModelCheckbox, val.value]
|
|
28696
|
-
]),
|
|
28697
|
-
vue.createElementVNode("span", null, [
|
|
28698
|
-
vue.createVNode(vue.unref(_sfc_main$O), { icon: "check" })
|
|
28699
28698
|
])
|
|
28700
28699
|
]);
|
|
28701
28700
|
};
|
|
28702
28701
|
}
|
|
28703
28702
|
});
|
|
28704
|
-
const Checkbox = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-
|
|
28703
|
+
const Checkbox = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-0878583e"]]);
|
|
28705
28704
|
const _hoisted_1$m = ["title"];
|
|
28706
28705
|
const _hoisted_2$h = ["id", "placeholder", "required"];
|
|
28707
28706
|
const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
|
|
@@ -28901,7 +28900,7 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
|
|
|
28901
28900
|
}
|
|
28902
28901
|
});
|
|
28903
28902
|
const RadioPillsInput = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-681173be"]]);
|
|
28904
|
-
const _withScopeId$2 = (n2) => (vue.pushScopeId("data-v-
|
|
28903
|
+
const _withScopeId$2 = (n2) => (vue.pushScopeId("data-v-e848b48d"), n2 = n2(), vue.popScopeId(), n2);
|
|
28905
28904
|
const _hoisted_1$j = { class: "bagel-input" };
|
|
28906
28905
|
const _hoisted_2$e = {
|
|
28907
28906
|
key: 0,
|
|
@@ -29015,9 +29014,8 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
|
|
|
29015
29014
|
topic: props2.topic
|
|
29016
29015
|
});
|
|
29017
29016
|
storageFiles.value.push(serverFile);
|
|
29018
|
-
const i2 = fileQueue.value.indexOf(file);
|
|
29019
|
-
fileQueue.value.splice(i2, 1);
|
|
29020
29017
|
}
|
|
29018
|
+
fileQueue.value.splice(0, fileQueue.value.length);
|
|
29021
29019
|
updateModelValue();
|
|
29022
29020
|
}
|
|
29023
29021
|
function browse() {
|
|
@@ -29027,12 +29025,14 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
|
|
|
29027
29025
|
input.onchange = (e) => {
|
|
29028
29026
|
const target = e.target;
|
|
29029
29027
|
if (target.files) {
|
|
29030
|
-
Array.from(target.files)
|
|
29031
|
-
|
|
29032
|
-
|
|
29028
|
+
const files = Array.from(target.files);
|
|
29029
|
+
for (const file of files) {
|
|
29030
|
+
fileQueue.value.push({ name: file.name, file, progress: 0 });
|
|
29031
|
+
}
|
|
29033
29032
|
}
|
|
29034
29033
|
flushQueue();
|
|
29035
29034
|
};
|
|
29035
|
+
console.log(fileQueue.value);
|
|
29036
29036
|
input.click();
|
|
29037
29037
|
}
|
|
29038
29038
|
function dragleave(e) {
|
|
@@ -29145,8 +29145,8 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
|
|
|
29145
29145
|
};
|
|
29146
29146
|
}
|
|
29147
29147
|
});
|
|
29148
|
-
const $el = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-
|
|
29149
|
-
const _withScopeId$1 = (n2) => (vue.pushScopeId("data-v-
|
|
29148
|
+
const $el = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-e848b48d"]]);
|
|
29149
|
+
const _withScopeId$1 = (n2) => (vue.pushScopeId("data-v-06b95183"), n2 = n2(), vue.popScopeId(), n2);
|
|
29150
29150
|
const _hoisted_1$i = ["title"];
|
|
29151
29151
|
const _hoisted_2$d = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ vue.createElementVNode("span", { class: "slider round" }, null, -1));
|
|
29152
29152
|
const _hoisted_3$9 = [
|
|
@@ -29177,9 +29177,8 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
|
|
|
29177
29177
|
});
|
|
29178
29178
|
return (_ctx, _cache) => {
|
|
29179
29179
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
29180
|
-
class: vue.normalizeClass(["bagel-input bgl-
|
|
29181
|
-
title: _ctx.title
|
|
29182
|
-
onClick: _cache[1] || (_cache[1] = vue.withModifiers(($event) => checked.value = !checked.value, ["prevent"]))
|
|
29180
|
+
class: vue.normalizeClass(["bagel-input bgl-toggle", { small: _ctx.small }]),
|
|
29181
|
+
title: _ctx.title
|
|
29183
29182
|
}, [
|
|
29184
29183
|
vue.createElementVNode("div", {
|
|
29185
29184
|
class: vue.normalizeClass(["switch", { checked: checked.value }])
|
|
@@ -29201,7 +29200,7 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
|
|
|
29201
29200
|
};
|
|
29202
29201
|
}
|
|
29203
29202
|
});
|
|
29204
|
-
const ToggleInput = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-
|
|
29203
|
+
const ToggleInput = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-06b95183"]]);
|
|
29205
29204
|
function OrderedMap(content) {
|
|
29206
29205
|
this.content = content;
|
|
29207
29206
|
}
|
|
@@ -31230,11 +31229,11 @@ function checkAttrs(attrs, values3, type3, name) {
|
|
|
31230
31229
|
attr.validate(values3[name2]);
|
|
31231
31230
|
}
|
|
31232
31231
|
}
|
|
31233
|
-
function initAttrs(attrs) {
|
|
31232
|
+
function initAttrs(typeName, attrs) {
|
|
31234
31233
|
let result2 = /* @__PURE__ */ Object.create(null);
|
|
31235
31234
|
if (attrs)
|
|
31236
31235
|
for (let name in attrs)
|
|
31237
|
-
result2[name] = new Attribute(attrs[name]);
|
|
31236
|
+
result2[name] = new Attribute(typeName, name, attrs[name]);
|
|
31238
31237
|
return result2;
|
|
31239
31238
|
}
|
|
31240
31239
|
let NodeType$1 = class NodeType2 {
|
|
@@ -31247,7 +31246,7 @@ let NodeType$1 = class NodeType2 {
|
|
|
31247
31246
|
this.spec = spec;
|
|
31248
31247
|
this.markSet = null;
|
|
31249
31248
|
this.groups = spec.group ? spec.group.split(" ") : [];
|
|
31250
|
-
this.attrs = initAttrs(spec.attrs);
|
|
31249
|
+
this.attrs = initAttrs(name, spec.attrs);
|
|
31251
31250
|
this.defaultAttrs = defaultAttrs(this.attrs);
|
|
31252
31251
|
this.contentMatch = null;
|
|
31253
31252
|
this.inlineContent = null;
|
|
@@ -31435,19 +31434,19 @@ let NodeType$1 = class NodeType2 {
|
|
|
31435
31434
|
return result2;
|
|
31436
31435
|
}
|
|
31437
31436
|
};
|
|
31438
|
-
function validateType(type3) {
|
|
31437
|
+
function validateType(typeName, attrName, type3) {
|
|
31439
31438
|
let types = type3.split("|");
|
|
31440
31439
|
return (value) => {
|
|
31441
31440
|
let name = value === null ? "null" : typeof value;
|
|
31442
31441
|
if (types.indexOf(name) < 0)
|
|
31443
|
-
throw new RangeError(`Expected value of type ${types}, got ${name}`);
|
|
31442
|
+
throw new RangeError(`Expected value of type ${types} for attribute ${attrName} on type ${typeName}, got ${name}`);
|
|
31444
31443
|
};
|
|
31445
31444
|
}
|
|
31446
31445
|
class Attribute {
|
|
31447
|
-
constructor(options) {
|
|
31446
|
+
constructor(typeName, attrName, options) {
|
|
31448
31447
|
this.hasDefault = Object.prototype.hasOwnProperty.call(options, "default");
|
|
31449
31448
|
this.default = options.default;
|
|
31450
|
-
this.validate = typeof options.validate == "string" ? validateType(options.validate) : options.validate;
|
|
31449
|
+
this.validate = typeof options.validate == "string" ? validateType(typeName, attrName, options.validate) : options.validate;
|
|
31451
31450
|
}
|
|
31452
31451
|
get isRequired() {
|
|
31453
31452
|
return !this.hasDefault;
|
|
@@ -31462,7 +31461,7 @@ class MarkType {
|
|
|
31462
31461
|
this.rank = rank;
|
|
31463
31462
|
this.schema = schema;
|
|
31464
31463
|
this.spec = spec;
|
|
31465
|
-
this.attrs = initAttrs(spec.attrs);
|
|
31464
|
+
this.attrs = initAttrs(name, spec.attrs);
|
|
31466
31465
|
this.excluded = null;
|
|
31467
31466
|
let defaults2 = defaultAttrs(this.attrs);
|
|
31468
31467
|
this.instance = defaults2 ? new Mark$1(this, defaults2) : null;
|
|
@@ -32426,13 +32425,8 @@ class DOMSerializer {
|
|
|
32426
32425
|
let toDOM = this.marks[mark.type.name];
|
|
32427
32426
|
return toDOM && renderSpec(doc$1(options), toDOM(mark, inline), null, mark.attrs);
|
|
32428
32427
|
}
|
|
32429
|
-
|
|
32430
|
-
|
|
32431
|
-
the spec has a hole (zero) in it, `contentDOM` will point at the
|
|
32432
|
-
node with the hole.
|
|
32433
|
-
*/
|
|
32434
|
-
static renderSpec(doc2, structure, xmlNS = null) {
|
|
32435
|
-
return renderSpec(doc2, structure, xmlNS);
|
|
32428
|
+
static renderSpec(doc2, structure, xmlNS = null, blockArraysIn) {
|
|
32429
|
+
return renderSpec(doc2, structure, xmlNS, blockArraysIn);
|
|
32436
32430
|
}
|
|
32437
32431
|
/**
|
|
32438
32432
|
Build a serializer using the [`toDOM`](https://prosemirror.net/docs/ref/#model.NodeSpec.toDOM)
|
|
@@ -36295,7 +36289,7 @@ class MarkViewDesc extends ViewDesc {
|
|
|
36295
36289
|
let custom2 = view.nodeViews[mark.type.name];
|
|
36296
36290
|
let spec = custom2 && custom2(mark, view, inline);
|
|
36297
36291
|
if (!spec || !spec.dom)
|
|
36298
|
-
spec = DOMSerializer.renderSpec(document, mark.type.spec.toDOM(mark, inline));
|
|
36292
|
+
spec = DOMSerializer.renderSpec(document, mark.type.spec.toDOM(mark, inline), null, mark.attrs);
|
|
36299
36293
|
return new MarkViewDesc(parent, mark, spec.dom, spec.contentDOM || spec.dom);
|
|
36300
36294
|
}
|
|
36301
36295
|
parseRule() {
|
|
@@ -36362,7 +36356,8 @@ class NodeViewDesc extends ViewDesc {
|
|
|
36362
36356
|
else if (dom.nodeType != 3)
|
|
36363
36357
|
throw new RangeError("Text must be rendered as a DOM text node");
|
|
36364
36358
|
} else if (!dom) {
|
|
36365
|
-
|
|
36359
|
+
let spec2 = DOMSerializer.renderSpec(document, node.type.spec.toDOM(node), null, node.attrs);
|
|
36360
|
+
({ dom, contentDOM } = spec2);
|
|
36366
36361
|
}
|
|
36367
36362
|
if (!contentDOM && !node.isText && dom.nodeName != "BR") {
|
|
36368
36363
|
if (!dom.hasAttribute("contenteditable"))
|
|
@@ -38459,7 +38454,8 @@ handlers.dragstart = (view, _event) => {
|
|
|
38459
38454
|
}
|
|
38460
38455
|
let draggedSlice = (node || view.state.selection).content();
|
|
38461
38456
|
let { dom, text, slice: slice4 } = serializeForClipboard(view, draggedSlice);
|
|
38462
|
-
event.dataTransfer.
|
|
38457
|
+
if (!event.dataTransfer.files.length || !chrome || chrome_version > 120)
|
|
38458
|
+
event.dataTransfer.clearData();
|
|
38463
38459
|
event.dataTransfer.setData(brokenClipboardAPI ? "Text" : "text/html", dom.innerHTML);
|
|
38464
38460
|
event.dataTransfer.effectAllowed = "copyMove";
|
|
38465
38461
|
if (!brokenClipboardAPI)
|
|
@@ -41490,7 +41486,7 @@ const getTextContentFromNodes = ($from, maxMatch = 500) => {
|
|
|
41490
41486
|
parent,
|
|
41491
41487
|
index: index2
|
|
41492
41488
|
})) || node.textContent || "%leaf%";
|
|
41493
|
-
textBefore += chunk.slice(0, Math.max(0, sliceEndPos - pos));
|
|
41489
|
+
textBefore += node.isAtom ? chunk : chunk.slice(0, Math.max(0, sliceEndPos - pos));
|
|
41494
41490
|
});
|
|
41495
41491
|
return textBefore;
|
|
41496
41492
|
};
|
|
@@ -43140,7 +43136,7 @@ function isList(name, extensions) {
|
|
|
43140
43136
|
return group.split(" ").includes("list");
|
|
43141
43137
|
}
|
|
43142
43138
|
function isNodeEmpty(node) {
|
|
43143
|
-
const defaultContent = node.type.createAndFill();
|
|
43139
|
+
const defaultContent = node.type.createAndFill(node.attrs);
|
|
43144
43140
|
if (!defaultContent) {
|
|
43145
43141
|
return false;
|
|
43146
43142
|
}
|
|
@@ -43317,29 +43313,29 @@ const splitBlock = ({ keepMarks = true } = {}) => ({ tr: tr2, state: state2, dis
|
|
|
43317
43313
|
if (!$from.parent.isBlock) {
|
|
43318
43314
|
return false;
|
|
43319
43315
|
}
|
|
43320
|
-
|
|
43321
|
-
|
|
43322
|
-
|
|
43323
|
-
|
|
43324
|
-
|
|
43325
|
-
|
|
43326
|
-
|
|
43316
|
+
const atEnd = $to.parentOffset === $to.parent.content.size;
|
|
43317
|
+
const deflt = $from.depth === 0 ? void 0 : defaultBlockAt($from.node(-1).contentMatchAt($from.indexAfter(-1)));
|
|
43318
|
+
let types = atEnd && deflt ? [
|
|
43319
|
+
{
|
|
43320
|
+
type: deflt,
|
|
43321
|
+
attrs: newAttributes
|
|
43322
|
+
}
|
|
43323
|
+
] : void 0;
|
|
43324
|
+
let can = canSplit(tr2.doc, tr2.mapping.map($from.pos), 1, types);
|
|
43325
|
+
if (!types && !can && canSplit(tr2.doc, tr2.mapping.map($from.pos), 1, deflt ? [{ type: deflt }] : void 0)) {
|
|
43326
|
+
can = true;
|
|
43327
|
+
types = deflt ? [
|
|
43327
43328
|
{
|
|
43328
43329
|
type: deflt,
|
|
43329
43330
|
attrs: newAttributes
|
|
43330
43331
|
}
|
|
43331
43332
|
] : void 0;
|
|
43332
|
-
|
|
43333
|
-
|
|
43334
|
-
can = true;
|
|
43335
|
-
types = deflt ? [
|
|
43336
|
-
{
|
|
43337
|
-
type: deflt,
|
|
43338
|
-
attrs: newAttributes
|
|
43339
|
-
}
|
|
43340
|
-
] : void 0;
|
|
43341
|
-
}
|
|
43333
|
+
}
|
|
43334
|
+
if (dispatch) {
|
|
43342
43335
|
if (can) {
|
|
43336
|
+
if (selection instanceof TextSelection) {
|
|
43337
|
+
tr2.deleteSelection();
|
|
43338
|
+
}
|
|
43343
43339
|
tr2.split(tr2.mapping.map($from.pos), 1, types);
|
|
43344
43340
|
if (deflt && !atEnd && !$from.parentOffset && $from.parent.type !== deflt) {
|
|
43345
43341
|
const first2 = tr2.mapping.map($from.before());
|
|
@@ -43354,7 +43350,7 @@ const splitBlock = ({ keepMarks = true } = {}) => ({ tr: tr2, state: state2, dis
|
|
|
43354
43350
|
}
|
|
43355
43351
|
tr2.scrollIntoView();
|
|
43356
43352
|
}
|
|
43357
|
-
return
|
|
43353
|
+
return can;
|
|
43358
43354
|
};
|
|
43359
43355
|
const splitListItem = (typeOrName) => ({ tr: tr2, state: state2, dispatch, editor }) => {
|
|
43360
43356
|
var _a2;
|
|
@@ -44358,6 +44354,9 @@ let Editor$1 = class Editor2 extends EventEmitter {
|
|
|
44358
44354
|
* Creates all node views.
|
|
44359
44355
|
*/
|
|
44360
44356
|
createNodeViews() {
|
|
44357
|
+
if (this.view.isDestroyed) {
|
|
44358
|
+
return;
|
|
44359
|
+
}
|
|
44361
44360
|
this.view.setProps({
|
|
44362
44361
|
nodeViews: this.extensionManager.nodeViews
|
|
44363
44362
|
});
|
|
@@ -44398,6 +44397,11 @@ let Editor$1 = class Editor2 extends EventEmitter {
|
|
|
44398
44397
|
}
|
|
44399
44398
|
const state2 = this.state.apply(transaction);
|
|
44400
44399
|
const selectionHasChanged = !this.state.selection.eq(state2.selection);
|
|
44400
|
+
this.emit("beforeTransaction", {
|
|
44401
|
+
editor: this,
|
|
44402
|
+
transaction,
|
|
44403
|
+
nextState: state2
|
|
44404
|
+
});
|
|
44401
44405
|
this.view.updateState(state2);
|
|
44402
44406
|
this.emit("transaction", {
|
|
44403
44407
|
editor: this,
|
|
@@ -45245,7 +45249,10 @@ const CodeBlock = Node$2.create({
|
|
|
45245
45249
|
}
|
|
45246
45250
|
const nodeAfter = doc2.nodeAt(after);
|
|
45247
45251
|
if (nodeAfter) {
|
|
45248
|
-
return
|
|
45252
|
+
return editor.commands.command(({ tr: tr2 }) => {
|
|
45253
|
+
tr2.setSelection(Selection$1.near(doc2.resolve(after)));
|
|
45254
|
+
return true;
|
|
45255
|
+
});
|
|
45249
45256
|
}
|
|
45250
45257
|
return editor.commands.exitCode();
|
|
45251
45258
|
}
|
|
@@ -49859,12 +49866,12 @@ function useDebouncedRef(value) {
|
|
|
49859
49866
|
class Editor extends Editor$1 {
|
|
49860
49867
|
constructor(options = {}) {
|
|
49861
49868
|
super(options);
|
|
49862
|
-
this.vueRenderers = vue.reactive(/* @__PURE__ */ new Map());
|
|
49863
49869
|
this.contentComponent = null;
|
|
49870
|
+
this.appContext = null;
|
|
49864
49871
|
this.reactiveState = useDebouncedRef(this.view.state);
|
|
49865
49872
|
this.reactiveExtensionStorage = useDebouncedRef(this.extensionStorage);
|
|
49866
|
-
this.on("
|
|
49867
|
-
this.reactiveState.value =
|
|
49873
|
+
this.on("beforeTransaction", ({ nextState }) => {
|
|
49874
|
+
this.reactiveState.value = nextState;
|
|
49868
49875
|
this.reactiveExtensionStorage.value = this.extensionStorage;
|
|
49869
49876
|
});
|
|
49870
49877
|
return vue.markRaw(this);
|
|
@@ -49911,6 +49918,16 @@ const EditorContent = vue.defineComponent({
|
|
|
49911
49918
|
const element = vue.unref(rootEl2.value);
|
|
49912
49919
|
rootEl2.value.append(...editor.options.element.childNodes);
|
|
49913
49920
|
editor.contentComponent = instance.ctx._;
|
|
49921
|
+
if (instance) {
|
|
49922
|
+
editor.appContext = {
|
|
49923
|
+
...instance.appContext,
|
|
49924
|
+
provides: {
|
|
49925
|
+
// @ts-ignore
|
|
49926
|
+
...instance.provides,
|
|
49927
|
+
...instance.appContext.provides
|
|
49928
|
+
}
|
|
49929
|
+
};
|
|
49930
|
+
}
|
|
49914
49931
|
editor.setOptions({
|
|
49915
49932
|
element
|
|
49916
49933
|
});
|
|
@@ -49929,6 +49946,7 @@ const EditorContent = vue.defineComponent({
|
|
|
49929
49946
|
});
|
|
49930
49947
|
}
|
|
49931
49948
|
editor.contentComponent = null;
|
|
49949
|
+
editor.appContext = null;
|
|
49932
49950
|
if (!editor.options.element.firstChild) {
|
|
49933
49951
|
return;
|
|
49934
49952
|
}
|
|
@@ -49941,24 +49959,11 @@ const EditorContent = vue.defineComponent({
|
|
|
49941
49959
|
return { rootEl: rootEl2 };
|
|
49942
49960
|
},
|
|
49943
49961
|
render() {
|
|
49944
|
-
const vueRenderers = [];
|
|
49945
|
-
if (this.editor) {
|
|
49946
|
-
this.editor.vueRenderers.forEach((vueRenderer) => {
|
|
49947
|
-
const node = vue.h(vue.Teleport, {
|
|
49948
|
-
to: vueRenderer.teleportElement,
|
|
49949
|
-
key: vueRenderer.id
|
|
49950
|
-
}, vue.h(vueRenderer.component, {
|
|
49951
|
-
ref: vueRenderer.id,
|
|
49952
|
-
...vueRenderer.props
|
|
49953
|
-
}));
|
|
49954
|
-
vueRenderers.push(node);
|
|
49955
|
-
});
|
|
49956
|
-
}
|
|
49957
49962
|
return vue.h("div", {
|
|
49958
49963
|
ref: (el) => {
|
|
49959
49964
|
this.rootEl = el;
|
|
49960
49965
|
}
|
|
49961
|
-
}
|
|
49966
|
+
});
|
|
49962
49967
|
}
|
|
49963
49968
|
});
|
|
49964
49969
|
vue.defineComponent({
|
|
@@ -51704,7 +51709,14 @@ function columnResizing({
|
|
|
51704
51709
|
key: columnResizingPluginKey,
|
|
51705
51710
|
state: {
|
|
51706
51711
|
init(_2, state2) {
|
|
51707
|
-
|
|
51712
|
+
var _a2, _b;
|
|
51713
|
+
const nodeViews = (_b = (_a2 = plugin.spec) == null ? void 0 : _a2.props) == null ? void 0 : _b.nodeViews;
|
|
51714
|
+
const tableName = tableNodeTypes(state2.schema).table.name;
|
|
51715
|
+
if (View && nodeViews) {
|
|
51716
|
+
nodeViews[tableName] = (node, view) => {
|
|
51717
|
+
return new View(node, cellMinWidth, view);
|
|
51718
|
+
};
|
|
51719
|
+
}
|
|
51708
51720
|
return new ResizeState(-1, false);
|
|
51709
51721
|
},
|
|
51710
51722
|
apply(tr2, prev) {
|
|
@@ -51944,10 +51956,10 @@ function handleDecorations(state2, cell) {
|
|
|
51944
51956
|
}
|
|
51945
51957
|
const map4 = TableMap.get(table);
|
|
51946
51958
|
const start2 = $cell.start(-1);
|
|
51947
|
-
const col = map4.colCount($cell.pos - start2) + $cell.nodeAfter.attrs.colspan;
|
|
51959
|
+
const col = map4.colCount($cell.pos - start2) + $cell.nodeAfter.attrs.colspan - 1;
|
|
51948
51960
|
for (let row = 0; row < map4.height; row++) {
|
|
51949
|
-
const index2 = col + row * map4.width
|
|
51950
|
-
if ((col == map4.width || map4.map[index2] != map4.map[index2 + 1]) && (row == 0 || map4.map[index2] != map4.map[index2 - map4.width])) {
|
|
51961
|
+
const index2 = col + row * map4.width;
|
|
51962
|
+
if ((col == map4.width - 1 || map4.map[index2] != map4.map[index2 + 1]) && (row == 0 || map4.map[index2] != map4.map[index2 - map4.width])) {
|
|
51951
51963
|
const cellPos = map4.map[index2];
|
|
51952
51964
|
const pos = start2 + cellPos + table.nodeAt(cellPos).nodeSize - 1;
|
|
51953
51965
|
const dom = document.createElement("div");
|
|
@@ -52725,7 +52737,7 @@ const Table = Node$2.create({
|
|
|
52725
52737
|
const table = [
|
|
52726
52738
|
"table",
|
|
52727
52739
|
mergeAttributes(this.options.HTMLAttributes, HTMLAttributes, {
|
|
52728
|
-
style: tableWidth ? `width: ${tableWidth}` : `
|
|
52740
|
+
style: tableWidth ? `width: ${tableWidth}` : `min-width: ${tableMinWidth}`
|
|
52729
52741
|
}),
|
|
52730
52742
|
colgroup,
|
|
52731
52743
|
["tbody", 0]
|
|
@@ -56345,7 +56357,7 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
|
|
|
56345
56357
|
});
|
|
56346
56358
|
return (_ctx, _cache) => {
|
|
56347
56359
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
56348
|
-
class: "bgl_input signature-pad relative",
|
|
56360
|
+
class: vue.normalizeClass(["bgl_input signature-pad relative", { "bg-transparent": _ctx.disabled }]),
|
|
56349
56361
|
onTouchmove: _cache[0] || (_cache[0] = vue.withModifiers(() => {
|
|
56350
56362
|
}, ["prevent"]))
|
|
56351
56363
|
}, [
|
|
@@ -56363,7 +56375,7 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
|
|
|
56363
56375
|
class: "canvas",
|
|
56364
56376
|
disabled: _ctx.disabled
|
|
56365
56377
|
}, null, 8, _hoisted_1$f)
|
|
56366
|
-
],
|
|
56378
|
+
], 34);
|
|
56367
56379
|
};
|
|
56368
56380
|
}
|
|
56369
56381
|
});
|