@mediusinc/mng-commons 3.5.0 → 3.6.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/fonts/poppins-v20-latin-500.woff +0 -0
- package/assets/fonts/poppins-v20-latin-500.woff2 +0 -0
- package/assets/fonts/poppins-v20-latin-600.woff +0 -0
- package/assets/fonts/poppins-v20-latin-600.woff2 +0 -0
- package/assets/fonts/poppins-v20-latin-700.woff +0 -0
- package/assets/fonts/poppins-v20-latin-700.woff2 +0 -0
- package/assets/fonts/poppins-v20-latin-regular.woff +0 -0
- package/assets/fonts/poppins-v20-latin-regular.woff2 +0 -0
- package/assets/i18n/en.json +6 -2
- package/assets/i18n/sl.json +6 -2
- package/esm2022/lib/api/models/filter-match-type.model.mjs +3 -1
- package/esm2022/lib/api/utils/medius-rest.util.mjs +70 -40
- package/esm2022/lib/components/action/action.component.mjs +5 -5
- package/esm2022/lib/components/action/editor/action-editor.component.mjs +8 -7
- package/esm2022/lib/components/form/autocomplete/autocomplete.component.mjs +96 -23
- package/esm2022/lib/components/form/date-range/date-range.component.mjs +14 -5
- package/esm2022/lib/components/form/dropdown/dropdown.component.mjs +3 -3
- package/esm2022/lib/components/form/formly/fields/formly-field-action/formly-field-action.component.mjs +2 -2
- package/esm2022/lib/components/form/formly/fields/formly-field-input/formly-field-input.component.mjs +3 -3
- package/esm2022/lib/components/form/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.mjs +17 -3
- package/esm2022/lib/components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.mjs +16 -4
- package/esm2022/lib/components/form/formly/fields/formly-field-tabs/formly-field-tabs.component.mjs +2 -2
- package/esm2022/lib/components/layout/menu-item.component.mjs +3 -3
- package/esm2022/lib/components/layout/topbar.component.mjs +2 -2
- package/esm2022/lib/components/layoutV2/breadcrumb.component.mjs +30 -0
- package/esm2022/lib/components/layoutV2/footer.component.mjs +19 -0
- package/esm2022/lib/components/layoutV2/index.mjs +8 -0
- package/esm2022/lib/components/layoutV2/main-layout.component.mjs +89 -0
- package/esm2022/lib/components/layoutV2/menu-item.component.mjs +229 -0
- package/esm2022/lib/components/layoutV2/menu.component.mjs +31 -0
- package/esm2022/lib/components/layoutV2/model/index.mjs +3 -0
- package/esm2022/lib/components/layoutV2/model/layout-state.model.mjs +2 -0
- package/esm2022/lib/components/layoutV2/model/menu.model.mjs +2 -0
- package/esm2022/lib/components/layoutV2/services/index.mjs +3 -0
- package/esm2022/lib/components/layoutV2/services/main-layout.component.service.mjs +53 -0
- package/esm2022/lib/components/layoutV2/services/menu.service.mjs +122 -0
- package/esm2022/lib/components/layoutV2/sidebar.component.mjs +54 -0
- package/esm2022/lib/components/layoutV2/topbar-user.component.mjs +40 -0
- package/esm2022/lib/components/layoutV2/topbar.component.mjs +75 -0
- package/esm2022/lib/components/layoutV2/version.component.mjs +63 -0
- package/esm2022/lib/components/pages/error/error.page.component.mjs +3 -3
- package/esm2022/lib/components/pages/not-found/not-found.page.component.mjs +3 -3
- package/esm2022/lib/components/tableview/index.mjs +2 -1
- package/esm2022/lib/components/tableview/table/column-filter/column-filter.component.mjs +3 -6
- package/esm2022/lib/components/tableview/table/column-filter-full/column-filter-full.component.mjs +471 -0
- package/esm2022/lib/components/tableview/table/column-value/column-value.component.mjs +2 -2
- package/esm2022/lib/components/tableview/table/table.component.mjs +24 -16
- package/esm2022/lib/components/tableview/tableview.component.mjs +6 -5
- package/esm2022/lib/descriptors/editor/editor.descriptor.mjs +131 -34
- package/esm2022/lib/descriptors/editor/field.descriptor.mjs +25 -13
- package/esm2022/lib/descriptors/table/table.descriptor.mjs +10 -1
- package/esm2022/lib/descriptors/types/filter.type.mjs +3 -1
- package/esm2022/lib/directives/dialog-keydown-handler.directive.mjs +49 -0
- package/esm2022/lib/directives/index.mjs +2 -1
- package/esm2022/lib/mng-commons.module.mjs +10 -3
- package/esm2022/lib/models/common-init-event-enum.model.mjs +11 -0
- package/esm2022/lib/models/config.model.mjs +1 -1
- package/esm2022/lib/models/index.mjs +3 -1
- package/esm2022/lib/models/menu-config.model.mjs +2 -0
- package/esm2022/lib/models/menu.model.mjs +1 -1
- package/esm2022/lib/router/route-builder.mjs +55 -16
- package/esm2022/lib/router/routes-builder.mjs +9 -1
- package/esm2022/lib/services/action-executor.service.mjs +3 -4
- package/esm2022/lib/services/commons.service.mjs +26 -4
- package/esm2022/lib/services/internal/commons-init.service.mjs +28 -3
- package/esm2022/lib/utils/coercion.util.mjs +6 -0
- package/esm2022/lib/utils/index.mjs +2 -1
- package/esm2022/lib/utils/route.util.mjs +25 -1
- package/fesm2022/mediusinc-mng-commons.mjs +1897 -308
- package/fesm2022/mediusinc-mng-commons.mjs.map +1 -1
- package/lib/api/models/filter-match-type.model.d.ts +3 -1
- package/lib/components/action/action.component.d.ts +1 -0
- package/lib/components/action/editor/action-editor.component.d.ts +2 -1
- package/lib/components/form/autocomplete/autocomplete.component.d.ts +26 -4
- package/lib/components/form/date-range/date-range.component.d.ts +4 -1
- package/lib/components/layoutV2/breadcrumb.component.d.ts +10 -0
- package/lib/components/layoutV2/footer.component.d.ts +8 -0
- package/lib/components/layoutV2/index.d.ts +7 -0
- package/lib/components/layoutV2/main-layout.component.d.ts +23 -0
- package/lib/components/layoutV2/menu-item.component.d.ts +38 -0
- package/lib/components/layoutV2/menu.component.d.ts +12 -0
- package/lib/components/layoutV2/model/index.d.ts +2 -0
- package/lib/components/layoutV2/model/layout-state.model.d.ts +11 -0
- package/lib/components/layoutV2/model/menu.model.d.ts +4 -0
- package/lib/components/layoutV2/services/index.d.ts +2 -0
- package/lib/components/layoutV2/services/main-layout.component.service.d.ts +14 -0
- package/lib/components/layoutV2/services/menu.service.d.ts +22 -0
- package/lib/components/layoutV2/sidebar.component.d.ts +19 -0
- package/lib/components/layoutV2/topbar-user.component.d.ts +16 -0
- package/lib/components/layoutV2/topbar.component.d.ts +23 -0
- package/lib/components/layoutV2/version.component.d.ts +19 -0
- package/lib/components/tableview/index.d.ts +1 -0
- package/lib/components/tableview/table/column-filter/column-filter.component.d.ts +2 -3
- package/lib/components/tableview/table/column-filter-full/column-filter-full.component.d.ts +85 -0
- package/lib/components/tableview/table/table.component.d.ts +8 -6
- package/lib/descriptors/editor/editor.descriptor.d.ts +139 -42
- package/lib/descriptors/editor/field.descriptor.d.ts +35 -30
- package/lib/descriptors/table/table.descriptor.d.ts +3 -0
- package/lib/descriptors/types/filter.type.d.ts +3 -1
- package/lib/directives/dialog-keydown-handler.directive.d.ts +12 -0
- package/lib/directives/index.d.ts +1 -0
- package/lib/mng-commons.module.d.ts +50 -48
- package/lib/models/common-init-event-enum.model.d.ts +9 -0
- package/lib/models/config.model.d.ts +9 -8
- package/lib/models/index.d.ts +2 -0
- package/lib/models/menu-config.model.d.ts +15 -0
- package/lib/models/menu.model.d.ts +3 -1
- package/lib/router/route-builder.d.ts +21 -3
- package/lib/router/routes-builder.d.ts +5 -0
- package/lib/services/internal/commons-init.service.d.ts +5 -0
- package/lib/utils/coercion.util.d.ts +2 -0
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/route.util.d.ts +19 -30
- package/package.json +2 -2
- package/scss/common/layout/_breadcrumb.scss +0 -1
- package/scss/mng-commons-dark-v2.scss +9 -0
- package/scss/mng-commons-light-v2.scss +9 -0
- package/scss/mng-overrides/_theme_autocomplete.scss +10 -12
- package/scss/mng-overrides/_theme_fileupload.scss +24 -0
- package/scss/mng-overrides/_theme_styles.scss +1 -0
- package/scss/v2/layout/_animation.scss +53 -0
- package/scss/v2/layout/_breadcrumb.scss +97 -0
- package/scss/v2/layout/_config.scss +42 -0
- package/scss/v2/layout/_content.scss +3 -0
- package/scss/v2/layout/_fonts.scss +32 -0
- package/scss/v2/layout/_layout_dark.scss +12 -0
- package/scss/v2/layout/_layout_light.scss +12 -0
- package/scss/v2/layout/_main.scss +54 -0
- package/scss/v2/layout/_profile.scss +10 -0
- package/scss/v2/layout/_responsive.scss +131 -0
- package/scss/v2/layout/_sidebar_drawer.scss +283 -0
- package/scss/v2/layout/_sidebar_horizontal.scss +168 -0
- package/scss/v2/layout/_sidebar_reveal.scss +201 -0
- package/scss/v2/layout/_sidebar_slim.scss +157 -0
- package/scss/v2/layout/_sidebar_slim_plus.scss +167 -0
- package/scss/v2/layout/_sidebar_vertical.scss +176 -0
- package/scss/v2/layout/_topbar.scss +174 -0
- package/scss/v2/layout/_typography.scss +62 -0
- package/scss/v2/layout/_utils.scss +33 -0
- package/scss/v2/layout/layout.scss +24 -0
- package/scss/v2/layout/mng/_mng_layout_footer.scss +33 -0
- package/scss/v2/layout/mng/_mng_layout_menu.scss +10 -0
- package/scss/v2/layout/mng/_mng_layout_styles.scss +3 -0
- package/scss/v2/layout/mng/_mng_layout_topbar.scss +16 -0
- package/scss/v2/layout/preloading.scss +84 -0
- package/scss/v2/theme/theme-base/_colors.scss +18 -0
- package/scss/v2/theme/theme-base/_common.scss +73 -0
- package/scss/v2/theme/theme-base/_components.scss +106 -0
- package/scss/v2/theme/theme-base/_mixins.scss +203 -0
- package/scss/v2/theme/theme-base/components/button/_button.scss +564 -0
- package/scss/v2/theme/theme-base/components/button/_speeddial.scss +86 -0
- package/scss/v2/theme/theme-base/components/button/_splitbutton.scss +381 -0
- package/scss/v2/theme/theme-base/components/data/_carousel.scss +37 -0
- package/scss/v2/theme/theme-base/components/data/_datatable.scss +338 -0
- package/scss/v2/theme/theme-base/components/data/_dataview.scss +55 -0
- package/scss/v2/theme/theme-base/components/data/_filter.scss +138 -0
- package/scss/v2/theme/theme-base/components/data/_fullcalendar.scss +329 -0
- package/scss/v2/theme/theme-base/components/data/_orderlist.scss +103 -0
- package/scss/v2/theme/theme-base/components/data/_organizationchart.scss +50 -0
- package/scss/v2/theme/theme-base/components/data/_paginator.scss +92 -0
- package/scss/v2/theme/theme-base/components/data/_picklist.scss +103 -0
- package/scss/v2/theme/theme-base/components/data/_timeline.scss +38 -0
- package/scss/v2/theme/theme-base/components/data/_tree.scss +149 -0
- package/scss/v2/theme/theme-base/components/data/_treetable.scss +256 -0
- package/scss/v2/theme/theme-base/components/data/_virtualscroller.scss +28 -0
- package/scss/v2/theme/theme-base/components/file/_fileupload.scss +58 -0
- package/scss/v2/theme/theme-base/components/input/_autocomplete.scss +117 -0
- package/scss/v2/theme/theme-base/components/input/_calendar.scss +263 -0
- package/scss/v2/theme/theme-base/components/input/_cascadeselect.scss +130 -0
- package/scss/v2/theme/theme-base/components/input/_checkbox.scss +90 -0
- package/scss/v2/theme/theme-base/components/input/_chips.scss +54 -0
- package/scss/v2/theme/theme-base/components/input/_colorpicker.scss +19 -0
- package/scss/v2/theme/theme-base/components/input/_dropdown.scss +135 -0
- package/scss/v2/theme/theme-base/components/input/_editor.scss +122 -0
- package/scss/v2/theme/theme-base/components/input/_inputgroup.scss +75 -0
- package/scss/v2/theme/theme-base/components/input/_inputmask.scss +16 -0
- package/scss/v2/theme/theme-base/components/input/_inputnumber.scss +28 -0
- package/scss/v2/theme/theme-base/components/input/_inputswitch.scss +60 -0
- package/scss/v2/theme/theme-base/components/input/_inputtext.scss +99 -0
- package/scss/v2/theme/theme-base/components/input/_listbox.scss +82 -0
- package/scss/v2/theme/theme-base/components/input/_multiselect.scss +173 -0
- package/scss/v2/theme/theme-base/components/input/_password.scss +52 -0
- package/scss/v2/theme/theme-base/components/input/_radiobutton.scss +78 -0
- package/scss/v2/theme/theme-base/components/input/_rating.scss +55 -0
- package/scss/v2/theme/theme-base/components/input/_selectbutton.scss +50 -0
- package/scss/v2/theme/theme-base/components/input/_slider.scss +71 -0
- package/scss/v2/theme/theme-base/components/input/_togglebutton.scss +48 -0
- package/scss/v2/theme/theme-base/components/input/_treeselect.scss +139 -0
- package/scss/v2/theme/theme-base/components/menu/_breadcrumb.scss +42 -0
- package/scss/v2/theme/theme-base/components/menu/_contextmenu.scss +61 -0
- package/scss/v2/theme/theme-base/components/menu/_dock.scss +86 -0
- package/scss/v2/theme/theme-base/components/menu/_megamenu.scss +106 -0
- package/scss/v2/theme/theme-base/components/menu/_menu.scss +45 -0
- package/scss/v2/theme/theme-base/components/menu/_menubar.scss +188 -0
- package/scss/v2/theme/theme-base/components/menu/_panelmenu.scss +140 -0
- package/scss/v2/theme/theme-base/components/menu/_slidemenu.scss +64 -0
- package/scss/v2/theme/theme-base/components/menu/_steps.scss +56 -0
- package/scss/v2/theme/theme-base/components/menu/_tabmenu.scss +74 -0
- package/scss/v2/theme/theme-base/components/menu/_tieredmenu.scss +65 -0
- package/scss/v2/theme/theme-base/components/messages/_inlinemessage.scss +69 -0
- package/scss/v2/theme/theme-base/components/messages/_message.scss +107 -0
- package/scss/v2/theme/theme-base/components/messages/_toast.scss +100 -0
- package/scss/v2/theme/theme-base/components/misc/_avatar.scss +30 -0
- package/scss/v2/theme/theme-base/components/misc/_badge.scss +48 -0
- package/scss/v2/theme/theme-base/components/misc/_blockui.scss +0 -0
- package/scss/v2/theme/theme-base/components/misc/_chip.scss +38 -0
- package/scss/v2/theme/theme-base/components/misc/_inplace.scss +17 -0
- package/scss/v2/theme/theme-base/components/misc/_progressbar.scss +17 -0
- package/scss/v2/theme/theme-base/components/misc/_scrolltop.scss +25 -0
- package/scss/v2/theme/theme-base/components/misc/_skeleton.scss +8 -0
- package/scss/v2/theme/theme-base/components/misc/_tag.scss +40 -0
- package/scss/v2/theme/theme-base/components/misc/_terminal.scss +11 -0
- package/scss/v2/theme/theme-base/components/multimedia/_galleria.scss +149 -0
- package/scss/v2/theme/theme-base/components/multimedia/_image.scss +49 -0
- package/scss/v2/theme/theme-base/components/overlay/_confirmpopup.scss +72 -0
- package/scss/v2/theme/theme-base/components/overlay/_dialog.scss +69 -0
- package/scss/v2/theme/theme-base/components/overlay/_overlaypanel.scss +64 -0
- package/scss/v2/theme/theme-base/components/overlay/_sidebar.scss +27 -0
- package/scss/v2/theme/theme-base/components/overlay/_tooltip.scss +33 -0
- package/scss/v2/theme/theme-base/components/panel/_accordion.scss +119 -0
- package/scss/v2/theme/theme-base/components/panel/_card.scss +30 -0
- package/scss/v2/theme/theme-base/components/panel/_divider.scss +31 -0
- package/scss/v2/theme/theme-base/components/panel/_fieldset.scss +47 -0
- package/scss/v2/theme/theme-base/components/panel/_panel.scss +58 -0
- package/scss/v2/theme/theme-base/components/panel/_scrollpanel.scss +6 -0
- package/scss/v2/theme/theme-base/components/panel/_splitter.scss +19 -0
- package/scss/v2/theme/theme-base/components/panel/_tabview.scss +78 -0
- package/scss/v2/theme/theme-base/components/panel/_toolbar.scss +11 -0
- package/scss/v2/theme/theme-base/mng/_mng_mixins.scss +69 -0
- package/scss/v2/theme/theme-base/mng/_mng_theme_autocomplete.scss +34 -0
- package/scss/v2/theme/theme-base/mng/_mng_theme_button.scss +68 -0
- package/scss/v2/theme/theme-base/mng/_mng_theme_datatable.scss +146 -0
- package/scss/v2/theme/theme-base/mng/_mng_theme_datepicker.scss +21 -0
- package/scss/v2/theme/theme-base/mng/_mng_theme_dialog.scss +206 -0
- package/scss/v2/theme/theme-base/mng/_mng_theme_dropdown.scss +22 -0
- package/scss/v2/theme/theme-base/mng/_mng_theme_fileupload.scss +24 -0
- package/scss/v2/theme/theme-base/mng/_mng_theme_forms.scss +66 -0
- package/scss/v2/theme/theme-base/mng/_mng_theme_image.scss +27 -0
- package/scss/v2/theme/theme-base/mng/_mng_theme_input.scss +31 -0
- package/scss/v2/theme/theme-base/mng/_mng_theme_menu.scss +5 -0
- package/scss/v2/theme/theme-base/mng/_mng_theme_multiselect.scss +20 -0
- package/scss/v2/theme/theme-base/mng/_mng_theme_styles.scss +17 -0
- package/scss/v2/theme/theme-base/mng/_mng_theme_tableview.scss +97 -0
- package/scss/v2/theme/theme-base/mng/_mng_theme_tabview.scss +11 -0
- package/scss/v2/theme/theme-base/mng/_mng_theme_toast.scss +3 -0
- package/scss/v2/theme/theme-base/mng/_mng_theme_toolbar.scss +5 -0
- package/scss/v2/theme/theme-base/mng/_mng_variables.scss +15 -0
- package/scss/v2/theme/theme-dark/_extensions.scss +100 -0
- package/scss/v2/theme/theme-dark/_variables.scss +937 -0
- package/scss/v2/theme/theme-dark/blue/theme.scss +13 -0
- package/scss/v2/theme/theme-light/_extensions.scss +100 -0
- package/scss/v2/theme/theme-light/_variables.scss +937 -0
- package/scss/v2/theme/theme-light/blue/theme.scss +13 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as i2$1 from '@angular/common';
|
|
2
|
-
import { DatePipe, AsyncPipe, NgIf, NgForOf, NgSwitch, NgSwitchCase, NgSwitchDefault, DecimalPipe, CurrencyPipe,
|
|
2
|
+
import { DatePipe, AsyncPipe, NgIf, NgForOf, NgSwitch, NgSwitchCase, NgSwitchDefault, NgClass, DecimalPipe, CurrencyPipe, NgStyle, NgTemplateOutlet, JsonPipe, CommonModule, NgOptimizedImage } from '@angular/common';
|
|
3
3
|
import * as i1$1 from '@angular/common/http';
|
|
4
4
|
import { HttpErrorResponse, HttpClient, HttpClientModule, HttpParams } from '@angular/common/http';
|
|
5
5
|
import * as i0 from '@angular/core';
|
|
6
|
-
import { Pipe, InjectionToken, inject, Injectable, Inject, EventEmitter, createComponent, Directive, Input, Output, Component, ChangeDetectionStrategy, Optional, HostBinding, ViewChild, ContentChildren, forwardRef, HostListener, LOCALE_ID, ViewChildren, runInInjectionContext, APP_INITIALIZER, ErrorHandler, NgModule } from '@angular/core';
|
|
6
|
+
import { Pipe, InjectionToken, inject, Injectable, Inject, booleanAttribute, EventEmitter, createComponent, Directive, Input, Output, Component, ChangeDetectionStrategy, Optional, HostBinding, ViewChild, ContentChildren, forwardRef, HostListener, LOCALE_ID, ElementRef, Renderer2, ChangeDetectorRef, signal, computed, ViewEncapsulation, ViewChildren, runInInjectionContext, APP_INITIALIZER, ErrorHandler, NgModule, Injector, DestroyRef } from '@angular/core';
|
|
7
7
|
import * as i1$3 from '@angular/forms';
|
|
8
8
|
import { Validators, FormGroup, FormArray, ReactiveFormsModule, NG_VALUE_ACCESSOR, FormControl, FormsModule } from '@angular/forms';
|
|
9
9
|
import * as i1 from '@angular/router';
|
|
@@ -26,12 +26,12 @@ import { ChipModule } from 'primeng/chip';
|
|
|
26
26
|
import * as i9 from 'primeng/confirmdialog';
|
|
27
27
|
import { ConfirmDialogModule } from 'primeng/confirmdialog';
|
|
28
28
|
import { ConfirmPopupModule } from 'primeng/confirmpopup';
|
|
29
|
-
import * as i4$
|
|
30
|
-
import { DialogModule } from 'primeng/dialog';
|
|
29
|
+
import * as i4$5 from 'primeng/dialog';
|
|
30
|
+
import { Dialog, DialogModule } from 'primeng/dialog';
|
|
31
31
|
import * as i3$1 from 'primeng/dropdown';
|
|
32
32
|
import { Dropdown, DropdownModule } from 'primeng/dropdown';
|
|
33
33
|
import * as i4 from 'primeng/dynamicdialog';
|
|
34
|
-
import { DialogService, DynamicDialogModule } from 'primeng/dynamicdialog';
|
|
34
|
+
import { DialogService, DynamicDialogComponent, DynamicDialogModule } from 'primeng/dynamicdialog';
|
|
35
35
|
import * as i1$5 from 'primeng/fieldset';
|
|
36
36
|
import { FieldsetModule } from 'primeng/fieldset';
|
|
37
37
|
import * as i11$1 from 'primeng/fileupload';
|
|
@@ -44,7 +44,7 @@ import * as i3$2 from 'primeng/inputnumber';
|
|
|
44
44
|
import { InputNumberModule } from 'primeng/inputnumber';
|
|
45
45
|
import * as i6$3 from 'primeng/inputswitch';
|
|
46
46
|
import { InputSwitchModule } from 'primeng/inputswitch';
|
|
47
|
-
import * as
|
|
47
|
+
import * as i6$4 from 'primeng/inputtext';
|
|
48
48
|
import { InputTextModule } from 'primeng/inputtext';
|
|
49
49
|
import * as i13 from 'primeng/inputtextarea';
|
|
50
50
|
import { InputTextareaModule } from 'primeng/inputtextarea';
|
|
@@ -53,44 +53,51 @@ import { MessagesModule } from 'primeng/messages';
|
|
|
53
53
|
import * as i4$2 from 'primeng/multiselect';
|
|
54
54
|
import { MultiSelectModule } from 'primeng/multiselect';
|
|
55
55
|
import { PaginatorModule } from 'primeng/paginator';
|
|
56
|
-
import * as
|
|
56
|
+
import * as i7 from 'primeng/progressspinner';
|
|
57
57
|
import { ProgressSpinnerModule } from 'primeng/progressspinner';
|
|
58
|
-
import * as i7 from 'primeng/radiobutton';
|
|
58
|
+
import * as i7$1 from 'primeng/radiobutton';
|
|
59
59
|
import { RadioButtonModule } from 'primeng/radiobutton';
|
|
60
60
|
import * as i6$1 from 'primeng/ripple';
|
|
61
61
|
import { RippleModule } from 'primeng/ripple';
|
|
62
62
|
import { SelectButtonModule } from 'primeng/selectbutton';
|
|
63
|
-
import * as i6$
|
|
63
|
+
import * as i6$5 from 'primeng/skeleton';
|
|
64
64
|
import { SkeletonModule } from 'primeng/skeleton';
|
|
65
65
|
import { SlideMenuModule } from 'primeng/slidemenu';
|
|
66
66
|
import * as i10 from 'primeng/splitbutton';
|
|
67
67
|
import { SplitButtonModule } from 'primeng/splitbutton';
|
|
68
|
-
import * as i4$
|
|
69
|
-
import {
|
|
68
|
+
import * as i4$4 from 'primeng/table';
|
|
69
|
+
import { Table, TableModule, ColumnFilter } from 'primeng/table';
|
|
70
70
|
import * as i1$4 from 'primeng/tabview';
|
|
71
71
|
import { TabViewModule } from 'primeng/tabview';
|
|
72
72
|
import { TagModule } from 'primeng/tag';
|
|
73
73
|
import * as i3$3 from 'primeng/toast';
|
|
74
74
|
import { ToastModule } from 'primeng/toast';
|
|
75
75
|
import { ToggleButtonModule } from 'primeng/togglebutton';
|
|
76
|
-
import * as
|
|
76
|
+
import * as i6$2 from 'primeng/toolbar';
|
|
77
77
|
import { ToolbarModule } from 'primeng/toolbar';
|
|
78
78
|
import * as i4$1 from 'primeng/tooltip';
|
|
79
79
|
import { TooltipModule } from 'primeng/tooltip';
|
|
80
80
|
import * as i1$2 from 'primeng/api';
|
|
81
|
-
import { PrimeNGConfig, FilterService, FilterMatchMode, ConfirmationService, MessageService } from 'primeng/api';
|
|
81
|
+
import { PrimeNGConfig, FilterService, FilterMatchMode, ConfirmationService, MessageService, OverlayService, TranslationKeys } from 'primeng/api';
|
|
82
82
|
import * as i11 from 'primeng/menu';
|
|
83
83
|
import { MenuModule } from 'primeng/menu';
|
|
84
|
-
import { isObservable, throwError, BehaviorSubject, Subject, ReplaySubject, distinctUntilChanged, take, mergeMap, of, combineLatest, switchMap, from, timeout, tap, Observable, debounceTime, merge } from 'rxjs';
|
|
84
|
+
import { isObservable, throwError, BehaviorSubject, Subject, ReplaySubject, distinctUntilChanged, take, mergeMap, of, combineLatest, switchMap, from, timeout, tap, Observable, debounceTime, merge, filter as filter$1 } from 'rxjs';
|
|
85
85
|
import { filter, map, startWith, catchError, first, mergeMap as mergeMap$1, take as take$1 } from 'rxjs/operators';
|
|
86
|
-
import { logger } from 'nx/src/utils/logger';
|
|
87
86
|
import 'reflect-metadata';
|
|
88
87
|
import { Title, DomSanitizer } from '@angular/platform-browser';
|
|
89
88
|
import { ZIndexUtils } from 'primeng/utils';
|
|
90
89
|
import { TimesIcon } from 'primeng/icons/times';
|
|
91
|
-
import
|
|
90
|
+
import { trigger, transition, style, animate, state } from '@angular/animations';
|
|
91
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
92
|
+
import { DomHandler, ConnectedOverlayScrollHandler } from 'primeng/dom';
|
|
93
|
+
import { FilterIcon } from 'primeng/icons/filter';
|
|
94
|
+
import { FilterSlashIcon } from 'primeng/icons/filterslash';
|
|
95
|
+
import * as i4$3 from 'primeng/tristatecheckbox';
|
|
96
|
+
import { TriStateCheckboxModule } from 'primeng/tristatecheckbox';
|
|
97
|
+
import * as i5$1 from 'primeng/message';
|
|
92
98
|
import { MessageModule } from 'primeng/message';
|
|
93
|
-
import
|
|
99
|
+
import * as i3$4 from 'primeng/styleclass';
|
|
100
|
+
import { StyleClassModule } from 'primeng/styleclass';
|
|
94
101
|
|
|
95
102
|
/**
|
|
96
103
|
* Generated API
|
|
@@ -115,6 +122,8 @@ var MediusFilterMatchType;
|
|
|
115
122
|
MediusFilterMatchType["NotIn"] = "NOT_IN";
|
|
116
123
|
MediusFilterMatchType["SmallerThan"] = "SMALLER_THAN";
|
|
117
124
|
MediusFilterMatchType["GreaterThan"] = "GREATER_THAN";
|
|
125
|
+
MediusFilterMatchType["Exists"] = "EXISTS";
|
|
126
|
+
MediusFilterMatchType["DoesNotExist"] = "DOES_NOT_EXIST";
|
|
118
127
|
})(MediusFilterMatchType || (MediusFilterMatchType = {}));
|
|
119
128
|
|
|
120
129
|
class MediusFilterParam {
|
|
@@ -381,6 +390,17 @@ var LogLevelEnum;
|
|
|
381
390
|
LogLevelEnum[LogLevelEnum["Error"] = 5] = "Error";
|
|
382
391
|
})(LogLevelEnum || (LogLevelEnum = {}));
|
|
383
392
|
|
|
393
|
+
var MngCommonsInitEventEnum;
|
|
394
|
+
(function (MngCommonsInitEventEnum) {
|
|
395
|
+
MngCommonsInitEventEnum[MngCommonsInitEventEnum["CommonsInitStart"] = 0] = "CommonsInitStart";
|
|
396
|
+
MngCommonsInitEventEnum[MngCommonsInitEventEnum["ConfigSourceModuleLoaded"] = 1] = "ConfigSourceModuleLoaded";
|
|
397
|
+
MngCommonsInitEventEnum[MngCommonsInitEventEnum["ConfigSourceProjectEnvLoaded"] = 2] = "ConfigSourceProjectEnvLoaded";
|
|
398
|
+
MngCommonsInitEventEnum[MngCommonsInitEventEnum["ConfigSourceJsonAdded"] = 3] = "ConfigSourceJsonAdded";
|
|
399
|
+
MngCommonsInitEventEnum[MngCommonsInitEventEnum["ConfigSourceJsonLoaded"] = 4] = "ConfigSourceJsonLoaded";
|
|
400
|
+
MngCommonsInitEventEnum[MngCommonsInitEventEnum["CommonsInitEnd"] = 5] = "CommonsInitEnd";
|
|
401
|
+
MngCommonsInitEventEnum[MngCommonsInitEventEnum["CommonsInitError"] = 6] = "CommonsInitError";
|
|
402
|
+
})(MngCommonsInitEventEnum || (MngCommonsInitEventEnum = {}));
|
|
403
|
+
|
|
384
404
|
class ActionDataProviderUtil {
|
|
385
405
|
static runGetAllOrFail(ctx) {
|
|
386
406
|
const dataProviderExec = ActionDataProviderUtil.runGetAllDataProvider(ctx);
|
|
@@ -798,6 +818,8 @@ var FilterMatchModeEnum;
|
|
|
798
818
|
FilterMatchModeEnum["DateIsNot"] = "dateIsNot";
|
|
799
819
|
FilterMatchModeEnum["DateBefore"] = "dateBefore";
|
|
800
820
|
FilterMatchModeEnum["DateAfter"] = "dateAfter";
|
|
821
|
+
FilterMatchModeEnum["Exists"] = "is";
|
|
822
|
+
FilterMatchModeEnum["DoesNotExist"] = "isNot";
|
|
801
823
|
})(FilterMatchModeEnum || (FilterMatchModeEnum = {}));
|
|
802
824
|
var FilterLookupTypeEnum;
|
|
803
825
|
(function (FilterLookupTypeEnum) {
|
|
@@ -1903,9 +1925,31 @@ class MngCommonsService {
|
|
|
1903
1925
|
// ripple
|
|
1904
1926
|
this.primengConfig.ripple = true;
|
|
1905
1927
|
this.primengConfig.filterMatchModeOptions = {
|
|
1906
|
-
text: [
|
|
1907
|
-
|
|
1908
|
-
|
|
1928
|
+
text: [
|
|
1929
|
+
FilterMatchModeEnum.Contains,
|
|
1930
|
+
FilterMatchModeEnum.Equals,
|
|
1931
|
+
FilterMatchModeEnum.NotEquals,
|
|
1932
|
+
FilterMatchModeEnum.StartsWith,
|
|
1933
|
+
FilterMatchModeEnum.EndsWith,
|
|
1934
|
+
FilterMatchModeEnum.Exists,
|
|
1935
|
+
FilterMatchModeEnum.DoesNotExist
|
|
1936
|
+
],
|
|
1937
|
+
numeric: [
|
|
1938
|
+
FilterMatchModeEnum.Equals,
|
|
1939
|
+
FilterMatchModeEnum.NotEquals,
|
|
1940
|
+
FilterMatchModeEnum.LessThan,
|
|
1941
|
+
FilterMatchModeEnum.GreaterThan,
|
|
1942
|
+
FilterMatchModeEnum.Exists,
|
|
1943
|
+
FilterMatchModeEnum.DoesNotExist
|
|
1944
|
+
],
|
|
1945
|
+
date: [
|
|
1946
|
+
FilterMatchModeEnum.DateIs,
|
|
1947
|
+
FilterMatchModeEnum.DateBefore,
|
|
1948
|
+
FilterMatchModeEnum.DateAfter,
|
|
1949
|
+
FilterMatchModeEnum.Between,
|
|
1950
|
+
FilterMatchModeEnum.Exists,
|
|
1951
|
+
FilterMatchModeEnum.DoesNotExist
|
|
1952
|
+
]
|
|
1909
1953
|
};
|
|
1910
1954
|
// translate
|
|
1911
1955
|
this.translate.langs = this.appLanguages;
|
|
@@ -2740,11 +2784,11 @@ class MngActionExecutorService {
|
|
|
2740
2784
|
}
|
|
2741
2785
|
// finish related actions
|
|
2742
2786
|
if (instance.nextActionInstance) {
|
|
2743
|
-
logger.debug(`Finishing instance ${instance.instanceLongName} related next action instance: ${instance.nextActionInstance.instanceLongName}`);
|
|
2787
|
+
this.logger.debug(`Finishing instance ${instance.instanceLongName} related next action instance: ${instance.nextActionInstance.instanceLongName}`);
|
|
2744
2788
|
this.finishAction(instance.nextActionInstance, onDestroy);
|
|
2745
2789
|
}
|
|
2746
2790
|
if (instance.errorActionInstance) {
|
|
2747
|
-
logger.debug(`Finishing instance ${instance.instanceLongName} related error action instance: ${instance.errorActionInstance.instanceLongName}`);
|
|
2791
|
+
this.logger.debug(`Finishing instance ${instance.instanceLongName} related error action instance: ${instance.errorActionInstance.instanceLongName}`);
|
|
2748
2792
|
this.finishAction(instance.errorActionInstance, onDestroy);
|
|
2749
2793
|
}
|
|
2750
2794
|
}
|
|
@@ -3702,7 +3746,9 @@ class MediusRestUtil {
|
|
|
3702
3746
|
[FilterMatchMode.DATE_IS, 'dteq', MediusFilterMatchType.Equals, FilterTypeEnum.Date],
|
|
3703
3747
|
[FilterMatchMode.DATE_BEFORE, 'lt', MediusFilterMatchType.SmallerThan, FilterTypeEnum.Date],
|
|
3704
3748
|
[FilterMatchMode.DATE_AFTER, 'gt', MediusFilterMatchType.GreaterThan, FilterTypeEnum.Date],
|
|
3705
|
-
[FilterMatchMode.DATE_IS_NOT, 'neq', MediusFilterMatchType.NotEquals, FilterTypeEnum.Date]
|
|
3749
|
+
[FilterMatchMode.DATE_IS_NOT, 'neq', MediusFilterMatchType.NotEquals, FilterTypeEnum.Date],
|
|
3750
|
+
[FilterMatchMode.IS, 'ex', MediusFilterMatchType.Exists, null],
|
|
3751
|
+
[FilterMatchMode.IS_NOT, 'dne', MediusFilterMatchType.DoesNotExist, null]
|
|
3706
3752
|
];
|
|
3707
3753
|
this.dateTimeInUtc = true;
|
|
3708
3754
|
this.dateTimeWithTimezone = true;
|
|
@@ -3748,19 +3794,42 @@ class MediusRestUtil {
|
|
|
3748
3794
|
// prepare value
|
|
3749
3795
|
let value = filterFieldSplit.length > 2 ? filterFieldSplit.slice(2).join(':') : '';
|
|
3750
3796
|
let valueTo = undefined;
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3797
|
+
const valueTransformer = (v) => {
|
|
3798
|
+
const vLower = v.toLowerCase();
|
|
3799
|
+
if (v.startsWith("'")) {
|
|
3800
|
+
// string
|
|
3801
|
+
return v.substring(1, v.length - 1);
|
|
3802
|
+
}
|
|
3803
|
+
else if (vLower === 'true' || vLower === 'false') {
|
|
3804
|
+
// boolean
|
|
3805
|
+
return vLower === 'true';
|
|
3806
|
+
}
|
|
3807
|
+
else if (vLower === 'null') {
|
|
3808
|
+
// null
|
|
3809
|
+
return null;
|
|
3810
|
+
}
|
|
3811
|
+
else {
|
|
3812
|
+
// number
|
|
3813
|
+
return parseFloat(v);
|
|
3814
|
+
}
|
|
3815
|
+
};
|
|
3754
3816
|
if (value.startsWith('[') && value.endsWith(']')) {
|
|
3817
|
+
// array
|
|
3755
3818
|
value = value
|
|
3756
3819
|
.substring(1, value.length - 1)
|
|
3757
3820
|
.split(',')
|
|
3758
|
-
.map((v) => (v
|
|
3821
|
+
.map((v) => valueTransformer(v));
|
|
3822
|
+
}
|
|
3823
|
+
else {
|
|
3824
|
+
value = valueTransformer(value);
|
|
3759
3825
|
}
|
|
3760
3826
|
if (operator === 'ft') {
|
|
3761
3827
|
valueTo = value[1];
|
|
3762
3828
|
value = value[0];
|
|
3763
3829
|
}
|
|
3830
|
+
else if (operator === 'ex' || operator === 'dne') {
|
|
3831
|
+
value = null;
|
|
3832
|
+
}
|
|
3764
3833
|
const filterDescriptor = filterDescriptors.find(f => f.property === field);
|
|
3765
3834
|
const matchMode = this.getMapping(operator, filterDescriptor?.filterType, 1);
|
|
3766
3835
|
if (matchMode && filterDescriptor) {
|
|
@@ -3800,38 +3869,40 @@ class MediusRestUtil {
|
|
|
3800
3869
|
const primeOperator = fieldFilter.matchMode;
|
|
3801
3870
|
let value = fieldFilter.value;
|
|
3802
3871
|
const operatorMapping = primeOperator ? this.getMapping(primeOperator, undefined, 0) : undefined;
|
|
3803
|
-
if (operatorMapping
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
else if (typeof value === 'number') {
|
|
3810
|
-
doAddFilter = true;
|
|
3811
|
-
}
|
|
3812
|
-
else if (typeof value === 'boolean') {
|
|
3813
|
-
doAddFilter = true;
|
|
3814
|
-
}
|
|
3815
|
-
else if (Array.isArray(value)) {
|
|
3816
|
-
const joinedValue = value
|
|
3817
|
-
.map(v => {
|
|
3818
|
-
if (v instanceof Date) {
|
|
3819
|
-
// for query params, always convert to iso string, correct transformation will be done later
|
|
3820
|
-
return v.toISOString();
|
|
3872
|
+
if (operatorMapping) {
|
|
3873
|
+
if (typeof value !== 'undefined' && value !== null) {
|
|
3874
|
+
let doAddFilter = false;
|
|
3875
|
+
const transformValue = (v) => {
|
|
3876
|
+
if (typeof v === 'string' && v.length > 0) {
|
|
3877
|
+
return [`'${v}'`, true];
|
|
3821
3878
|
}
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
|
|
3879
|
+
else if (typeof v === 'number' || typeof v === 'boolean') {
|
|
3880
|
+
return [v, true];
|
|
3881
|
+
}
|
|
3882
|
+
else if (v instanceof Date) {
|
|
3883
|
+
return [v.toISOString(), true];
|
|
3884
|
+
}
|
|
3885
|
+
else {
|
|
3886
|
+
return [null, false];
|
|
3887
|
+
}
|
|
3888
|
+
};
|
|
3889
|
+
if (Array.isArray(value)) {
|
|
3890
|
+
value = `[${value
|
|
3891
|
+
.map(v => transformValue(v))
|
|
3892
|
+
.filter(v => v[1])
|
|
3893
|
+
.map(v => v[0])
|
|
3894
|
+
.join(',')}]`;
|
|
3895
|
+
doAddFilter = true;
|
|
3896
|
+
}
|
|
3897
|
+
else {
|
|
3898
|
+
[value, doAddFilter] = transformValue(value);
|
|
3899
|
+
}
|
|
3900
|
+
if (doAddFilter) {
|
|
3901
|
+
filters.push(`${field}:${operatorMapping[1]}:${value}`);
|
|
3902
|
+
}
|
|
3832
3903
|
}
|
|
3833
|
-
if (
|
|
3834
|
-
filters.push(`${field}:${operatorMapping[1]}
|
|
3904
|
+
else if (operatorMapping[2] === MediusFilterMatchType.Exists || operatorMapping[2] === MediusFilterMatchType.DoesNotExist) {
|
|
3905
|
+
filters.push(`${field}:${operatorMapping[1]}`);
|
|
3835
3906
|
}
|
|
3836
3907
|
}
|
|
3837
3908
|
}
|
|
@@ -3904,12 +3975,10 @@ class MediusRestUtil {
|
|
|
3904
3975
|
for (const key of Object.keys(event.filters)) {
|
|
3905
3976
|
const filterEvent = event.filters[key];
|
|
3906
3977
|
if (Array.isArray(filterEvent)) {
|
|
3907
|
-
filterEvent.
|
|
3978
|
+
filterEvent.forEach(e => this.addMediusFilterFromPrimeFilterMetadata(queryParamBuilder, key, e));
|
|
3908
3979
|
}
|
|
3909
3980
|
else if (typeof filterEvent === 'object') {
|
|
3910
|
-
|
|
3911
|
-
this.addMediusFilterFromPrimeFilterMetadata(queryParamBuilder, key, filterEvent);
|
|
3912
|
-
}
|
|
3981
|
+
this.addMediusFilterFromPrimeFilterMetadata(queryParamBuilder, key, filterEvent);
|
|
3913
3982
|
}
|
|
3914
3983
|
}
|
|
3915
3984
|
}
|
|
@@ -3917,6 +3986,11 @@ class MediusRestUtil {
|
|
|
3917
3986
|
}
|
|
3918
3987
|
addMediusFilterFromPrimeFilterMetadata(queryParamBuilder, property, filterMetadata) {
|
|
3919
3988
|
const matchType = this.getMediusFilterMatchTypeFromPrimeMatchMode(filterMetadata.matchMode ?? 'equals');
|
|
3989
|
+
if (matchType[2] !== MediusFilterMatchType.Exists &&
|
|
3990
|
+
matchType[2] !== MediusFilterMatchType.DoesNotExist &&
|
|
3991
|
+
(filterMetadata.value === null || typeof filterMetadata.value === 'undefined')) {
|
|
3992
|
+
return;
|
|
3993
|
+
}
|
|
3920
3994
|
queryParamBuilder.withFilter(property, filterMetadata.value, undefined, matchType);
|
|
3921
3995
|
}
|
|
3922
3996
|
getMediusFilterMatchTypeFromPrimeMatchMode(matchMode, dataType) {
|
|
@@ -5429,6 +5503,7 @@ class TableDescriptor {
|
|
|
5429
5503
|
this._columnResizeMode = 'expand';
|
|
5430
5504
|
this._autoGenerated = false;
|
|
5431
5505
|
this._isLocalized = false;
|
|
5506
|
+
this._deprecatedFilters = false;
|
|
5432
5507
|
this._modelType = modelType;
|
|
5433
5508
|
this._model = new ModelDescriptor(modelType, idProperty, titleProperty, i18nBaseKey);
|
|
5434
5509
|
this._dataKeyProperty = idProperty ?? ModelUtil.findIdAttribute(modelType) ?? undefined;
|
|
@@ -5545,6 +5620,9 @@ class TableDescriptor {
|
|
|
5545
5620
|
get localizationLocaleProperty() {
|
|
5546
5621
|
return this._localizationLocaleProperty;
|
|
5547
5622
|
}
|
|
5623
|
+
get deprecatedFilters() {
|
|
5624
|
+
return this._deprecatedFilters;
|
|
5625
|
+
}
|
|
5548
5626
|
/**
|
|
5549
5627
|
* dataKey is used for the purpose of combined saving user preferences in localstorage if 2 tables have the same dataKey they will share the same localstorage entry.
|
|
5550
5628
|
* Similarly, this property can also be used to differentiate two tables of the same model on the same url (so that they have separate entries in localstorage).
|
|
@@ -5747,6 +5825,7 @@ class TableDescriptor {
|
|
|
5747
5825
|
obj._localizationLocaleProperty = this._localizationLocaleProperty;
|
|
5748
5826
|
obj._paginationMode = this._paginationMode;
|
|
5749
5827
|
obj._rowsPerPageOptions = this._rowsPerPageOptions;
|
|
5828
|
+
obj._deprecatedFilters = this._deprecatedFilters;
|
|
5750
5829
|
}
|
|
5751
5830
|
copy() {
|
|
5752
5831
|
const descriptor = new TableDescriptor(this.model.type, this.model.idPropertyName, this.model.titlePropertyName);
|
|
@@ -5827,6 +5906,10 @@ class TableDescriptor {
|
|
|
5827
5906
|
}
|
|
5828
5907
|
return this;
|
|
5829
5908
|
}
|
|
5909
|
+
withDeprecatedFilters(deprecatedFilters = true) {
|
|
5910
|
+
this._deprecatedFilters = deprecatedFilters;
|
|
5911
|
+
return this;
|
|
5912
|
+
}
|
|
5830
5913
|
}
|
|
5831
5914
|
class TableDynamicDescriptor extends TableDescriptor {
|
|
5832
5915
|
constructor(idProperty, titleProperty, i18nBaseKey) {
|
|
@@ -6359,23 +6442,35 @@ class AGenericFieldDescriptor {
|
|
|
6359
6442
|
this._config = config;
|
|
6360
6443
|
return this;
|
|
6361
6444
|
}
|
|
6445
|
+
/**
|
|
6446
|
+
* Override toJSON implementation to prevent overflow with circular dependency.
|
|
6447
|
+
* @ignore
|
|
6448
|
+
*/
|
|
6449
|
+
toJSON() {
|
|
6450
|
+
const jsonObj = {
|
|
6451
|
+
...this,
|
|
6452
|
+
_editor: undefined
|
|
6453
|
+
};
|
|
6454
|
+
const jsonObjStr = JSON.stringify(jsonObj);
|
|
6455
|
+
return jsonObjStr;
|
|
6456
|
+
}
|
|
6362
6457
|
}
|
|
6363
6458
|
class AFieldDescriptor extends AGenericFieldDescriptor {
|
|
6364
6459
|
constructor(editor, property) {
|
|
6365
6460
|
super(editor);
|
|
6366
|
-
this._required = false;
|
|
6367
|
-
this._requiredHideLabelMarker = false;
|
|
6368
|
-
this._disabled = false;
|
|
6369
|
-
this._validations = [];
|
|
6370
|
-
this._asyncValidations = [];
|
|
6371
|
-
this._updateOn = 'change';
|
|
6372
|
-
this._className = '';
|
|
6373
|
-
this._labelClassName = '';
|
|
6374
|
-
this._inputClassName = '';
|
|
6375
|
-
this._size = FieldSizeEnum.Normal;
|
|
6461
|
+
/** @ignore */ this._required = false;
|
|
6462
|
+
/** @ignore */ this._requiredHideLabelMarker = false;
|
|
6463
|
+
/** @ignore */ this._disabled = false;
|
|
6464
|
+
/** @ignore */ this._validations = [];
|
|
6465
|
+
/** @ignore */ this._asyncValidations = [];
|
|
6466
|
+
/** @ignore */ this._updateOn = 'change';
|
|
6467
|
+
/** @ignore */ this._className = '';
|
|
6468
|
+
/** @ignore */ this._labelClassName = '';
|
|
6469
|
+
/** @ignore */ this._inputClassName = '';
|
|
6470
|
+
/** @ignore */ this._size = FieldSizeEnum.Normal;
|
|
6376
6471
|
// localization
|
|
6377
|
-
this._isLocalized = false;
|
|
6378
|
-
this._eventsSubject = new Subject();
|
|
6472
|
+
/** @ignore */ this._isLocalized = false;
|
|
6473
|
+
/** @ignore */ this._eventsSubject = new Subject();
|
|
6379
6474
|
this._property = property;
|
|
6380
6475
|
this._label = I18nUtils.Type.getPropertyKey(this._editor.model.i18nBaseKey, property);
|
|
6381
6476
|
}
|
|
@@ -7429,36 +7524,42 @@ class FieldGroupDescriptor extends AFieldGroupDescriptor {
|
|
|
7429
7524
|
|
|
7430
7525
|
class EditorDescriptor {
|
|
7431
7526
|
static { this.defaultGroupName = '_default'; }
|
|
7527
|
+
/**
|
|
7528
|
+
* Creates new instance of editor descriptor.
|
|
7529
|
+
* @param modelType Model's class.
|
|
7530
|
+
* @param idProperty Id property representing model (optional).
|
|
7531
|
+
* @param titleProperty Title property representing model (optional). If not provided, it will be automatically chosen.
|
|
7532
|
+
* @param tableviewEditorType Type of editor in tableview (add, edit, view or none).
|
|
7533
|
+
* @param i18nBaseKey Base key for translations.
|
|
7534
|
+
*/
|
|
7432
7535
|
constructor(modelType, idProperty, titleProperty, tableviewEditorType = TableviewEditorTypeEnum.None, i18nBaseKey) {
|
|
7433
|
-
this._tabs = [];
|
|
7434
|
-
this._groups = [];
|
|
7435
|
-
this._fields = [];
|
|
7436
|
-
this._disabled = false;
|
|
7437
|
-
this._isLocalized = false;
|
|
7438
|
-
this._eventsSubject = new Subject();
|
|
7536
|
+
/** @ignore */ this._tabs = [];
|
|
7537
|
+
/** @ignore */ this._groups = [];
|
|
7538
|
+
/** @ignore */ this._fields = [];
|
|
7539
|
+
/** @ignore */ this._disabled = false;
|
|
7540
|
+
/** @ignore */ this._isLocalized = false;
|
|
7541
|
+
/** @ignore */ this._eventsSubject = new Subject();
|
|
7439
7542
|
this._modelType = modelType;
|
|
7440
7543
|
this._model = new ModelDescriptor(modelType, idProperty, titleProperty, i18nBaseKey);
|
|
7441
7544
|
this._tableviewEditorType = tableviewEditorType;
|
|
7442
7545
|
}
|
|
7443
7546
|
/**
|
|
7444
|
-
*
|
|
7445
|
-
*
|
|
7446
|
-
* @param
|
|
7447
|
-
* @param
|
|
7448
|
-
* @param
|
|
7449
|
-
* @param tableEditorType
|
|
7547
|
+
* Creates editor descriptor automatically based on openapi model's attributes definition which is automatically extracted. All fields will be included.
|
|
7548
|
+
* @param modelType Model's class.
|
|
7549
|
+
* @param idProperty Id property representing model (optional).
|
|
7550
|
+
* @param titleProperty Title property representing model (optional). If not provided, it will be automatically chosen.
|
|
7551
|
+
* @param tableEditorType Type of editor in tableview (add, edit, view or none).
|
|
7450
7552
|
*/
|
|
7451
7553
|
static from(modelType, idProperty, titleProperty, tableEditorType = TableviewEditorTypeEnum.None) {
|
|
7452
7554
|
return EditorDescriptor.fromModelWithAttributes(modelType, TableviewUtil.getAttributeDefMap(modelType), titleProperty, idProperty, tableEditorType);
|
|
7453
7555
|
}
|
|
7454
7556
|
/**
|
|
7455
|
-
*
|
|
7456
|
-
*
|
|
7457
|
-
* @param
|
|
7458
|
-
* @param
|
|
7459
|
-
* @param
|
|
7460
|
-
* @param
|
|
7461
|
-
* @param tableEditorType
|
|
7557
|
+
* Creates editor descriptor automatically based on openapi model's attributes definition provided in parameters. Only fields for provided attributes will be included.
|
|
7558
|
+
* @param modelType Model's class.
|
|
7559
|
+
* @param attributes List of attribute definitions from which fields should be created.
|
|
7560
|
+
* @param idProperty Id property representing model (optional).
|
|
7561
|
+
* @param titleProperty Title property representing model (optional). If not provided, it will be automatically chosen.
|
|
7562
|
+
* @param tableEditorType Type of editor in tableview (add, edit, view or none).
|
|
7462
7563
|
*/
|
|
7463
7564
|
static fromModelWithAttributes(modelType, attributes, idProperty, titleProperty, tableEditorType = TableviewEditorTypeEnum.None) {
|
|
7464
7565
|
const descriptor = new EditorDescriptor(modelType, idProperty, titleProperty, tableEditorType);
|
|
@@ -7467,18 +7568,33 @@ class EditorDescriptor {
|
|
|
7467
7568
|
.forEach(attr => descriptor.upsertFieldFromAttributeDef(attr, descriptor.fields.find(col => col.property === attr.name)));
|
|
7468
7569
|
return descriptor;
|
|
7469
7570
|
}
|
|
7571
|
+
/**
|
|
7572
|
+
* Model descriptor for editor.
|
|
7573
|
+
*/
|
|
7470
7574
|
get model() {
|
|
7471
7575
|
return this._model;
|
|
7472
7576
|
}
|
|
7577
|
+
/**
|
|
7578
|
+
* Editor's tabs.
|
|
7579
|
+
*/
|
|
7473
7580
|
get tabs() {
|
|
7474
7581
|
return this._tabs;
|
|
7475
7582
|
}
|
|
7583
|
+
/**
|
|
7584
|
+
* Editor's fields.
|
|
7585
|
+
*/
|
|
7476
7586
|
get fields() {
|
|
7477
7587
|
return this._fields;
|
|
7478
7588
|
}
|
|
7589
|
+
/**
|
|
7590
|
+
* Type of editor for tableview.
|
|
7591
|
+
*/
|
|
7479
7592
|
get tableviewEditorType() {
|
|
7480
7593
|
return this._tableviewEditorType;
|
|
7481
7594
|
}
|
|
7595
|
+
/**
|
|
7596
|
+
* If editor is disabled.
|
|
7597
|
+
*/
|
|
7482
7598
|
get disabled() {
|
|
7483
7599
|
return this._disabled;
|
|
7484
7600
|
}
|
|
@@ -7497,6 +7613,11 @@ class EditorDescriptor {
|
|
|
7497
7613
|
get localeLookup() {
|
|
7498
7614
|
return this._localeLookup;
|
|
7499
7615
|
}
|
|
7616
|
+
/**
|
|
7617
|
+
* Creates new tab group. Next added fields are added to newly created tab group.
|
|
7618
|
+
* @param name Name of the group.
|
|
7619
|
+
* @param title Title key for the tab.
|
|
7620
|
+
*/
|
|
7500
7621
|
createTabGroup(name, title) {
|
|
7501
7622
|
const tabGroup = new FieldTabGroupDescriptor(this, name);
|
|
7502
7623
|
if (!title) {
|
|
@@ -7506,6 +7627,11 @@ class EditorDescriptor {
|
|
|
7506
7627
|
this.createTabGroupDescriptor(tabGroup);
|
|
7507
7628
|
return tabGroup;
|
|
7508
7629
|
}
|
|
7630
|
+
/**
|
|
7631
|
+
* Creates new field group. Next added fields are added to newly created field group.
|
|
7632
|
+
* @param name Name of the group.
|
|
7633
|
+
* @param title Title key for the group.
|
|
7634
|
+
*/
|
|
7509
7635
|
createFieldGroup(name, title) {
|
|
7510
7636
|
const fieldGroup = new FieldGroupDescriptor(this, name);
|
|
7511
7637
|
if (title !== null) {
|
|
@@ -7517,20 +7643,28 @@ class EditorDescriptor {
|
|
|
7517
7643
|
this.createFieldGroupDescriptor(fieldGroup);
|
|
7518
7644
|
return fieldGroup;
|
|
7519
7645
|
}
|
|
7646
|
+
/**
|
|
7647
|
+
* Adds field by the descriptor.
|
|
7648
|
+
* @param field Field descriptor.
|
|
7649
|
+
*/
|
|
7520
7650
|
addFieldDescriptor(field) {
|
|
7521
7651
|
this.createDefaultGroup();
|
|
7522
7652
|
this._fields.push(field);
|
|
7523
7653
|
this._currentGroup?.addField(field);
|
|
7524
7654
|
return this;
|
|
7525
7655
|
}
|
|
7656
|
+
/**
|
|
7657
|
+
* Adds field by the model property name.
|
|
7658
|
+
* @param property Model property name.
|
|
7659
|
+
*/
|
|
7526
7660
|
addField(property) {
|
|
7527
7661
|
const field = new FieldInputDescriptor(this, property);
|
|
7528
7662
|
this.addFieldDescriptor(field);
|
|
7529
7663
|
return field;
|
|
7530
7664
|
}
|
|
7531
7665
|
/**
|
|
7532
|
-
*
|
|
7533
|
-
* @param property
|
|
7666
|
+
* Removes field by the model property name.
|
|
7667
|
+
* @param property Model property name.
|
|
7534
7668
|
*/
|
|
7535
7669
|
removeField(property) {
|
|
7536
7670
|
const fieldIdx = this._fields.findIndex(f => f.property === property);
|
|
@@ -7546,6 +7680,10 @@ class EditorDescriptor {
|
|
|
7546
7680
|
}
|
|
7547
7681
|
this._fields.splice(fieldIdx, 1);
|
|
7548
7682
|
}
|
|
7683
|
+
/**
|
|
7684
|
+
* Gets field by the model property name.
|
|
7685
|
+
* @param property Model property name.
|
|
7686
|
+
*/
|
|
7549
7687
|
getField(property) {
|
|
7550
7688
|
return this._fields.find(f => f.property === property) ?? null;
|
|
7551
7689
|
}
|
|
@@ -7554,35 +7692,72 @@ class EditorDescriptor {
|
|
|
7554
7692
|
this.addFieldDescriptor(field);
|
|
7555
7693
|
return field;
|
|
7556
7694
|
}
|
|
7695
|
+
/**
|
|
7696
|
+
* Adds lookup field.
|
|
7697
|
+
* @param property Model property name.
|
|
7698
|
+
* @param modelType Model's class type (must be registered in ObjectSerializer!).
|
|
7699
|
+
*/
|
|
7557
7700
|
addFieldLookup(property, modelType) {
|
|
7558
7701
|
const field = new FieldLookupDescriptor(this, property, modelType);
|
|
7559
7702
|
this.addFieldDescriptor(field);
|
|
7560
7703
|
return field;
|
|
7561
7704
|
}
|
|
7705
|
+
/**
|
|
7706
|
+
* Adds enum lookup field.
|
|
7707
|
+
* @param property Model's property name.
|
|
7708
|
+
* @param enumType Type of enum (must be registered in ObjectSerializer!).
|
|
7709
|
+
* @param options Provides subset of enum's available constants.
|
|
7710
|
+
* @param nameAsValue If constant's name should be used as final value of the enum. Primarily, constant's value will be used.
|
|
7711
|
+
* @param optionsTitlePath Title key path from where translations are provided. If null, the enum's values won't be translated.
|
|
7712
|
+
*/
|
|
7562
7713
|
addFieldLookupEnum(property, enumType, options, nameAsValue = false, optionsTitlePath) {
|
|
7563
7714
|
const field = new FieldLookupEnumDescriptor(this, property, enumType, options, nameAsValue, optionsTitlePath);
|
|
7564
7715
|
this.addFieldDescriptor(field);
|
|
7565
7716
|
return field;
|
|
7566
7717
|
}
|
|
7718
|
+
/**
|
|
7719
|
+
* Adds table/details/add/edit field for one-to-many (1:n) relations.
|
|
7720
|
+
* @param property Model's property name.
|
|
7721
|
+
* @param tableviewDescriptor Tableview descriptor for related model.
|
|
7722
|
+
*/
|
|
7567
7723
|
addFieldManyEditor(property, tableviewDescriptor) {
|
|
7568
7724
|
const field = new FieldManyEditorDescriptor(this, property, tableviewDescriptor);
|
|
7569
7725
|
this.addFieldDescriptor(field);
|
|
7570
7726
|
return field;
|
|
7571
7727
|
}
|
|
7728
|
+
/**
|
|
7729
|
+
* Adds tables for many-to-many (m:n) relations.
|
|
7730
|
+
* @param property Model's property name.
|
|
7731
|
+
* @param mainTableDescriptor Main table descriptor for displaying items added to main model's property.
|
|
7732
|
+
* @param lookupTableDescriptor Lookup table descriptor for displaying items to be added to main model's property.
|
|
7733
|
+
*/
|
|
7572
7734
|
addFieldManyToManyEditor(property, mainTableDescriptor, lookupTableDescriptor) {
|
|
7573
7735
|
const field = new FieldManyToManyEditorDescriptor(this, property, mainTableDescriptor, lookupTableDescriptor);
|
|
7574
7736
|
this.addFieldDescriptor(field);
|
|
7575
7737
|
return field;
|
|
7576
7738
|
}
|
|
7739
|
+
/**
|
|
7740
|
+
* Disables field on editor.
|
|
7741
|
+
* @param disabled
|
|
7742
|
+
*/
|
|
7577
7743
|
withDisabled(disabled = true) {
|
|
7578
7744
|
this._disabled = disabled;
|
|
7579
7745
|
return this;
|
|
7580
7746
|
}
|
|
7747
|
+
/**
|
|
7748
|
+
* Adds group validator to editor.
|
|
7749
|
+
* @param name Name of the validation.
|
|
7750
|
+
* @param validator Field validator function.
|
|
7751
|
+
* @param message Field validation message.
|
|
7752
|
+
*/
|
|
7581
7753
|
addValidation(name, validator, message) {
|
|
7582
7754
|
if (this._currentGroup) {
|
|
7583
7755
|
this._currentGroup.withValidation(name, validator, message);
|
|
7584
7756
|
}
|
|
7585
7757
|
}
|
|
7758
|
+
/**
|
|
7759
|
+
* Creates a copy of editor descriptor object.
|
|
7760
|
+
*/
|
|
7586
7761
|
copy() {
|
|
7587
7762
|
const editor = new EditorDescriptor(this.model.type, this.model.idPropertyName, this.model.titlePropertyName, this.tableviewEditorType);
|
|
7588
7763
|
for (const tabGroup of this._tabs) {
|
|
@@ -7599,6 +7774,11 @@ class EditorDescriptor {
|
|
|
7599
7774
|
editor._disabled = this._disabled;
|
|
7600
7775
|
return editor;
|
|
7601
7776
|
}
|
|
7777
|
+
/**
|
|
7778
|
+
* Created group from field group descriptor.
|
|
7779
|
+
* @param fieldGroup Field group descriptor.
|
|
7780
|
+
* @internal
|
|
7781
|
+
*/
|
|
7602
7782
|
createFieldGroupDescriptor(fieldGroup) {
|
|
7603
7783
|
this.createDefaultTabGroup();
|
|
7604
7784
|
this._currentGroup = fieldGroup;
|
|
@@ -7606,26 +7786,38 @@ class EditorDescriptor {
|
|
|
7606
7786
|
this._currentTabGroup?.addField(fieldGroup);
|
|
7607
7787
|
return this;
|
|
7608
7788
|
}
|
|
7789
|
+
/**
|
|
7790
|
+
* Creates tab group from tab group descriptor.
|
|
7791
|
+
* @param tabGroup Tab group descriptor.
|
|
7792
|
+
* @internal
|
|
7793
|
+
*/
|
|
7609
7794
|
createTabGroupDescriptor(tabGroup) {
|
|
7610
7795
|
this._currentTabGroup = tabGroup;
|
|
7611
7796
|
this._tabs.push(tabGroup);
|
|
7612
7797
|
return this;
|
|
7613
7798
|
}
|
|
7799
|
+
/**
|
|
7800
|
+
* Creates default field group.
|
|
7801
|
+
* @internal
|
|
7802
|
+
*/
|
|
7614
7803
|
createDefaultGroup() {
|
|
7615
7804
|
this.createDefaultTabGroup();
|
|
7616
7805
|
if (this._currentTabGroup?.fields.length === 0) {
|
|
7617
7806
|
this.createFieldGroup(EditorDescriptor.defaultGroupName, null);
|
|
7618
7807
|
}
|
|
7619
7808
|
}
|
|
7809
|
+
/**
|
|
7810
|
+
* Creates default tab group.
|
|
7811
|
+
* @internal
|
|
7812
|
+
*/
|
|
7620
7813
|
createDefaultTabGroup() {
|
|
7621
7814
|
if (this._tabs.length === 0) {
|
|
7622
7815
|
this.createTabGroup(EditorDescriptor.defaultGroupName, 'general.general');
|
|
7623
7816
|
}
|
|
7624
7817
|
}
|
|
7625
7818
|
/**
|
|
7626
|
-
*
|
|
7627
|
-
*
|
|
7628
|
-
* @param property field name
|
|
7819
|
+
* Modifies selected field by field property. For enums use {withFieldModifiedEnum} instead.
|
|
7820
|
+
* @param property Model's property name.
|
|
7629
7821
|
* @param fieldType new field type for selected field
|
|
7630
7822
|
* @param args additional parameters for field
|
|
7631
7823
|
*/
|
|
@@ -7638,12 +7830,11 @@ class EditorDescriptor {
|
|
|
7638
7830
|
return this;
|
|
7639
7831
|
}
|
|
7640
7832
|
/**
|
|
7641
|
-
*
|
|
7642
|
-
* @param property
|
|
7833
|
+
* Modifies selected field with enum type.
|
|
7834
|
+
* @param property Model's property name.
|
|
7643
7835
|
* @param enumType type of enum for new field
|
|
7644
7836
|
* @param optionsTitlePath
|
|
7645
7837
|
* @param values
|
|
7646
|
-
* @param nameAsValue
|
|
7647
7838
|
*/
|
|
7648
7839
|
withFieldModifiedEnum(property, enumType, optionsTitlePath, values, nameAsValue = false) {
|
|
7649
7840
|
const attribute = TableviewUtil.getAttributeDefMap(this._modelType).find(a => a.name === property);
|
|
@@ -7657,8 +7848,8 @@ class EditorDescriptor {
|
|
|
7657
7848
|
return this;
|
|
7658
7849
|
}
|
|
7659
7850
|
/**
|
|
7660
|
-
*
|
|
7661
|
-
* @param property
|
|
7851
|
+
* Modifies selected field with lookup field.
|
|
7852
|
+
* @param property Model's property name.
|
|
7662
7853
|
* @param modelType model type of field
|
|
7663
7854
|
* @param lookupProvider provider to be added to field
|
|
7664
7855
|
* @param titleProperty
|
|
@@ -7672,10 +7863,11 @@ class EditorDescriptor {
|
|
|
7672
7863
|
return this;
|
|
7673
7864
|
}
|
|
7674
7865
|
/**
|
|
7675
|
-
*
|
|
7676
|
-
* @param attribute definition
|
|
7677
|
-
* @param field
|
|
7678
|
-
* @param args additional arguments
|
|
7866
|
+
* Generates field based on attribute definition, used for auto model
|
|
7867
|
+
* @param attribute Attribute definition.
|
|
7868
|
+
* @param field Optional, if defined will be replaced, otherwise new will be generated.
|
|
7869
|
+
* @param args Optional additional arguments mapped to filed type. Arguments depend on possible arguments on fields.
|
|
7870
|
+
* @internal
|
|
7679
7871
|
*/
|
|
7680
7872
|
upsertFieldFromAttributeDef(attribute, field, ...args) {
|
|
7681
7873
|
if (field == null) {
|
|
@@ -9061,6 +9253,10 @@ class FileUtil {
|
|
|
9061
9253
|
}
|
|
9062
9254
|
}
|
|
9063
9255
|
|
|
9256
|
+
function booleanObsAttribute(value) {
|
|
9257
|
+
return isObservable(value) ? value : of(booleanAttribute(value));
|
|
9258
|
+
}
|
|
9259
|
+
|
|
9064
9260
|
class ModelDescriptor {
|
|
9065
9261
|
constructor(modelType, idProperty, titleProperty, i18nBaseKey) {
|
|
9066
9262
|
this._type = modelType;
|
|
@@ -9939,6 +10135,51 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImpor
|
|
|
9939
10135
|
args: ['instanceCreated']
|
|
9940
10136
|
}] } });
|
|
9941
10137
|
|
|
10138
|
+
class MngDialogKeydownHandlerDirective {
|
|
10139
|
+
constructor() {
|
|
10140
|
+
this.dialogService = inject(DialogService);
|
|
10141
|
+
this.dynamicDialog = inject(DynamicDialogComponent, { optional: true });
|
|
10142
|
+
this.dialog = inject(Dialog, { optional: true });
|
|
10143
|
+
this.dialogsWithKeydownListener = [];
|
|
10144
|
+
}
|
|
10145
|
+
ngOnInit() {
|
|
10146
|
+
if (!this.dialog && !this.dynamicDialog) {
|
|
10147
|
+
// not a dialog, return
|
|
10148
|
+
return;
|
|
10149
|
+
}
|
|
10150
|
+
this.dialogService.dialogComponentRefMap.forEach(v => {
|
|
10151
|
+
if ((this.dialog || v.instance !== this.dynamicDialog) && v.instance.documentKeydownListener) {
|
|
10152
|
+
// exclude self dynamic dialog
|
|
10153
|
+
this.dialogsWithKeydownListener.push(v.instance);
|
|
10154
|
+
v.instance.unbindDocumentKeydownListener();
|
|
10155
|
+
}
|
|
10156
|
+
});
|
|
10157
|
+
if (!this.dialog) {
|
|
10158
|
+
// if dialog is present, then do not bind (because it will bind on unbind-ed dynamic dialog
|
|
10159
|
+
this.dynamicDialog?.bindDocumentKeydownListener();
|
|
10160
|
+
}
|
|
10161
|
+
}
|
|
10162
|
+
ngOnDestroy() {
|
|
10163
|
+
if (!this.dialog && !this.dynamicDialog) {
|
|
10164
|
+
// not a dialog, return
|
|
10165
|
+
return;
|
|
10166
|
+
}
|
|
10167
|
+
if (!this.dialog) {
|
|
10168
|
+
this.dynamicDialog?.unbindDocumentKeydownListener();
|
|
10169
|
+
}
|
|
10170
|
+
this.dialogsWithKeydownListener.forEach(c => c.bindDocumentKeydownListener());
|
|
10171
|
+
}
|
|
10172
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngDialogKeydownHandlerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
10173
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.6", type: MngDialogKeydownHandlerDirective, isStandalone: true, selector: "[mngDialogKeydownHandler]", ngImport: i0 }); }
|
|
10174
|
+
}
|
|
10175
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngDialogKeydownHandlerDirective, decorators: [{
|
|
10176
|
+
type: Directive,
|
|
10177
|
+
args: [{
|
|
10178
|
+
standalone: true,
|
|
10179
|
+
selector: '[mngDialogKeydownHandler]'
|
|
10180
|
+
}]
|
|
10181
|
+
}] });
|
|
10182
|
+
|
|
9942
10183
|
class MngTemplateDirective {
|
|
9943
10184
|
constructor(template, viewContainerRef) {
|
|
9944
10185
|
this.template = template;
|
|
@@ -10387,11 +10628,11 @@ class MngActionComponent {
|
|
|
10387
10628
|
this.viewContainer = this.viewContainerInit ?? this.viewContainerService ?? undefined;
|
|
10388
10629
|
}
|
|
10389
10630
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngActionComponent, deps: [{ token: i1.ActivatedRoute }, { token: i2.TranslateService }, { token: MngAuthorizationService }, { token: MngActionExecutorService }, { token: i1$2.ConfirmationService }, { token: MngViewContainerComponentService, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10390
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
10631
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "16.2.6", type: MngActionComponent, isStandalone: true, selector: "mng-action", inputs: { action: "action", item: "item", itemId: "itemId", actionData: "actionData", queryParam: "queryParam", dataProvider: "dataProvider", hostComponent: "hostComponent", routeInit: ["route", "routeInit"], inputDisabled: ["disabled", "inputDisabled", booleanObsAttribute], inputLoading: ["loading", "inputLoading"], viewContainerInit: ["viewContainer", "viewContainerInit"], selectedItems: "selectedItems" }, outputs: { finishEventEmitter: "finish" }, host: { properties: { "class": "this.hostClass", "class.m-0": "this.isHostHidden" } }, providers: [ConfirmationService], viewQueries: [{ propertyName: "subactionsMenu", first: true, predicate: ["subactionsMenu"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"($isVisible | async) && ($isPermitted | async)\">\n <a\n *ngIf=\"actionLink && actionLink.url !== ''; else routerLink\"\n pButton\n pRipple\n [label]=\"($label | async) ?? ''\"\n [icon]=\"$any(action.button.icon)\"\n [iconPos]=\"action.button.iconPosition\"\n [href]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false) ? null : (actionLink.url | parametrize : itemId : item : actionData)\"\n [target]=\"actionLink.target\"\n [class.disabled]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false)\"\n [pTooltip]=\"($tooltip | async) ?? undefined\"\n [tooltipPosition]=\"action.button.tooltipPosition ?? undefined\"\n [class]=\"buttonClass\"></a>\n <ng-template #routerLink>\n <a\n *ngIf=\"actionLink; else customComponent\"\n pButton\n pRipple\n [icon]=\"$any(action.button.icon)\"\n [iconPos]=\"action.button.iconPosition\"\n [label]=\"($label | async) ?? ''\"\n [target]=\"actionLink.target\"\n [replaceUrl]=\"actionLink.replaceUrl\"\n [routerLink]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false) ? null : (actionLink.pathSegments | parametrize : itemId : item : actionData)\"\n [relativeTo]=\"route\"\n [queryParams]=\"actionLink.queryParams | parametrize : itemId : item : actionData\"\n [queryParamsHandling]=\"actionLink.queryParamsHandling\"\n [class.disabled]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false)\"\n [pTooltip]=\"($tooltip | async) ?? undefined\"\n [tooltipPosition]=\"action.button.tooltipPosition ?? undefined\"\n [class]=\"buttonClass\"></a>\n </ng-template>\n <ng-template #customComponent>\n <ng-container\n *ngIf=\"action.component; else splitButton\"\n [mngComponent]=\"action.component\"\n [inputs]=\"{\n action: action,\n item: item,\n itemId: itemId,\n actionData: actionData,\n enabled: $isEnabled,\n loading: $loading,\n viewContainer: viewContainer\n }\"\n (instanceCreated)=\"onCustomActionCmpInst($event)\">\n </ng-container>\n </ng-template>\n <ng-template #splitButton>\n <p-splitButton\n *ngIf=\"action.subactions.length > 0 && !action.subactionsAsMenu; else button\"\n [icon]=\"action.button.icon ?? undefined\"\n [iconPos]=\"action.button.iconPosition\"\n [label]=\"($label | async) ?? ''\"\n [pTooltip]=\"($tooltip | async) ?? undefined\"\n [tooltipPosition]=\"action.button.tooltipPosition ?? undefined\"\n [disabled]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false)\"\n (onClick)=\"triggerAction(action)\"\n [class]=\"buttonClass\"\n [model]=\"subactions\">\n </p-splitButton>\n </ng-template>\n <ng-template #button>\n <button\n pButton\n pRipple\n type=\"button\"\n [icon]=\"$any(action.button.icon)\"\n [iconPos]=\"action.button.iconPosition\"\n [label]=\"($label | async) ?? ''\"\n [pTooltip]=\"($tooltip | async) ?? undefined\"\n [tooltipPosition]=\"action.button.tooltipPosition ?? undefined\"\n [loading]=\"(($loading | async) ?? false) || ((inputLoading | async) ?? false)\"\n loadingIcon=\"pi pi-spin pi-spinner\"\n [disabled]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false)\"\n (click)=\"triggerAction(action, undefined, $event)\"\n [class]=\"buttonClass\"></button>\n <p-menu #subactionsMenu [model]=\"subactions\" [popup]=\"true\" appendTo=\"body\" styleClass=\"mng-action-menu\"></p-menu>\n </ng-template>\n <p-confirmDialog\n *ngIf=\"actionOrSubactionHasRunConfirmation\"\n [key]=\"action.actionName + '_' + cmpId\"\n [baseZIndex]=\"50\"\n appendTo=\"body\"\n [closable]=\"action.runConfirmationDialogDescriptor?.closable ?? true\"></p-confirmDialog>\n</ng-container>\n", styles: [":host{display:inline-block}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i6.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i6$1.Ripple, selector: "[pRipple]" }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i4$1.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "pipe", type: MngParametrizePipe, name: "parametrize" }, { kind: "directive", type: MngComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "inputs", "attachToHost"], outputs: ["instanceCreated"] }, { kind: "ngmodule", type: ConfirmDialogModule }, { kind: "component", type: i9.ConfirmDialog, selector: "p-confirmDialog", inputs: ["header", "icon", "message", "style", "styleClass", "maskStyleClass", "acceptIcon", "acceptLabel", "closeAriaLabel", "acceptAriaLabel", "acceptVisible", "rejectIcon", "rejectLabel", "rejectAriaLabel", "rejectVisible", "acceptButtonStyleClass", "rejectButtonStyleClass", "closeOnEscape", "dismissableMask", "blockScroll", "rtl", "closable", "appendTo", "key", "autoZIndex", "baseZIndex", "transitionOptions", "focusTrap", "defaultFocus", "breakpoints", "visible", "position"], outputs: ["onHide"] }, { kind: "ngmodule", type: SplitButtonModule }, { kind: "component", type: i10.SplitButton, selector: "p-splitButton", inputs: ["model", "icon", "iconPos", "label", "style", "styleClass", "menuStyle", "menuStyleClass", "disabled", "tabindex", "appendTo", "dir", "expandAriaLabel", "showTransitionOptions", "hideTransitionOptions", "buttonProps", "menuButtonProps"], outputs: ["onClick", "onDropdownClick"] }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: MenuModule }, { kind: "component", type: i11.Menu, selector: "p-menu", inputs: ["model", "popup", "style", "styleClass", "appendTo", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaLabel", "ariaLabelledBy", "id", "tabindex"], outputs: ["onShow", "onHide", "onBlur", "onFocus"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
10391
10632
|
}
|
|
10392
10633
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngActionComponent, decorators: [{
|
|
10393
10634
|
type: Component,
|
|
10394
|
-
args: [{ standalone: true, selector: 'mng-action', changeDetection: ChangeDetectionStrategy.OnPush, imports: [AsyncPipe, NgIf, ButtonModule, RippleModule, TooltipModule, MngParametrizePipe, MngComponentDirective, ConfirmDialogModule, SplitButtonModule, MenuModule], providers: [ConfirmationService], template: "<ng-container *ngIf=\"($isVisible | async) && ($isPermitted | async)\">\n <a\n *ngIf=\"actionLink && actionLink.url !== ''; else routerLink\"\n pButton\n pRipple\n [label]=\"($label | async) ?? ''\"\n [icon]=\"$any(action.button.icon)\"\n [iconPos]=\"action.button.iconPosition\"\n [href]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false) ? null : (actionLink.url | parametrize : itemId : item : actionData)\"\n [target]=\"actionLink.target\"\n [class.disabled]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false)\"\n [pTooltip]=\"($tooltip | async) ?? undefined\"\n [tooltipPosition]=\"action.button.tooltipPosition ?? undefined\"\n [class]=\"buttonClass\"></a>\n <ng-template #routerLink>\n <a\n *ngIf=\"actionLink; else customComponent\"\n pButton\n pRipple\n [icon]=\"$any(action.button.icon)\"\n [iconPos]=\"action.button.iconPosition\"\n [label]=\"($label | async) ?? ''\"\n [target]=\"actionLink.target\"\n [replaceUrl]=\"actionLink.replaceUrl\"\n [routerLink]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false) ? null : (actionLink.pathSegments | parametrize : itemId : item : actionData)\"\n [relativeTo]=\"route\"\n [queryParams]=\"actionLink.queryParams | parametrize : itemId : item : actionData\"\n [queryParamsHandling]=\"actionLink.queryParamsHandling\"\n [class.disabled]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false)\"\n [pTooltip]=\"($tooltip | async) ?? undefined\"\n [tooltipPosition]=\"action.button.tooltipPosition ?? undefined\"\n [class]=\"buttonClass\"></a>\n </ng-template>\n <ng-template #customComponent>\n <ng-container\n *ngIf=\"action.component; else splitButton\"\n [mngComponent]=\"action.component\"\n [inputs]=\"{\n action: action,\n item: item,\n itemId: itemId,\n actionData: actionData,\n enabled: $isEnabled,\n loading: $loading,\n viewContainer: viewContainer\n }\"\n (instanceCreated)=\"onCustomActionCmpInst($event)\">\n </ng-container>\n </ng-template>\n <ng-template #splitButton>\n <p-splitButton\n *ngIf=\"action.subactions.length > 0 && !action.subactionsAsMenu; else button\"\n [icon]=\"action.button.icon ?? undefined\"\n [iconPos]=\"action.button.iconPosition\"\n [label]=\"($label | async) ?? ''\"\n [pTooltip]=\"($tooltip | async) ?? undefined\"\n [tooltipPosition]=\"action.button.tooltipPosition ?? undefined\"\n [disabled]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false)\"\n (onClick)=\"triggerAction(action)\"\n [class]=\"buttonClass\"\n [model]=\"subactions\">\n </p-splitButton>\n </ng-template>\n <ng-template #button>\n <button\n pButton\n pRipple\n type=\"button\"\n [icon]=\"$any(action.button.icon)\"\n [iconPos]=\"action.button.iconPosition\"\n [label]=\"($label | async) ?? ''\"\n [pTooltip]=\"($tooltip | async) ?? undefined\"\n [tooltipPosition]=\"action.button.tooltipPosition ?? undefined\"\n [loading]=\"(($loading | async) ?? false) || ((inputLoading | async) ?? false)\"\n loadingIcon=\"pi pi-spin pi-spinner\"\n [disabled]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false)\"\n (click)=\"triggerAction(action, undefined, $event)\"\n [class]=\"buttonClass\"></button>\n <p-menu #subactionsMenu [model]=\"subactions\" [popup]=\"true\" styleClass=\"mng-action-menu\"></p-menu>\n </ng-template>\n <p-confirmDialog\n *ngIf=\"actionOrSubactionHasRunConfirmation\"\n [key]=\"action.actionName + '_' + cmpId\"\n [baseZIndex]=\"50\"\n appendTo=\"body\"\n [closable]=\"action.runConfirmationDialogDescriptor?.closable ?? true\"></p-confirmDialog>\n</ng-container>\n", styles: [":host{display:inline-block}\n"] }]
|
|
10635
|
+
args: [{ standalone: true, selector: 'mng-action', changeDetection: ChangeDetectionStrategy.OnPush, imports: [AsyncPipe, NgIf, ButtonModule, RippleModule, TooltipModule, MngParametrizePipe, MngComponentDirective, ConfirmDialogModule, SplitButtonModule, MenuModule], providers: [ConfirmationService], template: "<ng-container *ngIf=\"($isVisible | async) && ($isPermitted | async)\">\n <a\n *ngIf=\"actionLink && actionLink.url !== ''; else routerLink\"\n pButton\n pRipple\n [label]=\"($label | async) ?? ''\"\n [icon]=\"$any(action.button.icon)\"\n [iconPos]=\"action.button.iconPosition\"\n [href]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false) ? null : (actionLink.url | parametrize : itemId : item : actionData)\"\n [target]=\"actionLink.target\"\n [class.disabled]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false)\"\n [pTooltip]=\"($tooltip | async) ?? undefined\"\n [tooltipPosition]=\"action.button.tooltipPosition ?? undefined\"\n [class]=\"buttonClass\"></a>\n <ng-template #routerLink>\n <a\n *ngIf=\"actionLink; else customComponent\"\n pButton\n pRipple\n [icon]=\"$any(action.button.icon)\"\n [iconPos]=\"action.button.iconPosition\"\n [label]=\"($label | async) ?? ''\"\n [target]=\"actionLink.target\"\n [replaceUrl]=\"actionLink.replaceUrl\"\n [routerLink]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false) ? null : (actionLink.pathSegments | parametrize : itemId : item : actionData)\"\n [relativeTo]=\"route\"\n [queryParams]=\"actionLink.queryParams | parametrize : itemId : item : actionData\"\n [queryParamsHandling]=\"actionLink.queryParamsHandling\"\n [class.disabled]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false)\"\n [pTooltip]=\"($tooltip | async) ?? undefined\"\n [tooltipPosition]=\"action.button.tooltipPosition ?? undefined\"\n [class]=\"buttonClass\"></a>\n </ng-template>\n <ng-template #customComponent>\n <ng-container\n *ngIf=\"action.component; else splitButton\"\n [mngComponent]=\"action.component\"\n [inputs]=\"{\n action: action,\n item: item,\n itemId: itemId,\n actionData: actionData,\n enabled: $isEnabled,\n loading: $loading,\n viewContainer: viewContainer\n }\"\n (instanceCreated)=\"onCustomActionCmpInst($event)\">\n </ng-container>\n </ng-template>\n <ng-template #splitButton>\n <p-splitButton\n *ngIf=\"action.subactions.length > 0 && !action.subactionsAsMenu; else button\"\n [icon]=\"action.button.icon ?? undefined\"\n [iconPos]=\"action.button.iconPosition\"\n [label]=\"($label | async) ?? ''\"\n [pTooltip]=\"($tooltip | async) ?? undefined\"\n [tooltipPosition]=\"action.button.tooltipPosition ?? undefined\"\n [disabled]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false)\"\n (onClick)=\"triggerAction(action)\"\n [class]=\"buttonClass\"\n [model]=\"subactions\">\n </p-splitButton>\n </ng-template>\n <ng-template #button>\n <button\n pButton\n pRipple\n type=\"button\"\n [icon]=\"$any(action.button.icon)\"\n [iconPos]=\"action.button.iconPosition\"\n [label]=\"($label | async) ?? ''\"\n [pTooltip]=\"($tooltip | async) ?? undefined\"\n [tooltipPosition]=\"action.button.tooltipPosition ?? undefined\"\n [loading]=\"(($loading | async) ?? false) || ((inputLoading | async) ?? false)\"\n loadingIcon=\"pi pi-spin pi-spinner\"\n [disabled]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false)\"\n (click)=\"triggerAction(action, undefined, $event)\"\n [class]=\"buttonClass\"></button>\n <p-menu #subactionsMenu [model]=\"subactions\" [popup]=\"true\" appendTo=\"body\" styleClass=\"mng-action-menu\"></p-menu>\n </ng-template>\n <p-confirmDialog\n *ngIf=\"actionOrSubactionHasRunConfirmation\"\n [key]=\"action.actionName + '_' + cmpId\"\n [baseZIndex]=\"50\"\n appendTo=\"body\"\n [closable]=\"action.runConfirmationDialogDescriptor?.closable ?? true\"></p-confirmDialog>\n</ng-container>\n", styles: [":host{display:inline-block}\n"] }]
|
|
10395
10636
|
}], ctorParameters: function () { return [{ type: i1.ActivatedRoute }, { type: i2.TranslateService }, { type: MngAuthorizationService }, { type: MngActionExecutorService }, { type: i1$2.ConfirmationService }, { type: MngViewContainerComponentService, decorators: [{
|
|
10396
10637
|
type: Optional
|
|
10397
10638
|
}] }]; }, propDecorators: { hostClass: [{
|
|
@@ -10420,7 +10661,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImpor
|
|
|
10420
10661
|
args: ['route']
|
|
10421
10662
|
}], inputDisabled: [{
|
|
10422
10663
|
type: Input,
|
|
10423
|
-
args: ['disabled']
|
|
10664
|
+
args: [{ alias: 'disabled', transform: booleanObsAttribute }]
|
|
10424
10665
|
}], inputLoading: [{
|
|
10425
10666
|
type: Input,
|
|
10426
10667
|
args: ['loading']
|
|
@@ -10977,18 +11218,23 @@ class MngAutocompleteComponent {
|
|
|
10977
11218
|
this.onTouchedFn = () => { };
|
|
10978
11219
|
this.autocompleteFormControl = new FormControl();
|
|
10979
11220
|
this.suggestions$ = this.suggestionsSubject.asObservable();
|
|
11221
|
+
this.isPanelShown = false;
|
|
11222
|
+
this.isFocused = false;
|
|
10980
11223
|
}
|
|
10981
11224
|
ngOnInit() {
|
|
11225
|
+
this.autocompleteFormControl.valueChanges.subscribe(v => {
|
|
11226
|
+
this.propagateValueChange(v);
|
|
11227
|
+
});
|
|
10982
11228
|
this.setItemsAndDataProvider();
|
|
10983
|
-
if (this.selectFirst) {
|
|
10984
|
-
this.
|
|
11229
|
+
if (this.selectFirst && !this.autocompleteFormControl?.value) {
|
|
11230
|
+
this.onSearch({}, true);
|
|
10985
11231
|
}
|
|
10986
11232
|
}
|
|
10987
11233
|
ngOnDestroy() {
|
|
10988
11234
|
this.searchSubscription?.unsubscribe();
|
|
10989
11235
|
this.suggestionSubscription?.unsubscribe();
|
|
10990
11236
|
}
|
|
10991
|
-
onSearch(event) {
|
|
11237
|
+
onSearch(event, isInit = false) {
|
|
10992
11238
|
this.searchSubscription?.unsubscribe();
|
|
10993
11239
|
if (this.dataProvider) {
|
|
10994
11240
|
const queryParamBuilder = MediusQueryParamBuilder.create();
|
|
@@ -10998,43 +11244,109 @@ class MngAutocompleteComponent {
|
|
|
10998
11244
|
if (event.query && event.query.length > 0 && this.itemsLabelProperty) {
|
|
10999
11245
|
queryParamBuilder.withFilter(this.itemsLabelProperty, event.query, undefined, MediusFilterMatchType.StartsWith);
|
|
11000
11246
|
}
|
|
11001
|
-
this.
|
|
11002
|
-
|
|
11003
|
-
this.
|
|
11004
|
-
},
|
|
11005
|
-
error: err => {
|
|
11006
|
-
this.setSuggestionsFromItems([], event.query);
|
|
11007
|
-
const mngError = ErrorUtil.fromSubscribeError(err, 'MngAutocompleteComponentError', {
|
|
11008
|
-
search: event.query,
|
|
11009
|
-
queryParam: queryParamBuilder.build()
|
|
11010
|
-
});
|
|
11011
|
-
this.logger.log(mngError, ErrorUtil.getErrorLogLevel(mngError));
|
|
11247
|
+
if (!this.queryResultCacheSubject || !this.inlineSearch) {
|
|
11248
|
+
if (!this.queryResultCacheSubject) {
|
|
11249
|
+
this.queryResultCacheSubject = new ReplaySubject(1);
|
|
11012
11250
|
}
|
|
11013
|
-
|
|
11251
|
+
this.searchSubscription = this.getLookup(queryParamBuilder.build(), event.query).subscribe({
|
|
11252
|
+
next: items => {
|
|
11253
|
+
this.queryResultCacheSubject?.next(items);
|
|
11254
|
+
this.setSuggestionsFromItems(items, event.query);
|
|
11255
|
+
if (isInit && !this.autocompleteFormControl.value) {
|
|
11256
|
+
this.selectFirstItem();
|
|
11257
|
+
}
|
|
11258
|
+
},
|
|
11259
|
+
error: err => {
|
|
11260
|
+
this.setSuggestionsFromItems([], event.query);
|
|
11261
|
+
const mngError = ErrorUtil.fromSubscribeError(err, 'MngAutocompleteComponentError', {
|
|
11262
|
+
search: event.query,
|
|
11263
|
+
queryParam: queryParamBuilder.build()
|
|
11264
|
+
});
|
|
11265
|
+
this.logger.log(mngError, ErrorUtil.getErrorLogLevel(mngError));
|
|
11266
|
+
}
|
|
11267
|
+
});
|
|
11268
|
+
}
|
|
11269
|
+
else if (this.queryResultCacheSubject) {
|
|
11270
|
+
this.searchSubscription = this.queryResultCacheSubject.pipe(take(1)).subscribe(result => {
|
|
11271
|
+
this.setSuggestionsFromItems(result, event.query);
|
|
11272
|
+
});
|
|
11273
|
+
}
|
|
11274
|
+
}
|
|
11275
|
+
}
|
|
11276
|
+
selectFirstItem() {
|
|
11277
|
+
if (!this.selectFirst)
|
|
11278
|
+
return;
|
|
11279
|
+
if (this.suggestionsSubject.value.length > 0 && !this.userSelectedItem) {
|
|
11280
|
+
const value = this.itemsValueProperty ? this.suggestionsSubject.value[0][this.itemsValueProperty] : this.suggestionsSubject.value[0];
|
|
11281
|
+
this.setValue(value);
|
|
11014
11282
|
}
|
|
11283
|
+
else if (!this.userSelectedItem) {
|
|
11284
|
+
// handles the case if the user provides an input and de-focuses the input field before suggestions are loaded or if there are no suggestions at all
|
|
11285
|
+
this.setValue(null);
|
|
11286
|
+
}
|
|
11287
|
+
}
|
|
11288
|
+
/**
|
|
11289
|
+
* Triggered by user when selecting an item from an autocomplete suggestion list.
|
|
11290
|
+
*/
|
|
11291
|
+
onSelect(event) {
|
|
11292
|
+
this.setValue(event.value, true);
|
|
11015
11293
|
}
|
|
11016
|
-
|
|
11294
|
+
/**
|
|
11295
|
+
* Selects and sets new value
|
|
11296
|
+
*/
|
|
11297
|
+
setValue(value, fromUser = false) {
|
|
11017
11298
|
let outputValue = value;
|
|
11018
|
-
if (this.itemsValueProperty && typeof value === 'object') {
|
|
11299
|
+
if (this.itemsValueProperty && value && typeof value === 'object') {
|
|
11019
11300
|
outputValue = value[this.itemsValueProperty];
|
|
11020
11301
|
}
|
|
11021
|
-
|
|
11022
|
-
|
|
11302
|
+
if (fromUser) {
|
|
11303
|
+
this.userSelectedItem = outputValue;
|
|
11304
|
+
}
|
|
11305
|
+
else {
|
|
11306
|
+
this.autocompleteFormControl.setValue(value);
|
|
11307
|
+
}
|
|
11308
|
+
if (!this.multiselect) {
|
|
11309
|
+
this.propagateValueChange(outputValue);
|
|
11310
|
+
}
|
|
11023
11311
|
}
|
|
11024
11312
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
11025
11313
|
onFocus(event) {
|
|
11314
|
+
this.isFocused = true;
|
|
11026
11315
|
if (this.openOnFocus) {
|
|
11027
11316
|
this.primeAutocomplete?.show();
|
|
11028
11317
|
}
|
|
11029
11318
|
}
|
|
11319
|
+
/**
|
|
11320
|
+
* calls the selectFirst item anytime the input field goes out of focus and if the suggestions panel is not displayed.
|
|
11321
|
+
*/
|
|
11030
11322
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
11031
11323
|
onBlur(event) {
|
|
11324
|
+
this.isFocused = false;
|
|
11325
|
+
if (!this.isPanelShown) {
|
|
11326
|
+
this.selectFirstItem();
|
|
11327
|
+
}
|
|
11032
11328
|
this.formlyWrapper?.formControl?.markAsTouched();
|
|
11033
11329
|
}
|
|
11330
|
+
onShow() {
|
|
11331
|
+
this.isPanelShown = true;
|
|
11332
|
+
}
|
|
11333
|
+
/**
|
|
11334
|
+
* calls the selectFirst item anytime the suggestions panel is closed and input field isn't focused.
|
|
11335
|
+
*/
|
|
11336
|
+
onHide() {
|
|
11337
|
+
this.isPanelShown = false;
|
|
11338
|
+
if (!this.isFocused) {
|
|
11339
|
+
this.selectFirstItem();
|
|
11340
|
+
}
|
|
11341
|
+
}
|
|
11034
11342
|
onClear() {
|
|
11035
11343
|
this.onChangeFn();
|
|
11036
11344
|
this.valueChangeEventEmitter.next(null);
|
|
11037
11345
|
}
|
|
11346
|
+
propagateValueChange(value) {
|
|
11347
|
+
this.onChangeFn(value);
|
|
11348
|
+
this.valueChangeEventEmitter.next(value);
|
|
11349
|
+
}
|
|
11038
11350
|
registerOnChange(fn) {
|
|
11039
11351
|
this.onChangeFn = fn;
|
|
11040
11352
|
}
|
|
@@ -11193,17 +11505,19 @@ class MngAutocompleteComponent {
|
|
|
11193
11505
|
return itemLabel.toLowerCase().startsWith(queryLowerCase);
|
|
11194
11506
|
});
|
|
11195
11507
|
this.suggestionsSubject.next([...filteredItems]);
|
|
11508
|
+
this.userSelectedItem = undefined;
|
|
11196
11509
|
}
|
|
11197
11510
|
else {
|
|
11198
11511
|
this.suggestionsSubject.next([...items]);
|
|
11512
|
+
this.userSelectedItem = undefined;
|
|
11199
11513
|
}
|
|
11200
11514
|
}
|
|
11201
11515
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngAutocompleteComponent, deps: [{ token: i0.Injector }, { token: i2.TranslateService }, { token: MngFormlyFieldWrapperComponent, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11202
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MngAutocompleteComponent, isStandalone: true, selector: "mng-autocomplete", inputs: { dataProvider: "dataProvider", dataKeyProperty: "dataKeyProperty", itemsValuePropertyInit: ["itemsValueProperty", "itemsValuePropertyInit"], itemsLabelPropertyInit: ["itemsLabelProperty", "itemsLabelPropertyInit"], itemsLabelTranslate: "itemsLabelTranslate", inlineSearch: "inlineSearch", openOnFocus: "openOnFocus", multiselect: "multiselect", placeholder: "placeholder", className: "className", dropdownClassName: "dropdownClassName", showClear: "showClear", autoClear: "autoClear", selectFirst: "selectFirst" }, outputs: { valueChangeEventEmitter: "valueChange" }, providers: [MNG_AUTOCOMPLETE_VALUE_ACCESSOR], viewQueries: [{ propertyName: "primeAutocomplete", first: true, predicate: AutoComplete, descendants: true }], ngImport: i0, template: "<p-autoComplete\n (onFocus)=\"onFocus($event)\"\n [formControl]=\"autocompleteFormControl\"\n [placeholder]=\"placeholder\"\n [dropdown]=\"true\"\n [dataKey]=\"dataKeyProperty\"\n [
|
|
11516
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MngAutocompleteComponent, isStandalone: true, selector: "mng-autocomplete", inputs: { dataProvider: "dataProvider", dataKeyProperty: "dataKeyProperty", itemsValuePropertyInit: ["itemsValueProperty", "itemsValuePropertyInit"], itemsLabelPropertyInit: ["itemsLabelProperty", "itemsLabelPropertyInit"], itemsLabelTranslate: "itemsLabelTranslate", inlineSearch: "inlineSearch", openOnFocus: "openOnFocus", multiselect: "multiselect", placeholder: "placeholder", className: "className", dropdownClassName: "dropdownClassName", showClear: "showClear", autoClear: "autoClear", selectFirst: "selectFirst" }, outputs: { valueChangeEventEmitter: "valueChange" }, providers: [MNG_AUTOCOMPLETE_VALUE_ACCESSOR], viewQueries: [{ propertyName: "primeAutocomplete", first: true, predicate: AutoComplete, descendants: true }], ngImport: i0, template: "<p-autoComplete\n (onFocus)=\"onFocus($event)\"\n [formControl]=\"autocompleteFormControl\"\n [placeholder]=\"placeholder\"\n [dropdown]=\"true\"\n [dataKey]=\"dataKeyProperty\"\n [optionLabel]=\"itemsLabelProperty\"\n [suggestions]=\"(suggestions$ | async) ?? []\"\n [multiple]=\"multiselect\"\n [showEmptyMessage]=\"true\"\n [emptyMessage]=\"'mngAutocomplete.noMatches' | translate\"\n [styleClass]=\"className\"\n [panelStyleClass]=\"dropdownClassName\"\n [minLength]=\"openOnFocus ? 0 : 1\"\n [showClear]=\"showClear\"\n [forceSelection]=\"autoClear\"\n (completeMethod)=\"onSearch($event)\"\n (onSelect)=\"onSelect($event)\"\n (onBlur)=\"onBlur($event)\"\n (onClear)=\"onClear()\"\n (onShow)=\"onShow()\"\n (onHide)=\"onHide()\"\n appendTo=\"body\"\n dropdownMode=\"current\">\n</p-autoComplete>\n", dependencies: [{ kind: "ngmodule", type: AutoCompleteModule }, { kind: "component", type: i3.AutoComplete, selector: "p-autoComplete", inputs: ["minLength", "delay", "style", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "disabled", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "maxlength", "name", "required", "size", "appendTo", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "dropdownAriaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "showClear", "field", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "overlayOptions", "suggestions", "itemSize", "optionLabel", "id", "searchMessage", "emptySelectionMessage", "selectionMessage", "autoOptionFocus", "selectOnFocus", "searchLocale", "optionDisabled", "focusOnHover"], outputs: ["completeMethod", "onSelect", "onUnselect", "onFocus", "onBlur", "onDropdownClick", "onClear", "onKeyUp", "onShow", "onHide", "onLazyLoad"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
11203
11517
|
}
|
|
11204
11518
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngAutocompleteComponent, decorators: [{
|
|
11205
11519
|
type: Component,
|
|
11206
|
-
args: [{ standalone: true, selector: 'mng-autocomplete', providers: [MNG_AUTOCOMPLETE_VALUE_ACCESSOR], imports: [AutoCompleteModule, ReactiveFormsModule, AsyncPipe, TranslateModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<p-autoComplete\n (onFocus)=\"onFocus($event)\"\n [formControl]=\"autocompleteFormControl\"\n [placeholder]=\"placeholder\"\n [dropdown]=\"true\"\n [dataKey]=\"dataKeyProperty\"\n [
|
|
11520
|
+
args: [{ standalone: true, selector: 'mng-autocomplete', providers: [MNG_AUTOCOMPLETE_VALUE_ACCESSOR], imports: [AutoCompleteModule, ReactiveFormsModule, AsyncPipe, TranslateModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<p-autoComplete\n (onFocus)=\"onFocus($event)\"\n [formControl]=\"autocompleteFormControl\"\n [placeholder]=\"placeholder\"\n [dropdown]=\"true\"\n [dataKey]=\"dataKeyProperty\"\n [optionLabel]=\"itemsLabelProperty\"\n [suggestions]=\"(suggestions$ | async) ?? []\"\n [multiple]=\"multiselect\"\n [showEmptyMessage]=\"true\"\n [emptyMessage]=\"'mngAutocomplete.noMatches' | translate\"\n [styleClass]=\"className\"\n [panelStyleClass]=\"dropdownClassName\"\n [minLength]=\"openOnFocus ? 0 : 1\"\n [showClear]=\"showClear\"\n [forceSelection]=\"autoClear\"\n (completeMethod)=\"onSearch($event)\"\n (onSelect)=\"onSelect($event)\"\n (onBlur)=\"onBlur($event)\"\n (onClear)=\"onClear()\"\n (onShow)=\"onShow()\"\n (onHide)=\"onHide()\"\n appendTo=\"body\"\n dropdownMode=\"current\">\n</p-autoComplete>\n" }]
|
|
11207
11521
|
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i2.TranslateService }, { type: MngFormlyFieldWrapperComponent, decorators: [{
|
|
11208
11522
|
type: Optional
|
|
11209
11523
|
}] }]; }, propDecorators: { dataProvider: [{
|
|
@@ -11407,11 +11721,11 @@ class MngDropdownComponent {
|
|
|
11407
11721
|
return typeof this.onChangeFn !== 'undefined';
|
|
11408
11722
|
}
|
|
11409
11723
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngDropdownComponent, deps: [{ token: i0.Injector }, { token: i2.TranslateService }, { token: MngFormlyFieldWrapperComponent, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11410
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MngDropdownComponent, isStandalone: true, selector: "mng-dropdown", inputs: { dataProvider: "dataProvider", dataKeyProperty: "dataKeyProperty", itemsLabelPropertyInit: ["itemsLabelProperty", "itemsLabelPropertyInit"], itemsLabelTranslate: "itemsLabelTranslate", itemsValuePropertyInit: ["itemsValueProperty", "itemsValuePropertyInit"], itemsDisabledProperty: "itemsDisabledProperty", multiselect: "multiselect", placeholder: "placeholder", showClear: "showClear", selectFirstItem: "selectFirstItem", className: "className", dropdownClassName: "dropdownClassName", changeValueOnBlur: "changeValueOnBlur" }, outputs: { valueChangeEventEmitter: "valueChange" }, providers: [MNG_DROPDOWN_VALUE_ACCESSOR], viewQueries: [{ propertyName: "primeDropdown", first: true, predicate: Dropdown, descendants: true }], ngImport: i0, template: "<p-dropdown\n *ngIf=\"!multiselect; else pMultiselect\"\n [formControl]=\"dropdownFormControl\"\n [placeholder]=\"placeholder\"\n [dataKey]=\"dataKeyProperty\"\n [optionLabel]=\"itemsLabelProperty\"\n [optionValue]=\"itemsValueProperty\"\n [optionDisabled]=\"itemsDisabledProperty\"\n [options]=\"(items$ | async) ?? undefined\"\n [showClear]=\"showClear\"\n [autoDisplayFirst]=\"false\"\n [styleClass]=\"className\"\n [panelStyleClass]=\"dropdownClassName\"\n (onBlur)=\"onDropdownBlur($event)\"\n [dropdownIcon]=\"($loading | async) ?? false ? 'pi pi-spinner pi-spin' : 'pi pi-chevron-down'\"\n appendTo=\"body\">\n</p-dropdown>\n<ng-template #pMultiselect>\n <p-multiSelect\n [maxSelectedLabels]=\"1\"\n [selectedItemsLabel]=\"'mngDropdown.multiselectOverMaxDisplayLimit' | translate\"\n [formControl]=\"dropdownFormControl\"\n [
|
|
11724
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MngDropdownComponent, isStandalone: true, selector: "mng-dropdown", inputs: { dataProvider: "dataProvider", dataKeyProperty: "dataKeyProperty", itemsLabelPropertyInit: ["itemsLabelProperty", "itemsLabelPropertyInit"], itemsLabelTranslate: "itemsLabelTranslate", itemsValuePropertyInit: ["itemsValueProperty", "itemsValuePropertyInit"], itemsDisabledProperty: "itemsDisabledProperty", multiselect: "multiselect", placeholder: "placeholder", showClear: "showClear", selectFirstItem: "selectFirstItem", className: "className", dropdownClassName: "dropdownClassName", changeValueOnBlur: "changeValueOnBlur" }, outputs: { valueChangeEventEmitter: "valueChange" }, providers: [MNG_DROPDOWN_VALUE_ACCESSOR], viewQueries: [{ propertyName: "primeDropdown", first: true, predicate: Dropdown, descendants: true }], ngImport: i0, template: "<p-dropdown\n *ngIf=\"!multiselect; else pMultiselect\"\n [formControl]=\"dropdownFormControl\"\n [placeholder]=\"placeholder\"\n [dataKey]=\"dataKeyProperty\"\n [optionLabel]=\"itemsLabelProperty\"\n [optionValue]=\"itemsValueProperty\"\n [optionDisabled]=\"itemsDisabledProperty\"\n [options]=\"(items$ | async) ?? undefined\"\n [showClear]=\"showClear\"\n [autoDisplayFirst]=\"false\"\n [styleClass]=\"className\"\n [panelStyleClass]=\"dropdownClassName\"\n (onBlur)=\"onDropdownBlur($event)\"\n [dropdownIcon]=\"($loading | async) ?? false ? 'pi pi-spinner pi-spin' : 'pi pi-chevron-down'\"\n appendTo=\"body\">\n</p-dropdown>\n<ng-template #pMultiselect>\n <p-multiSelect\n [maxSelectedLabels]=\"1\"\n [selectedItemsLabel]=\"'mngDropdown.multiselectOverMaxDisplayLimit' | translate\"\n [formControl]=\"dropdownFormControl\"\n [placeholder]=\"placeholder\"\n [dataKey]=\"dataKeyProperty\"\n [optionLabel]=\"itemsLabelProperty\"\n [optionValue]=\"itemsValueProperty\"\n [optionDisabled]=\"itemsDisabledProperty\"\n [options]=\"(items$ | async) ?? []\"\n [styleClass]=\"className\"\n [panelStyleClass]=\"dropdownClassName\"\n [filter]=\"true\"\n [showToggleAll]=\"false\"\n (onPanelHide)=\"onPanelHide($event)\"\n appendTo=\"body\">\n </p-multiSelect>\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: DropdownModule }, { kind: "component", type: i3$1.Dropdown, selector: "p-dropdown", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "ngmodule", type: MultiSelectModule }, { kind: "component", type: i4$2.MultiSelect, selector: "p-multiSelect", inputs: ["id", "ariaLabel", "style", "styleClass", "panelStyle", "panelStyleClass", "inputId", "disabled", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "appendTo", "dataKey", "name", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "filterBy", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "showClear", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "defaultLabel", "placeholder", "options", "filterValue", "itemSize", "selectAll", "focusOnHover", "filterFields", "selectOnFocus", "autoOptionFocus"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
11411
11725
|
}
|
|
11412
11726
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngDropdownComponent, decorators: [{
|
|
11413
11727
|
type: Component,
|
|
11414
|
-
args: [{ standalone: true, selector: 'mng-dropdown', providers: [MNG_DROPDOWN_VALUE_ACCESSOR], imports: [DropdownModule, MultiSelectModule, TranslateModule, AsyncPipe, NgIf, ReactiveFormsModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<p-dropdown\n *ngIf=\"!multiselect; else pMultiselect\"\n [formControl]=\"dropdownFormControl\"\n [placeholder]=\"placeholder\"\n [dataKey]=\"dataKeyProperty\"\n [optionLabel]=\"itemsLabelProperty\"\n [optionValue]=\"itemsValueProperty\"\n [optionDisabled]=\"itemsDisabledProperty\"\n [options]=\"(items$ | async) ?? undefined\"\n [showClear]=\"showClear\"\n [autoDisplayFirst]=\"false\"\n [styleClass]=\"className\"\n [panelStyleClass]=\"dropdownClassName\"\n (onBlur)=\"onDropdownBlur($event)\"\n [dropdownIcon]=\"($loading | async) ?? false ? 'pi pi-spinner pi-spin' : 'pi pi-chevron-down'\"\n appendTo=\"body\">\n</p-dropdown>\n<ng-template #pMultiselect>\n <p-multiSelect\n [maxSelectedLabels]=\"1\"\n [selectedItemsLabel]=\"'mngDropdown.multiselectOverMaxDisplayLimit' | translate\"\n [formControl]=\"dropdownFormControl\"\n [
|
|
11728
|
+
args: [{ standalone: true, selector: 'mng-dropdown', providers: [MNG_DROPDOWN_VALUE_ACCESSOR], imports: [DropdownModule, MultiSelectModule, TranslateModule, AsyncPipe, NgIf, ReactiveFormsModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<p-dropdown\n *ngIf=\"!multiselect; else pMultiselect\"\n [formControl]=\"dropdownFormControl\"\n [placeholder]=\"placeholder\"\n [dataKey]=\"dataKeyProperty\"\n [optionLabel]=\"itemsLabelProperty\"\n [optionValue]=\"itemsValueProperty\"\n [optionDisabled]=\"itemsDisabledProperty\"\n [options]=\"(items$ | async) ?? undefined\"\n [showClear]=\"showClear\"\n [autoDisplayFirst]=\"false\"\n [styleClass]=\"className\"\n [panelStyleClass]=\"dropdownClassName\"\n (onBlur)=\"onDropdownBlur($event)\"\n [dropdownIcon]=\"($loading | async) ?? false ? 'pi pi-spinner pi-spin' : 'pi pi-chevron-down'\"\n appendTo=\"body\">\n</p-dropdown>\n<ng-template #pMultiselect>\n <p-multiSelect\n [maxSelectedLabels]=\"1\"\n [selectedItemsLabel]=\"'mngDropdown.multiselectOverMaxDisplayLimit' | translate\"\n [formControl]=\"dropdownFormControl\"\n [placeholder]=\"placeholder\"\n [dataKey]=\"dataKeyProperty\"\n [optionLabel]=\"itemsLabelProperty\"\n [optionValue]=\"itemsValueProperty\"\n [optionDisabled]=\"itemsDisabledProperty\"\n [options]=\"(items$ | async) ?? []\"\n [styleClass]=\"className\"\n [panelStyleClass]=\"dropdownClassName\"\n [filter]=\"true\"\n [showToggleAll]=\"false\"\n (onPanelHide)=\"onPanelHide($event)\"\n appendTo=\"body\">\n </p-multiSelect>\n</ng-template>\n" }]
|
|
11415
11729
|
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i2.TranslateService }, { type: MngFormlyFieldWrapperComponent, decorators: [{
|
|
11416
11730
|
type: Optional
|
|
11417
11731
|
}] }]; }, propDecorators: { dataProvider: [{
|
|
@@ -11460,6 +11774,7 @@ class MngDateRangeComponent {
|
|
|
11460
11774
|
this.formBuilder = formBuilder;
|
|
11461
11775
|
this.showTime = false;
|
|
11462
11776
|
this.showSeconds = false;
|
|
11777
|
+
this._disabled = false;
|
|
11463
11778
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
11464
11779
|
this.onChangeFn = () => { };
|
|
11465
11780
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
@@ -11475,12 +11790,17 @@ class MngDateRangeComponent {
|
|
|
11475
11790
|
get dateRangeCtrl() {
|
|
11476
11791
|
return this.fromToFormControl.get('dateRange');
|
|
11477
11792
|
}
|
|
11793
|
+
set disabled(isDisabled) {
|
|
11794
|
+
this._disabled = isDisabled;
|
|
11795
|
+
this.setDisabledState(isDisabled);
|
|
11796
|
+
}
|
|
11478
11797
|
ngOnInit() {
|
|
11479
11798
|
this.fromToFormControl = this.formBuilder.group({
|
|
11480
11799
|
from: [],
|
|
11481
11800
|
to: [],
|
|
11482
11801
|
dateRange: []
|
|
11483
11802
|
});
|
|
11803
|
+
this.setDisabledState(this._disabled);
|
|
11484
11804
|
this.subscriptions.push(merge(this.fromCtrl.valueChanges, this.toCtrl.valueChanges, this.dateRangeCtrl.valueChanges).subscribe(() => this.onValueChange()));
|
|
11485
11805
|
}
|
|
11486
11806
|
ngOnDestroy() {
|
|
@@ -11493,10 +11813,10 @@ class MngDateRangeComponent {
|
|
|
11493
11813
|
this.onTouchedFn = fn;
|
|
11494
11814
|
}
|
|
11495
11815
|
setDisabledState(isDisabled) {
|
|
11496
|
-
if (isDisabled) {
|
|
11816
|
+
if (isDisabled && this.fromToFormControl.enabled) {
|
|
11497
11817
|
this.fromToFormControl.disable();
|
|
11498
11818
|
}
|
|
11499
|
-
else {
|
|
11819
|
+
else if (!isDisabled && this.fromToFormControl.disabled) {
|
|
11500
11820
|
this.fromToFormControl.enable();
|
|
11501
11821
|
}
|
|
11502
11822
|
}
|
|
@@ -11537,7 +11857,7 @@ class MngDateRangeComponent {
|
|
|
11537
11857
|
}
|
|
11538
11858
|
}
|
|
11539
11859
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngDateRangeComponent, deps: [{ token: i1$3.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11540
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
11860
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "16.2.6", type: MngDateRangeComponent, isStandalone: true, selector: "mng-date-range", inputs: { placeholder: "placeholder", showTime: "showTime", showSeconds: "showSeconds", dateFormat: "dateFormat", disabled: ["disabled", "disabled", booleanAttribute] }, providers: [MNG_DATE_RANGE_VALUE_ACCESSOR], ngImport: i0, template: "<ng-container *ngIf=\"showTime; else defaultRange\">\n <div class=\"flex gap-2\">\n <p-calendar\n appendTo=\"body\"\n [formControl]=\"fromCtrl\"\n [maxDate]=\"toCtrl.value\"\n [placeholder]=\"placeholder\"\n [dateFormat]=\"dateFormat\"\n [showTime]=\"showTime\"\n [showSeconds]=\"showSeconds\"\n [showIcon]=\"true\"\n [firstDayOfWeek]=\"1\"\n (onFocus)=\"onTouchedFn()\"></p-calendar>\n <p-calendar\n appendTo=\"body\"\n [formControl]=\"toCtrl\"\n [minDate]=\"fromCtrl.value\"\n [placeholder]=\"placeholder\"\n [dateFormat]=\"dateFormat\"\n [showTime]=\"showTime\"\n [showSeconds]=\"showSeconds\"\n [showIcon]=\"true\"\n [firstDayOfWeek]=\"1\"\n (onFocus)=\"onTouchedFn()\"></p-calendar>\n </div>\n</ng-container>\n<ng-template #defaultRange>\n <p-calendar\n appendTo=\"body\"\n [formControl]=\"dateRangeCtrl\"\n [placeholder]=\"placeholder\"\n [dateFormat]=\"dateFormat\"\n selectionMode=\"range\"\n [showIcon]=\"true\"\n [firstDayOfWeek]=\"1\"\n (onFocus)=\"onTouchedFn()\"></p-calendar>\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: CalendarModule }, { kind: "component", type: i2$3.Calendar, selector: "p-calendar", inputs: ["style", "styleClass", "inputStyle", "inputId", "name", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "disabled", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "appendTo", "readonlyInput", "shortYearCutoff", "monthNavigator", "yearNavigator", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "required", "showOnFocus", "showWeek", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "minDate", "maxDate", "disabledDates", "disabledDays", "yearRange", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "locale", "view", "defaultDate"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
11541
11861
|
}
|
|
11542
11862
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngDateRangeComponent, decorators: [{
|
|
11543
11863
|
type: Component,
|
|
@@ -11550,6 +11870,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImpor
|
|
|
11550
11870
|
type: Input
|
|
11551
11871
|
}], dateFormat: [{
|
|
11552
11872
|
type: Input
|
|
11873
|
+
}], disabled: [{
|
|
11874
|
+
type: Input,
|
|
11875
|
+
args: [{ transform: booleanAttribute }]
|
|
11553
11876
|
}] } });
|
|
11554
11877
|
|
|
11555
11878
|
class MngActionEditorComponent {
|
|
@@ -11947,11 +12270,11 @@ class MngActionEditorComponent {
|
|
|
11947
12270
|
this.instanceReactivationSubscription?.unsubscribe();
|
|
11948
12271
|
}
|
|
11949
12272
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngActionEditorComponent, deps: [{ token: i2.TranslateService }, { token: MngActionExecutorService }, { token: MngCommonsService }, { token: i1$2.ConfirmationService }, { token: i4.DialogService }, { token: i4.DynamicDialogConfig, optional: true }, { token: MngViewContainerComponentService, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11950
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MngActionEditorComponent, isStandalone: true, selector: "mng-action-editor", inputs: { action: "action", itemIdInit: ["itemId", "itemIdInit"], itemInit: ["item", "itemInit"], actionData: "actionData", dataProvider: "dataProvider", viewContainerInit: ["viewContainer", "viewContainerInit"] }, outputs: { actionRunEventEmitter: "actionSubmit", actionCancelEventEmitter: "actionCancel" }, host: { listeners: { "window:beforeunload": "beforeWindowUnload()", "window:keydown.Escape": "onEscapePressed()" } }, queries: [{ propertyName: "templates", predicate: MngTemplateDirective }], viewQueries: [{ propertyName: "submitButtonElementRef", first: true, predicate: ["submitButton"], descendants: true }, { propertyName: "editorComponent", first: true, predicate: MngFormEditorComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<h5 *ngIf=\"!isDialog && title\">{{ title }}</h5>\n<span *ngIf=\"isDialog && action.activationTrigger === ActionActivationTriggerEnum.OnRoute\" class=\"p-dialog-header dialog-close-button-wrapper\">\n <button\n class=\"p-dialog-header-icon p-dialog-header-maximize p-link\"\n type=\"button\"\n (click)=\"closeWithUnsavedChangesConfirmation()\"\n (keydown.enter)=\"closeWithUnsavedChangesConfirmation()\">\n <span class=\"p-dialog-header-close-icon pi pi-times\"></span>\n </button>\n</span>\n<div class=\"h-full flex flex-column\">\n <div class=\"flex-grow-1 mng-action-editor-toolbar-container\" *ngIf=\"toolbarLeftActions.length > 0 || toolbarRightActions.length > 0\">\n <p-toolbar styleClass=\"mng-action-editor-toolbar\">\n <ng-template pTemplate=\"left\">\n <mng-action\n *ngFor=\"let action of toolbarLeftActions\"\n [action]=\"action\"\n [disabled]=\"submitLoading$\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading$ : actionDefaultLoadingInput\"\n [viewContainer]=\"viewContainer\"\n [hostComponent]=\"this\"\n [route]=\"dialogRoute\"\n [item]=\"item\"\n [itemId]=\"itemId\"></mng-action>\n </ng-template>\n <ng-template pTemplate=\"right\">\n <mng-action\n *ngFor=\"let action of toolbarRightActions\"\n [action]=\"action\"\n [disabled]=\"submitLoading$\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading$ : actionDefaultLoadingInput\"\n [viewContainer]=\"viewContainer\"\n [hostComponent]=\"this\"\n [route]=\"dialogRoute\"\n [item]=\"item\"\n [itemId]=\"itemId\"></mng-action>\n </ng-template>\n </p-toolbar>\n </div>\n\n <div class=\"flex-grow-1 mng-action-editor-form-container\">\n <div class=\"text-center\" *ngIf=\"loading$ | async\">\n <p-progressSpinner [style]=\"{width: '3rem', height: '3rem'}\" strokeWidth=\"3\"></p-progressSpinner>\n </div>\n <mng-form-editor\n *ngIf=\"action.editorDescriptor && (loading$ | async) === false\"\n [descriptor]=\"action.editorDescriptor\"\n [item]=\"item\"\n [viewContainer]=\"viewContainer\"\n [isFormDisabled]=\"isFormDisabled\"\n (formSubmit)=\"onSubmit($event)\">\n </mng-form-editor>\n </div>\n\n <div class=\"flex flex-row justify-content-between mng-action-editor-footer-container\">\n <div>\n <mng-action\n *ngFor=\"let action of footerLeftActions\"\n [action]=\"action\"\n [disabled]=\"submitLoading$\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading$ : actionDefaultLoadingInput\"\n [viewContainer]=\"viewContainer\"\n [hostComponent]=\"this\"\n [route]=\"dialogRoute\"\n [item]=\"item\"\n [itemId]=\"itemId\"></mng-action>\n </div>\n <div>\n <mng-action\n *ngFor=\"let action of footerRightActions\"\n [action]=\"action\"\n [disabled]=\"submitLoading$\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading$ : actionDefaultLoadingInput\"\n [viewContainer]=\"viewContainer\"\n [hostComponent]=\"this\"\n [route]=\"dialogRoute\"\n [item]=\"item\"\n [itemId]=\"itemId\"></mng-action>\n </div>\n </div>\n</div>\n<p-confirmDialog [key]=\"confirmDialogKey\" [baseZIndex]=\"50\" appendTo=\"body\"></p-confirmDialog>\n", styles: [".dialog-close-button-wrapper{position:absolute;top:1.286rem;right:1.714rem;background:transparent;padding:0}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ToolbarModule }, { kind: "component", type:
|
|
12273
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MngActionEditorComponent, isStandalone: true, selector: "mng-action-editor", inputs: { action: "action", itemIdInit: ["itemId", "itemIdInit"], itemInit: ["item", "itemInit"], actionData: "actionData", dataProvider: "dataProvider", viewContainerInit: ["viewContainer", "viewContainerInit"] }, outputs: { actionRunEventEmitter: "actionSubmit", actionCancelEventEmitter: "actionCancel" }, host: { listeners: { "window:beforeunload": "beforeWindowUnload()", "window:keydown.Escape": "onEscapePressed()" } }, queries: [{ propertyName: "templates", predicate: MngTemplateDirective }], viewQueries: [{ propertyName: "submitButtonElementRef", first: true, predicate: ["submitButton"], descendants: true }, { propertyName: "editorComponent", first: true, predicate: MngFormEditorComponent, descendants: true }], usesOnChanges: true, hostDirectives: [{ directive: MngDialogKeydownHandlerDirective }], ngImport: i0, template: "<h5 *ngIf=\"!isDialog && title\">{{ title }}</h5>\n<span *ngIf=\"isDialog && action.activationTrigger === ActionActivationTriggerEnum.OnRoute\" class=\"p-dialog-header dialog-close-button-wrapper\">\n <button\n class=\"p-dialog-header-icon p-dialog-header-maximize p-link\"\n type=\"button\"\n (click)=\"closeWithUnsavedChangesConfirmation()\"\n (keydown.enter)=\"closeWithUnsavedChangesConfirmation()\">\n <span class=\"p-dialog-header-close-icon pi pi-times\"></span>\n </button>\n</span>\n<div class=\"h-full flex flex-column\">\n <div class=\"flex-grow-1 mng-action-editor-toolbar-container\" *ngIf=\"toolbarLeftActions.length > 0 || toolbarRightActions.length > 0\">\n <p-toolbar styleClass=\"mng-action-editor-toolbar\">\n <ng-template pTemplate=\"left\">\n <mng-action\n *ngFor=\"let action of toolbarLeftActions\"\n [action]=\"action\"\n [disabled]=\"submitLoading$\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading$ : actionDefaultLoadingInput\"\n [viewContainer]=\"viewContainer\"\n [hostComponent]=\"this\"\n [route]=\"dialogRoute\"\n [item]=\"item\"\n [itemId]=\"itemId\"></mng-action>\n </ng-template>\n <ng-template pTemplate=\"right\">\n <mng-action\n *ngFor=\"let action of toolbarRightActions\"\n [action]=\"action\"\n [disabled]=\"submitLoading$\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading$ : actionDefaultLoadingInput\"\n [viewContainer]=\"viewContainer\"\n [hostComponent]=\"this\"\n [route]=\"dialogRoute\"\n [item]=\"item\"\n [itemId]=\"itemId\"></mng-action>\n </ng-template>\n </p-toolbar>\n </div>\n\n <div class=\"flex-grow-1 mng-action-editor-form-container\">\n <div class=\"text-center\" *ngIf=\"loading$ | async\">\n <p-progressSpinner [style]=\"{width: '3rem', height: '3rem'}\" strokeWidth=\"3\"></p-progressSpinner>\n </div>\n <mng-form-editor\n *ngIf=\"action.editorDescriptor && (loading$ | async) === false\"\n [descriptor]=\"action.editorDescriptor\"\n [item]=\"item\"\n [viewContainer]=\"viewContainer\"\n [isFormDisabled]=\"isFormDisabled\"\n (formSubmit)=\"onSubmit($event)\">\n </mng-form-editor>\n </div>\n\n <div class=\"flex flex-row justify-content-between mng-action-editor-footer-container\">\n <div>\n <mng-action\n *ngFor=\"let action of footerLeftActions\"\n [action]=\"action\"\n [disabled]=\"submitLoading$\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading$ : actionDefaultLoadingInput\"\n [viewContainer]=\"viewContainer\"\n [hostComponent]=\"this\"\n [route]=\"dialogRoute\"\n [item]=\"item\"\n [itemId]=\"itemId\"></mng-action>\n </div>\n <div>\n <mng-action\n *ngFor=\"let action of footerRightActions\"\n [action]=\"action\"\n [disabled]=\"submitLoading$\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading$ : actionDefaultLoadingInput\"\n [viewContainer]=\"viewContainer\"\n [hostComponent]=\"this\"\n [route]=\"dialogRoute\"\n [item]=\"item\"\n [itemId]=\"itemId\"></mng-action>\n </div>\n </div>\n</div>\n<p-confirmDialog [key]=\"confirmDialogKey\" [baseZIndex]=\"50\" appendTo=\"body\"></p-confirmDialog>\n", styles: [".dialog-close-button-wrapper{position:absolute;top:1.286rem;right:1.714rem;background:transparent;padding:0}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ToolbarModule }, { kind: "component", type: i6$2.Toolbar, selector: "p-toolbar", inputs: ["style", "styleClass", "ariaLabelledBy"] }, { kind: "component", type: MngActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData", "queryParam", "dataProvider", "hostComponent", "route", "disabled", "loading", "viewContainer", "selectedItems"], outputs: ["finish"] }, { kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: ProgressSpinnerModule }, { kind: "component", type: i7.ProgressSpinner, selector: "p-progressSpinner", inputs: ["styleClass", "style", "strokeWidth", "fill", "animationDuration"] }, { kind: "component", type: MngFormEditorComponent, selector: "mng-form-editor", inputs: ["descriptor", "submitLoading", "item", "viewContainer", "isFormDisabled"], outputs: ["formSubmit"] }, { kind: "ngmodule", type: ConfirmDialogModule }, { kind: "component", type: i9.ConfirmDialog, selector: "p-confirmDialog", inputs: ["header", "icon", "message", "style", "styleClass", "maskStyleClass", "acceptIcon", "acceptLabel", "closeAriaLabel", "acceptAriaLabel", "acceptVisible", "rejectIcon", "rejectLabel", "rejectAriaLabel", "rejectVisible", "acceptButtonStyleClass", "rejectButtonStyleClass", "closeOnEscape", "dismissableMask", "blockScroll", "rtl", "closable", "appendTo", "key", "autoZIndex", "baseZIndex", "transitionOptions", "focusTrap", "defaultFocus", "breakpoints", "visible", "position"], outputs: ["onHide"] }, { kind: "directive", type: i1$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
11951
12274
|
}
|
|
11952
12275
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngActionEditorComponent, decorators: [{
|
|
11953
12276
|
type: Component,
|
|
11954
|
-
args: [{ standalone: true, selector: 'mng-action-editor', imports: [NgIf, ToolbarModule, MngActionComponent, NgForOf, AsyncPipe, ProgressSpinnerModule, MngFormEditorComponent, ConfirmDialogModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<h5 *ngIf=\"!isDialog && title\">{{ title }}</h5>\n<span *ngIf=\"isDialog && action.activationTrigger === ActionActivationTriggerEnum.OnRoute\" class=\"p-dialog-header dialog-close-button-wrapper\">\n <button\n class=\"p-dialog-header-icon p-dialog-header-maximize p-link\"\n type=\"button\"\n (click)=\"closeWithUnsavedChangesConfirmation()\"\n (keydown.enter)=\"closeWithUnsavedChangesConfirmation()\">\n <span class=\"p-dialog-header-close-icon pi pi-times\"></span>\n </button>\n</span>\n<div class=\"h-full flex flex-column\">\n <div class=\"flex-grow-1 mng-action-editor-toolbar-container\" *ngIf=\"toolbarLeftActions.length > 0 || toolbarRightActions.length > 0\">\n <p-toolbar styleClass=\"mng-action-editor-toolbar\">\n <ng-template pTemplate=\"left\">\n <mng-action\n *ngFor=\"let action of toolbarLeftActions\"\n [action]=\"action\"\n [disabled]=\"submitLoading$\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading$ : actionDefaultLoadingInput\"\n [viewContainer]=\"viewContainer\"\n [hostComponent]=\"this\"\n [route]=\"dialogRoute\"\n [item]=\"item\"\n [itemId]=\"itemId\"></mng-action>\n </ng-template>\n <ng-template pTemplate=\"right\">\n <mng-action\n *ngFor=\"let action of toolbarRightActions\"\n [action]=\"action\"\n [disabled]=\"submitLoading$\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading$ : actionDefaultLoadingInput\"\n [viewContainer]=\"viewContainer\"\n [hostComponent]=\"this\"\n [route]=\"dialogRoute\"\n [item]=\"item\"\n [itemId]=\"itemId\"></mng-action>\n </ng-template>\n </p-toolbar>\n </div>\n\n <div class=\"flex-grow-1 mng-action-editor-form-container\">\n <div class=\"text-center\" *ngIf=\"loading$ | async\">\n <p-progressSpinner [style]=\"{width: '3rem', height: '3rem'}\" strokeWidth=\"3\"></p-progressSpinner>\n </div>\n <mng-form-editor\n *ngIf=\"action.editorDescriptor && (loading$ | async) === false\"\n [descriptor]=\"action.editorDescriptor\"\n [item]=\"item\"\n [viewContainer]=\"viewContainer\"\n [isFormDisabled]=\"isFormDisabled\"\n (formSubmit)=\"onSubmit($event)\">\n </mng-form-editor>\n </div>\n\n <div class=\"flex flex-row justify-content-between mng-action-editor-footer-container\">\n <div>\n <mng-action\n *ngFor=\"let action of footerLeftActions\"\n [action]=\"action\"\n [disabled]=\"submitLoading$\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading$ : actionDefaultLoadingInput\"\n [viewContainer]=\"viewContainer\"\n [hostComponent]=\"this\"\n [route]=\"dialogRoute\"\n [item]=\"item\"\n [itemId]=\"itemId\"></mng-action>\n </div>\n <div>\n <mng-action\n *ngFor=\"let action of footerRightActions\"\n [action]=\"action\"\n [disabled]=\"submitLoading$\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading$ : actionDefaultLoadingInput\"\n [viewContainer]=\"viewContainer\"\n [hostComponent]=\"this\"\n [route]=\"dialogRoute\"\n [item]=\"item\"\n [itemId]=\"itemId\"></mng-action>\n </div>\n </div>\n</div>\n<p-confirmDialog [key]=\"confirmDialogKey\" [baseZIndex]=\"50\" appendTo=\"body\"></p-confirmDialog>\n", styles: [".dialog-close-button-wrapper{position:absolute;top:1.286rem;right:1.714rem;background:transparent;padding:0}\n"] }]
|
|
12277
|
+
args: [{ standalone: true, selector: 'mng-action-editor', imports: [NgIf, ToolbarModule, MngActionComponent, NgForOf, AsyncPipe, ProgressSpinnerModule, MngFormEditorComponent, ConfirmDialogModule], hostDirectives: [MngDialogKeydownHandlerDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "<h5 *ngIf=\"!isDialog && title\">{{ title }}</h5>\n<span *ngIf=\"isDialog && action.activationTrigger === ActionActivationTriggerEnum.OnRoute\" class=\"p-dialog-header dialog-close-button-wrapper\">\n <button\n class=\"p-dialog-header-icon p-dialog-header-maximize p-link\"\n type=\"button\"\n (click)=\"closeWithUnsavedChangesConfirmation()\"\n (keydown.enter)=\"closeWithUnsavedChangesConfirmation()\">\n <span class=\"p-dialog-header-close-icon pi pi-times\"></span>\n </button>\n</span>\n<div class=\"h-full flex flex-column\">\n <div class=\"flex-grow-1 mng-action-editor-toolbar-container\" *ngIf=\"toolbarLeftActions.length > 0 || toolbarRightActions.length > 0\">\n <p-toolbar styleClass=\"mng-action-editor-toolbar\">\n <ng-template pTemplate=\"left\">\n <mng-action\n *ngFor=\"let action of toolbarLeftActions\"\n [action]=\"action\"\n [disabled]=\"submitLoading$\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading$ : actionDefaultLoadingInput\"\n [viewContainer]=\"viewContainer\"\n [hostComponent]=\"this\"\n [route]=\"dialogRoute\"\n [item]=\"item\"\n [itemId]=\"itemId\"></mng-action>\n </ng-template>\n <ng-template pTemplate=\"right\">\n <mng-action\n *ngFor=\"let action of toolbarRightActions\"\n [action]=\"action\"\n [disabled]=\"submitLoading$\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading$ : actionDefaultLoadingInput\"\n [viewContainer]=\"viewContainer\"\n [hostComponent]=\"this\"\n [route]=\"dialogRoute\"\n [item]=\"item\"\n [itemId]=\"itemId\"></mng-action>\n </ng-template>\n </p-toolbar>\n </div>\n\n <div class=\"flex-grow-1 mng-action-editor-form-container\">\n <div class=\"text-center\" *ngIf=\"loading$ | async\">\n <p-progressSpinner [style]=\"{width: '3rem', height: '3rem'}\" strokeWidth=\"3\"></p-progressSpinner>\n </div>\n <mng-form-editor\n *ngIf=\"action.editorDescriptor && (loading$ | async) === false\"\n [descriptor]=\"action.editorDescriptor\"\n [item]=\"item\"\n [viewContainer]=\"viewContainer\"\n [isFormDisabled]=\"isFormDisabled\"\n (formSubmit)=\"onSubmit($event)\">\n </mng-form-editor>\n </div>\n\n <div class=\"flex flex-row justify-content-between mng-action-editor-footer-container\">\n <div>\n <mng-action\n *ngFor=\"let action of footerLeftActions\"\n [action]=\"action\"\n [disabled]=\"submitLoading$\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading$ : actionDefaultLoadingInput\"\n [viewContainer]=\"viewContainer\"\n [hostComponent]=\"this\"\n [route]=\"dialogRoute\"\n [item]=\"item\"\n [itemId]=\"itemId\"></mng-action>\n </div>\n <div>\n <mng-action\n *ngFor=\"let action of footerRightActions\"\n [action]=\"action\"\n [disabled]=\"submitLoading$\"\n [loading]=\"$any(action).submitType === actionEditorSubmitTypeSubmit ? submitLoading$ : actionDefaultLoadingInput\"\n [viewContainer]=\"viewContainer\"\n [hostComponent]=\"this\"\n [route]=\"dialogRoute\"\n [item]=\"item\"\n [itemId]=\"itemId\"></mng-action>\n </div>\n </div>\n</div>\n<p-confirmDialog [key]=\"confirmDialogKey\" [baseZIndex]=\"50\" appendTo=\"body\"></p-confirmDialog>\n", styles: [".dialog-close-button-wrapper{position:absolute;top:1.286rem;right:1.714rem;background:transparent;padding:0}\n"] }]
|
|
11955
12278
|
}], ctorParameters: function () { return [{ type: i2.TranslateService }, { type: MngActionExecutorService }, { type: MngCommonsService }, { type: i1$2.ConfirmationService }, { type: i4.DialogService }, { type: i4.DynamicDialogConfig, decorators: [{
|
|
11956
12279
|
type: Optional
|
|
11957
12280
|
}] }, { type: MngViewContainerComponentService, decorators: [{
|
|
@@ -12237,7 +12560,7 @@ class MngFormlyFieldInputComponent extends FieldType {
|
|
|
12237
12560
|
}
|
|
12238
12561
|
}
|
|
12239
12562
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngFormlyFieldInputComponent, deps: [{ token: LOCALE_ID }, { token: i1$3.FormBuilder }, { token: i2.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
12240
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MngFormlyFieldInputComponent, isStandalone: true, selector: "mng-formly-field-input", usesInheritance: true, ngImport: i0, template: "<ng-container [ngSwitch]=\"props.type\">\n <p-inputNumber\n *ngSwitchCase=\"'number'\"\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [min]=\"descriptor.numberAutoCorrect ? descriptor.numberMin : undefined\"\n [max]=\"descriptor.numberAutoCorrect ? descriptor.numberMax : undefined\"\n [step]=\"$any(descriptor.numberStep)\"\n [useGrouping]=\"descriptor.numberUseGrouping\"\n [minFractionDigits]=\"descriptor.numberMinFractionDigits || 0\"\n [maxFractionDigits]=\"descriptor.numberMaxFractionDigits || 0\"\n [inputStyleClass]=\"descriptor.inputClassName\"\n [locale]=\"descriptor.locale ?? applicationLocale\"\n [mode]=\"numberFieldMode\"\n [currency]=\"currency\"\n [currencyDisplay]=\"descriptor.currencyDisplay\">\n </p-inputNumber>\n\n <div *ngSwitchCase=\"'switch'\" class=\"field flex flex-column\">\n <label [for]=\"key\" [class]=\"descriptor.labelClassName\">{{ props.label! | translate }} <span *ngIf=\"props.required && props['hideRequiredMarker'] !== true\">*</span></label>\n <p-inputSwitch [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [styleClass]=\"descriptor.inputClassName\"></p-inputSwitch>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n </div>\n\n <ng-container *ngSwitchCase=\"'radio'\">\n <div *ngFor=\"let option of descriptor.radioOptions\" [id]=\"$any(key)\" class=\"field-radiobutton\">\n <p-radioButton\n [name]=\"$any(key)\"\n [value]=\"option.value\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [styleClass]=\"descriptor.inputClassName\"></p-radioButton>\n <label [for]=\"option.value\" [class]=\"'mng-radio-button-label ' + descriptor.labelClassName\">{{ option.title | translate }}</label>\n </div>\n </ng-container>\n\n <textarea\n *ngSwitchCase=\"'textarea'\"\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [rows]=\"descriptor.rows ?? 3\"\n pInputTextarea\n [class]=\"descriptor.inputClassName\">\n </textarea>\n\n <p-calendar\n *ngSwitchCase=\"'datepicker'\"\n appendTo=\"body\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [dateFormat]=\"descriptor.datePickerFormat ?? 'dd.mm.yy'\"\n [minDate]=\"$any(descriptor.datePickerMin)\"\n [maxDate]=\"$any(descriptor.datePickerMax)\"\n [showTime]=\"descriptor.datePickerShowTime\"\n [showSeconds]=\"descriptor.datePickerShowSeconds\"\n [showIcon]=\"true\"\n [inputStyleClass]=\"descriptor.inputClassName\"\n [firstDayOfWeek]=\"1\">\n </p-calendar>\n\n <p-inputMask\n *ngSwitchCase=\"'mask'\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [mask]=\"descriptor.mask\"\n [placeholder]=\"descriptor.placeholder\"\n [slotChar]=\"$any(descriptor.slotChar)\"\n [styleClass]=\"descriptor.inputClassName\">\n </p-inputMask>\n\n <p-fileUpload\n #fileUploadInput\n *ngSwitchCase=\"'file'\"\n [multiple]=\"descriptor.fileMultiple\"\n [accept]=\"descriptor.fileAccept\"\n [maxFileSize]=\"descriptor.fileMaxFileSize\"\n [showUploadButton]=\"false\"\n (onSelect)=\"onFileSelect($event)\"\n (onRemove)=\"onFileRemove($event)\"\n (onClear)=\"onFileClear($event)\">\n <ng-template let-file let-idx=\"index\" pTemplate=\"file\">\n <div class=\"p-fileupload-row\">\n <div>\n <ng-container *ngIf=\"fileUploadInput.isImage(file); else fileInputDocument\">\n <span *ngIf=\"isFileImageSvg(file); else fileInputImageDefault\" class=\"flex align-items-center justify-content-center\">\n <i class=\"pi pi-image text-2xl\"></i>\n </span>\n <ng-template #fileInputImageDefault>\n <img [src]=\"file.objectURL\" [width]=\"fileUploadInput.previewWidth\" (error)=\"fileUploadInput.imageError($event)\" />\n </ng-template>\n </ng-container>\n <ng-template #fileInputDocument>\n <span class=\"flex align-items-center justify-content-center\">\n <i [class]=\"'pi ' + getFileDocumentTypeIcon(file) + ' text-2xl'\"></i>\n </span>\n </ng-template>\n </div>\n <div class=\"p-fileupload-filename\">{{ file.name }}</div>\n <div>{{ fileUploadInput.formatSize(file.size) }}</div>\n <div>\n <button\n type=\"button\"\n pButton\n (click)=\"fileUploadInput.remove($event, idx)\"\n [disabled]=\"fileUploadInput.uploading\"\n class=\"p-button-icon-only\"\n [class]=\"fileUploadInput.removeStyleClass\">\n <TimesIcon *ngIf=\"!fileUploadInput.cancelIconTemplate\" />\n </button>\n </div>\n </div>\n </ng-template>\n </p-fileUpload>\n\n <div *ngSwitchCase=\"'imageUrl'\">\n <div *ngIf=\"descriptor.imagePreview\" class=\"flex flex-wrap justify-content-start\">\n <ng-container *ngFor=\"let image of imageFormArray.controls; let idx = index\">\n <p-image\n *ngIf=\"imageFormArray.at(idx).valid && imageFormArray.at(idx).value; else noImage\"\n [src]=\"imageFormArray.at(idx).value\"\n [preview]=\"true\"\n (onImageError)=\"onImageUrlLoadError()\"\n styleClass=\"mng-image m-2\"></p-image>\n </ng-container>\n <ng-template #noImage>\n <span class=\"mng-image m-2 p-image-preview-container no-image\">\n <div class=\"p-image-preview-indicator\">\n <i class=\"p-image-preview-icon pi pi-ban\"></i>\n </div>\n </span>\n </ng-template>\n </div>\n <ng-container *ngIf=\"!descriptor.imagePreview || descriptor.imageUrlInputVisibleOnDisabled || !iFormControl.disabled\">\n <div *ngFor=\"let imageCtrlName of imageFormArray.controls; let idx = index\" class=\"p-inputgroup mt-1\">\n <input\n pInputText\n [placeholder]=\"'mngEditor.imageUrlPlaceholder' | translate\"\n [id]=\"$any(key)\"\n type=\"text\"\n [formControl]=\"$any(imageFormArray.at(idx))\"\n [formlyAttributes]=\"field\" />\n <button *ngIf=\"descriptor.fileMultiple && !iFormControl.disabled\" type=\"button\" pButton pRipple icon=\"pi pi-minus\" (click)=\"removeImageUrlAt(idx)\"></button>\n </div>\n <button\n *ngIf=\"descriptor.fileMultiple && !iFormControl.disabled\"\n type=\"button\"\n pButton\n pRipple\n icon=\"pi pi-plus\"\n class=\"p-button-primary w-auto mt-1\"\n [label]=\"'mngEditor.imageUrlAdd' | translate\"\n (click)=\"addImageUrl()\"></button>\n </ng-container>\n </div>\n\n <input *ngSwitchDefault pInputText [id]=\"$any(key)\" [type]=\"props.type || 'text'\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" />\n</ng-container>\n", dependencies: [{ kind: "directive", type: NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "ngmodule", type: InputNumberModule }, { kind: "component", type: i3$2.InputNumber, selector: "p-inputNumber", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "disabled"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "directive", type: i1$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i2$2.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "component", type: i2$2.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: InputSwitchModule }, { kind: "component", type: i6$3.InputSwitch, selector: "p-inputSwitch", inputs: ["style", "styleClass", "tabindex", "inputId", "name", "disabled", "readonly", "trueValue", "falseValue", "ariaLabel", "ariaLabelledBy"], outputs: ["onChange"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: RadioButtonModule }, { kind: "component", type: i7.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: CalendarModule }, { kind: "component", type: i2$3.Calendar, selector: "p-calendar", inputs: ["style", "styleClass", "inputStyle", "inputId", "name", "inputStyleClass", "placeholder", "ariaLabelledBy", "iconAriaLabel", "disabled", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "appendTo", "readonlyInput", "shortYearCutoff", "monthNavigator", "yearNavigator", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "required", "showOnFocus", "showWeek", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "minDate", "maxDate", "disabledDates", "disabledDays", "yearRange", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "locale", "view", "defaultDate"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "directive", type: i6.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "ngmodule", type: InputMaskModule }, { kind: "component", type: i10$1.InputMask, selector: "p-inputMask", inputs: ["type", "slotChar", "autoClear", "showClear", "style", "inputId", "styleClass", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabel", "ariaRequired", "disabled", "readonly", "unmask", "name", "required", "characterPattern", "autoFocus", "autocomplete", "keepBuffer", "mask"], outputs: ["onComplete", "onFocus", "onBlur", "onInput", "onKeydown", "onClear"] }, { kind: "ngmodule", type: FileUploadModule }, { kind: "component", type: i11$1.FileUpload, selector: "p-fileUpload", inputs: ["name", "url", "method", "multiple", "accept", "disabled", "auto", "withCredentials", "maxFileSize", "invalidFileSizeMessageSummary", "invalidFileSizeMessageDetail", "invalidFileTypeMessageSummary", "invalidFileTypeMessageDetail", "invalidFileLimitMessageDetail", "invalidFileLimitMessageSummary", "style", "styleClass", "previewWidth", "chooseLabel", "uploadLabel", "cancelLabel", "chooseIcon", "uploadIcon", "cancelIcon", "showUploadButton", "showCancelButton", "mode", "headers", "customUpload", "fileLimit", "uploadStyleClass", "cancelStyleClass", "removeStyleClass", "chooseStyleClass", "files"], outputs: ["onBeforeUpload", "onSend", "onUpload", "onError", "onClear", "onRemove", "onSelect", "onProgress", "uploadHandler", "onImageError"] }, { kind: "ngmodule", type: ImageModule }, { kind: "component", type: i12.Image, selector: "p-image", inputs: ["imageClass", "imageStyle", "styleClass", "style", "src", "srcSet", "sizes", "previewImageSrc", "previewImageSrcSet", "previewImageSizes", "alt", "width", "height", "appendTo", "preview", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide", "onImageError"] }, { kind: "directive", type: NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "ngmodule", type: InputTextareaModule }, { kind: "directive", type: i13.InputTextarea, selector: "[pInputTextarea]", inputs: ["autoResize"], outputs: ["onResize"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i14.InputText, selector: "[pInputText]" }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i6$1.Ripple, selector: "[pRipple]" }, { kind: "component", type: TimesIcon, selector: "TimesIcon" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
12563
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MngFormlyFieldInputComponent, isStandalone: true, selector: "mng-formly-field-input", usesInheritance: true, ngImport: i0, template: "<ng-container [ngSwitch]=\"props.type\">\n <p-inputNumber\n *ngSwitchCase=\"'number'\"\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [min]=\"descriptor.numberAutoCorrect ? descriptor.numberMin : undefined\"\n [max]=\"descriptor.numberAutoCorrect ? descriptor.numberMax : undefined\"\n [step]=\"$any(descriptor.numberStep)\"\n [useGrouping]=\"descriptor.numberUseGrouping\"\n [minFractionDigits]=\"descriptor.numberMinFractionDigits || 0\"\n [maxFractionDigits]=\"descriptor.numberMaxFractionDigits || 0\"\n [inputStyleClass]=\"descriptor.inputClassName\"\n [locale]=\"descriptor.locale ?? applicationLocale\"\n [mode]=\"numberFieldMode\"\n [currency]=\"currency\"\n [currencyDisplay]=\"descriptor.currencyDisplay\">\n </p-inputNumber>\n\n <div *ngSwitchCase=\"'switch'\" class=\"field flex flex-column\">\n <label [for]=\"key\" [class]=\"descriptor.labelClassName\">{{ props.label! | translate }} <span *ngIf=\"props.required && props['hideRequiredMarker'] !== true\">*</span></label>\n <p-inputSwitch [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [styleClass]=\"descriptor.inputClassName\"></p-inputSwitch>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n </div>\n\n <ng-container *ngSwitchCase=\"'radio'\">\n <div *ngFor=\"let option of descriptor.radioOptions\" [id]=\"$any(key)\" class=\"field-radiobutton\">\n <p-radioButton\n [name]=\"$any(key)\"\n [value]=\"option.value\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [styleClass]=\"descriptor.inputClassName\"></p-radioButton>\n <label [for]=\"option.value\" [class]=\"'mng-radio-button-label ' + descriptor.labelClassName\">{{ option.title | translate }}</label>\n </div>\n </ng-container>\n\n <textarea\n *ngSwitchCase=\"'textarea'\"\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [rows]=\"descriptor.rows ?? 3\"\n pInputTextarea\n [class]=\"descriptor.inputClassName\">\n </textarea>\n\n <p-calendar\n *ngSwitchCase=\"'datepicker'\"\n appendTo=\"body\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [dateFormat]=\"descriptor.datePickerFormat ?? 'dd.mm.yy'\"\n [minDate]=\"$any(descriptor.datePickerMin)\"\n [maxDate]=\"$any(descriptor.datePickerMax)\"\n [showTime]=\"descriptor.datePickerShowTime\"\n [showSeconds]=\"descriptor.datePickerShowSeconds\"\n [showIcon]=\"true\"\n [inputStyleClass]=\"descriptor.inputClassName\"\n [firstDayOfWeek]=\"1\">\n </p-calendar>\n\n <p-inputMask\n *ngSwitchCase=\"'mask'\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [mask]=\"descriptor.mask\"\n [placeholder]=\"descriptor.placeholder\"\n [slotChar]=\"$any(descriptor.slotChar)\"\n [styleClass]=\"descriptor.inputClassName\">\n </p-inputMask>\n\n <p-fileUpload\n #fileUploadInput\n *ngSwitchCase=\"'file'\"\n [disabled]=\"iFormControl.disabled\"\n [multiple]=\"descriptor.fileMultiple\"\n [accept]=\"descriptor.fileAccept\"\n [maxFileSize]=\"descriptor.fileMaxFileSize\"\n [showUploadButton]=\"false\"\n (onSelect)=\"onFileSelect($event)\"\n (onRemove)=\"onFileRemove($event)\"\n (onClear)=\"onFileClear($event)\">\n <ng-template let-file let-idx=\"index\" pTemplate=\"file\">\n <div class=\"p-fileupload-row\">\n <div>\n <ng-container *ngIf=\"fileUploadInput.isImage(file); else fileInputDocument\">\n <span *ngIf=\"isFileImageSvg(file); else fileInputImageDefault\" class=\"flex align-items-center justify-content-center\">\n <i class=\"pi pi-image text-2xl\"></i>\n </span>\n <ng-template #fileInputImageDefault>\n <img [src]=\"file.objectURL\" [width]=\"fileUploadInput.previewWidth\" (error)=\"fileUploadInput.imageError($event)\" />\n </ng-template>\n </ng-container>\n <ng-template #fileInputDocument>\n <span class=\"flex align-items-center justify-content-center\">\n <i [class]=\"'pi ' + getFileDocumentTypeIcon(file) + ' text-2xl'\"></i>\n </span>\n </ng-template>\n </div>\n <div class=\"p-fileupload-filename\">{{ file.name }}</div>\n <div>{{ fileUploadInput.formatSize(file.size) }}</div>\n <div>\n <button\n type=\"button\"\n pButton\n (click)=\"fileUploadInput.remove($event, idx)\"\n [disabled]=\"fileUploadInput.uploading\"\n class=\"p-button-icon-only\"\n [class]=\"fileUploadInput.removeStyleClass\">\n <TimesIcon *ngIf=\"!fileUploadInput.cancelIconTemplate\" />\n </button>\n </div>\n </div>\n </ng-template>\n <ng-template pTemplate=\"content\" let-files>\n <div *ngIf=\"files.length === 0\" class=\"text-gray-300 dropdown-area\">\n <span><i class=\"pi pi-file-import mr-2\"></i>{{ 'fileUpload.dragAndDrop' | translate }}</span>\n </div>\n </ng-template>\n </p-fileUpload>\n\n <div *ngSwitchCase=\"'imageUrl'\">\n <div *ngIf=\"descriptor.imagePreview\" class=\"flex flex-wrap justify-content-start\">\n <ng-container *ngFor=\"let image of imageFormArray.controls; let idx = index\">\n <p-image\n *ngIf=\"imageFormArray.at(idx).valid && imageFormArray.at(idx).value; else noImage\"\n [src]=\"imageFormArray.at(idx).value\"\n [preview]=\"true\"\n (onImageError)=\"onImageUrlLoadError()\"\n styleClass=\"mng-image m-2\"></p-image>\n </ng-container>\n <ng-template #noImage>\n <span class=\"mng-image m-2 p-image-preview-container no-image\">\n <div class=\"p-image-preview-indicator\">\n <i class=\"p-image-preview-icon pi pi-ban\"></i>\n </div>\n </span>\n </ng-template>\n </div>\n <ng-container *ngIf=\"!descriptor.imagePreview || descriptor.imageUrlInputVisibleOnDisabled || !iFormControl.disabled\">\n <div *ngFor=\"let imageCtrlName of imageFormArray.controls; let idx = index\" class=\"p-inputgroup mt-1\">\n <input\n pInputText\n [placeholder]=\"'mngEditor.imageUrlPlaceholder' | translate\"\n [id]=\"$any(key)\"\n type=\"text\"\n [formControl]=\"$any(imageFormArray.at(idx))\"\n [formlyAttributes]=\"field\" />\n <button *ngIf=\"descriptor.fileMultiple && !iFormControl.disabled\" type=\"button\" pButton pRipple icon=\"pi pi-minus\" (click)=\"removeImageUrlAt(idx)\"></button>\n </div>\n <button\n *ngIf=\"descriptor.fileMultiple && !iFormControl.disabled\"\n type=\"button\"\n pButton\n pRipple\n icon=\"pi pi-plus\"\n class=\"p-button-primary w-auto mt-1\"\n [label]=\"'mngEditor.imageUrlAdd' | translate\"\n (click)=\"addImageUrl()\"></button>\n </ng-container>\n </div>\n\n <input *ngSwitchDefault pInputText [id]=\"$any(key)\" [type]=\"props.type || 'text'\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" />\n</ng-container>\n", dependencies: [{ kind: "directive", type: NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "ngmodule", type: InputNumberModule }, { kind: "component", type: i3$2.InputNumber, selector: "p-inputNumber", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabelledBy", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "disabled"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "directive", type: i1$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i2$2.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "component", type: i2$2.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: InputSwitchModule }, { kind: "component", type: i6$3.InputSwitch, selector: "p-inputSwitch", inputs: ["style", "styleClass", "tabindex", "inputId", "name", "disabled", "readonly", "trueValue", "falseValue", "ariaLabel", "ariaLabelledBy"], outputs: ["onChange"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: RadioButtonModule }, { kind: "component", type: i7$1.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: CalendarModule }, { kind: "component", type: i2$3.Calendar, selector: "p-calendar", inputs: ["style", "styleClass", "inputStyle", "inputId", "name", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "disabled", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "appendTo", "readonlyInput", "shortYearCutoff", "monthNavigator", "yearNavigator", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "required", "showOnFocus", "showWeek", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "minDate", "maxDate", "disabledDates", "disabledDays", "yearRange", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "locale", "view", "defaultDate"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "directive", type: i6.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "ngmodule", type: InputMaskModule }, { kind: "component", type: i10$1.InputMask, selector: "p-inputMask", inputs: ["type", "slotChar", "autoClear", "showClear", "style", "inputId", "styleClass", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabel", "ariaLabelledBy", "ariaRequired", "disabled", "readonly", "unmask", "name", "required", "characterPattern", "autoFocus", "autocomplete", "keepBuffer", "mask"], outputs: ["onComplete", "onFocus", "onBlur", "onInput", "onKeydown", "onClear"] }, { kind: "ngmodule", type: FileUploadModule }, { kind: "component", type: i11$1.FileUpload, selector: "p-fileUpload", inputs: ["name", "url", "method", "multiple", "accept", "disabled", "auto", "withCredentials", "maxFileSize", "invalidFileSizeMessageSummary", "invalidFileSizeMessageDetail", "invalidFileTypeMessageSummary", "invalidFileTypeMessageDetail", "invalidFileLimitMessageDetail", "invalidFileLimitMessageSummary", "style", "styleClass", "previewWidth", "chooseLabel", "uploadLabel", "cancelLabel", "chooseIcon", "uploadIcon", "cancelIcon", "showUploadButton", "showCancelButton", "mode", "headers", "customUpload", "fileLimit", "uploadStyleClass", "cancelStyleClass", "removeStyleClass", "chooseStyleClass", "files"], outputs: ["onBeforeUpload", "onSend", "onUpload", "onError", "onClear", "onRemove", "onSelect", "onProgress", "uploadHandler", "onImageError"] }, { kind: "ngmodule", type: ImageModule }, { kind: "component", type: i12.Image, selector: "p-image", inputs: ["imageClass", "imageStyle", "styleClass", "style", "src", "srcSet", "sizes", "previewImageSrc", "previewImageSrcSet", "previewImageSizes", "alt", "width", "height", "loading", "appendTo", "preview", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide", "onImageError"] }, { kind: "directive", type: NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "ngmodule", type: InputTextareaModule }, { kind: "directive", type: i13.InputTextarea, selector: "[pInputTextarea]", inputs: ["autoResize"], outputs: ["onResize"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i6$4.InputText, selector: "[pInputText]" }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i6$1.Ripple, selector: "[pRipple]" }, { kind: "component", type: TimesIcon, selector: "TimesIcon" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
12241
12564
|
}
|
|
12242
12565
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngFormlyFieldInputComponent, decorators: [{
|
|
12243
12566
|
type: Component,
|
|
@@ -12261,7 +12584,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImpor
|
|
|
12261
12584
|
InputTextModule,
|
|
12262
12585
|
RippleModule,
|
|
12263
12586
|
TimesIcon
|
|
12264
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container [ngSwitch]=\"props.type\">\n <p-inputNumber\n *ngSwitchCase=\"'number'\"\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [min]=\"descriptor.numberAutoCorrect ? descriptor.numberMin : undefined\"\n [max]=\"descriptor.numberAutoCorrect ? descriptor.numberMax : undefined\"\n [step]=\"$any(descriptor.numberStep)\"\n [useGrouping]=\"descriptor.numberUseGrouping\"\n [minFractionDigits]=\"descriptor.numberMinFractionDigits || 0\"\n [maxFractionDigits]=\"descriptor.numberMaxFractionDigits || 0\"\n [inputStyleClass]=\"descriptor.inputClassName\"\n [locale]=\"descriptor.locale ?? applicationLocale\"\n [mode]=\"numberFieldMode\"\n [currency]=\"currency\"\n [currencyDisplay]=\"descriptor.currencyDisplay\">\n </p-inputNumber>\n\n <div *ngSwitchCase=\"'switch'\" class=\"field flex flex-column\">\n <label [for]=\"key\" [class]=\"descriptor.labelClassName\">{{ props.label! | translate }} <span *ngIf=\"props.required && props['hideRequiredMarker'] !== true\">*</span></label>\n <p-inputSwitch [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [styleClass]=\"descriptor.inputClassName\"></p-inputSwitch>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n </div>\n\n <ng-container *ngSwitchCase=\"'radio'\">\n <div *ngFor=\"let option of descriptor.radioOptions\" [id]=\"$any(key)\" class=\"field-radiobutton\">\n <p-radioButton\n [name]=\"$any(key)\"\n [value]=\"option.value\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [styleClass]=\"descriptor.inputClassName\"></p-radioButton>\n <label [for]=\"option.value\" [class]=\"'mng-radio-button-label ' + descriptor.labelClassName\">{{ option.title | translate }}</label>\n </div>\n </ng-container>\n\n <textarea\n *ngSwitchCase=\"'textarea'\"\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [rows]=\"descriptor.rows ?? 3\"\n pInputTextarea\n [class]=\"descriptor.inputClassName\">\n </textarea>\n\n <p-calendar\n *ngSwitchCase=\"'datepicker'\"\n appendTo=\"body\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [dateFormat]=\"descriptor.datePickerFormat ?? 'dd.mm.yy'\"\n [minDate]=\"$any(descriptor.datePickerMin)\"\n [maxDate]=\"$any(descriptor.datePickerMax)\"\n [showTime]=\"descriptor.datePickerShowTime\"\n [showSeconds]=\"descriptor.datePickerShowSeconds\"\n [showIcon]=\"true\"\n [inputStyleClass]=\"descriptor.inputClassName\"\n [firstDayOfWeek]=\"1\">\n </p-calendar>\n\n <p-inputMask\n *ngSwitchCase=\"'mask'\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [mask]=\"descriptor.mask\"\n [placeholder]=\"descriptor.placeholder\"\n [slotChar]=\"$any(descriptor.slotChar)\"\n [styleClass]=\"descriptor.inputClassName\">\n </p-inputMask>\n\n <p-fileUpload\n #fileUploadInput\n *ngSwitchCase=\"'file'\"\n [multiple]=\"descriptor.fileMultiple\"\n [accept]=\"descriptor.fileAccept\"\n [maxFileSize]=\"descriptor.fileMaxFileSize\"\n [showUploadButton]=\"false\"\n (onSelect)=\"onFileSelect($event)\"\n (onRemove)=\"onFileRemove($event)\"\n (onClear)=\"onFileClear($event)\">\n <ng-template let-file let-idx=\"index\" pTemplate=\"file\">\n <div class=\"p-fileupload-row\">\n <div>\n <ng-container *ngIf=\"fileUploadInput.isImage(file); else fileInputDocument\">\n <span *ngIf=\"isFileImageSvg(file); else fileInputImageDefault\" class=\"flex align-items-center justify-content-center\">\n <i class=\"pi pi-image text-2xl\"></i>\n </span>\n <ng-template #fileInputImageDefault>\n <img [src]=\"file.objectURL\" [width]=\"fileUploadInput.previewWidth\" (error)=\"fileUploadInput.imageError($event)\" />\n </ng-template>\n </ng-container>\n <ng-template #fileInputDocument>\n <span class=\"flex align-items-center justify-content-center\">\n <i [class]=\"'pi ' + getFileDocumentTypeIcon(file) + ' text-2xl'\"></i>\n </span>\n </ng-template>\n </div>\n <div class=\"p-fileupload-filename\">{{ file.name }}</div>\n <div>{{ fileUploadInput.formatSize(file.size) }}</div>\n <div>\n <button\n type=\"button\"\n pButton\n (click)=\"fileUploadInput.remove($event, idx)\"\n [disabled]=\"fileUploadInput.uploading\"\n class=\"p-button-icon-only\"\n [class]=\"fileUploadInput.removeStyleClass\">\n <TimesIcon *ngIf=\"!fileUploadInput.cancelIconTemplate\" />\n </button>\n </div>\n </div>\n </ng-template>\n </p-fileUpload>\n\n <div *ngSwitchCase=\"'imageUrl'\">\n <div *ngIf=\"descriptor.imagePreview\" class=\"flex flex-wrap justify-content-start\">\n <ng-container *ngFor=\"let image of imageFormArray.controls; let idx = index\">\n <p-image\n *ngIf=\"imageFormArray.at(idx).valid && imageFormArray.at(idx).value; else noImage\"\n [src]=\"imageFormArray.at(idx).value\"\n [preview]=\"true\"\n (onImageError)=\"onImageUrlLoadError()\"\n styleClass=\"mng-image m-2\"></p-image>\n </ng-container>\n <ng-template #noImage>\n <span class=\"mng-image m-2 p-image-preview-container no-image\">\n <div class=\"p-image-preview-indicator\">\n <i class=\"p-image-preview-icon pi pi-ban\"></i>\n </div>\n </span>\n </ng-template>\n </div>\n <ng-container *ngIf=\"!descriptor.imagePreview || descriptor.imageUrlInputVisibleOnDisabled || !iFormControl.disabled\">\n <div *ngFor=\"let imageCtrlName of imageFormArray.controls; let idx = index\" class=\"p-inputgroup mt-1\">\n <input\n pInputText\n [placeholder]=\"'mngEditor.imageUrlPlaceholder' | translate\"\n [id]=\"$any(key)\"\n type=\"text\"\n [formControl]=\"$any(imageFormArray.at(idx))\"\n [formlyAttributes]=\"field\" />\n <button *ngIf=\"descriptor.fileMultiple && !iFormControl.disabled\" type=\"button\" pButton pRipple icon=\"pi pi-minus\" (click)=\"removeImageUrlAt(idx)\"></button>\n </div>\n <button\n *ngIf=\"descriptor.fileMultiple && !iFormControl.disabled\"\n type=\"button\"\n pButton\n pRipple\n icon=\"pi pi-plus\"\n class=\"p-button-primary w-auto mt-1\"\n [label]=\"'mngEditor.imageUrlAdd' | translate\"\n (click)=\"addImageUrl()\"></button>\n </ng-container>\n </div>\n\n <input *ngSwitchDefault pInputText [id]=\"$any(key)\" [type]=\"props.type || 'text'\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" />\n</ng-container>\n" }]
|
|
12587
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container [ngSwitch]=\"props.type\">\n <p-inputNumber\n *ngSwitchCase=\"'number'\"\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [min]=\"descriptor.numberAutoCorrect ? descriptor.numberMin : undefined\"\n [max]=\"descriptor.numberAutoCorrect ? descriptor.numberMax : undefined\"\n [step]=\"$any(descriptor.numberStep)\"\n [useGrouping]=\"descriptor.numberUseGrouping\"\n [minFractionDigits]=\"descriptor.numberMinFractionDigits || 0\"\n [maxFractionDigits]=\"descriptor.numberMaxFractionDigits || 0\"\n [inputStyleClass]=\"descriptor.inputClassName\"\n [locale]=\"descriptor.locale ?? applicationLocale\"\n [mode]=\"numberFieldMode\"\n [currency]=\"currency\"\n [currencyDisplay]=\"descriptor.currencyDisplay\">\n </p-inputNumber>\n\n <div *ngSwitchCase=\"'switch'\" class=\"field flex flex-column\">\n <label [for]=\"key\" [class]=\"descriptor.labelClassName\">{{ props.label! | translate }} <span *ngIf=\"props.required && props['hideRequiredMarker'] !== true\">*</span></label>\n <p-inputSwitch [id]=\"$any(key)\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" [styleClass]=\"descriptor.inputClassName\"></p-inputSwitch>\n <small *ngIf=\"showError\" class=\"p-error\">\n <formly-validation-message [field]=\"field\"></formly-validation-message>\n </small>\n </div>\n\n <ng-container *ngSwitchCase=\"'radio'\">\n <div *ngFor=\"let option of descriptor.radioOptions\" [id]=\"$any(key)\" class=\"field-radiobutton\">\n <p-radioButton\n [name]=\"$any(key)\"\n [value]=\"option.value\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [styleClass]=\"descriptor.inputClassName\"></p-radioButton>\n <label [for]=\"option.value\" [class]=\"'mng-radio-button-label ' + descriptor.labelClassName\">{{ option.title | translate }}</label>\n </div>\n </ng-container>\n\n <textarea\n *ngSwitchCase=\"'textarea'\"\n [id]=\"$any(key)\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [rows]=\"descriptor.rows ?? 3\"\n pInputTextarea\n [class]=\"descriptor.inputClassName\">\n </textarea>\n\n <p-calendar\n *ngSwitchCase=\"'datepicker'\"\n appendTo=\"body\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [dateFormat]=\"descriptor.datePickerFormat ?? 'dd.mm.yy'\"\n [minDate]=\"$any(descriptor.datePickerMin)\"\n [maxDate]=\"$any(descriptor.datePickerMax)\"\n [showTime]=\"descriptor.datePickerShowTime\"\n [showSeconds]=\"descriptor.datePickerShowSeconds\"\n [showIcon]=\"true\"\n [inputStyleClass]=\"descriptor.inputClassName\"\n [firstDayOfWeek]=\"1\">\n </p-calendar>\n\n <p-inputMask\n *ngSwitchCase=\"'mask'\"\n [formControl]=\"iFormControl\"\n [formlyAttributes]=\"field\"\n [mask]=\"descriptor.mask\"\n [placeholder]=\"descriptor.placeholder\"\n [slotChar]=\"$any(descriptor.slotChar)\"\n [styleClass]=\"descriptor.inputClassName\">\n </p-inputMask>\n\n <p-fileUpload\n #fileUploadInput\n *ngSwitchCase=\"'file'\"\n [disabled]=\"iFormControl.disabled\"\n [multiple]=\"descriptor.fileMultiple\"\n [accept]=\"descriptor.fileAccept\"\n [maxFileSize]=\"descriptor.fileMaxFileSize\"\n [showUploadButton]=\"false\"\n (onSelect)=\"onFileSelect($event)\"\n (onRemove)=\"onFileRemove($event)\"\n (onClear)=\"onFileClear($event)\">\n <ng-template let-file let-idx=\"index\" pTemplate=\"file\">\n <div class=\"p-fileupload-row\">\n <div>\n <ng-container *ngIf=\"fileUploadInput.isImage(file); else fileInputDocument\">\n <span *ngIf=\"isFileImageSvg(file); else fileInputImageDefault\" class=\"flex align-items-center justify-content-center\">\n <i class=\"pi pi-image text-2xl\"></i>\n </span>\n <ng-template #fileInputImageDefault>\n <img [src]=\"file.objectURL\" [width]=\"fileUploadInput.previewWidth\" (error)=\"fileUploadInput.imageError($event)\" />\n </ng-template>\n </ng-container>\n <ng-template #fileInputDocument>\n <span class=\"flex align-items-center justify-content-center\">\n <i [class]=\"'pi ' + getFileDocumentTypeIcon(file) + ' text-2xl'\"></i>\n </span>\n </ng-template>\n </div>\n <div class=\"p-fileupload-filename\">{{ file.name }}</div>\n <div>{{ fileUploadInput.formatSize(file.size) }}</div>\n <div>\n <button\n type=\"button\"\n pButton\n (click)=\"fileUploadInput.remove($event, idx)\"\n [disabled]=\"fileUploadInput.uploading\"\n class=\"p-button-icon-only\"\n [class]=\"fileUploadInput.removeStyleClass\">\n <TimesIcon *ngIf=\"!fileUploadInput.cancelIconTemplate\" />\n </button>\n </div>\n </div>\n </ng-template>\n <ng-template pTemplate=\"content\" let-files>\n <div *ngIf=\"files.length === 0\" class=\"text-gray-300 dropdown-area\">\n <span><i class=\"pi pi-file-import mr-2\"></i>{{ 'fileUpload.dragAndDrop' | translate }}</span>\n </div>\n </ng-template>\n </p-fileUpload>\n\n <div *ngSwitchCase=\"'imageUrl'\">\n <div *ngIf=\"descriptor.imagePreview\" class=\"flex flex-wrap justify-content-start\">\n <ng-container *ngFor=\"let image of imageFormArray.controls; let idx = index\">\n <p-image\n *ngIf=\"imageFormArray.at(idx).valid && imageFormArray.at(idx).value; else noImage\"\n [src]=\"imageFormArray.at(idx).value\"\n [preview]=\"true\"\n (onImageError)=\"onImageUrlLoadError()\"\n styleClass=\"mng-image m-2\"></p-image>\n </ng-container>\n <ng-template #noImage>\n <span class=\"mng-image m-2 p-image-preview-container no-image\">\n <div class=\"p-image-preview-indicator\">\n <i class=\"p-image-preview-icon pi pi-ban\"></i>\n </div>\n </span>\n </ng-template>\n </div>\n <ng-container *ngIf=\"!descriptor.imagePreview || descriptor.imageUrlInputVisibleOnDisabled || !iFormControl.disabled\">\n <div *ngFor=\"let imageCtrlName of imageFormArray.controls; let idx = index\" class=\"p-inputgroup mt-1\">\n <input\n pInputText\n [placeholder]=\"'mngEditor.imageUrlPlaceholder' | translate\"\n [id]=\"$any(key)\"\n type=\"text\"\n [formControl]=\"$any(imageFormArray.at(idx))\"\n [formlyAttributes]=\"field\" />\n <button *ngIf=\"descriptor.fileMultiple && !iFormControl.disabled\" type=\"button\" pButton pRipple icon=\"pi pi-minus\" (click)=\"removeImageUrlAt(idx)\"></button>\n </div>\n <button\n *ngIf=\"descriptor.fileMultiple && !iFormControl.disabled\"\n type=\"button\"\n pButton\n pRipple\n icon=\"pi pi-plus\"\n class=\"p-button-primary w-auto mt-1\"\n [label]=\"'mngEditor.imageUrlAdd' | translate\"\n (click)=\"addImageUrl()\"></button>\n </ng-container>\n </div>\n\n <input *ngSwitchDefault pInputText [id]=\"$any(key)\" [type]=\"props.type || 'text'\" [formControl]=\"iFormControl\" [formlyAttributes]=\"field\" />\n</ng-container>\n" }]
|
|
12265
12588
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
12266
12589
|
type: Inject,
|
|
12267
12590
|
args: [LOCALE_ID]
|
|
@@ -12347,69 +12670,117 @@ class MngTableReloadEvent {
|
|
|
12347
12670
|
* Cannot be on push change detection strategy because of filter updates triggered from route which causes to force update values in force metadata
|
|
12348
12671
|
* and these must be propagated through to this component and beyond to primeNG.
|
|
12349
12672
|
*/
|
|
12350
|
-
class
|
|
12351
|
-
|
|
12352
|
-
|
|
12673
|
+
class MngTableColumnFilterFullComponent {
|
|
12674
|
+
get activeMatchMode() {
|
|
12675
|
+
const filter = this.primeTable.filters[this.primeField];
|
|
12676
|
+
return filter?.matchMode;
|
|
12677
|
+
}
|
|
12678
|
+
constructor() {
|
|
12353
12679
|
this.lookupTypeDropdown = FilterLookupTypeEnum.Dropdown;
|
|
12354
12680
|
this.lookupTypeAutocomplete = FilterLookupTypeEnum.Autocomplete;
|
|
12681
|
+
this.el = inject(ElementRef);
|
|
12682
|
+
this.primeTable = inject(Table);
|
|
12683
|
+
this.mngTable = inject(MngTableComponent);
|
|
12684
|
+
this.renderer = inject(Renderer2);
|
|
12685
|
+
this.primeConfig = inject(PrimeNGConfig);
|
|
12686
|
+
this.overlayService = inject(OverlayService);
|
|
12687
|
+
this.cd = inject(ChangeDetectorRef);
|
|
12688
|
+
this.document = window.document;
|
|
12355
12689
|
this.primeType = 'text';
|
|
12356
|
-
|
|
12357
|
-
this.
|
|
12690
|
+
// public matchModes: SelectItem[] = [];
|
|
12691
|
+
this.matchModes = signal([]);
|
|
12692
|
+
this.filterConstraint = signal(undefined);
|
|
12693
|
+
this.isFilterSet = computed(() => this.filterConstraint()?.matchMode === FilterMatchModeEnum.Exists ||
|
|
12694
|
+
this.filterConstraint()?.matchMode === FilterMatchModeEnum.DoesNotExist ||
|
|
12695
|
+
!this.primeTable.isFilterBlank(this.filterConstraint()?.value));
|
|
12696
|
+
this.isInputDisabled = computed(() => this.filterConstraint()?.matchMode === FilterMatchModeEnum.Exists || this.filterConstraint()?.matchMode === FilterMatchModeEnum.DoesNotExist);
|
|
12697
|
+
this.overlayVisible = signal(false);
|
|
12698
|
+
this.window = this.document.defaultView;
|
|
12699
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
12358
12700
|
this.dateDebounceSubject = new Subject();
|
|
12359
|
-
this.
|
|
12360
|
-
this.
|
|
12701
|
+
this.dateDebounceSubject.pipe(debounceTime(500), distinctUntilChanged(), takeUntilDestroyed()).subscribe(v => {
|
|
12702
|
+
this.updateFilterValue(v);
|
|
12361
12703
|
});
|
|
12362
12704
|
}
|
|
12363
|
-
get activeMatchMode() {
|
|
12364
|
-
const filter = this.primeColumnFilter?.dt.filters[this.descriptor.property];
|
|
12365
|
-
return filter?.matchMode;
|
|
12366
|
-
}
|
|
12367
12705
|
ngOnInit() {
|
|
12368
|
-
this.
|
|
12706
|
+
this.primeField = this.descriptor.property;
|
|
12369
12707
|
switch (this.descriptor.filterType) {
|
|
12370
12708
|
case FilterTypeEnum.Boolean:
|
|
12371
12709
|
this.primeType = 'boolean';
|
|
12372
|
-
this.primeShowMatchMode = false;
|
|
12373
12710
|
break;
|
|
12374
12711
|
case FilterTypeEnum.Number:
|
|
12375
12712
|
this.primeType = 'numeric';
|
|
12376
12713
|
break;
|
|
12377
12714
|
case FilterTypeEnum.Date:
|
|
12378
12715
|
this.primeType = 'date';
|
|
12379
|
-
this.primeDefaultMatchMode = FilterMatchModeEnum.DateIs;
|
|
12380
12716
|
break;
|
|
12381
12717
|
case FilterTypeEnum.Lookup:
|
|
12718
|
+
case FilterTypeEnum.LookupEnum:
|
|
12382
12719
|
this.primeType = 'lookup';
|
|
12383
12720
|
this.lookupDescriptor = this.descriptor;
|
|
12384
|
-
this.primeField = `${this.descriptor.property}${this.lookupDescriptor.itemsValueProperty ? `.${this.lookupDescriptor.itemsValueProperty}` : ''}`;
|
|
12385
|
-
this.primeMatchModeCustomOptions = [
|
|
12386
|
-
{ value: FilterMatchModeEnum.Equals, label: this.primeConfig.getTranslation(FilterMatchModeEnum.Equals) },
|
|
12387
|
-
{ value: FilterMatchModeEnum.NotEquals, label: this.primeConfig.getTranslation(FilterMatchModeEnum.NotEquals) }
|
|
12388
|
-
];
|
|
12389
|
-
if (this.lookupDescriptor.multiselect) {
|
|
12390
|
-
this.primeMatchModeCustomOptions = undefined;
|
|
12391
|
-
this.primeDefaultMatchMode = FilterMatchModeEnum.In;
|
|
12392
|
-
}
|
|
12393
12721
|
break;
|
|
12394
12722
|
case FilterTypeEnum.String:
|
|
12395
12723
|
this.primeType = 'text';
|
|
12396
|
-
this.primeDefaultMatchMode = FilterMatchModeEnum.Contains;
|
|
12397
12724
|
break;
|
|
12398
12725
|
}
|
|
12399
|
-
|
|
12400
|
-
|
|
12401
|
-
|
|
12402
|
-
|
|
12726
|
+
// generate match mode options
|
|
12727
|
+
this.translationSubscription = this.primeConfig.translationObserver.subscribe(() => {
|
|
12728
|
+
this.generateMatchModeOptions();
|
|
12729
|
+
});
|
|
12730
|
+
this.generateMatchModeOptions();
|
|
12731
|
+
this.initFilterConstraint();
|
|
12732
|
+
this.mngTableFilterMetadataSubscription = this.mngTable.filterMetadata$
|
|
12733
|
+
.pipe(filter$1(e => !!e[this.primeField]), map(e => e[this.primeField]))
|
|
12734
|
+
.subscribe(e => {
|
|
12735
|
+
if (e && (!this.filterConstraint() || this.filterConstraint().value !== e.value || this.filterConstraint().matchMode !== e.matchMode)) {
|
|
12736
|
+
this.filterConstraint.set(e);
|
|
12403
12737
|
}
|
|
12404
|
-
|
|
12405
|
-
}
|
|
12738
|
+
});
|
|
12406
12739
|
}
|
|
12407
12740
|
ngOnDestroy() {
|
|
12408
|
-
this.
|
|
12741
|
+
if (this.overlay) {
|
|
12742
|
+
this.renderer.appendChild(this.el.nativeElement, this.overlay);
|
|
12743
|
+
ZIndexUtils.clear(this.overlay);
|
|
12744
|
+
this.onOverlayHide();
|
|
12745
|
+
}
|
|
12746
|
+
this.translationSubscription?.unsubscribe();
|
|
12747
|
+
this.resetSubscription?.unsubscribe();
|
|
12748
|
+
this.overlaySubscription?.unsubscribe();
|
|
12749
|
+
this.mngTableFilterMetadataSubscription?.unsubscribe();
|
|
12409
12750
|
}
|
|
12410
12751
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
12411
|
-
|
|
12412
|
-
|
|
12752
|
+
onTextModelChange(event) {
|
|
12753
|
+
const value = event.target.value;
|
|
12754
|
+
if (value === '') {
|
|
12755
|
+
this.updateFilterValue(value);
|
|
12756
|
+
}
|
|
12757
|
+
}
|
|
12758
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
12759
|
+
onTextInputEnterKeyDown(event) {
|
|
12760
|
+
const value = event.target.value;
|
|
12761
|
+
this.updateFilterValue(value);
|
|
12762
|
+
event.preventDefault();
|
|
12763
|
+
}
|
|
12764
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
12765
|
+
onNumericModelChange(value) {
|
|
12766
|
+
if (value === null) {
|
|
12767
|
+
this.updateFilterValue(value);
|
|
12768
|
+
}
|
|
12769
|
+
}
|
|
12770
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
12771
|
+
onNumericInputKeyDown(event) {
|
|
12772
|
+
if (event.key === 'Enter') {
|
|
12773
|
+
const value = event?.target?.value ?? null;
|
|
12774
|
+
this.updateFilterValue(value !== null ? +value : null);
|
|
12775
|
+
event.preventDefault();
|
|
12776
|
+
}
|
|
12777
|
+
}
|
|
12778
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
12779
|
+
onTristateModelChange(value) {
|
|
12780
|
+
this.updateFilterValue(value);
|
|
12781
|
+
}
|
|
12782
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
12783
|
+
dateFilter(value) {
|
|
12413
12784
|
if (this.activeMatchMode === FilterMatchModeEnum.Between && Array.isArray(value)) {
|
|
12414
12785
|
const dateValues = value.filter(v => v instanceof Date);
|
|
12415
12786
|
if (dateValues.length <= 1) {
|
|
@@ -12419,46 +12790,436 @@ class MngTableColumnFilterComponent {
|
|
|
12419
12790
|
this.dateDebounceSubject.next(value);
|
|
12420
12791
|
}
|
|
12421
12792
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
12422
|
-
|
|
12423
|
-
|
|
12424
|
-
}
|
|
12425
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
12426
|
-
autocompleteFilter(value, filterCallback) {
|
|
12427
|
-
filterCallback(value);
|
|
12793
|
+
autocompleteFilter(value) {
|
|
12794
|
+
this.updateFilterValue(value);
|
|
12428
12795
|
}
|
|
12429
12796
|
// eslint-disable-next-line @typescript-eslint/ban-types, @typescript-eslint/no-explicit-any
|
|
12430
|
-
dropdownFilter(value
|
|
12797
|
+
dropdownFilter(value) {
|
|
12431
12798
|
if (Array.isArray(value) && value.length === 0) {
|
|
12432
12799
|
value = undefined;
|
|
12433
12800
|
}
|
|
12434
|
-
|
|
12801
|
+
this.updateFilterValue(value);
|
|
12802
|
+
}
|
|
12803
|
+
onMatchModeChange(matchMode) {
|
|
12804
|
+
this.filterConstraint.set({ ...this.filterConstraint(), matchMode: matchMode });
|
|
12805
|
+
this.updateDtFilter();
|
|
12806
|
+
this.hideOverlay();
|
|
12807
|
+
}
|
|
12808
|
+
onMatchModeKeyDown(event) {
|
|
12809
|
+
const item = event.target;
|
|
12810
|
+
switch (event.key) {
|
|
12811
|
+
case 'ArrowDown':
|
|
12812
|
+
// eslint-disable-next-line no-case-declarations
|
|
12813
|
+
const nextItem = this.findNextMenuModeItem(item);
|
|
12814
|
+
if (nextItem) {
|
|
12815
|
+
item.removeAttribute('tabindex');
|
|
12816
|
+
nextItem.tabIndex = '0';
|
|
12817
|
+
nextItem.focus();
|
|
12818
|
+
}
|
|
12819
|
+
event.preventDefault();
|
|
12820
|
+
break;
|
|
12821
|
+
case 'ArrowUp':
|
|
12822
|
+
// eslint-disable-next-line no-case-declarations
|
|
12823
|
+
const prevItem = this.findPrevMenuModeItem(item);
|
|
12824
|
+
if (prevItem) {
|
|
12825
|
+
item.removeAttribute('tabindex');
|
|
12826
|
+
prevItem.tabIndex = '0';
|
|
12827
|
+
prevItem.focus();
|
|
12828
|
+
}
|
|
12829
|
+
event.preventDefault();
|
|
12830
|
+
break;
|
|
12831
|
+
}
|
|
12435
12832
|
}
|
|
12436
|
-
|
|
12437
|
-
|
|
12438
|
-
|
|
12439
|
-
|
|
12440
|
-
|
|
12441
|
-
|
|
12442
|
-
|
|
12443
|
-
|
|
12444
|
-
|
|
12445
|
-
|
|
12446
|
-
|
|
12447
|
-
|
|
12448
|
-
|
|
12449
|
-
|
|
12450
|
-
|
|
12451
|
-
|
|
12452
|
-
|
|
12453
|
-
|
|
12454
|
-
|
|
12455
|
-
|
|
12456
|
-
|
|
12457
|
-
|
|
12458
|
-
|
|
12459
|
-
|
|
12460
|
-
|
|
12461
|
-
|
|
12833
|
+
onRowClearItemClick() {
|
|
12834
|
+
this.clearFilter();
|
|
12835
|
+
this.hideOverlay();
|
|
12836
|
+
}
|
|
12837
|
+
toggleMenu(event) {
|
|
12838
|
+
this.overlayVisible.set(!this.overlayVisible());
|
|
12839
|
+
event.stopPropagation();
|
|
12840
|
+
}
|
|
12841
|
+
onToggleButtonKeyDown(event) {
|
|
12842
|
+
switch (event.key) {
|
|
12843
|
+
case 'Escape':
|
|
12844
|
+
case 'Tab':
|
|
12845
|
+
this.overlayVisible.set(false);
|
|
12846
|
+
break;
|
|
12847
|
+
case 'ArrowDown':
|
|
12848
|
+
if (this.overlayVisible()) {
|
|
12849
|
+
const focusable = DomHandler.getFocusableElements(this.overlay);
|
|
12850
|
+
if (focusable) {
|
|
12851
|
+
focusable[0].focus();
|
|
12852
|
+
}
|
|
12853
|
+
event.preventDefault();
|
|
12854
|
+
}
|
|
12855
|
+
else if (event.altKey) {
|
|
12856
|
+
this.overlayVisible.set(true);
|
|
12857
|
+
event.preventDefault();
|
|
12858
|
+
}
|
|
12859
|
+
break;
|
|
12860
|
+
}
|
|
12861
|
+
}
|
|
12862
|
+
onEscape() {
|
|
12863
|
+
this.overlayVisible.set(false);
|
|
12864
|
+
}
|
|
12865
|
+
onContentClick() {
|
|
12866
|
+
this.selfClick = true;
|
|
12867
|
+
}
|
|
12868
|
+
// onOverlayAnimationStart(event: AnimationEvent) {
|
|
12869
|
+
onOverlayAnimationStart(event) {
|
|
12870
|
+
switch (event.toState) {
|
|
12871
|
+
case 'visible':
|
|
12872
|
+
this.overlay = event.element;
|
|
12873
|
+
this.renderer.appendChild(this.document.body, this.overlay);
|
|
12874
|
+
ZIndexUtils.set('overlay', this.overlay, this.primeConfig.zIndex.overlay);
|
|
12875
|
+
DomHandler.absolutePosition(this.overlay, this.icon?.nativeElement);
|
|
12876
|
+
this.bindDocumentClickListener();
|
|
12877
|
+
this.bindDocumentResizeListener();
|
|
12878
|
+
this.bindScrollListener();
|
|
12879
|
+
this.overlayEventListener = (e) => {
|
|
12880
|
+
if (this.overlay && this.overlay.contains(e.target)) {
|
|
12881
|
+
this.selfClick = true;
|
|
12882
|
+
}
|
|
12883
|
+
};
|
|
12884
|
+
this.overlaySubscription = this.overlayService.clickObservable.subscribe(this.overlayEventListener);
|
|
12885
|
+
break;
|
|
12886
|
+
case 'void':
|
|
12887
|
+
this.onOverlayHide();
|
|
12888
|
+
if (this.overlaySubscription) {
|
|
12889
|
+
this.overlaySubscription.unsubscribe();
|
|
12890
|
+
}
|
|
12891
|
+
break;
|
|
12892
|
+
}
|
|
12893
|
+
}
|
|
12894
|
+
// onOverlayAnimationEnd(event: AnimationEvent) {
|
|
12895
|
+
onOverlayAnimationEnd(event) {
|
|
12896
|
+
switch (event.toState) {
|
|
12897
|
+
case 'void':
|
|
12898
|
+
ZIndexUtils.clear(event.element);
|
|
12899
|
+
break;
|
|
12900
|
+
}
|
|
12901
|
+
}
|
|
12902
|
+
get noFilterLabel() {
|
|
12903
|
+
return this.primeConfig.getTranslation(TranslationKeys.NO_FILTER);
|
|
12904
|
+
}
|
|
12905
|
+
clearFilter() {
|
|
12906
|
+
this.initFilterConstraint(true);
|
|
12907
|
+
this.primeTable._filter();
|
|
12908
|
+
this.hideOverlay();
|
|
12909
|
+
}
|
|
12910
|
+
generateMatchModeOptions() {
|
|
12911
|
+
let options = undefined;
|
|
12912
|
+
if (this.descriptor.filterType === FilterTypeEnum.Lookup) {
|
|
12913
|
+
options = [
|
|
12914
|
+
{ value: FilterMatchModeEnum.Equals, label: this.primeConfig.getTranslation(FilterMatchModeEnum.Equals) },
|
|
12915
|
+
{ value: FilterMatchModeEnum.NotEquals, label: this.primeConfig.getTranslation(FilterMatchModeEnum.NotEquals) },
|
|
12916
|
+
{ value: FilterMatchModeEnum.Exists, label: this.primeConfig.getTranslation(FilterMatchModeEnum.Exists) },
|
|
12917
|
+
{ value: FilterMatchModeEnum.DoesNotExist, label: this.primeConfig.getTranslation(FilterMatchModeEnum.DoesNotExist) }
|
|
12918
|
+
];
|
|
12919
|
+
if (this.lookupDescriptor?.multiselect) {
|
|
12920
|
+
options = [{ value: FilterMatchModeEnum.In, label: this.primeConfig.getTranslation(FilterMatchModeEnum.In) }];
|
|
12921
|
+
}
|
|
12922
|
+
}
|
|
12923
|
+
if (this.descriptor.matchModes) {
|
|
12924
|
+
options = this.descriptor.matchModes.map(mm => ({ value: mm, label: this.primeConfig.getTranslation(mm) }));
|
|
12925
|
+
}
|
|
12926
|
+
if (!options) {
|
|
12927
|
+
let primeMathcModeOptionByType = undefined;
|
|
12928
|
+
if (this.primeType === 'text') {
|
|
12929
|
+
primeMathcModeOptionByType = this.primeConfig.filterMatchModeOptions.text;
|
|
12930
|
+
}
|
|
12931
|
+
else if (this.primeType === 'numeric') {
|
|
12932
|
+
primeMathcModeOptionByType = this.primeConfig.filterMatchModeOptions.numeric;
|
|
12933
|
+
}
|
|
12934
|
+
else if (this.primeType === 'date') {
|
|
12935
|
+
primeMathcModeOptionByType = this.primeConfig.filterMatchModeOptions.date;
|
|
12936
|
+
}
|
|
12937
|
+
if (primeMathcModeOptionByType) {
|
|
12938
|
+
options = primeMathcModeOptionByType.map(key => ({ label: this.primeConfig.getTranslation(key), value: key }));
|
|
12939
|
+
}
|
|
12940
|
+
}
|
|
12941
|
+
this.matchModes.set(options || []);
|
|
12942
|
+
}
|
|
12943
|
+
getDefaultMatchMode() {
|
|
12944
|
+
let defaultMatchMode = FilterMatchModeEnum.Contains;
|
|
12945
|
+
if (this.primeType === 'text')
|
|
12946
|
+
defaultMatchMode = FilterMatchModeEnum.StartsWith;
|
|
12947
|
+
else if (this.primeType === 'numeric')
|
|
12948
|
+
defaultMatchMode = FilterMatchModeEnum.Equals;
|
|
12949
|
+
else if (this.primeType === 'date')
|
|
12950
|
+
defaultMatchMode = FilterMatchModeEnum.DateIs;
|
|
12951
|
+
else if (this.primeType === 'lookup')
|
|
12952
|
+
defaultMatchMode = this.lookupDescriptor?.multiselect ? FilterMatchModeEnum.In : FilterMatchModeEnum.Equals;
|
|
12953
|
+
// overwrite type default set in descriptor
|
|
12954
|
+
if (this.descriptor.defaultFilterMatchMode) {
|
|
12955
|
+
defaultMatchMode = this.descriptor.defaultFilterMatchMode;
|
|
12956
|
+
}
|
|
12957
|
+
// check if default mode exists!
|
|
12958
|
+
if (this.matchModes().length > 0 && !this.matchModes().some(m => m.value === defaultMatchMode)) {
|
|
12959
|
+
defaultMatchMode = this.matchModes()[0].value;
|
|
12960
|
+
}
|
|
12961
|
+
return defaultMatchMode;
|
|
12962
|
+
}
|
|
12963
|
+
findNextMenuModeItem(item) {
|
|
12964
|
+
const nextItem = item.nextElementSibling;
|
|
12965
|
+
if (nextItem)
|
|
12966
|
+
return DomHandler.hasClass(nextItem, 'p-column-filter-separator') ? this.findNextMenuModeItem(nextItem) : nextItem;
|
|
12967
|
+
else
|
|
12968
|
+
return item.parentElement?.firstElementChild;
|
|
12969
|
+
}
|
|
12970
|
+
findPrevMenuModeItem(item) {
|
|
12971
|
+
const prevItem = item.previousElementSibling;
|
|
12972
|
+
if (prevItem)
|
|
12973
|
+
return DomHandler.hasClass(prevItem, 'p-column-filter-separator') ? this.findPrevMenuModeItem(prevItem) : prevItem;
|
|
12974
|
+
else
|
|
12975
|
+
return item.parentElement?.lastElementChild;
|
|
12976
|
+
}
|
|
12977
|
+
isOutsideClicked(event) {
|
|
12978
|
+
return !(this.overlay?.isSameNode(event.target) ||
|
|
12979
|
+
this.overlay?.contains(event.target) ||
|
|
12980
|
+
this.icon?.nativeElement.isSameNode(event.target) ||
|
|
12981
|
+
this.icon?.nativeElement.contains(event.target) ||
|
|
12982
|
+
DomHandler.hasClass(event.target, 'p-column-filter-add-button') ||
|
|
12983
|
+
DomHandler.hasClass(event.target.parentElement, 'p-column-filter-add-button') ||
|
|
12984
|
+
DomHandler.hasClass(event.target, 'p-column-filter-remove-button') ||
|
|
12985
|
+
DomHandler.hasClass(event.target.parentElement, 'p-column-filter-remove-button'));
|
|
12986
|
+
}
|
|
12987
|
+
bindDocumentClickListener() {
|
|
12988
|
+
if (!this.documentClickListener) {
|
|
12989
|
+
const documentTarget = this.el ? this.el.nativeElement.ownerDocument : 'document';
|
|
12990
|
+
this.documentClickListener = this.renderer.listen(documentTarget, 'click', event => {
|
|
12991
|
+
if (this.overlayVisible() && !this.selfClick && this.isOutsideClicked(event)) {
|
|
12992
|
+
this.hideOverlay();
|
|
12993
|
+
}
|
|
12994
|
+
this.selfClick = false;
|
|
12995
|
+
});
|
|
12996
|
+
}
|
|
12997
|
+
}
|
|
12998
|
+
unbindDocumentClickListener() {
|
|
12999
|
+
if (this.documentClickListener) {
|
|
13000
|
+
this.documentClickListener();
|
|
13001
|
+
this.documentClickListener = null;
|
|
13002
|
+
this.selfClick = false;
|
|
13003
|
+
}
|
|
13004
|
+
}
|
|
13005
|
+
bindDocumentResizeListener() {
|
|
13006
|
+
if (!this.documentResizeListener) {
|
|
13007
|
+
this.documentResizeListener = this.renderer.listen(this.window, 'resize', () => {
|
|
13008
|
+
if (this.overlayVisible() && !DomHandler.isTouchDevice()) {
|
|
13009
|
+
this.hideOverlay();
|
|
13010
|
+
}
|
|
13011
|
+
});
|
|
13012
|
+
}
|
|
13013
|
+
}
|
|
13014
|
+
unbindDocumentResizeListener() {
|
|
13015
|
+
if (this.documentResizeListener) {
|
|
13016
|
+
this.documentResizeListener();
|
|
13017
|
+
this.documentResizeListener = null;
|
|
13018
|
+
}
|
|
13019
|
+
}
|
|
13020
|
+
bindScrollListener() {
|
|
13021
|
+
if (!this.scrollHandler) {
|
|
13022
|
+
this.scrollHandler = new ConnectedOverlayScrollHandler(this.icon?.nativeElement, () => {
|
|
13023
|
+
if (this.overlayVisible()) {
|
|
13024
|
+
this.hideOverlay();
|
|
13025
|
+
}
|
|
13026
|
+
});
|
|
13027
|
+
}
|
|
13028
|
+
this.scrollHandler.bindScrollListener();
|
|
13029
|
+
}
|
|
13030
|
+
unbindScrollListener() {
|
|
13031
|
+
if (this.scrollHandler) {
|
|
13032
|
+
this.scrollHandler.unbindScrollListener();
|
|
13033
|
+
}
|
|
13034
|
+
}
|
|
13035
|
+
hideOverlay() {
|
|
13036
|
+
this.overlayVisible.set(false);
|
|
13037
|
+
this.cd.markForCheck();
|
|
13038
|
+
}
|
|
13039
|
+
onOverlayHide() {
|
|
13040
|
+
this.unbindDocumentClickListener();
|
|
13041
|
+
this.unbindDocumentResizeListener();
|
|
13042
|
+
this.unbindScrollListener();
|
|
13043
|
+
this.overlay = null;
|
|
13044
|
+
}
|
|
13045
|
+
updateFilterValue(value) {
|
|
13046
|
+
this.filterConstraint.set({ ...this.filterConstraint(), value: value });
|
|
13047
|
+
this.updateDtFilter();
|
|
13048
|
+
}
|
|
13049
|
+
updateDtFilter() {
|
|
13050
|
+
this.primeTable.filters[this.primeField] = this.filterConstraint();
|
|
13051
|
+
this.primeTable._filter();
|
|
13052
|
+
}
|
|
13053
|
+
initFilterConstraint(reset = false) {
|
|
13054
|
+
if (!this.primeTable.filters[this.primeField] || reset) {
|
|
13055
|
+
const defaultMatchMode = this.getDefaultMatchMode();
|
|
13056
|
+
this.primeTable.filters[this.primeField] = { value: null, matchMode: defaultMatchMode };
|
|
13057
|
+
}
|
|
13058
|
+
// set internal filter constraint
|
|
13059
|
+
const metadata = this.primeTable.filters[this.primeField];
|
|
13060
|
+
if (Array.isArray(metadata)) {
|
|
13061
|
+
this.filterConstraint.set(metadata[0]);
|
|
13062
|
+
}
|
|
13063
|
+
else {
|
|
13064
|
+
this.filterConstraint.set(metadata);
|
|
13065
|
+
}
|
|
13066
|
+
}
|
|
13067
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngTableColumnFilterFullComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
13068
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MngTableColumnFilterFullComponent, isStandalone: true, selector: "mng-table-column-filter-full", inputs: { descriptor: "descriptor" }, viewQueries: [{ propertyName: "icon", first: true, predicate: ["icon"], descendants: true }], ngImport: i0, template: "<div class=\"p-column-filter p-column-filter-row\">\n <ng-container [ngSwitch]=\"primeType\">\n <input\n *ngSwitchCase=\"'text'\"\n type=\"text\"\n pInputText\n [value]=\"filterConstraint()?.value\"\n [disabled]=\"isInputDisabled()\"\n (input)=\"onTextModelChange($event)\"\n (keydown.enter)=\"onTextInputEnterKeyDown($event)\"\n [attr.placeholder]=\"descriptor.placeholder ?? 'mngTable.typeToFilter' | translate\" />\n <p-inputNumber\n *ngSwitchCase=\"'numeric'\"\n [ngModel]=\"filterConstraint()?.value\"\n (ngModelChange)=\"onNumericModelChange($event)\"\n (onKeyDown)=\"onNumericInputKeyDown($event)\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.typeToFilter' | translate\"\n [useGrouping]=\"descriptor.numberUseGrouping\"\n [minFractionDigits]=\"descriptor.numberMinFractionDigits\"\n [maxFractionDigits]=\"descriptor.numberMaxFractionDigits\"\n [disabled]=\"isInputDisabled()\"></p-inputNumber>\n <p-triStateCheckbox *ngSwitchCase=\"'boolean'\" [ngModel]=\"filterConstraint()?.value\" (ngModelChange)=\"onTristateModelChange($event)\"></p-triStateCheckbox>\n <ng-container *ngSwitchCase=\"'date'\">\n <ng-container *ngIf=\"activeMatchMode === 'between'; else datePicker\">\n <mng-date-range\n [ngModel]=\"filterConstraint()?.value\"\n (ngModelChange)=\"dateFilter($event)\"\n [showTime]=\"descriptor.datePickerShowTime\"\n [dateFormat]=\"descriptor.datePickerFormat\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.typeToFilter' | translate\"\n [disabled]=\"isInputDisabled()\"></mng-date-range>\n </ng-container>\n <ng-template #datePicker>\n <p-calendar\n appendTo=\"body\"\n [ngModel]=\"filterConstraint()?.value\"\n (ngModelChange)=\"dateFilter($event)\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.typeToFilter' | translate\"\n [showIcon]=\"true\"\n [dateFormat]=\"descriptor.datePickerFormat ?? 'dd.mm.yy'\"\n [showTime]=\"descriptor.datePickerShowTime\"\n [firstDayOfWeek]=\"1\">\n </p-calendar>\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchCase=\"'lookup'\">\n <ng-container *ngIf=\"lookupDescriptor\" [ngSwitch]=\"lookupDescriptor.lookupType\">\n <mng-autocomplete\n *ngSwitchCase=\"lookupTypeAutocomplete\"\n [ngModel]=\"filterConstraint()?.value\"\n [dataProvider]=\"lookupDescriptor.dataProvider\"\n [dataKeyProperty]=\"lookupDescriptor.itemsValueProperty\"\n [itemsValueProperty]=\"lookupDescriptor.itemsValueProperty\"\n [itemsLabelProperty]=\"lookupDescriptor.itemsLabelProperty\"\n [itemsLabelTranslate]=\"lookupDescriptor.itemsLabelTranslate\"\n [multiselect]=\"lookupDescriptor.multiselect\"\n [openOnFocus]=\"lookupDescriptor.autocompleteOpenOnFocus\"\n [inlineSearch]=\"lookupDescriptor.autocompleteInlineSearch\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.searchToFilter' | translate\"\n [className]=\"lookupDescriptor.className\"\n [dropdownClassName]=\"lookupDescriptor.dropdownClassName\"\n [disabled]=\"isInputDisabled()\"\n (valueChange)=\"autocompleteFilter($event)\">\n </mng-autocomplete>\n <mng-dropdown\n *ngSwitchCase=\"lookupTypeDropdown\"\n [ngModel]=\"filterConstraint()?.value\"\n [dataProvider]=\"lookupDescriptor.dataProvider\"\n [itemsValueProperty]=\"lookupDescriptor.itemsValueProperty\"\n [itemsLabelProperty]=\"lookupDescriptor.itemsLabelProperty\"\n [itemsLabelTranslate]=\"lookupDescriptor.itemsLabelTranslate\"\n [multiselect]=\"lookupDescriptor.multiselect\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.selectToFilter' | translate\"\n [className]=\"lookupDescriptor.className\"\n [dropdownClassName]=\"lookupDescriptor.dropdownClassName\"\n [showClear]=\"false\"\n [changeValueOnBlur]=\"lookupDescriptor.multiselect\"\n [disabled]=\"isInputDisabled()\"\n (valueChange)=\"dropdownFilter($event)\">\n </mng-dropdown>\n </ng-container>\n </ng-container>\n </ng-container>\n\n <button\n *ngIf=\"matchModes().length > 1\"\n #icon\n type=\"button\"\n class=\"p-column-filter-menu-button p-link\"\n aria-haspopup=\"true\"\n [attr.aria-expanded]=\"overlayVisible()\"\n [ngClass]=\"{'p-column-filter-menu-button-open': overlayVisible(), 'p-column-filter-menu-button-active': isFilterSet()}\"\n (click)=\"toggleMenu($event)\"\n (keydown)=\"onToggleButtonKeyDown($event)\">\n <FilterIcon [styleClass]=\"'pi-filter-icon'\" />\n </button>\n <button #icon [ngClass]=\"{'p-hidden-space': !isFilterSet()}\" type=\"button\" class=\"p-column-filter-clear-button p-link\" (click)=\"clearFilter()\">\n <FilterSlashIcon />\n </button>\n <div\n *ngIf=\"overlayVisible()\"\n class=\"p-column-filter-overlay p-component p-fluid\"\n (click)=\"onContentClick()\"\n [@overlayAnimation]=\"'visible'\"\n (@overlayAnimation.start)=\"onOverlayAnimationStart($event)\"\n (@overlayAnimation.done)=\"onOverlayAnimationEnd($event)\"\n (keydown.escape)=\"onEscape()\">\n <ul class=\"p-column-filter-row-items\">\n <li\n class=\"p-column-filter-row-item\"\n *ngFor=\"let matchMode of matchModes(); let i = index\"\n (click)=\"onMatchModeChange(matchMode.value)\"\n (keydown)=\"onMatchModeKeyDown($event)\"\n (keydown.enter)=\"this.onMatchModeChange(matchMode.value)\"\n [ngClass]=\"{'p-highlight': matchMode.value === filterConstraint()?.matchMode}\"\n [attr.tabindex]=\"i === 0 ? '0' : null\">\n {{ matchMode.label }}\n </li>\n <li class=\"p-column-filter-separator\"></li>\n <li class=\"p-column-filter-row-item\" (click)=\"onRowClearItemClick()\" (keydown)=\"onMatchModeKeyDown($event)\" (keydown.enter)=\"onRowClearItemClick()\">\n {{ noFilterLabel }}\n </li>\n </ul>\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: TableModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "component", type: MngDateRangeComponent, selector: "mng-date-range", inputs: ["placeholder", "showTime", "showSeconds", "dateFormat", "disabled"] }, { kind: "ngmodule", type: CalendarModule }, { kind: "component", type: i2$3.Calendar, selector: "p-calendar", inputs: ["style", "styleClass", "inputStyle", "inputId", "name", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "disabled", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "appendTo", "readonlyInput", "shortYearCutoff", "monthNavigator", "yearNavigator", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "required", "showOnFocus", "showWeek", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "minDate", "maxDate", "disabledDates", "disabledDays", "yearRange", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "locale", "view", "defaultDate"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "component", type: MngAutocompleteComponent, selector: "mng-autocomplete", inputs: ["dataProvider", "dataKeyProperty", "itemsValueProperty", "itemsLabelProperty", "itemsLabelTranslate", "inlineSearch", "openOnFocus", "multiselect", "placeholder", "className", "dropdownClassName", "showClear", "autoClear", "selectFirst"], outputs: ["valueChange"] }, { kind: "directive", type: NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: MngDropdownComponent, selector: "mng-dropdown", inputs: ["dataProvider", "dataKeyProperty", "itemsLabelProperty", "itemsLabelTranslate", "itemsValueProperty", "itemsDisabledProperty", "multiselect", "placeholder", "showClear", "selectFirstItem", "className", "dropdownClassName", "changeValueOnBlur"], outputs: ["valueChange"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: TriStateCheckboxModule }, { kind: "component", type: i4$3.TriStateCheckbox, selector: "p-triStateCheckbox", inputs: ["disabled", "name", "ariaLabel", "ariaLabelledBy", "tabindex", "inputId", "style", "styleClass", "label", "readonly", "checkboxTrueIcon", "checkboxFalseIcon"], outputs: ["onChange"] }, { kind: "ngmodule", type: InputNumberModule }, { kind: "component", type: i3$2.InputNumber, selector: "p-inputNumber", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabelledBy", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "disabled"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i6$4.InputText, selector: "[pInputText]" }, { kind: "component", type: FilterIcon, selector: "FilterIcon" }, { kind: "component", type: FilterSlashIcon, selector: "FilterSlashIcon" }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: DropdownModule }, { kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], animations: [
|
|
13069
|
+
trigger('overlayAnimation', [
|
|
13070
|
+
transition(':enter', [style({ opacity: 0, transform: 'scaleY(0.8)' }), animate('.12s cubic-bezier(0, 0, 0.2, 1)')]),
|
|
13071
|
+
transition(':leave', [animate('.1s linear', style({ opacity: 0 }))])
|
|
13072
|
+
])
|
|
13073
|
+
], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
13074
|
+
}
|
|
13075
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngTableColumnFilterFullComponent, decorators: [{
|
|
13076
|
+
type: Component,
|
|
13077
|
+
args: [{ standalone: true, selector: 'mng-table-column-filter-full', imports: [
|
|
13078
|
+
TableModule,
|
|
13079
|
+
TranslateModule,
|
|
13080
|
+
MngDateRangeComponent,
|
|
13081
|
+
CalendarModule,
|
|
13082
|
+
FormsModule,
|
|
13083
|
+
NgSwitch,
|
|
13084
|
+
MngAutocompleteComponent,
|
|
13085
|
+
NgSwitchCase,
|
|
13086
|
+
MngDropdownComponent,
|
|
13087
|
+
NgIf,
|
|
13088
|
+
TriStateCheckboxModule,
|
|
13089
|
+
InputNumberModule,
|
|
13090
|
+
InputTextModule,
|
|
13091
|
+
FilterIcon,
|
|
13092
|
+
FilterSlashIcon,
|
|
13093
|
+
NgClass,
|
|
13094
|
+
DropdownModule,
|
|
13095
|
+
NgForOf
|
|
13096
|
+
], animations: [
|
|
13097
|
+
trigger('overlayAnimation', [
|
|
13098
|
+
transition(':enter', [style({ opacity: 0, transform: 'scaleY(0.8)' }), animate('.12s cubic-bezier(0, 0, 0.2, 1)')]),
|
|
13099
|
+
transition(':leave', [animate('.1s linear', style({ opacity: 0 }))])
|
|
13100
|
+
])
|
|
13101
|
+
], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"p-column-filter p-column-filter-row\">\n <ng-container [ngSwitch]=\"primeType\">\n <input\n *ngSwitchCase=\"'text'\"\n type=\"text\"\n pInputText\n [value]=\"filterConstraint()?.value\"\n [disabled]=\"isInputDisabled()\"\n (input)=\"onTextModelChange($event)\"\n (keydown.enter)=\"onTextInputEnterKeyDown($event)\"\n [attr.placeholder]=\"descriptor.placeholder ?? 'mngTable.typeToFilter' | translate\" />\n <p-inputNumber\n *ngSwitchCase=\"'numeric'\"\n [ngModel]=\"filterConstraint()?.value\"\n (ngModelChange)=\"onNumericModelChange($event)\"\n (onKeyDown)=\"onNumericInputKeyDown($event)\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.typeToFilter' | translate\"\n [useGrouping]=\"descriptor.numberUseGrouping\"\n [minFractionDigits]=\"descriptor.numberMinFractionDigits\"\n [maxFractionDigits]=\"descriptor.numberMaxFractionDigits\"\n [disabled]=\"isInputDisabled()\"></p-inputNumber>\n <p-triStateCheckbox *ngSwitchCase=\"'boolean'\" [ngModel]=\"filterConstraint()?.value\" (ngModelChange)=\"onTristateModelChange($event)\"></p-triStateCheckbox>\n <ng-container *ngSwitchCase=\"'date'\">\n <ng-container *ngIf=\"activeMatchMode === 'between'; else datePicker\">\n <mng-date-range\n [ngModel]=\"filterConstraint()?.value\"\n (ngModelChange)=\"dateFilter($event)\"\n [showTime]=\"descriptor.datePickerShowTime\"\n [dateFormat]=\"descriptor.datePickerFormat\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.typeToFilter' | translate\"\n [disabled]=\"isInputDisabled()\"></mng-date-range>\n </ng-container>\n <ng-template #datePicker>\n <p-calendar\n appendTo=\"body\"\n [ngModel]=\"filterConstraint()?.value\"\n (ngModelChange)=\"dateFilter($event)\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.typeToFilter' | translate\"\n [showIcon]=\"true\"\n [dateFormat]=\"descriptor.datePickerFormat ?? 'dd.mm.yy'\"\n [showTime]=\"descriptor.datePickerShowTime\"\n [firstDayOfWeek]=\"1\">\n </p-calendar>\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchCase=\"'lookup'\">\n <ng-container *ngIf=\"lookupDescriptor\" [ngSwitch]=\"lookupDescriptor.lookupType\">\n <mng-autocomplete\n *ngSwitchCase=\"lookupTypeAutocomplete\"\n [ngModel]=\"filterConstraint()?.value\"\n [dataProvider]=\"lookupDescriptor.dataProvider\"\n [dataKeyProperty]=\"lookupDescriptor.itemsValueProperty\"\n [itemsValueProperty]=\"lookupDescriptor.itemsValueProperty\"\n [itemsLabelProperty]=\"lookupDescriptor.itemsLabelProperty\"\n [itemsLabelTranslate]=\"lookupDescriptor.itemsLabelTranslate\"\n [multiselect]=\"lookupDescriptor.multiselect\"\n [openOnFocus]=\"lookupDescriptor.autocompleteOpenOnFocus\"\n [inlineSearch]=\"lookupDescriptor.autocompleteInlineSearch\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.searchToFilter' | translate\"\n [className]=\"lookupDescriptor.className\"\n [dropdownClassName]=\"lookupDescriptor.dropdownClassName\"\n [disabled]=\"isInputDisabled()\"\n (valueChange)=\"autocompleteFilter($event)\">\n </mng-autocomplete>\n <mng-dropdown\n *ngSwitchCase=\"lookupTypeDropdown\"\n [ngModel]=\"filterConstraint()?.value\"\n [dataProvider]=\"lookupDescriptor.dataProvider\"\n [itemsValueProperty]=\"lookupDescriptor.itemsValueProperty\"\n [itemsLabelProperty]=\"lookupDescriptor.itemsLabelProperty\"\n [itemsLabelTranslate]=\"lookupDescriptor.itemsLabelTranslate\"\n [multiselect]=\"lookupDescriptor.multiselect\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.selectToFilter' | translate\"\n [className]=\"lookupDescriptor.className\"\n [dropdownClassName]=\"lookupDescriptor.dropdownClassName\"\n [showClear]=\"false\"\n [changeValueOnBlur]=\"lookupDescriptor.multiselect\"\n [disabled]=\"isInputDisabled()\"\n (valueChange)=\"dropdownFilter($event)\">\n </mng-dropdown>\n </ng-container>\n </ng-container>\n </ng-container>\n\n <button\n *ngIf=\"matchModes().length > 1\"\n #icon\n type=\"button\"\n class=\"p-column-filter-menu-button p-link\"\n aria-haspopup=\"true\"\n [attr.aria-expanded]=\"overlayVisible()\"\n [ngClass]=\"{'p-column-filter-menu-button-open': overlayVisible(), 'p-column-filter-menu-button-active': isFilterSet()}\"\n (click)=\"toggleMenu($event)\"\n (keydown)=\"onToggleButtonKeyDown($event)\">\n <FilterIcon [styleClass]=\"'pi-filter-icon'\" />\n </button>\n <button #icon [ngClass]=\"{'p-hidden-space': !isFilterSet()}\" type=\"button\" class=\"p-column-filter-clear-button p-link\" (click)=\"clearFilter()\">\n <FilterSlashIcon />\n </button>\n <div\n *ngIf=\"overlayVisible()\"\n class=\"p-column-filter-overlay p-component p-fluid\"\n (click)=\"onContentClick()\"\n [@overlayAnimation]=\"'visible'\"\n (@overlayAnimation.start)=\"onOverlayAnimationStart($event)\"\n (@overlayAnimation.done)=\"onOverlayAnimationEnd($event)\"\n (keydown.escape)=\"onEscape()\">\n <ul class=\"p-column-filter-row-items\">\n <li\n class=\"p-column-filter-row-item\"\n *ngFor=\"let matchMode of matchModes(); let i = index\"\n (click)=\"onMatchModeChange(matchMode.value)\"\n (keydown)=\"onMatchModeKeyDown($event)\"\n (keydown.enter)=\"this.onMatchModeChange(matchMode.value)\"\n [ngClass]=\"{'p-highlight': matchMode.value === filterConstraint()?.matchMode}\"\n [attr.tabindex]=\"i === 0 ? '0' : null\">\n {{ matchMode.label }}\n </li>\n <li class=\"p-column-filter-separator\"></li>\n <li class=\"p-column-filter-row-item\" (click)=\"onRowClearItemClick()\" (keydown)=\"onMatchModeKeyDown($event)\" (keydown.enter)=\"onRowClearItemClick()\">\n {{ noFilterLabel }}\n </li>\n </ul>\n </div>\n</div>\n" }]
|
|
13102
|
+
}], ctorParameters: function () { return []; }, propDecorators: { descriptor: [{
|
|
13103
|
+
type: Input,
|
|
13104
|
+
args: [{ required: true }]
|
|
13105
|
+
}], icon: [{
|
|
13106
|
+
type: ViewChild,
|
|
13107
|
+
args: ['icon']
|
|
13108
|
+
}] } });
|
|
13109
|
+
|
|
13110
|
+
/**
|
|
13111
|
+
* Cannot be on push change detection strategy because of filter updates triggered from route which causes to force update values in force metadata
|
|
13112
|
+
* and these must be propagated through to this component and beyond to primeNG.
|
|
13113
|
+
*/
|
|
13114
|
+
class MngTableColumnFilterComponent {
|
|
13115
|
+
constructor(primeConfig) {
|
|
13116
|
+
this.primeConfig = primeConfig;
|
|
13117
|
+
this.lookupTypeDropdown = FilterLookupTypeEnum.Dropdown;
|
|
13118
|
+
this.lookupTypeAutocomplete = FilterLookupTypeEnum.Autocomplete;
|
|
13119
|
+
this.primeType = 'text';
|
|
13120
|
+
this.primeShowMatchMode = true;
|
|
13121
|
+
this.primeDisplay = 'row';
|
|
13122
|
+
this.dateDebounceSubject = new Subject();
|
|
13123
|
+
this.dateDebounceSubscription = this.dateDebounceSubject.pipe(debounceTime(500), distinctUntilChanged()).subscribe(v => {
|
|
13124
|
+
this.dateFilterCallback?.(v);
|
|
13125
|
+
});
|
|
13126
|
+
}
|
|
13127
|
+
get activeMatchMode() {
|
|
13128
|
+
const filter = this.primeColumnFilter?.dt.filters[this.descriptor.property];
|
|
13129
|
+
return filter?.matchMode;
|
|
13130
|
+
}
|
|
13131
|
+
ngOnInit() {
|
|
13132
|
+
this.primeDefaultMatchMode = this.descriptor.defaultFilterMatchMode ?? FilterMatchModeEnum.Equals;
|
|
13133
|
+
switch (this.descriptor.filterType) {
|
|
13134
|
+
case FilterTypeEnum.Boolean:
|
|
13135
|
+
this.primeType = 'boolean';
|
|
13136
|
+
this.primeShowMatchMode = false;
|
|
13137
|
+
break;
|
|
13138
|
+
case FilterTypeEnum.Number:
|
|
13139
|
+
this.primeType = 'numeric';
|
|
13140
|
+
break;
|
|
13141
|
+
case FilterTypeEnum.Date:
|
|
13142
|
+
this.primeType = 'date';
|
|
13143
|
+
this.primeDefaultMatchMode = FilterMatchModeEnum.DateIs;
|
|
13144
|
+
break;
|
|
13145
|
+
case FilterTypeEnum.Lookup:
|
|
13146
|
+
this.primeType = 'lookup';
|
|
13147
|
+
this.lookupDescriptor = this.descriptor;
|
|
13148
|
+
this.primeField = `${this.descriptor.property}${this.lookupDescriptor.itemsValueProperty ? `.${this.lookupDescriptor.itemsValueProperty}` : ''}`;
|
|
13149
|
+
this.primeMatchModeCustomOptions = [
|
|
13150
|
+
{ value: FilterMatchModeEnum.Equals, label: this.primeConfig.getTranslation(FilterMatchModeEnum.Equals) },
|
|
13151
|
+
{ value: FilterMatchModeEnum.NotEquals, label: this.primeConfig.getTranslation(FilterMatchModeEnum.NotEquals) }
|
|
13152
|
+
];
|
|
13153
|
+
if (this.lookupDescriptor.multiselect) {
|
|
13154
|
+
this.primeMatchModeCustomOptions = undefined;
|
|
13155
|
+
this.primeDefaultMatchMode = FilterMatchModeEnum.In;
|
|
13156
|
+
}
|
|
13157
|
+
break;
|
|
13158
|
+
case FilterTypeEnum.String:
|
|
13159
|
+
this.primeType = 'text';
|
|
13160
|
+
this.primeDefaultMatchMode = FilterMatchModeEnum.Contains;
|
|
13161
|
+
break;
|
|
13162
|
+
}
|
|
13163
|
+
if (this.descriptor.matchModes) {
|
|
13164
|
+
this.primeMatchModeCustomOptions = this.descriptor.matchModes.map(mm => ({ value: mm, label: this.primeConfig.getTranslation(mm) }));
|
|
13165
|
+
if (!this.primeMatchModeCustomOptions.map(matchMode => matchMode.value).includes(this.primeDefaultMatchMode)) {
|
|
13166
|
+
this.primeDefaultMatchMode = this.descriptor.matchModes[0];
|
|
13167
|
+
}
|
|
13168
|
+
this.primeShowMatchMode = this.primeMatchModeCustomOptions?.length > 1;
|
|
13169
|
+
}
|
|
13170
|
+
}
|
|
13171
|
+
ngOnDestroy() {
|
|
13172
|
+
this.dateDebounceSubscription?.unsubscribe();
|
|
13173
|
+
}
|
|
13174
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
13175
|
+
dateFilter(value, filterCallback) {
|
|
13176
|
+
this.dateFilterCallback = filterCallback;
|
|
13177
|
+
if (this.activeMatchMode === FilterMatchModeEnum.Between && Array.isArray(value)) {
|
|
13178
|
+
const dateValues = value.filter(v => v instanceof Date);
|
|
13179
|
+
if (dateValues.length <= 1) {
|
|
13180
|
+
return;
|
|
13181
|
+
}
|
|
13182
|
+
}
|
|
13183
|
+
this.dateDebounceSubject.next(value);
|
|
13184
|
+
}
|
|
13185
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
13186
|
+
dateRangeChange(value, filterCallback) {
|
|
13187
|
+
filterCallback(value);
|
|
13188
|
+
}
|
|
13189
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
13190
|
+
autocompleteFilter(value, filterCallback) {
|
|
13191
|
+
filterCallback(value);
|
|
13192
|
+
}
|
|
13193
|
+
// eslint-disable-next-line @typescript-eslint/ban-types, @typescript-eslint/no-explicit-any
|
|
13194
|
+
dropdownFilter(value, filterCallback) {
|
|
13195
|
+
if (Array.isArray(value) && value.length === 0) {
|
|
13196
|
+
value = undefined;
|
|
13197
|
+
}
|
|
13198
|
+
filterCallback(value);
|
|
13199
|
+
}
|
|
13200
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngTableColumnFilterComponent, deps: [{ token: i1$2.PrimeNGConfig }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
13201
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MngTableColumnFilterComponent, isStandalone: true, selector: "mng-table-column-filter", inputs: { descriptor: "descriptor" }, viewQueries: [{ propertyName: "primeColumnFilter", first: true, predicate: ColumnFilter, descendants: true }], ngImport: i0, template: "<p-columnFilter\n class=\"ml-auto\"\n [type]=\"primeType\"\n [field]=\"descriptor.property\"\n [display]=\"primeDisplay\"\n [matchMode]=\"primeDefaultMatchMode\"\n [matchModeOptions]=\"primeMatchModeCustomOptions\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.typeToFilter' | translate\"\n [showMatchModes]=\"true\"\n [showOperator]=\"false\"\n [showAddButton]=\"false\"\n [hideOnClear]=\"true\"\n [showMenu]=\"primeShowMatchMode\"\n [minFractionDigits]=\"descriptor.numberMinFractionDigits\"\n [maxFractionDigits]=\"descriptor.numberMaxFractionDigits\"\n [useGrouping]=\"descriptor.numberUseGrouping\">\n <ng-template *ngIf=\"primeType === 'date'\" pTemplate=\"filter\" let-value let-filterCallback=\"filterCallback\">\n <ng-container *ngIf=\"activeMatchMode === 'between'; else datePicker\">\n <mng-date-range\n [ngModel]=\"value\"\n (ngModelChange)=\"dateFilter($event, filterCallback)\"\n [showTime]=\"descriptor.datePickerShowTime\"\n [dateFormat]=\"descriptor.datePickerFormat\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.typeToFilter' | translate\"></mng-date-range>\n </ng-container>\n <ng-template #datePicker>\n <p-calendar\n appendTo=\"body\"\n [ngModel]=\"value\"\n (ngModelChange)=\"dateFilter($event, filterCallback)\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.typeToFilter' | translate\"\n [showIcon]=\"true\"\n [dateFormat]=\"descriptor.datePickerFormat ?? 'dd.mm.yy'\"\n [showTime]=\"descriptor.datePickerShowTime\"\n [firstDayOfWeek]=\"1\">\n </p-calendar>\n </ng-template>\n </ng-template>\n <ng-template *ngIf=\"lookupDescriptor\" pTemplate=\"filter\" let-value let-filterCallback=\"filterCallback\">\n <ng-container [ngSwitch]=\"lookupDescriptor.lookupType\">\n <mng-autocomplete\n *ngSwitchCase=\"lookupTypeAutocomplete\"\n [ngModel]=\"value\"\n [dataProvider]=\"lookupDescriptor.dataProvider\"\n [dataKeyProperty]=\"lookupDescriptor.itemsValueProperty\"\n [itemsValueProperty]=\"lookupDescriptor.itemsValueProperty\"\n [itemsLabelProperty]=\"lookupDescriptor.itemsLabelProperty\"\n [itemsLabelTranslate]=\"lookupDescriptor.itemsLabelTranslate\"\n [multiselect]=\"lookupDescriptor.multiselect\"\n [openOnFocus]=\"lookupDescriptor.autocompleteOpenOnFocus\"\n [inlineSearch]=\"lookupDescriptor.autocompleteInlineSearch\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.searchToFilter' | translate\"\n [className]=\"lookupDescriptor.className\"\n [dropdownClassName]=\"lookupDescriptor.dropdownClassName\"\n (valueChange)=\"autocompleteFilter($event, filterCallback)\">\n </mng-autocomplete>\n <mng-dropdown\n *ngSwitchCase=\"lookupTypeDropdown\"\n [ngModel]=\"value\"\n [dataProvider]=\"lookupDescriptor.dataProvider\"\n [itemsValueProperty]=\"lookupDescriptor.itemsValueProperty\"\n [itemsLabelProperty]=\"lookupDescriptor.itemsLabelProperty\"\n [itemsLabelTranslate]=\"lookupDescriptor.itemsLabelTranslate\"\n [multiselect]=\"lookupDescriptor.multiselect\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.selectToFilter' | translate\"\n [className]=\"lookupDescriptor.className\"\n [dropdownClassName]=\"lookupDescriptor.dropdownClassName\"\n [showClear]=\"false\"\n [changeValueOnBlur]=\"lookupDescriptor.multiselect\"\n (valueChange)=\"dropdownFilter($event, filterCallback)\">\n </mng-dropdown>\n </ng-container>\n </ng-template>\n</p-columnFilter>\n", dependencies: [{ kind: "ngmodule", type: TableModule }, { kind: "directive", type: i1$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i4$4.ColumnFilter, selector: "p-columnFilter", inputs: ["field", "type", "display", "showMenu", "matchMode", "operator", "showOperator", "showClearButton", "showApplyButton", "showMatchModes", "showAddButton", "hideOnClear", "placeholder", "matchModeOptions", "maxConstraints", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "locale", "localeMatcher", "currency", "currencyDisplay", "useGrouping", "showButtons"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "component", type: MngDateRangeComponent, selector: "mng-date-range", inputs: ["placeholder", "showTime", "showSeconds", "dateFormat", "disabled"] }, { kind: "ngmodule", type: CalendarModule }, { kind: "component", type: i2$3.Calendar, selector: "p-calendar", inputs: ["style", "styleClass", "inputStyle", "inputId", "name", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "disabled", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "appendTo", "readonlyInput", "shortYearCutoff", "monthNavigator", "yearNavigator", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "required", "showOnFocus", "showWeek", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "minDate", "maxDate", "disabledDates", "disabledDays", "yearRange", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "locale", "view", "defaultDate"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "component", type: MngAutocompleteComponent, selector: "mng-autocomplete", inputs: ["dataProvider", "dataKeyProperty", "itemsValueProperty", "itemsLabelProperty", "itemsLabelTranslate", "inlineSearch", "openOnFocus", "multiselect", "placeholder", "className", "dropdownClassName", "showClear", "autoClear", "selectFirst"], outputs: ["valueChange"] }, { kind: "directive", type: NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: MngDropdownComponent, selector: "mng-dropdown", inputs: ["dataProvider", "dataKeyProperty", "itemsLabelProperty", "itemsLabelTranslate", "itemsValueProperty", "itemsDisabledProperty", "multiselect", "placeholder", "showClear", "selectFirstItem", "className", "dropdownClassName", "changeValueOnBlur"], outputs: ["valueChange"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
13202
|
+
}
|
|
13203
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngTableColumnFilterComponent, decorators: [{
|
|
13204
|
+
type: Component,
|
|
13205
|
+
args: [{ standalone: true, selector: 'mng-table-column-filter', imports: [TableModule, TranslateModule, MngDateRangeComponent, CalendarModule, FormsModule, NgSwitch, MngAutocompleteComponent, NgSwitchCase, MngDropdownComponent, NgIf], template: "<p-columnFilter\n class=\"ml-auto\"\n [type]=\"primeType\"\n [field]=\"descriptor.property\"\n [display]=\"primeDisplay\"\n [matchMode]=\"primeDefaultMatchMode\"\n [matchModeOptions]=\"primeMatchModeCustomOptions\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.typeToFilter' | translate\"\n [showMatchModes]=\"true\"\n [showOperator]=\"false\"\n [showAddButton]=\"false\"\n [hideOnClear]=\"true\"\n [showMenu]=\"primeShowMatchMode\"\n [minFractionDigits]=\"descriptor.numberMinFractionDigits\"\n [maxFractionDigits]=\"descriptor.numberMaxFractionDigits\"\n [useGrouping]=\"descriptor.numberUseGrouping\">\n <ng-template *ngIf=\"primeType === 'date'\" pTemplate=\"filter\" let-value let-filterCallback=\"filterCallback\">\n <ng-container *ngIf=\"activeMatchMode === 'between'; else datePicker\">\n <mng-date-range\n [ngModel]=\"value\"\n (ngModelChange)=\"dateFilter($event, filterCallback)\"\n [showTime]=\"descriptor.datePickerShowTime\"\n [dateFormat]=\"descriptor.datePickerFormat\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.typeToFilter' | translate\"></mng-date-range>\n </ng-container>\n <ng-template #datePicker>\n <p-calendar\n appendTo=\"body\"\n [ngModel]=\"value\"\n (ngModelChange)=\"dateFilter($event, filterCallback)\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.typeToFilter' | translate\"\n [showIcon]=\"true\"\n [dateFormat]=\"descriptor.datePickerFormat ?? 'dd.mm.yy'\"\n [showTime]=\"descriptor.datePickerShowTime\"\n [firstDayOfWeek]=\"1\">\n </p-calendar>\n </ng-template>\n </ng-template>\n <ng-template *ngIf=\"lookupDescriptor\" pTemplate=\"filter\" let-value let-filterCallback=\"filterCallback\">\n <ng-container [ngSwitch]=\"lookupDescriptor.lookupType\">\n <mng-autocomplete\n *ngSwitchCase=\"lookupTypeAutocomplete\"\n [ngModel]=\"value\"\n [dataProvider]=\"lookupDescriptor.dataProvider\"\n [dataKeyProperty]=\"lookupDescriptor.itemsValueProperty\"\n [itemsValueProperty]=\"lookupDescriptor.itemsValueProperty\"\n [itemsLabelProperty]=\"lookupDescriptor.itemsLabelProperty\"\n [itemsLabelTranslate]=\"lookupDescriptor.itemsLabelTranslate\"\n [multiselect]=\"lookupDescriptor.multiselect\"\n [openOnFocus]=\"lookupDescriptor.autocompleteOpenOnFocus\"\n [inlineSearch]=\"lookupDescriptor.autocompleteInlineSearch\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.searchToFilter' | translate\"\n [className]=\"lookupDescriptor.className\"\n [dropdownClassName]=\"lookupDescriptor.dropdownClassName\"\n (valueChange)=\"autocompleteFilter($event, filterCallback)\">\n </mng-autocomplete>\n <mng-dropdown\n *ngSwitchCase=\"lookupTypeDropdown\"\n [ngModel]=\"value\"\n [dataProvider]=\"lookupDescriptor.dataProvider\"\n [itemsValueProperty]=\"lookupDescriptor.itemsValueProperty\"\n [itemsLabelProperty]=\"lookupDescriptor.itemsLabelProperty\"\n [itemsLabelTranslate]=\"lookupDescriptor.itemsLabelTranslate\"\n [multiselect]=\"lookupDescriptor.multiselect\"\n [placeholder]=\"descriptor.placeholder ?? 'mngTable.selectToFilter' | translate\"\n [className]=\"lookupDescriptor.className\"\n [dropdownClassName]=\"lookupDescriptor.dropdownClassName\"\n [showClear]=\"false\"\n [changeValueOnBlur]=\"lookupDescriptor.multiselect\"\n (valueChange)=\"dropdownFilter($event, filterCallback)\">\n </mng-dropdown>\n </ng-container>\n </ng-template>\n</p-columnFilter>\n" }]
|
|
13206
|
+
}], ctorParameters: function () { return [{ type: i1$2.PrimeNGConfig }]; }, propDecorators: { descriptor: [{
|
|
13207
|
+
type: Input,
|
|
13208
|
+
args: [{ required: true }]
|
|
13209
|
+
}], primeColumnFilter: [{
|
|
13210
|
+
type: ViewChild,
|
|
13211
|
+
args: [ColumnFilter]
|
|
13212
|
+
}] } });
|
|
13213
|
+
|
|
13214
|
+
class MngTableColumnValueComponent {
|
|
13215
|
+
constructor(elementRef, messageService, translate, jsonPathPipe, getterPipe, templatePipe) {
|
|
13216
|
+
this.elementRef = elementRef;
|
|
13217
|
+
this.messageService = messageService;
|
|
13218
|
+
this.translate = translate;
|
|
13219
|
+
this.jsonPathPipe = jsonPathPipe;
|
|
13220
|
+
this.getterPipe = getterPipe;
|
|
13221
|
+
this.templatePipe = templatePipe;
|
|
13222
|
+
this.columnDisplayTypeString = ColumnDisplayTypeEnum.String;
|
|
12462
13223
|
this.columnDisplayTypeNumber = ColumnDisplayTypeEnum.Number;
|
|
12463
13224
|
this.columnDisplayTypeCurrency = ColumnDisplayTypeEnum.Currency;
|
|
12464
13225
|
this.columnDisplayTypeBoolean = ColumnDisplayTypeEnum.Boolean;
|
|
@@ -12509,7 +13270,7 @@ class MngTableColumnValueComponent {
|
|
|
12509
13270
|
this.messageService.add({ severity: 'info', summary: title, detail: message });
|
|
12510
13271
|
}
|
|
12511
13272
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngTableColumnValueComponent, deps: [{ token: i0.ElementRef }, { token: i1$2.MessageService }, { token: i2.TranslateService }, { token: JsonPathPipe }, { token: MngGetterPipe }, { token: MngTemplatePipe }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
12512
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MngTableColumnValueComponent, isStandalone: true, selector: "mng-table-column-value", inputs: { descriptor: "descriptor", item: "item" }, host: { properties: { "style.max-width.px": "this.styleMaxWidth", "class": "this.className" } }, ngImport: i0, template: "<ng-container [ngSwitch]=\"descriptor.columnDisplayType\">\n <i\n *ngIf=\"descriptor.localizationExistsProperty && !item[descriptor.localizationExistsProperty]\"\n class=\"pi pi-exclamation-circle\"\n [pTooltip]=\"'mngTable.translationMissing' | translate\"></i>\n <ng-container *ngSwitchCase=\"columnDisplayTypeString\">\n <span *ngIf=\"descriptor.hasValueAsTooltip\" [pTooltip]=\"value\" tooltipPosition=\"left\">{{ value }}</span>\n <ng-container *ngIf=\"!descriptor.hasValueAsTooltip\">{{ value }}</ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"columnDisplayTypeHtml\">\n <span [innerHTML]=\"value\"></span>\n </ng-container>\n <ng-container *ngSwitchCase=\"columnDisplayTypeNumber\">\n {{ value | number : descriptor.displayFormat : descriptor.locale }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnDisplayTypeCurrency\">\n {{ value | currency : currency : descriptor.currencyDisplay : descriptor.displayFormat : descriptor.locale }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnDisplayTypeDate\">\n {{ value | date : descriptor.displayFormat }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnDisplayTypeBoolean\">\n <ng-container *ngIf=\"descriptor.booleanAsIcon; else booleanText\">\n <i [class]=\"value | boolean : descriptor.booleanYes : descriptor.booleanNo : true\"></i>\n </ng-container>\n <ng-template #booleanText>\n {{ value | boolean : descriptor.booleanYes : descriptor.booleanNo | translate }}\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchCase=\"columnDisplayTypeEnum\">\n {{ value | enum : descriptor.enumType : descriptor.enumTitlePath : descriptor.enumNameAsValue | translate }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnDisplayTypeComponent\">\n <ng-container\n [mngComponent]=\"descriptor.customComponentType!\"\n [inputs]=\"{\n value: value,\n item: item,\n descriptor: descriptor\n }\"></ng-container>\n </ng-container>\n</ng-container>\n<div class=\"help-buttons\" *ngIf=\"descriptor.hasCopyToClipboard\">\n <button pButton pRipple type=\"button\" icon=\"pi pi-copy\" class=\"p-button-rounded p-button-info p-button-sm\" (click)=\"copyToClipboard($event)\"></button>\n</div>\n", styles: [":host{display:inline-block;overflow:hidden}:host.nowrap{white-space:nowrap;text-overflow:ellipsis}:host.multiline{white-space:pre-wrap;word-wrap:break-word}.help-buttons{display:none;position:absolute;right:0;top:50%;transform:translateY(-50%)}.help-buttons .p-button{height:1.9rem;width:1.9rem;padding:0}\n"], dependencies: [{ kind: "directive", type: NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i4$1.Tooltip, selector: "[pTooltip]", inputs: ["
|
|
13273
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MngTableColumnValueComponent, isStandalone: true, selector: "mng-table-column-value", inputs: { descriptor: "descriptor", item: "item" }, host: { properties: { "style.max-width.px": "this.styleMaxWidth", "class": "this.className" } }, ngImport: i0, template: "<ng-container [ngSwitch]=\"descriptor.columnDisplayType\">\n <i\n *ngIf=\"descriptor.localizationExistsProperty && !item[descriptor.localizationExistsProperty]\"\n class=\"pi pi-exclamation-circle\"\n [pTooltip]=\"'mngTable.translationMissing' | translate\"></i>\n <ng-container *ngSwitchCase=\"columnDisplayTypeString\">\n <span *ngIf=\"descriptor.hasValueAsTooltip\" [pTooltip]=\"value\" tooltipPosition=\"left\">{{ value }}</span>\n <ng-container *ngIf=\"!descriptor.hasValueAsTooltip\">{{ value }}</ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"columnDisplayTypeHtml\">\n <span [innerHTML]=\"value\"></span>\n </ng-container>\n <ng-container *ngSwitchCase=\"columnDisplayTypeNumber\">\n {{ value | number : descriptor.displayFormat : descriptor.locale }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnDisplayTypeCurrency\">\n {{ value | currency : currency : descriptor.currencyDisplay : descriptor.displayFormat : descriptor.locale }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnDisplayTypeDate\">\n {{ value | date : descriptor.displayFormat }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnDisplayTypeBoolean\">\n <ng-container *ngIf=\"descriptor.booleanAsIcon; else booleanText\">\n <i [class]=\"value | boolean : descriptor.booleanYes : descriptor.booleanNo : true\"></i>\n </ng-container>\n <ng-template #booleanText>\n {{ value | boolean : descriptor.booleanYes : descriptor.booleanNo | translate }}\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchCase=\"columnDisplayTypeEnum\">\n {{ value | enum : descriptor.enumType : descriptor.enumTitlePath : descriptor.enumNameAsValue | translate }}\n </ng-container>\n <ng-container *ngSwitchCase=\"columnDisplayTypeComponent\">\n <ng-container\n [mngComponent]=\"descriptor.customComponentType!\"\n [inputs]=\"{\n value: value,\n item: item,\n descriptor: descriptor\n }\"></ng-container>\n </ng-container>\n</ng-container>\n<div class=\"help-buttons\" *ngIf=\"descriptor.hasCopyToClipboard\">\n <button pButton pRipple type=\"button\" icon=\"pi pi-copy\" class=\"p-button-rounded p-button-info p-button-sm\" (click)=\"copyToClipboard($event)\"></button>\n</div>\n", styles: [":host{display:inline-block;overflow:hidden}:host.nowrap{white-space:nowrap;text-overflow:ellipsis}:host.multiline{white-space:pre-wrap;word-wrap:break-word}.help-buttons{display:none;position:absolute;right:0;top:50%;transform:translateY(-50%)}.help-buttons .p-button{height:1.9rem;width:1.9rem;padding:0}\n"], dependencies: [{ kind: "directive", type: NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i4$1.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "directive", type: NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "pipe", type: DecimalPipe, name: "number" }, { kind: "pipe", type: CurrencyPipe, name: "currency" }, { kind: "pipe", type: DatePipe, name: "date" }, { kind: "pipe", type: MngBooleanPipe, name: "boolean" }, { kind: "pipe", type: MngEnumPipe, name: "enum" }, { kind: "directive", type: MngComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "inputs", "attachToHost"], outputs: ["instanceCreated"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i6.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i6$1.Ripple, selector: "[pRipple]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
12513
13274
|
}
|
|
12514
13275
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngTableColumnValueComponent, decorators: [{
|
|
12515
13276
|
type: Component,
|
|
@@ -12543,6 +13304,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImpor
|
|
|
12543
13304
|
}] } });
|
|
12544
13305
|
|
|
12545
13306
|
class MngTableComponent {
|
|
13307
|
+
get filterMetadata() {
|
|
13308
|
+
return this.filterMetadataSubject.value;
|
|
13309
|
+
}
|
|
13310
|
+
get filterMetadata$() {
|
|
13311
|
+
return this.filterMetadataSubject.asObservable();
|
|
13312
|
+
}
|
|
12546
13313
|
constructor(injector, router, route, translate, mngCommonsService, actionExecutor, viewContainerService, localStorageService) {
|
|
12547
13314
|
this.injector = injector;
|
|
12548
13315
|
this.router = router;
|
|
@@ -12552,7 +13319,6 @@ class MngTableComponent {
|
|
|
12552
13319
|
this.actionExecutor = actionExecutor;
|
|
12553
13320
|
this.viewContainerService = viewContainerService;
|
|
12554
13321
|
this.localStorageService = localStorageService;
|
|
12555
|
-
this.filterDisplayRow = TableFilterDisplayEnum.Row;
|
|
12556
13322
|
this.cmpTypeName = 'MngTableComponent';
|
|
12557
13323
|
this.logger = inject(MngLoggerService).create(this.cmpTypeName);
|
|
12558
13324
|
this.useQueryParams = false;
|
|
@@ -12572,13 +13338,13 @@ class MngTableComponent {
|
|
|
12572
13338
|
this.isLazy = false;
|
|
12573
13339
|
this.isPagination = false;
|
|
12574
13340
|
this.useDataProvider = false;
|
|
12575
|
-
this.
|
|
12576
|
-
this.useQueryParamsInitialized$ = this.
|
|
13341
|
+
this.useQueryParamsInitializedSubject = new BehaviorSubject(false);
|
|
13342
|
+
this.useQueryParamsInitialized$ = this.useQueryParamsInitializedSubject.asObservable();
|
|
12577
13343
|
this.dataProviderInfiniteScrollItems = [];
|
|
12578
13344
|
this.itemsSubject = new ReplaySubject(1);
|
|
12579
13345
|
this.offset = 0;
|
|
12580
13346
|
this.multiSortMeta = null;
|
|
12581
|
-
this.
|
|
13347
|
+
this.filterMetadataSubject = new BehaviorSubject({});
|
|
12582
13348
|
this.globalFilterFields = [];
|
|
12583
13349
|
// infinite scroll
|
|
12584
13350
|
this.infiniteScroll = false;
|
|
@@ -12779,6 +13545,7 @@ class MngTableComponent {
|
|
|
12779
13545
|
this.dataProviderSubscription?.unsubscribe();
|
|
12780
13546
|
this.queryResultSubscription?.unsubscribe();
|
|
12781
13547
|
this.subscriptions.forEach(s => s.unsubscribe());
|
|
13548
|
+
this.filterMetadataSubject.complete();
|
|
12782
13549
|
}
|
|
12783
13550
|
reload(emitEvent = false, resetParams = false) {
|
|
12784
13551
|
const queryParamsBuilder = resetParams
|
|
@@ -12925,7 +13692,7 @@ class MngTableComponent {
|
|
|
12925
13692
|
// update only if new version from query params will be higher
|
|
12926
13693
|
this.updatePrimeSortAndFilter(mediusQueryParam);
|
|
12927
13694
|
}
|
|
12928
|
-
this.
|
|
13695
|
+
this.useQueryParamsInitializedSubject.next(true);
|
|
12929
13696
|
this.loadTableWithDataProvider(mediusQueryParam);
|
|
12930
13697
|
}
|
|
12931
13698
|
setMainAndRelatedDescriptors(descriptor) {
|
|
@@ -12974,7 +13741,7 @@ class MngTableComponent {
|
|
|
12974
13741
|
}
|
|
12975
13742
|
updatePrimeSortAndFilter(mediusQueryParam) {
|
|
12976
13743
|
this.multiSortMeta = this.createSortMeta(mediusQueryParam);
|
|
12977
|
-
this.
|
|
13744
|
+
this.filterMetadataSubject.next(this.createFilterMeta(mediusQueryParam));
|
|
12978
13745
|
this.rows = mediusQueryParam?.itemsPerPage ?? this.rows;
|
|
12979
13746
|
this.offset = mediusQueryParam?.itemsOffset ?? 0;
|
|
12980
13747
|
}
|
|
@@ -13035,7 +13802,7 @@ class MngTableComponent {
|
|
|
13035
13802
|
});
|
|
13036
13803
|
params.filterParams?.forEach(f => {
|
|
13037
13804
|
const descriptor = this.filterDescriptors.find(fd => fd.filterProperty === f.property || fd.property === f.property);
|
|
13038
|
-
const matchMode = f.filterMatchType && descriptor ? MediusRestUtil.get().getMapping(f.filterMatchType, descriptor.filterType, 2)?.[0] :
|
|
13805
|
+
const matchMode = f.filterMatchType && descriptor ? MediusRestUtil.get().getMapping(f.filterMatchType, descriptor.filterType, 2)?.[0] : FilterMatchModeEnum.Equals;
|
|
13039
13806
|
if (descriptor && matchMode) {
|
|
13040
13807
|
let filterValue = f.filterValue;
|
|
13041
13808
|
if (descriptor.filterType === FilterTypeEnum.Date && typeof filterValue !== 'undefined') {
|
|
@@ -13114,7 +13881,7 @@ class MngTableComponent {
|
|
|
13114
13881
|
}
|
|
13115
13882
|
const defaultFilter = this.createFilterMeta();
|
|
13116
13883
|
if (defaultFilter) {
|
|
13117
|
-
this.
|
|
13884
|
+
this.filterMetadataSubject.next(defaultFilter);
|
|
13118
13885
|
}
|
|
13119
13886
|
}
|
|
13120
13887
|
}
|
|
@@ -13165,7 +13932,7 @@ class MngTableComponent {
|
|
|
13165
13932
|
this.layoutPreferences = {};
|
|
13166
13933
|
}
|
|
13167
13934
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngTableComponent, deps: [{ token: i0.Injector }, { token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.TranslateService }, { token: MngCommonsService }, { token: MngActionExecutorService }, { token: MngViewContainerComponentService, optional: true }, { token: MngLocalStorageService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
13168
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MngTableComponent, isStandalone: true, selector: "mng-table", inputs: { initialDescriptor: ["descriptor", "initialDescriptor"], items: "items", queryResult: "queryResult", loading: "loading", dataProvider: "dataProvider", useQueryParams: "useQueryParams", selectionMode: "selectionMode", selectionEnabled: "selectionEnabled", actions: "actions", isColumnClickable: "isColumnClickable", viewContainerInit: ["viewContainer", "viewContainerInit"], captionComponent: "captionComponent", columnActionComponent: "columnActionComponent", columnActionMinWidth: "columnActionMinWidth", globalFilterFieldsInit: ["globalFilterFields", "globalFilterFieldsInit"] }, outputs: { loadEventEmitter: "tableLoad", cellClickEventEmitter: "cellClick", selectionChangeEventEmitter: "selectionChange", captionCmpInstEventEmitter: "captionComponentInstance", columnActionCmpInstEventEmitter: "columnActionComponentInstance" }, queries: [{ propertyName: "templates", predicate: MngTemplateDirective }], viewQueries: [{ propertyName: "primeTable", first: true, predicate: Table, descendants: true }, { propertyName: "components", predicate: MngComponentDirective, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div [style.height]=\"tableFullHeightOffset ? 'calc(100vh - ' + tableFullHeightOffset + 'px)' : null\">\n <!-- MUST NOT use observable for value when using virtual scroll - does not work for some reason -->\n <p-table\n *ngIf=\"!useQueryParams || (useQueryParamsInitialized$ | async)\"\n [value]=\"infiniteScroll ? dataProviderInfiniteScrollItems : (queryResult$ | async)?.pageData ?? []\"\n [dataKey]=\"descriptor?.dataKeyProperty\"\n [lazy]=\"isLazy\"\n [loading]=\"(loading$ | async) ?? false\"\n [paginator]=\"isPagination && !infiniteScroll\"\n [rows]=\"infiniteScroll ? 20 : rows\"\n [first]=\"infiniteScroll ? 0 : offset\"\n [totalRecords]=\"$any(infiniteScroll ? null : (queryResult$ | async)?.allDataCount ?? 0)\"\n [rowsPerPageOptions]=\"infiniteScroll ? undefined : rowsPerPageOptions\"\n [showCurrentPageReport]=\"!infiniteScroll\"\n [currentPageReportTemplate]=\"'mngTable.paginationMsg' | translate\"\n [multiSortMeta]=\"multiSortMeta\"\n [filters]=\"filterMetadata\"\n [globalFilterFields]=\"globalFilterFields\"\n sortMode=\"multiple\"\n [(selection)]=\"selection\"\n (selectionChange)=\"onSelectionChange($event)\"\n [selectionMode]=\"selectionEnabled ? selectionMode : null\"\n [scrollable]=\"true\"\n [virtualScroll]=\"infiniteScroll\"\n [virtualScrollItemSize]=\"rowHeight\"\n scrollHeight=\"flex\"\n [rowHover]=\"descriptor?.hasHover ?? true\"\n [styleClass]=\"className\"\n [resizableColumns]=\"descriptor?.hasResizableColumns ?? false\"\n [columnResizeMode]=\"descriptor?.columnResizeMode ?? 'fit'\"\n [reorderableColumns]=\"areColumnsReorderable\"\n [columns]=\"visibleColumns\"\n (onColResize)=\"onTableColumnResize($event)\"\n (onColReorder)=\"onColumnReorder($event)\"\n (onLazyLoad)=\"onTableLazyLoad($event)\"\n (onSort)=\"onTableSort($event)\"\n (onFilter)=\"onTableFilter($event)\">\n <ng-template *ngIf=\"captionTemplate || captionComponent || descriptor?.title\" pTemplate=\"caption\">\n <ng-container *ngIf=\"captionTemplate; else componentOrDefaultCaption\">\n <ng-container *ngTemplateOutlet=\"captionTemplate\"></ng-container>\n </ng-container>\n <ng-template #componentOrDefaultCaption>\n <div *ngIf=\"captionComponent; else defaultCaption\" [mngComponent]=\"captionComponent\" (instanceCreated)=\"onCaptionCmpInst($event)\"></div>\n <ng-template #defaultCaption>\n <h5 class=\"p-0 m-0\">{{ descriptor?.title }}</h5>\n </ng-template>\n </ng-template>\n </ng-template>\n\n <ng-template pTemplate=\"header\">\n <tr *ngIf=\"!descriptor?.hideHeader\" class=\"mng-table-header\" [class]=\"descriptor?.headerClassName\">\n <th *ngIf=\"selectionEnabled && selectionMode === 'multiple'\" style=\"min-width: 36px\" pFrozenColumn [frozen]=\"descriptor?.selectionColumnFrozen ?? true\">\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\n </th>\n <!-- We need the line below, because otherwise p-tableRadioButton shifts the rest of the columns in table -->\n <th *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"min-width: 36px\" pFrozenColumn [frozen]=\"descriptor?.selectionColumnFrozen ?? true\"></th>\n <ng-container *ngFor=\"let col of columns\">\n <ng-container *ngIf=\"col.isVisible\">\n <ng-template #sortableColumnTHTemplate>\n <div class=\"flex justify-content-between align-items-center\">\n {{ col.descriptor.title ?? (col.descriptor.property | i18nProperty : descriptor!.model) | translate }}\n <p-sortIcon [field]=\"col.descriptor.property\"></p-sortIcon>\n </div>\n </ng-template>\n <ng-template #nonSortableColumnTHTemplate>\n {{ col.descriptor.title ?? (col.descriptor.property | i18nProperty : descriptor!.model) | translate }}\n </ng-template>\n <th\n *ngIf=\"col.descriptor.isReorderable\"\n pResizableColumn\n pReorderableColumn\n [id]=\"col.descriptor.property\"\n [pSortableColumn]=\"col.descriptor.property\"\n [pSortableColumnDisabled]=\"!col.descriptor.isSortEnabled\"\n [style.width]=\"col.width ? col.width + 'px' : col.descriptor.width + '%'\"\n [style.min-width.px]=\"col.descriptor.minWidth\"\n [style.max-width.px]=\"col.width ?? col.descriptor.maxWidth\"\n [class]=\"\n col.descriptor.headerClassName +\n (descriptor?.filterDisplay === filterDisplayRow && hasColumnFilters && col.descriptor.filterDescriptor\n ? ' mng-column-filter-' + col.descriptor.filterDescriptor.filterType\n : '')\n \">\n <ng-container *ngTemplateOutlet=\"col.descriptor.isSortEnabled ? sortableColumnTHTemplate : nonSortableColumnTHTemplate\"></ng-container>\n </th>\n <th\n *ngIf=\"!col.descriptor.isReorderable\"\n pResizableColumn\n [id]=\"col.descriptor.property\"\n [pSortableColumn]=\"col.descriptor.property\"\n [pSortableColumnDisabled]=\"!col.descriptor.isSortEnabled\"\n [style.width]=\"col.width ? col.width + 'px' : col.descriptor.width + '%'\"\n [style.min-width.px]=\"col.descriptor.minWidth\"\n [style.max-width.px]=\"col.width ?? col.descriptor.maxWidth\"\n [class]=\"\n col.descriptor.headerClassName +\n (descriptor?.filterDisplay === filterDisplayRow && hasColumnFilters && col.descriptor.filterDescriptor\n ? ' mng-column-filter-' + col.descriptor.filterDescriptor.filterType\n : '')\n \">\n <ng-container *ngTemplateOutlet=\"col.descriptor.isSortEnabled ? sortableColumnTHTemplate : nonSortableColumnTHTemplate\"></ng-container>\n </th>\n </ng-container>\n </ng-container>\n <th\n *ngIf=\"showInlineActionsColumn || areColumnsToggleable || areColumnsReorderable\"\n [style.min-width.px]=\"columnActionMinWidth\"\n pFrozenColumn\n [frozen]=\"descriptor?.actionColumnFrozen ?? true\"\n alignFrozen=\"right\"\n class=\"text-right\">\n <p-multiSelect\n #columnToggleMultiselect\n *ngIf=\"areColumnsToggleable || areColumnsReorderable || descriptor?.hasResizableColumns\"\n styleClass=\"p-button-primary mng-table-columns-multiselect\"\n appendTo=\"body\"\n optionDisabled=\"disabled\"\n [filter]=\"false\"\n [options]=\"columns\"\n [(ngModel)]=\"visibleColumns\"\n [pTooltip]=\"'mngTable.adjustTable' | translate\"\n tooltipPosition=\"left\"\n defaultLabel=\"\"\n dropdownIcon=\"pi pi-sliders-h\"\n [displaySelectedLabel]=\"false\"\n (onChange)=\"onColumnToggle($event)\">\n <ng-template pTemplate=\"filter\">\n <div class=\"p-checkbox p-component ml-1\" [ngClass]=\"{'p-checkbox-disabled': !areColumnsToggleable}\">\n <div class=\"p-hidden-accessible\">\n <input\n type=\"checkbox\"\n readonly=\"readonly\"\n [checked]=\"columnToggleMultiselect.allChecked\"\n (focus)=\"columnToggleMultiselect.onHeaderCheckboxFocus()\"\n (blur)=\"columnToggleMultiselect.onHeaderCheckboxBlur()\"\n (keydown.space)=\"columnToggleMultiselect.toggleAll($event)\"\n [disabled]=\"!areColumnsToggleable\" />\n </div>\n <div\n class=\"p-checkbox-box\"\n role=\"checkbox\"\n [attr.aria-checked]=\"columnToggleMultiselect.allChecked\"\n [ngClass]=\"{\n 'p-highlight': columnToggleMultiselect.allChecked,\n 'p-focus': columnToggleMultiselect.headerCheckboxFocus,\n 'p-disabled': !areColumnsToggleable\n }\"\n (click)=\"columnToggleMultiselect.toggleAll($event)\">\n <span class=\"p-checkbox-icon\" [ngClass]=\"{'pi pi-check': columnToggleMultiselect.allChecked}\"></span>\n </div>\n </div>\n <p-button\n icon=\"pi pi-replay\"\n styleClass=\"p-button-secondary\"\n [pTooltip]=\"'mngTable.resetLayout' | translate\"\n tooltipPosition=\"left\"\n (click)=\"resetDefaultLayout()\"></p-button>\n </ng-template>\n <ng-template let-item pTemplate=\"item\">\n {{ item.descriptor.title ?? (item.descriptor.property | i18nProperty : descriptor!.model) | translate }}\n </ng-template>\n </p-multiSelect>\n </th>\n </tr>\n <tr *ngIf=\"descriptor?.filterDisplay === filterDisplayRow && hasColumnFilters\" class=\"mng-column-filter-row\">\n <!-- We need the line below, because otherwise p-tableRadioButton shifts the rest of the columns in table -->\n <th *ngIf=\"selectionEnabled\" style=\"min-width: 36px\" pFrozenColumn [frozen]=\"descriptor?.selectionColumnFrozen ?? true\"></th>\n <ng-container *ngFor=\"let col of columns\">\n <th\n *ngIf=\"col.isVisible\"\n [class]=\"\n (col.descriptor.filterDescriptor ? 'mng-column-filter-' + col.descriptor.filterDescriptor.filterType + ' ' : ' ') +\n col.descriptor.filterDescriptor?.columnClassName\n \"\n [style.width.%]=\"col.descriptor.filterDescriptor?.columnWidth ?? col.descriptor.width\"\n [style.min-width.px]=\"col.descriptor.filterDescriptor?.columnMinWidth ?? col.descriptor.minWidth\"\n [style.max-width.px]=\"col.descriptor.maxWidth\">\n <div class=\"flex\" *ngIf=\"col.descriptor.filterDescriptor\">\n <mng-table-column-filter [display]=\"descriptor!.filterDisplay\" [descriptor]=\"col.descriptor.filterDescriptor\"></mng-table-column-filter>\n </div>\n </th>\n </ng-container>\n <th\n *ngIf=\"showInlineActionsColumn || areColumnsToggleable || areColumnsReorderable\"\n [style.min-width.px]=\"columnActionMinWidth\"\n pFrozenColumn\n [frozen]=\"descriptor?.actionColumnFrozen ?? true\"\n alignFrozen=\"right\"></th>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"body\" let-item let-idx=\"rowIndex\">\n <tr\n [style.height.px]=\"rowHeight\"\n [ngClass]=\"descriptor?.rowClassName | mngClassMapPipe : descriptor?.rowClassNameMapFn : item | mngLocaleDefaultRowClass : descriptor : item\">\n <td *ngIf=\"selectionEnabled && selectionMode === 'multiple'\" style=\"min-width: 36px\" pFrozenColumn [frozen]=\"descriptor?.selectionColumnFrozen ?? true\">\n <p-tableCheckbox [value]=\"item\"></p-tableCheckbox>\n </td>\n <td *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"min-width: 36px\" pFrozenColumn [frozen]=\"descriptor?.selectionColumnFrozen ?? true\">\n <p-tableRadioButton [value]=\"item\"></p-tableRadioButton>\n </td>\n <ng-container *ngFor=\"let col of columns\">\n <td\n *ngIf=\"col.isVisible\"\n (click)=\"onCellClick($event, col.descriptor, item, idx)\"\n [class]=\"\n (col.descriptor.className | mngClassMapPipe : col.descriptor.classNameMapFn : item) +\n (descriptor?.filterDisplay === filterDisplayRow && hasColumnFilters && col.descriptor.filterDescriptor\n ? ' mng-column-filter-' + col.descriptor.filterDescriptor.filterType\n : '')\n \"\n [class.clickable]=\"isColumnClickable\"\n [style.width]=\"col.width ? col.width + 'px' : col.descriptor.width + '%'\"\n [style.min-width.px]=\"col.descriptor.minWidth\"\n [style.max-width.px]=\"col.width ?? col.descriptor.maxWidth\">\n <span class=\"p-column-title\">{{ col.descriptor.title ?? (col.descriptor.property | i18nProperty : descriptor!.model) | translate }}</span>\n <mng-table-column-value [descriptor]=\"col.descriptor\" [item]=\"item\"></mng-table-column-value>\n </td>\n </ng-container>\n <td\n *ngIf=\"showInlineActionsColumn || areColumnsToggleable || areColumnsReorderable\"\n class=\"column-action justify-content-end text-right\"\n [style.min-width.px]=\"columnActionMinWidth\"\n pFrozenColumn\n [frozen]=\"descriptor?.actionColumnFrozen ?? true\"\n alignFrozen=\"right\">\n <ng-container *ngIf=\"columnActionTemplate; else showColumnActionComponentOrDefault\">\n <ng-container *ngTemplateOutlet=\"columnActionTemplate; context: {rowItem: item, rowIndex: idx}\"></ng-container>\n </ng-container>\n <ng-template #showColumnActionComponentOrDefault>\n <span\n *ngIf=\"columnActionComponent; else defaultColumnActions\"\n [mngComponent]=\"columnActionComponent!\"\n (instanceCreated)=\"onColumnActionCmpInst($event)\"></span>\n </ng-template>\n <ng-template #defaultColumnActions>\n <mng-action\n *ngFor=\"let action of rowInlineActions\"\n [action]=\"action\"\n [item]=\"item\"\n [viewContainer]=\"viewContainer\"\n [hostComponent]=\"this\"\n [itemId]=\"descriptor?.model?.idPropertyName ? item[descriptor!.model!.idPropertyName!] : null\"\n [actionData]=\"{itemIndex: idx}\"\n (finish)=\"onActionFinish($event)\">\n </mng-action>\n </ng-template>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"loadingicon\">\n <div class=\"flex flex-column align-items-center\">\n <i [class]=\"'text-white text-4xl pi-spin ' + descriptor?.loadingIcon\" *ngIf=\"descriptor?.loadingIcon\"></i>\n <div class=\"text text-white text-lg font-semibold\" [ngClass]=\"{'mt-3': descriptor?.loadingIcon}\" *ngIf=\"descriptor?.loadingText\">\n {{ descriptor?.loadingText ?? '' | translate }}\n </div>\n </div>\n </ng-template>\n\n <ng-template pTemplate=\"loadingbody\">\n <tr [style.height.px]=\"rowHeight\">\n <td [attr.colspan]=\"(descriptor?.columns?.length ?? 0) + (showInlineActionsColumn ? 1 : 0) + (selectionEnabled ? 1 : 0)\">\n <div class=\"loading-text\"></div>\n <p-skeleton [ngStyle]=\"{width: '100%'}\"></p-skeleton>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"emptymessage\">\n <tr [style.height.px]=\"rowHeight\">\n <td [attr.colspan]=\"(descriptor?.columns?.length ?? 0) + (showInlineActionsColumn ? 1 : 0) + (selectionEnabled ? 1 : 0)\">\n {{ 'mngTable.noItems' | translate }}\n </td>\n </tr>\n </ng-template>\n\n <ng-template *ngIf=\"footerTemplate\" pTemplate=\"summary\">\n <ng-container [ngTemplateOutlet]=\"footerTemplate\" [ngTemplateOutletContext]=\"{queryResult: queryResult}\"></ng-container>\n </ng-template>\n </p-table>\n</div>\n", dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: TableModule }, { kind: "component", type: i4$3.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll", "virtualRowHeight"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i1$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i4$3.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "directive", type: i4$3.FrozenColumn, selector: "[pFrozenColumn]", inputs: ["frozen", "alignFrozen"] }, { kind: "directive", type: i4$3.ResizableColumn, selector: "[pResizableColumn]", inputs: ["pResizableColumnDisabled"] }, { kind: "directive", type: i4$3.ReorderableColumn, selector: "[pReorderableColumn]", inputs: ["pReorderableColumnDisabled"] }, { kind: "component", type: i4$3.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i4$3.TableRadioButton, selector: "p-tableRadioButton", inputs: ["disabled", "value", "index", "inputId", "name", "ariaLabel"] }, { kind: "component", type: i4$3.TableCheckbox, selector: "p-tableCheckbox", inputs: ["disabled", "value", "index", "inputId", "name", "required", "ariaLabel"] }, { kind: "component", type: i4$3.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "directive", type: MngComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "inputs", "attachToHost"], outputs: ["instanceCreated"] }, { kind: "pipe", type: MngI18nPropertyPipe, name: "i18nProperty" }, { kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: MngTableColumnFilterComponent, selector: "mng-table-column-filter", inputs: ["descriptor", "display"] }, { kind: "pipe", type: MngClassMapPipe, name: "mngClassMapPipe" }, { kind: "pipe", type: MngLocaleDefaultRowClassPipe, name: "mngLocaleDefaultRowClass" }, { kind: "component", type: MngTableColumnValueComponent, selector: "mng-table-column-value", inputs: ["descriptor", "item"] }, { kind: "component", type: MngActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData", "queryParam", "dataProvider", "hostComponent", "route", "disabled", "loading", "viewContainer", "selectedItems"], outputs: ["finish"] }, { kind: "ngmodule", type: SkeletonModule }, { kind: "component", type: i6$4.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "style", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "ngmodule", type: MultiSelectModule }, { kind: "component", type: i4$2.MultiSelect, selector: "p-multiSelect", inputs: ["style", "styleClass", "panelStyle", "panelStyleClass", "inputId", "disabled", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "appendTo", "dataKey", "name", "label", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "filterBy", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "showClear", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "defaultLabel", "placeholder", "options", "filterValue", "itemSize", "selectionLimit"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i6.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "size", "style", "styleClass", "badgeClass", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i4$1.Tooltip, selector: "[pTooltip]", inputs: ["id", "tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
13935
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MngTableComponent, isStandalone: true, selector: "mng-table", inputs: { initialDescriptor: ["descriptor", "initialDescriptor"], items: "items", queryResult: "queryResult", loading: "loading", dataProvider: "dataProvider", useQueryParams: "useQueryParams", selectionMode: "selectionMode", selectionEnabled: "selectionEnabled", actions: "actions", isColumnClickable: "isColumnClickable", viewContainerInit: ["viewContainer", "viewContainerInit"], captionComponent: "captionComponent", columnActionComponent: "columnActionComponent", columnActionMinWidth: "columnActionMinWidth", globalFilterFieldsInit: ["globalFilterFields", "globalFilterFieldsInit"] }, outputs: { loadEventEmitter: "tableLoad", cellClickEventEmitter: "cellClick", selectionChangeEventEmitter: "selectionChange", captionCmpInstEventEmitter: "captionComponentInstance", columnActionCmpInstEventEmitter: "columnActionComponentInstance" }, queries: [{ propertyName: "templates", predicate: MngTemplateDirective }], viewQueries: [{ propertyName: "primeTable", first: true, predicate: Table, descendants: true }, { propertyName: "components", predicate: MngComponentDirective, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div [style.height]=\"tableFullHeightOffset ? 'calc(100vh - ' + tableFullHeightOffset + 'px)' : null\">\n <!-- MUST NOT use observable for value when using virtual scroll - does not work for some reason -->\n <p-table\n *ngIf=\"!useQueryParams || (useQueryParamsInitialized$ | async)\"\n [value]=\"infiniteScroll ? dataProviderInfiniteScrollItems : (queryResult$ | async)?.pageData ?? []\"\n [dataKey]=\"descriptor?.dataKeyProperty\"\n [lazy]=\"isLazy\"\n [loading]=\"(loading$ | async) ?? false\"\n [paginator]=\"isPagination && !infiniteScroll\"\n [rows]=\"infiniteScroll ? 20 : rows\"\n [first]=\"infiniteScroll ? 0 : offset\"\n [totalRecords]=\"$any(infiniteScroll ? null : (queryResult$ | async)?.allDataCount ?? 0)\"\n [rowsPerPageOptions]=\"infiniteScroll ? undefined : rowsPerPageOptions\"\n [showCurrentPageReport]=\"!infiniteScroll\"\n [currentPageReportTemplate]=\"'mngTable.paginationMsg' | translate\"\n [multiSortMeta]=\"multiSortMeta\"\n [filters]=\"filterMetadata\"\n [globalFilterFields]=\"globalFilterFields\"\n sortMode=\"multiple\"\n [(selection)]=\"selection\"\n (selectionChange)=\"onSelectionChange($event)\"\n [selectionMode]=\"selectionEnabled ? selectionMode : null\"\n [scrollable]=\"true\"\n [virtualScroll]=\"infiniteScroll\"\n [virtualScrollItemSize]=\"rowHeight\"\n scrollHeight=\"flex\"\n [rowHover]=\"descriptor?.hasHover ?? true\"\n [styleClass]=\"className\"\n [resizableColumns]=\"descriptor?.hasResizableColumns ?? false\"\n [columnResizeMode]=\"descriptor?.columnResizeMode ?? 'fit'\"\n [reorderableColumns]=\"areColumnsReorderable\"\n [columns]=\"visibleColumns\"\n (onColResize)=\"onTableColumnResize($event)\"\n (onColReorder)=\"onColumnReorder($event)\"\n (onLazyLoad)=\"onTableLazyLoad($event)\"\n (onSort)=\"onTableSort($event)\"\n (onFilter)=\"onTableFilter($event)\">\n <ng-template *ngIf=\"captionTemplate || captionComponent || descriptor?.title\" pTemplate=\"caption\">\n <ng-container *ngIf=\"captionTemplate; else componentOrDefaultCaption\">\n <ng-container *ngTemplateOutlet=\"captionTemplate\"></ng-container>\n </ng-container>\n <ng-template #componentOrDefaultCaption>\n <div *ngIf=\"captionComponent; else defaultCaption\" [mngComponent]=\"captionComponent\" (instanceCreated)=\"onCaptionCmpInst($event)\"></div>\n <ng-template #defaultCaption>\n <h5 class=\"p-0 m-0\">{{ descriptor?.title }}</h5>\n </ng-template>\n </ng-template>\n </ng-template>\n\n <ng-template pTemplate=\"header\">\n <tr *ngIf=\"!descriptor?.hideHeader\" class=\"mng-table-header\" [class]=\"descriptor?.headerClassName\">\n <th *ngIf=\"selectionEnabled && selectionMode === 'multiple'\" style=\"min-width: 36px\" pFrozenColumn [frozen]=\"descriptor?.selectionColumnFrozen ?? true\">\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\n </th>\n <!-- We need the line below, because otherwise p-tableRadioButton shifts the rest of the columns in table -->\n <th *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"min-width: 36px\" pFrozenColumn [frozen]=\"descriptor?.selectionColumnFrozen ?? true\"></th>\n <ng-container *ngFor=\"let col of columns\">\n <ng-container *ngIf=\"col.isVisible\">\n <ng-template #sortableColumnTHTemplate>\n <div class=\"flex justify-content-between align-items-center\">\n {{ col.descriptor.title ?? (col.descriptor.property | i18nProperty : descriptor!.model) | translate }}\n <p-sortIcon [field]=\"col.descriptor.property\"></p-sortIcon>\n </div>\n </ng-template>\n <ng-template #nonSortableColumnTHTemplate>\n {{ col.descriptor.title ?? (col.descriptor.property | i18nProperty : descriptor!.model) | translate }}\n </ng-template>\n <th\n *ngIf=\"col.descriptor.isReorderable\"\n pResizableColumn\n pReorderableColumn\n [id]=\"col.descriptor.property\"\n [pSortableColumn]=\"col.descriptor.property\"\n [pSortableColumnDisabled]=\"!col.descriptor.isSortEnabled\"\n [style.width]=\"col.width ? col.width + 'px' : col.descriptor.width + '%'\"\n [style.min-width.px]=\"col.descriptor.minWidth\"\n [style.max-width.px]=\"col.width ?? col.descriptor.maxWidth\"\n [class]=\"\n col.descriptor.headerClassName +\n (hasColumnFilters && col.descriptor.filterDescriptor ? ' mng-column-filter-' + col.descriptor.filterDescriptor.filterType : '')\n \">\n <ng-container *ngTemplateOutlet=\"col.descriptor.isSortEnabled ? sortableColumnTHTemplate : nonSortableColumnTHTemplate\"></ng-container>\n </th>\n <th\n *ngIf=\"!col.descriptor.isReorderable\"\n pResizableColumn\n [id]=\"col.descriptor.property\"\n [pSortableColumn]=\"col.descriptor.property\"\n [pSortableColumnDisabled]=\"!col.descriptor.isSortEnabled\"\n [style.width]=\"col.width ? col.width + 'px' : col.descriptor.width + '%'\"\n [style.min-width.px]=\"col.descriptor.minWidth\"\n [style.max-width.px]=\"col.width ?? col.descriptor.maxWidth\"\n [class]=\"\n col.descriptor.headerClassName +\n (hasColumnFilters && col.descriptor.filterDescriptor ? ' mng-column-filter-' + col.descriptor.filterDescriptor.filterType : '')\n \">\n <ng-container *ngTemplateOutlet=\"col.descriptor.isSortEnabled ? sortableColumnTHTemplate : nonSortableColumnTHTemplate\"></ng-container>\n </th>\n </ng-container>\n </ng-container>\n <th\n *ngIf=\"showInlineActionsColumn || areColumnsToggleable || areColumnsReorderable\"\n [style.min-width.px]=\"columnActionMinWidth\"\n pFrozenColumn\n [frozen]=\"descriptor?.actionColumnFrozen ?? true\"\n alignFrozen=\"right\"\n class=\"text-right\">\n <p-multiSelect\n #columnToggleMultiselect\n *ngIf=\"areColumnsToggleable || areColumnsReorderable || descriptor?.hasResizableColumns\"\n styleClass=\"p-button-primary mng-table-columns-multiselect\"\n appendTo=\"body\"\n optionDisabled=\"disabled\"\n [filter]=\"false\"\n [options]=\"columns\"\n [(ngModel)]=\"visibleColumns\"\n [pTooltip]=\"'mngTable.adjustTable' | translate\"\n tooltipPosition=\"left\"\n placeholder=\"\"\n dropdownIcon=\"pi pi-sliders-h\"\n [displaySelectedLabel]=\"false\"\n (onChange)=\"onColumnToggle($event)\">\n <ng-template pTemplate=\"filter\">\n <div class=\"p-checkbox p-component ml-1\" [ngClass]=\"{'p-checkbox-disabled': !areColumnsToggleable}\">\n <div class=\"p-hidden-accessible\">\n <input\n type=\"checkbox\"\n readonly=\"readonly\"\n [checked]=\"columnToggleMultiselect.allSelected\"\n (focus)=\"columnToggleMultiselect.onHeaderCheckboxFocus()\"\n (blur)=\"columnToggleMultiselect.onHeaderCheckboxBlur()\"\n (keydown.space)=\"columnToggleMultiselect.onToggleAll($event)\"\n [disabled]=\"!areColumnsToggleable\" />\n </div>\n <div\n class=\"p-checkbox-box\"\n role=\"checkbox\"\n [attr.aria-checked]=\"columnToggleMultiselect.allSelected\"\n [ngClass]=\"{\n 'p-highlight': columnToggleMultiselect.allSelected,\n 'p-focus': columnToggleMultiselect.headerCheckboxFocus,\n 'p-disabled': !areColumnsToggleable\n }\"\n (click)=\"columnToggleMultiselect.onToggleAll($event)\">\n <span class=\"p-checkbox-icon\" [ngClass]=\"{'pi pi-check': columnToggleMultiselect.allSelected}\"></span>\n </div>\n </div>\n <p-button\n icon=\"pi pi-replay\"\n styleClass=\"p-button-secondary\"\n [pTooltip]=\"'mngTable.resetLayout' | translate\"\n tooltipPosition=\"left\"\n (click)=\"resetDefaultLayout()\"></p-button>\n </ng-template>\n <ng-template let-item pTemplate=\"item\">\n {{ item.descriptor.title ?? (item.descriptor.property | i18nProperty : descriptor!.model) | translate }}\n </ng-template>\n </p-multiSelect>\n </th>\n </tr>\n <tr *ngIf=\"hasColumnFilters\" class=\"mng-column-filter-row\">\n <!-- We need the line below, because otherwise p-tableRadioButton shifts the rest of the columns in table -->\n <th *ngIf=\"selectionEnabled\" style=\"min-width: 36px\" pFrozenColumn [frozen]=\"descriptor?.selectionColumnFrozen ?? true\"></th>\n <ng-container *ngFor=\"let col of columns\">\n <th\n *ngIf=\"col.isVisible\"\n [class]=\"\n (col.descriptor.filterDescriptor ? 'mng-column-filter-' + col.descriptor.filterDescriptor.filterType + ' ' : ' ') +\n col.descriptor.filterDescriptor?.columnClassName\n \"\n [style.width.%]=\"col.descriptor.filterDescriptor?.columnWidth ?? col.descriptor.width\"\n [style.min-width.px]=\"col.descriptor.filterDescriptor?.columnMinWidth ?? col.descriptor.minWidth\"\n [style.max-width.px]=\"col.descriptor.maxWidth\">\n <div class=\"flex\" *ngIf=\"col.descriptor.filterDescriptor\">\n <mng-table-column-filter-full\n *ngIf=\"!descriptor?.deprecatedFilters; else deprecatedFilters\"\n [descriptor]=\"col.descriptor.filterDescriptor\"></mng-table-column-filter-full>\n <ng-template #deprecatedFilters>\n <mng-table-column-filter [descriptor]=\"col.descriptor.filterDescriptor\"></mng-table-column-filter>\n </ng-template>\n </div>\n </th>\n </ng-container>\n <th\n *ngIf=\"showInlineActionsColumn || areColumnsToggleable || areColumnsReorderable\"\n [style.min-width.px]=\"columnActionMinWidth\"\n pFrozenColumn\n [frozen]=\"descriptor?.actionColumnFrozen ?? true\"\n alignFrozen=\"right\"></th>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"body\" let-item let-idx=\"rowIndex\">\n <tr\n [style.height.px]=\"rowHeight\"\n [ngClass]=\"descriptor?.rowClassName | mngClassMapPipe : descriptor?.rowClassNameMapFn : item | mngLocaleDefaultRowClass : descriptor : item\">\n <td *ngIf=\"selectionEnabled && selectionMode === 'multiple'\" style=\"min-width: 36px\" pFrozenColumn [frozen]=\"descriptor?.selectionColumnFrozen ?? true\">\n <p-tableCheckbox [value]=\"item\"></p-tableCheckbox>\n </td>\n <td *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"min-width: 36px\" pFrozenColumn [frozen]=\"descriptor?.selectionColumnFrozen ?? true\">\n <p-tableRadioButton [value]=\"item\"></p-tableRadioButton>\n </td>\n <ng-container *ngFor=\"let col of columns\">\n <td\n *ngIf=\"col.isVisible\"\n (click)=\"onCellClick($event, col.descriptor, item, idx)\"\n [class]=\"\n (col.descriptor.className | mngClassMapPipe : col.descriptor.classNameMapFn : item) +\n (hasColumnFilters && col.descriptor.filterDescriptor ? ' mng-column-filter-' + col.descriptor.filterDescriptor.filterType : '')\n \"\n [class.clickable]=\"isColumnClickable\"\n [style.width]=\"col.width ? col.width + 'px' : col.descriptor.width + '%'\"\n [style.min-width.px]=\"col.descriptor.minWidth\"\n [style.max-width.px]=\"col.width ?? col.descriptor.maxWidth\">\n <span class=\"p-column-title\">{{ col.descriptor.title ?? (col.descriptor.property | i18nProperty : descriptor!.model) | translate }}</span>\n <mng-table-column-value [descriptor]=\"col.descriptor\" [item]=\"item\"></mng-table-column-value>\n </td>\n </ng-container>\n <td\n *ngIf=\"showInlineActionsColumn || areColumnsToggleable || areColumnsReorderable\"\n class=\"column-action justify-content-end text-right\"\n [style.min-width.px]=\"columnActionMinWidth\"\n pFrozenColumn\n [frozen]=\"descriptor?.actionColumnFrozen ?? true\"\n alignFrozen=\"right\">\n <ng-container *ngIf=\"columnActionTemplate; else showColumnActionComponentOrDefault\">\n <ng-container *ngTemplateOutlet=\"columnActionTemplate; context: {rowItem: item, rowIndex: idx}\"></ng-container>\n </ng-container>\n <ng-template #showColumnActionComponentOrDefault>\n <span\n *ngIf=\"columnActionComponent; else defaultColumnActions\"\n [mngComponent]=\"columnActionComponent!\"\n (instanceCreated)=\"onColumnActionCmpInst($event)\"></span>\n </ng-template>\n <ng-template #defaultColumnActions>\n <mng-action\n *ngFor=\"let action of rowInlineActions\"\n [action]=\"action\"\n [item]=\"item\"\n [viewContainer]=\"viewContainer\"\n [hostComponent]=\"this\"\n [itemId]=\"descriptor?.model?.idPropertyName ? item[descriptor!.model!.idPropertyName!] : null\"\n [actionData]=\"{itemIndex: idx}\"\n (finish)=\"onActionFinish($event)\">\n </mng-action>\n </ng-template>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"loadingicon\">\n <div class=\"flex flex-column align-items-center\">\n <i [class]=\"'text-white text-4xl pi-spin ' + descriptor?.loadingIcon\" *ngIf=\"descriptor?.loadingIcon\"></i>\n <div class=\"text text-white text-lg font-semibold\" [ngClass]=\"{'mt-3': descriptor?.loadingIcon}\" *ngIf=\"descriptor?.loadingText\">\n {{ descriptor?.loadingText ?? '' | translate }}\n </div>\n </div>\n </ng-template>\n\n <ng-template pTemplate=\"loadingbody\">\n <tr [style.height.px]=\"rowHeight\">\n <td [attr.colspan]=\"(descriptor?.columns?.length ?? 0) + (showInlineActionsColumn ? 1 : 0) + (selectionEnabled ? 1 : 0)\">\n <div class=\"loading-text\"></div>\n <p-skeleton [ngStyle]=\"{width: '100%'}\"></p-skeleton>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"emptymessage\">\n <tr [style.height.px]=\"rowHeight\">\n <td [attr.colspan]=\"(descriptor?.columns?.length ?? 0) + (showInlineActionsColumn ? 1 : 0) + (selectionEnabled ? 1 : 0)\">\n {{ 'mngTable.noItems' | translate }}\n </td>\n </tr>\n </ng-template>\n\n <ng-template *ngIf=\"footerTemplate\" pTemplate=\"summary\">\n <ng-container [ngTemplateOutlet]=\"footerTemplate\" [ngTemplateOutletContext]=\"{queryResult: queryResult}\"></ng-container>\n </ng-template>\n </p-table>\n</div>\n", dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: TableModule }, { kind: "component", type: i4$4.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll", "virtualRowHeight"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i1$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i4$4.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "directive", type: i4$4.FrozenColumn, selector: "[pFrozenColumn]", inputs: ["frozen", "alignFrozen"] }, { kind: "directive", type: i4$4.ResizableColumn, selector: "[pResizableColumn]", inputs: ["pResizableColumnDisabled"] }, { kind: "directive", type: i4$4.ReorderableColumn, selector: "[pReorderableColumn]", inputs: ["pReorderableColumnDisabled"] }, { kind: "component", type: i4$4.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i4$4.TableRadioButton, selector: "p-tableRadioButton", inputs: ["disabled", "value", "index", "inputId", "name", "ariaLabel"] }, { kind: "component", type: i4$4.TableCheckbox, selector: "p-tableCheckbox", inputs: ["disabled", "value", "index", "inputId", "name", "required", "ariaLabel"] }, { kind: "component", type: i4$4.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "directive", type: MngComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "inputs", "attachToHost"], outputs: ["instanceCreated"] }, { kind: "pipe", type: MngI18nPropertyPipe, name: "i18nProperty" }, { kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: MngTableColumnValueComponent, selector: "mng-table-column-value", inputs: ["descriptor", "item"] }, { kind: "pipe", type: MngClassMapPipe, name: "mngClassMapPipe" }, { kind: "pipe", type: MngLocaleDefaultRowClassPipe, name: "mngLocaleDefaultRowClass" }, { kind: "component", type: MngActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData", "queryParam", "dataProvider", "hostComponent", "route", "disabled", "loading", "viewContainer", "selectedItems"], outputs: ["finish"] }, { kind: "ngmodule", type: SkeletonModule }, { kind: "component", type: i6$5.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "style", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "ngmodule", type: MultiSelectModule }, { kind: "component", type: i4$2.MultiSelect, selector: "p-multiSelect", inputs: ["id", "ariaLabel", "style", "styleClass", "panelStyle", "panelStyleClass", "inputId", "disabled", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "appendTo", "dataKey", "name", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "filterBy", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "showClear", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "defaultLabel", "placeholder", "options", "filterValue", "itemSize", "selectAll", "focusOnHover", "filterFields", "selectOnFocus", "autoOptionFocus"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i6.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "size", "style", "styleClass", "badgeClass", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i4$1.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: MngTableColumnFilterFullComponent, selector: "mng-table-column-filter-full", inputs: ["descriptor"] }, { kind: "component", type: MngTableColumnFilterComponent, selector: "mng-table-column-filter", inputs: ["descriptor"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
13169
13936
|
}
|
|
13170
13937
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngTableComponent, decorators: [{
|
|
13171
13938
|
type: Component,
|
|
@@ -13180,17 +13947,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImpor
|
|
|
13180
13947
|
NgClass,
|
|
13181
13948
|
NgStyle,
|
|
13182
13949
|
NgTemplateOutlet,
|
|
13183
|
-
|
|
13950
|
+
MngTableColumnValueComponent,
|
|
13184
13951
|
MngClassMapPipe,
|
|
13185
13952
|
MngLocaleDefaultRowClassPipe,
|
|
13186
|
-
MngTableColumnValueComponent,
|
|
13187
13953
|
MngActionComponent,
|
|
13188
13954
|
SkeletonModule,
|
|
13189
13955
|
MultiSelectModule,
|
|
13190
13956
|
ButtonModule,
|
|
13191
13957
|
TooltipModule,
|
|
13192
|
-
FormsModule
|
|
13193
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [style.height]=\"tableFullHeightOffset ? 'calc(100vh - ' + tableFullHeightOffset + 'px)' : null\">\n <!-- MUST NOT use observable for value when using virtual scroll - does not work for some reason -->\n <p-table\n *ngIf=\"!useQueryParams || (useQueryParamsInitialized$ | async)\"\n [value]=\"infiniteScroll ? dataProviderInfiniteScrollItems : (queryResult$ | async)?.pageData ?? []\"\n [dataKey]=\"descriptor?.dataKeyProperty\"\n [lazy]=\"isLazy\"\n [loading]=\"(loading$ | async) ?? false\"\n [paginator]=\"isPagination && !infiniteScroll\"\n [rows]=\"infiniteScroll ? 20 : rows\"\n [first]=\"infiniteScroll ? 0 : offset\"\n [totalRecords]=\"$any(infiniteScroll ? null : (queryResult$ | async)?.allDataCount ?? 0)\"\n [rowsPerPageOptions]=\"infiniteScroll ? undefined : rowsPerPageOptions\"\n [showCurrentPageReport]=\"!infiniteScroll\"\n [currentPageReportTemplate]=\"'mngTable.paginationMsg' | translate\"\n [multiSortMeta]=\"multiSortMeta\"\n [filters]=\"filterMetadata\"\n [globalFilterFields]=\"globalFilterFields\"\n sortMode=\"multiple\"\n [(selection)]=\"selection\"\n (selectionChange)=\"onSelectionChange($event)\"\n [selectionMode]=\"selectionEnabled ? selectionMode : null\"\n [scrollable]=\"true\"\n [virtualScroll]=\"infiniteScroll\"\n [virtualScrollItemSize]=\"rowHeight\"\n scrollHeight=\"flex\"\n [rowHover]=\"descriptor?.hasHover ?? true\"\n [styleClass]=\"className\"\n [resizableColumns]=\"descriptor?.hasResizableColumns ?? false\"\n [columnResizeMode]=\"descriptor?.columnResizeMode ?? 'fit'\"\n [reorderableColumns]=\"areColumnsReorderable\"\n [columns]=\"visibleColumns\"\n (onColResize)=\"onTableColumnResize($event)\"\n (onColReorder)=\"onColumnReorder($event)\"\n (onLazyLoad)=\"onTableLazyLoad($event)\"\n (onSort)=\"onTableSort($event)\"\n (onFilter)=\"onTableFilter($event)\">\n <ng-template *ngIf=\"captionTemplate || captionComponent || descriptor?.title\" pTemplate=\"caption\">\n <ng-container *ngIf=\"captionTemplate; else componentOrDefaultCaption\">\n <ng-container *ngTemplateOutlet=\"captionTemplate\"></ng-container>\n </ng-container>\n <ng-template #componentOrDefaultCaption>\n <div *ngIf=\"captionComponent; else defaultCaption\" [mngComponent]=\"captionComponent\" (instanceCreated)=\"onCaptionCmpInst($event)\"></div>\n <ng-template #defaultCaption>\n <h5 class=\"p-0 m-0\">{{ descriptor?.title }}</h5>\n </ng-template>\n </ng-template>\n </ng-template>\n\n <ng-template pTemplate=\"header\">\n <tr *ngIf=\"!descriptor?.hideHeader\" class=\"mng-table-header\" [class]=\"descriptor?.headerClassName\">\n <th *ngIf=\"selectionEnabled && selectionMode === 'multiple'\" style=\"min-width: 36px\" pFrozenColumn [frozen]=\"descriptor?.selectionColumnFrozen ?? true\">\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\n </th>\n <!-- We need the line below, because otherwise p-tableRadioButton shifts the rest of the columns in table -->\n <th *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"min-width: 36px\" pFrozenColumn [frozen]=\"descriptor?.selectionColumnFrozen ?? true\"></th>\n <ng-container *ngFor=\"let col of columns\">\n <ng-container *ngIf=\"col.isVisible\">\n <ng-template #sortableColumnTHTemplate>\n <div class=\"flex justify-content-between align-items-center\">\n {{ col.descriptor.title ?? (col.descriptor.property | i18nProperty : descriptor!.model) | translate }}\n <p-sortIcon [field]=\"col.descriptor.property\"></p-sortIcon>\n </div>\n </ng-template>\n <ng-template #nonSortableColumnTHTemplate>\n {{ col.descriptor.title ?? (col.descriptor.property | i18nProperty : descriptor!.model) | translate }}\n </ng-template>\n <th\n *ngIf=\"col.descriptor.isReorderable\"\n pResizableColumn\n pReorderableColumn\n [id]=\"col.descriptor.property\"\n [pSortableColumn]=\"col.descriptor.property\"\n [pSortableColumnDisabled]=\"!col.descriptor.isSortEnabled\"\n [style.width]=\"col.width ? col.width + 'px' : col.descriptor.width + '%'\"\n [style.min-width.px]=\"col.descriptor.minWidth\"\n [style.max-width.px]=\"col.width ?? col.descriptor.maxWidth\"\n [class]=\"\n col.descriptor.headerClassName +\n (descriptor?.filterDisplay === filterDisplayRow && hasColumnFilters && col.descriptor.filterDescriptor\n ? ' mng-column-filter-' + col.descriptor.filterDescriptor.filterType\n : '')\n \">\n <ng-container *ngTemplateOutlet=\"col.descriptor.isSortEnabled ? sortableColumnTHTemplate : nonSortableColumnTHTemplate\"></ng-container>\n </th>\n <th\n *ngIf=\"!col.descriptor.isReorderable\"\n pResizableColumn\n [id]=\"col.descriptor.property\"\n [pSortableColumn]=\"col.descriptor.property\"\n [pSortableColumnDisabled]=\"!col.descriptor.isSortEnabled\"\n [style.width]=\"col.width ? col.width + 'px' : col.descriptor.width + '%'\"\n [style.min-width.px]=\"col.descriptor.minWidth\"\n [style.max-width.px]=\"col.width ?? col.descriptor.maxWidth\"\n [class]=\"\n col.descriptor.headerClassName +\n (descriptor?.filterDisplay === filterDisplayRow && hasColumnFilters && col.descriptor.filterDescriptor\n ? ' mng-column-filter-' + col.descriptor.filterDescriptor.filterType\n : '')\n \">\n <ng-container *ngTemplateOutlet=\"col.descriptor.isSortEnabled ? sortableColumnTHTemplate : nonSortableColumnTHTemplate\"></ng-container>\n </th>\n </ng-container>\n </ng-container>\n <th\n *ngIf=\"showInlineActionsColumn || areColumnsToggleable || areColumnsReorderable\"\n [style.min-width.px]=\"columnActionMinWidth\"\n pFrozenColumn\n [frozen]=\"descriptor?.actionColumnFrozen ?? true\"\n alignFrozen=\"right\"\n class=\"text-right\">\n <p-multiSelect\n #columnToggleMultiselect\n *ngIf=\"areColumnsToggleable || areColumnsReorderable || descriptor?.hasResizableColumns\"\n styleClass=\"p-button-primary mng-table-columns-multiselect\"\n appendTo=\"body\"\n optionDisabled=\"disabled\"\n [filter]=\"false\"\n [options]=\"columns\"\n [(ngModel)]=\"visibleColumns\"\n [pTooltip]=\"'mngTable.adjustTable' | translate\"\n tooltipPosition=\"left\"\n defaultLabel=\"\"\n dropdownIcon=\"pi pi-sliders-h\"\n [displaySelectedLabel]=\"false\"\n (onChange)=\"onColumnToggle($event)\">\n <ng-template pTemplate=\"filter\">\n <div class=\"p-checkbox p-component ml-1\" [ngClass]=\"{'p-checkbox-disabled': !areColumnsToggleable}\">\n <div class=\"p-hidden-accessible\">\n <input\n type=\"checkbox\"\n readonly=\"readonly\"\n [checked]=\"columnToggleMultiselect.allChecked\"\n (focus)=\"columnToggleMultiselect.onHeaderCheckboxFocus()\"\n (blur)=\"columnToggleMultiselect.onHeaderCheckboxBlur()\"\n (keydown.space)=\"columnToggleMultiselect.toggleAll($event)\"\n [disabled]=\"!areColumnsToggleable\" />\n </div>\n <div\n class=\"p-checkbox-box\"\n role=\"checkbox\"\n [attr.aria-checked]=\"columnToggleMultiselect.allChecked\"\n [ngClass]=\"{\n 'p-highlight': columnToggleMultiselect.allChecked,\n 'p-focus': columnToggleMultiselect.headerCheckboxFocus,\n 'p-disabled': !areColumnsToggleable\n }\"\n (click)=\"columnToggleMultiselect.toggleAll($event)\">\n <span class=\"p-checkbox-icon\" [ngClass]=\"{'pi pi-check': columnToggleMultiselect.allChecked}\"></span>\n </div>\n </div>\n <p-button\n icon=\"pi pi-replay\"\n styleClass=\"p-button-secondary\"\n [pTooltip]=\"'mngTable.resetLayout' | translate\"\n tooltipPosition=\"left\"\n (click)=\"resetDefaultLayout()\"></p-button>\n </ng-template>\n <ng-template let-item pTemplate=\"item\">\n {{ item.descriptor.title ?? (item.descriptor.property | i18nProperty : descriptor!.model) | translate }}\n </ng-template>\n </p-multiSelect>\n </th>\n </tr>\n <tr *ngIf=\"descriptor?.filterDisplay === filterDisplayRow && hasColumnFilters\" class=\"mng-column-filter-row\">\n <!-- We need the line below, because otherwise p-tableRadioButton shifts the rest of the columns in table -->\n <th *ngIf=\"selectionEnabled\" style=\"min-width: 36px\" pFrozenColumn [frozen]=\"descriptor?.selectionColumnFrozen ?? true\"></th>\n <ng-container *ngFor=\"let col of columns\">\n <th\n *ngIf=\"col.isVisible\"\n [class]=\"\n (col.descriptor.filterDescriptor ? 'mng-column-filter-' + col.descriptor.filterDescriptor.filterType + ' ' : ' ') +\n col.descriptor.filterDescriptor?.columnClassName\n \"\n [style.width.%]=\"col.descriptor.filterDescriptor?.columnWidth ?? col.descriptor.width\"\n [style.min-width.px]=\"col.descriptor.filterDescriptor?.columnMinWidth ?? col.descriptor.minWidth\"\n [style.max-width.px]=\"col.descriptor.maxWidth\">\n <div class=\"flex\" *ngIf=\"col.descriptor.filterDescriptor\">\n <mng-table-column-filter [display]=\"descriptor!.filterDisplay\" [descriptor]=\"col.descriptor.filterDescriptor\"></mng-table-column-filter>\n </div>\n </th>\n </ng-container>\n <th\n *ngIf=\"showInlineActionsColumn || areColumnsToggleable || areColumnsReorderable\"\n [style.min-width.px]=\"columnActionMinWidth\"\n pFrozenColumn\n [frozen]=\"descriptor?.actionColumnFrozen ?? true\"\n alignFrozen=\"right\"></th>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"body\" let-item let-idx=\"rowIndex\">\n <tr\n [style.height.px]=\"rowHeight\"\n [ngClass]=\"descriptor?.rowClassName | mngClassMapPipe : descriptor?.rowClassNameMapFn : item | mngLocaleDefaultRowClass : descriptor : item\">\n <td *ngIf=\"selectionEnabled && selectionMode === 'multiple'\" style=\"min-width: 36px\" pFrozenColumn [frozen]=\"descriptor?.selectionColumnFrozen ?? true\">\n <p-tableCheckbox [value]=\"item\"></p-tableCheckbox>\n </td>\n <td *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"min-width: 36px\" pFrozenColumn [frozen]=\"descriptor?.selectionColumnFrozen ?? true\">\n <p-tableRadioButton [value]=\"item\"></p-tableRadioButton>\n </td>\n <ng-container *ngFor=\"let col of columns\">\n <td\n *ngIf=\"col.isVisible\"\n (click)=\"onCellClick($event, col.descriptor, item, idx)\"\n [class]=\"\n (col.descriptor.className | mngClassMapPipe : col.descriptor.classNameMapFn : item) +\n (descriptor?.filterDisplay === filterDisplayRow && hasColumnFilters && col.descriptor.filterDescriptor\n ? ' mng-column-filter-' + col.descriptor.filterDescriptor.filterType\n : '')\n \"\n [class.clickable]=\"isColumnClickable\"\n [style.width]=\"col.width ? col.width + 'px' : col.descriptor.width + '%'\"\n [style.min-width.px]=\"col.descriptor.minWidth\"\n [style.max-width.px]=\"col.width ?? col.descriptor.maxWidth\">\n <span class=\"p-column-title\">{{ col.descriptor.title ?? (col.descriptor.property | i18nProperty : descriptor!.model) | translate }}</span>\n <mng-table-column-value [descriptor]=\"col.descriptor\" [item]=\"item\"></mng-table-column-value>\n </td>\n </ng-container>\n <td\n *ngIf=\"showInlineActionsColumn || areColumnsToggleable || areColumnsReorderable\"\n class=\"column-action justify-content-end text-right\"\n [style.min-width.px]=\"columnActionMinWidth\"\n pFrozenColumn\n [frozen]=\"descriptor?.actionColumnFrozen ?? true\"\n alignFrozen=\"right\">\n <ng-container *ngIf=\"columnActionTemplate; else showColumnActionComponentOrDefault\">\n <ng-container *ngTemplateOutlet=\"columnActionTemplate; context: {rowItem: item, rowIndex: idx}\"></ng-container>\n </ng-container>\n <ng-template #showColumnActionComponentOrDefault>\n <span\n *ngIf=\"columnActionComponent; else defaultColumnActions\"\n [mngComponent]=\"columnActionComponent!\"\n (instanceCreated)=\"onColumnActionCmpInst($event)\"></span>\n </ng-template>\n <ng-template #defaultColumnActions>\n <mng-action\n *ngFor=\"let action of rowInlineActions\"\n [action]=\"action\"\n [item]=\"item\"\n [viewContainer]=\"viewContainer\"\n [hostComponent]=\"this\"\n [itemId]=\"descriptor?.model?.idPropertyName ? item[descriptor!.model!.idPropertyName!] : null\"\n [actionData]=\"{itemIndex: idx}\"\n (finish)=\"onActionFinish($event)\">\n </mng-action>\n </ng-template>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"loadingicon\">\n <div class=\"flex flex-column align-items-center\">\n <i [class]=\"'text-white text-4xl pi-spin ' + descriptor?.loadingIcon\" *ngIf=\"descriptor?.loadingIcon\"></i>\n <div class=\"text text-white text-lg font-semibold\" [ngClass]=\"{'mt-3': descriptor?.loadingIcon}\" *ngIf=\"descriptor?.loadingText\">\n {{ descriptor?.loadingText ?? '' | translate }}\n </div>\n </div>\n </ng-template>\n\n <ng-template pTemplate=\"loadingbody\">\n <tr [style.height.px]=\"rowHeight\">\n <td [attr.colspan]=\"(descriptor?.columns?.length ?? 0) + (showInlineActionsColumn ? 1 : 0) + (selectionEnabled ? 1 : 0)\">\n <div class=\"loading-text\"></div>\n <p-skeleton [ngStyle]=\"{width: '100%'}\"></p-skeleton>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"emptymessage\">\n <tr [style.height.px]=\"rowHeight\">\n <td [attr.colspan]=\"(descriptor?.columns?.length ?? 0) + (showInlineActionsColumn ? 1 : 0) + (selectionEnabled ? 1 : 0)\">\n {{ 'mngTable.noItems' | translate }}\n </td>\n </tr>\n </ng-template>\n\n <ng-template *ngIf=\"footerTemplate\" pTemplate=\"summary\">\n <ng-container [ngTemplateOutlet]=\"footerTemplate\" [ngTemplateOutletContext]=\"{queryResult: queryResult}\"></ng-container>\n </ng-template>\n </p-table>\n</div>\n" }]
|
|
13958
|
+
FormsModule,
|
|
13959
|
+
MngTableColumnFilterFullComponent,
|
|
13960
|
+
MngTableColumnFilterComponent
|
|
13961
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [style.height]=\"tableFullHeightOffset ? 'calc(100vh - ' + tableFullHeightOffset + 'px)' : null\">\n <!-- MUST NOT use observable for value when using virtual scroll - does not work for some reason -->\n <p-table\n *ngIf=\"!useQueryParams || (useQueryParamsInitialized$ | async)\"\n [value]=\"infiniteScroll ? dataProviderInfiniteScrollItems : (queryResult$ | async)?.pageData ?? []\"\n [dataKey]=\"descriptor?.dataKeyProperty\"\n [lazy]=\"isLazy\"\n [loading]=\"(loading$ | async) ?? false\"\n [paginator]=\"isPagination && !infiniteScroll\"\n [rows]=\"infiniteScroll ? 20 : rows\"\n [first]=\"infiniteScroll ? 0 : offset\"\n [totalRecords]=\"$any(infiniteScroll ? null : (queryResult$ | async)?.allDataCount ?? 0)\"\n [rowsPerPageOptions]=\"infiniteScroll ? undefined : rowsPerPageOptions\"\n [showCurrentPageReport]=\"!infiniteScroll\"\n [currentPageReportTemplate]=\"'mngTable.paginationMsg' | translate\"\n [multiSortMeta]=\"multiSortMeta\"\n [filters]=\"filterMetadata\"\n [globalFilterFields]=\"globalFilterFields\"\n sortMode=\"multiple\"\n [(selection)]=\"selection\"\n (selectionChange)=\"onSelectionChange($event)\"\n [selectionMode]=\"selectionEnabled ? selectionMode : null\"\n [scrollable]=\"true\"\n [virtualScroll]=\"infiniteScroll\"\n [virtualScrollItemSize]=\"rowHeight\"\n scrollHeight=\"flex\"\n [rowHover]=\"descriptor?.hasHover ?? true\"\n [styleClass]=\"className\"\n [resizableColumns]=\"descriptor?.hasResizableColumns ?? false\"\n [columnResizeMode]=\"descriptor?.columnResizeMode ?? 'fit'\"\n [reorderableColumns]=\"areColumnsReorderable\"\n [columns]=\"visibleColumns\"\n (onColResize)=\"onTableColumnResize($event)\"\n (onColReorder)=\"onColumnReorder($event)\"\n (onLazyLoad)=\"onTableLazyLoad($event)\"\n (onSort)=\"onTableSort($event)\"\n (onFilter)=\"onTableFilter($event)\">\n <ng-template *ngIf=\"captionTemplate || captionComponent || descriptor?.title\" pTemplate=\"caption\">\n <ng-container *ngIf=\"captionTemplate; else componentOrDefaultCaption\">\n <ng-container *ngTemplateOutlet=\"captionTemplate\"></ng-container>\n </ng-container>\n <ng-template #componentOrDefaultCaption>\n <div *ngIf=\"captionComponent; else defaultCaption\" [mngComponent]=\"captionComponent\" (instanceCreated)=\"onCaptionCmpInst($event)\"></div>\n <ng-template #defaultCaption>\n <h5 class=\"p-0 m-0\">{{ descriptor?.title }}</h5>\n </ng-template>\n </ng-template>\n </ng-template>\n\n <ng-template pTemplate=\"header\">\n <tr *ngIf=\"!descriptor?.hideHeader\" class=\"mng-table-header\" [class]=\"descriptor?.headerClassName\">\n <th *ngIf=\"selectionEnabled && selectionMode === 'multiple'\" style=\"min-width: 36px\" pFrozenColumn [frozen]=\"descriptor?.selectionColumnFrozen ?? true\">\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\n </th>\n <!-- We need the line below, because otherwise p-tableRadioButton shifts the rest of the columns in table -->\n <th *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"min-width: 36px\" pFrozenColumn [frozen]=\"descriptor?.selectionColumnFrozen ?? true\"></th>\n <ng-container *ngFor=\"let col of columns\">\n <ng-container *ngIf=\"col.isVisible\">\n <ng-template #sortableColumnTHTemplate>\n <div class=\"flex justify-content-between align-items-center\">\n {{ col.descriptor.title ?? (col.descriptor.property | i18nProperty : descriptor!.model) | translate }}\n <p-sortIcon [field]=\"col.descriptor.property\"></p-sortIcon>\n </div>\n </ng-template>\n <ng-template #nonSortableColumnTHTemplate>\n {{ col.descriptor.title ?? (col.descriptor.property | i18nProperty : descriptor!.model) | translate }}\n </ng-template>\n <th\n *ngIf=\"col.descriptor.isReorderable\"\n pResizableColumn\n pReorderableColumn\n [id]=\"col.descriptor.property\"\n [pSortableColumn]=\"col.descriptor.property\"\n [pSortableColumnDisabled]=\"!col.descriptor.isSortEnabled\"\n [style.width]=\"col.width ? col.width + 'px' : col.descriptor.width + '%'\"\n [style.min-width.px]=\"col.descriptor.minWidth\"\n [style.max-width.px]=\"col.width ?? col.descriptor.maxWidth\"\n [class]=\"\n col.descriptor.headerClassName +\n (hasColumnFilters && col.descriptor.filterDescriptor ? ' mng-column-filter-' + col.descriptor.filterDescriptor.filterType : '')\n \">\n <ng-container *ngTemplateOutlet=\"col.descriptor.isSortEnabled ? sortableColumnTHTemplate : nonSortableColumnTHTemplate\"></ng-container>\n </th>\n <th\n *ngIf=\"!col.descriptor.isReorderable\"\n pResizableColumn\n [id]=\"col.descriptor.property\"\n [pSortableColumn]=\"col.descriptor.property\"\n [pSortableColumnDisabled]=\"!col.descriptor.isSortEnabled\"\n [style.width]=\"col.width ? col.width + 'px' : col.descriptor.width + '%'\"\n [style.min-width.px]=\"col.descriptor.minWidth\"\n [style.max-width.px]=\"col.width ?? col.descriptor.maxWidth\"\n [class]=\"\n col.descriptor.headerClassName +\n (hasColumnFilters && col.descriptor.filterDescriptor ? ' mng-column-filter-' + col.descriptor.filterDescriptor.filterType : '')\n \">\n <ng-container *ngTemplateOutlet=\"col.descriptor.isSortEnabled ? sortableColumnTHTemplate : nonSortableColumnTHTemplate\"></ng-container>\n </th>\n </ng-container>\n </ng-container>\n <th\n *ngIf=\"showInlineActionsColumn || areColumnsToggleable || areColumnsReorderable\"\n [style.min-width.px]=\"columnActionMinWidth\"\n pFrozenColumn\n [frozen]=\"descriptor?.actionColumnFrozen ?? true\"\n alignFrozen=\"right\"\n class=\"text-right\">\n <p-multiSelect\n #columnToggleMultiselect\n *ngIf=\"areColumnsToggleable || areColumnsReorderable || descriptor?.hasResizableColumns\"\n styleClass=\"p-button-primary mng-table-columns-multiselect\"\n appendTo=\"body\"\n optionDisabled=\"disabled\"\n [filter]=\"false\"\n [options]=\"columns\"\n [(ngModel)]=\"visibleColumns\"\n [pTooltip]=\"'mngTable.adjustTable' | translate\"\n tooltipPosition=\"left\"\n placeholder=\"\"\n dropdownIcon=\"pi pi-sliders-h\"\n [displaySelectedLabel]=\"false\"\n (onChange)=\"onColumnToggle($event)\">\n <ng-template pTemplate=\"filter\">\n <div class=\"p-checkbox p-component ml-1\" [ngClass]=\"{'p-checkbox-disabled': !areColumnsToggleable}\">\n <div class=\"p-hidden-accessible\">\n <input\n type=\"checkbox\"\n readonly=\"readonly\"\n [checked]=\"columnToggleMultiselect.allSelected\"\n (focus)=\"columnToggleMultiselect.onHeaderCheckboxFocus()\"\n (blur)=\"columnToggleMultiselect.onHeaderCheckboxBlur()\"\n (keydown.space)=\"columnToggleMultiselect.onToggleAll($event)\"\n [disabled]=\"!areColumnsToggleable\" />\n </div>\n <div\n class=\"p-checkbox-box\"\n role=\"checkbox\"\n [attr.aria-checked]=\"columnToggleMultiselect.allSelected\"\n [ngClass]=\"{\n 'p-highlight': columnToggleMultiselect.allSelected,\n 'p-focus': columnToggleMultiselect.headerCheckboxFocus,\n 'p-disabled': !areColumnsToggleable\n }\"\n (click)=\"columnToggleMultiselect.onToggleAll($event)\">\n <span class=\"p-checkbox-icon\" [ngClass]=\"{'pi pi-check': columnToggleMultiselect.allSelected}\"></span>\n </div>\n </div>\n <p-button\n icon=\"pi pi-replay\"\n styleClass=\"p-button-secondary\"\n [pTooltip]=\"'mngTable.resetLayout' | translate\"\n tooltipPosition=\"left\"\n (click)=\"resetDefaultLayout()\"></p-button>\n </ng-template>\n <ng-template let-item pTemplate=\"item\">\n {{ item.descriptor.title ?? (item.descriptor.property | i18nProperty : descriptor!.model) | translate }}\n </ng-template>\n </p-multiSelect>\n </th>\n </tr>\n <tr *ngIf=\"hasColumnFilters\" class=\"mng-column-filter-row\">\n <!-- We need the line below, because otherwise p-tableRadioButton shifts the rest of the columns in table -->\n <th *ngIf=\"selectionEnabled\" style=\"min-width: 36px\" pFrozenColumn [frozen]=\"descriptor?.selectionColumnFrozen ?? true\"></th>\n <ng-container *ngFor=\"let col of columns\">\n <th\n *ngIf=\"col.isVisible\"\n [class]=\"\n (col.descriptor.filterDescriptor ? 'mng-column-filter-' + col.descriptor.filterDescriptor.filterType + ' ' : ' ') +\n col.descriptor.filterDescriptor?.columnClassName\n \"\n [style.width.%]=\"col.descriptor.filterDescriptor?.columnWidth ?? col.descriptor.width\"\n [style.min-width.px]=\"col.descriptor.filterDescriptor?.columnMinWidth ?? col.descriptor.minWidth\"\n [style.max-width.px]=\"col.descriptor.maxWidth\">\n <div class=\"flex\" *ngIf=\"col.descriptor.filterDescriptor\">\n <mng-table-column-filter-full\n *ngIf=\"!descriptor?.deprecatedFilters; else deprecatedFilters\"\n [descriptor]=\"col.descriptor.filterDescriptor\"></mng-table-column-filter-full>\n <ng-template #deprecatedFilters>\n <mng-table-column-filter [descriptor]=\"col.descriptor.filterDescriptor\"></mng-table-column-filter>\n </ng-template>\n </div>\n </th>\n </ng-container>\n <th\n *ngIf=\"showInlineActionsColumn || areColumnsToggleable || areColumnsReorderable\"\n [style.min-width.px]=\"columnActionMinWidth\"\n pFrozenColumn\n [frozen]=\"descriptor?.actionColumnFrozen ?? true\"\n alignFrozen=\"right\"></th>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"body\" let-item let-idx=\"rowIndex\">\n <tr\n [style.height.px]=\"rowHeight\"\n [ngClass]=\"descriptor?.rowClassName | mngClassMapPipe : descriptor?.rowClassNameMapFn : item | mngLocaleDefaultRowClass : descriptor : item\">\n <td *ngIf=\"selectionEnabled && selectionMode === 'multiple'\" style=\"min-width: 36px\" pFrozenColumn [frozen]=\"descriptor?.selectionColumnFrozen ?? true\">\n <p-tableCheckbox [value]=\"item\"></p-tableCheckbox>\n </td>\n <td *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"min-width: 36px\" pFrozenColumn [frozen]=\"descriptor?.selectionColumnFrozen ?? true\">\n <p-tableRadioButton [value]=\"item\"></p-tableRadioButton>\n </td>\n <ng-container *ngFor=\"let col of columns\">\n <td\n *ngIf=\"col.isVisible\"\n (click)=\"onCellClick($event, col.descriptor, item, idx)\"\n [class]=\"\n (col.descriptor.className | mngClassMapPipe : col.descriptor.classNameMapFn : item) +\n (hasColumnFilters && col.descriptor.filterDescriptor ? ' mng-column-filter-' + col.descriptor.filterDescriptor.filterType : '')\n \"\n [class.clickable]=\"isColumnClickable\"\n [style.width]=\"col.width ? col.width + 'px' : col.descriptor.width + '%'\"\n [style.min-width.px]=\"col.descriptor.minWidth\"\n [style.max-width.px]=\"col.width ?? col.descriptor.maxWidth\">\n <span class=\"p-column-title\">{{ col.descriptor.title ?? (col.descriptor.property | i18nProperty : descriptor!.model) | translate }}</span>\n <mng-table-column-value [descriptor]=\"col.descriptor\" [item]=\"item\"></mng-table-column-value>\n </td>\n </ng-container>\n <td\n *ngIf=\"showInlineActionsColumn || areColumnsToggleable || areColumnsReorderable\"\n class=\"column-action justify-content-end text-right\"\n [style.min-width.px]=\"columnActionMinWidth\"\n pFrozenColumn\n [frozen]=\"descriptor?.actionColumnFrozen ?? true\"\n alignFrozen=\"right\">\n <ng-container *ngIf=\"columnActionTemplate; else showColumnActionComponentOrDefault\">\n <ng-container *ngTemplateOutlet=\"columnActionTemplate; context: {rowItem: item, rowIndex: idx}\"></ng-container>\n </ng-container>\n <ng-template #showColumnActionComponentOrDefault>\n <span\n *ngIf=\"columnActionComponent; else defaultColumnActions\"\n [mngComponent]=\"columnActionComponent!\"\n (instanceCreated)=\"onColumnActionCmpInst($event)\"></span>\n </ng-template>\n <ng-template #defaultColumnActions>\n <mng-action\n *ngFor=\"let action of rowInlineActions\"\n [action]=\"action\"\n [item]=\"item\"\n [viewContainer]=\"viewContainer\"\n [hostComponent]=\"this\"\n [itemId]=\"descriptor?.model?.idPropertyName ? item[descriptor!.model!.idPropertyName!] : null\"\n [actionData]=\"{itemIndex: idx}\"\n (finish)=\"onActionFinish($event)\">\n </mng-action>\n </ng-template>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"loadingicon\">\n <div class=\"flex flex-column align-items-center\">\n <i [class]=\"'text-white text-4xl pi-spin ' + descriptor?.loadingIcon\" *ngIf=\"descriptor?.loadingIcon\"></i>\n <div class=\"text text-white text-lg font-semibold\" [ngClass]=\"{'mt-3': descriptor?.loadingIcon}\" *ngIf=\"descriptor?.loadingText\">\n {{ descriptor?.loadingText ?? '' | translate }}\n </div>\n </div>\n </ng-template>\n\n <ng-template pTemplate=\"loadingbody\">\n <tr [style.height.px]=\"rowHeight\">\n <td [attr.colspan]=\"(descriptor?.columns?.length ?? 0) + (showInlineActionsColumn ? 1 : 0) + (selectionEnabled ? 1 : 0)\">\n <div class=\"loading-text\"></div>\n <p-skeleton [ngStyle]=\"{width: '100%'}\"></p-skeleton>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"emptymessage\">\n <tr [style.height.px]=\"rowHeight\">\n <td [attr.colspan]=\"(descriptor?.columns?.length ?? 0) + (showInlineActionsColumn ? 1 : 0) + (selectionEnabled ? 1 : 0)\">\n {{ 'mngTable.noItems' | translate }}\n </td>\n </tr>\n </ng-template>\n\n <ng-template *ngIf=\"footerTemplate\" pTemplate=\"summary\">\n <ng-container [ngTemplateOutlet]=\"footerTemplate\" [ngTemplateOutletContext]=\"{queryResult: queryResult}\"></ng-container>\n </ng-template>\n </p-table>\n</div>\n" }]
|
|
13194
13962
|
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.TranslateService }, { type: MngCommonsService }, { type: MngActionExecutorService }, { type: MngViewContainerComponentService, decorators: [{
|
|
13195
13963
|
type: Optional
|
|
13196
13964
|
}] }, { type: MngLocalStorageService }]; }, propDecorators: { initialDescriptor: [{
|
|
@@ -13345,7 +14113,7 @@ class MngTableviewComponent {
|
|
|
13345
14113
|
}
|
|
13346
14114
|
}
|
|
13347
14115
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngTableviewComponent, deps: [{ token: i1$2.MessageService }, { token: MngViewContainerComponentService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
13348
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MngTableviewComponent, isStandalone: true, selector: "mng-tableview", inputs: { descriptor: "descriptor", dataProvider: "dataProvider", actions: "actions" }, providers: [MessageService, ConfirmationService, MngViewContainerComponentService], queries: [{ propertyName: "templates", predicate: MngTemplateDirective }], viewQueries: [{ propertyName: "tableComponent", first: true, predicate: MngTableComponent, descendants: true }], ngImport: i0, template: "<div class=\"mng-tableview\">\n <p-toast>\n <ng-template let-message pTemplate=\"message\">\n <span [class]=\"'p-toast-message-icon pi ' + getNotificationIconClass(message)\"></span>\n <div class=\"p-toast-message-text\">\n <div class=\"p-toast-summary\">{{ message.summary }}</div>\n <div class=\"p-toast-detail\">{{ message.detail.slice(0, notificationCutoff) + (message.detail.length > notificationCutoff ? '...' : '') }}</div>\n <div\n *ngIf=\"message.detail.length > notificationCutoff\"\n (click)=\"onShowNotificationInDialog(message)\"\n class=\"p-link font-semibold text-sm mt-2 flex align-items-center\">\n <i class=\"pi pi-chevron-down mr-1\"></i>{{ 'notification.details' | translate }}\n </div>\n </div>\n </ng-template>\n </p-toast>\n <p-dialog\n [(visible)]=\"isDialogNotificationVisible\"\n [styleClass]=\"'p-fluid mng-dialog mng-dialog-xs ' + 'mng-message-detail-dialog mng-message-detail-dialog-' + (dialogNotification?.severity ?? '')\">\n <ng-template pTemplate=\"header\">\n <span class=\"p-dialog-title font-bold mng-dialog-success\">\n <span [class]=\"'mr-2 pi ' + getNotificationIconClass(dialogNotification)\"></span>\n {{ dialogNotification?.summary ?? '' }}\n </span>\n </ng-template>\n <div>\n {{ dialogNotification?.detail ?? '' }}\n </div>\n </p-dialog>\n\n <div class=\"card\">\n <p-toolbar styleClass=\"mb-4\" *ngIf=\"toolbarLeftActions.length > 0 || toolbarRightActions.length > 0\">\n <ng-template pTemplate=\"left\">\n <mng-action\n *ngFor=\"let action of toolbarLeftActions\"\n [action]=\"action\"\n [queryParam]=\"tableQueryParam\"\n [hostComponent]=\"this\"\n [selectedItems]=\"selectedItems\"></mng-action>\n </ng-template>\n\n <ng-template pTemplate=\"right\">\n <mng-action\n *ngFor=\"let action of toolbarRightActions\"\n [action]=\"action\"\n [queryParam]=\"tableQueryParam\"\n [hostComponent]=\"this\"\n [selectedItems]=\"selectedItems\"></mng-action>\n </ng-template>\n </p-toolbar>\n\n <mng-table\n [descriptor]=\"descriptor.table\"\n [dataProvider]=\"dataProvider\"\n [useQueryParams]=\"true\"\n [actions]=\"tableActions\"\n [selectionEnabled]=\"hasItemSelectionAction\"\n [selectionMode]=\"'multiple'\"\n (tableLoad)=\"onTableLoad($event)\"\n (selectionChange)=\"selectionChange($event)\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-between table-header\">\n <h5 class=\"p-0 m-0\">{{ descriptor.tableTitle ?? '' | translate }}</h5>\n </div>\n </ng-template>\n\n <ng-template let-queryResult=\"queryResult\" mngTemplate=\"footer\">\n <ng-container *ngIf=\"footerTemplate\" [ngTemplateOutlet]=\"footerTemplate\" [ngTemplateOutletContext]=\"{queryResult: queryResult}\"></ng-container>\n </ng-template>\n </mng-table>\n </div>\n\n <router-outlet></router-outlet>\n</div>\n", dependencies: [{ kind: "ngmodule", type: ToastModule }, { kind: "component", type: i3$3.Toast, selector: "p-toast", inputs: ["key", "autoZIndex", "baseZIndex", "life", "style", "styleClass", "position", "preventOpenDuplicates", "preventDuplicates", "showTransformOptions", "hideTransformOptions", "showTransitionOptions", "hideTransitionOptions", "breakpoints"], outputs: ["onClose"] }, { kind: "directive", type: i1$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i4$
|
|
14116
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MngTableviewComponent, isStandalone: true, selector: "mng-tableview", inputs: { descriptor: "descriptor", dataProvider: "dataProvider", actions: "actions" }, providers: [MessageService, ConfirmationService, MngViewContainerComponentService], queries: [{ propertyName: "templates", predicate: MngTemplateDirective }], viewQueries: [{ propertyName: "tableComponent", first: true, predicate: MngTableComponent, descendants: true }], ngImport: i0, template: "<div class=\"mng-tableview\">\n <p-toast>\n <ng-template let-message pTemplate=\"message\">\n <span [class]=\"'p-toast-message-icon pi ' + getNotificationIconClass(message)\"></span>\n <div class=\"p-toast-message-text\">\n <div class=\"p-toast-summary\">{{ message.summary }}</div>\n <div class=\"p-toast-detail\">{{ message.detail.slice(0, notificationCutoff) + (message.detail.length > notificationCutoff ? '...' : '') }}</div>\n <div\n *ngIf=\"message.detail.length > notificationCutoff\"\n (click)=\"onShowNotificationInDialog(message)\"\n class=\"p-link font-semibold text-sm mt-2 flex align-items-center\">\n <i class=\"pi pi-chevron-down mr-1\"></i>{{ 'notification.details' | translate }}\n </div>\n </div>\n </ng-template>\n </p-toast>\n <p-dialog\n [(visible)]=\"isDialogNotificationVisible\"\n [styleClass]=\"'p-fluid mng-dialog mng-dialog-xs ' + 'mng-message-detail-dialog mng-message-detail-dialog-' + (dialogNotification?.severity ?? '')\">\n <ng-template pTemplate=\"header\" mngDialogKeydownHandler>\n <span class=\"p-dialog-title font-bold mng-dialog-success\">\n <span [class]=\"'mr-2 pi ' + getNotificationIconClass(dialogNotification)\"></span>\n {{ dialogNotification?.summary ?? '' }}\n </span>\n </ng-template>\n <div>\n {{ dialogNotification?.detail ?? '' }}\n </div>\n </p-dialog>\n\n <div class=\"card\">\n <p-toolbar styleClass=\"mb-4\" *ngIf=\"toolbarLeftActions.length > 0 || toolbarRightActions.length > 0\">\n <ng-template pTemplate=\"left\">\n <mng-action\n *ngFor=\"let action of toolbarLeftActions\"\n [action]=\"action\"\n [queryParam]=\"tableQueryParam\"\n [hostComponent]=\"this\"\n [selectedItems]=\"selectedItems\"></mng-action>\n </ng-template>\n\n <ng-template pTemplate=\"right\">\n <mng-action\n *ngFor=\"let action of toolbarRightActions\"\n [action]=\"action\"\n [queryParam]=\"tableQueryParam\"\n [hostComponent]=\"this\"\n [selectedItems]=\"selectedItems\"></mng-action>\n </ng-template>\n </p-toolbar>\n\n <mng-table\n [descriptor]=\"descriptor.table\"\n [dataProvider]=\"dataProvider\"\n [useQueryParams]=\"true\"\n [actions]=\"tableActions\"\n [selectionEnabled]=\"hasItemSelectionAction\"\n [selectionMode]=\"'multiple'\"\n (tableLoad)=\"onTableLoad($event)\"\n (selectionChange)=\"selectionChange($event)\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-between table-header\">\n <h5 class=\"p-0 m-0\">{{ descriptor.tableTitle ?? '' | translate }}</h5>\n </div>\n </ng-template>\n\n <ng-template let-queryResult=\"queryResult\" mngTemplate=\"footer\">\n <ng-container *ngIf=\"footerTemplate\" [ngTemplateOutlet]=\"footerTemplate\" [ngTemplateOutletContext]=\"{queryResult: queryResult}\"></ng-container>\n </ng-template>\n </mng-table>\n </div>\n\n <router-outlet></router-outlet>\n</div>\n", dependencies: [{ kind: "ngmodule", type: ToastModule }, { kind: "component", type: i3$3.Toast, selector: "p-toast", inputs: ["key", "autoZIndex", "baseZIndex", "life", "style", "styleClass", "position", "preventOpenDuplicates", "preventDuplicates", "showTransformOptions", "hideTransformOptions", "showTransitionOptions", "hideTransitionOptions", "breakpoints"], outputs: ["onClose"] }, { kind: "directive", type: i1$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i4$5.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "ngmodule", type: ToolbarModule }, { kind: "component", type: i6$2.Toolbar, selector: "p-toolbar", inputs: ["style", "styleClass", "ariaLabelledBy"] }, { kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: MngActionComponent, selector: "mng-action", inputs: ["action", "item", "itemId", "actionData", "queryParam", "dataProvider", "hostComponent", "route", "disabled", "loading", "viewContainer", "selectedItems"], outputs: ["finish"] }, { kind: "component", type: MngTableComponent, selector: "mng-table", inputs: ["descriptor", "items", "queryResult", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "actions", "isColumnClickable", "viewContainer", "captionComponent", "columnActionComponent", "columnActionMinWidth", "globalFilterFields"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnActionComponentInstance"] }, { kind: "directive", type: MngTemplateDirective, selector: "[mngTemplate]", inputs: ["type", "mngTemplate"] }, { kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "directive", type: MngDialogKeydownHandlerDirective, selector: "[mngDialogKeydownHandler]" }] }); }
|
|
13349
14117
|
}
|
|
13350
14118
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngTableviewComponent, decorators: [{
|
|
13351
14119
|
type: Component,
|
|
@@ -13360,8 +14128,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImpor
|
|
|
13360
14128
|
MngActionComponent,
|
|
13361
14129
|
MngTableComponent,
|
|
13362
14130
|
MngTemplateDirective,
|
|
13363
|
-
RouterOutlet
|
|
13364
|
-
|
|
14131
|
+
RouterOutlet,
|
|
14132
|
+
MngDialogKeydownHandlerDirective
|
|
14133
|
+
], providers: [MessageService, ConfirmationService, MngViewContainerComponentService], template: "<div class=\"mng-tableview\">\n <p-toast>\n <ng-template let-message pTemplate=\"message\">\n <span [class]=\"'p-toast-message-icon pi ' + getNotificationIconClass(message)\"></span>\n <div class=\"p-toast-message-text\">\n <div class=\"p-toast-summary\">{{ message.summary }}</div>\n <div class=\"p-toast-detail\">{{ message.detail.slice(0, notificationCutoff) + (message.detail.length > notificationCutoff ? '...' : '') }}</div>\n <div\n *ngIf=\"message.detail.length > notificationCutoff\"\n (click)=\"onShowNotificationInDialog(message)\"\n class=\"p-link font-semibold text-sm mt-2 flex align-items-center\">\n <i class=\"pi pi-chevron-down mr-1\"></i>{{ 'notification.details' | translate }}\n </div>\n </div>\n </ng-template>\n </p-toast>\n <p-dialog\n [(visible)]=\"isDialogNotificationVisible\"\n [styleClass]=\"'p-fluid mng-dialog mng-dialog-xs ' + 'mng-message-detail-dialog mng-message-detail-dialog-' + (dialogNotification?.severity ?? '')\">\n <ng-template pTemplate=\"header\" mngDialogKeydownHandler>\n <span class=\"p-dialog-title font-bold mng-dialog-success\">\n <span [class]=\"'mr-2 pi ' + getNotificationIconClass(dialogNotification)\"></span>\n {{ dialogNotification?.summary ?? '' }}\n </span>\n </ng-template>\n <div>\n {{ dialogNotification?.detail ?? '' }}\n </div>\n </p-dialog>\n\n <div class=\"card\">\n <p-toolbar styleClass=\"mb-4\" *ngIf=\"toolbarLeftActions.length > 0 || toolbarRightActions.length > 0\">\n <ng-template pTemplate=\"left\">\n <mng-action\n *ngFor=\"let action of toolbarLeftActions\"\n [action]=\"action\"\n [queryParam]=\"tableQueryParam\"\n [hostComponent]=\"this\"\n [selectedItems]=\"selectedItems\"></mng-action>\n </ng-template>\n\n <ng-template pTemplate=\"right\">\n <mng-action\n *ngFor=\"let action of toolbarRightActions\"\n [action]=\"action\"\n [queryParam]=\"tableQueryParam\"\n [hostComponent]=\"this\"\n [selectedItems]=\"selectedItems\"></mng-action>\n </ng-template>\n </p-toolbar>\n\n <mng-table\n [descriptor]=\"descriptor.table\"\n [dataProvider]=\"dataProvider\"\n [useQueryParams]=\"true\"\n [actions]=\"tableActions\"\n [selectionEnabled]=\"hasItemSelectionAction\"\n [selectionMode]=\"'multiple'\"\n (tableLoad)=\"onTableLoad($event)\"\n (selectionChange)=\"selectionChange($event)\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-column md:flex-row md:justify-content-between table-header\">\n <h5 class=\"p-0 m-0\">{{ descriptor.tableTitle ?? '' | translate }}</h5>\n </div>\n </ng-template>\n\n <ng-template let-queryResult=\"queryResult\" mngTemplate=\"footer\">\n <ng-container *ngIf=\"footerTemplate\" [ngTemplateOutlet]=\"footerTemplate\" [ngTemplateOutletContext]=\"{queryResult: queryResult}\"></ng-container>\n </ng-template>\n </mng-table>\n </div>\n\n <router-outlet></router-outlet>\n</div>\n" }]
|
|
13365
14134
|
}], ctorParameters: function () { return [{ type: i1$2.MessageService }, { type: MngViewContainerComponentService }]; }, propDecorators: { descriptor: [{
|
|
13366
14135
|
type: Input,
|
|
13367
14136
|
args: [{ required: true }]
|
|
@@ -13734,11 +14503,24 @@ class MngFormlyFieldLookupDialogComponent extends FieldType {
|
|
|
13734
14503
|
}
|
|
13735
14504
|
}
|
|
13736
14505
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngFormlyFieldLookupDialogComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
13737
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MngFormlyFieldLookupDialogComponent, isStandalone: true, selector: "mng-formly-field-lookup-dialog", viewQueries: [{ propertyName: "mngTable", first: true, predicate: MngTableComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div [class]=\"'p-inputgroup mng-dropdown-dialog' + descriptor.inputClassName\" [class.p-inputtext-sm]=\"descriptor.isSizeSmall\" [class.p-inputtext-lg]=\"descriptor.isSizeLarge\">\n <input pInputText type=\"text\" [id]=\"$any(key)\" [readonly]=\"true\" [formlyAttributes]=\"field\" [formControl]=\"fieldLabelFormControl\" />\n <i class=\"mng-dropdown-clear-icon pi pi-times\" (click)=\"clear()\" *ngIf=\"!props.required && formControl?.value && !formControl?.disabled\"></i>\n <button\n pButton\n pRipple\n class=\"mng-dropdown-dialog-search-button\"\n type=\"button\"\n [label]=\"'general.search' | translate : {item: ''}\"\n [disabled]=\"formControl.disabled\"\n (click)=\"openSelectDialog()\"></button>\n</div>\n\n<p-dialog\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.search' | translate : {item: props.label!}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-dialog mng-formly-field-lookup-dialog\">\n <ng-template pTemplate=\"content\">\n <mng-table\n [descriptor]=\"descriptor.dialogTableDescriptor!\"\n [dataProvider]=\"descriptor.dialogTableDataProvider\"\n [queryResult]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [selectionMode]=\"'single'\"\n [loading]=\"dialogIsLoading$\"\n [captionComponent]=\"config.table?.captionComponent\"\n [columnActionComponent]=\"config.table?.columnActionComponent\"\n [viewContainer]=\"viewContainer\"\n (selectionChange)=\"onSelectionChange($event)\"\n (captionComponentInstance)=\"onCaptionCmpInst($event)\"\n (columnActionComponentInstance)=\"onColumnActionCmpInst($event)\">\n </mng-table>\n <p-messages [value]=\"dialogMessages\"></p-messages>\n </ng-template>\n\n <ng-template pTemplate=\"footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.select' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-text\"\n (click)=\"addItem()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n loadingIcon=\"pi pi-spin pi-spinner\"\n [disabled]=\"form.disabled\"></button>\n </ng-template>\n</p-dialog>\n", dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i2$2.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i6.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "directive", type: i1$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i6$1.Ripple, selector: "[pRipple]" }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i4$
|
|
14506
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MngFormlyFieldLookupDialogComponent, isStandalone: true, selector: "mng-formly-field-lookup-dialog", viewQueries: [{ propertyName: "mngTable", first: true, predicate: MngTableComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div [class]=\"'p-inputgroup mng-dropdown-dialog' + descriptor.inputClassName\" [class.p-inputtext-sm]=\"descriptor.isSizeSmall\" [class.p-inputtext-lg]=\"descriptor.isSizeLarge\">\n <input pInputText type=\"text\" [id]=\"$any(key)\" [readonly]=\"true\" [formlyAttributes]=\"field\" [formControl]=\"fieldLabelFormControl\" />\n <i class=\"mng-dropdown-clear-icon pi pi-times\" (click)=\"clear()\" *ngIf=\"!props.required && formControl?.value && !formControl?.disabled\"></i>\n <button\n pButton\n pRipple\n class=\"mng-dropdown-dialog-search-button\"\n type=\"button\"\n [label]=\"'general.search' | translate : {item: ''}\"\n [disabled]=\"formControl.disabled\"\n (click)=\"openSelectDialog()\"></button>\n</div>\n\n<p-dialog\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.search' | translate : {item: props.label!}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-dialog mng-formly-field-lookup-dialog\">\n <ng-template pTemplate=\"content\" mngDialogKeydownHandler>\n <mng-table\n [descriptor]=\"descriptor.dialogTableDescriptor!\"\n [dataProvider]=\"descriptor.dialogTableDataProvider\"\n [queryResult]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [selectionMode]=\"'single'\"\n [loading]=\"dialogIsLoading$\"\n [captionComponent]=\"config.table?.captionComponent\"\n [columnActionComponent]=\"config.table?.columnActionComponent\"\n [viewContainer]=\"viewContainer\"\n (selectionChange)=\"onSelectionChange($event)\"\n (captionComponentInstance)=\"onCaptionCmpInst($event)\"\n (columnActionComponentInstance)=\"onColumnActionCmpInst($event)\">\n </mng-table>\n <p-messages [value]=\"dialogMessages\"></p-messages>\n </ng-template>\n\n <ng-template pTemplate=\"footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.select' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-text\"\n (click)=\"addItem()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n loadingIcon=\"pi pi-spin pi-spinner\"\n [disabled]=\"form.disabled\"></button>\n </ng-template>\n</p-dialog>\n", dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i2$2.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i6.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "directive", type: i1$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i6$1.Ripple, selector: "[pRipple]" }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i4$5.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: MngTableComponent, selector: "mng-table", inputs: ["descriptor", "items", "queryResult", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "actions", "isColumnClickable", "viewContainer", "captionComponent", "columnActionComponent", "columnActionMinWidth", "globalFilterFields"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnActionComponentInstance"] }, { kind: "ngmodule", type: MessagesModule }, { kind: "component", type: i5.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i6$4.InputText, selector: "[pInputText]" }, { kind: "directive", type: MngDialogKeydownHandlerDirective, selector: "[mngDialogKeydownHandler]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
13738
14507
|
}
|
|
13739
14508
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngFormlyFieldLookupDialogComponent, decorators: [{
|
|
13740
14509
|
type: Component,
|
|
13741
|
-
args: [{ standalone: true, selector: 'mng-formly-field-lookup-dialog', imports: [
|
|
14510
|
+
args: [{ standalone: true, selector: 'mng-formly-field-lookup-dialog', imports: [
|
|
14511
|
+
TranslateModule,
|
|
14512
|
+
FormlyModule,
|
|
14513
|
+
ReactiveFormsModule,
|
|
14514
|
+
ButtonModule,
|
|
14515
|
+
RippleModule,
|
|
14516
|
+
DialogModule,
|
|
14517
|
+
AsyncPipe,
|
|
14518
|
+
NgIf,
|
|
14519
|
+
MngTableComponent,
|
|
14520
|
+
MessagesModule,
|
|
14521
|
+
InputTextModule,
|
|
14522
|
+
MngDialogKeydownHandlerDirective
|
|
14523
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [class]=\"'p-inputgroup mng-dropdown-dialog' + descriptor.inputClassName\" [class.p-inputtext-sm]=\"descriptor.isSizeSmall\" [class.p-inputtext-lg]=\"descriptor.isSizeLarge\">\n <input pInputText type=\"text\" [id]=\"$any(key)\" [readonly]=\"true\" [formlyAttributes]=\"field\" [formControl]=\"fieldLabelFormControl\" />\n <i class=\"mng-dropdown-clear-icon pi pi-times\" (click)=\"clear()\" *ngIf=\"!props.required && formControl?.value && !formControl?.disabled\"></i>\n <button\n pButton\n pRipple\n class=\"mng-dropdown-dialog-search-button\"\n type=\"button\"\n [label]=\"'general.search' | translate : {item: ''}\"\n [disabled]=\"formControl.disabled\"\n (click)=\"openSelectDialog()\"></button>\n</div>\n\n<p-dialog\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.search' | translate : {item: props.label!}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-dialog mng-formly-field-lookup-dialog\">\n <ng-template pTemplate=\"content\" mngDialogKeydownHandler>\n <mng-table\n [descriptor]=\"descriptor.dialogTableDescriptor!\"\n [dataProvider]=\"descriptor.dialogTableDataProvider\"\n [queryResult]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [selectionMode]=\"'single'\"\n [loading]=\"dialogIsLoading$\"\n [captionComponent]=\"config.table?.captionComponent\"\n [columnActionComponent]=\"config.table?.columnActionComponent\"\n [viewContainer]=\"viewContainer\"\n (selectionChange)=\"onSelectionChange($event)\"\n (captionComponentInstance)=\"onCaptionCmpInst($event)\"\n (columnActionComponentInstance)=\"onColumnActionCmpInst($event)\">\n </mng-table>\n <p-messages [value]=\"dialogMessages\"></p-messages>\n </ng-template>\n\n <ng-template pTemplate=\"footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.select' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-text\"\n (click)=\"addItem()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n loadingIcon=\"pi pi-spin pi-spinner\"\n [disabled]=\"form.disabled\"></button>\n </ng-template>\n</p-dialog>\n" }]
|
|
13742
14524
|
}], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { mngTable: [{
|
|
13743
14525
|
type: ViewChild,
|
|
13744
14526
|
args: [MngTableComponent]
|
|
@@ -14091,11 +14873,23 @@ class MngFormlyFieldTableDialogMultiselectComponent extends FieldType {
|
|
|
14091
14873
|
this.searchDebounceSubject.next(query);
|
|
14092
14874
|
}
|
|
14093
14875
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngFormlyFieldTableDialogMultiselectComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
14094
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MngFormlyFieldTableDialogMultiselectComponent, isStandalone: true, selector: "mng-formly-table-multiselect-add-field", viewQueries: [{ propertyName: "addTableComponent", first: true, predicate: ["addTableComponent"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<mng-table [descriptor]=\"descriptor.mainTableDescriptor\" [items]=\"itemsAsync\" [viewContainer]=\"viewContainer\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-row justify-content-end align-items-center table-header pt-0\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\"\n >{{ props.label! | translate }} <span *ngIf=\"props.required && props['hideRequiredMarker'] !== true\">*</span></label\n >\n <button\n *ngIf=\"hasAddAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-plus\"\n class=\"p-button-rounded mng-button-xs\"\n (click)=\"openAddDialog()\"\n [disabled]=\"formControl!.disabled\"></button>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\">\n <button\n *ngIf=\"hasDeleteAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-trash\"\n class=\"p-button-rounded p-button-danger mng-button-xs\"\n (click)=\"removeItem(item)\"\n [disabled]=\"formControl!.disabled\"></button>\n </ng-template>\n</mng-table>\n\n<p-dialog\n *ngIf=\"hasAddAction\"\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.addItem' | translate : {item: props.label! | translate}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-dialog mng-dialog-sm mng-formly-field-table-multiselect-dialog\">\n <ng-template pTemplate=\"content\" class=\"table-container\">\n <div class=\"h-full flex flex-column\">\n <div class=\"flex-grow-1 formly-field-table-multiselect-dialog-form-container\">\n <div class=\"mng-formly-field-table-multiselect-dialog-table\">\n <mng-table\n #addTableComponent\n [descriptor]=\"descriptor.lookupTableDescriptor\"\n [globalFilterFields]=\"descriptor.searchFields\"\n [queryResult]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [loading]=\"dialogIsLoading$\"\n (selectionChange)=\"onSelectionChange($event)\"\n [viewContainer]=\"viewContainer\">\n <ng-template *ngIf=\"descriptor.searchEnabled\" mngTemplate=\"caption\">\n <div class=\"flex\">\n <span class=\"p-input-icon-left ml-auto\" [ngStyle]=\"{width: 'unset'}\">\n <i class=\"pi pi-search\"></i>\n <input pInputText type=\"text\" (input)=\"onSearch($event)\" [placeholder]=\"'general.search' | translate\" />\n </span>\n </div>\n </ng-template>\n </mng-table>\n </div>\n </div>\n\n <div class=\"flex flex-row justify-content-end mng-formly-field-table-multiselect-dialog-footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.add' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-primary\"\n (click)=\"addItems()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n loadingIcon=\"pi pi-spin pi-spinner\"\n [disabled]=\"form.disabled\"></button>\n </div>\n </div>\n </ng-template>\n</p-dialog>\n", styles: [".table-footer{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:flex-end;align-items:center;align-content:center;margin-top:2rem}.table-container{overflow:hidden}.table-footer button{width:8rem}.table-footer button:not(:first-child){margin-left:1.5rem}.table-scroll{max-height:75vh;overflow-y:auto}\n"], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "component", type: MngTableComponent, selector: "mng-table", inputs: ["descriptor", "items", "queryResult", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "actions", "isColumnClickable", "viewContainer", "captionComponent", "columnActionComponent", "columnActionMinWidth", "globalFilterFields"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnActionComponentInstance"] }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i4$
|
|
14876
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MngFormlyFieldTableDialogMultiselectComponent, isStandalone: true, selector: "mng-formly-table-multiselect-add-field", viewQueries: [{ propertyName: "addTableComponent", first: true, predicate: ["addTableComponent"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<mng-table [descriptor]=\"descriptor.mainTableDescriptor\" [items]=\"itemsAsync\" [viewContainer]=\"viewContainer\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-row justify-content-end align-items-center table-header pt-0\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\"\n >{{ props.label! | translate }} <span *ngIf=\"props.required && props['hideRequiredMarker'] !== true\">*</span></label\n >\n <button\n *ngIf=\"hasAddAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-plus\"\n class=\"p-button-rounded mng-button-xs\"\n (click)=\"openAddDialog()\"\n [disabled]=\"formControl!.disabled\"></button>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\">\n <button\n *ngIf=\"hasDeleteAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-trash\"\n class=\"p-button-rounded p-button-danger mng-button-xs\"\n (click)=\"removeItem(item)\"\n [disabled]=\"formControl!.disabled\"></button>\n </ng-template>\n</mng-table>\n\n<p-dialog\n *ngIf=\"hasAddAction\"\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.addItem' | translate : {item: props.label! | translate}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-dialog mng-dialog-sm mng-formly-field-table-multiselect-dialog\">\n <ng-template pTemplate=\"content\" class=\"table-container\" mngDialogKeydownHandler>\n <div class=\"h-full flex flex-column\">\n <div class=\"flex-grow-1 formly-field-table-multiselect-dialog-form-container\">\n <div class=\"mng-formly-field-table-multiselect-dialog-table\">\n <mng-table\n #addTableComponent\n [descriptor]=\"descriptor.lookupTableDescriptor\"\n [globalFilterFields]=\"descriptor.searchFields\"\n [queryResult]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [loading]=\"dialogIsLoading$\"\n (selectionChange)=\"onSelectionChange($event)\"\n [viewContainer]=\"viewContainer\">\n <ng-template *ngIf=\"descriptor.searchEnabled\" mngTemplate=\"caption\">\n <div class=\"flex\">\n <span class=\"p-input-icon-left ml-auto\" [ngStyle]=\"{width: 'unset'}\">\n <i class=\"pi pi-search\"></i>\n <input pInputText type=\"text\" (input)=\"onSearch($event)\" [placeholder]=\"'general.search' | translate\" />\n </span>\n </div>\n </ng-template>\n </mng-table>\n </div>\n </div>\n\n <div class=\"flex flex-row justify-content-end mng-formly-field-table-multiselect-dialog-footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.add' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-primary\"\n (click)=\"addItems()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n loadingIcon=\"pi pi-spin pi-spinner\"\n [disabled]=\"form.disabled\"></button>\n </div>\n </div>\n </ng-template>\n</p-dialog>\n", styles: [".table-footer{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:flex-end;align-items:center;align-content:center;margin-top:2rem}.table-container{overflow:hidden}.table-footer button{width:8rem}.table-footer button:not(:first-child){margin-left:1.5rem}.table-scroll{max-height:75vh;overflow-y:auto}\n"], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "component", type: MngTableComponent, selector: "mng-table", inputs: ["descriptor", "items", "queryResult", "loading", "dataProvider", "useQueryParams", "selectionMode", "selectionEnabled", "actions", "isColumnClickable", "viewContainer", "captionComponent", "columnActionComponent", "columnActionMinWidth", "globalFilterFields"], outputs: ["tableLoad", "cellClick", "selectionChange", "captionComponentInstance", "columnActionComponentInstance"] }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i4$5.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "directive", type: i1$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i6.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i6$1.Ripple, selector: "[pRipple]" }, { kind: "directive", type: MngTemplateDirective, selector: "[mngTemplate]", inputs: ["type", "mngTemplate"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i6$4.InputText, selector: "[pInputText]" }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: MngDialogKeydownHandlerDirective, selector: "[mngDialogKeydownHandler]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
14095
14877
|
}
|
|
14096
14878
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngFormlyFieldTableDialogMultiselectComponent, decorators: [{
|
|
14097
14879
|
type: Component,
|
|
14098
|
-
args: [{ standalone: true, selector: 'mng-formly-table-multiselect-add-field', imports: [
|
|
14880
|
+
args: [{ standalone: true, selector: 'mng-formly-table-multiselect-add-field', imports: [
|
|
14881
|
+
TranslateModule,
|
|
14882
|
+
NgIf,
|
|
14883
|
+
AsyncPipe,
|
|
14884
|
+
MngTableComponent,
|
|
14885
|
+
DialogModule,
|
|
14886
|
+
ButtonModule,
|
|
14887
|
+
RippleModule,
|
|
14888
|
+
MngTemplateDirective,
|
|
14889
|
+
InputTextModule,
|
|
14890
|
+
NgStyle,
|
|
14891
|
+
MngDialogKeydownHandlerDirective
|
|
14892
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mng-table [descriptor]=\"descriptor.mainTableDescriptor\" [items]=\"itemsAsync\" [viewContainer]=\"viewContainer\">\n <ng-template mngTemplate=\"caption\">\n <div class=\"flex flex-row justify-content-end align-items-center table-header pt-0\">\n <label class=\"mng-datatable-form-label p-0 m-0\" [for]=\"key\"\n >{{ props.label! | translate }} <span *ngIf=\"props.required && props['hideRequiredMarker'] !== true\">*</span></label\n >\n <button\n *ngIf=\"hasAddAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-plus\"\n class=\"p-button-rounded mng-button-xs\"\n (click)=\"openAddDialog()\"\n [disabled]=\"formControl!.disabled\"></button>\n </div>\n </ng-template>\n <ng-template mngTemplate=\"columnAction\" let-item=\"rowItem\">\n <button\n *ngIf=\"hasDeleteAction && !options?.formState?.disabled\"\n pButton\n pRipple\n type=\"button\"\n icon=\"pi pi-trash\"\n class=\"p-button-rounded p-button-danger mng-button-xs\"\n (click)=\"removeItem(item)\"\n [disabled]=\"formControl!.disabled\"></button>\n </ng-template>\n</mng-table>\n\n<p-dialog\n *ngIf=\"hasAddAction\"\n [(visible)]=\"isDialogVisible\"\n [draggable]=\"false\"\n [header]=\"'general.addItem' | translate : {item: props.label! | translate}\"\n [modal]=\"true\"\n appendTo=\"body\"\n styleClass=\"p-fluid mng-dialog mng-dialog-sm mng-formly-field-table-multiselect-dialog\">\n <ng-template pTemplate=\"content\" class=\"table-container\" mngDialogKeydownHandler>\n <div class=\"h-full flex flex-column\">\n <div class=\"flex-grow-1 formly-field-table-multiselect-dialog-form-container\">\n <div class=\"mng-formly-field-table-multiselect-dialog-table\">\n <mng-table\n #addTableComponent\n [descriptor]=\"descriptor.lookupTableDescriptor\"\n [globalFilterFields]=\"descriptor.searchFields\"\n [queryResult]=\"addItemsAsync\"\n [selectionEnabled]=\"true\"\n [loading]=\"dialogIsLoading$\"\n (selectionChange)=\"onSelectionChange($event)\"\n [viewContainer]=\"viewContainer\">\n <ng-template *ngIf=\"descriptor.searchEnabled\" mngTemplate=\"caption\">\n <div class=\"flex\">\n <span class=\"p-input-icon-left ml-auto\" [ngStyle]=\"{width: 'unset'}\">\n <i class=\"pi pi-search\"></i>\n <input pInputText type=\"text\" (input)=\"onSearch($event)\" [placeholder]=\"'general.search' | translate\" />\n </span>\n </div>\n </ng-template>\n </mng-table>\n </div>\n </div>\n\n <div class=\"flex flex-row justify-content-end mng-formly-field-table-multiselect-dialog-footer\">\n <button pButton pRipple type=\"button\" [label]=\"'general.cancel' | translate\" icon=\"pi pi-times\" class=\"p-button-text\" (click)=\"hideDialog()\"></button>\n <button\n pButton\n pRipple\n type=\"button\"\n [label]=\"'general.add' | translate\"\n icon=\"pi pi-check\"\n class=\"p-button-primary\"\n (click)=\"addItems()\"\n [loading]=\"(dialogIsLoading$ | async) ?? false\"\n loadingIcon=\"pi pi-spin pi-spinner\"\n [disabled]=\"form.disabled\"></button>\n </div>\n </div>\n </ng-template>\n</p-dialog>\n", styles: [".table-footer{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:flex-end;align-items:center;align-content:center;margin-top:2rem}.table-container{overflow:hidden}.table-footer button{width:8rem}.table-footer button:not(:first-child){margin-left:1.5rem}.table-scroll{max-height:75vh;overflow-y:auto}\n"] }]
|
|
14099
14893
|
}], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { addTableComponent: [{
|
|
14100
14894
|
type: ViewChild,
|
|
14101
14895
|
args: ['addTableComponent']
|
|
@@ -14103,7 +14897,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImpor
|
|
|
14103
14897
|
|
|
14104
14898
|
class MngFormlyFieldTabsComponent extends FieldType {
|
|
14105
14899
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngFormlyFieldTabsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
14106
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MngFormlyFieldTabsComponent, isStandalone: true, selector: "mng-formly-field-tabs", usesInheritance: true, ngImport: i0, template: "<p-tabView [scrollable]=\"true\">\n <p-tabPanel\n *ngFor=\"let tab of field.fieldGroup; let i = index; let last = last\"\n [header]=\"tab.props?.label! | translate\"\n [headerStyleClass]=\"formControl!.valid ? 'p-tabview-title' : undefined\">\n <ng-template pTemplate=\"header\">\n <span class=\"p-tabview-title\" [class.p-tabview-title-error]=\"formState.submittedOn && formState['tab_' + (tab.id ? tab.id : tab.props?.label!) + '_invalid']\">{{\n tab.props?.label! | translate\n }}</span>\n </ng-template>\n <formly-field [field]=\"tab\"></formly-field>\n </p-tabPanel>\n</p-tabView>\n", dependencies: [{ kind: "ngmodule", type: TabViewModule }, { kind: "component", type: i1$4.TabView, selector: "p-tabView", inputs: ["style", "styleClass", "controlClose", "scrollable", "activeIndex", "selectOnFocus", "tabindex"], outputs: ["onChange", "onClose", "activeIndexChange"] }, { kind: "component", type: i1$4.TabPanel, selector: "p-tabPanel", inputs: ["closable", "headerStyle", "headerStyleClass", "cache", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "selected", "disabled", "header", "leftIcon", "rightIcon"] }, { kind: "directive", type: i1$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i2$2.FormlyField, selector: "formly-field", inputs: ["field"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
14900
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MngFormlyFieldTabsComponent, isStandalone: true, selector: "mng-formly-field-tabs", usesInheritance: true, ngImport: i0, template: "<p-tabView [scrollable]=\"true\">\n <p-tabPanel\n *ngFor=\"let tab of field.fieldGroup; let i = index; let last = last\"\n [header]=\"tab.props?.label! | translate\"\n [headerStyleClass]=\"formControl!.valid ? 'p-tabview-title' : undefined\">\n <ng-template pTemplate=\"header\">\n <span class=\"p-tabview-title\" [class.p-tabview-title-error]=\"formState.submittedOn && formState['tab_' + (tab.id ? tab.id : tab.props?.label!) + '_invalid']\">{{\n tab.props?.label! | translate\n }}</span>\n </ng-template>\n <formly-field [field]=\"tab\"></formly-field>\n </p-tabPanel>\n</p-tabView>\n", dependencies: [{ kind: "ngmodule", type: TabViewModule }, { kind: "component", type: i1$4.TabView, selector: "p-tabView", inputs: ["style", "styleClass", "controlClose", "scrollable", "activeIndex", "selectOnFocus", "nextButtonAriaLabel", "prevButtonAriaLabel", "autoHideButtons", "tabindex"], outputs: ["onChange", "onClose", "activeIndexChange"] }, { kind: "component", type: i1$4.TabPanel, selector: "p-tabPanel", inputs: ["closable", "headerStyle", "headerStyleClass", "cache", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "selected", "disabled", "header", "leftIcon", "rightIcon"] }, { kind: "directive", type: i1$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: FormlyModule }, { kind: "component", type: i2$2.FormlyField, selector: "formly-field", inputs: ["field"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
14107
14901
|
}
|
|
14108
14902
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngFormlyFieldTabsComponent, decorators: [{
|
|
14109
14903
|
type: Component,
|
|
@@ -14167,7 +14961,7 @@ class MngFormlyFieldActionComponent extends FieldType {
|
|
|
14167
14961
|
}
|
|
14168
14962
|
}
|
|
14169
14963
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngFormlyFieldActionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
14170
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MngFormlyFieldActionComponent, isStandalone: true, selector: "mng-formly-field-action", usesInheritance: true, ngImport: i0, template: "<div class=\"flex\">\n <button\n type=\"button\"\n pButton\n pRipple\n [icon]=\"$any(descriptor.button.icon)\"\n [label]=\"$any(descriptor.button.label === null ? null : descriptor.button.label ?? props!.label) | translate\"\n [pTooltip]=\"$any(descriptor.button.tooltip) | translate\"\n [disabled]=\"formControl.disabled\"\n (click)=\"onClick()\"\n [class]=\"buttonClass + (actionMessage ? ' mr-2' : '')\"></button>\n <p-message *ngIf=\"actionMessage\" [text]=\"actionMessage.content\" [severity]=\"actionMessage.severity ?? 'success'\"></p-message>\n</div>\n", dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i6.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i6$1.Ripple, selector: "[pRipple]" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i4$1.Tooltip, selector: "[pTooltip]", inputs: ["
|
|
14964
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MngFormlyFieldActionComponent, isStandalone: true, selector: "mng-formly-field-action", usesInheritance: true, ngImport: i0, template: "<div class=\"flex\">\n <button\n type=\"button\"\n pButton\n pRipple\n [icon]=\"$any(descriptor.button.icon)\"\n [label]=\"$any(descriptor.button.label === null ? null : descriptor.button.label ?? props!.label) | translate\"\n [pTooltip]=\"$any(descriptor.button.tooltip) | translate\"\n [disabled]=\"formControl.disabled\"\n (click)=\"onClick()\"\n [class]=\"buttonClass + (actionMessage ? ' mr-2' : '')\"></button>\n <p-message *ngIf=\"actionMessage\" [text]=\"actionMessage.content\" [severity]=\"actionMessage.severity ?? 'success'\"></p-message>\n</div>\n", dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i6.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i6$1.Ripple, selector: "[pRipple]" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i4$1.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "ngmodule", type: MessageModule }, { kind: "component", type: i5$1.UIMessage, selector: "p-message", inputs: ["severity", "text", "escape", "style", "styleClass"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
14171
14965
|
}
|
|
14172
14966
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngFormlyFieldActionComponent, decorators: [{
|
|
14173
14967
|
type: Component,
|
|
@@ -14274,7 +15068,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImpor
|
|
|
14274
15068
|
args: ['formState']
|
|
14275
15069
|
}] } });
|
|
14276
15070
|
|
|
14277
|
-
class MngBreadcrumbComponent {
|
|
15071
|
+
let MngBreadcrumbComponent$1 = class MngBreadcrumbComponent {
|
|
14278
15072
|
constructor(mngCommons) {
|
|
14279
15073
|
this.mngCommons = mngCommons;
|
|
14280
15074
|
this.mappedBreadcrumbHome$ = this.mngCommons.breadcrumbHome$.pipe(map((el) => {
|
|
@@ -14294,21 +15088,21 @@ class MngBreadcrumbComponent {
|
|
|
14294
15088
|
}
|
|
14295
15089
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngBreadcrumbComponent, deps: [{ token: MngCommonsService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
14296
15090
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MngBreadcrumbComponent, isStandalone: true, selector: "mng-breadcrumb", ngImport: i0, template: "<div class=\"layout-breadcrumb-container\">\n <div class=\"layout-breadcrumb\">\n <p-breadcrumb [home]=\"(mappedBreadcrumbHome$ | async) ?? undefined\" [model]=\"(mappedBreadcrumbs$ | async) ?? undefined\" styleClass=\"layout-breadcrumb py-2\"></p-breadcrumb>\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: BreadcrumbModule }, { kind: "component", type: i2$4.Breadcrumb, selector: "p-breadcrumb", inputs: ["model", "style", "styleClass", "home", "homeAriaLabel"], outputs: ["onItemClick"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
14297
|
-
}
|
|
14298
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngBreadcrumbComponent, decorators: [{
|
|
15091
|
+
};
|
|
15092
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngBreadcrumbComponent$1, decorators: [{
|
|
14299
15093
|
type: Component,
|
|
14300
15094
|
args: [{ standalone: true, selector: 'mng-breadcrumb', imports: [BreadcrumbModule, AsyncPipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"layout-breadcrumb-container\">\n <div class=\"layout-breadcrumb\">\n <p-breadcrumb [home]=\"(mappedBreadcrumbHome$ | async) ?? undefined\" [model]=\"(mappedBreadcrumbs$ | async) ?? undefined\" styleClass=\"layout-breadcrumb py-2\"></p-breadcrumb>\n </div>\n</div>\n" }]
|
|
14301
15095
|
}], ctorParameters: function () { return [{ type: MngCommonsService }]; } });
|
|
14302
15096
|
|
|
14303
|
-
class MngFooterComponent {
|
|
15097
|
+
let MngFooterComponent$1 = class MngFooterComponent {
|
|
14304
15098
|
constructor(mngCommons) {
|
|
14305
15099
|
this.mngCommons = mngCommons;
|
|
14306
15100
|
this.currentYear = new Date().getFullYear();
|
|
14307
15101
|
}
|
|
14308
15102
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngFooterComponent, deps: [{ token: MngCommonsService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
14309
15103
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MngFooterComponent, isStandalone: true, selector: "mng-footer", ngImport: i0, template: "<div class=\"layout-footer\">\n <div class=\"footer-logo-container\">\n <img id=\"footer-logo\" [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoDark : mngCommons.appLogoLight\" alt=\"atlantis-layout\" />\n <span class=\"app-name\">{{ mngCommons.appName | translate }}</span>\n </div>\n <span class=\"copyright\">© {{ mngCommons.appOwner | translate }} - {{ currentYear }}</span>\n</div>\n", dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
14310
|
-
}
|
|
14311
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngFooterComponent, decorators: [{
|
|
15104
|
+
};
|
|
15105
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngFooterComponent$1, decorators: [{
|
|
14312
15106
|
type: Component,
|
|
14313
15107
|
args: [{ standalone: true, selector: 'mng-footer', imports: [TranslateModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"layout-footer\">\n <div class=\"footer-logo-container\">\n <img id=\"footer-logo\" [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoDark : mngCommons.appLogoLight\" alt=\"atlantis-layout\" />\n <span class=\"app-name\">{{ mngCommons.appName | translate }}</span>\n </div>\n <span class=\"copyright\">© {{ mngCommons.appOwner | translate }} - {{ currentYear }}</span>\n</div>\n" }]
|
|
14314
15108
|
}], ctorParameters: function () { return [{ type: MngCommonsService }]; } });
|
|
@@ -14335,6 +15129,30 @@ class RouteUtil {
|
|
|
14335
15129
|
return basePath;
|
|
14336
15130
|
}
|
|
14337
15131
|
}
|
|
15132
|
+
static doesUrlMatchRouterLink(link, url) {
|
|
15133
|
+
if (typeof url === 'string' && url.startsWith('/')) {
|
|
15134
|
+
url = url.substring(1);
|
|
15135
|
+
}
|
|
15136
|
+
else if (Array.isArray(url) && url.length > 0 && url[0].startsWith('/')) {
|
|
15137
|
+
url[0] = url[0].substring(1);
|
|
15138
|
+
}
|
|
15139
|
+
const routeSegments = Array.isArray(link) ? link : link.split('/');
|
|
15140
|
+
const urlSegments = Array.isArray(url) ? url : url.split('#')[0].split('?')[0].split('/');
|
|
15141
|
+
if (routeSegments.length > 0 && urlSegments.length > 0) {
|
|
15142
|
+
for (let i = 0; i < routeSegments.length; i++) {
|
|
15143
|
+
if (i < urlSegments.length) {
|
|
15144
|
+
if (routeSegments[i] !== urlSegments[i]) {
|
|
15145
|
+
return false;
|
|
15146
|
+
}
|
|
15147
|
+
}
|
|
15148
|
+
else {
|
|
15149
|
+
break;
|
|
15150
|
+
}
|
|
15151
|
+
}
|
|
15152
|
+
return true;
|
|
15153
|
+
}
|
|
15154
|
+
return false;
|
|
15155
|
+
}
|
|
14338
15156
|
static adjustMenuLazyChildrenRouterLinks(rootMenuItem, lazyChildren) {
|
|
14339
15157
|
return lazyChildren.map(i => {
|
|
14340
15158
|
const childMenuItem = { ...i };
|
|
@@ -14539,7 +15357,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImpor
|
|
|
14539
15357
|
type: Injectable
|
|
14540
15358
|
}], ctorParameters: function () { return [{ type: MngCommonsService }]; } });
|
|
14541
15359
|
|
|
14542
|
-
class MngMenuItemComponent {
|
|
15360
|
+
let MngMenuItemComponent$1 = class MngMenuItemComponent {
|
|
14543
15361
|
constructor(injector, router, route, mngRouter, authorization, mngCommons, mainLayoutService) {
|
|
14544
15362
|
this.injector = injector;
|
|
14545
15363
|
this.router = router;
|
|
@@ -14742,7 +15560,7 @@ class MngMenuItemComponent {
|
|
|
14742
15560
|
}
|
|
14743
15561
|
}
|
|
14744
15562
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngMenuItemComponent, deps: [{ token: i0.Injector }, { token: i1.Router }, { token: i1.ActivatedRoute }, { token: MngRouterService }, { token: MngAuthorizationService }, { token: MngCommonsService }, { token: MngMainLayoutComponentService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
14745
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MngMenuItemComponent, isStandalone: true, selector: "[mng-menuitem]", inputs: { item: "item", index: "index", root: "root", parentKey: "parentKey" }, outputs: { visibleChangeEventEmitter: "visibleChange" }, host: { properties: { "class.layout-root-menuitem": "root", "class.active-menuitem": "active", "class.py-0": "this.hostClassNoPadding", "class.hidden": "this.hostClassChildrenHidden" } }, ngImport: i0, template: "<ng-container *ngIf=\"isVisible$ | async\">\n <div *ngIf=\"root\" class=\"layout-menuitem-root-text\"
|
|
15563
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MngMenuItemComponent, isStandalone: true, selector: "[mng-menuitem]", inputs: { item: "item", index: "index", root: "root", parentKey: "parentKey" }, outputs: { visibleChangeEventEmitter: "visibleChange" }, host: { properties: { "class.layout-root-menuitem": "root", "class.active-menuitem": "active", "class.py-0": "this.hostClassNoPadding", "class.hidden": "this.hostClassChildrenHidden" } }, ngImport: i0, template: "<ng-container *ngIf=\"isVisible$ | async\">\n <div *ngIf=\"root\" class=\"layout-menuitem-root-text\">{{ item.label! | translate }}</div>\n <a\n *ngIf=\"!item.href && (!item.routerLink || item.items)\"\n (click)=\"itemClick($event)\"\n (mouseenter)=\"onMouseEnter()\"\n (keydown.enter)=\"itemClick($event)\"\n [routerLink]=\"item.routerLink\"\n [attr.target]=\"item.target\"\n [attr.tabindex]=\"0\"\n [ngClass]=\"item.className ?? ''\"\n pRipple>\n <i [ngClass]=\"item.icon ?? ''\" class=\"layout-menuitem-icon\"></i>\n <span class=\"layout-menuitem-text\">{{ item.label! | translate }}</span>\n <i class=\"pi pi-fw pi-angle-down layout-submenu-toggler\" *ngIf=\"item.items || item.lazyChildren\"></i>\n <span class=\"menuitem-badge\" *ngIf=\"item.badge\">{{ item.badge }}</span>\n </a>\n <a\n *ngIf=\"!item.href && item.routerLink && !item.items\"\n (click)=\"itemClick($event)\"\n (mouseenter)=\"hover = true\"\n (mouseleave)=\"hover = false\"\n [routerLink]=\"item.routerLink\"\n routerLinkActive=\"active-menuitem-routerlink\"\n [routerLinkActiveOptions]=\"{paths: 'exact', matrixParams: 'ignored', queryParams: 'ignored', fragment: 'ignored'}\"\n [attr.target]=\"item.target\"\n [attr.tabindex]=\"0\"\n [ngClass]=\"item.className ?? ''\"\n pRipple>\n <i [ngClass]=\"item.icon ?? ''\" class=\"layout-menuitem-icon\"></i>\n <span class=\"layout-menuitem-text\">{{ item.label! | translate }}</span>\n <i class=\"pi pi-fw pi-angle-down layout-submenu-toggler\" *ngIf=\"item.items || item.lazyChildren\"></i>\n <span class=\"menuitem-badge\" *ngIf=\"item.badge\">{{ item.badge }}</span>\n </a>\n <a\n *ngIf=\"item.href && !item.items\"\n (click)=\"itemClick($event)\"\n (mouseenter)=\"hover = true\"\n (mouseleave)=\"hover = false\"\n [attr.href]=\"item.href\"\n [attr.target]=\"item.target\"\n [attr.tabindex]=\"0\"\n [ngClass]=\"item.className ?? ''\"\n pRipple>\n <i [ngClass]=\"item.icon ?? ''\" class=\"layout-menuitem-icon\"></i>\n <span class=\"layout-menuitem-text\">{{ item.label! | translate }}</span>\n <i class=\"pi pi-fw pi-angle-down layout-submenu-toggler\" *ngIf=\"item.items || item.lazyChildren\"></i>\n <span class=\"menuitem-badge\" *ngIf=\"item.badge\">{{ item.badge }}</span>\n </a>\n <ul\n *ngIf=\"item.items || (item.items && (mngCommons.menuModeIsStatic$ | async) && root)\"\n [@children]=\"\n (mngCommons.menuModeIsSlim$ | async) && (mainLayoutService.isMobile$ | async) === false && root\n ? active\n ? 'visible'\n : 'hidden'\n : (mngCommons.menuModeIsStatic$ | async) && root && (mainLayoutService.isMobile$ | async) === false\n ? 'visible'\n : active\n ? 'visibleAnimated'\n : 'hiddenAnimated'\n \">\n <ng-template ngFor let-child let-i=\"index\" [ngForOf]=\"item.items\">\n <li mng-menuitem [item]=\"child\" [index]=\"i\" [parentKey]=\"key\" [class]=\"child.badgeClassName\" (visibleChange)=\"onChildVisibleChange($event, item, i)\"></li>\n </ng-template>\n </ul>\n</ng-container>\n", dependencies: [{ kind: "component", type: MngMenuItemComponent, selector: "[mng-menuitem]", inputs: ["item", "index", "root", "parentKey"], outputs: ["visibleChange"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i6$1.Ripple, selector: "[pRipple]" }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }], animations: [
|
|
14746
15564
|
trigger('children', [
|
|
14747
15565
|
state('void', style({
|
|
14748
15566
|
height: '0px'
|
|
@@ -14766,8 +15584,8 @@ class MngMenuItemComponent {
|
|
|
14766
15584
|
transition('void => visibleAnimated, visibleAnimated => void', animate('400ms cubic-bezier(0.86, 0, 0.07, 1)'))
|
|
14767
15585
|
])
|
|
14768
15586
|
] }); }
|
|
14769
|
-
}
|
|
14770
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngMenuItemComponent, decorators: [{
|
|
15587
|
+
};
|
|
15588
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngMenuItemComponent$1, decorators: [{
|
|
14771
15589
|
type: Component,
|
|
14772
15590
|
args: [{ standalone: true, selector: '[mng-menuitem]', host: {
|
|
14773
15591
|
'[class.layout-root-menuitem]': 'root',
|
|
@@ -14795,7 +15613,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImpor
|
|
|
14795
15613
|
transition('hiddenAnimated => visibleAnimated', animate('400ms cubic-bezier(0.86, 0, 0.07, 1)')),
|
|
14796
15614
|
transition('void => visibleAnimated, visibleAnimated => void', animate('400ms cubic-bezier(0.86, 0, 0.07, 1)'))
|
|
14797
15615
|
])
|
|
14798
|
-
], template: "<ng-container *ngIf=\"isVisible$ | async\">\n <div *ngIf=\"root\" class=\"layout-menuitem-root-text\"
|
|
15616
|
+
], template: "<ng-container *ngIf=\"isVisible$ | async\">\n <div *ngIf=\"root\" class=\"layout-menuitem-root-text\">{{ item.label! | translate }}</div>\n <a\n *ngIf=\"!item.href && (!item.routerLink || item.items)\"\n (click)=\"itemClick($event)\"\n (mouseenter)=\"onMouseEnter()\"\n (keydown.enter)=\"itemClick($event)\"\n [routerLink]=\"item.routerLink\"\n [attr.target]=\"item.target\"\n [attr.tabindex]=\"0\"\n [ngClass]=\"item.className ?? ''\"\n pRipple>\n <i [ngClass]=\"item.icon ?? ''\" class=\"layout-menuitem-icon\"></i>\n <span class=\"layout-menuitem-text\">{{ item.label! | translate }}</span>\n <i class=\"pi pi-fw pi-angle-down layout-submenu-toggler\" *ngIf=\"item.items || item.lazyChildren\"></i>\n <span class=\"menuitem-badge\" *ngIf=\"item.badge\">{{ item.badge }}</span>\n </a>\n <a\n *ngIf=\"!item.href && item.routerLink && !item.items\"\n (click)=\"itemClick($event)\"\n (mouseenter)=\"hover = true\"\n (mouseleave)=\"hover = false\"\n [routerLink]=\"item.routerLink\"\n routerLinkActive=\"active-menuitem-routerlink\"\n [routerLinkActiveOptions]=\"{paths: 'exact', matrixParams: 'ignored', queryParams: 'ignored', fragment: 'ignored'}\"\n [attr.target]=\"item.target\"\n [attr.tabindex]=\"0\"\n [ngClass]=\"item.className ?? ''\"\n pRipple>\n <i [ngClass]=\"item.icon ?? ''\" class=\"layout-menuitem-icon\"></i>\n <span class=\"layout-menuitem-text\">{{ item.label! | translate }}</span>\n <i class=\"pi pi-fw pi-angle-down layout-submenu-toggler\" *ngIf=\"item.items || item.lazyChildren\"></i>\n <span class=\"menuitem-badge\" *ngIf=\"item.badge\">{{ item.badge }}</span>\n </a>\n <a\n *ngIf=\"item.href && !item.items\"\n (click)=\"itemClick($event)\"\n (mouseenter)=\"hover = true\"\n (mouseleave)=\"hover = false\"\n [attr.href]=\"item.href\"\n [attr.target]=\"item.target\"\n [attr.tabindex]=\"0\"\n [ngClass]=\"item.className ?? ''\"\n pRipple>\n <i [ngClass]=\"item.icon ?? ''\" class=\"layout-menuitem-icon\"></i>\n <span class=\"layout-menuitem-text\">{{ item.label! | translate }}</span>\n <i class=\"pi pi-fw pi-angle-down layout-submenu-toggler\" *ngIf=\"item.items || item.lazyChildren\"></i>\n <span class=\"menuitem-badge\" *ngIf=\"item.badge\">{{ item.badge }}</span>\n </a>\n <ul\n *ngIf=\"item.items || (item.items && (mngCommons.menuModeIsStatic$ | async) && root)\"\n [@children]=\"\n (mngCommons.menuModeIsSlim$ | async) && (mainLayoutService.isMobile$ | async) === false && root\n ? active\n ? 'visible'\n : 'hidden'\n : (mngCommons.menuModeIsStatic$ | async) && root && (mainLayoutService.isMobile$ | async) === false\n ? 'visible'\n : active\n ? 'visibleAnimated'\n : 'hiddenAnimated'\n \">\n <ng-template ngFor let-child let-i=\"index\" [ngForOf]=\"item.items\">\n <li mng-menuitem [item]=\"child\" [index]=\"i\" [parentKey]=\"key\" [class]=\"child.badgeClassName\" (visibleChange)=\"onChildVisibleChange($event, item, i)\"></li>\n </ng-template>\n </ul>\n</ng-container>\n" }]
|
|
14799
15617
|
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i1.Router }, { type: i1.ActivatedRoute }, { type: MngRouterService }, { type: MngAuthorizationService }, { type: MngCommonsService }, { type: MngMainLayoutComponentService }]; }, propDecorators: { item: [{
|
|
14800
15618
|
type: Input,
|
|
14801
15619
|
args: [{ required: true }]
|
|
@@ -14816,7 +15634,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImpor
|
|
|
14816
15634
|
args: ['class.hidden']
|
|
14817
15635
|
}] } });
|
|
14818
15636
|
|
|
14819
|
-
class MngVersionComponent {
|
|
15637
|
+
let MngVersionComponent$1 = class MngVersionComponent {
|
|
14820
15638
|
constructor(versionService, jsonPathPipe) {
|
|
14821
15639
|
this.versionService = versionService;
|
|
14822
15640
|
this.jsonPathPipe = jsonPathPipe;
|
|
@@ -14859,8 +15677,8 @@ class MngVersionComponent {
|
|
|
14859
15677
|
}
|
|
14860
15678
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngVersionComponent, deps: [{ token: MngVersionService }, { token: JsonPathPipe }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
14861
15679
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MngVersionComponent, isStandalone: true, selector: "mng-version", inputs: { initVersion: ["version", "initVersion"] }, ngImport: i0, template: "<ng-container *ngIf=\"versions; else version\">\n <ng-container *ngFor=\"let v of versions; let last = last\"> <mng-version [version]=\"v\"></mng-version><br *ngIf=\"!last\" /> </ng-container>\n</ng-container>\n<ng-template #version>\n <ng-container *ngIf=\"displayName\">{{ displayName }}: </ng-container>\n <ng-container *ngIf=\"(loading$ | async) === false\">{{ displayVersion }}</ng-container>\n</ng-template>\n", dependencies: [{ kind: "component", type: MngVersionComponent, selector: "mng-version", inputs: ["version"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
14862
|
-
}
|
|
14863
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngVersionComponent, decorators: [{
|
|
15680
|
+
};
|
|
15681
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngVersionComponent$1, decorators: [{
|
|
14864
15682
|
type: Component,
|
|
14865
15683
|
args: [{ standalone: true, selector: 'mng-version', imports: [AsyncPipe, NgForOf, NgIf], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"versions; else version\">\n <ng-container *ngFor=\"let v of versions; let last = last\"> <mng-version [version]=\"v\"></mng-version><br *ngIf=\"!last\" /> </ng-container>\n</ng-container>\n<ng-template #version>\n <ng-container *ngIf=\"displayName\">{{ displayName }}: </ng-container>\n <ng-container *ngIf=\"(loading$ | async) === false\">{{ displayVersion }}</ng-container>\n</ng-template>\n" }]
|
|
14866
15684
|
}], ctorParameters: function () { return [{ type: MngVersionService }, { type: JsonPathPipe }]; }, propDecorators: { initVersion: [{
|
|
@@ -14868,7 +15686,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImpor
|
|
|
14868
15686
|
args: ['version']
|
|
14869
15687
|
}] } });
|
|
14870
15688
|
|
|
14871
|
-
class MngMenuComponent {
|
|
15689
|
+
let MngMenuComponent$1 = class MngMenuComponent {
|
|
14872
15690
|
constructor(route, mngCommons, mainLayoutService) {
|
|
14873
15691
|
this.route = route;
|
|
14874
15692
|
this.mngCommons = mngCommons;
|
|
@@ -14884,14 +15702,14 @@ class MngMenuComponent {
|
|
|
14884
15702
|
}
|
|
14885
15703
|
}
|
|
14886
15704
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngMenuComponent, deps: [{ token: i1.ActivatedRoute }, { token: MngCommonsService }, { token: MngMainLayoutComponentService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
14887
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MngMenuComponent, isStandalone: true, selector: "mng-menu", ngImport: i0, template: "<div\n class=\"layout-menu-wrapper\"\n [ngClass]=\"{'layout-sidebar-active': (mainLayoutService.sidebarActive$ | async)}\"\n (click)=\"mainLayoutService.onSidebarClick($event)\"\n (mouseover)=\"mainLayoutService.onSidebarMouseOver($event)\"\n (mouseleave)=\"mainLayoutService.onSidebarMouseLeave($event)\">\n <div class=\"menu-logo\">\n <a routerLink=\"/\" class=\"logo\">\n <img [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoDark : mngCommons.appLogoLight\" />\n </a>\n\n <a routerLink=\"/\" class=\"app-name\" *ngIf=\"(mngCommons.menuModeIsSlim$ | async) === false || (mainLayoutService.isMobile$ | async)\">\n <img [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoNameDark : mngCommons.appLogoNameLight\" />\n </a>\n <a *ngIf=\"mngCommons.menuPinEnabled\" class=\"menu-pin\" (click)=\"mainLayoutService.onToggleMenu($event)\">\n <span *ngIf=\"mngCommons.menuModeIsOverlay$ | async\" class=\"pi pi-times\"></span>\n <span\n *ngIf=\"(mngCommons.menuModeIsSidebar$ | async) && (mainLayoutService.sidebarStatic$ | async) === false && (mainLayoutService.pinActive$ | async)\"\n class=\"pi pi-unlock\"></span>\n <span *ngIf=\"(mngCommons.menuModeIsSidebar$ | async) && (mainLayoutService.sidebarStatic$ | async) && (mainLayoutService.pinActive$ | async)\" class=\"pi pi-lock\"></span>\n </a>\n </div>\n\n <div class=\"layout-menu-container\">\n <ul class=\"layout-menu\">\n <ng-container *ngFor=\"let item of menuItems; let i = index\">\n <li mng-menuitem *ngIf=\"!item.separator\" [item]=\"item\" [index]=\"i\" [root]=\"true\"></li>\n <li *ngIf=\"item.separator\" class=\"menu-separator\"></li>\n </ng-container>\n </ul>\n </div>\n\n <div class=\"menu-version\">\n <mng-version [version]=\"mngCommons.appVersion\"></mng-version>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: MngMenuItemComponent, selector: "[mng-menuitem]", inputs: ["item", "index", "root", "parentKey"], outputs: ["visibleChange"] }, { kind: "component", type: MngVersionComponent, selector: "mng-version", inputs: ["version"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
14888
|
-
}
|
|
14889
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngMenuComponent, decorators: [{
|
|
15705
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MngMenuComponent, isStandalone: true, selector: "mng-menu", ngImport: i0, template: "<div\n class=\"layout-menu-wrapper\"\n [ngClass]=\"{'layout-sidebar-active': (mainLayoutService.sidebarActive$ | async)}\"\n (click)=\"mainLayoutService.onSidebarClick($event)\"\n (mouseover)=\"mainLayoutService.onSidebarMouseOver($event)\"\n (mouseleave)=\"mainLayoutService.onSidebarMouseLeave($event)\">\n <div class=\"menu-logo\">\n <a routerLink=\"/\" class=\"logo\">\n <img [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoDark : mngCommons.appLogoLight\" />\n </a>\n\n <a routerLink=\"/\" class=\"app-name\" *ngIf=\"(mngCommons.menuModeIsSlim$ | async) === false || (mainLayoutService.isMobile$ | async)\">\n <img [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoNameDark : mngCommons.appLogoNameLight\" />\n </a>\n <a *ngIf=\"mngCommons.menuPinEnabled\" class=\"menu-pin\" (click)=\"mainLayoutService.onToggleMenu($event)\">\n <span *ngIf=\"mngCommons.menuModeIsOverlay$ | async\" class=\"pi pi-times\"></span>\n <span\n *ngIf=\"(mngCommons.menuModeIsSidebar$ | async) && (mainLayoutService.sidebarStatic$ | async) === false && (mainLayoutService.pinActive$ | async)\"\n class=\"pi pi-unlock\"></span>\n <span *ngIf=\"(mngCommons.menuModeIsSidebar$ | async) && (mainLayoutService.sidebarStatic$ | async) && (mainLayoutService.pinActive$ | async)\" class=\"pi pi-lock\"></span>\n </a>\n </div>\n\n <div class=\"layout-menu-container\">\n <ul class=\"layout-menu\">\n <ng-container *ngFor=\"let item of menuItems; let i = index\">\n <li mng-menuitem *ngIf=\"!item.separator\" [item]=\"item\" [index]=\"i\" [root]=\"true\"></li>\n <li *ngIf=\"item.separator\" class=\"menu-separator\"></li>\n </ng-container>\n </ul>\n </div>\n\n <div class=\"menu-version\">\n <mng-version [version]=\"mngCommons.appVersion\"></mng-version>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: MngMenuItemComponent$1, selector: "[mng-menuitem]", inputs: ["item", "index", "root", "parentKey"], outputs: ["visibleChange"] }, { kind: "component", type: MngVersionComponent$1, selector: "mng-version", inputs: ["version"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
15706
|
+
};
|
|
15707
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngMenuComponent$1, decorators: [{
|
|
14890
15708
|
type: Component,
|
|
14891
|
-
args: [{ standalone: true, selector: 'mng-menu', imports: [NgClass, AsyncPipe, NgIf, NgForOf, MngMenuItemComponent, MngVersionComponent, RouterLink], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"layout-menu-wrapper\"\n [ngClass]=\"{'layout-sidebar-active': (mainLayoutService.sidebarActive$ | async)}\"\n (click)=\"mainLayoutService.onSidebarClick($event)\"\n (mouseover)=\"mainLayoutService.onSidebarMouseOver($event)\"\n (mouseleave)=\"mainLayoutService.onSidebarMouseLeave($event)\">\n <div class=\"menu-logo\">\n <a routerLink=\"/\" class=\"logo\">\n <img [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoDark : mngCommons.appLogoLight\" />\n </a>\n\n <a routerLink=\"/\" class=\"app-name\" *ngIf=\"(mngCommons.menuModeIsSlim$ | async) === false || (mainLayoutService.isMobile$ | async)\">\n <img [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoNameDark : mngCommons.appLogoNameLight\" />\n </a>\n <a *ngIf=\"mngCommons.menuPinEnabled\" class=\"menu-pin\" (click)=\"mainLayoutService.onToggleMenu($event)\">\n <span *ngIf=\"mngCommons.menuModeIsOverlay$ | async\" class=\"pi pi-times\"></span>\n <span\n *ngIf=\"(mngCommons.menuModeIsSidebar$ | async) && (mainLayoutService.sidebarStatic$ | async) === false && (mainLayoutService.pinActive$ | async)\"\n class=\"pi pi-unlock\"></span>\n <span *ngIf=\"(mngCommons.menuModeIsSidebar$ | async) && (mainLayoutService.sidebarStatic$ | async) && (mainLayoutService.pinActive$ | async)\" class=\"pi pi-lock\"></span>\n </a>\n </div>\n\n <div class=\"layout-menu-container\">\n <ul class=\"layout-menu\">\n <ng-container *ngFor=\"let item of menuItems; let i = index\">\n <li mng-menuitem *ngIf=\"!item.separator\" [item]=\"item\" [index]=\"i\" [root]=\"true\"></li>\n <li *ngIf=\"item.separator\" class=\"menu-separator\"></li>\n </ng-container>\n </ul>\n </div>\n\n <div class=\"menu-version\">\n <mng-version [version]=\"mngCommons.appVersion\"></mng-version>\n </div>\n</div>\n" }]
|
|
15709
|
+
args: [{ standalone: true, selector: 'mng-menu', imports: [NgClass, AsyncPipe, NgIf, NgForOf, MngMenuItemComponent$1, MngVersionComponent$1, RouterLink], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"layout-menu-wrapper\"\n [ngClass]=\"{'layout-sidebar-active': (mainLayoutService.sidebarActive$ | async)}\"\n (click)=\"mainLayoutService.onSidebarClick($event)\"\n (mouseover)=\"mainLayoutService.onSidebarMouseOver($event)\"\n (mouseleave)=\"mainLayoutService.onSidebarMouseLeave($event)\">\n <div class=\"menu-logo\">\n <a routerLink=\"/\" class=\"logo\">\n <img [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoDark : mngCommons.appLogoLight\" />\n </a>\n\n <a routerLink=\"/\" class=\"app-name\" *ngIf=\"(mngCommons.menuModeIsSlim$ | async) === false || (mainLayoutService.isMobile$ | async)\">\n <img [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoNameDark : mngCommons.appLogoNameLight\" />\n </a>\n <a *ngIf=\"mngCommons.menuPinEnabled\" class=\"menu-pin\" (click)=\"mainLayoutService.onToggleMenu($event)\">\n <span *ngIf=\"mngCommons.menuModeIsOverlay$ | async\" class=\"pi pi-times\"></span>\n <span\n *ngIf=\"(mngCommons.menuModeIsSidebar$ | async) && (mainLayoutService.sidebarStatic$ | async) === false && (mainLayoutService.pinActive$ | async)\"\n class=\"pi pi-unlock\"></span>\n <span *ngIf=\"(mngCommons.menuModeIsSidebar$ | async) && (mainLayoutService.sidebarStatic$ | async) && (mainLayoutService.pinActive$ | async)\" class=\"pi pi-lock\"></span>\n </a>\n </div>\n\n <div class=\"layout-menu-container\">\n <ul class=\"layout-menu\">\n <ng-container *ngFor=\"let item of menuItems; let i = index\">\n <li mng-menuitem *ngIf=\"!item.separator\" [item]=\"item\" [index]=\"i\" [root]=\"true\"></li>\n <li *ngIf=\"item.separator\" class=\"menu-separator\"></li>\n </ng-container>\n </ul>\n </div>\n\n <div class=\"menu-version\">\n <mng-version [version]=\"mngCommons.appVersion\"></mng-version>\n </div>\n</div>\n" }]
|
|
14892
15710
|
}], ctorParameters: function () { return [{ type: i1.ActivatedRoute }, { type: MngCommonsService }, { type: MngMainLayoutComponentService }]; } });
|
|
14893
15711
|
|
|
14894
|
-
class MngTopbarUserComponent {
|
|
15712
|
+
let MngTopbarUserComponent$1 = class MngTopbarUserComponent {
|
|
14895
15713
|
constructor(mngCommons, mainLayoutService, elementRef) {
|
|
14896
15714
|
this.mngCommons = mngCommons;
|
|
14897
15715
|
this.mainLayoutService = mainLayoutService;
|
|
@@ -14920,22 +15738,22 @@ class MngTopbarUserComponent {
|
|
|
14920
15738
|
}
|
|
14921
15739
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngTopbarUserComponent, deps: [{ token: MngCommonsService }, { token: MngMainLayoutComponentService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
14922
15740
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MngTopbarUserComponent, isStandalone: true, selector: "mng-topbar-user-component", ngImport: i0, template: "<a href=\"#\" class=\"user-block\" (click)=\"click($event)\">\n <i class=\"pi pi-fw pi-user\"></i>\n <span class=\"profile-item-username hidden sm:inline-block\"> {{ user?.displayName ?? user?.username }}</span>\n</a>\n<ul class=\"fadeInDown dropdown-window\">\n <li role=\"menuitem\">\n <a>\n <div class=\"flex\">\n <div class=\"flex-grow-0\">\n <i class=\"pi pi-fw pi-user\"></i>\n </div>\n <div class=\"flex-grow-1\">\n <strong>{{ user?.displayName ?? user?.username }}</strong>\n <small *ngIf=\"((userRoles$ | async)?.length ?? 0) > 0\">\n <br />\n {{ userRoles$ | mgnEnumerateAsync : undefined : undefined : undefined : 'roles' | async }}\n </small>\n </div>\n </div>\n </a>\n </li>\n <li role=\"menuitem\" *ngIf=\"user?.logout || user?.logoutUrl\">\n <a [href]=\"user?.logoutUrl ?? hrefJsVoid\" (click)=\"logout(user, $event)\">\n <i class=\"pi pi-fw pi-sign-out\"></i>\n <span>{{ 'mngTopbar.logout' | translate }}</span>\n </a>\n </li>\n</ul>\n", dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "pipe", type: MngEnumerateAsyncPipe, name: "mgnEnumerateAsync" }] }); }
|
|
14923
|
-
}
|
|
14924
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngTopbarUserComponent, decorators: [{
|
|
15741
|
+
};
|
|
15742
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngTopbarUserComponent$1, decorators: [{
|
|
14925
15743
|
type: Component,
|
|
14926
15744
|
args: [{ standalone: true, selector: 'mng-topbar-user-component', imports: [NgClass, NgIf, AsyncPipe, TranslateModule, MngEnumerateAsyncPipe], template: "<a href=\"#\" class=\"user-block\" (click)=\"click($event)\">\n <i class=\"pi pi-fw pi-user\"></i>\n <span class=\"profile-item-username hidden sm:inline-block\"> {{ user?.displayName ?? user?.username }}</span>\n</a>\n<ul class=\"fadeInDown dropdown-window\">\n <li role=\"menuitem\">\n <a>\n <div class=\"flex\">\n <div class=\"flex-grow-0\">\n <i class=\"pi pi-fw pi-user\"></i>\n </div>\n <div class=\"flex-grow-1\">\n <strong>{{ user?.displayName ?? user?.username }}</strong>\n <small *ngIf=\"((userRoles$ | async)?.length ?? 0) > 0\">\n <br />\n {{ userRoles$ | mgnEnumerateAsync : undefined : undefined : undefined : 'roles' | async }}\n </small>\n </div>\n </div>\n </a>\n </li>\n <li role=\"menuitem\" *ngIf=\"user?.logout || user?.logoutUrl\">\n <a [href]=\"user?.logoutUrl ?? hrefJsVoid\" (click)=\"logout(user, $event)\">\n <i class=\"pi pi-fw pi-sign-out\"></i>\n <span>{{ 'mngTopbar.logout' | translate }}</span>\n </a>\n </li>\n</ul>\n" }]
|
|
14927
15745
|
}], ctorParameters: function () { return [{ type: MngCommonsService }, { type: MngMainLayoutComponentService }, { type: i0.ElementRef }]; } });
|
|
14928
15746
|
|
|
14929
|
-
class MngTopbarComponent {
|
|
15747
|
+
let MngTopbarComponent$1 = class MngTopbarComponent {
|
|
14930
15748
|
constructor(applicationRef, route, mngCommons, mainLayoutService, config) {
|
|
14931
15749
|
this.applicationRef = applicationRef;
|
|
14932
15750
|
this.route = route;
|
|
14933
15751
|
this.mngCommons = mngCommons;
|
|
14934
15752
|
this.mainLayoutService = mainLayoutService;
|
|
14935
15753
|
this.config = config;
|
|
14936
|
-
this.breadcrumbComponent = MngBreadcrumbComponent;
|
|
14937
|
-
this.menuComponent = MngMenuComponent;
|
|
14938
|
-
this.topbarUserComponent = MngTopbarUserComponent;
|
|
15754
|
+
this.breadcrumbComponent = MngBreadcrumbComponent$1;
|
|
15755
|
+
this.menuComponent = MngMenuComponent$1;
|
|
15756
|
+
this.topbarUserComponent = MngTopbarUserComponent$1;
|
|
14939
15757
|
this.languages = ['en'];
|
|
14940
15758
|
this.selectedLanguage = 'en';
|
|
14941
15759
|
}
|
|
@@ -14956,9 +15774,9 @@ class MngTopbarComponent {
|
|
|
14956
15774
|
this.mngCommons.appLanguage = language;
|
|
14957
15775
|
}
|
|
14958
15776
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngTopbarComponent, deps: [{ token: i0.ApplicationRef }, { token: i1.ActivatedRoute }, { token: MngCommonsService }, { token: MngMainLayoutComponentService }, { token: MNG_MODULE_CONFIG_IT }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
14959
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MngTopbarComponent, isStandalone: true, selector: "mng-topbar", viewQueries: [{ propertyName: "topbarInjectionRef", first: true, predicate: ["userMenuItem"], descendants: true }, { propertyName: "templates", predicate: MngTemplateDirective, descendants: true }], ngImport: i0, template: "<div class=\"layout-topbar\">\n <div class=\"layout-topbar-left\">\n <a\n href=\"#\"\n class=\"topbar-menu-button\"\n (click)=\"mainLayoutService.onMenuButtonClick($event)\"\n *ngIf=\"(mngCommons.menuModeIsOverlay$ | async) || (mainLayoutService.isMobile$ | async)\">\n <i class=\"pi pi-bars\"></i>\n </a>\n\n <ng-container [mngComponent]=\"breadcrumbComponent\"></ng-container>\n </div>\n\n <ng-container [mngComponent]=\"menuComponent\"></ng-container>\n\n <div class=\"layout-topbar-right\">\n <ul class=\"layout-topbar-right-items\">\n <li\n #userMenuItem\n class=\"profile-item profile-item-extended\"\n [ngClass]=\"{'active-topmenuitem': (mainLayoutService.activeTopbarItem$ | async) === userMenuItem}\"\n [mngComponent]=\"topbarUserComponent\"\n [attachToHost]=\"true\"></li>\n <li *ngIf=\"languages.length > 1\" class=\"profile-item\">\n <i class=\"pi pi-fw pi-globe\"></i>\n <p-dropdown [ngModel]=\"selectedLanguage\" [options]=\"languages\" (onChange)=\"switchLanguage($event.value)\"></p-dropdown>\n </li>\n </ul>\n </div>\n</div>\n", dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: MngComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "inputs", "attachToHost"], outputs: ["instanceCreated"] }, { kind: "ngmodule", type: DropdownModule }, { kind: "component", type: i3$1.Dropdown, selector: "p-dropdown", inputs: ["scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "autofocus", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: RouterModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
14960
|
-
}
|
|
14961
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngTopbarComponent, decorators: [{
|
|
15777
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MngTopbarComponent, isStandalone: true, selector: "mng-topbar", viewQueries: [{ propertyName: "topbarInjectionRef", first: true, predicate: ["userMenuItem"], descendants: true }, { propertyName: "templates", predicate: MngTemplateDirective, descendants: true }], ngImport: i0, template: "<div class=\"layout-topbar\">\n <div class=\"layout-topbar-left\">\n <a\n href=\"#\"\n class=\"topbar-menu-button\"\n (click)=\"mainLayoutService.onMenuButtonClick($event)\"\n *ngIf=\"(mngCommons.menuModeIsOverlay$ | async) || (mainLayoutService.isMobile$ | async)\">\n <i class=\"pi pi-bars\"></i>\n </a>\n\n <ng-container [mngComponent]=\"breadcrumbComponent\"></ng-container>\n </div>\n\n <ng-container [mngComponent]=\"menuComponent\"></ng-container>\n\n <div class=\"layout-topbar-right\">\n <ul class=\"layout-topbar-right-items\">\n <li\n #userMenuItem\n class=\"profile-item profile-item-extended\"\n [ngClass]=\"{'active-topmenuitem': (mainLayoutService.activeTopbarItem$ | async) === userMenuItem}\"\n [mngComponent]=\"topbarUserComponent\"\n [attachToHost]=\"true\"></li>\n <li *ngIf=\"languages.length > 1\" class=\"profile-item\">\n <i class=\"pi pi-fw pi-globe\"></i>\n <p-dropdown [ngModel]=\"selectedLanguage\" [options]=\"languages\" (onChange)=\"switchLanguage($event.value)\"></p-dropdown>\n </li>\n </ul>\n </div>\n</div>\n", dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: MngComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "inputs", "attachToHost"], outputs: ["instanceCreated"] }, { kind: "ngmodule", type: DropdownModule }, { kind: "component", type: i3$1.Dropdown, selector: "p-dropdown", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: RouterModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
15778
|
+
};
|
|
15779
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngTopbarComponent$1, decorators: [{
|
|
14962
15780
|
type: Component,
|
|
14963
15781
|
args: [{ standalone: true, selector: 'mng-topbar', imports: [AsyncPipe, NgClass, TranslateModule, NgIf, MngComponentDirective, MngEnumerateAsyncPipe, DropdownModule, FormsModule, RouterModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"layout-topbar\">\n <div class=\"layout-topbar-left\">\n <a\n href=\"#\"\n class=\"topbar-menu-button\"\n (click)=\"mainLayoutService.onMenuButtonClick($event)\"\n *ngIf=\"(mngCommons.menuModeIsOverlay$ | async) || (mainLayoutService.isMobile$ | async)\">\n <i class=\"pi pi-bars\"></i>\n </a>\n\n <ng-container [mngComponent]=\"breadcrumbComponent\"></ng-container>\n </div>\n\n <ng-container [mngComponent]=\"menuComponent\"></ng-container>\n\n <div class=\"layout-topbar-right\">\n <ul class=\"layout-topbar-right-items\">\n <li\n #userMenuItem\n class=\"profile-item profile-item-extended\"\n [ngClass]=\"{'active-topmenuitem': (mainLayoutService.activeTopbarItem$ | async) === userMenuItem}\"\n [mngComponent]=\"topbarUserComponent\"\n [attachToHost]=\"true\"></li>\n <li *ngIf=\"languages.length > 1\" class=\"profile-item\">\n <i class=\"pi pi-fw pi-globe\"></i>\n <p-dropdown [ngModel]=\"selectedLanguage\" [options]=\"languages\" (onChange)=\"switchLanguage($event.value)\"></p-dropdown>\n </li>\n </ul>\n </div>\n</div>\n" }]
|
|
14964
15782
|
}], ctorParameters: function () { return [{ type: i0.ApplicationRef }, { type: i1.ActivatedRoute }, { type: MngCommonsService }, { type: MngMainLayoutComponentService }, { type: undefined, decorators: [{
|
|
@@ -14978,9 +15796,9 @@ class MngMainLayoutComponent {
|
|
|
14978
15796
|
this.mngCommons = mngCommons;
|
|
14979
15797
|
this.mainLayoutService = mainLayoutService;
|
|
14980
15798
|
this.config = config;
|
|
14981
|
-
this.topbarComponent = MngTopbarComponent;
|
|
14982
|
-
this.menuComponent = MngMenuComponent;
|
|
14983
|
-
this.footerComponent = MngFooterComponent;
|
|
15799
|
+
this.topbarComponent = MngTopbarComponent$1;
|
|
15800
|
+
this.menuComponent = MngMenuComponent$1;
|
|
15801
|
+
this.footerComponent = MngFooterComponent$1;
|
|
14984
15802
|
}
|
|
14985
15803
|
ngOnInit() {
|
|
14986
15804
|
if (this.config.components?.layout?.topbar) {
|
|
@@ -15020,11 +15838,11 @@ class MngErrorPageComponent {
|
|
|
15020
15838
|
this.mngCommons = mngCommons;
|
|
15021
15839
|
}
|
|
15022
15840
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngErrorPageComponent, deps: [{ token: MngCommonsService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
15023
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MngErrorPageComponent, isStandalone: true, selector: "mng-error-page", ngImport: i0, template: "<div class=\"exception-body
|
|
15841
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MngErrorPageComponent, isStandalone: true, selector: "mng-error-page", ngImport: i0, template: "<div [class]=\"'exception-body min-h-screen ' + (mngCommons.colorSchemeIsLight ? 'layout-light' : 'layout-dark')\">\n <div class=\"exception-container min-h-screen flex align-items-center justify-content-center flex-column bg-auto md:bg-contain bg-no-repeat\">\n <div class=\"exception-panel text-center flex align-items-center justify-content-center flex-column\">\n <h1 class=\"text-red-400 mb-0\">{{ 'pages.notFound.title' | translate }}</h1>\n <h3 class=\"text-red-300\">{{ 'pages.notFound.subtitle' | translate }}</h3>\n <button type=\"button\" pButton [label]=\"'general.returnHome' | translate\" [routerLink]=\"['/']\"></button>\n </div>\n <div class=\"exception-footer align-items-center flex\">\n <img [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoDark : mngCommons.appLogoLight\" class=\"exception-logo\" alt=\"App logo\" />\n <img [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoNameDark : mngCommons.appLogoNameLight\" class=\"exception-appname ml-3\" alt=\"App name\" />\n </div>\n </div>\n</div>\n", styles: [".exception-body{background:var(--surface-ground)}.exception-body .exception-container{background:var(--exception-pages-image);background-repeat:no-repeat;background-size:contain;box-sizing:border-box}.exception-body .exception-container .exception-panel{box-sizing:border-box;flex-grow:1;margin-top:3rem;margin-bottom:3rem}.exception-body .exception-container .exception-panel h1{font-size:140px;font-weight:900;text-shadow:0 0 50px rgba(252,97,97,.2)}.exception-body .exception-container .exception-panel h3{font-size:80px;font-weight:900;margin-top:-90px;margin-bottom:50px}.exception-body .exception-container .exception-panel button{margin-top:50px}.exception-body .exception-container .exception-footer{margin-bottom:2rem}.exception-body .exception-container .exception-footer .exception-logo{width:34px}.exception-body .exception-container .exception-footer .exception-appname{width:72px}\n"], dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i6.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] }); }
|
|
15024
15842
|
}
|
|
15025
15843
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngErrorPageComponent, decorators: [{
|
|
15026
15844
|
type: Component,
|
|
15027
|
-
args: [{ standalone: true, selector: 'mng-error-page', imports: [ButtonModule, TranslateModule, RouterLink], template: "<div class=\"exception-body
|
|
15845
|
+
args: [{ standalone: true, selector: 'mng-error-page', imports: [ButtonModule, TranslateModule, RouterLink], template: "<div [class]=\"'exception-body min-h-screen ' + (mngCommons.colorSchemeIsLight ? 'layout-light' : 'layout-dark')\">\n <div class=\"exception-container min-h-screen flex align-items-center justify-content-center flex-column bg-auto md:bg-contain bg-no-repeat\">\n <div class=\"exception-panel text-center flex align-items-center justify-content-center flex-column\">\n <h1 class=\"text-red-400 mb-0\">{{ 'pages.notFound.title' | translate }}</h1>\n <h3 class=\"text-red-300\">{{ 'pages.notFound.subtitle' | translate }}</h3>\n <button type=\"button\" pButton [label]=\"'general.returnHome' | translate\" [routerLink]=\"['/']\"></button>\n </div>\n <div class=\"exception-footer align-items-center flex\">\n <img [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoDark : mngCommons.appLogoLight\" class=\"exception-logo\" alt=\"App logo\" />\n <img [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoNameDark : mngCommons.appLogoNameLight\" class=\"exception-appname ml-3\" alt=\"App name\" />\n </div>\n </div>\n</div>\n", styles: [".exception-body{background:var(--surface-ground)}.exception-body .exception-container{background:var(--exception-pages-image);background-repeat:no-repeat;background-size:contain;box-sizing:border-box}.exception-body .exception-container .exception-panel{box-sizing:border-box;flex-grow:1;margin-top:3rem;margin-bottom:3rem}.exception-body .exception-container .exception-panel h1{font-size:140px;font-weight:900;text-shadow:0 0 50px rgba(252,97,97,.2)}.exception-body .exception-container .exception-panel h3{font-size:80px;font-weight:900;margin-top:-90px;margin-bottom:50px}.exception-body .exception-container .exception-panel button{margin-top:50px}.exception-body .exception-container .exception-footer{margin-bottom:2rem}.exception-body .exception-container .exception-footer .exception-logo{width:34px}.exception-body .exception-container .exception-footer .exception-appname{width:72px}\n"] }]
|
|
15028
15846
|
}], ctorParameters: function () { return [{ type: MngCommonsService }]; } });
|
|
15029
15847
|
|
|
15030
15848
|
class MngNotFoundPageComponent {
|
|
@@ -15032,11 +15850,11 @@ class MngNotFoundPageComponent {
|
|
|
15032
15850
|
this.mngCommons = mngCommons;
|
|
15033
15851
|
}
|
|
15034
15852
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngNotFoundPageComponent, deps: [{ token: MngCommonsService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
15035
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MngNotFoundPageComponent, isStandalone: true, selector: "mng-not-found-page", ngImport: i0, template: "<div class=\"exception-body
|
|
15853
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MngNotFoundPageComponent, isStandalone: true, selector: "mng-not-found-page", ngImport: i0, template: "<div [class]=\"'exception-body min-h-screen ' + (mngCommons.colorSchemeIsLight ? 'layout-light' : 'layout-dark')\">\n <div class=\"exception-container min-h-screen flex align-items-center justify-content-center flex-column bg-auto md:bg-contain bg-no-repeat\">\n <div class=\"exception-panel text-center flex align-items-center justify-content-center flex-column\">\n <h1 class=\"text-red-400 mb-0\">{{ 'pages.notFound.title' | translate }}</h1>\n <h3 class=\"text-red-300\">{{ 'pages.notFound.subtitle' | translate }}</h3>\n <p>{{ 'pages.notFound.message' | translate }}</p>\n <button type=\"button\" pButton [label]=\"'general.returnHome' | translate\" [routerLink]=\"['/']\"></button>\n </div>\n <div class=\"exception-footer align-items-center flex\">\n <img [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoDark : mngCommons.appLogoLight\" class=\"exception-logo\" alt=\"App logo\" />\n <img [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoNameDark : mngCommons.appLogoNameLight\" class=\"exception-appname ml-3\" alt=\"App name\" />\n </div>\n </div>\n</div>\n", styles: [".exception-body{background:var(--surface-ground)}.exception-body .exception-container{background:var(--exception-pages-image);background-repeat:no-repeat;background-size:contain;box-sizing:border-box}.exception-body .exception-container .exception-panel{box-sizing:border-box;flex-grow:1;margin-top:3rem;margin-bottom:3rem}.exception-body .exception-container .exception-panel h1{font-size:140px;font-weight:900;text-shadow:0 0 50px rgba(252,97,97,.2)}.exception-body .exception-container .exception-panel h3{font-size:80px;font-weight:900;margin-top:-90px;margin-bottom:50px}.exception-body .exception-container .exception-panel p{font-size:24px;font-weight:400;max-width:320px}.exception-body .exception-container .exception-panel button{margin-top:50px}.exception-body .exception-container .exception-footer{margin-bottom:2rem}.exception-body .exception-container .exception-footer .exception-logo{width:34px}.exception-body .exception-container .exception-footer .exception-appname{width:72px}\n"], dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i6.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] }); }
|
|
15036
15854
|
}
|
|
15037
15855
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngNotFoundPageComponent, decorators: [{
|
|
15038
15856
|
type: Component,
|
|
15039
|
-
args: [{ standalone: true, selector: 'mng-not-found-page', imports: [ButtonModule, RouterLink, TranslateModule], template: "<div class=\"exception-body
|
|
15857
|
+
args: [{ standalone: true, selector: 'mng-not-found-page', imports: [ButtonModule, RouterLink, TranslateModule], template: "<div [class]=\"'exception-body min-h-screen ' + (mngCommons.colorSchemeIsLight ? 'layout-light' : 'layout-dark')\">\n <div class=\"exception-container min-h-screen flex align-items-center justify-content-center flex-column bg-auto md:bg-contain bg-no-repeat\">\n <div class=\"exception-panel text-center flex align-items-center justify-content-center flex-column\">\n <h1 class=\"text-red-400 mb-0\">{{ 'pages.notFound.title' | translate }}</h1>\n <h3 class=\"text-red-300\">{{ 'pages.notFound.subtitle' | translate }}</h3>\n <p>{{ 'pages.notFound.message' | translate }}</p>\n <button type=\"button\" pButton [label]=\"'general.returnHome' | translate\" [routerLink]=\"['/']\"></button>\n </div>\n <div class=\"exception-footer align-items-center flex\">\n <img [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoDark : mngCommons.appLogoLight\" class=\"exception-logo\" alt=\"App logo\" />\n <img [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoNameDark : mngCommons.appLogoNameLight\" class=\"exception-appname ml-3\" alt=\"App name\" />\n </div>\n </div>\n</div>\n", styles: [".exception-body{background:var(--surface-ground)}.exception-body .exception-container{background:var(--exception-pages-image);background-repeat:no-repeat;background-size:contain;box-sizing:border-box}.exception-body .exception-container .exception-panel{box-sizing:border-box;flex-grow:1;margin-top:3rem;margin-bottom:3rem}.exception-body .exception-container .exception-panel h1{font-size:140px;font-weight:900;text-shadow:0 0 50px rgba(252,97,97,.2)}.exception-body .exception-container .exception-panel h3{font-size:80px;font-weight:900;margin-top:-90px;margin-bottom:50px}.exception-body .exception-container .exception-panel p{font-size:24px;font-weight:400;max-width:320px}.exception-body .exception-container .exception-panel button{margin-top:50px}.exception-body .exception-container .exception-footer{margin-bottom:2rem}.exception-body .exception-container .exception-footer .exception-logo{width:34px}.exception-body .exception-container .exception-footer .exception-appname{width:72px}\n"] }]
|
|
15040
15858
|
}], ctorParameters: function () { return [{ type: MngCommonsService }]; } });
|
|
15041
15859
|
|
|
15042
15860
|
class MngErrorHandler {
|
|
@@ -15070,6 +15888,14 @@ class MngCommonsInitService {
|
|
|
15070
15888
|
this.moduleConfig = inject(MNG_MODULE_CONFIG_IT, { optional: true });
|
|
15071
15889
|
this.commonsInitializers = inject(MNG_COMMONS_INITIALIZER_IT, { optional: true });
|
|
15072
15890
|
this.isInitialized = false;
|
|
15891
|
+
this.isInitializedSubject = new ReplaySubject();
|
|
15892
|
+
this.commonsInitServiceEvents = new Subject();
|
|
15893
|
+
}
|
|
15894
|
+
get events$() {
|
|
15895
|
+
return this.commonsInitServiceEvents.asObservable();
|
|
15896
|
+
}
|
|
15897
|
+
get isInitialized$() {
|
|
15898
|
+
return this.isInitializedSubject.asObservable().pipe(take(1));
|
|
15073
15899
|
}
|
|
15074
15900
|
initialize() {
|
|
15075
15901
|
if (this.isInitialized) {
|
|
@@ -15079,13 +15905,16 @@ class MngCommonsInitService {
|
|
|
15079
15905
|
MngLoggerService.configure({ timestampFormat: this.moduleConfig?.log?.timestampFormat });
|
|
15080
15906
|
const ctxLogger = this.logger.create('MngCommonsInitService');
|
|
15081
15907
|
ctxLogger.debug('Commons initialization is starting');
|
|
15908
|
+
this.commonsInitServiceEvents.next(MngCommonsInitEventEnum.CommonsInitStart);
|
|
15082
15909
|
// init router
|
|
15083
15910
|
this.mngRouter.initialize();
|
|
15084
15911
|
// init configurations with settings from module config
|
|
15085
15912
|
this.config.init(this.httpClient, this.logger);
|
|
15086
15913
|
this.config.addModuleConfigSource(this.moduleConfig ?? undefined);
|
|
15914
|
+
this.commonsInitServiceEvents.next(MngCommonsInitEventEnum.ConfigSourceModuleLoaded);
|
|
15087
15915
|
if (this.moduleConfig?.configuration?.projectEnvironment) {
|
|
15088
15916
|
this.config.addEnvironmentSource(this.moduleConfig.configuration.projectEnvironment);
|
|
15917
|
+
this.commonsInitServiceEvents.next(MngCommonsInitEventEnum.ConfigSourceProjectEnvLoaded);
|
|
15089
15918
|
}
|
|
15090
15919
|
// init configurations with settings from module config for json source
|
|
15091
15920
|
if (!(this.moduleConfig?.configuration?.skipJsonSourceInit ?? false)) {
|
|
@@ -15100,8 +15929,12 @@ class MngCommonsInitService {
|
|
|
15100
15929
|
else {
|
|
15101
15930
|
this.config.addJsonSource({ url: jsonSource, enableEnvProd: jsonSourceEnableEnvProd });
|
|
15102
15931
|
}
|
|
15932
|
+
this.commonsInitServiceEvents.next(MngCommonsInitEventEnum.ConfigSourceJsonAdded);
|
|
15103
15933
|
}
|
|
15104
15934
|
return this.config.loadJsonConfigurations().pipe(mergeMap(() => {
|
|
15935
|
+
if (!(this.moduleConfig?.configuration?.skipJsonSourceInit ?? false)) {
|
|
15936
|
+
this.commonsInitServiceEvents.next(MngCommonsInitEventEnum.ConfigSourceJsonLoaded);
|
|
15937
|
+
}
|
|
15105
15938
|
// init logger
|
|
15106
15939
|
MngLoggerService.init(this.config, this.logPublishers ?? []);
|
|
15107
15940
|
if (this.commonsInitializers) {
|
|
@@ -15113,7 +15946,16 @@ class MngCommonsInitService {
|
|
|
15113
15946
|
}
|
|
15114
15947
|
}), map(() => {
|
|
15115
15948
|
ctxLogger.debug('Commons initialization is finished');
|
|
15949
|
+
this.commonsInitServiceEvents.next(MngCommonsInitEventEnum.CommonsInitEnd);
|
|
15950
|
+
this.commonsInitServiceEvents.complete();
|
|
15951
|
+
this.isInitializedSubject.next(true);
|
|
15116
15952
|
return this.mngCommons.reset();
|
|
15953
|
+
}), catchError(err => {
|
|
15954
|
+
ctxLogger.warn('Commons initialization failed with error', err);
|
|
15955
|
+
this.commonsInitServiceEvents.next(MngCommonsInitEventEnum.CommonsInitError);
|
|
15956
|
+
this.commonsInitServiceEvents.complete();
|
|
15957
|
+
this.isInitializedSubject.next(false);
|
|
15958
|
+
return throwError(() => err);
|
|
15117
15959
|
}));
|
|
15118
15960
|
}
|
|
15119
15961
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngCommonsInitService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
@@ -15514,6 +16356,7 @@ const standalone = [
|
|
|
15514
16356
|
MngActionRouteComponent,
|
|
15515
16357
|
// directives
|
|
15516
16358
|
MngComponentDirective,
|
|
16359
|
+
MngDialogKeydownHandlerDirective,
|
|
15517
16360
|
MngTemplateDirective,
|
|
15518
16361
|
// pipes
|
|
15519
16362
|
JsonPathPipe,
|
|
@@ -15528,14 +16371,14 @@ const standalone = [
|
|
|
15528
16371
|
MngEnumerateAsyncPipe,
|
|
15529
16372
|
MngLocaleDefaultRowClassPipe,
|
|
15530
16373
|
// layout components
|
|
15531
|
-
MngBreadcrumbComponent,
|
|
15532
|
-
MngFooterComponent,
|
|
16374
|
+
MngBreadcrumbComponent$1,
|
|
16375
|
+
MngFooterComponent$1,
|
|
15533
16376
|
MngMainLayoutComponent,
|
|
15534
|
-
MngMenuComponent,
|
|
15535
|
-
MngMenuItemComponent,
|
|
15536
|
-
MngTopbarComponent,
|
|
15537
|
-
MngTopbarUserComponent,
|
|
15538
|
-
MngVersionComponent,
|
|
16377
|
+
MngMenuComponent$1,
|
|
16378
|
+
MngMenuItemComponent$1,
|
|
16379
|
+
MngTopbarComponent$1,
|
|
16380
|
+
MngTopbarUserComponent$1,
|
|
16381
|
+
MngVersionComponent$1,
|
|
15539
16382
|
// mng fields
|
|
15540
16383
|
MngAutocompleteComponent,
|
|
15541
16384
|
MngDropdownComponent,
|
|
@@ -15560,6 +16403,7 @@ const standalone = [
|
|
|
15560
16403
|
MngTableviewComponent,
|
|
15561
16404
|
MngTableColumnValueComponent,
|
|
15562
16405
|
MngTableColumnFilterComponent,
|
|
16406
|
+
MngTableColumnFilterFullComponent,
|
|
15563
16407
|
MngTableviewRouteComponent,
|
|
15564
16408
|
// editor components
|
|
15565
16409
|
MngFormEditorComponent,
|
|
@@ -15622,6 +16466,7 @@ class MngCommonsModule {
|
|
|
15622
16466
|
ImageModule, MngActionRouteComponent,
|
|
15623
16467
|
// directives
|
|
15624
16468
|
MngComponentDirective,
|
|
16469
|
+
MngDialogKeydownHandlerDirective,
|
|
15625
16470
|
MngTemplateDirective,
|
|
15626
16471
|
// pipes
|
|
15627
16472
|
JsonPathPipe,
|
|
@@ -15636,14 +16481,14 @@ class MngCommonsModule {
|
|
|
15636
16481
|
MngEnumerateAsyncPipe,
|
|
15637
16482
|
MngLocaleDefaultRowClassPipe,
|
|
15638
16483
|
// layout components
|
|
15639
|
-
MngBreadcrumbComponent,
|
|
15640
|
-
MngFooterComponent,
|
|
16484
|
+
MngBreadcrumbComponent$1,
|
|
16485
|
+
MngFooterComponent$1,
|
|
15641
16486
|
MngMainLayoutComponent,
|
|
15642
|
-
MngMenuComponent,
|
|
15643
|
-
MngMenuItemComponent,
|
|
15644
|
-
MngTopbarComponent,
|
|
15645
|
-
MngTopbarUserComponent,
|
|
15646
|
-
MngVersionComponent,
|
|
16487
|
+
MngMenuComponent$1,
|
|
16488
|
+
MngMenuItemComponent$1,
|
|
16489
|
+
MngTopbarComponent$1,
|
|
16490
|
+
MngTopbarUserComponent$1,
|
|
16491
|
+
MngVersionComponent$1,
|
|
15647
16492
|
// mng fields
|
|
15648
16493
|
MngAutocompleteComponent,
|
|
15649
16494
|
MngDropdownComponent,
|
|
@@ -15668,6 +16513,7 @@ class MngCommonsModule {
|
|
|
15668
16513
|
MngTableviewComponent,
|
|
15669
16514
|
MngTableColumnValueComponent,
|
|
15670
16515
|
MngTableColumnFilterComponent,
|
|
16516
|
+
MngTableColumnFilterFullComponent,
|
|
15671
16517
|
MngTableviewRouteComponent,
|
|
15672
16518
|
// editor components
|
|
15673
16519
|
MngFormEditorComponent,
|
|
@@ -15715,6 +16561,7 @@ class MngCommonsModule {
|
|
|
15715
16561
|
ImageModule, MngActionRouteComponent,
|
|
15716
16562
|
// directives
|
|
15717
16563
|
MngComponentDirective,
|
|
16564
|
+
MngDialogKeydownHandlerDirective,
|
|
15718
16565
|
MngTemplateDirective,
|
|
15719
16566
|
// pipes
|
|
15720
16567
|
JsonPathPipe,
|
|
@@ -15729,14 +16576,14 @@ class MngCommonsModule {
|
|
|
15729
16576
|
MngEnumerateAsyncPipe,
|
|
15730
16577
|
MngLocaleDefaultRowClassPipe,
|
|
15731
16578
|
// layout components
|
|
15732
|
-
MngBreadcrumbComponent,
|
|
15733
|
-
MngFooterComponent,
|
|
16579
|
+
MngBreadcrumbComponent$1,
|
|
16580
|
+
MngFooterComponent$1,
|
|
15734
16581
|
MngMainLayoutComponent,
|
|
15735
|
-
MngMenuComponent,
|
|
15736
|
-
MngMenuItemComponent,
|
|
15737
|
-
MngTopbarComponent,
|
|
15738
|
-
MngTopbarUserComponent,
|
|
15739
|
-
MngVersionComponent,
|
|
16582
|
+
MngMenuComponent$1,
|
|
16583
|
+
MngMenuItemComponent$1,
|
|
16584
|
+
MngTopbarComponent$1,
|
|
16585
|
+
MngTopbarUserComponent$1,
|
|
16586
|
+
MngVersionComponent$1,
|
|
15740
16587
|
// mng fields
|
|
15741
16588
|
MngAutocompleteComponent,
|
|
15742
16589
|
MngDropdownComponent,
|
|
@@ -15761,6 +16608,7 @@ class MngCommonsModule {
|
|
|
15761
16608
|
MngTableviewComponent,
|
|
15762
16609
|
MngTableColumnValueComponent,
|
|
15763
16610
|
MngTableColumnFilterComponent,
|
|
16611
|
+
MngTableColumnFilterFullComponent,
|
|
15764
16612
|
MngTableviewRouteComponent,
|
|
15765
16613
|
// editor components
|
|
15766
16614
|
MngFormEditorComponent,
|
|
@@ -15782,12 +16630,12 @@ class MngCommonsModule {
|
|
|
15782
16630
|
}),
|
|
15783
16631
|
FormlyModule.forChild(), primeNgModules, MngActionRouteComponent,
|
|
15784
16632
|
// layout components
|
|
15785
|
-
MngBreadcrumbComponent,
|
|
15786
|
-
MngFooterComponent,
|
|
15787
|
-
MngMenuComponent,
|
|
15788
|
-
MngMenuItemComponent,
|
|
15789
|
-
MngTopbarComponent,
|
|
15790
|
-
MngTopbarUserComponent,
|
|
16633
|
+
MngBreadcrumbComponent$1,
|
|
16634
|
+
MngFooterComponent$1,
|
|
16635
|
+
MngMenuComponent$1,
|
|
16636
|
+
MngMenuItemComponent$1,
|
|
16637
|
+
MngTopbarComponent$1,
|
|
16638
|
+
MngTopbarUserComponent$1,
|
|
15791
16639
|
// mng fields
|
|
15792
16640
|
MngAutocompleteComponent,
|
|
15793
16641
|
MngDropdownComponent,
|
|
@@ -15810,6 +16658,7 @@ class MngCommonsModule {
|
|
|
15810
16658
|
MngTableviewComponent,
|
|
15811
16659
|
MngTableColumnValueComponent,
|
|
15812
16660
|
MngTableColumnFilterComponent,
|
|
16661
|
+
MngTableColumnFilterFullComponent,
|
|
15813
16662
|
MngTableviewRouteComponent,
|
|
15814
16663
|
// editor components
|
|
15815
16664
|
MngFormEditorComponent,
|
|
@@ -16032,12 +16881,708 @@ class AMngCrudApiService extends AMngGetAllApiService {
|
|
|
16032
16881
|
}
|
|
16033
16882
|
}
|
|
16034
16883
|
|
|
16884
|
+
class MngBreadcrumbComponent {
|
|
16885
|
+
constructor() {
|
|
16886
|
+
this.mngCommons = inject(MngCommonsService);
|
|
16887
|
+
this.mappedBreadcrumbs$ = this.mngCommons.breadcrumbs$.pipe(map((items) => items.map(el => this.mapMngMenuItem(el))));
|
|
16888
|
+
}
|
|
16889
|
+
mapMngMenuItem(item) {
|
|
16890
|
+
return {
|
|
16891
|
+
...item,
|
|
16892
|
+
url: item.href,
|
|
16893
|
+
badgeStyleClass: item.badgeClassName,
|
|
16894
|
+
styleClass: item.className
|
|
16895
|
+
};
|
|
16896
|
+
}
|
|
16897
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngBreadcrumbComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
16898
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MngBreadcrumbComponent, isStandalone: true, selector: "mng-breadcrumb-v2", ngImport: i0, template: "<div class=\"layout-breadcrumb flex align-items-center relative h-3rem\">\n <nav>\n <ol class=\"relative z-2\">\n <ng-template ngFor let-item let-last=\"last\" [ngForOf]=\"mappedBreadcrumbs$ | async\">\n <li>{{ item.label! | translate }}</li>\n <li *ngIf=\"!last\" class=\"layout-breadcrumb-chevron\">/</li>\n </ng-template>\n </ol>\n </nav>\n</div>\n", dependencies: [{ kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "ngmodule", type: ButtonModule }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
16899
|
+
}
|
|
16900
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngBreadcrumbComponent, decorators: [{
|
|
16901
|
+
type: Component,
|
|
16902
|
+
args: [{ standalone: true, selector: 'mng-breadcrumb-v2', imports: [NgForOf, NgClass, InputTextModule, ButtonModule, AsyncPipe, NgIf, TranslateModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"layout-breadcrumb flex align-items-center relative h-3rem\">\n <nav>\n <ol class=\"relative z-2\">\n <ng-template ngFor let-item let-last=\"last\" [ngForOf]=\"mappedBreadcrumbs$ | async\">\n <li>{{ item.label! | translate }}</li>\n <li *ngIf=\"!last\" class=\"layout-breadcrumb-chevron\">/</li>\n </ng-template>\n </ol>\n </nav>\n</div>\n" }]
|
|
16903
|
+
}] });
|
|
16904
|
+
|
|
16905
|
+
class MngFooterComponent {
|
|
16906
|
+
constructor() {
|
|
16907
|
+
this.mngCommons = inject(MngCommonsService);
|
|
16908
|
+
this.currentYear = new Date().getFullYear();
|
|
16909
|
+
}
|
|
16910
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
16911
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MngFooterComponent, isStandalone: true, selector: "mng-footer-v2", ngImport: i0, template: "<div class=\"layout-footer\">\n <div class=\"footer-logo-container\">\n <img id=\"footer-logo\" [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoDark : mngCommons.appLogoLight\" alt=\"atlantis-layout\" />\n <span class=\"app-name\">{{ mngCommons.appName | translate }}</span>\n </div>\n <span class=\"copyright\">© {{ mngCommons.appOwner | translate }} - {{ currentYear }}</span>\n</div>\n", dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
16912
|
+
}
|
|
16913
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngFooterComponent, decorators: [{
|
|
16914
|
+
type: Component,
|
|
16915
|
+
args: [{ standalone: true, selector: 'mng-footer-v2', imports: [TranslateModule, NgOptimizedImage], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"layout-footer\">\n <div class=\"footer-logo-container\">\n <img id=\"footer-logo\" [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoDark : mngCommons.appLogoLight\" alt=\"atlantis-layout\" />\n <span class=\"app-name\">{{ mngCommons.appName | translate }}</span>\n </div>\n <span class=\"copyright\">© {{ mngCommons.appOwner | translate }} - {{ currentYear }}</span>\n</div>\n" }]
|
|
16916
|
+
}] });
|
|
16917
|
+
|
|
16918
|
+
class MngMainLayoutComponentV2Service {
|
|
16919
|
+
constructor() {
|
|
16920
|
+
this.config = inject(MNG_MODULE_CONFIG_IT);
|
|
16921
|
+
this.state = {
|
|
16922
|
+
staticMenuDesktopInactive$: new BehaviorSubject(false),
|
|
16923
|
+
overlayMenuActive$: new BehaviorSubject(false),
|
|
16924
|
+
rightMenuActive$: new BehaviorSubject(false),
|
|
16925
|
+
configSidebarVisible$: new BehaviorSubject(false),
|
|
16926
|
+
staticMenuMobileActive$: new BehaviorSubject(false),
|
|
16927
|
+
menuHoverActive$: new BehaviorSubject(false),
|
|
16928
|
+
sidebarActive$: new BehaviorSubject(false),
|
|
16929
|
+
anchored$: new BehaviorSubject(false)
|
|
16930
|
+
};
|
|
16931
|
+
this.overlayOpen = new Subject();
|
|
16932
|
+
this.overlayOpen$ = this.overlayOpen.asObservable();
|
|
16933
|
+
}
|
|
16934
|
+
onMenuToggle() {
|
|
16935
|
+
if (this.isOverlay()) {
|
|
16936
|
+
this.state.overlayMenuActive$.next(!this.state.overlayMenuActive$.value);
|
|
16937
|
+
if (this.state.overlayMenuActive$.value) {
|
|
16938
|
+
this.overlayOpen.next(null);
|
|
16939
|
+
}
|
|
16940
|
+
}
|
|
16941
|
+
if (this.isDesktop()) {
|
|
16942
|
+
this.state.staticMenuDesktopInactive$.next(!this.state.staticMenuDesktopInactive$.value);
|
|
16943
|
+
}
|
|
16944
|
+
else {
|
|
16945
|
+
this.state.staticMenuMobileActive$.next(!this.state.staticMenuMobileActive$.value);
|
|
16946
|
+
if (this.state.staticMenuMobileActive$.value) {
|
|
16947
|
+
this.overlayOpen.next(null);
|
|
16948
|
+
}
|
|
16949
|
+
}
|
|
16950
|
+
}
|
|
16951
|
+
isOverlay() {
|
|
16952
|
+
return this.config.menuV2?.mode === 'overlay';
|
|
16953
|
+
}
|
|
16954
|
+
isDesktop() {
|
|
16955
|
+
return window.innerWidth > 991;
|
|
16956
|
+
}
|
|
16957
|
+
isMobile() {
|
|
16958
|
+
return !this.isDesktop();
|
|
16959
|
+
}
|
|
16960
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngMainLayoutComponentV2Service, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
16961
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngMainLayoutComponentV2Service }); }
|
|
16962
|
+
}
|
|
16963
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngMainLayoutComponentV2Service, decorators: [{
|
|
16964
|
+
type: Injectable
|
|
16965
|
+
}] });
|
|
16966
|
+
|
|
16967
|
+
class MenuService {
|
|
16968
|
+
constructor() {
|
|
16969
|
+
this.logger = MngLoggerService.create('MenuService');
|
|
16970
|
+
this.router = inject(Router);
|
|
16971
|
+
this.mngRouter = inject(MngRouterService);
|
|
16972
|
+
this.menuSource = new ReplaySubject(1);
|
|
16973
|
+
this.resetSource = new Subject();
|
|
16974
|
+
this.menuSource$ = this.menuSource.asObservable();
|
|
16975
|
+
this.resetSource$ = this.resetSource.asObservable();
|
|
16976
|
+
this.menuItems = [];
|
|
16977
|
+
this.routeLoadedChildrenSubscriptions = [];
|
|
16978
|
+
}
|
|
16979
|
+
initialize(menuItems) {
|
|
16980
|
+
this.menuItems = menuItems;
|
|
16981
|
+
this.routeLoadedChildrenSubscriptions.forEach(s => s.unsubscribe());
|
|
16982
|
+
this.routeLoadedChildrenSubscriptions = [];
|
|
16983
|
+
this.generateMenuItemKeys(menuItems);
|
|
16984
|
+
this.router.events.pipe(filter(event => event instanceof NavigationEnd)).subscribe(e => {
|
|
16985
|
+
this.findAndSetActiveMenuItem(e.urlAfterRedirects);
|
|
16986
|
+
});
|
|
16987
|
+
this.findAndSetActiveMenuItem(this.router.url);
|
|
16988
|
+
}
|
|
16989
|
+
generateMenuItemKeys(menuItems, parentKey = '') {
|
|
16990
|
+
menuItems.forEach((item, idx) => {
|
|
16991
|
+
if (!item.index) {
|
|
16992
|
+
item.index = idx;
|
|
16993
|
+
item.key = parentKey ? parentKey + '-' + idx : idx.toString();
|
|
16994
|
+
}
|
|
16995
|
+
if (item.items) {
|
|
16996
|
+
this.generateMenuItemKeys(item.items, item.key);
|
|
16997
|
+
}
|
|
16998
|
+
else if (item.lazyChildren) {
|
|
16999
|
+
this.listenToMenuItemLazyChildrenLoad(item);
|
|
17000
|
+
}
|
|
17001
|
+
});
|
|
17002
|
+
}
|
|
17003
|
+
findAndSetActiveMenuItem(url) {
|
|
17004
|
+
const matches = this.findActiveRouteMatches(this.menuItems, url);
|
|
17005
|
+
if (matches.length === 0) {
|
|
17006
|
+
this.reset();
|
|
17007
|
+
}
|
|
17008
|
+
else {
|
|
17009
|
+
const matchKey = matches[0][matches[0].length - 1].key;
|
|
17010
|
+
if (matchKey) {
|
|
17011
|
+
this.menuSource.next({
|
|
17012
|
+
key: matchKey,
|
|
17013
|
+
routeEvent: true
|
|
17014
|
+
});
|
|
17015
|
+
}
|
|
17016
|
+
else {
|
|
17017
|
+
this.logger.warn(`Found active menu item for url ${url}, but item key is not present`, matches);
|
|
17018
|
+
this.reset();
|
|
17019
|
+
}
|
|
17020
|
+
if (matches.length > 1) {
|
|
17021
|
+
this.logger.warn(`Multiple active menu items found for url ${url}`, matches);
|
|
17022
|
+
}
|
|
17023
|
+
}
|
|
17024
|
+
}
|
|
17025
|
+
listenToMenuItemLazyChildrenLoad(menuItem) {
|
|
17026
|
+
this.routeLoadedChildrenSubscriptions.push(this.mngRouter
|
|
17027
|
+
.getRouteLoadedChildren$(menuItem.routerLink ?? '/')
|
|
17028
|
+
.pipe(take(1))
|
|
17029
|
+
.subscribe({
|
|
17030
|
+
next: routes => {
|
|
17031
|
+
let menuItems = routes.filter(r => Array.isArray(r.data?.menuItems)).flatMap(r => r.data.menuItems);
|
|
17032
|
+
menuItems = RouteUtil.adjustMenuLazyChildrenRouterLinks(menuItem, menuItems);
|
|
17033
|
+
menuItem.items = menuItems;
|
|
17034
|
+
menuItem.lazyChildren = false;
|
|
17035
|
+
this.generateMenuItemKeys(menuItem.items, menuItem.key);
|
|
17036
|
+
this.findAndSetActiveMenuItem(this.router.url);
|
|
17037
|
+
}
|
|
17038
|
+
}));
|
|
17039
|
+
}
|
|
17040
|
+
findActiveRouteMatches(menuItems, url) {
|
|
17041
|
+
const matches = [];
|
|
17042
|
+
for (const menuItem of menuItems) {
|
|
17043
|
+
if (menuItem.routerLink) {
|
|
17044
|
+
const isActive = RouteUtil.doesUrlMatchRouterLink(menuItem.routerLink, url);
|
|
17045
|
+
if (isActive) {
|
|
17046
|
+
if (Array.isArray(menuItem.items)) {
|
|
17047
|
+
const itemsMatches = this.findActiveRouteMatches(menuItem.items, url);
|
|
17048
|
+
if (itemsMatches.length > 0) {
|
|
17049
|
+
matches.push(...itemsMatches.map(c => [menuItem, ...c]));
|
|
17050
|
+
}
|
|
17051
|
+
else {
|
|
17052
|
+
matches.push([menuItem]);
|
|
17053
|
+
}
|
|
17054
|
+
}
|
|
17055
|
+
else {
|
|
17056
|
+
matches.push([menuItem]);
|
|
17057
|
+
}
|
|
17058
|
+
}
|
|
17059
|
+
}
|
|
17060
|
+
else if (Array.isArray(menuItem.items)) {
|
|
17061
|
+
const itemsMatches = this.findActiveRouteMatches(menuItem.items, url);
|
|
17062
|
+
if (itemsMatches.length > 0) {
|
|
17063
|
+
matches.push(...itemsMatches.map(c => [menuItem, ...c]));
|
|
17064
|
+
}
|
|
17065
|
+
}
|
|
17066
|
+
}
|
|
17067
|
+
return matches;
|
|
17068
|
+
}
|
|
17069
|
+
reset() {
|
|
17070
|
+
this.resetSource.next(true);
|
|
17071
|
+
}
|
|
17072
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MenuService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
17073
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MenuService, providedIn: 'root' }); }
|
|
17074
|
+
}
|
|
17075
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MenuService, decorators: [{
|
|
17076
|
+
type: Injectable,
|
|
17077
|
+
args: [{
|
|
17078
|
+
providedIn: 'root'
|
|
17079
|
+
}]
|
|
17080
|
+
}] });
|
|
17081
|
+
|
|
17082
|
+
class MngMenuItemComponent {
|
|
17083
|
+
constructor() {
|
|
17084
|
+
this.router = inject(Router);
|
|
17085
|
+
this.injector = inject(Injector);
|
|
17086
|
+
this.destroyRef = inject(DestroyRef);
|
|
17087
|
+
this.route = inject(ActivatedRoute);
|
|
17088
|
+
this.menuService = inject(MenuService);
|
|
17089
|
+
this.authorization = inject(MngAuthorizationService);
|
|
17090
|
+
this.layoutService = inject(MngMainLayoutComponentV2Service);
|
|
17091
|
+
this.isPermittedSubject = new BehaviorSubject(true);
|
|
17092
|
+
this.guardsIsAllowedSubject = new BehaviorSubject(true);
|
|
17093
|
+
this.childrenVisibilitySubject = [];
|
|
17094
|
+
this.root = false;
|
|
17095
|
+
this.visibleChangeEventEmitter = new EventEmitter();
|
|
17096
|
+
this.active = signal(false);
|
|
17097
|
+
this.visible = signal(false);
|
|
17098
|
+
this.guardsIsAllowed$ = this.guardsIsAllowedSubject.asObservable().pipe(distinctUntilChanged());
|
|
17099
|
+
this.isPermitted$ = this.isPermittedSubject.asObservable().pipe(distinctUntilChanged());
|
|
17100
|
+
this.menuService.menuSource$.pipe(takeUntilDestroyed()).subscribe(value => {
|
|
17101
|
+
setTimeout(() => {
|
|
17102
|
+
this.active.set(this.item.key === value.key || value.key.startsWith((this.item.key ?? '') + '-'));
|
|
17103
|
+
});
|
|
17104
|
+
});
|
|
17105
|
+
this.menuService.resetSource$.pipe(takeUntilDestroyed()).subscribe(() => {
|
|
17106
|
+
this.active.set(false);
|
|
17107
|
+
});
|
|
17108
|
+
}
|
|
17109
|
+
ngOnInit() {
|
|
17110
|
+
if (this.item.routerLink) {
|
|
17111
|
+
if (typeof this.item.routerLink === 'string') {
|
|
17112
|
+
this.itemUrl = this.item.routerLink;
|
|
17113
|
+
}
|
|
17114
|
+
else {
|
|
17115
|
+
this.itemUrl = this.router.parseUrl(this.item.routerLink.join('/'));
|
|
17116
|
+
}
|
|
17117
|
+
}
|
|
17118
|
+
this.routerEventsSubscription = this.router.events.subscribe(next => {
|
|
17119
|
+
if (next instanceof GuardsCheckEnd && next.shouldActivate) {
|
|
17120
|
+
this.checkIfMenuItemIsAllowedFromGuard(next.state);
|
|
17121
|
+
}
|
|
17122
|
+
else if (next instanceof NavigationEnd) {
|
|
17123
|
+
if (!this.layoutService.isMobile()) {
|
|
17124
|
+
this.active.set(false);
|
|
17125
|
+
}
|
|
17126
|
+
else {
|
|
17127
|
+
this.updateActiveStateFromRoute();
|
|
17128
|
+
}
|
|
17129
|
+
}
|
|
17130
|
+
});
|
|
17131
|
+
if (this.item.permissions) {
|
|
17132
|
+
this.authorization
|
|
17133
|
+
.isPermitted(this.item.permissions)
|
|
17134
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
17135
|
+
.subscribe({
|
|
17136
|
+
next: isPermitted => {
|
|
17137
|
+
this.isPermittedSubject.next(isPermitted);
|
|
17138
|
+
}
|
|
17139
|
+
});
|
|
17140
|
+
}
|
|
17141
|
+
this.checkIfMenuItemIsAllowedFromGuard(this.router.routerState.snapshot);
|
|
17142
|
+
combineLatest([of(this.item.visible !== false), this.isPermitted$, this.guardsIsAllowed$])
|
|
17143
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
17144
|
+
.subscribe({
|
|
17145
|
+
next: res => {
|
|
17146
|
+
const isVisible = res.every(r => r === true);
|
|
17147
|
+
this.active.set(!isVisible);
|
|
17148
|
+
this.visible.set(isVisible);
|
|
17149
|
+
}
|
|
17150
|
+
});
|
|
17151
|
+
this.processItemChildrenVisibility();
|
|
17152
|
+
}
|
|
17153
|
+
ngOnDestroy() {
|
|
17154
|
+
this.routerEventsSubscription?.unsubscribe();
|
|
17155
|
+
this.guardsIsAllowedSubscription?.unsubscribe();
|
|
17156
|
+
}
|
|
17157
|
+
get submenuAnimation() {
|
|
17158
|
+
return this.root ? 'expanded' : this.active() ? 'expanded' : 'collapsed';
|
|
17159
|
+
}
|
|
17160
|
+
get activeClass() {
|
|
17161
|
+
return this.active() && !this.root;
|
|
17162
|
+
}
|
|
17163
|
+
itemClick(event) {
|
|
17164
|
+
// avoid processing disabled items
|
|
17165
|
+
if (this.item.disabled) {
|
|
17166
|
+
event.preventDefault();
|
|
17167
|
+
return;
|
|
17168
|
+
}
|
|
17169
|
+
// toggle active state
|
|
17170
|
+
if (!(this.item.items || this.item.lazyChildren)) {
|
|
17171
|
+
if (this.layoutService.isMobile()) {
|
|
17172
|
+
this.layoutService.state.staticMenuMobileActive$.next(false);
|
|
17173
|
+
}
|
|
17174
|
+
}
|
|
17175
|
+
}
|
|
17176
|
+
onChildVisibleChange(visible, item, idx) {
|
|
17177
|
+
this.childrenVisibilitySubject[idx].next(visible);
|
|
17178
|
+
}
|
|
17179
|
+
checkIfMenuItemIsAllowedFromGuard(routerState) {
|
|
17180
|
+
this.guardsIsAllowedSubscription?.unsubscribe();
|
|
17181
|
+
if (this.item.guards?.length) {
|
|
17182
|
+
const obs = [];
|
|
17183
|
+
for (const guard of this.item.guards) {
|
|
17184
|
+
if (guard && typeof guard === 'function') {
|
|
17185
|
+
const guardFnInstance = guard;
|
|
17186
|
+
runInInjectionContext(this.injector, () => {
|
|
17187
|
+
const canActivateRes = guardFnInstance(this.route.snapshot, routerState);
|
|
17188
|
+
let canActivateObs;
|
|
17189
|
+
if (canActivateRes instanceof Observable) {
|
|
17190
|
+
canActivateObs = canActivateRes;
|
|
17191
|
+
}
|
|
17192
|
+
else if (canActivateRes instanceof Promise) {
|
|
17193
|
+
canActivateObs = from(canActivateRes);
|
|
17194
|
+
}
|
|
17195
|
+
else {
|
|
17196
|
+
canActivateObs = of(canActivateRes);
|
|
17197
|
+
}
|
|
17198
|
+
obs.push(canActivateObs.pipe(first(), map(res => res === true) // if url tree is present, that means redirect and implies not allowed
|
|
17199
|
+
));
|
|
17200
|
+
});
|
|
17201
|
+
}
|
|
17202
|
+
}
|
|
17203
|
+
this.guardsIsAllowedSubscription = combineLatest(obs)
|
|
17204
|
+
.pipe(first())
|
|
17205
|
+
.subscribe(next => {
|
|
17206
|
+
const result = next.every(n => n === true);
|
|
17207
|
+
this.guardsIsAllowedSubject.next(result);
|
|
17208
|
+
});
|
|
17209
|
+
}
|
|
17210
|
+
else {
|
|
17211
|
+
this.guardsIsAllowedSubject.next(true);
|
|
17212
|
+
}
|
|
17213
|
+
}
|
|
17214
|
+
updateActiveStateFromRoute() {
|
|
17215
|
+
if (this.itemUrl) {
|
|
17216
|
+
this.active.set(this.router.isActive(this.itemUrl, {
|
|
17217
|
+
matrixParams: 'ignored',
|
|
17218
|
+
queryParams: 'ignored',
|
|
17219
|
+
paths: this.item.items ? 'subset' : 'exact',
|
|
17220
|
+
fragment: 'ignored'
|
|
17221
|
+
}));
|
|
17222
|
+
}
|
|
17223
|
+
else {
|
|
17224
|
+
this.active.set(false);
|
|
17225
|
+
}
|
|
17226
|
+
}
|
|
17227
|
+
processItemChildrenVisibility() {
|
|
17228
|
+
if (this.item.items) {
|
|
17229
|
+
this.childrenVisibilitySubject = this.item.items.map(() => new BehaviorSubject(true));
|
|
17230
|
+
combineLatest(this.childrenVisibilitySubject.map(s => s.asObservable().pipe(distinctUntilChanged())))
|
|
17231
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
17232
|
+
.subscribe(visible => {
|
|
17233
|
+
const anyChildVisible = visible.some(v => v === true);
|
|
17234
|
+
this.active.set(!anyChildVisible);
|
|
17235
|
+
});
|
|
17236
|
+
}
|
|
17237
|
+
}
|
|
17238
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngMenuItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
17239
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MngMenuItemComponent, isStandalone: true, selector: "[mng-menuitem-v2]", inputs: { item: "item", root: "root" }, outputs: { visibleChangeEventEmitter: "visibleChange" }, host: { properties: { "class.layout-root-menuitem": "this.root", "class.active-menuitem": "this.activeClass" } }, viewQueries: [{ propertyName: "submenu", first: true, predicate: ["submenu"], descendants: true }], ngImport: i0, template: "<ng-container *ngIf=\"visible()\">\n <div *ngIf=\"root\" class=\"layout-menuitem-root-text\">\n {{ item.label! | translate }}\n </div>\n <a\n *ngIf=\"!item.href && (!item.routerLink || item.items)\"\n [attr.href]=\"item.href\"\n (click)=\"itemClick($event)\"\n (keydown.enter)=\"itemClick($event)\"\n [routerLink]=\"item.routerLink\"\n [attr.target]=\"item.target\"\n [attr.tabindex]=\"0\"\n [ngClass]=\"item.className ?? ''\"\n pRipple>\n <i [ngClass]=\"item.icon ?? ''\" class=\"layout-menuitem-icon\"></i>\n <span class=\"layout-menuitem-text\">{{ item.label! | translate }}</span>\n <i class=\"pi pi-fw pi-angle-down layout-submenu-toggler\" *ngIf=\"item.items || item.lazyChildren\"></i>\n <span class=\"menuitem-badge\" *ngIf=\"item.badge\">{{ item.badge }}</span>\n </a>\n <a\n *ngIf=\"!item.href && item.routerLink && !item.items\"\n (click)=\"itemClick($event)\"\n [routerLink]=\"item.routerLink\"\n [attr.target]=\"item.target\"\n [attr.tabindex]=\"0\"\n [ngClass]=\"item.className ?? '' + (this.active() ? ' active-route' : '')\"\n [preserveFragment]=\"item.preserveFragment\"\n [skipLocationChange]=\"item.skipLocationChange\"\n [replaceUrl]=\"item.replaceUrl\"\n [queryParams]=\"item.queryParams\"\n pRipple>\n <i [ngClass]=\"item.icon ?? ''\" class=\"layout-menuitem-icon\"></i>\n <span class=\"layout-menuitem-text\">{{ item.label! | translate }}</span>\n <i class=\"pi pi-fw pi-angle-down layout-submenu-toggler\" *ngIf=\"item.items || item.lazyChildren\"></i>\n <span class=\"menuitem-badge\" *ngIf=\"item.badge\">{{ item.badge }}</span>\n </a>\n <a\n *ngIf=\"item.href && !item.items\"\n (click)=\"itemClick($event)\"\n [attr.href]=\"item.href\"\n [attr.target]=\"item.target\"\n [attr.tabindex]=\"0\"\n [ngClass]=\"item.className ?? ''\"\n pRipple>\n <i [ngClass]=\"item.icon ?? ''\" class=\"layout-menuitem-icon\"></i>\n <span class=\"layout-menuitem-text\">{{ item.label! | translate }}</span>\n <i class=\"pi pi-fw pi-angle-down layout-submenu-toggler\" *ngIf=\"item.items || item.lazyChildren\"></i>\n <span class=\"menuitem-badge\" *ngIf=\"item.badge\">{{ item.badge }}</span>\n </a>\n\n <ul #submenu *ngIf=\"item.items\" [@children]=\"submenuAnimation\">\n <ng-template ngFor let-child let-i=\"index\" [ngForOf]=\"item.items\">\n <li mng-menuitem-v2 [item]=\"child\" [class]=\"child.badgeClassName\" (visibleChange)=\"onChildVisibleChange($event, item, i)\"></li>\n </ng-template>\n </ul>\n</ng-container>\n", dependencies: [{ kind: "component", type: MngMenuItemComponent, selector: "[mng-menuitem-v2]", inputs: ["item", "root"], outputs: ["visibleChange"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i6$1.Ripple, selector: "[pRipple]" }, { kind: "ngmodule", type: TooltipModule }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], animations: [
|
|
17240
|
+
trigger('children', [
|
|
17241
|
+
state('collapsed', style({
|
|
17242
|
+
height: '0'
|
|
17243
|
+
})),
|
|
17244
|
+
state('expanded', style({
|
|
17245
|
+
height: '*'
|
|
17246
|
+
})),
|
|
17247
|
+
state('hidden', style({
|
|
17248
|
+
display: 'none'
|
|
17249
|
+
})),
|
|
17250
|
+
state('visible', style({
|
|
17251
|
+
display: 'block'
|
|
17252
|
+
})),
|
|
17253
|
+
transition('collapsed <=> expanded', animate('400ms cubic-bezier(0.86, 0, 0.07, 1)'))
|
|
17254
|
+
])
|
|
17255
|
+
], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
17256
|
+
}
|
|
17257
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngMenuItemComponent, decorators: [{
|
|
17258
|
+
type: Component,
|
|
17259
|
+
args: [{ standalone: true, selector: '[mng-menuitem-v2]', imports: [NgIf, NgClass, RippleModule, TooltipModule, RouterModule, NgForOf, TranslateModule, AsyncPipe], changeDetection: ChangeDetectionStrategy.OnPush, animations: [
|
|
17260
|
+
trigger('children', [
|
|
17261
|
+
state('collapsed', style({
|
|
17262
|
+
height: '0'
|
|
17263
|
+
})),
|
|
17264
|
+
state('expanded', style({
|
|
17265
|
+
height: '*'
|
|
17266
|
+
})),
|
|
17267
|
+
state('hidden', style({
|
|
17268
|
+
display: 'none'
|
|
17269
|
+
})),
|
|
17270
|
+
state('visible', style({
|
|
17271
|
+
display: 'block'
|
|
17272
|
+
})),
|
|
17273
|
+
transition('collapsed <=> expanded', animate('400ms cubic-bezier(0.86, 0, 0.07, 1)'))
|
|
17274
|
+
])
|
|
17275
|
+
], template: "<ng-container *ngIf=\"visible()\">\n <div *ngIf=\"root\" class=\"layout-menuitem-root-text\">\n {{ item.label! | translate }}\n </div>\n <a\n *ngIf=\"!item.href && (!item.routerLink || item.items)\"\n [attr.href]=\"item.href\"\n (click)=\"itemClick($event)\"\n (keydown.enter)=\"itemClick($event)\"\n [routerLink]=\"item.routerLink\"\n [attr.target]=\"item.target\"\n [attr.tabindex]=\"0\"\n [ngClass]=\"item.className ?? ''\"\n pRipple>\n <i [ngClass]=\"item.icon ?? ''\" class=\"layout-menuitem-icon\"></i>\n <span class=\"layout-menuitem-text\">{{ item.label! | translate }}</span>\n <i class=\"pi pi-fw pi-angle-down layout-submenu-toggler\" *ngIf=\"item.items || item.lazyChildren\"></i>\n <span class=\"menuitem-badge\" *ngIf=\"item.badge\">{{ item.badge }}</span>\n </a>\n <a\n *ngIf=\"!item.href && item.routerLink && !item.items\"\n (click)=\"itemClick($event)\"\n [routerLink]=\"item.routerLink\"\n [attr.target]=\"item.target\"\n [attr.tabindex]=\"0\"\n [ngClass]=\"item.className ?? '' + (this.active() ? ' active-route' : '')\"\n [preserveFragment]=\"item.preserveFragment\"\n [skipLocationChange]=\"item.skipLocationChange\"\n [replaceUrl]=\"item.replaceUrl\"\n [queryParams]=\"item.queryParams\"\n pRipple>\n <i [ngClass]=\"item.icon ?? ''\" class=\"layout-menuitem-icon\"></i>\n <span class=\"layout-menuitem-text\">{{ item.label! | translate }}</span>\n <i class=\"pi pi-fw pi-angle-down layout-submenu-toggler\" *ngIf=\"item.items || item.lazyChildren\"></i>\n <span class=\"menuitem-badge\" *ngIf=\"item.badge\">{{ item.badge }}</span>\n </a>\n <a\n *ngIf=\"item.href && !item.items\"\n (click)=\"itemClick($event)\"\n [attr.href]=\"item.href\"\n [attr.target]=\"item.target\"\n [attr.tabindex]=\"0\"\n [ngClass]=\"item.className ?? ''\"\n pRipple>\n <i [ngClass]=\"item.icon ?? ''\" class=\"layout-menuitem-icon\"></i>\n <span class=\"layout-menuitem-text\">{{ item.label! | translate }}</span>\n <i class=\"pi pi-fw pi-angle-down layout-submenu-toggler\" *ngIf=\"item.items || item.lazyChildren\"></i>\n <span class=\"menuitem-badge\" *ngIf=\"item.badge\">{{ item.badge }}</span>\n </a>\n\n <ul #submenu *ngIf=\"item.items\" [@children]=\"submenuAnimation\">\n <ng-template ngFor let-child let-i=\"index\" [ngForOf]=\"item.items\">\n <li mng-menuitem-v2 [item]=\"child\" [class]=\"child.badgeClassName\" (visibleChange)=\"onChildVisibleChange($event, item, i)\"></li>\n </ng-template>\n </ul>\n</ng-container>\n" }]
|
|
17276
|
+
}], ctorParameters: function () { return []; }, propDecorators: { item: [{
|
|
17277
|
+
type: Input,
|
|
17278
|
+
args: [{ required: true }]
|
|
17279
|
+
}], root: [{
|
|
17280
|
+
type: Input
|
|
17281
|
+
}, {
|
|
17282
|
+
type: HostBinding,
|
|
17283
|
+
args: ['class.layout-root-menuitem']
|
|
17284
|
+
}], visibleChangeEventEmitter: [{
|
|
17285
|
+
type: Output,
|
|
17286
|
+
args: ['visibleChange']
|
|
17287
|
+
}], submenu: [{
|
|
17288
|
+
type: ViewChild,
|
|
17289
|
+
args: ['submenu']
|
|
17290
|
+
}], activeClass: [{
|
|
17291
|
+
type: HostBinding,
|
|
17292
|
+
args: ['class.active-menuitem']
|
|
17293
|
+
}] } });
|
|
17294
|
+
|
|
17295
|
+
class MngMenuComponent {
|
|
17296
|
+
constructor() {
|
|
17297
|
+
this.route = inject(ActivatedRoute);
|
|
17298
|
+
this.menuService = inject(MenuService);
|
|
17299
|
+
this.mngCommons = inject(MngCommonsService);
|
|
17300
|
+
this.menuItems = [];
|
|
17301
|
+
}
|
|
17302
|
+
ngOnInit() {
|
|
17303
|
+
if (Array.isArray(this.mngCommons.menuItems)) {
|
|
17304
|
+
this.menuItems = [{ items: this.mngCommons.menuItems }];
|
|
17305
|
+
}
|
|
17306
|
+
else if (Array.isArray(this.route.snapshot.data?.menuItems)) {
|
|
17307
|
+
this.menuItems = [{ items: this.route.snapshot.data.menuItems }];
|
|
17308
|
+
}
|
|
17309
|
+
this.menuService.initialize(this.menuItems);
|
|
17310
|
+
}
|
|
17311
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
17312
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MngMenuComponent, isStandalone: true, selector: "mng-menu-v2", ngImport: i0, template: "<ul class=\"layout-menu\">\n <ng-container *ngFor=\"let item of menuItems\">\n <li mng-menuitem-v2 *ngIf=\"!item.separator\" [item]=\"item\" [root]=\"true\"></li>\n <li *ngIf=\"item.separator\" class=\"menu-separator\"></li>\n </ng-container>\n</ul>\n", dependencies: [{ kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: MngMenuItemComponent, selector: "[mng-menuitem-v2]", inputs: ["item", "root"], outputs: ["visibleChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
17313
|
+
}
|
|
17314
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngMenuComponent, decorators: [{
|
|
17315
|
+
type: Component,
|
|
17316
|
+
args: [{ standalone: true, selector: 'mng-menu-v2', imports: [NgForOf, NgIf, MngMenuItemComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ul class=\"layout-menu\">\n <ng-container *ngFor=\"let item of menuItems\">\n <li mng-menuitem-v2 *ngIf=\"!item.separator\" [item]=\"item\" [root]=\"true\"></li>\n <li *ngIf=\"item.separator\" class=\"menu-separator\"></li>\n </ng-container>\n</ul>\n" }]
|
|
17317
|
+
}] });
|
|
17318
|
+
|
|
17319
|
+
class MngVersionComponent {
|
|
17320
|
+
constructor(versionService, jsonPathPipe) {
|
|
17321
|
+
this.versionService = versionService;
|
|
17322
|
+
this.jsonPathPipe = jsonPathPipe;
|
|
17323
|
+
this.loadingSubject = new BehaviorSubject(false);
|
|
17324
|
+
this.loading$ = this.loadingSubject.asObservable();
|
|
17325
|
+
}
|
|
17326
|
+
ngOnInit() {
|
|
17327
|
+
if (Array.isArray(this.initVersion)) {
|
|
17328
|
+
this.versions = this.initVersion;
|
|
17329
|
+
}
|
|
17330
|
+
else if (typeof this.initVersion === 'string') {
|
|
17331
|
+
this.displayVersion = this.initVersion;
|
|
17332
|
+
}
|
|
17333
|
+
else if (typeof this.initVersion !== 'undefined') {
|
|
17334
|
+
if (this.initVersion['info'] || this.initVersion['urlPath']) {
|
|
17335
|
+
const config = this.initVersion;
|
|
17336
|
+
this.displayName = config.displayName;
|
|
17337
|
+
if (config.urlPath) {
|
|
17338
|
+
this.loadingSubject.next(true);
|
|
17339
|
+
this.versionService
|
|
17340
|
+
.loadVersion(config.urlPath, config.urlBaseConfigKey)
|
|
17341
|
+
.pipe(take(1))
|
|
17342
|
+
.subscribe({
|
|
17343
|
+
next: res => {
|
|
17344
|
+
this.displayVersion = this.jsonPathPipe.transform(res, config.infoJsonPath ?? '$');
|
|
17345
|
+
this.loadingSubject.next(false);
|
|
17346
|
+
},
|
|
17347
|
+
error: () => {
|
|
17348
|
+
this.displayVersion = '';
|
|
17349
|
+
this.loadingSubject.next(false);
|
|
17350
|
+
}
|
|
17351
|
+
});
|
|
17352
|
+
}
|
|
17353
|
+
else {
|
|
17354
|
+
this.displayVersion = this.jsonPathPipe.transform(config.info, config.infoJsonPath ?? '$.raw');
|
|
17355
|
+
}
|
|
17356
|
+
}
|
|
17357
|
+
else {
|
|
17358
|
+
const info = this.initVersion;
|
|
17359
|
+
this.displayVersion = this.jsonPathPipe.transform(info, '$.raw');
|
|
17360
|
+
}
|
|
17361
|
+
}
|
|
17362
|
+
}
|
|
17363
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngVersionComponent, deps: [{ token: MngVersionService }, { token: JsonPathPipe }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
17364
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MngVersionComponent, isStandalone: true, selector: "mng-version-v2", inputs: { initVersion: ["version", "initVersion"] }, ngImport: i0, template: "<ng-container *ngIf=\"versions; else version\">\n <ng-container *ngFor=\"let v of versions; let last = last\"> <mng-version-v2 [version]=\"v\"></mng-version-v2><br *ngIf=\"!last\" /> </ng-container>\n</ng-container>\n<ng-template #version>\n <ng-container *ngIf=\"displayName\">{{ displayName }}: </ng-container>\n <ng-container *ngIf=\"(loading$ | async) === false\">{{ displayVersion }}</ng-container>\n</ng-template>\n", dependencies: [{ kind: "component", type: MngVersionComponent, selector: "mng-version-v2", inputs: ["version"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
17365
|
+
}
|
|
17366
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngVersionComponent, decorators: [{
|
|
17367
|
+
type: Component,
|
|
17368
|
+
args: [{ standalone: true, selector: 'mng-version-v2', imports: [AsyncPipe, NgForOf, NgIf], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"versions; else version\">\n <ng-container *ngFor=\"let v of versions; let last = last\"> <mng-version-v2 [version]=\"v\"></mng-version-v2><br *ngIf=\"!last\" /> </ng-container>\n</ng-container>\n<ng-template #version>\n <ng-container *ngIf=\"displayName\">{{ displayName }}: </ng-container>\n <ng-container *ngIf=\"(loading$ | async) === false\">{{ displayVersion }}</ng-container>\n</ng-template>\n" }]
|
|
17369
|
+
}], ctorParameters: function () { return [{ type: MngVersionService }, { type: JsonPathPipe }]; }, propDecorators: { initVersion: [{
|
|
17370
|
+
type: Input,
|
|
17371
|
+
args: ['version']
|
|
17372
|
+
}] } });
|
|
17373
|
+
|
|
17374
|
+
class MngSidebarComponent {
|
|
17375
|
+
constructor() {
|
|
17376
|
+
this.config = inject(MNG_MODULE_CONFIG_IT);
|
|
17377
|
+
this.mngCommons = inject(MngCommonsService);
|
|
17378
|
+
this.layoutService = inject(MngMainLayoutComponentV2Service);
|
|
17379
|
+
this.el = inject(ElementRef);
|
|
17380
|
+
this.timeout = null;
|
|
17381
|
+
this.menuComponent = MngMenuComponent;
|
|
17382
|
+
}
|
|
17383
|
+
ngOnInit() {
|
|
17384
|
+
if (this.config.components?.layout?.menu) {
|
|
17385
|
+
this.menuComponent = this.config.components.layout.menu;
|
|
17386
|
+
}
|
|
17387
|
+
}
|
|
17388
|
+
onMouseEnter() {
|
|
17389
|
+
if (!this.layoutService.state.anchored$.value) {
|
|
17390
|
+
if (this.timeout) {
|
|
17391
|
+
clearTimeout(this.timeout);
|
|
17392
|
+
this.timeout = null;
|
|
17393
|
+
}
|
|
17394
|
+
this.layoutService.state.sidebarActive$.next(true);
|
|
17395
|
+
}
|
|
17396
|
+
}
|
|
17397
|
+
onMouseLeave() {
|
|
17398
|
+
if (!this.layoutService.state.anchored$.value) {
|
|
17399
|
+
if (!this.timeout) {
|
|
17400
|
+
this.timeout = setTimeout(() => this.layoutService.state.sidebarActive$.next(false), 300);
|
|
17401
|
+
}
|
|
17402
|
+
}
|
|
17403
|
+
}
|
|
17404
|
+
anchor() {
|
|
17405
|
+
this.layoutService.state.anchored$.next(!this.layoutService.state.anchored$.value);
|
|
17406
|
+
}
|
|
17407
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngSidebarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
17408
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MngSidebarComponent, isStandalone: true, selector: "mng-sidebar-v2", viewQueries: [{ propertyName: "menuContainer", first: true, predicate: ["menuContainer"], descendants: true }], ngImport: i0, template: "<div class=\"layout-sidebar\" (mouseenter)=\"onMouseEnter()\" (mouseleave)=\"onMouseLeave()\">\n <div class=\"sidebar-header\">\n <a [routerLink]=\"['/']\" class=\"app-logo\">\n <div class=\"app-logo-small h-2rem\">\n <img [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoDark : mngCommons.appLogoLight\" [alt]=\"'App logo'\" />\n </div>\n <div class=\"app-logo-normal\">\n <img class=\"h-2rem\" [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoDark : mngCommons.appLogoLight\" [alt]=\"'App logo'\" />\n <img class=\"h-2rem ml-3\" [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoNameDark : mngCommons.appLogoNameLight\" [alt]=\"'App name'\" />\n </div>\n </a>\n <button class=\"layout-sidebar-anchor p-link z-2\" type=\"button\" (click)=\"anchor()\"></button>\n </div>\n\n <div #menuContainer class=\"layout-menu-container\">\n <div [mngComponent]=\"menuComponent\" [attachToHost]=\"true\"></div>\n </div>\n\n <div class=\"menu-version\">\n <mng-version-v2 [version]=\"mngCommons.appVersion\"></mng-version-v2>\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: MngVersionComponent, selector: "mng-version-v2", inputs: ["version"] }, { kind: "directive", type: MngComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "inputs", "attachToHost"], outputs: ["instanceCreated"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
17409
|
+
}
|
|
17410
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngSidebarComponent, decorators: [{
|
|
17411
|
+
type: Component,
|
|
17412
|
+
args: [{ standalone: true, selector: 'mng-sidebar-v2', imports: [RouterModule, MngMenuComponent, MngVersionComponent, MngComponentDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"layout-sidebar\" (mouseenter)=\"onMouseEnter()\" (mouseleave)=\"onMouseLeave()\">\n <div class=\"sidebar-header\">\n <a [routerLink]=\"['/']\" class=\"app-logo\">\n <div class=\"app-logo-small h-2rem\">\n <img [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoDark : mngCommons.appLogoLight\" [alt]=\"'App logo'\" />\n </div>\n <div class=\"app-logo-normal\">\n <img class=\"h-2rem\" [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoDark : mngCommons.appLogoLight\" [alt]=\"'App logo'\" />\n <img class=\"h-2rem ml-3\" [src]=\"mngCommons.colorSchemeIsLight ? mngCommons.appLogoNameDark : mngCommons.appLogoNameLight\" [alt]=\"'App name'\" />\n </div>\n </a>\n <button class=\"layout-sidebar-anchor p-link z-2\" type=\"button\" (click)=\"anchor()\"></button>\n </div>\n\n <div #menuContainer class=\"layout-menu-container\">\n <div [mngComponent]=\"menuComponent\" [attachToHost]=\"true\"></div>\n </div>\n\n <div class=\"menu-version\">\n <mng-version-v2 [version]=\"mngCommons.appVersion\"></mng-version-v2>\n </div>\n</div>\n" }]
|
|
17413
|
+
}], propDecorators: { menuContainer: [{
|
|
17414
|
+
type: ViewChild,
|
|
17415
|
+
args: ['menuContainer']
|
|
17416
|
+
}] } });
|
|
17417
|
+
|
|
17418
|
+
class MngTopbarUserComponent {
|
|
17419
|
+
constructor() {
|
|
17420
|
+
this.destroyRef = inject(DestroyRef);
|
|
17421
|
+
this.mngCommons = inject(MngCommonsService);
|
|
17422
|
+
this.hrefJsVoid = inject(DomSanitizer).bypassSecurityTrustUrl('javascript:void(0)');
|
|
17423
|
+
}
|
|
17424
|
+
ngOnInit() {
|
|
17425
|
+
this.mngCommons.user$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(u => {
|
|
17426
|
+
this.user = u;
|
|
17427
|
+
});
|
|
17428
|
+
this.userRoles$ = this.mngCommons.userRoles$;
|
|
17429
|
+
}
|
|
17430
|
+
logout(user, event) {
|
|
17431
|
+
if (typeof user?.logout === 'function') {
|
|
17432
|
+
event.preventDefault();
|
|
17433
|
+
event.stopPropagation();
|
|
17434
|
+
user.logout();
|
|
17435
|
+
}
|
|
17436
|
+
}
|
|
17437
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngTopbarUserComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
17438
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MngTopbarUserComponent, isStandalone: true, selector: "mng-topbar-user-component-v2", ngImport: i0, template: "<a\n class=\"cursor-pointer lg:pr-4\"\n pStyleClass=\"@next\"\n enterClass=\"ng-hidden\"\n enterActiveClass=\"px-scalein\"\n leaveToClass=\"ng-hidden\"\n leaveActiveClass=\"px-fadeout\"\n [hideOnOutsideClick]=\"true\"\n pRipple>\n <i class=\"pi pi-fw pi-user text-2xl\"></i>\n <span class=\"hidden sm:inline-block\"> {{ user?.displayName ?? user?.username }}</span>\n</a>\n<ul class=\"topbar-menu active-topbar-menu w-15rem z-5 ng-hidden border-round\">\n <li role=\"menuitem\">\n <a\n class=\"flex align-items-center transition-duration-200\"\n pStyleClass=\"@grandparent\"\n enterClass=\"ng-hidden\"\n enterActiveClass=\"px-scalein\"\n leaveToClass=\"ng-hidden\"\n leaveActiveClass=\"px-fadeout\">\n <i class=\"pi pi-fw pi-user text-base mr-2\"></i>\n <div>\n <strong>{{ user?.displayName ?? user?.username }}</strong>\n <small *ngIf=\"((userRoles$ | async)?.length ?? 0) > 0\">\n <br />\n {{ userRoles$ | mgnEnumerateAsync : undefined : undefined : undefined : 'roles' | async }}\n </small>\n </div>\n </a>\n </li>\n <li role=\"menuitem\" *ngIf=\"user?.logout || user?.logoutUrl\">\n <a\n [href]=\"user?.logoutUrl ?? hrefJsVoid\"\n (click)=\"logout(user, $event)\"\n class=\"flex align-items-center hover:text-primary-500 transition-duration-200\"\n pStyleClass=\"@grandparent\"\n enterClass=\"ng-hidden\"\n enterActiveClass=\"px-scalein\"\n leaveToClass=\"ng-hidden\"\n leaveActiveClass=\"px-fadeout\">\n <i class=\"pi pi-fw pi-sign-out text-base mr-2\"></i>\n <span>{{ 'mngTopbar.logout' | translate }}</span>\n </a>\n </li>\n</ul>\n", dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: MngEnumerateAsyncPipe, name: "mgnEnumerateAsync" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i6$1.Ripple, selector: "[pRipple]" }, { kind: "ngmodule", type: StyleClassModule }, { kind: "directive", type: i3$4.StyleClass, selector: "[pStyleClass]", inputs: ["pStyleClass", "enterClass", "enterActiveClass", "enterToClass", "leaveClass", "leaveActiveClass", "leaveToClass", "hideOnOutsideClick", "toggleClass", "hideOnEscape"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
17439
|
+
}
|
|
17440
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngTopbarUserComponent, decorators: [{
|
|
17441
|
+
type: Component,
|
|
17442
|
+
args: [{ standalone: true, selector: 'mng-topbar-user-component-v2', imports: [AsyncPipe, MngEnumerateAsyncPipe, NgIf, TranslateModule, RippleModule, StyleClassModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<a\n class=\"cursor-pointer lg:pr-4\"\n pStyleClass=\"@next\"\n enterClass=\"ng-hidden\"\n enterActiveClass=\"px-scalein\"\n leaveToClass=\"ng-hidden\"\n leaveActiveClass=\"px-fadeout\"\n [hideOnOutsideClick]=\"true\"\n pRipple>\n <i class=\"pi pi-fw pi-user text-2xl\"></i>\n <span class=\"hidden sm:inline-block\"> {{ user?.displayName ?? user?.username }}</span>\n</a>\n<ul class=\"topbar-menu active-topbar-menu w-15rem z-5 ng-hidden border-round\">\n <li role=\"menuitem\">\n <a\n class=\"flex align-items-center transition-duration-200\"\n pStyleClass=\"@grandparent\"\n enterClass=\"ng-hidden\"\n enterActiveClass=\"px-scalein\"\n leaveToClass=\"ng-hidden\"\n leaveActiveClass=\"px-fadeout\">\n <i class=\"pi pi-fw pi-user text-base mr-2\"></i>\n <div>\n <strong>{{ user?.displayName ?? user?.username }}</strong>\n <small *ngIf=\"((userRoles$ | async)?.length ?? 0) > 0\">\n <br />\n {{ userRoles$ | mgnEnumerateAsync : undefined : undefined : undefined : 'roles' | async }}\n </small>\n </div>\n </a>\n </li>\n <li role=\"menuitem\" *ngIf=\"user?.logout || user?.logoutUrl\">\n <a\n [href]=\"user?.logoutUrl ?? hrefJsVoid\"\n (click)=\"logout(user, $event)\"\n class=\"flex align-items-center hover:text-primary-500 transition-duration-200\"\n pStyleClass=\"@grandparent\"\n enterClass=\"ng-hidden\"\n enterActiveClass=\"px-scalein\"\n leaveToClass=\"ng-hidden\"\n leaveActiveClass=\"px-fadeout\">\n <i class=\"pi pi-fw pi-sign-out text-base mr-2\"></i>\n <span>{{ 'mngTopbar.logout' | translate }}</span>\n </a>\n </li>\n</ul>\n" }]
|
|
17443
|
+
}] });
|
|
17444
|
+
|
|
17445
|
+
class MngTopbarComponent {
|
|
17446
|
+
constructor() {
|
|
17447
|
+
this.el = inject(ElementRef);
|
|
17448
|
+
this.mngCommons = inject(MngCommonsService);
|
|
17449
|
+
this.mainLayoutService = inject(MngMainLayoutComponentV2Service);
|
|
17450
|
+
this.config = inject(MNG_MODULE_CONFIG_IT);
|
|
17451
|
+
this.breadcrumbComponent = MngBreadcrumbComponent;
|
|
17452
|
+
this.topbarUserComponent = MngTopbarUserComponent;
|
|
17453
|
+
this.languages = ['en'];
|
|
17454
|
+
this.selectedLanguage = 'en';
|
|
17455
|
+
}
|
|
17456
|
+
ngOnInit() {
|
|
17457
|
+
if (this.config.components?.layout?.topbarUser) {
|
|
17458
|
+
this.topbarUserComponent = this.config.components.layout.topbarUser;
|
|
17459
|
+
}
|
|
17460
|
+
if (this.config.components?.layout?.breadcrumb) {
|
|
17461
|
+
this.breadcrumbComponent = this.config.components.layout.breadcrumb;
|
|
17462
|
+
}
|
|
17463
|
+
this.languages = this.mngCommons.appLanguages;
|
|
17464
|
+
this.selectedLanguage = this.mngCommons.getOrInitLanguage();
|
|
17465
|
+
}
|
|
17466
|
+
onMenuButtonClick() {
|
|
17467
|
+
this.mainLayoutService.onMenuToggle();
|
|
17468
|
+
}
|
|
17469
|
+
switchLanguage(language) {
|
|
17470
|
+
this.mngCommons.appLanguage = language;
|
|
17471
|
+
}
|
|
17472
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngTopbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
17473
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MngTopbarComponent, isStandalone: true, selector: "mng-topbar-v2", viewQueries: [{ propertyName: "menuButton", first: true, predicate: ["menubutton"], descendants: true }, { propertyName: "topbarInjectionRef", first: true, predicate: ["userMenuItem"], descendants: true }, { propertyName: "appSidebar", first: true, predicate: MngSidebarComponent, descendants: true }], ngImport: i0, template: "<div class=\"layout-topbar\">\n <div class=\"topbar-start\">\n <button #menubutton type=\"button\" class=\"topbar-menubutton p-link p-trigger\" (click)=\"onMenuButtonClick()\">\n <i class=\"pi pi-bars\"></i>\n </button>\n\n <div class=\"topbar-breadcrumb\">\n <div [mngComponent]=\"breadcrumbComponent\" [attachToHost]=\"true\"></div>\n </div>\n </div>\n <div class=\"layout-topbar-menu-section\">\n <mng-sidebar-v2></mng-sidebar-v2>\n </div>\n <div class=\"topbar-end\">\n <ul class=\"topbar-menu\">\n <li *ngIf=\"languages.length > 1\" class=\"profile-item\">\n <i class=\"pi pi-fw pi-globe\"></i>\n <p-dropdown [ngModel]=\"selectedLanguage\" [options]=\"languages\" (onChange)=\"switchLanguage($event.value)\"></p-dropdown>\n </li>\n <li #userMenuItem class=\"profile-item topbar-item mr-3\" [mngComponent]=\"topbarUserComponent\" [attachToHost]=\"true\"></li>\n </ul>\n </div>\n</div>\n", dependencies: [{ kind: "component", type: MngSidebarComponent, selector: "mng-sidebar-v2" }, { kind: "ngmodule", type: ButtonModule }, { kind: "ngmodule", type: InputTextModule }, { kind: "ngmodule", type: StyleClassModule }, { kind: "ngmodule", type: RippleModule }, { kind: "ngmodule", type: DropdownModule }, { kind: "component", type: i3$1.Dropdown, selector: "p-dropdown", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: MngComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "inputs", "attachToHost"], outputs: ["instanceCreated"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
17474
|
+
}
|
|
17475
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngTopbarComponent, decorators: [{
|
|
17476
|
+
type: Component,
|
|
17477
|
+
args: [{ standalone: true, selector: 'mng-topbar-v2', imports: [
|
|
17478
|
+
MngSidebarComponent,
|
|
17479
|
+
NgClass,
|
|
17480
|
+
ButtonModule,
|
|
17481
|
+
InputTextModule,
|
|
17482
|
+
StyleClassModule,
|
|
17483
|
+
RippleModule,
|
|
17484
|
+
MngBreadcrumbComponent,
|
|
17485
|
+
AsyncPipe,
|
|
17486
|
+
DropdownModule,
|
|
17487
|
+
NgIf,
|
|
17488
|
+
MngComponentDirective,
|
|
17489
|
+
FormsModule
|
|
17490
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"layout-topbar\">\n <div class=\"topbar-start\">\n <button #menubutton type=\"button\" class=\"topbar-menubutton p-link p-trigger\" (click)=\"onMenuButtonClick()\">\n <i class=\"pi pi-bars\"></i>\n </button>\n\n <div class=\"topbar-breadcrumb\">\n <div [mngComponent]=\"breadcrumbComponent\" [attachToHost]=\"true\"></div>\n </div>\n </div>\n <div class=\"layout-topbar-menu-section\">\n <mng-sidebar-v2></mng-sidebar-v2>\n </div>\n <div class=\"topbar-end\">\n <ul class=\"topbar-menu\">\n <li *ngIf=\"languages.length > 1\" class=\"profile-item\">\n <i class=\"pi pi-fw pi-globe\"></i>\n <p-dropdown [ngModel]=\"selectedLanguage\" [options]=\"languages\" (onChange)=\"switchLanguage($event.value)\"></p-dropdown>\n </li>\n <li #userMenuItem class=\"profile-item topbar-item mr-3\" [mngComponent]=\"topbarUserComponent\" [attachToHost]=\"true\"></li>\n </ul>\n </div>\n</div>\n" }]
|
|
17491
|
+
}], propDecorators: { menuButton: [{
|
|
17492
|
+
type: ViewChild,
|
|
17493
|
+
args: ['menubutton']
|
|
17494
|
+
}], topbarInjectionRef: [{
|
|
17495
|
+
type: ViewChild,
|
|
17496
|
+
args: ['userMenuItem']
|
|
17497
|
+
}], appSidebar: [{
|
|
17498
|
+
type: ViewChild,
|
|
17499
|
+
args: [MngSidebarComponent]
|
|
17500
|
+
}] } });
|
|
17501
|
+
|
|
17502
|
+
class MngMainLayoutV2Component {
|
|
17503
|
+
constructor() {
|
|
17504
|
+
this.config = inject(MNG_MODULE_CONFIG_IT);
|
|
17505
|
+
this.layoutService = inject(MngMainLayoutComponentV2Service);
|
|
17506
|
+
this.menuService = inject(MenuService);
|
|
17507
|
+
this.renderer = inject(Renderer2);
|
|
17508
|
+
this.topbarComponent = MngTopbarComponent;
|
|
17509
|
+
this.breadcrumbsComponent = MngBreadcrumbComponent;
|
|
17510
|
+
this.footerComponent = MngFooterComponent;
|
|
17511
|
+
this.layoutService.overlayOpen$.pipe(takeUntilDestroyed()).subscribe(() => {
|
|
17512
|
+
if (!this.menuOutsideClickListener) {
|
|
17513
|
+
this.menuOutsideClickListener = this.renderer.listen('document', 'click', event => {
|
|
17514
|
+
const isOutsideClicked = !(this.appTopbar?.nativeElement.isSameNode(event.target) || this.appTopbar?.nativeElement.contains(event.target));
|
|
17515
|
+
if (isOutsideClicked) {
|
|
17516
|
+
this.hideMenu();
|
|
17517
|
+
}
|
|
17518
|
+
});
|
|
17519
|
+
}
|
|
17520
|
+
if (this.layoutService.state.staticMenuMobileActive$.value) {
|
|
17521
|
+
this.blockBodyScroll();
|
|
17522
|
+
}
|
|
17523
|
+
});
|
|
17524
|
+
}
|
|
17525
|
+
ngOnInit() {
|
|
17526
|
+
if (this.config.components?.layout?.topbar) {
|
|
17527
|
+
this.topbarComponent = this.config.components.layout.topbar;
|
|
17528
|
+
}
|
|
17529
|
+
if (this.config.components?.layout?.breadcrumb) {
|
|
17530
|
+
this.breadcrumbsComponent = this.config.components.layout.breadcrumb;
|
|
17531
|
+
}
|
|
17532
|
+
if (this.config.components?.layout?.footer) {
|
|
17533
|
+
this.footerComponent = this.config.components.layout.footer;
|
|
17534
|
+
}
|
|
17535
|
+
}
|
|
17536
|
+
blockBodyScroll() {
|
|
17537
|
+
if (document.body.classList) {
|
|
17538
|
+
document.body.classList.add('blocked-scroll');
|
|
17539
|
+
}
|
|
17540
|
+
else {
|
|
17541
|
+
document.body.className += ' blocked-scroll';
|
|
17542
|
+
}
|
|
17543
|
+
}
|
|
17544
|
+
unblockBodyScroll() {
|
|
17545
|
+
if (document.body.classList) {
|
|
17546
|
+
document.body.classList.remove('blocked-scroll');
|
|
17547
|
+
}
|
|
17548
|
+
else {
|
|
17549
|
+
document.body.className = document.body.className.replace(new RegExp('(^|\\b)' + 'blocked-scroll'.split(' ').join('|') + '(\\b|$)', 'gi'), ' ');
|
|
17550
|
+
}
|
|
17551
|
+
}
|
|
17552
|
+
hideMenu() {
|
|
17553
|
+
this.layoutService.state.overlayMenuActive$.next(false);
|
|
17554
|
+
this.layoutService.state.staticMenuMobileActive$.next(false);
|
|
17555
|
+
this.layoutService.state.menuHoverActive$.next(false);
|
|
17556
|
+
this.menuService.reset();
|
|
17557
|
+
if (this.menuOutsideClickListener) {
|
|
17558
|
+
this.menuOutsideClickListener();
|
|
17559
|
+
this.menuOutsideClickListener = null;
|
|
17560
|
+
}
|
|
17561
|
+
this.unblockBodyScroll();
|
|
17562
|
+
}
|
|
17563
|
+
ngOnDestroy() {
|
|
17564
|
+
if (this.menuOutsideClickListener) {
|
|
17565
|
+
this.menuOutsideClickListener();
|
|
17566
|
+
}
|
|
17567
|
+
}
|
|
17568
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngMainLayoutV2Component, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
17569
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.6", type: MngMainLayoutV2Component, isStandalone: true, selector: "mng-main-layout-v2", providers: [MngMainLayoutComponentV2Service], viewQueries: [{ propertyName: "appTopbar", first: true, predicate: ["topbarCmp"], descendants: true }], ngImport: i0, template: "<div\n class=\"layout-container\"\n [ngClass]=\"{\n 'layout-light': config.app?.colorScheme === 'light',\n 'layout-dark': config.app?.colorScheme === 'dark',\n 'layout-overlay': config.menuV2?.mode === 'overlay',\n 'layout-static': config.menuV2?.mode === 'static',\n 'layout-reveal': config.menuV2?.mode === 'reveal',\n 'layout-drawer': config.menuV2?.mode === 'drawer',\n 'layout-static-inactive': (layoutService.state.staticMenuDesktopInactive$ | async) && config.menuV2?.mode === 'static',\n 'layout-overlay-active': layoutService.state.overlayMenuActive$ | async,\n 'layout-mobile-active': layoutService.state.staticMenuMobileActive$ | async,\n 'p-ripple-disabled': !config.menuV2?.ripple,\n 'layout-sidebar-active': layoutService.state.sidebarActive$ | async,\n 'layout-sidebar-anchored': layoutService.state.anchored$ | async\n }\">\n <div class=\"layout-content-wrapper\">\n <div #topbarCmp class=\"layout-topbar-wrapper\" [mngComponent]=\"topbarComponent\" [attachToHost]=\"true\"></div>\n <div class=\"content-breadcrumb\">\n <div [mngComponent]=\"breadcrumbsComponent\" [attachToHost]=\"true\"></div>\n </div>\n <div class=\"layout-content\">\n <router-outlet></router-outlet>\n </div>\n <div class=\"layout-mask\"></div>\n <div [mngComponent]=\"footerComponent\" [attachToHost]=\"true\"></div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1.RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "directive", type: MngComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "inputs", "attachToHost"], outputs: ["instanceCreated"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
17570
|
+
}
|
|
17571
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.6", ngImport: i0, type: MngMainLayoutV2Component, decorators: [{
|
|
17572
|
+
type: Component,
|
|
17573
|
+
args: [{ standalone: true, selector: 'mng-main-layout-v2', imports: [NgClass, RouterModule, MngTopbarComponent, MngBreadcrumbComponent, MngComponentDirective, NgIf, AsyncPipe], providers: [MngMainLayoutComponentV2Service], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"layout-container\"\n [ngClass]=\"{\n 'layout-light': config.app?.colorScheme === 'light',\n 'layout-dark': config.app?.colorScheme === 'dark',\n 'layout-overlay': config.menuV2?.mode === 'overlay',\n 'layout-static': config.menuV2?.mode === 'static',\n 'layout-reveal': config.menuV2?.mode === 'reveal',\n 'layout-drawer': config.menuV2?.mode === 'drawer',\n 'layout-static-inactive': (layoutService.state.staticMenuDesktopInactive$ | async) && config.menuV2?.mode === 'static',\n 'layout-overlay-active': layoutService.state.overlayMenuActive$ | async,\n 'layout-mobile-active': layoutService.state.staticMenuMobileActive$ | async,\n 'p-ripple-disabled': !config.menuV2?.ripple,\n 'layout-sidebar-active': layoutService.state.sidebarActive$ | async,\n 'layout-sidebar-anchored': layoutService.state.anchored$ | async\n }\">\n <div class=\"layout-content-wrapper\">\n <div #topbarCmp class=\"layout-topbar-wrapper\" [mngComponent]=\"topbarComponent\" [attachToHost]=\"true\"></div>\n <div class=\"content-breadcrumb\">\n <div [mngComponent]=\"breadcrumbsComponent\" [attachToHost]=\"true\"></div>\n </div>\n <div class=\"layout-content\">\n <router-outlet></router-outlet>\n </div>\n <div class=\"layout-mask\"></div>\n <div [mngComponent]=\"footerComponent\" [attachToHost]=\"true\"></div>\n </div>\n</div>\n" }]
|
|
17574
|
+
}], ctorParameters: function () { return []; }, propDecorators: { appTopbar: [{
|
|
17575
|
+
type: ViewChild,
|
|
17576
|
+
args: ['topbarCmp']
|
|
17577
|
+
}] } });
|
|
17578
|
+
|
|
16035
17579
|
class RouteBuilder {
|
|
16036
17580
|
constructor(route) {
|
|
16037
17581
|
this.routePath = [];
|
|
16038
17582
|
this.routeData = { breadcrumb: null };
|
|
16039
17583
|
this.children = [];
|
|
16040
17584
|
this.menuItemChildren = [];
|
|
17585
|
+
this.menuItemChildrenAfter = []; // append after route children
|
|
16041
17586
|
this.route = route;
|
|
16042
17587
|
if (this.route.path && this.route.path.length > 0) {
|
|
16043
17588
|
this.routePath = [this.route.path];
|
|
@@ -16073,9 +17618,15 @@ class RouteBuilder {
|
|
|
16073
17618
|
static createFromRoute(route) {
|
|
16074
17619
|
return new RouteBuilder(route);
|
|
16075
17620
|
}
|
|
17621
|
+
/**
|
|
17622
|
+
* @deprecated use createLayoutRouteV2() instead
|
|
17623
|
+
*/
|
|
16076
17624
|
static createLayoutRoute(path, layoutComponent = MngMainLayoutComponent) {
|
|
16077
17625
|
return RouteBuilder.create(path, layoutComponent);
|
|
16078
17626
|
}
|
|
17627
|
+
static createLayoutRouteV2(path, layoutComponent = MngMainLayoutV2Component) {
|
|
17628
|
+
return RouteBuilder.create(path, layoutComponent);
|
|
17629
|
+
}
|
|
16079
17630
|
withRoot(routesBuilder) {
|
|
16080
17631
|
this.root = routesBuilder;
|
|
16081
17632
|
return this;
|
|
@@ -16147,16 +17698,43 @@ class RouteBuilder {
|
|
|
16147
17698
|
this.menuItem = menuItem;
|
|
16148
17699
|
return this;
|
|
16149
17700
|
}
|
|
16150
|
-
withMenuItem(icon, label, routerLink) {
|
|
17701
|
+
withMenuItem(icon, label, routerLink, breadcrumb = false) {
|
|
16151
17702
|
this.menuItem = this.createMenuItem(icon, label, routerLink);
|
|
17703
|
+
if (breadcrumb && label) {
|
|
17704
|
+
this.withBreadcrumb({
|
|
17705
|
+
label: label
|
|
17706
|
+
});
|
|
17707
|
+
}
|
|
16152
17708
|
return this;
|
|
16153
17709
|
}
|
|
16154
|
-
|
|
16155
|
-
|
|
17710
|
+
/**
|
|
17711
|
+
* Adds menu item child to this instance of menu item.
|
|
17712
|
+
* @param label Label.
|
|
17713
|
+
* @param icon Icon.
|
|
17714
|
+
* @param routerLink Router link.
|
|
17715
|
+
* @param afterRouteChildren If false, menu item child will be appended before route children menu items, at the end otherwise.
|
|
17716
|
+
*/
|
|
17717
|
+
withMenuItemChild(label, icon, routerLink, afterRouteChildren = false) {
|
|
17718
|
+
if (afterRouteChildren) {
|
|
17719
|
+
this.menuItemChildrenAfter.push(this.createMenuItem(icon, label, routerLink));
|
|
17720
|
+
}
|
|
17721
|
+
else {
|
|
17722
|
+
this.menuItemChildren.push(this.createMenuItem(icon, label, routerLink));
|
|
17723
|
+
}
|
|
16156
17724
|
return this;
|
|
16157
17725
|
}
|
|
16158
|
-
|
|
16159
|
-
|
|
17726
|
+
/**
|
|
17727
|
+
* Adds menu item child to this instance of menu item.
|
|
17728
|
+
* @param menuItem Configuration object for menu item.
|
|
17729
|
+
* @param afterRouteChildren If false, menu item child will be appended before route children menu items, at the end otherwise.
|
|
17730
|
+
*/
|
|
17731
|
+
withMngMenuItemChild(menuItem, afterRouteChildren = false) {
|
|
17732
|
+
if (afterRouteChildren) {
|
|
17733
|
+
this.menuItemChildrenAfter.push(menuItem);
|
|
17734
|
+
}
|
|
17735
|
+
else {
|
|
17736
|
+
this.menuItemChildren.push(menuItem);
|
|
17737
|
+
}
|
|
16160
17738
|
return this;
|
|
16161
17739
|
}
|
|
16162
17740
|
withMenuItemLazyChildren() {
|
|
@@ -16257,18 +17835,22 @@ class RouteBuilder {
|
|
|
16257
17835
|
if (menuItemBuild?.items) {
|
|
16258
17836
|
menuItemChildrenBuild.push(...menuItemBuild.items);
|
|
16259
17837
|
}
|
|
16260
|
-
|
|
16261
|
-
const
|
|
16262
|
-
if (
|
|
16263
|
-
|
|
17838
|
+
const processMenuItemChild = (child) => {
|
|
17839
|
+
const finalChild = { ...child };
|
|
17840
|
+
if (typeof finalChild.routerLink === 'undefined') {
|
|
17841
|
+
finalChild.routerLink = this.routePath;
|
|
16264
17842
|
}
|
|
16265
|
-
if (typeof
|
|
16266
|
-
|
|
17843
|
+
if (typeof finalChild.routerLink === 'string') {
|
|
17844
|
+
finalChild.routerLink = [finalChild.routerLink];
|
|
16267
17845
|
}
|
|
16268
|
-
|
|
16269
|
-
|
|
16270
|
-
|
|
16271
|
-
|
|
17846
|
+
if (finalChild.routerLink) {
|
|
17847
|
+
finalChild.routerLink = RouteUtil.removeEmptyPathSegments(finalChild.routerLink);
|
|
17848
|
+
}
|
|
17849
|
+
return finalChild;
|
|
17850
|
+
};
|
|
17851
|
+
this.menuItemChildren.forEach(child => menuItemChildren.push(processMenuItemChild(child)));
|
|
17852
|
+
const menuItemChildrenAfterBuild = this.menuItemChildrenAfter.map(child => processMenuItemChild(child));
|
|
17853
|
+
menuItemChildrenBuild.push(...menuItemChildren, ...routeChildrenMenuItems, ...menuItemChildrenAfterBuild);
|
|
16272
17854
|
if (!menuItemBuild) {
|
|
16273
17855
|
return menuItemChildrenBuild;
|
|
16274
17856
|
}
|
|
@@ -16345,10 +17927,17 @@ class RoutesBuilder {
|
|
|
16345
17927
|
static create() {
|
|
16346
17928
|
return new RoutesBuilder();
|
|
16347
17929
|
}
|
|
17930
|
+
/**
|
|
17931
|
+
* @deprecated use createWithLayoutV2() instead
|
|
17932
|
+
*/
|
|
16348
17933
|
static createWithLayout(layoutComponent = MngMainLayoutComponent) {
|
|
16349
17934
|
const layoutRoute = RouteBuilder.createLayoutRoute('', layoutComponent);
|
|
16350
17935
|
return new RoutesBuilder(layoutRoute);
|
|
16351
17936
|
}
|
|
17937
|
+
static createWithLayoutV2(layoutComponent = MngMainLayoutV2Component) {
|
|
17938
|
+
const layoutRoute = RouteBuilder.createLayoutRouteV2('', layoutComponent);
|
|
17939
|
+
return new RoutesBuilder(layoutRoute);
|
|
17940
|
+
}
|
|
16352
17941
|
addAngularRoute(route) {
|
|
16353
17942
|
return this.addRouteBuilder(RouteBuilder.createFromRoute(route));
|
|
16354
17943
|
}
|
|
@@ -16624,5 +18213,5 @@ function EnumName(typeName) {
|
|
|
16624
18213
|
* Generated bundle index. Do not edit.
|
|
16625
18214
|
*/
|
|
16626
18215
|
|
|
16627
|
-
export { ACTION_EDITOR_DIALOG_COMPONENT_SETTING, AFieldDescriptor, AFieldGroupDescriptor, AGenericFieldDescriptor, AMngApiService, AMngBaseApiService, AMngCrudApiService, AMngErrorBase, AMngFormlyCustomFieldComponent, AMngGetAllApiService, AMngTableviewRouteComponent, APermissions, ActionActivationTriggerEnum, ActionButtonDescriptor, ActionConfirmationDialogDescriptor, ActionContext, ActionContextValidation, ActionDataProviderUtil, ActionDeleteDescriptor, ActionDescriptor, ActionEditorAddDescriptor, ActionEditorDescriptor, ActionEditorDetailsDescriptor, ActionEditorEditDescriptor, ActionEditorSubmitDescriptor, ActionEditorSubmitTypeEnum, ActionError, ActionInstance, ActionInstanceStateEnum, ActionLinkDescriptor, ActionParameters, ActionPositionEnum, ActionSimpleDescriptor, ActionTypeEnum, AuthorizationTypeEnum, AuthorizationUtil, ButtonStyleBuilder, ButtonStyleRoundedEnum, ColumnDescriptor, ColumnDisplayTypeEnum, ColumnDynamicDescriptor, ColumnTypeEnum, DataProvider, DateUtil, DefaultActionMngErrorMapperService, DynamicTableviewDataProvider, EditorDataProvider, EditorDescriptor, EditorFormlyUtil, EnumName, EnumUtil, EnumeratePipeI18nHelper, ErrorUtil, ExportUtils, FieldActionDescriptor, FieldGroupDescriptor, FieldGroupTypeEnum, FieldInputDescriptor, FieldInputTypeEnum, FieldLookupDescriptor, FieldLookupEnumDescriptor, FieldLookupTypeEnum, FieldManyEditorActionEnum, FieldManyEditorDescriptor, FieldManyEditorTypeEnum, FieldManyToManyEditorActionEnum, FieldManyToManyEditorDescriptor, FieldManyToManyEditorTypeEnum, FieldSizeEnum, FieldTabGroupDescriptor, FieldValidationDescriptor, FileUtil, FilterDescriptor, FilterLookupDescriptor, FilterLookupEnumDescriptor, FilterLookupTypeEnum, FilterMatchModeEnum, FilterTypeEnum, I18nUtils, IdProperty, JsonPathPipe, LogLevelEnum, LookupDataProvider, MNG_AUTOCOMPLETE_VALUE_ACCESSOR, MNG_BROWSER_STORAGE_IT, MNG_COMMONS_INITIALIZER_IT, MNG_DATE_RANGE_VALUE_ACCESSOR, MNG_DROPDOWN_VALUE_ACCESSOR, MNG_LOG_PUBLISHERS, MNG_MODULE_CONFIG_IT, MediusFilterMatchType, MediusFilterParam, MediusQueryMode, MediusQueryParam, MediusQueryParamBuilder, MediusQueryResult, MediusRestUtil, MngActionComponent, MngActionEditorComponent, MngActionError, MngActionErrorMapperService, MngActionExecutorService, MngActionRouteComponent, MngAuthorizationService, MngAutocompleteComponent, MngBooleanPipe, MngBreadcrumbComponent, MngClassMapPipe, MngCommonsModule, MngCommonsService, MngComponentDirective, MngConfigurationService, MngDataLanguageDropdownComponent, MngDateRangeComponent, MngDropdownComponent, MngEnumPipe, MngEnumerateAsyncPipe, MngEnumeratePipe, MngErrorHandler, MngErrorPageComponent, MngFooterComponent, MngFormEditorComponent, MngFormEditorSubmitEvent, MngFormEvent, MngFormEventTypeEnum, MngFormFieldEvent, MngFormFieldEventComponentSubtype, MngFormFieldEventDialogSubtype, MngFormFieldEventTypeEnum, MngFormlyFieldActionComponent, MngFormlyFieldAutocompleteComponent, MngFormlyFieldCustomComponent, MngFormlyFieldDropdownComponent, MngFormlyFieldFieldsetComponent, MngFormlyFieldInputComponent, MngFormlyFieldLabelComponent, MngFormlyFieldLookupDialogComponent, MngFormlyFieldNoLabelWrapperComponent, MngFormlyFieldTableDialogFormComponent, MngFormlyFieldTableDialogMultiselectComponent, MngFormlyFieldTabsComponent, MngFormlyFieldWrapperComponent, MngGetterPipe, MngHttpError, MngI18nPropertyPipe, MngInternalError, MngLocalStorageService, MngLocaleDefaultRowClassPipe, MngLogPublisherConsoleService, MngLoggerService, MngMainLayoutComponent, MngMainLayoutComponentService, MngMenuComponent, MngMenuItemComponent, MngNavigationService, MngNotFoundPageComponent, MngParametrizePipe, MngRouterService, MngTableCellClickEvent, MngTableColumnFilterComponent, MngTableColumnValueComponent, MngTableComponent, MngTableLoadEvent, MngTableReloadEvent, MngTableviewComponent, MngTableviewRouteComponent, MngTemplateDirective, MngTemplatePipe, MngTopbarComponent, MngTopbarUserComponent, MngVersionComponent, MngVersionService, MngViewContainerComponentService, ModelDescriptor, ModelUtil, NotificationUtil, ObjectSerializer, ObjectUtil, Permissions, RouteBuilder, RoutesBuilder, StringUtil, StyleLevelEnum, StyleSizeEnum, StylesUtil, TableDataProvider, TableDescriptor, TableDynamicColumnsModeEnum, TableDynamicDescriptor, TableFilterDisplayEnum, TablePaginationModeEnum, TableSizeEnum, TableviewActionDefaultCategories, TableviewCrudDataProvider, TableviewDataProvider, TableviewDescriptor, TableviewDynamicDescriptor, TableviewEditorTypeEnum, TableviewRouteBuilder, TableviewRouteBuilderInternal, TitleProperty, TypeName, TypeUtil, enumsMapBase, formlyTypesConfig, formlyWrappersConfig, getEmailValidationMessage, getFormlyValidationMessages, getMaxDateValidationMessage, getMaxLengthValidationMessage, getMaxValidationMessage, getMinDateValidationMessage, getMinLengthValidationMessage, getMinValidationMessage, getRequiredValidationMessage, getTextPatternValidationMessage, mngAuthorizationGuard, mngFormlyConfigProvider, primeNgModules, provideMngCommons, typeMapBase };
|
|
18216
|
+
export { ACTION_EDITOR_DIALOG_COMPONENT_SETTING, AFieldDescriptor, AFieldGroupDescriptor, AGenericFieldDescriptor, AMngApiService, AMngBaseApiService, AMngCrudApiService, AMngErrorBase, AMngFormlyCustomFieldComponent, AMngGetAllApiService, AMngTableviewRouteComponent, APermissions, ActionActivationTriggerEnum, ActionButtonDescriptor, ActionConfirmationDialogDescriptor, ActionContext, ActionContextValidation, ActionDataProviderUtil, ActionDeleteDescriptor, ActionDescriptor, ActionEditorAddDescriptor, ActionEditorDescriptor, ActionEditorDetailsDescriptor, ActionEditorEditDescriptor, ActionEditorSubmitDescriptor, ActionEditorSubmitTypeEnum, ActionError, ActionInstance, ActionInstanceStateEnum, ActionLinkDescriptor, ActionParameters, ActionPositionEnum, ActionSimpleDescriptor, ActionTypeEnum, AuthorizationTypeEnum, AuthorizationUtil, ButtonStyleBuilder, ButtonStyleRoundedEnum, ColumnDescriptor, ColumnDisplayTypeEnum, ColumnDynamicDescriptor, ColumnTypeEnum, DataProvider, DateUtil, DefaultActionMngErrorMapperService, DynamicTableviewDataProvider, EditorDataProvider, EditorDescriptor, EditorFormlyUtil, EnumName, EnumUtil, EnumeratePipeI18nHelper, ErrorUtil, ExportUtils, FieldActionDescriptor, FieldGroupDescriptor, FieldGroupTypeEnum, FieldInputDescriptor, FieldInputTypeEnum, FieldLookupDescriptor, FieldLookupEnumDescriptor, FieldLookupTypeEnum, FieldManyEditorActionEnum, FieldManyEditorDescriptor, FieldManyEditorTypeEnum, FieldManyToManyEditorActionEnum, FieldManyToManyEditorDescriptor, FieldManyToManyEditorTypeEnum, FieldSizeEnum, FieldTabGroupDescriptor, FieldValidationDescriptor, FileUtil, FilterDescriptor, FilterLookupDescriptor, FilterLookupEnumDescriptor, FilterLookupTypeEnum, FilterMatchModeEnum, FilterTypeEnum, I18nUtils, IdProperty, JsonPathPipe, LogLevelEnum, LookupDataProvider, MNG_AUTOCOMPLETE_VALUE_ACCESSOR, MNG_BROWSER_STORAGE_IT, MNG_COMMONS_INITIALIZER_IT, MNG_DATE_RANGE_VALUE_ACCESSOR, MNG_DROPDOWN_VALUE_ACCESSOR, MNG_LOG_PUBLISHERS, MNG_MODULE_CONFIG_IT, MediusFilterMatchType, MediusFilterParam, MediusQueryMode, MediusQueryParam, MediusQueryParamBuilder, MediusQueryResult, MediusRestUtil, MngActionComponent, MngActionEditorComponent, MngActionError, MngActionErrorMapperService, MngActionExecutorService, MngActionRouteComponent, MngAuthorizationService, MngAutocompleteComponent, MngBooleanPipe, MngBreadcrumbComponent$1 as MngBreadcrumbComponent, MngClassMapPipe, MngCommonsInitEventEnum, MngCommonsModule, MngCommonsService, MngComponentDirective, MngConfigurationService, MngDataLanguageDropdownComponent, MngDateRangeComponent, MngDialogKeydownHandlerDirective, MngDropdownComponent, MngEnumPipe, MngEnumerateAsyncPipe, MngEnumeratePipe, MngErrorHandler, MngErrorPageComponent, MngFooterComponent$1 as MngFooterComponent, MngFormEditorComponent, MngFormEditorSubmitEvent, MngFormEvent, MngFormEventTypeEnum, MngFormFieldEvent, MngFormFieldEventComponentSubtype, MngFormFieldEventDialogSubtype, MngFormFieldEventTypeEnum, MngFormlyFieldActionComponent, MngFormlyFieldAutocompleteComponent, MngFormlyFieldCustomComponent, MngFormlyFieldDropdownComponent, MngFormlyFieldFieldsetComponent, MngFormlyFieldInputComponent, MngFormlyFieldLabelComponent, MngFormlyFieldLookupDialogComponent, MngFormlyFieldNoLabelWrapperComponent, MngFormlyFieldTableDialogFormComponent, MngFormlyFieldTableDialogMultiselectComponent, MngFormlyFieldTabsComponent, MngFormlyFieldWrapperComponent, MngGetterPipe, MngHttpError, MngI18nPropertyPipe, MngInternalError, MngLocalStorageService, MngLocaleDefaultRowClassPipe, MngLogPublisherConsoleService, MngLoggerService, MngMainLayoutComponent, MngMainLayoutComponentService, MngMenuComponent$1 as MngMenuComponent, MngMenuItemComponent$1 as MngMenuItemComponent, MngNavigationService, MngNotFoundPageComponent, MngParametrizePipe, MngRouterService, MngTableCellClickEvent, MngTableColumnFilterComponent, MngTableColumnFilterFullComponent, MngTableColumnValueComponent, MngTableComponent, MngTableLoadEvent, MngTableReloadEvent, MngTableviewComponent, MngTableviewRouteComponent, MngTemplateDirective, MngTemplatePipe, MngTopbarComponent$1 as MngTopbarComponent, MngTopbarUserComponent$1 as MngTopbarUserComponent, MngVersionComponent$1 as MngVersionComponent, MngVersionService, MngViewContainerComponentService, ModelDescriptor, ModelUtil, NotificationUtil, ObjectSerializer, ObjectUtil, Permissions, RouteBuilder, RoutesBuilder, StringUtil, StyleLevelEnum, StyleSizeEnum, StylesUtil, TableDataProvider, TableDescriptor, TableDynamicColumnsModeEnum, TableDynamicDescriptor, TableFilterDisplayEnum, TablePaginationModeEnum, TableSizeEnum, TableviewActionDefaultCategories, TableviewCrudDataProvider, TableviewDataProvider, TableviewDescriptor, TableviewDynamicDescriptor, TableviewEditorTypeEnum, TableviewRouteBuilder, TableviewRouteBuilderInternal, TitleProperty, TypeName, TypeUtil, booleanObsAttribute, enumsMapBase, formlyTypesConfig, formlyWrappersConfig, getEmailValidationMessage, getFormlyValidationMessages, getMaxDateValidationMessage, getMaxLengthValidationMessage, getMaxValidationMessage, getMinDateValidationMessage, getMinLengthValidationMessage, getMinValidationMessage, getRequiredValidationMessage, getTextPatternValidationMessage, mngAuthorizationGuard, mngFormlyConfigProvider, primeNgModules, provideMngCommons, typeMapBase };
|
|
16628
18217
|
//# sourceMappingURL=mediusinc-mng-commons.mjs.map
|