@mediusinc/mng-commons 0.15.1 → 0.16.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/esm2020/lib/components/action/action.component.mjs +7 -7
  2. package/esm2020/lib/components/action/editor/action-editor.component.mjs +41 -20
  3. package/esm2020/lib/components/action/route/action-route.component.mjs +3 -3
  4. package/esm2020/lib/components/form/editor/form-editor.component.mjs +29 -29
  5. package/esm2020/lib/components/form/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.mjs +3 -3
  6. package/esm2020/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.mjs +13 -18
  7. package/esm2020/lib/components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.mjs +7 -9
  8. package/esm2020/lib/components/layout/topbar.component.mjs +2 -2
  9. package/esm2020/lib/components/tableview/route/tableview-route.abstract.component.mjs +5 -5
  10. package/esm2020/lib/components/tableview/table/table.component.mjs +1 -1
  11. package/esm2020/lib/components/tableview/tableview.component.mjs +16 -14
  12. package/esm2020/lib/descriptors/action.descriptor.mjs +19 -13
  13. package/esm2020/lib/descriptors/editor.descriptor.mjs +5 -8
  14. package/esm2020/lib/descriptors/field.descriptor.mjs +2 -2
  15. package/esm2020/lib/descriptors/tableview.descriptor.mjs +32 -32
  16. package/esm2020/lib/descriptors/types/editor.type.mjs +8 -8
  17. package/esm2020/lib/models/view-container.model.mjs +1 -1
  18. package/esm2020/lib/router/tableview-route-builder.mjs +2 -2
  19. package/esm2020/lib/security/model/permissions.model.mjs +1 -9
  20. package/esm2020/lib/services/action-executor.service.mjs +8 -12
  21. package/esm2020/lib/services/commons.service.mjs +21 -10
  22. package/esm2020/lib/services/view-container.component.service.mjs +21 -8
  23. package/fesm2015/mediusinc-mng-commons.mjs +596 -562
  24. package/fesm2015/mediusinc-mng-commons.mjs.map +1 -1
  25. package/fesm2020/mediusinc-mng-commons.mjs +578 -546
  26. package/fesm2020/mediusinc-mng-commons.mjs.map +1 -1
  27. package/lib/components/action/editor/action-editor.component.d.ts +1 -2
  28. package/lib/components/form/editor/form-editor.component.d.ts +1 -1
  29. package/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.d.ts +0 -3
  30. package/lib/components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.d.ts +0 -2
  31. package/lib/components/tableview/tableview.component.d.ts +2 -2
  32. package/lib/descriptors/action.descriptor.d.ts +6 -4
  33. package/lib/descriptors/editor.descriptor.d.ts +5 -6
  34. package/lib/descriptors/tableview.descriptor.d.ts +5 -5
  35. package/lib/descriptors/types/editor.type.d.ts +2 -2
  36. package/lib/models/view-container.model.d.ts +31 -0
  37. package/lib/router/tableview-route-builder.d.ts +1 -1
  38. package/lib/security/model/permissions.model.d.ts +0 -7
  39. package/lib/services/commons.service.d.ts +4 -2
  40. package/lib/services/view-container.component.service.d.ts +12 -6
  41. package/package.json +1 -1
  42. package/scss/mng-overrides/_layout_dialog.scss +7 -8
  43. package/scss/mng-overrides/_theme_dialog.scss +57 -1
  44. package/scss/mng-overrides/_variables.scss +3 -0
  45. package/version-info.json +5 -5
@@ -32,10 +32,8 @@ export declare class MngActionEditorComponent<T, S> implements OnInit, OnDestroy
32
32
  templates: QueryList<MngTemplateDirective>;
33
33
  submitButtonElementRef: ElementRef;
34
34
  editorComponent: MngFormEditorComponent<T>;
35
- cmpId: string;
36
35
  title?: string;
37
36
  isDialog: boolean;
38
- isSaveButton: boolean;
39
37
  private instance?;
40
38
  private previousActionInstance?;
41
39
  toolbarLeftActions: ActionDescriptor<T>[];
@@ -59,6 +57,7 @@ export declare class MngActionEditorComponent<T, S> implements OnInit, OnDestroy
59
57
  private loadItemWithDataProvider;
60
58
  private setTitle;
61
59
  private deactivateAction;
60
+ private placeActionsOnPositions;
62
61
  static ɵfac: i0.ɵɵFactoryDeclaration<MngActionEditorComponent<any, any>, [null, null, null, null, null, { optional: true; }, { optional: true; }, { optional: true; }]>;
63
62
  static ɵcmp: i0.ɵɵComponentDeclaration<MngActionEditorComponent<any, any>, "mng-action-editor", never, { "action": "action"; "itemId": "itemId"; "item": "item"; "actionData": "actionData"; "dataProvider": "dataProvider"; "viewContainerInit": "viewContainer"; }, { "actionRunEventEmitter": "actionSubmit"; "actionCancelEventEmitter": "actionCancel"; }, ["templates"], never, false>;
64
63
  }
@@ -32,13 +32,13 @@ export declare class MngFormEditorComponent<T> implements OnInit, OnDestroy {
32
32
  submit(): void;
33
33
  onSubmit(event: Event): void;
34
34
  getFormValue(): T;
35
+ resetFormModel(item?: T): void;
35
36
  getFormField(key: string): AbstractControl<any, any> | null;
36
37
  setFormFieldValue(key: string, value: any): void;
37
38
  patchFormFieldValue(key: string, value: any): void;
38
39
  resetFormFieldValue(key: string, value?: any): void;
39
40
  private findFormField;
40
41
  private isAnyFieldInvalid;
41
- private resetFormModel;
42
42
  private updateFormState;
43
43
  static ɵfac: i0.ɵɵFactoryDeclaration<MngFormEditorComponent<any>, never>;
44
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>;
@@ -2,10 +2,8 @@ import { AfterViewInit, OnDestroy, OnInit } from '@angular/core';
2
2
  import { FieldType } from '@ngx-formly/core';
3
3
  import { Observable, Subject } from 'rxjs';
4
4
  import { ActionDescriptor, FieldManyEditorDescriptor } from '../../../../../descriptors';
5
- import { MngActionExecutorService } from '../../../../../services';
6
5
  import * as i0 from "@angular/core";
7
6
  export declare class MngFormlyFieldTableDialogFormComponent<T, ET> extends FieldType implements OnInit, AfterViewInit, OnDestroy {
8
- private actionExecutor;
9
7
  descriptor: FieldManyEditorDescriptor<T, ET>;
10
8
  itemsSubject: Subject<Array<T>>;
11
9
  items$: Observable<Array<T>>;
@@ -14,7 +12,6 @@ export declare class MngFormlyFieldTableDialogFormComponent<T, ET> extends Field
14
12
  private subscriptions;
15
13
  private isDisabledSubject;
16
14
  private isEnabled$;
17
- constructor(actionExecutor: MngActionExecutorService);
18
15
  ngOnInit(): void;
19
16
  ngAfterViewInit(): void;
20
17
  ngOnDestroy(): void;
@@ -1,6 +1,5 @@
1
1
  import { AfterViewInit, Injector, OnDestroy, OnInit } from '@angular/core';
2
2
  import { FieldType } from '@ngx-formly/core';
3
- import { Message } from 'primeng/api';
4
3
  import { Observable, Subject } from 'rxjs';
5
4
  import { MediusQueryResult } from '../../../../../api/models';
6
5
  import { FieldManyToManyEditorDescriptor } from '../../../../../descriptors';
@@ -18,7 +17,6 @@ export declare class MngFormlyFieldTableDialogMultiselectComponent<T, ET> extend
18
17
  isDialogVisible: boolean;
19
18
  dialogAreItemsLoaded: boolean;
20
19
  dialogSelectedAddItems: Array<any>;
21
- dialogMessages: Message[];
22
20
  dialogIsLoading$: Observable<boolean>;
23
21
  hasAddAction: boolean;
24
22
  hasDeleteAction: boolean;
@@ -24,8 +24,7 @@ export declare class MngTableviewComponent<T, S> implements OnInit, OnDestroy, A
24
24
  dataProvider?: ITableviewDataProvider<T, S>;
25
25
  actions: Array<ActionDescriptor<T>>;
26
26
  tableComponent?: MngTableComponent<T, S>;
27
- rowClickActions: ActionDescriptor<T>[];
28
- rowInlineActions: ActionDescriptor<T>[];
27
+ tableActions: ActionDescriptor<T>[];
29
28
  toolbarLeftActions: ActionDescriptor<T>[];
30
29
  toolbarRightActions: ActionDescriptor<T>[];
31
30
  tableQueryParam?: MediusQueryParam;
@@ -40,6 +39,7 @@ export declare class MngTableviewComponent<T, S> implements OnInit, OnDestroy, A
40
39
  ngOnDestroy(): void;
41
40
  getMessageService(): MessageService;
42
41
  getDataProvider(): IDataProvider<T, S> | undefined;
42
+ getActions(): ActionDescriptor<T>[];
43
43
  reloadTable(): void;
44
44
  onTableLoad(event: MngTableLoadEvent): void;
45
45
  selectionChange(selectedItems: Array<T>): void;
@@ -21,7 +21,8 @@ export declare class ActionDescriptor<T> {
21
21
  protected _activationTrigger: ActionActivationTriggerEnum;
22
22
  protected _position: ActionPositionEnum;
23
23
  protected _level: StyleLevelEnum;
24
- protected _tableviewActionCategory?: string;
24
+ private _positionTableviewCategories?;
25
+ protected _tableviewCategory?: string;
25
26
  protected _routeUrl: string | null;
26
27
  protected _dataProvider?: IDataProvider<T, any>;
27
28
  protected _runFunction?: (ctx: ActionContext<T, any>) => Observable<T | undefined | null>;
@@ -37,7 +38,6 @@ export declare class ActionDescriptor<T> {
37
38
  protected _afterRunAction?: ActionDescriptor<unknown>;
38
39
  protected _onRunErrorAction?: ActionDescriptor<unknown>;
39
40
  protected _permissions?: APermissions;
40
- protected _permissionsRouteType?: string;
41
41
  protected _button: ActionButtonDescriptor;
42
42
  protected _hasItemsSelection: boolean;
43
43
  constructor(model: ModelDescriptor<T> | null, actionName: string, parentType?: ClassType<unknown>, parentProperty?: string);
@@ -69,9 +69,10 @@ export declare class ActionDescriptor<T> {
69
69
  get afterRunAction(): ActionDescriptor<unknown> | undefined;
70
70
  get onRunErrorAction(): ActionDescriptor<unknown> | undefined;
71
71
  get permissions(): APermissions | undefined;
72
- get permissionsRouteType(): string | undefined;
72
+ get tableviewCategory(): string | undefined;
73
73
  get hasItemsSelection(): boolean;
74
74
  get button(): ActionButtonDescriptor;
75
+ get positionTableviewCategories(): string[] | undefined;
75
76
  withDataProvider(dataProvider: IDataProvider<T, any>): this;
76
77
  withServiceType<S>(serviceType: Type<S>): this;
77
78
  withRunFunction<S>(fn: (ctx: ActionContext<T, S>) => Observable<T | undefined | null>): this;
@@ -93,10 +94,11 @@ export declare class ActionDescriptor<T> {
93
94
  withAfterRunAction<RT>(action: ActionDescriptor<RT>): this;
94
95
  withOnRunErrorAction<RT>(action: ActionDescriptor<RT>): this;
95
96
  withPermissions(permissions: APermissions): this;
96
- withPermissionsRouteType(permissionsRouteType: string): this;
97
+ withTableviewCategory(permissionsRouteType: string): this;
97
98
  withButtonDescriptor(button: ActionButtonDescriptor): this;
98
99
  withButton(label?: string | null, icon?: string | null, styleLevel?: StyleLevelEnum, styleText?: boolean): this;
99
100
  withItemsSelection(hasSelection?: boolean): this;
101
+ withPositionTableviewCategories(positionTableviewCategories: string[]): this;
100
102
  }
101
103
  export declare class ActionSimpleDescriptor<T> extends ActionDescriptor<T> {
102
104
  constructor(actionName: string, modelType?: ClassType<T>, idProperty?: string, titleProperty?: string);
@@ -2,19 +2,19 @@ import { ILookupDataProvider } from '../data-providers';
2
2
  import { TableviewAttributeDef } from '../models/tableview-attr.model';
3
3
  import { ClassType, EnumConstantType, EnumType, MngFieldValidationMessage, MngFieldValidator } from '../types';
4
4
  import { AFieldDescriptor, FieldGroupDescriptor, FieldInputDescriptor, FieldLookupDescriptor, FieldLookupEnumDescriptor, FieldManyEditorDescriptor, FieldManyToManyEditorDescriptor, FieldTabGroupDescriptor, ModelDescriptor, TableDescriptor, TableviewDescriptor } from './';
5
- import { FieldInputTypeEnum, TableviewTypeEnum } from './types';
5
+ import { FieldInputTypeEnum, TableviewEditorTypeEnum } from './types';
6
6
  export declare class EditorDescriptor<T> {
7
7
  static readonly defaultGroupName = "_default";
8
8
  protected readonly _model: ModelDescriptor<T>;
9
9
  protected readonly _modelType: ClassType<T>;
10
- protected readonly _tableviewEditorType: TableviewTypeEnum;
10
+ protected readonly _tableviewEditorType: TableviewEditorTypeEnum;
11
11
  protected readonly _tabs: Array<FieldTabGroupDescriptor<T>>;
12
12
  protected readonly _groups: Array<FieldGroupDescriptor<T>>;
13
13
  protected _fields: Array<AFieldDescriptor<any, T>>;
14
14
  protected _currentTabGroup?: FieldTabGroupDescriptor<T>;
15
15
  protected _currentGroup?: FieldGroupDescriptor<T>;
16
16
  protected _disabled: boolean;
17
- constructor(modelType: ClassType<T>, idProperty?: string, titleProperty?: string, tableviewEditorType?: TableviewTypeEnum);
17
+ constructor(modelType: ClassType<T>, idProperty?: string, titleProperty?: string, tableviewEditorType?: TableviewEditorTypeEnum);
18
18
  /**
19
19
  * auto generated editor descriptor based on openapi definition
20
20
  * generates all fields from definition
@@ -23,7 +23,7 @@ export declare class EditorDescriptor<T> {
23
23
  * @param titleProperty
24
24
  * @param tableEditorType
25
25
  */
26
- static from<T>(modelType: ClassType<T>, idProperty?: string, titleProperty?: string, tableEditorType?: TableviewTypeEnum): EditorDescriptor<T>;
26
+ static from<T>(modelType: ClassType<T>, idProperty?: string, titleProperty?: string, tableEditorType?: TableviewEditorTypeEnum): EditorDescriptor<T>;
27
27
  /**
28
28
  * auto generated editor descriptor based on openapi definition
29
29
  * generates only selected fields
@@ -33,11 +33,10 @@ export declare class EditorDescriptor<T> {
33
33
  * @param titleProperty
34
34
  * @param tableEditorType
35
35
  */
36
- static fromModelWithAttributes<T>(modelType: ClassType<T>, attributes: TableviewAttributeDef[], idProperty?: string, titleProperty?: string, tableEditorType?: TableviewTypeEnum): EditorDescriptor<T>;
36
+ static fromModelWithAttributes<T>(modelType: ClassType<T>, attributes: TableviewAttributeDef[], idProperty?: string, titleProperty?: string, tableEditorType?: TableviewEditorTypeEnum): EditorDescriptor<T>;
37
37
  get model(): ModelDescriptor<T>;
38
38
  get tabs(): FieldTabGroupDescriptor<T>[];
39
39
  get fields(): AFieldDescriptor<any, T>[];
40
- get tableviewEditorType(): boolean;
41
40
  get disabled(): boolean;
42
41
  createTabGroup(name: string, title?: string): FieldTabGroupDescriptor<T>;
43
42
  createFieldGroup(name: string, title?: string | null): FieldGroupDescriptor<T>;
@@ -5,12 +5,12 @@ import { IColumnValueComponent } from '../models';
5
5
  import { TableviewAttributeDef } from '../models/tableview-attr.model';
6
6
  import { ClassType, EnumConstantType, EnumType } from '../types';
7
7
  import { AFieldDescriptor, ColumnDescriptor, EditorDescriptor, FieldInputDescriptor, FieldLookupDescriptor, FieldLookupEnumDescriptor, FieldManyEditorDescriptor, FieldManyToManyEditorDescriptor, ModelDescriptor, TableDescriptor, TableDynamicDescriptor } from './index';
8
- import { ColumnTypeEnum, FieldInputTypeEnum, TableviewTypeEnum } from './types';
8
+ import { ColumnTypeEnum, FieldInputTypeEnum, TableviewEditorTypeEnum } from './types';
9
9
  export declare class TableviewDescriptor<T> {
10
10
  private readonly _model;
11
11
  private _modelType;
12
12
  protected _table: TableDescriptor<T>;
13
- protected _viewEditor: EditorDescriptor<T>;
13
+ protected _detailsEditor: EditorDescriptor<T>;
14
14
  protected _addEditor: EditorDescriptor<T>;
15
15
  protected _editEditor: EditorDescriptor<T>;
16
16
  protected _tableTitle?: string;
@@ -32,14 +32,14 @@ export declare class TableviewDescriptor<T> {
32
32
  */
33
33
  static fromModelWithDefinition<T>(modelType: ClassType<T>, columnAttributes: TableviewAttributeDef[], fieldAttributes?: TableviewAttributeDef[] | null, idProperty?: string, titleProperty?: string): TableviewDescriptor<T>;
34
34
  get table(): TableDescriptor<T>;
35
- get viewEditor(): EditorDescriptor<T>;
35
+ get detailsEditor(): EditorDescriptor<T>;
36
36
  get addEditor(): EditorDescriptor<T>;
37
37
  get editEditor(): EditorDescriptor<T>;
38
38
  get tableTitle(): string | undefined;
39
39
  get model(): ModelDescriptor<T>;
40
40
  withTableDescriptor(descriptor: TableDescriptor<T>): this;
41
41
  withEditorDescriptors(descriptor: EditorDescriptor<T>): this;
42
- withViewDescriptor(descriptor: EditorDescriptor<T>): this;
42
+ withDetailsDescriptor(descriptor: EditorDescriptor<T>): this;
43
43
  withAddDescriptor(descriptor: EditorDescriptor<T>): this;
44
44
  withEditDescriptor(descriptor: EditorDescriptor<T>): this;
45
45
  withTableTitle(title: string): this;
@@ -47,7 +47,7 @@ export declare class TableviewDescriptor<T> {
47
47
  addColumnDescriptor<CT>(column: ColumnDescriptor<CT, T>): TableDescriptor<T>;
48
48
  addColumn(property: string): ColumnDescriptor<string, T>;
49
49
  removeColumn(property: string): void;
50
- getField(property: string, editorType: TableviewTypeEnum): AFieldDescriptor<any, T> | null;
50
+ getField(property: string, editorType: TableviewEditorTypeEnum): AFieldDescriptor<any, T> | null;
51
51
  removeField(property: string): void;
52
52
  addColumnNumber(property: string, displayFormat?: string): ColumnDescriptor<number, T>;
53
53
  addColumnDate(property: string, displayFormat?: string): ColumnDescriptor<Date, T>;
@@ -1,6 +1,6 @@
1
- export declare enum TableviewTypeEnum {
1
+ export declare enum TableviewEditorTypeEnum {
2
2
  None = 0,
3
- View = 1,
3
+ Details = 1,
4
4
  Edit = 2,
5
5
  Add = 3
6
6
  }
@@ -1,6 +1,37 @@
1
1
  import { MessageService } from 'primeng/api';
2
+ import { Observable } from 'rxjs';
3
+ import { MediusQueryParam } from '../api/models';
2
4
  import { IDataProvider } from '../data-providers';
5
+ import { ActionDescriptor } from '../descriptors';
3
6
  export interface IViewContainer<T, S> {
4
7
  getMessageService(): MessageService | undefined;
5
8
  getDataProvider(): IDataProvider<T, S> | undefined;
9
+ getActions(): Array<ActionDescriptor<T>>;
10
+ }
11
+ export interface IViewContainerTable<T, S> extends IViewContainer<T, S> {
12
+ getTableReload$(): Observable<ViewContainerTableReloadEvent>;
13
+ reloadTable(event: ViewContainerTableReloadEvent): void;
14
+ }
15
+ export interface IViewContainerEditor<T, S> extends IViewContainer<T, S> {
16
+ getEditorReset$(): Observable<ViewContainerEditorResetEvent<T>>;
17
+ resetEditor(event?: ViewContainerEditorResetEvent<T>): void;
18
+ }
19
+ export interface ViewContainerTableReloadEvent {
20
+ emitEvent?: boolean;
21
+ resetParams?: boolean;
22
+ queryParam?: MediusQueryParam;
23
+ data?: {
24
+ [key: string]: any;
25
+ };
26
+ }
27
+ export interface ViewContainerEditorResetEvent<T> {
28
+ emitEvent?: boolean;
29
+ fetch?: boolean;
30
+ item?: T;
31
+ fields?: {
32
+ [key: string]: unknown;
33
+ };
34
+ data?: {
35
+ [key: string]: any;
36
+ };
6
37
  }
@@ -28,7 +28,7 @@ export declare class TableviewRouteBuilder<C extends AMngTableviewRouteComponent
28
28
  withEdit(hasEdit?: boolean, permissions?: APermissions, path?: string): this;
29
29
  withDelete(hasDelete?: boolean, permissions?: APermissions): this;
30
30
  withPermissions(read?: APermissions, add?: APermissions, edit?: APermissions, delet?: APermissions, details?: APermissions): this;
31
- withPermissionsOther(key: string, permissions: APermissions): this;
31
+ withPermissionByCategory(key: string, permissions: APermissions): this;
32
32
  withPermissionsObject(permissions: {
33
33
  [key: string]: APermissions;
34
34
  }): this;
@@ -34,11 +34,4 @@ export declare namespace Permissions {
34
34
  private constructor();
35
35
  static of(service: Type<IPermissionService>): Service;
36
36
  }
37
- class ActionTypes {
38
- static readonly READ = "read";
39
- static readonly ADD = "add";
40
- static readonly EDIT = "edit";
41
- static readonly DELETE = "delete";
42
- static readonly DETAILS = "details";
43
- }
44
37
  }
@@ -39,8 +39,10 @@ export declare class MngCommonsService {
39
39
  get appLogoNameLight(): string;
40
40
  get appLogoNameDark(): string;
41
41
  get appLanguages(): string[];
42
- get appLanguage(): string;
43
- set appLanguage(language: string);
42
+ get appLanguage(): string | null;
43
+ set appLanguage(language: string | null);
44
+ initLanguage(): string;
45
+ getOrInitLanguage(): string;
44
46
  get appVersion(): import("../models").VersionConfigType;
45
47
  get menuModeIsStatic(): boolean;
46
48
  get menuModeIsStatic$(): Observable<boolean>;
@@ -1,22 +1,28 @@
1
1
  import { MessageService } from 'primeng/api';
2
+ import { Observable } from 'rxjs';
2
3
  import { IDataProvider } from '../data-providers';
3
4
  import { ActionDescriptor } from '../descriptors';
4
- import { IViewContainer } from '../models';
5
+ import { IViewContainerEditor, IViewContainerTable, ViewContainerEditorResetEvent, ViewContainerTableReloadEvent } from '../models';
5
6
  import * as i0 from "@angular/core";
6
7
  /**
7
8
  * Should be used with providers defined within component.
8
9
  */
9
- export declare class MngViewContainerComponentService<T, S> implements IViewContainer<T, S> {
10
+ export declare class MngViewContainerComponentService<T, S> implements IViewContainerTable<T, S>, IViewContainerEditor<T, S> {
10
11
  private messageService;
11
12
  private _dataProvider?;
12
- actions: Array<ActionDescriptor<T>>;
13
- private _reloadTableSubject;
13
+ private actions;
14
+ private _tableReloadSubject;
15
+ private _editorResetSubject;
14
16
  constructor(messageService: MessageService);
15
17
  set dataProvider(dataProvider: IDataProvider<T, S>);
16
- get reloadTable(): import("rxjs").Observable<any>;
17
- triggerTableReload(event: any): void;
18
18
  getMessageService(): MessageService;
19
19
  getDataProvider(): IDataProvider<T, S> | undefined;
20
+ getActions(): Array<ActionDescriptor<T>>;
21
+ setActions(actions: Array<ActionDescriptor<T>>): void;
22
+ getTableReload$(): Observable<ViewContainerTableReloadEvent>;
23
+ reloadTable(event?: ViewContainerTableReloadEvent): void;
24
+ getEditorReset$(): Observable<ViewContainerEditorResetEvent<T>>;
25
+ resetEditor(event?: ViewContainerEditorResetEvent<T> | undefined): void;
20
26
  static ɵfac: i0.ɵɵFactoryDeclaration<MngViewContainerComponentService<any, any>, never>;
21
27
  static ɵprov: i0.ɵɵInjectableDeclaration<MngViewContainerComponentService<any, any>>;
22
28
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mediusinc/mng-commons",
3
- "version": "0.15.1",
3
+ "version": "0.16.1",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "~14.1.0",
6
6
  "@angular/core": "~14.1.0",
@@ -1,7 +1,7 @@
1
1
  @import 'mixins';
2
2
 
3
3
  .p-dialog {
4
- &.mng-action-editor-dialog {
4
+ &.mng-dialog {
5
5
  height: 90vh;
6
6
  width: 60vw;
7
7
 
@@ -13,12 +13,12 @@
13
13
  width: 90vw;
14
14
  }
15
15
 
16
- &.mng-action-editor-dialog-xl {
16
+ &.mng-dialog-xl {
17
17
  height: 100vh;
18
18
  width: 100vw;
19
19
  }
20
20
 
21
- &.mng-action-editor-dialog-lg {
21
+ &.mng-dialog-lg {
22
22
  height: 95vh;
23
23
  width: 80vw;
24
24
 
@@ -31,7 +31,7 @@
31
31
  }
32
32
  }
33
33
 
34
- &.mng-action-editor-dialog-sm {
34
+ &.mng-dialog-sm {
35
35
  width: 50vw;
36
36
  height: initial;
37
37
 
@@ -44,8 +44,9 @@
44
44
  }
45
45
  }
46
46
 
47
- &.mng-action-editor-dialog-xs {
47
+ &.mng-dialog-xs {
48
48
  width: 40vw;
49
+ height: initial;
49
50
 
50
51
  @include mediaMaxLg() {
51
52
  width: 60vw;
@@ -57,9 +58,7 @@
57
58
  }
58
59
  }
59
60
 
60
- &.mng-formly-field-table-form-dialog,
61
- &.mng-formly-field-table-multiselect-dialog,
62
- &.mng-formly-field-lookup-dialog &.p-confirm-dialog {
61
+ &.mng-formly-field-lookup-dialog {
63
62
  width: 450px;
64
63
 
65
64
  @include mediaMaxXs() {
@@ -1,9 +1,65 @@
1
+ @import 'variables';
2
+
1
3
  .p-dialog {
2
4
  &.mng-action-editor-dialog,
3
- &.mng-field-dialog {
5
+ &.mng-formly-field-table-multiselect-dialog {
4
6
  .p-dialog-content {
5
7
  border-bottom-left-radius: $dialogBorderRadius;
6
8
  border-bottom-right-radius: $dialogBorderRadius;
7
9
  }
8
10
  }
11
+
12
+ &.mng-formly-field-table-multiselect-dialog {
13
+ .p-dialog-content {
14
+ padding: 0;
15
+ overflow-y: hidden;
16
+ }
17
+
18
+ .mng-formly-field-table-multiselect-dialog-table {
19
+ padding: $mngDialogContentPadding;
20
+ }
21
+
22
+ .mng-formly-field-table-multiselect-dialog-footer {
23
+ padding: $mngDialogFooterPadding;
24
+
25
+ button {
26
+ width: initial;
27
+ margin: 0.15rem 0.15rem;
28
+ }
29
+ }
30
+ }
31
+
32
+ &.mng-formly-field-lookup-dialog {
33
+ .p-dialog-content {
34
+ padding-bottom: 0;
35
+ }
36
+
37
+ .mng-formly-field-table-multiselect-dialog-table {
38
+ padding: $mngDialogContentPadding;
39
+ }
40
+
41
+ .p-dialog-footer {
42
+ padding: $mngDialogFooterPadding;
43
+
44
+ button {
45
+ margin: 0.15rem 0.15rem;
46
+ }
47
+ }
48
+ }
49
+
50
+ &.mng-action-editor-dialog {
51
+ .p-dialog-content {
52
+ padding: 0;
53
+ overflow-y: hidden;
54
+ }
55
+
56
+ .mng-action-editor-form-container {
57
+ padding: $mngDialogContentPadding;
58
+ overflow-y: auto;
59
+ }
60
+
61
+ .mng-action-editor-footer-container {
62
+ padding: $mngDialogFooterPadding;
63
+ }
64
+ }
9
65
  }
@@ -10,3 +10,6 @@ $mediaLgWidthMax: #{$mediaXlWidthMin - 1} !default;
10
10
 
11
11
  $scaleXS: 0.8 !default;
12
12
  $scaleLG: 1.4 !default;
13
+
14
+ $mngDialogContentPadding: 0 1.714rem !default;
15
+ $mngDialogFooterPadding: 1.286rem 1.714rem !default;
package/version-info.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@mediusinc/mng-commons",
3
- "version": "0.15.1",
4
- "tag": "v0.15.1",
3
+ "version": "0.16.1",
4
+ "tag": "v0.16.1",
5
5
  "distance": 0,
6
- "hash": "6cca1f00",
6
+ "hash": "95560438",
7
7
  "dirty": false,
8
- "semver": "0.15.1",
9
- "raw": "v0.15.1-6cca1f00"
8
+ "semver": "0.16.1",
9
+ "raw": "v0.16.1-95560438"
10
10
  }