@cbm-common/cbm-types 0.0.348 → 0.0.350
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/accounting-seat/directives/drop-down-menu.directive.d.ts +13 -0
- package/lib/components/accounting-seat/directives/drop-down.directive.d.ts +10 -0
- package/lib/components/add-client/add-client.d.ts +70 -5
- package/lib/components/add-provider/add-provider.d.ts +3 -0
- package/lib/components/add-provider/constants.d.ts +5 -0
- package/lib/components/advanced-item-search-modal/item-list/item-list.d.ts +1 -1
- package/lib/components/location-search/location-search.component.d.ts +19 -0
- package/lib/components/modal-map/animations.d.ts +1 -0
- package/lib/components/modal-map/modal-map.component.d.ts +45 -0
- package/lib/components/record-detail-metadata/components/options/options.d.ts +13 -0
- package/lib/components/record-detail-metadata/directives/drop-down-menu.directive.d.ts +13 -0
- package/lib/components/record-detail-metadata/directives/drop-down.directive.d.ts +9 -0
- package/lib/domain/models/general-settings-partners.domain.model.d.ts +1 -0
- package/lib/domain/models/nominatim.domain.model.d.ts +66 -0
- package/lib/domain/models/sales-pending-document.domain.model.d.ts +91 -0
- package/lib/domain/repositories/nominatim.domain.repository.d.ts +9 -0
- package/lib/domain/repositories/sales-pending-document.domain.repository.d.ts +8 -0
- package/lib/domain/services/leafletjs.domain.service.d.ts +13 -0
- package/lib/domain/services/web-socket/ai-web-socket.model.d.ts +43 -0
- package/lib/domain/services/web-socket/ai-web-socket.service.d.ts +46 -0
- package/lib/environments/environment.d.ts +1 -0
- package/lib/environments/environment.development.d.ts +1 -0
- package/lib/infrastructure/repositories/blanket-agreement-category-service..infrastructure.repository.d.ts +7 -0
- package/lib/infrastructure/repositories/nominatim.infrastructure.repository.d.ts +6 -0
- package/lib/infrastructure/repositories/sales-pending-document.infrastructure.repository.d.ts +5 -0
- package/lib/infrastructure/services/nominatim.infrastructure.service.d.ts +11 -0
- package/lib/infrastructure/services/sales-pending-document.infrastructure.service.d.ts +9 -0
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
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,5 +1,6 @@
|
|
|
1
|
-
import { AfterViewInit, DestroyRef, ElementRef, OnInit } from '@angular/core';
|
|
2
|
-
import { AsyncValidatorFn, FormControl, FormGroup, ValidatorFn } from '@angular/forms';
|
|
1
|
+
import { AfterViewInit, DestroyRef, ElementRef, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { AsyncValidatorFn, FormArray, FormControl, FormGroup, ValidatorFn } from '@angular/forms';
|
|
3
|
+
import { NgSelectComponent } from '@ng-select/ng-select';
|
|
3
4
|
import { Subject } from 'rxjs';
|
|
4
5
|
import { ListService, PaginatedListService } from '@cbm-common/data-access';
|
|
5
6
|
import { CbmClientGroupModel } from '../../domain/models/client-group.domain.model';
|
|
@@ -30,8 +31,23 @@ import { CbmPersonTypeUAFERepository } from '../../domain/repositories/person-ty
|
|
|
30
31
|
import { GeneralDomainService } from '../../domain/services/general.domain.service';
|
|
31
32
|
import { CbmEconomicActivitiesDomainRepository } from '../../domain/repositories/economic-activities-uafe.domain.repository';
|
|
32
33
|
import { CbmEconomicActivitiesDomainModel } from '../../domain/models/economic-activities-uafe.domain.model';
|
|
34
|
+
import { CbmTerritorialOrganizationRepository } from '../../domain/repositories/territorial-organization.domain.repository';
|
|
35
|
+
import { CbmTerritorialOrganizationModel } from '../../domain/models/territorial-organization.domain.model';
|
|
36
|
+
import { CbmSourceIncomeDomainRepository } from '../../domain/repositories/source-income.domain.repository';
|
|
37
|
+
import { CbmSourceIncomeModel } from '../../domain/models/source-income.model';
|
|
38
|
+
import { CbmCountryCodeModel } from '../../domain/models/country-code.domain.model';
|
|
39
|
+
import { ModalMapComponent } from '../modal-map/modal-map.component';
|
|
33
40
|
export type TSaveOptions = 'new' | 'view' | 'close';
|
|
34
|
-
export
|
|
41
|
+
export type TContactRow = FormGroup<{
|
|
42
|
+
_id: FormControl<string | null>;
|
|
43
|
+
identification_number: FormControl<string | null>;
|
|
44
|
+
full_name: FormControl<string | null>;
|
|
45
|
+
phone_code: FormControl<CbmCountryCodeModel.ListResponse.Data | null>;
|
|
46
|
+
cellphone: FormControl<string | null>;
|
|
47
|
+
email: FormControl<string | null>;
|
|
48
|
+
statusOfGetCi: FormControl<TStatus>;
|
|
49
|
+
}>;
|
|
50
|
+
export declare class CbmAddClientComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
35
51
|
private destroyRef;
|
|
36
52
|
private documentTypeRepository;
|
|
37
53
|
private notificationService;
|
|
@@ -48,8 +64,17 @@ export declare class CbmAddClientComponent implements OnInit, AfterViewInit {
|
|
|
48
64
|
private personTypeUAFERepository;
|
|
49
65
|
private readonly accountValidatorsDomainService;
|
|
50
66
|
private readonly generalService;
|
|
51
|
-
|
|
67
|
+
private readonly territorialOrganizationRepository;
|
|
68
|
+
private readonly sourceIncomeRepository;
|
|
69
|
+
constructor(destroyRef: DestroyRef, documentTypeRepository: CbmDocumentTypeDomainRepository, notificationService: CbmNotificationService, billingRepository: CbmBillingDomainRepository, countryCodeRepository: CbmCountryCodeDomainRepository, sellerRepository: CbmSellerDomainRepository, priceListRepository: CbmPriceListDomainRepository, clientGroupRepository: CbmClientGroupRepository, clientRepository: CbmClientDomainRepository, generalSettingsPartnersRepository: CbmGeneralSettingsPartnersDomainRepository, rateRepository: CbmRateDomainRepository, economicActivityRepository: CbmEconomicActivitiesDomainRepository, settingsProfessionsRepository: CbmSettingsProfessionsDomainRepository, personTypeUAFERepository: CbmPersonTypeUAFERepository, accountValidatorsDomainService: AccountValidatorsDomainService, generalService: GeneralDomainService, territorialOrganizationRepository: CbmTerritorialOrganizationRepository, sourceIncomeRepository: CbmSourceIncomeDomainRepository);
|
|
70
|
+
ngOnDestroy(): void;
|
|
52
71
|
dropdownMenuRef: import("@angular/core").Signal<ElementRef<HTMLUListElement> | undefined>;
|
|
72
|
+
contactDetailsTableContainerRef: import("@angular/core").Signal<ElementRef<HTMLDivElement> | undefined>;
|
|
73
|
+
contactDetailsTableRef: import("@angular/core").Signal<ElementRef<HTMLTableElement> | undefined>;
|
|
74
|
+
contactNgSelectsRefs: import("@angular/core").Signal<readonly NgSelectComponent[]>;
|
|
75
|
+
mapModal: import("@angular/core").Signal<ModalMapComponent | undefined>;
|
|
76
|
+
contactsResizeObserver?: ResizeObserver;
|
|
77
|
+
contactsMutationObserver?: MutationObserver;
|
|
53
78
|
clientId: import("@angular/core").InputSignal<string | undefined>;
|
|
54
79
|
isFromOrigin: import("@angular/core").InputSignal<boolean | undefined>;
|
|
55
80
|
document_type_code: import("@angular/core").InputSignal<string | undefined>;
|
|
@@ -78,11 +103,15 @@ export declare class CbmAddClientComponent implements OnInit, AfterViewInit {
|
|
|
78
103
|
subjectToSearchCategory$: Subject<string>;
|
|
79
104
|
sellers$: ListService<CbmSellerModel.ListResponse, CbmSellerModel.ListParams, CbmSellerModel.ListResponse.Data[]>;
|
|
80
105
|
priceLists$: ListService<CbmPriceListModel.ListResponse, CbmPriceListModel.ListParams, CbmPriceListModel.ListResponse.Data[]>;
|
|
81
|
-
countryCodes$: ListService<
|
|
106
|
+
countryCodes$: ListService<CbmCountryCodeModel.ListResponse, CbmCountryCodeModel.ListParams, CbmCountryCodeModel.ListResponse.Data[]>;
|
|
82
107
|
subjectClasses$: PaginatedListService<CbmPersonTypeUAFEModel.ListResponse, CbmPersonTypeUAFEModel.ListParams, CbmPersonTypeUAFEModel.ListResponse.Item[]>;
|
|
83
108
|
economicActivity$: PaginatedListService<CbmEconomicActivitiesDomainModel.ListResponse, CbmEconomicActivitiesDomainModel.ListParams, CbmEconomicActivitiesDomainModel.ListResponse.Data[]>;
|
|
84
109
|
rate$: PaginatedListService<CbmRateModel.ListResponse, CbmRateModel.ListParams, CbmRateModel.ListResponse.Item[]>;
|
|
85
110
|
professions$: PaginatedListService<CbmSettingsProfessionsModel.ListResponse, CbmSettingsProfessionsModel.ListParams, CbmSettingsProfessionsModel.ListResponse.Item[]>;
|
|
111
|
+
provinces$: ListService<CbmTerritorialOrganizationModel.ListProvincesResponse, CbmTerritorialOrganizationModel.ListProvincesParams, CbmTerritorialOrganizationModel.ListProvincesResponse.Data[]>;
|
|
112
|
+
cantons$: ListService<CbmTerritorialOrganizationModel.ListCantonsResponse, CbmTerritorialOrganizationModel.ListCantonsParams, CbmTerritorialOrganizationModel.ListCantonsResponse.Data[]>;
|
|
113
|
+
parishes$: ListService<CbmTerritorialOrganizationModel.ListParishesResponse, CbmTerritorialOrganizationModel.ListParishesParams, CbmTerritorialOrganizationModel.ListParishesResponse.Data[]>;
|
|
114
|
+
sourceIncomes$: PaginatedListService<CbmSourceIncomeModel.ListResponse, CbmSourceIncomeModel.ListParams, CbmSourceIncomeModel.ListResponse.Data[]>;
|
|
86
115
|
defaultDocumentNumber: string | null;
|
|
87
116
|
DOCUMENT_TYPES_CODES: {
|
|
88
117
|
readonly RUC: "04";
|
|
@@ -94,6 +123,7 @@ export declare class CbmAddClientComponent implements OnInit, AfterViewInit {
|
|
|
94
123
|
saveOption: import("@angular/core").WritableSignal<TSaveOptions | null>;
|
|
95
124
|
readonly carDelear: import("@angular/core").Signal<boolean>;
|
|
96
125
|
readonly pms: import("@angular/core").Signal<boolean>;
|
|
126
|
+
readonly additionalInformation: import("@angular/core").Signal<boolean>;
|
|
97
127
|
modalConfirmRef: import("@angular/core").Signal<CbmModalConfirmComponent | undefined>;
|
|
98
128
|
clientForm: FormGroup<{
|
|
99
129
|
documentType: FormControl<CbmDocumentTypeModel.ListResponse.Data | null>;
|
|
@@ -120,6 +150,24 @@ export declare class CbmAddClientComponent implements OnInit, AfterViewInit {
|
|
|
120
150
|
profession: FormControl<CbmSettingsProfessionsModel.ListResponse.Item | null>;
|
|
121
151
|
carDealerValue: FormControl<string | null>;
|
|
122
152
|
}>;
|
|
153
|
+
territorialForm: FormGroup<{
|
|
154
|
+
province: FormControl<CbmTerritorialOrganizationModel.ListProvincesResponse.Data | null>;
|
|
155
|
+
canton: FormControl<CbmTerritorialOrganizationModel.ListCantonsResponse.Data | null>;
|
|
156
|
+
parish: FormControl<CbmTerritorialOrganizationModel.ListParishesResponse.Data | null>;
|
|
157
|
+
latitude: FormControl<string | null>;
|
|
158
|
+
longitude: FormControl<string | null>;
|
|
159
|
+
}>;
|
|
160
|
+
contactForm: FormArray<TContactRow>;
|
|
161
|
+
additionalDataForm: FormGroup<{
|
|
162
|
+
gender: FormControl<string | null>;
|
|
163
|
+
maritalStatus: FormControl<string | null>;
|
|
164
|
+
birthdate: FormControl<string | null>;
|
|
165
|
+
nationality: FormControl<CbmCountryCodeModel.ListResponse.Data | null>;
|
|
166
|
+
commentary: FormControl<string | null>;
|
|
167
|
+
}>;
|
|
168
|
+
dinardapForm: FormGroup<{
|
|
169
|
+
sourceIncome: FormControl<CbmSourceIncomeModel.ListResponse.Data | null>;
|
|
170
|
+
}>;
|
|
123
171
|
ngOnInit(): void;
|
|
124
172
|
ngAfterViewInit(): void;
|
|
125
173
|
documentListener: () => void;
|
|
@@ -155,6 +203,10 @@ export declare class CbmAddClientComponent implements OnInit, AfterViewInit {
|
|
|
155
203
|
}, b: {
|
|
156
204
|
_id: string;
|
|
157
205
|
}): boolean;
|
|
206
|
+
setGeographicalData(coords: {
|
|
207
|
+
lat: number;
|
|
208
|
+
lng: number;
|
|
209
|
+
}): void;
|
|
158
210
|
cellphoneValidator(): ValidatorFn;
|
|
159
211
|
noWhitespaceValidator(): ValidatorFn;
|
|
160
212
|
asyncDocumentNumberValidator(): AsyncValidatorFn;
|
|
@@ -175,6 +227,18 @@ export declare class CbmAddClientComponent implements OnInit, AfterViewInit {
|
|
|
175
227
|
private checkRelatedDocument;
|
|
176
228
|
fetchCategories(searchTerm?: string): void;
|
|
177
229
|
removeEmail(email: string): void;
|
|
230
|
+
private buildContactRow;
|
|
231
|
+
addNewRowToContact(): void;
|
|
232
|
+
deleteRowToContact(index: number): void;
|
|
233
|
+
getCi(detail: TContactRow): void;
|
|
234
|
+
/**
|
|
235
|
+
* Solo cuando `additionalInformation()` está en `true`: arma la información de los navs
|
|
236
|
+
* (datos geográficos y datos adicionales como objeto, contactos como array) con el mismo
|
|
237
|
+
* nombre de campo que ya usan sus pantallas reales equivalentes (`geographical-data`,
|
|
238
|
+
* `management`, `branch/contacts`) — pendiente de confirmar con backend que el endpoint de
|
|
239
|
+
* cliente ya acepta este payload extendido.
|
|
240
|
+
*/
|
|
241
|
+
private buildAdditionalInformationPayload;
|
|
178
242
|
saveClient(callback: (newClientId: string) => void): void;
|
|
179
243
|
addClientAndNew(): void;
|
|
180
244
|
addClientAndView(): void;
|
|
@@ -186,4 +250,5 @@ export declare class CbmAddClientComponent implements OnInit, AfterViewInit {
|
|
|
186
250
|
validateUpdateClientForm(): Promise<void>;
|
|
187
251
|
onCancelModalConfirm(): void;
|
|
188
252
|
onCancelPress(): void;
|
|
253
|
+
private resetNavForms;
|
|
189
254
|
}
|
|
@@ -91,6 +91,8 @@ export declare class CbmAddProviderComponent {
|
|
|
91
91
|
isRelatedParty: FormControl<boolean>;
|
|
92
92
|
economicActivitySelector: FormControl<CbmEconomicActivitiesDomainModel.ListResponse.Data | null>;
|
|
93
93
|
}>;
|
|
94
|
+
subjectClass: import("@angular/core").Signal<CbmAddProviderModel.SubjectClass | null>;
|
|
95
|
+
filteredDocumentTypes: import("@angular/core").Signal<CbmDocumentTypeModel.ListResponse.Data[]>;
|
|
94
96
|
economicActivity$: PaginatedListService<CbmEconomicActivitiesDomainModel.ListResponse, CbmEconomicActivitiesDomainModel.ListParams, CbmEconomicActivitiesDomainModel.ListResponse.Data[]>;
|
|
95
97
|
ngOnInit(): void;
|
|
96
98
|
get documentTypeControl(): FormControl<CbmDocumentTypeModel.ListResponse.Data | null>;
|
|
@@ -113,6 +115,7 @@ export declare class CbmAddProviderComponent {
|
|
|
113
115
|
}, b: {
|
|
114
116
|
_id: string;
|
|
115
117
|
}): boolean;
|
|
118
|
+
private isDocumentTypeAllowed;
|
|
116
119
|
documentNumberValidator(): ValidatorFn;
|
|
117
120
|
asyncDocumentNumberValidator(): AsyncValidatorFn;
|
|
118
121
|
noWhitespaceValidator(): ValidatorFn;
|
|
@@ -6,4 +6,9 @@ export declare const DOCUMENT_TYPES_CODES: {
|
|
|
6
6
|
readonly VENTA_A_CONSUMIDOR_FINAL: "07";
|
|
7
7
|
readonly IDENTIFICACION_DEL_EXTERIOR: "08";
|
|
8
8
|
};
|
|
9
|
+
export declare const SUBJECT_CLASS_CODES: {
|
|
10
|
+
readonly PERSONA_NATURAL: "01";
|
|
11
|
+
readonly PERSONA_JURIDICA: "02";
|
|
12
|
+
};
|
|
9
13
|
export declare const SUBJECT_CLASSES: CbmAddProviderModel.SubjectClass[];
|
|
14
|
+
export declare const PERSONA_JURIDICA_DOCUMENT_TYPE_CODES: string[];
|
|
@@ -70,7 +70,7 @@ export declare class ItemListComponent implements OnInit {
|
|
|
70
70
|
isSmallScreen: import("@angular/core").WritableSignal<boolean>;
|
|
71
71
|
sortBy: import("@angular/core").WritableSignal<string | null>;
|
|
72
72
|
sortOrder: import("@angular/core").WritableSignal<"desc" | "asc">;
|
|
73
|
-
sortStockBy: import("@angular/core").WritableSignal<"
|
|
73
|
+
sortStockBy: import("@angular/core").WritableSignal<"general" | "warehouse" | "transit" | null>;
|
|
74
74
|
withStock: import("@angular/core").Signal<boolean>;
|
|
75
75
|
withProviderCode: import("@angular/core").Signal<boolean>;
|
|
76
76
|
excludeFilters: import("@angular/core").Signal<string[]>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { DestroyRef, OnInit } from '@angular/core';
|
|
2
|
+
import { FormControl } from '@angular/forms';
|
|
3
|
+
import { INominatimModel } from '../../domain/models/nominatim.domain.model';
|
|
4
|
+
import { NominatimDomainRepository } from '../../domain/repositories/nominatim.domain.repository';
|
|
5
|
+
import { CbmAuthService } from '../../domain/services/auth/auth.service';
|
|
6
|
+
export declare class LocationSearchComponent implements OnInit {
|
|
7
|
+
private readonly destroyRef;
|
|
8
|
+
private readonly nominatimRepository;
|
|
9
|
+
private readonly authService;
|
|
10
|
+
constructor(destroyRef: DestroyRef, nominatimRepository: NominatimDomainRepository, authService: CbmAuthService);
|
|
11
|
+
searchControl: FormControl<string>;
|
|
12
|
+
nominatimData: import("@angular/core").WritableSignal<INominatimModel.Response[]>;
|
|
13
|
+
stOfLocation: import("@angular/core").WritableSignal<boolean>;
|
|
14
|
+
address: import("@angular/core").OutputEmitterRef<INominatimModel.Response>;
|
|
15
|
+
ngOnInit(): void;
|
|
16
|
+
private makeSubscriptions;
|
|
17
|
+
reverseAddress(lat: string | number, lon: string | number): Promise<void>;
|
|
18
|
+
emitValue(address: INominatimModel.Response): void;
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const fadeInOutAnimation: import("@angular/animations").AnimationTriggerMetadata;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { AfterViewInit, DestroyRef, ElementRef, EventEmitter, OnDestroy } from '@angular/core';
|
|
2
|
+
import { FormControl, FormGroup } from '@angular/forms';
|
|
3
|
+
import { CbmNotificationService } from '../../domain/services/notification/notification.service';
|
|
4
|
+
import { GeneralDomainService } from '../../domain/services/general.domain.service';
|
|
5
|
+
import { LeafletjsDomainService } from '../../domain/services/leafletjs.domain.service';
|
|
6
|
+
import { LocationSearchComponent } from '../location-search/location-search.component';
|
|
7
|
+
export declare class ModalMapComponent implements AfterViewInit, OnDestroy {
|
|
8
|
+
private readonly generalService;
|
|
9
|
+
private readonly destroyRef;
|
|
10
|
+
private readonly leafletjsService;
|
|
11
|
+
private readonly notificationService;
|
|
12
|
+
modalId: import("@angular/core").InputSignal<string>;
|
|
13
|
+
origen: 'ver' | 'fijar';
|
|
14
|
+
coordenadasSeleccionadas: EventEmitter<{
|
|
15
|
+
lat: number;
|
|
16
|
+
lng: number;
|
|
17
|
+
}>;
|
|
18
|
+
origenModal: 'ver' | 'fijar';
|
|
19
|
+
coordinates: import("@angular/core").InputSignal<{
|
|
20
|
+
latitude?: number | null;
|
|
21
|
+
longitude?: number | null;
|
|
22
|
+
} | null>;
|
|
23
|
+
private destroyMapClick$;
|
|
24
|
+
private modalElement;
|
|
25
|
+
territorialForm: FormGroup<{
|
|
26
|
+
longitude: FormControl<string | null>;
|
|
27
|
+
latitude: FormControl<string | null>;
|
|
28
|
+
}>;
|
|
29
|
+
mapRef: import("@angular/core").Signal<ElementRef<HTMLDivElement>>;
|
|
30
|
+
locationSearchComp: import("@angular/core").Signal<LocationSearchComponent>;
|
|
31
|
+
readonly stOfGeolocation: import("@angular/core").WritableSignal<boolean>;
|
|
32
|
+
constructor(generalService: GeneralDomainService, destroyRef: DestroyRef, leafletjsService: LeafletjsDomainService, notificationService: CbmNotificationService);
|
|
33
|
+
ngAfterViewInit(): void;
|
|
34
|
+
ngOnDestroy(): void;
|
|
35
|
+
private setupInitialCoordinates;
|
|
36
|
+
subObservers(): void;
|
|
37
|
+
get longitudeControl(): FormControl<string | null>;
|
|
38
|
+
get latitudeControl(): FormControl<string | null>;
|
|
39
|
+
openModal(origen: 'ver' | 'fijar'): void;
|
|
40
|
+
onCloseModal(): void;
|
|
41
|
+
setMarkert(latd: string | number, lngd: string | number): void;
|
|
42
|
+
useCurrentLocation(): void;
|
|
43
|
+
onCoords(latd: string | number, lngd: string | number): void;
|
|
44
|
+
onLngClick(lng: string | number, lati: string | number): void;
|
|
45
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
export declare namespace INominatimModel {
|
|
2
|
+
interface ParamsConfig {
|
|
3
|
+
format: 'json' | 'xml' | 'jsonv2' | 'geojson';
|
|
4
|
+
limit?: number;
|
|
5
|
+
addressdetails?: 0 | 1;
|
|
6
|
+
extratags?: 0 | 1;
|
|
7
|
+
namedetails?: 0 | 1;
|
|
8
|
+
}
|
|
9
|
+
interface Params extends ParamsConfig {
|
|
10
|
+
q: string;
|
|
11
|
+
countrycodes?: string;
|
|
12
|
+
}
|
|
13
|
+
interface ParamsReverse extends ParamsConfig {
|
|
14
|
+
lat: string | number;
|
|
15
|
+
lon: string | number;
|
|
16
|
+
}
|
|
17
|
+
interface Response {
|
|
18
|
+
place_id: number;
|
|
19
|
+
licence: string;
|
|
20
|
+
osm_type: string;
|
|
21
|
+
osm_id: number;
|
|
22
|
+
lat: string;
|
|
23
|
+
lon: string;
|
|
24
|
+
class: string;
|
|
25
|
+
type: string;
|
|
26
|
+
place_rank: number;
|
|
27
|
+
importance: number;
|
|
28
|
+
addresstype: string;
|
|
29
|
+
name: string;
|
|
30
|
+
display_name: string;
|
|
31
|
+
boundingbox: string[];
|
|
32
|
+
}
|
|
33
|
+
interface ReverseResponse {
|
|
34
|
+
place_id: number;
|
|
35
|
+
licence: string;
|
|
36
|
+
osm_type: string;
|
|
37
|
+
osm_id: number;
|
|
38
|
+
lat: string;
|
|
39
|
+
lon: string;
|
|
40
|
+
category: string;
|
|
41
|
+
type: string;
|
|
42
|
+
place_rank: number;
|
|
43
|
+
importance: number;
|
|
44
|
+
addresstype: string;
|
|
45
|
+
name: string;
|
|
46
|
+
display_name: string;
|
|
47
|
+
address: ReverseResponse.Address;
|
|
48
|
+
boundingbox: string[];
|
|
49
|
+
}
|
|
50
|
+
namespace ReverseResponse {
|
|
51
|
+
interface Address {
|
|
52
|
+
amenity: string;
|
|
53
|
+
road: string;
|
|
54
|
+
quarter: string;
|
|
55
|
+
suburb: string;
|
|
56
|
+
city_district: string;
|
|
57
|
+
city: string;
|
|
58
|
+
county: string;
|
|
59
|
+
plot: string;
|
|
60
|
+
'ISO3166-2-lvl4': string;
|
|
61
|
+
postcode: string;
|
|
62
|
+
country: string;
|
|
63
|
+
country_code: string;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { INominatimModel } from '../models/nominatim.domain.model';
|
|
3
|
+
import { INominatimInfrastructureRepository } from '../../infrastructure/repositories/nominatim.infrastructure.repository';
|
|
4
|
+
export declare class NominatimDomainRepository implements INominatimInfrastructureRepository {
|
|
5
|
+
private readonly nominatimApiService;
|
|
6
|
+
constructor(nominatimApiService: INominatimInfrastructureRepository);
|
|
7
|
+
findSearch(params: INominatimModel.Params): Observable<INominatimModel.Response[]>;
|
|
8
|
+
reverse(params: INominatimModel.ParamsReverse): Observable<INominatimModel.ReverseResponse>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import L from 'leaflet';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
export declare class LeafletjsDomainService {
|
|
4
|
+
leafletjsMap: L.Map | null;
|
|
5
|
+
marker: Map<string, L.Marker<any>>;
|
|
6
|
+
setMap(htmlDivElement: HTMLDivElement, latd: string | null, lngd: string | null): void;
|
|
7
|
+
setMarker(latd: string | number, lngd: string | number, popupContent?: string): string;
|
|
8
|
+
removeMarker(markerId: string): void;
|
|
9
|
+
removeAllMarker(): void;
|
|
10
|
+
onClick(): Observable<L.LeafletMouseEvent>;
|
|
11
|
+
disableMapInteractions(): void;
|
|
12
|
+
enableMapInteractions(): void;
|
|
13
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/** Contrato de `ai-web-socket` (namespace `/ai`): tiempo real del chat de IA. Ver cbm-backend/ai-web-socket/README.md. */
|
|
2
|
+
export declare namespace CbmAiWebSocketModel {
|
|
3
|
+
type RunStatus = 'running' | 'done' | 'error' | 'cancelled' | 'interrupted';
|
|
4
|
+
/** Evento numerado de una corrida; `event` es el JSON del SSE de ai-gateway (más `run-end`), sin interpretar. */
|
|
5
|
+
interface RunEnvelope {
|
|
6
|
+
seq: number;
|
|
7
|
+
/** Hora del servidor (epoch ms). */
|
|
8
|
+
at: number;
|
|
9
|
+
event: unknown;
|
|
10
|
+
}
|
|
11
|
+
/** `run:events`: eventos en vivo de una corrida vigilada. */
|
|
12
|
+
interface RunEvents {
|
|
13
|
+
runId: string;
|
|
14
|
+
events: RunEnvelope[];
|
|
15
|
+
}
|
|
16
|
+
/** Acuse de `run:watch`. `truncated`: hay más eventos; repetir con `afterSeq` = último `seq` recibido. */
|
|
17
|
+
type WatchAck = {
|
|
18
|
+
ok: true;
|
|
19
|
+
status: RunStatus;
|
|
20
|
+
lastSeq: number;
|
|
21
|
+
events: RunEnvelope[];
|
|
22
|
+
truncated: boolean;
|
|
23
|
+
/** Epoch ms (servidor) en que empezó la corrida; `finishedAt` solo si ya terminó. */
|
|
24
|
+
startedAt?: number;
|
|
25
|
+
finishedAt?: number;
|
|
26
|
+
conversationId?: string;
|
|
27
|
+
} | {
|
|
28
|
+
ok: false;
|
|
29
|
+
error: string;
|
|
30
|
+
};
|
|
31
|
+
interface ActiveRun {
|
|
32
|
+
runId: string;
|
|
33
|
+
conversationId?: string;
|
|
34
|
+
status: RunStatus;
|
|
35
|
+
startedAt: number;
|
|
36
|
+
lastSeq: number;
|
|
37
|
+
}
|
|
38
|
+
/** Acuse de `runs:active`. */
|
|
39
|
+
interface ActiveRunsAck {
|
|
40
|
+
ok: boolean;
|
|
41
|
+
runs?: ActiveRun[];
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { ApplicationRef } from '@angular/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { CbmAuthReactiveService } from '../auth-reactive.domain.service';
|
|
4
|
+
import { CbmAiWebSocketModel } from './ai-web-socket.model';
|
|
5
|
+
/** `name` del error con que se rechazan los mensajes en espera cuando el socket se corta (se vuelve a pedir al reconectar). */
|
|
6
|
+
export declare const CBM_AI_SOCKET_DISCONNECTED = "AiSocketDisconnected";
|
|
7
|
+
/**
|
|
8
|
+
* Conexión con `ai-web-socket` (namespace `/ai`), el tiempo real del chat de IA: el backend ejecuta la respuesta en segundo plano
|
|
9
|
+
* (`POST /chat/runs` de ai-gateway) y los eventos llegan por aquí. Es otro servicio que `ws.cbmerp.com`, por eso tiene su propio
|
|
10
|
+
* `Socket` (se crea sin conectar; `connect()` abre la conexión). Solo transporte: orden, repetidos y reintentos de los eventos
|
|
11
|
+
* los resuelve quien lo consume con `seq`.
|
|
12
|
+
*
|
|
13
|
+
* Se autentica con el token global del ERP, leído en cada (re)conexión. Sin sesión el servidor rechaza con `connect_error`
|
|
14
|
+
* `unauthorized`; si la sesión se cierra llega `session:expired` y el servidor desconecta.
|
|
15
|
+
*/
|
|
16
|
+
export declare class CbmAiWebSocketService {
|
|
17
|
+
private readonly authReactive;
|
|
18
|
+
private readonly socket;
|
|
19
|
+
private readonly pending;
|
|
20
|
+
constructor(appRef: ApplicationRef, authReactive: CbmAuthReactiveService);
|
|
21
|
+
get connected(): boolean;
|
|
22
|
+
/** Abre la conexión (si ya está abierta o conectándose no hace nada). */
|
|
23
|
+
connect(): void;
|
|
24
|
+
/** Cierra la conexión y no reconecta. */
|
|
25
|
+
disconnect(): void;
|
|
26
|
+
onConnect(): Observable<void>;
|
|
27
|
+
/** Motivo del corte (`io server disconnect`: lo cerró el servidor y socket.io NO reconecta solo). */
|
|
28
|
+
onDisconnect(): Observable<string>;
|
|
29
|
+
/** Mensaje del fallo al conectar (`unauthorized` = sin sesión). Se repite en cada intento fallido de reconexión. */
|
|
30
|
+
onConnectError(): Observable<string>;
|
|
31
|
+
onSessionExpired(): Observable<void>;
|
|
32
|
+
/** Eventos en vivo de las corridas vigiladas (`run:events`). */
|
|
33
|
+
onRunEvents(): Observable<CbmAiWebSocketModel.RunEvents>;
|
|
34
|
+
/**
|
|
35
|
+
* Se une a una corrida y devuelve lo perdido desde `afterSeq` (0 = todo). Rechaza con `name === CBM_AI_SOCKET_DISCONNECTED` si el
|
|
36
|
+
* socket no está conectado o se corta mientras espera, y con otro error si el servidor no acusa a tiempo.
|
|
37
|
+
*/
|
|
38
|
+
watchRun(runId: string, afterSeq?: number): Promise<CbmAiWebSocketModel.WatchAck>;
|
|
39
|
+
/** Deja de recibir eventos de la corrida (no la cancela). */
|
|
40
|
+
unwatchRun(runId: string): void;
|
|
41
|
+
/** Corridas en curso del usuario (retomar al recargar o desde otra pestaña). */
|
|
42
|
+
activeRuns(): Promise<CbmAiWebSocketModel.ActiveRunsAck>;
|
|
43
|
+
private request;
|
|
44
|
+
private rejectPending;
|
|
45
|
+
private disconnectedError;
|
|
46
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { INominatimModel } from '../../domain/models/nominatim.domain.model';
|
|
3
|
+
export interface INominatimInfrastructureRepository {
|
|
4
|
+
findSearch(params: INominatimModel.Params): Observable<INominatimModel.Response[]>;
|
|
5
|
+
reverse(params: INominatimModel.ParamsReverse): Observable<INominatimModel.ReverseResponse>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { INominatimModel } from '../../domain/models/nominatim.domain.model';
|
|
4
|
+
import { INominatimInfrastructureRepository } from '../repositories/nominatim.infrastructure.repository';
|
|
5
|
+
export declare class NominatimInfrastructureService implements INominatimInfrastructureRepository {
|
|
6
|
+
private readonly httpClient;
|
|
7
|
+
constructor(httpClient: HttpClient);
|
|
8
|
+
private readonly url;
|
|
9
|
+
findSearch(params: INominatimModel.Params): Observable<INominatimModel.Response[]>;
|
|
10
|
+
reverse(params: INominatimModel.ParamsReverse): Observable<INominatimModel.ReverseResponse>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
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
|
+
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -37,6 +37,8 @@ export * from './lib/domain/services/notification/notification.service';
|
|
|
37
37
|
//#region web socket service
|
|
38
38
|
export * from './lib/domain/services/web-socket/web-socket.model';
|
|
39
39
|
export * from './lib/domain/services/web-socket/web-socket.service';
|
|
40
|
+
export * from './lib/domain/services/web-socket/ai-web-socket.model';
|
|
41
|
+
export * from './lib/domain/services/web-socket/ai-web-socket.service';
|
|
40
42
|
|
|
41
43
|
//#region user repository
|
|
42
44
|
export * from './lib/domain/repositories/user.domain.repository';
|