oxpi-nglib 1.0.0 → 1.0.1

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 (25) hide show
  1. package/esm2020/lib/cadastros/funcionarios/funcionario-add-dialog/funcionario-add-dialog.component.mjs +74 -0
  2. package/esm2020/lib/cadastros/funcionarios/funcionario-edit-dialog/funcionario-edit-dialog.component.mjs +68 -0
  3. package/esm2020/lib/cadastros/funcionarios/funcionario-form/funcionario-form.component.mjs +38 -0
  4. package/esm2020/lib/cadastros/funcionarios/funcionarios/funcionarios.component.mjs +157 -0
  5. package/esm2020/lib/models/entidades/funcionario.mjs +12 -0
  6. package/esm2020/lib/oxpi-nglib.module.mjs +28 -5
  7. package/esm2020/lib/providers/auth-data.service.mjs +219 -0
  8. package/esm2020/lib/providers/common-web-service.mjs +98 -0
  9. package/esm2020/lib/providers/notification.service.mjs +29 -0
  10. package/esm2020/public-api.mjs +8 -1
  11. package/fesm2015/oxpi-nglib.mjs +1102 -447
  12. package/fesm2015/oxpi-nglib.mjs.map +1 -1
  13. package/fesm2020/oxpi-nglib.mjs +1096 -445
  14. package/fesm2020/oxpi-nglib.mjs.map +1 -1
  15. package/lib/cadastros/funcionarios/funcionario-add-dialog/funcionario-add-dialog.component.d.ts +27 -0
  16. package/lib/cadastros/funcionarios/funcionario-edit-dialog/funcionario-edit-dialog.component.d.ts +27 -0
  17. package/lib/cadastros/funcionarios/funcionario-form/funcionario-form.component.d.ts +15 -0
  18. package/lib/cadastros/funcionarios/funcionarios/funcionarios.component.d.ts +36 -0
  19. package/lib/models/entidades/funcionario.d.ts +15 -0
  20. package/lib/oxpi-nglib.module.d.ts +13 -7
  21. package/lib/providers/auth-data.service.d.ts +20 -0
  22. package/lib/providers/common-web-service.d.ts +42 -0
  23. package/lib/providers/notification.service.d.ts +12 -0
  24. package/package.json +1 -1
  25. package/public-api.d.ts +7 -0
@@ -0,0 +1,27 @@
1
+ import { ElementRef, OnInit } from '@angular/core';
2
+ import { MatDialog, MatDialogRef } from '@angular/material/dialog';
3
+ import { Funcionario } from '../../../models/entidades/funcionario';
4
+ import { CommonWebService } from '../../../providers/common-web-service';
5
+ import { FocusService } from '../../../providers/focus.service';
6
+ import { NotificationService } from '../../../providers/notification.service';
7
+ import { ScreenHelperService } from '../../../providers/screen-helper.service';
8
+ import * as i0 from "@angular/core";
9
+ export declare class FuncionarioAddDialogComponent implements OnInit {
10
+ private ws;
11
+ private notification;
12
+ dataDialog: Funcionario;
13
+ dialog: MatDialog;
14
+ private elRef;
15
+ private dialogRef;
16
+ private screenHelper;
17
+ model: Funcionario;
18
+ mobile: boolean;
19
+ isBusy: boolean;
20
+ focus: FocusService;
21
+ constructor(ws: CommonWebService, notification: NotificationService, dataDialog: Funcionario, dialog: MatDialog, elRef: ElementRef, dialogRef: MatDialogRef<FuncionarioAddDialogComponent>, screenHelper: ScreenHelperService);
22
+ ngOnInit(): void;
23
+ ngOnDestroy(): void;
24
+ salvar(): void;
25
+ static ɵfac: i0.ɵɵFactoryDeclaration<FuncionarioAddDialogComponent, never>;
26
+ static ɵcmp: i0.ɵɵComponentDeclaration<FuncionarioAddDialogComponent, "ox-funcionario-add-dialog", never, {}, {}, never, never, false>;
27
+ }
@@ -0,0 +1,27 @@
1
+ import { ElementRef, OnInit } from '@angular/core';
2
+ import { MatDialog, MatDialogRef } from '@angular/material/dialog';
3
+ import { Funcionario } from '../../../models/entidades/funcionario';
4
+ import { CommonWebService } from '../../../providers/common-web-service';
5
+ import { FocusService } from '../../../providers/focus.service';
6
+ import { NotificationService } from '../../../providers/notification.service';
7
+ import { ScreenHelperService } from '../../../providers/screen-helper.service';
8
+ import * as i0 from "@angular/core";
9
+ export declare class FuncionarioEditDialogComponent implements OnInit {
10
+ private ws;
11
+ private notification;
12
+ dataDialog: Funcionario;
13
+ dialog: MatDialog;
14
+ private elRef;
15
+ private dialogRef;
16
+ private screenHelper;
17
+ model?: Funcionario;
18
+ mobile: boolean;
19
+ isBusy: boolean;
20
+ focus: FocusService;
21
+ constructor(ws: CommonWebService, notification: NotificationService, dataDialog: Funcionario, dialog: MatDialog, elRef: ElementRef, dialogRef: MatDialogRef<FuncionarioEditDialogComponent>, screenHelper: ScreenHelperService);
22
+ ngOnInit(): void;
23
+ ngOnDestroy(): void;
24
+ salvar(): void;
25
+ static ɵfac: i0.ɵɵFactoryDeclaration<FuncionarioEditDialogComponent, never>;
26
+ static ɵcmp: i0.ɵɵComponentDeclaration<FuncionarioEditDialogComponent, "ox-funcionario-edit-dialog", never, {}, {}, never, never, false>;
27
+ }
@@ -0,0 +1,15 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { Funcionario, FuncionarioCargo } from '../../../models/entidades/funcionario';
3
+ import { CommonWebService } from '../../../providers/common-web-service';
4
+ import * as i0 from "@angular/core";
5
+ export declare class FuncionarioFormComponent implements OnInit {
6
+ private ws;
7
+ model?: Funcionario;
8
+ isBusy: boolean;
9
+ cargos: FuncionarioCargo[];
10
+ constructor(ws: CommonWebService);
11
+ ngOnInit(): void;
12
+ getCargos(): void;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<FuncionarioFormComponent, never>;
14
+ static ɵcmp: i0.ɵɵComponentDeclaration<FuncionarioFormComponent, "ox-funcionario-form", never, { "model": "model"; }, {}, never, never, false>;
15
+ }
@@ -0,0 +1,36 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { MatDialog } from '@angular/material/dialog';
3
+ import { Funcionario } from '../../../models/entidades/funcionario';
4
+ import { LazyTrigger } from '../../../models/infra/lazy-trigger';
5
+ import { SearchSetting } from '../../../models/settings/search-setting';
6
+ import { AuthDataService } from '../../../providers/auth-data.service';
7
+ import { CommonWebService } from '../../../providers/common-web-service';
8
+ import { NotificationService } from '../../../providers/notification.service';
9
+ import { ScreenHelperService } from '../../../providers/screen-helper.service';
10
+ import * as i0 from "@angular/core";
11
+ export declare class FuncionariosComponent implements OnInit {
12
+ private ws;
13
+ private notification;
14
+ dialog: MatDialog;
15
+ private screenHelper;
16
+ mobile: boolean;
17
+ isBusy: boolean;
18
+ items: Funcionario[];
19
+ selectedItem: Funcionario | null;
20
+ lazyTrigger: LazyTrigger;
21
+ allowAdd: boolean;
22
+ allowExcluir: boolean;
23
+ setting: SearchSetting;
24
+ private focus;
25
+ constructor(ws: CommonWebService, notification: NotificationService, dialog: MatDialog, auth: AuthDataService, screenHelper: ScreenHelperService);
26
+ ngOnInit(): void;
27
+ onSelectItem(): void;
28
+ ngOnDestroy(): void;
29
+ atualiza(): void;
30
+ excluir(): void;
31
+ novo(): void;
32
+ abreCadastro(item: Funcionario): void;
33
+ salvar(): void;
34
+ static ɵfac: i0.ɵɵFactoryDeclaration<FuncionariosComponent, never>;
35
+ static ɵcmp: i0.ɵɵComponentDeclaration<FuncionariosComponent, "ox-funcionarios", never, {}, {}, never, never, false>;
36
+ }
@@ -0,0 +1,15 @@
1
+ import { FocusService } from "../../providers/focus.service";
2
+ export interface Funcionario {
3
+ id: number;
4
+ nome: string;
5
+ cargoId: number;
6
+ login: string;
7
+ senha: string;
8
+ enviadoPC: boolean;
9
+ isAtivo: boolean;
10
+ }
11
+ export interface FuncionarioCargo {
12
+ id: number;
13
+ nome: string;
14
+ }
15
+ export declare function valida(item: Funcionario, focus: FocusService): string | null;
@@ -9,18 +9,24 @@ import * as i7 from "./controls/radio-button-group/radio-button-group.component"
9
9
  import * as i8 from "./controls/item-card/item-card.component";
10
10
  import * as i9 from "./providers/safe-html.pipe";
11
11
  import * as i10 from "./controls/alert-dialog/alert-dialog.component";
12
- import * as i11 from "@angular/platform-browser";
13
- import * as i12 from "@angular/platform-browser/animations";
14
- import * as i13 from "@angular/forms";
15
- import * as i14 from "@angular/material/button";
16
- import * as i15 from "@angular/material/icon";
17
- import * as i16 from "@angular/material/dialog";
12
+ import * as i11 from "./cadastros/funcionarios/funcionarios/funcionarios.component";
13
+ import * as i12 from "./cadastros/funcionarios/funcionario-form/funcionario-form.component";
14
+ import * as i13 from "./cadastros/funcionarios/funcionario-edit-dialog/funcionario-edit-dialog.component";
15
+ import * as i14 from "./cadastros/funcionarios/funcionario-add-dialog/funcionario-add-dialog.component";
16
+ import * as i15 from "@angular/platform-browser";
17
+ import * as i16 from "@angular/platform-browser/animations";
18
+ import * as i17 from "@angular/forms";
19
+ import * as i18 from "@angular/material/button";
20
+ import * as i19 from "@angular/material/icon";
21
+ import * as i20 from "@angular/material/dialog";
22
+ import * as i21 from "@angular/material/select";
18
23
  declare global {
19
24
  interface String {
20
25
  isEmpty(): boolean;
21
26
  }
22
27
  interface Array<T> {
23
28
  firstOrNull(): T | null;
29
+ remove(item: T): boolean;
24
30
  }
25
31
  interface Date {
26
32
  addDays(days: number): Date;
@@ -28,6 +34,6 @@ declare global {
28
34
  }
29
35
  export declare class OxpiNglibModule {
30
36
  static ɵfac: i0.ɵɵFactoryDeclaration<OxpiNglibModule, never>;
31
- static ɵmod: i0.ɵɵNgModuleDeclaration<OxpiNglibModule, [typeof i1.BusyIndicatorComponent, typeof i2.MonthYearPickerComponent, typeof i3.ImageViewerComponent, typeof i4.NumericPickerComponent, typeof i5.PaginatorComponent, typeof i6.CheckButtonComponent, typeof i7.RadioButtonGroupComponent, typeof i8.ItemCardComponent, typeof i9.SafeHtmlPipe, typeof i10.AlertDialogComponent], [typeof i11.BrowserModule, typeof i12.BrowserAnimationsModule, typeof i13.FormsModule, typeof i14.MatButtonModule, typeof i15.MatIconModule, typeof i16.MatDialogModule], [typeof i1.BusyIndicatorComponent, typeof i2.MonthYearPickerComponent, typeof i3.ImageViewerComponent, typeof i4.NumericPickerComponent, typeof i5.PaginatorComponent, typeof i6.CheckButtonComponent, typeof i7.RadioButtonGroupComponent, typeof i8.ItemCardComponent, typeof i9.SafeHtmlPipe]>;
37
+ static ɵmod: i0.ɵɵNgModuleDeclaration<OxpiNglibModule, [typeof i1.BusyIndicatorComponent, typeof i2.MonthYearPickerComponent, typeof i3.ImageViewerComponent, typeof i4.NumericPickerComponent, typeof i5.PaginatorComponent, typeof i6.CheckButtonComponent, typeof i7.RadioButtonGroupComponent, typeof i8.ItemCardComponent, typeof i9.SafeHtmlPipe, typeof i10.AlertDialogComponent, typeof i11.FuncionariosComponent, typeof i12.FuncionarioFormComponent, typeof i13.FuncionarioEditDialogComponent, typeof i14.FuncionarioAddDialogComponent], [typeof i15.BrowserModule, typeof i16.BrowserAnimationsModule, typeof i17.FormsModule, typeof i18.MatButtonModule, typeof i19.MatIconModule, typeof i20.MatDialogModule, typeof i21.MatSelectModule], [typeof i1.BusyIndicatorComponent, typeof i2.MonthYearPickerComponent, typeof i3.ImageViewerComponent, typeof i4.NumericPickerComponent, typeof i5.PaginatorComponent, typeof i6.CheckButtonComponent, typeof i7.RadioButtonGroupComponent, typeof i8.ItemCardComponent, typeof i9.SafeHtmlPipe]>;
32
38
  static ɵinj: i0.ɵɵInjectorDeclaration<OxpiNglibModule>;
33
39
  }
@@ -0,0 +1,20 @@
1
+ import { LoginResult } from '../models/entidades/login-result';
2
+ import { Permissoes } from '../models/entidades/permissoes';
3
+ import { SensoresDef } from '../models/entidades/sensores-def';
4
+ import * as i0 from "@angular/core";
5
+ export declare class AuthDataService {
6
+ isLoggedIn: boolean;
7
+ token: string;
8
+ sensoresDef: SensoresDef;
9
+ permissoes: Permissoes;
10
+ empresaNome: string;
11
+ empresaId: number;
12
+ loginNome: string;
13
+ userId: number;
14
+ email: string;
15
+ nome: string;
16
+ constructor();
17
+ login(result: LoginResult): void;
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<AuthDataService, never>;
19
+ static ɵprov: i0.ɵɵInjectableDeclaration<AuthDataService>;
20
+ }
@@ -0,0 +1,42 @@
1
+ import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
2
+ import { Observable } from 'rxjs';
3
+ import { Funcionario, FuncionarioCargo } from '../models/entidades/funcionario';
4
+ import { SearchSetting } from '../models/settings/search-setting';
5
+ import * as i0 from "@angular/core";
6
+ export declare class CommonWebService {
7
+ private http;
8
+ ROOT_URL: string;
9
+ FUNCIONARIO_BASE_URL: string;
10
+ FUNCIONARIO_CARGO_BASE_URL: string;
11
+ token: string;
12
+ static URL_PART_BUSCA: string;
13
+ static URL_PART_NEXT_ID: string;
14
+ static URL_PART_BUSCA_PAGINADA: string;
15
+ constructor(http: HttpClient);
16
+ setToken(token: string): void;
17
+ start(rootUrl: string): void;
18
+ getFuncionarios(): Observable<Funcionario[]>;
19
+ getFuncionariosCargos(): Observable<FuncionarioCargo[]>;
20
+ buscaFuncionario(setting: SearchSetting): Observable<Funcionario[]>;
21
+ getNextIdFuncionario(): Observable<number>;
22
+ getAllFuncionario(): Observable<number>;
23
+ saveFuncionario(s: Funcionario): Observable<any>;
24
+ addFuncionario(p: Funcionario): Observable<any>;
25
+ deleteFuncionario(id: number): Observable<any>;
26
+ getHttpOptions(parameters?: HttpParams): {
27
+ headers: HttpHeaders;
28
+ params: HttpParams | undefined;
29
+ };
30
+ getExcelOptions(parameters?: HttpParams): {
31
+ headers: HttpHeaders;
32
+ params: HttpParams | undefined;
33
+ responseType: "json";
34
+ };
35
+ getHtmlOptions(parameters?: HttpParams): {
36
+ headers: HttpHeaders;
37
+ params: HttpParams | undefined;
38
+ responseType: "json";
39
+ };
40
+ static ɵfac: i0.ɵɵFactoryDeclaration<CommonWebService, never>;
41
+ static ɵprov: i0.ɵɵInjectableDeclaration<CommonWebService>;
42
+ }
@@ -0,0 +1,12 @@
1
+ import { MatSnackBar } from '@angular/material/snack-bar';
2
+ import { HttpErrorResponse } from '@angular/common/http';
3
+ import * as i0 from "@angular/core";
4
+ export declare class NotificationService {
5
+ snackBar: MatSnackBar;
6
+ constructor(snackBar: MatSnackBar);
7
+ showHttpError(res: HttpErrorResponse): void;
8
+ showMsg(msg: string): void;
9
+ showMsgError(msg: string): void;
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<NotificationService, never>;
11
+ static ɵprov: i0.ɵɵInjectableDeclaration<NotificationService>;
12
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oxpi-nglib",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^14.0.5",
6
6
  "@angular/core": "^14.0.5"
package/public-api.d.ts CHANGED
@@ -1,3 +1,7 @@
1
+ export * from './lib/cadastros/funcionarios/funcionario-add-dialog/funcionario-add-dialog.component';
2
+ export * from './lib/cadastros/funcionarios/funcionario-edit-dialog/funcionario-edit-dialog.component';
3
+ export * from './lib/cadastros/funcionarios/funcionario-form/funcionario-form.component';
4
+ export * from './lib/cadastros/funcionarios/funcionarios/funcionarios.component';
1
5
  export * from './lib/controls/busy-indicator/busy-indicator.component';
2
6
  export * from './lib/controls/check-button/check-button.component';
3
7
  export * from './lib/controls/image-viewer/image-viewer.component';
@@ -31,6 +35,9 @@ export * from './lib/models/settings/search-setting';
31
35
  export * from './lib/models/settings/produto-search-setting';
32
36
  export * from './lib/models/settings/suites-intervencoes-setting';
33
37
  export * from './lib/providers/export.file.service';
38
+ export * from './lib/providers/auth-data.service';
39
+ export * from './lib/providers/common-web-service';
40
+ export * from './lib/providers/notification.service';
34
41
  export * from './lib/providers/focus.service';
35
42
  export * from './lib/providers/preference.service';
36
43
  export * from './lib/providers/safe-html.pipe';