oip-common 0.0.13 → 0.0.15
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 +24 -26
- package/assets/i18n/en.json +64 -0
- package/assets/i18n/notfound.en.json +8 -0
- package/assets/i18n/notfound.ru.json +8 -0
- package/assets/i18n/ru.json +89 -0
- package/fesm2022/oip-common.mjs +335 -313
- package/fesm2022/oip-common.mjs.map +1 -1
- package/index.d.ts +103 -33
- package/package.json +1 -1
package/fesm2022/oip-common.mjs
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Injectable, inject, ChangeDetectorRef, signal, effect, Component, Input, computed, PLATFORM_ID, HostBinding, EventEmitter, Output, ViewChild, Renderer2, Pipe } from '@angular/core';
|
|
3
|
-
import * as i2$
|
|
3
|
+
import * as i2$4 from 'primeng/api';
|
|
4
4
|
import { MessageService, ConfirmationService, PrimeIcons, SharedModule } from 'primeng/api';
|
|
5
5
|
import { HttpErrorResponse, HttpClient as HttpClient$1, HttpHeaders } from '@angular/common/http';
|
|
6
|
-
import
|
|
6
|
+
import * as i2$2 from '@ngx-translate/core';
|
|
7
|
+
import { TranslateService, TranslatePipe, TranslateModule } from '@ngx-translate/core';
|
|
7
8
|
import * as i1$3 from '@angular/router';
|
|
8
9
|
import { ActivatedRoute, Router, RouterModule, NavigationEnd, RouterLinkActive, RouterLink } from '@angular/router';
|
|
9
10
|
import { lastValueFrom, BehaviorSubject, Subject, filter as filter$1, combineLatest, of, map as map$1, Observable } from 'rxjs';
|
|
@@ -50,7 +51,7 @@ import { ImageModule } from 'primeng/image';
|
|
|
50
51
|
import { Fluid } from 'primeng/fluid';
|
|
51
52
|
import * as i1$6 from 'primeng/table';
|
|
52
53
|
import { TableModule } from 'primeng/table';
|
|
53
|
-
import * as i2$
|
|
54
|
+
import * as i2$3 from 'primeng/toggleswitch';
|
|
54
55
|
import { ToggleSwitchModule } from 'primeng/toggleswitch';
|
|
55
56
|
import { TagModule, Tag } from 'primeng/tag';
|
|
56
57
|
import { TextareaModule } from 'primeng/textarea';
|
|
@@ -722,10 +723,10 @@ class LayoutService {
|
|
|
722
723
|
this.dateTimeFormat = computed(() => `${this.layoutConfig().dateFormat} ${this.layoutConfig().timeFormat}`, ...(ngDevMode ? [{ debugName: "dateTimeFormat" }] : []));
|
|
723
724
|
this.monthFormat = computed(() => {
|
|
724
725
|
const reDay = /d+/i;
|
|
725
|
-
const
|
|
726
|
+
const reDelimiter = /^[^\w]|[^\w]$|([^\w])\1+/;
|
|
726
727
|
const ngDateFormat = convertToPrimeNgDateFormat(this.layoutConfig().dateFormat);
|
|
727
728
|
const ngDate = ngDateFormat.replace(reDay, '');
|
|
728
|
-
const dateGroups = ngDate.match(
|
|
729
|
+
const dateGroups = ngDate.match(reDelimiter);
|
|
729
730
|
if (Array.isArray(dateGroups) && dateGroups.length > 1) {
|
|
730
731
|
return dateGroups[1] !== undefined
|
|
731
732
|
? ngDate.replace(dateGroups[0], '')
|
|
@@ -1466,15 +1467,6 @@ class KeycloakSecurityService extends OidcSecurityService {
|
|
|
1466
1467
|
this.auth();
|
|
1467
1468
|
});
|
|
1468
1469
|
}
|
|
1469
|
-
refreshToken() {
|
|
1470
|
-
throw new Error("Method not implemented.");
|
|
1471
|
-
}
|
|
1472
|
-
hasRole(role) {
|
|
1473
|
-
throw new Error("Method not implemented.");
|
|
1474
|
-
}
|
|
1475
|
-
getUserRoles() {
|
|
1476
|
-
throw new Error("Method not implemented.");
|
|
1477
|
-
}
|
|
1478
1470
|
getCurrentUser() {
|
|
1479
1471
|
return this.userData;
|
|
1480
1472
|
}
|
|
@@ -1630,7 +1622,7 @@ class AppTopbar {
|
|
|
1630
1622
|
</button>
|
|
1631
1623
|
<a class="layout-topbar-logo" id="oip-app-topbar-logo-link" routerLink="">
|
|
1632
1624
|
<logo [height]="36" [width]="36"></logo>
|
|
1633
|
-
<span>
|
|
1625
|
+
<span>{{ 'app-info.title' | translate }}</span>
|
|
1634
1626
|
</a>
|
|
1635
1627
|
</div>
|
|
1636
1628
|
|
|
@@ -1717,7 +1709,7 @@ class AppTopbar {
|
|
|
1717
1709
|
</div>
|
|
1718
1710
|
</div>
|
|
1719
1711
|
</div>
|
|
1720
|
-
</div>`, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$3.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: StyleClassModule }, { kind: "directive", type: i4.StyleClass, selector: "[pStyleClass]", inputs: ["pStyleClass", "enterFromClass", "enterActiveClass", "enterToClass", "leaveFromClass", "leaveActiveClass", "leaveToClass", "hideOnOutsideClick", "toggleClass", "hideOnEscape", "hideOnResize", "resizeSelector"] }, { kind: "component", type: AppConfiguratorComponent, selector: "app-configurator" }, { kind: "component", type: LogoComponent, selector: "logo", inputs: ["width", "height"] }, { kind: "component", type: Tabs, selector: "p-tabs", inputs: ["value", "scrollable", "lazy", "selectOnFocus", "showNavigators", "tabindex"], outputs: ["valueChange"] }, { kind: "component", type: TabList, selector: "p-tablist" }, { kind: "component", type: Tab, selector: "p-tab", inputs: ["value", "disabled"], outputs: ["valueChange"] }, { kind: "ngmodule", type: AvatarModule }, { kind: "component", type: i5$1.Avatar, selector: "p-avatar", inputs: ["label", "icon", "image", "size", "shape", "styleClass", "ariaLabel", "ariaLabelledBy"], outputs: ["onImageError"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i1$1.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "buttonProps", "autofocus", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }] }); }
|
|
1712
|
+
</div>`, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$3.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: StyleClassModule }, { kind: "directive", type: i4.StyleClass, selector: "[pStyleClass]", inputs: ["pStyleClass", "enterFromClass", "enterActiveClass", "enterToClass", "leaveFromClass", "leaveActiveClass", "leaveToClass", "hideOnOutsideClick", "toggleClass", "hideOnEscape", "hideOnResize", "resizeSelector"] }, { kind: "component", type: AppConfiguratorComponent, selector: "app-configurator" }, { kind: "component", type: LogoComponent, selector: "logo", inputs: ["width", "height"] }, { kind: "component", type: Tabs, selector: "p-tabs", inputs: ["value", "scrollable", "lazy", "selectOnFocus", "showNavigators", "tabindex"], outputs: ["valueChange"] }, { kind: "component", type: TabList, selector: "p-tablist" }, { kind: "component", type: Tab, selector: "p-tab", inputs: ["value", "disabled"], outputs: ["valueChange"] }, { kind: "ngmodule", type: AvatarModule }, { kind: "component", type: i5$1.Avatar, selector: "p-avatar", inputs: ["label", "icon", "image", "size", "shape", "styleClass", "ariaLabel", "ariaLabelledBy"], outputs: ["onImageError"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i1$1.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "buttonProps", "autofocus", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
|
|
1721
1713
|
}
|
|
1722
1714
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: AppTopbar, decorators: [{
|
|
1723
1715
|
type: Component,
|
|
@@ -1731,7 +1723,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImpor
|
|
|
1731
1723
|
TabList,
|
|
1732
1724
|
Tab,
|
|
1733
1725
|
AvatarModule,
|
|
1734
|
-
ButtonModule
|
|
1726
|
+
ButtonModule,
|
|
1727
|
+
TranslatePipe
|
|
1735
1728
|
], template: `
|
|
1736
1729
|
<div class="layout-topbar">
|
|
1737
1730
|
<div class="layout-topbar-logo-container">
|
|
@@ -1740,7 +1733,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImpor
|
|
|
1740
1733
|
</button>
|
|
1741
1734
|
<a class="layout-topbar-logo" id="oip-app-topbar-logo-link" routerLink="">
|
|
1742
1735
|
<logo [height]="36" [width]="36"></logo>
|
|
1743
|
-
<span>
|
|
1736
|
+
<span>{{ 'app-info.title' | translate }}</span>
|
|
1744
1737
|
</a>
|
|
1745
1738
|
</div>
|
|
1746
1739
|
|
|
@@ -1831,14 +1824,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImpor
|
|
|
1831
1824
|
}], ctorParameters: () => [{ type: LayoutService }] });
|
|
1832
1825
|
|
|
1833
1826
|
class FooterComponent {
|
|
1834
|
-
constructor() {
|
|
1827
|
+
constructor() {
|
|
1828
|
+
}
|
|
1835
1829
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: FooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1836
1830
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.2", type: FooterComponent, isStandalone: true, selector: "app-footer", ngImport: i0, template: `
|
|
1837
1831
|
<div class="layout-footer">
|
|
1838
|
-
<
|
|
1839
|
-
|
|
1832
|
+
<div class="flex justify-center flex-1">
|
|
1833
|
+
<logo class="mr-2 -my-0.5" [height]="18" [width]="18"></logo>
|
|
1834
|
+
<span class="font-medium">{{ 'app-info.footer' | translate }}</span>
|
|
1835
|
+
</div>
|
|
1836
|
+
<p class="mr-auto">{{ 'app-info.version' | translate }}</p>
|
|
1840
1837
|
</div>
|
|
1841
|
-
`, isInline: true, dependencies: [{ kind: "component", type: LogoComponent, selector: "logo", inputs: ["width", "height"] }] }); }
|
|
1838
|
+
`, isInline: true, dependencies: [{ kind: "component", type: LogoComponent, selector: "logo", inputs: ["width", "height"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
|
|
1842
1839
|
}
|
|
1843
1840
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: FooterComponent, decorators: [{
|
|
1844
1841
|
type: Component,
|
|
@@ -1846,12 +1843,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImpor
|
|
|
1846
1843
|
selector: 'app-footer',
|
|
1847
1844
|
template: `
|
|
1848
1845
|
<div class="layout-footer">
|
|
1849
|
-
<
|
|
1850
|
-
|
|
1846
|
+
<div class="flex justify-center flex-1">
|
|
1847
|
+
<logo class="mr-2 -my-0.5" [height]="18" [width]="18"></logo>
|
|
1848
|
+
<span class="font-medium">{{ 'app-info.footer' | translate }}</span>
|
|
1849
|
+
</div>
|
|
1850
|
+
<p class="mr-auto">{{ 'app-info.version' | translate }}</p>
|
|
1851
1851
|
</div>
|
|
1852
1852
|
`,
|
|
1853
1853
|
standalone: true,
|
|
1854
|
-
imports: [LogoComponent]
|
|
1854
|
+
imports: [LogoComponent, TranslatePipe]
|
|
1855
1855
|
}]
|
|
1856
1856
|
}], ctorParameters: () => [] });
|
|
1857
1857
|
|
|
@@ -2334,12 +2334,12 @@ class MenuItemComponent {
|
|
|
2334
2334
|
});
|
|
2335
2335
|
}
|
|
2336
2336
|
editClick(event) {
|
|
2337
|
-
this.menuItemEditDialogComponent.showDialog();
|
|
2337
|
+
this.menuItemEditDialogComponent.showDialog().then();
|
|
2338
2338
|
}
|
|
2339
2339
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: MenuItemComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$3.Router }, { token: MenuService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2340
2340
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.2", type: MenuItemComponent, isStandalone: true, selector: "[app-menuitem]", inputs: { item: "item", index: "index", root: "root", parentKey: "parentKey", menuItemCreateDialogComponent: "menuItemCreateDialogComponent", menuItemEditDialogComponent: "menuItemEditDialogComponent", contextMenu: "contextMenu" }, host: { properties: { "class.layout-root-menuitem": "this.root", "class.active-menuitem": "this.activeClass" } }, providers: [ConfirmationService], ngImport: i0, template: `
|
|
2341
2341
|
<ng-container>
|
|
2342
|
-
<p-confirm-dialog
|
|
2342
|
+
<p-confirm-dialog/>
|
|
2343
2343
|
<div
|
|
2344
2344
|
*ngIf="root && item.visible !== false"
|
|
2345
2345
|
class="layout-menuitem-root-text"
|
|
@@ -2424,7 +2424,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImpor
|
|
|
2424
2424
|
selector: '[app-menuitem]',
|
|
2425
2425
|
template: `
|
|
2426
2426
|
<ng-container>
|
|
2427
|
-
<p-confirm-dialog
|
|
2427
|
+
<p-confirm-dialog/>
|
|
2428
2428
|
<div
|
|
2429
2429
|
*ngIf="root && item.visible !== false"
|
|
2430
2430
|
class="layout-menuitem-root-text"
|
|
@@ -2893,7 +2893,8 @@ class MenuComponent {
|
|
|
2893
2893
|
];
|
|
2894
2894
|
}
|
|
2895
2895
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: MenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2896
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.2", type: MenuComponent, isStandalone: true, selector: "app-menu", providers: [Menu], viewQueries: [{ propertyName: "menuItemCreateDialogComponent", first: true, predicate: MenuItemCreateDialogComponent, descendants: true }, { propertyName: "menuItemEditDialogComponent", first: true, predicate: MenuItemEditDialogComponent, descendants: true }, { propertyName: "contextMenu", first: true, predicate: ContextMenu, descendants: true }], ngImport: i0, template: `
|
|
2896
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.2", type: MenuComponent, isStandalone: true, selector: "app-menu", providers: [Menu], viewQueries: [{ propertyName: "menuItemCreateDialogComponent", first: true, predicate: MenuItemCreateDialogComponent, descendants: true }, { propertyName: "menuItemEditDialogComponent", first: true, predicate: MenuItemEditDialogComponent, descendants: true }, { propertyName: "contextMenu", first: true, predicate: ContextMenu, descendants: true }], ngImport: i0, template: `
|
|
2897
|
+
<div #empty class="layout-sidebar" (contextmenu)="onContextMenu($event)">
|
|
2897
2898
|
<ul class="layout-menu">
|
|
2898
2899
|
@for (item of menuService.menu; track item; let i = $index) {
|
|
2899
2900
|
<ng-container>
|
|
@@ -2913,10 +2914,10 @@ class MenuComponent {
|
|
|
2913
2914
|
}
|
|
2914
2915
|
</ul>
|
|
2915
2916
|
</div>
|
|
2916
|
-
<p-contextMenu [target]="empty"
|
|
2917
|
+
<p-contextMenu [target]="empty"/>
|
|
2917
2918
|
@if (securityService.isAdmin) {
|
|
2918
|
-
<menu-item-create-dialog
|
|
2919
|
-
<menu-item-edit-dialog
|
|
2919
|
+
<menu-item-create-dialog/>
|
|
2920
|
+
<menu-item-edit-dialog/>
|
|
2920
2921
|
}`, isInline: true, dependencies: [{ kind: "component", type: MenuItemComponent, selector: "[app-menuitem]", inputs: ["item", "index", "root", "parentKey", "menuItemCreateDialogComponent", "menuItemEditDialogComponent", "contextMenu"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "ngmodule", type: ContextMenuModule }, { kind: "component", type: i1$4.ContextMenu, selector: "p-contextMenu, p-contextmenu, p-context-menu", inputs: ["model", "triggerEvent", "target", "global", "style", "styleClass", "autoZIndex", "baseZIndex", "id", "breakpoint", "ariaLabel", "ariaLabelledBy", "pressDelay", "appendTo"], outputs: ["onShow", "onHide"] }, { kind: "ngmodule", type: DialogModule }, { kind: "ngmodule", type: InputTextModule }, { kind: "component", type: MenuItemCreateDialogComponent, selector: "menu-item-create-dialog", inputs: ["visible"], outputs: ["visibleChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: MenuItemEditDialogComponent, selector: "menu-item-edit-dialog", inputs: ["visible"], outputs: ["visibleChange"] }] }); }
|
|
2921
2922
|
}
|
|
2922
2923
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: MenuComponent, decorators: [{
|
|
@@ -2935,7 +2936,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImpor
|
|
|
2935
2936
|
providers: [Menu],
|
|
2936
2937
|
selector: 'app-menu',
|
|
2937
2938
|
standalone: true,
|
|
2938
|
-
template: `
|
|
2939
|
+
template: `
|
|
2940
|
+
<div #empty class="layout-sidebar" (contextmenu)="onContextMenu($event)">
|
|
2939
2941
|
<ul class="layout-menu">
|
|
2940
2942
|
@for (item of menuService.menu; track item; let i = $index) {
|
|
2941
2943
|
<ng-container>
|
|
@@ -2955,10 +2957,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImpor
|
|
|
2955
2957
|
}
|
|
2956
2958
|
</ul>
|
|
2957
2959
|
</div>
|
|
2958
|
-
<p-contextMenu [target]="empty"
|
|
2960
|
+
<p-contextMenu [target]="empty"/>
|
|
2959
2961
|
@if (securityService.isAdmin) {
|
|
2960
|
-
<menu-item-create-dialog
|
|
2961
|
-
<menu-item-edit-dialog
|
|
2962
|
+
<menu-item-create-dialog/>
|
|
2963
|
+
<menu-item-edit-dialog/>
|
|
2962
2964
|
}`
|
|
2963
2965
|
}]
|
|
2964
2966
|
}], propDecorators: { menuItemCreateDialogComponent: [{
|
|
@@ -3179,9 +3181,93 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImpor
|
|
|
3179
3181
|
}]
|
|
3180
3182
|
}] });
|
|
3181
3183
|
|
|
3184
|
+
/**
|
|
3185
|
+
* Service for managing translation loading in the application
|
|
3186
|
+
*/
|
|
3187
|
+
class L10nService {
|
|
3188
|
+
constructor() {
|
|
3189
|
+
this.loadedTranslations = new Set();
|
|
3190
|
+
this.httpClient = inject(HttpClient$1);
|
|
3191
|
+
this.translateService = inject(TranslateService);
|
|
3192
|
+
this.primeNg = inject(PrimeNG);
|
|
3193
|
+
this.layoutService = inject(LayoutService);
|
|
3194
|
+
}
|
|
3195
|
+
/**
|
|
3196
|
+
* Loads translations for a specific component
|
|
3197
|
+
* @param component - Name of the component to load translations for
|
|
3198
|
+
*/
|
|
3199
|
+
loadComponentTranslations(component) {
|
|
3200
|
+
const lang = this.translateService.currentLang;
|
|
3201
|
+
this.loadTranslations(component, lang);
|
|
3202
|
+
}
|
|
3203
|
+
/**
|
|
3204
|
+
* Gets the translated value of a key (or an array of keys)
|
|
3205
|
+
* @returns the translated key, or an object of translated keys
|
|
3206
|
+
*/
|
|
3207
|
+
get(key) {
|
|
3208
|
+
this.loadComponentTranslations(key);
|
|
3209
|
+
return this.translateService.get(key);
|
|
3210
|
+
}
|
|
3211
|
+
/**
|
|
3212
|
+
* Internal method to load translations from JSON files
|
|
3213
|
+
* @param component - Component or translation namespace
|
|
3214
|
+
* @param lang - Language code to load translations for
|
|
3215
|
+
*/
|
|
3216
|
+
loadTranslations(component, lang) {
|
|
3217
|
+
// Create unique key for this component-language combination
|
|
3218
|
+
const key = `${component}.${lang}`;
|
|
3219
|
+
// Skip if translations are already loaded
|
|
3220
|
+
if (this.loadedTranslations.has(key)) {
|
|
3221
|
+
return;
|
|
3222
|
+
}
|
|
3223
|
+
try {
|
|
3224
|
+
// Load translation file from assets
|
|
3225
|
+
this.httpClient.get(`./assets/i18n/${component}.${lang}.json`).subscribe((translations) => {
|
|
3226
|
+
// Get existing translations for the language
|
|
3227
|
+
const current = this.translateService.translations[lang] || {};
|
|
3228
|
+
// Merge new translations with existing ones
|
|
3229
|
+
this.translateService.setTranslation(lang, { ...current, ...translations }, true);
|
|
3230
|
+
// Mark these translations as loaded
|
|
3231
|
+
this.loadedTranslations.add(key);
|
|
3232
|
+
});
|
|
3233
|
+
}
|
|
3234
|
+
catch (e) {
|
|
3235
|
+
console.warn(`No translations found for ${component}.${lang}.json`);
|
|
3236
|
+
console.error(e);
|
|
3237
|
+
}
|
|
3238
|
+
}
|
|
3239
|
+
/**
|
|
3240
|
+
* Changes the lang currently used
|
|
3241
|
+
*/
|
|
3242
|
+
use(selectedLanguage, key = null) {
|
|
3243
|
+
if (key) {
|
|
3244
|
+
this.get(key);
|
|
3245
|
+
}
|
|
3246
|
+
this.translateService.use(selectedLanguage);
|
|
3247
|
+
}
|
|
3248
|
+
init(langs) {
|
|
3249
|
+
this.translateService.addLangs(langs);
|
|
3250
|
+
const lang = /en|ru/.exec(this.layoutService.language()) ? this.layoutService.language() : 'en';
|
|
3251
|
+
this.translateService.setDefaultLang(lang);
|
|
3252
|
+
this.translateService.use(lang);
|
|
3253
|
+
this.loadComponentTranslations('app-info');
|
|
3254
|
+
this.translateService.get('primeng').subscribe((res) => this.primeNg.setTranslation(res));
|
|
3255
|
+
}
|
|
3256
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: L10nService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3257
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: L10nService, providedIn: 'root' }); }
|
|
3258
|
+
}
|
|
3259
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: L10nService, decorators: [{
|
|
3260
|
+
type: Injectable,
|
|
3261
|
+
args: [{ providedIn: 'root' }]
|
|
3262
|
+
}] });
|
|
3263
|
+
|
|
3182
3264
|
class NotfoundComponent {
|
|
3183
|
-
|
|
3184
|
-
|
|
3265
|
+
constructor(l10nService) {
|
|
3266
|
+
l10nService.get('notfound');
|
|
3267
|
+
}
|
|
3268
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: NotfoundComponent, deps: [{ token: L10nService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3269
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.2", type: NotfoundComponent, isStandalone: true, selector: "app-notfound", ngImport: i0, template: `
|
|
3270
|
+
<app-floating-configurator/>
|
|
3185
3271
|
<div class="flex items-center justify-center min-h-screen overflow-hidden">
|
|
3186
3272
|
<div class="flex flex-col items-center justify-center">
|
|
3187
3273
|
<div
|
|
@@ -3190,22 +3276,23 @@ class NotfoundComponent {
|
|
|
3190
3276
|
class="w-full bg-surface-0 dark:bg-surface-900 py-20 px-8 sm:px-20 flex flex-col items-center"
|
|
3191
3277
|
style="border-radius: 53px">
|
|
3192
3278
|
<div class="flex flex-col items-center justify-center">
|
|
3193
|
-
<logo height="96" width="96"></logo>
|
|
3279
|
+
<logo [height]="96" [width]="96"></logo>
|
|
3194
3280
|
</div>
|
|
3195
|
-
<span class="text-primary font-bold text-3xl">
|
|
3196
|
-
<h1 class="text-surface-900 dark:text-surface-0 font-bold text-3xl lg:text-5xl mb-2">
|
|
3197
|
-
<div class="text-surface-600 dark:text-surface-200 mb-8">
|
|
3198
|
-
<p-button id="oip-app-notfound-go-to-home-button" label="
|
|
3281
|
+
<span class="text-primary font-bold text-3xl">{{ 'notfound.errorCode' | translate }}</span>
|
|
3282
|
+
<h1 class="text-surface-900 dark:text-surface-0 font-bold text-3xl lg:text-5xl mb-2">{{ 'notfound.title' | translate }}</h1>
|
|
3283
|
+
<div class="text-surface-600 dark:text-surface-200 mb-8">{{ 'notfound.description' | translate }}</div>
|
|
3284
|
+
<p-button id="oip-app-notfound-go-to-home-button" [label]="'notfound.button' | translate" routerLink="/"/>
|
|
3199
3285
|
</div>
|
|
3200
3286
|
</div>
|
|
3201
3287
|
</div>
|
|
3202
|
-
</div>`, isInline: true, dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: LogoComponent, selector: "logo", inputs: ["width", "height"] }, { kind: "component", type: Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "buttonProps", "autofocus", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: AppFloatingConfiguratorComponent, selector: "app-floating-configurator" }] }); }
|
|
3288
|
+
</div>`, isInline: true, dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: LogoComponent, selector: "logo", inputs: ["width", "height"] }, { kind: "component", type: Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "buttonProps", "autofocus", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: AppFloatingConfiguratorComponent, selector: "app-floating-configurator" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2$2.TranslatePipe, name: "translate" }] }); }
|
|
3203
3289
|
}
|
|
3204
3290
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: NotfoundComponent, decorators: [{
|
|
3205
3291
|
type: Component,
|
|
3206
3292
|
args: [{
|
|
3207
3293
|
selector: 'app-notfound',
|
|
3208
|
-
template: `
|
|
3294
|
+
template: `
|
|
3295
|
+
<app-floating-configurator/>
|
|
3209
3296
|
<div class="flex items-center justify-center min-h-screen overflow-hidden">
|
|
3210
3297
|
<div class="flex flex-col items-center justify-center">
|
|
3211
3298
|
<div
|
|
@@ -3214,20 +3301,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImpor
|
|
|
3214
3301
|
class="w-full bg-surface-0 dark:bg-surface-900 py-20 px-8 sm:px-20 flex flex-col items-center"
|
|
3215
3302
|
style="border-radius: 53px">
|
|
3216
3303
|
<div class="flex flex-col items-center justify-center">
|
|
3217
|
-
<logo height="96" width="96"></logo>
|
|
3304
|
+
<logo [height]="96" [width]="96"></logo>
|
|
3218
3305
|
</div>
|
|
3219
|
-
<span class="text-primary font-bold text-3xl">
|
|
3220
|
-
<h1 class="text-surface-900 dark:text-surface-0 font-bold text-3xl lg:text-5xl mb-2">
|
|
3221
|
-
<div class="text-surface-600 dark:text-surface-200 mb-8">
|
|
3222
|
-
<p-button id="oip-app-notfound-go-to-home-button" label="
|
|
3306
|
+
<span class="text-primary font-bold text-3xl">{{ 'notfound.errorCode' | translate }}</span>
|
|
3307
|
+
<h1 class="text-surface-900 dark:text-surface-0 font-bold text-3xl lg:text-5xl mb-2">{{ 'notfound.title' | translate }}</h1>
|
|
3308
|
+
<div class="text-surface-600 dark:text-surface-200 mb-8">{{ 'notfound.description' | translate }}</div>
|
|
3309
|
+
<p-button id="oip-app-notfound-go-to-home-button" [label]="'notfound.button' | translate" routerLink="/"/>
|
|
3223
3310
|
</div>
|
|
3224
3311
|
</div>
|
|
3225
3312
|
</div>
|
|
3226
3313
|
</div>`,
|
|
3227
|
-
imports: [RouterLink, LogoComponent, Button, AppFloatingConfiguratorComponent],
|
|
3314
|
+
imports: [RouterLink, LogoComponent, Button, AppFloatingConfiguratorComponent, TranslateModule],
|
|
3228
3315
|
standalone: true
|
|
3229
3316
|
}]
|
|
3230
|
-
}] });
|
|
3317
|
+
}], ctorParameters: () => [{ type: L10nService }] });
|
|
3231
3318
|
|
|
3232
3319
|
class UnauthorizedComponent {
|
|
3233
3320
|
constructor() {
|
|
@@ -3445,72 +3532,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImpor
|
|
|
3445
3532
|
}]
|
|
3446
3533
|
}] });
|
|
3447
3534
|
|
|
3448
|
-
/**
|
|
3449
|
-
* Service for managing translation loading in the application
|
|
3450
|
-
*/
|
|
3451
|
-
class L10nService {
|
|
3452
|
-
constructor() {
|
|
3453
|
-
this.loadedTranslations = new Set();
|
|
3454
|
-
this.httpClient = inject(HttpClient$1);
|
|
3455
|
-
this.translateService = inject(TranslateService);
|
|
3456
|
-
}
|
|
3457
|
-
/**
|
|
3458
|
-
* Loads translations for a specific component
|
|
3459
|
-
* @param component - Name of the component to load translations for
|
|
3460
|
-
*/
|
|
3461
|
-
async loadComponentTranslations(component) {
|
|
3462
|
-
const lang = this.translateService.currentLang;
|
|
3463
|
-
await this.loadTranslations(component, lang);
|
|
3464
|
-
}
|
|
3465
|
-
/**
|
|
3466
|
-
* Gets the translated value of a key (or an array of keys)
|
|
3467
|
-
* @returns the translated key, or an object of translated keys
|
|
3468
|
-
*/
|
|
3469
|
-
async get(key) {
|
|
3470
|
-
await this.loadComponentTranslations(key);
|
|
3471
|
-
return this.translateService.get(key);
|
|
3472
|
-
}
|
|
3473
|
-
/**
|
|
3474
|
-
* Internal method to load translations from JSON files
|
|
3475
|
-
* @param component - Component or translation namespace
|
|
3476
|
-
* @param lang - Language code to load translations for
|
|
3477
|
-
*/
|
|
3478
|
-
async loadTranslations(component, lang) {
|
|
3479
|
-
// Create unique key for this component-language combination
|
|
3480
|
-
const key = `${component}.${lang}`;
|
|
3481
|
-
// Skip if translations are already loaded
|
|
3482
|
-
if (this.loadedTranslations.has(key)) {
|
|
3483
|
-
return;
|
|
3484
|
-
}
|
|
3485
|
-
try {
|
|
3486
|
-
// Load translation file from assets
|
|
3487
|
-
const translations = await lastValueFrom(this.httpClient.get(`./assets/i18n/${component}.${lang}.json`));
|
|
3488
|
-
// Get existing translations for the language
|
|
3489
|
-
const current = this.translateService.translations[lang] || {};
|
|
3490
|
-
// Merge new translations with existing ones
|
|
3491
|
-
this.translateService.setTranslation(lang, { ...current, ...translations }, true);
|
|
3492
|
-
// Mark these translations as loaded
|
|
3493
|
-
this.loadedTranslations.add(key);
|
|
3494
|
-
}
|
|
3495
|
-
catch (e) {
|
|
3496
|
-
console.warn(`No translations found for ${component}.${lang}.json`);
|
|
3497
|
-
console.error(e);
|
|
3498
|
-
}
|
|
3499
|
-
}
|
|
3500
|
-
/**
|
|
3501
|
-
* Changes the lang currently used
|
|
3502
|
-
*/
|
|
3503
|
-
use(selectedLanguage) {
|
|
3504
|
-
this.translateService.use(selectedLanguage);
|
|
3505
|
-
}
|
|
3506
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: L10nService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3507
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: L10nService, providedIn: 'root' }); }
|
|
3508
|
-
}
|
|
3509
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: L10nService, decorators: [{
|
|
3510
|
-
type: Injectable,
|
|
3511
|
-
args: [{ providedIn: 'root' }]
|
|
3512
|
-
}] });
|
|
3513
|
-
|
|
3514
3535
|
class ConfigComponent {
|
|
3515
3536
|
constructor() {
|
|
3516
3537
|
this.layoutService = inject(LayoutService);
|
|
@@ -3523,12 +3544,10 @@ class ConfigComponent {
|
|
|
3523
3544
|
{ value: 'en', label: 'English' },
|
|
3524
3545
|
{ value: 'ru', label: 'Русский' }
|
|
3525
3546
|
];
|
|
3547
|
+
this.l10nService.loadComponentTranslations('config');
|
|
3526
3548
|
this.selectedLanguage = this.layoutService.language();
|
|
3527
3549
|
}
|
|
3528
3550
|
async ngOnInit() {
|
|
3529
|
-
(await this.l10nService.get('config')).subscribe((l10n) => {
|
|
3530
|
-
this.l10n = l10n;
|
|
3531
|
-
});
|
|
3532
3551
|
}
|
|
3533
3552
|
/**
|
|
3534
3553
|
* Changes the application's language.
|
|
@@ -3539,7 +3558,7 @@ class ConfigComponent {
|
|
|
3539
3558
|
...config,
|
|
3540
3559
|
language: this.selectedLanguage
|
|
3541
3560
|
}));
|
|
3542
|
-
this.l10nService.use(this.selectedLanguage);
|
|
3561
|
+
this.l10nService.use(this.selectedLanguage, 'config');
|
|
3543
3562
|
}
|
|
3544
3563
|
async onSwitchChange() {
|
|
3545
3564
|
await this.menuService.loadMenu();
|
|
@@ -3550,15 +3569,15 @@ class ConfigComponent {
|
|
|
3550
3569
|
<div class="flex flex-col md:flex-row gap-4">
|
|
3551
3570
|
<div class="md:w-1/2">
|
|
3552
3571
|
<div class="card flex flex-col gap-4">
|
|
3553
|
-
<div class="font-semibold text-xl">{{
|
|
3572
|
+
<div class="font-semibold text-xl">{{ 'config.profile' | translate }}</div>
|
|
3554
3573
|
<div class="flex justify-content-end flex-wrap">
|
|
3555
3574
|
{{ userService.userName }}
|
|
3556
3575
|
</div>
|
|
3557
3576
|
<label>
|
|
3558
|
-
{{
|
|
3577
|
+
{{ 'config.photo' | translate }}
|
|
3559
3578
|
<span
|
|
3560
3579
|
class="pi pi-question-circle"
|
|
3561
|
-
pTooltip="{{
|
|
3580
|
+
pTooltip="{{ 'config.usePhoto256x256Pixel' | translate }}"
|
|
3562
3581
|
tooltipPosition="right"></span>
|
|
3563
3582
|
</label>
|
|
3564
3583
|
<div class="flex justify-content-end flex-wrap">
|
|
@@ -3568,8 +3587,8 @@ class ConfigComponent {
|
|
|
3568
3587
|
</div>
|
|
3569
3588
|
<div class="md:w-1/2">
|
|
3570
3589
|
<div class="card flex flex-col gap-4">
|
|
3571
|
-
<div class="font-semibold text-xl">{{
|
|
3572
|
-
<label> {{
|
|
3590
|
+
<div class="font-semibold text-xl">{{ 'config.localization' | translate }}</div>
|
|
3591
|
+
<label> {{ 'config.selectLanguage' | translate }} </label>
|
|
3573
3592
|
<div class="flex justify-content-end flex-wrap">
|
|
3574
3593
|
<p-select
|
|
3575
3594
|
class="w-full md:w-56"
|
|
@@ -3578,31 +3597,31 @@ class ConfigComponent {
|
|
|
3578
3597
|
optionValue="value"
|
|
3579
3598
|
[options]="languages"
|
|
3580
3599
|
[(ngModel)]="selectedLanguage"
|
|
3581
|
-
(onChange)="changeLanguage()"
|
|
3600
|
+
(onChange)="changeLanguage()"/>
|
|
3582
3601
|
</div>
|
|
3583
3602
|
</div>
|
|
3584
3603
|
</div>
|
|
3585
3604
|
@if (securityService.isAdmin()) {
|
|
3586
3605
|
<div class="md:w-1/2">
|
|
3587
3606
|
<div class="card flex flex-col gap-4">
|
|
3588
|
-
<div class="font-semibold text-xl">{{
|
|
3607
|
+
<div class="font-semibold text-xl">{{ 'config.menu' | translate }}</div>
|
|
3589
3608
|
<div class="flex items-center gap-2">
|
|
3590
|
-
<label for="oip-app-config-admin-mode">{{
|
|
3609
|
+
<label for="oip-app-config-admin-mode">{{ 'config.all' | translate }}</label>
|
|
3591
3610
|
<p-toggle-switch
|
|
3592
3611
|
id="oip-app-config-admin-mode"
|
|
3593
3612
|
[(ngModel)]="menuService.adminMode"
|
|
3594
3613
|
(onChange)="onSwitchChange()"></p-toggle-switch>
|
|
3595
3614
|
</div>
|
|
3596
3615
|
<div class="flex items-center gap-2">
|
|
3597
|
-
<label for="oip-app-config-admin-mode">{{
|
|
3598
|
-
<p-button icon="pi pi-cog" label="{{
|
|
3616
|
+
<label for="oip-app-config-admin-mode">{{ 'config.moduleManagement' | translate }}</label>
|
|
3617
|
+
<p-button icon="pi pi-cog" label="{{ 'config.goTo' | translate }}" routerLink="/modules"/>
|
|
3599
3618
|
</div>
|
|
3600
3619
|
</div>
|
|
3601
3620
|
</div>
|
|
3602
3621
|
}
|
|
3603
3622
|
</div>
|
|
3604
3623
|
</p-fluid>
|
|
3605
|
-
`, isInline: true, dependencies: [{ kind: "component", type: ProfileComponent, selector: "user-profile" }, { kind: "component", type: Fluid, selector: "p-fluid" }, { kind: "directive", type: Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "styleClass", "panelStyleClass", "readonly", "editable", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "ngmodule", type: TableModule }, { kind: "ngmodule", type: ToggleSwitchModule }, { kind: "component", type: i2$
|
|
3624
|
+
`, isInline: true, dependencies: [{ kind: "component", type: ProfileComponent, selector: "user-profile" }, { kind: "component", type: Fluid, selector: "p-fluid" }, { kind: "directive", type: Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "styleClass", "panelStyleClass", "readonly", "editable", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "ngmodule", type: TableModule }, { kind: "ngmodule", type: ToggleSwitchModule }, { kind: "component", type: i2$3.ToggleSwitch, selector: "p-toggleswitch, p-toggleSwitch, p-toggle-switch", inputs: ["styleClass", "tabindex", "inputId", "readonly", "trueValue", "falseValue", "ariaLabel", "size", "ariaLabelledBy", "autofocus"], outputs: ["onChange"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "buttonProps", "autofocus", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
|
|
3606
3625
|
}
|
|
3607
3626
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: ConfigComponent, decorators: [{
|
|
3608
3627
|
type: Component,
|
|
@@ -3613,15 +3632,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImpor
|
|
|
3613
3632
|
<div class="flex flex-col md:flex-row gap-4">
|
|
3614
3633
|
<div class="md:w-1/2">
|
|
3615
3634
|
<div class="card flex flex-col gap-4">
|
|
3616
|
-
<div class="font-semibold text-xl">{{
|
|
3635
|
+
<div class="font-semibold text-xl">{{ 'config.profile' | translate }}</div>
|
|
3617
3636
|
<div class="flex justify-content-end flex-wrap">
|
|
3618
3637
|
{{ userService.userName }}
|
|
3619
3638
|
</div>
|
|
3620
3639
|
<label>
|
|
3621
|
-
{{
|
|
3640
|
+
{{ 'config.photo' | translate }}
|
|
3622
3641
|
<span
|
|
3623
3642
|
class="pi pi-question-circle"
|
|
3624
|
-
pTooltip="{{
|
|
3643
|
+
pTooltip="{{ 'config.usePhoto256x256Pixel' | translate }}"
|
|
3625
3644
|
tooltipPosition="right"></span>
|
|
3626
3645
|
</label>
|
|
3627
3646
|
<div class="flex justify-content-end flex-wrap">
|
|
@@ -3631,8 +3650,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImpor
|
|
|
3631
3650
|
</div>
|
|
3632
3651
|
<div class="md:w-1/2">
|
|
3633
3652
|
<div class="card flex flex-col gap-4">
|
|
3634
|
-
<div class="font-semibold text-xl">{{
|
|
3635
|
-
<label> {{
|
|
3653
|
+
<div class="font-semibold text-xl">{{ 'config.localization' | translate }}</div>
|
|
3654
|
+
<label> {{ 'config.selectLanguage' | translate }} </label>
|
|
3636
3655
|
<div class="flex justify-content-end flex-wrap">
|
|
3637
3656
|
<p-select
|
|
3638
3657
|
class="w-full md:w-56"
|
|
@@ -3641,24 +3660,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImpor
|
|
|
3641
3660
|
optionValue="value"
|
|
3642
3661
|
[options]="languages"
|
|
3643
3662
|
[(ngModel)]="selectedLanguage"
|
|
3644
|
-
(onChange)="changeLanguage()"
|
|
3663
|
+
(onChange)="changeLanguage()"/>
|
|
3645
3664
|
</div>
|
|
3646
3665
|
</div>
|
|
3647
3666
|
</div>
|
|
3648
3667
|
@if (securityService.isAdmin()) {
|
|
3649
3668
|
<div class="md:w-1/2">
|
|
3650
3669
|
<div class="card flex flex-col gap-4">
|
|
3651
|
-
<div class="font-semibold text-xl">{{
|
|
3670
|
+
<div class="font-semibold text-xl">{{ 'config.menu' | translate }}</div>
|
|
3652
3671
|
<div class="flex items-center gap-2">
|
|
3653
|
-
<label for="oip-app-config-admin-mode">{{
|
|
3672
|
+
<label for="oip-app-config-admin-mode">{{ 'config.all' | translate }}</label>
|
|
3654
3673
|
<p-toggle-switch
|
|
3655
3674
|
id="oip-app-config-admin-mode"
|
|
3656
3675
|
[(ngModel)]="menuService.adminMode"
|
|
3657
3676
|
(onChange)="onSwitchChange()"></p-toggle-switch>
|
|
3658
3677
|
</div>
|
|
3659
3678
|
<div class="flex items-center gap-2">
|
|
3660
|
-
<label for="oip-app-config-admin-mode">{{
|
|
3661
|
-
<p-button icon="pi pi-cog" label="{{
|
|
3679
|
+
<label for="oip-app-config-admin-mode">{{ 'config.moduleManagement' | translate }}</label>
|
|
3680
|
+
<p-button icon="pi pi-cog" label="{{ 'config.goTo' | translate }}" routerLink="/modules"/>
|
|
3662
3681
|
</div>
|
|
3663
3682
|
</div>
|
|
3664
3683
|
</div>
|
|
@@ -3666,7 +3685,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImpor
|
|
|
3666
3685
|
</div>
|
|
3667
3686
|
</p-fluid>
|
|
3668
3687
|
`,
|
|
3669
|
-
imports: [ProfileComponent, Fluid, Tooltip, FormsModule, Select, TableModule, ToggleSwitchModule, RouterLink, Button]
|
|
3688
|
+
imports: [ProfileComponent, Fluid, Tooltip, FormsModule, Select, TableModule, ToggleSwitchModule, RouterLink, Button, TranslatePipe]
|
|
3670
3689
|
}]
|
|
3671
3690
|
}], ctorParameters: () => [] });
|
|
3672
3691
|
|
|
@@ -3694,87 +3713,89 @@ class DbMigrationComponent extends BaseModuleComponent {
|
|
|
3694
3713
|
}
|
|
3695
3714
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: DbMigrationComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3696
3715
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.2", type: DbMigrationComponent, isStandalone: true, selector: "db-migration", providers: [ConfirmationService], usesInheritance: true, ngImport: i0, template: `
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
<div>
|
|
3700
|
-
<
|
|
3701
|
-
<div class="flex flex-row gap-2">
|
|
3702
|
-
<p-button
|
|
3703
|
-
icon="pi pi-refresh"
|
|
3704
|
-
pTooltip="Refresh"
|
|
3705
|
-
severity="secondary"
|
|
3706
|
-
tooltipPosition="bottom"
|
|
3707
|
-
[outlined]="true"
|
|
3708
|
-
(click)="refreshAction()" />
|
|
3709
|
-
<p-button
|
|
3710
|
-
icon="pi pi-filter-slash"
|
|
3711
|
-
pTooltip="Clean filter"
|
|
3712
|
-
severity="secondary"
|
|
3713
|
-
tooltipPosition="bottom"
|
|
3714
|
-
[outlined]="true"
|
|
3715
|
-
(click)="dt.clear()" />
|
|
3716
|
-
</div>
|
|
3716
|
+
@if (isContent) {
|
|
3717
|
+
|
|
3718
|
+
<div class="card" style="height: 100%">
|
|
3719
|
+
<p-confirmDialog/>
|
|
3717
3720
|
<div>
|
|
3718
|
-
<
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3721
|
+
<h5>Migration manager</h5>
|
|
3722
|
+
<div class="flex flex-row gap-2">
|
|
3723
|
+
<p-button
|
|
3724
|
+
icon="pi pi-refresh"
|
|
3725
|
+
pTooltip="Refresh"
|
|
3726
|
+
severity="secondary"
|
|
3727
|
+
tooltipPosition="bottom"
|
|
3728
|
+
[outlined]="true"
|
|
3729
|
+
(click)="refreshAction()"/>
|
|
3730
|
+
<p-button
|
|
3731
|
+
icon="pi pi-filter-slash"
|
|
3732
|
+
pTooltip="Clean filter"
|
|
3733
|
+
severity="secondary"
|
|
3734
|
+
tooltipPosition="bottom"
|
|
3735
|
+
[outlined]="true"
|
|
3736
|
+
(click)="dt.clear()"/>
|
|
3737
|
+
</div>
|
|
3738
|
+
<div>
|
|
3739
|
+
<p-table #dt dataKey="name" editMode="row" size="small" [scrollable]="true" [value]="data">
|
|
3740
|
+
<ng-template let-columns pTemplate="header">
|
|
3741
|
+
<tr>
|
|
3742
|
+
<th pSortableColumn="name" scope="col">
|
|
3743
|
+
Migration name
|
|
3744
|
+
<p-columnFilter display="menu" field="name" type="text"/>
|
|
3745
|
+
</th>
|
|
3746
|
+
<th scope="col">Applied</th>
|
|
3747
|
+
<th scope="col">Exist</th>
|
|
3748
|
+
<th>Pending</th>
|
|
3749
|
+
<th scope="col"></th>
|
|
3750
|
+
</tr>
|
|
3751
|
+
</ng-template>
|
|
3731
3752
|
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3753
|
+
<ng-template #body let-columns="columns" let-editing="editing" let-ri="rowIndex" let-rowData>
|
|
3754
|
+
<tr [pEditableRow]="rowData">
|
|
3755
|
+
<td>
|
|
3756
|
+
{{ rowData.name }}
|
|
3757
|
+
</td>
|
|
3758
|
+
<td>
|
|
3759
|
+
<p-button
|
|
3760
|
+
*ngIf="rowData.applied"
|
|
3761
|
+
icon="pi pi-check"
|
|
3762
|
+
severity="success"
|
|
3763
|
+
[rounded]="true"
|
|
3764
|
+
[text]="true">
|
|
3765
|
+
</p-button>
|
|
3766
|
+
</td>
|
|
3767
|
+
<td>
|
|
3768
|
+
@if (rowData.exist) {
|
|
3769
|
+
<p-button icon="pi pi-check" severity="success" [rounded]="true" [text]="true"/>
|
|
3770
|
+
}
|
|
3771
|
+
</td>
|
|
3772
|
+
<td>
|
|
3773
|
+
@if (rowData.pending) {
|
|
3774
|
+
<p-button icon="pi pi-check" severity="success" [rounded]="true" [text]="true"></p-button>
|
|
3775
|
+
}
|
|
3776
|
+
</td>
|
|
3777
|
+
<td>
|
|
3778
|
+
<p-button
|
|
3779
|
+
icon="pi pi-bolt"
|
|
3780
|
+
pCancelEditableRow
|
|
3781
|
+
pTooltip="Apply migration"
|
|
3782
|
+
severity="secondary"
|
|
3783
|
+
tooltipPosition="left"
|
|
3784
|
+
[rounded]="true"
|
|
3785
|
+
[text]="true"
|
|
3786
|
+
(click)="applyMigration(rowData)">
|
|
3787
|
+
</p-button>
|
|
3788
|
+
</td>
|
|
3789
|
+
</tr>
|
|
3790
|
+
</ng-template>
|
|
3791
|
+
</p-table>
|
|
3792
|
+
</div>
|
|
3771
3793
|
</div>
|
|
3772
3794
|
</div>
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
<security [controller]="controller" [id]="id" />
|
|
3795
|
+
} @else if (isSecurity) {
|
|
3796
|
+
<security [controller]="controller" [id]="id"/>
|
|
3776
3797
|
}
|
|
3777
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: TableModule }, { kind: "component", type: i1$6.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i2$
|
|
3798
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: TableModule }, { kind: "component", type: i1$6.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i2$4.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i1$6.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "directive", type: i1$6.EditableRow, selector: "[pEditableRow]", inputs: ["pEditableRow", "pEditableRowDisabled"] }, { kind: "directive", type: i1$6.CancelEditableRow, selector: "[pCancelEditableRow]" }, { kind: "component", type: i1$6.ColumnFilter, selector: "p-columnFilter, p-column-filter, p-columnfilter", inputs: ["field", "type", "display", "showMenu", "matchMode", "operator", "showOperator", "showClearButton", "showApplyButton", "showMatchModes", "showAddButton", "hideOnClear", "placeholder", "matchModeOptions", "maxConstraints", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "locale", "localeMatcher", "currency", "currencyDisplay", "filterOn", "useGrouping", "showButtons", "ariaLabel", "filterButtonProps"], outputs: ["onShow", "onHide"] }, { kind: "ngmodule", type: SharedModule }, { kind: "ngmodule", type: TagModule }, { kind: "ngmodule", type: InputTextModule }, { kind: "ngmodule", type: TextareaModule }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i1$1.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "buttonProps", "autofocus", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: ConfirmDialog, selector: "p-confirmDialog, p-confirmdialog, p-confirm-dialog", 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", "draggable"], outputs: ["onHide"] }, { kind: "component", type: SecurityComponent, selector: "security", inputs: ["id", "controller"] }, { kind: "directive", type: Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo"] }] }); }
|
|
3778
3799
|
}
|
|
3779
3800
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: DbMigrationComponent, decorators: [{
|
|
3780
3801
|
type: Component,
|
|
@@ -3788,91 +3809,92 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImpor
|
|
|
3788
3809
|
ButtonModule,
|
|
3789
3810
|
FormsModule,
|
|
3790
3811
|
ConfirmDialog,
|
|
3791
|
-
NgIf,
|
|
3792
3812
|
SecurityComponent,
|
|
3793
3813
|
Tooltip
|
|
3794
3814
|
],
|
|
3795
3815
|
selector: 'db-migration',
|
|
3796
3816
|
template: `
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
<div>
|
|
3800
|
-
<
|
|
3801
|
-
<div class="flex flex-row gap-2">
|
|
3802
|
-
<p-button
|
|
3803
|
-
icon="pi pi-refresh"
|
|
3804
|
-
pTooltip="Refresh"
|
|
3805
|
-
severity="secondary"
|
|
3806
|
-
tooltipPosition="bottom"
|
|
3807
|
-
[outlined]="true"
|
|
3808
|
-
(click)="refreshAction()" />
|
|
3809
|
-
<p-button
|
|
3810
|
-
icon="pi pi-filter-slash"
|
|
3811
|
-
pTooltip="Clean filter"
|
|
3812
|
-
severity="secondary"
|
|
3813
|
-
tooltipPosition="bottom"
|
|
3814
|
-
[outlined]="true"
|
|
3815
|
-
(click)="dt.clear()" />
|
|
3816
|
-
</div>
|
|
3817
|
+
@if (isContent) {
|
|
3818
|
+
|
|
3819
|
+
<div class="card" style="height: 100%">
|
|
3820
|
+
<p-confirmDialog/>
|
|
3817
3821
|
<div>
|
|
3818
|
-
<
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
|
|
3822
|
+
<h5>Migration manager</h5>
|
|
3823
|
+
<div class="flex flex-row gap-2">
|
|
3824
|
+
<p-button
|
|
3825
|
+
icon="pi pi-refresh"
|
|
3826
|
+
pTooltip="Refresh"
|
|
3827
|
+
severity="secondary"
|
|
3828
|
+
tooltipPosition="bottom"
|
|
3829
|
+
[outlined]="true"
|
|
3830
|
+
(click)="refreshAction()"/>
|
|
3831
|
+
<p-button
|
|
3832
|
+
icon="pi pi-filter-slash"
|
|
3833
|
+
pTooltip="Clean filter"
|
|
3834
|
+
severity="secondary"
|
|
3835
|
+
tooltipPosition="bottom"
|
|
3836
|
+
[outlined]="true"
|
|
3837
|
+
(click)="dt.clear()"/>
|
|
3838
|
+
</div>
|
|
3839
|
+
<div>
|
|
3840
|
+
<p-table #dt dataKey="name" editMode="row" size="small" [scrollable]="true" [value]="data">
|
|
3841
|
+
<ng-template let-columns pTemplate="header">
|
|
3842
|
+
<tr>
|
|
3843
|
+
<th pSortableColumn="name" scope="col">
|
|
3844
|
+
Migration name
|
|
3845
|
+
<p-columnFilter display="menu" field="name" type="text"/>
|
|
3846
|
+
</th>
|
|
3847
|
+
<th scope="col">Applied</th>
|
|
3848
|
+
<th scope="col">Exist</th>
|
|
3849
|
+
<th>Pending</th>
|
|
3850
|
+
<th scope="col"></th>
|
|
3851
|
+
</tr>
|
|
3852
|
+
</ng-template>
|
|
3831
3853
|
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3854
|
+
<ng-template #body let-columns="columns" let-editing="editing" let-ri="rowIndex" let-rowData>
|
|
3855
|
+
<tr [pEditableRow]="rowData">
|
|
3856
|
+
<td>
|
|
3857
|
+
{{ rowData.name }}
|
|
3858
|
+
</td>
|
|
3859
|
+
<td>
|
|
3860
|
+
<p-button
|
|
3861
|
+
*ngIf="rowData.applied"
|
|
3862
|
+
icon="pi pi-check"
|
|
3863
|
+
severity="success"
|
|
3864
|
+
[rounded]="true"
|
|
3865
|
+
[text]="true">
|
|
3866
|
+
</p-button>
|
|
3867
|
+
</td>
|
|
3868
|
+
<td>
|
|
3869
|
+
@if (rowData.exist) {
|
|
3870
|
+
<p-button icon="pi pi-check" severity="success" [rounded]="true" [text]="true"/>
|
|
3871
|
+
}
|
|
3872
|
+
</td>
|
|
3873
|
+
<td>
|
|
3874
|
+
@if (rowData.pending) {
|
|
3875
|
+
<p-button icon="pi pi-check" severity="success" [rounded]="true" [text]="true"></p-button>
|
|
3876
|
+
}
|
|
3877
|
+
</td>
|
|
3878
|
+
<td>
|
|
3879
|
+
<p-button
|
|
3880
|
+
icon="pi pi-bolt"
|
|
3881
|
+
pCancelEditableRow
|
|
3882
|
+
pTooltip="Apply migration"
|
|
3883
|
+
severity="secondary"
|
|
3884
|
+
tooltipPosition="left"
|
|
3885
|
+
[rounded]="true"
|
|
3886
|
+
[text]="true"
|
|
3887
|
+
(click)="applyMigration(rowData)">
|
|
3888
|
+
</p-button>
|
|
3889
|
+
</td>
|
|
3890
|
+
</tr>
|
|
3891
|
+
</ng-template>
|
|
3892
|
+
</p-table>
|
|
3893
|
+
</div>
|
|
3871
3894
|
</div>
|
|
3872
3895
|
</div>
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
<security [controller]="controller" [id]="id" />
|
|
3896
|
+
} @else if (isSecurity) {
|
|
3897
|
+
<security [controller]="controller" [id]="id"/>
|
|
3876
3898
|
}
|
|
3877
3899
|
`,
|
|
3878
3900
|
providers: [ConfirmationService]
|
|
@@ -3975,8 +3997,8 @@ class AppModulesComponent {
|
|
|
3975
3997
|
this.moduleService = inject(Module);
|
|
3976
3998
|
}
|
|
3977
3999
|
async ngOnInit() {
|
|
3978
|
-
|
|
3979
|
-
this.l10n =
|
|
4000
|
+
this.l10nService.get('app-modules').subscribe((l10n) => {
|
|
4001
|
+
this.l10n = l10n;
|
|
3980
4002
|
});
|
|
3981
4003
|
this.titleService.setTitle(this.l10n.title);
|
|
3982
4004
|
await this.refreshAction();
|
|
@@ -4025,16 +4047,16 @@ class AppModulesComponent {
|
|
|
4025
4047
|
severity="secondary"
|
|
4026
4048
|
text="true"
|
|
4027
4049
|
tooltipPosition="bottom"
|
|
4028
|
-
[pTooltip]="
|
|
4050
|
+
[pTooltip]="'app-modules.refreshTooltip' | translate"
|
|
4029
4051
|
(onClick)="refreshAction()"></p-button>
|
|
4030
4052
|
</p-toolbar>
|
|
4031
4053
|
</div>
|
|
4032
4054
|
<p-table class="mt-4" [paginator]="true" [rows]="100" [value]="modules">
|
|
4033
4055
|
<ng-template pTemplate="header">
|
|
4034
4056
|
<tr>
|
|
4035
|
-
<th>{{
|
|
4036
|
-
<th>{{
|
|
4037
|
-
<th>{{
|
|
4057
|
+
<th>{{ 'app-modules.table.moduleId' | translate }}</th>
|
|
4058
|
+
<th>{{ 'app-modules.table.name' | translate }}</th>
|
|
4059
|
+
<th>{{ 'app-modules.table.currentlyLoaded' | translate }}</th>
|
|
4038
4060
|
<th style="width: 4rem"></th>
|
|
4039
4061
|
</tr>
|
|
4040
4062
|
</ng-template>
|
|
@@ -4045,7 +4067,7 @@ class AppModulesComponent {
|
|
|
4045
4067
|
<td>
|
|
4046
4068
|
<p-tag
|
|
4047
4069
|
[severity]="module.currentlyLoaded ? 'success' : 'danger'"
|
|
4048
|
-
[value]="module.currentlyLoaded ?
|
|
4070
|
+
[value]="(module.currentlyLoaded ? 'app-modules.table.yes' : 'app-modules.table.no') | translate"></p-tag>
|
|
4049
4071
|
</td>
|
|
4050
4072
|
<td>
|
|
4051
4073
|
<p-button
|
|
@@ -4054,7 +4076,7 @@ class AppModulesComponent {
|
|
|
4054
4076
|
severity="danger"
|
|
4055
4077
|
text="true"
|
|
4056
4078
|
tooltipPosition="bottom"
|
|
4057
|
-
[pTooltip]="
|
|
4079
|
+
[pTooltip]="'app-modules.table.deleteTooltip' | translate"
|
|
4058
4080
|
(onClick)="deleteModule(module)"></p-button>
|
|
4059
4081
|
</td>
|
|
4060
4082
|
</tr>
|
|
@@ -4062,12 +4084,12 @@ class AppModulesComponent {
|
|
|
4062
4084
|
</p-table>
|
|
4063
4085
|
</div>
|
|
4064
4086
|
</div>
|
|
4065
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: TableModule }, { kind: "component", type: i1$6.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i2$
|
|
4087
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: TableModule }, { kind: "component", type: i1$6.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i2$4.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: Tag, selector: "p-tag", inputs: ["styleClass", "severity", "value", "icon", "rounded"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i1$1.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "buttonProps", "autofocus", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: ToolbarModule }, { kind: "component", type: i4$2.Toolbar, selector: "p-toolbar", inputs: ["styleClass", "ariaLabelledBy"] }, { kind: "directive", type: Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo"] }, { kind: "component", type: ConfirmDialog, selector: "p-confirmDialog, p-confirmdialog, p-confirm-dialog", 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", "draggable"], outputs: ["onHide"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
|
|
4066
4088
|
}
|
|
4067
4089
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: AppModulesComponent, decorators: [{
|
|
4068
4090
|
type: Component,
|
|
4069
4091
|
args: [{
|
|
4070
|
-
imports: [FormsModule, TableModule, Tag, ButtonModule, ToolbarModule, Tooltip, ConfirmDialog],
|
|
4092
|
+
imports: [FormsModule, TableModule, Tag, ButtonModule, ToolbarModule, Tooltip, ConfirmDialog, TranslatePipe],
|
|
4071
4093
|
providers: [ConfirmationService, Module],
|
|
4072
4094
|
selector: 'app-modules',
|
|
4073
4095
|
template: `
|
|
@@ -4085,16 +4107,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImpor
|
|
|
4085
4107
|
severity="secondary"
|
|
4086
4108
|
text="true"
|
|
4087
4109
|
tooltipPosition="bottom"
|
|
4088
|
-
[pTooltip]="
|
|
4110
|
+
[pTooltip]="'app-modules.refreshTooltip' | translate"
|
|
4089
4111
|
(onClick)="refreshAction()"></p-button>
|
|
4090
4112
|
</p-toolbar>
|
|
4091
4113
|
</div>
|
|
4092
4114
|
<p-table class="mt-4" [paginator]="true" [rows]="100" [value]="modules">
|
|
4093
4115
|
<ng-template pTemplate="header">
|
|
4094
4116
|
<tr>
|
|
4095
|
-
<th>{{
|
|
4096
|
-
<th>{{
|
|
4097
|
-
<th>{{
|
|
4117
|
+
<th>{{ 'app-modules.table.moduleId' | translate }}</th>
|
|
4118
|
+
<th>{{ 'app-modules.table.name' | translate }}</th>
|
|
4119
|
+
<th>{{ 'app-modules.table.currentlyLoaded' | translate }}</th>
|
|
4098
4120
|
<th style="width: 4rem"></th>
|
|
4099
4121
|
</tr>
|
|
4100
4122
|
</ng-template>
|
|
@@ -4105,7 +4127,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImpor
|
|
|
4105
4127
|
<td>
|
|
4106
4128
|
<p-tag
|
|
4107
4129
|
[severity]="module.currentlyLoaded ? 'success' : 'danger'"
|
|
4108
|
-
[value]="module.currentlyLoaded ?
|
|
4130
|
+
[value]="(module.currentlyLoaded ? 'app-modules.table.yes' : 'app-modules.table.no') | translate"></p-tag>
|
|
4109
4131
|
</td>
|
|
4110
4132
|
<td>
|
|
4111
4133
|
<p-button
|
|
@@ -4114,7 +4136,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImpor
|
|
|
4114
4136
|
severity="danger"
|
|
4115
4137
|
text="true"
|
|
4116
4138
|
tooltipPosition="bottom"
|
|
4117
|
-
[pTooltip]="
|
|
4139
|
+
[pTooltip]="'app-modules.table.deleteTooltip' | translate"
|
|
4118
4140
|
(onClick)="deleteModule(module)"></p-button>
|
|
4119
4141
|
</td>
|
|
4120
4142
|
</tr>
|
|
@@ -4269,5 +4291,5 @@ const httpLoaderAuthFactory = (httpClient) => {
|
|
|
4269
4291
|
* Generated bundle index. Do not edit.
|
|
4270
4292
|
*/
|
|
4271
4293
|
|
|
4272
|
-
export { AppConfiguratorComponent, AppFloatingConfiguratorComponent, AppLayoutComponent, AppModulesComponent, AppTopbar, AuthGuardService, BaseDataService, BaseModuleComponent, ConfigComponent, DbMigrationComponent, ErrorComponent, FooterComponent, LayoutService, LogoComponent, MenuComponent, MenuService, MsgService, NotfoundComponent, ProfileComponent, SecurePipe, SecurityComponent, SecurityDataService, SecurityService, SecurityStorageService, SidebarComponent, TopBarService, UnauthorizedComponent, UserService, httpLoaderAuthFactory, langIntercept };
|
|
4294
|
+
export { AppConfiguratorComponent, AppFloatingConfiguratorComponent, AppLayoutComponent, AppModulesComponent, AppTopbar, AuthGuardService, BaseDataService, BaseModuleComponent, ConfigComponent, DbMigrationComponent, ErrorComponent, FooterComponent, KeycloakSecurityService, LayoutService, LogoComponent, MenuComponent, MenuService, MsgService, NotfoundComponent, ProfileComponent, SecurePipe, SecurityComponent, SecurityDataService, SecurityService, SecurityStorageService, SidebarComponent, TopBarService, UnauthorizedComponent, UserService, httpLoaderAuthFactory, langIntercept };
|
|
4273
4295
|
//# sourceMappingURL=oip-common.mjs.map
|