@ecodev/natural-editor 47.3.2 → 48.0.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.
@@ -1,4 +1,4 @@
1
- import { MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog';
1
+ import { MatDialogRef } from '@angular/material/dialog';
2
2
  import { FormControl, FormGroup } from '@angular/forms';
3
3
  import * as i0 from "@angular/core";
4
4
  export interface ClassDialogData {
@@ -1,4 +1,4 @@
1
- import { MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog';
1
+ import { MatDialogRef } from '@angular/material/dialog';
2
2
  import { FormControl, FormGroup } from '@angular/forms';
3
3
  import * as i0 from "@angular/core";
4
4
  export interface ColorDialogData {
@@ -1,6 +1,6 @@
1
1
  import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
2
2
  import { ControlValueAccessor, NgControl } from '@angular/forms';
3
- import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog';
3
+ import { MatDialog } from '@angular/material/dialog';
4
4
  import { ImagePlugin, ImageUploader } from '../utils/image';
5
5
  import { Key, MenuItems } from '../utils/menu';
6
6
  import * as i0 from "@angular/core";
@@ -6,20 +6,20 @@ import * as i4 from "./link-dialog/link-dialog.component";
6
6
  import * as i5 from "./editor/editor.component";
7
7
  import * as i6 from "./custom-css/custom-css.directive";
8
8
  import * as i7 from "@angular/common";
9
- import * as i8 from "@angular/material/legacy-button";
9
+ import * as i8 from "@angular/material/button";
10
10
  import * as i9 from "@angular/material/button-toggle";
11
- import * as i10 from "@angular/material/legacy-dialog";
11
+ import * as i10 from "@angular/material/dialog";
12
12
  import * as i11 from "@angular/material/divider";
13
- import * as i12 from "@angular/material/legacy-form-field";
13
+ import * as i12 from "@angular/material/form-field";
14
14
  import * as i13 from "@angular/material/icon";
15
- import * as i14 from "@angular/material/legacy-input";
16
- import * as i15 from "@angular/material/legacy-menu";
15
+ import * as i14 from "@angular/material/input";
16
+ import * as i15 from "@angular/material/menu";
17
17
  import * as i16 from "@angular/material/toolbar";
18
- import * as i17 from "@angular/material/legacy-tooltip";
18
+ import * as i17 from "@angular/material/tooltip";
19
19
  import * as i18 from "@ecodev/natural";
20
20
  import * as i19 from "@angular/forms";
21
21
  export declare class NaturalEditorModule {
22
22
  static ɵfac: i0.ɵɵFactoryDeclaration<NaturalEditorModule, never>;
23
- static ɵmod: i0.ɵɵNgModuleDeclaration<NaturalEditorModule, [typeof i1.ClassDialogComponent, typeof i2.ColorDialogComponent, typeof i3.IdDialogComponent, typeof i4.LinkDialogComponent, typeof i5.NaturalEditorComponent, typeof i6.NaturalCustomCssDirective], [typeof i7.CommonModule, typeof i8.MatLegacyButtonModule, typeof i9.MatButtonToggleModule, typeof i10.MatLegacyDialogModule, typeof i11.MatDividerModule, typeof i12.MatLegacyFormFieldModule, typeof i13.MatIconModule, typeof i14.MatLegacyInputModule, typeof i15.MatLegacyMenuModule, typeof i16.MatToolbarModule, typeof i17.MatLegacyTooltipModule, typeof i18.NaturalFileModule, typeof i18.NaturalIconModule, typeof i19.ReactiveFormsModule], [typeof i7.CommonModule, typeof i8.MatLegacyButtonModule, typeof i9.MatButtonToggleModule, typeof i10.MatLegacyDialogModule, typeof i11.MatDividerModule, typeof i12.MatLegacyFormFieldModule, typeof i13.MatIconModule, typeof i14.MatLegacyInputModule, typeof i15.MatLegacyMenuModule, typeof i16.MatToolbarModule, typeof i17.MatLegacyTooltipModule, typeof i18.NaturalFileModule, typeof i18.NaturalIconModule, typeof i19.ReactiveFormsModule, typeof i5.NaturalEditorComponent, typeof i6.NaturalCustomCssDirective]>;
23
+ static ɵmod: i0.ɵɵNgModuleDeclaration<NaturalEditorModule, [typeof i1.ClassDialogComponent, typeof i2.ColorDialogComponent, typeof i3.IdDialogComponent, typeof i4.LinkDialogComponent, typeof i5.NaturalEditorComponent, typeof i6.NaturalCustomCssDirective], [typeof i7.CommonModule, typeof i8.MatButtonModule, typeof i9.MatButtonToggleModule, typeof i10.MatDialogModule, typeof i11.MatDividerModule, typeof i12.MatFormFieldModule, typeof i13.MatIconModule, typeof i14.MatInputModule, typeof i15.MatMenuModule, typeof i16.MatToolbarModule, typeof i17.MatTooltipModule, typeof i18.NaturalFileModule, typeof i18.NaturalIconModule, typeof i19.ReactiveFormsModule], [typeof i7.CommonModule, typeof i8.MatButtonModule, typeof i9.MatButtonToggleModule, typeof i10.MatDialogModule, typeof i11.MatDividerModule, typeof i12.MatFormFieldModule, typeof i13.MatIconModule, typeof i14.MatInputModule, typeof i15.MatMenuModule, typeof i16.MatToolbarModule, typeof i17.MatTooltipModule, typeof i18.NaturalFileModule, typeof i18.NaturalIconModule, typeof i19.ReactiveFormsModule, typeof i5.NaturalEditorComponent, typeof i6.NaturalCustomCssDirective]>;
24
24
  static ɵinj: i0.ɵɵInjectorDeclaration<NaturalEditorModule>;
25
25
  }
@@ -1,4 +1,4 @@
1
- import { MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog';
1
+ import { MatDialogRef } from '@angular/material/dialog';
2
2
  import { FormControl, FormGroup } from '@angular/forms';
3
3
  import * as i0 from "@angular/core";
4
4
  export interface IdDialogData {
@@ -1,4 +1,4 @@
1
- import { MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog';
1
+ import { MatDialogRef } from '@angular/material/dialog';
2
2
  import { FormControl, FormGroup } from '@angular/forms';
3
3
  import * as i0 from "@angular/core";
4
4
  export interface LinkDialogData {
@@ -1,5 +1,5 @@
1
1
  import { Item } from './item';
2
- import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog';
2
+ import { MatDialog } from '@angular/material/dialog';
3
3
  export declare class CellBackgroundColorItem extends Item {
4
4
  constructor(dialog: MatDialog);
5
5
  }
@@ -1,5 +1,5 @@
1
1
  import { Item } from './item';
2
- import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog';
2
+ import { MatDialog } from '@angular/material/dialog';
3
3
  export declare class ClassItem extends Item {
4
4
  constructor(dialog: MatDialog, nodeTypes: string[]);
5
5
  }
@@ -1,5 +1,5 @@
1
1
  import { Item } from './item';
2
- import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog';
2
+ import { MatDialog } from '@angular/material/dialog';
3
3
  export declare class IdItem extends Item {
4
4
  constructor(dialog: MatDialog, nodeTypes: string[]);
5
5
  }
@@ -1,6 +1,6 @@
1
1
  import { Item } from './item';
2
2
  import { MarkType } from 'prosemirror-model';
3
- import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog';
3
+ import { MatDialog } from '@angular/material/dialog';
4
4
  export declare class LinkItem extends Item {
5
5
  constructor(markType: MarkType, dialog: MatDialog);
6
6
  }
@@ -1,5 +1,5 @@
1
1
  import { Schema } from 'prosemirror-model';
2
- import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog';
2
+ import { MatDialog } from '@angular/material/dialog';
3
3
  import { Item } from './items/item';
4
4
  export type Key = 'toggleStrong' | 'toggleEm' | 'toggleCode' | 'toggleLink' | 'wrapBulletList' | 'wrapOrderedList' | 'wrapBlockQuote' | 'makeParagraph' | 'makeCodeBlock' | 'makeHead1' | 'makeHead2' | 'makeHead3' | 'makeHead4' | 'makeHead5' | 'makeHead6' | 'alignLeft' | 'alignRight' | 'alignCenter' | 'alignJustify' | 'insertHorizontalRule' | 'joinUp' | 'lift' | 'selectParentNode' | 'undo' | 'redo' | 'insertTable' | 'addColumnBefore' | 'addColumnAfter' | 'deleteColumn' | 'addRowBefore' | 'addRowAfter' | 'deleteRow' | 'deleteTable' | 'mergeCells' | 'splitCell' | 'toggleHeaderColumn' | 'toggleHeaderRow' | 'toggleHeaderCell' | 'cellBackgroundColor' | 'tableClass' | 'tableId' | 'blockClass' | 'blockId';
5
5
  export type MenuItems = Partial<Record<Key, Item>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ecodev/natural-editor",
3
- "version": "47.3.2",
3
+ "version": "48.0.0",
4
4
  "license": "MIT",
5
5
  "repository": "github:Ecodev/natural",
6
6
  "sideEffects": false,
@@ -17,6 +17,17 @@
17
17
  $drawer-container-background-color: mat.get-color-from-palette($background, background);
18
18
 
19
19
  natural-editor {
20
+ // Since MDC icon buttons have round borders. We need square-ish border in the toolbar to not look too weird
21
+ .mat-mdc-icon-button,
22
+ .mat-mdc-icon-button .mat-mdc-button-persistent-ripple {
23
+ border-radius: 4px;
24
+ }
25
+
26
+ // Since MDC all buttons have fixed height. We need taller buttons to look similar to mat-button-toggle-group
27
+ button.mat-mdc-menu-trigger {
28
+ height: 50px;
29
+ }
30
+
20
31
  .menu-container {
21
32
  background-color: $drawer-container-background-color;
22
33
  }