@mediusinc/mng-commons 0.19.2 → 0.20.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 (63) hide show
  1. package/assets/i18n/en.json +5 -1
  2. package/assets/i18n/sl.json +5 -1
  3. package/esm2020/lib/components/action/action.component.mjs +12 -5
  4. package/esm2020/lib/components/action/editor/action-editor.component.mjs +17 -5
  5. package/esm2020/lib/components/action/models/action-execution.model.mjs +5 -1
  6. package/esm2020/lib/components/action/route/action-route.component.mjs +7 -2
  7. package/esm2020/lib/components/form/formly/fields/formly-field-input/formly-field-input.component.mjs +64 -17
  8. package/esm2020/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.mjs +1 -1
  9. package/esm2020/lib/components/form/formly/formly.config.mjs +27 -1
  10. package/esm2020/lib/components/tableview/route/tableview-route.abstract.component.mjs +38 -5
  11. package/esm2020/lib/components/tableview/table/column-filter/column-filter.component.mjs +1 -1
  12. package/esm2020/lib/components/tableview/table/column-value/column-value.component.mjs +32 -23
  13. package/esm2020/lib/components/tableview/table/table.component.mjs +3 -3
  14. package/esm2020/lib/components/tableview/tableview.component.mjs +3 -3
  15. package/esm2020/lib/descriptors/column.descriptor.mjs +17 -12
  16. package/esm2020/lib/descriptors/editor.descriptor.mjs +2 -2
  17. package/esm2020/lib/descriptors/field-validation.descriptor.mjs +5 -1
  18. package/esm2020/lib/descriptors/field.descriptor.mjs +39 -4
  19. package/esm2020/lib/descriptors/table.descriptor.mjs +6 -5
  20. package/esm2020/lib/descriptors/tableview.descriptor.mjs +4 -4
  21. package/esm2020/lib/descriptors/types/column.type.mjs +18 -9
  22. package/esm2020/lib/descriptors/types/field.type.mjs +4 -2
  23. package/esm2020/lib/mng-commons.module.mjs +6 -4
  24. package/esm2020/lib/models/tableview-attr.model.mjs +1 -1
  25. package/esm2020/lib/models/view-container.model.mjs +1 -1
  26. package/esm2020/lib/router/tableview-route-builder.mjs +4 -1
  27. package/esm2020/lib/services/action-executor.service.mjs +23 -19
  28. package/esm2020/lib/services/commons.service.mjs +2 -2
  29. package/esm2020/lib/services/view-container.component.service.mjs +8 -1
  30. package/esm2020/lib/utils/editor-formly.util.mjs +6 -1
  31. package/esm2020/lib/utils/tableview.util.mjs +31 -15
  32. package/fesm2015/mediusinc-mng-commons.mjs +393 -155
  33. package/fesm2015/mediusinc-mng-commons.mjs.map +1 -1
  34. package/fesm2020/mediusinc-mng-commons.mjs +385 -150
  35. package/fesm2020/mediusinc-mng-commons.mjs.map +1 -1
  36. package/lib/components/action/action.component.d.ts +6 -3
  37. package/lib/components/action/editor/action-editor.component.d.ts +6 -0
  38. package/lib/components/action/models/action-execution.model.d.ts +2 -0
  39. package/lib/components/form/formly/fields/formly-field-input/formly-field-input.component.d.ts +7 -2
  40. package/lib/components/form/formly/formly.config.d.ts +2 -0
  41. package/lib/components/tableview/route/tableview-route.abstract.component.d.ts +5 -3
  42. package/lib/components/tableview/table/column-value/column-value.component.d.ts +15 -10
  43. package/lib/descriptors/column.descriptor.d.ts +4 -2
  44. package/lib/descriptors/field-validation.descriptor.d.ts +1 -0
  45. package/lib/descriptors/field.descriptor.d.ts +10 -2
  46. package/lib/descriptors/table.descriptor.d.ts +3 -3
  47. package/lib/descriptors/tableview.descriptor.d.ts +2 -2
  48. package/lib/descriptors/types/column.type.d.ts +16 -8
  49. package/lib/descriptors/types/field.type.d.ts +3 -1
  50. package/lib/mng-commons.module.d.ts +2 -1
  51. package/lib/models/tableview-attr.model.d.ts +2 -1
  52. package/lib/models/view-container.model.d.ts +6 -0
  53. package/lib/services/view-container.component.service.d.ts +4 -1
  54. package/lib/utils/tableview.util.d.ts +5 -4
  55. package/package.json +1 -1
  56. package/scss/common/theme/designer/_components.scss +1 -0
  57. package/scss/common/theme/designer/components/multimedia/_image.scss +44 -0
  58. package/scss/common/variables/theme/_theme_dark.scss +15 -1
  59. package/scss/common/variables/theme/_theme_light.scss +15 -1
  60. package/scss/mng-overrides/_theme_forms.scss +5 -0
  61. package/scss/mng-overrides/_theme_image.scss +27 -0
  62. package/scss/mng-overrides/_theme_styles.scss +1 -0
  63. package/version-info.json +5 -5
@@ -13,7 +13,7 @@ import { IdType } from '../../types';
13
13
  import { ActionData, ActionInstance, IActionConfirmationService } from './models';
14
14
  import * as i0 from "@angular/core";
15
15
  export declare class MngActionComponent<T, S> implements OnInit, OnChanges, OnDestroy, IActionConfirmationService {
16
- private route;
16
+ private routeService;
17
17
  private translate;
18
18
  private authorization;
19
19
  private actionExecutor;
@@ -27,6 +27,8 @@ export declare class MngActionComponent<T, S> implements OnInit, OnChanges, OnDe
27
27
  actionData?: ActionData;
28
28
  queryParam?: MediusQueryParam;
29
29
  dataProvider?: IDataProvider<T, S>;
30
+ hostComponent?: unknown;
31
+ routeInit?: ActivatedRoute;
30
32
  inputDisabled: Observable<boolean>;
31
33
  inputLoading: Observable<boolean>;
32
34
  viewContainerInit?: IViewContainer<T, S>;
@@ -54,9 +56,10 @@ export declare class MngActionComponent<T, S> implements OnInit, OnChanges, OnDe
54
56
  actionLink?: ActionLinkDescriptor<T>;
55
57
  hasNoTitle: boolean;
56
58
  private subscriptions;
59
+ route: ActivatedRoute;
57
60
  private routePermissions?;
58
61
  buttonClass: string;
59
- constructor(route: ActivatedRoute, translate: TranslateService, authorization: MngAuthorizationService, actionExecutor: MngActionExecutorService, confirmationService: ConfirmationService, viewContainerService: MngViewContainerComponentService<T, S> | null);
62
+ constructor(routeService: ActivatedRoute, translate: TranslateService, authorization: MngAuthorizationService, actionExecutor: MngActionExecutorService, confirmationService: ConfirmationService, viewContainerService: MngViewContainerComponentService<T, S> | null);
60
63
  ngOnInit(): void;
61
64
  ngOnChanges(changes: SimpleChanges): void;
62
65
  ngOnDestroy(): void;
@@ -65,5 +68,5 @@ export declare class MngActionComponent<T, S> implements OnInit, OnChanges, OnDe
65
68
  getConfirmationServiceInstanceKey(action: ActionDescriptor<any>): string;
66
69
  private processSubscriptions;
67
70
  static ɵfac: i0.ɵɵFactoryDeclaration<MngActionComponent<any, any>, [null, null, null, null, null, { optional: true; }]>;
68
- static ɵcmp: i0.ɵɵComponentDeclaration<MngActionComponent<any, any>, "mng-action", never, { "action": "action"; "item": "item"; "itemId": "itemId"; "actionData": "actionData"; "queryParam": "queryParam"; "dataProvider": "dataProvider"; "inputDisabled": "disabled"; "inputLoading": "loading"; "viewContainerInit": "viewContainer"; "selectedItems": "selectedItems"; }, { "finishEventEmitter": "finish"; }, never, never, false>;
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>;
69
72
  }
@@ -1,9 +1,11 @@
1
1
  import { ElementRef, EventEmitter, Injector, OnDestroy, OnInit, QueryList } from '@angular/core';
2
+ import { ActivatedRoute } from '@angular/router';
2
3
  import { TranslateService } from '@ngx-translate/core';
3
4
  import { DynamicDialogConfig, DynamicDialogRef } from 'primeng/dynamicdialog';
4
5
  import { Observable } from 'rxjs';
5
6
  import { IEditorDataProvider } from '../../../data-providers';
6
7
  import { ActionDescriptor, ActionEditorDescriptor } from '../../../descriptors';
8
+ import { ActionEditorSubmitTypeEnum } from '../../../descriptors/types';
7
9
  import { MngTemplateDirective } from '../../../directives';
8
10
  import { IViewContainer } from '../../../models';
9
11
  import { MngActionExecutorService, MngCommonsService, MngNavigationService, MngViewContainerComponentService } from '../../../services';
@@ -21,6 +23,8 @@ export declare class MngActionEditorComponent<T, S> implements OnInit, OnDestroy
21
23
  private dialogRef;
22
24
  private dialogConfig;
23
25
  private viewContainerService;
26
+ readonly actionEditorSubmitTypeSubmit = ActionEditorSubmitTypeEnum.Submit;
27
+ readonly actionDefaultLoadingInput: Observable<boolean>;
24
28
  action: ActionEditorDescriptor<T>;
25
29
  itemId?: IdType;
26
30
  item?: T;
@@ -42,10 +46,12 @@ export declare class MngActionEditorComponent<T, S> implements OnInit, OnDestroy
42
46
  footerRightActions: ActionDescriptor<T>[];
43
47
  private loadingSubject;
44
48
  loading$: Observable<boolean>;
49
+ private submitActionIdSubject;
45
50
  private submitLoadingSubject;
46
51
  submitLoading$: Observable<boolean>;
47
52
  private isFinished;
48
53
  viewContainer?: IViewContainer<T, S>;
54
+ dialogRoute?: ActivatedRoute;
49
55
  private sourceComponent;
50
56
  private subscriptions;
51
57
  constructor(injector: Injector, translate: TranslateService, actionExecutor: MngActionExecutorService, mngCommonsService: MngCommonsService, navigationService: MngNavigationService, dialogRef: DynamicDialogRef | null, dialogConfig: DynamicDialogConfig | null, viewContainerService: MngViewContainerComponentService<T, S> | null);
@@ -96,6 +96,7 @@ export declare class ActionParameters<T> {
96
96
  queryParam?: MediusQueryParam;
97
97
  viewContainer?: IViewContainer<T, unknown>;
98
98
  sourceComponent?: any;
99
+ hostComponent?: unknown;
99
100
  route?: ActivatedRoute;
100
101
  selectedItems: T[];
101
102
  constructor(itemId?: IdType | undefined, item?: T | undefined);
@@ -103,6 +104,7 @@ export declare class ActionParameters<T> {
103
104
  withQueryParam(queryParam?: MediusQueryParam): this;
104
105
  withViewContainer<S>(viewContainer?: IViewContainer<T, S>): this;
105
106
  withSourceComponent(sourceComponent?: any): this;
107
+ withHostComponent(hostComponent?: unknown): this;
106
108
  withRoute(route?: ActivatedRoute): this;
107
109
  withSelectedItems(selectedItems: T[]): this;
108
110
  }
@@ -1,23 +1,28 @@
1
1
  import { OnDestroy, OnInit } from '@angular/core';
2
- import { FormControl } from '@angular/forms';
2
+ import { FormArray, FormBuilder, FormControl } from '@angular/forms';
3
3
  import { FieldType } from '@ngx-formly/core';
4
4
  import { FieldInputDescriptor } from '../../../../../descriptors';
5
5
  import { MngFormlyFieldConfig } from '../../models';
6
6
  import * as i0 from "@angular/core";
7
7
  export declare class MngFormlyFieldInputComponent<ET> extends FieldType<MngFormlyFieldConfig> implements OnInit, OnDestroy {
8
8
  applicationLocale: string;
9
+ private formBuilder;
9
10
  iFormControl: FormControl;
10
11
  descriptor: FieldInputDescriptor<ET>;
11
12
  numberFieldMode: 'decimal' | 'currency';
12
13
  currency?: string;
13
14
  private files;
15
+ imageFormArray: FormArray;
14
16
  private subscriptions;
15
- constructor(applicationLocale: string);
17
+ constructor(applicationLocale: string, formBuilder: FormBuilder);
16
18
  ngOnInit(): void;
17
19
  ngOnDestroy(): void;
18
20
  onFileSelect(event: any): void;
19
21
  onFileRemove(event: any): void;
20
22
  onFileClear(event: Event): void;
23
+ addImageUrl(value?: string | null): void;
24
+ removeImageUrlAt(idx: number): void;
25
+ onImageUrlLoadError(idx: number, event: Event): void;
21
26
  private updateFileFormControl;
22
27
  static ɵfac: i0.ɵɵFactoryDeclaration<MngFormlyFieldInputComponent<any>, never>;
23
28
  static ɵcmp: i0.ɵɵComponentDeclaration<MngFormlyFieldInputComponent<any>, "mng-formly-field-input", never, {}, {}, never, never, false>;
@@ -7,6 +7,8 @@ export declare const formlyTypesConfig: MngFormlyTypeConfig[];
7
7
  export declare function getRequiredValidationMessage(translate: TranslateService): (error: any, field: MngFormlyFieldConfig) => Observable<string>;
8
8
  export declare function getMinLengthValidationMessage(translate: TranslateService): (error: any, field: MngFormlyFieldConfig) => Observable<string> | undefined;
9
9
  export declare function getMaxLengthValidationMessage(translate: TranslateService): (error: any, field: MngFormlyFieldConfig) => Observable<string> | undefined;
10
+ export declare function getMinValidationMessage(translate: TranslateService): (error: any, field: MngFormlyFieldConfig) => Observable<string> | undefined;
11
+ export declare function getMaxValidationMessage(translate: TranslateService): (error: any, field: MngFormlyFieldConfig) => Observable<string> | undefined;
10
12
  export declare function getTextPatternValidationMessage(translate: TranslateService): (error: any, field: MngFormlyFieldConfig) => Observable<string> | undefined;
11
13
  export declare function getEmailValidationMessage(translate: TranslateService): (error: any, field: MngFormlyFieldConfig) => Observable<string> | undefined;
12
14
  export declare const getFormlyValidationMessages: (translate: TranslateService) => any[];
@@ -1,7 +1,7 @@
1
1
  import { OnInit } from '@angular/core';
2
2
  import { ActivatedRoute } from '@angular/router';
3
3
  import { ITableviewDataProvider } from '../../../data-providers';
4
- import { ActionDeleteDescriptor, ActionDescriptor, ActionEditorAddDescriptor, ActionEditorDetailsDescriptor, ActionEditorEditDescriptor, EditorDescriptor, ModelDescriptor, TableviewDescriptor } from '../../../descriptors';
4
+ import { ActionDeleteDescriptor, ActionDescriptor, ActionEditorAddDescriptor, ActionEditorDetailsDescriptor, ActionEditorEditDescriptor, ActionLinkDescriptor, EditorDescriptor, ModelDescriptor, TableviewDescriptor } from '../../../descriptors';
5
5
  import { MngRouterData } from '../../../router/models';
6
6
  import * as i0 from "@angular/core";
7
7
  export declare abstract class AMngTableviewRouteComponent<T, S> implements OnInit {
@@ -18,9 +18,11 @@ export declare abstract class AMngTableviewRouteComponent<T, S> implements OnIni
18
18
  protected createActionDescriptorForDetails(descriptor?: EditorDescriptor<T>): ActionEditorDetailsDescriptor<T> | null;
19
19
  protected createActionDescriptorForAdd(descriptor?: EditorDescriptor<T>): ActionEditorAddDescriptor<T> | null;
20
20
  protected createActionDescriptorForEdit(descriptor?: EditorDescriptor<T>): ActionEditorEditDescriptor<T> | null;
21
+ protected createActionDescriptorForDetailsEditLink(descriptor?: ModelDescriptor<T>): ActionLinkDescriptor<T> | null;
22
+ protected createActionDescriptorForDetailsDelete(descriptor?: ModelDescriptor<T>): ActionDescriptor<T> | null;
21
23
  protected createActionDescriptorForDelete(descriptor?: ModelDescriptor<T>): ActionDeleteDescriptor<T> | null;
22
- protected createActionDescriptorForExport(descriptor?: ModelDescriptor<T>): ActionDescriptor<T>;
23
- protected createActionDescriptorForRefresh(descriptor?: ModelDescriptor<T>): ActionDescriptor<T>;
24
+ protected createActionDescriptorForExport(descriptor?: ModelDescriptor<T>): ActionDescriptor<T> | null;
25
+ protected createActionDescriptorForRefresh(descriptor?: ModelDescriptor<T>): ActionDescriptor<T> | null;
24
26
  static ɵfac: i0.ɵɵFactoryDeclaration<AMngTableviewRouteComponent<any, any>, never>;
25
27
  static ɵdir: i0.ɵɵDirectiveDeclaration<AMngTableviewRouteComponent<any, any>, never, never, {}, {}, never, never, false>;
26
28
  }
@@ -2,27 +2,32 @@ import { ElementRef, OnInit } from '@angular/core';
2
2
  import { TranslateService } from '@ngx-translate/core';
3
3
  import { MessageService } from 'primeng/api';
4
4
  import { ColumnDescriptor } from '../../../../descriptors';
5
- import { ColumnTypeEnum } from '../../../../descriptors/types';
5
+ import { ColumnDisplayTypeEnum } from '../../../../descriptors/types';
6
+ import { JsonPathPipe, MngGetterPipe, MngTemplatePipe } from '../../../../pipes';
6
7
  import * as i0 from "@angular/core";
7
8
  export declare class MngTableColumnValueComponent<T, TT> implements OnInit {
8
9
  private elementRef;
9
10
  private messageService;
10
11
  private translate;
11
- readonly columnTypeString: ColumnTypeEnum;
12
- readonly columnTypeNumber: ColumnTypeEnum;
13
- readonly columnTypeCurrency: ColumnTypeEnum;
14
- readonly columnTypeBoolean: ColumnTypeEnum;
15
- readonly columnTypeDate: ColumnTypeEnum;
16
- readonly columnTypeEnum: ColumnTypeEnum;
17
- readonly columnTypeCustom: ColumnTypeEnum;
18
- readonly columnTypeHtml: ColumnTypeEnum;
12
+ private jsonPathPipe;
13
+ private getterPipe;
14
+ private templatePipe;
15
+ readonly columnDisplayTypeString: ColumnDisplayTypeEnum;
16
+ readonly columnDisplayTypeNumber: ColumnDisplayTypeEnum;
17
+ readonly columnDisplayTypeCurrency: ColumnDisplayTypeEnum;
18
+ readonly columnDisplayTypeBoolean: ColumnDisplayTypeEnum;
19
+ readonly columnDisplayTypeDate: ColumnDisplayTypeEnum;
20
+ readonly columnDisplayTypeEnum: ColumnDisplayTypeEnum;
21
+ readonly columnDisplayTypeComponent: ColumnDisplayTypeEnum;
22
+ readonly columnDisplayTypeHtml: ColumnDisplayTypeEnum;
19
23
  descriptor: ColumnDescriptor<T, TT>;
20
24
  item: any;
21
25
  styleMaxWidth: number | null;
22
26
  className: string;
23
27
  currency?: string;
24
28
  jsonPath: string;
25
- constructor(elementRef: ElementRef, messageService: MessageService, translate: TranslateService);
29
+ value: any;
30
+ constructor(elementRef: ElementRef, messageService: MessageService, translate: TranslateService, jsonPathPipe: JsonPathPipe, getterPipe: MngGetterPipe, templatePipe: MngTemplatePipe);
26
31
  ngOnInit(): void;
27
32
  copyToClipboard(event: Event): void;
28
33
  static ɵfac: i0.ɵɵFactoryDeclaration<MngTableColumnValueComponent<any, any>, never>;
@@ -3,11 +3,12 @@ import { IColumnValueComponent } from '../models';
3
3
  import { ClassType, EnumConstantType, EnumType } from '../types';
4
4
  import { FilterDescriptor, FilterLookupDescriptor, FilterLookupEnumDescriptor } from './filter.descriptor';
5
5
  import { TableDescriptor, TableDynamicDescriptor } from './table.descriptor';
6
- import { ColumnTypeEnum } from './types';
6
+ import { ColumnDisplayTypeEnum, ColumnTypeEnum } from './types';
7
7
  export declare class ColumnDescriptor<T, TT> {
8
8
  protected readonly _table: TableDescriptor<TT>;
9
9
  protected readonly _property: string;
10
10
  private _columnType;
11
+ private _columnDisplayType;
11
12
  protected _title?: string;
12
13
  private _jsonPath?;
13
14
  private _isSortEnabled;
@@ -36,6 +37,7 @@ export declare class ColumnDescriptor<T, TT> {
36
37
  private _hasCopyToClipboard;
37
38
  constructor(table: TableDescriptor<TT>, property: string);
38
39
  get columnType(): ColumnTypeEnum;
40
+ get columnDisplayType(): ColumnDisplayTypeEnum;
39
41
  get title(): string | undefined;
40
42
  get jsonPath(): string | undefined;
41
43
  get isSortEnabled(): boolean;
@@ -69,7 +71,7 @@ export declare class ColumnDescriptor<T, TT> {
69
71
  * @param type column type enum
70
72
  * @param args any additional arguments for column (optional)
71
73
  */
72
- asType(type: ColumnTypeEnum, ...args: any[]): this;
74
+ asType(type: ColumnTypeEnum, displayType?: ColumnDisplayTypeEnum, ...args: any[]): this;
73
75
  asNumber(displayFormat?: string, locale?: string): this;
74
76
  asCurrency(currencyCode?: string, currencyFromProperty?: string, currencyDisplay?: 'symbol' | 'code' | 'name', displayFormat?: string, locale?: string): this;
75
77
  asDate(displayFormat?: string): this;
@@ -15,4 +15,5 @@ export declare class FieldValidationDescriptor {
15
15
  get options(): {
16
16
  errorPath: string;
17
17
  } | undefined;
18
+ copy(): FieldValidationDescriptor;
18
19
  }
@@ -89,12 +89,13 @@ export declare abstract class AFieldDescriptor<T, ET> extends AGenericFieldDescr
89
89
  get events$(): Observable<MngFormFieldEvent<T, ET>>;
90
90
  protected copyFieldsTo(obj: AFieldDescriptor<T, ET>): void;
91
91
  }
92
- export declare class FieldInputDescriptor<ET> extends AFieldDescriptor<string | number | boolean | Date | File | File[], ET> {
92
+ export declare class FieldInputDescriptor<ET> extends AFieldDescriptor<string | string[] | number | boolean | Date | File | File[], ET> {
93
93
  private _fieldType;
94
94
  private _rows?;
95
95
  private _numberMin?;
96
96
  private _numberMax?;
97
97
  private _numberStep?;
98
+ private _numberAutoCorrect;
98
99
  private _numberMinFractionDigits?;
99
100
  private _numberMaxFractionDigits?;
100
101
  private _numberUseGrouping;
@@ -117,6 +118,8 @@ export declare class FieldInputDescriptor<ET> extends AFieldDescriptor<string |
117
118
  private _fileMaxFileSize;
118
119
  private _fileAccept?;
119
120
  private _fileOnSelectHandler?;
121
+ private _imagePreview;
122
+ private _imageUrlInputHiddenOnDisabled;
120
123
  private _customComponentName?;
121
124
  constructor(editor: EditorDescriptor<ET>, property: string);
122
125
  /**
@@ -130,6 +133,7 @@ export declare class FieldInputDescriptor<ET> extends AFieldDescriptor<string |
130
133
  get numberMin(): number | undefined;
131
134
  get numberMax(): number | undefined;
132
135
  get numberStep(): number | undefined;
136
+ get numberAutoCorrect(): boolean;
133
137
  get numberMinFractionDigits(): number | undefined;
134
138
  get numberMaxFractionDigits(): number | undefined;
135
139
  get numberUseGrouping(): boolean;
@@ -148,6 +152,8 @@ export declare class FieldInputDescriptor<ET> extends AFieldDescriptor<string |
148
152
  get fileMaxFileSize(): number;
149
153
  get fileAccept(): string | undefined;
150
154
  get fileOnSelectHandler(): ((file: File[] | null, control: AbstractControl<any, any>) => void) | undefined;
155
+ get imagePreview(): boolean;
156
+ get imageUrlInputVisibleOnDisabled(): boolean;
151
157
  get customComponentName(): string | undefined;
152
158
  get locale(): string | undefined;
153
159
  get currency(): string | undefined;
@@ -165,8 +171,10 @@ export declare class FieldInputDescriptor<ET> extends AFieldDescriptor<string |
165
171
  asDatePicker(format?: string, min?: Date, max?: Date, showTime?: boolean, showSeconds?: boolean): this;
166
172
  asMask(mask: string, slotChar: string): this;
167
173
  asFile(multiple?: boolean, maxFileSize?: number, accept?: string): this;
174
+ asImageFile(multiple?: boolean, maxFileSize?: number, accept?: string): this;
175
+ asImageUrl(multiple?: boolean, preview?: boolean, inputVisibleOnDisabled?: boolean): this;
168
176
  asCustomComponent(customComponentName: string): this;
169
- withNumberValidation(min?: number, max?: number, step?: number): this;
177
+ withNumberValidation(min?: number, max?: number, step?: number, autoCorrect?: boolean): this;
170
178
  withLocale(locale: string): this;
171
179
  withNumberFractions(min?: number, max?: number): this;
172
180
  withNumberGrouping(useGrouping?: boolean): this;
@@ -6,7 +6,7 @@ import { TableviewAttributeDef } from '../models/tableview-attr.model';
6
6
  import { ClassType, EnumType } from '../types';
7
7
  import { ColumnDescriptor, ColumnDynamicDescriptor } from './column.descriptor';
8
8
  import { ModelDescriptor } from './model.descriptor';
9
- import { ColumnTypeEnum, TableDynamicColumnsModeEnum, TableFilterDisplayEnum, TablePaginationModeEnum, TableSizeEnum } from './types';
9
+ import { ColumnDisplayTypeEnum, ColumnTypeEnum, TableDynamicColumnsModeEnum, TableFilterDisplayEnum, TablePaginationModeEnum, TableSizeEnum } from './types';
10
10
  export declare class TableDescriptor<T> {
11
11
  private readonly _model;
12
12
  private _modelType;
@@ -108,7 +108,7 @@ export declare class TableDescriptor<T> {
108
108
  * @param columnType modified type
109
109
  * @param args additional attributes
110
110
  */
111
- withColumnModifiedType(property: string, columnType?: ColumnTypeEnum, ...args: any[]): this;
111
+ withColumnModifiedType(property: string, columnType?: ColumnTypeEnum, columnDisplayType?: ColumnDisplayTypeEnum, ...args: any[]): this;
112
112
  /**
113
113
  * defines custom enum type for column
114
114
  * @param property column name
@@ -156,7 +156,7 @@ export declare class TableDynamicDescriptor extends TableDescriptor<any> {
156
156
  * @param type custom type for column
157
157
  * @param args addition arguments for column
158
158
  */
159
- withColumnModifiedType(property: string, type: ColumnTypeEnum, ...args: any[]): this;
159
+ withColumnModifiedType(property: string, type: ColumnTypeEnum, displayType?: ColumnDisplayTypeEnum, ...args: any[]): this;
160
160
  /**
161
161
  * sets title to column with given property and returns this table
162
162
  * @param property column's property
@@ -5,7 +5,7 @@ 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, TableviewEditorTypeEnum } from './types';
8
+ import { ColumnDisplayTypeEnum, ColumnTypeEnum, FieldInputTypeEnum, TableviewEditorTypeEnum } from './types';
9
9
  export declare class TableviewDescriptor<T> {
10
10
  private readonly _model;
11
11
  private _modelType;
@@ -79,7 +79,7 @@ export declare class TableviewDescriptor<T> {
79
79
  * @param columnType required column type
80
80
  * @param fieldType optional, if not provided it is converted from column type
81
81
  */
82
- withModifiedType(property: string, columnType: ColumnTypeEnum, fieldType?: FieldInputTypeEnum): this;
82
+ withModifiedType(property: string, columnType: ColumnTypeEnum, fieldType?: FieldInputTypeEnum, columnDisplayType?: ColumnDisplayTypeEnum): this;
83
83
  /**
84
84
  * creates column with enum type
85
85
  * if fields exists, it is replaced
@@ -1,10 +1,18 @@
1
1
  export declare enum ColumnTypeEnum {
2
- String = 0,
3
- Number = 1,
4
- Currency = 2,
5
- Boolean = 3,
6
- Date = 4,
7
- Enum = 5,
8
- Custom = 6,
9
- Html = 7
2
+ String = "STRING",
3
+ Number = "NUMBER",
4
+ Boolean = "BOOLEAN",
5
+ Date = "DATE",
6
+ Enum = "ENUM",
7
+ Custom = "CUSTOM"
8
+ }
9
+ export declare enum ColumnDisplayTypeEnum {
10
+ String = "STRING",
11
+ Number = "NUMBER",
12
+ Currency = "CURRENCY",
13
+ Boolean = "BOOLEAN",
14
+ Date = "DATE",
15
+ Enum = "ENUM",
16
+ Component = "COMPONENT",
17
+ Html = "HTML"
10
18
  }
@@ -15,7 +15,9 @@ export declare enum FieldInputTypeEnum {
15
15
  Datepicker = 8,
16
16
  Mask = 9,
17
17
  File = 10,
18
- Custom = 11
18
+ ImageFile = 11,
19
+ ImageUrl = 12,
20
+ Custom = 13
19
21
  }
20
22
  export declare enum FieldLookupTypeEnum {
21
23
  Dropdown = 0,
@@ -85,10 +85,11 @@ import * as i80 from "primeng/tabview";
85
85
  import * as i81 from "primeng/fieldset";
86
86
  import * as i82 from "primeng/multiselect";
87
87
  import * as i83 from "primeng/skeleton";
88
+ import * as i84 from "primeng/image";
88
89
  export declare const primeNgModules: (typeof InputTextModule)[];
89
90
  export declare class MngCommonsModule {
90
91
  static forRoot(config: MngModuleConfig): ModuleWithProviders<MngCommonsModule>;
91
92
  static ɵfac: i0.ɵɵFactoryDeclaration<MngCommonsModule, never>;
92
- 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.MngBreadcrumbComponent, typeof i14.MngFooterComponent, typeof i15.MngMainLayoutComponent, typeof i16.MngMenuComponent, typeof i17.MngMenuItemComponent, typeof i18.MngTopbarComponent, typeof i19.MngVersionComponent, typeof i20.MngAutocompleteComponent, typeof i21.MngDropdownComponent, typeof i22.MngDateRangeComponent, typeof i23.MngFormlyFieldWrapperComponent, typeof i24.MngFormlyFieldNoLabelWrapperComponent, typeof i25.MngFormlyFieldInputComponent, typeof i26.MngFormlyFieldLabelComponent, typeof i27.MngFormlyFieldDropdownComponent, typeof i28.MngFormlyFieldAutocompleteComponent, typeof i29.MngFormlyFieldLookupDialogComponent, typeof i30.MngFormlyFieldTableDialogMultiselectComponent, typeof i31.MngFormlyFieldTableDialogFormComponent, typeof i32.MngFormlyFieldTabsComponent, typeof i33.MngFormlyFieldFieldsetComponent, typeof i34.MngFormlyFieldActionComponent, typeof i35.MngTableComponent, typeof i36.MngTableviewComponent, typeof i37.MngTableColumnValueComponent, typeof i38.MngTableColumnFilterComponent, typeof i39.MngTableviewRouteComponent, typeof i40.MngFormEditorComponent, typeof i41.MngActionComponent, typeof i42.MngActionEditorComponent, typeof i43.MngActionRouteComponent], [typeof i44.CommonModule, typeof i45.RouterModule, typeof i46.HttpClientModule, typeof i47.ReactiveFormsModule, typeof i48.TranslateModule, typeof i49.FormlyModule, typeof i50.AutoCompleteModule, typeof i51.BreadcrumbModule, typeof i52.ButtonModule, typeof i53.CalendarModule, typeof i54.CardModule, typeof i55.CheckboxModule, typeof i56.ChipModule, typeof i57.ConfirmDialogModule, typeof i58.ConfirmPopupModule, typeof i59.DialogModule, typeof i60.DynamicDialogModule, typeof i61.DropdownModule, typeof i62.FileUploadModule, typeof i63.InputNumberModule, typeof i64.InputMaskModule, typeof i65.InputSwitchModule, typeof i66.InputTextModule, typeof i67.InputTextareaModule, typeof i68.PaginatorModule, typeof i69.RadioButtonModule, typeof i70.RippleModule, typeof i71.SelectButtonModule, typeof i72.TableModule, typeof i73.TagModule, typeof i74.ToastModule, typeof i75.ToggleButtonModule, typeof i76.ToolbarModule, typeof i77.TooltipModule, typeof i78.MessagesModule, typeof i79.ProgressSpinnerModule, typeof i80.TabViewModule, typeof i81.FieldsetModule, typeof i82.MultiSelectModule, typeof i83.SkeletonModule], [typeof i50.AutoCompleteModule, typeof i51.BreadcrumbModule, typeof i52.ButtonModule, typeof i53.CalendarModule, typeof i54.CardModule, typeof i55.CheckboxModule, typeof i56.ChipModule, typeof i57.ConfirmDialogModule, typeof i58.ConfirmPopupModule, typeof i59.DialogModule, typeof i60.DynamicDialogModule, typeof i61.DropdownModule, typeof i62.FileUploadModule, typeof i63.InputNumberModule, typeof i64.InputMaskModule, typeof i65.InputSwitchModule, typeof i66.InputTextModule, typeof i67.InputTextareaModule, typeof i68.PaginatorModule, typeof i69.RadioButtonModule, typeof i70.RippleModule, typeof i71.SelectButtonModule, typeof i72.TableModule, typeof i73.TagModule, typeof i74.ToastModule, typeof i75.ToggleButtonModule, typeof i76.ToolbarModule, typeof i77.TooltipModule, typeof i78.MessagesModule, typeof i79.ProgressSpinnerModule, typeof i80.TabViewModule, typeof i81.FieldsetModule, typeof i82.MultiSelectModule, typeof i83.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.MngBreadcrumbComponent, typeof i14.MngFooterComponent, typeof i15.MngMainLayoutComponent, typeof i16.MngMenuComponent, typeof i17.MngMenuItemComponent, typeof i18.MngTopbarComponent, typeof i19.MngVersionComponent, typeof i20.MngAutocompleteComponent, typeof i21.MngDropdownComponent, typeof i22.MngDateRangeComponent, typeof i23.MngFormlyFieldWrapperComponent, typeof i24.MngFormlyFieldNoLabelWrapperComponent, typeof i25.MngFormlyFieldInputComponent, typeof i26.MngFormlyFieldLabelComponent, typeof i27.MngFormlyFieldDropdownComponent, typeof i28.MngFormlyFieldAutocompleteComponent, typeof i29.MngFormlyFieldLookupDialogComponent, typeof i30.MngFormlyFieldTableDialogMultiselectComponent, typeof i31.MngFormlyFieldTableDialogFormComponent, typeof i32.MngFormlyFieldTabsComponent, typeof i33.MngFormlyFieldFieldsetComponent, typeof i34.MngFormlyFieldActionComponent, typeof i35.MngTableComponent, typeof i36.MngTableviewComponent, typeof i37.MngTableColumnValueComponent, typeof i38.MngTableColumnFilterComponent, typeof i39.MngTableviewRouteComponent, typeof i40.MngFormEditorComponent, typeof i41.MngActionComponent, typeof i42.MngActionEditorComponent, typeof i43.MngActionRouteComponent]>;
93
+ 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.MngBreadcrumbComponent, typeof i14.MngFooterComponent, typeof i15.MngMainLayoutComponent, typeof i16.MngMenuComponent, typeof i17.MngMenuItemComponent, typeof i18.MngTopbarComponent, typeof i19.MngVersionComponent, typeof i20.MngAutocompleteComponent, typeof i21.MngDropdownComponent, typeof i22.MngDateRangeComponent, typeof i23.MngFormlyFieldWrapperComponent, typeof i24.MngFormlyFieldNoLabelWrapperComponent, typeof i25.MngFormlyFieldInputComponent, typeof i26.MngFormlyFieldLabelComponent, typeof i27.MngFormlyFieldDropdownComponent, typeof i28.MngFormlyFieldAutocompleteComponent, typeof i29.MngFormlyFieldLookupDialogComponent, typeof i30.MngFormlyFieldTableDialogMultiselectComponent, typeof i31.MngFormlyFieldTableDialogFormComponent, typeof i32.MngFormlyFieldTabsComponent, typeof i33.MngFormlyFieldFieldsetComponent, typeof i34.MngFormlyFieldActionComponent, typeof i35.MngTableComponent, typeof i36.MngTableviewComponent, typeof i37.MngTableColumnValueComponent, typeof i38.MngTableColumnFilterComponent, typeof i39.MngTableviewRouteComponent, typeof i40.MngFormEditorComponent, typeof i41.MngActionComponent, typeof i42.MngActionEditorComponent, typeof i43.MngActionRouteComponent], [typeof i44.CommonModule, typeof i45.RouterModule, typeof i46.HttpClientModule, typeof i47.ReactiveFormsModule, typeof i48.TranslateModule, typeof i49.FormlyModule, typeof i50.AutoCompleteModule, typeof i51.BreadcrumbModule, typeof i52.ButtonModule, typeof i53.CalendarModule, typeof i54.CardModule, typeof i55.CheckboxModule, typeof i56.ChipModule, typeof i57.ConfirmDialogModule, typeof i58.ConfirmPopupModule, typeof i59.DialogModule, typeof i60.DynamicDialogModule, typeof i61.DropdownModule, typeof i62.FileUploadModule, typeof i63.InputNumberModule, typeof i64.InputMaskModule, typeof i65.InputSwitchModule, typeof i66.InputTextModule, typeof i67.InputTextareaModule, typeof i68.PaginatorModule, typeof i69.RadioButtonModule, typeof i70.RippleModule, typeof i71.SelectButtonModule, typeof i72.TableModule, typeof i73.TagModule, typeof i74.ToastModule, typeof i75.ToggleButtonModule, typeof i76.ToolbarModule, typeof i77.TooltipModule, typeof i78.MessagesModule, typeof i79.ProgressSpinnerModule, typeof i80.TabViewModule, typeof i81.FieldsetModule, typeof i82.MultiSelectModule, typeof i83.SkeletonModule, typeof i84.ImageModule], [typeof i50.AutoCompleteModule, typeof i51.BreadcrumbModule, typeof i52.ButtonModule, typeof i53.CalendarModule, typeof i54.CardModule, typeof i55.CheckboxModule, typeof i56.ChipModule, typeof i57.ConfirmDialogModule, typeof i58.ConfirmPopupModule, typeof i59.DialogModule, typeof i60.DynamicDialogModule, typeof i61.DropdownModule, typeof i62.FileUploadModule, typeof i63.InputNumberModule, typeof i64.InputMaskModule, typeof i65.InputSwitchModule, typeof i66.InputTextModule, typeof i67.InputTextareaModule, typeof i68.PaginatorModule, typeof i69.RadioButtonModule, typeof i70.RippleModule, typeof i71.SelectButtonModule, typeof i72.TableModule, typeof i73.TagModule, typeof i74.ToastModule, typeof i75.ToggleButtonModule, typeof i76.ToolbarModule, typeof i77.TooltipModule, typeof i78.MessagesModule, typeof i79.ProgressSpinnerModule, typeof i80.TabViewModule, typeof i81.FieldsetModule, typeof i82.MultiSelectModule, typeof i83.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.MngBreadcrumbComponent, typeof i14.MngFooterComponent, typeof i15.MngMainLayoutComponent, typeof i16.MngMenuComponent, typeof i17.MngMenuItemComponent, typeof i18.MngTopbarComponent, typeof i19.MngVersionComponent, typeof i20.MngAutocompleteComponent, typeof i21.MngDropdownComponent, typeof i22.MngDateRangeComponent, typeof i23.MngFormlyFieldWrapperComponent, typeof i24.MngFormlyFieldNoLabelWrapperComponent, typeof i25.MngFormlyFieldInputComponent, typeof i26.MngFormlyFieldLabelComponent, typeof i27.MngFormlyFieldDropdownComponent, typeof i28.MngFormlyFieldAutocompleteComponent, typeof i29.MngFormlyFieldLookupDialogComponent, typeof i30.MngFormlyFieldTableDialogMultiselectComponent, typeof i31.MngFormlyFieldTableDialogFormComponent, typeof i32.MngFormlyFieldTabsComponent, typeof i33.MngFormlyFieldFieldsetComponent, typeof i34.MngFormlyFieldActionComponent, typeof i35.MngTableComponent, typeof i36.MngTableviewComponent, typeof i37.MngTableColumnValueComponent, typeof i38.MngTableColumnFilterComponent, typeof i39.MngTableviewRouteComponent, typeof i40.MngFormEditorComponent, typeof i41.MngActionComponent, typeof i42.MngActionEditorComponent, typeof i43.MngActionRouteComponent]>;
93
94
  static ɵinj: i0.ɵɵInjectorDeclaration<MngCommonsModule>;
94
95
  }
@@ -1,8 +1,9 @@
1
1
  import { AttributeDef } from '../api/models';
2
- import { ColumnTypeEnum, FieldInputTypeEnum } from '../descriptors/types';
2
+ import { ColumnDisplayTypeEnum, ColumnTypeEnum, FieldInputTypeEnum } from '../descriptors/types';
3
3
  import { ClassType, EnumType } from '../types';
4
4
  export interface TableviewAttributeDef extends AttributeDef {
5
5
  columnType: ColumnTypeEnum;
6
+ columnDisplayType: ColumnDisplayTypeEnum;
6
7
  fieldType?: FieldInputTypeEnum;
7
8
  enumType?: EnumType;
8
9
  classType?: ClassType<any>;
@@ -15,6 +15,8 @@ export interface IViewContainerTable<T, S> extends IViewContainer<T, S> {
15
15
  export interface IViewContainerEditor<T, S> extends IViewContainer<T, S> {
16
16
  getEditorReset$(): Observable<ViewContainerEditorResetEvent<T>>;
17
17
  resetEditor(event?: ViewContainerEditorResetEvent<T>): void;
18
+ getEditorClose$(): Observable<ViewContainerEditorCloseEvent<T>>;
19
+ closeEditor(event?: ViewContainerEditorCloseEvent<T>): void;
18
20
  }
19
21
  export interface ViewContainerTableReloadEvent {
20
22
  emitEvent?: boolean;
@@ -35,3 +37,7 @@ export interface ViewContainerEditorResetEvent<T> {
35
37
  [key: string]: any;
36
38
  };
37
39
  }
40
+ export interface ViewContainerEditorCloseEvent<T> {
41
+ emitEvent?: boolean;
42
+ item?: T;
43
+ }
@@ -2,7 +2,7 @@ import { MessageService } from 'primeng/api';
2
2
  import { Observable } from 'rxjs';
3
3
  import { IDataProvider } from '../data-providers';
4
4
  import { ActionDescriptor } from '../descriptors';
5
- import { IViewContainerEditor, IViewContainerTable, ViewContainerEditorResetEvent, ViewContainerTableReloadEvent } from '../models';
5
+ import { IViewContainerEditor, IViewContainerTable, ViewContainerEditorCloseEvent, ViewContainerEditorResetEvent, ViewContainerTableReloadEvent } from '../models';
6
6
  import * as i0 from "@angular/core";
7
7
  /**
8
8
  * Should be used with providers defined within component.
@@ -13,6 +13,7 @@ export declare class MngViewContainerComponentService<T, S> implements IViewCont
13
13
  private actions;
14
14
  private _tableReloadSubject;
15
15
  private _editorResetSubject;
16
+ private _editorCloseSubject;
16
17
  constructor(messageService: MessageService);
17
18
  set dataProvider(dataProvider: IDataProvider<T, S>);
18
19
  getMessageService(): MessageService;
@@ -23,6 +24,8 @@ export declare class MngViewContainerComponentService<T, S> implements IViewCont
23
24
  reloadTable(event?: ViewContainerTableReloadEvent): void;
24
25
  getEditorReset$(): Observable<ViewContainerEditorResetEvent<T>>;
25
26
  resetEditor(event?: ViewContainerEditorResetEvent<T> | undefined): void;
27
+ getEditorClose$(): Observable<ViewContainerEditorCloseEvent<T>>;
28
+ closeEditor(event?: ViewContainerEditorCloseEvent<T>): void;
26
29
  static ɵfac: i0.ɵɵFactoryDeclaration<MngViewContainerComponentService<any, any>, never>;
27
30
  static ɵprov: i0.ɵɵInjectableDeclaration<MngViewContainerComponentService<any, any>>;
28
31
  }
@@ -1,6 +1,6 @@
1
1
  import { AttributeDef } from '../api/models';
2
2
  import { ColumnDescriptor } from '../descriptors';
3
- import { ColumnTypeEnum, FieldInputTypeEnum } from '../descriptors/types';
3
+ import { ColumnDisplayTypeEnum, ColumnTypeEnum, FieldInputTypeEnum } from '../descriptors/types';
4
4
  import { TableviewAttributeDef } from '../models/tableview-attr.model';
5
5
  import { ClassType } from '../types';
6
6
  export declare class TableviewUtil {
@@ -23,9 +23,10 @@ export declare class TableviewUtil {
23
23
  static stringColumnConverter(column: ColumnDescriptor<any, any>, value: any): ColumnDescriptor<any, any>;
24
24
  /**
25
25
  * converts string type to column type enum, default is string
26
- * @param property
26
+ * @param propertyType
27
27
  */
28
- static toColumnType(property: string): ColumnTypeEnum;
28
+ static toColumnType(propertyType: string): ColumnTypeEnum;
29
+ static toColumnDisplayType(columnType: ColumnTypeEnum, propertyType: string): ColumnDisplayTypeEnum;
29
30
  /**
30
31
  * converts string type to type enum, default is text
31
32
  * @param property
@@ -35,5 +36,5 @@ export declare class TableviewUtil {
35
36
  * convert column type to equivalent field input type
36
37
  * @param type column type
37
38
  */
38
- static toFieldInputTypeFromColumnType(type: ColumnTypeEnum): FieldInputTypeEnum;
39
+ static toFieldInputTypeFromColumnType(type: ColumnTypeEnum, displayType?: ColumnDisplayTypeEnum): FieldInputTypeEnum;
39
40
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mediusinc/mng-commons",
3
- "version": "0.19.2",
3
+ "version": "0.20.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^14.1.0",
6
6
  "@angular/core": "^14.1.0",
@@ -87,6 +87,7 @@
87
87
 
88
88
  //MultiMedia
89
89
  // @import './components/multimedia/_galleria';
90
+ @import './components/multimedia/_image';
90
91
 
91
92
  //Misc
92
93
  // @import './components/misc/_avatar';
@@ -0,0 +1,44 @@
1
+ .p-image-mask {
2
+ --maskbg: #{$imageMaskBg};
3
+ }
4
+
5
+ .p-image-preview-indicator {
6
+ background-color: transparent;
7
+ color: $imagePreviewIndicatorColor;
8
+ transition: $actionIconTransition;
9
+ }
10
+
11
+ .p-image-preview-container {
12
+ &:hover {
13
+ > .p-image-preview-indicator {
14
+ background-color: $imagePreviewIndicatorBg;
15
+ }
16
+ }
17
+ }
18
+
19
+ .p-image-toolbar {
20
+ padding: $imagePreviewToolbarPadding;
21
+ }
22
+
23
+ .p-image-action.p-link {
24
+ color: $imagePreviewActionIconColor;
25
+ background-color: $imagePreviewActionIconBg;
26
+ width: $imagePreviewActionIconWidth;
27
+ height: $imagePreviewActionIconHeight;
28
+ border-radius: $imagePreviewActionIconBorderRadius;
29
+ transition: $actionIconTransition;
30
+ margin-right: $inlineSpacing;
31
+
32
+ &:last-child {
33
+ margin-right: 0;
34
+ }
35
+
36
+ &:hover {
37
+ color: $imagePreviewActionIconHoverColor;
38
+ background-color: $imagePreviewActionIconHoverBg;
39
+ }
40
+
41
+ i {
42
+ font-size: $imagePreviewActionIconFontSize;
43
+ }
44
+ }
@@ -38,7 +38,7 @@ $primeIconFontSize: 1rem !default;
38
38
  $divider: 1px solid $shade500 !default;
39
39
  $inlineSpacing: 0.5rem !default; //spacing between inline elements
40
40
  $disabledOpacity: 0.4 !default; //opacity of a disabled item
41
- $maskBg: rgba(0, 0, 0, 0.05) !default; //modal mask bg color
41
+ $maskBg: rgba(0, 0, 0, 0.4) !default; //modal mask bg color
42
42
  $loadingIconFontSize: 2rem !default;
43
43
  $errorColor: #fc6161 !default;
44
44
 
@@ -869,6 +869,20 @@ $dockBorder: 1px solid rgba(255, 255, 255, 0.2) !default;
869
869
  $dockPadding: 0.5rem 0.5rem !default;
870
870
  $dockBorderRadius: 0.5rem !default;
871
871
 
872
+ //image
873
+ $imageMaskBg: rgba(0, 0, 0, 0.9) !default;
874
+ $imagePreviewToolbarPadding: 1rem !default;
875
+ $imagePreviewIndicatorColor: #f8f9fa !default;
876
+ $imagePreviewIndicatorBg: rgba(0, 0, 0, 0.5) !default;
877
+ $imagePreviewActionIconBg: transparent !default;
878
+ $imagePreviewActionIconColor: #f8f9fa !default;
879
+ $imagePreviewActionIconHoverBg: rgba(255, 255, 255, 0.1) !default;
880
+ $imagePreviewActionIconHoverColor: #f8f9fa !default;
881
+ $imagePreviewActionIconWidth: 3rem !default;
882
+ $imagePreviewActionIconHeight: 3rem !default;
883
+ $imagePreviewActionIconFontSize: 1.5rem !default;
884
+ $imagePreviewActionIconBorderRadius: 50% !default;
885
+
872
886
  :root {
873
887
  --surface-a: #{$shade200};
874
888
  --surface-b: #{$shade500};
@@ -38,7 +38,7 @@ $primeIconFontSize: 1rem !default;
38
38
  $divider: 1px solid $shade300 !default;
39
39
  $inlineSpacing: 0.5rem !default;
40
40
  $disabledOpacity: 0.6 !default;
41
- $maskBg: rgba(0, 0, 0, 0.05) !default;
41
+ $maskBg: rgba(0, 0, 0, 0.4) !default;
42
42
  $loadingIconFontSize: 2rem !default;
43
43
  $errorColor: #fc6161 !default;
44
44
 
@@ -870,6 +870,20 @@ $dockBorder: 1px solid rgba(255, 255, 255, 0.2) !default;
870
870
  $dockPadding: 0.5rem 0.5rem !default;
871
871
  $dockBorderRadius: 0.5rem !default;
872
872
 
873
+ //image
874
+ $imageMaskBg: rgba(0, 0, 0, 0.9) !default;
875
+ $imagePreviewToolbarPadding: 1rem !default;
876
+ $imagePreviewIndicatorColor: #f8f9fa !default;
877
+ $imagePreviewIndicatorBg: rgba(0, 0, 0, 0.5) !default;
878
+ $imagePreviewActionIconBg: transparent !default;
879
+ $imagePreviewActionIconColor: #f8f9fa !default;
880
+ $imagePreviewActionIconHoverBg: rgba(255, 255, 255, 0.1) !default;
881
+ $imagePreviewActionIconHoverColor: #f8f9fa !default;
882
+ $imagePreviewActionIconWidth: 3rem !default;
883
+ $imagePreviewActionIconHeight: 3rem !default;
884
+ $imagePreviewActionIconFontSize: 1.5rem !default;
885
+ $imagePreviewActionIconBorderRadius: 50% !default;
886
+
873
887
  :root {
874
888
  --surface-a: #{$shade000};
875
889
  --surface-b: #{$shade100};
@@ -6,6 +6,11 @@ form {
6
6
  flex-grow: 0;
7
7
  flex-shrink: 0;
8
8
  width: 50px;
9
+ padding: 0;
10
+
11
+ img {
12
+ max-width: 100%;
13
+ }
9
14
  }
10
15
 
11
16
  .p-fileupload-row .p-button {