@cbm-common/cbm-types 0.0.367 → 0.0.368
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/lib/components/document-editor/document-editor.d.ts +8 -4
- package/lib/components/document-editor/lists/list-panel/document-editor-list-panel.d.ts +3 -2
- package/lib/components/document-editor/public-api.d.ts +1 -1
- package/lib/components/document-editor/variables/document-editor-schema.d.ts +0 -2
- package/lib/components/document-editor/variables/variables-panel/document-editor-variables-panel.d.ts +3 -2
- package/package.json +1 -1
|
@@ -8,7 +8,8 @@ import { DocumentDefaults } from './format/document-editor-defaults';
|
|
|
8
8
|
import { DocumentBlockStyle, DocumentFormatState, DocumentTableFloat, DocumentTextAlign } from './format/document-editor-format-state';
|
|
9
9
|
import { DocumentListPanelMode } from './lists/list-panel/document-editor-list-panel';
|
|
10
10
|
import { DocumentListCollection, DocumentVariable, DocumentVariablesCatalog } from './nodes/document-editor-node-types';
|
|
11
|
-
import {
|
|
11
|
+
import { IGeneral } from '../../domain/models/general.domain.model';
|
|
12
|
+
import { DocumentSchemaCategorySource, DocumentVariablesConfig } from './variables/document-editor-schema';
|
|
12
13
|
import { DocumentBorderLineStyle, DocumentBorderPen, DocumentBorderTarget } from './tables/borders/document-editor-table-borders';
|
|
13
14
|
import { DocumentCellMarginsRequest } from './tables/layout/cell-margins-menu/document-editor-cell-margins-menu';
|
|
14
15
|
import { DocumentCellAlignmentChoice, DocumentTableAutofit, DocumentTableLayoutState } from './tables/layout/document-editor-table-layout';
|
|
@@ -64,8 +65,11 @@ export declare class CbmDocumentEditorComponent implements ControlValueAccessor
|
|
|
64
65
|
* normaliza con `variablesConfig`. `null`/`undefined`: todavía no llegan. `[]`: llegaron y no hay ninguna.
|
|
65
66
|
*/
|
|
66
67
|
variables: import("@angular/core").InputSignal<readonly DocumentSchemaCategorySource[] | null | undefined>;
|
|
67
|
-
/**
|
|
68
|
-
|
|
68
|
+
/**
|
|
69
|
+
* Estado de la carga de `variables`, que lleva el consumidor con el estado general del sistema (`init`, `loading`,
|
|
70
|
+
* `success`, `failed`). Sin enlazar se deduce de `variables`.
|
|
71
|
+
*/
|
|
72
|
+
variablesStatus: import("@angular/core").InputSignal<IGeneral.STATUS | null | undefined>;
|
|
69
73
|
/**
|
|
70
74
|
* Reglas para normalizar `variables`: cada clave que se pasa reemplaza entera a la de `DEFAULT_DOCUMENT_VARIABLES_CONFIG`.
|
|
71
75
|
* Debe ser una referencia estable (una constante), no un objeto nuevo en cada detección de cambios.
|
|
@@ -267,7 +271,7 @@ export declare class CbmDocumentEditorComponent implements ControlValueAccessor
|
|
|
267
271
|
previewConfig: import("@angular/core").Signal<AteEditorConfig>;
|
|
268
272
|
private readonly resolvedVariablesConfig;
|
|
269
273
|
protected readonly catalog: import("@angular/core").Signal<DocumentVariablesCatalog>;
|
|
270
|
-
protected readonly resolvedVariablesStatus: import("@angular/core").Signal<
|
|
274
|
+
protected readonly resolvedVariablesStatus: import("@angular/core").Signal<IGeneral.STATUS>;
|
|
271
275
|
editorControl: FormControl<string>;
|
|
272
276
|
fontFamilyControl: FormControl<string | null>;
|
|
273
277
|
fontSizeControl: FormControl<number | null>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { DestroyRef } from '@angular/core';
|
|
2
2
|
import { FormControl } from '@angular/forms';
|
|
3
3
|
import { Editor } from '@tiptap/core';
|
|
4
|
+
import { IGeneral } from '../../../../domain/models/general.domain.model';
|
|
4
5
|
import { DocumentListCollection, DocumentVariablesCatalog } from '../../nodes/document-editor-node-types';
|
|
5
|
-
import { DocumentVariablesStatus } from '../../variables/document-editor-schema';
|
|
6
6
|
export type DocumentListPanelMode = 'insert' | 'row';
|
|
7
7
|
/**
|
|
8
8
|
* Contenido del panel lateral de `document-editor` para las tablas de listado:
|
|
@@ -22,7 +22,7 @@ export declare class DocumentEditorListPanel {
|
|
|
22
22
|
/** Catálogo del editor que contiene el panel. */
|
|
23
23
|
catalog: import("@angular/core").InputSignal<DocumentVariablesCatalog>;
|
|
24
24
|
/** Estado de la carga de las variables (las categorías las entrega el backend). */
|
|
25
|
-
status: import("@angular/core").InputSignal<
|
|
25
|
+
status: import("@angular/core").InputSignal<IGeneral.STATUS>;
|
|
26
26
|
/** Se insertó la tabla: el panel ya no tiene nada que mostrar. */
|
|
27
27
|
done: import("@angular/core").OutputEmitterRef<void>;
|
|
28
28
|
/** Volver a pedir las categorías al backend (la carga falló). */
|
|
@@ -43,6 +43,7 @@ export declare class DocumentEditorListPanel {
|
|
|
43
43
|
columnOptions: import("@angular/core").Signal<import("../../nodes/document-editor-node-types").DocumentNodeOption[]>;
|
|
44
44
|
visibleColumnOptions: import("@angular/core").Signal<import("../../nodes/document-editor-node-types").DocumentNodeOption[]>;
|
|
45
45
|
loadingCollections: import("@angular/core").Signal<boolean>;
|
|
46
|
+
loadFailed: import("@angular/core").Signal<boolean>;
|
|
46
47
|
collectionLabel: import("@angular/core").Signal<string>;
|
|
47
48
|
collectionControl: FormControl<string | null>;
|
|
48
49
|
private readonly _loadEffect;
|
|
@@ -39,7 +39,7 @@ export type { DocumentPageSize, DocumentPageOrientation, DocumentPageMargins, Do
|
|
|
39
39
|
export { DEFAULT_DOCUMENT_DEFAULTS, toDocumentDefaults } from './format/document-editor-defaults';
|
|
40
40
|
export type { DocumentDefaults } from './format/document-editor-defaults';
|
|
41
41
|
export { DEFAULT_DOCUMENT_VARIABLES_CONFIG, resolveDocumentVariablesConfig, toDocumentSchemaCategories, } from './variables/document-editor-schema';
|
|
42
|
-
export type { DocumentFieldKind, DocumentSchemaCategory, DocumentSchemaCategorySource, DocumentSchemaField, DocumentSchemaFieldSource, DocumentVariablesConfig, DocumentVariablesHiddenField,
|
|
42
|
+
export type { DocumentFieldKind, DocumentSchemaCategory, DocumentSchemaCategorySource, DocumentSchemaField, DocumentSchemaFieldSource, DocumentVariablesConfig, DocumentVariablesHiddenField, } from './variables/document-editor-schema';
|
|
43
43
|
export { countIncompleteNodes, documentFieldKind } from './nodes/document-editor-node-types';
|
|
44
44
|
export type { DocumentListCollection } from './nodes/document-editor-node-types';
|
|
45
45
|
export { buildSampleData } from './variables/document-editor-sample-data';
|
|
@@ -29,8 +29,6 @@ export interface DocumentSchemaCategory {
|
|
|
29
29
|
shortLabel: string;
|
|
30
30
|
fields: DocumentSchemaField[];
|
|
31
31
|
}
|
|
32
|
-
/** Estado de la carga de las variables. Lo lleva el consumidor del editor (`[variablesStatus]`). */
|
|
33
|
-
export type DocumentVariablesStatus = 'idle' | 'loading' | 'loaded' | 'failed';
|
|
34
32
|
/** Un campo identificado por lo que guarda el documento. */
|
|
35
33
|
export interface DocumentVariablesHiddenField {
|
|
36
34
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { IGeneral } from '../../../../domain/models/general.domain.model';
|
|
1
2
|
import { DocumentListCollection, DocumentVariable, DocumentVariableGroup, DocumentVariablesCatalog } from '../../nodes/document-editor-node-types';
|
|
2
|
-
import { DocumentVariablesStatus } from '../document-editor-schema';
|
|
3
3
|
/**
|
|
4
4
|
* Contenido del panel lateral de `document-editor` cuando no hay un nodo, una tabla de listado ni la búsqueda a la
|
|
5
5
|
* vista: las variables que se pueden poner en el documento, agrupadas por categoría tal como las entrega el backend.
|
|
@@ -12,7 +12,7 @@ export declare class DocumentEditorVariablesPanel {
|
|
|
12
12
|
/** Catálogo del editor que contiene el panel. */
|
|
13
13
|
catalog: import("@angular/core").InputSignal<DocumentVariablesCatalog>;
|
|
14
14
|
/** Estado de la carga de las variables (las entrega el backend). */
|
|
15
|
-
status: import("@angular/core").InputSignal<
|
|
15
|
+
status: import("@angular/core").InputSignal<IGeneral.STATUS>;
|
|
16
16
|
insert: import("@angular/core").OutputEmitterRef<DocumentVariable>;
|
|
17
17
|
insertTable: import("@angular/core").OutputEmitterRef<string>;
|
|
18
18
|
chooseColumns: import("@angular/core").OutputEmitterRef<string>;
|
|
@@ -25,6 +25,7 @@ export declare class DocumentEditorVariablesPanel {
|
|
|
25
25
|
openGroup: import("@angular/core").WritableSignal<string | null | undefined>;
|
|
26
26
|
searching: import("@angular/core").Signal<boolean>;
|
|
27
27
|
loading: import("@angular/core").Signal<boolean>;
|
|
28
|
+
loadFailed: import("@angular/core").Signal<boolean>;
|
|
28
29
|
groups: import("@angular/core").Signal<DocumentVariableGroup[]>;
|
|
29
30
|
/** El backend respondió pero no entregó ninguna variable. */
|
|
30
31
|
noVariables: import("@angular/core").Signal<boolean>;
|