oip-common 0.0.14 → 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 +332 -301
- package/fesm2022/oip-common.mjs.map +1 -1
- package/index.d.ts +35 -31
- 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';
|
|
@@ -1621,7 +1622,7 @@ class AppTopbar {
|
|
|
1621
1622
|
</button>
|
|
1622
1623
|
<a class="layout-topbar-logo" id="oip-app-topbar-logo-link" routerLink="">
|
|
1623
1624
|
<logo [height]="36" [width]="36"></logo>
|
|
1624
|
-
<span>
|
|
1625
|
+
<span>{{ 'app-info.title' | translate }}</span>
|
|
1625
1626
|
</a>
|
|
1626
1627
|
</div>
|
|
1627
1628
|
|
|
@@ -1708,7 +1709,7 @@ class AppTopbar {
|
|
|
1708
1709
|
</div>
|
|
1709
1710
|
</div>
|
|
1710
1711
|
</div>
|
|
1711
|
-
</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" }] }); }
|
|
1712
1713
|
}
|
|
1713
1714
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: AppTopbar, decorators: [{
|
|
1714
1715
|
type: Component,
|
|
@@ -1722,7 +1723,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImpor
|
|
|
1722
1723
|
TabList,
|
|
1723
1724
|
Tab,
|
|
1724
1725
|
AvatarModule,
|
|
1725
|
-
ButtonModule
|
|
1726
|
+
ButtonModule,
|
|
1727
|
+
TranslatePipe
|
|
1726
1728
|
], template: `
|
|
1727
1729
|
<div class="layout-topbar">
|
|
1728
1730
|
<div class="layout-topbar-logo-container">
|
|
@@ -1731,7 +1733,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImpor
|
|
|
1731
1733
|
</button>
|
|
1732
1734
|
<a class="layout-topbar-logo" id="oip-app-topbar-logo-link" routerLink="">
|
|
1733
1735
|
<logo [height]="36" [width]="36"></logo>
|
|
1734
|
-
<span>
|
|
1736
|
+
<span>{{ 'app-info.title' | translate }}</span>
|
|
1735
1737
|
</a>
|
|
1736
1738
|
</div>
|
|
1737
1739
|
|
|
@@ -1822,14 +1824,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImpor
|
|
|
1822
1824
|
}], ctorParameters: () => [{ type: LayoutService }] });
|
|
1823
1825
|
|
|
1824
1826
|
class FooterComponent {
|
|
1825
|
-
constructor() {
|
|
1827
|
+
constructor() {
|
|
1828
|
+
}
|
|
1826
1829
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: FooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1827
1830
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.2", type: FooterComponent, isStandalone: true, selector: "app-footer", ngImport: i0, template: `
|
|
1828
1831
|
<div class="layout-footer">
|
|
1829
|
-
<
|
|
1830
|
-
|
|
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>
|
|
1831
1837
|
</div>
|
|
1832
|
-
`, 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" }] }); }
|
|
1833
1839
|
}
|
|
1834
1840
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: FooterComponent, decorators: [{
|
|
1835
1841
|
type: Component,
|
|
@@ -1837,12 +1843,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImpor
|
|
|
1837
1843
|
selector: 'app-footer',
|
|
1838
1844
|
template: `
|
|
1839
1845
|
<div class="layout-footer">
|
|
1840
|
-
<
|
|
1841
|
-
|
|
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>
|
|
1842
1851
|
</div>
|
|
1843
1852
|
`,
|
|
1844
1853
|
standalone: true,
|
|
1845
|
-
imports: [LogoComponent]
|
|
1854
|
+
imports: [LogoComponent, TranslatePipe]
|
|
1846
1855
|
}]
|
|
1847
1856
|
}], ctorParameters: () => [] });
|
|
1848
1857
|
|
|
@@ -2325,12 +2334,12 @@ class MenuItemComponent {
|
|
|
2325
2334
|
});
|
|
2326
2335
|
}
|
|
2327
2336
|
editClick(event) {
|
|
2328
|
-
this.menuItemEditDialogComponent.showDialog();
|
|
2337
|
+
this.menuItemEditDialogComponent.showDialog().then();
|
|
2329
2338
|
}
|
|
2330
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 }); }
|
|
2331
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: `
|
|
2332
2341
|
<ng-container>
|
|
2333
|
-
<p-confirm-dialog
|
|
2342
|
+
<p-confirm-dialog/>
|
|
2334
2343
|
<div
|
|
2335
2344
|
*ngIf="root && item.visible !== false"
|
|
2336
2345
|
class="layout-menuitem-root-text"
|
|
@@ -2415,7 +2424,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImpor
|
|
|
2415
2424
|
selector: '[app-menuitem]',
|
|
2416
2425
|
template: `
|
|
2417
2426
|
<ng-container>
|
|
2418
|
-
<p-confirm-dialog
|
|
2427
|
+
<p-confirm-dialog/>
|
|
2419
2428
|
<div
|
|
2420
2429
|
*ngIf="root && item.visible !== false"
|
|
2421
2430
|
class="layout-menuitem-root-text"
|
|
@@ -2884,7 +2893,8 @@ class MenuComponent {
|
|
|
2884
2893
|
];
|
|
2885
2894
|
}
|
|
2886
2895
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: MenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2887
|
-
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)">
|
|
2888
2898
|
<ul class="layout-menu">
|
|
2889
2899
|
@for (item of menuService.menu; track item; let i = $index) {
|
|
2890
2900
|
<ng-container>
|
|
@@ -2904,10 +2914,10 @@ class MenuComponent {
|
|
|
2904
2914
|
}
|
|
2905
2915
|
</ul>
|
|
2906
2916
|
</div>
|
|
2907
|
-
<p-contextMenu [target]="empty"
|
|
2917
|
+
<p-contextMenu [target]="empty"/>
|
|
2908
2918
|
@if (securityService.isAdmin) {
|
|
2909
|
-
<menu-item-create-dialog
|
|
2910
|
-
<menu-item-edit-dialog
|
|
2919
|
+
<menu-item-create-dialog/>
|
|
2920
|
+
<menu-item-edit-dialog/>
|
|
2911
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"] }] }); }
|
|
2912
2922
|
}
|
|
2913
2923
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: MenuComponent, decorators: [{
|
|
@@ -2926,7 +2936,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImpor
|
|
|
2926
2936
|
providers: [Menu],
|
|
2927
2937
|
selector: 'app-menu',
|
|
2928
2938
|
standalone: true,
|
|
2929
|
-
template: `
|
|
2939
|
+
template: `
|
|
2940
|
+
<div #empty class="layout-sidebar" (contextmenu)="onContextMenu($event)">
|
|
2930
2941
|
<ul class="layout-menu">
|
|
2931
2942
|
@for (item of menuService.menu; track item; let i = $index) {
|
|
2932
2943
|
<ng-container>
|
|
@@ -2946,10 +2957,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImpor
|
|
|
2946
2957
|
}
|
|
2947
2958
|
</ul>
|
|
2948
2959
|
</div>
|
|
2949
|
-
<p-contextMenu [target]="empty"
|
|
2960
|
+
<p-contextMenu [target]="empty"/>
|
|
2950
2961
|
@if (securityService.isAdmin) {
|
|
2951
|
-
<menu-item-create-dialog
|
|
2952
|
-
<menu-item-edit-dialog
|
|
2962
|
+
<menu-item-create-dialog/>
|
|
2963
|
+
<menu-item-edit-dialog/>
|
|
2953
2964
|
}`
|
|
2954
2965
|
}]
|
|
2955
2966
|
}], propDecorators: { menuItemCreateDialogComponent: [{
|
|
@@ -3170,9 +3181,93 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImpor
|
|
|
3170
3181
|
}]
|
|
3171
3182
|
}] });
|
|
3172
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
|
+
|
|
3173
3264
|
class NotfoundComponent {
|
|
3174
|
-
|
|
3175
|
-
|
|
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/>
|
|
3176
3271
|
<div class="flex items-center justify-center min-h-screen overflow-hidden">
|
|
3177
3272
|
<div class="flex flex-col items-center justify-center">
|
|
3178
3273
|
<div
|
|
@@ -3181,22 +3276,23 @@ class NotfoundComponent {
|
|
|
3181
3276
|
class="w-full bg-surface-0 dark:bg-surface-900 py-20 px-8 sm:px-20 flex flex-col items-center"
|
|
3182
3277
|
style="border-radius: 53px">
|
|
3183
3278
|
<div class="flex flex-col items-center justify-center">
|
|
3184
|
-
<logo height="96" width="96"></logo>
|
|
3279
|
+
<logo [height]="96" [width]="96"></logo>
|
|
3185
3280
|
</div>
|
|
3186
|
-
<span class="text-primary font-bold text-3xl">
|
|
3187
|
-
<h1 class="text-surface-900 dark:text-surface-0 font-bold text-3xl lg:text-5xl mb-2">
|
|
3188
|
-
<div class="text-surface-600 dark:text-surface-200 mb-8">
|
|
3189
|
-
<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="/"/>
|
|
3190
3285
|
</div>
|
|
3191
3286
|
</div>
|
|
3192
3287
|
</div>
|
|
3193
|
-
</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" }] }); }
|
|
3194
3289
|
}
|
|
3195
3290
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: NotfoundComponent, decorators: [{
|
|
3196
3291
|
type: Component,
|
|
3197
3292
|
args: [{
|
|
3198
3293
|
selector: 'app-notfound',
|
|
3199
|
-
template: `
|
|
3294
|
+
template: `
|
|
3295
|
+
<app-floating-configurator/>
|
|
3200
3296
|
<div class="flex items-center justify-center min-h-screen overflow-hidden">
|
|
3201
3297
|
<div class="flex flex-col items-center justify-center">
|
|
3202
3298
|
<div
|
|
@@ -3205,20 +3301,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImpor
|
|
|
3205
3301
|
class="w-full bg-surface-0 dark:bg-surface-900 py-20 px-8 sm:px-20 flex flex-col items-center"
|
|
3206
3302
|
style="border-radius: 53px">
|
|
3207
3303
|
<div class="flex flex-col items-center justify-center">
|
|
3208
|
-
<logo height="96" width="96"></logo>
|
|
3304
|
+
<logo [height]="96" [width]="96"></logo>
|
|
3209
3305
|
</div>
|
|
3210
|
-
<span class="text-primary font-bold text-3xl">
|
|
3211
|
-
<h1 class="text-surface-900 dark:text-surface-0 font-bold text-3xl lg:text-5xl mb-2">
|
|
3212
|
-
<div class="text-surface-600 dark:text-surface-200 mb-8">
|
|
3213
|
-
<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="/"/>
|
|
3214
3310
|
</div>
|
|
3215
3311
|
</div>
|
|
3216
3312
|
</div>
|
|
3217
3313
|
</div>`,
|
|
3218
|
-
imports: [RouterLink, LogoComponent, Button, AppFloatingConfiguratorComponent],
|
|
3314
|
+
imports: [RouterLink, LogoComponent, Button, AppFloatingConfiguratorComponent, TranslateModule],
|
|
3219
3315
|
standalone: true
|
|
3220
3316
|
}]
|
|
3221
|
-
}] });
|
|
3317
|
+
}], ctorParameters: () => [{ type: L10nService }] });
|
|
3222
3318
|
|
|
3223
3319
|
class UnauthorizedComponent {
|
|
3224
3320
|
constructor() {
|
|
@@ -3436,72 +3532,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImpor
|
|
|
3436
3532
|
}]
|
|
3437
3533
|
}] });
|
|
3438
3534
|
|
|
3439
|
-
/**
|
|
3440
|
-
* Service for managing translation loading in the application
|
|
3441
|
-
*/
|
|
3442
|
-
class L10nService {
|
|
3443
|
-
constructor() {
|
|
3444
|
-
this.loadedTranslations = new Set();
|
|
3445
|
-
this.httpClient = inject(HttpClient$1);
|
|
3446
|
-
this.translateService = inject(TranslateService);
|
|
3447
|
-
}
|
|
3448
|
-
/**
|
|
3449
|
-
* Loads translations for a specific component
|
|
3450
|
-
* @param component - Name of the component to load translations for
|
|
3451
|
-
*/
|
|
3452
|
-
async loadComponentTranslations(component) {
|
|
3453
|
-
const lang = this.translateService.currentLang;
|
|
3454
|
-
await this.loadTranslations(component, lang);
|
|
3455
|
-
}
|
|
3456
|
-
/**
|
|
3457
|
-
* Gets the translated value of a key (or an array of keys)
|
|
3458
|
-
* @returns the translated key, or an object of translated keys
|
|
3459
|
-
*/
|
|
3460
|
-
async get(key) {
|
|
3461
|
-
await this.loadComponentTranslations(key);
|
|
3462
|
-
return this.translateService.get(key);
|
|
3463
|
-
}
|
|
3464
|
-
/**
|
|
3465
|
-
* Internal method to load translations from JSON files
|
|
3466
|
-
* @param component - Component or translation namespace
|
|
3467
|
-
* @param lang - Language code to load translations for
|
|
3468
|
-
*/
|
|
3469
|
-
async loadTranslations(component, lang) {
|
|
3470
|
-
// Create unique key for this component-language combination
|
|
3471
|
-
const key = `${component}.${lang}`;
|
|
3472
|
-
// Skip if translations are already loaded
|
|
3473
|
-
if (this.loadedTranslations.has(key)) {
|
|
3474
|
-
return;
|
|
3475
|
-
}
|
|
3476
|
-
try {
|
|
3477
|
-
// Load translation file from assets
|
|
3478
|
-
const translations = await lastValueFrom(this.httpClient.get(`./assets/i18n/${component}.${lang}.json`));
|
|
3479
|
-
// Get existing translations for the language
|
|
3480
|
-
const current = this.translateService.translations[lang] || {};
|
|
3481
|
-
// Merge new translations with existing ones
|
|
3482
|
-
this.translateService.setTranslation(lang, { ...current, ...translations }, true);
|
|
3483
|
-
// Mark these translations as loaded
|
|
3484
|
-
this.loadedTranslations.add(key);
|
|
3485
|
-
}
|
|
3486
|
-
catch (e) {
|
|
3487
|
-
console.warn(`No translations found for ${component}.${lang}.json`);
|
|
3488
|
-
console.error(e);
|
|
3489
|
-
}
|
|
3490
|
-
}
|
|
3491
|
-
/**
|
|
3492
|
-
* Changes the lang currently used
|
|
3493
|
-
*/
|
|
3494
|
-
use(selectedLanguage) {
|
|
3495
|
-
this.translateService.use(selectedLanguage);
|
|
3496
|
-
}
|
|
3497
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: L10nService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3498
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: L10nService, providedIn: 'root' }); }
|
|
3499
|
-
}
|
|
3500
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: L10nService, decorators: [{
|
|
3501
|
-
type: Injectable,
|
|
3502
|
-
args: [{ providedIn: 'root' }]
|
|
3503
|
-
}] });
|
|
3504
|
-
|
|
3505
3535
|
class ConfigComponent {
|
|
3506
3536
|
constructor() {
|
|
3507
3537
|
this.layoutService = inject(LayoutService);
|
|
@@ -3514,12 +3544,10 @@ class ConfigComponent {
|
|
|
3514
3544
|
{ value: 'en', label: 'English' },
|
|
3515
3545
|
{ value: 'ru', label: 'Русский' }
|
|
3516
3546
|
];
|
|
3547
|
+
this.l10nService.loadComponentTranslations('config');
|
|
3517
3548
|
this.selectedLanguage = this.layoutService.language();
|
|
3518
3549
|
}
|
|
3519
3550
|
async ngOnInit() {
|
|
3520
|
-
(await this.l10nService.get('config')).subscribe((l10n) => {
|
|
3521
|
-
this.l10n = l10n;
|
|
3522
|
-
});
|
|
3523
3551
|
}
|
|
3524
3552
|
/**
|
|
3525
3553
|
* Changes the application's language.
|
|
@@ -3530,7 +3558,7 @@ class ConfigComponent {
|
|
|
3530
3558
|
...config,
|
|
3531
3559
|
language: this.selectedLanguage
|
|
3532
3560
|
}));
|
|
3533
|
-
this.l10nService.use(this.selectedLanguage);
|
|
3561
|
+
this.l10nService.use(this.selectedLanguage, 'config');
|
|
3534
3562
|
}
|
|
3535
3563
|
async onSwitchChange() {
|
|
3536
3564
|
await this.menuService.loadMenu();
|
|
@@ -3541,15 +3569,15 @@ class ConfigComponent {
|
|
|
3541
3569
|
<div class="flex flex-col md:flex-row gap-4">
|
|
3542
3570
|
<div class="md:w-1/2">
|
|
3543
3571
|
<div class="card flex flex-col gap-4">
|
|
3544
|
-
<div class="font-semibold text-xl">{{
|
|
3572
|
+
<div class="font-semibold text-xl">{{ 'config.profile' | translate }}</div>
|
|
3545
3573
|
<div class="flex justify-content-end flex-wrap">
|
|
3546
3574
|
{{ userService.userName }}
|
|
3547
3575
|
</div>
|
|
3548
3576
|
<label>
|
|
3549
|
-
{{
|
|
3577
|
+
{{ 'config.photo' | translate }}
|
|
3550
3578
|
<span
|
|
3551
3579
|
class="pi pi-question-circle"
|
|
3552
|
-
pTooltip="{{
|
|
3580
|
+
pTooltip="{{ 'config.usePhoto256x256Pixel' | translate }}"
|
|
3553
3581
|
tooltipPosition="right"></span>
|
|
3554
3582
|
</label>
|
|
3555
3583
|
<div class="flex justify-content-end flex-wrap">
|
|
@@ -3559,8 +3587,8 @@ class ConfigComponent {
|
|
|
3559
3587
|
</div>
|
|
3560
3588
|
<div class="md:w-1/2">
|
|
3561
3589
|
<div class="card flex flex-col gap-4">
|
|
3562
|
-
<div class="font-semibold text-xl">{{
|
|
3563
|
-
<label> {{
|
|
3590
|
+
<div class="font-semibold text-xl">{{ 'config.localization' | translate }}</div>
|
|
3591
|
+
<label> {{ 'config.selectLanguage' | translate }} </label>
|
|
3564
3592
|
<div class="flex justify-content-end flex-wrap">
|
|
3565
3593
|
<p-select
|
|
3566
3594
|
class="w-full md:w-56"
|
|
@@ -3569,31 +3597,31 @@ class ConfigComponent {
|
|
|
3569
3597
|
optionValue="value"
|
|
3570
3598
|
[options]="languages"
|
|
3571
3599
|
[(ngModel)]="selectedLanguage"
|
|
3572
|
-
(onChange)="changeLanguage()"
|
|
3600
|
+
(onChange)="changeLanguage()"/>
|
|
3573
3601
|
</div>
|
|
3574
3602
|
</div>
|
|
3575
3603
|
</div>
|
|
3576
3604
|
@if (securityService.isAdmin()) {
|
|
3577
3605
|
<div class="md:w-1/2">
|
|
3578
3606
|
<div class="card flex flex-col gap-4">
|
|
3579
|
-
<div class="font-semibold text-xl">{{
|
|
3607
|
+
<div class="font-semibold text-xl">{{ 'config.menu' | translate }}</div>
|
|
3580
3608
|
<div class="flex items-center gap-2">
|
|
3581
|
-
<label for="oip-app-config-admin-mode">{{
|
|
3609
|
+
<label for="oip-app-config-admin-mode">{{ 'config.all' | translate }}</label>
|
|
3582
3610
|
<p-toggle-switch
|
|
3583
3611
|
id="oip-app-config-admin-mode"
|
|
3584
3612
|
[(ngModel)]="menuService.adminMode"
|
|
3585
3613
|
(onChange)="onSwitchChange()"></p-toggle-switch>
|
|
3586
3614
|
</div>
|
|
3587
3615
|
<div class="flex items-center gap-2">
|
|
3588
|
-
<label for="oip-app-config-admin-mode">{{
|
|
3589
|
-
<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"/>
|
|
3590
3618
|
</div>
|
|
3591
3619
|
</div>
|
|
3592
3620
|
</div>
|
|
3593
3621
|
}
|
|
3594
3622
|
</div>
|
|
3595
3623
|
</p-fluid>
|
|
3596
|
-
`, 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" }] }); }
|
|
3597
3625
|
}
|
|
3598
3626
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: ConfigComponent, decorators: [{
|
|
3599
3627
|
type: Component,
|
|
@@ -3604,15 +3632,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImpor
|
|
|
3604
3632
|
<div class="flex flex-col md:flex-row gap-4">
|
|
3605
3633
|
<div class="md:w-1/2">
|
|
3606
3634
|
<div class="card flex flex-col gap-4">
|
|
3607
|
-
<div class="font-semibold text-xl">{{
|
|
3635
|
+
<div class="font-semibold text-xl">{{ 'config.profile' | translate }}</div>
|
|
3608
3636
|
<div class="flex justify-content-end flex-wrap">
|
|
3609
3637
|
{{ userService.userName }}
|
|
3610
3638
|
</div>
|
|
3611
3639
|
<label>
|
|
3612
|
-
{{
|
|
3640
|
+
{{ 'config.photo' | translate }}
|
|
3613
3641
|
<span
|
|
3614
3642
|
class="pi pi-question-circle"
|
|
3615
|
-
pTooltip="{{
|
|
3643
|
+
pTooltip="{{ 'config.usePhoto256x256Pixel' | translate }}"
|
|
3616
3644
|
tooltipPosition="right"></span>
|
|
3617
3645
|
</label>
|
|
3618
3646
|
<div class="flex justify-content-end flex-wrap">
|
|
@@ -3622,8 +3650,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImpor
|
|
|
3622
3650
|
</div>
|
|
3623
3651
|
<div class="md:w-1/2">
|
|
3624
3652
|
<div class="card flex flex-col gap-4">
|
|
3625
|
-
<div class="font-semibold text-xl">{{
|
|
3626
|
-
<label> {{
|
|
3653
|
+
<div class="font-semibold text-xl">{{ 'config.localization' | translate }}</div>
|
|
3654
|
+
<label> {{ 'config.selectLanguage' | translate }} </label>
|
|
3627
3655
|
<div class="flex justify-content-end flex-wrap">
|
|
3628
3656
|
<p-select
|
|
3629
3657
|
class="w-full md:w-56"
|
|
@@ -3632,24 +3660,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImpor
|
|
|
3632
3660
|
optionValue="value"
|
|
3633
3661
|
[options]="languages"
|
|
3634
3662
|
[(ngModel)]="selectedLanguage"
|
|
3635
|
-
(onChange)="changeLanguage()"
|
|
3663
|
+
(onChange)="changeLanguage()"/>
|
|
3636
3664
|
</div>
|
|
3637
3665
|
</div>
|
|
3638
3666
|
</div>
|
|
3639
3667
|
@if (securityService.isAdmin()) {
|
|
3640
3668
|
<div class="md:w-1/2">
|
|
3641
3669
|
<div class="card flex flex-col gap-4">
|
|
3642
|
-
<div class="font-semibold text-xl">{{
|
|
3670
|
+
<div class="font-semibold text-xl">{{ 'config.menu' | translate }}</div>
|
|
3643
3671
|
<div class="flex items-center gap-2">
|
|
3644
|
-
<label for="oip-app-config-admin-mode">{{
|
|
3672
|
+
<label for="oip-app-config-admin-mode">{{ 'config.all' | translate }}</label>
|
|
3645
3673
|
<p-toggle-switch
|
|
3646
3674
|
id="oip-app-config-admin-mode"
|
|
3647
3675
|
[(ngModel)]="menuService.adminMode"
|
|
3648
3676
|
(onChange)="onSwitchChange()"></p-toggle-switch>
|
|
3649
3677
|
</div>
|
|
3650
3678
|
<div class="flex items-center gap-2">
|
|
3651
|
-
<label for="oip-app-config-admin-mode">{{
|
|
3652
|
-
<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"/>
|
|
3653
3681
|
</div>
|
|
3654
3682
|
</div>
|
|
3655
3683
|
</div>
|
|
@@ -3657,7 +3685,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImpor
|
|
|
3657
3685
|
</div>
|
|
3658
3686
|
</p-fluid>
|
|
3659
3687
|
`,
|
|
3660
|
-
imports: [ProfileComponent, Fluid, Tooltip, FormsModule, Select, TableModule, ToggleSwitchModule, RouterLink, Button]
|
|
3688
|
+
imports: [ProfileComponent, Fluid, Tooltip, FormsModule, Select, TableModule, ToggleSwitchModule, RouterLink, Button, TranslatePipe]
|
|
3661
3689
|
}]
|
|
3662
3690
|
}], ctorParameters: () => [] });
|
|
3663
3691
|
|
|
@@ -3685,87 +3713,89 @@ class DbMigrationComponent extends BaseModuleComponent {
|
|
|
3685
3713
|
}
|
|
3686
3714
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: DbMigrationComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3687
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: `
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
<div>
|
|
3691
|
-
<
|
|
3692
|
-
<div class="flex flex-row gap-2">
|
|
3693
|
-
<p-button
|
|
3694
|
-
icon="pi pi-refresh"
|
|
3695
|
-
pTooltip="Refresh"
|
|
3696
|
-
severity="secondary"
|
|
3697
|
-
tooltipPosition="bottom"
|
|
3698
|
-
[outlined]="true"
|
|
3699
|
-
(click)="refreshAction()" />
|
|
3700
|
-
<p-button
|
|
3701
|
-
icon="pi pi-filter-slash"
|
|
3702
|
-
pTooltip="Clean filter"
|
|
3703
|
-
severity="secondary"
|
|
3704
|
-
tooltipPosition="bottom"
|
|
3705
|
-
[outlined]="true"
|
|
3706
|
-
(click)="dt.clear()" />
|
|
3707
|
-
</div>
|
|
3716
|
+
@if (isContent) {
|
|
3717
|
+
|
|
3718
|
+
<div class="card" style="height: 100%">
|
|
3719
|
+
<p-confirmDialog/>
|
|
3708
3720
|
<div>
|
|
3709
|
-
<
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
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>
|
|
3722
3752
|
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
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
|
-
|
|
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>
|
|
3762
3793
|
</div>
|
|
3763
3794
|
</div>
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
<security [controller]="controller" [id]="id" />
|
|
3795
|
+
} @else if (isSecurity) {
|
|
3796
|
+
<security [controller]="controller" [id]="id"/>
|
|
3767
3797
|
}
|
|
3768
|
-
`, 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"] }] }); }
|
|
3769
3799
|
}
|
|
3770
3800
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: DbMigrationComponent, decorators: [{
|
|
3771
3801
|
type: Component,
|
|
@@ -3779,91 +3809,92 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImpor
|
|
|
3779
3809
|
ButtonModule,
|
|
3780
3810
|
FormsModule,
|
|
3781
3811
|
ConfirmDialog,
|
|
3782
|
-
NgIf,
|
|
3783
3812
|
SecurityComponent,
|
|
3784
3813
|
Tooltip
|
|
3785
3814
|
],
|
|
3786
3815
|
selector: 'db-migration',
|
|
3787
3816
|
template: `
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
<div>
|
|
3791
|
-
<
|
|
3792
|
-
<div class="flex flex-row gap-2">
|
|
3793
|
-
<p-button
|
|
3794
|
-
icon="pi pi-refresh"
|
|
3795
|
-
pTooltip="Refresh"
|
|
3796
|
-
severity="secondary"
|
|
3797
|
-
tooltipPosition="bottom"
|
|
3798
|
-
[outlined]="true"
|
|
3799
|
-
(click)="refreshAction()" />
|
|
3800
|
-
<p-button
|
|
3801
|
-
icon="pi pi-filter-slash"
|
|
3802
|
-
pTooltip="Clean filter"
|
|
3803
|
-
severity="secondary"
|
|
3804
|
-
tooltipPosition="bottom"
|
|
3805
|
-
[outlined]="true"
|
|
3806
|
-
(click)="dt.clear()" />
|
|
3807
|
-
</div>
|
|
3817
|
+
@if (isContent) {
|
|
3818
|
+
|
|
3819
|
+
<div class="card" style="height: 100%">
|
|
3820
|
+
<p-confirmDialog/>
|
|
3808
3821
|
<div>
|
|
3809
|
-
<
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
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>
|
|
3822
3853
|
|
|
3823
|
-
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
|
|
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
|
-
|
|
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>
|
|
3862
3894
|
</div>
|
|
3863
3895
|
</div>
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
<security [controller]="controller" [id]="id" />
|
|
3896
|
+
} @else if (isSecurity) {
|
|
3897
|
+
<security [controller]="controller" [id]="id"/>
|
|
3867
3898
|
}
|
|
3868
3899
|
`,
|
|
3869
3900
|
providers: [ConfirmationService]
|
|
@@ -3966,8 +3997,8 @@ class AppModulesComponent {
|
|
|
3966
3997
|
this.moduleService = inject(Module);
|
|
3967
3998
|
}
|
|
3968
3999
|
async ngOnInit() {
|
|
3969
|
-
|
|
3970
|
-
this.l10n =
|
|
4000
|
+
this.l10nService.get('app-modules').subscribe((l10n) => {
|
|
4001
|
+
this.l10n = l10n;
|
|
3971
4002
|
});
|
|
3972
4003
|
this.titleService.setTitle(this.l10n.title);
|
|
3973
4004
|
await this.refreshAction();
|
|
@@ -4016,16 +4047,16 @@ class AppModulesComponent {
|
|
|
4016
4047
|
severity="secondary"
|
|
4017
4048
|
text="true"
|
|
4018
4049
|
tooltipPosition="bottom"
|
|
4019
|
-
[pTooltip]="
|
|
4050
|
+
[pTooltip]="'app-modules.refreshTooltip' | translate"
|
|
4020
4051
|
(onClick)="refreshAction()"></p-button>
|
|
4021
4052
|
</p-toolbar>
|
|
4022
4053
|
</div>
|
|
4023
4054
|
<p-table class="mt-4" [paginator]="true" [rows]="100" [value]="modules">
|
|
4024
4055
|
<ng-template pTemplate="header">
|
|
4025
4056
|
<tr>
|
|
4026
|
-
<th>{{
|
|
4027
|
-
<th>{{
|
|
4028
|
-
<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>
|
|
4029
4060
|
<th style="width: 4rem"></th>
|
|
4030
4061
|
</tr>
|
|
4031
4062
|
</ng-template>
|
|
@@ -4036,7 +4067,7 @@ class AppModulesComponent {
|
|
|
4036
4067
|
<td>
|
|
4037
4068
|
<p-tag
|
|
4038
4069
|
[severity]="module.currentlyLoaded ? 'success' : 'danger'"
|
|
4039
|
-
[value]="module.currentlyLoaded ?
|
|
4070
|
+
[value]="(module.currentlyLoaded ? 'app-modules.table.yes' : 'app-modules.table.no') | translate"></p-tag>
|
|
4040
4071
|
</td>
|
|
4041
4072
|
<td>
|
|
4042
4073
|
<p-button
|
|
@@ -4045,7 +4076,7 @@ class AppModulesComponent {
|
|
|
4045
4076
|
severity="danger"
|
|
4046
4077
|
text="true"
|
|
4047
4078
|
tooltipPosition="bottom"
|
|
4048
|
-
[pTooltip]="
|
|
4079
|
+
[pTooltip]="'app-modules.table.deleteTooltip' | translate"
|
|
4049
4080
|
(onClick)="deleteModule(module)"></p-button>
|
|
4050
4081
|
</td>
|
|
4051
4082
|
</tr>
|
|
@@ -4053,12 +4084,12 @@ class AppModulesComponent {
|
|
|
4053
4084
|
</p-table>
|
|
4054
4085
|
</div>
|
|
4055
4086
|
</div>
|
|
4056
|
-
`, 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" }] }); }
|
|
4057
4088
|
}
|
|
4058
4089
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: AppModulesComponent, decorators: [{
|
|
4059
4090
|
type: Component,
|
|
4060
4091
|
args: [{
|
|
4061
|
-
imports: [FormsModule, TableModule, Tag, ButtonModule, ToolbarModule, Tooltip, ConfirmDialog],
|
|
4092
|
+
imports: [FormsModule, TableModule, Tag, ButtonModule, ToolbarModule, Tooltip, ConfirmDialog, TranslatePipe],
|
|
4062
4093
|
providers: [ConfirmationService, Module],
|
|
4063
4094
|
selector: 'app-modules',
|
|
4064
4095
|
template: `
|
|
@@ -4076,16 +4107,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImpor
|
|
|
4076
4107
|
severity="secondary"
|
|
4077
4108
|
text="true"
|
|
4078
4109
|
tooltipPosition="bottom"
|
|
4079
|
-
[pTooltip]="
|
|
4110
|
+
[pTooltip]="'app-modules.refreshTooltip' | translate"
|
|
4080
4111
|
(onClick)="refreshAction()"></p-button>
|
|
4081
4112
|
</p-toolbar>
|
|
4082
4113
|
</div>
|
|
4083
4114
|
<p-table class="mt-4" [paginator]="true" [rows]="100" [value]="modules">
|
|
4084
4115
|
<ng-template pTemplate="header">
|
|
4085
4116
|
<tr>
|
|
4086
|
-
<th>{{
|
|
4087
|
-
<th>{{
|
|
4088
|
-
<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>
|
|
4089
4120
|
<th style="width: 4rem"></th>
|
|
4090
4121
|
</tr>
|
|
4091
4122
|
</ng-template>
|
|
@@ -4096,7 +4127,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImpor
|
|
|
4096
4127
|
<td>
|
|
4097
4128
|
<p-tag
|
|
4098
4129
|
[severity]="module.currentlyLoaded ? 'success' : 'danger'"
|
|
4099
|
-
[value]="module.currentlyLoaded ?
|
|
4130
|
+
[value]="(module.currentlyLoaded ? 'app-modules.table.yes' : 'app-modules.table.no') | translate"></p-tag>
|
|
4100
4131
|
</td>
|
|
4101
4132
|
<td>
|
|
4102
4133
|
<p-button
|
|
@@ -4105,7 +4136,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImpor
|
|
|
4105
4136
|
severity="danger"
|
|
4106
4137
|
text="true"
|
|
4107
4138
|
tooltipPosition="bottom"
|
|
4108
|
-
[pTooltip]="
|
|
4139
|
+
[pTooltip]="'app-modules.table.deleteTooltip' | translate"
|
|
4109
4140
|
(onClick)="deleteModule(module)"></p-button>
|
|
4110
4141
|
</td>
|
|
4111
4142
|
</tr>
|