@cbm-common/cbm-types 0.0.199 → 0.0.200
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/advanced-item-search-modal/advanced-item-search-modal.d.ts +3 -0
- package/lib/components/advanced-item-search-modal/item-list/item-list.d.ts +22 -13
- package/lib/components/table-column-config-dropdown/table-column-config-dropdown.component.d.ts +71 -0
- package/lib/directives/table-drag-drop.directive.d.ts +45 -0
- package/lib/domain/models/item.domain.model.d.ts +8 -0
- package/lib/domain/models/table-config.model.d.ts +62 -0
- package/lib/domain/services/table-configuration.service.d.ts +131 -0
- package/package.json +1 -1
- package/lib/components/accounting-seat/directives/drop-down-menu.directive.d.ts +0 -13
- package/lib/components/accounting-seat/directives/drop-down.directive.d.ts +0 -10
- package/lib/components/record-detail-metadata/components/options/options.d.ts +0 -13
- package/lib/components/record-detail-metadata/directives/drop-down-menu.directive.d.ts +0 -13
- package/lib/components/record-detail-metadata/directives/drop-down.directive.d.ts +0 -9
- package/lib/domain/models/sales-pending-document.domain.model.d.ts +0 -91
- package/lib/domain/repositories/sales-pending-document.domain.repository.d.ts +0 -8
- package/lib/infrastructure/repositories/blanket-agreement-category-service..infrastructure.repository.d.ts +0 -7
- package/lib/infrastructure/repositories/sales-pending-document.infrastructure.repository.d.ts +0 -5
- package/lib/infrastructure/services/sales-pending-document.infrastructure.service.d.ts +0 -9
|
@@ -4,6 +4,7 @@ import { CbmAlternativeItemModel } from '../../domain/models/alternative-item.do
|
|
|
4
4
|
import { CbmItemModel } from '../../domain/models/item.domain.model';
|
|
5
5
|
import { CbmPriceListModel } from '../../domain/models/price-list.domain.model';
|
|
6
6
|
import { CbmItemDomainRepository } from '../../domain/repositories/item.domain.repository';
|
|
7
|
+
import { CbmWarehouseModel } from '@cbm-common/cbm-types';
|
|
7
8
|
export declare class CbmAdvancedItemSearchModal {
|
|
8
9
|
private readonly itemRepository;
|
|
9
10
|
private readonly destroyRef;
|
|
@@ -16,11 +17,13 @@ export declare class CbmAdvancedItemSearchModal {
|
|
|
16
17
|
hideTable: import("@angular/core").InputSignal<boolean>;
|
|
17
18
|
addedItemsIds: import("@angular/core").InputSignal<string[]>;
|
|
18
19
|
codeFilter: import("@angular/core").WritableSignal<string | undefined>;
|
|
20
|
+
'suggest-warehouse': import("@angular/core").InputSignal<CbmWarehouseModel.ListResponse.Data | null>;
|
|
19
21
|
'with-stock': import("@angular/core").InputSignal<boolean>;
|
|
20
22
|
'with-provider-code': import("@angular/core").InputSignal<boolean>;
|
|
21
23
|
modalId: import("@angular/core").Signal<string>;
|
|
22
24
|
withStock: import("@angular/core").Signal<boolean>;
|
|
23
25
|
withProviderCode: import("@angular/core").Signal<boolean>;
|
|
26
|
+
suggestWarehouse: import("@angular/core").Signal<CbmWarehouseModel.ListResponse.Data | null>;
|
|
24
27
|
isOnlyOneItemCoincidence: import("@angular/core").OutputEmitterRef<CbmItemModel.ListResponse.Item | undefined>;
|
|
25
28
|
addSelectedPriceList: import("@angular/core").OutputEmitterRef<CbmPriceListModel.ListResponse.Data>;
|
|
26
29
|
open: import("@angular/core").OutputEmitterRef<void>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CdkDragDrop } from '@angular/cdk/drag-drop';
|
|
2
|
+
import { DestroyRef, OnInit } from '@angular/core';
|
|
2
3
|
import { FormControl, FormGroup } from '@angular/forms';
|
|
3
4
|
import { CbmProviderModel, CbmWarehouseModel } from '@cbm-common/cbm-types';
|
|
4
5
|
import { ListService, PaginatedListService } from '@cbm-common/data-access';
|
|
@@ -14,22 +15,26 @@ import { CbmProviderRepository } from '../../../domain/repositories/provider.dom
|
|
|
14
15
|
import { CbmWarehouseDomainRepository } from '../../../domain/repositories/warehouse.domain.repository';
|
|
15
16
|
import { CbmAuthReactiveService } from '../../../domain/services/auth-reactive.domain.service';
|
|
16
17
|
import { CbmNotificationService } from '../../../domain/services/notification/notification.service';
|
|
18
|
+
import { TableConfigurationService } from '../../../domain/services/table-configuration.service';
|
|
17
19
|
import { CbmModalConfirmComponent } from '../../modal-confirm/modal-confirm';
|
|
20
|
+
import { StockByWarehouseModalCompModel } from '../../stock-by-warehouse-modal/stock-by-warehouse-modal.model';
|
|
18
21
|
import { IPagination, TStatus } from '../types';
|
|
19
22
|
interface IItemWithChecked extends CbmItemModel.AdvancedItemListResponse.Item {
|
|
20
23
|
checked: boolean;
|
|
21
24
|
}
|
|
22
|
-
export declare class ItemListComponent {
|
|
23
|
-
private priceListRepository;
|
|
24
|
-
private manufacturerRepository;
|
|
25
|
-
private groupRepository;
|
|
26
|
-
private itemRepository;
|
|
27
|
-
private providerRepository;
|
|
28
|
-
private notificationService;
|
|
29
|
-
private readonly
|
|
25
|
+
export declare class ItemListComponent implements OnInit {
|
|
26
|
+
private readonly priceListRepository;
|
|
27
|
+
private readonly manufacturerRepository;
|
|
28
|
+
private readonly groupRepository;
|
|
29
|
+
private readonly itemRepository;
|
|
30
|
+
private readonly providerRepository;
|
|
31
|
+
private readonly notificationService;
|
|
32
|
+
private readonly tableConfigService;
|
|
30
33
|
private destroyRef;
|
|
34
|
+
private readonly warehouseRepository;
|
|
31
35
|
private readonly authReactiveService;
|
|
32
|
-
constructor(priceListRepository: CbmPriceListDomainRepository, manufacturerRepository: CbmManufacturerRepository, groupRepository: CbmGroupDomainRepository, itemRepository: CbmItemDomainRepository, providerRepository: CbmProviderRepository, notificationService: CbmNotificationService,
|
|
36
|
+
constructor(priceListRepository: CbmPriceListDomainRepository, manufacturerRepository: CbmManufacturerRepository, groupRepository: CbmGroupDomainRepository, itemRepository: CbmItemDomainRepository, providerRepository: CbmProviderRepository, notificationService: CbmNotificationService, tableConfigService: TableConfigurationService, destroyRef: DestroyRef, warehouseRepository: CbmWarehouseDomainRepository, authReactiveService: CbmAuthReactiveService);
|
|
37
|
+
private readonly initialColumns;
|
|
33
38
|
modalConfirmRef: import("@angular/core").Signal<CbmModalConfirmComponent>;
|
|
34
39
|
hidePricelistFilter: import("@angular/core").InputSignal<boolean | undefined>;
|
|
35
40
|
priceList: import("@angular/core").InputSignal<string | CbmPriceListModel.ListResponse.Data | undefined>;
|
|
@@ -39,6 +44,7 @@ export declare class ItemListComponent {
|
|
|
39
44
|
nameCodeFilter: import("@angular/core").InputSignal<string | undefined>;
|
|
40
45
|
'with-stock': import("@angular/core").InputSignal<boolean>;
|
|
41
46
|
'with-provider-code': import("@angular/core").InputSignal<boolean>;
|
|
47
|
+
'suggest-warehouse': import("@angular/core").InputSignal<CbmWarehouseModel.ListResponse.Data | null>;
|
|
42
48
|
addItem: import("@angular/core").OutputEmitterRef<CbmItemModel.ListResponse.Item>;
|
|
43
49
|
addAllItems: import("@angular/core").OutputEmitterRef<CbmItemModel.ListResponse.Item[]>;
|
|
44
50
|
selectItem: import("@angular/core").OutputEmitterRef<CbmItemModel.ListResponse.Item>;
|
|
@@ -46,7 +52,6 @@ export declare class ItemListComponent {
|
|
|
46
52
|
isTableHide: import("@angular/core").WritableSignal<boolean>;
|
|
47
53
|
isFilterVisible: import("@angular/core").WritableSignal<boolean>;
|
|
48
54
|
items: import("@angular/core").WritableSignal<IItemWithChecked[]>;
|
|
49
|
-
checkedItems: import("@angular/core").WritableSignal<CbmItemModel.ListResponse.Item[]>;
|
|
50
55
|
rememberedItems: import("@angular/core").WritableSignal<IItemWithChecked[]>;
|
|
51
56
|
itemsPagination: import("@angular/core").WritableSignal<IPagination>;
|
|
52
57
|
statusOfFetchItems: import("@angular/core").WritableSignal<TStatus>;
|
|
@@ -54,6 +59,7 @@ export declare class ItemListComponent {
|
|
|
54
59
|
withStock: import("@angular/core").Signal<boolean>;
|
|
55
60
|
withProviderCode: import("@angular/core").Signal<boolean>;
|
|
56
61
|
computedItems: import("@angular/core").Signal<IItemWithChecked[]>;
|
|
62
|
+
itemConsulted: import("@angular/core").WritableSignal<StockByWarehouseModalCompModel.ItemToConsulted | null>;
|
|
57
63
|
areAllItemsChecked: import("@angular/core").Signal<boolean>;
|
|
58
64
|
formToFilter: FormGroup<{
|
|
59
65
|
priceList: FormControl<CbmPriceListModel.ListResponse.Data | null>;
|
|
@@ -67,12 +73,15 @@ export declare class ItemListComponent {
|
|
|
67
73
|
manage_by: FormControl<CbmItemModel.EManageBy | null>;
|
|
68
74
|
}>;
|
|
69
75
|
company: import("@angular/core").Signal<import("../../../domain/models/auth-reactive.domain.model").CbmAuthReactiveModel.GlobalTokenData.Company>;
|
|
76
|
+
tableConfig: TableConfigurationService;
|
|
70
77
|
priceLists$: ListService<CbmPriceListModel.ListResponse, any, CbmPriceListModel.ListResponse.Data[]>;
|
|
71
78
|
manufacturers$: PaginatedListService<CbmManufacturerModel.ListResponse, CbmManufacturerModel.ListParams, CbmManufacturerModel.ListResponse.Item[]>;
|
|
72
79
|
providers$: PaginatedListService<import("../../../domain/models/provider.domain.model").CbmProviderModel.ListResponse, import("../../../domain/models/provider.domain.model").CbmProviderModel.ListParams, import("../../../domain/models/provider.domain.model").CbmProviderModel.ListResponse.Item[]>;
|
|
73
80
|
categories$: ListService<CbmGroupModel.ListAsTreeResponse, any, CbmGroupModel.ListAsTreeResponse.Children>;
|
|
74
81
|
warehouses$: ListService<import("../../../domain/models/warehouse.domain.model").CbmWarehouseModel.ListResponse, import("../../../domain/models/warehouse.domain.model").CbmWarehouseModel.ListParams, import("../../../domain/models/warehouse.domain.model").CbmWarehouseModel.ListResponse.Data[]>;
|
|
75
82
|
ngOnInit(): void;
|
|
83
|
+
protected onColumnDrop(event: CdkDragDrop<any>): void;
|
|
84
|
+
protected resetTableConfig(): void;
|
|
76
85
|
compareWithId(a: {
|
|
77
86
|
_id: string;
|
|
78
87
|
}, b: {
|
|
@@ -87,7 +96,7 @@ export declare class ItemListComponent {
|
|
|
87
96
|
onNextPage(page: number): void;
|
|
88
97
|
onPreviousPage(page: number): void;
|
|
89
98
|
onPageSizeChange(size: number): void;
|
|
90
|
-
/** Emite item agregado y limpia selección
|
|
99
|
+
/** Emite item agregado y limpia selección */
|
|
91
100
|
_addItem(item: CbmItemModel.ListResponse.Item): void;
|
|
92
101
|
validateConfirmToAddAllItems(): Promise<void>;
|
|
93
102
|
/** Emite todos los items seleccionados y limpia estado */
|
|
@@ -97,7 +106,7 @@ export declare class ItemListComponent {
|
|
|
97
106
|
getPriceWithoutIva(item: CbmItemModel.ListResponse.Item): string;
|
|
98
107
|
/** Obtiene el precio con IVA según la lista de precios seleccionada */
|
|
99
108
|
getPriceWithIva(item: CbmItemModel.ListResponse.Item): string;
|
|
100
|
-
/** Actualiza estado reactivo de item y sincroniza con
|
|
109
|
+
/** Actualiza estado reactivo de item y sincroniza con lista de selección persistente */
|
|
101
110
|
_checkItem(item: IItemWithChecked): void;
|
|
102
111
|
removeRememberedItem(item: IItemWithChecked): void;
|
|
103
112
|
/** Marca/desmarca todos los items visibles (no agregados aún) */
|
package/lib/components/table-column-config-dropdown/table-column-config-dropdown.component.d.ts
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { FormArray, FormControl } from '@angular/forms';
|
|
2
|
+
import { TableConfigurationService } from '../../domain/services/table-configuration.service';
|
|
3
|
+
/**
|
|
4
|
+
* Componente dropdown para configurar columnas de tabla
|
|
5
|
+
* Permite mostrar/ocultar columnas con un click
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```html
|
|
9
|
+
* <app-table-column-config-dropdown
|
|
10
|
+
* [tableConfig]="tableConfigService"
|
|
11
|
+
* buttonLabel="Configurar Columnas"
|
|
12
|
+
* [showResetButton]="true"
|
|
13
|
+
* (onReset)="handleReset()"
|
|
14
|
+
* />
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export declare class TableColumnConfigDropdownComponent {
|
|
18
|
+
private fb;
|
|
19
|
+
/** Servicio de configuración de tabla */
|
|
20
|
+
tableConfig: import("@angular/core").InputSignal<TableConfigurationService>;
|
|
21
|
+
/** Texto del botón principal */
|
|
22
|
+
buttonLabel: import("@angular/core").InputSignal<string>;
|
|
23
|
+
/** Mostrar botón de "Mostrar todas" */
|
|
24
|
+
showShowAllButton: import("@angular/core").InputSignal<boolean>;
|
|
25
|
+
/** Mostrar botón de "Ocultar todas" */
|
|
26
|
+
showHideAllButton: import("@angular/core").InputSignal<boolean>;
|
|
27
|
+
/** Mostrar botón de "Resetear" */
|
|
28
|
+
showResetButton: import("@angular/core").InputSignal<boolean>;
|
|
29
|
+
/** Mostrar botón de modo de edición de anchos */
|
|
30
|
+
showEditModeButton: import("@angular/core").InputSignal<boolean>;
|
|
31
|
+
/** Icono del botón principal (clase de icono) */
|
|
32
|
+
buttonIcon: import("@angular/core").InputSignal<string>;
|
|
33
|
+
/** Posición del dropdown */
|
|
34
|
+
dropdownPosition: import("@angular/core").InputSignal<"left" | "right">;
|
|
35
|
+
/** Evento emitido cuando se resetea la configuración */
|
|
36
|
+
onReset: import("@angular/core").OutputEmitterRef<void>;
|
|
37
|
+
/** FormArray para manejar anchos de columnas reactivamente */
|
|
38
|
+
columnWidthsForm: FormArray<FormControl<string>>;
|
|
39
|
+
/**
|
|
40
|
+
* Alterna el modo de edición
|
|
41
|
+
*/
|
|
42
|
+
toggleEditMode(event: Event): void;
|
|
43
|
+
/**
|
|
44
|
+
* Actualiza el ancho de una columna
|
|
45
|
+
*/
|
|
46
|
+
updateColumnWidth(columnKey: string, value: string): void;
|
|
47
|
+
/**
|
|
48
|
+
* Obtiene el FormControl del ancho por índice
|
|
49
|
+
*/
|
|
50
|
+
getWidthControl(index: number): FormControl;
|
|
51
|
+
/**
|
|
52
|
+
* Alterna la visibilidad de una columna
|
|
53
|
+
*/
|
|
54
|
+
toggleColumn(columnKey: string, event: Event): void;
|
|
55
|
+
/**
|
|
56
|
+
* Muestra todas las columnas
|
|
57
|
+
*/
|
|
58
|
+
showAll(event: Event): void;
|
|
59
|
+
/**
|
|
60
|
+
* Oculta todas las columnas no fijas
|
|
61
|
+
*/
|
|
62
|
+
hideAll(event: Event): void;
|
|
63
|
+
/**
|
|
64
|
+
* Resetea la configuración
|
|
65
|
+
*/
|
|
66
|
+
reset(event: Event): void;
|
|
67
|
+
/**
|
|
68
|
+
* Previene el cierre del dropdown al hacer click dentro
|
|
69
|
+
*/
|
|
70
|
+
preventClose(event: Event): void;
|
|
71
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
|
2
|
+
import { TableConfigurationService } from '../domain/services/table-configuration.service';
|
|
3
|
+
/**
|
|
4
|
+
* Directiva para aplicar drag-and-drop a los headers de una tabla
|
|
5
|
+
* Permite reordenar columnas arrastrando los headers
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```html
|
|
9
|
+
* <thead appTableDragDrop [tableConfig]="tableConfigService">
|
|
10
|
+
* <tr>
|
|
11
|
+
* @for (column of tableConfig.visibleColumns(); track column.key) {
|
|
12
|
+
* <th cdkDrag>{{ column.label }}</th>
|
|
13
|
+
* }
|
|
14
|
+
* </tr>
|
|
15
|
+
* </thead>
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare class TableDragDropDirective {
|
|
19
|
+
private elementRef;
|
|
20
|
+
/** Servicio de configuración de tabla */
|
|
21
|
+
tableConfig: import("@angular/core").InputSignal<TableConfigurationService>;
|
|
22
|
+
constructor(elementRef: ElementRef<HTMLElement>);
|
|
23
|
+
/**
|
|
24
|
+
* Manejador del evento drop
|
|
25
|
+
*/
|
|
26
|
+
onDrop(event: any): void;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Directiva para aplicar a cada header individual que puede ser arrastrado
|
|
30
|
+
* Se usa en conjunto con appTableDragDrop
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```html
|
|
34
|
+
* <th appTableDragHandle [disabled]="column.fixed">
|
|
35
|
+
* <i class="mdi mdi-drag-vertical"></i>
|
|
36
|
+
* {{ column.label }}
|
|
37
|
+
* </th>
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
export declare class TableDragHandleDirective {
|
|
41
|
+
private elementRef;
|
|
42
|
+
/** Si está deshabilitado el drag (para columnas fijas) */
|
|
43
|
+
disabled: import("@angular/core").InputSignal<boolean>;
|
|
44
|
+
constructor(elementRef: ElementRef<HTMLElement>);
|
|
45
|
+
}
|
|
@@ -263,8 +263,16 @@ export declare namespace CbmItemModel {
|
|
|
263
263
|
item_stock_warehouse: number;
|
|
264
264
|
observation?: string;
|
|
265
265
|
item_stock_in_transit_warehouse: number;
|
|
266
|
+
provider_items: Item.ProviderItem[];
|
|
266
267
|
}
|
|
267
268
|
namespace Item {
|
|
269
|
+
interface ProviderItem {
|
|
270
|
+
_id: string;
|
|
271
|
+
provider_item_id: string;
|
|
272
|
+
code: string;
|
|
273
|
+
provider_id: string;
|
|
274
|
+
provider_name: string;
|
|
275
|
+
}
|
|
268
276
|
interface TaxIva {
|
|
269
277
|
_id: string;
|
|
270
278
|
code: string;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Modelo de configuración de columnas de tabla
|
|
3
|
+
* Sistema modular para gestionar visibilidad y orden de columnas
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Definición de una columna de tabla
|
|
7
|
+
*/
|
|
8
|
+
export interface ITableColumn {
|
|
9
|
+
/** Identificador único de la columna */
|
|
10
|
+
key: string;
|
|
11
|
+
/** Etiqueta visible para el usuario */
|
|
12
|
+
label: string;
|
|
13
|
+
/** Indica si la columna está visible */
|
|
14
|
+
visible: boolean;
|
|
15
|
+
/** Orden de visualización (menor número = más a la izquierda) */
|
|
16
|
+
order: number;
|
|
17
|
+
/** Si es true, la columna no se puede ocultar ni reordenar */
|
|
18
|
+
fixed?: boolean;
|
|
19
|
+
/** Ancho personalizado de la columna (opcional) */
|
|
20
|
+
width?: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Configuración completa de una tabla
|
|
24
|
+
*/
|
|
25
|
+
export interface ITableConfiguration {
|
|
26
|
+
/** ID único de la tabla para persistencia */
|
|
27
|
+
tableId: string;
|
|
28
|
+
/** Lista de columnas configurables */
|
|
29
|
+
columns: ITableColumn[];
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Evento emitido cuando cambia la configuración
|
|
33
|
+
*/
|
|
34
|
+
export interface ITableConfigChangeEvent {
|
|
35
|
+
/** Columnas actualizadas */
|
|
36
|
+
columns: ITableColumn[];
|
|
37
|
+
/** Tipo de cambio realizado */
|
|
38
|
+
changeType: 'visibility' | 'order' | 'reset';
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Namespace para tipos relacionados con configuración de tablas
|
|
42
|
+
*/
|
|
43
|
+
export declare namespace ITableConfig {
|
|
44
|
+
/**
|
|
45
|
+
* Parámetros para inicializar una configuración de tabla
|
|
46
|
+
*/
|
|
47
|
+
interface InitParams {
|
|
48
|
+
tableId: string;
|
|
49
|
+
columns: Omit<ITableColumn, 'order'>[];
|
|
50
|
+
persistInLocalStorage?: boolean;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Estado de configuración almacenado
|
|
54
|
+
*/
|
|
55
|
+
interface StoredConfig {
|
|
56
|
+
tableId: string;
|
|
57
|
+
columns: (Pick<ITableColumn, 'key' | 'visible' | 'order'> & {
|
|
58
|
+
width?: string;
|
|
59
|
+
})[];
|
|
60
|
+
lastUpdated: string;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { ITableColumn, ITableConfiguration, ITableConfig } from '../models/table-config.model';
|
|
2
|
+
/**
|
|
3
|
+
* Servicio de gestión de configuración de tablas
|
|
4
|
+
* Maneja visibilidad, orden y persistencia de columnas
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```typescript
|
|
8
|
+
* // En el componente
|
|
9
|
+
* tableConfig = new TableConfigurationService();
|
|
10
|
+
*
|
|
11
|
+
* ngOnInit() {
|
|
12
|
+
* this.tableConfig.initialize({
|
|
13
|
+
* tableId: 'my-unique-table-id',
|
|
14
|
+
* columns: [
|
|
15
|
+
* { key: 'name', label: 'Nombre', visible: true },
|
|
16
|
+
* { key: 'code', label: 'Código', visible: true },
|
|
17
|
+
* { key: 'price', label: 'Precio', visible: false }
|
|
18
|
+
* ],
|
|
19
|
+
* persistInLocalStorage: true
|
|
20
|
+
* });
|
|
21
|
+
* }
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export declare class TableConfigurationService {
|
|
25
|
+
/** Configuración actual de la tabla */
|
|
26
|
+
private readonly _configuration;
|
|
27
|
+
/** Flag que indica si se debe persistir en localStorage */
|
|
28
|
+
private readonly _persistEnabled;
|
|
29
|
+
/** Modo de edición de anchos de columna */
|
|
30
|
+
private readonly _editMode;
|
|
31
|
+
/** Indica si el modo de edición está activo (read-only) */
|
|
32
|
+
readonly editMode: import("@angular/core").Signal<boolean>;
|
|
33
|
+
/** Configuración completa (read-only) */
|
|
34
|
+
readonly configuration: import("@angular/core").Signal<ITableConfiguration>;
|
|
35
|
+
/** Solo columnas visibles ordenadas */
|
|
36
|
+
readonly visibleColumns: import("@angular/core").Signal<ITableColumn[]>;
|
|
37
|
+
/** Solo columnas ocultas */
|
|
38
|
+
readonly hiddenColumns: import("@angular/core").Signal<ITableColumn[]>;
|
|
39
|
+
/** Todas las columnas ordenadas */
|
|
40
|
+
readonly allColumns: import("@angular/core").Signal<ITableColumn[]>;
|
|
41
|
+
/** Número total de columnas visibles */
|
|
42
|
+
readonly visibleColumnsCount: import("@angular/core").Signal<number>;
|
|
43
|
+
/** Indica si hay columnas ocultas */
|
|
44
|
+
readonly hasHiddenColumns: import("@angular/core").Signal<boolean>;
|
|
45
|
+
/**
|
|
46
|
+
* Inicializa la configuración de la tabla
|
|
47
|
+
* Si existe configuración guardada, la carga; si no, usa la configuración inicial
|
|
48
|
+
*/
|
|
49
|
+
initialize(params: ITableConfig.InitParams): void;
|
|
50
|
+
/**
|
|
51
|
+
* Alterna la visibilidad de una columna
|
|
52
|
+
*/
|
|
53
|
+
toggleColumnVisibility(columnKey: string): void;
|
|
54
|
+
/**
|
|
55
|
+
* Muestra una columna específica
|
|
56
|
+
*/
|
|
57
|
+
showColumn(columnKey: string): void;
|
|
58
|
+
/**
|
|
59
|
+
* Oculta una columna específica
|
|
60
|
+
*/
|
|
61
|
+
hideColumn(columnKey: string): void;
|
|
62
|
+
/**
|
|
63
|
+
* Reordena las columnas después de un drag-and-drop
|
|
64
|
+
* @param previousIndex Índice anterior de la columna
|
|
65
|
+
* @param currentIndex Nuevo índice de la columna
|
|
66
|
+
*/
|
|
67
|
+
reorderColumns(previousIndex: number, currentIndex: number): void;
|
|
68
|
+
/**
|
|
69
|
+
* Muestra todas las columnas
|
|
70
|
+
*/
|
|
71
|
+
showAllColumns(): void;
|
|
72
|
+
/**
|
|
73
|
+
* Oculta todas las columnas no fijas
|
|
74
|
+
*/
|
|
75
|
+
hideAllColumns(): void;
|
|
76
|
+
/**
|
|
77
|
+
* Resetea la configuración a los valores iniciales
|
|
78
|
+
*/
|
|
79
|
+
resetConfiguration(initialColumns: Omit<ITableColumn, 'order'>[]): void;
|
|
80
|
+
/**
|
|
81
|
+
* Obtiene una columna por su key
|
|
82
|
+
*/
|
|
83
|
+
getColumn(columnKey: string): ITableColumn | null;
|
|
84
|
+
/**
|
|
85
|
+
* Verifica si una columna está visible
|
|
86
|
+
*/
|
|
87
|
+
isColumnVisible(columnKey: string): boolean;
|
|
88
|
+
/**
|
|
89
|
+
* Activa o desactiva el modo de edición de anchos
|
|
90
|
+
*/
|
|
91
|
+
toggleEditMode(): void;
|
|
92
|
+
/**
|
|
93
|
+
* Establece el modo de edición
|
|
94
|
+
*/
|
|
95
|
+
setEditMode(enabled: boolean): void;
|
|
96
|
+
/**
|
|
97
|
+
* Actualiza el ancho de una columna
|
|
98
|
+
* @param columnKey Clave de la columna
|
|
99
|
+
* @param width Nuevo ancho (ej: '150px', '20%', 'auto')
|
|
100
|
+
*/
|
|
101
|
+
setColumnWidth(columnKey: string, width: string): void;
|
|
102
|
+
/**
|
|
103
|
+
* Actualiza la configuración y persiste si está habilitado
|
|
104
|
+
*/
|
|
105
|
+
private _updateConfiguration;
|
|
106
|
+
/**
|
|
107
|
+
* Merge configuración guardada con definición actual
|
|
108
|
+
* Mantiene el orden, visibilidad y anchos guardados, pero agrega nuevas columnas
|
|
109
|
+
*/
|
|
110
|
+
private _mergeConfigurations;
|
|
111
|
+
/**
|
|
112
|
+
* Guarda la configuración en localStorage
|
|
113
|
+
*/
|
|
114
|
+
private _saveToStorage;
|
|
115
|
+
/**
|
|
116
|
+
* Carga la configuración desde localStorage
|
|
117
|
+
*/
|
|
118
|
+
private _loadFromStorage;
|
|
119
|
+
/**
|
|
120
|
+
* Limpia la configuración del localStorage
|
|
121
|
+
*/
|
|
122
|
+
private _clearStorage;
|
|
123
|
+
/**
|
|
124
|
+
* Genera la clave de localStorage
|
|
125
|
+
*/
|
|
126
|
+
private _getStorageKey;
|
|
127
|
+
/**
|
|
128
|
+
* Emite evento de cambio (para futuras integraciones con EventEmitter si es necesario)
|
|
129
|
+
*/
|
|
130
|
+
private _emitChangeEvent;
|
|
131
|
+
}
|
package/package.json
CHANGED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { AfterViewInit, ElementRef, OnChanges, Renderer2, SimpleChanges } from '@angular/core';
|
|
2
|
-
export declare class DropdownMenuDirective implements OnChanges, AfterViewInit {
|
|
3
|
-
private element;
|
|
4
|
-
private renderer2;
|
|
5
|
-
hiddenMenu: import("@angular/core").InputSignal<boolean>;
|
|
6
|
-
hiddenMenuOp: import("@angular/core").WritableSignal<boolean>;
|
|
7
|
-
constructor(element: ElementRef, renderer2: Renderer2);
|
|
8
|
-
ngAfterViewInit(): void;
|
|
9
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
10
|
-
toggle(event: Event): void;
|
|
11
|
-
private toggleMenu;
|
|
12
|
-
initStyle(): void;
|
|
13
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { AfterViewInit, ElementRef, Renderer2 } from '@angular/core';
|
|
2
|
-
export declare class DropdownDirective implements AfterViewInit {
|
|
3
|
-
private elementRef;
|
|
4
|
-
private renderer;
|
|
5
|
-
private isOpen;
|
|
6
|
-
constructor(elementRef: ElementRef, renderer: Renderer2);
|
|
7
|
-
ngAfterViewInit(): void;
|
|
8
|
-
toggleDropdown(event: MouseEvent): void;
|
|
9
|
-
closeDropdown(event: MouseEvent): void;
|
|
10
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { WritableSignal } from '@angular/core';
|
|
2
|
-
import { Router, ActivatedRoute, Params } from '@angular/router';
|
|
3
|
-
import { CbmRecordDetailMetadataModel } from "../../types";
|
|
4
|
-
export declare class OptionsComponent {
|
|
5
|
-
private router;
|
|
6
|
-
private route;
|
|
7
|
-
constructor(router: Router, route: ActivatedRoute);
|
|
8
|
-
metadata: import("@angular/core").InputSignal<CbmRecordDetailMetadataModel.metadata | null>;
|
|
9
|
-
options: import("@angular/core").InputSignal<CbmRecordDetailMetadataModel.options[] | undefined>;
|
|
10
|
-
optionInSignals: WritableSignal<WritableSignal<CbmRecordDetailMetadataModel.options>[]>;
|
|
11
|
-
executeFunction(option: WritableSignal<CbmRecordDetailMetadataModel.options>): void;
|
|
12
|
-
navigate(routerLink?: string, queryParams?: Params): void;
|
|
13
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { AfterViewInit, ElementRef, OnChanges, Renderer2, SimpleChanges } from '@angular/core';
|
|
2
|
-
export declare class DropdownMenuDirective implements OnChanges, AfterViewInit {
|
|
3
|
-
private element;
|
|
4
|
-
private renderer2;
|
|
5
|
-
hiddenMenu: import("@angular/core").InputSignal<boolean>;
|
|
6
|
-
hiddenMenuOp: import("@angular/core").WritableSignal<boolean>;
|
|
7
|
-
constructor(element: ElementRef, renderer2: Renderer2);
|
|
8
|
-
ngAfterViewInit(): void;
|
|
9
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
10
|
-
toggle(event: Event): void;
|
|
11
|
-
private toggleMenu;
|
|
12
|
-
initStyle(): void;
|
|
13
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ElementRef, Renderer2 } from '@angular/core';
|
|
2
|
-
export declare class DropdownDirective {
|
|
3
|
-
private elementRef;
|
|
4
|
-
private renderer;
|
|
5
|
-
private isOpen;
|
|
6
|
-
constructor(elementRef: ElementRef, renderer: Renderer2);
|
|
7
|
-
toggleDropdown(event: MouseEvent): void;
|
|
8
|
-
closeDropdown(event: MouseEvent): void;
|
|
9
|
-
}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
export declare namespace CbmSalesPendingDocumentModel {
|
|
2
|
-
type TTypeEstablishment = 'matrix' | 'branch';
|
|
3
|
-
export interface ListParams {
|
|
4
|
-
page: number;
|
|
5
|
-
size: number;
|
|
6
|
-
document_number?: string;
|
|
7
|
-
date_end?: number;
|
|
8
|
-
date_begin?: number;
|
|
9
|
-
client_id?: string;
|
|
10
|
-
client_branch_id?: string;
|
|
11
|
-
type?: string;
|
|
12
|
-
}
|
|
13
|
-
export interface ListResponse {
|
|
14
|
-
success: boolean;
|
|
15
|
-
pageNum: number;
|
|
16
|
-
pageSize: number;
|
|
17
|
-
pages: number;
|
|
18
|
-
total: number;
|
|
19
|
-
totales: ListResponse.totales;
|
|
20
|
-
items: ListResponse.Item[];
|
|
21
|
-
}
|
|
22
|
-
export namespace ListResponse {
|
|
23
|
-
interface Item {
|
|
24
|
-
_id: string;
|
|
25
|
-
created_at: number;
|
|
26
|
-
document_nomenclature: string;
|
|
27
|
-
document_emission_point_number: string;
|
|
28
|
-
document_sequence: string;
|
|
29
|
-
balance: number;
|
|
30
|
-
client_id: string;
|
|
31
|
-
client_payment_deadline?: number;
|
|
32
|
-
client_credit_limit?: number;
|
|
33
|
-
client_business_name: string;
|
|
34
|
-
client_trade_name: string;
|
|
35
|
-
client_document_number: string;
|
|
36
|
-
client_credit_application: boolean;
|
|
37
|
-
client_price_list_id: string;
|
|
38
|
-
client_price_list_code: string;
|
|
39
|
-
client_price_list_name: string;
|
|
40
|
-
client_document_type_id: string;
|
|
41
|
-
client_document_type_name: string;
|
|
42
|
-
client_document_type_code: string;
|
|
43
|
-
client_category_id: string;
|
|
44
|
-
client_category_name: string;
|
|
45
|
-
client_branch_id: string;
|
|
46
|
-
client_branch_code: string;
|
|
47
|
-
client_branch_name: string;
|
|
48
|
-
client_branch_address: string;
|
|
49
|
-
client_branch_email: string[];
|
|
50
|
-
client_branch_phone_code?: string;
|
|
51
|
-
client_branch_phone?: string;
|
|
52
|
-
client_branch_cellphone?: string;
|
|
53
|
-
client_branch_type_establishment: `${TTypeEstablishment}`;
|
|
54
|
-
client_branch_province_id?: string;
|
|
55
|
-
client_branch_province_code?: string;
|
|
56
|
-
client_branch_province_name?: string;
|
|
57
|
-
client_branch_canton_id?: string;
|
|
58
|
-
client_branch_canton_code?: string;
|
|
59
|
-
client_branch_canton_name?: string;
|
|
60
|
-
client_branch_parish_id?: string;
|
|
61
|
-
client_branch_parish_code?: string;
|
|
62
|
-
client_branch_parish_name?: string;
|
|
63
|
-
client_branch_longitude?: number;
|
|
64
|
-
client_branch_latitude?: number;
|
|
65
|
-
client_branch_seller_id: string;
|
|
66
|
-
client_branch_seller_identification_number: string;
|
|
67
|
-
client_branch_seller_full_name: string;
|
|
68
|
-
client_branch_seller_address: string;
|
|
69
|
-
client_branch_seller_email: string[];
|
|
70
|
-
client_branch_seller_cellphone: string;
|
|
71
|
-
client_branch_contact_id?: string;
|
|
72
|
-
client_branch_contact_identification_number?: string;
|
|
73
|
-
client_branch_contact_full_name?: string;
|
|
74
|
-
client_branch_contact_cellphone?: string;
|
|
75
|
-
client_branch_contact_email?: string[];
|
|
76
|
-
new_document_number: string;
|
|
77
|
-
date: number;
|
|
78
|
-
type: string;
|
|
79
|
-
checked?: boolean;
|
|
80
|
-
}
|
|
81
|
-
interface totales {
|
|
82
|
-
total_retention?: number;
|
|
83
|
-
total_down_payment?: number;
|
|
84
|
-
total_credit_note?: number;
|
|
85
|
-
total_initial_balance_retention?: number;
|
|
86
|
-
total_initial_balance_down_payment?: number;
|
|
87
|
-
total_initial_balance_credit_note?: number;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
export {};
|
|
91
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { CbmSalesPendingDocumentModel } from '../models/sales-pending-document.domain.model';
|
|
3
|
-
import { ICbmSalesPendingDocumentRepository } from '../../infrastructure/repositories/sales-pending-document.infrastructure.repository';
|
|
4
|
-
export declare class CbmSalesPendingDocumentRepository implements ICbmSalesPendingDocumentRepository {
|
|
5
|
-
private service;
|
|
6
|
-
constructor(service: ICbmSalesPendingDocumentRepository);
|
|
7
|
-
list(params: CbmSalesPendingDocumentModel.ListParams): Observable<CbmSalesPendingDocumentModel.ListResponse>;
|
|
8
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Observable } from "rxjs";
|
|
2
|
-
import { CbmBlanketAgreementCategoryServiceModel } from "../../domain/models/blanket-agreement-category-service.domain.model";
|
|
3
|
-
export interface ICbmBlanketAgreementCategoryServiceRepository {
|
|
4
|
-
list(params: CbmBlanketAgreementCategoryServiceModel.ListParams): Observable<CbmBlanketAgreementCategoryServiceModel.ListResponse>;
|
|
5
|
-
save(data: CbmBlanketAgreementCategoryServiceModel.SaveBody): Observable<CbmBlanketAgreementCategoryServiceModel.ConfirmResponse>;
|
|
6
|
-
delete(id: string): Observable<CbmBlanketAgreementCategoryServiceModel.ConfirmResponse>;
|
|
7
|
-
}
|
package/lib/infrastructure/repositories/sales-pending-document.infrastructure.repository.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { CbmSalesPendingDocumentModel } from '../../domain/models/sales-pending-document.domain.model';
|
|
3
|
-
export interface ICbmSalesPendingDocumentRepository {
|
|
4
|
-
list(params: CbmSalesPendingDocumentModel.ListParams): Observable<CbmSalesPendingDocumentModel.ListResponse>;
|
|
5
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { HttpClient } from '@angular/common/http';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { CbmSalesPendingDocumentModel } from '../../domain/models/sales-pending-document.domain.model';
|
|
4
|
-
export declare class CbmSalesPendingDocumentService {
|
|
5
|
-
private http;
|
|
6
|
-
constructor(http: HttpClient);
|
|
7
|
-
private readonly url;
|
|
8
|
-
list(params: CbmSalesPendingDocumentModel.ListParams): Observable<CbmSalesPendingDocumentModel.ListResponse>;
|
|
9
|
-
}
|