@mediusinc/mng-commons 2.0.0-rc.0-08f92864 → 2.0.0-rc.1-b808fba6
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/esm2020/lib/components/action/action.component.mjs +2 -2
- package/esm2020/lib/components/form/dropdown/dropdown.component.mjs +18 -5
- package/esm2020/lib/components/layout/index.mjs +2 -1
- package/esm2020/lib/components/layout/main-layout.component.mjs +17 -13
- package/esm2020/lib/components/layout/topbar-user.component.mjs +41 -0
- package/esm2020/lib/components/layout/topbar.component.mjs +28 -31
- package/esm2020/lib/components/tableview/table/column-value/column-value.component.mjs +2 -2
- package/esm2020/lib/components/tableview/table/table.component.mjs +2 -2
- package/esm2020/lib/directives/component.directive.mjs +27 -10
- package/esm2020/lib/mng-commons.module.mjs +6 -1
- package/esm2020/lib/models/config.model.mjs +1 -1
- package/esm2020/lib/router/models/router.model.mjs +1 -1
- package/esm2020/lib/router/route-builder.mjs +9 -29
- package/esm2020/lib/router/routes-builder.mjs +7 -7
- package/esm2020/lib/router/tableview-route-builder.mjs +70 -73
- package/fesm2015/mediusinc-mng-commons.mjs +209 -159
- package/fesm2015/mediusinc-mng-commons.mjs.map +1 -1
- package/fesm2020/mediusinc-mng-commons.mjs +202 -159
- package/fesm2020/mediusinc-mng-commons.mjs.map +1 -1
- package/lib/components/form/dropdown/dropdown.component.d.ts +7 -0
- package/lib/components/layout/index.d.ts +1 -0
- package/lib/components/layout/main-layout.component.d.ts +3 -1
- package/lib/components/layout/topbar-user.component.d.ts +21 -0
- package/lib/components/layout/topbar.component.d.ts +8 -10
- package/lib/directives/component.directive.d.ts +7 -3
- package/lib/mng-commons.module.d.ts +27 -26
- package/lib/models/config.model.d.ts +10 -0
- package/lib/router/models/router.model.d.ts +0 -5
- package/lib/router/route-builder.d.ts +6 -8
- package/lib/router/routes-builder.d.ts +4 -5
- package/lib/router/tableview-route-builder.d.ts +16 -10
- package/package.json +1 -1
- package/scss/theme/default/_mng-variables-theme-light.scss +2 -0
- package/version-info.json +5 -5
|
@@ -3,7 +3,7 @@ import { AsyncPipe, NgIf, NgForOf, NgSwitch, NgSwitchCase, NgSwitchDefault, Deci
|
|
|
3
3
|
import * as i1$4 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 { InjectionToken, Injectable, Pipe, Inject, EventEmitter, Directive, Input, Output, Component, ChangeDetectionStrategy, Optional, HostBinding, ViewChild, ContentChildren, forwardRef, LOCALE_ID, ViewChildren, inject, HostListener, APP_INITIALIZER, NgModule } from '@angular/core';
|
|
6
|
+
import { InjectionToken, Injectable, Pipe, Inject, EventEmitter, createComponent, Directive, Input, Output, Component, ChangeDetectionStrategy, Optional, HostBinding, ViewChild, ContentChildren, forwardRef, LOCALE_ID, ViewChildren, inject, HostListener, APP_INITIALIZER, NgModule } from '@angular/core';
|
|
7
7
|
import * as i1$1 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';
|
|
@@ -8245,43 +8245,60 @@ class ActionLinkDescriptor extends ActionDescriptor {
|
|
|
8245
8245
|
}
|
|
8246
8246
|
|
|
8247
8247
|
class MngComponentDirective {
|
|
8248
|
-
constructor(viewContainerRef) {
|
|
8248
|
+
constructor(viewContainerRef, elementRef, applicationRef, injector) {
|
|
8249
8249
|
this.viewContainerRef = viewContainerRef;
|
|
8250
|
+
this.elementRef = elementRef;
|
|
8251
|
+
this.applicationRef = applicationRef;
|
|
8252
|
+
this.injector = injector;
|
|
8253
|
+
this.attachToHost = false;
|
|
8250
8254
|
this.componentInstanceEventEmitter = new EventEmitter();
|
|
8251
8255
|
}
|
|
8252
8256
|
ngOnInit() {
|
|
8253
|
-
this.
|
|
8254
|
-
|
|
8257
|
+
if (this.attachToHost) {
|
|
8258
|
+
this.componentRef = createComponent(this.component, {
|
|
8259
|
+
hostElement: this.elementRef.nativeElement,
|
|
8260
|
+
environmentInjector: this.applicationRef.injector,
|
|
8261
|
+
elementInjector: this.injector
|
|
8262
|
+
});
|
|
8263
|
+
}
|
|
8264
|
+
else {
|
|
8265
|
+
this.viewContainerRef.clear();
|
|
8266
|
+
this.componentRef = this.viewContainerRef.createComponent(this.component);
|
|
8267
|
+
}
|
|
8255
8268
|
if (this.inputs) {
|
|
8256
8269
|
if (this.isCmpInstanceOfColumnValue(this.componentRef.instance)) {
|
|
8257
8270
|
this.componentRef.instance.setColumnValue(this.inputs['value'], this.inputs['item'], this.inputs['descriptor']);
|
|
8258
8271
|
}
|
|
8259
8272
|
else {
|
|
8260
|
-
const instanceAny = this.componentRef;
|
|
8261
8273
|
for (const input in this.inputs) {
|
|
8262
|
-
|
|
8274
|
+
this.componentRef.setInput(input, this.inputs[input]);
|
|
8263
8275
|
}
|
|
8264
8276
|
}
|
|
8265
8277
|
}
|
|
8278
|
+
if (this.attachToHost) {
|
|
8279
|
+
this.applicationRef.attachView(this.componentRef.hostView);
|
|
8280
|
+
}
|
|
8266
8281
|
this.componentInstanceEventEmitter.next(this.componentRef.instance);
|
|
8267
8282
|
}
|
|
8268
8283
|
isCmpInstanceOfColumnValue(cmp) {
|
|
8269
8284
|
return typeof cmp.setColumnValue === 'function';
|
|
8270
8285
|
}
|
|
8271
8286
|
}
|
|
8272
|
-
MngComponentDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: MngComponentDirective, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
8273
|
-
MngComponentDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.1", type: MngComponentDirective, isStandalone: true, selector: "[mngComponent]", inputs: { component: ["mngComponent", "component"], inputs: "inputs" }, outputs: { componentInstanceEventEmitter: "instanceCreated" }, ngImport: i0 });
|
|
8287
|
+
MngComponentDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: MngComponentDirective, deps: [{ token: i0.ViewContainerRef }, { token: i0.ElementRef }, { token: i0.ApplicationRef }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Directive });
|
|
8288
|
+
MngComponentDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.1", type: MngComponentDirective, isStandalone: true, selector: "[mngComponent]", inputs: { component: ["mngComponent", "component"], inputs: "inputs", attachToHost: "attachToHost" }, outputs: { componentInstanceEventEmitter: "instanceCreated" }, ngImport: i0 });
|
|
8274
8289
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: MngComponentDirective, decorators: [{
|
|
8275
8290
|
type: Directive,
|
|
8276
8291
|
args: [{
|
|
8277
8292
|
standalone: true,
|
|
8278
8293
|
selector: '[mngComponent]'
|
|
8279
8294
|
}]
|
|
8280
|
-
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; }, propDecorators: { component: [{
|
|
8295
|
+
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.ElementRef }, { type: i0.ApplicationRef }, { type: i0.Injector }]; }, propDecorators: { component: [{
|
|
8281
8296
|
type: Input,
|
|
8282
8297
|
args: ['mngComponent']
|
|
8283
8298
|
}], inputs: [{
|
|
8284
8299
|
type: Input
|
|
8300
|
+
}], attachToHost: [{
|
|
8301
|
+
type: Input
|
|
8285
8302
|
}], componentInstanceEventEmitter: [{
|
|
8286
8303
|
type: Output,
|
|
8287
8304
|
args: ['instanceCreated']
|
|
@@ -8701,7 +8718,7 @@ class MngActionComponent {
|
|
|
8701
8718
|
}
|
|
8702
8719
|
}
|
|
8703
8720
|
MngActionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: MngActionComponent, deps: [{ token: i1.ActivatedRoute }, { token: i2$1.TranslateService }, { token: MngAuthorizationService }, { token: MngActionExecutorService }, { token: i2$2.ConfirmationService }, { token: MngViewContainerComponentService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
8704
|
-
MngActionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", 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"], 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 [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]=\"$any($tooltip | async)\"\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 [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]=\"$any($tooltip | async)\"\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]=\"$any(action.button.icon)\"\n [label]=\"($label | async) ?? ''\"\n [pTooltip]=\"$any($tooltip | async)\"\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 [label]=\"($label | async) ?? ''\"\n [pTooltip]=\"$any($tooltip | async)\"\n [loading]=\"(($loading | async) ?? false) || ((inputLoading | async) ?? false)\"\n [disabled]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false)\"\n (click)=\"triggerAction(action, undefined, $event)\"\n [class]=\"buttonClass\"></button>\n <p-slideMenu #subactionsMenu [model]=\"subactions\" [popup]=\"true\" [viewportHeight]=\"100\"></p-slideMenu>\n </ng-template>\n <p-confirmDialog\n *ngIf=\"action.runConfirmationDialogDescriptor\"\n [key]=\"action.actionName + '_' + cmpId\"\n [baseZIndex]=\"50\"\n appendTo=\"body\"\n [closable]=\"action.runConfirmationDialogDescriptor.closable\"></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: i5.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", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "pipe", type: MngParametrizePipe, name: "parametrize" }, { kind: "directive", type: MngComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "inputs"], outputs: ["instanceCreated"] }, { kind: "ngmodule", type: ConfirmDialogModule }, { kind: "component", type: i9.ConfirmDialog, selector: "p-confirmDialog", inputs: ["header", "icon", "message", "style", "styleClass", "maskStyleClass", "acceptIcon", "acceptLabel", "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"], outputs: ["onClick", "onDropdownClick"] }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: SlideMenuModule }, { kind: "component", type: i11.SlideMenu, selector: "p-slideMenu", inputs: ["model", "popup", "style", "styleClass", "menuWidth", "viewportHeight", "effectDuration", "easing", "backLabel", "appendTo", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8721
|
+
MngActionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", 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"], 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 [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]=\"$any($tooltip | async)\"\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 [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]=\"$any($tooltip | async)\"\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]=\"$any(action.button.icon)\"\n [label]=\"($label | async) ?? ''\"\n [pTooltip]=\"$any($tooltip | async)\"\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 [label]=\"($label | async) ?? ''\"\n [pTooltip]=\"$any($tooltip | async)\"\n [loading]=\"(($loading | async) ?? false) || ((inputLoading | async) ?? false)\"\n [disabled]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false)\"\n (click)=\"triggerAction(action, undefined, $event)\"\n [class]=\"buttonClass\"></button>\n <p-slideMenu #subactionsMenu [model]=\"subactions\" [popup]=\"true\" [viewportHeight]=\"100\"></p-slideMenu>\n </ng-template>\n <p-confirmDialog\n *ngIf=\"action.runConfirmationDialogDescriptor\"\n [key]=\"action.actionName + '_' + cmpId\"\n [baseZIndex]=\"50\"\n appendTo=\"body\"\n [closable]=\"action.runConfirmationDialogDescriptor.closable\"></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: i5.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", "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", "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"], outputs: ["onClick", "onDropdownClick"] }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: SlideMenuModule }, { kind: "component", type: i11.SlideMenu, selector: "p-slideMenu", inputs: ["model", "popup", "style", "styleClass", "menuWidth", "viewportHeight", "effectDuration", "easing", "backLabel", "appendTo", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8705
8722
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: MngActionComponent, decorators: [{
|
|
8706
8723
|
type: Component,
|
|
8707
8724
|
args: [{ standalone: true, selector: 'mng-action', changeDetection: ChangeDetectionStrategy.OnPush, imports: [AsyncPipe, NgIf, ButtonModule, RippleModule, TooltipModule, MngParametrizePipe, MngComponentDirective, ConfirmDialogModule, SplitButtonModule, SlideMenuModule], 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 [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]=\"$any($tooltip | async)\"\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 [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]=\"$any($tooltip | async)\"\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]=\"$any(action.button.icon)\"\n [label]=\"($label | async) ?? ''\"\n [pTooltip]=\"$any($tooltip | async)\"\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 [label]=\"($label | async) ?? ''\"\n [pTooltip]=\"$any($tooltip | async)\"\n [loading]=\"(($loading | async) ?? false) || ((inputLoading | async) ?? false)\"\n [disabled]=\"($isEnabled | async) === false || ((inputDisabled | async) ?? false)\"\n (click)=\"triggerAction(action, undefined, $event)\"\n [class]=\"buttonClass\"></button>\n <p-slideMenu #subactionsMenu [model]=\"subactions\" [popup]=\"true\" [viewportHeight]=\"100\"></p-slideMenu>\n </ng-template>\n <p-confirmDialog\n *ngIf=\"action.runConfirmationDialogDescriptor\"\n [key]=\"action.actionName + '_' + cmpId\"\n [baseZIndex]=\"50\"\n appendTo=\"body\"\n [closable]=\"action.runConfirmationDialogDescriptor.closable\"></p-confirmDialog>\n</ng-container>\n", styles: [":host{display:inline-block}\n"] }]
|
|
@@ -9511,8 +9528,6 @@ class MngDropdownComponent {
|
|
|
9511
9528
|
this.itemsSubject = new ReplaySubject(1);
|
|
9512
9529
|
this.dataProviderService = null;
|
|
9513
9530
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
9514
|
-
this.onChangeFn = () => { };
|
|
9515
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
9516
9531
|
this.onTouchedFn = () => { };
|
|
9517
9532
|
this.dropdownFormControl = new FormControl();
|
|
9518
9533
|
this.items$ = this.itemsSubject.asObservable();
|
|
@@ -9609,6 +9624,9 @@ class MngDropdownComponent {
|
|
|
9609
9624
|
}
|
|
9610
9625
|
}
|
|
9611
9626
|
writeValue(obj) {
|
|
9627
|
+
if (!this.isValueAccessorInitialized()) {
|
|
9628
|
+
return;
|
|
9629
|
+
}
|
|
9612
9630
|
this.dropdownFormControl.setValue(obj, { emitEvent: false });
|
|
9613
9631
|
}
|
|
9614
9632
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -9625,16 +9643,28 @@ class MngDropdownComponent {
|
|
|
9625
9643
|
}
|
|
9626
9644
|
propagateValueChange(value) {
|
|
9627
9645
|
var _a, _b;
|
|
9646
|
+
if (!this.isValueAccessorInitialized()) {
|
|
9647
|
+
return;
|
|
9648
|
+
}
|
|
9628
9649
|
(_b = (_a = this.formlyWrapper) === null || _a === void 0 ? void 0 : _a.formControl) === null || _b === void 0 ? void 0 : _b.markAsTouched();
|
|
9629
9650
|
this.onChangeFn(value);
|
|
9630
9651
|
this.valueChangeEventEmitter.next(value);
|
|
9631
9652
|
}
|
|
9653
|
+
/**
|
|
9654
|
+
* Prevents executions for writing and outputting value which is sometimes committed as null in cmp initialization stage.
|
|
9655
|
+
* In dropdown (from ang. 15 and switch to standalone cmp) null value was always committed to dropdown even if default value was set (using ngModel or formControl) which is incorrect.
|
|
9656
|
+
* Github issue: https://github.com/angular/angular/issues/14988
|
|
9657
|
+
* @private
|
|
9658
|
+
*/
|
|
9659
|
+
isValueAccessorInitialized() {
|
|
9660
|
+
return typeof this.onChangeFn !== 'undefined';
|
|
9661
|
+
}
|
|
9632
9662
|
}
|
|
9633
9663
|
MngDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: MngDropdownComponent, deps: [{ token: i0.Injector }, { token: i2$1.TranslateService }, { token: MngFormlyFieldWrapperComponent, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
9634
|
-
MngDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", 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]=\"$any(placeholder)\"\n [dataKey]=\"$any(dataKeyProperty)\"\n [optionLabel]=\"$any(itemsLabelProperty)\"\n [optionValue]=\"$any(itemsValueProperty)\"\n [optionDisabled]=\"$any(itemsDisabledProperty)\"\n [options]=\"$any(items$ | async)\"\n [showClear]=\"showClear\"\n [autoDisplayFirst]=\"false\"\n [styleClass]=\"$any(className)\"\n [panelStyleClass]=\"$any(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 [defaultLabel]=\"$any(placeholder)\"\n [dataKey]=\"$any(dataKeyProperty)\"\n [optionLabel]=\"$any(itemsLabelProperty)\"\n [optionValue]=\"$any(itemsValueProperty)\"\n [optionDisabled]=\"$any(itemsDisabledProperty)\"\n [options]=\"(items$ | async) ?? []\"\n [styleClass]=\"$any(className)\"\n [panelStyleClass]=\"$any(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$2.Dropdown, selector: "p-dropdown", inputs: ["scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "filterPlaceholder", "filterLocale", "inputId", "selectId", "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", "overlayDirection", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "options", "filterValue"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { 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", "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"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove"] }, { kind: "ngmodule", type:
|
|
9664
|
+
MngDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", 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]=\"$any(placeholder)\"\n [dataKey]=\"$any(dataKeyProperty)\"\n [optionLabel]=\"$any(itemsLabelProperty)\"\n [optionValue]=\"$any(itemsValueProperty)\"\n [optionDisabled]=\"$any(itemsDisabledProperty)\"\n [options]=\"$any(items$ | async)\"\n [showClear]=\"showClear\"\n [autoDisplayFirst]=\"false\"\n [styleClass]=\"$any(className)\"\n [panelStyleClass]=\"$any(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 [defaultLabel]=\"$any(placeholder)\"\n [dataKey]=\"$any(dataKeyProperty)\"\n [optionLabel]=\"$any(itemsLabelProperty)\"\n [optionValue]=\"$any(itemsValueProperty)\"\n [optionDisabled]=\"$any(itemsDisabledProperty)\"\n [options]=\"(items$ | async) ?? []\"\n [styleClass]=\"$any(className)\"\n [panelStyleClass]=\"$any(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$2.Dropdown, selector: "p-dropdown", inputs: ["scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "filterPlaceholder", "filterLocale", "inputId", "selectId", "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", "overlayDirection", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "options", "filterValue"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { 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", "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"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
9635
9665
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: MngDropdownComponent, decorators: [{
|
|
9636
9666
|
type: Component,
|
|
9637
|
-
args: [{ standalone: true, selector: 'mng-dropdown', providers: [MNG_DROPDOWN_VALUE_ACCESSOR], imports: [DropdownModule, MultiSelectModule,
|
|
9667
|
+
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]=\"$any(placeholder)\"\n [dataKey]=\"$any(dataKeyProperty)\"\n [optionLabel]=\"$any(itemsLabelProperty)\"\n [optionValue]=\"$any(itemsValueProperty)\"\n [optionDisabled]=\"$any(itemsDisabledProperty)\"\n [options]=\"$any(items$ | async)\"\n [showClear]=\"showClear\"\n [autoDisplayFirst]=\"false\"\n [styleClass]=\"$any(className)\"\n [panelStyleClass]=\"$any(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 [defaultLabel]=\"$any(placeholder)\"\n [dataKey]=\"$any(dataKeyProperty)\"\n [optionLabel]=\"$any(itemsLabelProperty)\"\n [optionValue]=\"$any(itemsValueProperty)\"\n [optionDisabled]=\"$any(itemsDisabledProperty)\"\n [options]=\"(items$ | async) ?? []\"\n [styleClass]=\"$any(className)\"\n [panelStyleClass]=\"$any(dropdownClassName)\"\n [filter]=\"true\"\n [showToggleAll]=\"false\"\n (onPanelHide)=\"onPanelHide($event)\"\n appendTo=\"body\">\n </p-multiSelect>\n</ng-template>\n" }]
|
|
9638
9668
|
}], ctorParameters: function () {
|
|
9639
9669
|
return [{ type: i0.Injector }, { type: i2$1.TranslateService }, { type: MngFormlyFieldWrapperComponent, decorators: [{
|
|
9640
9670
|
type: Optional
|
|
@@ -10537,7 +10567,7 @@ class MngTableColumnValueComponent {
|
|
|
10537
10567
|
}
|
|
10538
10568
|
}
|
|
10539
10569
|
MngTableColumnValueComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: MngTableColumnValueComponent, deps: [{ token: i0.ElementRef }, { token: i2$2.MessageService }, { token: i2$1.TranslateService }, { token: JsonPathPipe }, { token: MngGetterPipe }, { token: MngTemplatePipe }], target: i0.ɵɵFactoryTarget.Component });
|
|
10540
|
-
MngTableColumnValueComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", 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 {{ value }}\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}.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", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2$1.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"], 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: i5.Ripple, selector: "[pRipple]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
10570
|
+
MngTableColumnValueComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", 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 {{ value }}\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}.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", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2$1.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: i5.Ripple, selector: "[pRipple]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
10541
10571
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: MngTableColumnValueComponent, decorators: [{
|
|
10542
10572
|
type: Component,
|
|
10543
10573
|
args: [{ standalone: true, selector: 'mng-table-column-value', imports: [
|
|
@@ -11080,7 +11110,7 @@ class MngTableComponent {
|
|
|
11080
11110
|
}
|
|
11081
11111
|
}
|
|
11082
11112
|
MngTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: MngTableComponent, deps: [{ token: i0.Injector }, { token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2$1.TranslateService }, { token: MngCommonsService }, { token: MngActionExecutorService }, { token: MngViewContainerComponentService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
11083
|
-
MngTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", 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" }, 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]=\"$any(descriptor?.dataKeyProperty ?? null)\"\n [lazy]=\"isLazy\"\n [loading]=\"(loading$ | async) ?? false\"\n [paginator]=\"isPagination && !infiniteScroll\"\n [rows]=\"$any(infiniteScroll ? 20 : rows)\"\n [first]=\"$any(infiniteScroll ? 0 : offset)\"\n [totalRecords]=\"$any(infiniteScroll ? null : (queryResult$ | async)?.allDataCount ?? 0)\"\n [rowsPerPageOptions]=\"$any(infiniteScroll ? null : rowsPerPageOptions)\"\n [showCurrentPageReport]=\"!infiniteScroll\"\n [currentPageReportTemplate]=\"'mngTable.paginationMsg' | translate\"\n [multiSortMeta]=\"$any(multiSortMeta)\"\n [filters]=\"filterMetadata\"\n sortMode=\"multiple\"\n [(selection)]=\"selection\"\n (selectionChange)=\"onSelectionChange($event)\"\n [selectionMode]=\"$any(selectionEnabled ? selectionMode : null)\"\n [scrollable]=\"true\"\n [virtualScroll]=\"infiniteScroll\"\n [virtualScrollItemSize]=\"$any(rowHeight)\"\n scrollHeight=\"flex\"\n [rowHover]=\"descriptor?.hasHover ?? true\"\n [styleClass]=\"className\"\n [resizableColumns]=\"descriptor?.hasResizableColumns ?? false\"\n [columnResizeMode]=\"descriptor?.columnResizeMode ?? 'fit'\"\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>\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></th>\n <ng-container *ngFor=\"let col of descriptor?.columns\">\n <th\n *ngIf=\"col.isSortEnabled\"\n pResizableColumn\n [pSortableColumn]=\"col.property\"\n [style.width.%]=\"col.width\"\n [style.min-width.px]=\"col.minWidth\"\n [style.max-width.px]=\"col.maxWidth\"\n [class]=\"\n col.headerClassName +\n (descriptor?.filterDisplay === filterDisplayRow && hasColumnFilters && col.filterDescriptor\n ? ' mng-column-filter-' + col.filterDescriptor.filterType\n : '')\n \">\n <div class=\"flex justify-content-between align-items-center\">\n {{ col.title ?? (col.property | i18nProperty : descriptor!.model) | translate }}\n <p-sortIcon [field]=\"col.property\"></p-sortIcon>\n <mng-table-column-filter\n *ngIf=\"col.filterDescriptor && descriptor!.filterDisplay === filterDisplayMenu\"\n class=\"ml-auto\"\n [display]=\"descriptor!.filterDisplay\"\n [descriptor]=\"col.filterDescriptor\">\n </mng-table-column-filter>\n </div>\n </th>\n <th\n pResizableColumn\n *ngIf=\"!col.isSortEnabled\"\n [style.width.%]=\"col.width\"\n [style.min-width.px]=\"col.minWidth\"\n [style.max-width.px]=\"col.maxWidth\"\n [class]=\"\n col.headerClassName +\n (descriptor?.filterDisplay === filterDisplayRow && hasColumnFilters && col.filterDescriptor\n ? ' mng-column-filter-' + col.filterDescriptor.filterType\n : '')\n \">\n {{ col.title ?? (col.property | i18nProperty : descriptor!.model) | translate }}\n <ng-container>\n <mng-table-column-filter\n *ngIf=\"col.filterDescriptor && descriptor!.filterDisplay === filterDisplayMenu\"\n class=\"ml-auto\"\n [display]=\"descriptor!.filterDisplay\"\n [descriptor]=\"col.filterDescriptor\">\n </mng-table-column-filter>\n </ng-container>\n </th>\n </ng-container>\n <th *ngIf=\"showInlineActionsColumn\" [style.min-width.px]=\"columnActionMinWidth\" pFrozenColumn></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 && selectionMode === 'single'\" style=\"min-width: 36px\" pFrozenColumn></th>\n <th\n *ngFor=\"let col of descriptor?.columns\"\n [class]=\"(col.filterDescriptor ? 'mng-column-filter-' + col.filterDescriptor.filterType + ' ' : ' ') + col.filterDescriptor?.columnClassName\"\n [style.width.%]=\"col.filterDescriptor?.columnWidth ?? col.width\"\n [style.min-width.px]=\"col.filterDescriptor?.columnMinWidth ?? col.minWidth\"\n [style.max-width.px]=\"col.maxWidth\">\n <div class=\"flex\" *ngIf=\"col.filterDescriptor\">\n <mng-table-column-filter [display]=\"descriptor!.filterDisplay\" [descriptor]=\"col.filterDescriptor\"></mng-table-column-filter>\n </div>\n </th>\n <th *ngIf=\"showInlineActionsColumn\" [style.min-width.px]=\"columnActionMinWidth\" pFrozenColumn></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>\n <p-tableCheckbox [value]=\"item\"></p-tableCheckbox>\n </td>\n <td *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"min-width: 36px\" pFrozenColumn>\n <p-tableRadioButton [value]=\"item\"></p-tableRadioButton>\n </td>\n <td\n *ngFor=\"let col of descriptor?.columns\"\n (click)=\"onCellClick($event, col, item, idx)\"\n [class]=\"\n col.className +\n (descriptor?.filterDisplay === filterDisplayRow && hasColumnFilters && col.filterDescriptor ? ' mng-column-filter-' + col.filterDescriptor.filterType : '')\n \"\n [class.clickable]=\"isColumnClickable\"\n [style.width.%]=\"col.width\"\n [style.min-width.px]=\"col.minWidth\"\n [style.max-width.px]=\"col.maxWidth\">\n <span class=\"p-column-title\">{{ col.title ?? (col.property | i18nProperty : descriptor!.model) | translate }}</span>\n <mng-table-column-value [descriptor]=\"col\" [item]=\"item\"></mng-table-column-value>\n </td>\n <td\n *ngIf=\"showInlineActionsColumn\"\n class=\"column-action justify-content-end text-right\"\n [style.min-width.px]=\"columnActionMinWidth\"\n pFrozenColumn\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]=\"viewContainerInit\"\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=\"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", "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", "virtualRowHeight", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll"], outputs: ["selectAllChange", "selectionChange", "contextMenuSelectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i2$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: "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$1.TranslatePipe, name: "translate" }, { kind: "directive", type: MngComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "inputs"], 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$2.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "style", "shape", "animation", "borderRadius", "size", "width", "height"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
11113
|
+
MngTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", 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" }, 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]=\"$any(descriptor?.dataKeyProperty ?? null)\"\n [lazy]=\"isLazy\"\n [loading]=\"(loading$ | async) ?? false\"\n [paginator]=\"isPagination && !infiniteScroll\"\n [rows]=\"$any(infiniteScroll ? 20 : rows)\"\n [first]=\"$any(infiniteScroll ? 0 : offset)\"\n [totalRecords]=\"$any(infiniteScroll ? null : (queryResult$ | async)?.allDataCount ?? 0)\"\n [rowsPerPageOptions]=\"$any(infiniteScroll ? null : rowsPerPageOptions)\"\n [showCurrentPageReport]=\"!infiniteScroll\"\n [currentPageReportTemplate]=\"'mngTable.paginationMsg' | translate\"\n [multiSortMeta]=\"$any(multiSortMeta)\"\n [filters]=\"filterMetadata\"\n sortMode=\"multiple\"\n [(selection)]=\"selection\"\n (selectionChange)=\"onSelectionChange($event)\"\n [selectionMode]=\"$any(selectionEnabled ? selectionMode : null)\"\n [scrollable]=\"true\"\n [virtualScroll]=\"infiniteScroll\"\n [virtualScrollItemSize]=\"$any(rowHeight)\"\n scrollHeight=\"flex\"\n [rowHover]=\"descriptor?.hasHover ?? true\"\n [styleClass]=\"className\"\n [resizableColumns]=\"descriptor?.hasResizableColumns ?? false\"\n [columnResizeMode]=\"descriptor?.columnResizeMode ?? 'fit'\"\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>\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></th>\n <ng-container *ngFor=\"let col of descriptor?.columns\">\n <th\n *ngIf=\"col.isSortEnabled\"\n pResizableColumn\n [pSortableColumn]=\"col.property\"\n [style.width.%]=\"col.width\"\n [style.min-width.px]=\"col.minWidth\"\n [style.max-width.px]=\"col.maxWidth\"\n [class]=\"\n col.headerClassName +\n (descriptor?.filterDisplay === filterDisplayRow && hasColumnFilters && col.filterDescriptor\n ? ' mng-column-filter-' + col.filterDescriptor.filterType\n : '')\n \">\n <div class=\"flex justify-content-between align-items-center\">\n {{ col.title ?? (col.property | i18nProperty : descriptor!.model) | translate }}\n <p-sortIcon [field]=\"col.property\"></p-sortIcon>\n <mng-table-column-filter\n *ngIf=\"col.filterDescriptor && descriptor!.filterDisplay === filterDisplayMenu\"\n class=\"ml-auto\"\n [display]=\"descriptor!.filterDisplay\"\n [descriptor]=\"col.filterDescriptor\">\n </mng-table-column-filter>\n </div>\n </th>\n <th\n pResizableColumn\n *ngIf=\"!col.isSortEnabled\"\n [style.width.%]=\"col.width\"\n [style.min-width.px]=\"col.minWidth\"\n [style.max-width.px]=\"col.maxWidth\"\n [class]=\"\n col.headerClassName +\n (descriptor?.filterDisplay === filterDisplayRow && hasColumnFilters && col.filterDescriptor\n ? ' mng-column-filter-' + col.filterDescriptor.filterType\n : '')\n \">\n {{ col.title ?? (col.property | i18nProperty : descriptor!.model) | translate }}\n <ng-container>\n <mng-table-column-filter\n *ngIf=\"col.filterDescriptor && descriptor!.filterDisplay === filterDisplayMenu\"\n class=\"ml-auto\"\n [display]=\"descriptor!.filterDisplay\"\n [descriptor]=\"col.filterDescriptor\">\n </mng-table-column-filter>\n </ng-container>\n </th>\n </ng-container>\n <th *ngIf=\"showInlineActionsColumn\" [style.min-width.px]=\"columnActionMinWidth\" pFrozenColumn></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 && selectionMode === 'single'\" style=\"min-width: 36px\" pFrozenColumn></th>\n <th\n *ngFor=\"let col of descriptor?.columns\"\n [class]=\"(col.filterDescriptor ? 'mng-column-filter-' + col.filterDescriptor.filterType + ' ' : ' ') + col.filterDescriptor?.columnClassName\"\n [style.width.%]=\"col.filterDescriptor?.columnWidth ?? col.width\"\n [style.min-width.px]=\"col.filterDescriptor?.columnMinWidth ?? col.minWidth\"\n [style.max-width.px]=\"col.maxWidth\">\n <div class=\"flex\" *ngIf=\"col.filterDescriptor\">\n <mng-table-column-filter [display]=\"descriptor!.filterDisplay\" [descriptor]=\"col.filterDescriptor\"></mng-table-column-filter>\n </div>\n </th>\n <th *ngIf=\"showInlineActionsColumn\" [style.min-width.px]=\"columnActionMinWidth\" pFrozenColumn></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>\n <p-tableCheckbox [value]=\"item\"></p-tableCheckbox>\n </td>\n <td *ngIf=\"selectionEnabled && selectionMode === 'single'\" style=\"min-width: 36px\" pFrozenColumn>\n <p-tableRadioButton [value]=\"item\"></p-tableRadioButton>\n </td>\n <td\n *ngFor=\"let col of descriptor?.columns\"\n (click)=\"onCellClick($event, col, item, idx)\"\n [class]=\"\n col.className +\n (descriptor?.filterDisplay === filterDisplayRow && hasColumnFilters && col.filterDescriptor ? ' mng-column-filter-' + col.filterDescriptor.filterType : '')\n \"\n [class.clickable]=\"isColumnClickable\"\n [style.width.%]=\"col.width\"\n [style.min-width.px]=\"col.minWidth\"\n [style.max-width.px]=\"col.maxWidth\">\n <span class=\"p-column-title\">{{ col.title ?? (col.property | i18nProperty : descriptor!.model) | translate }}</span>\n <mng-table-column-value [descriptor]=\"col\" [item]=\"item\"></mng-table-column-value>\n </td>\n <td\n *ngIf=\"showInlineActionsColumn\"\n class=\"column-action justify-content-end text-right\"\n [style.min-width.px]=\"columnActionMinWidth\"\n pFrozenColumn\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]=\"viewContainerInit\"\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=\"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", "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", "virtualRowHeight", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll"], outputs: ["selectAllChange", "selectionChange", "contextMenuSelectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i2$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: "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$1.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$2.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "style", "shape", "animation", "borderRadius", "size", "width", "height"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
11084
11114
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: MngTableComponent, decorators: [{
|
|
11085
11115
|
type: Component,
|
|
11086
11116
|
args: [{ standalone: true, selector: 'mng-table', imports: [
|
|
@@ -12742,76 +12772,108 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImpor
|
|
|
12742
12772
|
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" }]
|
|
12743
12773
|
}], ctorParameters: function () { return [{ type: i1.ActivatedRoute }, { type: MngCommonsService }, { type: MngMainLayoutComponentService }]; } });
|
|
12744
12774
|
|
|
12775
|
+
class MngTopbarUserComponent {
|
|
12776
|
+
constructor(mngCommons, mainLayoutService, elementRef) {
|
|
12777
|
+
this.mngCommons = mngCommons;
|
|
12778
|
+
this.mainLayoutService = mainLayoutService;
|
|
12779
|
+
this.elementRef = elementRef;
|
|
12780
|
+
this.subscriptions = [];
|
|
12781
|
+
}
|
|
12782
|
+
ngOnInit() {
|
|
12783
|
+
this.subscriptions.push(this.mngCommons.user$.subscribe(u => {
|
|
12784
|
+
this.user = u;
|
|
12785
|
+
}));
|
|
12786
|
+
this.userRoles$ = this.mngCommons.userRoles$;
|
|
12787
|
+
}
|
|
12788
|
+
ngOnDestroy() {
|
|
12789
|
+
this.subscriptions.forEach(value => value.unsubscribe());
|
|
12790
|
+
}
|
|
12791
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
12792
|
+
logout(user, event) {
|
|
12793
|
+
if (typeof (user === null || user === void 0 ? void 0 : user.logout) === 'function') {
|
|
12794
|
+
user.logout();
|
|
12795
|
+
}
|
|
12796
|
+
}
|
|
12797
|
+
click(event) {
|
|
12798
|
+
this.mainLayoutService.onTopbarItemClick(event, this.elementRef.nativeElement);
|
|
12799
|
+
}
|
|
12800
|
+
}
|
|
12801
|
+
MngTopbarUserComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: MngTopbarUserComponent, deps: [{ token: MngCommonsService }, { token: MngMainLayoutComponentService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
12802
|
+
MngTopbarUserComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", 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\" (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$1.TranslatePipe, name: "translate" }, { kind: "pipe", type: MngEnumerateAsyncPipe, name: "mgnEnumerateAsync" }] });
|
|
12803
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: MngTopbarUserComponent, decorators: [{
|
|
12804
|
+
type: Component,
|
|
12805
|
+
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\" (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" }]
|
|
12806
|
+
}], ctorParameters: function () { return [{ type: MngCommonsService }, { type: MngMainLayoutComponentService }, { type: i0.ElementRef }]; } });
|
|
12807
|
+
|
|
12745
12808
|
class MngTopbarComponent {
|
|
12746
|
-
constructor(route, mngCommons, mainLayoutService) {
|
|
12809
|
+
constructor(applicationRef, route, mngCommons, mainLayoutService, config) {
|
|
12810
|
+
this.applicationRef = applicationRef;
|
|
12747
12811
|
this.route = route;
|
|
12748
12812
|
this.mngCommons = mngCommons;
|
|
12749
12813
|
this.mainLayoutService = mainLayoutService;
|
|
12814
|
+
this.config = config;
|
|
12750
12815
|
this.breadcrumbComponent = MngBreadcrumbComponent;
|
|
12751
12816
|
this.menuComponent = MngMenuComponent;
|
|
12817
|
+
this.topbarUserComponent = MngTopbarUserComponent;
|
|
12752
12818
|
this.languages = ['en'];
|
|
12753
12819
|
this.selectedLanguage = 'en';
|
|
12754
|
-
this.subscriptions = [];
|
|
12755
12820
|
}
|
|
12756
12821
|
ngOnInit() {
|
|
12757
|
-
|
|
12758
|
-
if (
|
|
12759
|
-
this.
|
|
12822
|
+
var _a, _b, _c, _d, _e, _f;
|
|
12823
|
+
if ((_b = (_a = this.config.components) === null || _a === void 0 ? void 0 : _a.layout) === null || _b === void 0 ? void 0 : _b.topbarUser) {
|
|
12824
|
+
this.topbarUserComponent = this.config.components.layout.topbarUser;
|
|
12760
12825
|
}
|
|
12761
|
-
if (
|
|
12762
|
-
this.
|
|
12826
|
+
if ((_d = (_c = this.config.components) === null || _c === void 0 ? void 0 : _c.layout) === null || _d === void 0 ? void 0 : _d.breadcrumb) {
|
|
12827
|
+
this.breadcrumbComponent = this.config.components.layout.breadcrumb;
|
|
12828
|
+
}
|
|
12829
|
+
if ((_f = (_e = this.config.components) === null || _e === void 0 ? void 0 : _e.layout) === null || _f === void 0 ? void 0 : _f.menu) {
|
|
12830
|
+
this.menuComponent = this.config.components.layout.menu;
|
|
12763
12831
|
}
|
|
12764
12832
|
this.languages = this.mngCommons.appLanguages;
|
|
12765
12833
|
this.selectedLanguage = this.mngCommons.getOrInitLanguage();
|
|
12766
|
-
const userSubscription = this.mngCommons.user$.subscribe(u => {
|
|
12767
|
-
this.user = u;
|
|
12768
|
-
});
|
|
12769
|
-
this.userRoles$ = this.mngCommons.userRoles$;
|
|
12770
|
-
this.mainLayoutService.innerWidth = window.innerWidth;
|
|
12771
|
-
this.subscriptions.push(userSubscription);
|
|
12772
|
-
}
|
|
12773
|
-
ngOnDestroy() {
|
|
12774
|
-
this.subscriptions.forEach(s => s.unsubscribe());
|
|
12775
12834
|
}
|
|
12776
12835
|
switchLanguage(language) {
|
|
12777
12836
|
this.mngCommons.appLanguage = language;
|
|
12778
12837
|
}
|
|
12779
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
12780
|
-
logout(user, event) {
|
|
12781
|
-
if (typeof user.logout === 'function') {
|
|
12782
|
-
user.logout();
|
|
12783
|
-
}
|
|
12784
|
-
}
|
|
12785
12838
|
}
|
|
12786
|
-
MngTopbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: MngTopbarComponent, deps: [{ token: i1.ActivatedRoute }, { token: MngCommonsService }, { token: MngMainLayoutComponentService }], target: i0.ɵɵFactoryTarget.Component });
|
|
12787
|
-
MngTopbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: MngTopbarComponent, isStandalone: true, selector: "mng-topbar", viewQueries: [{ 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
|
|
12839
|
+
MngTopbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: MngTopbarComponent, deps: [{ token: i0.ApplicationRef }, { token: i1.ActivatedRoute }, { token: MngCommonsService }, { token: MngMainLayoutComponentService }, { token: MNG_MODULE_CONFIG_IT }], target: i0.ɵɵFactoryTarget.Component });
|
|
12840
|
+
MngTopbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", 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$2.Dropdown, selector: "p-dropdown", inputs: ["scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "filterPlaceholder", "filterLocale", "inputId", "selectId", "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", "overlayDirection", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "options", "filterValue"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: RouterModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
12788
12841
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: MngTopbarComponent, decorators: [{
|
|
12789
12842
|
type: Component,
|
|
12790
|
-
args: [{ standalone: true, selector: 'mng-topbar', imports: [AsyncPipe, NgClass, TranslateModule, NgIf, MngComponentDirective, MngEnumerateAsyncPipe, DropdownModule, FormsModule], 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
|
|
12791
|
-
}], ctorParameters: function () {
|
|
12843
|
+
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" }]
|
|
12844
|
+
}], ctorParameters: function () {
|
|
12845
|
+
return [{ type: i0.ApplicationRef }, { type: i1.ActivatedRoute }, { type: MngCommonsService }, { type: MngMainLayoutComponentService }, { type: undefined, decorators: [{
|
|
12846
|
+
type: Inject,
|
|
12847
|
+
args: [MNG_MODULE_CONFIG_IT]
|
|
12848
|
+
}] }];
|
|
12849
|
+
}, propDecorators: { templates: [{
|
|
12792
12850
|
type: ViewChildren,
|
|
12793
12851
|
args: [MngTemplateDirective]
|
|
12852
|
+
}], topbarInjectionRef: [{
|
|
12853
|
+
type: ViewChild,
|
|
12854
|
+
args: ['userMenuItem']
|
|
12794
12855
|
}] } });
|
|
12795
12856
|
|
|
12796
12857
|
class MngMainLayoutComponent {
|
|
12797
|
-
constructor(route, mngCommons, mainLayoutService) {
|
|
12858
|
+
constructor(route, mngCommons, mainLayoutService, config) {
|
|
12798
12859
|
this.route = route;
|
|
12799
12860
|
this.mngCommons = mngCommons;
|
|
12800
12861
|
this.mainLayoutService = mainLayoutService;
|
|
12862
|
+
this.config = config;
|
|
12801
12863
|
this.topbarComponent = MngTopbarComponent;
|
|
12802
12864
|
this.menuComponent = MngMenuComponent;
|
|
12803
12865
|
this.footerComponent = MngFooterComponent;
|
|
12804
12866
|
}
|
|
12805
12867
|
ngOnInit() {
|
|
12806
|
-
|
|
12807
|
-
if (
|
|
12808
|
-
this.topbarComponent =
|
|
12868
|
+
var _a, _b, _c, _d, _e, _f;
|
|
12869
|
+
if ((_b = (_a = this.config.components) === null || _a === void 0 ? void 0 : _a.layout) === null || _b === void 0 ? void 0 : _b.topbar) {
|
|
12870
|
+
this.topbarComponent = this.config.components.layout.topbar;
|
|
12809
12871
|
}
|
|
12810
|
-
if (
|
|
12811
|
-
this.menuComponent =
|
|
12872
|
+
if ((_d = (_c = this.config.components) === null || _c === void 0 ? void 0 : _c.layout) === null || _d === void 0 ? void 0 : _d.menu) {
|
|
12873
|
+
this.menuComponent = this.config.components.layout.menu;
|
|
12812
12874
|
}
|
|
12813
|
-
if (
|
|
12814
|
-
this.footerComponent =
|
|
12875
|
+
if ((_f = (_e = this.config.components) === null || _e === void 0 ? void 0 : _e.layout) === null || _f === void 0 ? void 0 : _f.footer) {
|
|
12876
|
+
this.footerComponent = this.config.components.layout.footer;
|
|
12815
12877
|
}
|
|
12816
12878
|
this.mainLayoutService.innerWidth = window.innerWidth;
|
|
12817
12879
|
}
|
|
@@ -12821,12 +12883,17 @@ class MngMainLayoutComponent {
|
|
|
12821
12883
|
this.mainLayoutService.innerWidth = (_a = target === null || target === void 0 ? void 0 : target.innerWidth) !== null && _a !== void 0 ? _a : window.innerWidth;
|
|
12822
12884
|
}
|
|
12823
12885
|
}
|
|
12824
|
-
MngMainLayoutComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: MngMainLayoutComponent, deps: [{ token: i1.ActivatedRoute }, { token: MngCommonsService }, { token: MngMainLayoutComponentService }], target: i0.ɵɵFactoryTarget.Component });
|
|
12825
|
-
MngMainLayoutComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: MngMainLayoutComponent, isStandalone: true, selector: "mng-main-layout", host: { listeners: { "window:resize": "onWindowResize($event)" } }, providers: [MngMainLayoutComponentService], viewQueries: [{ propertyName: "templates", predicate: MngTemplateDirective, descendants: true }], ngImport: i0, template: "<div\n class=\"layout-wrapper\"\n (click)=\"mainLayoutService.onLayoutClick()\"\n [ngClass]=\"{\n 'layout-static': mngCommons.menuModeIsStatic$ | async,\n 'layout-overlay': mngCommons.menuModeIsOverlay$ | async,\n 'layout-slim': mngCommons.menuModeIsSlim$ | async,\n 'layout-sidebar': mngCommons.menuModeIsSidebar$ | async,\n 'layout-sidebar-static': (mngCommons.menuModeIsSidebar$ | async) && (mainLayoutService.sidebarStatic$ | async),\n 'layout-overlay-active': mainLayoutService.overlayMenuActive$ | async,\n 'layout-mobile-active': mainLayoutService.staticMenuMobileActive$ | async,\n 'layout-static-inactive': (mainLayoutService.staticMenuDesktopInactive$ | async) && (mngCommons.menuModeIsStatic$ | async)\n }\">\n <div class=\"layout-main\">\n <ng-container [mngComponent]=\"topbarComponent\"></ng-container>\n\n <ng-container\n *ngIf=\"\n (mainLayoutService.isMobile$ | async) === false &&\n ((mngCommons.menuModeIsStatic$ | async) || (mngCommons.menuModeIsSlim$ | async) || (mngCommons.menuModeIsSidebar$ | async))\n \"\n [mngComponent]=\"menuComponent\">\n </ng-container>\n\n <div class=\"layout-main-content\">\n <router-outlet></router-outlet>\n </div>\n\n <ng-container [mngComponent]=\"footerComponent\"></ng-container>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: MngComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "inputs"], outputs: ["instanceCreated"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
12886
|
+
MngMainLayoutComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: MngMainLayoutComponent, deps: [{ token: i1.ActivatedRoute }, { token: MngCommonsService }, { token: MngMainLayoutComponentService }, { token: MNG_MODULE_CONFIG_IT }], target: i0.ɵɵFactoryTarget.Component });
|
|
12887
|
+
MngMainLayoutComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: MngMainLayoutComponent, isStandalone: true, selector: "mng-main-layout", host: { listeners: { "window:resize": "onWindowResize($event)" } }, providers: [MngMainLayoutComponentService], viewQueries: [{ propertyName: "templates", predicate: MngTemplateDirective, descendants: true }], ngImport: i0, template: "<div\n class=\"layout-wrapper\"\n (click)=\"mainLayoutService.onLayoutClick()\"\n [ngClass]=\"{\n 'layout-static': mngCommons.menuModeIsStatic$ | async,\n 'layout-overlay': mngCommons.menuModeIsOverlay$ | async,\n 'layout-slim': mngCommons.menuModeIsSlim$ | async,\n 'layout-sidebar': mngCommons.menuModeIsSidebar$ | async,\n 'layout-sidebar-static': (mngCommons.menuModeIsSidebar$ | async) && (mainLayoutService.sidebarStatic$ | async),\n 'layout-overlay-active': mainLayoutService.overlayMenuActive$ | async,\n 'layout-mobile-active': mainLayoutService.staticMenuMobileActive$ | async,\n 'layout-static-inactive': (mainLayoutService.staticMenuDesktopInactive$ | async) && (mngCommons.menuModeIsStatic$ | async)\n }\">\n <div class=\"layout-main\">\n <ng-container [mngComponent]=\"topbarComponent\"></ng-container>\n\n <ng-container\n *ngIf=\"\n (mainLayoutService.isMobile$ | async) === false &&\n ((mngCommons.menuModeIsStatic$ | async) || (mngCommons.menuModeIsSlim$ | async) || (mngCommons.menuModeIsSidebar$ | async))\n \"\n [mngComponent]=\"menuComponent\">\n </ng-container>\n\n <div class=\"layout-main-content\">\n <router-outlet></router-outlet>\n </div>\n\n <ng-container [mngComponent]=\"footerComponent\"></ng-container>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: MngComponentDirective, selector: "[mngComponent]", inputs: ["mngComponent", "inputs", "attachToHost"], outputs: ["instanceCreated"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
12826
12888
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: MngMainLayoutComponent, decorators: [{
|
|
12827
12889
|
type: Component,
|
|
12828
12890
|
args: [{ standalone: true, selector: 'mng-main-layout', providers: [MngMainLayoutComponentService], imports: [NgClass, AsyncPipe, MngComponentDirective, NgIf, RouterOutlet], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"layout-wrapper\"\n (click)=\"mainLayoutService.onLayoutClick()\"\n [ngClass]=\"{\n 'layout-static': mngCommons.menuModeIsStatic$ | async,\n 'layout-overlay': mngCommons.menuModeIsOverlay$ | async,\n 'layout-slim': mngCommons.menuModeIsSlim$ | async,\n 'layout-sidebar': mngCommons.menuModeIsSidebar$ | async,\n 'layout-sidebar-static': (mngCommons.menuModeIsSidebar$ | async) && (mainLayoutService.sidebarStatic$ | async),\n 'layout-overlay-active': mainLayoutService.overlayMenuActive$ | async,\n 'layout-mobile-active': mainLayoutService.staticMenuMobileActive$ | async,\n 'layout-static-inactive': (mainLayoutService.staticMenuDesktopInactive$ | async) && (mngCommons.menuModeIsStatic$ | async)\n }\">\n <div class=\"layout-main\">\n <ng-container [mngComponent]=\"topbarComponent\"></ng-container>\n\n <ng-container\n *ngIf=\"\n (mainLayoutService.isMobile$ | async) === false &&\n ((mngCommons.menuModeIsStatic$ | async) || (mngCommons.menuModeIsSlim$ | async) || (mngCommons.menuModeIsSidebar$ | async))\n \"\n [mngComponent]=\"menuComponent\">\n </ng-container>\n\n <div class=\"layout-main-content\">\n <router-outlet></router-outlet>\n </div>\n\n <ng-container [mngComponent]=\"footerComponent\"></ng-container>\n </div>\n</div>\n" }]
|
|
12829
|
-
}], ctorParameters: function () {
|
|
12891
|
+
}], ctorParameters: function () {
|
|
12892
|
+
return [{ type: i1.ActivatedRoute }, { type: MngCommonsService }, { type: MngMainLayoutComponentService }, { type: undefined, decorators: [{
|
|
12893
|
+
type: Inject,
|
|
12894
|
+
args: [MNG_MODULE_CONFIG_IT]
|
|
12895
|
+
}] }];
|
|
12896
|
+
}, propDecorators: { templates: [{
|
|
12830
12897
|
type: ViewChildren,
|
|
12831
12898
|
args: [MngTemplateDirective]
|
|
12832
12899
|
}], onWindowResize: [{
|
|
@@ -13278,6 +13345,7 @@ const standalone = [
|
|
|
13278
13345
|
MngMenuComponent,
|
|
13279
13346
|
MngMenuItemComponent,
|
|
13280
13347
|
MngTopbarComponent,
|
|
13348
|
+
MngTopbarUserComponent,
|
|
13281
13349
|
MngVersionComponent,
|
|
13282
13350
|
// mng fields
|
|
13283
13351
|
MngAutocompleteComponent,
|
|
@@ -13381,6 +13449,7 @@ MngCommonsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", versio
|
|
|
13381
13449
|
MngMenuComponent,
|
|
13382
13450
|
MngMenuItemComponent,
|
|
13383
13451
|
MngTopbarComponent,
|
|
13452
|
+
MngTopbarUserComponent,
|
|
13384
13453
|
MngVersionComponent,
|
|
13385
13454
|
// mng fields
|
|
13386
13455
|
MngAutocompleteComponent,
|
|
@@ -13469,6 +13538,7 @@ MngCommonsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", versio
|
|
|
13469
13538
|
MngMenuComponent,
|
|
13470
13539
|
MngMenuItemComponent,
|
|
13471
13540
|
MngTopbarComponent,
|
|
13541
|
+
MngTopbarUserComponent,
|
|
13472
13542
|
MngVersionComponent,
|
|
13473
13543
|
// mng fields
|
|
13474
13544
|
MngAutocompleteComponent,
|
|
@@ -13517,6 +13587,7 @@ MngCommonsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", versio
|
|
|
13517
13587
|
MngMenuComponent,
|
|
13518
13588
|
MngMenuItemComponent,
|
|
13519
13589
|
MngTopbarComponent,
|
|
13590
|
+
MngTopbarUserComponent,
|
|
13520
13591
|
MngVersionComponent,
|
|
13521
13592
|
// mng fields
|
|
13522
13593
|
MngAutocompleteComponent,
|
|
@@ -13812,28 +13883,8 @@ class RouteBuilder {
|
|
|
13812
13883
|
static createFromRoute(route) {
|
|
13813
13884
|
return new RouteBuilder(route);
|
|
13814
13885
|
}
|
|
13815
|
-
static createLayoutRoute(path, layoutComponent = MngMainLayoutComponent
|
|
13816
|
-
|
|
13817
|
-
if (topbarComponent || breadcrumbComponent || menuComponent || footerComponent) {
|
|
13818
|
-
const routeData = {};
|
|
13819
|
-
if (topbarComponent) {
|
|
13820
|
-
routeData.topbarComponent = topbarComponent;
|
|
13821
|
-
}
|
|
13822
|
-
if (breadcrumbComponent) {
|
|
13823
|
-
routeData.breadcrumbComponent = breadcrumbComponent;
|
|
13824
|
-
}
|
|
13825
|
-
if (menuComponent) {
|
|
13826
|
-
routeData.menuComponent = menuComponent;
|
|
13827
|
-
}
|
|
13828
|
-
if (footerComponent) {
|
|
13829
|
-
routeData.footerComponent = footerComponent;
|
|
13830
|
-
}
|
|
13831
|
-
layoutRoute.withData(routeData);
|
|
13832
|
-
}
|
|
13833
|
-
return layoutRoute;
|
|
13834
|
-
}
|
|
13835
|
-
static createTableview(builder) {
|
|
13836
|
-
return builder.toRouteBuilder();
|
|
13886
|
+
static createLayoutRoute(path, layoutComponent = MngMainLayoutComponent) {
|
|
13887
|
+
return RouteBuilder.create(path, layoutComponent);
|
|
13837
13888
|
}
|
|
13838
13889
|
withRoot(routesBuilder) {
|
|
13839
13890
|
this.root = routesBuilder;
|
|
@@ -13928,12 +13979,12 @@ class RouteBuilder {
|
|
|
13928
13979
|
this.addChildBuilder(childRouteBuilder);
|
|
13929
13980
|
return childRouteBuilder;
|
|
13930
13981
|
}
|
|
13931
|
-
addChildBuilder(
|
|
13932
|
-
|
|
13982
|
+
addChildBuilder(builder) {
|
|
13983
|
+
builder.withParent(this);
|
|
13933
13984
|
if (this.root) {
|
|
13934
|
-
|
|
13985
|
+
builder.withRoot(this.root);
|
|
13935
13986
|
}
|
|
13936
|
-
this.children.push(
|
|
13987
|
+
this.children.push(builder);
|
|
13937
13988
|
return this;
|
|
13938
13989
|
}
|
|
13939
13990
|
toParent() {
|
|
@@ -13951,7 +14002,7 @@ class RouteBuilder {
|
|
|
13951
14002
|
finish() {
|
|
13952
14003
|
return this.toRoot();
|
|
13953
14004
|
}
|
|
13954
|
-
|
|
14005
|
+
build() {
|
|
13955
14006
|
var _a, _b, _c;
|
|
13956
14007
|
const angularRoute = Object.assign({}, this.route);
|
|
13957
14008
|
if (angularRoute.data) {
|
|
@@ -13972,7 +14023,7 @@ class RouteBuilder {
|
|
|
13972
14023
|
}
|
|
13973
14024
|
if (this.children.length) {
|
|
13974
14025
|
for (const childRoute of this.children) {
|
|
13975
|
-
angularRoute.children.push(childRoute.
|
|
14026
|
+
angularRoute.children.push(childRoute.build());
|
|
13976
14027
|
}
|
|
13977
14028
|
}
|
|
13978
14029
|
}
|
|
@@ -14078,8 +14129,8 @@ class RoutesBuilder {
|
|
|
14078
14129
|
static create() {
|
|
14079
14130
|
return new RoutesBuilder();
|
|
14080
14131
|
}
|
|
14081
|
-
static createWithLayout(layoutComponent = MngMainLayoutComponent
|
|
14082
|
-
const layoutRoute = RouteBuilder.createLayoutRoute('', layoutComponent
|
|
14132
|
+
static createWithLayout(layoutComponent = MngMainLayoutComponent) {
|
|
14133
|
+
const layoutRoute = RouteBuilder.createLayoutRoute('', layoutComponent);
|
|
14083
14134
|
return new RoutesBuilder(layoutRoute);
|
|
14084
14135
|
}
|
|
14085
14136
|
addAngularRoute(route) {
|
|
@@ -14105,7 +14156,7 @@ class RoutesBuilder {
|
|
|
14105
14156
|
return this.addRouteBuilder(RouteBuilder.create(path, component));
|
|
14106
14157
|
}
|
|
14107
14158
|
addTableview(builder) {
|
|
14108
|
-
return this.
|
|
14159
|
+
return this.addRouteBuilder(builder);
|
|
14109
14160
|
}
|
|
14110
14161
|
addRouteBuilder(routeBuilder) {
|
|
14111
14162
|
this.currentRoute = routeBuilder.withRoot(this);
|
|
@@ -14118,13 +14169,13 @@ class RoutesBuilder {
|
|
|
14118
14169
|
}
|
|
14119
14170
|
return this.currentRoute;
|
|
14120
14171
|
}
|
|
14121
|
-
|
|
14172
|
+
build() {
|
|
14122
14173
|
let angularRoutes = [];
|
|
14123
14174
|
for (const route of this.routes) {
|
|
14124
|
-
angularRoutes.push(route.
|
|
14175
|
+
angularRoutes.push(route.build());
|
|
14125
14176
|
}
|
|
14126
14177
|
if (this.layoutRoute) {
|
|
14127
|
-
const layoutAngularRoute = this.layoutRoute.
|
|
14178
|
+
const layoutAngularRoute = this.layoutRoute.build();
|
|
14128
14179
|
if (angularRoutes.length > 0) {
|
|
14129
14180
|
layoutAngularRoute.children = angularRoutes;
|
|
14130
14181
|
}
|
|
@@ -14134,9 +14185,12 @@ class RoutesBuilder {
|
|
|
14134
14185
|
}
|
|
14135
14186
|
}
|
|
14136
14187
|
|
|
14137
|
-
class
|
|
14138
|
-
constructor(path) {
|
|
14188
|
+
class TableviewRouteBuilderInternal extends RouteBuilder {
|
|
14189
|
+
constructor(path, options) {
|
|
14190
|
+
var _a;
|
|
14191
|
+
super({ path: path, component: (_a = options.component) !== null && _a !== void 0 ? _a : TableviewRouteBuilder });
|
|
14139
14192
|
this.path = path;
|
|
14193
|
+
this.isFromComponent = true;
|
|
14140
14194
|
this.hasDetails = true;
|
|
14141
14195
|
this.detailsPath = ':itemId';
|
|
14142
14196
|
this.hasEdit = true;
|
|
@@ -14144,32 +14198,28 @@ class TableviewRouteBuilder {
|
|
|
14144
14198
|
this.hasAdd = true;
|
|
14145
14199
|
this.addPath = 'add';
|
|
14146
14200
|
this.hasDelete = true;
|
|
14147
|
-
|
|
14148
|
-
|
|
14149
|
-
|
|
14150
|
-
|
|
14151
|
-
|
|
14152
|
-
|
|
14153
|
-
|
|
14154
|
-
|
|
14155
|
-
|
|
14156
|
-
|
|
14157
|
-
|
|
14158
|
-
|
|
14159
|
-
|
|
14160
|
-
|
|
14161
|
-
|
|
14162
|
-
|
|
14163
|
-
|
|
14164
|
-
|
|
14165
|
-
|
|
14166
|
-
|
|
14167
|
-
}
|
|
14168
|
-
else if (action instanceof ActionEditorEditDescriptor) {
|
|
14169
|
-
inst.hasEdit = true;
|
|
14201
|
+
if (!options.component) {
|
|
14202
|
+
this.isFromComponent = false;
|
|
14203
|
+
this.descriptor = options.descriptor;
|
|
14204
|
+
this.dataProvider = options.dataProvider;
|
|
14205
|
+
this.actions = options.actions;
|
|
14206
|
+
this.hasDetails = false;
|
|
14207
|
+
this.hasAdd = false;
|
|
14208
|
+
this.hasEdit = false;
|
|
14209
|
+
if (this.actions) {
|
|
14210
|
+
for (const action of this.actions) {
|
|
14211
|
+
if (action instanceof ActionEditorDetailsDescriptor) {
|
|
14212
|
+
this.hasDetails = true;
|
|
14213
|
+
}
|
|
14214
|
+
else if (action instanceof ActionEditorAddDescriptor) {
|
|
14215
|
+
this.hasAdd = true;
|
|
14216
|
+
}
|
|
14217
|
+
else if (action instanceof ActionEditorEditDescriptor) {
|
|
14218
|
+
this.hasEdit = true;
|
|
14219
|
+
}
|
|
14220
|
+
}
|
|
14170
14221
|
}
|
|
14171
14222
|
}
|
|
14172
|
-
return inst;
|
|
14173
14223
|
}
|
|
14174
14224
|
withReadOnly(permissions) {
|
|
14175
14225
|
if (permissions) {
|
|
@@ -14218,102 +14268,102 @@ class TableviewRouteBuilder {
|
|
|
14218
14268
|
return this;
|
|
14219
14269
|
}
|
|
14220
14270
|
withPermissions(read, add, edit, delet, details) {
|
|
14221
|
-
if (!this.
|
|
14222
|
-
this.
|
|
14271
|
+
if (!this.tableviewPermissions) {
|
|
14272
|
+
this.tableviewPermissions = {};
|
|
14223
14273
|
}
|
|
14224
14274
|
if (read) {
|
|
14225
|
-
this.
|
|
14275
|
+
this.tableviewPermissions[TableviewActionDefaultCategories.READ] = read;
|
|
14226
14276
|
}
|
|
14227
14277
|
if (add) {
|
|
14228
|
-
this.
|
|
14278
|
+
this.tableviewPermissions[TableviewActionDefaultCategories.ADD] = add;
|
|
14229
14279
|
}
|
|
14230
14280
|
if (edit) {
|
|
14231
|
-
this.
|
|
14281
|
+
this.tableviewPermissions[TableviewActionDefaultCategories.EDIT] = edit;
|
|
14232
14282
|
}
|
|
14233
14283
|
if (delet) {
|
|
14234
|
-
this.
|
|
14284
|
+
this.tableviewPermissions[TableviewActionDefaultCategories.DELETE] = delet;
|
|
14235
14285
|
}
|
|
14236
14286
|
if (details) {
|
|
14237
|
-
this.
|
|
14287
|
+
this.tableviewPermissions[TableviewActionDefaultCategories.DETAILS] = details;
|
|
14238
14288
|
}
|
|
14239
14289
|
return this;
|
|
14240
14290
|
}
|
|
14241
14291
|
withPermissionByCategory(key, permissions) {
|
|
14242
|
-
if (!this.
|
|
14243
|
-
this.
|
|
14292
|
+
if (!this.tableviewPermissions) {
|
|
14293
|
+
this.tableviewPermissions = {};
|
|
14244
14294
|
}
|
|
14245
|
-
this.
|
|
14295
|
+
this.tableviewPermissions[key] = permissions;
|
|
14246
14296
|
return this;
|
|
14247
14297
|
}
|
|
14248
14298
|
withPermissionsObject(permissions) {
|
|
14249
|
-
this.
|
|
14299
|
+
this.tableviewPermissions = permissions;
|
|
14250
14300
|
return this;
|
|
14251
14301
|
}
|
|
14252
14302
|
build() {
|
|
14253
|
-
return this.toRouteBuilder().buildRoute();
|
|
14254
|
-
}
|
|
14255
|
-
toRouteBuilder() {
|
|
14256
14303
|
var _a, _b, _c, _d, _e;
|
|
14257
|
-
|
|
14258
|
-
|
|
14259
|
-
component: this.component ? this.component : MngTableviewRouteComponent
|
|
14260
|
-
});
|
|
14261
|
-
const routeData = {};
|
|
14262
|
-
if (!this.component) {
|
|
14263
|
-
routeData.tableview = {
|
|
14304
|
+
if (!this.isFromComponent) {
|
|
14305
|
+
this.routeData.tableview = {
|
|
14264
14306
|
descriptor: this.descriptor,
|
|
14265
14307
|
dataProvider: this.dataProvider
|
|
14266
14308
|
};
|
|
14267
14309
|
if (this.actions) {
|
|
14268
|
-
routeData.tableview.actions = this.actions;
|
|
14310
|
+
this.routeData.tableview.actions = this.actions;
|
|
14269
14311
|
}
|
|
14270
14312
|
}
|
|
14271
|
-
if (this.
|
|
14272
|
-
routeData.tableviewPermissions = Object.assign({}, this.
|
|
14313
|
+
if (this.tableviewPermissions) {
|
|
14314
|
+
this.routeData.tableviewPermissions = Object.assign({}, this.tableviewPermissions);
|
|
14273
14315
|
}
|
|
14274
|
-
routeData.tableviewActions = {
|
|
14316
|
+
this.routeData.tableviewActions = {
|
|
14275
14317
|
hasAdd: this.hasAdd,
|
|
14276
14318
|
hasEdit: this.hasEdit,
|
|
14277
14319
|
hasDetails: this.hasDetails,
|
|
14278
14320
|
hasDelete: this.hasDelete
|
|
14279
14321
|
};
|
|
14280
|
-
|
|
14281
|
-
if ((_a = this.
|
|
14282
|
-
|
|
14322
|
+
this.withData(this.routeData);
|
|
14323
|
+
if ((_a = this.tableviewPermissions) === null || _a === void 0 ? void 0 : _a[TableviewActionDefaultCategories.READ]) {
|
|
14324
|
+
this.withPermissions(this.tableviewPermissions[TableviewActionDefaultCategories.READ]);
|
|
14283
14325
|
}
|
|
14284
14326
|
// list route
|
|
14285
14327
|
const rootChildRouteBuilder = RouteBuilder.create('', MngActionRouteComponent);
|
|
14286
|
-
rootChildRouteBuilder.withData(Object.assign({}, routeData));
|
|
14287
|
-
if ((_b = this.
|
|
14288
|
-
rootChildRouteBuilder.withPermissions(this.
|
|
14328
|
+
rootChildRouteBuilder.withData(Object.assign({}, this.routeData));
|
|
14329
|
+
if ((_b = this.tableviewPermissions) === null || _b === void 0 ? void 0 : _b[TableviewActionDefaultCategories.READ]) {
|
|
14330
|
+
rootChildRouteBuilder.withPermissions(this.tableviewPermissions[TableviewActionDefaultCategories.READ]);
|
|
14289
14331
|
}
|
|
14290
|
-
|
|
14332
|
+
this.addChildBuilder(rootChildRouteBuilder);
|
|
14291
14333
|
// add route
|
|
14292
14334
|
if (this.hasAdd) {
|
|
14293
14335
|
const routeBuilder = RouteBuilder.create(this.addPath, MngActionRouteComponent);
|
|
14294
|
-
routeBuilder.withData(Object.assign({}, routeData));
|
|
14295
|
-
if ((_c = this.
|
|
14296
|
-
routeBuilder.withPermissions(this.
|
|
14336
|
+
routeBuilder.withData(Object.assign({}, this.routeData));
|
|
14337
|
+
if ((_c = this.tableviewPermissions) === null || _c === void 0 ? void 0 : _c[TableviewActionDefaultCategories.ADD]) {
|
|
14338
|
+
routeBuilder.withPermissions(this.tableviewPermissions[TableviewActionDefaultCategories.ADD]);
|
|
14297
14339
|
}
|
|
14298
|
-
|
|
14340
|
+
this.addChildBuilder(routeBuilder);
|
|
14299
14341
|
}
|
|
14300
14342
|
if (this.hasDetails) {
|
|
14301
14343
|
const routeBuilder = RouteBuilder.create(this.detailsPath, MngActionRouteComponent);
|
|
14302
|
-
routeBuilder.withData(Object.assign({}, routeData));
|
|
14303
|
-
if ((_d = this.
|
|
14304
|
-
routeBuilder.withPermissions(this.
|
|
14344
|
+
routeBuilder.withData(Object.assign({}, this.routeData));
|
|
14345
|
+
if ((_d = this.tableviewPermissions) === null || _d === void 0 ? void 0 : _d[TableviewActionDefaultCategories.DETAILS]) {
|
|
14346
|
+
routeBuilder.withPermissions(this.tableviewPermissions[TableviewActionDefaultCategories.DETAILS]);
|
|
14305
14347
|
}
|
|
14306
|
-
|
|
14348
|
+
this.addChildBuilder(routeBuilder);
|
|
14307
14349
|
}
|
|
14308
14350
|
if (this.hasEdit) {
|
|
14309
14351
|
const routeBuilder = RouteBuilder.create(this.editPath, MngActionRouteComponent);
|
|
14310
|
-
routeBuilder.withData(Object.assign({}, routeData));
|
|
14311
|
-
if ((_e = this.
|
|
14312
|
-
routeBuilder.withPermissions(this.
|
|
14352
|
+
routeBuilder.withData(Object.assign({}, this.routeData));
|
|
14353
|
+
if ((_e = this.tableviewPermissions) === null || _e === void 0 ? void 0 : _e[TableviewActionDefaultCategories.EDIT]) {
|
|
14354
|
+
routeBuilder.withPermissions(this.tableviewPermissions[TableviewActionDefaultCategories.EDIT]);
|
|
14313
14355
|
}
|
|
14314
|
-
|
|
14356
|
+
this.addChildBuilder(routeBuilder);
|
|
14315
14357
|
}
|
|
14316
|
-
return
|
|
14358
|
+
return super.build();
|
|
14359
|
+
}
|
|
14360
|
+
}
|
|
14361
|
+
class TableviewRouteBuilder {
|
|
14362
|
+
static fromComponent(path, component) {
|
|
14363
|
+
return new TableviewRouteBuilderInternal(path, { component });
|
|
14364
|
+
}
|
|
14365
|
+
static from(path, descriptor, dataProvider, actions) {
|
|
14366
|
+
return new TableviewRouteBuilderInternal(path, { descriptor, dataProvider, actions });
|
|
14317
14367
|
}
|
|
14318
14368
|
}
|
|
14319
14369
|
|
|
@@ -14346,5 +14396,5 @@ function EnumName(typeName) {
|
|
|
14346
14396
|
* Generated bundle index. Do not edit.
|
|
14347
14397
|
*/
|
|
14348
14398
|
|
|
14349
|
-
export { ACTION_EDITOR_DIALOG_COMPONENT_SETTING, AFieldDescriptor, AFieldGroupDescriptor, AGenericFieldDescriptor, AMngApiService, AMngBaseApiService, AMngCrudApiService, 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, DefaultMngErrorMapperService, DynamicTableviewDataProvider, EditorDataProvider, EditorDescriptor, EditorFormlyUtil, EnumName, EnumUtil, EnumeratePipeI18nHelper, ExportUtils, FieldActionDescriptor, FieldGroupDescriptor, FieldGroupTypeEnum, FieldInputDescriptor, FieldInputTypeEnum, FieldLookupDescriptor, FieldLookupEnumDescriptor, FieldLookupTypeEnum, FieldManyEditorActionEnum, FieldManyEditorDescriptor, FieldManyEditorTypeEnum, FieldManyToManyEditorActionEnum, FieldManyToManyEditorDescriptor, FieldManyToManyEditorTypeEnum, FieldSizeEnum, FieldTabGroupDescriptor, FieldValidationDescriptor, FilterDescriptor, FilterLookupDescriptor, FilterLookupEnumDescriptor, FilterLookupTypeEnum, FilterMatchModeEnum, FilterTypeEnum, I18nUtils, IdProperty, JsonPathPipe, LookupDataProvider, MNG_AUTOCOMPLETE_VALUE_ACCESSOR, MNG_BROWSER_STORAGE_IT, MNG_COMMONS_INITIALIZER_IT, MNG_DATE_RANGE_VALUE_ACCESSOR, MNG_DROPDOWN_VALUE_ACCESSOR, MNG_MODULE_CONFIG_IT, MediusFilterMatchType, MediusFilterParam, MediusQueryMode, MediusQueryParam, MediusQueryParamBuilder, MediusQueryResult, MediusRestUtil, MngActionComponent, MngActionEditorComponent, MngActionExecutorService, MngActionRouteComponent, MngAuthorizationGuard, MngAuthorizationService, MngAutocompleteComponent, MngBooleanPipe, MngBreadcrumbComponent, MngClassMapPipe, MngCommonsModule, MngCommonsService, MngComponentDirective, MngConfigurationService, MngDataLanguageDropdownComponent, MngDateRangeComponent, MngDropdownComponent, MngEnumPipe, MngEnumerateAsyncPipe, MngEnumeratePipe, MngErrorMapperService, MngFooterComponent, MngFormEditorComponent, MngFormEditorSubmitEvent, MngFormFieldEvent, MngFormFieldEventComponentSubtype, MngFormFieldEventDialogSubtype, MngFormFieldEventTypeEnum, MngFormlyFieldActionComponent, MngFormlyFieldAutocompleteComponent, MngFormlyFieldDropdownComponent, MngFormlyFieldFieldsetComponent, MngFormlyFieldInputComponent, MngFormlyFieldLabelComponent, MngFormlyFieldLookupDialogComponent, MngFormlyFieldNoLabelWrapperComponent, MngFormlyFieldTableDialogFormComponent, MngFormlyFieldTableDialogMultiselectComponent, MngFormlyFieldTabsComponent, MngFormlyFieldWrapperComponent, MngGetterPipe, MngI18nPropertyPipe, MngLocaleDefaultRowClassPipe, MngMainLayoutComponent, MngMainLayoutComponentService, MngMenuComponent, MngMenuItemComponent, MngNavigationService, MngParametrizePipe, MngTableCellClickEvent, MngTableColumnFilterComponent, MngTableColumnValueComponent, MngTableComponent, MngTableLoadEvent, MngTableReloadEvent, MngTableviewComponent, MngTableviewRouteComponent, MngTemplateDirective, MngTemplatePipe, MngTopbarComponent, MngVersionComponent, MngViewContainerComponentService, ModelDescriptor, ModelUtil, NotificationUtil, ObjectSerializer, Permissions, RouteBuilder, RoutesBuilder, StringUtil, StyleLevelEnum, StyleSizeEnum, StylesUtil, TableDataProvider, TableDescriptor, TableDynamicColumnsModeEnum, TableDynamicDescriptor, TableFilterDisplayEnum, TablePaginationModeEnum, TableSizeEnum, TableviewActionDefaultCategories, TableviewCrudDataProvider, TableviewDataProvider, TableviewDescriptor, TableviewDynamicDescriptor, TableviewEditorTypeEnum, TableviewRouteBuilder, TitleProperty, TypeName, TypeUtil, enumsMapBase, formlyTypesConfig, formlyWrappersConfig, getEmailValidationMessage, getFormlyValidationMessages, getMaxLengthValidationMessage, getMaxValidationMessage, getMinLengthValidationMessage, getMinValidationMessage, getRequiredValidationMessage, getTextPatternValidationMessage, mngConfigJsonAppInitializerProvider, mngConfigurationServiceProvider, mngFormlyConfigProvider, primeNgModules, provideMngCommons, typeMapBase };
|
|
14399
|
+
export { ACTION_EDITOR_DIALOG_COMPONENT_SETTING, AFieldDescriptor, AFieldGroupDescriptor, AGenericFieldDescriptor, AMngApiService, AMngBaseApiService, AMngCrudApiService, 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, DefaultMngErrorMapperService, DynamicTableviewDataProvider, EditorDataProvider, EditorDescriptor, EditorFormlyUtil, EnumName, EnumUtil, EnumeratePipeI18nHelper, ExportUtils, FieldActionDescriptor, FieldGroupDescriptor, FieldGroupTypeEnum, FieldInputDescriptor, FieldInputTypeEnum, FieldLookupDescriptor, FieldLookupEnumDescriptor, FieldLookupTypeEnum, FieldManyEditorActionEnum, FieldManyEditorDescriptor, FieldManyEditorTypeEnum, FieldManyToManyEditorActionEnum, FieldManyToManyEditorDescriptor, FieldManyToManyEditorTypeEnum, FieldSizeEnum, FieldTabGroupDescriptor, FieldValidationDescriptor, FilterDescriptor, FilterLookupDescriptor, FilterLookupEnumDescriptor, FilterLookupTypeEnum, FilterMatchModeEnum, FilterTypeEnum, I18nUtils, IdProperty, JsonPathPipe, LookupDataProvider, MNG_AUTOCOMPLETE_VALUE_ACCESSOR, MNG_BROWSER_STORAGE_IT, MNG_COMMONS_INITIALIZER_IT, MNG_DATE_RANGE_VALUE_ACCESSOR, MNG_DROPDOWN_VALUE_ACCESSOR, MNG_MODULE_CONFIG_IT, MediusFilterMatchType, MediusFilterParam, MediusQueryMode, MediusQueryParam, MediusQueryParamBuilder, MediusQueryResult, MediusRestUtil, MngActionComponent, MngActionEditorComponent, MngActionExecutorService, MngActionRouteComponent, MngAuthorizationGuard, MngAuthorizationService, MngAutocompleteComponent, MngBooleanPipe, MngBreadcrumbComponent, MngClassMapPipe, MngCommonsModule, MngCommonsService, MngComponentDirective, MngConfigurationService, MngDataLanguageDropdownComponent, MngDateRangeComponent, MngDropdownComponent, MngEnumPipe, MngEnumerateAsyncPipe, MngEnumeratePipe, MngErrorMapperService, MngFooterComponent, MngFormEditorComponent, MngFormEditorSubmitEvent, MngFormFieldEvent, MngFormFieldEventComponentSubtype, MngFormFieldEventDialogSubtype, MngFormFieldEventTypeEnum, MngFormlyFieldActionComponent, MngFormlyFieldAutocompleteComponent, MngFormlyFieldDropdownComponent, MngFormlyFieldFieldsetComponent, MngFormlyFieldInputComponent, MngFormlyFieldLabelComponent, MngFormlyFieldLookupDialogComponent, MngFormlyFieldNoLabelWrapperComponent, MngFormlyFieldTableDialogFormComponent, MngFormlyFieldTableDialogMultiselectComponent, MngFormlyFieldTabsComponent, MngFormlyFieldWrapperComponent, MngGetterPipe, MngI18nPropertyPipe, MngLocaleDefaultRowClassPipe, MngMainLayoutComponent, MngMainLayoutComponentService, MngMenuComponent, MngMenuItemComponent, MngNavigationService, MngParametrizePipe, MngTableCellClickEvent, MngTableColumnFilterComponent, MngTableColumnValueComponent, MngTableComponent, MngTableLoadEvent, MngTableReloadEvent, MngTableviewComponent, MngTableviewRouteComponent, MngTemplateDirective, MngTemplatePipe, MngTopbarComponent, MngTopbarUserComponent, MngVersionComponent, MngViewContainerComponentService, ModelDescriptor, ModelUtil, NotificationUtil, ObjectSerializer, 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, getMaxLengthValidationMessage, getMaxValidationMessage, getMinLengthValidationMessage, getMinValidationMessage, getRequiredValidationMessage, getTextPatternValidationMessage, mngConfigJsonAppInitializerProvider, mngConfigurationServiceProvider, mngFormlyConfigProvider, primeNgModules, provideMngCommons, typeMapBase };
|
|
14350
14400
|
//# sourceMappingURL=mediusinc-mng-commons.mjs.map
|