@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.
- package/bundles/ecodev-natural.umd.js +142 -4
- package/bundles/ecodev-natural.umd.js.map +1 -1
- package/ecodev-natural.metadata.json +1 -1
- package/esm2015/lib/modules/editor/editor.component.js +108 -0
- package/esm2015/lib/modules/editor/editor.module.js +13 -0
- package/esm2015/lib/modules/editor/public-api.js +6 -0
- package/esm2015/lib/modules/editor/schema.js +21 -0
- package/esm2015/public-api.js +2 -1
- package/fesm2015/ecodev-natural.js +138 -1
- package/fesm2015/ecodev-natural.js.map +1 -1
- package/lib/modules/editor/editor.component.d.ts +31 -0
- package/lib/modules/editor/editor.module.d.ts +2 -0
- package/lib/modules/editor/public-api.d.ts +2 -0
- package/lib/modules/editor/schema.d.ts +2 -0
- package/package.json +6 -1
- package/public-api.d.ts +1 -0
|
@@ -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
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ecodev/natural",
|
|
3
|
-
"version": "40.
|
|
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';
|