@cbm-common/cbm-types 0.0.279 → 0.0.281

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.
Files changed (19) hide show
  1. package/lib/components/accounting-seat/directives/drop-down-menu.directive.d.ts +13 -0
  2. package/lib/components/accounting-seat/directives/drop-down.directive.d.ts +10 -0
  3. package/lib/components/detail-by-section/detail-by-section.d.ts +15 -4
  4. package/lib/components/detail-by-section/detail-by-section.model.d.ts +1 -0
  5. package/lib/components/order-vehicle-add-charge/order-vehicle-add-charge.d.ts +2 -0
  6. package/lib/components/record-detail-metadata/components/options/options.d.ts +13 -0
  7. package/lib/components/record-detail-metadata/directives/drop-down-menu.directive.d.ts +13 -0
  8. package/lib/components/record-detail-metadata/directives/drop-down.directive.d.ts +9 -0
  9. package/lib/domain/models/sales-account-billing-group-by-origin.domain.model.d.ts +74 -0
  10. package/lib/domain/models/sales-pending-document.domain.model.d.ts +91 -0
  11. package/lib/domain/repositories/sales-account-billing-group-by-origin.domain.repository.d.ts +8 -0
  12. package/lib/domain/repositories/sales-pending-document.domain.repository.d.ts +8 -0
  13. package/lib/domain/services/refresch-schedules.domain.service.d.ts +10 -4
  14. package/lib/infrastructure/repositories/blanket-agreement-category-service..infrastructure.repository.d.ts +7 -0
  15. package/lib/infrastructure/repositories/sales-account-billing-group-by-origin.infrastructure.repository.d.ts +5 -0
  16. package/lib/infrastructure/repositories/sales-pending-document.infrastructure.repository.d.ts +5 -0
  17. package/lib/infrastructure/services/sales-account-billing-group-by-origin.infrastructure.service.d.ts +10 -0
  18. package/lib/infrastructure/services/sales-pending-document.infrastructure.service.d.ts +9 -0
  19. package/package.json +1 -1
@@ -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,11 +1,14 @@
1
1
  import { CdkDragDrop } from '@angular/cdk/drag-drop';
2
- import { DestroyRef } from '@angular/core';
2
+ import { DestroyRef, OnInit } from '@angular/core';
3
3
  import { FormControl } from '@angular/forms';
4
4
  import { CbmDetailBySectionModel } from './detail-by-section.model';
5
+ import { CbmSalesAccountBillingGroupByOriginDomainRepository } from '../../domain/repositories/sales-account-billing-group-by-origin.domain.repository';
6
+ import { CbmNotificationService } from '../../domain/services/notification/notification.service';
5
7
  type TDetailCategory = 'all' | 'item' | 'service' | 'subcontracted';
6
8
  declare class DetailSectionControl {
7
9
  readonly id: `${string}-${string}-${string}-${string}-${string}`;
8
10
  readonly defaultTitle: string;
11
+ sectionId?: string;
9
12
  constructor(title: string);
10
13
  title: import("@angular/core").WritableSignal<string>;
11
14
  items: import("@angular/core").WritableSignal<CbmDetailBySectionModel.SectionDetail[]>;
@@ -20,10 +23,16 @@ declare class DetailSectionControl {
20
23
  resetTitleIfEmpty(value: string): void;
21
24
  toggleDetailVisibility(): void;
22
25
  }
23
- export declare class CbmDetailBySectionComponent {
26
+ export declare class CbmDetailBySectionComponent implements OnInit {
24
27
  private readonly destroyRef;
28
+ private readonly salesAccountBillingGroupByOriginRepository;
29
+ private readonly notificationService;
25
30
  EType: typeof CbmDetailBySectionModel.Type;
26
- constructor(destroyRef: DestroyRef);
31
+ private loadedConfig;
32
+ constructor(destroyRef: DestroyRef, salesAccountBillingGroupByOriginRepository: CbmSalesAccountBillingGroupByOriginDomainRepository, notificationService: CbmNotificationService);
33
+ 'collection-origin-id': import("@angular/core").InputSignal<string | null>;
34
+ 'collection-name': import("@angular/core").InputSignal<string | null>;
35
+ 'enable-loaded-settings': import("@angular/core").InputSignal<boolean>;
27
36
  labels: import("@angular/core").WritableSignal<{
28
37
  labelDetail: string;
29
38
  labelSection: string;
@@ -45,12 +54,13 @@ export declare class CbmDetailBySectionComponent {
45
54
  detailSectionAssignments: import("@angular/core").Signal<Map<string, string[]>>;
46
55
  dropListIds: import("@angular/core").Signal<string[]>;
47
56
  allSectionsConsolidated: import("@angular/core").Signal<boolean>;
57
+ ngOnInit(): void;
58
+ getConfig(): void;
48
59
  setLabels(labels: Partial<ReturnType<typeof this.labels>>): void;
49
60
  setDetail(input: Array<CbmDetailBySectionModel.InputDetail>): void;
50
61
  reset(): void;
51
62
  searchTerm(term: string): void;
52
63
  createSection(): void;
53
- distributeSections(): void;
54
64
  startEditSectionTitle(index: number): void;
55
65
  saveSectionTitle(index: number, value: string): void;
56
66
  removeSection(index: number): void;
@@ -69,6 +79,7 @@ export declare class CbmDetailBySectionComponent {
69
79
  private getSourceDetails;
70
80
  private getAvailableDetailsByType;
71
81
  private getSourceDetailsByType;
82
+ private applyLoadedConfig;
72
83
  private loadCategory;
73
84
  private getDetailKey;
74
85
  }
@@ -22,6 +22,7 @@ export declare namespace CbmDetailBySectionModel {
22
22
  }
23
23
  interface SectionSnapshot {
24
24
  id: string;
25
+ section_id?: string;
25
26
  title: string;
26
27
  isDetailHidden: boolean;
27
28
  subtotal: number;
@@ -62,6 +62,8 @@ export interface OutsourcingServiceData {
62
62
  structured_document_number: string;
63
63
  provider_document_number: string;
64
64
  provider_business_name: string;
65
+ collection_origin_id: string;
66
+ collection_origin_name: string;
65
67
  cost: number;
66
68
  }
67
69
  export interface ICustomUnitMeasureListResponse extends CbmUnitMeasureModel.ListResponse.Data {
@@ -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,74 @@
1
+ export declare namespace CbmSalesAccountBillingGroupByOriginModel {
2
+ interface GetByOriginParams {
3
+ collection_origin_id: string;
4
+ collection_origin_name: string;
5
+ }
6
+ interface GetByOriginResponse {
7
+ success: boolean;
8
+ data: GetByOriginResponse.Data;
9
+ }
10
+ namespace GetByOriginResponse {
11
+ interface Data {
12
+ collection_origin_id: string;
13
+ collection_origin_name: string;
14
+ billing_group: Data.BillingGroup;
15
+ details: Data.Detail[];
16
+ }
17
+ namespace Data {
18
+ interface BillingGroup {
19
+ _id: string;
20
+ name: string;
21
+ document_number: string;
22
+ document_nomenclature: string;
23
+ document_complete: string;
24
+ }
25
+ interface Detail {
26
+ section_id: string;
27
+ section_name: string;
28
+ order: number;
29
+ sales_account_details: Detail.SalesAccountDetail[];
30
+ }
31
+ namespace Detail {
32
+ interface SalesAccountDetail {
33
+ _id: string;
34
+ company_id: string;
35
+ country_id: string;
36
+ sales_account_id: string;
37
+ item_id: string;
38
+ item_code: string;
39
+ item_name: string;
40
+ item_barcode: string;
41
+ type: string;
42
+ category_id: string;
43
+ category_name: string;
44
+ price_list_id: string;
45
+ price_list_name: string;
46
+ cost_center_id: string;
47
+ cost_center_code: string;
48
+ cost_center_name: string;
49
+ cost_center_father_code: string;
50
+ cost_center_father_name: string;
51
+ tax_iva_id: string;
52
+ tax_iva_rate: number;
53
+ unit_measure_id: string;
54
+ unit_measure_type: string;
55
+ unit_measure_abbreviation: string;
56
+ unit_measure_name: string;
57
+ unit_measure_quantity: number;
58
+ amount: number;
59
+ price_type_id: string;
60
+ price_type: string;
61
+ price_type_description: string;
62
+ price_base: number;
63
+ total_price: number;
64
+ discount_rate: number;
65
+ unit_discount: number;
66
+ total_discount: number;
67
+ created_user: string;
68
+ created_at: number;
69
+ kit_data: any[];
70
+ }
71
+ }
72
+ }
73
+ }
74
+ }
@@ -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,8 @@
1
+ import { Observable } from 'rxjs';
2
+ import { CbmSalesAccountBillingGroupByOriginModel } from '../models/sales-account-billing-group-by-origin.domain.model';
3
+ import { ICbmSalesAccountBillingGroupByOriginInfrastructureRepository } from '../../infrastructure/repositories/sales-account-billing-group-by-origin.infrastructure.repository';
4
+ export declare class CbmSalesAccountBillingGroupByOriginDomainRepository implements ICbmSalesAccountBillingGroupByOriginInfrastructureRepository {
5
+ private readonly service;
6
+ constructor(service: ICbmSalesAccountBillingGroupByOriginInfrastructureRepository);
7
+ getByOrigin(params: CbmSalesAccountBillingGroupByOriginModel.GetByOriginParams): Observable<CbmSalesAccountBillingGroupByOriginModel.GetByOriginResponse>;
8
+ }
@@ -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
+ }
@@ -1,31 +1,37 @@
1
1
  import { OnDestroy } from "@angular/core";
2
- import { Subject } from "rxjs";
2
+ import { Observable, Subject } from "rxjs";
3
3
  import { Router } from "@angular/router";
4
4
  import { UserCalendarModel } from "../models/user-calendar.domain.model";
5
5
  import { UserCalendarDomainRepository } from "../repositories/user-calendar.domain.repository";
6
6
  import { CbmAuthReactiveService } from "./auth-reactive.domain.service";
7
- import { CbmNotificationService } from "./notification/notification.service";
8
7
  export interface AccessControlResult {
9
8
  hasAccess: boolean;
10
9
  message: string;
11
10
  scheduleInfo?: UserCalendarModel.ListResponse.Data;
12
11
  }
12
+ export interface ScheduleExpiryWarning {
13
+ endTime: string;
14
+ minutesRemaining: number;
15
+ remainingSeconds: number;
16
+ schedule: UserCalendarModel.ListResponse.Data;
17
+ }
13
18
  export declare class RefreshSchedulesDomainService implements OnDestroy {
14
19
  private userModel;
15
20
  private router;
16
21
  private authService;
17
- private notificationService;
18
22
  private readonly STORAGE_KEY;
19
23
  private readonly LAST_CHECK_KEY;
20
24
  private readonly CHECK_INTERVAL_MS;
21
25
  private accessCheckSubscription;
22
26
  private isMonitoring;
23
27
  closeInterval$: Subject<void>;
28
+ private readonly scheduleExpiryWarningSubject;
24
29
  private notifiedEndTime;
25
30
  onAccessDenied: () => void;
26
31
  onAccessGranted: (() => void) | null;
27
32
  onAccessStatusChange: ((result: AccessControlResult) => void) | null;
28
- constructor(userModel: UserCalendarDomainRepository, router: Router, authService: CbmAuthReactiveService, notificationService: CbmNotificationService);
33
+ get scheduleExpiryWarning$(): Observable<ScheduleExpiryWarning>;
34
+ constructor(userModel: UserCalendarDomainRepository, router: Router, authService: CbmAuthReactiveService);
29
35
  ngOnDestroy(): void;
30
36
  initUsershecudles(): void;
31
37
  /**
@@ -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,5 @@
1
+ import { Observable } from 'rxjs';
2
+ import { CbmSalesAccountBillingGroupByOriginModel } from '../../domain/models/sales-account-billing-group-by-origin.domain.model';
3
+ export interface ICbmSalesAccountBillingGroupByOriginInfrastructureRepository {
4
+ getByOrigin(params: CbmSalesAccountBillingGroupByOriginModel.GetByOriginParams): Observable<CbmSalesAccountBillingGroupByOriginModel.GetByOriginResponse>;
5
+ }
@@ -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,10 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { Observable } from 'rxjs';
3
+ import { CbmSalesAccountBillingGroupByOriginModel } from '../../domain/models/sales-account-billing-group-by-origin.domain.model';
4
+ import { ICbmSalesAccountBillingGroupByOriginInfrastructureRepository } from '../repositories/sales-account-billing-group-by-origin.infrastructure.repository';
5
+ export declare class CbmSalesAccountBillingGroupByOriginInfrastructureService implements ICbmSalesAccountBillingGroupByOriginInfrastructureRepository {
6
+ private readonly http;
7
+ constructor(http: HttpClient);
8
+ private readonly url;
9
+ getByOrigin(params: CbmSalesAccountBillingGroupByOriginModel.GetByOriginParams): Observable<CbmSalesAccountBillingGroupByOriginModel.GetByOriginResponse>;
10
+ }
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cbm-common/cbm-types",
3
- "version": "0.0.279",
3
+ "version": "0.0.281",
4
4
  "main": "index.js",
5
5
  "types": "public-api.d.ts",
6
6
  "exports": {