ontimize-web-ngx 15.6.0-next.2 → 15.6.0-next.4

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 (84) hide show
  1. package/esm2020/lib/components/filter-builder/o-filter-builder.component.mjs +1 -1
  2. package/esm2020/lib/components/form/navigation/o-form-navigation.component.mjs +27 -16
  3. package/esm2020/lib/components/form/o-form.component.mjs +6 -4
  4. package/esm2020/lib/components/grid/o-grid.component.mjs +19 -17
  5. package/esm2020/lib/components/grid/skeketon/o-grid-skeleton.component.mjs +12 -15
  6. package/esm2020/lib/components/index.mjs +2 -1
  7. package/esm2020/lib/components/input/o-form-service-component.class.mjs +2 -2
  8. package/esm2020/lib/components/list/o-list.component.mjs +26 -14
  9. package/esm2020/lib/components/list/skeleton/o-list-skeleton.component.mjs +12 -15
  10. package/esm2020/lib/components/o-repeatable-skeleton.component.mjs +33 -0
  11. package/esm2020/lib/components/o-service-base-component.class.mjs +3 -3
  12. package/esm2020/lib/components/o-skeleton.component.mjs +15 -6
  13. package/esm2020/lib/components/table/column/cell-renderer/service/o-table-cell-renderer-service.component.mjs +3 -3
  14. package/esm2020/lib/components/table/extensions/header/table-menu/o-table-menu.component.mjs +2 -2
  15. package/esm2020/lib/components/table/extensions/o-table.dao.mjs +6 -4
  16. package/esm2020/lib/components/table/extensions/skeleton/o-table-skeleton.component.mjs +5 -19
  17. package/esm2020/lib/components/table/o-table.component.mjs +3 -2
  18. package/esm2020/lib/config/o-providers.mjs +3 -2
  19. package/esm2020/lib/injection-tokens/index.mjs +17 -0
  20. package/esm2020/lib/interfaces/base-response.interface.mjs +1 -1
  21. package/esm2020/lib/interfaces/form-layout-manager.interface.mjs +1 -1
  22. package/esm2020/lib/interfaces/jsonapi-response.interface.mjs +2 -1
  23. package/esm2020/lib/interfaces/service-response.interface.mjs +1 -1
  24. package/esm2020/lib/layouts/form-layout/o-form-layout-manager.component.mjs +3 -2
  25. package/esm2020/lib/services/base-service.class.mjs +3 -3
  26. package/esm2020/lib/services/factories.mjs +13 -46
  27. package/esm2020/lib/services/index.mjs +2 -2
  28. package/esm2020/lib/services/jsonapi/jsonapi-preferences.service.mjs +2 -2
  29. package/esm2020/lib/services/jsonapi/jsonapi.service.mjs +10 -15
  30. package/esm2020/lib/services/request-adapter/base-request-argument.adapter.mjs +12 -0
  31. package/esm2020/lib/services/request-adapter/base-request-argument.interface.mjs +2 -0
  32. package/esm2020/lib/services/request-adapter/index.mjs +5 -0
  33. package/esm2020/lib/services/request-adapter/jsonapi-request-arguments.adapter.mjs +70 -0
  34. package/esm2020/lib/services/request-adapter/ontimize-request-arguments.adapter.mjs +19 -0
  35. package/esm2020/lib/services/state/o-filter-builder-component-state.service.mjs +1 -1
  36. package/esm2020/lib/services/translate/o-translate.service.mjs +3 -2
  37. package/esm2020/lib/util/errors.mjs +2 -2
  38. package/esm2020/lib/util/index.mjs +2 -1
  39. package/esm2020/lib/util/injection-token.utils.mjs +4 -0
  40. package/esm2020/lib/util/util.mjs +15 -4
  41. package/esm2020/public-api.mjs +2 -1
  42. package/fesm2015/ontimize-web-ngx.mjs +4639 -4590
  43. package/fesm2015/ontimize-web-ngx.mjs.map +1 -1
  44. package/fesm2020/ontimize-web-ngx.mjs +4314 -4266
  45. package/fesm2020/ontimize-web-ngx.mjs.map +1 -1
  46. package/lib/components/filter-builder/o-filter-builder.component.d.ts +1 -1
  47. package/lib/components/form/navigation/o-form-navigation.component.d.ts +6 -4
  48. package/lib/components/grid/skeketon/o-grid-skeleton.component.d.ts +4 -7
  49. package/lib/components/index.d.ts +1 -0
  50. package/lib/components/list/o-list.component.d.ts +2 -0
  51. package/lib/components/list/skeleton/o-list-skeleton.component.d.ts +4 -7
  52. package/lib/components/o-repeatable-skeleton.component.d.ts +9 -0
  53. package/lib/components/o-skeleton.component.d.ts +10 -5
  54. package/lib/components/table/extensions/header/o-table-header-components.d.ts +2 -2
  55. package/lib/components/table/extensions/skeleton/o-table-skeleton.component.d.ts +1 -10
  56. package/lib/injection-tokens/index.d.ts +29 -0
  57. package/lib/interfaces/base-response.interface.d.ts +0 -2
  58. package/lib/interfaces/form-layout-manager.interface.d.ts +1 -1
  59. package/lib/interfaces/jsonapi-response.interface.d.ts +47 -7
  60. package/lib/interfaces/service-response.interface.d.ts +2 -0
  61. package/lib/services/base-service.class.d.ts +2 -2
  62. package/lib/services/factories.d.ts +7 -28
  63. package/lib/services/index.d.ts +1 -1
  64. package/lib/services/jsonapi/jsonapi.service.d.ts +3 -4
  65. package/lib/services/{query-arguments/base-query-argument.adapter.d.ts → request-adapter/base-request-argument.adapter.d.ts} +2 -1
  66. package/lib/services/{query-arguments/base-query-argument.interface.d.ts → request-adapter/base-request-argument.interface.d.ts} +1 -1
  67. package/lib/services/request-adapter/index.d.ts +4 -0
  68. package/lib/services/request-adapter/jsonapi-request-arguments.adapter.d.ts +13 -0
  69. package/lib/services/request-adapter/ontimize-request-arguments.adapter.d.ts +8 -0
  70. package/lib/services/state/o-filter-builder-component-state.service.d.ts +1 -1
  71. package/lib/util/index.d.ts +1 -0
  72. package/lib/util/injection-token.utils.d.ts +2 -0
  73. package/lib/util/util.d.ts +2 -0
  74. package/package.json +1 -1
  75. package/public-api.d.ts +1 -0
  76. package/theme.scss +26 -26
  77. package/esm2020/lib/services/query-arguments/base-query-argument.adapter.mjs +0 -9
  78. package/esm2020/lib/services/query-arguments/base-query-argument.interface.mjs +0 -2
  79. package/esm2020/lib/services/query-arguments/index.mjs +0 -5
  80. package/esm2020/lib/services/query-arguments/jsonapi-query-arguments.adapter.mjs +0 -62
  81. package/esm2020/lib/services/query-arguments/ontimize-query-arguments.adapter.mjs +0 -19
  82. package/lib/services/query-arguments/index.d.ts +0 -4
  83. package/lib/services/query-arguments/jsonapi-query-arguments.adapter.d.ts +0 -12
  84. package/lib/services/query-arguments/ontimize-query-arguments.adapter.d.ts +0 -8
@@ -7,11 +7,11 @@ import { IServiceDataComponent } from '../../interfaces/service-data-component.i
7
7
  import { LocalStorageService } from '../../services/local-storage.service';
8
8
  import { OFilterBuilderComponentStateClass } from '../../services/state/o-filter-builder-component-state.class';
9
9
  import { OFilterBuilderComponentStateService } from '../../services/state/o-filter-builder-component-state.service';
10
- import { OFilterDefinition } from '../../types';
11
10
  import { BasicExpression } from '../../types/basic-expression.type';
12
11
  import { Expression } from '../../types/expression.type';
13
12
  import { OFilterBuilderValues } from '../../types/o-filter-builder-values.type';
14
13
  import { CHANGE_EVENTS } from '../../util/codes';
14
+ import { OFilterDefinition } from '../../types/o-filter-definition.type';
15
15
  import * as i0 from "@angular/core";
16
16
  export declare const DEFAULT_INPUTS_O_FILTER_BUILDER: string[];
17
17
  export declare const DEFAULT_OUTPUTS_O_FILTER_BUILDER: string[];
@@ -1,16 +1,17 @@
1
1
  import { Injector, OnDestroy } from '@angular/core';
2
2
  import { Router } from '@angular/router';
3
3
  import { Subscription } from 'rxjs';
4
+ import { ServiceResponse } from '../../../interfaces/service-response.interface';
4
5
  import { OFormLayoutManagerBase } from '../../../layouts/form-layout/o-form-layout-manager-base.class';
6
+ import { BaseService } from '../../../services/base-service.class';
5
7
  import { NavigationService } from '../../../services/navigation.service';
8
+ import { OQueryParams } from '../../../types/query-params.type';
6
9
  import { OFormBase } from '../o-form-base.class';
7
10
  import { OFormNavigationClass } from './o-form.navigation.class';
8
- import { BaseService } from '../../../services/base-service.class';
9
- import { ServiceResponse } from '../../../interfaces/service-response.interface';
10
11
  import * as i0 from "@angular/core";
11
12
  export type QueryConfiguration = {
12
13
  serviceType: string;
13
- queryArguments: any[];
14
+ queryArguments: OQueryParams;
14
15
  entity: string;
15
16
  service: string;
16
17
  queryMethod: string;
@@ -32,7 +33,8 @@ export declare class OFormNavigationComponent implements OnDestroy {
32
33
  protected queryConf: QueryConfiguration;
33
34
  constructor(injector: Injector, _form: OFormBase, router: Router);
34
35
  configureService(): void;
35
- protected queryNavigationData(offset: number, length?: number): Promise<any>;
36
+ getQueryArguments(offset: number, length: number): OQueryParams;
37
+ protected queryNavigationData(offset: number, length?: number): Promise<void>;
36
38
  ngOnDestroy(): void;
37
39
  protected getKeysArray(): string[];
38
40
  getCurrentIndex(): number;
@@ -1,11 +1,8 @@
1
- import { ElementRef, Injector } from '@angular/core';
2
- import { OSkeletonComponent } from '../../o-skeleton.component';
1
+ import { ORepeatableSkeletonComponent } from '../../o-repeatable-skeleton.component';
3
2
  import * as i0 from "@angular/core";
4
- export declare class OGridSkeletonComponent extends OSkeletonComponent {
5
- protected elRef: ElementRef;
6
- protected injector: Injector;
7
- constructor(elRef: ElementRef, injector: Injector);
8
- get count(): any[];
3
+ export declare class OGridSkeletonComponent extends ORepeatableSkeletonComponent {
4
+ getParentElement(): HTMLElement;
5
+ getSkeletonItemElement(parentElement: HTMLElement): HTMLElement;
9
6
  static ɵfac: i0.ɵɵFactoryDeclaration<OGridSkeletonComponent, never>;
10
7
  static ɵcmp: i0.ɵɵComponentDeclaration<OGridSkeletonComponent, "o-grid-skeleton", never, {}, {}, never, never, false, never>;
11
8
  }
@@ -41,4 +41,5 @@ export * from './expandable-container/o-expandable-container.component';
41
41
  export * from './expandable-container/o-expandable-container.module';
42
42
  export * from './tree/index';
43
43
  export * from './o-skeleton.component';
44
+ export * from './o-repeatable-skeleton.component';
44
45
  export * from './user-info/o-user-info-base.class';
@@ -20,6 +20,7 @@ export declare const DEFAULT_INPUTS_O_LIST: string[];
20
20
  export declare const DEFAULT_OUTPUTS_O_LIST: string[];
21
21
  export declare class OListComponent extends AbstractOServiceComponent<OListComponentStateService> implements IList, AfterContentInit, AfterViewInit, OnDestroy, OnInit, OnChanges {
22
22
  listItemDirectives: QueryList<OListItemDirective>;
23
+ toolbarEl: ElementRef;
23
24
  refreshButton: boolean;
24
25
  selectable: boolean;
25
26
  deleteButton: boolean;
@@ -45,6 +46,7 @@ export declare class OListComponent extends AbstractOServiceComponent<OListCompo
45
46
  onItemSelected: EventEmitter<any[]>;
46
47
  onItemDeselected: EventEmitter<any[]>;
47
48
  constructor(injector: Injector, elRef: ElementRef, form: OFormComponent);
49
+ get toolBarHeight(): number;
48
50
  get state(): OListComponentStateClass;
49
51
  ngOnInit(): void;
50
52
  ngAfterViewInit(): void;
@@ -1,11 +1,8 @@
1
- import { ElementRef, Injector } from '@angular/core';
2
- import { OSkeletonComponent } from '../../o-skeleton.component';
1
+ import { ORepeatableSkeletonComponent } from '../../o-repeatable-skeleton.component';
3
2
  import * as i0 from "@angular/core";
4
- export declare class OListSkeletonComponent extends OSkeletonComponent {
5
- protected elRef: ElementRef;
6
- protected injector: Injector;
7
- constructor(elRef: ElementRef, injector: Injector);
8
- get count(): any[];
3
+ export declare class OListSkeletonComponent extends ORepeatableSkeletonComponent {
4
+ getParentElement(): HTMLElement;
5
+ getSkeletonItemElement(parentElement: HTMLElement): HTMLElement;
9
6
  static ɵfac: i0.ɵɵFactoryDeclaration<OListSkeletonComponent, never>;
10
7
  static ɵcmp: i0.ɵɵComponentDeclaration<OListSkeletonComponent, "o-list-skeleton", never, {}, {}, never, never, false, never>;
11
8
  }
@@ -0,0 +1,9 @@
1
+ import { OSkeletonComponent } from './o-skeleton.component';
2
+ import * as i0 from "@angular/core";
3
+ export declare abstract class ORepeatableSkeletonComponent extends OSkeletonComponent {
4
+ abstract getParentElement(): HTMLElement;
5
+ abstract getSkeletonItemElement(parentElement: HTMLElement): HTMLElement;
6
+ getRows(): number[];
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<ORepeatableSkeletonComponent, never>;
8
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ORepeatableSkeletonComponent, never, never, {}, {}, never, never, false, never>;
9
+ }
@@ -1,14 +1,19 @@
1
- import { Injector, OnDestroy } from "@angular/core";
2
- import { Subscription } from "rxjs";
3
- import { AppearanceService } from "../services/appearance.service";
1
+ import { AfterViewInit, ElementRef, Injector, OnDestroy } from '@angular/core';
2
+ import { Observable, Subscription } from 'rxjs';
3
+ import { AppearanceService } from '../services/appearance.service';
4
4
  import * as i0 from "@angular/core";
5
- export declare class OSkeletonComponent implements OnDestroy {
5
+ export declare abstract class OSkeletonComponent implements AfterViewInit, OnDestroy {
6
6
  protected injector: Injector;
7
+ protected elRef: ElementRef;
7
8
  isDarkMode: boolean;
8
9
  subscription: Subscription;
9
10
  appearanceService: AppearanceService;
10
- constructor(injector: Injector);
11
+ rows$: Observable<number[]>;
12
+ private readonly cd;
13
+ constructor(injector: Injector, elRef: ElementRef);
14
+ ngAfterViewInit(): void;
11
15
  ngOnDestroy(): void;
16
+ abstract getRows(): number[];
12
17
  static ɵfac: i0.ɵɵFactoryDeclaration<OSkeletonComponent, never>;
13
18
  static ɵdir: i0.ɵɵDirectiveDeclaration<OSkeletonComponent, never, never, {}, {}, never, never, false, never>;
14
19
  }
@@ -12,5 +12,5 @@ import { OTableOptionComponent } from './table-option/o-table-option.component';
12
12
  import { OTableQuickfilterComponent } from './table-quickfilter/o-table-quickfilter.component';
13
13
  import { OTableHeaderComponent } from './table-header/o-table-header.component';
14
14
  import { OTableColumnSelectAllDirective } from './table-column-select-all/o-table-column-select-all.directive';
15
- export declare const O_TABLE_HEADER_COMPONENTS: (typeof OTableColumnsFilterColumnComponent | typeof OTableColumnsGroupingColumnComponent | typeof OTableOptionComponent | typeof OTableButtonComponent | typeof OTableButtonsComponent | typeof OTableColumnResizerComponent | typeof OTableColumnsFilterComponent | typeof OTableInsertableRowComponent | typeof OTableMenuComponent | typeof OTableQuickfilterComponent | typeof OTableHeaderColumnFilterIconComponent | typeof OTableHeaderComponent | typeof OTableColumnsGroupingComponent | typeof OTableColumnSelectAllDirective)[];
16
- export declare const O_TABLE_HEADER_COMPONENTS_EXPORTED: (typeof OTableColumnsFilterColumnComponent | typeof OTableColumnsGroupingColumnComponent | typeof OTableOptionComponent | typeof OTableButtonComponent | typeof OTableButtonsComponent | typeof OTableColumnResizerComponent | typeof OTableColumnsFilterComponent | typeof OTableInsertableRowComponent | typeof OTableMenuComponent | typeof OTableQuickfilterComponent | typeof OTableHeaderComponent | typeof OTableColumnsGroupingComponent | typeof OTableColumnSelectAllDirective)[];
15
+ export declare const O_TABLE_HEADER_COMPONENTS: (typeof OTableColumnsFilterColumnComponent | typeof OTableColumnsGroupingColumnComponent | typeof OTableButtonComponent | typeof OTableButtonsComponent | typeof OTableColumnResizerComponent | typeof OTableColumnsFilterComponent | typeof OTableInsertableRowComponent | typeof OTableOptionComponent | typeof OTableMenuComponent | typeof OTableQuickfilterComponent | typeof OTableHeaderColumnFilterIconComponent | typeof OTableHeaderComponent | typeof OTableColumnsGroupingComponent | typeof OTableColumnSelectAllDirective)[];
16
+ export declare const O_TABLE_HEADER_COMPONENTS_EXPORTED: (typeof OTableColumnsFilterColumnComponent | typeof OTableColumnsGroupingColumnComponent | typeof OTableButtonComponent | typeof OTableButtonsComponent | typeof OTableColumnResizerComponent | typeof OTableColumnsFilterComponent | typeof OTableInsertableRowComponent | typeof OTableOptionComponent | typeof OTableMenuComponent | typeof OTableQuickfilterComponent | typeof OTableHeaderComponent | typeof OTableColumnsGroupingComponent | typeof OTableColumnSelectAllDirective)[];
@@ -1,15 +1,6 @@
1
- import { AfterViewInit, ElementRef, Injector, OnInit } from '@angular/core';
2
1
  import { OSkeletonComponent } from '../../../o-skeleton.component';
3
- import { Observable } from 'rxjs';
4
2
  import * as i0 from "@angular/core";
5
- export declare class OTableSkeletonComponent extends OSkeletonComponent implements OnInit, AfterViewInit {
6
- protected elRef: ElementRef;
7
- protected injector: Injector;
8
- rows$: Observable<number[]>;
9
- private readonly cd;
10
- constructor(elRef: ElementRef, injector: Injector);
11
- ngOnInit(): void;
12
- ngAfterViewInit(): void;
3
+ export declare class OTableSkeletonComponent extends OSkeletonComponent {
13
4
  getRows(): number[];
14
5
  static ɵfac: i0.ɵɵFactoryDeclaration<OTableSkeletonComponent, never>;
15
6
  static ɵcmp: i0.ɵɵComponentDeclaration<OTableSkeletonComponent, "o-table-skeleton", never, {}, {}, never, never, false, never>;
@@ -0,0 +1,29 @@
1
+ import { InjectionToken } from "@angular/core";
2
+ import { IServiceResponseAdapter } from "../interfaces/service-response-adapter.interface";
3
+ import { BaseServiceResponse } from "../services/base-service-response.class";
4
+ import { IFileService } from "../interfaces/file-service.interface";
5
+ import { ILocalStorageService } from "../interfaces/local-service.interface";
6
+ import { IExportService } from "../interfaces/export-service.interface";
7
+ import { IPermissionsService } from "../interfaces/permissions-service.interface";
8
+ import { DefaultComponentStateService } from "../services/state/o-component-state.service";
9
+ import { IChartOnDemandService } from "../interfaces/chart-on-demand.interface";
10
+ import { IReportService } from "../interfaces/report-on-demand-service.interface";
11
+ import { OErrorDialogManager } from "../services/o-error-dialog-manager.service";
12
+ import { OMatErrorOptions } from "../types/o-mat-error.type";
13
+ import { IExportDataProvider } from "../interfaces/export-data-provider.interface";
14
+ import { IAuthService } from "../interfaces/auth-service.interface";
15
+ export declare const O_DATA_SERVICE: InjectionToken<unknown>;
16
+ export declare const O_RESPONSE_ADAPTER: InjectionToken<IServiceResponseAdapter<BaseServiceResponse>>;
17
+ export declare const O_TRANSLATE_SERVICE: InjectionToken<unknown>;
18
+ export declare const O_FILE_SERVICE: InjectionToken<IFileService>;
19
+ export declare const O_LOCALSTORAGE_SERVICE: InjectionToken<ILocalStorageService>;
20
+ export declare const O_EXPORT_SERVICE: InjectionToken<IExportService>;
21
+ export declare const O_PERMISSION_SERVICE: InjectionToken<IPermissionsService>;
22
+ export declare const O_AUTH_SERVICE: InjectionToken<IAuthService>;
23
+ export declare const O_COMPONENT_STATE_SERVICE: InjectionToken<DefaultComponentStateService>;
24
+ export declare const O_CHART_ON_DEMAND_SERVICE: InjectionToken<IChartOnDemandService>;
25
+ export declare const O_REPORT_SERVICE: InjectionToken<IReportService>;
26
+ export declare const O_ERROR_DIALOG_MANAGER: InjectionToken<OErrorDialogManager>;
27
+ export declare const O_EXPORT_DATA_SERVICE: InjectionToken<IExportDataProvider>;
28
+ export declare const O_MAT_ERROR_OPTIONS: InjectionToken<OMatErrorOptions>;
29
+ export declare const O_FORM_MESSAGE_SERVICE: InjectionToken<unknown>;
@@ -1,6 +1,4 @@
1
1
  export interface BaseResponse {
2
- data: any;
3
- message: string;
4
2
  isSuccessful(): boolean;
5
3
  isFailed(): boolean;
6
4
  isUnauthorized(): boolean;
@@ -1,7 +1,7 @@
1
1
  import { EventEmitter } from '@angular/core';
2
2
  import { ActivatedRouteSnapshot } from '@angular/router';
3
- import { FormLayoutCloseDetailOptions, FormLayoutDetailComponentData } from '../types';
4
3
  import { OFormLayoutManagerContext } from '../types/form-layout-manager-context.type';
4
+ import { FormLayoutCloseDetailOptions, FormLayoutDetailComponentData } from '../types/form-layout-detail-component-data.type';
5
5
  export interface IOFormLayoutManager {
6
6
  oattr: string;
7
7
  mode: string;
@@ -1,9 +1,49 @@
1
- import { ServiceResponse } from "./service-response.interface";
2
- export interface JSONAPIResponse extends ServiceResponse {
3
- error?: {
4
- errors: {
5
- title?: string;
6
- detail?: string;
7
- }[];
1
+ import { BaseResponse } from './base-response.interface';
2
+ interface JSONAPIError {
3
+ id?: string;
4
+ status?: string;
5
+ code?: string;
6
+ title?: string;
7
+ detail?: string;
8
+ source?: {
9
+ pointer?: string;
10
+ parameter?: string;
11
+ header?: string;
8
12
  };
13
+ links?: {
14
+ about?: string;
15
+ type?: string;
16
+ };
17
+ meta?: Record<string, any>;
18
+ }
19
+ type JsonApiLinkValue = string | JsonApiLinkObject | null;
20
+ interface JSONAPILinks {
21
+ [linkName: string]: JsonApiLinkValue;
22
+ }
23
+ interface JsonApiLinkObject {
24
+ href: string;
25
+ meta?: Record<string, any>;
26
+ rel?: string;
27
+ type?: string;
28
+ title?: string;
29
+ }
30
+ interface JSONAPIResource {
31
+ type: string;
32
+ id: string;
33
+ attributes?: Record<string, any>;
34
+ relationships?: Record<string, any>;
35
+ links?: JSONAPILinks;
36
+ meta?: Record<string, any>;
37
+ }
38
+ interface JSONAPISuccessfulResponse {
39
+ data?: JSONAPIResource | JSONAPIResource[];
40
+ included?: JSONAPIResource[];
41
+ meta?: Record<string, any>;
42
+ links?: JSONAPILinks;
43
+ }
44
+ interface JSONAPIErrorResponse {
45
+ errors?: JSONAPIError[];
46
+ }
47
+ export interface JSONAPIResponse extends JSONAPISuccessfulResponse, JSONAPIErrorResponse, BaseResponse {
9
48
  }
49
+ export {};
@@ -6,4 +6,6 @@ export interface ServiceResponse extends BaseResponse {
6
6
  };
7
7
  startRecordIndex?: number;
8
8
  totalQueryRecordsNumber?: number;
9
+ data: any;
10
+ message: string;
9
11
  }
@@ -14,7 +14,7 @@ import { LoginStorageService } from './login-storage.service';
14
14
  import { NameConvention } from './name-convention/name-convention.service';
15
15
  import { PaginationContextService } from './pagination-context.service';
16
16
  import { OntimizeServiceResponseParser } from './parser/o-service-response.parser';
17
- import { BaseQueryArgument } from './query-arguments/base-query-argument.adapter';
17
+ import { BaseRequestArgument } from './request-adapter/base-request-argument.adapter';
18
18
  import * as i0 from "@angular/core";
19
19
  export declare class BaseService<T extends ServiceResponse> {
20
20
  protected injector: Injector;
@@ -28,7 +28,7 @@ export declare class BaseService<T extends ServiceResponse> {
28
28
  protected adapter: IServiceResponseAdapter<BaseServiceResponse>;
29
29
  protected loginStorageService: LoginStorageService;
30
30
  nameConvention: NameConvention;
31
- queryArgumentAdapter: BaseQueryArgument;
31
+ requestArgumentAdapter: BaseRequestArgument;
32
32
  protected paginationContextService: PaginationContextService;
33
33
  constructor(injector: Injector);
34
34
  configureAdapter(): void;
@@ -1,5 +1,4 @@
1
- import { InjectionToken, Injector } from '@angular/core';
2
- import { IChartOnDemandService } from '../interfaces/chart-on-demand.interface';
1
+ import { Injector } from '@angular/core';
3
2
  import { IExportDataProvider } from '../interfaces/export-data-provider.interface';
4
3
  import { IExportService } from '../interfaces/export-service.interface';
5
4
  import { IFileService } from '../interfaces/file-service.interface';
@@ -7,44 +6,25 @@ import { ILocalStorageService } from '../interfaces/local-service.interface';
7
6
  import { INameConvention } from '../interfaces/name-convention.interface';
8
7
  import { IPermissionsService } from '../interfaces/permissions-service.interface';
9
8
  import { IPreferencesService } from '../interfaces/prefereces-service.interface';
10
- import { IReportService } from '../interfaces/report-on-demand-service.interface';
11
9
  import { IServiceResponseAdapter } from '../interfaces/service-response-adapter.interface';
12
- import { OMatErrorOptions } from '../types/o-mat-error.type';
13
- import { ServiceType } from '../types/service-type.type';
14
10
  import { AuthService } from './auth.service';
15
11
  import { BaseServiceResponse } from './base-service-response.class';
16
12
  import { LocalStorageService } from './local-storage.service';
17
13
  import { NameConvention } from './name-convention/name-convention.service';
18
- import { OErrorDialogManager } from './o-error-dialog-manager.service';
19
14
  import { OntimizeExportDataProviderService } from './ontimize-export-data-provider.service';
20
15
  import { OntimizeExportService } from './ontimize/ontimize-export.service';
21
16
  import { OntimizeServiceResponseAdapter } from './ontimize/ontimize-service-response.adapter';
22
17
  import { OntimizeService } from './ontimize/ontimize.service';
23
- import { IBaseQueryArgument } from './query-arguments/base-query-argument.interface';
24
- import { OntimizeQueryArgumentsAdapter } from './query-arguments/ontimize-query-arguments.adapter';
25
- import { AbstractComponentStateService, DefaultComponentStateService } from './state/o-component-state.service';
26
- export declare const O_DATA_SERVICE: InjectionToken<unknown>;
27
- export declare const O_RESPONSE_ADAPTER: InjectionToken<IServiceResponseAdapter<BaseServiceResponse>>;
28
- export declare const O_TRANSLATE_SERVICE: InjectionToken<unknown>;
29
- export declare const O_FILE_SERVICE: InjectionToken<IFileService>;
30
- export declare const O_LOCALSTORAGE_SERVICE: InjectionToken<ILocalStorageService>;
31
- export declare const O_EXPORT_SERVICE: InjectionToken<IExportService>;
32
- export declare const O_PERMISSION_SERVICE: InjectionToken<IPermissionsService>;
33
- export declare const O_AUTH_SERVICE: InjectionToken<AuthService>;
34
- export declare const O_COMPONENT_STATE_SERVICE: InjectionToken<DefaultComponentStateService>;
35
- export declare const O_CHART_ON_DEMAND_SERVICE: InjectionToken<IChartOnDemandService>;
36
- export declare const O_REPORT_SERVICE: InjectionToken<IReportService>;
37
- export declare const O_ERROR_DIALOG_MANAGER: InjectionToken<OErrorDialogManager>;
38
- export declare const O_EXPORT_DATA_SERVICE: InjectionToken<IExportDataProvider>;
39
- export declare const O_MAT_ERROR_OPTIONS: InjectionToken<OMatErrorOptions>;
40
- export declare const O_FORM_MESSAGE_SERVICE: InjectionToken<unknown>;
18
+ import { IBaseRequestArgument } from './request-adapter/base-request-argument.interface';
19
+ import { OntimizeRequestArgumentsAdapter } from './request-adapter/ontimize-request-arguments.adapter';
20
+ import { AbstractComponentStateService } from './state/o-component-state.service';
41
21
  export declare function dataServiceFactory(injector: Injector): any;
42
- export declare function createServiceInstance(serviceType: ServiceType, injector: Injector): any;
22
+ export declare function createServiceInstance(serviceClass: any, injector: Injector): any;
43
23
  export declare function fileServiceFactory(injector: Injector): IFileService;
44
24
  export declare function localStorageServiceFactory(injector: Injector): ILocalStorageService;
45
25
  export declare function exportServiceFactory(injector: Injector): IExportService;
46
26
  export declare function exportDataFactory(injector: Injector): IExportDataProvider;
47
- export declare function serviceRequestAdapterFactory(injector: Injector): IBaseQueryArgument;
27
+ export declare function serviceRequestAdapterFactory(injector: Injector): IBaseRequestArgument;
48
28
  export declare function serviceResponseAdapterFactory(injector: Injector): IServiceResponseAdapter<BaseServiceResponse>;
49
29
  export declare function permissionsServiceFactory(injector: Injector): IPermissionsService;
50
30
  export declare function preferencesServiceFactory(injector: Injector): IPreferencesService;
@@ -76,7 +56,7 @@ export declare const ExportDataServiceProvider: {
76
56
  deps: (typeof Injector)[];
77
57
  };
78
58
  export declare const ServiceRequestAdapter: {
79
- provide: typeof OntimizeQueryArgumentsAdapter;
59
+ provide: typeof OntimizeRequestArgumentsAdapter;
80
60
  useFactory: typeof serviceRequestAdapterFactory;
81
61
  deps: (typeof Injector)[];
82
62
  };
@@ -95,5 +75,4 @@ export declare const OntimizeLocalStorageServiceProvider: {
95
75
  useFactory: typeof localStorageServiceFactory;
96
76
  deps: (typeof Injector)[];
97
77
  };
98
- export declare function _getInjectionTokenValue<T>(token: InjectionToken<T>, injector: Injector): T;
99
78
  export declare function nameConventionServiceFactory(injector: Injector): INameConvention;
@@ -32,7 +32,7 @@ export * from './translate/index';
32
32
  export * from './ontimize-export-data-provider-3x.service';
33
33
  export * from './ontimize-export-data-provider.service';
34
34
  export * from './appearance.service';
35
- export * from './query-arguments/index';
35
+ export * from './request-adapter/index';
36
36
  export * from './name-convention/index';
37
37
  export * from './pagination-context.service';
38
38
  export * from './base-data-service.class';
@@ -21,10 +21,9 @@ export declare class JSONAPIService extends BaseDataService<JSONAPIResponse> imp
21
21
  advancedQuery(queryParams: JSONAPIQueryParameter): Observable<JSONAPIResponse>;
22
22
  queryById(queryParams: JSONAPIQueryParameter): Observable<JSONAPIResponse>;
23
23
  protected parseNameConventionQueryParams(queryParams: JSONAPIQueryParameter): JSONAPIQueryParameter;
24
- insert(av: object, entity: string): Observable<JSONAPIResponse>;
25
- update(kv: object, av: object, entity?: string): Observable<JSONAPIResponse>;
26
- delete(kv?: object): Observable<JSONAPIResponse>;
27
- getStandartEntity(entity: string): string;
24
+ insert(attributes: object, type: string): Observable<JSONAPIResponse>;
25
+ update(id: string, attributes: object, type: string): Observable<JSONAPIResponse>;
26
+ delete(id: string): Observable<JSONAPIResponse>;
28
27
  static ɵfac: i0.ɵɵFactoryDeclaration<JSONAPIService, never>;
29
28
  static ɵprov: i0.ɵɵInjectableDeclaration<JSONAPIService>;
30
29
  }
@@ -1,6 +1,7 @@
1
1
  import { Observable } from "rxjs";
2
2
  import { ServiceResponse } from "../../interfaces/service-response.interface";
3
- export declare class BaseQueryArgument {
3
+ export declare class BaseRequestArgument {
4
4
  request(method: string, service: any, queryArguments: any): Observable<ServiceResponse>;
5
5
  parseQueryParameters(args: any): any;
6
+ getIdFromFilter(filter: any): any;
6
7
  }
@@ -1,3 +1,3 @@
1
- export interface IBaseQueryArgument {
1
+ export interface IBaseRequestArgument {
2
2
  parseQueryParameters(params: any): any;
3
3
  }
@@ -0,0 +1,4 @@
1
+ export * from './base-request-argument.adapter';
2
+ export * from './base-request-argument.interface';
3
+ export * from './jsonapi-request-arguments.adapter';
4
+ export * from './ontimize-request-arguments.adapter';
@@ -0,0 +1,13 @@
1
+ import { JSONAPIQueryParameter } from '../../types/json-query-parameter.type';
2
+ import { BaseRequestArgument } from './base-request-argument.adapter';
3
+ import { IBaseRequestArgument } from './base-request-argument.interface';
4
+ import { OQueryParams } from '../../types/query-params.type';
5
+ import * as i0 from "@angular/core";
6
+ export declare class JSONAPIRequestArgumentsAdapter extends BaseRequestArgument implements IBaseRequestArgument {
7
+ parseQueryParameters(args: OQueryParams): JSONAPIQueryParameter[];
8
+ deCompose(expresion: any, columns: Array<string>, kv: Object): Object;
9
+ deComposeExpresion(expresion: any, columns: Array<string>, kv: Object): any;
10
+ getIdFromFilter(filter: any): string;
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<JSONAPIRequestArgumentsAdapter, never>;
12
+ static ɵprov: i0.ɵɵInjectableDeclaration<JSONAPIRequestArgumentsAdapter>;
13
+ }
@@ -0,0 +1,8 @@
1
+ import { BaseRequestArgument } from './base-request-argument.adapter';
2
+ import { IBaseRequestArgument } from './base-request-argument.interface';
3
+ import * as i0 from "@angular/core";
4
+ export declare class OntimizeRequestArgumentsAdapter extends BaseRequestArgument implements IBaseRequestArgument {
5
+ parseQueryParameters(args: any): any[];
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<OntimizeRequestArgumentsAdapter, never>;
7
+ static ɵprov: i0.ɵɵInjectableDeclaration<OntimizeRequestArgumentsAdapter>;
8
+ }
@@ -1,7 +1,7 @@
1
- import { OFilterBuilderStatus } from '../../types';
2
1
  import { AbstractComponentStateService } from './o-component-state.service';
3
2
  import { OFilterBuilderComponentStateClass } from './o-filter-builder-component-state.class';
4
3
  import { OFilterBuilderBase } from '../../components/filter-builder/o-filter-builder-base.class';
4
+ import { OFilterBuilderStatus } from '../../types/o-filter-builder-values.type';
5
5
  import * as i0 from "@angular/core";
6
6
  export declare class OFilterBuilderComponentStateService extends AbstractComponentStateService<OFilterBuilderComponentStateClass, OFilterBuilderBase> {
7
7
  initialize(component: OFilterBuilderBase): void;
@@ -8,3 +8,4 @@ export * from './filter-expression.utils';
8
8
  export * from './service.utils';
9
9
  export * from './currencyUtil';
10
10
  export * from './preference-mapping-util';
11
+ export * from './injection-token.utils';
@@ -0,0 +1,2 @@
1
+ import { InjectionToken, Injector } from '@angular/core';
2
+ export declare function _getInjectionTokenValue<T>(token: InjectionToken<T>, injector: Injector): T;
@@ -7,6 +7,7 @@ import { OConfigureMessageServiceArgs } from '../types/configure-message-service
7
7
  import { OConfigureServiceArgs } from '../types/configure-service-args.type';
8
8
  import { ODateValueType } from '../types/o-date-value.type';
9
9
  import { ActivatedRouteSnapshot } from '@angular/router';
10
+ import { ServiceType } from '../types/service-type.type';
10
11
  export declare class Util {
11
12
  static readonly columnAggregates: string[];
12
13
  static isObject(val: any): boolean;
@@ -46,6 +47,7 @@ export declare class Util {
46
47
  static isOntimizeEEService(injector: Injector): boolean;
47
48
  static configureService(configureServiceArgs: OConfigureServiceArgs): any;
48
49
  private static getDataServiceInstance;
50
+ static createServiceInstanceByType(serviceType: ServiceType, injector: Injector): any;
49
51
  static createServiceInstance(clazz: any, injector: Injector): any;
50
52
  static configureMessageService(configureServiceArgs: OConfigureMessageServiceArgs): any;
51
53
  static isBase64(file: string): boolean;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ontimize-web-ngx",
3
3
  "homepage": "https://github.com/OntimizeWeb/ontimize-web-ngx#readme",
4
- "version": "15.6.0-next.2",
4
+ "version": "15.6.0-next.4",
5
5
  "description": "Ontimize Web framework using Angular 15",
6
6
  "bugs": "https://github.com/OntimizeWeb/ontimize-web-ngx/issues",
7
7
  "author": "Imatia S.L.",
package/public-api.d.ts CHANGED
@@ -14,3 +14,4 @@ export * from './lib/util/index';
14
14
  export * from './lib/shared/index';
15
15
  export * from './lib/validators/o-validators';
16
16
  export * from './lib/types/index';
17
+ export * from './lib/injection-tokens/index';
package/theme.scss CHANGED
@@ -47,32 +47,6 @@
47
47
  @include o-daterange-input-theme($theme-or-color-config);
48
48
  @include o-dual-list-selector-theme($theme-or-color-config);
49
49
  @include o-image-theme($theme-or-color-config);
50
- }@mixin o-app-header-theme($theme-or-color-config) {
51
- $theme: map.get($theme-or-color-config, color);
52
- $primary: map.get($theme, primary);
53
- $accent: map.get($theme, accent);
54
- $foreground: map.get($theme, foreground);
55
-
56
- .o-app-header {
57
- nav {
58
- &.o-app-header-primary {
59
- background-color: mat.get-color-from-palette($primary);
60
- }
61
-
62
- &.o-app-header-accent {
63
- background-color: mat.get-color-from-palette($accent);
64
- }
65
-
66
- .menu-button {
67
- background: transparent;
68
- }
69
- }
70
-
71
- .o-user-info {
72
- color: mat.get-color-from-palette($foreground, text);
73
- }
74
- }
75
-
76
50
  }@mixin o-app-sidenav-theme($theme-or-color-config) {
77
51
  $theme: map.get($theme-or-color-config, color);
78
52
  $primary: map.get($theme, primary);
@@ -149,6 +123,32 @@
149
123
  }
150
124
  }
151
125
  }
126
+ }@mixin o-app-header-theme($theme-or-color-config) {
127
+ $theme: map.get($theme-or-color-config, color);
128
+ $primary: map.get($theme, primary);
129
+ $accent: map.get($theme, accent);
130
+ $foreground: map.get($theme, foreground);
131
+
132
+ .o-app-header {
133
+ nav {
134
+ &.o-app-header-primary {
135
+ background-color: mat.get-color-from-palette($primary);
136
+ }
137
+
138
+ &.o-app-header-accent {
139
+ background-color: mat.get-color-from-palette($accent);
140
+ }
141
+
142
+ .menu-button {
143
+ background: transparent;
144
+ }
145
+ }
146
+
147
+ .o-user-info {
148
+ color: mat.get-color-from-palette($foreground, text);
149
+ }
150
+ }
151
+
152
152
  }@mixin o-bar-menu-theme($theme-or-color-config) {
153
153
  $theme: map.get($theme-or-color-config, color);
154
154
  $primary: map.get($theme, primary);
@@ -1,9 +0,0 @@
1
- export class BaseQueryArgument {
2
- request(method, service, queryArguments) {
3
- return service[method](...queryArguments);
4
- }
5
- parseQueryParameters(args) {
6
- return args;
7
- }
8
- }
9
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFzZS1xdWVyeS1hcmd1bWVudC5hZGFwdGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvb250aW1pemUtd2ViLW5neC9zcmMvbGliL3NlcnZpY2VzL3F1ZXJ5LWFyZ3VtZW50cy9iYXNlLXF1ZXJ5LWFyZ3VtZW50LmFkYXB0ZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBR0EsTUFBTSxPQUFPLGlCQUFpQjtJQUU1QixPQUFPLENBQUMsTUFBYyxFQUFFLE9BQVksRUFBRSxjQUFtQjtRQUN2RCxPQUFRLE9BQU8sQ0FBQyxNQUFNLENBQUMsQ0FBQyxHQUFHLGNBQWMsQ0FBaUMsQ0FBQztJQUM3RSxDQUFDO0lBRUQsb0JBQW9CLENBQUMsSUFBUztRQUM1QixPQUFPLElBQUksQ0FBQztJQUNiLENBQUM7Q0FFSCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IE9ic2VydmFibGUgfSBmcm9tIFwicnhqc1wiO1xuaW1wb3J0IHsgU2VydmljZVJlc3BvbnNlIH0gZnJvbSBcIi4uLy4uL2ludGVyZmFjZXMvc2VydmljZS1yZXNwb25zZS5pbnRlcmZhY2VcIjtcblxuZXhwb3J0IGNsYXNzIEJhc2VRdWVyeUFyZ3VtZW50IHtcblxuICByZXF1ZXN0KG1ldGhvZDogc3RyaW5nLCBzZXJ2aWNlOiBhbnksIHF1ZXJ5QXJndW1lbnRzOiBhbnkpIHtcbiAgICByZXR1cm4gKHNlcnZpY2VbbWV0aG9kXSguLi5xdWVyeUFyZ3VtZW50cykgYXMgT2JzZXJ2YWJsZTxTZXJ2aWNlUmVzcG9uc2U+KTtcbiAgfVxuXG4gIHBhcnNlUXVlcnlQYXJhbWV0ZXJzKGFyZ3M6IGFueSkgOmFueSB7XG4gICAgcmV0dXJuIGFyZ3M7XG4gICB9XG5cbn1cbiJdfQ==
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFzZS1xdWVyeS1hcmd1bWVudC5pbnRlcmZhY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9vbnRpbWl6ZS13ZWItbmd4L3NyYy9saWIvc2VydmljZXMvcXVlcnktYXJndW1lbnRzL2Jhc2UtcXVlcnktYXJndW1lbnQuaW50ZXJmYWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgaW50ZXJmYWNlIElCYXNlUXVlcnlBcmd1bWVudCB7XG4gIHBhcnNlUXVlcnlQYXJhbWV0ZXJzKHBhcmFtczogYW55KTogYW55O1xufVxuIl19
@@ -1,5 +0,0 @@
1
- export * from './base-query-argument.adapter';
2
- export * from './base-query-argument.interface';
3
- export * from './jsonapi-query-arguments.adapter';
4
- export * from './ontimize-query-arguments.adapter';
5
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9vbnRpbWl6ZS13ZWItbmd4L3NyYy9saWIvc2VydmljZXMvcXVlcnktYXJndW1lbnRzL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsK0JBQStCLENBQUM7QUFDOUMsY0FBYyxpQ0FBaUMsQ0FBQztBQUNoRCxjQUFjLG1DQUFtQyxDQUFDO0FBQ2xELGNBQWMsb0NBQW9DLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2Jhc2UtcXVlcnktYXJndW1lbnQuYWRhcHRlcic7XG5leHBvcnQgKiBmcm9tICcuL2Jhc2UtcXVlcnktYXJndW1lbnQuaW50ZXJmYWNlJztcbmV4cG9ydCAqIGZyb20gJy4vanNvbmFwaS1xdWVyeS1hcmd1bWVudHMuYWRhcHRlcic7XG5leHBvcnQgKiBmcm9tICcuL29udGltaXplLXF1ZXJ5LWFyZ3VtZW50cy5hZGFwdGVyJzsiXX0=