@mediusinc/mng-commons 5.0.1 → 5.1.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -6
- package/core/descriptors/model.descriptor.d.ts +1 -1
- package/core/error/error-helpers.d.ts +18 -1
- package/core/helpers/coercion.d.ts +1 -0
- package/core/i18n/i18n-type.d.ts +0 -9
- package/core/index.d.ts +0 -1
- package/core/services/commons-configuration.service.d.ts +12 -0
- package/esm2022/core/components/notification/notification-wrapper.component.mjs +5 -6
- package/esm2022/core/components/pages/error/error.page.component.mjs +4 -4
- package/esm2022/core/components/pages/not-found/not-found.page.component.mjs +4 -4
- package/esm2022/core/descriptors/model.descriptor.mjs +1 -1
- package/esm2022/core/directives/component.directive.mjs +3 -3
- package/esm2022/core/directives/template.directive.mjs +3 -3
- package/esm2022/core/error/error-helpers.mjs +20 -1
- package/esm2022/core/helpers/coercion.mjs +4 -1
- package/esm2022/core/i18n/i18n-type.mjs +1 -34
- package/esm2022/core/index.mjs +1 -2
- package/esm2022/core/pipes/boolean.pipe.mjs +3 -3
- package/esm2022/core/pipes/class-map.pipe.mjs +3 -3
- package/esm2022/core/pipes/enum.pipe.mjs +5 -5
- package/esm2022/core/pipes/enumerate-async.pipe.mjs +3 -3
- package/esm2022/core/pipes/enumerate.pipe.mjs +3 -3
- package/esm2022/core/pipes/getter.pipe.mjs +3 -3
- package/esm2022/core/pipes/i18n-property.pipe.mjs +3 -3
- package/esm2022/core/pipes/json-path.pipe.mjs +3 -3
- package/esm2022/core/pipes/parametrize.pipe.mjs +3 -3
- package/esm2022/core/pipes/template.pipe.mjs +3 -3
- package/esm2022/core/security/permission.service.mjs +3 -3
- package/esm2022/core/services/commons-configuration.service.mjs +16 -1
- package/esm2022/core/services/commons-init.service.mjs +3 -3
- package/esm2022/core/services/commons-router.service.mjs +3 -3
- package/esm2022/core/services/commons.service.mjs +3 -3
- package/esm2022/core/services/local-storage-config.service.mjs +3 -3
- package/esm2022/form/components/autocomplete/autocomplete.component.mjs +4 -4
- package/esm2022/form/components/date-range/date-range.component.mjs +4 -4
- package/esm2022/form/components/dropdown/dropdown.component.mjs +4 -4
- package/esm2022/form/directives/input-trim.directive.mjs +14 -19
- package/esm2022/model/descriptors/model.descriptor.mjs +1 -1
- package/esm2022/model/helpers/i18n.mjs +7 -10
- package/esm2022/table/api/descriptors/table.descriptor.mjs +2 -2
- package/esm2022/table/api/models/table.model.mjs +1 -1
- package/esm2022/table/components/column-filter-full/column-filter-full.component.mjs +4 -4
- package/esm2022/table/components/column-value/column-value.component.mjs +43 -53
- package/esm2022/table/components/table/table.component.mjs +300 -365
- package/esm2022/table/pipes/locale-default-row-class.pipe.mjs +3 -3
- package/esm2022/table/pipes/table-column-filter-class.pipe.mjs +3 -3
- package/esm2022/table/services/data-list.service.mjs +3 -3
- package/esm2022/tableview/action/components/action/action.component.mjs +5 -5
- package/esm2022/tableview/action/components/editor/action-editor.component.mjs +6 -7
- package/esm2022/tableview/action/components/editor/injector-context/action-editor-injector-context.component.mjs +5 -4
- package/esm2022/tableview/action/components/localization/data-language-dropdown.component.mjs +3 -3
- package/esm2022/tableview/action/components/route/action-route.component.mjs +3 -3
- package/esm2022/tableview/action/components/table/action-table.component.mjs +43 -92
- package/esm2022/tableview/action/services/component-action-executor.service.mjs +3 -3
- package/esm2022/tableview/action/services/data-provider-executor.service.mjs +3 -3
- package/esm2022/tableview/action/services/navigation.service.mjs +3 -3
- package/esm2022/tableview/action/services/root-action-executor.service.mjs +3 -3
- package/esm2022/tableview/action/services/view-container.service.mjs +3 -3
- package/esm2022/tableview/api/editor/descriptors/field-base.descriptor.mjs +1 -1
- package/esm2022/tableview/api/editor/descriptors/field-lookup.descriptor.mjs +1 -1
- package/esm2022/tableview/api/editor/descriptors/field-many.descriptor.mjs +4 -1
- package/esm2022/tableview/api/editor/descriptors/field.descriptor.mjs +6 -14
- package/esm2022/tableview/api/editor/models/field-action-context.model.mjs +1 -1
- package/esm2022/tableview/api/editor/models/form-editor.interface.mjs +1 -1
- package/esm2022/tableview/api/editor/models/formly-custom-field.model.mjs +5 -5
- package/esm2022/tableview/api/editor/models/formly-field.model.mjs +1 -1
- package/esm2022/tableview/api/editor/models/formly-options.model.mjs +2 -0
- package/esm2022/tableview/api/index.mjs +2 -2
- package/esm2022/tableview/editor/components/editor/form-editor.component.mjs +25 -20
- package/esm2022/tableview/editor/components/formly/fields/formly-field-action/formly-field-action.component.mjs +7 -8
- package/esm2022/tableview/editor/components/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.mjs +10 -12
- package/esm2022/tableview/editor/components/formly/fields/formly-field-custom/formly-field-custom.component.mjs +7 -7
- package/esm2022/tableview/editor/components/formly/fields/formly-field-datepicker/formly-field-datepicker.component.mjs +51 -10
- package/esm2022/tableview/editor/components/formly/fields/formly-field-dropdown/formly-field-dropdown.component.mjs +10 -11
- package/esm2022/tableview/editor/components/formly/fields/formly-field-fieldset/formly-field-fieldset.component.mjs +8 -8
- package/esm2022/tableview/editor/components/formly/fields/formly-field-input/formly-field-input.component.mjs +8 -7
- package/esm2022/tableview/editor/components/formly/fields/formly-field-label/formly-field-label.component.mjs +7 -8
- package/esm2022/tableview/editor/components/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.mjs +19 -33
- package/esm2022/tableview/editor/components/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.mjs +16 -18
- package/esm2022/tableview/editor/components/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.mjs +21 -26
- package/esm2022/tableview/editor/components/formly/fields/formly-field-tabs/formly-field-tabs.component.mjs +7 -6
- package/esm2022/tableview/editor/components/formly/fields/formly-field-type.abstract.component.mjs +23 -0
- package/esm2022/tableview/editor/components/formly/wrappers/formly-field-no-label-wrapper/formly-field-no-label-wrapper.component.mjs +3 -3
- package/esm2022/tableview/editor/components/formly/wrappers/formly-field-wrapper/formly-field-wrapper.component.mjs +3 -3
- package/esm2022/tableview/editor/helpers/editor-formly.mjs +14 -2
- package/esm2022/tableview/editor/helpers/editor-validators.mjs +25 -0
- package/esm2022/tableview/editor/helpers/formly-config.mjs +7 -5
- package/esm2022/tableview/editor/services/form-editor.service.mjs +3 -3
- package/esm2022/tableview/index.mjs +2 -1
- package/esm2022/tableview/tableview/components/route/tableview-route.component.mjs +3 -3
- package/esm2022/tableview/tableview/components/tableview/tableview.component.mjs +4 -4
- package/fesm2022/mediusinc-mng-commons-core.mjs +164 -205
- package/fesm2022/mediusinc-mng-commons-core.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-form.mjs +23 -27
- package/fesm2022/mediusinc-mng-commons-form.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-model.mjs +7 -10
- package/fesm2022/mediusinc-mng-commons-model.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-table-api.mjs +1 -1
- package/fesm2022/mediusinc-mng-commons-table-api.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-table.mjs +357 -431
- package/fesm2022/mediusinc-mng-commons-table.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-tableview-api.mjs +13 -39
- package/fesm2022/mediusinc-mng-commons-tableview-api.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-tableview.mjs +305 -280
- package/fesm2022/mediusinc-mng-commons-tableview.mjs.map +1 -1
- package/form/directives/input-trim.directive.d.ts +5 -8
- package/model/descriptors/model.descriptor.d.ts +3 -3
- package/model/helpers/i18n.d.ts +1 -3
- package/package.json +15 -15
- package/table/api/models/table.model.d.ts +1 -1
- package/table/components/column-value/column-value.component.d.ts +11 -17
- package/table/components/table/table.component.d.ts +43 -47
- package/tableview/action/components/editor/action-editor.component.d.ts +1 -2
- package/tableview/action/components/table/action-table.component.d.ts +26 -29
- package/tableview/api/editor/descriptors/field-base.descriptor.d.ts +3 -3
- package/tableview/api/editor/descriptors/field-lookup.descriptor.d.ts +3 -3
- package/tableview/api/editor/descriptors/field-many.descriptor.d.ts +2 -1
- package/tableview/api/editor/descriptors/field.descriptor.d.ts +13 -9
- package/tableview/api/editor/models/field-action-context.model.d.ts +4 -4
- package/tableview/api/editor/models/form-editor.interface.d.ts +24 -14
- package/tableview/api/editor/models/formly-custom-field.model.d.ts +22 -19
- package/tableview/api/editor/models/formly-field.model.d.ts +20 -0
- package/tableview/api/editor/models/formly-options.model.d.ts +15 -0
- package/tableview/api/index.d.ts +1 -1
- package/tableview/editor/components/editor/form-editor.component.d.ts +9 -17
- package/tableview/editor/components/formly/fields/formly-field-action/formly-field-action.component.d.ts +3 -4
- package/tableview/editor/components/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.d.ts +3 -7
- package/tableview/editor/components/formly/fields/formly-field-custom/formly-field-custom.component.d.ts +3 -4
- package/tableview/editor/components/formly/fields/formly-field-datepicker/formly-field-datepicker.component.d.ts +6 -4
- package/tableview/editor/components/formly/fields/formly-field-dropdown/formly-field-dropdown.component.d.ts +3 -6
- package/tableview/editor/components/formly/fields/formly-field-fieldset/formly-field-fieldset.component.d.ts +3 -4
- package/tableview/editor/components/formly/fields/formly-field-input/formly-field-input.component.d.ts +4 -6
- package/tableview/editor/components/formly/fields/formly-field-label/formly-field-label.component.d.ts +5 -6
- package/tableview/editor/components/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.d.ts +6 -10
- package/tableview/editor/components/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.d.ts +4 -7
- package/tableview/editor/components/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.d.ts +7 -12
- package/tableview/editor/components/formly/fields/formly-field-tabs/formly-field-tabs.component.d.ts +2 -3
- package/tableview/editor/components/formly/fields/formly-field-type.abstract.component.d.ts +12 -0
- package/tableview/editor/helpers/editor-validators.d.ts +7 -0
- package/tableview/index.d.ts +1 -0
- package/version-info.json +5 -5
- package/core/directives/dialog-keydown-handler.directive.d.ts +0 -12
- package/esm2022/core/directives/dialog-keydown-handler.directive.mjs +0 -49
- package/esm2022/tableview/api/editor/helpers/field-validators.mjs +0 -23
- package/tableview/api/editor/helpers/field-validators.d.ts +0 -7
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { computed, signal, Component, ChangeDetectionStrategy, InjectionToken, inject, DestroyRef, effect, Injectable, Injector, ElementRef, ApplicationRef, ViewContainerRef, EventEmitter, EnvironmentInjector, createComponent, Directive, Input, Output, TemplateRef, booleanAttribute, numberAttribute, Pipe, APP_INITIALIZER, ErrorHandler } from '@angular/core';
|
|
3
3
|
import * as i3$1 from '@ngx-translate/core';
|
|
4
4
|
import { TranslateModule, TranslateService } from '@ngx-translate/core';
|
|
5
5
|
import * as i3 from 'primeng/confirmdialog';
|
|
6
6
|
import { ConfirmDialogModule } from 'primeng/confirmdialog';
|
|
7
7
|
import * as i5 from 'primeng/dialog';
|
|
8
|
-
import {
|
|
8
|
+
import { DialogModule } from 'primeng/dialog';
|
|
9
9
|
import * as i1 from 'primeng/toast';
|
|
10
10
|
import { ToastModule } from 'primeng/toast';
|
|
11
|
-
import { DialogService, DynamicDialogComponent } from 'primeng/dynamicdialog';
|
|
12
11
|
import * as i2 from 'primeng/api';
|
|
13
12
|
import { PrimeNGConfig, MessageService, ConfirmationService } from 'primeng/api';
|
|
14
13
|
import { Router, NavigationEnd, RouterLink, NavigationStart, RouteConfigLoadStart, RouteConfigLoadEnd, NavigationCancel, NavigationError } from '@angular/router';
|
|
@@ -19,53 +18,9 @@ import { Title } from '@angular/platform-browser';
|
|
|
19
18
|
import { filter, map, first, catchError } from 'rxjs/operators';
|
|
20
19
|
import { DatePipe } from '@angular/common';
|
|
21
20
|
import { HttpErrorResponse, HttpClient, HttpBackend } from '@angular/common/http';
|
|
22
|
-
import { isObservable, of, mergeMap, combineLatest, Observable, tap, ReplaySubject, Subject, take, throwError } from 'rxjs';
|
|
21
|
+
import { isObservable, of, mergeMap, combineLatest, Observable, tap, ReplaySubject, Subject, take, throwError as throwError$1 } from 'rxjs';
|
|
23
22
|
import 'reflect-metadata';
|
|
24
|
-
|
|
25
|
-
class DialogKeydownHandlerDirective {
|
|
26
|
-
constructor() {
|
|
27
|
-
this.dialogService = inject(DialogService);
|
|
28
|
-
this.dynamicDialog = inject(DynamicDialogComponent, { optional: true });
|
|
29
|
-
this.dialog = inject(Dialog, { optional: true });
|
|
30
|
-
this.dialogsWithKeydownListener = [];
|
|
31
|
-
}
|
|
32
|
-
ngOnInit() {
|
|
33
|
-
if (!this.dialog && !this.dynamicDialog) {
|
|
34
|
-
// not a dialog, return
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
this.dialogService.dialogComponentRefMap.forEach(v => {
|
|
38
|
-
if ((this.dialog || v.instance !== this.dynamicDialog) && v.instance.documentKeydownListener) {
|
|
39
|
-
// exclude self dynamic dialog
|
|
40
|
-
this.dialogsWithKeydownListener.push(v.instance);
|
|
41
|
-
v.instance.unbindDocumentKeydownListener();
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
if (!this.dialog) {
|
|
45
|
-
// if dialog is present, then do not bind (because it will bind on unbind-ed dynamic dialog
|
|
46
|
-
this.dynamicDialog?.bindDocumentKeydownListener();
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
ngOnDestroy() {
|
|
50
|
-
if (!this.dialog && !this.dynamicDialog) {
|
|
51
|
-
// not a dialog, return
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
if (!this.dialog) {
|
|
55
|
-
this.dynamicDialog?.unbindDocumentKeydownListener();
|
|
56
|
-
}
|
|
57
|
-
this.dialogsWithKeydownListener.forEach(c => c.bindDocumentKeydownListener());
|
|
58
|
-
}
|
|
59
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: DialogKeydownHandlerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
60
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.4", type: DialogKeydownHandlerDirective, isStandalone: true, selector: "[mngDialogKeydownHandler]", ngImport: i0 }); }
|
|
61
|
-
}
|
|
62
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: DialogKeydownHandlerDirective, decorators: [{
|
|
63
|
-
type: Directive,
|
|
64
|
-
args: [{
|
|
65
|
-
standalone: true,
|
|
66
|
-
selector: '[mngDialogKeydownHandler]'
|
|
67
|
-
}]
|
|
68
|
-
}] });
|
|
23
|
+
import { DialogService } from 'primeng/dynamicdialog';
|
|
69
24
|
|
|
70
25
|
class NotificationWrapperComponent {
|
|
71
26
|
constructor() {
|
|
@@ -97,12 +52,12 @@ class NotificationWrapperComponent {
|
|
|
97
52
|
this.dialogNotification.set(null);
|
|
98
53
|
}
|
|
99
54
|
}
|
|
100
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
101
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
55
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: NotificationWrapperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
56
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.5", type: NotificationWrapperComponent, isStandalone: true, selector: "mng-notification-wrapper", ngImport: i0, template: "<ng-content></ng-content>\n<p-confirmDialog appendTo=\"body\" [baseZIndex]=\"50\"></p-confirmDialog>\n\n<p-toast [baseZIndex]=\"50\">\n <ng-template let-message pTemplate=\"message\">\n <span [class]=\"'p-toast-message-icon pi ' + getNotificationIconClass(message)\"></span>\n <div class=\"p-toast-message-text\">\n <div class=\"p-toast-summary\">{{ message.summary }}</div>\n @if (message.detail) {\n <div class=\"p-toast-detail\">{{ message.detail.slice(0, notificationCutoff) + (message.detail.length > notificationCutoff ? '...' : '') }}</div>\n @if (message.detail.length > notificationCutoff) {\n <div (click)=\"onShowNotificationInDialog(message)\" class=\"p-link font-semibold text-sm mt-2 flex align-items-center\">\n <i class=\"pi pi-chevron-down mr-1\"></i>{{ 'notification.details' | translate }}\n </div>\n }\n }\n </div>\n </ng-template>\n</p-toast>\n\n<p-dialog\n [visible]=\"isDialogNotificationVisible()\"\n (visibleChange)=\"onDialogNotificationVisibilityChange($event)\"\n [styleClass]=\"'p-fluid mng-dialog mng-dialog-xs ' + 'mng-message-detail-dialog mng-message-detail-dialog-' + (dialogNotification()?.severity ?? '')\">\n <ng-template pTemplate=\"header\" mngDialogKeydownHandler>\n <span class=\"p-dialog-title font-bold mng-dialog-success\">\n <span [class]=\"'mr-2 pi ' + getNotificationIconClass(dialogNotification())\"></span>\n {{ dialogNotification()?.summary ?? '' }}\n </span>\n </ng-template>\n <div>\n {{ dialogNotification()?.detail ?? '' }}\n </div>\n</p-dialog>\n", dependencies: [{ kind: "ngmodule", type: ToastModule }, { kind: "component", type: i1.Toast, selector: "p-toast", inputs: ["key", "autoZIndex", "baseZIndex", "life", "style", "styleClass", "position", "preventOpenDuplicates", "preventDuplicates", "showTransformOptions", "hideTransformOptions", "showTransitionOptions", "hideTransitionOptions", "breakpoints"], outputs: ["onClose"] }, { kind: "directive", type: i2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: ConfirmDialogModule }, { kind: "component", type: i3.ConfirmDialog, selector: "p-confirmDialog", inputs: ["header", "icon", "message", "style", "styleClass", "maskStyleClass", "acceptIcon", "acceptLabel", "closeAriaLabel", "acceptAriaLabel", "acceptVisible", "rejectIcon", "rejectLabel", "rejectAriaLabel", "rejectVisible", "acceptButtonStyleClass", "rejectButtonStyleClass", "closeOnEscape", "dismissableMask", "blockScroll", "rtl", "closable", "appendTo", "key", "autoZIndex", "baseZIndex", "transitionOptions", "focusTrap", "defaultFocus", "breakpoints", "visible", "position"], outputs: ["onHide"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i5.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
102
57
|
}
|
|
103
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
58
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: NotificationWrapperComponent, decorators: [{
|
|
104
59
|
type: Component,
|
|
105
|
-
args: [{ selector: 'mng-notification-wrapper', standalone: true, imports: [ToastModule, ConfirmDialogModule, TranslateModule, DialogModule
|
|
60
|
+
args: [{ selector: 'mng-notification-wrapper', standalone: true, imports: [ToastModule, ConfirmDialogModule, TranslateModule, DialogModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>\n<p-confirmDialog appendTo=\"body\" [baseZIndex]=\"50\"></p-confirmDialog>\n\n<p-toast [baseZIndex]=\"50\">\n <ng-template let-message pTemplate=\"message\">\n <span [class]=\"'p-toast-message-icon pi ' + getNotificationIconClass(message)\"></span>\n <div class=\"p-toast-message-text\">\n <div class=\"p-toast-summary\">{{ message.summary }}</div>\n @if (message.detail) {\n <div class=\"p-toast-detail\">{{ message.detail.slice(0, notificationCutoff) + (message.detail.length > notificationCutoff ? '...' : '') }}</div>\n @if (message.detail.length > notificationCutoff) {\n <div (click)=\"onShowNotificationInDialog(message)\" class=\"p-link font-semibold text-sm mt-2 flex align-items-center\">\n <i class=\"pi pi-chevron-down mr-1\"></i>{{ 'notification.details' | translate }}\n </div>\n }\n }\n </div>\n </ng-template>\n</p-toast>\n\n<p-dialog\n [visible]=\"isDialogNotificationVisible()\"\n (visibleChange)=\"onDialogNotificationVisibilityChange($event)\"\n [styleClass]=\"'p-fluid mng-dialog mng-dialog-xs ' + 'mng-message-detail-dialog mng-message-detail-dialog-' + (dialogNotification()?.severity ?? '')\">\n <ng-template pTemplate=\"header\" mngDialogKeydownHandler>\n <span class=\"p-dialog-title font-bold mng-dialog-success\">\n <span [class]=\"'mr-2 pi ' + getNotificationIconClass(dialogNotification())\"></span>\n {{ dialogNotification()?.summary ?? '' }}\n </span>\n </ng-template>\n <div>\n {{ dialogNotification()?.detail ?? '' }}\n </div>\n</p-dialog>\n" }]
|
|
106
61
|
}] });
|
|
107
62
|
|
|
108
63
|
class ACommonsErrorBase extends Error {
|
|
@@ -712,10 +667,10 @@ class CommonsService {
|
|
|
712
667
|
titlePieces.push(this.translate.instant('app.name'));
|
|
713
668
|
return titlePieces.join(' - ');
|
|
714
669
|
}
|
|
715
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
716
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
670
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: CommonsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
671
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: CommonsService }); }
|
|
717
672
|
}
|
|
718
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
673
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: CommonsService, decorators: [{
|
|
719
674
|
type: Injectable
|
|
720
675
|
}], ctorParameters: () => [] });
|
|
721
676
|
|
|
@@ -723,10 +678,10 @@ class ErrorPageComponent {
|
|
|
723
678
|
constructor(commons) {
|
|
724
679
|
this.commons = commons;
|
|
725
680
|
}
|
|
726
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
727
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
681
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: ErrorPageComponent, deps: [{ token: CommonsService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
682
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.5", type: ErrorPageComponent, isStandalone: true, selector: "mng-error-page", ngImport: i0, template: "<div [class]=\"'exception-body min-h-screen ' + (commons.colorSchemeIsLight() ? 'layout-light' : 'layout-dark')\">\n <div class=\"exception-container min-h-screen flex align-items-center justify-content-center flex-column bg-auto md:bg-contain bg-no-repeat\">\n <div class=\"exception-panel text-center flex align-items-center justify-content-center flex-column\">\n <h1 class=\"text-red-400 mb-0\">{{ 'pages.notFound.title' | translate }}</h1>\n <h3 class=\"text-red-300\">{{ 'pages.notFound.subtitle' | translate }}</h3>\n <button type=\"button\" pButton [label]=\"'general.returnHome' | translate\" [routerLink]=\"['/']\"></button>\n </div>\n <div class=\"exception-footer align-items-center flex\">\n <img [src]=\"commons.appLogo()\" class=\"exception-logo\" alt=\"App logo\" />\n <img [src]=\"commons.appLogoName()\" class=\"exception-appname ml-3\" alt=\"App name\" />\n </div>\n </div>\n</div>\n", styles: [".exception-body{background:var(--surface-ground)}.exception-body .exception-container{background:var(--exception-pages-image);background-repeat:no-repeat;background-size:contain;box-sizing:border-box}.exception-body .exception-container .exception-panel{box-sizing:border-box;flex-grow:1;margin-top:3rem;margin-bottom:3rem}.exception-body .exception-container .exception-panel h1{font-size:140px;font-weight:900;text-shadow:0 0 50px rgba(252,97,97,.2)}.exception-body .exception-container .exception-panel h3{font-size:80px;font-weight:900;margin-top:-90px;margin-bottom:50px}.exception-body .exception-container .exception-panel button{margin-top:50px}.exception-body .exception-container .exception-footer{margin-bottom:2rem}.exception-body .exception-container .exception-footer .exception-logo{width:34px}.exception-body .exception-container .exception-footer .exception-appname{width:72px}\n"], dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i2$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
728
683
|
}
|
|
729
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
684
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: ErrorPageComponent, decorators: [{
|
|
730
685
|
type: Component,
|
|
731
686
|
args: [{ standalone: true, selector: 'mng-error-page', imports: [ButtonModule, TranslateModule, RouterLink], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [class]=\"'exception-body min-h-screen ' + (commons.colorSchemeIsLight() ? 'layout-light' : 'layout-dark')\">\n <div class=\"exception-container min-h-screen flex align-items-center justify-content-center flex-column bg-auto md:bg-contain bg-no-repeat\">\n <div class=\"exception-panel text-center flex align-items-center justify-content-center flex-column\">\n <h1 class=\"text-red-400 mb-0\">{{ 'pages.notFound.title' | translate }}</h1>\n <h3 class=\"text-red-300\">{{ 'pages.notFound.subtitle' | translate }}</h3>\n <button type=\"button\" pButton [label]=\"'general.returnHome' | translate\" [routerLink]=\"['/']\"></button>\n </div>\n <div class=\"exception-footer align-items-center flex\">\n <img [src]=\"commons.appLogo()\" class=\"exception-logo\" alt=\"App logo\" />\n <img [src]=\"commons.appLogoName()\" class=\"exception-appname ml-3\" alt=\"App name\" />\n </div>\n </div>\n</div>\n", styles: [".exception-body{background:var(--surface-ground)}.exception-body .exception-container{background:var(--exception-pages-image);background-repeat:no-repeat;background-size:contain;box-sizing:border-box}.exception-body .exception-container .exception-panel{box-sizing:border-box;flex-grow:1;margin-top:3rem;margin-bottom:3rem}.exception-body .exception-container .exception-panel h1{font-size:140px;font-weight:900;text-shadow:0 0 50px rgba(252,97,97,.2)}.exception-body .exception-container .exception-panel h3{font-size:80px;font-weight:900;margin-top:-90px;margin-bottom:50px}.exception-body .exception-container .exception-panel button{margin-top:50px}.exception-body .exception-container .exception-footer{margin-bottom:2rem}.exception-body .exception-container .exception-footer .exception-logo{width:34px}.exception-body .exception-container .exception-footer .exception-appname{width:72px}\n"] }]
|
|
732
687
|
}], ctorParameters: () => [{ type: CommonsService }] });
|
|
@@ -735,10 +690,10 @@ class NotFoundPageComponent {
|
|
|
735
690
|
constructor(commons) {
|
|
736
691
|
this.commons = commons;
|
|
737
692
|
}
|
|
738
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
739
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
693
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: NotFoundPageComponent, deps: [{ token: CommonsService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
694
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.5", type: NotFoundPageComponent, isStandalone: true, selector: "mng-not-found-page", ngImport: i0, template: "<div [class]=\"'exception-body min-h-screen ' + (commons.colorSchemeIsLight() ? 'layout-light' : 'layout-dark')\">\n <div class=\"exception-container min-h-screen flex align-items-center justify-content-center flex-column bg-auto md:bg-contain bg-no-repeat\">\n <div class=\"exception-panel text-center flex align-items-center justify-content-center flex-column\">\n <h1 class=\"text-red-400 mb-0\">{{ 'pages.notFound.title' | translate }}</h1>\n <h3 class=\"text-red-300\">{{ 'pages.notFound.subtitle' | translate }}</h3>\n <p>{{ 'pages.notFound.message' | translate }}</p>\n <button type=\"button\" pButton [label]=\"'general.returnHome' | translate\" [routerLink]=\"['/']\"></button>\n </div>\n <div class=\"exception-footer align-items-center flex\">\n <img [src]=\"commons.appLogo()\" class=\"exception-logo\" alt=\"App logo\" />\n <img [src]=\"commons.appLogoName()\" class=\"exception-appname ml-3\" alt=\"App name\" />\n </div>\n </div>\n</div>\n", styles: [".exception-body{background:var(--surface-ground)}.exception-body .exception-container{background:var(--exception-pages-image);background-repeat:no-repeat;background-size:contain;box-sizing:border-box}.exception-body .exception-container .exception-panel{box-sizing:border-box;flex-grow:1;margin-top:3rem;margin-bottom:3rem}.exception-body .exception-container .exception-panel h1{font-size:140px;font-weight:900;text-shadow:0 0 50px rgba(252,97,97,.2)}.exception-body .exception-container .exception-panel h3{font-size:80px;font-weight:900;margin-top:-90px;margin-bottom:50px}.exception-body .exception-container .exception-panel p{font-size:24px;font-weight:400;max-width:320px}.exception-body .exception-container .exception-panel button{margin-top:50px}.exception-body .exception-container .exception-footer{margin-bottom:2rem}.exception-body .exception-container .exception-footer .exception-logo{width:34px}.exception-body .exception-container .exception-footer .exception-appname{width:72px}\n"], dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i2$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
740
695
|
}
|
|
741
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
696
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: NotFoundPageComponent, decorators: [{
|
|
742
697
|
type: Component,
|
|
743
698
|
args: [{ standalone: true, selector: 'mng-not-found-page', imports: [ButtonModule, RouterLink, TranslateModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [class]=\"'exception-body min-h-screen ' + (commons.colorSchemeIsLight() ? 'layout-light' : 'layout-dark')\">\n <div class=\"exception-container min-h-screen flex align-items-center justify-content-center flex-column bg-auto md:bg-contain bg-no-repeat\">\n <div class=\"exception-panel text-center flex align-items-center justify-content-center flex-column\">\n <h1 class=\"text-red-400 mb-0\">{{ 'pages.notFound.title' | translate }}</h1>\n <h3 class=\"text-red-300\">{{ 'pages.notFound.subtitle' | translate }}</h3>\n <p>{{ 'pages.notFound.message' | translate }}</p>\n <button type=\"button\" pButton [label]=\"'general.returnHome' | translate\" [routerLink]=\"['/']\"></button>\n </div>\n <div class=\"exception-footer align-items-center flex\">\n <img [src]=\"commons.appLogo()\" class=\"exception-logo\" alt=\"App logo\" />\n <img [src]=\"commons.appLogoName()\" class=\"exception-appname ml-3\" alt=\"App name\" />\n </div>\n </div>\n</div>\n", styles: [".exception-body{background:var(--surface-ground)}.exception-body .exception-container{background:var(--exception-pages-image);background-repeat:no-repeat;background-size:contain;box-sizing:border-box}.exception-body .exception-container .exception-panel{box-sizing:border-box;flex-grow:1;margin-top:3rem;margin-bottom:3rem}.exception-body .exception-container .exception-panel h1{font-size:140px;font-weight:900;text-shadow:0 0 50px rgba(252,97,97,.2)}.exception-body .exception-container .exception-panel h3{font-size:80px;font-weight:900;margin-top:-90px;margin-bottom:50px}.exception-body .exception-container .exception-panel p{font-size:24px;font-weight:400;max-width:320px}.exception-body .exception-container .exception-panel button{margin-top:50px}.exception-body .exception-container .exception-footer{margin-bottom:2rem}.exception-body .exception-container .exception-footer .exception-logo{width:34px}.exception-body .exception-container .exception-footer .exception-appname{width:72px}\n"] }]
|
|
744
699
|
}], ctorParameters: () => [{ type: CommonsService }] });
|
|
@@ -1351,10 +1306,10 @@ class ComponentDirective {
|
|
|
1351
1306
|
}
|
|
1352
1307
|
this.componentInstanceEventEmitter.next(this.componentRef.instance);
|
|
1353
1308
|
}
|
|
1354
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1355
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1309
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: ComponentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1310
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.5", type: ComponentDirective, isStandalone: true, selector: "[mngComponent]", inputs: { component: ["mngComponent", "component"], componentIt: ["injectionToken", "componentIt"], inputs: "inputs", attachToHost: "attachToHost", parentInjector: "parentInjector" }, outputs: { componentInstanceEventEmitter: "instanceCreated" }, ngImport: i0 }); }
|
|
1356
1311
|
}
|
|
1357
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1312
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: ComponentDirective, decorators: [{
|
|
1358
1313
|
type: Directive,
|
|
1359
1314
|
args: [{
|
|
1360
1315
|
standalone: true,
|
|
@@ -1388,10 +1343,10 @@ class TemplateDirective {
|
|
|
1388
1343
|
getViewContainerRef() {
|
|
1389
1344
|
return this.viewContainerRef;
|
|
1390
1345
|
}
|
|
1391
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1392
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1346
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: TemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1347
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.5", type: TemplateDirective, isStandalone: true, selector: "[mngTemplate]", inputs: { type: "type", name: ["mngTemplate", "name"] }, ngImport: i0 }); }
|
|
1393
1348
|
}
|
|
1394
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1349
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: TemplateDirective, decorators: [{
|
|
1395
1350
|
type: Directive,
|
|
1396
1351
|
args: [{
|
|
1397
1352
|
standalone: true,
|
|
@@ -1927,6 +1882,25 @@ function errorCauseToString(error, opts) {
|
|
|
1927
1882
|
}
|
|
1928
1883
|
return '';
|
|
1929
1884
|
}
|
|
1885
|
+
/**
|
|
1886
|
+
* Throws an error with the provided error message.
|
|
1887
|
+
* The intended usage is for in-line throwing of an error with TS type narrowing.
|
|
1888
|
+
* <br>
|
|
1889
|
+
* <i>Example</i>:
|
|
1890
|
+
* <pre>
|
|
1891
|
+
* const value: string | null = getValue("");
|
|
1892
|
+
* const nonNullValue: string = getValue("") ?? throwError("value missing");
|
|
1893
|
+
* </pre>
|
|
1894
|
+
*
|
|
1895
|
+
* @param {string} errorMessage - The error message to be thrown.
|
|
1896
|
+
* @param {CommonsErrorBaseOptions} [options] - Additional options for the thrown error.
|
|
1897
|
+
* @throws {Error} - The error object with the provided error message.
|
|
1898
|
+
* @returns {never} - This function does not return a value.
|
|
1899
|
+
* @see CommonsErrorBaseOptions
|
|
1900
|
+
*/
|
|
1901
|
+
function throwError(errorMessage, options) {
|
|
1902
|
+
throw new CommonsInternalError(errorMessage, options);
|
|
1903
|
+
}
|
|
1930
1904
|
|
|
1931
1905
|
class CommonsErrorHandler {
|
|
1932
1906
|
constructor() {
|
|
@@ -1947,6 +1921,9 @@ class CommonsErrorHandler {
|
|
|
1947
1921
|
function boolean$Attribute(value) {
|
|
1948
1922
|
return isObservable(value) ? value : of(booleanAttribute(value));
|
|
1949
1923
|
}
|
|
1924
|
+
function booleanOrUndefinedAttribute(value) {
|
|
1925
|
+
return typeof value === 'boolean' ? value : value == null ? undefined : value !== 'false';
|
|
1926
|
+
}
|
|
1950
1927
|
function number$Attribute(value) {
|
|
1951
1928
|
return isObservable(value) ? value : of(numberAttribute(value));
|
|
1952
1929
|
}
|
|
@@ -2108,74 +2085,6 @@ function getI18nErrorParams(error, params = {}) {
|
|
|
2108
2085
|
return paramsRes;
|
|
2109
2086
|
}
|
|
2110
2087
|
|
|
2111
|
-
const reflectTypeNameKey = 'typeName';
|
|
2112
|
-
const reflectEnumNameKey = 'enumName';
|
|
2113
|
-
/**
|
|
2114
|
-
* Defines type name decorator.
|
|
2115
|
-
* @param targetType class.
|
|
2116
|
-
* @param typeName Name of the type.
|
|
2117
|
-
*/
|
|
2118
|
-
function defineReflectTypeName(targetType, typeName) {
|
|
2119
|
-
if (!Reflect.hasOwnMetadata(reflectTypeNameKey, targetType)) {
|
|
2120
|
-
Reflect.defineMetadata(reflectTypeNameKey, typeName, targetType);
|
|
2121
|
-
}
|
|
2122
|
-
}
|
|
2123
|
-
/**
|
|
2124
|
-
* Defines enum name decorator.
|
|
2125
|
-
* @param targetType enum object.
|
|
2126
|
-
* @param enumName Name of the enum.
|
|
2127
|
-
*/
|
|
2128
|
-
function defineReflectEnumName(targetType, enumName) {
|
|
2129
|
-
if (!Reflect.hasOwnMetadata(reflectEnumNameKey, targetType)) {
|
|
2130
|
-
Reflect.defineMetadata(reflectEnumNameKey, enumName, targetType);
|
|
2131
|
-
}
|
|
2132
|
-
}
|
|
2133
|
-
/**
|
|
2134
|
-
* Gets type name from reflect metadata.
|
|
2135
|
-
* @param type Class.
|
|
2136
|
-
*/
|
|
2137
|
-
function findReflectTypeName(type) {
|
|
2138
|
-
if (!type) {
|
|
2139
|
-
return null;
|
|
2140
|
-
}
|
|
2141
|
-
const typeName = Reflect.getMetadata(reflectTypeNameKey, type);
|
|
2142
|
-
if (typeName) {
|
|
2143
|
-
return typeName;
|
|
2144
|
-
}
|
|
2145
|
-
LoggerService.get().debug('WARNING: Reflect metadata could not be found for type, you might experience some issues in production build.', type?.name);
|
|
2146
|
-
return type.name;
|
|
2147
|
-
}
|
|
2148
|
-
/**
|
|
2149
|
-
* Gets type name from either decorator or reflect metadata.
|
|
2150
|
-
* @param type Class.
|
|
2151
|
-
*/
|
|
2152
|
-
function reflectTypeNameExists(type) {
|
|
2153
|
-
return Reflect.hasOwnMetadata(reflectTypeNameKey, type);
|
|
2154
|
-
}
|
|
2155
|
-
/**
|
|
2156
|
-
* Gets enum name from either decorator or reflect metadata.
|
|
2157
|
-
* @param enumType Class.
|
|
2158
|
-
*/
|
|
2159
|
-
function findReflectEnumName(enumType) {
|
|
2160
|
-
const enumName = Reflect.getMetadata(reflectEnumNameKey, enumType);
|
|
2161
|
-
if (enumName) {
|
|
2162
|
-
return enumName;
|
|
2163
|
-
}
|
|
2164
|
-
LoggerService.get().debug(`WARNING: Reflect metadata could not be found for enum ${typeof enumType === 'object' ? Object.keys(enumType) : enumType}`, {
|
|
2165
|
-
name: 'TypeUtilsError',
|
|
2166
|
-
enumType: enumType
|
|
2167
|
-
});
|
|
2168
|
-
return null;
|
|
2169
|
-
}
|
|
2170
|
-
|
|
2171
|
-
function getI18nClassNameAsync(translate, classType, singular) {
|
|
2172
|
-
const typeName = findReflectTypeName(classType);
|
|
2173
|
-
return getI18nTypeNameAsync(translate, typeName ?? '', singular);
|
|
2174
|
-
}
|
|
2175
|
-
function getI18nClassName(translate, classType, singular) {
|
|
2176
|
-
const typeName = findReflectTypeName(classType);
|
|
2177
|
-
return getI18nTypeName(translate, typeName ?? '', singular);
|
|
2178
|
-
}
|
|
2179
2088
|
function getI18nTypeNameAsync(translate, typeName, singular) {
|
|
2180
2089
|
const keys = getI18nTypeNameKeys(typeName, singular);
|
|
2181
2090
|
return getI18nAsync(translate, undefined, ...keys);
|
|
@@ -2184,46 +2093,22 @@ function getI18nTypeName(translate, typeName, singular) {
|
|
|
2184
2093
|
const keys = getI18nTypeNameKeys(typeName, singular);
|
|
2185
2094
|
return getI18n(translate, undefined, ...keys);
|
|
2186
2095
|
}
|
|
2187
|
-
function getI18nClassTabKey(classType, tab) {
|
|
2188
|
-
const typeName = findReflectTypeName(classType);
|
|
2189
|
-
return getI18nTypeTabKey(typeName ?? '', tab);
|
|
2190
|
-
}
|
|
2191
2096
|
function getI18nTypeTabKey(typeName, tab) {
|
|
2192
2097
|
return getI18nTypeKeyBasePath(typeName, 'tabs', tab);
|
|
2193
2098
|
}
|
|
2194
|
-
function getI18nClassGroupKey(classType, group) {
|
|
2195
|
-
const typeName = findReflectTypeName(classType);
|
|
2196
|
-
return getI18nTypeGroupKey(typeName ?? '', group);
|
|
2197
|
-
}
|
|
2198
2099
|
function getI18nTypeGroupKey(typeName, group) {
|
|
2199
2100
|
return getI18nTypeKeyBasePath(typeName, 'groups', group);
|
|
2200
2101
|
}
|
|
2201
|
-
function getI18nClassPropertyKey(classType, property) {
|
|
2202
|
-
const typeName = findReflectTypeName(classType);
|
|
2203
|
-
return getI18nTypePropertyKey(typeName ?? '', property);
|
|
2204
|
-
}
|
|
2205
2102
|
function getI18nTypePropertyKey(typeName, property) {
|
|
2206
2103
|
return getI18nTypeKeyBasePath(typeName, 'properties', property);
|
|
2207
2104
|
}
|
|
2208
|
-
function getI18nClassKeyBasePath(classType, ...path) {
|
|
2209
|
-
const typeName = findReflectTypeName(classType);
|
|
2210
|
-
return getI18nTypeKeyBasePath(typeName ?? '', ...path);
|
|
2211
|
-
}
|
|
2212
2105
|
function getI18nTypeKeyBasePath(typeName, ...path) {
|
|
2213
2106
|
return `${typeName.length ? `${typeName}.` : ''}${path.join('.')}`;
|
|
2214
2107
|
}
|
|
2215
|
-
function getI18nClassParams(translate, classType, item, params = {}) {
|
|
2216
|
-
const typeName = findReflectTypeName(classType);
|
|
2217
|
-
return getI18nTypeParams(translate, typeName ?? undefined, item, params);
|
|
2218
|
-
}
|
|
2219
2108
|
function getI18nTypeParams(translate, typeName, item, params = {}) {
|
|
2220
2109
|
const i18nTypeName = typeName ? getI18nTypeName(translate, typeName, true) : null;
|
|
2221
2110
|
return populateI18nTypeParams(i18nTypeName ?? undefined, item, params);
|
|
2222
2111
|
}
|
|
2223
|
-
function getI18nClassParamsAsync(translate, classType, item, params = {}) {
|
|
2224
|
-
const typeName = findReflectTypeName(classType);
|
|
2225
|
-
return getI18nTypeParamsAsync(translate, typeName ?? undefined, item, params);
|
|
2226
|
-
}
|
|
2227
2112
|
function getI18nTypeParamsAsync(translate, typeName, item, params = {}) {
|
|
2228
2113
|
return (typeName ? getI18nTypeNameAsync(translate, typeName, true) : of(null)).pipe(map(i18nTypeName => populateI18nTypeParams(i18nTypeName ?? undefined, item, params)));
|
|
2229
2114
|
}
|
|
@@ -2295,10 +2180,10 @@ class BooleanPipe {
|
|
|
2295
2180
|
return value;
|
|
2296
2181
|
}
|
|
2297
2182
|
}
|
|
2298
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2299
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
2183
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: BooleanPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
2184
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.0.5", ngImport: i0, type: BooleanPipe, isStandalone: true, name: "mngBoolean" }); }
|
|
2300
2185
|
}
|
|
2301
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2186
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: BooleanPipe, decorators: [{
|
|
2302
2187
|
type: Pipe,
|
|
2303
2188
|
args: [{
|
|
2304
2189
|
standalone: true,
|
|
@@ -2316,10 +2201,10 @@ class ClassMapPipe {
|
|
|
2316
2201
|
return className ?? '';
|
|
2317
2202
|
}
|
|
2318
2203
|
}
|
|
2319
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2320
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
2204
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: ClassMapPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
2205
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.0.5", ngImport: i0, type: ClassMapPipe, isStandalone: true, name: "mngClassMap" }); }
|
|
2321
2206
|
}
|
|
2322
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2207
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: ClassMapPipe, decorators: [{
|
|
2323
2208
|
type: Pipe,
|
|
2324
2209
|
args: [{
|
|
2325
2210
|
standalone: true,
|
|
@@ -2328,6 +2213,66 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
|
|
|
2328
2213
|
}]
|
|
2329
2214
|
}] });
|
|
2330
2215
|
|
|
2216
|
+
const reflectTypeNameKey = 'typeName';
|
|
2217
|
+
const reflectEnumNameKey = 'enumName';
|
|
2218
|
+
/**
|
|
2219
|
+
* Defines type name decorator.
|
|
2220
|
+
* @param targetType class.
|
|
2221
|
+
* @param typeName Name of the type.
|
|
2222
|
+
*/
|
|
2223
|
+
function defineReflectTypeName(targetType, typeName) {
|
|
2224
|
+
if (!Reflect.hasOwnMetadata(reflectTypeNameKey, targetType)) {
|
|
2225
|
+
Reflect.defineMetadata(reflectTypeNameKey, typeName, targetType);
|
|
2226
|
+
}
|
|
2227
|
+
}
|
|
2228
|
+
/**
|
|
2229
|
+
* Defines enum name decorator.
|
|
2230
|
+
* @param targetType enum object.
|
|
2231
|
+
* @param enumName Name of the enum.
|
|
2232
|
+
*/
|
|
2233
|
+
function defineReflectEnumName(targetType, enumName) {
|
|
2234
|
+
if (!Reflect.hasOwnMetadata(reflectEnumNameKey, targetType)) {
|
|
2235
|
+
Reflect.defineMetadata(reflectEnumNameKey, enumName, targetType);
|
|
2236
|
+
}
|
|
2237
|
+
}
|
|
2238
|
+
/**
|
|
2239
|
+
* Gets type name from reflect metadata.
|
|
2240
|
+
* @param type Class.
|
|
2241
|
+
*/
|
|
2242
|
+
function findReflectTypeName(type) {
|
|
2243
|
+
if (!type) {
|
|
2244
|
+
return null;
|
|
2245
|
+
}
|
|
2246
|
+
const typeName = Reflect.getMetadata(reflectTypeNameKey, type);
|
|
2247
|
+
if (typeName) {
|
|
2248
|
+
return typeName;
|
|
2249
|
+
}
|
|
2250
|
+
LoggerService.get().debug('WARNING: Reflect metadata could not be found for type, you might experience some issues in production build.', type?.name);
|
|
2251
|
+
return type.name;
|
|
2252
|
+
}
|
|
2253
|
+
/**
|
|
2254
|
+
* Gets type name from either decorator or reflect metadata.
|
|
2255
|
+
* @param type Class.
|
|
2256
|
+
*/
|
|
2257
|
+
function reflectTypeNameExists(type) {
|
|
2258
|
+
return Reflect.hasOwnMetadata(reflectTypeNameKey, type);
|
|
2259
|
+
}
|
|
2260
|
+
/**
|
|
2261
|
+
* Gets enum name from either decorator or reflect metadata.
|
|
2262
|
+
* @param enumType Class.
|
|
2263
|
+
*/
|
|
2264
|
+
function findReflectEnumName(enumType) {
|
|
2265
|
+
const enumName = Reflect.getMetadata(reflectEnumNameKey, enumType);
|
|
2266
|
+
if (enumName) {
|
|
2267
|
+
return enumName;
|
|
2268
|
+
}
|
|
2269
|
+
LoggerService.get().debug(`WARNING: Reflect metadata could not be found for enum ${typeof enumType === 'object' ? Object.keys(enumType) : enumType}`, {
|
|
2270
|
+
name: 'TypeUtilsError',
|
|
2271
|
+
enumType: enumType
|
|
2272
|
+
});
|
|
2273
|
+
return null;
|
|
2274
|
+
}
|
|
2275
|
+
|
|
2331
2276
|
class EnumPipe {
|
|
2332
2277
|
transform(value, enumDesc, i18nPath) {
|
|
2333
2278
|
if (!value || (typeof value !== 'number' && typeof value !== 'string')) {
|
|
@@ -2335,14 +2280,14 @@ class EnumPipe {
|
|
|
2335
2280
|
}
|
|
2336
2281
|
const enumConstantName = !enumDesc || enumDesc.nameAsValue ? value : getEnumConstantNameFromObject(enumDesc.type, value) ?? value;
|
|
2337
2282
|
if (typeof i18nPath === 'undefined' && enumDesc) {
|
|
2338
|
-
i18nPath = enumDesc.i18nBaseKey
|
|
2283
|
+
i18nPath = enumDesc.i18nBaseKey ?? findReflectEnumName(enumDesc.type);
|
|
2339
2284
|
}
|
|
2340
2285
|
return i18nPath ? `${i18nPath}.${enumConstantName}` : enumConstantName;
|
|
2341
2286
|
}
|
|
2342
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2343
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
2287
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: EnumPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
2288
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.0.5", ngImport: i0, type: EnumPipe, isStandalone: true, name: "mngEnum" }); }
|
|
2344
2289
|
}
|
|
2345
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2290
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: EnumPipe, decorators: [{
|
|
2346
2291
|
type: Pipe,
|
|
2347
2292
|
args: [{
|
|
2348
2293
|
standalone: true,
|
|
@@ -2361,10 +2306,10 @@ class JsonPathPipe {
|
|
|
2361
2306
|
transform(value, path = '') {
|
|
2362
2307
|
return getObjectPropertyByPath(value, path);
|
|
2363
2308
|
}
|
|
2364
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2365
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
2309
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: JsonPathPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
2310
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.0.5", ngImport: i0, type: JsonPathPipe, isStandalone: true, name: "mngJsonPath" }); }
|
|
2366
2311
|
}
|
|
2367
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2312
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: JsonPathPipe, decorators: [{
|
|
2368
2313
|
type: Pipe,
|
|
2369
2314
|
args: [{
|
|
2370
2315
|
standalone: true,
|
|
@@ -2391,10 +2336,10 @@ class EnumeratePipe {
|
|
|
2391
2336
|
})
|
|
2392
2337
|
.join(valueSeparator);
|
|
2393
2338
|
}
|
|
2394
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2395
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
2339
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: EnumeratePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
2340
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.0.5", ngImport: i0, type: EnumeratePipe, isStandalone: true, name: "mngEnumerate" }); }
|
|
2396
2341
|
}
|
|
2397
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2342
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: EnumeratePipe, decorators: [{
|
|
2398
2343
|
type: Pipe,
|
|
2399
2344
|
args: [{
|
|
2400
2345
|
standalone: true,
|
|
@@ -2436,10 +2381,10 @@ class EnumerateAsyncPipe {
|
|
|
2436
2381
|
}))));
|
|
2437
2382
|
}), map(i => i.join(valueSeparator)));
|
|
2438
2383
|
}
|
|
2439
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2440
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
2384
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: EnumerateAsyncPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
2385
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.0.5", ngImport: i0, type: EnumerateAsyncPipe, isStandalone: true, name: "mngEnumerateAsync" }); }
|
|
2441
2386
|
}
|
|
2442
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2387
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: EnumerateAsyncPipe, decorators: [{
|
|
2443
2388
|
type: Pipe,
|
|
2444
2389
|
args: [{
|
|
2445
2390
|
standalone: true,
|
|
@@ -2455,10 +2400,10 @@ class GetterPipe {
|
|
|
2455
2400
|
}
|
|
2456
2401
|
return value;
|
|
2457
2402
|
}
|
|
2458
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2459
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
2403
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: GetterPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
2404
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.0.5", ngImport: i0, type: GetterPipe, isStandalone: true, name: "mngGetter" }); }
|
|
2460
2405
|
}
|
|
2461
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2406
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: GetterPipe, decorators: [{
|
|
2462
2407
|
type: Pipe,
|
|
2463
2408
|
args: [{
|
|
2464
2409
|
standalone: true,
|
|
@@ -2471,10 +2416,10 @@ class I18nPropertyPipe {
|
|
|
2471
2416
|
transform(property, model) {
|
|
2472
2417
|
return getI18nTypePropertyKey(model.i18nBaseKey, property);
|
|
2473
2418
|
}
|
|
2474
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2475
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
2419
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: I18nPropertyPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
2420
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.0.5", ngImport: i0, type: I18nPropertyPipe, isStandalone: true, name: "mngI18nProperty" }); }
|
|
2476
2421
|
}
|
|
2477
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2422
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: I18nPropertyPipe, decorators: [{
|
|
2478
2423
|
type: Pipe,
|
|
2479
2424
|
args: [{
|
|
2480
2425
|
standalone: true,
|
|
@@ -2553,10 +2498,10 @@ class ParametrizePipe {
|
|
|
2553
2498
|
parametrizeString(s, params) {
|
|
2554
2499
|
return s.replace(/{{\s?([^{}\s]*)\s?}}/g, (subs, key) => this.jsonPath.transform(params, key) ?? subs);
|
|
2555
2500
|
}
|
|
2556
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2557
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
2501
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: ParametrizePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
2502
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.0.5", ngImport: i0, type: ParametrizePipe, isStandalone: true, name: "mngParametrize" }); }
|
|
2558
2503
|
}
|
|
2559
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2504
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: ParametrizePipe, decorators: [{
|
|
2560
2505
|
type: Pipe,
|
|
2561
2506
|
args: [{
|
|
2562
2507
|
standalone: true,
|
|
@@ -2575,10 +2520,10 @@ class TemplatePipe {
|
|
|
2575
2520
|
}
|
|
2576
2521
|
return value;
|
|
2577
2522
|
}
|
|
2578
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2579
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
2523
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: TemplatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
2524
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.0.5", ngImport: i0, type: TemplatePipe, isStandalone: true, name: "template" }); }
|
|
2580
2525
|
}
|
|
2581
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2526
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: TemplatePipe, decorators: [{
|
|
2582
2527
|
type: Pipe,
|
|
2583
2528
|
args: [{
|
|
2584
2529
|
standalone: true,
|
|
@@ -2840,10 +2785,10 @@ class PermissionService {
|
|
|
2840
2785
|
}
|
|
2841
2786
|
return serviceInstance.isPermitted(route, this.router.routerState.snapshot, actionCtx);
|
|
2842
2787
|
}
|
|
2843
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2844
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2788
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: PermissionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2789
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: PermissionService }); }
|
|
2845
2790
|
}
|
|
2846
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2791
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: PermissionService, decorators: [{
|
|
2847
2792
|
type: Injectable
|
|
2848
2793
|
}] });
|
|
2849
2794
|
|
|
@@ -3512,6 +3457,20 @@ class CommonsConfigurationService {
|
|
|
3512
3457
|
getConfigValue(key) {
|
|
3513
3458
|
return this.configuration[key] ? this.configuration[key] : null;
|
|
3514
3459
|
}
|
|
3460
|
+
/**
|
|
3461
|
+
* Gets the configuration value for the given key. If the value is not found,
|
|
3462
|
+
* it throws an error with a custom error message.
|
|
3463
|
+
*
|
|
3464
|
+
* @param {string} key - The configuration key.
|
|
3465
|
+
* @param {string} [errorMessage] - Custom error message to be thrown if the value is not found.
|
|
3466
|
+
*
|
|
3467
|
+
* @returns {T} - The configuration value.
|
|
3468
|
+
*
|
|
3469
|
+
* @throws {CommonsInternalError} - If the value is not found or a custom error message is provided.
|
|
3470
|
+
*/
|
|
3471
|
+
getConfigValueOrThrow(key, errorMessage) {
|
|
3472
|
+
return this.getConfigValue(key) ?? throwError(errorMessage ?? `Missing configuration value for '${key}'!`, { name: 'CommonsMissingConfigError' });
|
|
3473
|
+
}
|
|
3515
3474
|
/**
|
|
3516
3475
|
* Has configuration for key.
|
|
3517
3476
|
* @param key Configuration key.
|
|
@@ -3718,10 +3677,10 @@ class CommonsRouterService {
|
|
|
3718
3677
|
getModulePathFromRouterLink(path) {
|
|
3719
3678
|
return ('/' + (Array.isArray(path) ? path.join('/') : path)).replace(/\/\//g, '/');
|
|
3720
3679
|
}
|
|
3721
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3722
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3680
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: CommonsRouterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3681
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: CommonsRouterService }); }
|
|
3723
3682
|
}
|
|
3724
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3683
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: CommonsRouterService, decorators: [{
|
|
3725
3684
|
type: Injectable
|
|
3726
3685
|
}], ctorParameters: () => [] });
|
|
3727
3686
|
|
|
@@ -3814,13 +3773,13 @@ class CommonsInitService {
|
|
|
3814
3773
|
this.commonsInitServiceEvents.next(CommonsInitEventEnum.CommonsInitError);
|
|
3815
3774
|
this.commonsInitServiceEvents.complete();
|
|
3816
3775
|
this.isInitializedSubject.next(false);
|
|
3817
|
-
return throwError(() => err);
|
|
3776
|
+
return throwError$1(() => err);
|
|
3818
3777
|
}));
|
|
3819
3778
|
}
|
|
3820
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3821
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3779
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: CommonsInitService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3780
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: CommonsInitService }); }
|
|
3822
3781
|
}
|
|
3823
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3782
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: CommonsInitService, decorators: [{
|
|
3824
3783
|
type: Injectable
|
|
3825
3784
|
}] });
|
|
3826
3785
|
|
|
@@ -3844,10 +3803,10 @@ class LocalStorageService {
|
|
|
3844
3803
|
removeItem(type, key) {
|
|
3845
3804
|
localStorage.removeItem(this.buildLocalStorageKey(type, key));
|
|
3846
3805
|
}
|
|
3847
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3848
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3806
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: LocalStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3807
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: LocalStorageService }); }
|
|
3849
3808
|
}
|
|
3850
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3809
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.5", ngImport: i0, type: LocalStorageService, decorators: [{
|
|
3851
3810
|
type: Injectable
|
|
3852
3811
|
}] });
|
|
3853
3812
|
|
|
@@ -3948,5 +3907,5 @@ function provideCommons(config, ...features) {
|
|
|
3948
3907
|
* Generated bundle index. Do not edit.
|
|
3949
3908
|
*/
|
|
3950
3909
|
|
|
3951
|
-
export { ACommonsErrorBase, APermissions, BROWSER_STORAGE_IT, BooleanPipe, COMMONS_INITIALIZER_IT, COMMONS_MODULE_CONFIG_IT, ClassMapPipe, CommonsConfigurationService, CommonsErrorHandler, CommonsFeatureTypeEnum, CommonsHttpError, CommonsInitEventEnum, CommonsInitService, CommonsInternalError, CommonsRouterService, CommonsService, ComponentDirective, DataProvider, DataProviderInst,
|
|
3910
|
+
export { ACommonsErrorBase, APermissions, BROWSER_STORAGE_IT, BooleanPipe, COMMONS_INITIALIZER_IT, COMMONS_MODULE_CONFIG_IT, ClassMapPipe, CommonsConfigurationService, CommonsErrorHandler, CommonsFeatureTypeEnum, CommonsHttpError, CommonsInitEventEnum, CommonsInitService, CommonsInternalError, CommonsRouterService, CommonsService, ComponentDirective, DataProvider, DataProviderInst, EnumName, EnumPipe, EnumerateAsyncPipe, EnumeratePipe, ErrorPageComponent, FilterMatchMode, GetterPipe, I18nPropertyPipe, JsonPathPipe, LOG_PUBLISHERS, LocalStorageService, LogLevelEnum, LogPublisherConsoleService, LoggerService, NotFoundPageComponent, NotificationWrapperComponent, ParametrizePipe, PermissionService, PermissionTypeEnum, Permissions, RouteBuilder, RoutesBuilder, StyleLevelEnum, StyleSizeEnum, Styles, TemplateDirective, TemplatePipe, TypeName, TypeRegistry, adjustRouteMenuLazyChildrenRouterLinks, angularDateFormatHasSeconds, angularDateFormatHasTime, appendRoutePathToBasePath, boolean$Attribute, booleanOrUndefinedAttribute, commonsActionErrorContextToString, commonsErrorToString, commonsInitializerProvider, copyDataListParams, createLazyChildrenRoute, createLazyRoute, createRoute, createRouteRedirect, createRoutes, dataListParamsFilterToUrlQuery, dataListParamsFilterValueToUrlString, dataListParamsFiltersToUrlQuery, dataListParamsSortToUrlQuery, dataListParamsToUrlQuery, dataProviderBase, dataProviderFromClass, dataProviderWithService, dateToIsoString, defineReflectEnumName, defineReflectTypeName, doesUrlMatchRouterLink, errorCauseToString, errorToString, escapeHtml, escapeHtmlAny, findReflectEnumName, findReflectTypeName, findTemplateByName, flattenObjectKeys, fromAngularDateFormatToPrime, fromEnumConstantsAsValueArray, fromEnumValuesAsValueArray, fromSubscribeError, fromTableLoadToDataListParams, fromUrlQueryToDataListParams, getEnumConstantName, getEnumConstantNameFromObject, getEnumConstantNames, getEnumConstantNamesFromObject, getEnumConstantValuesAsNumber, getEnumConstantValuesAsString, getEnumerationI18nBaseKey, getErrorLogLevel, getErrorName, getHttpErrorResponse, getHttpErrorResponseStatus, getI18n, getI18nAsync, getI18nErrorParams, getI18nForError, getI18nTypeGroupKey, getI18nTypeKeyBasePath, getI18nTypeName, getI18nTypeNameAsync, getI18nTypeParams, getI18nTypeParamsAsync, getI18nTypePropertyKey, getI18nTypeTabKey, getObjectGetters, getObjectProperties, getObjectPropertyByPath, httpErrorResponseToString, isHttpErrorResponse, isPermitted, isRbacPermitted, itemIdToDefined, itemIdToNumber, itemIdToString, mapToDataList, mergeDataListParamsWithDefaults, number$Attribute, objectDeepCopy, objectDeepMerge, permissionGuard, populateI18nParams, populateI18nTypeParams, provideCommons, reflectEnumNameKey, reflectTypeNameExists, reflectTypeNameKey, removeRouteEmptyPathSegments, selectEnumerationI18n, selectI18n, stringify, throwError, toEnumerationI18nEnumerate, toObservable, toastMessage, valueToDefined };
|
|
3952
3911
|
//# sourceMappingURL=mediusinc-mng-commons-core.mjs.map
|