@mediusinc/mng-commons 0.3.2 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/i18n/en.json +1 -1
- package/assets/i18n/sl.json +1 -1
- package/esm2020/lib/api/models/builders/query-param.builder.mjs +7 -2
- package/esm2020/lib/api/services/api.abstract.service.mjs +21 -10
- package/esm2020/lib/api/utils/object-serializer.util.mjs +7 -1
- package/esm2020/lib/components/action/action.component.mjs +3 -3
- package/esm2020/lib/components/action/editor/action-editor.component.mjs +3 -3
- package/esm2020/lib/components/form/autocomplete/autocomplete.component.mjs +186 -32
- package/esm2020/lib/components/form/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.mjs +1 -1
- package/esm2020/lib/components/form/formly/fields/formly-field-input/formly-field-input.component.mjs +3 -3
- package/esm2020/lib/components/form/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.mjs +8 -8
- package/esm2020/lib/components/layout/main-layout.component.mjs +1 -1
- package/esm2020/lib/components/layout/topbar.component.mjs +1 -1
- package/esm2020/lib/components/tableview/route/tableview-route.abstract.component.mjs +17 -5
- package/esm2020/lib/components/tableview/table/column-filter/column-filter.component.mjs +9 -23
- package/esm2020/lib/components/tableview/table/column-value/column-value.component.mjs +21 -7
- package/esm2020/lib/components/tableview/table/table.component.mjs +3 -3
- package/esm2020/lib/components/tableview/tableview.component.mjs +3 -3
- package/esm2020/lib/descriptors/column.descriptor.mjs +197 -0
- package/esm2020/lib/descriptors/editor.descriptor.mjs +3 -734
- package/esm2020/lib/descriptors/field.descriptor.interface.mjs +2 -0
- package/esm2020/lib/descriptors/field.descriptor.mjs +755 -0
- package/esm2020/lib/descriptors/filter.descriptor.mjs +237 -0
- package/esm2020/lib/descriptors/index.mjs +5 -1
- package/esm2020/lib/descriptors/table.descriptor.mjs +4 -385
- package/esm2020/lib/descriptors/tableview.descriptor.mjs +3 -3
- package/esm2020/lib/directives/component.directive.mjs +18 -2
- package/esm2020/lib/mng-commons.module.mjs +5 -5
- package/esm2020/lib/models/column-value.model.mjs +2 -0
- package/esm2020/lib/models/index.mjs +2 -1
- package/esm2020/lib/pipes/index.mjs +2 -2
- package/esm2020/lib/pipes/json-path.pipe.mjs +80 -0
- package/esm2020/lib/pipes/link-formatter.pipe.mjs +1 -1
- package/esm2020/lib/services/action-executor.service.mjs +1 -1
- package/esm2020/lib/utils/model.util.mjs +16 -15
- package/esm2020/public-api.mjs +2 -1
- package/fesm2015/mediusinc-mng-commons.mjs +1671 -1348
- package/fesm2015/mediusinc-mng-commons.mjs.map +1 -1
- package/fesm2020/mediusinc-mng-commons.mjs +1648 -1329
- package/fesm2020/mediusinc-mng-commons.mjs.map +1 -1
- package/lib/api/models/builders/query-param.builder.d.ts +2 -1
- package/lib/api/services/api.abstract.service.d.ts +10 -5
- package/lib/api/utils/object-serializer.util.d.ts +4 -2
- package/lib/components/form/autocomplete/autocomplete.component.d.ts +20 -5
- package/lib/components/form/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.d.ts +1 -2
- package/lib/components/tableview/route/tableview-route.abstract.component.d.ts +5 -1
- package/lib/components/tableview/table/column-filter/column-filter.component.d.ts +1 -0
- package/lib/components/tableview/table/column-value/column-value.component.d.ts +5 -1
- package/lib/descriptors/column.descriptor.d.ts +66 -0
- package/lib/descriptors/editor.descriptor.d.ts +1 -292
- package/lib/descriptors/field.descriptor.d.ts +301 -0
- package/lib/descriptors/{editor.descriptor.interface.d.ts → field.descriptor.interface.d.ts} +0 -0
- package/lib/descriptors/filter.descriptor.d.ts +108 -0
- package/lib/descriptors/index.d.ts +4 -0
- package/lib/descriptors/table.descriptor.d.ts +5 -159
- package/lib/descriptors/tableview.descriptor.d.ts +4 -2
- package/lib/directives/component.directive.d.ts +5 -1
- package/lib/mng-commons.module.d.ts +2 -2
- package/lib/models/column-value.model.d.ts +4 -0
- package/lib/models/index.d.ts +1 -0
- package/lib/pipes/index.d.ts +1 -1
- package/lib/pipes/json-path.pipe.d.ts +13 -0
- package/lib/pipes/link-formatter.pipe.d.ts +1 -1
- package/lib/services/action-executor.service.d.ts +1 -1
- package/lib/utils/model.util.d.ts +1 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/scss/mng-overrides/_layout_action.scss +7 -0
- package/scss/mng-overrides/_layout_dialog.scss +17 -6
- package/scss/mng-overrides/_mixins.scss +60 -0
- package/scss/theme/default/_mng-variables-theme-dark.scss +2 -3
- package/scss/theme/default/_mng-variables-theme-light.scss +2 -3
- package/scss/theme/default/_mng-variables.scss +12 -0
- package/esm2020/lib/descriptors/editor.descriptor.interface.mjs +0 -2
- package/esm2020/lib/pipes/property-path.pipe.mjs +0 -36
- package/lib/pipes/property-path.pipe.d.ts +0 -7
|
@@ -4,7 +4,7 @@ import { MngModuleConfig } from './config/models';
|
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
import * as i1 from "./directives/component.directive";
|
|
6
6
|
import * as i2 from "./directives/template.directive";
|
|
7
|
-
import * as i3 from "./pipes/
|
|
7
|
+
import * as i3 from "./pipes/json-path.pipe";
|
|
8
8
|
import * as i4 from "./pipes/enum.pipe";
|
|
9
9
|
import * as i5 from "./pipes/boolean.pipe";
|
|
10
10
|
import * as i6 from "./pipes/i18n-property.pipe";
|
|
@@ -80,6 +80,6 @@ export declare const primeNgModules: (typeof InputTextModule)[];
|
|
|
80
80
|
export declare class MngCommonsModule {
|
|
81
81
|
static forRoot(config: MngModuleConfig): ModuleWithProviders<MngCommonsModule>;
|
|
82
82
|
static ɵfac: i0.ɵɵFactoryDeclaration<MngCommonsModule, never>;
|
|
83
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<MngCommonsModule, [typeof i1.MngComponentDirective, typeof i2.MngTemplateDirective, typeof i3.
|
|
83
|
+
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.MngLinkFormatterPipe, typeof i8.MngBreadcrumbComponent, typeof i9.MngFooterComponent, typeof i10.MngMainLayoutComponent, typeof i11.MngMenuComponent, typeof i12.MngMenuItemComponent, typeof i13.MngTopbarComponent, typeof i14.MngAutocompleteComponent, typeof i15.MngDropdownComponent, typeof i16.MngFormlyFieldWrapperComponent, typeof i17.MngFormlyTableWrapperComponent, typeof i18.MngFormlyFieldInputComponent, typeof i19.MngFormlyFieldDropdownComponent, typeof i20.MngFormlyFieldAutocompleteComponent, typeof i21.MngFormlyFieldLookupDialogComponent, typeof i22.MngFormlyFieldTableDialogMultiselectComponent, typeof i23.MngFormlyFieldTableDialogFormComponent, typeof i24.MngFormlyFieldTabsComponent, typeof i25.MngFormlyFieldFieldsetComponent, typeof i26.MngTableComponent, typeof i27.MngTableviewComponent, typeof i28.MngTableColumnValueComponent, typeof i29.MngTableColumnFilterComponent, typeof i30.MngTableviewRouteComponent, typeof i31.MngFormEditorComponent, typeof i32.MngActionComponent, typeof i33.MngActionEditorComponent, typeof i34.MngActionRouteComponent], [typeof i35.CommonModule, typeof i36.RouterModule, typeof i37.HttpClientModule, typeof i38.ReactiveFormsModule, typeof i39.TranslateModule, typeof i40.FormlyModule, typeof i41.AutoCompleteModule, typeof i42.BreadcrumbModule, typeof i43.ButtonModule, typeof i44.CalendarModule, typeof i45.CardModule, typeof i46.CheckboxModule, typeof i47.ChipModule, typeof i48.ConfirmDialogModule, typeof i49.ConfirmPopupModule, typeof i50.DialogModule, typeof i51.DynamicDialogModule, typeof i52.DropdownModule, typeof i53.FileUploadModule, typeof i54.InputNumberModule, typeof i55.InputMaskModule, typeof i56.InputSwitchModule, typeof i57.InputTextModule, typeof i58.InputTextareaModule, typeof i59.PaginatorModule, typeof i60.RadioButtonModule, typeof i61.RippleModule, typeof i62.SelectButtonModule, typeof i63.TableModule, typeof i64.TagModule, typeof i65.ToastModule, typeof i66.ToggleButtonModule, typeof i67.ToolbarModule, typeof i68.TooltipModule, typeof i69.MessagesModule, typeof i70.ProgressSpinnerModule, typeof i71.TabViewModule, typeof i72.FieldsetModule, typeof i73.MultiSelectModule, typeof i74.SkeletonModule], [typeof i41.AutoCompleteModule, typeof i42.BreadcrumbModule, typeof i43.ButtonModule, typeof i44.CalendarModule, typeof i45.CardModule, typeof i46.CheckboxModule, typeof i47.ChipModule, typeof i48.ConfirmDialogModule, typeof i49.ConfirmPopupModule, typeof i50.DialogModule, typeof i51.DynamicDialogModule, typeof i52.DropdownModule, typeof i53.FileUploadModule, typeof i54.InputNumberModule, typeof i55.InputMaskModule, typeof i56.InputSwitchModule, typeof i57.InputTextModule, typeof i58.InputTextareaModule, typeof i59.PaginatorModule, typeof i60.RadioButtonModule, typeof i61.RippleModule, typeof i62.SelectButtonModule, typeof i63.TableModule, typeof i64.TagModule, typeof i65.ToastModule, typeof i66.ToggleButtonModule, typeof i67.ToolbarModule, typeof i68.TooltipModule, typeof i69.MessagesModule, typeof i70.ProgressSpinnerModule, typeof i71.TabViewModule, typeof i72.FieldsetModule, typeof i73.MultiSelectModule, typeof i74.SkeletonModule, typeof i1.MngComponentDirective, typeof i2.MngTemplateDirective, typeof i3.JsonPathPipe, typeof i4.MngEnumPipe, typeof i5.MngBooleanPipe, typeof i6.MngI18nPropertyPipe, typeof i7.MngLinkFormatterPipe, typeof i8.MngBreadcrumbComponent, typeof i9.MngFooterComponent, typeof i10.MngMainLayoutComponent, typeof i11.MngMenuComponent, typeof i12.MngMenuItemComponent, typeof i13.MngTopbarComponent, typeof i14.MngAutocompleteComponent, typeof i15.MngDropdownComponent, typeof i16.MngFormlyFieldWrapperComponent, typeof i17.MngFormlyTableWrapperComponent, typeof i18.MngFormlyFieldInputComponent, typeof i19.MngFormlyFieldDropdownComponent, typeof i20.MngFormlyFieldAutocompleteComponent, typeof i21.MngFormlyFieldLookupDialogComponent, typeof i22.MngFormlyFieldTableDialogMultiselectComponent, typeof i23.MngFormlyFieldTableDialogFormComponent, typeof i24.MngFormlyFieldTabsComponent, typeof i25.MngFormlyFieldFieldsetComponent, typeof i26.MngTableComponent, typeof i27.MngTableviewComponent, typeof i28.MngTableColumnValueComponent, typeof i29.MngTableColumnFilterComponent, typeof i30.MngTableviewRouteComponent, typeof i31.MngFormEditorComponent, typeof i32.MngActionComponent, typeof i33.MngActionEditorComponent, typeof i34.MngActionRouteComponent]>;
|
|
84
84
|
static ɵinj: i0.ɵɵInjectorDeclaration<MngCommonsModule>;
|
|
85
85
|
}
|
package/lib/models/index.d.ts
CHANGED
package/lib/pipes/index.d.ts
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* Imitation of JSONPath Syntax. Supports:
|
|
5
|
+
* - Root object notation with '$'
|
|
6
|
+
* - Dot notation (e.g.: $.foo.bar), no bracket notation for properties
|
|
7
|
+
* - Array notation (e.g.: [0])
|
|
8
|
+
*/
|
|
9
|
+
export declare class JsonPathPipe implements PipeTransform {
|
|
10
|
+
transform(value: any, path?: string): any;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<JsonPathPipe, never>;
|
|
12
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<JsonPathPipe, "jsonPath">;
|
|
13
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PipeTransform } from '@angular/core';
|
|
2
|
-
import { ModelDescriptor } from '../descriptors';
|
|
3
2
|
import { ActionData } from '../components/action/models';
|
|
3
|
+
import { ModelDescriptor } from '../descriptors';
|
|
4
4
|
import { IdType } from '../types';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class MngLinkFormatterPipe implements PipeTransform {
|
|
@@ -9,10 +9,10 @@ import { MngTableCellClickEvent } from '../components/tableview/models';
|
|
|
9
9
|
import { IDataProvider, IEditorDataProvider } from '../data-providers';
|
|
10
10
|
import { ActionDescriptor, ActionEditorDescriptor } from '../descriptors';
|
|
11
11
|
import { IViewContainer, MngError } from '../models';
|
|
12
|
+
import { MngLinkFormatterPipe } from '../pipes';
|
|
12
13
|
import { IdType } from '../types';
|
|
13
14
|
import { MngErrorMapperService } from './error-mapper.service';
|
|
14
15
|
import { MngNavigationService } from './navigation.service';
|
|
15
|
-
import { MngLinkFormatterPipe } from '../pipes';
|
|
16
16
|
import * as i0 from "@angular/core";
|
|
17
17
|
export declare class MngActionExecutorService {
|
|
18
18
|
private injector;
|
|
@@ -3,5 +3,6 @@ import { ClassType } from '../types';
|
|
|
3
3
|
export declare class ModelUtil {
|
|
4
4
|
static findIdAttribute<T>(classType: ClassType<T>): string | null;
|
|
5
5
|
static findTitleAttribute<T>(classType: ClassType<T>): string | null;
|
|
6
|
+
private static findAttributeByTypeAndName;
|
|
6
7
|
static trySetLookupItemsProperties<T>(lookup: ILookupDescriptor<T>, idAsDataKey?: boolean): void;
|
|
7
8
|
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export * from './lib/pipes';
|
|
|
16
16
|
export * from './lib/api/models';
|
|
17
17
|
export * from './lib/components/action/models';
|
|
18
18
|
export * from './lib/components/form/models';
|
|
19
|
+
export * from './lib/components/tableview/models';
|
|
19
20
|
export * from './lib/config/models';
|
|
20
21
|
export * from './lib/config';
|
|
21
22
|
export * from './lib/data-providers';
|
|
@@ -1,19 +1,30 @@
|
|
|
1
|
+
@import 'mixins';
|
|
2
|
+
|
|
1
3
|
.p-dialog {
|
|
2
4
|
&.mng-details-dialog,
|
|
3
5
|
&.mng-details-dynamic-dialog {
|
|
4
6
|
height: 90%;
|
|
5
|
-
width:
|
|
7
|
+
width: 60vw;
|
|
8
|
+
|
|
9
|
+
@include mediaMaxLg() {
|
|
10
|
+
width: 80vw;
|
|
11
|
+
}
|
|
6
12
|
|
|
7
|
-
@
|
|
13
|
+
@include mediaMaxMd() {
|
|
8
14
|
width: 90%;
|
|
9
15
|
}
|
|
10
16
|
}
|
|
11
17
|
|
|
12
18
|
&.mng-formly-field-table-form-dialog,
|
|
13
|
-
&.mng-formly-field-table-multiselect-dialog
|
|
14
|
-
|
|
19
|
+
&.mng-formly-field-table-multiselect-dialog,
|
|
20
|
+
&.mng-formly-field-lookup-dialog {
|
|
21
|
+
width: 50vw;
|
|
22
|
+
|
|
23
|
+
@include mediaMaxLg() {
|
|
24
|
+
width: 70vw;
|
|
25
|
+
}
|
|
15
26
|
|
|
16
|
-
@
|
|
27
|
+
@include mediaMaxMd() {
|
|
17
28
|
width: 80%;
|
|
18
29
|
}
|
|
19
30
|
}
|
|
@@ -21,7 +32,7 @@
|
|
|
21
32
|
&.p-confirm-dialog {
|
|
22
33
|
width: 450px;
|
|
23
34
|
|
|
24
|
-
@
|
|
35
|
+
@include mediaMaxXs() {
|
|
25
36
|
width: 80%;
|
|
26
37
|
}
|
|
27
38
|
}
|
|
@@ -5,3 +5,63 @@
|
|
|
5
5
|
@mixin scaledWidth($val, $scale) {
|
|
6
6
|
width: $val * $scale;
|
|
7
7
|
}
|
|
8
|
+
|
|
9
|
+
@mixin mediaMinSm() {
|
|
10
|
+
@include mediaMinWidth($mediaSmWidthMin) {
|
|
11
|
+
@content;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@mixin mediaMinMd() {
|
|
16
|
+
@include mediaMinWidth($mediaMdWidthMin) {
|
|
17
|
+
@content;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@mixin mediaMinLg() {
|
|
22
|
+
@include mediaMinWidth($mediaLgWidthMin) {
|
|
23
|
+
@content;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@mixin mediaMinXl() {
|
|
28
|
+
@include mediaMinWidth($mediaXlWidthMin) {
|
|
29
|
+
@content;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@mixin mediaMaxXs() {
|
|
34
|
+
@include mediaMaxWidth($mediaXsWidthMax) {
|
|
35
|
+
@content;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@mixin mediaMaxSm() {
|
|
40
|
+
@include mediaMaxWidth($mediaSmWidthMax) {
|
|
41
|
+
@content;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@mixin mediaMaxMd() {
|
|
46
|
+
@include mediaMaxWidth($mediaMdWidthMax) {
|
|
47
|
+
@content;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@mixin mediaMaxLg() {
|
|
52
|
+
@include mediaMaxWidth($mediaLgWidthMax) {
|
|
53
|
+
@content;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@mixin mediaMinWidth($minWidth) {
|
|
58
|
+
@media (min-width: $minWidth) {
|
|
59
|
+
@content;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
@mixin mediaMaxWidth($maxWidth) {
|
|
64
|
+
@media (max-width: $maxWidth) {
|
|
65
|
+
@content;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@import 'mng-variables';
|
|
2
|
+
|
|
1
3
|
$primaryColor: #0f8bfd;
|
|
2
4
|
$primaryLightColor: scale-color($primaryColor, $lightness: 60%) !default;
|
|
3
5
|
$primaryDarkColor: scale-color($primaryColor, $lightness: -10%) !default;
|
|
@@ -7,6 +9,3 @@ $primaryTextColor: #ffffff;
|
|
|
7
9
|
$highlightBg: $primaryColor;
|
|
8
10
|
$highlightTextColor: $primaryTextColor;
|
|
9
11
|
$calendarHeaderTextColor: #ffffff; // white in light theme, black in dark theme
|
|
10
|
-
|
|
11
|
-
$scaleXS: 0.8 !default;
|
|
12
|
-
$scaleLG: 1.4 !default;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@import 'mng-variables';
|
|
2
|
+
|
|
1
3
|
$primaryColor: #397289 !default;
|
|
2
4
|
$primaryLightColor: scale-color($primaryColor, $lightness: 60%) !default;
|
|
3
5
|
$primaryDarkColor: scale-color($primaryColor, $lightness: -10%) !default;
|
|
@@ -7,6 +9,3 @@ $primaryTextColor: #ffffff !default;
|
|
|
7
9
|
$highlightBg: $primaryColor !default;
|
|
8
10
|
$highlightTextColor: $primaryTextColor !default;
|
|
9
11
|
$calendarHeaderTextColor: #000000; // black in light theme, white in dark theme
|
|
10
|
-
|
|
11
|
-
$scaleXS: 0.8 !default;
|
|
12
|
-
$scaleLG: 1.4 !default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
$mediaSmWidthMin: 576px !default;
|
|
2
|
+
$mediaMdWidthMin: 768px !default;
|
|
3
|
+
$mediaLgWidthMin: 992px !default;
|
|
4
|
+
$mediaXlWidthMin: 1200px !default;
|
|
5
|
+
|
|
6
|
+
$mediaXsWidthMax: #{$mediaSmWidthMin - 1} !default;
|
|
7
|
+
$mediaSmWidthMax: #{$mediaMdWidthMin - 1} !default;
|
|
8
|
+
$mediaMdWidthMax: #{$mediaLgWidthMin - 1} !default;
|
|
9
|
+
$mediaLgWidthMax: #{$mediaXlWidthMin - 1} !default;
|
|
10
|
+
|
|
11
|
+
$scaleXS: 0.8 !default;
|
|
12
|
+
$scaleLG: 1.4 !default;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export {};
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZWRpdG9yLmRlc2NyaXB0b3IuaW50ZXJmYWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2xpYi9kZXNjcmlwdG9ycy9lZGl0b3IuZGVzY3JpcHRvci5pbnRlcmZhY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7VHlwZX0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5cbi8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tZW1wdHktaW50ZXJmYWNlXG5leHBvcnQgaW50ZXJmYWNlIEZpZWxkQ29uZmlnIHt9XG5cbmV4cG9ydCBpbnRlcmZhY2UgRmllbGRMb29rdXBDb25maWcgZXh0ZW5kcyBGaWVsZENvbmZpZyB7XG4gICAgdGFibGU/OiB7XG4gICAgICAgIGNhcHRpb25Db21wb25lbnQ/OiBUeXBlPGFueT47XG4gICAgICAgIGNvbHVtbkFjdGlvbkNvbXBvbmVudD86IFR5cGU8YW55PjtcbiAgICB9O1xufVxuIl19
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { Pipe } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export class MngPropertyPathPipe {
|
|
4
|
-
transform(value, path = '') {
|
|
5
|
-
if (path.indexOf('.') >= 0) {
|
|
6
|
-
const pathSplit = path.split('.');
|
|
7
|
-
let currValue = value;
|
|
8
|
-
for (const p of pathSplit) {
|
|
9
|
-
if (typeof currValue === 'undefined' || currValue === null) {
|
|
10
|
-
return currValue;
|
|
11
|
-
}
|
|
12
|
-
else if (typeof currValue === 'object') {
|
|
13
|
-
currValue = currValue[p];
|
|
14
|
-
}
|
|
15
|
-
else {
|
|
16
|
-
console.warn(`Path ${path} is not valid for object`, value);
|
|
17
|
-
return currValue;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return currValue;
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
return typeof value === 'object' ? value[path] : value;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
MngPropertyPathPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngPropertyPathPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
28
|
-
MngPropertyPathPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngPropertyPathPipe, name: "propertyPath" });
|
|
29
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MngPropertyPathPipe, decorators: [{
|
|
30
|
-
type: Pipe,
|
|
31
|
-
args: [{
|
|
32
|
-
name: 'propertyPath',
|
|
33
|
-
pure: true
|
|
34
|
-
}]
|
|
35
|
-
}] });
|
|
36
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvcGVydHktcGF0aC5waXBlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2xpYi9waXBlcy9wcm9wZXJ0eS1wYXRoLnBpcGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLElBQUksRUFBZ0IsTUFBTSxlQUFlLENBQUM7O0FBTWxELE1BQU0sT0FBTyxtQkFBbUI7SUFDNUIsU0FBUyxDQUFDLEtBQVUsRUFBRSxJQUFJLEdBQUcsRUFBRTtRQUMzQixJQUFJLElBQUksQ0FBQyxPQUFPLENBQUMsR0FBRyxDQUFDLElBQUksQ0FBQyxFQUFFO1lBQ3hCLE1BQU0sU0FBUyxHQUFHLElBQUksQ0FBQyxLQUFLLENBQUMsR0FBRyxDQUFDLENBQUM7WUFDbEMsSUFBSSxTQUFTLEdBQUcsS0FBSyxDQUFDO1lBQ3RCLEtBQUssTUFBTSxDQUFDLElBQUksU0FBUyxFQUFFO2dCQUN2QixJQUFJLE9BQU8sU0FBUyxLQUFLLFdBQVcsSUFBSSxTQUFTLEtBQUssSUFBSSxFQUFFO29CQUN4RCxPQUFPLFNBQVMsQ0FBQztpQkFDcEI7cUJBQU0sSUFBSSxPQUFPLFNBQVMsS0FBSyxRQUFRLEVBQUU7b0JBQ3RDLFNBQVMsR0FBRyxTQUFTLENBQUMsQ0FBQyxDQUFDLENBQUM7aUJBQzVCO3FCQUFNO29CQUNILE9BQU8sQ0FBQyxJQUFJLENBQUMsUUFBUSxJQUFJLDBCQUEwQixFQUFFLEtBQUssQ0FBQyxDQUFDO29CQUM1RCxPQUFPLFNBQVMsQ0FBQztpQkFDcEI7YUFDSjtZQUNELE9BQU8sU0FBUyxDQUFDO1NBQ3BCO2FBQU07WUFDSCxPQUFPLE9BQU8sS0FBSyxLQUFLLFFBQVEsQ0FBQyxDQUFDLENBQUMsS0FBSyxDQUFDLElBQUksQ0FBQyxDQUFDLENBQUMsQ0FBQyxLQUFLLENBQUM7U0FDMUQ7SUFDTCxDQUFDOztnSEFuQlEsbUJBQW1COzhHQUFuQixtQkFBbUI7MkZBQW5CLG1CQUFtQjtrQkFKL0IsSUFBSTttQkFBQztvQkFDRixJQUFJLEVBQUUsY0FBYztvQkFDcEIsSUFBSSxFQUFFLElBQUk7aUJBQ2IiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQge1BpcGUsIFBpcGVUcmFuc2Zvcm19IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuXG5AUGlwZSh7XG4gICAgbmFtZTogJ3Byb3BlcnR5UGF0aCcsXG4gICAgcHVyZTogdHJ1ZVxufSlcbmV4cG9ydCBjbGFzcyBNbmdQcm9wZXJ0eVBhdGhQaXBlIGltcGxlbWVudHMgUGlwZVRyYW5zZm9ybSB7XG4gICAgdHJhbnNmb3JtKHZhbHVlOiBhbnksIHBhdGggPSAnJyk6IGFueSB7XG4gICAgICAgIGlmIChwYXRoLmluZGV4T2YoJy4nKSA+PSAwKSB7XG4gICAgICAgICAgICBjb25zdCBwYXRoU3BsaXQgPSBwYXRoLnNwbGl0KCcuJyk7XG4gICAgICAgICAgICBsZXQgY3VyclZhbHVlID0gdmFsdWU7XG4gICAgICAgICAgICBmb3IgKGNvbnN0IHAgb2YgcGF0aFNwbGl0KSB7XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBjdXJyVmFsdWUgPT09ICd1bmRlZmluZWQnIHx8IGN1cnJWYWx1ZSA9PT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gY3VyclZhbHVlO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodHlwZW9mIGN1cnJWYWx1ZSA9PT0gJ29iamVjdCcpIHtcbiAgICAgICAgICAgICAgICAgICAgY3VyclZhbHVlID0gY3VyclZhbHVlW3BdO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnNvbGUud2FybihgUGF0aCAke3BhdGh9IGlzIG5vdCB2YWxpZCBmb3Igb2JqZWN0YCwgdmFsdWUpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gY3VyclZhbHVlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBjdXJyVmFsdWU7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICByZXR1cm4gdHlwZW9mIHZhbHVlID09PSAnb2JqZWN0JyA/IHZhbHVlW3BhdGhdIDogdmFsdWU7XG4gICAgICAgIH1cbiAgICB9XG59XG4iXX0=
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { PipeTransform } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class MngPropertyPathPipe implements PipeTransform {
|
|
4
|
-
transform(value: any, path?: string): any;
|
|
5
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MngPropertyPathPipe, never>;
|
|
6
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<MngPropertyPathPipe, "propertyPath">;
|
|
7
|
-
}
|