@senior-agronegocio/angular-components 1.0.9 → 1.0.10

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 (34) hide show
  1. package/esm2022/agro-angular-components.module.mjs +19 -4
  2. package/esm2022/fields/lookups/config/lookup-host-project-config.mjs +7 -4
  3. package/esm2022/fields/lookups/config/lookup-runtime-context.mjs +12 -0
  4. package/esm2022/fields/lookups/core/agro-branch-lookup.mjs +6 -5
  5. package/esm2022/fields/lookups/core/agro-company-lookup.mjs +4 -3
  6. package/esm2022/fields/lookups/core/agro-currency-lookup.mjs +4 -3
  7. package/esm2022/fields/lookups/core/agro-deposit-balance-lookup.mjs +4 -3
  8. package/esm2022/fields/lookups/core/agro-deposit-lookup.mjs +4 -3
  9. package/esm2022/fields/lookups/core/agro-driver-lookup.mjs +4 -3
  10. package/esm2022/fields/lookups/core/agro-e095-pes-lookup.mjs +4 -3
  11. package/esm2022/fields/lookups/core/agro-family-group-lookup.mjs +4 -3
  12. package/esm2022/fields/lookups/core/agro-family-lookup.mjs +4 -3
  13. package/esm2022/fields/lookups/core/agro-harvest-lookup.mjs +4 -3
  14. package/esm2022/fields/lookups/core/agro-increase-product-lookup.mjs +4 -3
  15. package/esm2022/fields/lookups/core/agro-lookup-base.mjs +3 -3
  16. package/esm2022/fields/lookups/core/agro-producer-lookup.mjs +4 -3
  17. package/esm2022/fields/lookups/core/agro-product-lookup.mjs +4 -3
  18. package/esm2022/fields/lookups/core/agro-product-variety-lookup.mjs +4 -3
  19. package/esm2022/fields/lookups/core/agro-romaneo-lookup.mjs +4 -3
  20. package/esm2022/fields/lookups/core/agro-rural-estate-lookup.mjs +4 -3
  21. package/esm2022/fields/lookups/core/agro-ticket-lookup.mjs +4 -3
  22. package/esm2022/fields/lookups/core/index.mjs +1 -1
  23. package/esm2022/fields/lookups/core/lookup-field.types.mjs +1 -1
  24. package/esm2022/fields/lookups/index.mjs +1 -1
  25. package/esm2022/fields/lookups/services/agro-lookup-entity.service.mjs +25 -15
  26. package/fesm2022/senior-agronegocio-angular-components.mjs +545 -510
  27. package/fesm2022/senior-agronegocio-angular-components.mjs.map +1 -1
  28. package/fields/lookups/config/lookup-host-project-config.d.ts +2 -2
  29. package/fields/lookups/config/lookup-runtime-context.d.ts +3 -0
  30. package/fields/lookups/core/index.d.ts +1 -1
  31. package/fields/lookups/core/lookup-field.types.d.ts +7 -1
  32. package/fields/lookups/index.d.ts +1 -0
  33. package/fields/lookups/services/agro-lookup-entity.service.d.ts +4 -2
  34. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
- import { HostProjectConfigs } from '../../../agro-angular-components.module';
2
- export declare function resolveLookupHostProjectConfig(config: HostProjectConfigs | null | undefined, serviceName: string): HostProjectConfigs;
1
+ import { HostProjectConfigs } from '../../../lib-config.token';
2
+ export declare function resolveLookupHostProjectConfig(config: Partial<HostProjectConfigs> | null | undefined, serviceName: string): HostProjectConfigs;
@@ -0,0 +1,3 @@
1
+ import { Injector } from '@angular/core';
2
+ export declare function registerLookupRuntimeInjector(injector: Injector): void;
3
+ export declare function resolveLookupRuntimeInjector(callerName: string): Injector;
@@ -1,4 +1,4 @@
1
- export type { LookupListService, LookupDependency, GenericLookupFieldConfig, SharedLookupFieldConstructorConfig, } from './lookup-field.types';
1
+ export type { LookupListService, LookupDependency, LookupHostServiceConfig, GenericLookupFieldConfig, SharedLookupFieldConstructorConfig, } from './lookup-field.types';
2
2
  export { createGenericOnLookupRequest, createGenericOnSearchRequest, createGenericOnBlur, } from './lookup-field.handlers';
3
3
  export { AgroBaseLookupField } from './agro-base-lookup-field';
4
4
  export { AgroLookupBase } from './agro-lookup-base';
@@ -1,6 +1,10 @@
1
1
  import { Injector } from '@angular/core';
2
2
  import { FormGroup } from '@angular/forms';
3
3
  import { Observable } from 'rxjs';
4
+ export interface LookupHostServiceConfig {
5
+ domain: string;
6
+ service: string;
7
+ }
4
8
  export interface LookupListService {
5
9
  list(params: any): Observable<any>;
6
10
  }
@@ -28,7 +32,9 @@ export interface GenericLookupFieldConfig {
28
32
  }
29
33
  export interface SharedLookupFieldConstructorConfig {
30
34
  formGroup: FormGroup;
31
- injector: Injector;
35
+ injector?: Injector;
36
+ domain?: string;
37
+ service?: string;
32
38
  formFieldName?: string;
33
39
  filterFieldName?: string;
34
40
  required?: () => boolean;
@@ -2,3 +2,4 @@ export * from './core/index';
2
2
  export * from './services/index';
3
3
  export * from './utils/index';
4
4
  export { resolveLookupHostProjectConfig } from './config/lookup-host-project-config';
5
+ export type { HostProjectConfigs } from '../../lib-config.token';
@@ -1,16 +1,18 @@
1
- import { HttpParams, HttpClient } from '@angular/common/http';
1
+ import { HttpClient, HttpParams } from '@angular/common/http';
2
2
  import { MessageService, SortMeta } from 'primeng/api';
3
+ import { HostProjectConfigs } from '../../../lib-config.token';
3
4
  import { LibTranslationService } from '../../../services/lib-translation.service';
4
5
  interface CatchOptions {
5
6
  suppressStatuses?: number[];
6
7
  }
7
8
  export declare class AgroLookupEntityService<T> {
9
+ constructor(config: HostProjectConfigs, entityPath: string, actionsPath?: string);
10
+ constructor(http: HttpClient, messageService: MessageService, entityUrl: string, actionsUrl: string, translate: LibTranslationService);
8
11
  protected readonly http: HttpClient;
9
12
  protected readonly messageService: MessageService;
10
13
  protected readonly entityUrl: string;
11
14
  protected readonly actionsUrl: string;
12
15
  protected readonly translate: LibTranslationService;
13
- constructor(http: HttpClient, messageService: MessageService, entityUrl: string, actionsUrl: string, translate: LibTranslationService);
14
16
  private getSortOrderSuffix;
15
17
  getListQueryParams(listParams: ListParams): HttpParams;
16
18
  private getBodyParams;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@senior-agronegocio/angular-components",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "peerDependencies": {
5
5
  "@angular/cdk": "18.2.14",
6
6
  "@angular/common": "18.2.14",