@mediusinc/mng-commons 0.21.0-rc.1 → 0.21.0

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 (73) hide show
  1. package/assets/i18n/en.json +2 -9
  2. package/assets/i18n/sl.json +2 -9
  3. package/esm2020/lib/api/services/crud-api.abstract.service.mjs +2 -9
  4. package/esm2020/lib/api/services/get-all-api.abstract.service.mjs +2 -9
  5. package/esm2020/lib/components/action/action.component.mjs +8 -12
  6. package/esm2020/lib/components/action/editor/action-editor.component.mjs +3 -22
  7. package/esm2020/lib/components/action/index.mjs +1 -2
  8. package/esm2020/lib/components/action/models/action-execution.model.mjs +1 -5
  9. package/esm2020/lib/components/action/models/index.mjs +1 -2
  10. package/esm2020/lib/components/form/date-range/date-range.component.mjs +3 -3
  11. package/esm2020/lib/components/form/editor/form-editor.component.mjs +1 -22
  12. package/esm2020/lib/components/form/formly/fields/formly-field-input/formly-field-input.component.mjs +3 -3
  13. package/esm2020/lib/components/form/formly/wrappers/formly-field-wrapper/formly-field-wrapper.component.mjs +4 -68
  14. package/esm2020/lib/components/tableview/route/tableview-route.abstract.component.mjs +1 -8
  15. package/esm2020/lib/components/tableview/table/column-filter/column-filter.component.mjs +3 -3
  16. package/esm2020/lib/components/tableview/table/column-value/column-value.component.mjs +8 -9
  17. package/esm2020/lib/components/tableview/table/table.component.mjs +7 -21
  18. package/esm2020/lib/data-providers/editor.data-provider.mjs +1 -1
  19. package/esm2020/lib/data-providers/table.data-provider.mjs +2 -2
  20. package/esm2020/lib/data-providers/tableview-crud.data-provider.mjs +3 -3
  21. package/esm2020/lib/data-providers/tableview.data-provider.mjs +16 -2
  22. package/esm2020/lib/descriptors/action.descriptor.mjs +2 -9
  23. package/esm2020/lib/descriptors/column.descriptor.mjs +1 -20
  24. package/esm2020/lib/descriptors/editor.descriptor.mjs +1 -40
  25. package/esm2020/lib/descriptors/field.descriptor.mjs +2 -44
  26. package/esm2020/lib/descriptors/table.descriptor.mjs +1 -19
  27. package/esm2020/lib/descriptors/tableview.descriptor.mjs +4 -20
  28. package/esm2020/lib/directives/component.directive.mjs +2 -2
  29. package/esm2020/lib/mng-commons.module.mjs +5 -8
  30. package/esm2020/lib/models/config.model.mjs +1 -1
  31. package/esm2020/lib/services/action-executor.service.mjs +1 -1
  32. package/esm2020/lib/services/commons.service.mjs +1 -27
  33. package/esm2020/lib/services/configuration.service.mjs +19 -4
  34. package/esm2020/lib/utils/action-data-provider.util.mjs +2 -2
  35. package/esm2020/lib/utils/editor-formly.util.mjs +1 -10
  36. package/esm2020/lib/utils/tableview.util.mjs +2 -2
  37. package/fesm2015/mediusinc-mng-commons.mjs +4191 -4517
  38. package/fesm2015/mediusinc-mng-commons.mjs.map +1 -1
  39. package/fesm2020/mediusinc-mng-commons.mjs +4172 -4493
  40. package/fesm2020/mediusinc-mng-commons.mjs.map +1 -1
  41. package/lib/api/services/crud-api.abstract.service.d.ts +2 -2
  42. package/lib/api/services/get-all-api.abstract.service.d.ts +2 -2
  43. package/lib/components/action/action.component.d.ts +3 -5
  44. package/lib/components/action/index.d.ts +0 -1
  45. package/lib/components/action/models/action-execution.model.d.ts +2 -4
  46. package/lib/components/action/models/index.d.ts +0 -1
  47. package/lib/components/form/editor/form-editor.component.d.ts +0 -5
  48. package/lib/components/form/formly/wrappers/formly-field-wrapper/formly-field-wrapper.component.d.ts +1 -6
  49. package/lib/components/tableview/route/tableview-route.abstract.component.d.ts +0 -1
  50. package/lib/components/tableview/table/table.component.d.ts +3 -5
  51. package/lib/data-providers/editor.data-provider.d.ts +4 -4
  52. package/lib/data-providers/table.data-provider.d.ts +5 -5
  53. package/lib/data-providers/tableview.data-provider.d.ts +11 -7
  54. package/lib/descriptors/action.descriptor.d.ts +4 -8
  55. package/lib/descriptors/column.descriptor.d.ts +0 -5
  56. package/lib/descriptors/editor.descriptor.d.ts +0 -21
  57. package/lib/descriptors/field.descriptor.d.ts +0 -10
  58. package/lib/descriptors/table.descriptor.d.ts +0 -6
  59. package/lib/descriptors/tableview.descriptor.d.ts +0 -7
  60. package/lib/mng-commons.module.d.ts +42 -43
  61. package/lib/models/config.model.d.ts +0 -1
  62. package/lib/services/commons.service.d.ts +0 -5
  63. package/lib/services/configuration.service.d.ts +9 -2
  64. package/{mediusinc-mng-commons-0.21.0-rc.1.tgz → mediusinc-mng-commons-0.21.0.tgz} +0 -0
  65. package/openapi/templates/model.mustache +1 -1
  66. package/package.json +1 -1
  67. package/scss/mng-overrides/_theme_styles.scss +1 -0
  68. package/scss/mng-overrides/_theme_toast.scss +3 -0
  69. package/version-info.json +5 -5
  70. package/esm2020/lib/components/action/localization/data-language-dropdown.component.mjs +0 -45
  71. package/esm2020/lib/components/action/models/action-component.model.mjs +0 -2
  72. package/lib/components/action/localization/data-language-dropdown.component.d.ts +0 -25
  73. package/lib/components/action/models/action-component.model.d.ts +0 -15
@@ -5,14 +5,14 @@ import { MediusQueryResult } from '../models';
5
5
  import { AMngGetAllApiService } from './get-all-api.abstract.service';
6
6
  export interface IMngCrudApiService<T> {
7
7
  createPost?(item: T, params?: HttpParams): Observable<T>;
8
- getByIdGet?(id: IdType, params?: HttpParams, locale?: string): Observable<T>;
8
+ getByIdGet?(id: IdType, params?: HttpParams): Observable<T>;
9
9
  updatePut?(id: IdType, item: T, params?: HttpParams): Observable<T>;
10
10
  removeDelete?(id: IdType, item?: T, params?: HttpParams): Observable<T | null>;
11
11
  }
12
12
  export declare abstract class AMngCrudApiService<T, QRT extends MediusQueryResult<any>> extends AMngGetAllApiService<T, QRT> implements IMngCrudApiService<T> {
13
13
  protected constructor(type: ClassType<T>, queryResultType: ClassType<QRT>);
14
14
  createPost(item: T, params?: HttpParams): Observable<T>;
15
- getByIdGet(id: IdType, params?: HttpParams, locale?: string): Observable<T>;
15
+ getByIdGet(id: IdType, params?: HttpParams): Observable<T>;
16
16
  updatePut(id: IdType, item: T, params?: HttpParams): Observable<T>;
17
17
  removeDelete(id: IdType, item?: T, params?: HttpParams): Observable<T | null>;
18
18
  protected getCreatePostPath(item: T): string;
@@ -4,11 +4,11 @@ import { ClassType } from '../../types';
4
4
  import { MediusQueryParam, MediusQueryResult } from '../models';
5
5
  import { AMngApiService } from './api.abstract.service';
6
6
  export interface IMngGetAllApiService<QRT extends MediusQueryResult<any>> {
7
- getAllPost(queryParamBody?: MediusQueryParam, params?: HttpParams, locale?: string): Observable<QRT>;
7
+ getAllPost(queryParamBody?: MediusQueryParam, params?: HttpParams): Observable<QRT>;
8
8
  }
9
9
  export declare abstract class AMngGetAllApiService<T, QRT extends MediusQueryResult<any>> extends AMngApiService<T> implements IMngGetAllApiService<QRT> {
10
10
  protected queryResultType: ClassType<QRT>;
11
11
  protected constructor(type: ClassType<T>, queryResultType: ClassType<QRT>);
12
- getAllPost(queryParamBody?: MediusQueryParam, params?: HttpParams, locale?: string): Observable<QRT>;
12
+ getAllPost(queryParamBody?: MediusQueryParam, params?: HttpParams): Observable<QRT>;
13
13
  protected getGetAllPostPath(): string;
14
14
  }
@@ -10,8 +10,7 @@ import { IViewContainer } from '../../models';
10
10
  import { MngAuthorizationService } from '../../security';
11
11
  import { MngActionExecutorService, MngViewContainerComponentService } from '../../services';
12
12
  import { IdType } from '../../types';
13
- import { ActionData, ActionInstance, ActionParameters, IActionConfirmationService } from './models';
14
- import { IActionComponent } from './models/action-component.model';
13
+ import { ActionData, ActionInstance, IActionConfirmationService } from './models';
15
14
  import * as i0 from "@angular/core";
16
15
  export declare class MngActionComponent<T, S> implements OnInit, OnChanges, OnDestroy, IActionConfirmationService {
17
16
  private routeService;
@@ -53,7 +52,7 @@ export declare class MngActionComponent<T, S> implements OnInit, OnChanges, OnDe
53
52
  private tooltipSubject;
54
53
  private tooltipSubscription?;
55
54
  $tooltip: Observable<string | null>;
56
- viewContainer?: IViewContainer<T, S>;
55
+ private viewContainer?;
57
56
  actionLink?: ActionLinkDescriptor<T>;
58
57
  hasNoTitle: boolean;
59
58
  private subscriptions;
@@ -64,11 +63,10 @@ export declare class MngActionComponent<T, S> implements OnInit, OnChanges, OnDe
64
63
  ngOnInit(): void;
65
64
  ngOnChanges(changes: SimpleChanges): void;
66
65
  ngOnDestroy(): void;
67
- triggerAction(parameters?: ActionParameters<T>): void;
66
+ triggerAction(event: Event): void;
68
67
  getConfirmationService(): ConfirmationService;
69
68
  getConfirmationServiceInstanceKey(action: ActionDescriptor<any>): string;
70
69
  private processSubscriptions;
71
- onCustomActionCmpInst(instance: IActionComponent<T>): void;
72
70
  static ɵfac: i0.ɵɵFactoryDeclaration<MngActionComponent<any, any>, [null, null, null, null, null, { optional: true; }]>;
73
71
  static ɵcmp: i0.ɵɵComponentDeclaration<MngActionComponent<any, any>, "mng-action", never, { "action": "action"; "item": "item"; "itemId": "itemId"; "actionData": "actionData"; "queryParam": "queryParam"; "dataProvider": "dataProvider"; "hostComponent": "hostComponent"; "routeInit": "route"; "inputDisabled": "disabled"; "inputLoading": "loading"; "viewContainerInit": "viewContainer"; "selectedItems": "selectedItems"; }, { "finishEventEmitter": "finish"; }, never, never, false>;
74
72
  }
@@ -1,4 +1,3 @@
1
1
  export * from './action.component';
2
2
  export * from './route/action-route.component';
3
3
  export * from './editor/action-editor.component';
4
- export * from './localization/data-language-dropdown.component';
@@ -36,7 +36,7 @@ export declare class ActionInstance<T, S> {
36
36
  triggerRouteNavigation?: Observable<boolean>;
37
37
  activationDialogRef?: DynamicDialogRef;
38
38
  nextActionInstance?: ActionInstance<unknown, unknown>;
39
- errorActionInstance?: ActionInstance<T, S>;
39
+ errorActionInstance?: ActionInstance<unknown, unknown>;
40
40
  constructor(action: ActionDescriptor<T>, state?: ActionInstanceStateEnum, debug?: boolean);
41
41
  get isRunLoading$(): Observable<boolean>;
42
42
  get context(): ActionContext<T, S> | undefined;
@@ -99,16 +99,14 @@ export declare class ActionParameters<T> {
99
99
  hostComponent?: unknown;
100
100
  route?: ActivatedRoute;
101
101
  selectedItems: T[];
102
- locale?: string;
103
102
  constructor(itemId?: IdType | undefined, item?: T | undefined);
104
103
  withActionData(actionData?: ActionData): this;
105
104
  withQueryParam(queryParam?: MediusQueryParam): this;
106
- withViewContainer(viewContainer?: IViewContainer<T, unknown>): this;
105
+ withViewContainer<S>(viewContainer?: IViewContainer<T, S>): this;
107
106
  withSourceComponent(sourceComponent?: any): this;
108
107
  withHostComponent(hostComponent?: unknown): this;
109
108
  withRoute(route?: ActivatedRoute): this;
110
109
  withSelectedItems(selectedItems: T[]): this;
111
- withLocale(locale: string): this;
112
110
  }
113
111
  export declare enum ActionInstanceStateEnum {
114
112
  TriggerStart = 0,
@@ -1,4 +1,3 @@
1
1
  export * from './action-confirmation-service.model';
2
2
  export * from './action-execution.model';
3
3
  export * from './tableview-action-default-categories.model';
4
- export * from './action-component.model';
@@ -40,11 +40,6 @@ export declare class MngFormEditorComponent<T> implements IFormEditorComponent<T
40
40
  private findFormField;
41
41
  private isAnyFieldInvalid;
42
42
  private updateFormState;
43
- /**
44
- * @private Sets form state based on editor descriptor type.
45
- * Possible options are: disabled, add or edit.
46
- */
47
- private setInitialFormState;
48
43
  static ɵfac: i0.ɵɵFactoryDeclaration<MngFormEditorComponent<any>, never>;
49
44
  static ɵcmp: i0.ɵɵComponentDeclaration<MngFormEditorComponent<any>, "mng-form-editor", never, { "descriptor": "descriptor"; "submitLoading": "submitLoading"; "item": "item"; "isSubmitButtonVisible": "isSubmitButtonVisible"; "isFormDisabled": "isFormDisabled"; }, { "formSubmitEventEmitter": "formSubmit"; }, ["templates"], never, false>;
50
45
  }
@@ -1,11 +1,6 @@
1
- import { OnInit } from '@angular/core';
2
1
  import { FieldWrapper } from '@ngx-formly/core';
3
- import { ActionDescriptor } from '../../../../../descriptors';
4
2
  import * as i0 from "@angular/core";
5
- export declare class MngFormlyFieldWrapperComponent extends FieldWrapper implements OnInit {
6
- localizationAction: ActionDescriptor<unknown>;
7
- ngOnInit(): void;
8
- private addMissingTranslationHelperText;
3
+ export declare class MngFormlyFieldWrapperComponent extends FieldWrapper {
9
4
  static ɵfac: i0.ɵɵFactoryDeclaration<MngFormlyFieldWrapperComponent, never>;
10
5
  static ɵcmp: i0.ɵɵComponentDeclaration<MngFormlyFieldWrapperComponent, "mng-formly-field-wrapper", never, {}, {}, never, never, false>;
11
6
  }
@@ -23,7 +23,6 @@ export declare abstract class AMngTableviewRouteComponent<T, S> implements OnIni
23
23
  protected createActionDescriptorForDelete(descriptor?: ModelDescriptor<T>): ActionDeleteDescriptor<T> | null;
24
24
  protected createActionDescriptorForExport(descriptor?: ModelDescriptor<T>): ActionDescriptor<T> | null;
25
25
  protected createActionDescriptorForRefresh(descriptor?: ModelDescriptor<T>): ActionDescriptor<T> | null;
26
- protected createActionDescriptorForDataTranslate(descriptor?: ModelDescriptor<T>): ActionDescriptor<T> | null;
27
26
  static ɵfac: i0.ɵɵFactoryDeclaration<AMngTableviewRouteComponent<any, any>, never>;
28
27
  static ɵdir: i0.ɵɵDirectiveDeclaration<AMngTableviewRouteComponent<any, any>, never, never, {}, {}, never, never, false>;
29
28
  }
@@ -10,7 +10,7 @@ import { ActionDescriptor, ColumnDescriptor, TableDescriptor } from '../../../de
10
10
  import { TableFilterDisplayEnum } from '../../../descriptors/types';
11
11
  import { MngComponentDirective, MngTemplateDirective } from '../../../directives';
12
12
  import { IViewContainer } from '../../../models';
13
- import { MngActionExecutorService, MngCommonsService, MngViewContainerComponentService } from '../../../services';
13
+ import { MngActionExecutorService, MngViewContainerComponentService } from '../../../services';
14
14
  import { ActionInstance } from '../../action/models';
15
15
  import { MngTableCellClickEvent, MngTableLoadEvent } from '../models';
16
16
  import * as i0 from "@angular/core";
@@ -19,7 +19,6 @@ export declare class MngTableComponent<T, S> implements OnInit, OnChanges, After
19
19
  private router;
20
20
  private route;
21
21
  private translate;
22
- private mngCommonsService;
23
22
  private actionExecutor;
24
23
  private viewContainerService;
25
24
  readonly filterDisplayRow: TableFilterDisplayEnum;
@@ -90,7 +89,7 @@ export declare class MngTableComponent<T, S> implements OnInit, OnChanges, After
90
89
  private routerIsNavigationOutsideInProgress;
91
90
  private viewContainer?;
92
91
  private subscriptions;
93
- constructor(injector: Injector, router: Router, route: ActivatedRoute, translate: TranslateService, mngCommonsService: MngCommonsService, actionExecutor: MngActionExecutorService, viewContainerService: MngViewContainerComponentService<T, S> | null);
92
+ constructor(injector: Injector, router: Router, route: ActivatedRoute, translate: TranslateService, actionExecutor: MngActionExecutorService, viewContainerService: MngViewContainerComponentService<T, S> | null);
94
93
  ngOnInit(): void;
95
94
  ngAfterContentInit(): void;
96
95
  ngOnChanges(changes: SimpleChanges): void;
@@ -104,13 +103,12 @@ export declare class MngTableComponent<T, S> implements OnInit, OnChanges, After
104
103
  onCaptionCmpInst<C>(instance: C): void;
105
104
  onColumnActionCmpInst<C>(instance: C): void;
106
105
  onActionFinish(runResult: ActionInstance<T, unknown>): void;
107
- colorRowWithDefaultDataLanguage(item: T): "" | "all-translations-default-value";
108
106
  private loadTableWithDataProvider;
109
107
  private loadTableFromRouteUpdate;
110
108
  private updatePrimeSortAndFilter;
111
109
  private createFilterMeta;
112
110
  private createSortMeta;
113
111
  private initializeDataLoadingTriggers;
114
- static ɵfac: i0.ɵɵFactoryDeclaration<MngTableComponent<any, any>, [null, null, null, null, null, null, { optional: true; }]>;
112
+ static ɵfac: i0.ɵɵFactoryDeclaration<MngTableComponent<any, any>, [null, null, null, null, null, { optional: true; }]>;
115
113
  static ɵcmp: i0.ɵɵComponentDeclaration<MngTableComponent<any, any>, "mng-table", never, { "initialDescriptor": "descriptor"; "items": "items"; "queryResult": "queryResult"; "loading": "loading"; "dataProvider": "dataProvider"; "useQueryParams": "useQueryParams"; "selectionMode": "selectionMode"; "selectionEnabled": "selectionEnabled"; "actions": "actions"; "isColumnClickable": "isColumnClickable"; "viewContainerInit": "viewContainer"; "captionComponent": "captionComponent"; "columnActionComponent": "columnActionComponent"; "columnActionMinWidth": "columnActionMinWidth"; }, { "loadEventEmitter": "tableLoad"; "cellClickEventEmitter": "cellClick"; "selectionChangeEventEmitter": "selectionChange"; "captionCmpInstEventEmitter": "captionComponentInstance"; "columnActionCmpInstEventEmitter": "columnActionComponentInstance"; }, ["templates"], never, false>;
116
114
  }
@@ -3,22 +3,22 @@ import { Observable } from 'rxjs';
3
3
  import { ClassType, IdType } from '../types';
4
4
  import { DataProvider, IDataProvider } from './base.data-provider';
5
5
  export interface IEditorDataProvider<T, S> extends IDataProvider<T, S> {
6
- fetch: (id: IdType, service?: S, locale?: string) => Observable<T>;
6
+ fetch: (id: IdType, service?: S) => Observable<T>;
7
7
  create?: (item?: T, service?: S) => Observable<T>;
8
8
  update?: (id: IdType, item?: T, service?: S) => Observable<T>;
9
9
  delete?: (id: IdType, item?: T, service?: S) => Observable<T | null>;
10
10
  }
11
11
  export declare class EditorDataProvider<T, S> extends DataProvider<T, S> implements IEditorDataProvider<T, S> {
12
- protected _fetch: (id: IdType, service?: S, locale?: string) => Observable<T>;
12
+ protected _fetch: (id: IdType, service?: S) => Observable<T>;
13
13
  protected _create?: (item?: T, service?: S) => Observable<T>;
14
14
  protected _update?: (id: IdType, item?: T, service?: S) => Observable<T>;
15
15
  protected _delete?: (id: IdType, item?: T, service?: S) => Observable<T | null>;
16
16
  constructor(modelType: ClassType<T>, serviceType?: Type<S>);
17
- get fetch(): (id: IdType, service?: S | undefined, locale?: string | undefined) => Observable<T>;
17
+ get fetch(): (id: IdType, service?: S | undefined) => Observable<T>;
18
18
  get create(): ((item?: T | undefined, service?: S | undefined) => Observable<T>) | undefined;
19
19
  get update(): ((id: IdType, item?: T | undefined, service?: S | undefined) => Observable<T>) | undefined;
20
20
  get delete(): ((id: IdType, item?: T | undefined, service?: S | undefined) => Observable<T | null>) | undefined;
21
- withFetch(fetch: (id: IdType, service?: S, locale?: string) => Observable<T>): this;
21
+ withFetch(fetch: (id: IdType, service?: S) => Observable<T>): this;
22
22
  withCreate(create: (item?: T, service?: S) => Observable<T>): this;
23
23
  withUpdate(update: (id: IdType, item?: T, service?: S) => Observable<T>): this;
24
24
  withDelete(deleteFn: (id: IdType, item?: T, service?: S) => Observable<T | null>): this;
@@ -5,23 +5,23 @@ import { ClassType } from '../types';
5
5
  import { DataProvider, IDataProvider } from './base.data-provider';
6
6
  export interface ITableDataProvider<T, S> extends IDataProvider<T, S> {
7
7
  get isLazy(): boolean;
8
- getAll: (queryParam: MediusQueryParam, service?: S, locale?: string) => Observable<MediusQueryResult<T>>;
8
+ getAll: (queryParam: MediusQueryParam, service?: S) => Observable<MediusQueryResult<T>>;
9
9
  getAllReload(queryParam?: MediusQueryParam): void;
10
10
  getAllReload$: Observable<MediusQueryParam | undefined>;
11
11
  }
12
12
  export declare class TableDataProvider<T, S> extends DataProvider<T, S> implements ITableDataProvider<T, S> {
13
13
  protected _isLazy: boolean;
14
- protected _getAll: (queryParam: MediusQueryParam, service?: S, locale?: string) => Observable<MediusQueryResult<T>>;
14
+ protected _getAll: (queryParam: MediusQueryParam, service?: S) => Observable<MediusQueryResult<T>>;
15
15
  protected _getAllReloadSubject: Subject<MediusQueryParam | undefined>;
16
16
  constructor(modelType: ClassType<T>, serviceType?: Type<S>);
17
17
  get isLazy(): boolean;
18
- get getAll(): (queryParam: MediusQueryParam, service?: S | undefined, locale?: string | undefined) => Observable<MediusQueryResult<T>>;
18
+ get getAll(): (queryParam: MediusQueryParam, service?: S | undefined) => Observable<MediusQueryResult<T>>;
19
19
  get getAllReload$(): Observable<MediusQueryParam | undefined>;
20
- withGetAll(getAll: (queryParam: MediusQueryParam, service?: S, locale?: string) => Observable<MediusQueryResult<T>>): this;
20
+ withGetAll(getAll: (queryParam: MediusQueryParam, service?: S) => Observable<MediusQueryResult<T>>): this;
21
21
  /**
22
22
  * Use this method to use inline load without lazy loading features on table and use inline pagination, filtering and sorting.
23
23
  * @param getAll
24
24
  */
25
- withGetAllEagerly(getAll: (service?: S, locale?: string) => Observable<Array<T>>): this;
25
+ withGetAllEagerly(getAll: (service?: S) => Observable<Array<T>>): this;
26
26
  getAllReload(queryParam?: MediusQueryParam): void;
27
27
  }
@@ -6,28 +6,32 @@ import { EditorDataProvider, IEditorDataProvider } from './editor.data-provider'
6
6
  import { ITableDataProvider } from './table.data-provider';
7
7
  export interface ITableviewDataProvider<T, S> extends IEditorDataProvider<T, S> {
8
8
  get isLazy(): boolean;
9
- getAll: (queryParam: MediusQueryParam, service?: S, locale?: string) => Observable<MediusQueryResult<T>>;
9
+ getAll: (queryParam: MediusQueryParam, service?: S) => Observable<MediusQueryResult<T>>;
10
10
  getAllReload(queryParam?: MediusQueryParam): void;
11
11
  getAllReload$: Observable<MediusQueryParam | undefined>;
12
12
  }
13
13
  export declare class TableviewDataProvider<T, S> extends EditorDataProvider<T, S> implements ITableviewDataProvider<T, S>, ITableDataProvider<T, S>, IEditorDataProvider<T, S> {
14
14
  protected _isLazy: boolean;
15
- protected _getAll: (queryParam: MediusQueryParam, service?: S, locale?: string) => Observable<MediusQueryResult<T>>;
15
+ protected _getAll: (queryParam: MediusQueryParam, service?: S) => Observable<MediusQueryResult<T>>;
16
16
  protected _getAllReloadSubject: Subject<MediusQueryParam | undefined>;
17
17
  constructor(modelType: ClassType<T>, serviceType?: Type<S>);
18
18
  get isLazy(): boolean;
19
- get getAll(): (queryParam: MediusQueryParam, service?: S | undefined, locale?: string | undefined) => Observable<MediusQueryResult<T>>;
19
+ get getAll(): (queryParam: MediusQueryParam, service?: S | undefined) => Observable<MediusQueryResult<T>>;
20
20
  get getAllReload$(): Observable<MediusQueryParam | undefined>;
21
- withGetAll(getAll: (queryParam: MediusQueryParam, service?: S, locale?: string) => Observable<MediusQueryResult<T>>): this;
21
+ withGetAll(getAll: (queryParam: MediusQueryParam, service?: S) => Observable<MediusQueryResult<T>>): this;
22
22
  /**
23
23
  * Use this method to use inline load without lazy loading features on table and use inline pagination, filtering and sorting.
24
24
  * @param getAll
25
25
  */
26
- withGetAllEagerly(getAll: (service?: S, locale?: string) => Observable<Array<T>>): this;
26
+ withGetAllEagerly(getAll: (service?: S) => Observable<Array<T>>): this;
27
27
  getAllReload(queryParam?: MediusQueryParam): void;
28
28
  }
29
29
  export declare class DynamicTableviewDataProvider extends TableviewDataProvider<any, any> implements ITableviewDataProvider<any, any>, ITableDataProvider<any, any> {
30
- protected _getAll: (queryParam: MediusQueryParam, locale?: string) => Observable<MediusQueryResult<any>>;
31
- protected _fetch: (id: IdType, locale?: string) => Observable<any>;
30
+ protected _getAll: (queryParam: MediusQueryParam) => Observable<MediusQueryResult<any>>;
31
+ protected _fetch: (id: IdType) => Observable<any>;
32
32
  constructor();
33
+ withGetAll(getAll: (queryParam: MediusQueryParam) => Observable<MediusQueryResult<any>>): this;
34
+ withFetch(fetch: (id: IdType) => Observable<any>): this;
35
+ get getAll(): (queryParam: MediusQueryParam) => Observable<MediusQueryResult<any>>;
36
+ get fetch(): (id: IdType) => Observable<any>;
33
37
  }
@@ -2,7 +2,6 @@ import { Type } from '@angular/core';
2
2
  import { Params, QueryParamsHandling } from '@angular/router';
3
3
  import { Observable } from 'rxjs';
4
4
  import { ActionContext, ActionContextValidation } from '../components/action/models';
5
- import { IActionComponent } from '../components/action/models/action-component.model';
6
5
  import { IDataProvider, IEditorDataProvider } from '../data-providers';
7
6
  import { APermissions } from '../security/model';
8
7
  import { StyleLevelEnum, StyleSizeEnum } from '../styles/models';
@@ -37,11 +36,10 @@ export declare class ActionDescriptor<T> {
37
36
  protected _runNotificationErrorTitle?: string;
38
37
  protected _runNotificationErrorMessage?: string;
39
38
  protected _afterRunAction?: ActionDescriptor<unknown>;
40
- protected _onRunErrorAction?: ActionDescriptor<T>;
39
+ protected _onRunErrorAction?: ActionDescriptor<unknown>;
41
40
  protected _permissions?: APermissions;
42
41
  protected _button: ActionButtonDescriptor;
43
42
  protected _hasItemsSelection: boolean;
44
- protected _component?: Type<IActionComponent<T>>;
45
43
  constructor(model: ModelDescriptor<T> | null, actionName: string, parentType?: ClassType<unknown>, parentProperty?: string);
46
44
  get model(): ModelDescriptor<T> | null;
47
45
  get parentTypeName(): string | undefined;
@@ -69,12 +67,11 @@ export declare class ActionDescriptor<T> {
69
67
  get runNotificationErrorTitle(): string | undefined;
70
68
  get runNotificationErrorMessage(): string | undefined;
71
69
  get afterRunAction(): ActionDescriptor<unknown> | undefined;
72
- get onRunErrorAction(): ActionDescriptor<T> | undefined;
70
+ get onRunErrorAction(): ActionDescriptor<unknown> | undefined;
73
71
  get permissions(): APermissions | undefined;
74
72
  get tableviewCategory(): string | undefined;
75
73
  get hasItemsSelection(): boolean;
76
74
  get button(): ActionButtonDescriptor;
77
- get component(): Type<IActionComponent<T>> | undefined;
78
75
  get positionTableviewCategories(): string[] | undefined;
79
76
  protected setI18nModelActionBaseKey(base?: string): void;
80
77
  withDataProvider(dataProvider: IDataProvider<T, any>): this;
@@ -90,19 +87,18 @@ export declare class ActionDescriptor<T> {
90
87
  withRunConfirmation(): ActionConfirmationDialogDescriptor<T>;
91
88
  /**
92
89
  * Add a configuration dialogue to action using ActionConfigurationDescriptor
93
- * @param runConfirmationDialogDescriptor descriptor with customizable information for dialog
90
+ * @param confirmationDescriptor descriptor with customizable information for dialog
94
91
  */
95
92
  withRunConfirmationDescriptor(runConfirmationDialogDescriptor: ActionConfirmationDialogDescriptor<T>): this;
96
93
  withRunNotificationSuccess(title?: string, message?: string, hasNotification?: boolean): this;
97
94
  withRunNotificationError(title?: string, message?: string, hasNotification?: boolean): this;
98
95
  withAfterRunAction<RT>(action: ActionDescriptor<RT>): this;
99
- withOnRunErrorAction(action: ActionDescriptor<T>): this;
96
+ withOnRunErrorAction<RT>(action: ActionDescriptor<RT>): this;
100
97
  withPermissions(permissions: APermissions): this;
101
98
  withTableviewCategory(permissionsRouteType: string): this;
102
99
  withButtonDescriptor(button: ActionButtonDescriptor): this;
103
100
  withButton(label?: string | null, icon?: string | null, styleLevel?: StyleLevelEnum, styleText?: boolean): this;
104
101
  withItemsSelection(hasSelection?: boolean): this;
105
- withComponent(component: Type<IActionComponent<T>>): this;
106
102
  withPositionTableviewCategories(positionTableviewCategories: string[]): this;
107
103
  withI18nBase(base: ClassType<unknown> | string): this;
108
104
  }
@@ -35,8 +35,6 @@ export declare class ColumnDescriptor<T, TT> {
35
35
  private _currencyDisplay?;
36
36
  private _customComponentType?;
37
37
  private _hasCopyToClipboard;
38
- private _isLocalized;
39
- private _localizationExistsProperty?;
40
38
  constructor(table: TableDescriptor<TT>, property: string);
41
39
  get columnType(): ColumnTypeEnum;
42
40
  get columnDisplayType(): ColumnDisplayTypeEnum;
@@ -68,8 +66,6 @@ export declare class ColumnDescriptor<T, TT> {
68
66
  get hasCopyToClipboard(): boolean;
69
67
  get template(): string | undefined;
70
68
  get getter(): ((item: TT, value?: T | null | undefined) => unknown) | undefined;
71
- get isLocalized(): boolean;
72
- get localizationExistsProperty(): string | undefined;
73
69
  /**
74
70
  * converts column to given type with additional arguments
75
71
  * @param type column type enum
@@ -96,7 +92,6 @@ export declare class ColumnDescriptor<T, TT> {
96
92
  withCopyToClipboard(hasCopyToCliboard?: boolean): this;
97
93
  withTemplate(template: string): this;
98
94
  withGetter(getter?: (item: TT, value?: T | null) => unknown): this;
99
- localized(existsProperty?: string): this;
100
95
  copy(): ColumnDescriptor<T, TT>;
101
96
  protected copyFieldsTo(obj: ColumnDescriptor<T, TT>): void;
102
97
  }
@@ -1,5 +1,3 @@
1
- import { Observable } from 'rxjs';
2
- import { MediusQueryParam } from '../api/models';
3
1
  import { ILookupDataProvider } from '../data-providers';
4
2
  import { TableviewAttributeDef } from '../models/tableview-attr.model';
5
3
  import { ClassType, EnumConstantType, EnumType, MngFieldValidationMessage, MngFieldValidator } from '../types';
@@ -16,11 +14,6 @@ export declare class EditorDescriptor<T> {
16
14
  protected _currentTabGroup?: FieldTabGroupDescriptor<T>;
17
15
  protected _currentGroup?: FieldGroupDescriptor<T>;
18
16
  protected _disabled: boolean;
19
- protected _isLocalized: boolean;
20
- protected _localizationLocaleProperty?: string;
21
- protected _localizationLocalizationProperty?: string;
22
- protected _localizationModelType?: ClassType<any>;
23
- protected _localeLookup?: (queryParam?: MediusQueryParam, service?: any, search?: string) => Observable<Array<string>>;
24
17
  constructor(modelType: ClassType<T>, idProperty?: string, titleProperty?: string, tableviewEditorType?: TableviewEditorTypeEnum, i18nBaseKey?: string | ClassType<unknown>);
25
18
  /**
26
19
  * auto generated editor descriptor based on openapi definition
@@ -44,13 +37,7 @@ export declare class EditorDescriptor<T> {
44
37
  get model(): ModelDescriptor<T>;
45
38
  get tabs(): FieldTabGroupDescriptor<T>[];
46
39
  get fields(): AFieldDescriptor<any, T>[];
47
- get tableviewEditorType(): TableviewEditorTypeEnum;
48
40
  get disabled(): boolean;
49
- get isLocalized(): boolean;
50
- get localizationLocaleProperty(): string | undefined;
51
- get localizationLocalizationProperty(): string | undefined;
52
- get localizationBeanType(): ClassType<any> | undefined;
53
- get localeLookup(): ((queryParam?: MediusQueryParam | undefined, service?: any, search?: string | undefined) => Observable<string[]>) | undefined;
54
41
  createTabGroup(name: string, title?: string): FieldTabGroupDescriptor<T>;
55
42
  createFieldGroup(name: string, title?: string | null): FieldGroupDescriptor<T>;
56
43
  addFieldDescriptor<FT>(field: AFieldDescriptor<FT, T>): this;
@@ -105,12 +92,4 @@ export declare class EditorDescriptor<T> {
105
92
  * @param args additional arguments
106
93
  */
107
94
  private upsertFieldFromAttributeDef;
108
- /**
109
- * This method takes care of displaying correct/localized data in the editor
110
- * @param localizationsProperty property that tells us where on the model are localizations accessible
111
- * @param localeProperty property by which we find the locale
112
- * @param localizationModelType model type for localizations if it is different from the whole model
113
- * @param localeLookup lookup provider for locales supported by the application.
114
- */
115
- localized<S>(localizationsProperty?: string, localeProperty?: string, localizationModelType?: ClassType<any>, localeLookup?: (queryParam?: MediusQueryParam, service?: S, search?: string) => Observable<Array<string>>): this;
116
95
  }
@@ -41,8 +41,6 @@ export declare abstract class AFieldDescriptor<T, ET> extends AGenericFieldDescr
41
41
  protected _labelClassName: string;
42
42
  protected _inputClassName: string;
43
43
  protected _size: FieldSizeEnum;
44
- protected _isLocalized: boolean;
45
- protected _localizationTableview?: TableviewDescriptor<any>;
46
44
  protected readonly _eventsSubject: Subject<MngFormFieldEvent<T, ET>>;
47
45
  protected constructor(editor: EditorDescriptor<ET>, property: string);
48
46
  get property(): string;
@@ -71,10 +69,8 @@ export declare abstract class AFieldDescriptor<T, ET> extends AGenericFieldDescr
71
69
  get labelClassName(): string;
72
70
  get inputClassName(): string;
73
71
  get size(): FieldSizeEnum;
74
- get localizationTableview(): TableviewDescriptor<any> | undefined;
75
72
  get isSizeSmall(): boolean;
76
73
  get isSizeLarge(): boolean;
77
- get isLocalized(): boolean;
78
74
  abstract copy(): AFieldDescriptor<T, ET>;
79
75
  withLabel(label: string | null): this;
80
76
  withPlaceholder(placeholder: string): this;
@@ -89,12 +85,6 @@ export declare abstract class AFieldDescriptor<T, ET> extends AGenericFieldDescr
89
85
  withAsyncValidation(name: string, asyncValidator?: MngFieldAsyncValidator, message?: MngFieldValidationMessage): this;
90
86
  withClassName(className: string, labelClassName?: string, inputClassName?: string, fieldClassName?: string): this;
91
87
  withSize(size?: FieldSizeEnum): this;
92
- /**
93
- * This method adds an icon with text Show all translations above the field and after clicking on it, it displays a new dialog with tableview.
94
- * This new table view shows all available translations for specific property and allows editing it.
95
- * @param tableview with lookup provider for locales
96
- */
97
- localized(tableview?: TableviewDescriptor<T>): this;
98
88
  nextEvent(type: MngFormFieldEventTypeEnum, cmpType: Type<any>, cmpInstance: any, data?: MngFormFieldEventData<T, ET>): void;
99
89
  get events$(): Observable<MngFormFieldEvent<T, ET>>;
100
90
  protected copyFieldsTo(obj: AFieldDescriptor<T, ET>): void;
@@ -31,8 +31,6 @@ export declare class TableDescriptor<T> {
31
31
  private _rowClassName?;
32
32
  private _rowClassNameMapFn?;
33
33
  private _autoGenerated;
34
- private _isLocalized;
35
- private _localizationLocaleProperty?;
36
34
  constructor(modelType: ClassType<T>, idProperty?: string, titleProperty?: string, i18nBaseKey?: string | ClassType<unknown>);
37
35
  /**
38
36
  * generates descriptor based on modelType attribute definition
@@ -70,8 +68,6 @@ export declare class TableDescriptor<T> {
70
68
  get rowClassName(): string | undefined;
71
69
  get rowClassNameMapFn(): ((className?: string | undefined, item?: T | undefined) => string) | undefined;
72
70
  get headerClassName(): string | undefined;
73
- get isLocalized(): boolean;
74
- get localizationLocaleProperty(): string | undefined;
75
71
  getColumn(property: string): ColumnDescriptor<string, T> | undefined;
76
72
  addColumnDescriptor<CT>(column: ColumnDescriptor<CT, T>): TableDescriptor<T>;
77
73
  addColumn(property: string): ColumnDescriptor<string, T>;
@@ -96,8 +92,6 @@ export declare class TableDescriptor<T> {
96
92
  withGridlines(gridlines: boolean): this;
97
93
  withRowClassName(rowClassName?: string, classNameMapFn?: (className?: string, item?: T) => string): this;
98
94
  withHeaderClassName(headerClassName: string): this;
99
- withLocalized(): this;
100
- withLocalizationLocaleProperty(localizationLocaleProperty: string): this;
101
95
  protected copyFieldsTo(obj: TableDescriptor<T>): void;
102
96
  copy(): TableDescriptor<T>;
103
97
  /**
@@ -1,7 +1,5 @@
1
1
  import { Type } from '@angular/core';
2
2
  import { FieldValidatorFn } from '@ngx-formly/core/lib/models/config';
3
- import { Observable } from 'rxjs';
4
- import { MediusQueryParam } from '../api/models';
5
3
  import { ILookupDataProvider } from '../data-providers';
6
4
  import { IColumnValueComponent } from '../models';
7
5
  import { TableviewAttributeDef } from '../models/tableview-attr.model';
@@ -16,9 +14,6 @@ export declare class TableviewDescriptor<T> {
16
14
  protected _addEditor: EditorDescriptor<T>;
17
15
  protected _editEditor: EditorDescriptor<T>;
18
16
  protected _tableTitle?: string;
19
- protected _isLocalized: boolean;
20
- protected _localizationLocaleProperty?: string;
21
- protected _localizationLocalizationProperty?: string;
22
17
  constructor(modelType: ClassType<T>, idProperty?: string, titleProperty?: string, i18nBaseKey?: string | ClassType<unknown>);
23
18
  /**
24
19
  * generates descriptor from attribute definition of openaapi model
@@ -42,7 +37,6 @@ export declare class TableviewDescriptor<T> {
42
37
  get editEditor(): EditorDescriptor<T>;
43
38
  get tableTitle(): string | undefined;
44
39
  get model(): ModelDescriptor<T>;
45
- isLocalized(): boolean;
46
40
  withTableDescriptor(descriptor: TableDescriptor<T>): this;
47
41
  withEditorDescriptors(descriptor: EditorDescriptor<T>): this;
48
42
  withDetailsDescriptor(descriptor: EditorDescriptor<T>): this;
@@ -105,7 +99,6 @@ export declare class TableviewDescriptor<T> {
105
99
  * @param filterProperty
106
100
  */
107
101
  withModifiedLookup<MT>(property: string, modelType?: ClassType<MT>, lookupProvider?: ILookupDataProvider<MT, any>, titleProperty?: string, itemsLabelProperty?: string, filterProperty?: string): this;
108
- localized<S>(localizationProperty?: string, localeProperty?: string, localizationBeanType?: ClassType<any>, localeLookup?: (queryParam?: MediusQueryParam, service?: S, search?: string) => Observable<Array<string>>): this;
109
102
  }
110
103
  export declare class TableviewDynamicDescriptor extends TableviewDescriptor<any> {
111
104
  protected _table: TableDynamicDescriptor;