@ecodev/natural 40.0.0 → 40.1.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.
@@ -0,0 +1,31 @@
1
+ import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
2
+ import { ControlValueAccessor, NgControl } from '@angular/forms';
3
+ /**
4
+ * Prosemirror component
5
+ * Usage :
6
+ * <natural-editor [(ngModel)]="htmlString"></natural-editor>
7
+ */
8
+ export declare class NaturalEditorComponent implements OnInit, OnDestroy, ControlValueAccessor {
9
+ readonly ngControl: NgControl;
10
+ private readonly document;
11
+ private view;
12
+ private editor;
13
+ readonly contentChange: EventEmitter<string>;
14
+ /**
15
+ * Interface with ControlValueAccessor
16
+ * Notifies parent model / form controller
17
+ */
18
+ private onChange?;
19
+ /**
20
+ * HTML string
21
+ */
22
+ private content;
23
+ constructor(ngControl: NgControl, document: Document);
24
+ ngOnInit(): void;
25
+ writeValue(val: string | undefined): void;
26
+ private createState;
27
+ registerOnChange(fn: any): void;
28
+ registerOnTouched(fn: any): void;
29
+ setDisabledState(isDisabled: boolean): void;
30
+ ngOnDestroy(): void;
31
+ }
@@ -0,0 +1,2 @@
1
+ export declare class NaturalEditorModule {
2
+ }
@@ -0,0 +1,2 @@
1
+ export * from './editor.component';
2
+ export * from './editor.module';
@@ -0,0 +1,2 @@
1
+ import { Schema } from 'prosemirror-model';
2
+ export declare const schema: Schema<any, "link" | "em" | "strong">;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ecodev/natural",
3
- "version": "40.0.0",
3
+ "version": "40.1.0",
4
4
  "license": "MIT",
5
5
  "repository": "github:Ecodev/natural",
6
6
  "sideEffects": false,
@@ -15,6 +15,11 @@
15
15
  "@angular/material": "^12.0.1",
16
16
  "apollo-angular": "^2.6.0",
17
17
  "lodash-es": "^4.17.21",
18
+ "prosemirror-example-setup": "^1.1.2",
19
+ "prosemirror-keymap": "^1.1.4",
20
+ "prosemirror-schema-basic": "^1.1.2",
21
+ "prosemirror-state": "^1.3.4",
22
+ "prosemirror-view": "^1.20.2",
18
23
  "rxjs": "^7.4.0"
19
24
  },
20
25
  "main": "bundles/ecodev-natural.umd.js",
package/public-api.d.ts CHANGED
@@ -37,4 +37,5 @@ export * from './lib/modules/table-button/public-api';
37
37
  export * from './lib/modules/dialog-trigger/public-api';
38
38
  export * from './lib/modules/avatar/public-api';
39
39
  export * from './lib/modules/matomo/public-api';
40
+ export * from './lib/modules/editor/public-api';
40
41
  export * from './lib/directives/http-prefix.directive';