valtech-components 4.0.972 → 4.0.974
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/esm2022/lib/components/organisms/rich-editor/rich-editor.component.mjs +71 -8
- package/esm2022/lib/components/organisms/rich-editor/rich-editor.i18n.mjs +3 -1
- package/esm2022/lib/services/firebase/storage.service.mjs +8 -3
- package/esm2022/lib/version.mjs +2 -2
- package/fesm2022/valtech-components.mjs +76 -7
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/organisms/rich-editor/rich-editor.component.d.ts +13 -1
- package/lib/components/organisms/rich-editor/rich-editor.i18n.d.ts +2 -0
- package/lib/services/firebase/storage.service.d.ts +8 -1
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -27,19 +27,31 @@ export declare class RichEditorComponent implements AfterViewInit, OnChanges, On
|
|
|
27
27
|
articleChange: EventEmitter<ArticleMetadata>;
|
|
28
28
|
editorHost: ElementRef<HTMLElement>;
|
|
29
29
|
private i18n;
|
|
30
|
+
private injector;
|
|
30
31
|
private editor?;
|
|
31
32
|
/** Se recalcula en cada `onUpdate`/`onSelectionUpdate` para reflejar el
|
|
32
33
|
* mark/nodo activo bajo el cursor (ej. el botón "B" resaltado si el
|
|
33
34
|
* cursor está dentro de texto en negrita). */
|
|
34
35
|
private readonly _toolbarTick;
|
|
35
36
|
readonly toolbarButtons: import("@angular/core").WritableSignal<RichEditorToolbarButton[]>;
|
|
37
|
+
readonly uploadingImage: import("@angular/core").WritableSignal<boolean>;
|
|
36
38
|
constructor();
|
|
37
|
-
|
|
39
|
+
t(key: string): string;
|
|
38
40
|
ngAfterViewInit(): void;
|
|
39
41
|
ngOnChanges(changes: SimpleChanges): void;
|
|
40
42
|
private emitArticle;
|
|
41
43
|
private refreshToolbar;
|
|
42
44
|
runCommand(token: string): void;
|
|
45
|
+
/**
|
|
46
|
+
* Sube la imagen elegida vía `StorageService` (Regla #12 — nunca URL pegada
|
|
47
|
+
* a mano, siempre vía Storage) y la inserta en el punto del cursor.
|
|
48
|
+
* `StorageService` se resuelve perezosamente (vía `Injector`, no como
|
|
49
|
+
* campo de la clase): si la app consumer no configuró
|
|
50
|
+
* `provideValtechFirebase`, el editor sigue funcionando normal para todo
|
|
51
|
+
* lo demás — solo el botón de imagen queda sin efecto, con log de error en
|
|
52
|
+
* vez de romper el resto del componente.
|
|
53
|
+
*/
|
|
54
|
+
onImageSelected(event: Event): Promise<void>;
|
|
43
55
|
ngOnDestroy(): void;
|
|
44
56
|
static ɵfac: i0.ɵɵFactoryDeclaration<RichEditorComponent, never>;
|
|
45
57
|
static ɵcmp: i0.ɵɵComponentDeclaration<RichEditorComponent, "val-rich-editor", never, { "props": { "alias": "props"; "required": false; }; }, { "articleChange": "articleChange"; }, never, never, true, never>;
|
|
@@ -12,6 +12,7 @@ export declare const RICH_EDITOR_I18N: {
|
|
|
12
12
|
readonly orderedList: "Lista numerada";
|
|
13
13
|
readonly quote: "Cita";
|
|
14
14
|
readonly separator: "Separador";
|
|
15
|
+
readonly image: "Insertar imagen";
|
|
15
16
|
};
|
|
16
17
|
readonly en: {
|
|
17
18
|
readonly bold: "Bold";
|
|
@@ -22,5 +23,6 @@ export declare const RICH_EDITOR_I18N: {
|
|
|
22
23
|
readonly orderedList: "Numbered list";
|
|
23
24
|
readonly quote: "Quote";
|
|
24
25
|
readonly separator: "Separator";
|
|
26
|
+
readonly image: "Insert image";
|
|
25
27
|
};
|
|
26
28
|
};
|
|
@@ -158,13 +158,20 @@ export declare class StorageService {
|
|
|
158
158
|
* Elimina un archivo.
|
|
159
159
|
*
|
|
160
160
|
* @param path - Ruta del archivo a eliminar
|
|
161
|
+
* @param options.skipPrefix - Si es true, no aplica el prefix de appId (para
|
|
162
|
+
* borrar un archivo subido con `uploadAndGetUrl(path, file, { skipPrefix:
|
|
163
|
+
* true })` hay que pasar el mismo flag, o el path queda mal armado y el
|
|
164
|
+
* delete falla contra un objeto que no existe).
|
|
161
165
|
*
|
|
162
166
|
* @example
|
|
163
167
|
* ```typescript
|
|
164
168
|
* await storage.delete('images/old-photo.jpg');
|
|
169
|
+
* await storage.delete('apps/merotz/orgs/x/public/images/parts/y/z.png', { skipPrefix: true });
|
|
165
170
|
* ```
|
|
166
171
|
*/
|
|
167
|
-
delete(path: string
|
|
172
|
+
delete(path: string, options?: {
|
|
173
|
+
skipPrefix?: boolean;
|
|
174
|
+
}): Promise<void>;
|
|
168
175
|
/**
|
|
169
176
|
* Elimina múltiples archivos.
|
|
170
177
|
*
|
package/lib/version.d.ts
CHANGED