@cbm-common/cbm-types 0.0.160 → 0.0.162
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-account-search-modal/advanced-account-search-modal.d.ts +61 -0
- package/lib/components/advanced-account-search-modal/constants.d.ts +1 -0
- package/lib/components/advanced-account-search-modal/types.d.ts +7 -0
- package/lib/domain/models/manufacturer.domain.model.d.ts +48 -0
- package/lib/domain/repositories/manufacturer.domain.repository.d.ts +9 -0
- package/lib/infrastructure/repositories/manufacturer.infrastructure.repository.d.ts +6 -0
- package/lib/infrastructure/services/manufacturer.infrastructure.service.d.ts +11 -0
- package/package.json +2 -2
- package/public-api.d.ts +7 -0
- 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/services/item/find-item-code.domain.service.d.ts +0 -15
- package/lib/infrastructure/repositories/blanket-agreement-category-service..infrastructure.repository.d.ts +0 -7
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { DestroyRef, OnInit } from '@angular/core';
|
|
2
|
+
import { Subject } from 'rxjs';
|
|
3
|
+
import { CbmAccountRepository } from '../../domain/repositories/account.domain.repository';
|
|
4
|
+
import { CbmAccountModel } from '../../domain/models/account.domain.model';
|
|
5
|
+
import { CbmModalConfirmComponent } from '../modal-confirm/modal-confirm';
|
|
6
|
+
import { FormControl, FormGroup } from '@angular/forms';
|
|
7
|
+
import { CbmNotificationService } from '../../domain/services/notification/notification.service';
|
|
8
|
+
import { PaginatedListService } from '@cbm-common/data-access';
|
|
9
|
+
interface IAccountWithChecked extends CbmAccountModel.ListPaginatedResponse.Item {
|
|
10
|
+
checked: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare class AdvancedAccountSearchModal implements OnInit {
|
|
13
|
+
private readonly destroyRef;
|
|
14
|
+
private accountRepository;
|
|
15
|
+
private notificationService;
|
|
16
|
+
constructor(destroyRef: DestroyRef, accountRepository: CbmAccountRepository, notificationService: CbmNotificationService);
|
|
17
|
+
modalConfirmRef: import("@angular/core").Signal<CbmModalConfirmComponent>;
|
|
18
|
+
'modal-id': import("@angular/core").InputSignal<string>;
|
|
19
|
+
isOpen: import("@angular/core").InputSignal<boolean | undefined>;
|
|
20
|
+
addedAccountsIds: import("@angular/core").InputSignal<string[]>;
|
|
21
|
+
hideTable: import("@angular/core").InputSignal<boolean>;
|
|
22
|
+
codeFilter: import("@angular/core").WritableSignal<string | undefined>;
|
|
23
|
+
nameCodeFilter: import("@angular/core").InputSignal<string | undefined>;
|
|
24
|
+
isOnlyOneAccountCoincidence: import("@angular/core").OutputEmitterRef<CbmAccountModel.ListPaginatedResponse.Item | undefined>;
|
|
25
|
+
addAccount: import("@angular/core").OutputEmitterRef<CbmAccountModel.ListPaginatedResponse.Item>;
|
|
26
|
+
addAllAccounts: import("@angular/core").OutputEmitterRef<CbmAccountModel.ListPaginatedResponse.Item[]>;
|
|
27
|
+
selectAccount: import("@angular/core").OutputEmitterRef<CbmAccountModel.ListPaginatedResponse.Item>;
|
|
28
|
+
open: import("@angular/core").OutputEmitterRef<void>;
|
|
29
|
+
close: import("@angular/core").OutputEmitterRef<void>;
|
|
30
|
+
checkAllAccounts: import("@angular/core").WritableSignal<boolean>;
|
|
31
|
+
isTableHide: import("@angular/core").WritableSignal<boolean>;
|
|
32
|
+
isFilterVisible: import("@angular/core").WritableSignal<boolean>;
|
|
33
|
+
accounts: import("@angular/core").WritableSignal<IAccountWithChecked[]>;
|
|
34
|
+
account: import("@angular/core").OutputEmitterRef<CbmAccountModel.ListPaginatedResponse.Item | undefined>;
|
|
35
|
+
checkedAccounts: import("@angular/core").WritableSignal<CbmAccountModel.ListPaginatedResponse.Item[]>;
|
|
36
|
+
isSmallScreen: import("@angular/core").WritableSignal<boolean>;
|
|
37
|
+
modalId: import("@angular/core").Signal<string>;
|
|
38
|
+
computedAccounts: import("@angular/core").Signal<IAccountWithChecked[]>;
|
|
39
|
+
isVisible: Subject<boolean>;
|
|
40
|
+
selectedAccount: import("@angular/core").WritableSignal<CbmAccountModel.ListPaginatedResponse.Item | null>;
|
|
41
|
+
accounts$: PaginatedListService<CbmAccountModel.ListPaginatedResponse, CbmAccountModel.ListPaginatedParams, CbmAccountModel.ListPaginatedResponse>;
|
|
42
|
+
formToFilter: FormGroup<{
|
|
43
|
+
nameCode: FormControl<string | null>;
|
|
44
|
+
code: FormControl<string | null>;
|
|
45
|
+
checked: FormControl<boolean | null>;
|
|
46
|
+
}>;
|
|
47
|
+
get nameCodeControl(): FormControl<string | null>;
|
|
48
|
+
get codeControl(): FormControl<string | null>;
|
|
49
|
+
ngOnInit(): void;
|
|
50
|
+
makeSubscriptions(): void;
|
|
51
|
+
makeInitialRequests(): void;
|
|
52
|
+
searchAccounts(): void;
|
|
53
|
+
fetchAccounts(rp?: boolean): Promise<void>;
|
|
54
|
+
_addAccount(account: CbmAccountModel.ListPaginatedResponse.Item): void;
|
|
55
|
+
validateConfirmToAddAllAccounts(): Promise<void>;
|
|
56
|
+
_addAllAccounts(): void;
|
|
57
|
+
_checkItem(item: IAccountWithChecked): void;
|
|
58
|
+
openModal(codeFilter?: string): void;
|
|
59
|
+
closeModal(): void;
|
|
60
|
+
}
|
|
61
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PAGE_SIZE = 20;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export declare namespace CbmManufacturerModel {
|
|
2
|
+
interface ListParams {
|
|
3
|
+
page: number;
|
|
4
|
+
size: number;
|
|
5
|
+
deleted?: boolean;
|
|
6
|
+
date_end?: number;
|
|
7
|
+
date_begin?: number;
|
|
8
|
+
user_id?: string;
|
|
9
|
+
enabled?: boolean;
|
|
10
|
+
name?: string;
|
|
11
|
+
}
|
|
12
|
+
interface ListResponse {
|
|
13
|
+
success: boolean;
|
|
14
|
+
pageNum: number;
|
|
15
|
+
pageSize: number;
|
|
16
|
+
pages: number;
|
|
17
|
+
total: number;
|
|
18
|
+
items: ListResponse.Item[];
|
|
19
|
+
}
|
|
20
|
+
namespace ListResponse {
|
|
21
|
+
interface Item {
|
|
22
|
+
_id: string;
|
|
23
|
+
company_id: string;
|
|
24
|
+
user_id: string;
|
|
25
|
+
name: string;
|
|
26
|
+
enabled: boolean;
|
|
27
|
+
deleted: boolean;
|
|
28
|
+
created_user: string;
|
|
29
|
+
created_at: number;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
interface GetOne {
|
|
33
|
+
success: boolean;
|
|
34
|
+
data: GetOne.Data;
|
|
35
|
+
}
|
|
36
|
+
namespace GetOne {
|
|
37
|
+
interface Data {
|
|
38
|
+
_id: string;
|
|
39
|
+
company_id: string;
|
|
40
|
+
user_id: string;
|
|
41
|
+
name: string;
|
|
42
|
+
enabled: boolean;
|
|
43
|
+
deleted: boolean;
|
|
44
|
+
created_user: string;
|
|
45
|
+
created_at: number;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ICbmManufacturerRepository } from "../../infrastructure/repositories/manufacturer.infrastructure.repository";
|
|
2
|
+
import { Observable } from "rxjs";
|
|
3
|
+
import { CbmManufacturerModel } from "../models/manufacturer.domain.model";
|
|
4
|
+
export declare class CbmManufacturerRepository implements ICbmManufacturerRepository {
|
|
5
|
+
private readonly service;
|
|
6
|
+
constructor(service: ICbmManufacturerRepository);
|
|
7
|
+
list(params: CbmManufacturerModel.ListParams): Observable<CbmManufacturerModel.ListResponse>;
|
|
8
|
+
getOne(id: string): Observable<CbmManufacturerModel.GetOne>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
import { CbmManufacturerModel } from "../../domain/models/manufacturer.domain.model";
|
|
3
|
+
export interface ICbmManufacturerRepository {
|
|
4
|
+
list(params: CbmManufacturerModel.ListParams): Observable<CbmManufacturerModel.ListResponse>;
|
|
5
|
+
getOne(id: string): Observable<CbmManufacturerModel.GetOne>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ICbmManufacturerRepository } from "../repositories/manufacturer.infrastructure.repository";
|
|
2
|
+
import { HttpClient } from "@angular/common/http";
|
|
3
|
+
import { CbmManufacturerModel } from "../../domain/models/manufacturer.domain.model";
|
|
4
|
+
import { Observable } from "rxjs";
|
|
5
|
+
export declare class CbmManufacturerService implements ICbmManufacturerRepository {
|
|
6
|
+
private readonly http;
|
|
7
|
+
constructor(http: HttpClient);
|
|
8
|
+
private readonly url;
|
|
9
|
+
list(params: CbmManufacturerModel.ListParams): Observable<CbmManufacturerModel.ListResponse>;
|
|
10
|
+
getOne(id: string): Observable<CbmManufacturerModel.GetOne>;
|
|
11
|
+
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -508,3 +508,10 @@ export * from './lib/domain/models/blanket-agreement-category-item.domain.model'
|
|
|
508
508
|
//#endregion blanket agreement repository
|
|
509
509
|
export * from './lib/domain/repositories/blanket-agreement.domain.repository';
|
|
510
510
|
export * from './lib/domain/models/blanket-agreement.domain.model';
|
|
511
|
+
|
|
512
|
+
//#region manufacturer repository
|
|
513
|
+
export * from './lib/domain/repositories/manufacturer.domain.repository';
|
|
514
|
+
export * from './lib/domain/models/manufacturer.domain.model';
|
|
515
|
+
|
|
516
|
+
//#region Adavnced account search modal component
|
|
517
|
+
export * from './lib/components/advanced-account-search-modal/advanced-account-search-modal';
|
|
@@ -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,15 +0,0 @@
|
|
|
1
|
-
import { DestroyRef } from "@angular/core";
|
|
2
|
-
import { FormControl } from "@angular/forms";
|
|
3
|
-
import { CbmItemModel } from "@cbm-common/cbm-types";
|
|
4
|
-
import { CbmItemDomainRepository } from "../../repositories/item.domain.repository";
|
|
5
|
-
import { CbmNotificationService } from "../notification/notification.service";
|
|
6
|
-
export declare class FindItemCodeService {
|
|
7
|
-
private readonly destroyRef;
|
|
8
|
-
private readonly itemRepository;
|
|
9
|
-
private readonly notificationService;
|
|
10
|
-
private readonly codeControl;
|
|
11
|
-
private readonly itemControl;
|
|
12
|
-
constructor(destroyRef: DestroyRef, itemRepository: CbmItemDomainRepository, notificationService: CbmNotificationService, codeControl: FormControl<string>, itemControl: FormControl<Partial<CbmItemModel.ListResponse.Item> | null>);
|
|
13
|
-
loading: import("@angular/core").WritableSignal<boolean>;
|
|
14
|
-
findCode(code?: string): Promise<void>;
|
|
15
|
-
}
|
|
@@ -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
|
-
}
|