@mediusinc/mng-commons 0.19.3 → 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.
- package/assets/i18n/en.json +5 -1
- package/assets/i18n/sl.json +5 -1
- package/esm2020/lib/components/action/editor/action-editor.component.mjs +6 -3
- package/esm2020/lib/components/form/formly/fields/formly-field-input/formly-field-input.component.mjs +64 -17
- package/esm2020/lib/components/form/formly/formly.config.mjs +27 -1
- package/esm2020/lib/components/tableview/table/column-value/column-value.component.mjs +32 -23
- package/esm2020/lib/descriptors/column.descriptor.mjs +17 -12
- package/esm2020/lib/descriptors/editor.descriptor.mjs +2 -2
- package/esm2020/lib/descriptors/field.descriptor.mjs +35 -2
- package/esm2020/lib/descriptors/table.descriptor.mjs +6 -5
- package/esm2020/lib/descriptors/tableview.descriptor.mjs +4 -4
- package/esm2020/lib/descriptors/types/column.type.mjs +18 -9
- package/esm2020/lib/descriptors/types/field.type.mjs +4 -2
- package/esm2020/lib/mng-commons.module.mjs +6 -4
- package/esm2020/lib/models/tableview-attr.model.mjs +1 -1
- package/esm2020/lib/models/view-container.model.mjs +1 -1
- package/esm2020/lib/services/commons.service.mjs +2 -2
- package/esm2020/lib/utils/editor-formly.util.mjs +6 -1
- package/esm2020/lib/utils/tableview.util.mjs +31 -15
- package/fesm2015/mediusinc-mng-commons.mjs +279 -121
- package/fesm2015/mediusinc-mng-commons.mjs.map +1 -1
- package/fesm2020/mediusinc-mng-commons.mjs +278 -121
- package/fesm2020/mediusinc-mng-commons.mjs.map +1 -1
- package/lib/components/action/editor/action-editor.component.d.ts +4 -0
- package/lib/components/form/formly/fields/formly-field-input/formly-field-input.component.d.ts +7 -2
- package/lib/components/form/formly/formly.config.d.ts +2 -0
- package/lib/components/tableview/table/column-value/column-value.component.d.ts +15 -10
- package/lib/descriptors/column.descriptor.d.ts +4 -2
- package/lib/descriptors/field.descriptor.d.ts +10 -2
- package/lib/descriptors/table.descriptor.d.ts +3 -3
- package/lib/descriptors/tableview.descriptor.d.ts +2 -2
- package/lib/descriptors/types/column.type.d.ts +16 -8
- package/lib/descriptors/types/field.type.d.ts +3 -1
- package/lib/mng-commons.module.d.ts +2 -1
- package/lib/models/tableview-attr.model.d.ts +2 -1
- package/lib/models/view-container.model.d.ts +1 -0
- package/lib/utils/tableview.util.d.ts +5 -4
- package/package.json +1 -1
- package/scss/common/theme/designer/_components.scss +1 -0
- package/scss/common/theme/designer/components/multimedia/_image.scss +44 -0
- package/scss/common/variables/theme/_theme_dark.scss +15 -1
- package/scss/common/variables/theme/_theme_light.scss +15 -1
- package/scss/mng-overrides/_theme_forms.scss +5 -0
- package/scss/mng-overrides/_theme_image.scss +27 -0
- package/scss/mng-overrides/_theme_styles.scss +1 -0
- package/version-info.json +5 -5
|
@@ -5,6 +5,7 @@ import { DynamicDialogConfig, DynamicDialogRef } from 'primeng/dynamicdialog';
|
|
|
5
5
|
import { Observable } from 'rxjs';
|
|
6
6
|
import { IEditorDataProvider } from '../../../data-providers';
|
|
7
7
|
import { ActionDescriptor, ActionEditorDescriptor } from '../../../descriptors';
|
|
8
|
+
import { ActionEditorSubmitTypeEnum } from '../../../descriptors/types';
|
|
8
9
|
import { MngTemplateDirective } from '../../../directives';
|
|
9
10
|
import { IViewContainer } from '../../../models';
|
|
10
11
|
import { MngActionExecutorService, MngCommonsService, MngNavigationService, MngViewContainerComponentService } from '../../../services';
|
|
@@ -22,6 +23,8 @@ export declare class MngActionEditorComponent<T, S> implements OnInit, OnDestroy
|
|
|
22
23
|
private dialogRef;
|
|
23
24
|
private dialogConfig;
|
|
24
25
|
private viewContainerService;
|
|
26
|
+
readonly actionEditorSubmitTypeSubmit = ActionEditorSubmitTypeEnum.Submit;
|
|
27
|
+
readonly actionDefaultLoadingInput: Observable<boolean>;
|
|
25
28
|
action: ActionEditorDescriptor<T>;
|
|
26
29
|
itemId?: IdType;
|
|
27
30
|
item?: T;
|
|
@@ -43,6 +46,7 @@ export declare class MngActionEditorComponent<T, S> implements OnInit, OnDestroy
|
|
|
43
46
|
footerRightActions: ActionDescriptor<T>[];
|
|
44
47
|
private loadingSubject;
|
|
45
48
|
loading$: Observable<boolean>;
|
|
49
|
+
private submitActionIdSubject;
|
|
46
50
|
private submitLoadingSubject;
|
|
47
51
|
submitLoading$: Observable<boolean>;
|
|
48
52
|
private isFinished;
|
package/lib/components/form/formly/fields/formly-field-input/formly-field-input.component.d.ts
CHANGED
|
@@ -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[];
|
|
@@ -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 {
|
|
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
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
readonly
|
|
15
|
-
readonly
|
|
16
|
-
readonly
|
|
17
|
-
readonly
|
|
18
|
-
readonly
|
|
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
|
-
|
|
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;
|
|
@@ -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 =
|
|
3
|
-
Number =
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
}
|
|
@@ -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>;
|
|
@@ -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
|
|
26
|
+
* @param propertyType
|
|
27
27
|
*/
|
|
28
|
-
static toColumnType(
|
|
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
|
@@ -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.
|
|
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.
|
|
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};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
.mng-image {
|
|
2
|
+
&.p-image-preview-container {
|
|
3
|
+
height: 150px;
|
|
4
|
+
|
|
5
|
+
img {
|
|
6
|
+
max-height: 100%;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
&.no-image {
|
|
10
|
+
width: 150px;
|
|
11
|
+
|
|
12
|
+
.p-image-preview-indicator {
|
|
13
|
+
background-color: $imagePreviewIndicatorBg;
|
|
14
|
+
height: 100%;
|
|
15
|
+
opacity: 1;
|
|
16
|
+
cursor: default;
|
|
17
|
+
display: flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
justify-content: center;
|
|
20
|
+
|
|
21
|
+
.p-image-preview-icon {
|
|
22
|
+
font-size: 1.5rem;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
package/version-info.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mediusinc/mng-commons",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"tag": "v0.
|
|
3
|
+
"version": "0.20.0",
|
|
4
|
+
"tag": "v0.20.0",
|
|
5
5
|
"distance": 0,
|
|
6
|
-
"hash": "
|
|
6
|
+
"hash": "f845527c",
|
|
7
7
|
"dirty": false,
|
|
8
|
-
"semver": "0.
|
|
9
|
-
"raw": "v0.
|
|
8
|
+
"semver": "0.20.0",
|
|
9
|
+
"raw": "v0.20.0-f845527c"
|
|
10
10
|
}
|