@mediusinc/mng-commons 1.3.0-1c14fa2b → 1.5.0-rc.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 (36) hide show
  1. package/assets/i18n/en.json +9 -0
  2. package/assets/i18n/sl.json +9 -0
  3. package/esm2020/lib/components/action/action.component.mjs +68 -16
  4. package/esm2020/lib/components/form/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.mjs +6 -1
  5. package/esm2020/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.mjs +21 -2
  6. package/esm2020/lib/components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.mjs +6 -1
  7. package/esm2020/lib/components/tableview/route/tableview-route.abstract.component.mjs +31 -6
  8. package/esm2020/lib/components/tableview/table/table.component.mjs +3 -3
  9. package/esm2020/lib/descriptors/action.descriptor.mjs +18 -1
  10. package/esm2020/lib/descriptors/table.descriptor.mjs +16 -1
  11. package/esm2020/lib/mng-commons.module.mjs +15 -5
  12. package/esm2020/lib/services/action-executor.service.mjs +5 -2
  13. package/esm2020/lib/services/commons.service.mjs +6 -4
  14. package/esm2020/lib/types/i18n.type.mjs +2 -0
  15. package/esm2020/lib/types/index.mjs +2 -1
  16. package/esm2020/lib/utils/export.util.mjs +20 -0
  17. package/esm2020/lib/utils/i18n.util.mjs +49 -6
  18. package/esm2020/lib/utils/index.mjs +2 -1
  19. package/fesm2015/mediusinc-mng-commons.mjs +248 -33
  20. package/fesm2015/mediusinc-mng-commons.mjs.map +1 -1
  21. package/fesm2020/mediusinc-mng-commons.mjs +249 -34
  22. package/fesm2020/mediusinc-mng-commons.mjs.map +1 -1
  23. package/lib/components/action/action.component.d.ts +8 -3
  24. package/lib/components/tableview/route/tableview-route.abstract.component.d.ts +4 -0
  25. package/lib/descriptors/action.descriptor.d.ts +6 -0
  26. package/lib/descriptors/table.descriptor.d.ts +5 -0
  27. package/lib/mng-commons.module.d.ts +16 -14
  28. package/lib/types/i18n.type.d.ts +1 -0
  29. package/lib/types/index.d.ts +1 -0
  30. package/lib/utils/export.util.d.ts +5 -0
  31. package/lib/utils/i18n.util.d.ts +31 -2
  32. package/lib/utils/index.d.ts +1 -0
  33. package/package.json +1 -1
  34. package/scss/common/theme/designer/_components.scss +4 -4
  35. package/scss/mng-overrides/_layout_menu.scss +4 -0
  36. package/version-info.json +6 -6
@@ -1,7 +1,8 @@
1
1
  import { EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
2
2
  import { ActivatedRoute } from '@angular/router';
3
3
  import { TranslateService } from '@ngx-translate/core';
4
- import { ConfirmationService } from 'primeng/api';
4
+ import { ConfirmationService, MenuItem } from 'primeng/api';
5
+ import { SlideMenu } from 'primeng/slidemenu';
5
6
  import { Observable } from 'rxjs';
6
7
  import { MediusQueryParam } from '../../api/models';
7
8
  import { IDataProvider } from '../../data-providers';
@@ -35,6 +36,7 @@ export declare class MngActionComponent<T, S> implements OnInit, OnChanges, OnDe
35
36
  viewContainerInit?: IViewContainer<T, S>;
36
37
  selectedItems: Array<T>;
37
38
  finishEventEmitter: EventEmitter<ActionInstance<T, S>>;
39
+ subactionsMenu?: SlideMenu;
38
40
  private loadingSubject;
39
41
  $loading: Observable<boolean>;
40
42
  cmpId: string;
@@ -60,15 +62,18 @@ export declare class MngActionComponent<T, S> implements OnInit, OnChanges, OnDe
60
62
  route: ActivatedRoute;
61
63
  private routePermissions?;
62
64
  buttonClass: string;
65
+ subactions: MenuItem[];
66
+ private subactionSubscriptions;
63
67
  constructor(routeService: ActivatedRoute, translate: TranslateService, authorization: MngAuthorizationService, actionExecutor: MngActionExecutorService, confirmationService: ConfirmationService, viewContainerService: MngViewContainerComponentService<T, S> | null);
64
68
  ngOnInit(): void;
65
69
  ngOnChanges(changes: SimpleChanges): void;
66
70
  ngOnDestroy(): void;
67
- triggerAction(parameters?: ActionParameters<T>): void;
71
+ triggerAction(action: ActionDescriptor<T>, parameters?: ActionParameters<T>, event?: Event): void;
68
72
  getConfirmationService(): ConfirmationService;
69
73
  getConfirmationServiceInstanceKey(action: ActionDescriptor<any>): string;
70
- private processSubscriptions;
71
74
  onCustomActionCmpInst(instance: IActionComponent<T>): void;
75
+ private processSubactions;
76
+ private processSubscriptions;
72
77
  static ɵfac: i0.ɵɵFactoryDeclaration<MngActionComponent<any, any>, [null, null, null, null, null, { optional: true; }]>;
73
78
  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
79
  }
@@ -1,5 +1,6 @@
1
1
  import { OnInit } from '@angular/core';
2
2
  import { ActivatedRoute } from '@angular/router';
3
+ import { TranslateService } from '@ngx-translate/core';
3
4
  import { ITableviewDataProvider } from '../../../data-providers';
4
5
  import { ActionDeleteDescriptor, ActionDescriptor, ActionEditorAddDescriptor, ActionEditorDetailsDescriptor, ActionEditorEditDescriptor, ActionLinkDescriptor, EditorDescriptor, ModelDescriptor, TableviewDescriptor } from '../../../descriptors';
5
6
  import { MngRouterData } from '../../../router/models';
@@ -9,6 +10,7 @@ export declare abstract class AMngTableviewRouteComponent<T, S> implements OnIni
9
10
  dataProvider: ITableviewDataProvider<T, S>;
10
11
  actions: Array<ActionDescriptor<T>>;
11
12
  protected route: ActivatedRoute;
13
+ protected translateService: TranslateService;
12
14
  constructor();
13
15
  protected get routeData(): MngRouterData;
14
16
  ngOnInit(): void;
@@ -22,6 +24,8 @@ export declare abstract class AMngTableviewRouteComponent<T, S> implements OnIni
22
24
  protected createActionDescriptorForDetailsDelete(): ActionDescriptor<T> | null;
23
25
  protected createActionDescriptorForDelete(descriptor?: ModelDescriptor<T>): ActionDeleteDescriptor<T> | null;
24
26
  protected createActionDescriptorForExport(descriptor?: ModelDescriptor<T>): ActionDescriptor<T> | null;
27
+ protected createActionDescriptorForExportJson(descriptor?: ModelDescriptor<T>): ActionDescriptor<T>;
28
+ protected createActionDescriptorForExportCsv(descriptor?: ModelDescriptor<T>): ActionDescriptor<T>;
25
29
  protected createActionDescriptorForRefresh(descriptor?: ModelDescriptor<T>): ActionDescriptor<T> | null;
26
30
  protected createActionDescriptorForDataTranslate(descriptor?: ModelDescriptor<T>): ActionDescriptor<T> | null;
27
31
  static ɵfac: i0.ɵɵFactoryDeclaration<AMngTableviewRouteComponent<any, any>, never>;
@@ -41,6 +41,8 @@ export declare class ActionDescriptor<T> {
41
41
  protected _button: ActionButtonDescriptor;
42
42
  protected _hasItemsSelection: boolean;
43
43
  protected _component?: Type<IActionComponent<T>>;
44
+ protected _subactionsAsMenu: boolean;
45
+ protected _subactions: Array<ActionDescriptor<T>>;
44
46
  constructor(model: ModelDescriptor<T> | null, actionName: string, parentType?: ClassType<unknown>, parentProperty?: string);
45
47
  get model(): ModelDescriptor<T> | null;
46
48
  get parentTypeName(): string | undefined;
@@ -75,6 +77,8 @@ export declare class ActionDescriptor<T> {
75
77
  get button(): ActionButtonDescriptor;
76
78
  get component(): Type<IActionComponent<T>> | undefined;
77
79
  get positionTableviewCategories(): string[] | undefined;
80
+ get subactionsAsMenu(): boolean;
81
+ get subactions(): ActionDescriptor<T>[];
78
82
  protected setI18nModelActionBaseKey(base?: string): void;
79
83
  withDataProvider(dataProvider: IDataProvider<T, any>): this;
80
84
  withServiceType<S>(serviceType: Type<S>): this;
@@ -104,6 +108,8 @@ export declare class ActionDescriptor<T> {
104
108
  withComponent(component: Type<IActionComponent<T>>): this;
105
109
  withPositionTableviewCategories(positionTableviewCategories: string[]): this;
106
110
  withI18nBase(base: ClassType<unknown> | string): this;
111
+ withSubactionsAsMenu(): this;
112
+ withSubactions(...subactions: Array<ActionDescriptor<T>>): this;
107
113
  }
108
114
  export declare class ActionSimpleDescriptor<T> extends ActionDescriptor<T> {
109
115
  constructor(actionName: string, modelType?: ClassType<T>, idProperty?: string, titleProperty?: string, i18nBaseKey?: string | ClassType<unknown>);
@@ -27,6 +27,8 @@ export declare class TableDescriptor<T> {
27
27
  private _rowHeight?;
28
28
  private _hasHover;
29
29
  private _hasGridlines;
30
+ private _hasResizableColumns;
31
+ private _columnResizeMode;
30
32
  private _headerClassName?;
31
33
  private _rowClassName?;
32
34
  private _rowClassNameMapFn?;
@@ -67,6 +69,8 @@ export declare class TableDescriptor<T> {
67
69
  get rowHeight(): number | undefined;
68
70
  get hasHover(): boolean;
69
71
  get hasGridlines(): boolean;
72
+ get hasResizableColumns(): boolean;
73
+ get columnResizeMode(): "fit" | "expand";
70
74
  get rowClassName(): string | undefined;
71
75
  get rowClassNameMapFn(): ((className?: string | undefined, item?: T | undefined) => string) | undefined;
72
76
  get headerClassName(): string | undefined;
@@ -94,6 +98,7 @@ export declare class TableDescriptor<T> {
94
98
  withRowHeight(rowHeight: number): this;
95
99
  withHover(hover: boolean): this;
96
100
  withGridlines(gridlines: boolean): this;
101
+ withResizableColumns(resizableColumns?: boolean, columnResizeMode?: 'fit' | 'expand'): this;
97
102
  withRowClassName(rowClassName?: string, classNameMapFn?: (className?: string, item?: T) => string): this;
98
103
  withHeaderClassName(headerClassName: string): this;
99
104
  withLocalized(): this;
@@ -75,23 +75,25 @@ import * as i70 from "primeng/paginator";
75
75
  import * as i71 from "primeng/radiobutton";
76
76
  import * as i72 from "primeng/ripple";
77
77
  import * as i73 from "primeng/selectbutton";
78
- import * as i74 from "primeng/table";
79
- import * as i75 from "primeng/tag";
80
- import * as i76 from "primeng/toast";
81
- import * as i77 from "primeng/togglebutton";
82
- import * as i78 from "primeng/toolbar";
83
- import * as i79 from "primeng/tooltip";
84
- import * as i80 from "primeng/messages";
85
- import * as i81 from "primeng/progressspinner";
86
- import * as i82 from "primeng/tabview";
87
- import * as i83 from "primeng/fieldset";
88
- import * as i84 from "primeng/multiselect";
89
- import * as i85 from "primeng/skeleton";
90
- import * as i86 from "primeng/image";
78
+ import * as i74 from "primeng/splitbutton";
79
+ import * as i75 from "primeng/table";
80
+ import * as i76 from "primeng/tag";
81
+ import * as i77 from "primeng/toast";
82
+ import * as i78 from "primeng/togglebutton";
83
+ import * as i79 from "primeng/toolbar";
84
+ import * as i80 from "primeng/tooltip";
85
+ import * as i81 from "primeng/messages";
86
+ import * as i82 from "primeng/progressspinner";
87
+ import * as i83 from "primeng/tabview";
88
+ import * as i84 from "primeng/fieldset";
89
+ import * as i85 from "primeng/multiselect";
90
+ import * as i86 from "primeng/skeleton";
91
+ import * as i87 from "primeng/slidemenu";
92
+ import * as i88 from "primeng/image";
91
93
  export declare const primeNgModules: (typeof InputTextModule)[];
92
94
  export declare class MngCommonsModule {
93
95
  static forRoot(config: MngModuleConfig): ModuleWithProviders<MngCommonsModule>;
94
96
  static ɵfac: i0.ɵɵFactoryDeclaration<MngCommonsModule, never>;
95
- static ɵmod: i0.ɵɵNgModuleDeclaration<MngCommonsModule, [typeof i1.MngComponentDirective, typeof i2.MngTemplateDirective, typeof i3.JsonPathPipe, typeof i4.MngEnumPipe, typeof i5.MngBooleanPipe, typeof i6.MngI18nPropertyPipe, typeof i7.MngParametrizePipe, typeof i8.MngGetterPipe, typeof i9.MngTemplatePipe, typeof i10.MngClassMapPipe, typeof i11.MngEnumeratePipe, typeof i12.MngEnumerateAsyncPipe, typeof i13.MngLocaleDefaultRowClassPipe, typeof i14.MngBreadcrumbComponent, typeof i15.MngFooterComponent, typeof i16.MngMainLayoutComponent, typeof i17.MngMenuComponent, typeof i18.MngMenuItemComponent, typeof i19.MngTopbarComponent, typeof i20.MngVersionComponent, typeof i21.MngAutocompleteComponent, typeof i22.MngDropdownComponent, typeof i23.MngDateRangeComponent, typeof i24.MngFormlyFieldWrapperComponent, typeof i25.MngFormlyFieldNoLabelWrapperComponent, typeof i26.MngFormlyFieldInputComponent, typeof i27.MngFormlyFieldLabelComponent, typeof i28.MngFormlyFieldDropdownComponent, typeof i29.MngFormlyFieldAutocompleteComponent, typeof i30.MngFormlyFieldLookupDialogComponent, typeof i31.MngFormlyFieldTableDialogMultiselectComponent, typeof i32.MngFormlyFieldTableDialogFormComponent, typeof i33.MngFormlyFieldTabsComponent, typeof i34.MngFormlyFieldFieldsetComponent, typeof i35.MngFormlyFieldActionComponent, typeof i36.MngTableComponent, typeof i37.MngTableviewComponent, typeof i38.MngTableColumnValueComponent, typeof i39.MngTableColumnFilterComponent, typeof i40.MngTableviewRouteComponent, typeof i41.MngFormEditorComponent, typeof i42.MngActionComponent, typeof i43.MngActionEditorComponent, typeof i44.MngActionRouteComponent, typeof i45.MngDataLanguageDropdownComponent], [typeof i46.CommonModule, typeof i47.RouterModule, typeof i48.HttpClientModule, typeof i49.ReactiveFormsModule, typeof i50.TranslateModule, typeof i51.FormlyModule, typeof i52.AutoCompleteModule, typeof i53.BreadcrumbModule, typeof i54.ButtonModule, typeof i55.CalendarModule, typeof i56.CardModule, typeof i57.CheckboxModule, typeof i58.ChipModule, typeof i59.ConfirmDialogModule, typeof i60.ConfirmPopupModule, typeof i61.DialogModule, typeof i62.DynamicDialogModule, typeof i63.DropdownModule, typeof i64.FileUploadModule, typeof i65.InputNumberModule, typeof i66.InputMaskModule, typeof i67.InputSwitchModule, typeof i68.InputTextModule, typeof i69.InputTextareaModule, typeof i70.PaginatorModule, typeof i71.RadioButtonModule, typeof i72.RippleModule, typeof i73.SelectButtonModule, typeof i74.TableModule, typeof i75.TagModule, typeof i76.ToastModule, typeof i77.ToggleButtonModule, typeof i78.ToolbarModule, typeof i79.TooltipModule, typeof i80.MessagesModule, typeof i81.ProgressSpinnerModule, typeof i82.TabViewModule, typeof i83.FieldsetModule, typeof i84.MultiSelectModule, typeof i85.SkeletonModule, typeof i86.ImageModule], [typeof i52.AutoCompleteModule, typeof i53.BreadcrumbModule, typeof i54.ButtonModule, typeof i55.CalendarModule, typeof i56.CardModule, typeof i57.CheckboxModule, typeof i58.ChipModule, typeof i59.ConfirmDialogModule, typeof i60.ConfirmPopupModule, typeof i61.DialogModule, typeof i62.DynamicDialogModule, typeof i63.DropdownModule, typeof i64.FileUploadModule, typeof i65.InputNumberModule, typeof i66.InputMaskModule, typeof i67.InputSwitchModule, typeof i68.InputTextModule, typeof i69.InputTextareaModule, typeof i70.PaginatorModule, typeof i71.RadioButtonModule, typeof i72.RippleModule, typeof i73.SelectButtonModule, typeof i74.TableModule, typeof i75.TagModule, typeof i76.ToastModule, typeof i77.ToggleButtonModule, typeof i78.ToolbarModule, typeof i79.TooltipModule, typeof i80.MessagesModule, typeof i81.ProgressSpinnerModule, typeof i82.TabViewModule, typeof i83.FieldsetModule, typeof i84.MultiSelectModule, typeof i85.SkeletonModule, typeof i1.MngComponentDirective, typeof i2.MngTemplateDirective, typeof i3.JsonPathPipe, typeof i4.MngEnumPipe, typeof i5.MngBooleanPipe, typeof i6.MngI18nPropertyPipe, typeof i7.MngParametrizePipe, typeof i8.MngGetterPipe, typeof i9.MngTemplatePipe, typeof i10.MngClassMapPipe, typeof i11.MngEnumeratePipe, typeof i12.MngEnumerateAsyncPipe, typeof i13.MngLocaleDefaultRowClassPipe, typeof i14.MngBreadcrumbComponent, typeof i15.MngFooterComponent, typeof i16.MngMainLayoutComponent, typeof i17.MngMenuComponent, typeof i18.MngMenuItemComponent, typeof i19.MngTopbarComponent, typeof i20.MngVersionComponent, typeof i21.MngAutocompleteComponent, typeof i22.MngDropdownComponent, typeof i23.MngDateRangeComponent, typeof i24.MngFormlyFieldWrapperComponent, typeof i25.MngFormlyFieldNoLabelWrapperComponent, typeof i26.MngFormlyFieldInputComponent, typeof i27.MngFormlyFieldLabelComponent, typeof i28.MngFormlyFieldDropdownComponent, typeof i29.MngFormlyFieldAutocompleteComponent, typeof i30.MngFormlyFieldLookupDialogComponent, typeof i31.MngFormlyFieldTableDialogMultiselectComponent, typeof i32.MngFormlyFieldTableDialogFormComponent, typeof i33.MngFormlyFieldTabsComponent, typeof i34.MngFormlyFieldFieldsetComponent, typeof i35.MngFormlyFieldActionComponent, typeof i36.MngTableComponent, typeof i37.MngTableviewComponent, typeof i38.MngTableColumnValueComponent, typeof i39.MngTableColumnFilterComponent, typeof i40.MngTableviewRouteComponent, typeof i41.MngFormEditorComponent, typeof i42.MngActionComponent, typeof i43.MngActionEditorComponent, typeof i44.MngActionRouteComponent, typeof i45.MngDataLanguageDropdownComponent]>;
97
+ static ɵmod: i0.ɵɵNgModuleDeclaration<MngCommonsModule, [typeof i1.MngComponentDirective, typeof i2.MngTemplateDirective, typeof i3.JsonPathPipe, typeof i4.MngEnumPipe, typeof i5.MngBooleanPipe, typeof i6.MngI18nPropertyPipe, typeof i7.MngParametrizePipe, typeof i8.MngGetterPipe, typeof i9.MngTemplatePipe, typeof i10.MngClassMapPipe, typeof i11.MngEnumeratePipe, typeof i12.MngEnumerateAsyncPipe, typeof i13.MngLocaleDefaultRowClassPipe, typeof i14.MngBreadcrumbComponent, typeof i15.MngFooterComponent, typeof i16.MngMainLayoutComponent, typeof i17.MngMenuComponent, typeof i18.MngMenuItemComponent, typeof i19.MngTopbarComponent, typeof i20.MngVersionComponent, typeof i21.MngAutocompleteComponent, typeof i22.MngDropdownComponent, typeof i23.MngDateRangeComponent, typeof i24.MngFormlyFieldWrapperComponent, typeof i25.MngFormlyFieldNoLabelWrapperComponent, typeof i26.MngFormlyFieldInputComponent, typeof i27.MngFormlyFieldLabelComponent, typeof i28.MngFormlyFieldDropdownComponent, typeof i29.MngFormlyFieldAutocompleteComponent, typeof i30.MngFormlyFieldLookupDialogComponent, typeof i31.MngFormlyFieldTableDialogMultiselectComponent, typeof i32.MngFormlyFieldTableDialogFormComponent, typeof i33.MngFormlyFieldTabsComponent, typeof i34.MngFormlyFieldFieldsetComponent, typeof i35.MngFormlyFieldActionComponent, typeof i36.MngTableComponent, typeof i37.MngTableviewComponent, typeof i38.MngTableColumnValueComponent, typeof i39.MngTableColumnFilterComponent, typeof i40.MngTableviewRouteComponent, typeof i41.MngFormEditorComponent, typeof i42.MngActionComponent, typeof i43.MngActionEditorComponent, typeof i44.MngActionRouteComponent, typeof i45.MngDataLanguageDropdownComponent], [typeof i46.CommonModule, typeof i47.RouterModule, typeof i48.HttpClientModule, typeof i49.ReactiveFormsModule, typeof i50.TranslateModule, typeof i51.FormlyModule, typeof i52.AutoCompleteModule, typeof i53.BreadcrumbModule, typeof i54.ButtonModule, typeof i55.CalendarModule, typeof i56.CardModule, typeof i57.CheckboxModule, typeof i58.ChipModule, typeof i59.ConfirmDialogModule, typeof i60.ConfirmPopupModule, typeof i61.DialogModule, typeof i62.DynamicDialogModule, typeof i63.DropdownModule, typeof i64.FileUploadModule, typeof i65.InputNumberModule, typeof i66.InputMaskModule, typeof i67.InputSwitchModule, typeof i68.InputTextModule, typeof i69.InputTextareaModule, typeof i70.PaginatorModule, typeof i71.RadioButtonModule, typeof i72.RippleModule, typeof i73.SelectButtonModule, typeof i74.SplitButtonModule, typeof i75.TableModule, typeof i76.TagModule, typeof i77.ToastModule, typeof i78.ToggleButtonModule, typeof i79.ToolbarModule, typeof i80.TooltipModule, typeof i81.MessagesModule, typeof i82.ProgressSpinnerModule, typeof i83.TabViewModule, typeof i84.FieldsetModule, typeof i85.MultiSelectModule, typeof i86.SkeletonModule, typeof i87.SlideMenuModule, typeof i88.ImageModule], [typeof i52.AutoCompleteModule, typeof i53.BreadcrumbModule, typeof i54.ButtonModule, typeof i55.CalendarModule, typeof i56.CardModule, typeof i57.CheckboxModule, typeof i58.ChipModule, typeof i59.ConfirmDialogModule, typeof i60.ConfirmPopupModule, typeof i61.DialogModule, typeof i62.DynamicDialogModule, typeof i63.DropdownModule, typeof i64.FileUploadModule, typeof i65.InputNumberModule, typeof i66.InputMaskModule, typeof i67.InputSwitchModule, typeof i68.InputTextModule, typeof i69.InputTextareaModule, typeof i70.PaginatorModule, typeof i71.RadioButtonModule, typeof i72.RippleModule, typeof i73.SelectButtonModule, typeof i74.SplitButtonModule, typeof i75.TableModule, typeof i76.TagModule, typeof i77.ToastModule, typeof i78.ToggleButtonModule, typeof i79.ToolbarModule, typeof i80.TooltipModule, typeof i81.MessagesModule, typeof i82.ProgressSpinnerModule, typeof i83.TabViewModule, typeof i84.FieldsetModule, typeof i85.MultiSelectModule, typeof i86.SkeletonModule, typeof i87.SlideMenuModule, typeof i1.MngComponentDirective, typeof i2.MngTemplateDirective, typeof i3.JsonPathPipe, typeof i4.MngEnumPipe, typeof i5.MngBooleanPipe, typeof i6.MngI18nPropertyPipe, typeof i7.MngParametrizePipe, typeof i8.MngGetterPipe, typeof i9.MngTemplatePipe, typeof i10.MngClassMapPipe, typeof i11.MngEnumeratePipe, typeof i12.MngEnumerateAsyncPipe, typeof i13.MngLocaleDefaultRowClassPipe, typeof i14.MngBreadcrumbComponent, typeof i15.MngFooterComponent, typeof i16.MngMainLayoutComponent, typeof i17.MngMenuComponent, typeof i18.MngMenuItemComponent, typeof i19.MngTopbarComponent, typeof i20.MngVersionComponent, typeof i21.MngAutocompleteComponent, typeof i22.MngDropdownComponent, typeof i23.MngDateRangeComponent, typeof i24.MngFormlyFieldWrapperComponent, typeof i25.MngFormlyFieldNoLabelWrapperComponent, typeof i26.MngFormlyFieldInputComponent, typeof i27.MngFormlyFieldLabelComponent, typeof i28.MngFormlyFieldDropdownComponent, typeof i29.MngFormlyFieldAutocompleteComponent, typeof i30.MngFormlyFieldLookupDialogComponent, typeof i31.MngFormlyFieldTableDialogMultiselectComponent, typeof i32.MngFormlyFieldTableDialogFormComponent, typeof i33.MngFormlyFieldTabsComponent, typeof i34.MngFormlyFieldFieldsetComponent, typeof i35.MngFormlyFieldActionComponent, typeof i36.MngTableComponent, typeof i37.MngTableviewComponent, typeof i38.MngTableColumnValueComponent, typeof i39.MngTableColumnFilterComponent, typeof i40.MngTableviewRouteComponent, typeof i41.MngFormEditorComponent, typeof i42.MngActionComponent, typeof i43.MngActionEditorComponent, typeof i44.MngActionRouteComponent, typeof i45.MngDataLanguageDropdownComponent]>;
96
98
  static ɵinj: i0.ɵɵInjectorDeclaration<MngCommonsModule>;
97
99
  }
@@ -0,0 +1 @@
1
+ export declare type I18nType = 'returnNull' | 'returnFallbackKey' | 'returnFirstKey';
@@ -1,2 +1,3 @@
1
1
  export * from './type.decorator';
2
2
  export * from './type.model';
3
+ export * from './i18n.type';
@@ -0,0 +1,5 @@
1
+ import { TranslateService } from '@ngx-translate/core';
2
+ import { TableviewDescriptor } from '../descriptors';
3
+ export declare class ExportUtils {
4
+ static prepareDataForExport(pageData: any[], delimiter: string, descriptor: TableviewDescriptor<any>, translate: TranslateService): string;
5
+ }
@@ -3,6 +3,7 @@ import { Observable } from 'rxjs';
3
3
  import { ActionDescriptor, ActionEditorDescriptor, ModelDescriptor } from '../descriptors';
4
4
  import { MngError } from '../models';
5
5
  import { ClassType } from '../types';
6
+ import { I18nType } from '../types/i18n.type';
6
7
  export declare namespace I18nUtils {
7
8
  class Common {
8
9
  static getAsync(translate: TranslateService, params?: any, ...keys: Array<string>): Observable<string | null>;
@@ -40,8 +41,36 @@ export declare namespace I18nUtils {
40
41
  private static getKeysByPriority;
41
42
  }
42
43
  class Action {
43
- static get(translate: TranslateService, action: ActionDescriptor<any>, actionPathKeys: string | Array<string>, customKey?: string, item?: any, fallbackKey?: string, params?: any): string | null;
44
- static getAsync(translate: TranslateService, action: ActionDescriptor<any>, actionPathKeys: string | Array<string>, customKey?: string, item?: any, fallbackKey?: string, params?: any): Observable<string | null>;
44
+ /**
45
+ * Returns translation for action with given keys and params
46
+ * @param translate TranslateService
47
+ * @param action action descriptor
48
+ * @param actionPathKeys action path keys
49
+ * @param customKey custom key
50
+ * @param item
51
+ * @param fallbackKey fallback key
52
+ * @param params additional params for translation
53
+ * @param missingTranslationStrategy strategy when no translation is found
54
+ */
55
+ static get(translate: TranslateService, action: ActionDescriptor<any>, actionPathKeys: string | Array<string>, customKey?: string, item?: any, fallbackKey?: string, params?: any, missingTranslationStrategy?: I18nType): string | null;
56
+ /**
57
+ * Returns async translation for given keys with given params.
58
+ * @param translate TranslateService
59
+ * @param action action descriptor
60
+ * @param actionPathKeys action path keys
61
+ * @param customKey custom key
62
+ * @param item item
63
+ * @param fallbackKey fallback key, used as fallback key
64
+ * @param params additional params for translation
65
+ * @param missingTranslationStrategy strategy when no translation is found
66
+ */
67
+ static getAsync(translate: TranslateService, action: ActionDescriptor<any>, actionPathKeys: string | Array<string>, customKey?: string, item?: any, fallbackKey?: string, params?: any, missingTranslationStrategy?: I18nType): Observable<string | null>;
68
+ /**
69
+ * Returns translation depending on missingTranslationStrategy
70
+ * @param missingTranslationStrategy strategy when no translation is found
71
+ * @param values object with values, i18nValue is translation, firstKey is first key in array of keys, fallbackKey is fallback key
72
+ */
73
+ private static getTranslationDependingOnStrategy;
45
74
  static getTitleAsync(translate: TranslateService, action: ActionDescriptor<any>, item?: any): Observable<string | null>;
46
75
  static getEditorTitleAsync(translate: TranslateService, action: ActionEditorDescriptor<any>, item?: any): Observable<string | null>;
47
76
  static getParams(translate: TranslateService, action: ActionDescriptor<any>, item?: any, params?: any): any;
@@ -7,3 +7,4 @@ export * from './model.util';
7
7
  export * from './notification.util';
8
8
  export * from './string.util';
9
9
  export * from './type.util';
10
+ export * from './export.util';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mediusinc/mng-commons",
3
- "version": "1.3.0-1c14fa2b",
3
+ "version": "1.5.0-rc.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^14.1.0",
6
6
  "@angular/core": "^14.1.0",
@@ -29,7 +29,7 @@
29
29
  //Button
30
30
  @import './components/button/_button';
31
31
  // @import './components/button/_speeddial';
32
- // @import './components/button/_splitbutton';
32
+ @import './components/button/_splitbutton';
33
33
 
34
34
  //Data
35
35
  // @import './components/data/_carousel';
@@ -72,13 +72,13 @@
72
72
  // @import './components/menu/_contextmenu';
73
73
  @import './components/menu/_dock';
74
74
  // @import './components/menu/_megamenu';
75
- // @import './components/menu/_menu';
75
+ @import './components/menu/_menu';
76
76
  // @import './components/menu/_menubar';
77
77
  // @import './components/menu/_panelmenu';
78
- // @import './components/menu/_slidemenu';
78
+ @import './components/menu/_slidemenu';
79
79
  @import './components/menu/_steps';
80
80
  // @import './components/menu/_tabmenu';
81
- // @import './components/menu/_tieredmenu';
81
+ //@import './components/menu/_tieredmenu';
82
82
 
83
83
  //Messages
84
84
  // @import './components/messages/_inlinemessage';
@@ -4,3 +4,7 @@
4
4
  font-size: 0.875rem;
5
5
  }
6
6
  }
7
+
8
+ .p-slidemenu {
9
+ width: auto !important;
10
+ }
package/version-info.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@mediusinc/mng-commons",
3
- "version": "1.3.0-1c14fa2b",
4
- "tag": "v1.3.0",
3
+ "version": "1.5.0-rc.0",
4
+ "tag": "v1.5.0-rc.0",
5
5
  "distance": 0,
6
- "hash": "1c14fa2b",
7
- "dirty": true,
8
- "semver": "1.3.0+0.g1c14fa2b.dirty",
9
- "raw": "v1.3.0-1c14fa2b-dirty"
6
+ "hash": "fb79b1d0",
7
+ "dirty": false,
8
+ "semver": "1.5.0-rc.0",
9
+ "raw": "v1.5.0-rc.0-fb79b1d0"
10
10
  }