@cbm-common/cbm-types 0.0.235 → 0.0.237

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.
@@ -10,7 +10,6 @@ import { CbmRateModel } from '../../domain/models/rate.domain.model';
10
10
  import { CbmSellerModel } from '../../domain/models/seller.domain.model';
11
11
  import { CbmSettingsProfessionsModel } from '../../domain/models/settings-professions.domain.model';
12
12
  import { CbmBillingDomainRepository } from '../../domain/repositories/billing.domain.repository';
13
- import { CbmClientCategoryDomainRepository } from '../../domain/repositories/client-category.domain.repository';
14
13
  import { CbmClientGroupRepository } from '../../domain/repositories/client-group.domain.repository';
15
14
  import { CbmClientDomainRepository } from '../../domain/repositories/client.domain.repository';
16
15
  import { CbmCountryCodeDomainRepository } from '../../domain/repositories/country-code.domain.repository';
@@ -24,6 +23,8 @@ import { CbmModalConfirmComponent } from '../modal-confirm/modal-confirm';
24
23
  import { CbmTreeSelect } from '../tree-select/types';
25
24
  import { IPagination, TStatus } from './types';
26
25
  import { AccountValidatorsDomainService } from '../../domain/services/account-validators.domain.service';
26
+ import { CbmPersonTypeUAFEModel } from '../../domain/models/person-type-uafe.domain.model';
27
+ import { CbmPersonTypeUAFERepository } from '../../domain/repositories/person-type-uafe.domain.repository';
27
28
  export type TSaveOptions = 'new' | 'view' | 'close';
28
29
  export declare class CbmAddClientComponent implements OnInit, AfterViewInit {
29
30
  private destroyRef;
@@ -36,10 +37,10 @@ export declare class CbmAddClientComponent implements OnInit, AfterViewInit {
36
37
  private clientGroupRepository;
37
38
  private clientRepository;
38
39
  private rateRepository;
39
- private clientCategoryRepository;
40
40
  private settingsProfessionsRepository;
41
+ private personTypeUAFERepository;
41
42
  private readonly accountValidatorsDomainService;
42
- constructor(destroyRef: DestroyRef, documentTypeRepository: CbmDocumentTypeDomainRepository, notificationService: CbmNotificationService, billingRepository: CbmBillingDomainRepository, countryCodeRepository: CbmCountryCodeDomainRepository, sellerRepository: CbmSellerDomainRepository, priceListRepository: CbmPriceListDomainRepository, clientGroupRepository: CbmClientGroupRepository, clientRepository: CbmClientDomainRepository, rateRepository: CbmRateDomainRepository, clientCategoryRepository: CbmClientCategoryDomainRepository, settingsProfessionsRepository: CbmSettingsProfessionsDomainRepository, accountValidatorsDomainService: AccountValidatorsDomainService);
43
+ constructor(destroyRef: DestroyRef, documentTypeRepository: CbmDocumentTypeDomainRepository, notificationService: CbmNotificationService, billingRepository: CbmBillingDomainRepository, countryCodeRepository: CbmCountryCodeDomainRepository, sellerRepository: CbmSellerDomainRepository, priceListRepository: CbmPriceListDomainRepository, clientGroupRepository: CbmClientGroupRepository, clientRepository: CbmClientDomainRepository, rateRepository: CbmRateDomainRepository, settingsProfessionsRepository: CbmSettingsProfessionsDomainRepository, personTypeUAFERepository: CbmPersonTypeUAFERepository, accountValidatorsDomainService: AccountValidatorsDomainService);
43
44
  dropdownMenuRef: import("@angular/core").Signal<ElementRef<HTMLUListElement> | undefined>;
44
45
  clientId: import("@angular/core").InputSignal<string | undefined>;
45
46
  isFromOrigin: import("@angular/core").InputSignal<boolean | undefined>;
@@ -51,7 +52,9 @@ export declare class CbmAddClientComponent implements OnInit, AfterViewInit {
51
52
  saveAndView: import("@angular/core").OutputEmitterRef<any>;
52
53
  saveAndNew: import("@angular/core").OutputEmitterRef<any>;
53
54
  update: import("@angular/core").OutputEmitterRef<any>;
55
+ allDocumentTypes: import("@angular/core").WritableSignal<CbmDocumentTypeModel.ListResponse.Data[]>;
54
56
  documentTypes: import("@angular/core").WritableSignal<CbmDocumentTypeModel.ListResponse.Data[]>;
57
+ subjectClasses: import("@angular/core").WritableSignal<CbmPersonTypeUAFEModel.ListResponse.Item[]>;
55
58
  countryCodes: import("@angular/core").WritableSignal<CbmCountryCodeModel.ListResponse.Data[]>;
56
59
  sellers: import("@angular/core").WritableSignal<CbmSellerModel.ListResponse.Data[]>;
57
60
  priceLists: import("@angular/core").WritableSignal<CbmPriceListModel.ListResponse.Data[]>;
@@ -63,6 +66,7 @@ export declare class CbmAddClientComponent implements OnInit, AfterViewInit {
63
66
  statusOfExtractClientData: import("@angular/core").WritableSignal<TStatus>;
64
67
  statusOfFetchCountryCodes: import("@angular/core").WritableSignal<TStatus>;
65
68
  statusOfFetchSellers: import("@angular/core").WritableSignal<TStatus>;
69
+ statusOfFetchSubjectClasses: import("@angular/core").WritableSignal<TStatus>;
66
70
  statusOfFetchPriceLists: import("@angular/core").WritableSignal<TStatus>;
67
71
  statusOfFetchCategories: import("@angular/core").WritableSignal<TStatus>;
68
72
  statusOfSaveClient: import("@angular/core").WritableSignal<TStatus>;
@@ -71,6 +75,7 @@ export declare class CbmAddClientComponent implements OnInit, AfterViewInit {
71
75
  isEmailInputFocused: import("@angular/core").WritableSignal<boolean>;
72
76
  statusOfFetchRate: import("@angular/core").WritableSignal<TStatus>;
73
77
  statusOfFetProfession: import("@angular/core").WritableSignal<TStatus>;
78
+ subjectToSearchSubjectClass$: Subject<string>;
74
79
  subjectToSearchDocumentType$: Subject<string>;
75
80
  subjectToSearchSeller$: Subject<string>;
76
81
  subjectToSearchPriceList$: Subject<string>;
@@ -79,6 +84,7 @@ export declare class CbmAddClientComponent implements OnInit, AfterViewInit {
79
84
  subjectToSearchProfessionType$: Subject<string>;
80
85
  ratePagination: import("@angular/core").WritableSignal<IPagination>;
81
86
  professionPagination: import("@angular/core").WritableSignal<IPagination>;
87
+ subjectClassPagination: import("@angular/core").WritableSignal<IPagination>;
82
88
  defaultDocumentNumber: string | null;
83
89
  DOCUMENT_TYPES_CODES: {
84
90
  readonly RUC: "04";
@@ -93,6 +99,7 @@ export declare class CbmAddClientComponent implements OnInit, AfterViewInit {
93
99
  documentType: FormControl<CbmDocumentTypeModel.ListResponse.Data | null>;
94
100
  documentNumber: FormControl<string | null>;
95
101
  category: FormControl<CbmClientGroupModel.ListAsTreeResponse.Category | null>;
102
+ subjectClass: FormControl<CbmPersonTypeUAFEModel.ListResponse.Item | null>;
96
103
  businessName: FormControl<string | null>;
97
104
  tradename: FormControl<string | null>;
98
105
  address: FormControl<string | null>;
@@ -116,6 +123,7 @@ export declare class CbmAddClientComponent implements OnInit, AfterViewInit {
116
123
  documentListener: () => void;
117
124
  onInputConventionalPhone(event: Event): void;
118
125
  get documentTypeControl(): FormControl<CbmDocumentTypeModel.ListResponse.Data | null>;
126
+ get subjectClassControl(): FormControl<CbmPersonTypeUAFEModel.ListResponse.Item | null>;
119
127
  get documentNumberControl(): FormControl<string | null>;
120
128
  get categoryControl(): FormControl<CbmClientGroupModel.ListAsTreeResponse.Category | null>;
121
129
  get businessNameControl(): FormControl<string | null>;
@@ -149,6 +157,7 @@ export declare class CbmAddClientComponent implements OnInit, AfterViewInit {
149
157
  private clearOptionalControlsValidators;
150
158
  fetchClientData(): void;
151
159
  fetchDocumentTypes(searchTerm?: string): void;
160
+ private loadDocumentTypesWithValidation;
152
161
  getDocumentNumberMaxLength(): number | undefined;
153
162
  getDocumentNumberPattern(): string;
154
163
  extractClientData(): void;
@@ -157,6 +166,7 @@ export declare class CbmAddClientComponent implements OnInit, AfterViewInit {
157
166
  fetchCountryCodes(): void;
158
167
  fetchProfession(searchTerm?: string): void;
159
168
  fetchSellers(searchTerm?: string): void;
169
+ fetchSubjectClasses(searchTerm?: string): void;
160
170
  fetchPriceLists(searchTerm?: string): void;
161
171
  fetchCategories(searchTerm?: string): void;
162
172
  removeEmail(email: string): void;
@@ -2,11 +2,12 @@ import { DestroyRef, ElementRef, OnInit } from '@angular/core';
2
2
  import { ControlValueAccessor } from '@angular/forms';
3
3
  import { Subject } from 'rxjs';
4
4
  import { CbmTreeSelect } from './types';
5
- type NodesT<T> = T | T[] | CbmTreeSelect.Node<T> | CbmTreeSelect.Node<T>[] | null;
5
+ type TreeOptionInput<T> = CbmTreeSelect.Children<T> | CbmTreeSelect.Node<T>;
6
+ type TreeChangeValue<T> = T | T[] | null;
6
7
  export declare class CbmTreeSelectComponent<T = any> implements OnInit, ControlValueAccessor {
7
8
  private readonly destroyRef;
8
9
  constructor(destroyRef: DestroyRef);
9
- options: import("@angular/core").InputSignal<CbmTreeSelect.Children<T> | CbmTreeSelect.Node<T>>;
10
+ options: import("@angular/core").InputSignal<TreeOptionInput<T>>;
10
11
  loading: import("@angular/core").InputSignal<boolean>;
11
12
  placeholder: import("@angular/core").InputSignal<string>;
12
13
  invalid: import("@angular/core").InputSignal<boolean>;
@@ -14,15 +15,19 @@ export declare class CbmTreeSelectComponent<T = any> implements OnInit, ControlV
14
15
  bindId: import("@angular/core").InputSignal<string>;
15
16
  compareWith: import("@angular/core").InputSignal<((o1: T, o2: T) => boolean) | null>;
16
17
  typeahead: import("@angular/core").InputSignal<Subject<string> | null>;
18
+ multiple: import("@angular/core").InputSignal<boolean>;
19
+ closeOnSelect: import("@angular/core").InputSignal<boolean | null>;
17
20
  isSmall: import("@angular/core").InputSignal<boolean>;
18
21
  protected inputPlaceholder: import("@angular/core").Signal<string>;
19
22
  protected inputLoading: import("@angular/core").Signal<boolean>;
20
23
  protected inputInvalid: import("@angular/core").Signal<boolean>;
21
24
  protected inputBindId: import("@angular/core").Signal<string>;
22
25
  protected inputBindLabel: import("@angular/core").Signal<string>;
26
+ protected inputMultiple: import("@angular/core").Signal<boolean>;
27
+ protected inputCloseOnSelect: import("@angular/core").Signal<boolean>;
28
+ protected hasSelectedValue: import("@angular/core").Signal<boolean>;
23
29
  protected containerRef: import("@angular/core").Signal<ElementRef<HTMLElement>>;
24
30
  protected inputRef: import("@angular/core").Signal<ElementRef<HTMLInputElement>>;
25
- protected optionsRef: import("@angular/core").Signal<ElementRef<HTMLElement>>;
26
31
  focused: boolean;
27
32
  protected signalFocused: import("@angular/core").WritableSignal<boolean>;
28
33
  searchTerm: string | null;
@@ -30,17 +35,33 @@ export declare class CbmTreeSelectComponent<T = any> implements OnInit, ControlV
30
35
  protected readonly notFound: {
31
36
  label: string;
32
37
  }[];
33
- protected inputOptions: import("@angular/core").WritableSignal<CbmTreeSelect.Children<T> | null>;
34
- protected selectedNode: import("@angular/core").WritableSignal<NodesT<T>>;
35
- protected selectedNodeLabel: import("@angular/core").Signal<any>;
36
- onChange: (value: any) => void;
38
+ protected inputOptions: import("@angular/core").WritableSignal<CbmTreeSelect.Children<T>>;
39
+ protected selectedNode: import("@angular/core").WritableSignal<CbmTreeSelect.Node<T> | null>;
40
+ protected selectedNodes: import("@angular/core").WritableSignal<CbmTreeSelect.Node<T>[]>;
41
+ protected selectedNodeLabel: import("@angular/core").Signal<string | null>;
42
+ onChange: (value: TreeChangeValue<T>) => void;
37
43
  onTouched: () => void;
38
44
  ngOnInit(): void;
39
- registerOnChange(fn: any): void;
40
- registerOnTouched(fn: any): void;
45
+ registerOnChange(fn: (value: TreeChangeValue<T>) => void): void;
46
+ registerOnTouched(fn: () => void): void;
41
47
  setDisabledState(isDisabled: boolean): void;
42
- writeValue(obj: any): void;
48
+ writeValue(obj: TreeChangeValue<T>): void;
43
49
  subOberservers(): void;
44
50
  setValue(node: CbmTreeSelect.Node<T> | null): void;
51
+ clearSelection(): void;
52
+ removeSelectedNode(node: CbmTreeSelect.Node<T>): void;
53
+ isSelected(node: CbmTreeSelect.Node<T>): boolean;
54
+ protected filterOptions(optionsInput: TreeOptionInput<T>, searchValue: string | null): CbmTreeSelect.Children<T>;
55
+ protected syncSelectedNodes(multiple: boolean): void;
56
+ protected mapValuesToNodes(values: readonly T[]): CbmTreeSelect.Node<T>[];
57
+ protected toggleNode(node: CbmTreeSelect.Node<T> | null): void;
58
+ protected findNodeByValue(value: T): CbmTreeSelect.Node<T> | null;
59
+ protected findNodeRecursive(children: CbmTreeSelect.Children<T>, value: T): CbmTreeSelect.Node<T> | null;
60
+ protected createNodeFromValue(value: T | null | undefined): CbmTreeSelect.Node<T> | null;
61
+ protected normalizeOptions(options: TreeOptionInput<T>): CbmTreeSelect.Children<T>;
62
+ protected resolveLabel(value: T): string;
63
+ protected compareValue(firstValue: T, secondValue: T): boolean;
64
+ protected resolveBoundId(value: T): unknown | null;
65
+ protected isRecord(value: unknown): value is Record<string, unknown>;
45
66
  }
46
67
  export {};
@@ -76,6 +76,13 @@ export declare namespace CbmClientModel {
76
76
  comment?: string;
77
77
  gender?: string;
78
78
  marital_status?: string;
79
+ nationality_id?: string;
80
+ nationality_name?: string;
81
+ nationality_code_export?: string;
82
+ nationality_code_uafe?: string;
83
+ type_subject?: string;
84
+ subject_id?: string;
85
+ description_subject?: string;
79
86
  }
80
87
  }
81
88
  interface GetOneResponse {
@@ -132,6 +139,13 @@ export declare namespace CbmClientModel {
132
139
  comment?: string;
133
140
  billing_date?: number;
134
141
  reason_request?: string;
142
+ nationality_id?: string;
143
+ nationality_name?: string;
144
+ nationality_code_export?: string;
145
+ nationality_code_uafe?: string;
146
+ subject_id?: string;
147
+ type_subject?: string;
148
+ description_subject?: string;
135
149
  }
136
150
  namespace Data {
137
151
  interface Branch {
@@ -337,6 +351,9 @@ export declare namespace CbmClientModel {
337
351
  seller_cellphone?: string;
338
352
  price_list_name?: string;
339
353
  price_list_code?: string;
354
+ subject_id: string;
355
+ type_subject: string;
356
+ description_subject: string;
340
357
  }
341
358
  namespace SaveBody {
342
359
  interface PaymentDeadline {
@@ -369,6 +386,9 @@ export declare namespace CbmClientModel {
369
386
  professions_name?: string;
370
387
  category_client_name?: string;
371
388
  request_credit_value?: number;
389
+ subject_id?: string;
390
+ type_subject?: string;
391
+ description_subject?: string;
372
392
  }
373
393
  namespace UpdateBody {
374
394
  interface PaymentDeadline {
@@ -0,0 +1,59 @@
1
+ export declare namespace CbmPersonTypeUAFEModel {
2
+ interface ListParams {
3
+ page: number;
4
+ size: number;
5
+ description?: string;
6
+ code?: string;
7
+ document_type_id?: string;
8
+ }
9
+ interface ListResponse {
10
+ success: boolean;
11
+ pageNum: number;
12
+ pageSize: number;
13
+ pages: number;
14
+ total: number;
15
+ items: ListResponse.Item[];
16
+ }
17
+ namespace ListResponse {
18
+ interface Item {
19
+ _id: string;
20
+ description?: string;
21
+ code?: string;
22
+ user_id?: string;
23
+ enabled?: boolean;
24
+ created_user?: string;
25
+ document_types?: Item.DocumentType[];
26
+ created_at?: number;
27
+ }
28
+ namespace Item {
29
+ interface DocumentType {
30
+ _id: string;
31
+ description: string;
32
+ code: string;
33
+ user_id: string;
34
+ enabled: boolean;
35
+ created_user: string;
36
+ created_at: number;
37
+ }
38
+ }
39
+ interface SaveBody {
40
+ }
41
+ namespace SaveBody {
42
+ interface Detail {
43
+ }
44
+ }
45
+ interface GetOneResponse {
46
+ success: boolean;
47
+ data: GetOneResponse.Data;
48
+ }
49
+ namespace GetOneResponse {
50
+ interface Data {
51
+ }
52
+ }
53
+ interface ConfirmResponse {
54
+ success: boolean;
55
+ message: string;
56
+ data?: any;
57
+ }
58
+ }
59
+ }
@@ -0,0 +1,8 @@
1
+ import { CbmPersonTypeUAFEModel } from "../models/person-type-uafe.domain.model";
2
+ import { Observable } from "rxjs";
3
+ import { ICbmPersonTypeUAFERepository } from "../../infrastructure/repositories/person-type-uafe.infrastructure.repository copy";
4
+ export declare class CbmPersonTypeUAFERepository implements ICbmPersonTypeUAFERepository {
5
+ private service;
6
+ constructor(service: CbmPersonTypeUAFERepository);
7
+ list(params: CbmPersonTypeUAFEModel.ListParams): Observable<CbmPersonTypeUAFEModel.ListResponse>;
8
+ }
@@ -0,0 +1,5 @@
1
+ import { Observable } from "rxjs";
2
+ import { CbmPersonTypeUAFEModel } from "../../domain/models/person-type-uafe.domain.model";
3
+ export interface ICbmPersonTypeUAFERepository {
4
+ list(params: CbmPersonTypeUAFEModel.ListParams): Observable<CbmPersonTypeUAFEModel.ListResponse>;
5
+ }
@@ -0,0 +1,10 @@
1
+ import { HttpClient } from "@angular/common/http";
2
+ import { Observable } from "rxjs";
3
+ import { CbmPersonTypeUAFEModel } from "../../domain/models/person-type-uafe.domain.model";
4
+ import { ICbmPersonTypeUAFERepository } from "../repositories/person-type-uafe.infrastructure.repository copy";
5
+ export declare class CbmPersonTypeUAFEService implements ICbmPersonTypeUAFERepository {
6
+ private http;
7
+ constructor(http: HttpClient);
8
+ private readonly url;
9
+ list(params: CbmPersonTypeUAFEModel.ListParams): Observable<CbmPersonTypeUAFEModel.ListResponse>;
10
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cbm-common/cbm-types",
3
- "version": "0.0.235",
3
+ "version": "0.0.237",
4
4
  "main": "index.js",
5
5
  "types": "public-api.d.ts",
6
6
  "exports": {
package/public-api.d.ts CHANGED
@@ -566,3 +566,6 @@ export * from './lib/domain/services/item-selection.domain.service';
566
566
 
567
567
  //#region PIN service
568
568
  export * from './lib/domain/services/PIN.domain.service';
569
+ //#region person type uafe repository
570
+ export * from './lib/domain/repositories/person-type-uafe.domain.repository';
571
+ export * from './lib/domain/models/person-type-uafe.domain.model';