diff --git a/projects/code-editor/src/lib/components/po-code-editor/po-code-editor-register.service.ts b/projects/code-editor/src/lib/components/po-code-editor/po-code-editor-register.service.ts index 1c00264971..21885ccbe5 100644 --- a/projects/code-editor/src/lib/components/po-code-editor/po-code-editor-register.service.ts +++ b/projects/code-editor/src/lib/components/po-code-editor/po-code-editor-register.service.ts @@ -60,7 +60,9 @@ import { PoCodeEditorRegisterableSuggestionType } from './interfaces/po-code-edi * > As configurações para o registro de uma nova sintaxe no Monaco code editor podem ser encontradas em * > [**Monaco Editor**](https://microsoft.github.io/monaco-editor/playground.html#extending-language-services-custom-languages). */ -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class PoCodeEditorRegister implements PoCodeEditorRegisterable { /** Sintaxe a ser registrada. */ language: string; diff --git a/projects/code-editor/src/lib/components/po-code-editor/po-code-editor.component.ts b/projects/code-editor/src/lib/components/po-code-editor/po-code-editor.component.ts index 86654c5164..8ca89dd56f 100644 --- a/projects/code-editor/src/lib/components/po-code-editor/po-code-editor.component.ts +++ b/projects/code-editor/src/lib/components/po-code-editor/po-code-editor.component.ts @@ -59,6 +59,7 @@ const providers: Array = [ @Component({ selector: 'po-code-editor', templateUrl: './po-code-editor.component.html', + providers, standalone: false }) export class PoCodeEditorComponent extends PoCodeEditorBaseComponent implements AfterViewInit, DoCheck { diff --git a/projects/portal/docs/templates/menu-components.service.template.ts b/projects/portal/docs/templates/menu-components.service.template.ts index 752d3fd8f5..0c4ee91285 100644 --- a/projects/portal/docs/templates/menu-components.service.template.ts +++ b/projects/portal/docs/templates/menu-components.service.template.ts @@ -1,6 +1,8 @@ import { Injectable } from '@angular/core'; -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class MenuComponentsService { constructor() {} diff --git a/projects/portal/docs/templates/menu-guides.service.template.ts b/projects/portal/docs/templates/menu-guides.service.template.ts index c3b40e5b7d..c056688a4b 100644 --- a/projects/portal/docs/templates/menu-guides.service.template.ts +++ b/projects/portal/docs/templates/menu-guides.service.template.ts @@ -2,7 +2,9 @@ import { Injectable } from '@angular/core'; import { PoMenuItem } from '@po-ui/ng-components'; -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class MenuGuidesService { constructor() {} diff --git a/projects/portal/docs/templates/menu.service.template.ts b/projects/portal/docs/templates/menu.service.template.ts index 45fcd788c9..aac93f019e 100644 --- a/projects/portal/docs/templates/menu.service.template.ts +++ b/projects/portal/docs/templates/menu.service.template.ts @@ -4,7 +4,9 @@ import { PoMenuItem } from '@po-ui/ng-components'; import { Documentation } from './documentation/documentation.class'; -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class MenuService { constructor() { } diff --git a/projects/portal/src/app/documentation/documentation.service.ts b/projects/portal/src/app/documentation/documentation.service.ts index 0cb1d275b5..7bbb72382f 100644 --- a/projects/portal/src/app/documentation/documentation.service.ts +++ b/projects/portal/src/app/documentation/documentation.service.ts @@ -6,7 +6,9 @@ import { map } from 'rxjs/operators'; import { Documentation } from './documentation.class'; -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class DocumentationService { constructor(private http: HttpClient) {} diff --git a/projects/portal/src/app/documentation/menu-components.service.ts b/projects/portal/src/app/documentation/menu-components.service.ts index 752d3fd8f5..0c4ee91285 100644 --- a/projects/portal/src/app/documentation/menu-components.service.ts +++ b/projects/portal/src/app/documentation/menu-components.service.ts @@ -1,6 +1,8 @@ import { Injectable } from '@angular/core'; -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class MenuComponentsService { constructor() {} diff --git a/projects/portal/src/app/menu-components.service.ts b/projects/portal/src/app/menu-components.service.ts index 9467e07243..c528c5be20 100644 --- a/projects/portal/src/app/menu-components.service.ts +++ b/projects/portal/src/app/menu-components.service.ts @@ -1,6 +1,8 @@ import { Injectable } from '@angular/core'; -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class MenuComponentsService { constructor() {} diff --git a/projects/storage/src/lib/services/po-storage.service.ts b/projects/storage/src/lib/services/po-storage.service.ts index 6038a579d3..7a9de5e23d 100644 --- a/projects/storage/src/lib/services/po-storage.service.ts +++ b/projects/storage/src/lib/services/po-storage.service.ts @@ -82,7 +82,9 @@ export const PO_STORAGE_CONFIG_TOKEN = new InjectionToken('PO_STORAGE_CONFIG_TOK * export class AppModule {} * ``` */ -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class PoStorageService { private driver: string = null; private idleQueue = new IdleQueue(); diff --git a/projects/sync/src/lib/services/po-event-sourcing/po-event-sourcing.service.spec.ts b/projects/sync/src/lib/services/po-event-sourcing/po-event-sourcing.service.spec.ts index 013a69f483..3c54b8e33f 100644 --- a/projects/sync/src/lib/services/po-event-sourcing/po-event-sourcing.service.spec.ts +++ b/projects/sync/src/lib/services/po-event-sourcing/po-event-sourcing.service.spec.ts @@ -26,14 +26,18 @@ import { PoSyncSchema } from './../po-sync/interfaces/po-sync-schema.interface'; const EVENT_SOURCING_NAME: string = PoEventSourcingService['event_sourcing_name']; -@Injectable() +@Injectable({ + providedIn: 'root' +}) class StorageServiceMock extends PoStorageService { constructor() { super(); } } -@Injectable() +@Injectable({ + providedIn: 'root' +}) class PoDataTransformMock extends PoDataTransform { getDateFieldName(): string { return undefined; diff --git a/projects/sync/src/lib/services/po-event-sourcing/po-event-sourcing.service.ts b/projects/sync/src/lib/services/po-event-sourcing/po-event-sourcing.service.ts index 8fc30c60b0..5c886c89e3 100644 --- a/projects/sync/src/lib/services/po-event-sourcing/po-event-sourcing.service.ts +++ b/projects/sync/src/lib/services/po-event-sourcing/po-event-sourcing.service.ts @@ -25,7 +25,9 @@ import { PoSyncConfig } from '../po-sync/interfaces/po-sync-config.interface'; import { PoSyncResponse } from '../po-sync/interfaces/po-sync-response.interface'; import { PoSyncSchema } from './../po-sync/interfaces/po-sync-schema.interface'; -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class PoEventSourcingService { static readonly event_sourcing_name: string = 'EventSourcing'; diff --git a/projects/sync/src/lib/services/po-http-client/po-http-client.service.ts b/projects/sync/src/lib/services/po-http-client/po-http-client.service.ts index c170e8c7a9..065064842c 100644 --- a/projects/sync/src/lib/services/po-http-client/po-http-client.service.ts +++ b/projects/sync/src/lib/services/po-http-client/po-http-client.service.ts @@ -14,7 +14,9 @@ import { PoHttpRequestType } from './po-http-request-type.enum'; * * Serviço para execução de requisições HTTP. */ -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class PoHttpClientService { constructor(private httpClient: HttpClient) {} diff --git a/projects/sync/src/lib/services/po-network/po-network.service.ts b/projects/sync/src/lib/services/po-network/po-network.service.ts index f9ec06d593..4c41265d08 100644 --- a/projects/sync/src/lib/services/po-network/po-network.service.ts +++ b/projects/sync/src/lib/services/po-network/po-network.service.ts @@ -13,7 +13,9 @@ import { PoNetworkStatus } from './../../models'; * O `PoNetworkService` é utilizado para verificar o status e o tipo da conexão de rede do dispositivo. */ -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class PoNetworkService { private networkType: string; private networkTypeNow: Subject<{ status: boolean; type: string }>; diff --git a/projects/sync/src/lib/services/po-schema/po-schema-definition/po-schema-definition.service.spec.ts b/projects/sync/src/lib/services/po-schema/po-schema-definition/po-schema-definition.service.spec.ts index a128095069..a4a854229e 100644 --- a/projects/sync/src/lib/services/po-schema/po-schema-definition/po-schema-definition.service.spec.ts +++ b/projects/sync/src/lib/services/po-schema/po-schema-definition/po-schema-definition.service.spec.ts @@ -7,7 +7,9 @@ import { PoSchemaDefinitionService } from './po-schema-definition.service'; import { PoSchemaUtil } from './../po-schema-util/po-schema-util.model'; import { PoSyncSchema } from './../../po-sync/interfaces/po-sync-schema.interface'; -@Injectable() +@Injectable({ + providedIn: 'root' +}) class PoStorageServiceMock extends PoStorageService { constructor() { super(); diff --git a/projects/sync/src/lib/services/po-schema/po-schema-definition/po-schema-definition.service.ts b/projects/sync/src/lib/services/po-schema/po-schema-definition/po-schema-definition.service.ts index 8333a02c1c..5f83266e10 100644 --- a/projects/sync/src/lib/services/po-schema/po-schema-definition/po-schema-definition.service.ts +++ b/projects/sync/src/lib/services/po-schema/po-schema-definition/po-schema-definition.service.ts @@ -12,7 +12,9 @@ import { PoSyncSchema } from './../../po-sync/interfaces/po-sync-schema.interfac * * Serviço que disponibiliza métodos que permite operar sobre as definições dos *schemas*. */ -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class PoSchemaDefinitionService { constructor(private poStorage: PoStorageService) {} diff --git a/projects/sync/src/lib/services/po-schema/po-schema.service.spec.ts b/projects/sync/src/lib/services/po-schema/po-schema.service.spec.ts index 7678739c1e..fe236908e1 100644 --- a/projects/sync/src/lib/services/po-schema/po-schema.service.spec.ts +++ b/projects/sync/src/lib/services/po-schema/po-schema.service.spec.ts @@ -8,14 +8,18 @@ import { PoSchemaService } from './po-schema.service'; import { PoSchemaUtil } from './po-schema-util/po-schema-util.model'; import { PoSyncSchema } from './../po-sync/interfaces/po-sync-schema.interface'; -@Injectable() +@Injectable({ + providedIn: 'root' +}) class PoStorageServiceMock extends PoStorageService { constructor() { super(); } } -@Injectable() +@Injectable({ + providedIn: 'root' +}) class PoSchemaDefinitionServiceMock extends PoSchemaDefinitionService {} describe('PoSchemaService:', () => { diff --git a/projects/sync/src/lib/services/po-schema/po-schema.service.ts b/projects/sync/src/lib/services/po-schema/po-schema.service.ts index 83cbb2bf3c..7850666c44 100644 --- a/projects/sync/src/lib/services/po-schema/po-schema.service.ts +++ b/projects/sync/src/lib/services/po-schema/po-schema.service.ts @@ -13,7 +13,9 @@ import { PoSyncSchema } from '../po-sync/interfaces/po-sync-schema.interface'; * * Serviço que realiza as operações nos `schemas`. */ -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class PoSchemaService { constructor( private poSchemaDefinitionService: PoSchemaDefinitionService, diff --git a/projects/sync/src/lib/services/po-sync/po-sync.service.ts b/projects/sync/src/lib/services/po-sync/po-sync.service.ts index 053b91eff1..dd4460a829 100644 --- a/projects/sync/src/lib/services/po-sync/po-sync.service.ts +++ b/projects/sync/src/lib/services/po-sync/po-sync.service.ts @@ -24,7 +24,9 @@ import { PoSyncSchema } from './interfaces/po-sync-schema.interface'; * armazenadas *offline* vindas do servidor. Nele ocorre toda a preparação dos modelos de dados retornados por * cada consulta. */ -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class PoSyncService { models: Array = []; diff --git a/projects/templates/src/lib/components/po-modal-password-recovery/po-modal-password-recovery.service.ts b/projects/templates/src/lib/components/po-modal-password-recovery/po-modal-password-recovery.service.ts index 6aaf5a82e6..5253df5567 100644 --- a/projects/templates/src/lib/components/po-modal-password-recovery/po-modal-password-recovery.service.ts +++ b/projects/templates/src/lib/components/po-modal-password-recovery/po-modal-password-recovery.service.ts @@ -4,7 +4,9 @@ import { Observable } from 'rxjs'; import { PoModalPasswordRecovery } from './interfaces/po-modal-password-recovery.interface'; -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class PoModalPasswordRecoveryService { constructor(private http: HttpClient) {} diff --git a/projects/templates/src/lib/components/po-page-change-password/po-page-change-password.service.ts b/projects/templates/src/lib/components/po-page-change-password/po-page-change-password.service.ts index 45b435f92f..f5ef8abf31 100644 --- a/projects/templates/src/lib/components/po-page-change-password/po-page-change-password.service.ts +++ b/projects/templates/src/lib/components/po-page-change-password/po-page-change-password.service.ts @@ -4,7 +4,9 @@ import { Observable } from 'rxjs'; import { HttpClient, HttpResponse } from '@angular/common/http'; -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class PoPageChangePasswordService { constructor(private http: HttpClient) {} diff --git a/projects/templates/src/lib/components/po-page-dynamic-search/samples/sample-po-page-dynamic-search-hiring-processes/sample-po-page-dynamic-search-hiring-processes.service.ts b/projects/templates/src/lib/components/po-page-dynamic-search/samples/sample-po-page-dynamic-search-hiring-processes/sample-po-page-dynamic-search-hiring-processes.service.ts index 53ede43921..ed314aa770 100644 --- a/projects/templates/src/lib/components/po-page-dynamic-search/samples/sample-po-page-dynamic-search-hiring-processes/sample-po-page-dynamic-search-hiring-processes.service.ts +++ b/projects/templates/src/lib/components/po-page-dynamic-search/samples/sample-po-page-dynamic-search-hiring-processes/sample-po-page-dynamic-search-hiring-processes.service.ts @@ -2,7 +2,9 @@ import { Injectable } from '@angular/core'; import { PoTableColumn } from '@po-ui/ng-components'; -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class SamplePoPageDynamicSearchHiringProcessesService { filter(filters) { let filteredItems = [...this.getItems()]; diff --git a/projects/templates/src/lib/components/po-page-dynamic-table/po-page-dynamic-table.component.spec.ts b/projects/templates/src/lib/components/po-page-dynamic-table/po-page-dynamic-table.component.spec.ts index 118015dce0..a784d14d05 100644 --- a/projects/templates/src/lib/components/po-page-dynamic-table/po-page-dynamic-table.component.spec.ts +++ b/projects/templates/src/lib/components/po-page-dynamic-table/po-page-dynamic-table.component.spec.ts @@ -377,7 +377,7 @@ describe('PoPageDynamicTableComponent:', () => { it('updateDataTable: should be called with the current parameters', () => { const expectValue = { page: 1, search: 'test' }; - component['quickSearchParam'] = null || undefined; + component['quickSearchParam'] = null; component['currentPage'] = 1; component['params'] = { [component.quickSearchParam]: 'test' }; diff --git a/projects/templates/src/lib/components/po-page-dynamic-table/samples/sample-po-page-dynamic-table-users/sample-po-page-dynamic-table-users.service.ts b/projects/templates/src/lib/components/po-page-dynamic-table/samples/sample-po-page-dynamic-table-users/sample-po-page-dynamic-table-users.service.ts index 75328e00e7..42486679a1 100644 --- a/projects/templates/src/lib/components/po-page-dynamic-table/samples/sample-po-page-dynamic-table-users/sample-po-page-dynamic-table-users.service.ts +++ b/projects/templates/src/lib/components/po-page-dynamic-table/samples/sample-po-page-dynamic-table-users/sample-po-page-dynamic-table-users.service.ts @@ -1,7 +1,9 @@ import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class SamplePoPageDynamicTableUsersService { constructor(public http: HttpClient) {} diff --git a/projects/templates/src/lib/components/po-page-job-scheduler/po-page-job-scheduler-lookup.service.ts b/projects/templates/src/lib/components/po-page-job-scheduler/po-page-job-scheduler-lookup.service.ts index 3f5ecfea78..460ee559f9 100644 --- a/projects/templates/src/lib/components/po-page-job-scheduler/po-page-job-scheduler-lookup.service.ts +++ b/projects/templates/src/lib/components/po-page-job-scheduler/po-page-job-scheduler-lookup.service.ts @@ -6,7 +6,9 @@ import { PoLookupFilter } from '@po-ui/ng-components'; import { PoPageJobSchedulerService } from './po-page-job-scheduler.service'; -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class PoPageJobSchedulerLookupService implements PoLookupFilter { constructor(private poPageJobSchedulerService: PoPageJobSchedulerService) {} diff --git a/projects/templates/src/lib/components/po-page-job-scheduler/po-page-job-scheduler.service.ts b/projects/templates/src/lib/components/po-page-job-scheduler/po-page-job-scheduler.service.ts index e5275d0835..1744b6fa4e 100644 --- a/projects/templates/src/lib/components/po-page-job-scheduler/po-page-job-scheduler.service.ts +++ b/projects/templates/src/lib/components/po-page-job-scheduler/po-page-job-scheduler.service.ts @@ -10,7 +10,9 @@ import { PoDynamicFormField } from '@po-ui/ng-components'; import { PoJobScheduler } from './interfaces/po-job-scheduler.interface'; import { PoJobSchedulerInternal } from './interfaces/po-job-scheduler-internal.interface'; -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class PoPageJobSchedulerService { readonly headers: HttpHeaders = new HttpHeaders({ 'X-PO-SCREEN-LOCK': 'true' diff --git a/projects/templates/src/lib/components/po-page-login/po-page-login.service.ts b/projects/templates/src/lib/components/po-page-login/po-page-login.service.ts index f5bdf4cb1a..0b1353c9da 100644 --- a/projects/templates/src/lib/components/po-page-login/po-page-login.service.ts +++ b/projects/templates/src/lib/components/po-page-login/po-page-login.service.ts @@ -6,7 +6,9 @@ import { Observable } from 'rxjs'; import { PoPageLogin } from './interfaces/po-page-login.interface'; import { PoPageLoginAuthenticationType } from './enums/po-page-login-authentication-type.enum'; -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class PoPageLoginService { constructor(private http: HttpClient) {} diff --git a/projects/ui/src/lib/components/po-accordion/services/po-accordion.service.ts b/projects/ui/src/lib/components/po-accordion/services/po-accordion.service.ts index 2a863b2976..0625ca34ff 100644 --- a/projects/ui/src/lib/components/po-accordion/services/po-accordion.service.ts +++ b/projects/ui/src/lib/components/po-accordion/services/po-accordion.service.ts @@ -12,7 +12,9 @@ import { PoAccordionItemComponent } from '../po-accordion-item/po-accordion-item * Serviço para poder notificar o componente `po-accordion` quando um `po-accordion-item` for * expandido/colapsado. */ -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class PoAccordionService { private subjectChild = new Subject(); diff --git a/projects/ui/src/lib/components/po-breadcrumb/po-breadcrumb-favorite/po-breadcrumb-favorite.service.ts b/projects/ui/src/lib/components/po-breadcrumb/po-breadcrumb-favorite/po-breadcrumb-favorite.service.ts index 4e976fdb3f..5aff456a42 100644 --- a/projects/ui/src/lib/components/po-breadcrumb/po-breadcrumb-favorite/po-breadcrumb-favorite.service.ts +++ b/projects/ui/src/lib/components/po-breadcrumb/po-breadcrumb-favorite/po-breadcrumb-favorite.service.ts @@ -17,7 +17,9 @@ import { Observable } from 'rxjs'; * junto com a requisição. * */ -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class PoBreadcrumbFavoriteService { private _url: string; private _bodyParams: object; diff --git a/projects/ui/src/lib/components/po-calendar/po-calendar.component.ts b/projects/ui/src/lib/components/po-calendar/po-calendar.component.ts index 3fb90aa4f0..155d1e541e 100644 --- a/projects/ui/src/lib/components/po-calendar/po-calendar.component.ts +++ b/projects/ui/src/lib/components/po-calendar/po-calendar.component.ts @@ -56,6 +56,7 @@ const poCalendarRangeWidth = 600; selector: 'po-calendar', templateUrl: './po-calendar.component.html', changeDetection: ChangeDetectionStrategy.OnPush, + providers, standalone: false }) export class PoCalendarComponent extends PoCalendarBaseComponent implements OnInit, OnChanges { diff --git a/projects/ui/src/lib/components/po-calendar/services/po-calendar.service.ts b/projects/ui/src/lib/components/po-calendar/services/po-calendar.service.ts index 0e8cfa8875..f71af58d93 100644 --- a/projects/ui/src/lib/components/po-calendar/services/po-calendar.service.ts +++ b/projects/ui/src/lib/components/po-calendar/services/po-calendar.service.ts @@ -2,7 +2,9 @@ import { Injectable } from '@angular/core'; const poCalendarServiceFirstWeekDayDefault: number = 0; -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class PoCalendarService { monthDates(year: any, month: any, dayFormatter: any = null, weekFormatter: any = null) { if (typeof month !== 'number' || month < 0 || month > 11) { diff --git a/projects/ui/src/lib/components/po-container/samples/sample-po-container-dashboard/sample-po-container-dashboard.service.ts b/projects/ui/src/lib/components/po-container/samples/sample-po-container-dashboard/sample-po-container-dashboard.service.ts index 21ec458489..5a4d0b6046 100644 --- a/projects/ui/src/lib/components/po-container/samples/sample-po-container-dashboard/sample-po-container-dashboard.service.ts +++ b/projects/ui/src/lib/components/po-container/samples/sample-po-container-dashboard/sample-po-container-dashboard.service.ts @@ -2,7 +2,9 @@ import { Injectable } from '@angular/core'; import { PoTableColumn } from '@po-ui/ng-components'; -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class SampleDashboardService { getColumns(): Array { return [ diff --git a/projects/ui/src/lib/components/po-disclaimer-group/samples/sample-po-disclaimer-group-sw-planets/sample-po-disclaimer-group-sw-planets.service.ts b/projects/ui/src/lib/components/po-disclaimer-group/samples/sample-po-disclaimer-group-sw-planets/sample-po-disclaimer-group-sw-planets.service.ts index e310a144a4..c36d3c135f 100644 --- a/projects/ui/src/lib/components/po-disclaimer-group/samples/sample-po-disclaimer-group-sw-planets/sample-po-disclaimer-group-sw-planets.service.ts +++ b/projects/ui/src/lib/components/po-disclaimer-group/samples/sample-po-disclaimer-group-sw-planets/sample-po-disclaimer-group-sw-planets.service.ts @@ -6,7 +6,9 @@ import { map } from 'rxjs/operators'; import { PoComboOption, PoTableColumn } from '@po-ui/ng-components'; -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class SamplePoDisclaimerGroupSwPlanetsService { constructor(private http: HttpClient) {} diff --git a/projects/ui/src/lib/components/po-dynamic/po-dynamic-form/po-dynamic-form-load/po-dynamic-form-load.service.ts b/projects/ui/src/lib/components/po-dynamic/po-dynamic-form/po-dynamic-form-load/po-dynamic-form-load.service.ts index 0b9f8162dd..b7ecb1055a 100644 --- a/projects/ui/src/lib/components/po-dynamic/po-dynamic-form/po-dynamic-form-load/po-dynamic-form-load.service.ts +++ b/projects/ui/src/lib/components/po-dynamic/po-dynamic-form/po-dynamic-form-load/po-dynamic-form-load.service.ts @@ -6,7 +6,9 @@ import { map } from 'rxjs/operators'; import { PoDynamicFormField } from '../po-dynamic-form-field.interface'; import { PoDynamicFormOperation } from '../po-dynamic-form-operation/po-dynamic-form-operation'; -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class PoDynamicFormLoadService extends PoDynamicFormOperation { constructor(http: HttpClient) { super(http); diff --git a/projects/ui/src/lib/components/po-dynamic/po-dynamic-form/po-dynamic-form-validation/po-dynamic-form-validation.service.ts b/projects/ui/src/lib/components/po-dynamic/po-dynamic-form/po-dynamic-form-validation/po-dynamic-form-validation.service.ts index 9917c96db3..021b68c6ff 100644 --- a/projects/ui/src/lib/components/po-dynamic/po-dynamic-form/po-dynamic-form-validation/po-dynamic-form-validation.service.ts +++ b/projects/ui/src/lib/components/po-dynamic/po-dynamic-form/po-dynamic-form-validation/po-dynamic-form-validation.service.ts @@ -9,7 +9,9 @@ import { PoDynamicFormFieldChanged } from './po-dynamic-form-field-changed.inter import { PoDynamicFormOperation } from '../po-dynamic-form-operation/po-dynamic-form-operation'; import { PoDynamicFormValidation } from './po-dynamic-form-validation.interface'; -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class PoDynamicFormValidationService extends PoDynamicFormOperation { constructor(http: HttpClient) { super(http); diff --git a/projects/ui/src/lib/components/po-dynamic/po-dynamic-form/samples/sample-po-dynamic-form-container/sample-po-dynamic-form-container.service.ts b/projects/ui/src/lib/components/po-dynamic/po-dynamic-form/samples/sample-po-dynamic-form-container/sample-po-dynamic-form-container.service.ts index ee4fa0e71d..cba38b381e 100644 --- a/projects/ui/src/lib/components/po-dynamic/po-dynamic-form/samples/sample-po-dynamic-form-container/sample-po-dynamic-form-container.service.ts +++ b/projects/ui/src/lib/components/po-dynamic/po-dynamic-form/samples/sample-po-dynamic-form-container/sample-po-dynamic-form-container.service.ts @@ -1,6 +1,8 @@ import { Injectable } from '@angular/core'; -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class PoDynamicFormContainerService { getCity(state: number) { switch (state) { diff --git a/projects/ui/src/lib/components/po-dynamic/po-dynamic-form/samples/sample-po-dynamic-form-register/sample-po-dynamic-form-register.service.ts b/projects/ui/src/lib/components/po-dynamic/po-dynamic-form/samples/sample-po-dynamic-form-register/sample-po-dynamic-form-register.service.ts index 6d0ff6738a..6a2b0b2e8c 100644 --- a/projects/ui/src/lib/components/po-dynamic/po-dynamic-form/samples/sample-po-dynamic-form-register/sample-po-dynamic-form-register.service.ts +++ b/projects/ui/src/lib/components/po-dynamic/po-dynamic-form/samples/sample-po-dynamic-form-register/sample-po-dynamic-form-register.service.ts @@ -1,6 +1,8 @@ import { Injectable } from '@angular/core'; -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class PoDynamicFormRegisterService { getCity(state: number) { switch (state) { diff --git a/projects/ui/src/lib/components/po-dynamic/po-dynamic-view/samples/sample-po-dynamic-view-employee-on-load/sample-po-dynamic-view-employee-on-load.service.ts b/projects/ui/src/lib/components/po-dynamic/po-dynamic-view/samples/sample-po-dynamic-view-employee-on-load/sample-po-dynamic-view-employee-on-load.service.ts index 6a1df9be28..5c514eafb6 100644 --- a/projects/ui/src/lib/components/po-dynamic/po-dynamic-view/samples/sample-po-dynamic-view-employee-on-load/sample-po-dynamic-view-employee-on-load.service.ts +++ b/projects/ui/src/lib/components/po-dynamic/po-dynamic-view/samples/sample-po-dynamic-view-employee-on-load/sample-po-dynamic-view-employee-on-load.service.ts @@ -2,7 +2,9 @@ import { HttpClient, HttpHeaders } from '@angular/common/http'; import { Injectable } from '@angular/core'; import { Observable, map } from 'rxjs'; -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class SamplePoDynamicViewEmployeeOnLoadService { readonly headers: HttpHeaders = new HttpHeaders({ 'X-PO-No-Message': 'true' diff --git a/projects/ui/src/lib/components/po-dynamic/po-dynamic-view/services/po-dynamic-view.service.ts b/projects/ui/src/lib/components/po-dynamic/po-dynamic-view/services/po-dynamic-view.service.ts index 141b192b74..974412341e 100644 --- a/projects/ui/src/lib/components/po-dynamic/po-dynamic-view/services/po-dynamic-view.service.ts +++ b/projects/ui/src/lib/components/po-dynamic/po-dynamic-view/services/po-dynamic-view.service.ts @@ -11,7 +11,9 @@ import { PoDynamicViewField } from '../po-dynamic-view-field.interface'; * * Serviço padrão utilizado para filtrar os dados dos campos que utilizam a propriedade `searchService`. */ -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class PoDynamicViewService { readonly headers: HttpHeaders = new HttpHeaders({ 'X-PO-No-Message': 'true' diff --git a/projects/ui/src/lib/components/po-field/po-combo/po-combo-filter.service.ts b/projects/ui/src/lib/components/po-field/po-combo/po-combo-filter.service.ts index fbf94222be..25ebb96664 100644 --- a/projects/ui/src/lib/components/po-field/po-combo/po-combo-filter.service.ts +++ b/projects/ui/src/lib/components/po-field/po-combo/po-combo-filter.service.ts @@ -16,7 +16,9 @@ import { validateObjectType } from '../../../utils/util'; * * Serviço padrão utilizado para filtrar os dados do componente po-combo. */ -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class PoComboFilterService implements PoComboFilter { fieldLabel: string = 'label'; fieldValue: string = 'value'; diff --git a/projects/ui/src/lib/components/po-field/po-combo/samples/sample-po-combo-scheduling/sample-po-combo-scheduling.service.ts b/projects/ui/src/lib/components/po-field/po-combo/samples/sample-po-combo-scheduling/sample-po-combo-scheduling.service.ts index eb23879928..2a252243eb 100644 --- a/projects/ui/src/lib/components/po-field/po-combo/samples/sample-po-combo-scheduling/sample-po-combo-scheduling.service.ts +++ b/projects/ui/src/lib/components/po-field/po-combo/samples/sample-po-combo-scheduling/sample-po-combo-scheduling.service.ts @@ -2,7 +2,9 @@ import { Injectable } from '@angular/core'; import { PoComboOptionGroup } from '@po-ui/ng-components'; -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class SamplePoComboSchedulingService { getcities(): Array { return [ diff --git a/projects/ui/src/lib/components/po-field/po-datepicker-range/po-datepicker-range.component.ts b/projects/ui/src/lib/components/po-field/po-datepicker-range/po-datepicker-range.component.ts index b5410fd878..4d1908f0df 100644 --- a/projects/ui/src/lib/components/po-field/po-datepicker-range/po-datepicker-range.component.ts +++ b/projects/ui/src/lib/components/po-field/po-datepicker-range/po-datepicker-range.component.ts @@ -77,6 +77,7 @@ const providers = [ selector: 'po-datepicker-range', templateUrl: './po-datepicker-range.component.html', changeDetection: ChangeDetectionStrategy.OnPush, + providers, standalone: false }) export class PoDatepickerRangeComponent diff --git a/projects/ui/src/lib/components/po-field/po-email/po-email.component.ts b/projects/ui/src/lib/components/po-field/po-email/po-email.component.ts index 404e71546d..be16ba059c 100644 --- a/projects/ui/src/lib/components/po-field/po-email/po-email.component.ts +++ b/projects/ui/src/lib/components/po-field/po-email/po-email.component.ts @@ -58,6 +58,7 @@ const providers = [ selector: 'po-email', templateUrl: '../po-input/po-input.component.html', changeDetection: ChangeDetectionStrategy.OnPush, + providers, standalone: false }) export class PoEmailComponent extends PoInputGeneric implements AfterViewInit, OnDestroy { diff --git a/projects/ui/src/lib/components/po-field/po-login/po-login.component.ts b/projects/ui/src/lib/components/po-field/po-login/po-login.component.ts index 66538df9ac..47a7036174 100644 --- a/projects/ui/src/lib/components/po-field/po-login/po-login.component.ts +++ b/projects/ui/src/lib/components/po-field/po-login/po-login.component.ts @@ -49,6 +49,7 @@ const providers = [ selector: 'po-login', templateUrl: './po-login.component.html', changeDetection: ChangeDetectionStrategy.OnPush, + providers, standalone: false }) export class PoLoginComponent extends PoInputGeneric { diff --git a/projects/ui/src/lib/components/po-field/po-lookup/po-lookup.component.ts b/projects/ui/src/lib/components/po-field/po-lookup/po-lookup.component.ts index 8f0e44906c..d9e91f0763 100644 --- a/projects/ui/src/lib/components/po-field/po-lookup/po-lookup.component.ts +++ b/projects/ui/src/lib/components/po-field/po-lookup/po-lookup.component.ts @@ -138,6 +138,7 @@ const providers = [ selector: 'po-lookup', templateUrl: './po-lookup.component.html', changeDetection: ChangeDetectionStrategy.OnPush, + providers, standalone: false }) export class PoLookupComponent extends PoLookupBaseComponent implements AfterViewInit, OnDestroy, OnInit, DoCheck { diff --git a/projects/ui/src/lib/components/po-field/po-lookup/samples/sample-po-lookup-sw-films/sample-po-lookup-sw-films.service.ts b/projects/ui/src/lib/components/po-field/po-lookup/samples/sample-po-lookup-sw-films/sample-po-lookup-sw-films.service.ts index e1d241d0d8..2c38785349 100644 --- a/projects/ui/src/lib/components/po-field/po-lookup/samples/sample-po-lookup-sw-films/sample-po-lookup-sw-films.service.ts +++ b/projects/ui/src/lib/components/po-field/po-lookup/samples/sample-po-lookup-sw-films/sample-po-lookup-sw-films.service.ts @@ -6,7 +6,9 @@ import { Observable } from 'rxjs'; import { PoLookupFilter, PoLookupResponseApi, PoLookupFilteredItemsParams } from '@po-ui/ng-components'; -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class SamplePoLookupSwFilmsService implements PoLookupFilter { private baseUrl = 'https://swapi.dev/api'; private filmsUrl = 'https://swapi.dev/api/films/'; diff --git a/projects/ui/src/lib/components/po-field/po-lookup/samples/sample-po-lookup.service.ts b/projects/ui/src/lib/components/po-field/po-lookup/samples/sample-po-lookup.service.ts index ddc6b3368b..f566d39bab 100644 --- a/projects/ui/src/lib/components/po-field/po-lookup/samples/sample-po-lookup.service.ts +++ b/projects/ui/src/lib/components/po-field/po-lookup/samples/sample-po-lookup.service.ts @@ -5,7 +5,9 @@ import { Observable } from 'rxjs'; import { PoLookupFilter, PoLookupFilteredItemsParams } from '@po-ui/ng-components'; -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class SamplePoLookupService implements PoLookupFilter { private url = 'https://po-sample-api.onrender.com/v1/heroes'; diff --git a/projects/ui/src/lib/components/po-field/po-lookup/services/po-lookup-filter.service.ts b/projects/ui/src/lib/components/po-field/po-lookup/services/po-lookup-filter.service.ts index 4501cfe931..75e324e1fc 100644 --- a/projects/ui/src/lib/components/po-field/po-lookup/services/po-lookup-filter.service.ts +++ b/projects/ui/src/lib/components/po-field/po-lookup/services/po-lookup-filter.service.ts @@ -16,7 +16,9 @@ import { PoLookupFilteredItemsParams } from '../interfaces/po-lookup-filtered-it * * Serviço padrão utilizado para filtrar os dados do componente po-lookup. */ -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class PoLookupFilterService implements PoLookupFilter { readonly headers: HttpHeaders = new HttpHeaders({ 'X-PO-No-Message': 'true' diff --git a/projects/ui/src/lib/components/po-field/po-lookup/services/po-lookup-modal.service.ts b/projects/ui/src/lib/components/po-field/po-lookup/services/po-lookup-modal.service.ts index 3fb68a173e..af4b40bf07 100644 --- a/projects/ui/src/lib/components/po-field/po-lookup/services/po-lookup-modal.service.ts +++ b/projects/ui/src/lib/components/po-field/po-lookup/services/po-lookup-modal.service.ts @@ -12,7 +12,9 @@ import { PoLookupModalComponent } from '../po-lookup-modal/po-lookup-modal.compo * * Serviço responsável por controlar a abertura do componente Po Lookup Modal. */ -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class PoLookupModalService { selectValueEvent: EventEmitter = new EventEmitter(); diff --git a/projects/ui/src/lib/components/po-field/po-multiselect/po-multiselect-filter.service.ts b/projects/ui/src/lib/components/po-field/po-multiselect/po-multiselect-filter.service.ts index e982544402..6925dc6f53 100644 --- a/projects/ui/src/lib/components/po-field/po-multiselect/po-multiselect-filter.service.ts +++ b/projects/ui/src/lib/components/po-field/po-multiselect/po-multiselect-filter.service.ts @@ -6,7 +6,9 @@ import { map } from 'rxjs/operators'; import { PoMultiselectFilter } from './po-multiselect-filter.interface'; import { PoMultiselectOption } from './po-multiselect-option.interface'; -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class PoMultiselectFilterService implements PoMultiselectFilter { fieldLabel: string = 'label'; fieldValue: string = 'value'; diff --git a/projects/ui/src/lib/components/po-field/po-multiselect/po-multiselect.component.ts b/projects/ui/src/lib/components/po-field/po-multiselect/po-multiselect.component.ts index 1828616f38..be4f6d2fc8 100644 --- a/projects/ui/src/lib/components/po-field/po-multiselect/po-multiselect.component.ts +++ b/projects/ui/src/lib/components/po-field/po-multiselect/po-multiselect.component.ts @@ -113,6 +113,7 @@ const providers = [ selector: 'po-multiselect', templateUrl: './po-multiselect.component.html', changeDetection: ChangeDetectionStrategy.OnPush, + providers, standalone: false }) export class PoMultiselectComponent diff --git a/projects/ui/src/lib/components/po-field/po-multiselect/samples/sample-po-multiselect-heroes/sample-po-multiselect-heroes.service.ts b/projects/ui/src/lib/components/po-field/po-multiselect/samples/sample-po-multiselect-heroes/sample-po-multiselect-heroes.service.ts index a62d3eae70..78e25302da 100644 --- a/projects/ui/src/lib/components/po-field/po-multiselect/samples/sample-po-multiselect-heroes/sample-po-multiselect-heroes.service.ts +++ b/projects/ui/src/lib/components/po-field/po-multiselect/samples/sample-po-multiselect-heroes/sample-po-multiselect-heroes.service.ts @@ -6,7 +6,9 @@ import { map } from 'rxjs/operators'; import { PoMultiselectFilter, PoMultiselectOption } from '@po-ui/ng-components'; -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class SamplePoMultiselectHeroesService implements PoMultiselectFilter { constructor(private http: HttpClient) {} diff --git a/projects/ui/src/lib/components/po-field/po-rich-text/po-rich-text.component.ts b/projects/ui/src/lib/components/po-field/po-rich-text/po-rich-text.component.ts index 08456cace2..0d41aa39bf 100644 --- a/projects/ui/src/lib/components/po-field/po-rich-text/po-rich-text.component.ts +++ b/projects/ui/src/lib/components/po-field/po-rich-text/po-rich-text.component.ts @@ -63,6 +63,7 @@ const providers = [ selector: 'po-rich-text', templateUrl: './po-rich-text.component.html', changeDetection: ChangeDetectionStrategy.OnPush, + providers, standalone: false }) export class PoRichTextComponent diff --git a/projects/ui/src/lib/components/po-field/po-rich-text/po-rich-text.service.ts b/projects/ui/src/lib/components/po-field/po-rich-text/po-rich-text.service.ts index a2e1ade45c..30c74abf32 100644 --- a/projects/ui/src/lib/components/po-field/po-rich-text/po-rich-text.service.ts +++ b/projects/ui/src/lib/components/po-field/po-rich-text/po-rich-text.service.ts @@ -2,7 +2,9 @@ import { Injectable } from '@angular/core'; import { Subject } from 'rxjs'; -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class PoRichTextService { private model = new Subject(); diff --git a/projects/ui/src/lib/components/po-field/po-select/samples/sample-po-select-customer-registration/sample-po-select-customer-registration.service.ts b/projects/ui/src/lib/components/po-field/po-select/samples/sample-po-select-customer-registration/sample-po-select-customer-registration.service.ts index feb086d206..9901b80702 100644 --- a/projects/ui/src/lib/components/po-field/po-select/samples/sample-po-select-customer-registration/sample-po-select-customer-registration.service.ts +++ b/projects/ui/src/lib/components/po-field/po-select/samples/sample-po-select-customer-registration/sample-po-select-customer-registration.service.ts @@ -1,7 +1,9 @@ import { HttpClient } from '@angular/common/http'; import { Injectable } from '@angular/core'; -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class SamplePoSelectCustomerRegistrationService { private url: string = 'https://po-sample-api.onrender.com/v1/sampleSelect'; diff --git a/projects/ui/src/lib/components/po-field/po-upload/po-upload-base.service.ts b/projects/ui/src/lib/components/po-field/po-upload/po-upload-base.service.ts index ae7422153f..3b0318ef51 100644 --- a/projects/ui/src/lib/components/po-field/po-upload/po-upload-base.service.ts +++ b/projects/ui/src/lib/components/po-field/po-upload/po-upload-base.service.ts @@ -12,7 +12,9 @@ import { PoUploadFile } from './po-upload-file'; import { Observable, Subscription } from 'rxjs'; -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class PoUploadBaseService { formField: string = 'files'; requests: Array = []; diff --git a/projects/ui/src/lib/components/po-field/po-upload/po-upload.service.ts b/projects/ui/src/lib/components/po-field/po-upload/po-upload.service.ts index 12b0a85c11..22e12dd8b2 100644 --- a/projects/ui/src/lib/components/po-field/po-upload/po-upload.service.ts +++ b/projects/ui/src/lib/components/po-field/po-upload/po-upload.service.ts @@ -2,5 +2,7 @@ import { Injectable } from '@angular/core'; import { PoUploadBaseService } from './po-upload-base.service'; -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class PoUploadService extends PoUploadBaseService {} diff --git a/projects/ui/src/lib/components/po-list-view/samples/sample-po-list-view-hiring-processes/sample-po-list-view-hiring-processes.service.ts b/projects/ui/src/lib/components/po-list-view/samples/sample-po-list-view-hiring-processes/sample-po-list-view-hiring-processes.service.ts index 7d6af84d89..40dbfffc70 100644 --- a/projects/ui/src/lib/components/po-list-view/samples/sample-po-list-view-hiring-processes/sample-po-list-view-hiring-processes.service.ts +++ b/projects/ui/src/lib/components/po-list-view/samples/sample-po-list-view-hiring-processes/sample-po-list-view-hiring-processes.service.ts @@ -1,6 +1,8 @@ import { Injectable } from '@angular/core'; -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class SamplePoListViewHiringProcessesService { getItems() { return [ diff --git a/projects/ui/src/lib/components/po-menu-panel/services/po-menu-panel-items.service.ts b/projects/ui/src/lib/components/po-menu-panel/services/po-menu-panel-items.service.ts index fcc0c44f03..50cfe13551 100644 --- a/projects/ui/src/lib/components/po-menu-panel/services/po-menu-panel-items.service.ts +++ b/projects/ui/src/lib/components/po-menu-panel/services/po-menu-panel-items.service.ts @@ -9,7 +9,9 @@ import { Observable, Subject } from 'rxjs'; * * Serviço que implementa a comunicação entre os items do po-menu-panel. */ -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class PoMenuPanelItemsService { private subjectChild = new Subject(); private subjectParent = new Subject(); diff --git a/projects/ui/src/lib/components/po-menu/samples/sample-po-menu-human-resources/sample-po-menu-human-resources.service.ts b/projects/ui/src/lib/components/po-menu/samples/sample-po-menu-human-resources/sample-po-menu-human-resources.service.ts index bb32925e96..0901db3394 100644 --- a/projects/ui/src/lib/components/po-menu/samples/sample-po-menu-human-resources/sample-po-menu-human-resources.service.ts +++ b/projects/ui/src/lib/components/po-menu/samples/sample-po-menu-human-resources/sample-po-menu-human-resources.service.ts @@ -6,7 +6,9 @@ import { map } from 'rxjs/operators'; import { PoMenuFilter, PoMenuItemFiltered } from '@po-ui/ng-components'; -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class SamplePoMenuHumanResourcesService implements PoMenuFilter { private url: string = 'https://po-sample-api.onrender.com/v1/menus'; diff --git a/projects/ui/src/lib/components/po-menu/services/po-menu-items.service.ts b/projects/ui/src/lib/components/po-menu/services/po-menu-items.service.ts index d197fb1a00..1d16b8347e 100644 --- a/projects/ui/src/lib/components/po-menu/services/po-menu-items.service.ts +++ b/projects/ui/src/lib/components/po-menu/services/po-menu-items.service.ts @@ -9,7 +9,9 @@ import { Observable, Subject } from 'rxjs'; * * Serviço que implementa a comunicação entre os items do po-menu. */ -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class PoMenuItemsService { private subjectParent = new Subject(); private subjectChild = new Subject(); diff --git a/projects/ui/src/lib/components/po-menu/services/po-menu.service.ts b/projects/ui/src/lib/components/po-menu/services/po-menu.service.ts index 4dd13a8a87..ef2d95042f 100644 --- a/projects/ui/src/lib/components/po-menu/services/po-menu.service.ts +++ b/projects/ui/src/lib/components/po-menu/services/po-menu.service.ts @@ -15,7 +15,9 @@ import { PoMenuFilter } from '../po-menu-filter/po-menu-filter.interface'; * Serviço que implementa a interface `PoMenuFilter`, utilizado para fazer requisições ao serviço informado pelo usuário, * caso for uma URL, no componente `po-menu`. */ -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class PoMenuService implements PoMenuFilter { private _url: string; diff --git a/projects/ui/src/lib/components/po-page/po-page-default/samples/sample-po-page-default-dashboard/sample-po-page-default-dashboard.service.ts b/projects/ui/src/lib/components/po-page/po-page-default/samples/sample-po-page-default-dashboard/sample-po-page-default-dashboard.service.ts index 46d8a83855..605ea6e39f 100644 --- a/projects/ui/src/lib/components/po-page/po-page-default/samples/sample-po-page-default-dashboard/sample-po-page-default-dashboard.service.ts +++ b/projects/ui/src/lib/components/po-page/po-page-default/samples/sample-po-page-default-dashboard/sample-po-page-default-dashboard.service.ts @@ -2,7 +2,9 @@ import { Injectable } from '@angular/core'; import { PoTableColumn } from '@po-ui/ng-components'; -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class SampleDashboardService { getColumns(): Array { return [ diff --git a/projects/ui/src/lib/components/po-page/po-page-list/samples/sample-po-page-list-hiring-processes/sample-po-page-list-hiring-processes.service.ts b/projects/ui/src/lib/components/po-page/po-page-list/samples/sample-po-page-list-hiring-processes/sample-po-page-list-hiring-processes.service.ts index d50d1d9fba..a2a9bb3931 100644 --- a/projects/ui/src/lib/components/po-page/po-page-list/samples/sample-po-page-list-hiring-processes/sample-po-page-list-hiring-processes.service.ts +++ b/projects/ui/src/lib/components/po-page/po-page-list/samples/sample-po-page-list-hiring-processes/sample-po-page-list-hiring-processes.service.ts @@ -2,7 +2,9 @@ import { Injectable } from '@angular/core'; import { PoTableColumn } from '@po-ui/ng-components'; -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class SamplePoPageListHiringProcessesService { getColumns(): Array { return [ diff --git a/projects/ui/src/lib/components/po-table/samples/sample-po-table-airfare/sample-po-table-airfare.service.ts b/projects/ui/src/lib/components/po-table/samples/sample-po-table-airfare/sample-po-table-airfare.service.ts index 3804f43118..8e9454a07f 100644 --- a/projects/ui/src/lib/components/po-table/samples/sample-po-table-airfare/sample-po-table-airfare.service.ts +++ b/projects/ui/src/lib/components/po-table/samples/sample-po-table-airfare/sample-po-table-airfare.service.ts @@ -2,7 +2,9 @@ import { Injectable } from '@angular/core'; import { PoTableColumn, PoTableDetail } from '@po-ui/ng-components'; -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class SamplePoTableAirfareService { getColumns(): Array { const airfareDetail: PoTableDetail = { diff --git a/projects/ui/src/lib/components/po-table/samples/sample-po-table-components/sample-po-table-components.service.ts b/projects/ui/src/lib/components/po-table/samples/sample-po-table-components/sample-po-table-components.service.ts index bbbe65f441..9a683ca565 100644 --- a/projects/ui/src/lib/components/po-table/samples/sample-po-table-components/sample-po-table-components.service.ts +++ b/projects/ui/src/lib/components/po-table/samples/sample-po-table-components/sample-po-table-components.service.ts @@ -2,7 +2,9 @@ import { Injectable } from '@angular/core'; import { PoTableColumnSort, PoTableColumnSortType } from '@po-ui/ng-components'; -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class SamplePoTableComponentsService { readonly items = [ { diff --git a/projects/ui/src/lib/components/po-table/samples/sample-po-table-heroes/sample-po-table-heroes.service.ts b/projects/ui/src/lib/components/po-table/samples/sample-po-table-heroes/sample-po-table-heroes.service.ts index 251f01b9e1..5f54e8c23f 100644 --- a/projects/ui/src/lib/components/po-table/samples/sample-po-table-heroes/sample-po-table-heroes.service.ts +++ b/projects/ui/src/lib/components/po-table/samples/sample-po-table-heroes/sample-po-table-heroes.service.ts @@ -4,7 +4,9 @@ import { PoTableColumn } from '@po-ui/ng-components'; import { Observable } from 'rxjs'; import { pluck } from 'rxjs/operators'; -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class SamplePoTableHeroesService { constructor(private http: HttpClient) {} getColumns(): Array { diff --git a/projects/ui/src/lib/components/po-table/samples/sample-po-table-labs/sample-po-table-labs.service.ts b/projects/ui/src/lib/components/po-table/samples/sample-po-table-labs/sample-po-table-labs.service.ts index e6173cd9c3..6814b23727 100644 --- a/projects/ui/src/lib/components/po-table/samples/sample-po-table-labs/sample-po-table-labs.service.ts +++ b/projects/ui/src/lib/components/po-table/samples/sample-po-table-labs/sample-po-table-labs.service.ts @@ -2,7 +2,9 @@ import { Injectable } from '@angular/core'; import { PoTableColumn } from '@po-ui/ng-components'; -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class SamplePoTableLabsService { private readonly colors = [ 'color-01', diff --git a/projects/ui/src/lib/components/po-table/samples/sample-po-table-transport/sample-po-table-transport.service.ts b/projects/ui/src/lib/components/po-table/samples/sample-po-table-transport/sample-po-table-transport.service.ts index 5e679a448e..0f9f6aeca2 100644 --- a/projects/ui/src/lib/components/po-table/samples/sample-po-table-transport/sample-po-table-transport.service.ts +++ b/projects/ui/src/lib/components/po-table/samples/sample-po-table-transport/sample-po-table-transport.service.ts @@ -2,7 +2,9 @@ import { Injectable } from '@angular/core'; import { PoTableColumn, PoTagType } from '@po-ui/ng-components'; -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class SamplePoTableTransportService { getColumns(): Array { return [ diff --git a/projects/ui/src/lib/components/po-tabs/po-tabs.service.ts b/projects/ui/src/lib/components/po-tabs/po-tabs.service.ts index 6ec31057df..9f36ecdbfc 100644 --- a/projects/ui/src/lib/components/po-tabs/po-tabs.service.ts +++ b/projects/ui/src/lib/components/po-tabs/po-tabs.service.ts @@ -2,7 +2,9 @@ import { Injectable } from '@angular/core'; import { Subject } from 'rxjs'; import { PoTabComponent } from './po-tab/po-tab.component'; -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class PoTabsService { private onChangesTriggeredSource = new Subject(); private onChangesTriggeredActiveSource = new Subject(); diff --git a/projects/ui/src/lib/components/po-tree-view/services/po-tree-view.service.ts b/projects/ui/src/lib/components/po-tree-view/services/po-tree-view.service.ts index c760b7a7df..8979f785de 100644 --- a/projects/ui/src/lib/components/po-tree-view/services/po-tree-view.service.ts +++ b/projects/ui/src/lib/components/po-tree-view/services/po-tree-view.service.ts @@ -4,7 +4,9 @@ import { Subject } from 'rxjs'; import { PoTreeViewItem } from '../po-tree-view-item/po-tree-view-item.interface'; -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class PoTreeViewService { private expandedEvent = new Subject(); private selectedEvent = new Subject(); diff --git a/projects/ui/src/lib/directives/po-tooltip/po-tooltip-control-position.service.ts b/projects/ui/src/lib/directives/po-tooltip/po-tooltip-control-position.service.ts index 3870ef6615..aeb2ffb7f1 100644 --- a/projects/ui/src/lib/directives/po-tooltip/po-tooltip-control-position.service.ts +++ b/projects/ui/src/lib/directives/po-tooltip/po-tooltip-control-position.service.ts @@ -2,5 +2,7 @@ import { Injectable } from '@angular/core'; import { PoControlPositionService } from '../../services/po-control-position/po-control-position.service'; -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class PoTooltipControlPositionService extends PoControlPositionService {} diff --git a/projects/ui/src/lib/interceptors/po-http-interceptor/po-http-interceptor-base.service.ts b/projects/ui/src/lib/interceptors/po-http-interceptor/po-http-interceptor-base.service.ts index 9e07c0122e..8f0b8e06f7 100644 --- a/projects/ui/src/lib/interceptors/po-http-interceptor/po-http-interceptor-base.service.ts +++ b/projects/ui/src/lib/interceptors/po-http-interceptor/po-http-interceptor-base.service.ts @@ -66,7 +66,9 @@ const NO_MESSAGE_HEADER_PARAM = 'X-PO-No-Message'; * * ... * - * @Injectable() + * @Injectable({ + * providedIn: 'root' + * }) * export class UserService { * * constructor(private http: HttpClient) { } diff --git a/projects/ui/src/lib/interceptors/po-http-interceptor/po-http-interceptor.service.ts b/projects/ui/src/lib/interceptors/po-http-interceptor/po-http-interceptor.service.ts index e02d5d92f7..1493dd3195 100644 --- a/projects/ui/src/lib/interceptors/po-http-interceptor/po-http-interceptor.service.ts +++ b/projects/ui/src/lib/interceptors/po-http-interceptor/po-http-interceptor.service.ts @@ -15,7 +15,9 @@ import { PoHttpInterceptorBaseService } from './po-http-interceptor-base.service * * */ -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class PoHttpInterceptorService extends PoHttpInterceptorBaseService { constructor( notification: PoNotificationService, diff --git a/projects/ui/src/lib/interceptors/po-http-request/po-http-request-control-service.ts b/projects/ui/src/lib/interceptors/po-http-request/po-http-request-control-service.ts index c0c070f89a..656d43ead5 100644 --- a/projects/ui/src/lib/interceptors/po-http-request/po-http-request-control-service.ts +++ b/projects/ui/src/lib/interceptors/po-http-request/po-http-request-control-service.ts @@ -8,7 +8,9 @@ import { Observable, Subject } from 'rxjs'; * Serviço responsável por efetuar o controle de interação com o serviço de interceptor `PoHttpRequestInterceptorService` * gerenciando o seu estado. */ -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class PoHttpRequesControltService { controlHttpRequest: Subject = new Subject(); diff --git a/projects/ui/src/lib/interceptors/po-http-request/po-http-request-interceptor.service.ts b/projects/ui/src/lib/interceptors/po-http-request/po-http-request-interceptor.service.ts index 9492f882ef..40a9482fda 100644 --- a/projects/ui/src/lib/interceptors/po-http-request/po-http-request-interceptor.service.ts +++ b/projects/ui/src/lib/interceptors/po-http-request/po-http-request-interceptor.service.ts @@ -58,7 +58,9 @@ const screenLock = 'X-PO-Screen-Lock'; * * ... * - * @Injectable() + * @Injectable({ + * providedIn: 'root' + * }) * export class CustomersService { * * headers = { 'X-PO-No-Count-Pending-Requests': true, 'X-PO-Screen-Lock': 'true' } diff --git a/projects/ui/src/lib/services/po-color-palette/po-color-palette.service.ts b/projects/ui/src/lib/services/po-color-palette/po-color-palette.service.ts index 1656d59341..e587c67daf 100644 --- a/projects/ui/src/lib/services/po-color-palette/po-color-palette.service.ts +++ b/projects/ui/src/lib/services/po-color-palette/po-color-palette.service.ts @@ -2,7 +2,9 @@ import { Injectable } from '@angular/core'; import { PoColorPaletteEnum } from '../../enums/po-color-palette.enum'; -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class PoColorPaletteService { getColor(value: { color?: string; type?: string }): string { return (Object).values(PoColorPaletteEnum).includes(value.color) diff --git a/projects/ui/src/lib/services/po-control-position/po-control-position.service.ts b/projects/ui/src/lib/services/po-control-position/po-control-position.service.ts index 51134aa361..d9461578f3 100644 --- a/projects/ui/src/lib/services/po-control-position/po-control-position.service.ts +++ b/projects/ui/src/lib/services/po-control-position/po-control-position.service.ts @@ -39,7 +39,9 @@ const poControlPositionSidesDefault: Array = [ 'right-top' ]; -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class PoControlPositionService { private arrowDirection: string; private customPositions: Array; diff --git a/projects/ui/src/lib/services/po-dialog/po-dialog.service.ts b/projects/ui/src/lib/services/po-dialog/po-dialog.service.ts index bed906e725..b1181a13d5 100644 --- a/projects/ui/src/lib/services/po-dialog/po-dialog.service.ts +++ b/projects/ui/src/lib/services/po-dialog/po-dialog.service.ts @@ -26,7 +26,9 @@ import { PoDialogType } from './po-dialog.enum'; * * */ -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class PoDialogService extends PoDialogBaseService { constructor(private poComponentInjector: PoComponentInjectorService) { super(); diff --git a/projects/ui/src/lib/services/po-i18n/po-i18n.service.ts b/projects/ui/src/lib/services/po-i18n/po-i18n.service.ts index 701f33240c..56da33537f 100644 --- a/projects/ui/src/lib/services/po-i18n/po-i18n.service.ts +++ b/projects/ui/src/lib/services/po-i18n/po-i18n.service.ts @@ -10,7 +10,9 @@ import { PoI18nConfig } from './interfaces/po-i18n-config.interface'; * @docsExtends PoI18nBaseService */ -@Injectable({ providedIn: 'root' }) +@Injectable({ + providedIn: 'root' +}) export class PoI18nService extends PoI18nBaseService {} // Função usada para retornar instância para o módulo po-i18n.module diff --git a/projects/ui/src/lib/services/po-notification/po-notification-base.service.spec.ts b/projects/ui/src/lib/services/po-notification/po-notification-base.service.spec.ts index 08c33c9827..945d2a00b7 100644 --- a/projects/ui/src/lib/services/po-notification/po-notification-base.service.spec.ts +++ b/projects/ui/src/lib/services/po-notification/po-notification-base.service.spec.ts @@ -7,7 +7,9 @@ import { PoToaster, PoToasterOrientation, PoToasterType } from '../../components import { PoToasterBaseComponent } from '../../components/po-toaster/po-toaster-base.component'; import { PoNotificationBaseService } from './po-notification-base.service'; -@Injectable() +@Injectable({ + providedIn: 'root' +}) class PoNotificationService extends PoNotificationBaseService { createToaster(toaster: PoToaster, viewContainerRef?: ViewContainerRef): void { const elementRef: ElementRef = {