@flusys/ng-localization 4.1.0 → 4.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -320,13 +320,13 @@ class LocalizationStateService {
|
|
|
320
320
|
hasModuleFallbacks(module) {
|
|
321
321
|
return this._moduleFallbacks.has(module);
|
|
322
322
|
}
|
|
323
|
-
static ɵfac =
|
|
324
|
-
static ɵprov =
|
|
323
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: LocalizationStateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
324
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: LocalizationStateService, providedIn: 'root' });
|
|
325
325
|
}
|
|
326
|
-
(
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
326
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: LocalizationStateService, decorators: [{
|
|
327
|
+
type: Injectable,
|
|
328
|
+
args: [{ providedIn: 'root' }]
|
|
329
|
+
}], ctorParameters: () => [] });
|
|
330
330
|
|
|
331
331
|
class LocalizationApiService {
|
|
332
332
|
http = inject(HttpClient);
|
|
@@ -340,13 +340,13 @@ class LocalizationApiService {
|
|
|
340
340
|
getTranslationsByLanguage(languageCode, modules) {
|
|
341
341
|
return this.http.post(`${this.baseUrl}/translation/get-by-language`, { languageCode, ...(modules?.length ? { modules } : {}) });
|
|
342
342
|
}
|
|
343
|
-
static ɵfac =
|
|
344
|
-
static ɵprov =
|
|
343
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: LocalizationApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
344
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: LocalizationApiService, providedIn: 'root' });
|
|
345
345
|
}
|
|
346
|
-
(
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
346
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: LocalizationApiService, decorators: [{
|
|
347
|
+
type: Injectable,
|
|
348
|
+
args: [{ providedIn: 'root' }]
|
|
349
|
+
}] });
|
|
350
350
|
|
|
351
351
|
class LocalizationInitializerService {
|
|
352
352
|
config = inject(LOCALIZATION_CONFIG, { optional: true });
|
|
@@ -383,13 +383,13 @@ class LocalizationInitializerService {
|
|
|
383
383
|
this.stateService.setInitialized(true);
|
|
384
384
|
}
|
|
385
385
|
}
|
|
386
|
-
static ɵfac =
|
|
387
|
-
static ɵprov =
|
|
386
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: LocalizationInitializerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
387
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: LocalizationInitializerService, providedIn: 'root' });
|
|
388
388
|
}
|
|
389
|
-
(
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
389
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: LocalizationInitializerService, decorators: [{
|
|
390
|
+
type: Injectable,
|
|
391
|
+
args: [{ providedIn: 'root' }]
|
|
392
|
+
}] });
|
|
393
393
|
|
|
394
394
|
class TranslateService {
|
|
395
395
|
localizationState = inject(LocalizationStateService);
|
|
@@ -428,13 +428,13 @@ class TranslateService {
|
|
|
428
428
|
const value = fallbacks[key] ?? key;
|
|
429
429
|
return this.interpolate(value, params);
|
|
430
430
|
}
|
|
431
|
-
static ɵfac =
|
|
432
|
-
static ɵprov =
|
|
431
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: TranslateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
432
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: TranslateService, providedIn: 'root' });
|
|
433
433
|
}
|
|
434
|
-
(
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
434
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: TranslateService, decorators: [{
|
|
435
|
+
type: Injectable,
|
|
436
|
+
args: [{ providedIn: 'root' }]
|
|
437
|
+
}] });
|
|
438
438
|
|
|
439
439
|
class TranslationLoaderService {
|
|
440
440
|
DEFAULT_INITIAL_MODULES = ['shared', 'layout'];
|
|
@@ -499,13 +499,13 @@ class TranslationLoaderService {
|
|
|
499
499
|
loadTranslationsAsync(languageCode, clearModules = false) {
|
|
500
500
|
return from(this.loadTranslations(languageCode, clearModules));
|
|
501
501
|
}
|
|
502
|
-
static ɵfac =
|
|
503
|
-
static ɵprov =
|
|
502
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: TranslationLoaderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
503
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: TranslationLoaderService, providedIn: 'root' });
|
|
504
504
|
}
|
|
505
|
-
(
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
505
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: TranslationLoaderService, decorators: [{
|
|
506
|
+
type: Injectable,
|
|
507
|
+
args: [{ providedIn: 'root' }]
|
|
508
|
+
}] });
|
|
509
509
|
|
|
510
510
|
class LanguageApiService {
|
|
511
511
|
http = inject(HttpClient);
|
|
@@ -535,13 +535,13 @@ class LanguageApiService {
|
|
|
535
535
|
setDefault(id) {
|
|
536
536
|
return this.http.post(`${this.baseUrl}/set-default`, { id });
|
|
537
537
|
}
|
|
538
|
-
static ɵfac =
|
|
539
|
-
static ɵprov =
|
|
538
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: LanguageApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
539
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: LanguageApiService, providedIn: 'root' });
|
|
540
540
|
}
|
|
541
|
-
(
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
541
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: LanguageApiService, decorators: [{
|
|
542
|
+
type: Injectable,
|
|
543
|
+
args: [{ providedIn: 'root' }]
|
|
544
|
+
}] });
|
|
545
545
|
|
|
546
546
|
class TranslationKeyApiService {
|
|
547
547
|
http = inject(HttpClient);
|
|
@@ -579,13 +579,13 @@ class TranslationKeyApiService {
|
|
|
579
579
|
delete(id) {
|
|
580
580
|
return this.http.post(`${this.baseUrl}/delete`, { id, type: 'delete' });
|
|
581
581
|
}
|
|
582
|
-
static ɵfac =
|
|
583
|
-
static ɵprov =
|
|
582
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: TranslationKeyApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
583
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: TranslationKeyApiService, providedIn: 'root' });
|
|
584
584
|
}
|
|
585
|
-
(
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
585
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: TranslationKeyApiService, decorators: [{
|
|
586
|
+
type: Injectable,
|
|
587
|
+
args: [{ providedIn: 'root' }]
|
|
588
|
+
}] });
|
|
589
589
|
|
|
590
590
|
class TranslationApiService {
|
|
591
591
|
http = inject(HttpClient);
|
|
@@ -632,41 +632,14 @@ class TranslationApiService {
|
|
|
632
632
|
getCounts() {
|
|
633
633
|
return this.http.post(`${this.baseUrl}/get-counts`, {});
|
|
634
634
|
}
|
|
635
|
-
static ɵfac =
|
|
636
|
-
static ɵprov =
|
|
635
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: TranslationApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
636
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: TranslationApiService, providedIn: 'root' });
|
|
637
637
|
}
|
|
638
|
-
(
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
const _forTrack0$3 = ($index, $item) => $item.id;
|
|
644
|
-
function LanguageSelectorComponent_For_7_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
645
|
-
i0.ɵɵelement(0, "i", 9);
|
|
646
|
-
} }
|
|
647
|
-
function LanguageSelectorComponent_For_7_Template(rf, ctx) { if (rf & 1) {
|
|
648
|
-
const _r1 = i0.ɵɵgetCurrentView();
|
|
649
|
-
i0.ɵɵelementStart(0, "button", 6);
|
|
650
|
-
i0.ɵɵlistener("click", function LanguageSelectorComponent_For_7_Template_button_click_0_listener() { const lang_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onLanguageSelect(lang_r2.code)); });
|
|
651
|
-
i0.ɵɵelementStart(1, "span", 7);
|
|
652
|
-
i0.ɵɵtext(2);
|
|
653
|
-
i0.ɵɵelementEnd();
|
|
654
|
-
i0.ɵɵelementStart(3, "span", 8);
|
|
655
|
-
i0.ɵɵtext(4);
|
|
656
|
-
i0.ɵɵelementEnd();
|
|
657
|
-
i0.ɵɵconditionalCreate(5, LanguageSelectorComponent_For_7_Conditional_5_Template, 1, 0, "i", 9);
|
|
658
|
-
i0.ɵɵelementEnd();
|
|
659
|
-
} if (rf & 2) {
|
|
660
|
-
const lang_r2 = ctx.$implicit;
|
|
661
|
-
const ctx_r2 = i0.ɵɵnextContext();
|
|
662
|
-
i0.ɵɵclassProp("bg-primary-50", lang_r2.code === ctx_r2.selectedLanguageCode())("text-primary", lang_r2.code === ctx_r2.selectedLanguageCode());
|
|
663
|
-
i0.ɵɵadvance(2);
|
|
664
|
-
i0.ɵɵtextInterpolate(lang_r2.nativeName || lang_r2.name);
|
|
665
|
-
i0.ɵɵadvance(2);
|
|
666
|
-
i0.ɵɵtextInterpolate1("(", lang_r2.code, ")");
|
|
667
|
-
i0.ɵɵadvance();
|
|
668
|
-
i0.ɵɵconditional(lang_r2.code === ctx_r2.selectedLanguageCode() ? 5 : -1);
|
|
669
|
-
} }
|
|
638
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: TranslationApiService, decorators: [{
|
|
639
|
+
type: Injectable,
|
|
640
|
+
args: [{ providedIn: 'root' }]
|
|
641
|
+
}] });
|
|
642
|
+
|
|
670
643
|
class LanguageSelectorComponent {
|
|
671
644
|
localizationState = inject(LocalizationStateService);
|
|
672
645
|
translationLoader = inject(TranslationLoaderService);
|
|
@@ -702,34 +675,51 @@ class LanguageSelectorComponent {
|
|
|
702
675
|
.subscribe();
|
|
703
676
|
}
|
|
704
677
|
}
|
|
705
|
-
static ɵfac =
|
|
706
|
-
static ɵcmp =
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
678
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: LanguageSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
679
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.5", type: LanguageSelectorComponent, isStandalone: true, selector: "lib-language-selector", host: { classAttribute: "relative" }, ngImport: i0, template: `
|
|
680
|
+
<button
|
|
681
|
+
type="button"
|
|
682
|
+
class="layout-topbar-action"
|
|
683
|
+
[class.layout-topbar-action-highlight]="isActive()"
|
|
684
|
+
pStyleClass="@next"
|
|
685
|
+
enterFromClass="hidden"
|
|
686
|
+
enterActiveClass="animate-scalein"
|
|
687
|
+
leaveToClass="hidden"
|
|
688
|
+
leaveActiveClass="animate-fadeout"
|
|
689
|
+
[hideOnOutsideClick]="true"
|
|
690
|
+
(click)="togglePanel()">
|
|
691
|
+
<i class="pi pi-globe"></i>
|
|
692
|
+
<span class="font-semibold">{{ selectedLanguage()?.nativeName || selectedLanguage()?.name || selectedLanguageCode() }}</span>
|
|
693
|
+
</button>
|
|
694
|
+
<div
|
|
695
|
+
class="hidden absolute top-[3.25rem] z-50 p-3 border border-surface rounded-border origin-top shadow-[0px_3px_5px_rgba(0,0,0,0.02),0px_0px_2px_rgba(0,0,0,0.05),0px_1px_4px_rgba(0,0,0,0.08)] min-w-[180px]"
|
|
696
|
+
style="background-color: var(--surface-overlay); inset-inline-end: 0;">
|
|
697
|
+
<div class="flex flex-col">
|
|
698
|
+
@for (lang of languages(); track lang.id) {
|
|
699
|
+
<button
|
|
700
|
+
type="button"
|
|
701
|
+
class="flex items-center gap-3 px-3 py-2.5 rounded-border cursor-pointer transition-all duration-200 text-left w-full border-none bg-transparent hover:bg-emphasis"
|
|
702
|
+
[class.bg-primary-50]="lang.code === selectedLanguageCode()"
|
|
703
|
+
[class.text-primary]="lang.code === selectedLanguageCode()"
|
|
704
|
+
(click)="onLanguageSelect(lang.code)">
|
|
705
|
+
<span class="font-medium flex-1">{{ lang.nativeName || lang.name }}</span>
|
|
706
|
+
<span class="text-xs text-muted-color uppercase">({{ lang.code }})</span>
|
|
707
|
+
@if (lang.code === selectedLanguageCode()) {
|
|
708
|
+
<i class="pi pi-check text-primary text-sm"></i>
|
|
709
|
+
}
|
|
710
|
+
</button>
|
|
711
|
+
}
|
|
712
|
+
</div>
|
|
713
|
+
</div>
|
|
714
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: StyleClassModule }, { kind: "directive", type: i1.StyleClass, selector: "[pStyleClass]", inputs: ["pStyleClass", "enterFromClass", "enterActiveClass", "enterToClass", "leaveFromClass", "leaveActiveClass", "leaveToClass", "hideOnOutsideClick", "toggleClass", "hideOnEscape", "hideOnResize", "resizeSelector"] }] });
|
|
725
715
|
}
|
|
726
|
-
(
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
716
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: LanguageSelectorComponent, decorators: [{
|
|
717
|
+
type: Component,
|
|
718
|
+
args: [{
|
|
719
|
+
selector: 'lib-language-selector',
|
|
720
|
+
imports: [StyleClassModule],
|
|
721
|
+
host: { class: 'relative' },
|
|
722
|
+
template: `
|
|
733
723
|
<button
|
|
734
724
|
type="button"
|
|
735
725
|
class="layout-topbar-action"
|
|
@@ -765,37 +755,9 @@ class LanguageSelectorComponent {
|
|
|
765
755
|
</div>
|
|
766
756
|
</div>
|
|
767
757
|
`,
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
const _forTrack0$2 = ($index, $item) => $item.id;
|
|
773
|
-
function LanguageSelectorPanelComponent_For_2_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
774
|
-
i0.ɵɵdomElement(0, "i", 5);
|
|
775
|
-
} }
|
|
776
|
-
function LanguageSelectorPanelComponent_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
777
|
-
const _r1 = i0.ɵɵgetCurrentView();
|
|
778
|
-
i0.ɵɵdomElementStart(0, "button", 2);
|
|
779
|
-
i0.ɵɵdomListener("click", function LanguageSelectorPanelComponent_For_2_Template_button_click_0_listener() { const lang_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onLanguageSelect(lang_r2.code)); });
|
|
780
|
-
i0.ɵɵdomElementStart(1, "span", 3);
|
|
781
|
-
i0.ɵɵtext(2);
|
|
782
|
-
i0.ɵɵdomElementEnd();
|
|
783
|
-
i0.ɵɵdomElementStart(3, "span", 4);
|
|
784
|
-
i0.ɵɵtext(4);
|
|
785
|
-
i0.ɵɵdomElementEnd();
|
|
786
|
-
i0.ɵɵconditionalCreate(5, LanguageSelectorPanelComponent_For_2_Conditional_5_Template, 1, 0, "i", 5);
|
|
787
|
-
i0.ɵɵdomElementEnd();
|
|
788
|
-
} if (rf & 2) {
|
|
789
|
-
const lang_r2 = ctx.$implicit;
|
|
790
|
-
const ctx_r2 = i0.ɵɵnextContext();
|
|
791
|
-
i0.ɵɵclassProp("bg-primary-50", lang_r2.code === ctx_r2.selectedLanguageCode())("text-primary", lang_r2.code === ctx_r2.selectedLanguageCode());
|
|
792
|
-
i0.ɵɵadvance(2);
|
|
793
|
-
i0.ɵɵtextInterpolate(lang_r2.nativeName || lang_r2.name);
|
|
794
|
-
i0.ɵɵadvance(2);
|
|
795
|
-
i0.ɵɵtextInterpolate1("(", lang_r2.code, ")");
|
|
796
|
-
i0.ɵɵadvance();
|
|
797
|
-
i0.ɵɵconditional(lang_r2.code === ctx_r2.selectedLanguageCode() ? 5 : -1);
|
|
798
|
-
} }
|
|
758
|
+
}]
|
|
759
|
+
}], ctorParameters: () => [] });
|
|
760
|
+
|
|
799
761
|
class LanguageSelectorPanelComponent {
|
|
800
762
|
localizationState = inject(LocalizationStateService);
|
|
801
763
|
translationLoader = inject(TranslationLoaderService);
|
|
@@ -822,26 +784,36 @@ class LanguageSelectorPanelComponent {
|
|
|
822
784
|
.subscribe();
|
|
823
785
|
}
|
|
824
786
|
}
|
|
825
|
-
static ɵfac =
|
|
826
|
-
static ɵcmp =
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
787
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: LanguageSelectorPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
788
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.5", type: LanguageSelectorPanelComponent, isStandalone: true, selector: "lib-language-selector-panel", host: { styleAttribute: "background-color: var(--surface-overlay); inset-inline-end: 0;", classAttribute: "hidden absolute top-[3.25rem] z-50 p-3 border border-surface rounded-border origin-top shadow-[0px_3px_5px_rgba(0,0,0,0.02),0px_0px_2px_rgba(0,0,0,0.05),0px_1px_4px_rgba(0,0,0,0.08)] min-w-[180px]" }, ngImport: i0, template: `
|
|
789
|
+
<div class="flex flex-col">
|
|
790
|
+
@for (lang of languages(); track lang.id) {
|
|
791
|
+
<button
|
|
792
|
+
type="button"
|
|
793
|
+
class="flex items-center gap-3 px-3 py-2.5 rounded-border cursor-pointer transition-all duration-200 text-left w-full border-none bg-transparent hover:bg-emphasis"
|
|
794
|
+
[class.bg-primary-50]="lang.code === selectedLanguageCode()"
|
|
795
|
+
[class.text-primary]="lang.code === selectedLanguageCode()"
|
|
796
|
+
(click)="onLanguageSelect(lang.code)">
|
|
797
|
+
<span class="font-medium flex-1">{{ lang.nativeName || lang.name }}</span>
|
|
798
|
+
<span class="text-xs text-muted-color uppercase">({{ lang.code }})</span>
|
|
799
|
+
@if (lang.code === selectedLanguageCode()) {
|
|
800
|
+
<i class="pi pi-check text-primary text-sm"></i>
|
|
801
|
+
}
|
|
802
|
+
</button>
|
|
803
|
+
}
|
|
804
|
+
</div>
|
|
805
|
+
`, isInline: true });
|
|
834
806
|
}
|
|
835
|
-
(
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
807
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: LanguageSelectorPanelComponent, decorators: [{
|
|
808
|
+
type: Component,
|
|
809
|
+
args: [{
|
|
810
|
+
selector: 'lib-language-selector-panel',
|
|
811
|
+
imports: [],
|
|
812
|
+
host: {
|
|
813
|
+
class: 'hidden absolute top-[3.25rem] z-50 p-3 border border-surface rounded-border origin-top shadow-[0px_3px_5px_rgba(0,0,0,0.02),0px_0px_2px_rgba(0,0,0,0.05),0px_1px_4px_rgba(0,0,0,0.08)] min-w-[180px]',
|
|
814
|
+
style: 'background-color: var(--surface-overlay); inset-inline-end: 0;',
|
|
815
|
+
},
|
|
816
|
+
template: `
|
|
845
817
|
<div class="flex flex-col">
|
|
846
818
|
@for (lang of languages(); track lang.id) {
|
|
847
819
|
<button
|
|
@@ -859,9 +831,8 @@ class LanguageSelectorPanelComponent {
|
|
|
859
831
|
}
|
|
860
832
|
</div>
|
|
861
833
|
`,
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LanguageSelectorPanelComponent, { className: "LanguageSelectorPanelComponent", filePath: "components/language-selector-panel/language-selector-panel.component.ts", lineNumber: 33 }); })();
|
|
834
|
+
}]
|
|
835
|
+
}], ctorParameters: () => [] });
|
|
865
836
|
|
|
866
837
|
function provideLocalization(config) {
|
|
867
838
|
const providers = [
|
|
@@ -927,22 +898,6 @@ const LOCALIZATION_ROUTES = [
|
|
|
927
898
|
},
|
|
928
899
|
];
|
|
929
900
|
|
|
930
|
-
const _forTrack0$1 = ($index, $item) => $item.id;
|
|
931
|
-
function LocalizationContainerPage_For_10_Template(rf, ctx) { if (rf & 1) {
|
|
932
|
-
i0.ɵɵelementStart(0, "a", 5);
|
|
933
|
-
i0.ɵɵelement(1, "i");
|
|
934
|
-
i0.ɵɵelementStart(2, "span");
|
|
935
|
-
i0.ɵɵtext(3);
|
|
936
|
-
i0.ɵɵpipe(4, "translate");
|
|
937
|
-
i0.ɵɵelementEnd()();
|
|
938
|
-
} if (rf & 2) {
|
|
939
|
-
const tab_r1 = ctx.$implicit;
|
|
940
|
-
i0.ɵɵproperty("routerLink", tab_r1.route);
|
|
941
|
-
i0.ɵɵadvance();
|
|
942
|
-
i0.ɵɵclassMap(tab_r1.icon);
|
|
943
|
-
i0.ɵɵadvance(2);
|
|
944
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 4, tab_r1.labelKey));
|
|
945
|
-
} }
|
|
946
901
|
class LocalizationContainerPage {
|
|
947
902
|
permissionValidator = inject(PermissionValidatorService);
|
|
948
903
|
allTabs = [
|
|
@@ -975,33 +930,34 @@ class LocalizationContainerPage {
|
|
|
975
930
|
return [];
|
|
976
931
|
return this.allTabs.filter((tab) => this.permissionValidator.hasPermission(tab.permission));
|
|
977
932
|
}, ...(ngDevMode ? [{ debugName: "visibleTabs" }] : []));
|
|
978
|
-
static ɵfac =
|
|
979
|
-
static ɵcmp =
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
933
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: LocalizationContainerPage, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
934
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.5", type: LocalizationContainerPage, isStandalone: true, selector: "lib-localization-container", ngImport: i0, template: `
|
|
935
|
+
<div class="p-2 sm:p-4">
|
|
936
|
+
<div class="mb-4">
|
|
937
|
+
<h1 class="text-xl sm:text-2xl font-bold m-0">{{ 'localization.title' | translate }}</h1>
|
|
938
|
+
<p class="text-muted-color mt-1 text-sm sm:text-base">{{ 'localization.subtitle' | translate }}</p>
|
|
939
|
+
</div>
|
|
940
|
+
|
|
941
|
+
<div class="scrollbar-hide flex gap-1 mb-4 border-b border-surface overflow-x-auto flex-nowrap">
|
|
942
|
+
@for (tab of visibleTabs(); track tab.id) {
|
|
943
|
+
<a
|
|
944
|
+
[routerLink]="tab.route"
|
|
945
|
+
routerLinkActive="tab-active"
|
|
946
|
+
class="flex items-center gap-2 px-4 py-2 rounded-t-lg cursor-pointer transition-colors text-muted-color no-underline border-b-2 border-transparent -mb-px hover:bg-surface-hover [&.tab-active]:text-primary [&.tab-active]:border-primary [&.tab-active]:bg-surface-ground whitespace-nowrap shrink-0"
|
|
947
|
+
>
|
|
948
|
+
<i [class]="tab.icon"></i>
|
|
949
|
+
<span>{{ tab.labelKey | translate }}</span>
|
|
950
|
+
</a>
|
|
951
|
+
}
|
|
952
|
+
</div>
|
|
953
|
+
|
|
954
|
+
<router-outlet />
|
|
955
|
+
</div>
|
|
956
|
+
`, isInline: true, styles: [".scrollbar-hide{-ms-overflow-style:none;scrollbar-width:none}.scrollbar-hide::-webkit-scrollbar{display:none}\n"], dependencies: [{ kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
1001
957
|
}
|
|
1002
|
-
(
|
|
1003
|
-
|
|
1004
|
-
|
|
958
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: LocalizationContainerPage, decorators: [{
|
|
959
|
+
type: Component,
|
|
960
|
+
args: [{ selector: 'lib-localization-container', imports: [RouterOutlet, RouterLink, RouterLinkActive, TranslatePipe], template: `
|
|
1005
961
|
<div class="p-2 sm:p-4">
|
|
1006
962
|
<div class="mb-4">
|
|
1007
963
|
<h1 class="text-xl sm:text-2xl font-bold m-0">{{ 'localization.title' | translate }}</h1>
|
|
@@ -1024,160 +980,13 @@ class LocalizationContainerPage {
|
|
|
1024
980
|
<router-outlet />
|
|
1025
981
|
</div>
|
|
1026
982
|
`, styles: [".scrollbar-hide{-ms-overflow-style:none;scrollbar-width:none}.scrollbar-hide::-webkit-scrollbar{display:none}\n"] }]
|
|
1027
|
-
|
|
1028
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LocalizationContainerPage, { className: "LocalizationContainerPage", filePath: "pages/localization-container/localization-container.page.ts", lineNumber: 53 }); })();
|
|
983
|
+
}] });
|
|
1029
984
|
|
|
1030
985
|
var localizationContainer_page = /*#__PURE__*/Object.freeze({
|
|
1031
986
|
__proto__: null,
|
|
1032
987
|
LocalizationContainerPage: LocalizationContainerPage
|
|
1033
988
|
});
|
|
1034
989
|
|
|
1035
|
-
const _c0$4 = () => ({ "min-width": "40rem" });
|
|
1036
|
-
function LanguageListPage_p_button_9_Template(rf, ctx) { if (rf & 1) {
|
|
1037
|
-
const _r1 = i0.ɵɵgetCurrentView();
|
|
1038
|
-
i0.ɵɵelementStart(0, "p-button", 10);
|
|
1039
|
-
i0.ɵɵpipe(1, "translate");
|
|
1040
|
-
i0.ɵɵlistener("onClick", function LanguageListPage_p_button_9_Template_p_button_onClick_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onCreate()); });
|
|
1041
|
-
i0.ɵɵelementEnd();
|
|
1042
|
-
} if (rf & 2) {
|
|
1043
|
-
i0.ɵɵproperty("label", i0.ɵɵpipeBind1(1, 1, "localization.language.create"));
|
|
1044
|
-
} }
|
|
1045
|
-
function LanguageListPage_ng_template_12_Template(rf, ctx) { if (rf & 1) {
|
|
1046
|
-
i0.ɵɵelementStart(0, "tr")(1, "th");
|
|
1047
|
-
i0.ɵɵtext(2);
|
|
1048
|
-
i0.ɵɵpipe(3, "translate");
|
|
1049
|
-
i0.ɵɵelementEnd();
|
|
1050
|
-
i0.ɵɵelementStart(4, "th");
|
|
1051
|
-
i0.ɵɵtext(5);
|
|
1052
|
-
i0.ɵɵpipe(6, "translate");
|
|
1053
|
-
i0.ɵɵelementEnd();
|
|
1054
|
-
i0.ɵɵelementStart(7, "th");
|
|
1055
|
-
i0.ɵɵtext(8);
|
|
1056
|
-
i0.ɵɵpipe(9, "translate");
|
|
1057
|
-
i0.ɵɵelementEnd();
|
|
1058
|
-
i0.ɵɵelementStart(10, "th");
|
|
1059
|
-
i0.ɵɵtext(11);
|
|
1060
|
-
i0.ɵɵpipe(12, "translate");
|
|
1061
|
-
i0.ɵɵelementEnd();
|
|
1062
|
-
i0.ɵɵelementStart(13, "th");
|
|
1063
|
-
i0.ɵɵtext(14);
|
|
1064
|
-
i0.ɵɵpipe(15, "translate");
|
|
1065
|
-
i0.ɵɵelementEnd();
|
|
1066
|
-
i0.ɵɵelementStart(16, "th", 11);
|
|
1067
|
-
i0.ɵɵtext(17);
|
|
1068
|
-
i0.ɵɵpipe(18, "translate");
|
|
1069
|
-
i0.ɵɵelementEnd()();
|
|
1070
|
-
} if (rf & 2) {
|
|
1071
|
-
i0.ɵɵadvance(2);
|
|
1072
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 6, "localization.language.code"));
|
|
1073
|
-
i0.ɵɵadvance(3);
|
|
1074
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(6, 8, "localization.language.name"));
|
|
1075
|
-
i0.ɵɵadvance(3);
|
|
1076
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(9, 10, "localization.language.native.name"));
|
|
1077
|
-
i0.ɵɵadvance(3);
|
|
1078
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(12, 12, "localization.language.direction"));
|
|
1079
|
-
i0.ɵɵadvance(3);
|
|
1080
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(15, 14, "shared.status"));
|
|
1081
|
-
i0.ɵɵadvance(3);
|
|
1082
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(18, 16, "shared.actions"));
|
|
1083
|
-
} }
|
|
1084
|
-
function LanguageListPage_ng_template_14_Conditional_18_Template(rf, ctx) { if (rf & 1) {
|
|
1085
|
-
i0.ɵɵelement(0, "p-tag", 15);
|
|
1086
|
-
i0.ɵɵpipe(1, "translate");
|
|
1087
|
-
} if (rf & 2) {
|
|
1088
|
-
i0.ɵɵproperty("value", i0.ɵɵpipeBind1(1, 1, "localization.language.default"));
|
|
1089
|
-
} }
|
|
1090
|
-
function LanguageListPage_ng_template_14_Conditional_21_p_button_0_Template(rf, ctx) { if (rf & 1) {
|
|
1091
|
-
const _r3 = i0.ɵɵgetCurrentView();
|
|
1092
|
-
i0.ɵɵelementStart(0, "p-button", 21);
|
|
1093
|
-
i0.ɵɵpipe(1, "translate");
|
|
1094
|
-
i0.ɵɵlistener("onClick", function LanguageListPage_ng_template_14_Conditional_21_p_button_0_Template_p_button_onClick_0_listener() { i0.ɵɵrestoreView(_r3); const lang_r4 = i0.ɵɵnextContext(2).$implicit; const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onSetDefault(lang_r4)); });
|
|
1095
|
-
i0.ɵɵelementEnd();
|
|
1096
|
-
} if (rf & 2) {
|
|
1097
|
-
i0.ɵɵproperty("text", true)("pTooltip", i0.ɵɵpipeBind1(1, 2, "localization.language.set.default"));
|
|
1098
|
-
} }
|
|
1099
|
-
function LanguageListPage_ng_template_14_Conditional_21_Template(rf, ctx) { if (rf & 1) {
|
|
1100
|
-
i0.ɵɵtemplate(0, LanguageListPage_ng_template_14_Conditional_21_p_button_0_Template, 2, 4, "p-button", 20);
|
|
1101
|
-
} if (rf & 2) {
|
|
1102
|
-
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
1103
|
-
i0.ɵɵproperty("hasPermission", ctx_r1.LANGUAGE_PERMISSIONS.UPDATE);
|
|
1104
|
-
} }
|
|
1105
|
-
function LanguageListPage_ng_template_14_p_button_22_Template(rf, ctx) { if (rf & 1) {
|
|
1106
|
-
const _r5 = i0.ɵɵgetCurrentView();
|
|
1107
|
-
i0.ɵɵelementStart(0, "p-button", 22);
|
|
1108
|
-
i0.ɵɵpipe(1, "translate");
|
|
1109
|
-
i0.ɵɵlistener("onClick", function LanguageListPage_ng_template_14_p_button_22_Template_p_button_onClick_0_listener() { i0.ɵɵrestoreView(_r5); const lang_r4 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onEdit(lang_r4.id)); });
|
|
1110
|
-
i0.ɵɵelementEnd();
|
|
1111
|
-
} if (rf & 2) {
|
|
1112
|
-
i0.ɵɵproperty("text", true)("pTooltip", i0.ɵɵpipeBind1(1, 2, "shared.edit"));
|
|
1113
|
-
} }
|
|
1114
|
-
function LanguageListPage_ng_template_14_p_button_23_Template(rf, ctx) { if (rf & 1) {
|
|
1115
|
-
const _r6 = i0.ɵɵgetCurrentView();
|
|
1116
|
-
i0.ɵɵelementStart(0, "p-button", 23);
|
|
1117
|
-
i0.ɵɵpipe(1, "translate");
|
|
1118
|
-
i0.ɵɵlistener("onClick", function LanguageListPage_ng_template_14_p_button_23_Template_p_button_onClick_0_listener() { i0.ɵɵrestoreView(_r6); const lang_r4 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onDelete(lang_r4)); });
|
|
1119
|
-
i0.ɵɵelementEnd();
|
|
1120
|
-
} if (rf & 2) {
|
|
1121
|
-
const lang_r4 = i0.ɵɵnextContext().$implicit;
|
|
1122
|
-
i0.ɵɵproperty("text", true)("pTooltip", i0.ɵɵpipeBind1(1, 3, "shared.delete"))("disabled", lang_r4.isDefault);
|
|
1123
|
-
} }
|
|
1124
|
-
function LanguageListPage_ng_template_14_Template(rf, ctx) { if (rf & 1) {
|
|
1125
|
-
i0.ɵɵelementStart(0, "tr")(1, "td")(2, "span", 12);
|
|
1126
|
-
i0.ɵɵtext(3);
|
|
1127
|
-
i0.ɵɵelementEnd()();
|
|
1128
|
-
i0.ɵɵelementStart(4, "td");
|
|
1129
|
-
i0.ɵɵtext(5);
|
|
1130
|
-
i0.ɵɵelementEnd();
|
|
1131
|
-
i0.ɵɵelementStart(6, "td");
|
|
1132
|
-
i0.ɵɵtext(7);
|
|
1133
|
-
i0.ɵɵpipe(8, "translate");
|
|
1134
|
-
i0.ɵɵelementEnd();
|
|
1135
|
-
i0.ɵɵelementStart(9, "td");
|
|
1136
|
-
i0.ɵɵelement(10, "p-tag", 13);
|
|
1137
|
-
i0.ɵɵpipe(11, "translate");
|
|
1138
|
-
i0.ɵɵpipe(12, "translate");
|
|
1139
|
-
i0.ɵɵelementEnd();
|
|
1140
|
-
i0.ɵɵelementStart(13, "td")(14, "div", 14);
|
|
1141
|
-
i0.ɵɵelement(15, "p-tag", 13);
|
|
1142
|
-
i0.ɵɵpipe(16, "translate");
|
|
1143
|
-
i0.ɵɵpipe(17, "translate");
|
|
1144
|
-
i0.ɵɵconditionalCreate(18, LanguageListPage_ng_template_14_Conditional_18_Template, 2, 3, "p-tag", 15);
|
|
1145
|
-
i0.ɵɵelementEnd()();
|
|
1146
|
-
i0.ɵɵelementStart(19, "td")(20, "div", 16);
|
|
1147
|
-
i0.ɵɵconditionalCreate(21, LanguageListPage_ng_template_14_Conditional_21_Template, 1, 1, "p-button", 17);
|
|
1148
|
-
i0.ɵɵtemplate(22, LanguageListPage_ng_template_14_p_button_22_Template, 2, 4, "p-button", 18)(23, LanguageListPage_ng_template_14_p_button_23_Template, 2, 5, "p-button", 19);
|
|
1149
|
-
i0.ɵɵelementEnd()()();
|
|
1150
|
-
} if (rf & 2) {
|
|
1151
|
-
const lang_r4 = ctx.$implicit;
|
|
1152
|
-
const ctx_r1 = i0.ɵɵnextContext();
|
|
1153
|
-
i0.ɵɵadvance(3);
|
|
1154
|
-
i0.ɵɵtextInterpolate(lang_r4.code);
|
|
1155
|
-
i0.ɵɵadvance(2);
|
|
1156
|
-
i0.ɵɵtextInterpolate(lang_r4.name);
|
|
1157
|
-
i0.ɵɵadvance(2);
|
|
1158
|
-
i0.ɵɵtextInterpolate(lang_r4.nativeName || i0.ɵɵpipeBind1(8, 11, "shared.na"));
|
|
1159
|
-
i0.ɵɵadvance(3);
|
|
1160
|
-
i0.ɵɵproperty("value", lang_r4.direction === "rtl" ? i0.ɵɵpipeBind1(11, 13, "localization.language.rtl") : i0.ɵɵpipeBind1(12, 15, "localization.language.ltr"))("severity", lang_r4.direction === "rtl" ? "warn" : "info");
|
|
1161
|
-
i0.ɵɵadvance(5);
|
|
1162
|
-
i0.ɵɵproperty("value", lang_r4.isActive ? i0.ɵɵpipeBind1(16, 17, "shared.active") : i0.ɵɵpipeBind1(17, 19, "shared.inactive"))("severity", lang_r4.isActive ? "success" : "secondary");
|
|
1163
|
-
i0.ɵɵadvance(3);
|
|
1164
|
-
i0.ɵɵconditional(lang_r4.isDefault ? 18 : -1);
|
|
1165
|
-
i0.ɵɵadvance(3);
|
|
1166
|
-
i0.ɵɵconditional(!lang_r4.isDefault ? 21 : -1);
|
|
1167
|
-
i0.ɵɵadvance();
|
|
1168
|
-
i0.ɵɵproperty("hasPermission", ctx_r1.LANGUAGE_PERMISSIONS.UPDATE);
|
|
1169
|
-
i0.ɵɵadvance();
|
|
1170
|
-
i0.ɵɵproperty("hasPermission", ctx_r1.LANGUAGE_PERMISSIONS.DELETE);
|
|
1171
|
-
} }
|
|
1172
|
-
function LanguageListPage_ng_template_16_Template(rf, ctx) { if (rf & 1) {
|
|
1173
|
-
i0.ɵɵelementStart(0, "tr")(1, "td", 24);
|
|
1174
|
-
i0.ɵɵtext(2);
|
|
1175
|
-
i0.ɵɵpipe(3, "translate");
|
|
1176
|
-
i0.ɵɵelementEnd()();
|
|
1177
|
-
} if (rf & 2) {
|
|
1178
|
-
i0.ɵɵadvance(2);
|
|
1179
|
-
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 1, "localization.language.empty"), " ");
|
|
1180
|
-
} }
|
|
1181
990
|
class LanguageListPage {
|
|
1182
991
|
LANGUAGE_PERMISSIONS = LANGUAGE_PERMISSIONS;
|
|
1183
992
|
router = inject(Router);
|
|
@@ -1260,40 +1069,125 @@ class LanguageListPage {
|
|
|
1260
1069
|
},
|
|
1261
1070
|
});
|
|
1262
1071
|
}
|
|
1263
|
-
static ɵfac =
|
|
1264
|
-
static ɵcmp =
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1072
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: LanguageListPage, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1073
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.5", type: LanguageListPage, isStandalone: true, selector: "lib-language-list-page", providers: [ConfirmationService, MessageService], ngImport: i0, template: `
|
|
1074
|
+
<div class="card">
|
|
1075
|
+
<div class="flex flex-col sm:flex-row justify-between items-start sm:items-center gap-3 mb-4">
|
|
1076
|
+
<div>
|
|
1077
|
+
<h3 class="text-lg sm:text-xl font-semibold m-0">{{ 'localization.language.title' | translate }}</h3>
|
|
1078
|
+
<p class="text-sm text-muted-color mt-1">
|
|
1079
|
+
{{ 'localization.language.subtitle' | translate }}
|
|
1080
|
+
</p>
|
|
1081
|
+
</div>
|
|
1082
|
+
<p-button
|
|
1083
|
+
*hasPermission="LANGUAGE_PERMISSIONS.CREATE"
|
|
1084
|
+
[label]="'localization.language.create' | translate"
|
|
1085
|
+
icon="pi pi-plus"
|
|
1086
|
+
(onClick)="onCreate()"
|
|
1087
|
+
styleClass="w-full sm:w-auto"
|
|
1088
|
+
/>
|
|
1089
|
+
</div>
|
|
1090
|
+
|
|
1091
|
+
<div class="overflow-x-auto -mx-4 sm:mx-0">
|
|
1092
|
+
<p-table
|
|
1093
|
+
[value]="languages()"
|
|
1094
|
+
[loading]="isLoading()"
|
|
1095
|
+
styleClass="p-datatable-sm"
|
|
1096
|
+
[tableStyle]="{ 'min-width': '40rem' }"
|
|
1097
|
+
>
|
|
1098
|
+
<ng-template #header>
|
|
1099
|
+
<tr>
|
|
1100
|
+
<th>{{ 'localization.language.code' | translate }}</th>
|
|
1101
|
+
<th>{{ 'localization.language.name' | translate }}</th>
|
|
1102
|
+
<th>{{ 'localization.language.native.name' | translate }}</th>
|
|
1103
|
+
<th>{{ 'localization.language.direction' | translate }}</th>
|
|
1104
|
+
<th>{{ 'shared.status' | translate }}</th>
|
|
1105
|
+
<th class="w-[150px]">{{ 'shared.actions' | translate }}</th>
|
|
1106
|
+
</tr>
|
|
1107
|
+
</ng-template>
|
|
1108
|
+
|
|
1109
|
+
<ng-template #body let-lang>
|
|
1110
|
+
<tr>
|
|
1111
|
+
<td>
|
|
1112
|
+
<span class="uppercase font-semibold">{{ lang.code }}</span>
|
|
1113
|
+
</td>
|
|
1114
|
+
<td>{{ lang.name }}</td>
|
|
1115
|
+
<td>{{ lang.nativeName || ('shared.na' | translate) }}</td>
|
|
1116
|
+
<td>
|
|
1117
|
+
<p-tag
|
|
1118
|
+
[value]="lang.direction === 'rtl' ? ('localization.language.rtl' | translate) : ('localization.language.ltr' | translate)"
|
|
1119
|
+
[severity]="lang.direction === 'rtl' ? 'warn' : 'info'"
|
|
1120
|
+
/>
|
|
1121
|
+
</td>
|
|
1122
|
+
<td>
|
|
1123
|
+
<div class="flex gap-1 items-center">
|
|
1124
|
+
<p-tag
|
|
1125
|
+
[value]="lang.isActive ? ('shared.active' | translate) : ('shared.inactive' | translate)"
|
|
1126
|
+
[severity]="lang.isActive ? 'success' : 'secondary'"
|
|
1127
|
+
/>
|
|
1128
|
+
@if (lang.isDefault) {
|
|
1129
|
+
<p-tag [value]="'localization.language.default' | translate" severity="contrast" />
|
|
1130
|
+
}
|
|
1131
|
+
</div>
|
|
1132
|
+
</td>
|
|
1133
|
+
<td>
|
|
1134
|
+
<div class="flex gap-1">
|
|
1135
|
+
@if (!lang.isDefault) {
|
|
1136
|
+
<p-button
|
|
1137
|
+
*hasPermission="LANGUAGE_PERMISSIONS.UPDATE"
|
|
1138
|
+
icon="pi pi-star"
|
|
1139
|
+
[text]="true"
|
|
1140
|
+
size="small"
|
|
1141
|
+
[pTooltip]="'localization.language.set.default' | translate"
|
|
1142
|
+
(onClick)="onSetDefault(lang)"
|
|
1143
|
+
/>
|
|
1144
|
+
}
|
|
1145
|
+
<p-button
|
|
1146
|
+
*hasPermission="LANGUAGE_PERMISSIONS.UPDATE"
|
|
1147
|
+
icon="pi pi-pencil"
|
|
1148
|
+
[text]="true"
|
|
1149
|
+
severity="secondary"
|
|
1150
|
+
size="small"
|
|
1151
|
+
[pTooltip]="'shared.edit' | translate"
|
|
1152
|
+
(onClick)="onEdit(lang.id)"
|
|
1153
|
+
/>
|
|
1154
|
+
<p-button
|
|
1155
|
+
*hasPermission="LANGUAGE_PERMISSIONS.DELETE"
|
|
1156
|
+
icon="pi pi-trash"
|
|
1157
|
+
[text]="true"
|
|
1158
|
+
severity="danger"
|
|
1159
|
+
size="small"
|
|
1160
|
+
[pTooltip]="'shared.delete' | translate"
|
|
1161
|
+
[disabled]="lang.isDefault"
|
|
1162
|
+
(onClick)="onDelete(lang)"
|
|
1163
|
+
/>
|
|
1164
|
+
</div>
|
|
1165
|
+
</td>
|
|
1166
|
+
</tr>
|
|
1167
|
+
</ng-template>
|
|
1168
|
+
|
|
1169
|
+
<ng-template #emptymessage>
|
|
1170
|
+
<tr>
|
|
1171
|
+
<td colspan="6" class="text-center py-4 text-muted-color">
|
|
1172
|
+
{{ 'localization.language.empty' | translate }}
|
|
1173
|
+
</td>
|
|
1174
|
+
</tr>
|
|
1175
|
+
</ng-template>
|
|
1176
|
+
</p-table>
|
|
1177
|
+
</div>
|
|
1178
|
+
</div>
|
|
1179
|
+
|
|
1180
|
+
<p-confirmDialog />
|
|
1181
|
+
<p-toast />
|
|
1182
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: AngularModule }, { kind: "ngmodule", type: PrimeModule }, { kind: "component", type: i2.Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i2$1.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", "modal", "visible", "position", "draggable"], outputs: ["onHide"] }, { kind: "component", type: i8.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: "component", type: i4.Tag, selector: "p-tag", inputs: ["styleClass", "severity", "value", "icon", "rounded"] }, { kind: "component", type: i10.Toast, selector: "p-toast", inputs: ["key", "autoZIndex", "baseZIndex", "life", "styleClass", "position", "preventOpenDuplicates", "preventDuplicates", "showTransformOptions", "hideTransformOptions", "showTransitionOptions", "hideTransitionOptions", "motionOptions", "breakpoints"], outputs: ["onClose"] }, { kind: "directive", type: i6.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "showOnEllipsis", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }, { kind: "directive", type: HasPermissionDirective, selector: "[hasPermission]", inputs: ["hasPermission"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
1289
1183
|
}
|
|
1290
|
-
(
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1184
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: LanguageListPage, decorators: [{
|
|
1185
|
+
type: Component,
|
|
1186
|
+
args: [{
|
|
1187
|
+
selector: 'lib-language-list-page',
|
|
1188
|
+
imports: [AngularModule, PrimeModule, HasPermissionDirective, TranslatePipe],
|
|
1189
|
+
providers: [ConfirmationService, MessageService],
|
|
1190
|
+
template: `
|
|
1297
1191
|
<div class="card">
|
|
1298
1192
|
<div class="flex flex-col sm:flex-row justify-between items-start sm:items-center gap-3 mb-4">
|
|
1299
1193
|
<div>
|
|
@@ -1403,27 +1297,14 @@ class LanguageListPage {
|
|
|
1403
1297
|
<p-confirmDialog />
|
|
1404
1298
|
<p-toast />
|
|
1405
1299
|
`,
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LanguageListPage, { className: "LanguageListPage", filePath: "pages/language-list/language-list.page.ts", lineNumber: 131 }); })();
|
|
1300
|
+
}]
|
|
1301
|
+
}] });
|
|
1409
1302
|
|
|
1410
1303
|
var languageList_page = /*#__PURE__*/Object.freeze({
|
|
1411
1304
|
__proto__: null,
|
|
1412
1305
|
LanguageListPage: LanguageListPage
|
|
1413
1306
|
});
|
|
1414
1307
|
|
|
1415
|
-
const _c0$3 = () => ({ standalone: true });
|
|
1416
|
-
function LanguageFormPage_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
|
1417
|
-
i0.ɵɵelementStart(0, "div", 21)(1, "h2", 22);
|
|
1418
|
-
i0.ɵɵtext(2);
|
|
1419
|
-
i0.ɵɵpipe(3, "translate");
|
|
1420
|
-
i0.ɵɵpipe(4, "translate");
|
|
1421
|
-
i0.ɵɵelementEnd()();
|
|
1422
|
-
} if (rf & 2) {
|
|
1423
|
-
const ctx_r1 = i0.ɵɵnextContext();
|
|
1424
|
-
i0.ɵɵadvance(2);
|
|
1425
|
-
i0.ɵɵtextInterpolate1(" ", ctx_r1.isEditMode() ? i0.ɵɵpipeBind1(3, 1, "localization.language.edit") : i0.ɵɵpipeBind1(4, 3, "localization.language.create"), " ");
|
|
1426
|
-
} }
|
|
1427
1308
|
class LanguageFormPage {
|
|
1428
1309
|
router = inject(Router);
|
|
1429
1310
|
route = inject(ActivatedRoute);
|
|
@@ -1537,132 +1418,8 @@ class LanguageFormPage {
|
|
|
1537
1418
|
onCancel() {
|
|
1538
1419
|
this.router.navigate(['/localization/languages']);
|
|
1539
1420
|
}
|
|
1540
|
-
static ɵfac =
|
|
1541
|
-
static ɵcmp =
|
|
1542
|
-
const _r1 = i0.ɵɵgetCurrentView();
|
|
1543
|
-
i0.ɵɵelementStart(0, "p-card");
|
|
1544
|
-
i0.ɵɵtemplate(1, LanguageFormPage_ng_template_1_Template, 5, 5, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
|
|
1545
|
-
i0.ɵɵelementStart(3, "form", 1);
|
|
1546
|
-
i0.ɵɵlistener("ngSubmit", function LanguageFormPage_Template_form_ngSubmit_3_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onSubmit()); });
|
|
1547
|
-
i0.ɵɵelementStart(4, "div", 2)(5, "label", 3);
|
|
1548
|
-
i0.ɵɵtext(6);
|
|
1549
|
-
i0.ɵɵpipe(7, "translate");
|
|
1550
|
-
i0.ɵɵelementEnd();
|
|
1551
|
-
i0.ɵɵelement(8, "input", 4);
|
|
1552
|
-
i0.ɵɵpipe(9, "translate");
|
|
1553
|
-
i0.ɵɵcontrolCreate();
|
|
1554
|
-
i0.ɵɵelementStart(10, "small", 5);
|
|
1555
|
-
i0.ɵɵtext(11);
|
|
1556
|
-
i0.ɵɵpipe(12, "translate");
|
|
1557
|
-
i0.ɵɵelementEnd()();
|
|
1558
|
-
i0.ɵɵelementStart(13, "div", 2)(14, "label", 6);
|
|
1559
|
-
i0.ɵɵtext(15);
|
|
1560
|
-
i0.ɵɵpipe(16, "translate");
|
|
1561
|
-
i0.ɵɵelementEnd();
|
|
1562
|
-
i0.ɵɵelement(17, "input", 7);
|
|
1563
|
-
i0.ɵɵpipe(18, "translate");
|
|
1564
|
-
i0.ɵɵcontrolCreate();
|
|
1565
|
-
i0.ɵɵelementEnd();
|
|
1566
|
-
i0.ɵɵelementStart(19, "div", 2)(20, "label", 8);
|
|
1567
|
-
i0.ɵɵtext(21);
|
|
1568
|
-
i0.ɵɵpipe(22, "translate");
|
|
1569
|
-
i0.ɵɵelementEnd();
|
|
1570
|
-
i0.ɵɵelement(23, "input", 9);
|
|
1571
|
-
i0.ɵɵpipe(24, "translate");
|
|
1572
|
-
i0.ɵɵcontrolCreate();
|
|
1573
|
-
i0.ɵɵelementStart(25, "small", 5);
|
|
1574
|
-
i0.ɵɵtext(26);
|
|
1575
|
-
i0.ɵɵpipe(27, "translate");
|
|
1576
|
-
i0.ɵɵelementEnd()();
|
|
1577
|
-
i0.ɵɵelementStart(28, "div", 2)(29, "label", 10);
|
|
1578
|
-
i0.ɵɵtext(30);
|
|
1579
|
-
i0.ɵɵpipe(31, "translate");
|
|
1580
|
-
i0.ɵɵelementEnd();
|
|
1581
|
-
i0.ɵɵelementStart(32, "p-select", 11);
|
|
1582
|
-
i0.ɵɵlistener("ngModelChange", function LanguageFormPage_Template_p_select_ngModelChange_32_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.updateDirection($event)); });
|
|
1583
|
-
i0.ɵɵelementEnd()();
|
|
1584
|
-
i0.ɵɵelementStart(33, "div", 2)(34, "label", 12);
|
|
1585
|
-
i0.ɵɵtext(35);
|
|
1586
|
-
i0.ɵɵpipe(36, "translate");
|
|
1587
|
-
i0.ɵɵelementEnd();
|
|
1588
|
-
i0.ɵɵelement(37, "input", 13);
|
|
1589
|
-
i0.ɵɵpipe(38, "translate");
|
|
1590
|
-
i0.ɵɵcontrolCreate();
|
|
1591
|
-
i0.ɵɵelementEnd();
|
|
1592
|
-
i0.ɵɵelement(39, "div", 14);
|
|
1593
|
-
i0.ɵɵelementStart(40, "div", 15)(41, "label", 16);
|
|
1594
|
-
i0.ɵɵelement(42, "input", 17);
|
|
1595
|
-
i0.ɵɵcontrolCreate();
|
|
1596
|
-
i0.ɵɵelementStart(43, "span");
|
|
1597
|
-
i0.ɵɵtext(44);
|
|
1598
|
-
i0.ɵɵpipe(45, "translate");
|
|
1599
|
-
i0.ɵɵelementEnd()();
|
|
1600
|
-
i0.ɵɵelementStart(46, "label", 16);
|
|
1601
|
-
i0.ɵɵelement(47, "input", 17);
|
|
1602
|
-
i0.ɵɵcontrolCreate();
|
|
1603
|
-
i0.ɵɵelementStart(48, "span");
|
|
1604
|
-
i0.ɵɵtext(49);
|
|
1605
|
-
i0.ɵɵpipe(50, "translate");
|
|
1606
|
-
i0.ɵɵelementEnd()()();
|
|
1607
|
-
i0.ɵɵelementStart(51, "div", 18)(52, "p-button", 19);
|
|
1608
|
-
i0.ɵɵpipe(53, "translate");
|
|
1609
|
-
i0.ɵɵlistener("onClick", function LanguageFormPage_Template_p_button_onClick_52_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onCancel()); });
|
|
1610
|
-
i0.ɵɵelementEnd();
|
|
1611
|
-
i0.ɵɵelement(54, "p-button", 20);
|
|
1612
|
-
i0.ɵɵpipe(55, "translate");
|
|
1613
|
-
i0.ɵɵpipe(56, "translate");
|
|
1614
|
-
i0.ɵɵelementEnd()()();
|
|
1615
|
-
i0.ɵɵelement(57, "p-toast");
|
|
1616
|
-
} if (rf & 2) {
|
|
1617
|
-
i0.ɵɵadvance(6);
|
|
1618
|
-
i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(7, 33, "localization.language.code"), " *");
|
|
1619
|
-
i0.ɵɵadvance(2);
|
|
1620
|
-
i0.ɵɵproperty("placeholder", i0.ɵɵpipeBind1(9, 35, "localization.placeholder.code"));
|
|
1621
|
-
i0.ɵɵcontrol(ctx.formTree.code, "formField");
|
|
1622
|
-
i0.ɵɵadvance(3);
|
|
1623
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(12, 37, "localization.language.iso.code.hint"));
|
|
1624
|
-
i0.ɵɵadvance(4);
|
|
1625
|
-
i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(16, 39, "localization.language.name"), " *");
|
|
1626
|
-
i0.ɵɵadvance(2);
|
|
1627
|
-
i0.ɵɵproperty("placeholder", i0.ɵɵpipeBind1(18, 41, "localization.placeholder.name"));
|
|
1628
|
-
i0.ɵɵcontrol(ctx.formTree.name, "formField");
|
|
1629
|
-
i0.ɵɵadvance(4);
|
|
1630
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(22, 43, "localization.language.native.name"));
|
|
1631
|
-
i0.ɵɵadvance(2);
|
|
1632
|
-
i0.ɵɵproperty("placeholder", i0.ɵɵpipeBind1(24, 45, "localization.placeholder.native.name"));
|
|
1633
|
-
i0.ɵɵcontrol(ctx.formTree.nativeName, "formField");
|
|
1634
|
-
i0.ɵɵadvance(3);
|
|
1635
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(27, 47, "localization.language.native.name.hint"));
|
|
1636
|
-
i0.ɵɵadvance(4);
|
|
1637
|
-
i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(31, 49, "localization.language.direction"), " *");
|
|
1638
|
-
i0.ɵɵadvance(2);
|
|
1639
|
-
i0.ɵɵproperty("ngModel", ctx.formModel().direction)("ngModelOptions", i0.ɵɵpureFunction0(65, _c0$3))("options", ctx.directionOptions());
|
|
1640
|
-
i0.ɵɵadvance(3);
|
|
1641
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(36, 51, "localization.language.display.order"));
|
|
1642
|
-
i0.ɵɵadvance(2);
|
|
1643
|
-
i0.ɵɵproperty("placeholder", i0.ɵɵpipeBind1(38, 53, "shared.display.order.placeholder"));
|
|
1644
|
-
i0.ɵɵcontrol(ctx.formTree.serial, "formField");
|
|
1645
|
-
i0.ɵɵadvance(5);
|
|
1646
|
-
i0.ɵɵcontrol(ctx.formTree.isActive, "formField");
|
|
1647
|
-
i0.ɵɵadvance(2);
|
|
1648
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(45, 55, "shared.active"));
|
|
1649
|
-
i0.ɵɵadvance(3);
|
|
1650
|
-
i0.ɵɵcontrol(ctx.formTree.isDefault, "formField");
|
|
1651
|
-
i0.ɵɵadvance(2);
|
|
1652
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(50, 57, "localization.language.default"));
|
|
1653
|
-
i0.ɵɵadvance(3);
|
|
1654
|
-
i0.ɵɵproperty("label", i0.ɵɵpipeBind1(53, 59, "shared.cancel"))("outlined", true);
|
|
1655
|
-
i0.ɵɵadvance(2);
|
|
1656
|
-
i0.ɵɵproperty("label", ctx.isEditMode() ? i0.ɵɵpipeBind1(55, 61, "shared.update") : i0.ɵɵpipeBind1(56, 63, "shared.create"))("loading", ctx.isSaving())("disabled", !ctx.isFormValid() || ctx.isSaving());
|
|
1657
|
-
} }, dependencies: [AngularModule, i1$1.ɵNgNoValidate, i1$1.NgControlStatus, i1$1.NgControlStatusGroup, i1$1.NgModel, i1$1.NgForm, PrimeModule, i2.Button, i3.Card, i4$1.InputText, i5.Select, i10.Toast, FormsModule, FormField, TranslatePipe], encapsulation: 2 });
|
|
1658
|
-
}
|
|
1659
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LanguageFormPage, [{
|
|
1660
|
-
type: Component,
|
|
1661
|
-
args: [{
|
|
1662
|
-
selector: 'lib-language-form-page',
|
|
1663
|
-
imports: [AngularModule, PrimeModule, FormsModule, FormField, TranslatePipe],
|
|
1664
|
-
providers: [MessageService],
|
|
1665
|
-
template: `
|
|
1421
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: LanguageFormPage, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1422
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.5", type: LanguageFormPage, isStandalone: true, selector: "lib-language-form-page", providers: [MessageService], ngImport: i0, template: `
|
|
1666
1423
|
<p-card>
|
|
1667
1424
|
<ng-template #header>
|
|
1668
1425
|
<div class="flex justify-between items-center p-4">
|
|
@@ -1762,182 +1519,171 @@ class LanguageFormPage {
|
|
|
1762
1519
|
</p-card>
|
|
1763
1520
|
|
|
1764
1521
|
<p-toast />
|
|
1765
|
-
`,
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1522
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: AngularModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1$1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]):not([formArray]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: PrimeModule }, { kind: "component", type: i2.Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i3.Card, selector: "p-card", inputs: ["header", "subheader", "style", "styleClass"] }, { kind: "directive", type: i4$1.InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "component", type: i5.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", "motionOptions"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "component", type: i10.Toast, selector: "p-toast", inputs: ["key", "autoZIndex", "baseZIndex", "life", "styleClass", "position", "preventOpenDuplicates", "preventDuplicates", "showTransformOptions", "hideTransformOptions", "showTransitionOptions", "hideTransitionOptions", "motionOptions", "breakpoints"], outputs: ["onClose"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: FormField, selector: "[formField]", inputs: ["formField"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
1523
|
+
}
|
|
1524
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: LanguageFormPage, decorators: [{
|
|
1525
|
+
type: Component,
|
|
1526
|
+
args: [{
|
|
1527
|
+
selector: 'lib-language-form-page',
|
|
1528
|
+
imports: [AngularModule, PrimeModule, FormsModule, FormField, TranslatePipe],
|
|
1529
|
+
providers: [MessageService],
|
|
1530
|
+
template: `
|
|
1531
|
+
<p-card>
|
|
1532
|
+
<ng-template #header>
|
|
1533
|
+
<div class="flex justify-between items-center p-4">
|
|
1534
|
+
<h2 class="text-xl font-semibold m-0">
|
|
1535
|
+
{{ isEditMode() ? ('localization.language.edit' | translate) : ('localization.language.create' | translate) }}
|
|
1536
|
+
</h2>
|
|
1537
|
+
</div>
|
|
1538
|
+
</ng-template>
|
|
1769
1539
|
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
}
|
|
1540
|
+
<form (ngSubmit)="onSubmit()" class="grid grid-cols-1 md:grid-cols-2 gap-4">
|
|
1541
|
+
<!-- Language Code -->
|
|
1542
|
+
<div class="flex flex-col gap-2">
|
|
1543
|
+
<label for="code" class="font-medium">{{ 'localization.language.code' | translate }} *</label>
|
|
1544
|
+
<input
|
|
1545
|
+
pInputText
|
|
1546
|
+
id="code"
|
|
1547
|
+
[formField]="formTree.code"
|
|
1548
|
+
[placeholder]="'localization.placeholder.code' | translate" />
|
|
1549
|
+
<small class="text-muted-color">{{ 'localization.language.iso.code.hint' | translate }}</small>
|
|
1550
|
+
</div>
|
|
1774
1551
|
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
}
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
moduleOptions = computed(() => [
|
|
1911
|
-
{ label: this.translateService.instant('shared.all'), value: null },
|
|
1912
|
-
...this.modules().map((m) => ({ label: m, value: m })),
|
|
1913
|
-
], ...(ngDevMode ? [{ debugName: "moduleOptions" }] : []));
|
|
1914
|
-
filteredKeys = computed(() => {
|
|
1915
|
-
let keys = this.translationKeys();
|
|
1916
|
-
const module = this.selectedModule();
|
|
1917
|
-
const search = this.searchTerm().toLowerCase().trim();
|
|
1918
|
-
if (module) {
|
|
1919
|
-
keys = keys.filter((k) => k.module === module);
|
|
1920
|
-
}
|
|
1921
|
-
if (search) {
|
|
1922
|
-
keys = keys.filter((k) => k.key.toLowerCase().includes(search) ||
|
|
1923
|
-
k.defaultMessage.toLowerCase().includes(search) ||
|
|
1924
|
-
k.module.toLowerCase().includes(search));
|
|
1925
|
-
}
|
|
1926
|
-
return keys;
|
|
1927
|
-
}, ...(ngDevMode ? [{ debugName: "filteredKeys" }] : []));
|
|
1928
|
-
ngOnInit() {
|
|
1929
|
-
this.loadData();
|
|
1930
|
-
}
|
|
1931
|
-
loadData() {
|
|
1932
|
-
this.isLoading.set(true);
|
|
1933
|
-
forkJoin({
|
|
1934
|
-
languages: this.languageService.getAll(),
|
|
1935
|
-
modules: this.translationKeyService.getModules(),
|
|
1936
|
-
keys: this.translationKeyService.getAll(),
|
|
1937
|
-
})
|
|
1938
|
-
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
1939
|
-
.subscribe({
|
|
1940
|
-
next: ({ languages, modules, keys }) => {
|
|
1552
|
+
<!-- Language Name -->
|
|
1553
|
+
<div class="flex flex-col gap-2">
|
|
1554
|
+
<label for="name" class="font-medium">{{ 'localization.language.name' | translate }} *</label>
|
|
1555
|
+
<input
|
|
1556
|
+
pInputText
|
|
1557
|
+
id="name"
|
|
1558
|
+
[formField]="formTree.name"
|
|
1559
|
+
[placeholder]="'localization.placeholder.name' | translate" />
|
|
1560
|
+
</div>
|
|
1561
|
+
|
|
1562
|
+
<!-- Native Name -->
|
|
1563
|
+
<div class="flex flex-col gap-2">
|
|
1564
|
+
<label for="nativeName" class="font-medium">{{ 'localization.language.native.name' | translate }}</label>
|
|
1565
|
+
<input
|
|
1566
|
+
pInputText
|
|
1567
|
+
id="nativeName"
|
|
1568
|
+
[formField]="formTree.nativeName"
|
|
1569
|
+
[placeholder]="'localization.placeholder.native.name' | translate" />
|
|
1570
|
+
<small class="text-muted-color">{{ 'localization.language.native.name.hint' | translate }}</small>
|
|
1571
|
+
</div>
|
|
1572
|
+
|
|
1573
|
+
<!-- Text Direction -->
|
|
1574
|
+
<div class="flex flex-col gap-2">
|
|
1575
|
+
<label for="direction" class="font-medium">{{ 'localization.language.direction' | translate }} *</label>
|
|
1576
|
+
<p-select
|
|
1577
|
+
id="direction"
|
|
1578
|
+
[ngModel]="formModel().direction"
|
|
1579
|
+
(ngModelChange)="updateDirection($event)"
|
|
1580
|
+
[ngModelOptions]="{standalone: true}"
|
|
1581
|
+
[options]="directionOptions()"
|
|
1582
|
+
optionLabel="label"
|
|
1583
|
+
optionValue="value"
|
|
1584
|
+
class="w-full" />
|
|
1585
|
+
</div>
|
|
1586
|
+
|
|
1587
|
+
<!-- Display Order -->
|
|
1588
|
+
<div class="flex flex-col gap-2">
|
|
1589
|
+
<label for="serial" class="font-medium">{{ 'localization.language.display.order' | translate }}</label>
|
|
1590
|
+
<input
|
|
1591
|
+
pInputText
|
|
1592
|
+
id="serial"
|
|
1593
|
+
type="number"
|
|
1594
|
+
[formField]="formTree.serial"
|
|
1595
|
+
[placeholder]="'shared.display.order.placeholder' | translate" />
|
|
1596
|
+
</div>
|
|
1597
|
+
|
|
1598
|
+
<!-- Empty cell for alignment -->
|
|
1599
|
+
<div class="hidden md:block"></div>
|
|
1600
|
+
|
|
1601
|
+
<!-- Checkboxes -->
|
|
1602
|
+
<div class="flex items-center gap-6 md:col-span-2 pt-4">
|
|
1603
|
+
<label class="p-checkbox-native">
|
|
1604
|
+
<input type="checkbox" [formField]="formTree.isActive" />
|
|
1605
|
+
<span>{{ 'shared.active' | translate }}</span>
|
|
1606
|
+
</label>
|
|
1607
|
+
<label class="p-checkbox-native">
|
|
1608
|
+
<input type="checkbox" [formField]="formTree.isDefault" />
|
|
1609
|
+
<span>{{ 'localization.language.default' | translate }}</span>
|
|
1610
|
+
</label>
|
|
1611
|
+
</div>
|
|
1612
|
+
|
|
1613
|
+
<!-- Actions -->
|
|
1614
|
+
<div class="flex justify-end gap-4 md:col-span-2 pt-4">
|
|
1615
|
+
<p-button
|
|
1616
|
+
[label]="'shared.cancel' | translate"
|
|
1617
|
+
severity="secondary"
|
|
1618
|
+
[outlined]="true"
|
|
1619
|
+
(onClick)="onCancel()" />
|
|
1620
|
+
<p-button
|
|
1621
|
+
[label]="isEditMode() ? ('shared.update' | translate) : ('shared.create' | translate)"
|
|
1622
|
+
type="submit"
|
|
1623
|
+
[loading]="isSaving()"
|
|
1624
|
+
[disabled]="!isFormValid() || isSaving()" />
|
|
1625
|
+
</div>
|
|
1626
|
+
</form>
|
|
1627
|
+
</p-card>
|
|
1628
|
+
|
|
1629
|
+
<p-toast />
|
|
1630
|
+
`,
|
|
1631
|
+
}]
|
|
1632
|
+
}], ctorParameters: () => [] });
|
|
1633
|
+
|
|
1634
|
+
var languageForm_page = /*#__PURE__*/Object.freeze({
|
|
1635
|
+
__proto__: null,
|
|
1636
|
+
LanguageFormPage: LanguageFormPage
|
|
1637
|
+
});
|
|
1638
|
+
|
|
1639
|
+
class TranslationKeyListPage {
|
|
1640
|
+
TRANSLATION_KEY_PERMISSIONS = TRANSLATION_KEY_PERMISSIONS;
|
|
1641
|
+
router = inject(Router);
|
|
1642
|
+
languageService = inject(LanguageApiService);
|
|
1643
|
+
translationKeyService = inject(TranslationKeyApiService);
|
|
1644
|
+
translationService = inject(TranslationApiService);
|
|
1645
|
+
confirmationService = inject(ConfirmationService);
|
|
1646
|
+
messageService = inject(MessageService);
|
|
1647
|
+
translateService = inject(TranslateService);
|
|
1648
|
+
destroyRef = inject(DestroyRef);
|
|
1649
|
+
isLoading = signal(false, ...(ngDevMode ? [{ debugName: "isLoading" }] : []));
|
|
1650
|
+
languages = signal([], ...(ngDevMode ? [{ debugName: "languages" }] : []));
|
|
1651
|
+
modules = signal([], ...(ngDevMode ? [{ debugName: "modules" }] : []));
|
|
1652
|
+
translationKeys = signal([], ...(ngDevMode ? [{ debugName: "translationKeys" }] : []));
|
|
1653
|
+
translationCounts = signal(new Map(), ...(ngDevMode ? [{ debugName: "translationCounts" }] : []));
|
|
1654
|
+
selectedModule = signal(null, ...(ngDevMode ? [{ debugName: "selectedModule" }] : []));
|
|
1655
|
+
searchTerm = signal('', ...(ngDevMode ? [{ debugName: "searchTerm" }] : []));
|
|
1656
|
+
moduleOptions = computed(() => [
|
|
1657
|
+
{ label: this.translateService.instant('shared.all'), value: null },
|
|
1658
|
+
...this.modules().map((m) => ({ label: m, value: m })),
|
|
1659
|
+
], ...(ngDevMode ? [{ debugName: "moduleOptions" }] : []));
|
|
1660
|
+
filteredKeys = computed(() => {
|
|
1661
|
+
let keys = this.translationKeys();
|
|
1662
|
+
const module = this.selectedModule();
|
|
1663
|
+
const search = this.searchTerm().toLowerCase().trim();
|
|
1664
|
+
if (module) {
|
|
1665
|
+
keys = keys.filter((k) => k.module === module);
|
|
1666
|
+
}
|
|
1667
|
+
if (search) {
|
|
1668
|
+
keys = keys.filter((k) => k.key.toLowerCase().includes(search) ||
|
|
1669
|
+
k.defaultMessage.toLowerCase().includes(search) ||
|
|
1670
|
+
k.module.toLowerCase().includes(search));
|
|
1671
|
+
}
|
|
1672
|
+
return keys;
|
|
1673
|
+
}, ...(ngDevMode ? [{ debugName: "filteredKeys" }] : []));
|
|
1674
|
+
ngOnInit() {
|
|
1675
|
+
this.loadData();
|
|
1676
|
+
}
|
|
1677
|
+
loadData() {
|
|
1678
|
+
this.isLoading.set(true);
|
|
1679
|
+
forkJoin({
|
|
1680
|
+
languages: this.languageService.getAll(),
|
|
1681
|
+
modules: this.translationKeyService.getModules(),
|
|
1682
|
+
keys: this.translationKeyService.getAll(),
|
|
1683
|
+
})
|
|
1684
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
1685
|
+
.subscribe({
|
|
1686
|
+
next: ({ languages, modules, keys }) => {
|
|
1941
1687
|
if (languages.success && languages.data) {
|
|
1942
1688
|
this.languages.set(languages.data.filter((l) => l.isActive));
|
|
1943
1689
|
}
|
|
@@ -2002,56 +1748,134 @@ class TranslationKeyListPage {
|
|
|
2002
1748
|
},
|
|
2003
1749
|
});
|
|
2004
1750
|
}
|
|
2005
|
-
static ɵfac =
|
|
2006
|
-
static ɵcmp =
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
1751
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: TranslationKeyListPage, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1752
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.5", type: TranslationKeyListPage, isStandalone: true, selector: "lib-translation-key-list-page", providers: [ConfirmationService, MessageService], ngImport: i0, template: `
|
|
1753
|
+
<div class="card">
|
|
1754
|
+
<div class="flex flex-col sm:flex-row justify-between items-start sm:items-center gap-3 mb-4">
|
|
1755
|
+
<div>
|
|
1756
|
+
<h3 class="text-lg sm:text-xl font-semibold m-0">{{ 'localization.key.title' | translate }}</h3>
|
|
1757
|
+
<p class="text-sm text-muted-color mt-1">{{ 'localization.key.subtitle' | translate }}</p>
|
|
1758
|
+
</div>
|
|
1759
|
+
<div class="flex gap-2">
|
|
1760
|
+
<p-button
|
|
1761
|
+
*hasPermission="TRANSLATION_KEY_PERMISSIONS.CREATE"
|
|
1762
|
+
[label]="'localization.key.create' | translate"
|
|
1763
|
+
icon="pi pi-plus"
|
|
1764
|
+
(onClick)="onCreate()"
|
|
1765
|
+
/>
|
|
1766
|
+
</div>
|
|
1767
|
+
</div>
|
|
1768
|
+
|
|
1769
|
+
<!-- Filters -->
|
|
1770
|
+
<div class="flex flex-col md:flex-row gap-4 mb-4">
|
|
1771
|
+
<div class="flex-1">
|
|
1772
|
+
<p-select
|
|
1773
|
+
[options]="moduleOptions()"
|
|
1774
|
+
[ngModel]="selectedModule()"
|
|
1775
|
+
(ngModelChange)="onModuleChange($event)"
|
|
1776
|
+
[ngModelOptions]="{standalone: true}"
|
|
1777
|
+
optionLabel="label"
|
|
1778
|
+
optionValue="value"
|
|
1779
|
+
[placeholder]="'localization.key.filter.module' | translate"
|
|
1780
|
+
[showClear]="true"
|
|
1781
|
+
class="w-full"
|
|
1782
|
+
/>
|
|
1783
|
+
</div>
|
|
1784
|
+
<div class="flex-1">
|
|
1785
|
+
<p-iconfield class="w-full">
|
|
1786
|
+
<p-inputicon class="pi pi-search" />
|
|
1787
|
+
<input
|
|
1788
|
+
pInputText
|
|
1789
|
+
[ngModel]="searchTerm()"
|
|
1790
|
+
(ngModelChange)="searchTerm.set($event)"
|
|
1791
|
+
[ngModelOptions]="{standalone: true}"
|
|
1792
|
+
[placeholder]="'shared.search' | translate"
|
|
1793
|
+
class="w-full"
|
|
1794
|
+
/>
|
|
1795
|
+
</p-iconfield>
|
|
1796
|
+
</div>
|
|
1797
|
+
</div>
|
|
1798
|
+
|
|
1799
|
+
<!-- Table -->
|
|
1800
|
+
<p-table
|
|
1801
|
+
[value]="filteredKeys()"
|
|
1802
|
+
[loading]="isLoading()"
|
|
1803
|
+
[paginator]="true"
|
|
1804
|
+
[rows]="15"
|
|
1805
|
+
[rowsPerPageOptions]="[10, 15, 25, 50]"
|
|
1806
|
+
styleClass="p-datatable-sm"
|
|
1807
|
+
>
|
|
1808
|
+
<ng-template #header>
|
|
1809
|
+
<tr>
|
|
1810
|
+
<th style="width: 15%">{{ 'localization.key.module' | translate }}</th>
|
|
1811
|
+
<th style="width: 25%">{{ 'localization.key.name' | translate }}</th>
|
|
1812
|
+
<th style="width: 35%">{{ 'localization.key.default.message' | translate }}</th>
|
|
1813
|
+
<th style="width: 10%">{{ 'localization.key.translations' | translate }}</th>
|
|
1814
|
+
<th style="width: 15%">{{ 'shared.actions' | translate }}</th>
|
|
1815
|
+
</tr>
|
|
1816
|
+
</ng-template>
|
|
1817
|
+
<ng-template #body let-key>
|
|
1818
|
+
<tr>
|
|
1819
|
+
<td>
|
|
1820
|
+
<p-tag [value]="key.module" severity="secondary" />
|
|
1821
|
+
</td>
|
|
1822
|
+
<td>
|
|
1823
|
+
<div class="font-medium">{{ key.key }}</div>
|
|
1824
|
+
@if (key.description) {
|
|
1825
|
+
<small class="text-muted-color">{{ key.description }}</small>
|
|
1826
|
+
}
|
|
1827
|
+
</td>
|
|
1828
|
+
<td>{{ key.defaultMessage }}</td>
|
|
1829
|
+
<td class="text-center">
|
|
1830
|
+
<span class="text-sm" [class.text-green-500]="getTranslationCount(key.id) === languages().length" [class.text-orange-500]="getTranslationCount(key.id) < languages().length && getTranslationCount(key.id) > 0" [class.text-muted-color]="getTranslationCount(key.id) === 0">
|
|
1831
|
+
{{ getTranslationCount(key.id) }}/{{ languages().length }}
|
|
1832
|
+
</span>
|
|
1833
|
+
</td>
|
|
1834
|
+
<td>
|
|
1835
|
+
<div class="flex gap-1">
|
|
1836
|
+
<p-button
|
|
1837
|
+
*hasPermission="TRANSLATION_KEY_PERMISSIONS.UPDATE"
|
|
1838
|
+
icon="pi pi-pencil"
|
|
1839
|
+
[text]="true"
|
|
1840
|
+
severity="secondary"
|
|
1841
|
+
size="small"
|
|
1842
|
+
[pTooltip]="'shared.edit' | translate"
|
|
1843
|
+
(onClick)="onEdit(key)"
|
|
1844
|
+
/>
|
|
1845
|
+
<p-button
|
|
1846
|
+
*hasPermission="TRANSLATION_KEY_PERMISSIONS.DELETE"
|
|
1847
|
+
icon="pi pi-trash"
|
|
1848
|
+
[text]="true"
|
|
1849
|
+
severity="danger"
|
|
1850
|
+
size="small"
|
|
1851
|
+
[pTooltip]="'shared.delete' | translate"
|
|
1852
|
+
(onClick)="onDelete(key)"
|
|
1853
|
+
/>
|
|
1854
|
+
</div>
|
|
1855
|
+
</td>
|
|
1856
|
+
</tr>
|
|
1857
|
+
</ng-template>
|
|
1858
|
+
<ng-template #emptymessage>
|
|
1859
|
+
<tr>
|
|
1860
|
+
<td colspan="5" class="text-center py-4 text-muted-color">
|
|
1861
|
+
{{ 'localization.key.empty' | translate }}
|
|
1862
|
+
</td>
|
|
1863
|
+
</tr>
|
|
1864
|
+
</ng-template>
|
|
1865
|
+
</p-table>
|
|
1866
|
+
</div>
|
|
1867
|
+
|
|
1868
|
+
<p-confirmDialog />
|
|
1869
|
+
<p-toast />
|
|
1870
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: AngularModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: PrimeModule }, { kind: "component", type: i2.Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i2$1.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", "modal", "visible", "position", "draggable"], outputs: ["onHide"] }, { kind: "component", type: i4$2.IconField, selector: "p-iconfield, p-iconField, p-icon-field", inputs: ["hostName", "iconPosition", "styleClass"] }, { kind: "component", type: i5$1.InputIcon, selector: "p-inputicon, p-inputIcon", inputs: ["hostName", "styleClass"] }, { kind: "directive", type: i4$1.InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "component", type: i5.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", "motionOptions"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "component", type: i8.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: "component", type: i4.Tag, selector: "p-tag", inputs: ["styleClass", "severity", "value", "icon", "rounded"] }, { kind: "component", type: i10.Toast, selector: "p-toast", inputs: ["key", "autoZIndex", "baseZIndex", "life", "styleClass", "position", "preventOpenDuplicates", "preventDuplicates", "showTransformOptions", "hideTransformOptions", "showTransitionOptions", "hideTransitionOptions", "motionOptions", "breakpoints"], outputs: ["onClose"] }, { kind: "directive", type: i6.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "showOnEllipsis", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: HasPermissionDirective, selector: "[hasPermission]", inputs: ["hasPermission"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
2047
1871
|
}
|
|
2048
|
-
(
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
1872
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: TranslationKeyListPage, decorators: [{
|
|
1873
|
+
type: Component,
|
|
1874
|
+
args: [{
|
|
1875
|
+
selector: 'lib-translation-key-list-page',
|
|
1876
|
+
imports: [AngularModule, PrimeModule, FormsModule, HasPermissionDirective, TranslatePipe],
|
|
1877
|
+
providers: [ConfirmationService, MessageService],
|
|
1878
|
+
template: `
|
|
2055
1879
|
<div class="card">
|
|
2056
1880
|
<div class="flex flex-col sm:flex-row justify-between items-start sm:items-center gap-3 mb-4">
|
|
2057
1881
|
<div>
|
|
@@ -2170,84 +1994,14 @@ class TranslationKeyListPage {
|
|
|
2170
1994
|
<p-confirmDialog />
|
|
2171
1995
|
<p-toast />
|
|
2172
1996
|
`,
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(TranslationKeyListPage, { className: "TranslationKeyListPage", filePath: "pages/translation-key-list/translation-key-list.page.ts", lineNumber: 146 }); })();
|
|
1997
|
+
}]
|
|
1998
|
+
}] });
|
|
2176
1999
|
|
|
2177
2000
|
var translationKeyList_page = /*#__PURE__*/Object.freeze({
|
|
2178
2001
|
__proto__: null,
|
|
2179
2002
|
TranslationKeyListPage: TranslationKeyListPage
|
|
2180
2003
|
});
|
|
2181
2004
|
|
|
2182
|
-
const _c0$1 = () => ({ standalone: true });
|
|
2183
|
-
const _forTrack0 = ($index, $item) => $item.id;
|
|
2184
|
-
function TranslationKeyFormPage_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
|
2185
|
-
i0.ɵɵelementStart(0, "div", 23)(1, "h2", 24);
|
|
2186
|
-
i0.ɵɵtext(2);
|
|
2187
|
-
i0.ɵɵpipe(3, "translate");
|
|
2188
|
-
i0.ɵɵpipe(4, "translate");
|
|
2189
|
-
i0.ɵɵelementEnd()();
|
|
2190
|
-
} if (rf & 2) {
|
|
2191
|
-
const ctx_r1 = i0.ɵɵnextContext();
|
|
2192
|
-
i0.ɵɵadvance(2);
|
|
2193
|
-
i0.ɵɵtextInterpolate1(" ", ctx_r1.isEditMode() ? i0.ɵɵpipeBind1(3, 1, "localization.key.edit") : i0.ɵɵpipeBind1(4, 3, "localization.key.create"), " ");
|
|
2194
|
-
} }
|
|
2195
|
-
function TranslationKeyFormPage_Conditional_46_Template(rf, ctx) { if (rf & 1) {
|
|
2196
|
-
i0.ɵɵelementStart(0, "div", 18);
|
|
2197
|
-
i0.ɵɵelement(1, "p-progressSpinner", 25);
|
|
2198
|
-
i0.ɵɵelementEnd();
|
|
2199
|
-
} }
|
|
2200
|
-
function TranslationKeyFormPage_Conditional_47_Template(rf, ctx) { if (rf & 1) {
|
|
2201
|
-
i0.ɵɵelementStart(0, "p", 19);
|
|
2202
|
-
i0.ɵɵtext(1);
|
|
2203
|
-
i0.ɵɵpipe(2, "translate");
|
|
2204
|
-
i0.ɵɵelementEnd();
|
|
2205
|
-
} if (rf & 2) {
|
|
2206
|
-
i0.ɵɵadvance();
|
|
2207
|
-
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "localization.key.no.languages"), " ");
|
|
2208
|
-
} }
|
|
2209
|
-
function TranslationKeyFormPage_Conditional_48_For_2_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
2210
|
-
i0.ɵɵelementStart(0, "span", 17);
|
|
2211
|
-
i0.ɵɵtext(1);
|
|
2212
|
-
i0.ɵɵelementEnd();
|
|
2213
|
-
} if (rf & 2) {
|
|
2214
|
-
const lang_r4 = i0.ɵɵnextContext().$implicit;
|
|
2215
|
-
i0.ɵɵadvance();
|
|
2216
|
-
i0.ɵɵtextInterpolate1("(", lang_r4.nativeName, ")");
|
|
2217
|
-
} }
|
|
2218
|
-
function TranslationKeyFormPage_Conditional_48_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
2219
|
-
const _r3 = i0.ɵɵgetCurrentView();
|
|
2220
|
-
i0.ɵɵelementStart(0, "div", 5)(1, "div", 26)(2, "label", 27);
|
|
2221
|
-
i0.ɵɵtext(3);
|
|
2222
|
-
i0.ɵɵconditionalCreate(4, TranslationKeyFormPage_Conditional_48_For_2_Conditional_4_Template, 2, 1, "span", 17);
|
|
2223
|
-
i0.ɵɵelementEnd();
|
|
2224
|
-
i0.ɵɵelement(5, "p-tag", 28);
|
|
2225
|
-
i0.ɵɵelementEnd();
|
|
2226
|
-
i0.ɵɵelementStart(6, "textarea", 29);
|
|
2227
|
-
i0.ɵɵpipe(7, "translate");
|
|
2228
|
-
i0.ɵɵlistener("ngModelChange", function TranslationKeyFormPage_Conditional_48_For_2_Template_textarea_ngModelChange_6_listener($event) { const lang_r4 = i0.ɵɵrestoreView(_r3).$implicit; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.setTranslationValue(lang_r4.id, $event)); });
|
|
2229
|
-
i0.ɵɵelementEnd()();
|
|
2230
|
-
} if (rf & 2) {
|
|
2231
|
-
const lang_r4 = ctx.$implicit;
|
|
2232
|
-
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
2233
|
-
i0.ɵɵadvance(3);
|
|
2234
|
-
i0.ɵɵtextInterpolate1(" ", lang_r4.name, " ");
|
|
2235
|
-
i0.ɵɵadvance();
|
|
2236
|
-
i0.ɵɵconditional(lang_r4.nativeName && lang_r4.nativeName !== lang_r4.name ? 4 : -1);
|
|
2237
|
-
i0.ɵɵadvance();
|
|
2238
|
-
i0.ɵɵproperty("value", lang_r4.code);
|
|
2239
|
-
i0.ɵɵadvance();
|
|
2240
|
-
i0.ɵɵproperty("ngModel", ctx_r1.getTranslationValue(lang_r4.id))("ngModelOptions", i0.ɵɵpureFunction0(9, _c0$1))("rows", 2)("placeholder", ctx_r1.formModel().defaultMessage || i0.ɵɵpipeBind1(7, 7, "localization.key.enter.translation"));
|
|
2241
|
-
} }
|
|
2242
|
-
function TranslationKeyFormPage_Conditional_48_Template(rf, ctx) { if (rf & 1) {
|
|
2243
|
-
i0.ɵɵelementStart(0, "div", 4);
|
|
2244
|
-
i0.ɵɵrepeaterCreate(1, TranslationKeyFormPage_Conditional_48_For_2_Template, 8, 10, "div", 5, _forTrack0);
|
|
2245
|
-
i0.ɵɵelementEnd();
|
|
2246
|
-
} if (rf & 2) {
|
|
2247
|
-
const ctx_r1 = i0.ɵɵnextContext();
|
|
2248
|
-
i0.ɵɵadvance();
|
|
2249
|
-
i0.ɵɵrepeater(ctx_r1.languages());
|
|
2250
|
-
} }
|
|
2251
2005
|
class TranslationKeyFormPage {
|
|
2252
2006
|
router = inject(Router);
|
|
2253
2007
|
route = inject(ActivatedRoute);
|
|
@@ -2483,121 +2237,8 @@ class TranslationKeyFormPage {
|
|
|
2483
2237
|
onCancel() {
|
|
2484
2238
|
this.router.navigate(['/localization/keys']);
|
|
2485
2239
|
}
|
|
2486
|
-
static ɵfac =
|
|
2487
|
-
static ɵcmp =
|
|
2488
|
-
const _r1 = i0.ɵɵgetCurrentView();
|
|
2489
|
-
i0.ɵɵelementStart(0, "p-card");
|
|
2490
|
-
i0.ɵɵtemplate(1, TranslationKeyFormPage_ng_template_1_Template, 5, 5, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
|
|
2491
|
-
i0.ɵɵelementStart(3, "form", 1);
|
|
2492
|
-
i0.ɵɵlistener("ngSubmit", function TranslationKeyFormPage_Template_form_ngSubmit_3_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onSubmit()); });
|
|
2493
|
-
i0.ɵɵelementStart(4, "div", 2)(5, "h4", 3);
|
|
2494
|
-
i0.ɵɵtext(6);
|
|
2495
|
-
i0.ɵɵpipe(7, "translate");
|
|
2496
|
-
i0.ɵɵelementEnd();
|
|
2497
|
-
i0.ɵɵelementStart(8, "div", 4)(9, "div", 5)(10, "label", 6);
|
|
2498
|
-
i0.ɵɵtext(11);
|
|
2499
|
-
i0.ɵɵpipe(12, "translate");
|
|
2500
|
-
i0.ɵɵelementEnd();
|
|
2501
|
-
i0.ɵɵelement(13, "input", 7);
|
|
2502
|
-
i0.ɵɵpipe(14, "translate");
|
|
2503
|
-
i0.ɵɵcontrolCreate();
|
|
2504
|
-
i0.ɵɵelementEnd();
|
|
2505
|
-
i0.ɵɵelementStart(15, "div", 5)(16, "label", 8);
|
|
2506
|
-
i0.ɵɵtext(17);
|
|
2507
|
-
i0.ɵɵpipe(18, "translate");
|
|
2508
|
-
i0.ɵɵelementEnd();
|
|
2509
|
-
i0.ɵɵelementStart(19, "p-select", 9);
|
|
2510
|
-
i0.ɵɵpipe(20, "translate");
|
|
2511
|
-
i0.ɵɵlistener("ngModelChange", function TranslationKeyFormPage_Template_p_select_ngModelChange_19_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.updateModule($event)); });
|
|
2512
|
-
i0.ɵɵelementEnd()();
|
|
2513
|
-
i0.ɵɵelementStart(21, "div", 10)(22, "label", 11);
|
|
2514
|
-
i0.ɵɵtext(23);
|
|
2515
|
-
i0.ɵɵpipe(24, "translate");
|
|
2516
|
-
i0.ɵɵelementEnd();
|
|
2517
|
-
i0.ɵɵelement(25, "textarea", 12);
|
|
2518
|
-
i0.ɵɵpipe(26, "translate");
|
|
2519
|
-
i0.ɵɵcontrolCreate();
|
|
2520
|
-
i0.ɵɵelementEnd();
|
|
2521
|
-
i0.ɵɵelementStart(27, "div", 10)(28, "label", 13);
|
|
2522
|
-
i0.ɵɵtext(29);
|
|
2523
|
-
i0.ɵɵpipe(30, "translate");
|
|
2524
|
-
i0.ɵɵelementEnd();
|
|
2525
|
-
i0.ɵɵelement(31, "input", 14);
|
|
2526
|
-
i0.ɵɵpipe(32, "translate");
|
|
2527
|
-
i0.ɵɵcontrolCreate();
|
|
2528
|
-
i0.ɵɵelementEnd();
|
|
2529
|
-
i0.ɵɵelementStart(33, "div", 10)(34, "label", 15);
|
|
2530
|
-
i0.ɵɵtext(35);
|
|
2531
|
-
i0.ɵɵpipe(36, "translate");
|
|
2532
|
-
i0.ɵɵelementEnd();
|
|
2533
|
-
i0.ɵɵelement(37, "input", 16);
|
|
2534
|
-
i0.ɵɵpipe(38, "translate");
|
|
2535
|
-
i0.ɵɵcontrolCreate();
|
|
2536
|
-
i0.ɵɵelementStart(39, "small", 17);
|
|
2537
|
-
i0.ɵɵtext(40);
|
|
2538
|
-
i0.ɵɵpipe(41, "translate");
|
|
2539
|
-
i0.ɵɵelementEnd()()()();
|
|
2540
|
-
i0.ɵɵelementStart(42, "div", 2)(43, "h4", 3);
|
|
2541
|
-
i0.ɵɵtext(44);
|
|
2542
|
-
i0.ɵɵpipe(45, "translate");
|
|
2543
|
-
i0.ɵɵelementEnd();
|
|
2544
|
-
i0.ɵɵconditionalCreate(46, TranslationKeyFormPage_Conditional_46_Template, 2, 0, "div", 18)(47, TranslationKeyFormPage_Conditional_47_Template, 3, 3, "p", 19)(48, TranslationKeyFormPage_Conditional_48_Template, 3, 0, "div", 4);
|
|
2545
|
-
i0.ɵɵelementEnd();
|
|
2546
|
-
i0.ɵɵelementStart(49, "div", 20)(50, "p-button", 21);
|
|
2547
|
-
i0.ɵɵpipe(51, "translate");
|
|
2548
|
-
i0.ɵɵlistener("onClick", function TranslationKeyFormPage_Template_p_button_onClick_50_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onCancel()); });
|
|
2549
|
-
i0.ɵɵelementEnd();
|
|
2550
|
-
i0.ɵɵelement(52, "p-button", 22);
|
|
2551
|
-
i0.ɵɵpipe(53, "translate");
|
|
2552
|
-
i0.ɵɵpipe(54, "translate");
|
|
2553
|
-
i0.ɵɵelementEnd()()();
|
|
2554
|
-
i0.ɵɵelement(55, "p-toast");
|
|
2555
|
-
} if (rf & 2) {
|
|
2556
|
-
i0.ɵɵadvance(6);
|
|
2557
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(7, 32, "localization.key.about"));
|
|
2558
|
-
i0.ɵɵadvance(5);
|
|
2559
|
-
i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(12, 34, "localization.key.name"), " *");
|
|
2560
|
-
i0.ɵɵadvance(2);
|
|
2561
|
-
i0.ɵɵproperty("placeholder", i0.ɵɵpipeBind1(14, 36, "localization.placeholder.key.name"));
|
|
2562
|
-
i0.ɵɵcontrol(ctx.formTree.key, "formField");
|
|
2563
|
-
i0.ɵɵadvance(4);
|
|
2564
|
-
i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(18, 38, "localization.key.module"), " *");
|
|
2565
|
-
i0.ɵɵadvance(2);
|
|
2566
|
-
i0.ɵɵproperty("ngModel", ctx.formModel().module)("ngModelOptions", i0.ɵɵpureFunction0(64, _c0$1))("options", ctx.moduleOptions())("editable", true)("placeholder", i0.ɵɵpipeBind1(20, 40, "localization.key.select.module"));
|
|
2567
|
-
i0.ɵɵadvance(4);
|
|
2568
|
-
i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(24, 42, "localization.key.default.message"), " *");
|
|
2569
|
-
i0.ɵɵadvance(2);
|
|
2570
|
-
i0.ɵɵproperty("rows", 2)("placeholder", i0.ɵɵpipeBind1(26, 44, "localization.placeholder.default.message"));
|
|
2571
|
-
i0.ɵɵcontrol(ctx.formTree.defaultMessage, "formField");
|
|
2572
|
-
i0.ɵɵadvance(4);
|
|
2573
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(30, 46, "localization.key.description"));
|
|
2574
|
-
i0.ɵɵadvance(2);
|
|
2575
|
-
i0.ɵɵproperty("placeholder", i0.ɵɵpipeBind1(32, 48, "localization.placeholder.key.description"));
|
|
2576
|
-
i0.ɵɵcontrol(ctx.formTree.description, "formField");
|
|
2577
|
-
i0.ɵɵadvance(4);
|
|
2578
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(36, 50, "localization.key.variables"));
|
|
2579
|
-
i0.ɵɵadvance(2);
|
|
2580
|
-
i0.ɵɵproperty("placeholder", i0.ɵɵpipeBind1(38, 52, "localization.key.variables.placeholder"));
|
|
2581
|
-
i0.ɵɵcontrol(ctx.formTree.variables, "formField");
|
|
2582
|
-
i0.ɵɵadvance(3);
|
|
2583
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(41, 54, "localization.key.variables.hint"));
|
|
2584
|
-
i0.ɵɵadvance(4);
|
|
2585
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(45, 56, "localization.key.translations.section"));
|
|
2586
|
-
i0.ɵɵadvance(2);
|
|
2587
|
-
i0.ɵɵconditional(ctx.isLoadingLanguages() ? 46 : ctx.languages().length === 0 ? 47 : 48);
|
|
2588
|
-
i0.ɵɵadvance(4);
|
|
2589
|
-
i0.ɵɵproperty("label", i0.ɵɵpipeBind1(51, 58, "shared.cancel"))("outlined", true);
|
|
2590
|
-
i0.ɵɵadvance(2);
|
|
2591
|
-
i0.ɵɵproperty("label", ctx.isEditMode() ? i0.ɵɵpipeBind1(53, 60, "shared.update") : i0.ɵɵpipeBind1(54, 62, "shared.create"))("loading", ctx.isSaving())("disabled", !ctx.isFormValid() || ctx.isSaving());
|
|
2592
|
-
} }, dependencies: [AngularModule, i1$1.ɵNgNoValidate, i1$1.DefaultValueAccessor, i1$1.NgControlStatus, i1$1.NgControlStatusGroup, i1$1.NgModel, i1$1.NgForm, PrimeModule, i2.Button, i3.Card, i4$1.InputText, i5.Select, i4.Tag, i7.Textarea, i10.Toast, i9.ProgressSpinner, FormsModule, FormField, TranslatePipe], encapsulation: 2 });
|
|
2593
|
-
}
|
|
2594
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TranslationKeyFormPage, [{
|
|
2595
|
-
type: Component,
|
|
2596
|
-
args: [{
|
|
2597
|
-
selector: 'lib-translation-key-form-page',
|
|
2598
|
-
imports: [AngularModule, PrimeModule, FormsModule, FormField, TranslatePipe],
|
|
2599
|
-
providers: [MessageService],
|
|
2600
|
-
template: `
|
|
2240
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: TranslationKeyFormPage, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2241
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.5", type: TranslationKeyFormPage, isStandalone: true, selector: "lib-translation-key-form-page", providers: [MessageService], ngImport: i0, template: `
|
|
2601
2242
|
<p-card>
|
|
2602
2243
|
<ng-template #header>
|
|
2603
2244
|
<div class="flex justify-between items-center p-4">
|
|
@@ -2726,162 +2367,152 @@ class TranslationKeyFormPage {
|
|
|
2726
2367
|
</p-card>
|
|
2727
2368
|
|
|
2728
2369
|
<p-toast />
|
|
2729
|
-
`,
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2370
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: AngularModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1$1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]):not([formArray]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: PrimeModule }, { kind: "component", type: i2.Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i3.Card, selector: "p-card", inputs: ["header", "subheader", "style", "styleClass"] }, { kind: "directive", type: i4$1.InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "component", type: i5.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", "motionOptions"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "component", type: i4.Tag, selector: "p-tag", inputs: ["styleClass", "severity", "value", "icon", "rounded"] }, { kind: "directive", type: i7.Textarea, selector: "[pTextarea], [pInputTextarea]", inputs: ["pTextareaPT", "pTextareaUnstyled", "autoResize", "pSize", "variant", "fluid", "invalid"], outputs: ["onResize"] }, { kind: "component", type: i10.Toast, selector: "p-toast", inputs: ["key", "autoZIndex", "baseZIndex", "life", "styleClass", "position", "preventOpenDuplicates", "preventDuplicates", "showTransformOptions", "hideTransformOptions", "showTransitionOptions", "hideTransitionOptions", "motionOptions", "breakpoints"], outputs: ["onClose"] }, { kind: "component", type: i9.ProgressSpinner, selector: "p-progressSpinner, p-progress-spinner, p-progressspinner", inputs: ["styleClass", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: FormField, selector: "[formField]", inputs: ["formField"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
2371
|
+
}
|
|
2372
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: TranslationKeyFormPage, decorators: [{
|
|
2373
|
+
type: Component,
|
|
2374
|
+
args: [{
|
|
2375
|
+
selector: 'lib-translation-key-form-page',
|
|
2376
|
+
imports: [AngularModule, PrimeModule, FormsModule, FormField, TranslatePipe],
|
|
2377
|
+
providers: [MessageService],
|
|
2378
|
+
template: `
|
|
2379
|
+
<p-card>
|
|
2380
|
+
<ng-template #header>
|
|
2381
|
+
<div class="flex justify-between items-center p-4">
|
|
2382
|
+
<h2 class="text-xl font-semibold m-0">
|
|
2383
|
+
{{ isEditMode() ? ('localization.key.edit' | translate) : ('localization.key.create' | translate) }}
|
|
2384
|
+
</h2>
|
|
2385
|
+
</div>
|
|
2386
|
+
</ng-template>
|
|
2387
|
+
|
|
2388
|
+
<form (ngSubmit)="onSubmit()" class="flex flex-col gap-6">
|
|
2389
|
+
<!-- Key Info Section -->
|
|
2390
|
+
<div class="p-4 surface-ground rounded-lg">
|
|
2391
|
+
<h4 class="font-semibold mt-0 mb-4">{{ 'localization.key.about' | translate }}</h4>
|
|
2392
|
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
|
|
2393
|
+
<!-- Key Name -->
|
|
2394
|
+
<div class="flex flex-col gap-2">
|
|
2395
|
+
<label for="key" class="font-medium">{{ 'localization.key.name' | translate }} *</label>
|
|
2396
|
+
<input
|
|
2397
|
+
pInputText
|
|
2398
|
+
id="key"
|
|
2399
|
+
[formField]="formTree.key"
|
|
2400
|
+
[placeholder]="'localization.placeholder.key.name' | translate" />
|
|
2401
|
+
</div>
|
|
2402
|
+
|
|
2403
|
+
<!-- Module -->
|
|
2404
|
+
<div class="flex flex-col gap-2">
|
|
2405
|
+
<label for="module" class="font-medium">{{ 'localization.key.module' | translate }} *</label>
|
|
2406
|
+
<p-select
|
|
2407
|
+
id="module"
|
|
2408
|
+
[ngModel]="formModel().module"
|
|
2409
|
+
(ngModelChange)="updateModule($event)"
|
|
2410
|
+
[ngModelOptions]="{standalone: true}"
|
|
2411
|
+
[options]="moduleOptions()"
|
|
2412
|
+
optionLabel="label"
|
|
2413
|
+
optionValue="value"
|
|
2414
|
+
[editable]="true"
|
|
2415
|
+
[placeholder]="'localization.key.select.module' | translate"
|
|
2416
|
+
class="w-full" />
|
|
2417
|
+
</div>
|
|
2418
|
+
|
|
2419
|
+
<!-- Default Message -->
|
|
2420
|
+
<div class="flex flex-col gap-2 md:col-span-2">
|
|
2421
|
+
<label for="defaultMessage" class="font-medium">{{ 'localization.key.default.message' | translate }} *</label>
|
|
2422
|
+
<textarea
|
|
2423
|
+
pInputTextarea
|
|
2424
|
+
id="defaultMessage"
|
|
2425
|
+
[formField]="formTree.defaultMessage"
|
|
2426
|
+
[rows]="2"
|
|
2427
|
+
[placeholder]="'localization.placeholder.default.message' | translate"></textarea>
|
|
2428
|
+
</div>
|
|
2429
|
+
|
|
2430
|
+
<!-- Description -->
|
|
2431
|
+
<div class="flex flex-col gap-2 md:col-span-2">
|
|
2432
|
+
<label for="description" class="font-medium">{{ 'localization.key.description' | translate }}</label>
|
|
2433
|
+
<input
|
|
2434
|
+
pInputText
|
|
2435
|
+
id="description"
|
|
2436
|
+
[formField]="formTree.description"
|
|
2437
|
+
[placeholder]="'localization.placeholder.key.description' | translate" />
|
|
2438
|
+
</div>
|
|
2439
|
+
|
|
2440
|
+
<!-- Variables -->
|
|
2441
|
+
<div class="flex flex-col gap-2 md:col-span-2">
|
|
2442
|
+
<label for="variables" class="font-medium">{{ 'localization.key.variables' | translate }}</label>
|
|
2443
|
+
<input
|
|
2444
|
+
pInputText
|
|
2445
|
+
id="variables"
|
|
2446
|
+
[formField]="formTree.variables"
|
|
2447
|
+
[placeholder]="'localization.key.variables.placeholder' | translate" />
|
|
2448
|
+
<small class="text-muted-color">{{ 'localization.key.variables.hint' | translate }}</small>
|
|
2449
|
+
</div>
|
|
2450
|
+
</div>
|
|
2451
|
+
</div>
|
|
2452
|
+
|
|
2453
|
+
<!-- Translations Section -->
|
|
2454
|
+
<div class="p-4 surface-ground rounded-lg">
|
|
2455
|
+
<h4 class="font-semibold mt-0 mb-4">{{ 'localization.key.translations.section' | translate }}</h4>
|
|
2456
|
+
@if (isLoadingLanguages()) {
|
|
2457
|
+
<div class="flex justify-center py-4">
|
|
2458
|
+
<p-progressSpinner strokeWidth="4" />
|
|
2459
|
+
</div>
|
|
2460
|
+
} @else if (languages().length === 0) {
|
|
2461
|
+
<p class="text-muted-color text-center py-4">
|
|
2462
|
+
{{ 'localization.key.no.languages' | translate }}
|
|
2463
|
+
</p>
|
|
2464
|
+
} @else {
|
|
2465
|
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
|
|
2466
|
+
@for (lang of languages(); track lang.id) {
|
|
2467
|
+
<div class="flex flex-col gap-2">
|
|
2468
|
+
<div class="flex justify-between items-center">
|
|
2469
|
+
<label class="font-medium">
|
|
2470
|
+
{{ lang.name }}
|
|
2471
|
+
@if (lang.nativeName && lang.nativeName !== lang.name) {
|
|
2472
|
+
<span class="text-muted-color">({{ lang.nativeName }})</span>
|
|
2473
|
+
}
|
|
2474
|
+
</label>
|
|
2475
|
+
<p-tag [value]="lang.code" severity="secondary" class="uppercase" />
|
|
2476
|
+
</div>
|
|
2477
|
+
<textarea
|
|
2478
|
+
pInputTextarea
|
|
2479
|
+
[ngModel]="getTranslationValue(lang.id)"
|
|
2480
|
+
(ngModelChange)="setTranslationValue(lang.id, $event)"
|
|
2481
|
+
[ngModelOptions]="{standalone: true}"
|
|
2482
|
+
[rows]="2"
|
|
2483
|
+
[placeholder]="formModel().defaultMessage || ('localization.key.enter.translation' | translate)"></textarea>
|
|
2484
|
+
</div>
|
|
2485
|
+
}
|
|
2486
|
+
</div>
|
|
2487
|
+
}
|
|
2488
|
+
</div>
|
|
2489
|
+
|
|
2490
|
+
<!-- Actions -->
|
|
2491
|
+
<div class="flex justify-end gap-4 pt-4">
|
|
2492
|
+
<p-button
|
|
2493
|
+
[label]="'shared.cancel' | translate"
|
|
2494
|
+
severity="secondary"
|
|
2495
|
+
[outlined]="true"
|
|
2496
|
+
(onClick)="onCancel()" />
|
|
2497
|
+
<p-button
|
|
2498
|
+
[label]="isEditMode() ? ('shared.update' | translate) : ('shared.create' | translate)"
|
|
2499
|
+
type="submit"
|
|
2500
|
+
[loading]="isSaving()"
|
|
2501
|
+
[disabled]="!isFormValid() || isSaving()" />
|
|
2502
|
+
</div>
|
|
2503
|
+
</form>
|
|
2504
|
+
</p-card>
|
|
2505
|
+
|
|
2506
|
+
<p-toast />
|
|
2507
|
+
`,
|
|
2508
|
+
}]
|
|
2509
|
+
}], ctorParameters: () => [] });
|
|
2510
|
+
|
|
2511
|
+
var translationKeyForm_page = /*#__PURE__*/Object.freeze({
|
|
2512
|
+
__proto__: null,
|
|
2513
|
+
TranslationKeyFormPage: TranslationKeyFormPage
|
|
2737
2514
|
});
|
|
2738
2515
|
|
|
2739
|
-
const _c0 = () => ({ standalone: true });
|
|
2740
|
-
const _c1 = () => [10, 20, 50, 100];
|
|
2741
|
-
const _c2 = a0 => ({ count: a0 });
|
|
2742
|
-
function TranslationListPage_Conditional_29_Template(rf, ctx) { if (rf & 1) {
|
|
2743
|
-
i0.ɵɵelementStart(0, "div", 15);
|
|
2744
|
-
i0.ɵɵelement(1, "p-progressSpinner", 21);
|
|
2745
|
-
i0.ɵɵelementEnd();
|
|
2746
|
-
} }
|
|
2747
|
-
function TranslationListPage_Conditional_30_Template(rf, ctx) { if (rf & 1) {
|
|
2748
|
-
i0.ɵɵelementStart(0, "div", 16)(1, "p");
|
|
2749
|
-
i0.ɵɵtext(2);
|
|
2750
|
-
i0.ɵɵpipe(3, "translate");
|
|
2751
|
-
i0.ɵɵelementEnd()();
|
|
2752
|
-
} if (rf & 2) {
|
|
2753
|
-
i0.ɵɵadvance(2);
|
|
2754
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 1, "localization.translation.select.language.hint"));
|
|
2755
|
-
} }
|
|
2756
|
-
function TranslationListPage_Conditional_31_Template(rf, ctx) { if (rf & 1) {
|
|
2757
|
-
i0.ɵɵelementStart(0, "div", 16)(1, "p");
|
|
2758
|
-
i0.ɵɵtext(2);
|
|
2759
|
-
i0.ɵɵpipe(3, "translate");
|
|
2760
|
-
i0.ɵɵelementEnd()();
|
|
2761
|
-
} if (rf & 2) {
|
|
2762
|
-
i0.ɵɵadvance(2);
|
|
2763
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 1, "localization.translation.no.keys"));
|
|
2764
|
-
} }
|
|
2765
|
-
function TranslationListPage_Conditional_32_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
|
2766
|
-
i0.ɵɵelementStart(0, "tr")(1, "th", 22);
|
|
2767
|
-
i0.ɵɵtext(2);
|
|
2768
|
-
i0.ɵɵpipe(3, "translate");
|
|
2769
|
-
i0.ɵɵelementEnd();
|
|
2770
|
-
i0.ɵɵelementStart(4, "th", 23);
|
|
2771
|
-
i0.ɵɵtext(5);
|
|
2772
|
-
i0.ɵɵpipe(6, "translate");
|
|
2773
|
-
i0.ɵɵelementEnd();
|
|
2774
|
-
i0.ɵɵelementStart(7, "th", 24);
|
|
2775
|
-
i0.ɵɵtext(8);
|
|
2776
|
-
i0.ɵɵpipe(9, "translate");
|
|
2777
|
-
i0.ɵɵelementEnd();
|
|
2778
|
-
i0.ɵɵelementStart(10, "th", 25);
|
|
2779
|
-
i0.ɵɵtext(11);
|
|
2780
|
-
i0.ɵɵpipe(12, "translate");
|
|
2781
|
-
i0.ɵɵelementEnd()();
|
|
2782
|
-
} if (rf & 2) {
|
|
2783
|
-
i0.ɵɵadvance(2);
|
|
2784
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 4, "localization.translation.key"));
|
|
2785
|
-
i0.ɵɵadvance(3);
|
|
2786
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(6, 6, "localization.translation.default.message"));
|
|
2787
|
-
i0.ɵɵadvance(3);
|
|
2788
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(9, 8, "localization.translation.value"));
|
|
2789
|
-
i0.ɵɵadvance(3);
|
|
2790
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(12, 10, "localization.translation.verified"));
|
|
2791
|
-
} }
|
|
2792
|
-
function TranslationListPage_Conditional_32_ng_template_3_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
2793
|
-
i0.ɵɵelementStart(0, "small", 19);
|
|
2794
|
-
i0.ɵɵtext(1);
|
|
2795
|
-
i0.ɵɵelementEnd();
|
|
2796
|
-
} if (rf & 2) {
|
|
2797
|
-
const row_r2 = i0.ɵɵnextContext().$implicit;
|
|
2798
|
-
i0.ɵɵadvance();
|
|
2799
|
-
i0.ɵɵtextInterpolate(row_r2.translationKey.description);
|
|
2800
|
-
} }
|
|
2801
|
-
function TranslationListPage_Conditional_32_ng_template_3_Conditional_5_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
2802
|
-
i0.ɵɵelementStart(0, "span", 32);
|
|
2803
|
-
i0.ɵɵtext(1);
|
|
2804
|
-
i0.ɵɵelementEnd();
|
|
2805
|
-
} if (rf & 2) {
|
|
2806
|
-
const v_r3 = ctx.$implicit;
|
|
2807
|
-
const ctx_r3 = i0.ɵɵnextContext(4);
|
|
2808
|
-
i0.ɵɵadvance();
|
|
2809
|
-
i0.ɵɵtextInterpolate(ctx_r3.formatVariable(v_r3));
|
|
2810
|
-
} }
|
|
2811
|
-
function TranslationListPage_Conditional_32_ng_template_3_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
2812
|
-
i0.ɵɵelementStart(0, "div", 27);
|
|
2813
|
-
i0.ɵɵrepeaterCreate(1, TranslationListPage_Conditional_32_ng_template_3_Conditional_5_For_2_Template, 2, 1, "span", 32, i0.ɵɵrepeaterTrackByIdentity);
|
|
2814
|
-
i0.ɵɵelementEnd();
|
|
2815
|
-
} if (rf & 2) {
|
|
2816
|
-
const row_r2 = i0.ɵɵnextContext().$implicit;
|
|
2817
|
-
i0.ɵɵadvance();
|
|
2818
|
-
i0.ɵɵrepeater(row_r2.translationKey.variables);
|
|
2819
|
-
} }
|
|
2820
|
-
function TranslationListPage_Conditional_32_ng_template_3_Template(rf, ctx) { if (rf & 1) {
|
|
2821
|
-
const _r1 = i0.ɵɵgetCurrentView();
|
|
2822
|
-
i0.ɵɵelementStart(0, "tr")(1, "td")(2, "div", 26);
|
|
2823
|
-
i0.ɵɵtext(3);
|
|
2824
|
-
i0.ɵɵelementEnd();
|
|
2825
|
-
i0.ɵɵconditionalCreate(4, TranslationListPage_Conditional_32_ng_template_3_Conditional_4_Template, 2, 1, "small", 19);
|
|
2826
|
-
i0.ɵɵconditionalCreate(5, TranslationListPage_Conditional_32_ng_template_3_Conditional_5_Template, 3, 0, "div", 27);
|
|
2827
|
-
i0.ɵɵelementEnd();
|
|
2828
|
-
i0.ɵɵelementStart(6, "td")(7, "span", 28);
|
|
2829
|
-
i0.ɵɵtext(8);
|
|
2830
|
-
i0.ɵɵelementEnd()();
|
|
2831
|
-
i0.ɵɵelementStart(9, "td")(10, "textarea", 29);
|
|
2832
|
-
i0.ɵɵtwoWayListener("ngModelChange", function TranslationListPage_Conditional_32_ng_template_3_Template_textarea_ngModelChange_10_listener($event) { const row_r2 = i0.ɵɵrestoreView(_r1).$implicit; i0.ɵɵtwoWayBindingSet(row_r2.editValue, $event) || (row_r2.editValue = $event); return i0.ɵɵresetView($event); });
|
|
2833
|
-
i0.ɵɵlistener("input", function TranslationListPage_Conditional_32_ng_template_3_Template_textarea_input_10_listener() { const row_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r3 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r3.onValueChange(row_r2)); });
|
|
2834
|
-
i0.ɵɵelementEnd()();
|
|
2835
|
-
i0.ɵɵelementStart(11, "td", 30)(12, "p-checkbox", 31);
|
|
2836
|
-
i0.ɵɵtwoWayListener("ngModelChange", function TranslationListPage_Conditional_32_ng_template_3_Template_p_checkbox_ngModelChange_12_listener($event) { const row_r2 = i0.ɵɵrestoreView(_r1).$implicit; i0.ɵɵtwoWayBindingSet(row_r2.isVerified, $event) || (row_r2.isVerified = $event); return i0.ɵɵresetView($event); });
|
|
2837
|
-
i0.ɵɵlistener("onChange", function TranslationListPage_Conditional_32_ng_template_3_Template_p_checkbox_onChange_12_listener() { const row_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r3 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r3.onVerifiedChange(row_r2)); });
|
|
2838
|
-
i0.ɵɵelementEnd()()();
|
|
2839
|
-
} if (rf & 2) {
|
|
2840
|
-
const row_r2 = ctx.$implicit;
|
|
2841
|
-
i0.ɵɵclassProp("bg-yellow-50", row_r2.isDirty);
|
|
2842
|
-
i0.ɵɵadvance(3);
|
|
2843
|
-
i0.ɵɵtextInterpolate(row_r2.translationKey.key);
|
|
2844
|
-
i0.ɵɵadvance();
|
|
2845
|
-
i0.ɵɵconditional(row_r2.translationKey.description ? 4 : -1);
|
|
2846
|
-
i0.ɵɵadvance();
|
|
2847
|
-
i0.ɵɵconditional((row_r2.translationKey.variables == null ? null : row_r2.translationKey.variables.length) ? 5 : -1);
|
|
2848
|
-
i0.ɵɵadvance(3);
|
|
2849
|
-
i0.ɵɵtextInterpolate(row_r2.translationKey.defaultMessage);
|
|
2850
|
-
i0.ɵɵadvance(2);
|
|
2851
|
-
i0.ɵɵtwoWayProperty("ngModel", row_r2.editValue);
|
|
2852
|
-
i0.ɵɵproperty("ngModelOptions", i0.ɵɵpureFunction0(13, _c0))("rows", 2)("placeholder", row_r2.translationKey.defaultMessage);
|
|
2853
|
-
i0.ɵɵadvance(2);
|
|
2854
|
-
i0.ɵɵtwoWayProperty("ngModel", row_r2.isVerified);
|
|
2855
|
-
i0.ɵɵproperty("ngModelOptions", i0.ɵɵpureFunction0(14, _c0))("binary", true);
|
|
2856
|
-
} }
|
|
2857
|
-
function TranslationListPage_Conditional_32_ng_template_5_Template(rf, ctx) { if (rf & 1) {
|
|
2858
|
-
i0.ɵɵelementStart(0, "tr")(1, "td", 33);
|
|
2859
|
-
i0.ɵɵtext(2);
|
|
2860
|
-
i0.ɵɵpipe(3, "translate");
|
|
2861
|
-
i0.ɵɵelementEnd()();
|
|
2862
|
-
} if (rf & 2) {
|
|
2863
|
-
i0.ɵɵadvance(2);
|
|
2864
|
-
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 1, "shared.no.results"), " ");
|
|
2865
|
-
} }
|
|
2866
|
-
function TranslationListPage_Conditional_32_Template(rf, ctx) { if (rf & 1) {
|
|
2867
|
-
i0.ɵɵelementStart(0, "p-table", 17);
|
|
2868
|
-
i0.ɵɵtemplate(1, TranslationListPage_Conditional_32_ng_template_1_Template, 13, 12, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor)(3, TranslationListPage_Conditional_32_ng_template_3_Template, 13, 15, "ng-template", null, 1, i0.ɵɵtemplateRefExtractor)(5, TranslationListPage_Conditional_32_ng_template_5_Template, 4, 3, "ng-template", null, 2, i0.ɵɵtemplateRefExtractor);
|
|
2869
|
-
i0.ɵɵelementEnd();
|
|
2870
|
-
} if (rf & 2) {
|
|
2871
|
-
const ctx_r3 = i0.ɵɵnextContext();
|
|
2872
|
-
i0.ɵɵproperty("value", ctx_r3.filteredRows())("paginator", true)("rows", 20)("rowsPerPageOptions", i0.ɵɵpureFunction0(6, _c1))("showCurrentPageReport", true)("currentPageReportTemplate", ctx_r3.paginationTemplate());
|
|
2873
|
-
} }
|
|
2874
|
-
function TranslationListPage_Conditional_35_Template(rf, ctx) { if (rf & 1) {
|
|
2875
|
-
i0.ɵɵelementStart(0, "span", 20);
|
|
2876
|
-
i0.ɵɵelement(1, "i", 34);
|
|
2877
|
-
i0.ɵɵtext(2);
|
|
2878
|
-
i0.ɵɵpipe(3, "translate");
|
|
2879
|
-
i0.ɵɵelementEnd();
|
|
2880
|
-
} if (rf & 2) {
|
|
2881
|
-
const ctx_r3 = i0.ɵɵnextContext();
|
|
2882
|
-
i0.ɵɵadvance(2);
|
|
2883
|
-
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(3, 1, "localization.translation.unsaved.changes", i0.ɵɵpureFunction1(4, _c2, ctx_r3.changedCount())), " ");
|
|
2884
|
-
} }
|
|
2885
2516
|
class TranslationListPage {
|
|
2886
2517
|
languageService = inject(LanguageApiService);
|
|
2887
2518
|
translationKeyService = inject(TranslationKeyApiService);
|
|
@@ -3050,83 +2681,173 @@ class TranslationListPage {
|
|
|
3050
2681
|
},
|
|
3051
2682
|
});
|
|
3052
2683
|
}
|
|
3053
|
-
static ɵfac =
|
|
3054
|
-
static ɵcmp =
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
2684
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: TranslationListPage, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2685
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.5", type: TranslationListPage, isStandalone: true, selector: "lib-translation-list-page", providers: [MessageService], ngImport: i0, template: `
|
|
2686
|
+
<div class="card">
|
|
2687
|
+
<div class="flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4 mb-4">
|
|
2688
|
+
<h2 class="text-xl font-semibold m-0">{{ 'localization.translation.title' | translate }}</h2>
|
|
2689
|
+
<div class="flex gap-2">
|
|
2690
|
+
<p-button
|
|
2691
|
+
[label]="'shared.save' | translate"
|
|
2692
|
+
icon="pi pi-save"
|
|
2693
|
+
[disabled]="!hasChanges()"
|
|
2694
|
+
[loading]="isSaving()"
|
|
2695
|
+
(onClick)="saveChanges()"
|
|
2696
|
+
/>
|
|
2697
|
+
</div>
|
|
2698
|
+
</div>
|
|
2699
|
+
|
|
2700
|
+
<div class="flex flex-col md:flex-row gap-4 mb-4">
|
|
2701
|
+
<div class="flex-1">
|
|
2702
|
+
<label class="block font-medium mb-2">{{ 'localization.translation.module' | translate }}</label>
|
|
2703
|
+
<p-select
|
|
2704
|
+
[options]="moduleOptions()"
|
|
2705
|
+
[ngModel]="selectedModule()"
|
|
2706
|
+
(ngModelChange)="onModuleChange($event)"
|
|
2707
|
+
[ngModelOptions]="{standalone: true}"
|
|
2708
|
+
optionLabel="label"
|
|
2709
|
+
optionValue="value"
|
|
2710
|
+
[placeholder]="'localization.translation.select.module' | translate"
|
|
2711
|
+
class="w-full"
|
|
2712
|
+
/>
|
|
2713
|
+
</div>
|
|
2714
|
+
<div class="flex-1">
|
|
2715
|
+
<label class="block font-medium mb-2">{{ 'localization.translation.language' | translate }}</label>
|
|
2716
|
+
<p-select
|
|
2717
|
+
[options]="languageOptions()"
|
|
2718
|
+
[ngModel]="selectedLanguageId()"
|
|
2719
|
+
(ngModelChange)="onLanguageChange($event)"
|
|
2720
|
+
[ngModelOptions]="{standalone: true}"
|
|
2721
|
+
optionLabel="label"
|
|
2722
|
+
optionValue="value"
|
|
2723
|
+
[placeholder]="'localization.translation.select.language' | translate"
|
|
2724
|
+
class="w-full"
|
|
2725
|
+
/>
|
|
2726
|
+
</div>
|
|
2727
|
+
<div class="flex-1">
|
|
2728
|
+
<label class="block font-medium mb-2">{{ 'shared.search' | translate }}</label>
|
|
2729
|
+
<p-iconfield class="w-full">
|
|
2730
|
+
<p-inputicon class="pi pi-search" />
|
|
2731
|
+
<input
|
|
2732
|
+
pInputText
|
|
2733
|
+
[ngModel]="searchTerm()"
|
|
2734
|
+
(ngModelChange)="searchTerm.set($event)"
|
|
2735
|
+
[ngModelOptions]="{standalone: true}"
|
|
2736
|
+
[placeholder]="'localization.translation.search.keys' | translate"
|
|
2737
|
+
class="w-full"
|
|
2738
|
+
/>
|
|
2739
|
+
</p-iconfield>
|
|
2740
|
+
</div>
|
|
2741
|
+
</div>
|
|
2742
|
+
|
|
2743
|
+
@if (isLoading()) {
|
|
2744
|
+
<div class="flex justify-center py-8">
|
|
2745
|
+
<p-progressSpinner strokeWidth="4" />
|
|
2746
|
+
</div>
|
|
2747
|
+
} @else if (!selectedLanguageId()) {
|
|
2748
|
+
<div class="text-center py-8 text-muted-color">
|
|
2749
|
+
<p>{{ 'localization.translation.select.language.hint' | translate }}</p>
|
|
2750
|
+
</div>
|
|
2751
|
+
} @else if (filteredRows().length === 0) {
|
|
2752
|
+
<div class="text-center py-8 text-muted-color">
|
|
2753
|
+
<p>{{ 'localization.translation.no.keys' | translate }}</p>
|
|
2754
|
+
</div>
|
|
2755
|
+
} @else {
|
|
2756
|
+
<p-table
|
|
2757
|
+
[value]="filteredRows()"
|
|
2758
|
+
[paginator]="true"
|
|
2759
|
+
[rows]="20"
|
|
2760
|
+
[rowsPerPageOptions]="[10, 20, 50, 100]"
|
|
2761
|
+
[showCurrentPageReport]="true"
|
|
2762
|
+
[currentPageReportTemplate]="paginationTemplate()"
|
|
2763
|
+
styleClass="p-datatable-sm"
|
|
2764
|
+
>
|
|
2765
|
+
<ng-template #header>
|
|
2766
|
+
<tr>
|
|
2767
|
+
<th style="width: 30%">{{ 'localization.translation.key' | translate }}</th>
|
|
2768
|
+
<th style="width: 25%">{{ 'localization.translation.default.message' | translate }}</th>
|
|
2769
|
+
<th style="width: 35%">{{ 'localization.translation.value' | translate }}</th>
|
|
2770
|
+
<th style="width: 10%">{{ 'localization.translation.verified' | translate }}</th>
|
|
2771
|
+
</tr>
|
|
2772
|
+
</ng-template>
|
|
2773
|
+
<ng-template #body let-row>
|
|
2774
|
+
<tr [class.bg-yellow-50]="row.isDirty">
|
|
2775
|
+
<td>
|
|
2776
|
+
<div class="font-medium text-sm">{{ row.translationKey.key }}</div>
|
|
2777
|
+
@if (row.translationKey.description) {
|
|
2778
|
+
<small class="text-muted-color">{{ row.translationKey.description }}</small>
|
|
2779
|
+
}
|
|
2780
|
+
@if (row.translationKey.variables?.length) {
|
|
2781
|
+
<div class="mt-1">
|
|
2782
|
+
@for (v of row.translationKey.variables; track v) {
|
|
2783
|
+
<span class="text-xs bg-surface-100 px-2 py-1 rounded mr-1">{{ formatVariable(v) }}</span>
|
|
2784
|
+
}
|
|
2785
|
+
</div>
|
|
2786
|
+
}
|
|
2787
|
+
</td>
|
|
2788
|
+
<td>
|
|
2789
|
+
<span class="text-sm">{{ row.translationKey.defaultMessage }}</span>
|
|
2790
|
+
</td>
|
|
2791
|
+
<td>
|
|
2792
|
+
<textarea
|
|
2793
|
+
pInputTextarea
|
|
2794
|
+
[(ngModel)]="row.editValue"
|
|
2795
|
+
[ngModelOptions]="{standalone: true}"
|
|
2796
|
+
[rows]="2"
|
|
2797
|
+
class="w-full"
|
|
2798
|
+
[placeholder]="row.translationKey.defaultMessage"
|
|
2799
|
+
(input)="onValueChange(row)"
|
|
2800
|
+
></textarea>
|
|
2801
|
+
</td>
|
|
2802
|
+
<td class="text-center">
|
|
2803
|
+
<p-checkbox
|
|
2804
|
+
[(ngModel)]="row.isVerified"
|
|
2805
|
+
[ngModelOptions]="{standalone: true}"
|
|
2806
|
+
[binary]="true"
|
|
2807
|
+
(onChange)="onVerifiedChange(row)"
|
|
2808
|
+
/>
|
|
2809
|
+
</td>
|
|
2810
|
+
</tr>
|
|
2811
|
+
</ng-template>
|
|
2812
|
+
<ng-template #emptymessage>
|
|
2813
|
+
<tr>
|
|
2814
|
+
<td colspan="4" class="text-center py-4 text-muted-color">
|
|
2815
|
+
{{ 'shared.no.results' | translate }}
|
|
2816
|
+
</td>
|
|
2817
|
+
</tr>
|
|
2818
|
+
</ng-template>
|
|
2819
|
+
</p-table>
|
|
2820
|
+
}
|
|
2821
|
+
|
|
2822
|
+
<div class="flex justify-between items-center mt-4">
|
|
2823
|
+
<div class="text-muted-color">
|
|
2824
|
+
@if (hasChanges()) {
|
|
2825
|
+
<span class="text-orange-500">
|
|
2826
|
+
<i class="pi pi-exclamation-circle mr-1"></i>
|
|
2827
|
+
{{ 'localization.translation.unsaved.changes' | translate: { count: changedCount() } }}
|
|
2828
|
+
</span>
|
|
2829
|
+
}
|
|
2830
|
+
</div>
|
|
2831
|
+
<p-button
|
|
2832
|
+
[label]="'shared.save' | translate"
|
|
2833
|
+
icon="pi pi-save"
|
|
2834
|
+
[disabled]="!hasChanges()"
|
|
2835
|
+
[loading]="isSaving()"
|
|
2836
|
+
(onClick)="saveChanges()"
|
|
2837
|
+
/>
|
|
2838
|
+
</div>
|
|
2839
|
+
</div>
|
|
2840
|
+
|
|
2841
|
+
<p-toast />
|
|
2842
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: AngularModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: PrimeModule }, { kind: "component", type: i2.Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i3$1.Checkbox, selector: "p-checkbox, p-checkBox, p-check-box", inputs: ["hostName", "value", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "inputStyle", "styleClass", "inputClass", "indeterminate", "formControl", "checkboxIcon", "readonly", "autofocus", "trueValue", "falseValue", "variant", "size"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "component", type: i4$2.IconField, selector: "p-iconfield, p-iconField, p-icon-field", inputs: ["hostName", "iconPosition", "styleClass"] }, { kind: "component", type: i5$1.InputIcon, selector: "p-inputicon, p-inputIcon", inputs: ["hostName", "styleClass"] }, { kind: "directive", type: i4$1.InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "component", type: i5.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", "motionOptions"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "component", type: i8.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: i7.Textarea, selector: "[pTextarea], [pInputTextarea]", inputs: ["pTextareaPT", "pTextareaUnstyled", "autoResize", "pSize", "variant", "fluid", "invalid"], outputs: ["onResize"] }, { kind: "component", type: i10.Toast, selector: "p-toast", inputs: ["key", "autoZIndex", "baseZIndex", "life", "styleClass", "position", "preventOpenDuplicates", "preventDuplicates", "showTransformOptions", "hideTransformOptions", "showTransitionOptions", "hideTransitionOptions", "motionOptions", "breakpoints"], outputs: ["onClose"] }, { kind: "component", type: i9.ProgressSpinner, selector: "p-progressSpinner, p-progress-spinner, p-progressspinner", inputs: ["styleClass", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "ngmodule", type: FormsModule }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
3122
2843
|
}
|
|
3123
|
-
(
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
2844
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: TranslationListPage, decorators: [{
|
|
2845
|
+
type: Component,
|
|
2846
|
+
args: [{
|
|
2847
|
+
selector: 'lib-translation-list-page',
|
|
2848
|
+
imports: [AngularModule, PrimeModule, FormsModule, TranslatePipe],
|
|
2849
|
+
providers: [MessageService],
|
|
2850
|
+
template: `
|
|
3130
2851
|
<div class="card">
|
|
3131
2852
|
<div class="flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4 mb-4">
|
|
3132
2853
|
<h2 class="text-xl font-semibold m-0">{{ 'localization.translation.title' | translate }}</h2>
|
|
@@ -3284,9 +3005,8 @@ class TranslationListPage {
|
|
|
3284
3005
|
|
|
3285
3006
|
<p-toast />
|
|
3286
3007
|
`,
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(TranslationListPage, { className: "TranslationListPage", filePath: "pages/translation-list/translation-list.page.ts", lineNumber: 193 }); })();
|
|
3008
|
+
}]
|
|
3009
|
+
}] });
|
|
3290
3010
|
|
|
3291
3011
|
var translationList_page = /*#__PURE__*/Object.freeze({
|
|
3292
3012
|
__proto__: null,
|