@worktile/theia 20.1.0-next.2 → 20.1.0-next.3
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/fesm2022/worktile-theia.mjs +29 -34
- package/fesm2022/worktile-theia.mjs.map +1 -1
- package/index.d.ts +0 -1
- package/package.json +2 -2
|
@@ -13327,7 +13327,7 @@ const createBlockCardPlugin = createPluginFactory({
|
|
|
13327
13327
|
});
|
|
13328
13328
|
|
|
13329
13329
|
const withInternalCommon = (editor) => {
|
|
13330
|
-
const { globalMousedown, onKeydown } = editor;
|
|
13330
|
+
const { globalMousedown, onKeydown, selectAll } = editor;
|
|
13331
13331
|
editor.globalMousedown = (event) => {
|
|
13332
13332
|
const target = event.target;
|
|
13333
13333
|
if (isColorIndicator(target)) {
|
|
@@ -13350,6 +13350,34 @@ const withInternalCommon = (editor) => {
|
|
|
13350
13350
|
}
|
|
13351
13351
|
onKeydown(event);
|
|
13352
13352
|
};
|
|
13353
|
+
editor.selectAll = () => {
|
|
13354
|
+
let node = null;
|
|
13355
|
+
if (!editor.selection) {
|
|
13356
|
+
setEndSelection(editor);
|
|
13357
|
+
}
|
|
13358
|
+
const [start, end] = Range.edges(editor.selection);
|
|
13359
|
+
const selectionRange = Editor.range(editor, start, end);
|
|
13360
|
+
const containerBlocks = getContainerBlocks(editor);
|
|
13361
|
+
for (let i = 0; i < containerBlocks.length; i++) {
|
|
13362
|
+
[node] = getNodesByType(editor, containerBlocks[i]);
|
|
13363
|
+
if (node) {
|
|
13364
|
+
const [, path] = node;
|
|
13365
|
+
const isStartParent = Path.equals(path, start.path.slice(0, path.length));
|
|
13366
|
+
const isEndParent = Path.equals(path, end.path.slice(0, path.length));
|
|
13367
|
+
if (isStartParent && isEndParent) {
|
|
13368
|
+
const nodeRange = Editor.range(editor, path);
|
|
13369
|
+
if (!Range.equals(nodeRange, selectionRange)) {
|
|
13370
|
+
Transforms.select(editor, nodeRange);
|
|
13371
|
+
break;
|
|
13372
|
+
}
|
|
13373
|
+
node = null;
|
|
13374
|
+
}
|
|
13375
|
+
}
|
|
13376
|
+
}
|
|
13377
|
+
if (!node) {
|
|
13378
|
+
Transforms.select(editor, []);
|
|
13379
|
+
}
|
|
13380
|
+
};
|
|
13353
13381
|
return editor;
|
|
13354
13382
|
};
|
|
13355
13383
|
const createCommonPlugin = (locale) => createPluginFactory({
|
|
@@ -18250,9 +18278,6 @@ class TheEditorComponent {
|
|
|
18250
18278
|
event.preventDefault();
|
|
18251
18279
|
return;
|
|
18252
18280
|
}
|
|
18253
|
-
if (isKeyHotkey('mod+a', event) && !event.defaultPrevented) {
|
|
18254
|
-
this.handleSelectAll(event);
|
|
18255
|
-
}
|
|
18256
18281
|
};
|
|
18257
18282
|
this.onClick = (event) => {
|
|
18258
18283
|
AngularEditor.onClick(this.editor, event);
|
|
@@ -18558,36 +18583,6 @@ class TheEditorComponent {
|
|
|
18558
18583
|
mousedown(event) {
|
|
18559
18584
|
this.editor.mousedown(event);
|
|
18560
18585
|
}
|
|
18561
|
-
handleSelectAll(event) {
|
|
18562
|
-
let node = null;
|
|
18563
|
-
if (!this.editor.selection) {
|
|
18564
|
-
setEndSelection(this.editor);
|
|
18565
|
-
}
|
|
18566
|
-
const [start, end] = Range.edges(this.editor.selection);
|
|
18567
|
-
const selectionRange = Editor.range(this.editor, start, end);
|
|
18568
|
-
const containerBlocks = getContainerBlocks(this.editor);
|
|
18569
|
-
for (let i = 0; i < containerBlocks.length; i++) {
|
|
18570
|
-
[node] = getNodesByType(this.editor, containerBlocks[i]);
|
|
18571
|
-
if (node) {
|
|
18572
|
-
const [, path] = node;
|
|
18573
|
-
const isStartParent = Path.equals(path, start.path.slice(0, path.length));
|
|
18574
|
-
const isEndParent = Path.equals(path, end.path.slice(0, path.length));
|
|
18575
|
-
if (isStartParent && isEndParent) {
|
|
18576
|
-
const nodeRange = Editor.range(this.editor, path);
|
|
18577
|
-
if (!Range.equals(nodeRange, selectionRange)) {
|
|
18578
|
-
Transforms.select(this.editor, nodeRange);
|
|
18579
|
-
break;
|
|
18580
|
-
}
|
|
18581
|
-
node = null;
|
|
18582
|
-
}
|
|
18583
|
-
}
|
|
18584
|
-
}
|
|
18585
|
-
if (!node) {
|
|
18586
|
-
Transforms.select(this.editor, []);
|
|
18587
|
-
}
|
|
18588
|
-
event.preventDefault();
|
|
18589
|
-
return;
|
|
18590
|
-
}
|
|
18591
18586
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: TheEditorComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.DestroyRef }, { token: i0.ElementRef }, { token: i0.Injector }, { token: i0.NgZone }, { token: i0.ViewContainerRef }, { token: TheContextService }, { token: i2$5.ThyIconRegistry }, { token: THE_PRESET_CONFIG_TOKEN, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
18592
18587
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.14", type: TheEditorComponent, isStandalone: true, selector: "the-editor, theEditor", inputs: { theOptions: "theOptions", thePlugins: "thePlugins", theGlobalToolbar: "theGlobalToolbar", theDecorate: "theDecorate", theOnError: "theOnError" }, outputs: { theOnSave: "theOnSave", theOnDOMEvent: "theOnDOMEvent", theEditorCreated: "theEditorCreated", theUploadingStatus: "theUploadingStatus" }, host: { properties: { "class.the-editor-readonly": "editor.options?.readonly", "class.the-mobile-editor": "isMobileMode" }, classAttribute: "the-editor" }, providers: [
|
|
18593
18588
|
TheContextService,
|