@arsedizioni/ars-utils 22.6.86 → 22.6.89
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/arsedizioni-ars-utils-clipper.common.mjs +3158 -3344
- package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs +7616 -4772
- package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-core.date.mjs +321 -702
- package/fesm2022/arsedizioni-ars-utils-core.date.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-core.markdown.mjs +445 -590
- package/fesm2022/arsedizioni-ars-utils-core.markdown.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-core.mjs +1735 -2370
- package/fesm2022/arsedizioni-ars-utils-core.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-core.validators.mjs +1280 -1470
- package/fesm2022/arsedizioni-ars-utils-core.validators.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs +1097 -1528
- package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-support.common.mjs +198 -294
- package/fesm2022/arsedizioni-ars-utils-support.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.controls.date.mjs +115 -117
- package/fesm2022/arsedizioni-ars-utils-ui.controls.date.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.controls.mjs +1607 -613
- package/fesm2022/arsedizioni-ars-utils-ui.controls.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.controls.tree.mjs +840 -367
- package/fesm2022/arsedizioni-ars-utils-ui.controls.tree.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.auth.mjs +1634 -651
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.auth.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.mjs +1255 -792
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.prompt.mjs +1410 -357
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.prompt.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.select.mjs +2401 -944
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.select.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.files.mjs +1553 -741
- package/fesm2022/arsedizioni-ars-utils-ui.files.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.filters.mjs +901 -430
- package/fesm2022/arsedizioni-ars-utils-ui.filters.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.help.mjs +737 -530
- package/fesm2022/arsedizioni-ars-utils-ui.help.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.mjs +6638 -1755
- package/fesm2022/arsedizioni-ars-utils-ui.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.navigation.mjs +1479 -1207
- package/fesm2022/arsedizioni-ars-utils-ui.navigation.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.notifications.mjs +1003 -270
- package/fesm2022/arsedizioni-ars-utils-ui.notifications.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.oauth.mjs +497 -278
- package/fesm2022/arsedizioni-ars-utils-ui.oauth.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.paginator.mjs +48 -52
- package/fesm2022/arsedizioni-ars-utils-ui.paginator.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.shell.mjs +464 -704
- package/fesm2022/arsedizioni-ars-utils-ui.shell.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.tinymce.mjs +724 -657
- package/fesm2022/arsedizioni-ars-utils-ui.tinymce.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils.mjs +3 -19
- package/fesm2022/arsedizioni-ars-utils.mjs.map +1 -1
- package/package.json +1 -1
- package/types/arsedizioni-ars-utils-clipper.common.d.ts +1151 -1163
- package/types/arsedizioni-ars-utils-clipper.ui.d.ts +1588 -1426
- package/types/arsedizioni-ars-utils-core.d.ts +1169 -1172
- package/types/arsedizioni-ars-utils-core.date.d.ts +204 -208
- package/types/arsedizioni-ars-utils-core.markdown.d.ts +128 -126
- package/types/arsedizioni-ars-utils-core.validators.d.ts +270 -236
- package/types/arsedizioni-ars-utils-evolution.common.d.ts +1054 -1067
- package/types/arsedizioni-ars-utils-support.common.d.ts +225 -234
- package/types/arsedizioni-ars-utils-ui.controls.d.ts +440 -278
- package/types/arsedizioni-ars-utils-ui.controls.date.d.ts +24 -28
- package/types/arsedizioni-ars-utils-ui.controls.tree.d.ts +172 -136
- package/types/arsedizioni-ars-utils-ui.d.ts +2035 -821
- package/types/arsedizioni-ars-utils-ui.dialogs.auth.d.ts +327 -322
- package/types/arsedizioni-ars-utils-ui.dialogs.d.ts +343 -347
- package/types/arsedizioni-ars-utils-ui.dialogs.prompt.d.ts +167 -167
- package/types/arsedizioni-ars-utils-ui.dialogs.select.d.ts +373 -367
- package/types/arsedizioni-ars-utils-ui.files.d.ts +335 -283
- package/types/arsedizioni-ars-utils-ui.filters.d.ts +232 -160
- package/types/arsedizioni-ars-utils-ui.help.d.ts +204 -211
- package/types/arsedizioni-ars-utils-ui.navigation.d.ts +811 -646
- package/types/arsedizioni-ars-utils-ui.notifications.d.ts +74 -78
- package/types/arsedizioni-ars-utils-ui.oauth.d.ts +102 -62
- package/types/arsedizioni-ars-utils-ui.paginator.d.ts +19 -22
- package/types/arsedizioni-ars-utils-ui.shell.d.ts +376 -382
- package/types/arsedizioni-ars-utils-ui.tinymce.d.ts +244 -231
- package/types/arsedizioni-ars-utils.d.ts +1 -3
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { RawEditorOptions, TinyMCE
|
|
2
|
-
import * as
|
|
3
|
-
import {
|
|
4
|
-
import { ControlValueAccessor } from
|
|
5
|
-
import * as _angular_forms_signals from '@angular/forms/signals';
|
|
6
|
-
|
|
1
|
+
import { Editor, RawEditorOptions, TinyMCE } from "tinymce";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import { OnDestroy, OnInit } from "@angular/core";
|
|
4
|
+
import { ControlValueAccessor } from "@angular/forms";
|
|
7
5
|
/**
|
|
8
6
|
* The editor profiles the applications ask for, ready to be handed to
|
|
9
7
|
* `[tinymceConfig]` on {@link TinymceEditorDirective}.
|
|
@@ -23,46 +21,45 @@ import * as _angular_forms_signals from '@angular/forms/signals';
|
|
|
23
21
|
* Each accessor returns a **fresh deep copy**: a caller that tweaks a returned object — as the
|
|
24
22
|
* editor dialog does with its toolbar — cannot corrupt the preset for everyone else.
|
|
25
23
|
*/
|
|
26
|
-
declare class TinymceUtils {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
24
|
+
export declare class TinymceUtils {
|
|
25
|
+
/**
|
|
26
|
+
* Everything TinyMCE 8 open source has to offer, for a full-page editor.
|
|
27
|
+
*
|
|
28
|
+
* Adapted from the TinyMCE 5 profile the library used to ship: `paste`, `print`, `hr`,
|
|
29
|
+
* `textpattern` and the `fullpage_*` options no longer exist (paste and text patterns moved
|
|
30
|
+
* into the core, `fullpage` and `print` were dropped in v6), and `checklist`,
|
|
31
|
+
* `openCodeMirrorButton` and `insertMediaButton` are premium or application-specific buttons
|
|
32
|
+
* that a self-hosted GPL build has no way to render.
|
|
33
|
+
*/
|
|
34
|
+
private static readonly FULL;
|
|
35
|
+
/**
|
|
36
|
+
* The one for a field inside a form: it grows with the text instead of owning the page, the
|
|
37
|
+
* toolbar sits under it and collapses into groups, and there is no status bar or context menu
|
|
38
|
+
* to compete with the form around it.
|
|
39
|
+
*/
|
|
40
|
+
private static readonly COMPACT;
|
|
41
|
+
/** The compact one plus full screen, the insert group and the source view. */
|
|
42
|
+
private static readonly COMPACT_EXTENDED;
|
|
43
|
+
/**
|
|
44
|
+
* The full-page profile.
|
|
45
|
+
* @returns A fresh copy of the configuration, safe to modify.
|
|
46
|
+
*/
|
|
47
|
+
static get TinymceConfig(): RawEditorOptions;
|
|
48
|
+
/**
|
|
49
|
+
* The in-form profile.
|
|
50
|
+
* @returns A fresh copy of the configuration, safe to modify.
|
|
51
|
+
*/
|
|
52
|
+
static get TinymceCompactConfig(): RawEditorOptions;
|
|
53
|
+
/**
|
|
54
|
+
* The in-form profile with full screen and source view.
|
|
55
|
+
* @returns A fresh copy of the configuration, safe to modify.
|
|
56
|
+
*/
|
|
57
|
+
static get TinymceCompactExtendedConfig(): RawEditorOptions;
|
|
60
58
|
}
|
|
61
|
-
|
|
62
59
|
declare global {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
60
|
+
interface Window {
|
|
61
|
+
tinymce?: TinyMCE;
|
|
62
|
+
}
|
|
66
63
|
}
|
|
67
64
|
/**
|
|
68
65
|
* Loads the self-hosted TinyMCE bundle on demand.
|
|
@@ -75,26 +72,25 @@ declare global {
|
|
|
75
72
|
* model, plugins and skin relative to `base_url`, which is how the self-hosted distribution
|
|
76
73
|
* expects to work.
|
|
77
74
|
*/
|
|
78
|
-
declare class TinymceLoaderService {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
75
|
+
export declare class TinymceLoaderService {
|
|
76
|
+
/** The in-flight (or completed) load, so concurrent editors share a single script tag. */
|
|
77
|
+
private pending?;
|
|
78
|
+
/**
|
|
79
|
+
* The absolute URL of the TinyMCE asset folder, resolved against the document base href so the
|
|
80
|
+
* app keeps working when it is served from a sub-path.
|
|
81
|
+
* @returns The base URL, without a trailing slash.
|
|
82
|
+
*/
|
|
83
|
+
get baseUrl(): string;
|
|
84
|
+
/**
|
|
85
|
+
* Loads TinyMCE, reusing the script already injected by a previous call.
|
|
86
|
+
* @returns A promise resolving with the global TinyMCE instance.
|
|
87
|
+
*/
|
|
88
|
+
load(): Promise<TinyMCE>;
|
|
89
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TinymceLoaderService, never>;
|
|
90
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
94
91
|
}
|
|
95
|
-
|
|
96
92
|
/** Uploads one image and resolves with the URL to reference it by. */
|
|
97
|
-
type TinymceImageUploader = (file: File) => Promise<string>;
|
|
93
|
+
export type TinymceImageUploader = (file: File) => Promise<string>;
|
|
98
94
|
/**
|
|
99
95
|
* How the editor presents itself.
|
|
100
96
|
*
|
|
@@ -105,7 +101,7 @@ type TinymceImageUploader = (file: File) => Promise<string>;
|
|
|
105
101
|
* it, at which point the toolbar floats over the content. It needs an ordinary element to edit —
|
|
106
102
|
* a `<div>` — because there is nothing to render inside a `<textarea>`.
|
|
107
103
|
*/
|
|
108
|
-
type TinymceToolbarMode = 'fixed' | 'inline';
|
|
104
|
+
export type TinymceToolbarMode = 'fixed' | 'inline';
|
|
109
105
|
/**
|
|
110
106
|
* Turns a `<textarea>` into a rich text editor backed by the self-hosted TinyMCE bundle, and wires
|
|
111
107
|
* it to Angular forms as a `ControlValueAccessor`, so `[(ngModel)]`, `required` and the
|
|
@@ -117,131 +113,149 @@ type TinymceToolbarMode = 'fixed' | 'inline';
|
|
|
117
113
|
* Usage: `<textarea tinymceEditor [(ngModel)]="item.text" name="text" required></textarea>`
|
|
118
114
|
*
|
|
119
115
|
*/
|
|
120
|
-
declare class TinymceEditorDirective implements ControlValueAccessor, OnInit, OnDestroy {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
116
|
+
export declare class TinymceEditorDirective implements ControlValueAccessor, OnInit, OnDestroy {
|
|
117
|
+
/** Extra TinyMCE options, merged over (and able to override) the defaults below. */
|
|
118
|
+
readonly tinymceConfig: import("@angular/core").InputSignal<RawEditorOptions>;
|
|
119
|
+
/** Whether the toolbar is pinned above the content (`fixed`) or floats on focus (`inline`). */
|
|
120
|
+
readonly tinymceToolbarMode: import("@angular/core").InputSignal<TinymceToolbarMode>;
|
|
121
|
+
/**
|
|
122
|
+
* Handler invoked for every image dropped, pasted or picked in the editor. When not provided
|
|
123
|
+
* the upload tab is hidden and only images referenced by URL can be inserted.
|
|
124
|
+
*/
|
|
125
|
+
readonly tinymceImageUploader: import("@angular/core").InputSignal<TinymceImageUploader>;
|
|
126
|
+
/** Emitted once the editor is up, for callers that want to enable UI only when it is usable. */
|
|
127
|
+
readonly ready: import("@angular/core").OutputEmitterRef<Editor>;
|
|
128
|
+
/** Emitted when the editor could not be loaded or initialised. */
|
|
129
|
+
readonly failed: import("@angular/core").OutputEmitterRef<Error>;
|
|
130
|
+
private readonly host;
|
|
131
|
+
private readonly loader;
|
|
132
|
+
private readonly themeService;
|
|
133
|
+
private readonly changeDetector;
|
|
134
|
+
private editor?;
|
|
135
|
+
/** True while the editor is showing itself full screen. */
|
|
136
|
+
private fullscreen;
|
|
137
|
+
/** True once the directive has been destroyed, so a late init resolves into a no-op. */
|
|
138
|
+
private destroyed;
|
|
139
|
+
/**
|
|
140
|
+
* True while the directive itself is pushing a value into the editor. TinyMCE raises the same
|
|
141
|
+
* content events for a programmatic `setContent` as for a keystroke, so without this flag
|
|
142
|
+
* `writeValue` would immediately echo back through `onChange` and mark a freshly loaded form
|
|
143
|
+
* as dirty.
|
|
144
|
+
*/
|
|
145
|
+
private writingValue;
|
|
146
|
+
/** The value received before the editor existed, applied as soon as it does. */
|
|
147
|
+
private value;
|
|
148
|
+
private disabled;
|
|
149
|
+
private onChange;
|
|
150
|
+
private onTouched;
|
|
151
|
+
/**
|
|
152
|
+
* Leaves full screen on Escape, for the keystrokes that happen outside the content: with the
|
|
153
|
+
* classic editor the content is an iframe, and a keydown in there never reaches this document.
|
|
154
|
+
* Bound on the capture phase and stopped, so a dialog hosting the editor does not take the
|
|
155
|
+
* Escape and close, throwing the edit away when the user only meant to leave full screen.
|
|
156
|
+
*/
|
|
157
|
+
private readonly onDocumentKeydown;
|
|
158
|
+
/**
|
|
159
|
+
* Loads TinyMCE and initialises the editor over the host textarea.
|
|
160
|
+
* @returns A promise that completes once the editor is ready (or has failed).
|
|
161
|
+
*/
|
|
162
|
+
ngOnInit(): Promise<void>;
|
|
163
|
+
/**
|
|
164
|
+
* Tears the editor down. TinyMCE keeps global state per instance, so leaving it behind when a
|
|
165
|
+
* dialog closes leaks both DOM and editor registrations.
|
|
166
|
+
* @returns void
|
|
167
|
+
*/
|
|
168
|
+
ngOnDestroy(): void;
|
|
169
|
+
/**
|
|
170
|
+
* Decides whether an Escape press means "leave full screen": it does whenever the editor is
|
|
171
|
+
* full screen, full stop. While full screen the editor owns Escape, and the press is stopped
|
|
172
|
+
* here so it can never reach the dialog hosting it — leaving full screen must not also throw
|
|
173
|
+
* away what is being written.
|
|
174
|
+
* @param event The keyboard event, from the document or from the editor's content.
|
|
175
|
+
* @returns True when full screen should be left.
|
|
176
|
+
*/
|
|
177
|
+
private shouldEscapeLeaveFullscreen;
|
|
178
|
+
/**
|
|
179
|
+
* Asks the editor to leave full screen. Safe to call when it is not in full screen.
|
|
180
|
+
* @returns void
|
|
181
|
+
*/
|
|
182
|
+
private exitFullscreen;
|
|
183
|
+
/**
|
|
184
|
+
* Attaches or detaches everything that only makes sense while the editor is full screen.
|
|
185
|
+
* @param state True when the editor has just entered full screen.
|
|
186
|
+
* @returns void
|
|
187
|
+
*/
|
|
188
|
+
private handleFullscreenChanged;
|
|
189
|
+
/**
|
|
190
|
+
* Detaches the listener that only makes sense while the editor is full screen.
|
|
191
|
+
* @returns void
|
|
192
|
+
*/
|
|
193
|
+
private releaseFullscreen;
|
|
194
|
+
/**
|
|
195
|
+
* Pushes a value coming from the form into the editor.
|
|
196
|
+
* @param value The new content, or null/undefined for an empty editor.
|
|
197
|
+
* @returns void
|
|
198
|
+
*/
|
|
199
|
+
writeValue(value: string | null | undefined): void;
|
|
200
|
+
/**
|
|
201
|
+
* Registers the callback used to report content changes to the form.
|
|
202
|
+
* @param fn The callback supplied by Angular forms.
|
|
203
|
+
* @returns void
|
|
204
|
+
*/
|
|
205
|
+
registerOnChange(fn: (value: string) => void): void;
|
|
206
|
+
/**
|
|
207
|
+
* Registers the callback used to report the first blur to the form.
|
|
208
|
+
* @param fn The callback supplied by Angular forms.
|
|
209
|
+
* @returns void
|
|
210
|
+
*/
|
|
211
|
+
registerOnTouched(fn: () => void): void;
|
|
212
|
+
/**
|
|
213
|
+
* Enables or disables editing.
|
|
214
|
+
* @param isDisabled True to switch the editor to read-only.
|
|
215
|
+
* @returns void
|
|
216
|
+
*/
|
|
217
|
+
setDisabledState(isDisabled: boolean): void;
|
|
218
|
+
/**
|
|
219
|
+
* Writes content into the editor when it exists, guarding against the echo described on
|
|
220
|
+
* <see cref="writingValue"/>.
|
|
221
|
+
* @param value The content to write.
|
|
222
|
+
* @returns void
|
|
223
|
+
*/
|
|
224
|
+
private applyValue;
|
|
225
|
+
/**
|
|
226
|
+
* Applies the disabled state to the editor when it exists.
|
|
227
|
+
* @param isDisabled True to switch the editor to read-only.
|
|
228
|
+
* @returns void
|
|
229
|
+
*/
|
|
230
|
+
private applyDisabled;
|
|
231
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TinymceEditorDirective, never>;
|
|
232
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TinymceEditorDirective, "textarea[tinymceEditor], div[tinymceEditor]", never, {
|
|
233
|
+
"tinymceConfig": {
|
|
234
|
+
"alias": "tinymceConfig";
|
|
235
|
+
"required": false;
|
|
236
|
+
"isSignal": true;
|
|
237
|
+
};
|
|
238
|
+
"tinymceToolbarMode": {
|
|
239
|
+
"alias": "tinymceToolbarMode";
|
|
240
|
+
"required": false;
|
|
241
|
+
"isSignal": true;
|
|
242
|
+
};
|
|
243
|
+
"tinymceImageUploader": {
|
|
244
|
+
"alias": "tinymceImageUploader";
|
|
245
|
+
"required": false;
|
|
246
|
+
"isSignal": true;
|
|
247
|
+
};
|
|
248
|
+
}, {
|
|
249
|
+
"ready": "ready";
|
|
250
|
+
"failed": "failed";
|
|
251
|
+
}, never, never, true, never>;
|
|
237
252
|
}
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
disabled?: boolean;
|
|
253
|
+
export interface TinyMceEditorDialogData {
|
|
254
|
+
text: string;
|
|
255
|
+
configuration: RawEditorOptions;
|
|
256
|
+
infoButtonLabel?: string;
|
|
257
|
+
onShowInfo?: Function;
|
|
258
|
+
disabled?: boolean;
|
|
245
259
|
}
|
|
246
260
|
/**
|
|
247
261
|
* A dialog that is nothing but an editor: the caller hands it a text and gets the edited one
|
|
@@ -251,47 +265,46 @@ interface TinyMceEditorDialogData {
|
|
|
251
265
|
* exactly what any other editor in the application costs — the TinyMCE bundle is fetched on
|
|
252
266
|
* first use and nothing about it reaches the initial chunk.
|
|
253
267
|
*/
|
|
254
|
-
declare class TinyMceEditorComponent {
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
export type { TinyMceEditorDialogData, TinymceImageUploader, TinymceToolbarMode };
|
|
268
|
+
export declare class TinyMceEditorComponent {
|
|
269
|
+
/** Emitted with the edited text when the user saves. */
|
|
270
|
+
readonly saving: import("@angular/core").OutputEmitterRef<string>;
|
|
271
|
+
private readonly dialogRef;
|
|
272
|
+
/** Dialog configuration, injected and exposed as a signal. */
|
|
273
|
+
protected readonly dialogData: import("@angular/core").WritableSignal<TinyMceEditorDialogData>;
|
|
274
|
+
/** Whether the editor is in read-only mode. */
|
|
275
|
+
protected readonly disabled: import("@angular/core").WritableSignal<boolean>;
|
|
276
|
+
/**
|
|
277
|
+
* Why the editor could not be shown, when it could not.
|
|
278
|
+
*
|
|
279
|
+
* Without it a failure looked exactly like an empty document: the directive reported it on its
|
|
280
|
+
* `failed` output, nothing was listening, and the user was left with a blank box and no reason
|
|
281
|
+
* for it. The message is the directive's own — the bundle did not load, or TinyMCE refused to
|
|
282
|
+
* start — and it also goes to the console, because that is where whoever is asked about it will
|
|
283
|
+
* look first.
|
|
284
|
+
*/
|
|
285
|
+
protected readonly error: import("@angular/core").WritableSignal<string>;
|
|
286
|
+
/** Current editor content. */
|
|
287
|
+
protected readonly text: import("@angular/core").WritableSignal<string>;
|
|
288
|
+
/**
|
|
289
|
+
* Signal form bound to the editor textarea. The disabled state is pushed to the
|
|
290
|
+
* TinymceEditorDirective through the ControlValueAccessor interop.
|
|
291
|
+
*/
|
|
292
|
+
protected readonly textForm: import("@angular/forms/signals").FieldTree<string, string | number, "writable">;
|
|
293
|
+
/** The profile handed to the editor directive, merged over its defaults. */
|
|
294
|
+
protected tinymceConfig: RawEditorOptions;
|
|
295
|
+
constructor();
|
|
296
|
+
/**
|
|
297
|
+
* Records that the editor could not be shown.
|
|
298
|
+
* @param error - What the directive could not do.
|
|
299
|
+
* @returns void
|
|
300
|
+
*/
|
|
301
|
+
protected failed(error: Error): void;
|
|
302
|
+
/**
|
|
303
|
+
* Save the current editor content and close the dialog.
|
|
304
|
+
*/
|
|
305
|
+
protected ok(): void;
|
|
306
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TinyMceEditorComponent, never>;
|
|
307
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TinyMceEditorComponent, "ng-component", never, {}, {
|
|
308
|
+
"saving": "saving";
|
|
309
|
+
}, never, never, true, never>;
|
|
310
|
+
}
|