@senior-agronegocio/angular-components 1.0.4 → 1.0.6

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 (60) hide show
  1. package/components/agro-workspace/agro-lookup/agro-lookup.component.d.ts +19 -0
  2. package/components/agro-workspace/agro-workspace-switch.interface.d.ts +5 -0
  3. package/components/agro-workspace/agro-workspace-switch.service.d.ts +46 -0
  4. package/components/agro-workspace/agro-workspace-switch.service.interface.d.ts +19 -0
  5. package/components/agro-workspace/agro-workspace.component.d.ts +36 -0
  6. package/components/agro-workspace/agro-workspace.model.d.ts +6 -0
  7. package/components/agro-workspace/agro-workspace.module.d.ts +17 -0
  8. package/components/agro-workspace/e070emp/e070emp-dto.d.ts +10 -0
  9. package/components/agro-workspace/e070emp/e070emp.d.ts +13 -0
  10. package/components/agro-workspace/e070emp/e070emp.module.d.ts +7 -0
  11. package/components/agro-workspace/e070emp/e070emp.service.d.ts +15 -0
  12. package/components/agro-workspace/e070fil/e070fil-dto.d.ts +14 -0
  13. package/components/agro-workspace/e070fil/e070fil.d.ts +17 -0
  14. package/components/agro-workspace/e070fil/e070fil.module.d.ts +7 -0
  15. package/components/agro-workspace/e070fil/e070fil.service.d.ts +19 -0
  16. package/components/agro-workspace/index.d.ts +6 -0
  17. package/components/index.d.ts +2 -0
  18. package/components/modal-beauty-events/index.d.ts +4 -0
  19. package/components/modal-beauty-events/modal-beauty-events-config.d.ts +15 -0
  20. package/components/modal-beauty-events/modal-beauty-events.component.d.ts +29 -0
  21. package/components/modal-beauty-events/modal-beauty-events.service.d.ts +16 -0
  22. package/components/producer-list-modal/index.d.ts +2 -0
  23. package/components/producer-list-modal/producer-list-modal.component.d.ts +7 -5
  24. package/components/producer-list-modal/producer-list-modal.module.d.ts +1 -3
  25. package/components/producer-list-modal/producer-list-modal.service.d.ts +42 -0
  26. package/esm2022/components/agro-workspace/agro-lookup/agro-lookup.component.mjs +62 -0
  27. package/esm2022/components/agro-workspace/agro-workspace-switch.interface.mjs +2 -0
  28. package/esm2022/components/agro-workspace/agro-workspace-switch.service.interface.mjs +2 -0
  29. package/esm2022/components/agro-workspace/agro-workspace-switch.service.mjs +195 -0
  30. package/esm2022/components/agro-workspace/agro-workspace.component.mjs +152 -0
  31. package/esm2022/components/agro-workspace/agro-workspace.model.mjs +2 -0
  32. package/esm2022/components/agro-workspace/agro-workspace.module.mjs +55 -0
  33. package/esm2022/components/agro-workspace/e070emp/e070emp-dto.mjs +2 -0
  34. package/esm2022/components/agro-workspace/e070emp/e070emp.mjs +37 -0
  35. package/esm2022/components/agro-workspace/e070emp/e070emp.module.mjs +34 -0
  36. package/esm2022/components/agro-workspace/e070emp/e070emp.service.mjs +30 -0
  37. package/esm2022/components/agro-workspace/e070fil/e070fil-dto.mjs +2 -0
  38. package/esm2022/components/agro-workspace/e070fil/e070fil.mjs +44 -0
  39. package/esm2022/components/agro-workspace/e070fil/e070fil.module.mjs +49 -0
  40. package/esm2022/components/agro-workspace/e070fil/e070fil.service.mjs +36 -0
  41. package/esm2022/components/agro-workspace/index.mjs +4 -0
  42. package/esm2022/components/cancel-event-dialog/cancel-event-dialog.component.mjs +1 -1
  43. package/esm2022/components/event-control-board/event-control-board.component.mjs +1 -1
  44. package/esm2022/components/financial-title-table/financial-title-table.component.mjs +1 -1
  45. package/esm2022/components/index.mjs +3 -1
  46. package/esm2022/components/modal-beauty-events/index.mjs +3 -0
  47. package/esm2022/components/modal-beauty-events/modal-beauty-events-config.mjs +2 -0
  48. package/esm2022/components/modal-beauty-events/modal-beauty-events.component.mjs +47 -0
  49. package/esm2022/components/modal-beauty-events/modal-beauty-events.service.mjs +31 -0
  50. package/esm2022/components/modal-invoice-pj/for-contracts/modal-invoice-pj-for-contracts.component.mjs +1 -1
  51. package/esm2022/components/modal-invoice-pj/for-fixation/modal-invoice-pj-for-fixation.component.mjs +1 -1
  52. package/esm2022/components/modal-invoice-pj/for-origination/modal-invoice-pj-for-origination.component.mjs +1 -1
  53. package/esm2022/components/modal-invoice-pj/for-transfer/modal-invoice-pj-for-transfer.component.mjs +1 -1
  54. package/esm2022/components/producer-list-modal/index.mjs +2 -1
  55. package/esm2022/components/producer-list-modal/producer-list-modal.component.mjs +31 -27
  56. package/esm2022/components/producer-list-modal/producer-list-modal.module.mjs +4 -7
  57. package/esm2022/components/producer-list-modal/producer-list-modal.service.mjs +53 -0
  58. package/fesm2022/senior-agronegocio-angular-components.mjs +735 -61
  59. package/fesm2022/senior-agronegocio-angular-components.mjs.map +1 -1
  60. package/package.json +16 -10
@@ -0,0 +1,19 @@
1
+ import { EventEmitter } from "@angular/core";
2
+ import { E070Fil } from "../e070fil/e070fil";
3
+ import * as i0 from "@angular/core";
4
+ export declare class AgroWorkspaceLookupComponent {
5
+ visible: boolean;
6
+ loading: boolean;
7
+ branches: E070Fil[];
8
+ visibleChange: EventEmitter<boolean>;
9
+ branchSelected: EventEmitter<E070Fil>;
10
+ selectedBranch: E070Fil | null;
11
+ onVisibleChange(visible: boolean): void;
12
+ close(): void;
13
+ select(): void;
14
+ onSelectionChange(branch: E070Fil): void;
15
+ getBranchDocumentLabel(branch: E070Fil): string;
16
+ getCompanyLabel(branch: E070Fil): string;
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<AgroWorkspaceLookupComponent, never>;
18
+ static ɵcmp: i0.ɵɵComponentDeclaration<AgroWorkspaceLookupComponent, "s-agro-workspace-lookup", never, { "visible": { "alias": "visible"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "branches": { "alias": "branches"; "required": false; }; }, { "visibleChange": "visibleChange"; "branchSelected": "branchSelected"; }, never, never, false, never>;
19
+ }
@@ -0,0 +1,5 @@
1
+ import { BehaviorSubject } from "rxjs";
2
+ import { E070Emp } from "./e070emp/e070emp";
3
+ export interface IAgroWorkspaceSwitch {
4
+ currentCompany: BehaviorSubject<E070Emp | null>;
5
+ }
@@ -0,0 +1,46 @@
1
+ import { BehaviorSubject } from "rxjs";
2
+ import { E070FilService } from "./e070fil/e070fil.service";
3
+ import { AgroWorkspace } from "./agro-workspace.model";
4
+ import { IAgroWorkspaceSwitchService } from "./agro-workspace-switch.service.interface";
5
+ import * as i0 from "@angular/core";
6
+ export declare class AgroWorkspaceSwitchService implements IAgroWorkspaceSwitchService {
7
+ private readonly e070FilService;
8
+ private readonly currentWorkspace$;
9
+ private readonly workspaceEmpty$;
10
+ private readonly visible$;
11
+ private dbPromise;
12
+ constructor(e070FilService: E070FilService);
13
+ onWorkspaceSwitch(callback: (workspace: AgroWorkspace) => void): void;
14
+ onWorkspaceIsEmpty(callback: () => void): void;
15
+ hide(): void;
16
+ show(): void;
17
+ getVisibility(): BehaviorSubject<boolean>;
18
+ getCurrentWorkspace(): BehaviorSubject<AgroWorkspace | null>;
19
+ /**
20
+ * Carrega workspaces do usuario no IndexedDB e valida acesso no backend.
21
+ */
22
+ loadUserWorkspaces(user: string): Promise<AgroWorkspace[]>;
23
+ saveUserWorkspaces(user: string, workspaces: AgroWorkspace[]): Promise<void>;
24
+ addWorkspace(user: string, workspace: AgroWorkspace): Promise<AgroWorkspace[]>;
25
+ /**
26
+ * Seta o workspace atual e persiste no IndexedDB.
27
+ */
28
+ setCurrentWorkspace(workspace: AgroWorkspace): Promise<void>;
29
+ /**
30
+ * Recupera o workspace selecionado do IndexedDB.
31
+ */
32
+ getSelectedWorkspace(user: string): Promise<AgroWorkspace | null>;
33
+ /**
34
+ * Salva o workspace selecionado no IndexedDB.
35
+ */
36
+ private saveSelectedWorkspace;
37
+ getCurrentUser(): string;
38
+ private validateWorkspaceAccess;
39
+ private getDbRecord;
40
+ private getDb;
41
+ private openDb;
42
+ private readVisibilityFromSession;
43
+ private saveVisibilityOnSession;
44
+ static ɵfac: i0.ɵɵFactoryDeclaration<AgroWorkspaceSwitchService, never>;
45
+ static ɵprov: i0.ɵɵInjectableDeclaration<AgroWorkspaceSwitchService>;
46
+ }
@@ -0,0 +1,19 @@
1
+ import { AgroWorkspace } from "./agro-workspace.model";
2
+ export interface IAgroWorkspaceSwitchService {
3
+ /**
4
+ * As paginas podem chamar esse metodo para escutar trocas de workspace.
5
+ */
6
+ onWorkspaceSwitch(callback: (workspace: AgroWorkspace) => void): void;
7
+ /**
8
+ * Gatilho para informar que nao existe workspace configurado.
9
+ */
10
+ onWorkspaceIsEmpty(callback: () => void): void;
11
+ /**
12
+ * Oculta o componente de workspace switch.
13
+ */
14
+ hide(): void;
15
+ /**
16
+ * Exibe novamente o componente de workspace switch.
17
+ */
18
+ show(): void;
19
+ }
@@ -0,0 +1,36 @@
1
+ import { ChangeDetectorRef, OnInit } from "@angular/core";
2
+ import { BehaviorSubject } from "rxjs";
3
+ import { Workspace } from "@seniorsistemas/angular-components/workspace-switch";
4
+ import { E070Emp } from "./e070emp/e070emp";
5
+ import { E070Fil } from "./e070fil/e070fil";
6
+ import { E070FilService } from "./e070fil/e070fil.service";
7
+ import { AgroWorkspace } from "./agro-workspace.model";
8
+ import { IAgroWorkspaceSwitch } from "./agro-workspace-switch.interface";
9
+ import { AgroWorkspaceSwitchService } from "./agro-workspace-switch.service";
10
+ import * as i0 from "@angular/core";
11
+ export declare class AgroWorkspaceComponent implements OnInit, IAgroWorkspaceSwitch {
12
+ private readonly workspaceSwitchService;
13
+ private readonly e070FilService;
14
+ private readonly changeDetectorRef;
15
+ currentCompany: BehaviorSubject<E070Emp | null>;
16
+ visible: boolean;
17
+ loading: boolean;
18
+ lookupVisible: boolean;
19
+ workspaces: Workspace[];
20
+ savedWorkspaces: AgroWorkspace[];
21
+ availableBranches: E070Fil[];
22
+ constructor(workspaceSwitchService: AgroWorkspaceSwitchService, e070FilService: E070FilService, changeDetectorRef: ChangeDetectorRef);
23
+ ngOnInit(): Promise<void>;
24
+ onWorkspaceSelected(workspace: Workspace): Promise<void>;
25
+ onFooterButtonClicked(): Promise<void>;
26
+ onLookupBranchSelected(branch: E070Fil): Promise<void>;
27
+ onLookupVisibleChange(visible: boolean): void;
28
+ private loadWorkspaces;
29
+ private mapWorkspaceSwitchItems;
30
+ /**
31
+ * Formata CNPJ/CPF.
32
+ */
33
+ private formatDocument;
34
+ static ɵfac: i0.ɵɵFactoryDeclaration<AgroWorkspaceComponent, never>;
35
+ static ɵcmp: i0.ɵɵComponentDeclaration<AgroWorkspaceComponent, "s-agro-workspace", never, {}, {}, never, never, false, never>;
36
+ }
@@ -0,0 +1,6 @@
1
+ import { E070Emp } from "./e070emp/e070emp";
2
+ import { E070Fil } from "./e070fil/e070fil";
3
+ export interface AgroWorkspace {
4
+ company: E070Emp;
5
+ branch: E070Fil;
6
+ }
@@ -0,0 +1,17 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./agro-workspace.component";
3
+ import * as i2 from "./agro-lookup/agro-lookup.component";
4
+ import * as i3 from "@angular/common";
5
+ import * as i4 from "@seniorsistemas/angular-components/workspace-switch";
6
+ import * as i5 from "@seniorsistemas/angular-components/button";
7
+ import * as i6 from "@seniorsistemas/angular-components/dialog";
8
+ import * as i7 from "@seniorsistemas/platform-components";
9
+ import * as i8 from "@seniorsistemas/angular-components/loading-state";
10
+ import * as i9 from "primeng/table";
11
+ import * as i10 from "./e070emp/e070emp.module";
12
+ import * as i11 from "./e070fil/e070fil.module";
13
+ export declare class AgroWorkspaceModule {
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<AgroWorkspaceModule, never>;
15
+ static ɵmod: i0.ɵɵNgModuleDeclaration<AgroWorkspaceModule, [typeof i1.AgroWorkspaceComponent, typeof i2.AgroWorkspaceLookupComponent], [typeof i3.CommonModule, typeof i4.WorkspaceSwitchModule, typeof i5.ButtonModule, typeof i6.DialogComponent, typeof i7.HttpInterceptorModule, typeof i8.LoadingStateModule, typeof i9.TableModule, typeof i10.E070EmpModule, typeof i11.E070FilModule], [typeof i1.AgroWorkspaceComponent]>;
16
+ static ɵinj: i0.ɵɵInjectorDeclaration<AgroWorkspaceModule>;
17
+ }
@@ -0,0 +1,10 @@
1
+ export interface E070EmpDto {
2
+ id?: string;
3
+ codEmp: number;
4
+ nomEmp: string;
5
+ sigEmp: string;
6
+ createdBy?: string;
7
+ createdDate?: Date;
8
+ lastModifiedBy?: string;
9
+ lastModifiedDate?: Date;
10
+ }
@@ -0,0 +1,13 @@
1
+ import { E070EmpDto } from "./e070emp-dto";
2
+ export declare class E070Emp {
3
+ id?: string;
4
+ codEmp?: number;
5
+ nomEmp?: string;
6
+ sigEmp?: string;
7
+ createdBy?: string;
8
+ createdDate?: Date;
9
+ lastModifiedBy?: string;
10
+ lastModifiedDate?: Date;
11
+ static fromDto(e070EmpDto: E070EmpDto, originEntity?: string): E070Emp;
12
+ static toDto(e070Emp: E070Emp, originEntity?: string): E070EmpDto;
13
+ }
@@ -0,0 +1,7 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "@seniorsistemas/platform-components";
3
+ export declare class E070EmpModule {
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<E070EmpModule, never>;
5
+ static ɵmod: i0.ɵɵNgModuleDeclaration<E070EmpModule, never, [typeof i1.PermissionsModule], never>;
6
+ static ɵinj: i0.ɵɵInjectorDeclaration<E070EmpModule>;
7
+ }
@@ -0,0 +1,15 @@
1
+ import { HttpClient } from "@angular/common/http";
2
+ import { MessageService } from "primeng/api";
3
+ import { LibTranslationService as TranslateService } from "../../../services/lib-translation.service";
4
+ import { AgroEntityService, ListParams } from "../../../services/agro-entity-service";
5
+ import { E070EmpDto } from "./e070emp-dto";
6
+ import * as i0 from "@angular/core";
7
+ export declare class E070EmpService extends AgroEntityService<E070EmpDto> {
8
+ protected http: HttpClient;
9
+ protected messageService: MessageService;
10
+ protected translate: TranslateService;
11
+ constructor(http: HttpClient, messageService: MessageService, translate: TranslateService);
12
+ listExternalE001Emp(listParams: ListParams): import("rxjs").Observable<E070EmpDto>;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<E070EmpService, never>;
14
+ static ɵprov: i0.ɵɵInjectableDeclaration<E070EmpService>;
15
+ }
@@ -0,0 +1,14 @@
1
+ import { E070EmpDto } from "../e070emp/e070emp-dto";
2
+ export interface E070FilDto {
3
+ id?: string;
4
+ e070emp: E070EmpDto;
5
+ codFil: number;
6
+ nomFil: string;
7
+ sigFil: string;
8
+ numCgc: number;
9
+ cidFil: string;
10
+ createdBy?: string;
11
+ createdDate?: Date;
12
+ lastModifiedBy?: string;
13
+ lastModifiedDate?: Date;
14
+ }
@@ -0,0 +1,17 @@
1
+ import { E070FilDto } from "./e070fil-dto";
2
+ import { E070Emp } from "../e070emp/e070emp";
3
+ export declare class E070Fil {
4
+ id?: string;
5
+ e070emp?: E070Emp;
6
+ codFil?: number;
7
+ nomFil?: string;
8
+ sigFil?: string;
9
+ numCgc?: number;
10
+ cidFil?: string;
11
+ createdBy?: string;
12
+ createdDate?: Date;
13
+ lastModifiedBy?: string;
14
+ lastModifiedDate?: Date;
15
+ static fromDto(e070FilDto: E070FilDto, originEntity?: string): E070Fil;
16
+ static toDto(e070Fil: E070Fil, originEntity?: string): E070FilDto;
17
+ }
@@ -0,0 +1,7 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "@seniorsistemas/platform-components";
3
+ export declare class E070FilModule {
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<E070FilModule, never>;
5
+ static ɵmod: i0.ɵɵNgModuleDeclaration<E070FilModule, never, [typeof i1.PermissionsModule], never>;
6
+ static ɵinj: i0.ɵɵInjectorDeclaration<E070FilModule>;
7
+ }
@@ -0,0 +1,19 @@
1
+ import { HttpClient } from "@angular/common/http";
2
+ import { MessageService } from "primeng/api";
3
+ import { E070FilDto } from "./e070fil-dto";
4
+ import { AgroEntityService, ListParams } from "../../../services/agro-entity-service";
5
+ import { LibTranslationService } from "../../../services/lib-translation.service";
6
+ import * as i0 from "@angular/core";
7
+ export declare class E070FilService extends AgroEntityService<E070FilDto> {
8
+ protected http: HttpClient;
9
+ protected messageService: MessageService;
10
+ protected translate: LibTranslationService;
11
+ /**
12
+ * Exponibiliza o método get herdado para uso externo.
13
+ */
14
+ get(id: any, errorMessage?: any[]): import("rxjs").Observable<E070FilDto>;
15
+ constructor(http: HttpClient, messageService: MessageService, translate: LibTranslationService);
16
+ listExternalE001Tns(listParams: ListParams): import("rxjs").Observable<E070FilDto>;
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<E070FilService, never>;
18
+ static ɵprov: i0.ɵɵInjectableDeclaration<E070FilService>;
19
+ }
@@ -0,0 +1,6 @@
1
+ export { AgroWorkspaceComponent } from "./agro-workspace.component";
2
+ export { AgroWorkspaceModule } from "./agro-workspace.module";
3
+ export { AgroWorkspaceSwitchService } from "./agro-workspace-switch.service";
4
+ export type { AgroWorkspace } from "./agro-workspace.model";
5
+ export type { IAgroWorkspaceSwitch } from "./agro-workspace-switch.interface";
6
+ export type { IAgroWorkspaceSwitchService } from "./agro-workspace-switch.service.interface";
@@ -4,3 +4,5 @@ export * from "./cancel-event-dialog/index";
4
4
  export * from "./modal-invoice-pj/index";
5
5
  export * from "./financial-title-table/index";
6
6
  export * from "./producer-list-modal/index";
7
+ export * from "./modal-beauty-events/index";
8
+ export * from "./agro-workspace/index";
@@ -0,0 +1,4 @@
1
+ export { ModalBeautyEventsComponent } from './modal-beauty-events.component';
2
+ export { ModalBeautyEventsService } from './modal-beauty-events.service';
3
+ export type { ModalBeautyEventsConfig } from './modal-beauty-events-config';
4
+ export type { ModalBeautyEventSubElement } from './modal-beauty-events-config';
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Configuração do ModalBeautyEventsComponent.
3
+ * Passada via `DynamicDialogConfig.data` ao abrir o modal pelo serviço.
4
+ */
5
+ export interface ModalBeautyEventSubElement {
6
+ id: string;
7
+ label: string;
8
+ processed?: boolean;
9
+ }
10
+ export interface ModalBeautyEventsConfig {
11
+ /** Título exibido no cabeçalho do dialog. */
12
+ header?: string;
13
+ /** Lista de subelementos do processamento para detalhamento no modal. */
14
+ subElements?: ModalBeautyEventSubElement[];
15
+ }
@@ -0,0 +1,29 @@
1
+ import { ModalBeautyEventSubElement, ModalBeautyEventsConfig } from './modal-beauty-events-config';
2
+ import { DialogService } from 'primeng/dynamicdialog';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * Componente visual do modal de eventos de beleza.
6
+ *
7
+ * Aberto programaticamente via {@link ModalBeautyEventsService}.
8
+ * Recebe configurações através de {@link DynamicDialogConfig} e controla
9
+ * seu ciclo de vida via {@link DynamicDialogRef}.
10
+ *
11
+ * @example
12
+ * // Nunca instancie diretamente — use ModalBeautyEventsService.open()
13
+ */
14
+ export declare class ModalBeautyEventsComponent {
15
+ private readonly dialogService;
16
+ /** Configuração recebida pelo serviço via `componentInstance.config`. */
17
+ config: ModalBeautyEventsConfig;
18
+ readonly progressPercentage = 50;
19
+ showSubElements: boolean;
20
+ constructor(dialogService: DialogService);
21
+ get subElements(): ModalBeautyEventSubElement[];
22
+ /** Fecha o modal com um resultado positivo (confirmação). */
23
+ close(result?: unknown): void;
24
+ /** Descarta o modal (cancelamento). */
25
+ dismiss(): void;
26
+ toggleSubElements(): void;
27
+ static ɵfac: i0.ɵɵFactoryDeclaration<ModalBeautyEventsComponent, never>;
28
+ static ɵcmp: i0.ɵɵComponentDeclaration<ModalBeautyEventsComponent, "s-modal-beauty-events", never, {}, {}, never, never, true, never>;
29
+ }
@@ -0,0 +1,16 @@
1
+ import { ModalBeautyEventsComponent } from './modal-beauty-events.component';
2
+ import { DialogService, DynamicDialogRef } from 'primeng/dynamicdialog';
3
+ import * as i0 from "@angular/core";
4
+ export declare class ModalBeautyEventsService {
5
+ private readonly dialogService;
6
+ constructor(dialogService: DialogService);
7
+ /**
8
+ * Abre o modal de eventos de beleza.
9
+ *
10
+ * @param options Opções de configuração e exibição do modal.
11
+ * @returns Referência ao dialog aberto ({@link DialogRef}).
12
+ */
13
+ open(options: any): DynamicDialogRef<ModalBeautyEventsComponent>;
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<ModalBeautyEventsService, never>;
15
+ static ɵprov: i0.ɵɵInjectableDeclaration<ModalBeautyEventsService>;
16
+ }
@@ -1,3 +1,5 @@
1
1
  export { ProducerListModalComponent } from "./producer-list-modal.component";
2
2
  export { ProducerListModalModule } from "./producer-list-modal.module";
3
+ export { ProducerListModalService } from "./producer-list-modal.service";
3
4
  export type { ProducerListItem, ProducerListModalData } from "./producer-list-modal-data.interface";
5
+ export type { ProducerListModalServiceOptions } from "./producer-list-modal.service";
@@ -1,14 +1,16 @@
1
- import { EventEmitter } from "@angular/core";
2
1
  import { ProducerListItem, ProducerListModalData } from "./producer-list-modal-data.interface";
3
2
  import * as i0 from "@angular/core";
4
3
  export declare class ProducerListModalComponent {
4
+ private readonly cdr;
5
+ private readonly activeDialog;
5
6
  visible: boolean;
6
- data: ProducerListModalData;
7
- visibleChange: EventEmitter<boolean>;
8
- closed: EventEmitter<void>;
7
+ private _data;
8
+ set data(value: ProducerListModalData);
9
+ get data(): ProducerListModalData;
9
10
  getDisplayName(name: string): string;
11
+ getInitials(name: string): string;
10
12
  trackByProducerId(_index: number, producer: ProducerListItem): string;
11
13
  handleClose(): void;
12
14
  static ɵfac: i0.ɵɵFactoryDeclaration<ProducerListModalComponent, never>;
13
- static ɵcmp: i0.ɵɵComponentDeclaration<ProducerListModalComponent, "s-producer-list-modal", never, { "visible": { "alias": "visible"; "required": false; }; "data": { "alias": "data"; "required": false; }; }, { "visibleChange": "visibleChange"; "closed": "closed"; }, never, never, false, never>;
15
+ static ɵcmp: i0.ɵɵComponentDeclaration<ProducerListModalComponent, "s-producer-list-modal", never, { "data": { "alias": "data"; "required": false; }; }, {}, never, never, true, never>;
14
16
  }
@@ -1,9 +1,7 @@
1
1
  import * as i0 from "@angular/core";
2
2
  import * as i1 from "./producer-list-modal.component";
3
- import * as i2 from "@angular/common";
4
- import * as i3 from "primeng/dialog";
5
3
  export declare class ProducerListModalModule {
6
4
  static ɵfac: i0.ɵɵFactoryDeclaration<ProducerListModalModule, never>;
7
- static ɵmod: i0.ɵɵNgModuleDeclaration<ProducerListModalModule, [typeof i1.ProducerListModalComponent], [typeof i2.CommonModule, typeof i3.DialogModule], [typeof i1.ProducerListModalComponent]>;
5
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ProducerListModalModule, never, [typeof i1.ProducerListModalComponent], [typeof i1.ProducerListModalComponent]>;
8
6
  static ɵinj: i0.ɵɵInjectorDeclaration<ProducerListModalModule>;
9
7
  }
@@ -0,0 +1,42 @@
1
+ import { DialogService } from '@seniorsistemas/angular-components/dialog';
2
+ import { ProducerListModalData } from './producer-list-modal-data.interface';
3
+ import * as i0 from "@angular/core";
4
+ export interface ProducerListModalServiceOptions {
5
+ data: ProducerListModalData;
6
+ size?: 'sm' | 'md' | 'lg' | 'xl' | 'fullscreen';
7
+ escapeOnEsc?: boolean;
8
+ destroyClickOutside?: boolean;
9
+ }
10
+ /**
11
+ * Serviço para abrir ProducerListModal programaticamente via DialogService.
12
+ *
13
+ * Segue o padrão SDS de uso com `@seniorsistemas/angular-components/dialog`.
14
+ *
15
+ * @example
16
+ * ```typescript
17
+ * constructor(private readonly producerListModalService: ProducerListModalService) {}
18
+ *
19
+ * openProducerList(): void {
20
+ * this.producerListModalService.open({
21
+ * data: {
22
+ * title: 'Produtores',
23
+ * shouldAbbreviateNames: true,
24
+ * producers: [...]
25
+ * },
26
+ * size: 'md'
27
+ * });
28
+ * }
29
+ * ```
30
+ */
31
+ export declare class ProducerListModalService {
32
+ private readonly dialogService;
33
+ constructor(dialogService: DialogService);
34
+ /**
35
+ * Abre a modal de lista de produtores.
36
+ *
37
+ * @param options Configuração do modal (dados, tamanho, comportamento)
38
+ */
39
+ open(options: ProducerListModalServiceOptions): void;
40
+ static ɵfac: i0.ɵɵFactoryDeclaration<ProducerListModalService, never>;
41
+ static ɵprov: i0.ɵɵInjectableDeclaration<ProducerListModalService>;
42
+ }
@@ -0,0 +1,62 @@
1
+ import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from "@angular/core";
2
+ import * as i0 from "@angular/core";
3
+ import * as i1 from "@seniorsistemas/angular-components/button";
4
+ import * as i2 from "@seniorsistemas/angular-components/dialog";
5
+ import * as i3 from "@seniorsistemas/angular-components/loading-state";
6
+ import * as i4 from "primeng/table";
7
+ import * as i5 from "primeng/api";
8
+ export class AgroWorkspaceLookupComponent {
9
+ visible = false;
10
+ loading = false;
11
+ branches = [];
12
+ visibleChange = new EventEmitter();
13
+ branchSelected = new EventEmitter();
14
+ selectedBranch = null;
15
+ onVisibleChange(visible) {
16
+ this.visible = visible;
17
+ this.visibleChange.emit(visible);
18
+ }
19
+ close() {
20
+ this.selectedBranch = null;
21
+ this.onVisibleChange(false);
22
+ }
23
+ select() {
24
+ if (!this.selectedBranch) {
25
+ return;
26
+ }
27
+ this.branchSelected.emit(this.selectedBranch);
28
+ this.close();
29
+ }
30
+ onSelectionChange(branch) {
31
+ this.selectedBranch = branch;
32
+ }
33
+ getBranchDocumentLabel(branch) {
34
+ const document = branch?.numCgc;
35
+ return document ? String(document) : "-";
36
+ }
37
+ getCompanyLabel(branch) {
38
+ const code = branch?.e070emp?.codEmp;
39
+ const name = branch?.e070emp?.nomEmp;
40
+ if (code && name) {
41
+ return `${code} - ${name}`;
42
+ }
43
+ return name || "-";
44
+ }
45
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroWorkspaceLookupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
46
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: AgroWorkspaceLookupComponent, selector: "s-agro-workspace-lookup", inputs: { visible: "visible", loading: "loading", branches: "branches" }, outputs: { visibleChange: "visibleChange", branchSelected: "branchSelected" }, ngImport: i0, template: "<s-dialog\r\n [(visible)]=\"visible\"\r\n (visibleChange)=\"onVisibleChange(!!$event)\"\r\n [header]=\"'Selecionar workspace'\"\r\n size=\"lg\"\r\n contentClassName=\"agro-workspace-lookup-dialog\"\r\n>\r\n <div class=\"lookup-content\" *sLoadingState=\"loading\">\r\n <p-table\r\n [value]=\"branches\"\r\n dataKey=\"id\"\r\n selectionMode=\"single\"\r\n [selection]=\"selectedBranch\"\r\n (selectionChange)=\"onSelectionChange($event)\"\r\n responsiveLayout=\"scroll\"\r\n >\r\n <ng-template pTemplate=\"header\">\r\n <tr>\r\n <th scope=\"col\">Filial</th>\r\n <th scope=\"col\">CPF/CNPJ</th>\r\n <th scope=\"col\">Empresa</th>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-rowData>\r\n <tr [pSelectableRow]=\"rowData\">\r\n <td>{{ rowData?.nomFil || '-' }}</td>\r\n <td>{{ getBranchDocumentLabel(rowData) }}</td>\r\n <td>{{ getCompanyLabel(rowData) }}</td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n </div>\r\n\r\n <div class=\"lookup-actions\">\r\n <s-button\r\n type=\"button\"\r\n priority=\"link\"\r\n [label]=\"'Cancelar'\"\r\n (clicked)=\"close()\"\r\n ></s-button>\r\n <s-button\r\n type=\"button\"\r\n [label]=\"'Selecionar'\"\r\n [disabled]=\"!selectedBranch\"\r\n (clicked)=\"select()\"\r\n ></s-button>\r\n </div>\r\n</s-dialog>\r\n", styles: [".lookup-content{min-height:240px}.lookup-actions{display:flex;justify-content:flex-end;gap:8px;padding-top:8px}\n"], dependencies: [{ kind: "component", type: i1.ButtonComponent, selector: "s-button", inputs: ["id", "label", "tooltip", "tooltipPosition", "iconClass", "rightIconClass", "caret", "styleClass", "baseZIndex", "disabled", "auxiliary", "type", "priority", "menuOptions", "size", "slide", "animation", "badge", "iconColor"], outputs: ["clicked"] }, { kind: "component", type: i2.DialogComponent, selector: "s-dialog", inputs: ["header", "visible", "size", "contentClassName", "escapeOnEsc", "destroyClickOutside"], outputs: ["visibleChange"] }, { kind: "directive", type: i3.LoadingStateDirective, selector: "[sLoadingState]", inputs: ["sLoadingState"] }, { kind: "component", type: i4.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "virtualRowHeight", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i5.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i4.SelectableRow, selector: "[pSelectableRow]", inputs: ["pSelectableRow", "pSelectableRowIndex", "pSelectableRowDisabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
47
+ }
48
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgroWorkspaceLookupComponent, decorators: [{
49
+ type: Component,
50
+ args: [{ selector: "s-agro-workspace-lookup", changeDetection: ChangeDetectionStrategy.OnPush, template: "<s-dialog\r\n [(visible)]=\"visible\"\r\n (visibleChange)=\"onVisibleChange(!!$event)\"\r\n [header]=\"'Selecionar workspace'\"\r\n size=\"lg\"\r\n contentClassName=\"agro-workspace-lookup-dialog\"\r\n>\r\n <div class=\"lookup-content\" *sLoadingState=\"loading\">\r\n <p-table\r\n [value]=\"branches\"\r\n dataKey=\"id\"\r\n selectionMode=\"single\"\r\n [selection]=\"selectedBranch\"\r\n (selectionChange)=\"onSelectionChange($event)\"\r\n responsiveLayout=\"scroll\"\r\n >\r\n <ng-template pTemplate=\"header\">\r\n <tr>\r\n <th scope=\"col\">Filial</th>\r\n <th scope=\"col\">CPF/CNPJ</th>\r\n <th scope=\"col\">Empresa</th>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-rowData>\r\n <tr [pSelectableRow]=\"rowData\">\r\n <td>{{ rowData?.nomFil || '-' }}</td>\r\n <td>{{ getBranchDocumentLabel(rowData) }}</td>\r\n <td>{{ getCompanyLabel(rowData) }}</td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n </div>\r\n\r\n <div class=\"lookup-actions\">\r\n <s-button\r\n type=\"button\"\r\n priority=\"link\"\r\n [label]=\"'Cancelar'\"\r\n (clicked)=\"close()\"\r\n ></s-button>\r\n <s-button\r\n type=\"button\"\r\n [label]=\"'Selecionar'\"\r\n [disabled]=\"!selectedBranch\"\r\n (clicked)=\"select()\"\r\n ></s-button>\r\n </div>\r\n</s-dialog>\r\n", styles: [".lookup-content{min-height:240px}.lookup-actions{display:flex;justify-content:flex-end;gap:8px;padding-top:8px}\n"] }]
51
+ }], propDecorators: { visible: [{
52
+ type: Input
53
+ }], loading: [{
54
+ type: Input
55
+ }], branches: [{
56
+ type: Input
57
+ }], visibleChange: [{
58
+ type: Output
59
+ }], branchSelected: [{
60
+ type: Output
61
+ }] } });
62
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWdyby1sb29rdXAuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvYW5ndWxhci1jb21wb25lbnRzL2NvbXBvbmVudHMvYWdyby13b3Jrc3BhY2UvYWdyby1sb29rdXAvYWdyby1sb29rdXAuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvYW5ndWxhci1jb21wb25lbnRzL2NvbXBvbmVudHMvYWdyby13b3Jrc3BhY2UvYWdyby1sb29rdXAvYWdyby1sb29rdXAuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLHVCQUF1QixFQUFFLFNBQVMsRUFBRSxZQUFZLEVBQUUsS0FBSyxFQUFFLE1BQU0sRUFBRSxNQUFNLGVBQWUsQ0FBQzs7Ozs7OztBQVNoRyxNQUFNLE9BQU8sNEJBQTRCO0lBQ3JCLE9BQU8sR0FBRyxLQUFLLENBQUM7SUFDaEIsT0FBTyxHQUFHLEtBQUssQ0FBQztJQUNoQixRQUFRLEdBQWMsRUFBRSxDQUFDO0lBRXhCLGFBQWEsR0FBRyxJQUFJLFlBQVksRUFBVyxDQUFDO0lBQzVDLGNBQWMsR0FBRyxJQUFJLFlBQVksRUFBVyxDQUFDO0lBRXZELGNBQWMsR0FBbUIsSUFBSSxDQUFDO0lBRXRDLGVBQWUsQ0FBQyxPQUFnQjtRQUNuQyxJQUFJLENBQUMsT0FBTyxHQUFHLE9BQU8sQ0FBQztRQUN2QixJQUFJLENBQUMsYUFBYSxDQUFDLElBQUksQ0FBQyxPQUFPLENBQUMsQ0FBQztJQUNyQyxDQUFDO0lBRU0sS0FBSztRQUNSLElBQU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kQnJhbmNoXCJcclxuICAgICAgICAgICAgKHNlbGVjdGlvbkNoYW5nZSk9XCJvblNlbGVjdGlvbkNoYW5nZSgkZXZlbnQpXCJcclxuICAgICAgICAgICAgcmVzcG9uc2l2ZUxheW91dD1cInNjcm9sbFwiXHJcbiAgICAgICAgPlxyXG4gICAgICAgICAgICA8bmctdGVtcGxhdGUgcFRlbXBsYXRlPVwiaGVhZGVyXCI+XHJcbiAgICAgICAgICAgICAgICA8dHI+XHJcbiAgICAgICAgICAgICAgICAgICAgPHRoIHNjb3BlPVwiY29sXCI+RmlsaWFsPC90aD5cclxuICAgICAgICAgICAgICAgICAgICA8dGggc2NvcGU9XCJjb2xcIj5DUEYvQ05QSjwvdGg+XHJcbiAgICAgICAgICAgICAgICAgICAgPHRoIHNjb3BlPVwiY29sXCI+RW1wcmVzYTwvdGg+XHJcbiAgICAgICAgICAgICAgICA8L3RyPlxyXG4gICAgICAgICAgICA8L25nLXRlbXBsYXRlPlxyXG4gICAgICAgICAgICA8bmctdGVtcGxhdGUgcFRlbXBsYXRlPVwiYm9keVwiIGxldC1yb3dEYXRhPlxyXG4gICAgICAgICAgICAgICAgPHRyIFtwU2VsZWN0YWJsZVJvd109XCJyb3dEYXRhXCI+XHJcbiAgICAgICAgICAgICAgICAgICAgPHRkPnt7IHJvd0RhdGE/Lm5vbUZpbCB8fCAnLScgfX08L3RkPlxyXG4gICAgICAgICAgICAgICAgICAgIDx0ZD57eyBnZXRCcmFuY2hEb2N1bWVudExhYmVsKHJvd0RhdGEpIH19PC90ZD5cclxuICAgICAgICAgICAgICAgICAgICA8dGQ+e3sgZ2V0Q29tcGFueUxhYmVsKHJvd0RhdGEpIH19PC90ZD5cclxuICAgICAgICAgICAgICAgIDwvdHI+XHJcbiAgICAgICAgICAgIDwvbmctdGVtcGxhdGU+XHJcbiAgICAgICAgPC9wLXRhYmxlPlxyXG4gICAgPC9kaXY+XHJcblxyXG4gICAgPGRpdiBjbGFzcz1cImxvb2t1cC1hY3Rpb25zXCI+XHJcbiAgICAgICAgPHMtYnV0dG9uXHJcbiAgICAgICAgICAgIHR5cGU9XCJidXR0b25cIlxyXG4gICAgICAgICAgICBwcmlvcml0eT1cImxpbmtcIlxyXG4gICAgICAgICAgICBbbGFiZWxdPVwiJ0NhbmNlbGFyJ1wiXHJcbiAgICAgICAgICAgIChjbGlja2VkKT1cImNsb3NlKClcIlxyXG4gICAgICAgID48L3MtYnV0dG9uPlxyXG4gICAgICAgIDxzLWJ1dHRvblxyXG4gICAgICAgICAgICB0eXBlPVwiYnV0dG9uXCJcclxuICAgICAgICAgICAgW2xhYmVsXT1cIidTZWxlY2lvbmFyJ1wiXHJcbiAgICAgICAgICAgIFtkaXNhYmxlZF09XCIhc2VsZWN0ZWRCcmFuY2hcIlxyXG4gICAgICAgICAgICAoY2xpY2tlZCk9XCJzZWxlY3QoKVwiXHJcbiAgICAgICAgPjwvcy1idXR0b24+XHJcbiAgICA8L2Rpdj5cclxuPC9zLWRpYWxvZz5cclxuIl19
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWdyby13b3Jrc3BhY2Utc3dpdGNoLmludGVyZmFjZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL2FuZ3VsYXItY29tcG9uZW50cy9jb21wb25lbnRzL2Fncm8td29ya3NwYWNlL2Fncm8td29ya3NwYWNlLXN3aXRjaC5pbnRlcmZhY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEJlaGF2aW9yU3ViamVjdCB9IGZyb20gXCJyeGpzXCI7XHJcbmltcG9ydCB7IEUwNzBFbXAgfSBmcm9tIFwiLi9lMDcwZW1wL2UwNzBlbXBcIjtcclxuXHJcbmV4cG9ydCBpbnRlcmZhY2UgSUFncm9Xb3Jrc3BhY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