@mediusinc/mng-commons 0.6.1 → 0.8.0-rc.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 +3 -3
- package/assets/i18n/sl.json +3 -3
- package/esm2020/lib/api/models/builders/query-param.builder.mjs +59 -53
- package/esm2020/lib/api/models/filter-match-type.model.mjs +24 -24
- package/esm2020/lib/api/models/filter-param.model.mjs +32 -32
- package/esm2020/lib/api/models/index.mjs +8 -8
- package/esm2020/lib/api/models/mappers.mjs +12 -12
- package/esm2020/lib/api/models/query-mode.model.mjs +17 -17
- package/esm2020/lib/api/models/query-param.model.mjs +67 -67
- package/esm2020/lib/api/models/query-result.model.mjs +17 -17
- package/esm2020/lib/api/models/serialization.model.mjs +1 -1
- package/esm2020/lib/api/services/api.abstract.service.mjs +55 -55
- package/esm2020/lib/api/services/crud-api.abstract.service.mjs +66 -66
- package/esm2020/lib/api/services/get-all-api.abstract.service.mjs +22 -22
- package/esm2020/lib/api/services/index.mjs +3 -3
- package/esm2020/lib/api/utils/index.mjs +2 -2
- package/esm2020/lib/api/utils/medius-rest.util.mjs +152 -126
- package/esm2020/lib/api/utils/object-serializer.util.mjs +243 -243
- package/esm2020/lib/components/action/action.component.mjs +174 -161
- package/esm2020/lib/components/action/editor/action-editor.component.mjs +230 -236
- package/esm2020/lib/components/action/index.mjs +3 -3
- package/esm2020/lib/components/action/models/action-confirmation-service.model.mjs +1 -1
- package/esm2020/lib/components/action/models/action-execution.model.mjs +231 -59
- package/esm2020/lib/components/action/models/index.mjs +2 -2
- package/esm2020/lib/components/action/route/action-route.component.mjs +125 -127
- package/esm2020/lib/components/form/autocomplete/autocomplete.component.mjs +268 -268
- package/esm2020/lib/components/form/dropdown/dropdown.component.mjs +160 -160
- package/esm2020/lib/components/form/editor/form-editor.component.mjs +189 -189
- package/esm2020/lib/components/form/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.mjs +18 -18
- package/esm2020/lib/components/form/formly/fields/formly-field-dropdown/formly-field-dropdown.component.mjs +43 -43
- package/esm2020/lib/components/form/formly/fields/formly-field-fieldset/formly-field-fieldset.component.mjs +24 -24
- package/esm2020/lib/components/form/formly/fields/formly-field-input/formly-field-input.component.mjs +79 -56
- package/esm2020/lib/components/form/formly/fields/formly-field-label/formly-field-label.component.mjs +16 -16
- package/esm2020/lib/components/form/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.mjs +179 -179
- package/esm2020/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.mjs +156 -165
- package/esm2020/lib/components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.mjs +126 -126
- package/esm2020/lib/components/form/formly/fields/formly-field-tabs/formly-field-tabs.component.mjs +16 -16
- package/esm2020/lib/components/form/formly/fields/index.mjs +9 -9
- package/esm2020/lib/components/form/formly/wrappers/formly-field-wrapper/formly-field-wrapper.component.mjs +14 -14
- package/esm2020/lib/components/form/formly/wrappers/formly-table-wrapper/formly-table-wrapper.component.mjs +14 -14
- package/esm2020/lib/components/form/formly/wrappers/index.mjs +2 -2
- package/esm2020/lib/components/form/index.mjs +3 -3
- package/esm2020/lib/components/form/models/form-editor.event.mjs +34 -34
- package/esm2020/lib/components/form/models/index.mjs +1 -1
- package/esm2020/lib/components/layout/breadcrumb.component.mjs +16 -16
- package/esm2020/lib/components/layout/footer.component.mjs +16 -16
- package/esm2020/lib/components/layout/index.mjs +6 -6
- package/esm2020/lib/components/layout/main-layout.component.mjs +51 -51
- package/esm2020/lib/components/layout/menu-item.component.mjs +216 -216
- package/esm2020/lib/components/layout/menu.component.mjs +19 -19
- package/esm2020/lib/components/layout/services/index.mjs +1 -1
- package/esm2020/lib/components/layout/services/main-layout.component.service.mjs +192 -192
- package/esm2020/lib/components/layout/topbar.component.mjs +57 -57
- package/esm2020/lib/components/tableview/index.mjs +6 -6
- package/esm2020/lib/components/tableview/models/index.mjs +1 -1
- package/esm2020/lib/components/tableview/models/table.event.mjs +15 -15
- package/esm2020/lib/components/tableview/route/tableview-route.abstract.component.mjs +35 -35
- package/esm2020/lib/components/tableview/route/tableview-route.component.mjs +53 -53
- package/esm2020/lib/components/tableview/table/column-filter/column-filter.component.mjs +102 -85
- package/esm2020/lib/components/tableview/table/column-value/column-value.component.mjs +41 -41
- package/esm2020/lib/components/tableview/table/table.component.mjs +430 -339
- package/esm2020/lib/components/tableview/tableview.component.mjs +89 -97
- package/esm2020/lib/config/formly.config.mjs +172 -163
- package/esm2020/lib/config/index.mjs +1 -1
- package/esm2020/lib/config/models/index.mjs +1 -1
- package/esm2020/lib/config/models/mng-config.model.mjs +1 -1
- package/esm2020/lib/data-providers/base.data-provider.mjs +16 -16
- package/esm2020/lib/data-providers/editor.data-provider.mjs +36 -36
- package/esm2020/lib/data-providers/index.mjs +5 -5
- package/esm2020/lib/data-providers/lookup.data-provider.mjs +15 -15
- package/esm2020/lib/data-providers/table.data-provider.mjs +16 -16
- package/esm2020/lib/data-providers/tableview.data-provider.mjs +16 -16
- package/esm2020/lib/descriptors/action.descriptor.mjs +623 -600
- package/esm2020/lib/descriptors/column.descriptor.mjs +228 -197
- package/esm2020/lib/descriptors/editor.descriptor.mjs +154 -154
- package/esm2020/lib/descriptors/field-validation.descriptor.mjs +20 -20
- package/esm2020/lib/descriptors/field.descriptor.interface.mjs +1 -1
- package/esm2020/lib/descriptors/field.descriptor.mjs +823 -793
- package/esm2020/lib/descriptors/filter.descriptor.mjs +295 -237
- package/esm2020/lib/descriptors/index.mjs +11 -11
- package/esm2020/lib/descriptors/lookup.descriptor.mjs +1 -1
- package/esm2020/lib/descriptors/model.descriptor.mjs +33 -33
- package/esm2020/lib/descriptors/table.descriptor.mjs +214 -171
- package/esm2020/lib/descriptors/tableview.descriptor.mjs +134 -134
- package/esm2020/lib/directives/component.directive.mjs +43 -43
- package/esm2020/lib/directives/index.mjs +2 -2
- package/esm2020/lib/directives/template.directive.mjs +27 -27
- package/esm2020/lib/mng-commons.module.mjs +426 -426
- package/esm2020/lib/models/column-value.model.mjs +1 -1
- package/esm2020/lib/models/enum.model.mjs +1 -1
- package/esm2020/lib/models/error.model.mjs +1 -1
- package/esm2020/lib/models/index.mjs +6 -6
- package/esm2020/lib/models/menu.model.mjs +1 -1
- package/esm2020/lib/models/user.model.mjs +1 -1
- package/esm2020/lib/models/view-container.model.mjs +1 -1
- package/esm2020/lib/pipes/boolean.pipe.mjs +26 -26
- package/esm2020/lib/pipes/enum.pipe.mjs +24 -24
- package/esm2020/lib/pipes/i18n-property.pipe.mjs +17 -17
- package/esm2020/lib/pipes/index.mjs +5 -5
- package/esm2020/lib/pipes/json-path.pipe.mjs +79 -79
- package/esm2020/lib/pipes/link-formatter.pipe.mjs +38 -38
- package/esm2020/lib/router/index.mjs +1 -1
- package/esm2020/lib/router/models/index.mjs +1 -1
- package/esm2020/lib/router/models/router.model.mjs +1 -1
- package/esm2020/lib/router/route-builder.mjs +431 -431
- package/esm2020/lib/services/action-executor.service.mjs +535 -361
- package/esm2020/lib/services/commons.service.mjs +344 -344
- package/esm2020/lib/services/configuration.service.mjs +110 -110
- package/esm2020/lib/services/error-mapper.service.mjs +13 -13
- package/esm2020/lib/services/index.mjs +6 -6
- package/esm2020/lib/services/internal/commons-init.provider.mjs +3 -3
- package/esm2020/lib/services/internal/commons-init.service.mjs +43 -43
- package/esm2020/lib/services/internal/index.mjs +2 -2
- package/esm2020/lib/services/navigation.service.mjs +47 -47
- package/esm2020/lib/services/providers/config-service.provider.mjs +29 -29
- package/esm2020/lib/services/providers/formly-config.provider.mjs +30 -30
- package/esm2020/lib/services/providers/index.mjs +2 -2
- package/esm2020/lib/services/tokens/browser-storage.token.mjs +5 -5
- package/esm2020/lib/services/tokens/commons-init.token.mjs +2 -2
- package/esm2020/lib/services/tokens/default-setting.token.mjs +2 -2
- package/esm2020/lib/services/tokens/index.mjs +4 -4
- package/esm2020/lib/services/tokens/module-config.token.mjs +2 -2
- package/esm2020/lib/services/view-container.component.service.mjs +34 -34
- package/esm2020/lib/types/index.mjs +2 -2
- package/esm2020/lib/types/type.decorator.mjs +12 -12
- package/esm2020/lib/types/type.model.mjs +2 -2
- package/esm2020/lib/utils/action-data-provider.util.mjs +116 -116
- package/esm2020/lib/utils/editor-formly.util.mjs +205 -202
- package/esm2020/lib/utils/enum.util.mjs +82 -82
- package/esm2020/lib/utils/i18n.util.mjs +232 -232
- package/esm2020/lib/utils/index.mjs +7 -7
- package/esm2020/lib/utils/model.util.mjs +59 -59
- package/esm2020/lib/utils/notification.util.mjs +45 -45
- package/esm2020/lib/utils/route.util.mjs +23 -23
- package/esm2020/lib/utils/styles.util.mjs +41 -0
- package/esm2020/lib/utils/type.util.mjs +76 -76
- package/esm2020/mediusinc-mng-commons.mjs +4 -4
- package/esm2020/public-api.mjs +39 -39
- package/fesm2015/mediusinc-mng-commons.mjs +9702 -8977
- package/fesm2015/mediusinc-mng-commons.mjs.map +1 -1
- package/fesm2020/mediusinc-mng-commons.mjs +9574 -8848
- package/fesm2020/mediusinc-mng-commons.mjs.map +1 -1
- package/lib/api/models/builders/query-param.builder.d.ts +13 -12
- package/lib/api/models/filter-match-type.model.d.ts +23 -23
- package/lib/api/models/filter-param.model.d.ts +23 -23
- package/lib/api/models/index.d.ts +8 -8
- package/lib/api/models/mappers.d.ts +6 -6
- package/lib/api/models/query-mode.model.d.ts +16 -16
- package/lib/api/models/query-param.model.d.ts +31 -31
- package/lib/api/models/query-result.model.d.ts +23 -23
- package/lib/api/models/serialization.model.d.ts +8 -8
- package/lib/api/services/api.abstract.service.d.ts +24 -24
- package/lib/api/services/crud-api.abstract.service.d.ts +22 -22
- package/lib/api/services/get-all-api.abstract.service.d.ts +11 -11
- package/lib/api/services/index.d.ts +3 -3
- package/lib/api/utils/index.d.ts +2 -2
- package/lib/api/utils/medius-rest.util.d.ts +14 -12
- package/lib/api/utils/object-serializer.util.d.ts +33 -33
- package/lib/components/action/action.component.d.ts +66 -65
- package/lib/components/action/editor/action-editor.component.d.ts +62 -59
- package/lib/components/action/index.d.ts +3 -3
- package/lib/components/action/models/action-confirmation-service.model.d.ts +6 -6
- package/lib/components/action/models/action-execution.model.d.ts +126 -57
- package/lib/components/action/models/index.d.ts +2 -2
- package/lib/components/action/route/action-route.component.d.ts +31 -31
- package/lib/components/form/autocomplete/autocomplete.component.d.ts +53 -53
- package/lib/components/form/dropdown/dropdown.component.d.ts +44 -44
- package/lib/components/form/editor/form-editor.component.d.ts +45 -45
- package/lib/components/form/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.d.ts +12 -12
- package/lib/components/form/formly/fields/formly-field-dropdown/formly-field-dropdown.component.d.ts +14 -14
- package/lib/components/form/formly/fields/formly-field-fieldset/formly-field-fieldset.component.d.ts +12 -12
- package/lib/components/form/formly/fields/formly-field-input/formly-field-input.component.d.ts +19 -14
- package/lib/components/form/formly/fields/formly-field-label/formly-field-label.component.d.ts +6 -6
- package/lib/components/form/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.d.ts +44 -44
- package/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.d.ts +22 -25
- package/lib/components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.d.ts +37 -37
- package/lib/components/form/formly/fields/formly-field-tabs/formly-field-tabs.component.d.ts +6 -6
- package/lib/components/form/formly/fields/index.d.ts +9 -9
- package/lib/components/form/formly/wrappers/formly-field-wrapper/formly-field-wrapper.component.d.ts +6 -6
- package/lib/components/form/formly/wrappers/formly-table-wrapper/formly-table-wrapper.component.d.ts +6 -6
- package/lib/components/form/formly/wrappers/index.d.ts +2 -2
- package/lib/components/form/index.d.ts +3 -3
- package/lib/components/form/models/form-editor.event.d.ts +37 -37
- package/lib/components/form/models/index.d.ts +1 -1
- package/lib/components/layout/breadcrumb.component.d.ts +8 -8
- package/lib/components/layout/footer.component.d.ts +9 -9
- package/lib/components/layout/index.d.ts +6 -6
- package/lib/components/layout/main-layout.component.d.ts +20 -20
- package/lib/components/layout/menu-item.component.d.ts +37 -37
- package/lib/components/layout/menu.component.d.ts +10 -10
- package/lib/components/layout/services/index.d.ts +1 -1
- package/lib/components/layout/services/main-layout.component.service.d.ts +65 -65
- package/lib/components/layout/topbar.component.d.ts +24 -24
- package/lib/components/tableview/index.d.ts +6 -6
- package/lib/components/tableview/models/index.d.ts +1 -1
- package/lib/components/tableview/models/table.event.d.ts +17 -17
- package/lib/components/tableview/route/tableview-route.abstract.component.d.ts +19 -19
- package/lib/components/tableview/route/tableview-route.component.d.ts +18 -18
- package/lib/components/tableview/table/column-filter/column-filter.component.d.ts +31 -29
- package/lib/components/tableview/table/column-value/column-value.component.d.ts +17 -17
- package/lib/components/tableview/table/table.component.d.ts +104 -93
- package/lib/components/tableview/tableview.component.d.ts +37 -39
- package/lib/config/formly.config.d.ts +15 -15
- package/lib/config/index.d.ts +1 -1
- package/lib/config/models/index.d.ts +1 -1
- package/lib/config/models/mng-config.model.d.ts +34 -34
- package/lib/data-providers/base.data-provider.d.ts +14 -14
- package/lib/data-providers/editor.data-provider.d.ts +25 -25
- package/lib/data-providers/index.d.ts +5 -5
- package/lib/data-providers/lookup.data-provider.d.ts +14 -14
- package/lib/data-providers/table.data-provider.d.ts +14 -14
- package/lib/data-providers/tableview.data-provider.d.ts +15 -15
- package/lib/descriptors/action.descriptor.d.ts +277 -270
- package/lib/descriptors/column.descriptor.d.ts +76 -66
- package/lib/descriptors/editor.descriptor.d.ts +44 -44
- package/lib/descriptors/field-validation.descriptor.d.ts +18 -18
- package/lib/descriptors/field.descriptor.d.ts +326 -314
- package/lib/descriptors/field.descriptor.interface.d.ts +9 -9
- package/lib/descriptors/filter.descriptor.d.ts +127 -108
- package/lib/descriptors/index.d.ts +11 -11
- package/lib/descriptors/lookup.descriptor.d.ts +17 -17
- package/lib/descriptors/model.descriptor.d.ts +15 -15
- package/lib/descriptors/table.descriptor.d.ts +80 -63
- package/lib/descriptors/tableview.descriptor.d.ts +42 -42
- package/lib/directives/component.directive.d.ts +16 -16
- package/lib/directives/index.d.ts +2 -2
- package/lib/directives/template.directive.d.ts +13 -13
- package/lib/mng-commons.module.d.ts +86 -86
- package/lib/models/column-value.model.d.ts +4 -4
- package/lib/models/enum.model.d.ts +6 -6
- package/lib/models/error.model.d.ts +14 -14
- package/lib/models/index.d.ts +6 -6
- package/lib/models/menu.model.d.ts +25 -25
- package/lib/models/user.model.d.ts +8 -8
- package/lib/models/view-container.model.d.ts +6 -6
- package/lib/pipes/boolean.pipe.d.ts +7 -7
- package/lib/pipes/enum.pipe.d.ts +8 -8
- package/lib/pipes/i18n-property.pipe.d.ts +8 -8
- package/lib/pipes/index.d.ts +5 -5
- package/lib/pipes/json-path.pipe.d.ts +13 -13
- package/lib/pipes/link-formatter.pipe.d.ts +11 -11
- package/lib/router/index.d.ts +1 -1
- package/lib/router/models/index.d.ts +1 -1
- package/lib/router/models/router.model.d.ts +22 -22
- package/lib/router/route-builder.d.ts +86 -86
- package/lib/services/action-executor.service.d.ts +149 -104
- package/lib/services/commons.service.d.ts +72 -72
- package/lib/services/configuration.service.d.ts +36 -36
- package/lib/services/error-mapper.service.d.ts +7 -7
- package/lib/services/index.d.ts +6 -6
- package/lib/services/internal/commons-init.provider.d.ts +3 -3
- package/lib/services/internal/commons-init.service.d.ts +16 -16
- package/lib/services/internal/index.d.ts +2 -2
- package/lib/services/navigation.service.d.ts +14 -14
- package/lib/services/providers/config-service.provider.d.ts +6 -6
- package/lib/services/providers/formly-config.provider.d.ts +4 -4
- package/lib/services/providers/index.d.ts +2 -2
- package/lib/services/tokens/browser-storage.token.d.ts +2 -2
- package/lib/services/tokens/commons-init.token.d.ts +3 -3
- package/lib/services/tokens/default-setting.token.d.ts +2 -2
- package/lib/services/tokens/index.d.ts +4 -4
- package/lib/services/tokens/module-config.token.d.ts +3 -3
- package/lib/services/view-container.component.service.d.ts +22 -22
- package/lib/types/index.d.ts +2 -2
- package/lib/types/type.decorator.d.ts +4 -4
- package/lib/types/type.model.d.ts +20 -17
- package/lib/utils/action-data-provider.util.d.ts +16 -17
- package/lib/utils/editor-formly.util.d.ts +10 -10
- package/lib/utils/enum.util.d.ts +50 -50
- package/lib/utils/i18n.util.d.ts +56 -56
- package/lib/utils/index.d.ts +7 -7
- package/lib/utils/model.util.d.ts +8 -8
- package/lib/utils/notification.util.d.ts +11 -11
- package/lib/utils/route.util.d.ts +4 -4
- package/lib/utils/styles.util.d.ts +14 -0
- package/lib/utils/type.util.d.ts +36 -36
- package/mediusinc-mng-commons-0.8.0-rc.1.tgz +0 -0
- package/mediusinc-mng-commons.d.ts +5 -5
- package/package.json +1 -1
- package/public-api.d.ts +28 -28
- package/scss/common/theme/designer/_components.scss +1 -1
- package/scss/mng-overrides/_theme_datatable.scss +57 -0
- package/scss/mng-overrides/_theme_forms.scss +16 -0
- package/scss/mng-overrides/_theme_styles.scss +1 -0
- package/scss/mng-overrides/_theme_tableview.scss +0 -43
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
|
2
|
-
import { ColumnDescriptor } from '../../../../descriptors';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
import * as i1 from "@angular/common";
|
|
5
|
-
import * as i2 from "../../../../directives/component.directive";
|
|
6
|
-
import * as i3 from "../../../../pipes/json-path.pipe";
|
|
7
|
-
import * as i4 from "../../../../pipes/boolean.pipe";
|
|
8
|
-
import * as i5 from "@ngx-translate/core";
|
|
9
|
-
import * as i6 from "../../../../pipes/enum.pipe";
|
|
10
|
-
export class MngTableColumnValueComponent {
|
|
11
|
-
constructor() {
|
|
12
|
-
this.columnTypeString = ColumnDescriptor.TypeEnum.String;
|
|
13
|
-
this.columnTypeNumber = ColumnDescriptor.TypeEnum.Number;
|
|
14
|
-
this.columnTypeBoolean = ColumnDescriptor.TypeEnum.Boolean;
|
|
15
|
-
this.columnTypeDate = ColumnDescriptor.TypeEnum.Date;
|
|
16
|
-
this.columnTypeEnum = ColumnDescriptor.TypeEnum.Enum;
|
|
17
|
-
this.columnTypeCustom = ColumnDescriptor.TypeEnum.Custom;
|
|
18
|
-
this.jsonPath = '$';
|
|
19
|
-
}
|
|
20
|
-
ngOnInit() {
|
|
21
|
-
if (this.descriptor.jsonPath) {
|
|
22
|
-
this.jsonPath = this.descriptor.jsonPath;
|
|
23
|
-
}
|
|
24
|
-
else {
|
|
25
|
-
this.jsonPath = `$.${this.descriptor.property}`;
|
|
26
|
-
if (this.descriptor.objectModelType) {
|
|
27
|
-
this.jsonPath = `$.${this.descriptor.property}.${this.descriptor.objectTitleProperty}`;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
MngTableColumnValueComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngTableColumnValueComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
33
|
-
MngTableColumnValueComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: MngTableColumnValueComponent, selector: "mng-table-column-value", inputs: { descriptor: "descriptor", item: "item" }, ngImport: i0, template: "<ng-container [ngSwitch]=\"descriptor.columnType\">\n <ng-container *ngSwitchCase=\"columnTypeString\">\n {{ item | jsonPath: jsonPath }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeNumber\">\n {{ item | jsonPath: jsonPath | number: descriptor.displayFormat }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeDate\">\n {{ item | jsonPath: jsonPath | date: descriptor.displayFormat }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeBoolean\">\n <ng-container *ngIf=\"descriptor.booleanAsIcon; else booleanText\"></ng-container>\n <i [class]=\"item | jsonPath: jsonPath | boolean: descriptor.booleanYes:descriptor.booleanNo:true\"></i>\n <ng-template #booleanText>\n {{ item | jsonPath: jsonPath | boolean: descriptor.booleanYes:descriptor.booleanNo | translate }}\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeEnum\">\n {{ item | jsonPath: jsonPath | enum: descriptor.enumType:descriptor.enumTitlePath:descriptor.enumNameAsValue | translate }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeCustom\">\n <ng-container\n [mngComponent]=\"descriptor.customComponentType!\"\n [inputs]=\"{\n value: item | jsonPath: jsonPath,\n item: item,\n descriptor: descriptor\n }\"></ng-container>\n </ng-container>\n</ng-container>\n", directives: [{ type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.MngComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "inputs"], outputs: ["instanceCreated"] }], pipes: { "jsonPath": i3.JsonPathPipe, "number": i1.DecimalPipe, "date": i1.DatePipe, "boolean": i4.MngBooleanPipe, "translate": i5.TranslatePipe, "enum": i6.MngEnumPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
34
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngTableColumnValueComponent, decorators: [{
|
|
35
|
-
type: Component,
|
|
36
|
-
args: [{ selector: 'mng-table-column-value', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container [ngSwitch]=\"descriptor.columnType\">\n <ng-container *ngSwitchCase=\"columnTypeString\">\n {{ item | jsonPath: jsonPath }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeNumber\">\n {{ item | jsonPath: jsonPath | number: descriptor.displayFormat }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeDate\">\n {{ item | jsonPath: jsonPath | date: descriptor.displayFormat }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeBoolean\">\n <ng-container *ngIf=\"descriptor.booleanAsIcon; else booleanText\"></ng-container>\n <i [class]=\"item | jsonPath: jsonPath | boolean: descriptor.booleanYes:descriptor.booleanNo:true\"></i>\n <ng-template #booleanText>\n {{ item | jsonPath: jsonPath | boolean: descriptor.booleanYes:descriptor.booleanNo | translate }}\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeEnum\">\n {{ item | jsonPath: jsonPath | enum: descriptor.enumType:descriptor.enumTitlePath:descriptor.enumNameAsValue | translate }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeCustom\">\n <ng-container\n [mngComponent]=\"descriptor.customComponentType!\"\n [inputs]=\"{\n value: item | jsonPath: jsonPath,\n item: item,\n descriptor: descriptor\n }\"></ng-container>\n </ng-container>\n</ng-container>\n" }]
|
|
37
|
-
}], propDecorators: { descriptor: [{
|
|
38
|
-
type: Input
|
|
39
|
-
}], item: [{
|
|
40
|
-
type: Input
|
|
41
|
-
}] } });
|
|
1
|
+
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
|
2
|
+
import { ColumnDescriptor } from '../../../../descriptors';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "@angular/common";
|
|
5
|
+
import * as i2 from "../../../../directives/component.directive";
|
|
6
|
+
import * as i3 from "../../../../pipes/json-path.pipe";
|
|
7
|
+
import * as i4 from "../../../../pipes/boolean.pipe";
|
|
8
|
+
import * as i5 from "@ngx-translate/core";
|
|
9
|
+
import * as i6 from "../../../../pipes/enum.pipe";
|
|
10
|
+
export class MngTableColumnValueComponent {
|
|
11
|
+
constructor() {
|
|
12
|
+
this.columnTypeString = ColumnDescriptor.TypeEnum.String;
|
|
13
|
+
this.columnTypeNumber = ColumnDescriptor.TypeEnum.Number;
|
|
14
|
+
this.columnTypeBoolean = ColumnDescriptor.TypeEnum.Boolean;
|
|
15
|
+
this.columnTypeDate = ColumnDescriptor.TypeEnum.Date;
|
|
16
|
+
this.columnTypeEnum = ColumnDescriptor.TypeEnum.Enum;
|
|
17
|
+
this.columnTypeCustom = ColumnDescriptor.TypeEnum.Custom;
|
|
18
|
+
this.jsonPath = '$';
|
|
19
|
+
}
|
|
20
|
+
ngOnInit() {
|
|
21
|
+
if (this.descriptor.jsonPath) {
|
|
22
|
+
this.jsonPath = this.descriptor.jsonPath;
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
this.jsonPath = `$.${this.descriptor.property}`;
|
|
26
|
+
if (this.descriptor.objectModelType) {
|
|
27
|
+
this.jsonPath = `$.${this.descriptor.property}.${this.descriptor.objectTitleProperty}`;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
MngTableColumnValueComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngTableColumnValueComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
33
|
+
MngTableColumnValueComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: MngTableColumnValueComponent, selector: "mng-table-column-value", inputs: { descriptor: "descriptor", item: "item" }, ngImport: i0, template: "<ng-container [ngSwitch]=\"descriptor.columnType\">\n <ng-container *ngSwitchCase=\"columnTypeString\">\n {{ item | jsonPath: jsonPath }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeNumber\">\n {{ item | jsonPath: jsonPath | number: descriptor.displayFormat }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeDate\">\n {{ item | jsonPath: jsonPath | date: descriptor.displayFormat }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeBoolean\">\n <ng-container *ngIf=\"descriptor.booleanAsIcon; else booleanText\"></ng-container>\n <i [class]=\"item | jsonPath: jsonPath | boolean: descriptor.booleanYes:descriptor.booleanNo:true\"></i>\n <ng-template #booleanText>\n {{ item | jsonPath: jsonPath | boolean: descriptor.booleanYes:descriptor.booleanNo | translate }}\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeEnum\">\n {{ item | jsonPath: jsonPath | enum: descriptor.enumType:descriptor.enumTitlePath:descriptor.enumNameAsValue | translate }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeCustom\">\n <ng-container\n [mngComponent]=\"descriptor.customComponentType!\"\n [inputs]=\"{\n value: item | jsonPath: jsonPath,\n item: item,\n descriptor: descriptor\n }\"></ng-container>\n </ng-container>\n</ng-container>\n", directives: [{ type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.MngComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "inputs"], outputs: ["instanceCreated"] }], pipes: { "jsonPath": i3.JsonPathPipe, "number": i1.DecimalPipe, "date": i1.DatePipe, "boolean": i4.MngBooleanPipe, "translate": i5.TranslatePipe, "enum": i6.MngEnumPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
34
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: MngTableColumnValueComponent, decorators: [{
|
|
35
|
+
type: Component,
|
|
36
|
+
args: [{ selector: 'mng-table-column-value', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container [ngSwitch]=\"descriptor.columnType\">\n <ng-container *ngSwitchCase=\"columnTypeString\">\n {{ item | jsonPath: jsonPath }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeNumber\">\n {{ item | jsonPath: jsonPath | number: descriptor.displayFormat }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeDate\">\n {{ item | jsonPath: jsonPath | date: descriptor.displayFormat }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeBoolean\">\n <ng-container *ngIf=\"descriptor.booleanAsIcon; else booleanText\"></ng-container>\n <i [class]=\"item | jsonPath: jsonPath | boolean: descriptor.booleanYes:descriptor.booleanNo:true\"></i>\n <ng-template #booleanText>\n {{ item | jsonPath: jsonPath | boolean: descriptor.booleanYes:descriptor.booleanNo | translate }}\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeEnum\">\n {{ item | jsonPath: jsonPath | enum: descriptor.enumType:descriptor.enumTitlePath:descriptor.enumNameAsValue | translate }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnTypeCustom\">\n <ng-container\n [mngComponent]=\"descriptor.customComponentType!\"\n [inputs]=\"{\n value: item | jsonPath: jsonPath,\n item: item,\n descriptor: descriptor\n }\"></ng-container>\n </ng-container>\n</ng-container>\n" }]
|
|
37
|
+
}], propDecorators: { descriptor: [{
|
|
38
|
+
type: Input
|
|
39
|
+
}], item: [{
|
|
40
|
+
type: Input
|
|
41
|
+
}] } });
|
|
42
42
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29sdW1uLXZhbHVlLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9saWIvY29tcG9uZW50cy90YWJsZXZpZXcvdGFibGUvY29sdW1uLXZhbHVlL2NvbHVtbi12YWx1ZS5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbGliL2NvbXBvbmVudHMvdGFibGV2aWV3L3RhYmxlL2NvbHVtbi12YWx1ZS9jb2x1bW4tdmFsdWUuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLHVCQUF1QixFQUFFLFNBQVMsRUFBRSxLQUFLLEVBQVMsTUFBTSxlQUFlLENBQUM7QUFFaEYsT0FBTyxFQUFDLGdCQUFnQixFQUFDLE1BQU0seUJBQXlCLENBQUM7Ozs7Ozs7O0FBT3pELE1BQU0sT0FBTyw0QkFBNEI7SUFMekM7UUFN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