@ni/nimble-components 21.3.3 → 21.4.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/all-components-bundle.js +375 -163
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +2449 -2391
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/label-provider/table/index.d.ts +3 -0
- package/dist/esm/label-provider/table/index.js +6 -2
- package/dist/esm/label-provider/table/index.js.map +1 -1
- package/dist/esm/label-provider/table/label-token-defaults.js +2 -1
- package/dist/esm/label-provider/table/label-token-defaults.js.map +1 -1
- package/dist/esm/label-provider/table/label-tokens.d.ts +1 -0
- package/dist/esm/label-provider/table/label-tokens.js +4 -0
- package/dist/esm/label-provider/table/label-tokens.js.map +1 -1
- package/dist/esm/table/components/row/index.d.ts +1 -0
- package/dist/esm/table/components/row/index.js +4 -0
- package/dist/esm/table/components/row/index.js.map +1 -1
- package/dist/esm/table/components/row/styles.js +17 -1
- package/dist/esm/table/components/row/styles.js.map +1 -1
- package/dist/esm/table/components/row/template.js +26 -12
- package/dist/esm/table/components/row/template.js.map +1 -1
- package/dist/esm/table/index.js +2 -1
- package/dist/esm/table/index.js.map +1 -1
- package/dist/esm/table/models/expansion-manager.d.ts +1 -0
- package/dist/esm/table/models/expansion-manager.js +9 -2
- package/dist/esm/table/models/expansion-manager.js.map +1 -1
- package/dist/esm/table/template.js +1 -0
- package/dist/esm/table/template.js.map +1 -1
- package/dist/esm/table/testing/table.pageobject.d.ts +1 -0
- package/dist/esm/table/testing/table.pageobject.js +6 -1
- package/dist/esm/table/testing/table.pageobject.js.map +1 -1
- package/dist/esm/table/types.d.ts +2 -0
- package/dist/esm/table/types.js +2 -1
- package/dist/esm/table/types.js.map +1 -1
- package/package.json +2 -2
|
@@ -16301,7 +16301,7 @@
|
|
|
16301
16301
|
|
|
16302
16302
|
/**
|
|
16303
16303
|
* Do not edit directly
|
|
16304
|
-
* Generated on
|
|
16304
|
+
* Generated on Wed, 14 Feb 2024 20:48:02 GMT
|
|
16305
16305
|
*/
|
|
16306
16306
|
|
|
16307
16307
|
const Information100DarkUi = "#a46eff";
|
|
@@ -23969,7 +23969,8 @@
|
|
|
23969
23969
|
tableSelectAllLabel: 'Select all rows',
|
|
23970
23970
|
tableGroupSelectAllLabel: 'Select all rows in group',
|
|
23971
23971
|
tableRowSelectLabel: 'Select row',
|
|
23972
|
-
tableRowOperationColumnLabel: 'Row operations'
|
|
23972
|
+
tableRowOperationColumnLabel: 'Row operations',
|
|
23973
|
+
tableRowLoadingLabel: 'Loading'
|
|
23973
23974
|
};
|
|
23974
23975
|
|
|
23975
23976
|
const tableGroupCollapseLabel = DesignToken.create({
|
|
@@ -24024,6 +24025,10 @@
|
|
|
24024
24025
|
name: 'table-row-operation-column-label',
|
|
24025
24026
|
cssCustomPropertyName: null
|
|
24026
24027
|
}).withDefault(tableLabelDefaults.tableRowOperationColumnLabel);
|
|
24028
|
+
const tableRowLoadingLabel = DesignToken.create({
|
|
24029
|
+
name: 'table-row-loading-label',
|
|
24030
|
+
cssCustomPropertyName: null
|
|
24031
|
+
}).withDefault(tableLabelDefaults.tableRowLoadingLabel);
|
|
24027
24032
|
|
|
24028
24033
|
const supportedLabels = {
|
|
24029
24034
|
groupCollapse: tableGroupCollapseLabel,
|
|
@@ -24038,7 +24043,8 @@
|
|
|
24038
24043
|
selectAll: tableSelectAllLabel,
|
|
24039
24044
|
groupSelectAll: tableGroupSelectAllLabel,
|
|
24040
24045
|
rowSelect: tableRowSelectLabel,
|
|
24041
|
-
rowOperationColumn: tableRowOperationColumnLabel
|
|
24046
|
+
rowOperationColumn: tableRowOperationColumnLabel,
|
|
24047
|
+
rowLoading: tableRowLoadingLabel
|
|
24042
24048
|
};
|
|
24043
24049
|
/**
|
|
24044
24050
|
* Label provider for the Nimble table (and its sub-components and columns)
|
|
@@ -24088,6 +24094,9 @@
|
|
|
24088
24094
|
__decorate$1([
|
|
24089
24095
|
attr({ attribute: 'row-operation-column' })
|
|
24090
24096
|
], LabelProviderTable.prototype, "rowOperationColumn", void 0);
|
|
24097
|
+
__decorate$1([
|
|
24098
|
+
attr({ attribute: 'row-loading' })
|
|
24099
|
+
], LabelProviderTable.prototype, "rowLoading", void 0);
|
|
24091
24100
|
const nimbleLabelProviderTable = LabelProviderTable.compose({
|
|
24092
24101
|
baseName: 'label-provider-table'
|
|
24093
24102
|
});
|
|
@@ -30335,10 +30344,10 @@
|
|
|
30335
30344
|
// Back up preferredDepth to cover defining textblocks directly
|
|
30336
30345
|
// above it, possibly skipping a non-defining textblock.
|
|
30337
30346
|
for (let d = preferredDepth - 1; d >= 0; d--) {
|
|
30338
|
-
let
|
|
30339
|
-
if (def && $from.node(
|
|
30347
|
+
let leftNode = leftNodes[d], def = definesContent(leftNode.type);
|
|
30348
|
+
if (def && !leftNode.sameMarkup($from.node(Math.abs(preferredTarget) - 1)))
|
|
30340
30349
|
preferredDepth = d;
|
|
30341
|
-
else if (def || !type.isTextblock)
|
|
30350
|
+
else if (def || !leftNode.type.isTextblock)
|
|
30342
30351
|
break;
|
|
30343
30352
|
}
|
|
30344
30353
|
for (let j = slice.openStart; j >= 0; j--) {
|
|
@@ -30480,6 +30489,51 @@
|
|
|
30480
30489
|
}
|
|
30481
30490
|
}
|
|
30482
30491
|
Step.jsonID("attr", AttrStep);
|
|
30492
|
+
/**
|
|
30493
|
+
Update an attribute in the doc node.
|
|
30494
|
+
*/
|
|
30495
|
+
class DocAttrStep extends Step {
|
|
30496
|
+
/**
|
|
30497
|
+
Construct an attribute step.
|
|
30498
|
+
*/
|
|
30499
|
+
constructor(
|
|
30500
|
+
/**
|
|
30501
|
+
The attribute to set.
|
|
30502
|
+
*/
|
|
30503
|
+
attr,
|
|
30504
|
+
// The attribute's new value.
|
|
30505
|
+
value) {
|
|
30506
|
+
super();
|
|
30507
|
+
this.attr = attr;
|
|
30508
|
+
this.value = value;
|
|
30509
|
+
}
|
|
30510
|
+
apply(doc) {
|
|
30511
|
+
let attrs = Object.create(null);
|
|
30512
|
+
for (let name in doc.attrs)
|
|
30513
|
+
attrs[name] = doc.attrs[name];
|
|
30514
|
+
attrs[this.attr] = this.value;
|
|
30515
|
+
let updated = doc.type.create(attrs, doc.content, doc.marks);
|
|
30516
|
+
return StepResult.ok(updated);
|
|
30517
|
+
}
|
|
30518
|
+
getMap() {
|
|
30519
|
+
return StepMap.empty;
|
|
30520
|
+
}
|
|
30521
|
+
invert(doc) {
|
|
30522
|
+
return new DocAttrStep(this.attr, doc.attrs[this.attr]);
|
|
30523
|
+
}
|
|
30524
|
+
map(mapping) {
|
|
30525
|
+
return this;
|
|
30526
|
+
}
|
|
30527
|
+
toJSON() {
|
|
30528
|
+
return { stepType: "docAttr", attr: this.attr, value: this.value };
|
|
30529
|
+
}
|
|
30530
|
+
static fromJSON(schema, json) {
|
|
30531
|
+
if (typeof json.attr != "string")
|
|
30532
|
+
throw new RangeError("Invalid input for DocAttrStep.fromJSON");
|
|
30533
|
+
return new DocAttrStep(json.attr, json.value);
|
|
30534
|
+
}
|
|
30535
|
+
}
|
|
30536
|
+
Step.jsonID("docAttr", DocAttrStep);
|
|
30483
30537
|
|
|
30484
30538
|
/**
|
|
30485
30539
|
@internal
|
|
@@ -30684,12 +30738,21 @@
|
|
|
30684
30738
|
}
|
|
30685
30739
|
/**
|
|
30686
30740
|
Set a single attribute on a given node to a new value.
|
|
30741
|
+
The `pos` addresses the document content. Use `setDocAttribute`
|
|
30742
|
+
to set attributes on the document itself.
|
|
30687
30743
|
*/
|
|
30688
30744
|
setNodeAttribute(pos, attr, value) {
|
|
30689
30745
|
this.step(new AttrStep(pos, attr, value));
|
|
30690
30746
|
return this;
|
|
30691
30747
|
}
|
|
30692
30748
|
/**
|
|
30749
|
+
Set a single attribute on the document to a new value.
|
|
30750
|
+
*/
|
|
30751
|
+
setDocAttribute(attr, value) {
|
|
30752
|
+
this.step(new DocAttrStep(attr, value));
|
|
30753
|
+
return this;
|
|
30754
|
+
}
|
|
30755
|
+
/**
|
|
30693
30756
|
Add a mark to the node at position `pos`.
|
|
30694
30757
|
*/
|
|
30695
30758
|
addNodeMark(pos, mark) {
|
|
@@ -32175,6 +32238,11 @@
|
|
|
32175
32238
|
offset++;
|
|
32176
32239
|
}
|
|
32177
32240
|
}
|
|
32241
|
+
let prev;
|
|
32242
|
+
// When clicking above the right side of an uneditable node, Chrome will report a cursor position after that node.
|
|
32243
|
+
if (webkit && offset && node.nodeType == 1 && (prev = node.childNodes[offset - 1]).nodeType == 1 &&
|
|
32244
|
+
prev.contentEditable == "false" && prev.getBoundingClientRect().top >= coords.top)
|
|
32245
|
+
offset--;
|
|
32178
32246
|
// Suspiciously specific kludge to work around caret*FromPoint
|
|
32179
32247
|
// never returning a position at the end of the document
|
|
32180
32248
|
if (node == view.dom && offset == node.childNodes.length - 1 && node.lastChild.nodeType == 1 &&
|
|
@@ -33559,9 +33627,11 @@
|
|
|
33559
33627
|
}
|
|
33560
33628
|
else if (!locked && (updated = this.recreateWrapper(next, node, outerDeco, innerDeco, view, pos))) {
|
|
33561
33629
|
this.top.children[this.index] = updated;
|
|
33562
|
-
updated.
|
|
33563
|
-
|
|
33564
|
-
|
|
33630
|
+
if (updated.contentDOM) {
|
|
33631
|
+
updated.dirty = CONTENT_DIRTY;
|
|
33632
|
+
updated.updateChildren(view, pos + 1);
|
|
33633
|
+
updated.dirty = NOT_DIRTY;
|
|
33634
|
+
}
|
|
33565
33635
|
this.changed = true;
|
|
33566
33636
|
this.index++;
|
|
33567
33637
|
return true;
|
|
@@ -33578,13 +33648,13 @@
|
|
|
33578
33648
|
!next.node.content.eq(node.content))
|
|
33579
33649
|
return null;
|
|
33580
33650
|
let wrapper = NodeViewDesc.create(this.top, node, outerDeco, innerDeco, view, pos);
|
|
33581
|
-
if (
|
|
33582
|
-
|
|
33583
|
-
|
|
33584
|
-
|
|
33651
|
+
if (wrapper.contentDOM) {
|
|
33652
|
+
wrapper.children = next.children;
|
|
33653
|
+
next.children = [];
|
|
33654
|
+
for (let ch of wrapper.children)
|
|
33655
|
+
ch.parent = wrapper;
|
|
33656
|
+
}
|
|
33585
33657
|
next.destroy();
|
|
33586
|
-
for (let ch of wrapper.children)
|
|
33587
|
-
ch.parent = wrapper;
|
|
33588
33658
|
return wrapper;
|
|
33589
33659
|
}
|
|
33590
33660
|
// Insert the node as a newly created node desc.
|
|
@@ -33712,10 +33782,17 @@
|
|
|
33712
33782
|
}
|
|
33713
33783
|
let decoIndex = 0, active = [], restNode = null;
|
|
33714
33784
|
for (let parentIndex = 0;;) {
|
|
33715
|
-
|
|
33716
|
-
|
|
33717
|
-
|
|
33718
|
-
|
|
33785
|
+
let widget, widgets;
|
|
33786
|
+
while (decoIndex < locals.length && locals[decoIndex].to == offset) {
|
|
33787
|
+
let next = locals[decoIndex++];
|
|
33788
|
+
if (next.widget) {
|
|
33789
|
+
if (!widget)
|
|
33790
|
+
widget = next;
|
|
33791
|
+
else
|
|
33792
|
+
(widgets || (widgets = [widget])).push(next);
|
|
33793
|
+
}
|
|
33794
|
+
}
|
|
33795
|
+
if (widget) {
|
|
33719
33796
|
if (widgets) {
|
|
33720
33797
|
widgets.sort(compareSide);
|
|
33721
33798
|
for (let i = 0; i < widgets.length; i++)
|
|
@@ -33758,6 +33835,10 @@
|
|
|
33758
33835
|
index = -1;
|
|
33759
33836
|
}
|
|
33760
33837
|
}
|
|
33838
|
+
else {
|
|
33839
|
+
while (decoIndex < locals.length && locals[decoIndex].to < end)
|
|
33840
|
+
decoIndex++;
|
|
33841
|
+
}
|
|
33761
33842
|
let outerDeco = child.isInline && !child.isLeaf ? active.filter(d => !d.inline) : active.slice();
|
|
33762
33843
|
onNode(child, outerDeco, deco.forChild(offset, child), index);
|
|
33763
33844
|
offset = end;
|
|
@@ -33808,6 +33889,8 @@
|
|
|
33808
33889
|
str += next.text;
|
|
33809
33890
|
}
|
|
33810
33891
|
if (pos >= from) {
|
|
33892
|
+
if (pos >= to && str.slice(to - text.length - childStart, to - childStart) == text)
|
|
33893
|
+
return to - text.length;
|
|
33811
33894
|
let found = childStart < to ? str.lastIndexOf(text, to - childStart - 1) : -1;
|
|
33812
33895
|
if (found >= 0 && found + text.length + childStart >= from)
|
|
33813
33896
|
return childStart + found;
|
|
@@ -34061,7 +34144,14 @@
|
|
|
34061
34144
|
function selectHorizontally(view, dir, mods) {
|
|
34062
34145
|
let sel = view.state.selection;
|
|
34063
34146
|
if (sel instanceof TextSelection) {
|
|
34064
|
-
if (
|
|
34147
|
+
if (mods.indexOf("s") > -1) {
|
|
34148
|
+
let { $head } = sel, node = $head.textOffset ? null : dir < 0 ? $head.nodeBefore : $head.nodeAfter;
|
|
34149
|
+
if (!node || node.isText || !node.isLeaf)
|
|
34150
|
+
return false;
|
|
34151
|
+
let $newHead = view.state.doc.resolve($head.pos + node.nodeSize * (dir < 0 ? -1 : 1));
|
|
34152
|
+
return apply(view, new TextSelection(sel.$anchor, $newHead));
|
|
34153
|
+
}
|
|
34154
|
+
else if (!sel.empty) {
|
|
34065
34155
|
return false;
|
|
34066
34156
|
}
|
|
34067
34157
|
else if (view.endOfTextblock(dir > 0 ? "forward" : "backward")) {
|
|
@@ -34104,11 +34194,9 @@
|
|
|
34104
34194
|
function nodeLen(node) {
|
|
34105
34195
|
return node.nodeType == 3 ? node.nodeValue.length : node.childNodes.length;
|
|
34106
34196
|
}
|
|
34107
|
-
function isIgnorable(dom) {
|
|
34108
|
-
if (dom.contentEditable == "false")
|
|
34109
|
-
return true;
|
|
34197
|
+
function isIgnorable(dom, dir) {
|
|
34110
34198
|
let desc = dom.pmViewDesc;
|
|
34111
|
-
return desc && desc.size == 0 && (dom.nextSibling || dom.nodeName != "BR");
|
|
34199
|
+
return desc && desc.size == 0 && (dir < 0 || dom.nextSibling || dom.nodeName != "BR");
|
|
34112
34200
|
}
|
|
34113
34201
|
function skipIgnoredNodes(view, dir) {
|
|
34114
34202
|
return dir < 0 ? skipIgnoredNodesBefore(view) : skipIgnoredNodesAfter(view);
|
|
@@ -34124,7 +34212,7 @@
|
|
|
34124
34212
|
// Gecko will do odd things when the selection is directly in front
|
|
34125
34213
|
// of a non-editable node, so in that case, move it into the next
|
|
34126
34214
|
// node if possible. Issue prosemirror/prosemirror#832.
|
|
34127
|
-
if (gecko && node.nodeType == 1 && offset < nodeLen(node) && isIgnorable(node.childNodes[offset]))
|
|
34215
|
+
if (gecko && node.nodeType == 1 && offset < nodeLen(node) && isIgnorable(node.childNodes[offset], -1))
|
|
34128
34216
|
force = true;
|
|
34129
34217
|
for (;;) {
|
|
34130
34218
|
if (offset > 0) {
|
|
@@ -34133,7 +34221,7 @@
|
|
|
34133
34221
|
}
|
|
34134
34222
|
else {
|
|
34135
34223
|
let before = node.childNodes[offset - 1];
|
|
34136
|
-
if (isIgnorable(before)) {
|
|
34224
|
+
if (isIgnorable(before, -1)) {
|
|
34137
34225
|
moveNode = node;
|
|
34138
34226
|
moveOffset = --offset;
|
|
34139
34227
|
}
|
|
@@ -34150,7 +34238,7 @@
|
|
|
34150
34238
|
}
|
|
34151
34239
|
else {
|
|
34152
34240
|
let prev = node.previousSibling;
|
|
34153
|
-
while (prev && isIgnorable(prev)) {
|
|
34241
|
+
while (prev && isIgnorable(prev, -1)) {
|
|
34154
34242
|
moveNode = node.parentNode;
|
|
34155
34243
|
moveOffset = domIndex(prev);
|
|
34156
34244
|
prev = prev.previousSibling;
|
|
@@ -34186,7 +34274,7 @@
|
|
|
34186
34274
|
if (node.nodeType != 1)
|
|
34187
34275
|
break;
|
|
34188
34276
|
let after = node.childNodes[offset];
|
|
34189
|
-
if (isIgnorable(after)) {
|
|
34277
|
+
if (isIgnorable(after, 1)) {
|
|
34190
34278
|
moveNode = node;
|
|
34191
34279
|
moveOffset = ++offset;
|
|
34192
34280
|
}
|
|
@@ -34198,7 +34286,7 @@
|
|
|
34198
34286
|
}
|
|
34199
34287
|
else {
|
|
34200
34288
|
let next = node.nextSibling;
|
|
34201
|
-
while (next && isIgnorable(next)) {
|
|
34289
|
+
while (next && isIgnorable(next, 1)) {
|
|
34202
34290
|
moveNode = next.parentNode;
|
|
34203
34291
|
moveOffset = domIndex(next) + 1;
|
|
34204
34292
|
next = next.nextSibling;
|
|
@@ -34229,9 +34317,12 @@
|
|
|
34229
34317
|
node = node.parentNode;
|
|
34230
34318
|
}
|
|
34231
34319
|
while (node && offset < node.childNodes.length) {
|
|
34232
|
-
|
|
34233
|
-
if (
|
|
34234
|
-
return
|
|
34320
|
+
let next = node.childNodes[offset];
|
|
34321
|
+
if (next.nodeType == 3)
|
|
34322
|
+
return next;
|
|
34323
|
+
if (next.nodeType == 1 && next.contentEditable == "false")
|
|
34324
|
+
break;
|
|
34325
|
+
node = next;
|
|
34235
34326
|
offset = 0;
|
|
34236
34327
|
}
|
|
34237
34328
|
}
|
|
@@ -34241,9 +34332,12 @@
|
|
|
34241
34332
|
node = node.parentNode;
|
|
34242
34333
|
}
|
|
34243
34334
|
while (node && offset) {
|
|
34244
|
-
|
|
34245
|
-
if (
|
|
34246
|
-
return
|
|
34335
|
+
let next = node.childNodes[offset - 1];
|
|
34336
|
+
if (next.nodeType == 3)
|
|
34337
|
+
return next;
|
|
34338
|
+
if (next.nodeType == 1 && next.contentEditable == "false")
|
|
34339
|
+
break;
|
|
34340
|
+
node = next;
|
|
34247
34341
|
offset = node.childNodes.length;
|
|
34248
34342
|
}
|
|
34249
34343
|
}
|
|
@@ -34405,7 +34499,7 @@
|
|
|
34405
34499
|
return selectVertically(view, -1, mods) || skipIgnoredNodes(view, -1);
|
|
34406
34500
|
}
|
|
34407
34501
|
else if (code == 40 || (mac$2 && code == 78 && mods == "c")) { // Down arrow, Ctrl-n on Mac
|
|
34408
|
-
return safariDownArrowBug(view) || selectVertically(view, 1, mods) ||
|
|
34502
|
+
return safariDownArrowBug(view) || selectVertically(view, 1, mods) || skipIgnoredNodes(view, 1);
|
|
34409
34503
|
}
|
|
34410
34504
|
else if (mods == (mac$2 ? "m" : "c") &&
|
|
34411
34505
|
(code == 66 || code == 73 || code == 89 || code == 90)) { // Mod-[biyz]
|
|
@@ -35244,6 +35338,13 @@
|
|
|
35244
35338
|
view.dispatch(tr.scrollIntoView().setMeta("paste", true).setMeta("uiEvent", "paste"));
|
|
35245
35339
|
return true;
|
|
35246
35340
|
}
|
|
35341
|
+
function getText$1(clipboardData) {
|
|
35342
|
+
let text = clipboardData.getData("text/plain") || clipboardData.getData("Text");
|
|
35343
|
+
if (text)
|
|
35344
|
+
return text;
|
|
35345
|
+
let uris = clipboardData.getData("text/uri-list");
|
|
35346
|
+
return uris ? uris.replace(/\r?\n/g, " ") : "";
|
|
35347
|
+
}
|
|
35247
35348
|
editHandlers.paste = (view, _event) => {
|
|
35248
35349
|
let event = _event;
|
|
35249
35350
|
// Handling paste from JavaScript during composition is very poorly
|
|
@@ -35254,15 +35355,16 @@
|
|
|
35254
35355
|
return;
|
|
35255
35356
|
let data = brokenClipboardAPI ? null : event.clipboardData;
|
|
35256
35357
|
let plain = view.input.shiftKey && view.input.lastKeyCode != 45;
|
|
35257
|
-
if (data && doPaste(view, data
|
|
35358
|
+
if (data && doPaste(view, getText$1(data), data.getData("text/html"), plain, event))
|
|
35258
35359
|
event.preventDefault();
|
|
35259
35360
|
else
|
|
35260
35361
|
capturePaste(view, event);
|
|
35261
35362
|
};
|
|
35262
35363
|
class Dragging {
|
|
35263
|
-
constructor(slice, move) {
|
|
35364
|
+
constructor(slice, move, node) {
|
|
35264
35365
|
this.slice = slice;
|
|
35265
35366
|
this.move = move;
|
|
35367
|
+
this.node = node;
|
|
35266
35368
|
}
|
|
35267
35369
|
}
|
|
35268
35370
|
const dragCopyModifier = mac$2 ? "altKey" : "ctrlKey";
|
|
@@ -35275,23 +35377,24 @@
|
|
|
35275
35377
|
return;
|
|
35276
35378
|
let sel = view.state.selection;
|
|
35277
35379
|
let pos = sel.empty ? null : view.posAtCoords(eventCoords(event));
|
|
35380
|
+
let node;
|
|
35278
35381
|
if (pos && pos.pos >= sel.from && pos.pos <= (sel instanceof NodeSelection ? sel.to - 1 : sel.to)) ;
|
|
35279
35382
|
else if (mouseDown && mouseDown.mightDrag) {
|
|
35280
|
-
|
|
35383
|
+
node = NodeSelection.create(view.state.doc, mouseDown.mightDrag.pos);
|
|
35281
35384
|
}
|
|
35282
35385
|
else if (event.target && event.target.nodeType == 1) {
|
|
35283
35386
|
let desc = view.docView.nearestDesc(event.target, true);
|
|
35284
35387
|
if (desc && desc.node.type.spec.draggable && desc != view.docView)
|
|
35285
|
-
|
|
35388
|
+
node = NodeSelection.create(view.state.doc, desc.posBefore);
|
|
35286
35389
|
}
|
|
35287
|
-
let slice = view.state.selection.content(), { dom, text } = serializeForClipboard(view, slice);
|
|
35390
|
+
let slice = (node || view.state.selection).content(), { dom, text } = serializeForClipboard(view, slice);
|
|
35288
35391
|
event.dataTransfer.clearData();
|
|
35289
35392
|
event.dataTransfer.setData(brokenClipboardAPI ? "Text" : "text/html", dom.innerHTML);
|
|
35290
35393
|
// See https://github.com/ProseMirror/prosemirror/issues/1156
|
|
35291
35394
|
event.dataTransfer.effectAllowed = "copyMove";
|
|
35292
35395
|
if (!brokenClipboardAPI)
|
|
35293
35396
|
event.dataTransfer.setData("text/plain", text);
|
|
35294
|
-
view.dragging = new Dragging(slice, !event[dragCopyModifier]);
|
|
35397
|
+
view.dragging = new Dragging(slice, !event[dragCopyModifier], node);
|
|
35295
35398
|
};
|
|
35296
35399
|
handlers.dragend = view => {
|
|
35297
35400
|
let dragging = view.dragging;
|
|
@@ -35316,7 +35419,7 @@
|
|
|
35316
35419
|
view.someProp("transformPasted", f => { slice = f(slice, view); });
|
|
35317
35420
|
}
|
|
35318
35421
|
else {
|
|
35319
|
-
slice = parseFromClipboard(view, event.dataTransfer
|
|
35422
|
+
slice = parseFromClipboard(view, getText$1(event.dataTransfer), brokenClipboardAPI ? null : event.dataTransfer.getData("text/html"), false, $mouse);
|
|
35320
35423
|
}
|
|
35321
35424
|
let move = !!(dragging && !event[dragCopyModifier]);
|
|
35322
35425
|
if (view.someProp("handleDrop", f => f(view, event, slice || Slice.empty, move))) {
|
|
@@ -35330,8 +35433,13 @@
|
|
|
35330
35433
|
if (insertPos == null)
|
|
35331
35434
|
insertPos = $mouse.pos;
|
|
35332
35435
|
let tr = view.state.tr;
|
|
35333
|
-
if (move)
|
|
35334
|
-
|
|
35436
|
+
if (move) {
|
|
35437
|
+
let { node } = dragging;
|
|
35438
|
+
if (node)
|
|
35439
|
+
node.replace(tr);
|
|
35440
|
+
else
|
|
35441
|
+
tr.deleteSelection();
|
|
35442
|
+
}
|
|
35335
35443
|
let pos = tr.mapping.map(insertPos);
|
|
35336
35444
|
let isNode = slice.openStart == 0 && slice.openEnd == 0 && slice.content.childCount == 1;
|
|
35337
35445
|
let beforeInsert = tr.doc;
|
|
@@ -35563,6 +35671,10 @@
|
|
|
35563
35671
|
@internal
|
|
35564
35672
|
*/
|
|
35565
35673
|
get inline() { return this.type instanceof InlineType; }
|
|
35674
|
+
/**
|
|
35675
|
+
@internal
|
|
35676
|
+
*/
|
|
35677
|
+
get widget() { return this.type instanceof WidgetType; }
|
|
35566
35678
|
}
|
|
35567
35679
|
const none$1 = [], noSpec = {};
|
|
35568
35680
|
/**
|
|
@@ -35581,7 +35693,8 @@
|
|
|
35581
35693
|
}
|
|
35582
35694
|
/**
|
|
35583
35695
|
Create a set of decorations, using the structure of the given
|
|
35584
|
-
document.
|
|
35696
|
+
document. This will consume (modify) the `decorations` array, so
|
|
35697
|
+
you must make a copy if you want need to preserve that.
|
|
35585
35698
|
*/
|
|
35586
35699
|
static create(doc, decorations) {
|
|
35587
35700
|
return decorations.length ? buildTree(decorations, doc, 0, noSpec) : empty$1;
|
|
@@ -35640,8 +35753,9 @@
|
|
|
35640
35753
|
}
|
|
35641
35754
|
/**
|
|
35642
35755
|
Add the given array of decorations to the ones in the set,
|
|
35643
|
-
producing a new set.
|
|
35644
|
-
create the appropriate tree
|
|
35756
|
+
producing a new set. Consumes the `decorations` array. Needs
|
|
35757
|
+
access to the current document to create the appropriate tree
|
|
35758
|
+
structure.
|
|
35645
35759
|
*/
|
|
35646
35760
|
add(doc, decorations) {
|
|
35647
35761
|
if (!decorations.length)
|
|
@@ -35883,7 +35997,7 @@
|
|
|
35883
35997
|
if (oldEnd >= start) {
|
|
35884
35998
|
children[i + 1] = oldStart <= start ? -2 : -1;
|
|
35885
35999
|
}
|
|
35886
|
-
else if (
|
|
36000
|
+
else if (oldStart >= baseOffset && dSize) {
|
|
35887
36001
|
children[i] += dSize;
|
|
35888
36002
|
children[i + 1] += dSize;
|
|
35889
36003
|
}
|
|
@@ -36734,17 +36848,27 @@
|
|
|
36734
36848
|
if (endA < start && a.size < b.size) {
|
|
36735
36849
|
let move = preferredPos <= start && preferredPos >= endA ? start - preferredPos : 0;
|
|
36736
36850
|
start -= move;
|
|
36851
|
+
if (start && start < b.size && isSurrogatePair(b.textBetween(start - 1, start + 1)))
|
|
36852
|
+
start += move ? 1 : -1;
|
|
36737
36853
|
endB = start + (endB - endA);
|
|
36738
36854
|
endA = start;
|
|
36739
36855
|
}
|
|
36740
36856
|
else if (endB < start) {
|
|
36741
36857
|
let move = preferredPos <= start && preferredPos >= endB ? start - preferredPos : 0;
|
|
36742
36858
|
start -= move;
|
|
36859
|
+
if (start && start < a.size && isSurrogatePair(a.textBetween(start - 1, start + 1)))
|
|
36860
|
+
start += move ? 1 : -1;
|
|
36743
36861
|
endA = start + (endA - endB);
|
|
36744
36862
|
endB = start;
|
|
36745
36863
|
}
|
|
36746
36864
|
return { start, endA, endB };
|
|
36747
36865
|
}
|
|
36866
|
+
function isSurrogatePair(str) {
|
|
36867
|
+
if (str.length != 2)
|
|
36868
|
+
return false;
|
|
36869
|
+
let a = str.charCodeAt(0), b = str.charCodeAt(1);
|
|
36870
|
+
return a >= 0xDC00 && a <= 0xDFFF && b >= 0xD800 && b <= 0xDBFF;
|
|
36871
|
+
}
|
|
36748
36872
|
/**
|
|
36749
36873
|
An editor view manages the DOM structure that represents an
|
|
36750
36874
|
editable document. Its state and behavior are determined by its
|
|
@@ -36878,6 +37002,7 @@
|
|
|
36878
37002
|
this.updateStateInner(state, this._props);
|
|
36879
37003
|
}
|
|
36880
37004
|
updateStateInner(state, prevProps) {
|
|
37005
|
+
var _a;
|
|
36881
37006
|
let prev = this.state, redraw = false, updateSel = false;
|
|
36882
37007
|
// When stored marks are added, stop composition, so that they can
|
|
36883
37008
|
// be displayed.
|
|
@@ -36945,6 +37070,8 @@
|
|
|
36945
37070
|
this.domObserver.start();
|
|
36946
37071
|
}
|
|
36947
37072
|
this.updatePluginViews(prev);
|
|
37073
|
+
if (((_a = this.dragging) === null || _a === void 0 ? void 0 : _a.node) && !prev.doc.eq(state.doc))
|
|
37074
|
+
this.updateDraggedNode(this.dragging, prev);
|
|
36948
37075
|
if (scroll == "reset") {
|
|
36949
37076
|
this.dom.scrollTop = 0;
|
|
36950
37077
|
}
|
|
@@ -36999,6 +37126,19 @@
|
|
|
36999
37126
|
}
|
|
37000
37127
|
}
|
|
37001
37128
|
}
|
|
37129
|
+
updateDraggedNode(dragging, prev) {
|
|
37130
|
+
let sel = dragging.node, found = -1;
|
|
37131
|
+
if (this.state.doc.nodeAt(sel.from) == sel.node) {
|
|
37132
|
+
found = sel.from;
|
|
37133
|
+
}
|
|
37134
|
+
else {
|
|
37135
|
+
let movedPos = sel.from + (this.state.doc.content.size - prev.doc.content.size);
|
|
37136
|
+
let moved = movedPos > 0 && this.state.doc.nodeAt(movedPos);
|
|
37137
|
+
if (moved == sel.node)
|
|
37138
|
+
found = movedPos;
|
|
37139
|
+
}
|
|
37140
|
+
this.dragging = new Dragging(dragging.slice, dragging.move, found < 0 ? undefined : NodeSelection.create(this.state.doc, found));
|
|
37141
|
+
}
|
|
37002
37142
|
someProp(propName, f) {
|
|
37003
37143
|
let prop = this._props && this._props[propName], value;
|
|
37004
37144
|
if (prop != null && (value = f ? f(prop) : prop))
|
|
@@ -37069,6 +37209,13 @@
|
|
|
37069
37209
|
return cached || document;
|
|
37070
37210
|
}
|
|
37071
37211
|
/**
|
|
37212
|
+
When an existing editor view is moved to a new document or
|
|
37213
|
+
shadow tree, call this to make it recompute its root.
|
|
37214
|
+
*/
|
|
37215
|
+
updateRoot() {
|
|
37216
|
+
this._root = null;
|
|
37217
|
+
}
|
|
37218
|
+
/**
|
|
37072
37219
|
Given a pair of viewport coordinates, return the document
|
|
37073
37220
|
position that corresponds to them. May return null if the given
|
|
37074
37221
|
coordinates aren't inside of the editor. When an object is
|
|
@@ -53881,9 +54028,9 @@ img.ProseMirror-separator {
|
|
|
53881
54028
|
// THIS FILE IS AUTOMATICALLY GENERATED DO NOT EDIT DIRECTLY
|
|
53882
54029
|
// See update-tlds.js for encoding/decoding format
|
|
53883
54030
|
// https://data.iana.org/TLD/tlds-alpha-by-domain.txt
|
|
53884
|
-
const encodedTlds = '
|
|
54031
|
+
const encodedTlds = 'aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4vianca6w0s2x0a2z0ure5ba0by2idu3namex3narepublic11d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0cast4mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dabur3d1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0ardian6cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2tura4vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9dnavy5lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0a1b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp2w2ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4finity6ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2';
|
|
53885
54032
|
// Internationalized domain names containing non-ASCII
|
|
53886
|
-
const encodedUtlds = 'ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5
|
|
54033
|
+
const encodedUtlds = 'ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2';
|
|
53887
54034
|
|
|
53888
54035
|
/**
|
|
53889
54036
|
* @template A
|
|
@@ -54271,14 +54418,24 @@ img.ProseMirror-separator {
|
|
|
54271
54418
|
const NL$1 = 'NL'; // \n
|
|
54272
54419
|
|
|
54273
54420
|
// Opening/closing bracket classes
|
|
54421
|
+
// TODO: Rename OPEN -> LEFT and CLOSE -> RIGHT in v5 to fit with Unicode names
|
|
54422
|
+
// Also rename angle brackes to LESSTHAN and GREATER THAN
|
|
54274
54423
|
const OPENBRACE = 'OPENBRACE'; // {
|
|
54275
|
-
const OPENBRACKET = 'OPENBRACKET'; // [
|
|
54276
|
-
const OPENANGLEBRACKET = 'OPENANGLEBRACKET'; // <
|
|
54277
|
-
const OPENPAREN = 'OPENPAREN'; // (
|
|
54278
54424
|
const CLOSEBRACE = 'CLOSEBRACE'; // }
|
|
54425
|
+
const OPENBRACKET = 'OPENBRACKET'; // [
|
|
54279
54426
|
const CLOSEBRACKET = 'CLOSEBRACKET'; // ]
|
|
54280
|
-
const
|
|
54427
|
+
const OPENPAREN = 'OPENPAREN'; // (
|
|
54281
54428
|
const CLOSEPAREN = 'CLOSEPAREN'; // )
|
|
54429
|
+
const OPENANGLEBRACKET = 'OPENANGLEBRACKET'; // <
|
|
54430
|
+
const CLOSEANGLEBRACKET = 'CLOSEANGLEBRACKET'; // >
|
|
54431
|
+
const FULLWIDTHLEFTPAREN = 'FULLWIDTHLEFTPAREN'; // (
|
|
54432
|
+
const FULLWIDTHRIGHTPAREN = 'FULLWIDTHRIGHTPAREN'; // )
|
|
54433
|
+
const LEFTCORNERBRACKET = 'LEFTCORNERBRACKET'; // 「
|
|
54434
|
+
const RIGHTCORNERBRACKET = 'RIGHTCORNERBRACKET'; // 」
|
|
54435
|
+
const LEFTWHITECORNERBRACKET = 'LEFTWHITECORNERBRACKET'; // 『
|
|
54436
|
+
const RIGHTWHITECORNERBRACKET = 'RIGHTWHITECORNERBRACKET'; // 』
|
|
54437
|
+
const FULLWIDTHLESSTHAN = 'FULLWIDTHLESSTHAN'; // <
|
|
54438
|
+
const FULLWIDTHGREATERTHAN = 'FULLWIDTHGREATERTHAN'; // >
|
|
54282
54439
|
|
|
54283
54440
|
// Various symbols
|
|
54284
54441
|
const AMPERSAND = 'AMPERSAND'; // &
|
|
@@ -54326,13 +54483,21 @@ img.ProseMirror-separator {
|
|
|
54326
54483
|
WS: WS,
|
|
54327
54484
|
NL: NL$1,
|
|
54328
54485
|
OPENBRACE: OPENBRACE,
|
|
54329
|
-
OPENBRACKET: OPENBRACKET,
|
|
54330
|
-
OPENANGLEBRACKET: OPENANGLEBRACKET,
|
|
54331
|
-
OPENPAREN: OPENPAREN,
|
|
54332
54486
|
CLOSEBRACE: CLOSEBRACE,
|
|
54487
|
+
OPENBRACKET: OPENBRACKET,
|
|
54333
54488
|
CLOSEBRACKET: CLOSEBRACKET,
|
|
54334
|
-
|
|
54489
|
+
OPENPAREN: OPENPAREN,
|
|
54335
54490
|
CLOSEPAREN: CLOSEPAREN,
|
|
54491
|
+
OPENANGLEBRACKET: OPENANGLEBRACKET,
|
|
54492
|
+
CLOSEANGLEBRACKET: CLOSEANGLEBRACKET,
|
|
54493
|
+
FULLWIDTHLEFTPAREN: FULLWIDTHLEFTPAREN,
|
|
54494
|
+
FULLWIDTHRIGHTPAREN: FULLWIDTHRIGHTPAREN,
|
|
54495
|
+
LEFTCORNERBRACKET: LEFTCORNERBRACKET,
|
|
54496
|
+
RIGHTCORNERBRACKET: RIGHTCORNERBRACKET,
|
|
54497
|
+
LEFTWHITECORNERBRACKET: LEFTWHITECORNERBRACKET,
|
|
54498
|
+
RIGHTWHITECORNERBRACKET: RIGHTWHITECORNERBRACKET,
|
|
54499
|
+
FULLWIDTHLESSTHAN: FULLWIDTHLESSTHAN,
|
|
54500
|
+
FULLWIDTHGREATERTHAN: FULLWIDTHGREATERTHAN,
|
|
54336
54501
|
AMPERSAND: AMPERSAND,
|
|
54337
54502
|
APOSTROPHE: APOSTROPHE,
|
|
54338
54503
|
ASTERISK: ASTERISK,
|
|
@@ -54420,13 +54585,21 @@ img.ProseMirror-separator {
|
|
|
54420
54585
|
// States for special URL symbols that accept immediately after start
|
|
54421
54586
|
tt(Start, "'", APOSTROPHE);
|
|
54422
54587
|
tt(Start, '{', OPENBRACE);
|
|
54423
|
-
tt(Start, '[', OPENBRACKET);
|
|
54424
|
-
tt(Start, '<', OPENANGLEBRACKET);
|
|
54425
|
-
tt(Start, '(', OPENPAREN);
|
|
54426
54588
|
tt(Start, '}', CLOSEBRACE);
|
|
54589
|
+
tt(Start, '[', OPENBRACKET);
|
|
54427
54590
|
tt(Start, ']', CLOSEBRACKET);
|
|
54428
|
-
tt(Start, '
|
|
54591
|
+
tt(Start, '(', OPENPAREN);
|
|
54429
54592
|
tt(Start, ')', CLOSEPAREN);
|
|
54593
|
+
tt(Start, '<', OPENANGLEBRACKET);
|
|
54594
|
+
tt(Start, '>', CLOSEANGLEBRACKET);
|
|
54595
|
+
tt(Start, '(', FULLWIDTHLEFTPAREN);
|
|
54596
|
+
tt(Start, ')', FULLWIDTHRIGHTPAREN);
|
|
54597
|
+
tt(Start, '「', LEFTCORNERBRACKET);
|
|
54598
|
+
tt(Start, '」', RIGHTCORNERBRACKET);
|
|
54599
|
+
tt(Start, '『', LEFTWHITECORNERBRACKET);
|
|
54600
|
+
tt(Start, '』', RIGHTWHITECORNERBRACKET);
|
|
54601
|
+
tt(Start, '<', FULLWIDTHLESSTHAN);
|
|
54602
|
+
tt(Start, '>', FULLWIDTHGREATERTHAN);
|
|
54430
54603
|
tt(Start, '&', AMPERSAND);
|
|
54431
54604
|
tt(Start, '*', ASTERISK);
|
|
54432
54605
|
tt(Start, '@', AT);
|
|
@@ -55197,11 +55370,11 @@ img.ProseMirror-separator {
|
|
|
55197
55370
|
// Types of tokens that can follow a URL and be part of the query string
|
|
55198
55371
|
// but cannot be the very last characters
|
|
55199
55372
|
// Characters that cannot appear in the URL at all should be excluded
|
|
55200
|
-
const qsNonAccepting = [APOSTROPHE,
|
|
55373
|
+
const qsNonAccepting = [APOSTROPHE, COLON, COMMA, DOT, EXCLAMATION, QUERY, QUOTE, SEMI, OPENANGLEBRACKET, CLOSEANGLEBRACKET, OPENBRACE, CLOSEBRACE, CLOSEBRACKET, OPENBRACKET, OPENPAREN, CLOSEPAREN, FULLWIDTHLEFTPAREN, FULLWIDTHRIGHTPAREN, LEFTCORNERBRACKET, RIGHTCORNERBRACKET, LEFTWHITECORNERBRACKET, RIGHTWHITECORNERBRACKET, FULLWIDTHLESSTHAN, FULLWIDTHGREATERTHAN];
|
|
55201
55374
|
|
|
55202
55375
|
// For addresses without the mailto prefix
|
|
55203
55376
|
// Tokens allowed in the localpart of the email
|
|
55204
|
-
const localpartAccepting = [AMPERSAND, APOSTROPHE, ASTERISK, BACKSLASH, BACKTICK, CARET,
|
|
55377
|
+
const localpartAccepting = [AMPERSAND, APOSTROPHE, ASTERISK, BACKSLASH, BACKTICK, CARET, DOLLAR, EQUALS, HYPHEN, OPENBRACE, CLOSEBRACE, PERCENT, PIPE, PLUS, POUND, QUERY, SLASH, SYM, TILDE, UNDERSCORE];
|
|
55205
55378
|
|
|
55206
55379
|
// The universal starting state.
|
|
55207
55380
|
/**
|
|
@@ -55250,7 +55423,7 @@ img.ProseMirror-separator {
|
|
|
55250
55423
|
// Final possible email states
|
|
55251
55424
|
const EmailColon = tt(Email$1, COLON); // URL followed by colon (potential port number here)
|
|
55252
55425
|
/*const EmailColonPort = */
|
|
55253
|
-
ta(EmailColon, groups.numeric, Email); // URL followed by colon and port
|
|
55426
|
+
ta(EmailColon, groups.numeric, Email); // URL followed by colon and port number
|
|
55254
55427
|
|
|
55255
55428
|
// Account for dots and hyphens. Hyphens are usually parts of domain names
|
|
55256
55429
|
// (but not TLDs)
|
|
@@ -55309,72 +55482,51 @@ img.ProseMirror-separator {
|
|
|
55309
55482
|
ta(UriPrefix, groups.domain, Url$1);
|
|
55310
55483
|
ta(UriPrefix, qsAccepting, Url$1);
|
|
55311
55484
|
tt(UriPrefix, SLASH, Url$1);
|
|
55485
|
+
const bracketPairs = [[OPENBRACE, CLOSEBRACE],
|
|
55486
|
+
// {}
|
|
55487
|
+
[OPENBRACKET, CLOSEBRACKET],
|
|
55488
|
+
// []
|
|
55489
|
+
[OPENPAREN, CLOSEPAREN],
|
|
55490
|
+
// ()
|
|
55491
|
+
[OPENANGLEBRACKET, CLOSEANGLEBRACKET],
|
|
55492
|
+
// <>
|
|
55493
|
+
[FULLWIDTHLEFTPAREN, FULLWIDTHRIGHTPAREN],
|
|
55494
|
+
// ()
|
|
55495
|
+
[LEFTCORNERBRACKET, RIGHTCORNERBRACKET],
|
|
55496
|
+
// 「」
|
|
55497
|
+
[LEFTWHITECORNERBRACKET, RIGHTWHITECORNERBRACKET],
|
|
55498
|
+
// 『』
|
|
55499
|
+
[FULLWIDTHLESSTHAN, FULLWIDTHGREATERTHAN] // <>
|
|
55500
|
+
];
|
|
55501
|
+
|
|
55502
|
+
for (let i = 0; i < bracketPairs.length; i++) {
|
|
55503
|
+
const [OPEN, CLOSE] = bracketPairs[i];
|
|
55504
|
+
const UrlOpen = tt(Url$1, OPEN); // URL followed by open bracket
|
|
55505
|
+
|
|
55506
|
+
// Continue not accepting for open brackets
|
|
55507
|
+
tt(UrlNonaccept, OPEN, UrlOpen);
|
|
55508
|
+
|
|
55509
|
+
// Closing bracket component. This character WILL be included in the URL
|
|
55510
|
+
tt(UrlOpen, CLOSE, Url$1);
|
|
55312
55511
|
|
|
55313
|
-
|
|
55314
|
-
|
|
55315
|
-
|
|
55316
|
-
|
|
55317
|
-
|
|
55318
|
-
|
|
55319
|
-
|
|
55320
|
-
|
|
55321
|
-
|
|
55322
|
-
|
|
55323
|
-
|
|
55324
|
-
|
|
55325
|
-
|
|
55326
|
-
|
|
55327
|
-
|
|
55328
|
-
|
|
55329
|
-
|
|
55330
|
-
|
|
55331
|
-
// URL that beings with an opening bracket, followed by a symbols.
|
|
55332
|
-
// Note that the final state can still be `UrlOpenbrace` (if the URL only
|
|
55333
|
-
// has a single opening bracket for some reason).
|
|
55334
|
-
const UrlOpenbraceQ = makeState(Url); // URL followed by { and some symbols that the URL can end it
|
|
55335
|
-
const UrlOpenbracketQ = makeState(Url); // URL followed by [ and some symbols that the URL can end it
|
|
55336
|
-
const UrlOpenanglebracketQ = makeState(Url); // URL followed by < and some symbols that the URL can end it
|
|
55337
|
-
const UrlOpenparenQ = makeState(Url); // URL followed by ( and some symbols that the URL can end it
|
|
55338
|
-
ta(UrlOpenbrace, qsAccepting, UrlOpenbraceQ);
|
|
55339
|
-
ta(UrlOpenbracket, qsAccepting, UrlOpenbracketQ);
|
|
55340
|
-
ta(UrlOpenanglebracket, qsAccepting, UrlOpenanglebracketQ);
|
|
55341
|
-
ta(UrlOpenparen, qsAccepting, UrlOpenparenQ);
|
|
55342
|
-
const UrlOpenbraceSyms = makeState(); // UrlOpenbrace followed by some symbols it cannot end it
|
|
55343
|
-
const UrlOpenbracketSyms = makeState(); // UrlOpenbracketQ followed by some symbols it cannot end it
|
|
55344
|
-
const UrlOpenanglebracketSyms = makeState(); // UrlOpenanglebracketQ followed by some symbols it cannot end it
|
|
55345
|
-
const UrlOpenparenSyms = makeState(); // UrlOpenparenQ followed by some symbols it cannot end it
|
|
55346
|
-
ta(UrlOpenbrace, qsNonAccepting);
|
|
55347
|
-
ta(UrlOpenbracket, qsNonAccepting);
|
|
55348
|
-
ta(UrlOpenanglebracket, qsNonAccepting);
|
|
55349
|
-
ta(UrlOpenparen, qsNonAccepting);
|
|
55350
|
-
|
|
55351
|
-
// URL that begins with an opening bracket, followed by some symbols
|
|
55352
|
-
ta(UrlOpenbraceQ, qsAccepting, UrlOpenbraceQ);
|
|
55353
|
-
ta(UrlOpenbracketQ, qsAccepting, UrlOpenbracketQ);
|
|
55354
|
-
ta(UrlOpenanglebracketQ, qsAccepting, UrlOpenanglebracketQ);
|
|
55355
|
-
ta(UrlOpenparenQ, qsAccepting, UrlOpenparenQ);
|
|
55356
|
-
ta(UrlOpenbraceQ, qsNonAccepting, UrlOpenbraceQ);
|
|
55357
|
-
ta(UrlOpenbracketQ, qsNonAccepting, UrlOpenbracketQ);
|
|
55358
|
-
ta(UrlOpenanglebracketQ, qsNonAccepting, UrlOpenanglebracketQ);
|
|
55359
|
-
ta(UrlOpenparenQ, qsNonAccepting, UrlOpenparenQ);
|
|
55360
|
-
ta(UrlOpenbraceSyms, qsAccepting, UrlOpenbraceSyms);
|
|
55361
|
-
ta(UrlOpenbracketSyms, qsAccepting, UrlOpenbracketQ);
|
|
55362
|
-
ta(UrlOpenanglebracketSyms, qsAccepting, UrlOpenanglebracketQ);
|
|
55363
|
-
ta(UrlOpenparenSyms, qsAccepting, UrlOpenparenQ);
|
|
55364
|
-
ta(UrlOpenbraceSyms, qsNonAccepting, UrlOpenbraceSyms);
|
|
55365
|
-
ta(UrlOpenbracketSyms, qsNonAccepting, UrlOpenbracketSyms);
|
|
55366
|
-
ta(UrlOpenanglebracketSyms, qsNonAccepting, UrlOpenanglebracketSyms);
|
|
55367
|
-
ta(UrlOpenparenSyms, qsNonAccepting, UrlOpenparenSyms);
|
|
55368
|
-
|
|
55369
|
-
// Close brace/bracket to become regular URL
|
|
55370
|
-
tt(UrlOpenbracketQ, CLOSEBRACKET, Url$1);
|
|
55371
|
-
tt(UrlOpenanglebracketQ, CLOSEANGLEBRACKET, Url$1);
|
|
55372
|
-
tt(UrlOpenparenQ, CLOSEPAREN, Url$1);
|
|
55373
|
-
tt(UrlOpenbraceQ, CLOSEBRACE, Url$1);
|
|
55374
|
-
tt(UrlOpenbracketSyms, CLOSEBRACKET, Url$1);
|
|
55375
|
-
tt(UrlOpenanglebracketSyms, CLOSEANGLEBRACKET, Url$1);
|
|
55376
|
-
tt(UrlOpenparenSyms, CLOSEPAREN, Url$1);
|
|
55377
|
-
tt(UrlOpenbraceSyms, CLOSEPAREN, Url$1);
|
|
55512
|
+
// URL that beings with an opening bracket, followed by a symbols.
|
|
55513
|
+
// Note that the final state can still be `UrlOpen` (if the URL has a
|
|
55514
|
+
// single opening bracket for some reason).
|
|
55515
|
+
const UrlOpenQ = makeState(Url);
|
|
55516
|
+
ta(UrlOpen, qsAccepting, UrlOpenQ);
|
|
55517
|
+
const UrlOpenSyms = makeState(); // UrlOpen followed by some symbols it cannot end it
|
|
55518
|
+
ta(UrlOpen, qsNonAccepting);
|
|
55519
|
+
|
|
55520
|
+
// URL that begins with an opening bracket, followed by some symbols
|
|
55521
|
+
ta(UrlOpenQ, qsAccepting, UrlOpenQ);
|
|
55522
|
+
ta(UrlOpenQ, qsNonAccepting, UrlOpenSyms);
|
|
55523
|
+
ta(UrlOpenSyms, qsAccepting, UrlOpenQ);
|
|
55524
|
+
ta(UrlOpenSyms, qsNonAccepting, UrlOpenSyms);
|
|
55525
|
+
|
|
55526
|
+
// Close brace/bracket to become regular URL
|
|
55527
|
+
tt(UrlOpenQ, CLOSE, Url$1);
|
|
55528
|
+
tt(UrlOpenSyms, CLOSE, Url$1);
|
|
55529
|
+
}
|
|
55378
55530
|
tt(Start, LOCALHOST, DomainDotTld); // localhost is a valid URL state
|
|
55379
55531
|
tt(Start, NL$1, Nl); // single new line
|
|
55380
55532
|
|
|
@@ -55541,7 +55693,10 @@ img.ProseMirror-separator {
|
|
|
55541
55693
|
warn(`linkifyjs: already initialized - will not register custom scheme "${scheme}" ${warnAdvice}`);
|
|
55542
55694
|
}
|
|
55543
55695
|
if (!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(scheme)) {
|
|
55544
|
-
throw new Error(
|
|
55696
|
+
throw new Error(`linkifyjs: incorrect scheme format.
|
|
55697
|
+
1. Must only contain digits, lowercase ASCII letters or "-"
|
|
55698
|
+
2. Cannot start or end with "-"
|
|
55699
|
+
3. "-" cannot repeat`);
|
|
55545
55700
|
}
|
|
55546
55701
|
INIT.customSchemes.push([scheme, optionalSlashSlash]);
|
|
55547
55702
|
}
|
|
@@ -55589,7 +55744,7 @@ img.ProseMirror-separator {
|
|
|
55589
55744
|
* links to find, e.g., 'url' or 'email'
|
|
55590
55745
|
* @param {Opts} [opts] formatting options for final output. Cannot be specified
|
|
55591
55746
|
* if opts already provided in `type` argument
|
|
55592
|
-
|
|
55747
|
+
*/
|
|
55593
55748
|
function find$1(str, type, opts) {
|
|
55594
55749
|
if (type === void 0) {
|
|
55595
55750
|
type = null;
|
|
@@ -55609,7 +55764,7 @@ img.ProseMirror-separator {
|
|
|
55609
55764
|
const filtered = [];
|
|
55610
55765
|
for (let i = 0; i < tokens.length; i++) {
|
|
55611
55766
|
const token = tokens[i];
|
|
55612
|
-
if (token.isLink && (!type || token.t === type)) {
|
|
55767
|
+
if (token.isLink && (!type || token.t === type) && options.check(token)) {
|
|
55613
55768
|
filtered.push(token.toFormattedObject(options));
|
|
55614
55769
|
}
|
|
55615
55770
|
}
|
|
@@ -56235,7 +56390,7 @@ img.ProseMirror-separator {
|
|
|
56235
56390
|
}
|
|
56236
56391
|
|
|
56237
56392
|
const SuggestionPluginKey = new PluginKey('suggestion');
|
|
56238
|
-
function Suggestion({ pluginKey = SuggestionPluginKey, editor, char = '@', allowSpaces = false, allowedPrefixes = [' '], startOfLine = false, decorationTag = 'span', decorationClass = 'suggestion', command = () => null, items = () => [], render = () => ({}), allow = () => true, }) {
|
|
56393
|
+
function Suggestion({ pluginKey = SuggestionPluginKey, editor, char = '@', allowSpaces = false, allowedPrefixes = [' '], startOfLine = false, decorationTag = 'span', decorationClass = 'suggestion', command = () => null, items = () => [], render = () => ({}), allow = () => true, findSuggestionMatch: findSuggestionMatch$1 = findSuggestionMatch, }) {
|
|
56239
56394
|
let props;
|
|
56240
56395
|
const renderer = render === null || render === void 0 ? void 0 : render();
|
|
56241
56396
|
const plugin = new Plugin({
|
|
@@ -56349,7 +56504,7 @@ img.ProseMirror-separator {
|
|
|
56349
56504
|
next.active = false;
|
|
56350
56505
|
}
|
|
56351
56506
|
// Try to match against where our cursor currently is
|
|
56352
|
-
const match = findSuggestionMatch({
|
|
56507
|
+
const match = findSuggestionMatch$1({
|
|
56353
56508
|
char,
|
|
56354
56509
|
allowSpaces,
|
|
56355
56510
|
allowedPrefixes,
|
|
@@ -58889,7 +59044,7 @@ img.ProseMirror-separator {
|
|
|
58889
59044
|
}
|
|
58890
59045
|
return 0;
|
|
58891
59046
|
};
|
|
58892
|
-
header.getResizeHandler =
|
|
59047
|
+
header.getResizeHandler = _contextDocument => {
|
|
58893
59048
|
const column = table.getColumn(header.column.id);
|
|
58894
59049
|
const canResize = column == null ? void 0 : column.getCanResize();
|
|
58895
59050
|
return e => {
|
|
@@ -58946,11 +59101,12 @@ img.ProseMirror-separator {
|
|
|
58946
59101
|
columnSizingStart: []
|
|
58947
59102
|
}));
|
|
58948
59103
|
};
|
|
59104
|
+
const contextDocument = _contextDocument || typeof document !== 'undefined' ? document : null;
|
|
58949
59105
|
const mouseEvents = {
|
|
58950
59106
|
moveHandler: e => onMove(e.clientX),
|
|
58951
59107
|
upHandler: e => {
|
|
58952
|
-
|
|
58953
|
-
|
|
59108
|
+
contextDocument == null || contextDocument.removeEventListener('mousemove', mouseEvents.moveHandler);
|
|
59109
|
+
contextDocument == null || contextDocument.removeEventListener('mouseup', mouseEvents.upHandler);
|
|
58954
59110
|
onEnd(e.clientX);
|
|
58955
59111
|
}
|
|
58956
59112
|
};
|
|
@@ -58965,8 +59121,8 @@ img.ProseMirror-separator {
|
|
|
58965
59121
|
},
|
|
58966
59122
|
upHandler: e => {
|
|
58967
59123
|
var _e$touches$;
|
|
58968
|
-
|
|
58969
|
-
|
|
59124
|
+
contextDocument == null || contextDocument.removeEventListener('touchmove', touchEvents.moveHandler);
|
|
59125
|
+
contextDocument == null || contextDocument.removeEventListener('touchend', touchEvents.upHandler);
|
|
58970
59126
|
if (e.cancelable) {
|
|
58971
59127
|
e.preventDefault();
|
|
58972
59128
|
e.stopPropagation();
|
|
@@ -58978,11 +59134,11 @@ img.ProseMirror-separator {
|
|
|
58978
59134
|
passive: false
|
|
58979
59135
|
} : false;
|
|
58980
59136
|
if (isTouchStartEvent(e)) {
|
|
58981
|
-
|
|
58982
|
-
|
|
59137
|
+
contextDocument == null || contextDocument.addEventListener('touchmove', touchEvents.moveHandler, passiveIfSupported);
|
|
59138
|
+
contextDocument == null || contextDocument.addEventListener('touchend', touchEvents.upHandler, passiveIfSupported);
|
|
58983
59139
|
} else {
|
|
58984
|
-
|
|
58985
|
-
|
|
59140
|
+
contextDocument == null || contextDocument.addEventListener('mousemove', mouseEvents.moveHandler, passiveIfSupported);
|
|
59141
|
+
contextDocument == null || contextDocument.addEventListener('mouseup', mouseEvents.upHandler, passiveIfSupported);
|
|
58986
59142
|
}
|
|
58987
59143
|
table.setColumnSizingInfo(old => ({
|
|
58988
59144
|
...old,
|
|
@@ -61638,7 +61794,8 @@ img.ProseMirror-separator {
|
|
|
61638
61794
|
|
|
61639
61795
|
const TableRecordDelayedHierarchyState = {
|
|
61640
61796
|
none: undefined,
|
|
61641
|
-
canLoadChildren: 'canLoadChildren'
|
|
61797
|
+
canLoadChildren: 'canLoadChildren',
|
|
61798
|
+
loadingChildren: 'loadingChildren'
|
|
61642
61799
|
};
|
|
61643
61800
|
/**
|
|
61644
61801
|
* The possible directions a table column can be sorted in.
|
|
@@ -62482,6 +62639,21 @@ img.ProseMirror-separator {
|
|
|
62482
62639
|
}
|
|
62483
62640
|
|
|
62484
62641
|
.expand-collapse-button {
|
|
62642
|
+
flex: 0 0 auto;
|
|
62643
|
+
padding-left: calc(
|
|
62644
|
+
${mediumPadding} + (var(--ni-private-table-row-indent-level) - 1) *
|
|
62645
|
+
${controlHeight}
|
|
62646
|
+
);
|
|
62647
|
+
}
|
|
62648
|
+
|
|
62649
|
+
.spinner-container {
|
|
62650
|
+
flex: 0 0 auto;
|
|
62651
|
+
width: ${controlSlimHeight};
|
|
62652
|
+
height: ${controlSlimHeight};
|
|
62653
|
+
align-self: center;
|
|
62654
|
+
display: flex;
|
|
62655
|
+
align-items: center;
|
|
62656
|
+
justify-content: center;
|
|
62485
62657
|
padding-left: calc(
|
|
62486
62658
|
${mediumPadding} + (var(--ni-private-table-row-indent-level) - 1) *
|
|
62487
62659
|
${controlHeight}
|
|
@@ -62489,6 +62661,7 @@ img.ProseMirror-separator {
|
|
|
62489
62661
|
}
|
|
62490
62662
|
|
|
62491
62663
|
.row-operations-container {
|
|
62664
|
+
flex: 0 0 auto;
|
|
62492
62665
|
display: flex;
|
|
62493
62666
|
}
|
|
62494
62667
|
|
|
@@ -62685,17 +62858,29 @@ img.ProseMirror-separator {
|
|
|
62685
62858
|
`)}
|
|
62686
62859
|
<span class="row-front-spacer ${x => (x.isTopLevelParentRow ? 'top-level-parent' : '')}"></span>
|
|
62687
62860
|
${when(x => x.isParentRow, html `
|
|
62688
|
-
|
|
62689
|
-
|
|
62690
|
-
|
|
62691
|
-
|
|
62692
|
-
|
|
62693
|
-
|
|
62694
|
-
|
|
62695
|
-
|
|
62696
|
-
|
|
62697
|
-
|
|
62698
|
-
|
|
62861
|
+
${when(x => x.loading, html `
|
|
62862
|
+
<span class="spinner-container">
|
|
62863
|
+
<${spinnerTag}
|
|
62864
|
+
appearance="${SpinnerAppearance.accent}"
|
|
62865
|
+
aria-label="${x => tableRowLoadingLabel.getValueFor(x)}"
|
|
62866
|
+
title="${x => tableRowLoadingLabel.getValueFor(x)}"
|
|
62867
|
+
>
|
|
62868
|
+
<${spinnerTag}>
|
|
62869
|
+
</span>
|
|
62870
|
+
`)}
|
|
62871
|
+
${when(x => !x.loading, html `
|
|
62872
|
+
<${buttonTag}
|
|
62873
|
+
appearance="${ButtonAppearance.ghost}"
|
|
62874
|
+
content-hidden
|
|
62875
|
+
class="expand-collapse-button"
|
|
62876
|
+
tabindex="-1"
|
|
62877
|
+
@click="${(x, c) => x.onRowExpandToggle(c.event)}"
|
|
62878
|
+
title="${x => (x.expanded ? tableRowCollapseLabel.getValueFor(x) : tableRowExpandLabel.getValueFor(x))}"
|
|
62879
|
+
aria-hidden="true"
|
|
62880
|
+
>
|
|
62881
|
+
<${iconArrowExpanderRightTag} ${ref('expandIcon')} slot="start" class="expander-icon ${x => x.animationClass}"></${iconArrowExpanderRightTag}>
|
|
62882
|
+
</${buttonTag}>
|
|
62883
|
+
`)}
|
|
62699
62884
|
`)}
|
|
62700
62885
|
|
|
62701
62886
|
<span ${ref('cellContainer')}
|
|
@@ -62750,6 +62935,7 @@ img.ProseMirror-separator {
|
|
|
62750
62935
|
this.isParentRow = false;
|
|
62751
62936
|
this.menuOpen = false;
|
|
62752
62937
|
this.rowOperationGridCellHidden = false;
|
|
62938
|
+
this.loading = false;
|
|
62753
62939
|
/**
|
|
62754
62940
|
* @internal
|
|
62755
62941
|
* An array that parallels the `columns` array and contains the indent
|
|
@@ -62954,6 +63140,9 @@ img.ProseMirror-separator {
|
|
|
62954
63140
|
__decorate$1([
|
|
62955
63141
|
attr({ attribute: 'row-operation-grid-cell-hidden', mode: 'boolean' })
|
|
62956
63142
|
], TableRow.prototype, "rowOperationGridCellHidden", void 0);
|
|
63143
|
+
__decorate$1([
|
|
63144
|
+
attr({ mode: 'boolean' })
|
|
63145
|
+
], TableRow.prototype, "loading", void 0);
|
|
62957
63146
|
__decorate$1([
|
|
62958
63147
|
observable
|
|
62959
63148
|
], TableRow.prototype, "cellIndentLevels", void 0);
|
|
@@ -63325,6 +63514,7 @@ img.ProseMirror-separator {
|
|
|
63325
63514
|
:isParentRow="${(x, c) => c.parent.tableData[x.index]?.isParentRow}"
|
|
63326
63515
|
:nestingLevel="${(x, c) => c.parent.tableData[x.index]?.nestingLevel}"
|
|
63327
63516
|
?row-operation-grid-cell-hidden="${(_, c) => !c.parent.showRowOperationColumn}"
|
|
63517
|
+
?loading="${(x, c) => c.parent.tableData[x.index]?.isLoadingChildren}"
|
|
63328
63518
|
@click="${(x, c) => c.parent.onRowClick(x.index, c.event)}"
|
|
63329
63519
|
@row-selection-toggle="${(x, c) => c.parent.onRowSelectionToggle(x.index, c.event)}"
|
|
63330
63520
|
@row-action-menu-beforetoggle="${(x, c) => c.parent.onRowActionMenuBeforeToggle(x.index, c.event)}"
|
|
@@ -63703,6 +63893,9 @@ img.ProseMirror-separator {
|
|
|
63703
63893
|
}
|
|
63704
63894
|
}
|
|
63705
63895
|
return furthestMeasurements.size === _this.options.lanes ? Array.from(furthestMeasurements.values()).sort(function (a, b) {
|
|
63896
|
+
if (a.end === b.end) {
|
|
63897
|
+
return a.index - b.index;
|
|
63898
|
+
}
|
|
63706
63899
|
return a.end - b.end;
|
|
63707
63900
|
})[0] : undefined;
|
|
63708
63901
|
};
|
|
@@ -63804,7 +63997,7 @@ img.ProseMirror-separator {
|
|
|
63804
63997
|
var itemSize = (_this$itemSizeCache$g = _this.itemSizeCache.get(item.key)) != null ? _this$itemSizeCache$g : item.size;
|
|
63805
63998
|
var delta = size - itemSize;
|
|
63806
63999
|
if (delta !== 0) {
|
|
63807
|
-
if (item.start < _this.scrollOffset) {
|
|
64000
|
+
if (item.start < _this.scrollOffset + _this.scrollAdjustments) {
|
|
63808
64001
|
if (_this.options.debug) {
|
|
63809
64002
|
console.info('correction', delta);
|
|
63810
64003
|
}
|
|
@@ -63962,8 +64155,19 @@ img.ProseMirror-separator {
|
|
|
63962
64155
|
});
|
|
63963
64156
|
};
|
|
63964
64157
|
this.getTotalSize = function () {
|
|
63965
|
-
var _this
|
|
63966
|
-
|
|
64158
|
+
var measurements = _this.getMeasurements();
|
|
64159
|
+
var end;
|
|
64160
|
+
// If there are no measurements, set the end to paddingStart
|
|
64161
|
+
if (measurements.length === 0) {
|
|
64162
|
+
end = _this.options.paddingStart;
|
|
64163
|
+
} else {
|
|
64164
|
+
var _measurements$end, _measurements;
|
|
64165
|
+
// If lanes is 1, use the last measurement's end, otherwise find the maximum end value among all measurements
|
|
64166
|
+
end = _this.options.lanes === 1 ? (_measurements$end = (_measurements = measurements[measurements.length - 1]) == null ? void 0 : _measurements.end) != null ? _measurements$end : 0 : Math.max.apply(Math, measurements.slice(-_this.options.lanes).map(function (m) {
|
|
64167
|
+
return m.end;
|
|
64168
|
+
}));
|
|
64169
|
+
}
|
|
64170
|
+
return end - _this.options.scrollMargin + _this.options.paddingEnd;
|
|
63967
64171
|
};
|
|
63968
64172
|
this._scrollToOffset = function (offset, _ref8) {
|
|
63969
64173
|
var adjustments = _ref8.adjustments,
|
|
@@ -65038,12 +65242,19 @@ img.ProseMirror-separator {
|
|
|
65038
65242
|
setHierarchyEnabled(isHierarchyEnabled) {
|
|
65039
65243
|
this.isHierarchyEnabled = isHierarchyEnabled;
|
|
65040
65244
|
}
|
|
65041
|
-
|
|
65245
|
+
isLoadingChildren(id) {
|
|
65042
65246
|
if (!this.isHierarchyEnabled) {
|
|
65043
65247
|
return false;
|
|
65044
65248
|
}
|
|
65045
65249
|
return (this.hierarchyOptions.get(id)?.delayedHierarchyState
|
|
65046
|
-
=== TableRecordDelayedHierarchyState.
|
|
65250
|
+
=== TableRecordDelayedHierarchyState.loadingChildren ?? false);
|
|
65251
|
+
}
|
|
65252
|
+
canLoadDelayedChildren(id) {
|
|
65253
|
+
if (!this.isHierarchyEnabled) {
|
|
65254
|
+
return false;
|
|
65255
|
+
}
|
|
65256
|
+
const delayedHierarchyState = this.hierarchyOptions.get(id)?.delayedHierarchyState;
|
|
65257
|
+
return delayedHierarchyState !== TableRecordDelayedHierarchyState.none;
|
|
65047
65258
|
}
|
|
65048
65259
|
}
|
|
65049
65260
|
|
|
@@ -65666,7 +65877,8 @@ img.ProseMirror-separator {
|
|
|
65666
65877
|
: row.depth,
|
|
65667
65878
|
isParentRow: isParent,
|
|
65668
65879
|
immediateChildCount: row.subRows.length,
|
|
65669
|
-
groupColumn: this.getGroupRowColumn(row)
|
|
65880
|
+
groupColumn: this.getGroupRowColumn(row),
|
|
65881
|
+
isLoadingChildren: this.expansionManager.isLoadingChildren(row.id)
|
|
65670
65882
|
};
|
|
65671
65883
|
hasDataHierarchy = hasDataHierarchy || isParent;
|
|
65672
65884
|
return rowState;
|