@flusys/ng-localization 5.4.0 → 5.5.0
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.
|
@@ -20,15 +20,13 @@ import * as i2 from 'primeng/button';
|
|
|
20
20
|
import * as i3 from 'primeng/card';
|
|
21
21
|
import * as i4 from 'primeng/inputtext';
|
|
22
22
|
import * as i5 from 'primeng/select';
|
|
23
|
-
import * as
|
|
24
|
-
import * as
|
|
25
|
-
import * as
|
|
26
|
-
import * as i4$1 from 'primeng/tag';
|
|
27
|
-
import * as i6$1 from 'primeng/tooltip';
|
|
23
|
+
import * as i2$1 from 'primeng/table';
|
|
24
|
+
import * as i3$1 from 'primeng/tag';
|
|
25
|
+
import * as i4$1 from 'primeng/tooltip';
|
|
28
26
|
import * as i7 from 'primeng/textarea';
|
|
29
|
-
import * as
|
|
30
|
-
import * as
|
|
31
|
-
import * as
|
|
27
|
+
import * as i8 from 'primeng/progressspinner';
|
|
28
|
+
import * as i3$2 from 'primeng/iconfield';
|
|
29
|
+
import * as i4$2 from 'primeng/inputicon';
|
|
32
30
|
|
|
33
31
|
const LOCALIZATION_CONFIG = new InjectionToken('LOCALIZATION_CONFIG');
|
|
34
32
|
/** Get localization config with sensible defaults applied */
|
|
@@ -162,10 +160,10 @@ class LanguageApiService extends ApiResourceService {
|
|
|
162
160
|
setDefault(id) {
|
|
163
161
|
return this.http.post(`${this.baseUrl}/set-default`, { id });
|
|
164
162
|
}
|
|
165
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
166
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
163
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: LanguageApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
164
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: LanguageApiService, providedIn: 'root' });
|
|
167
165
|
}
|
|
168
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
166
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: LanguageApiService, decorators: [{
|
|
169
167
|
type: Injectable,
|
|
170
168
|
args: [{ providedIn: 'root' }]
|
|
171
169
|
}], ctorParameters: () => [] });
|
|
@@ -182,10 +180,10 @@ class LocalizationApiService {
|
|
|
182
180
|
getTranslationsByLanguage(languageCode, modules) {
|
|
183
181
|
return this.http.post(`${this.baseUrl}/translation/get-by-language`, { languageCode, ...(modules?.length ? { modules } : {}) });
|
|
184
182
|
}
|
|
185
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
186
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
183
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: LocalizationApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
184
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: LocalizationApiService, providedIn: 'root' });
|
|
187
185
|
}
|
|
188
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
186
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: LocalizationApiService, decorators: [{
|
|
189
187
|
type: Injectable,
|
|
190
188
|
args: [{ providedIn: 'root' }]
|
|
191
189
|
}] });
|
|
@@ -226,10 +224,10 @@ class LocalizationInitializerService {
|
|
|
226
224
|
this.stateService.setLoading(false);
|
|
227
225
|
}
|
|
228
226
|
}
|
|
229
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
230
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
227
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: LocalizationInitializerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
228
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: LocalizationInitializerService, providedIn: 'root' });
|
|
231
229
|
}
|
|
232
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
230
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: LocalizationInitializerService, decorators: [{
|
|
233
231
|
type: Injectable,
|
|
234
232
|
args: [{ providedIn: 'root' }]
|
|
235
233
|
}] });
|
|
@@ -240,16 +238,22 @@ class LocalizationStateService {
|
|
|
240
238
|
appRef = inject(ApplicationRef);
|
|
241
239
|
primeNG = inject(PrimeNG);
|
|
242
240
|
_loadedModules = new Set();
|
|
243
|
-
_currentLanguage = signal(null,
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
241
|
+
_currentLanguage = signal(null, /* @ts-ignore */
|
|
242
|
+
...(ngDevMode ? [{ debugName: "_currentLanguage" }] : /* istanbul ignore next */ []));
|
|
243
|
+
_availableLanguages = signal([], /* @ts-ignore */
|
|
244
|
+
...(ngDevMode ? [{ debugName: "_availableLanguages" }] : /* istanbul ignore next */ []));
|
|
245
|
+
_translations = signal({}, /* @ts-ignore */
|
|
246
|
+
...(ngDevMode ? [{ debugName: "_translations" }] : /* istanbul ignore next */ []));
|
|
247
|
+
_fallbackMessages = signal({}, /* @ts-ignore */
|
|
248
|
+
...(ngDevMode ? [{ debugName: "_fallbackMessages" }] : /* istanbul ignore next */ []));
|
|
249
|
+
_isLoading = signal(false, /* @ts-ignore */
|
|
250
|
+
...(ngDevMode ? [{ debugName: "_isLoading" }] : /* istanbul ignore next */ []));
|
|
248
251
|
availableLanguages = this._availableLanguages.asReadonly();
|
|
249
252
|
translations = this._translations.asReadonly();
|
|
250
253
|
fallbackMessages = this._fallbackMessages.asReadonly();
|
|
251
254
|
isLoading = this._isLoading.asReadonly();
|
|
252
|
-
currentLanguageCode = computed(() => this._currentLanguage()?.code ?? 'en',
|
|
255
|
+
currentLanguageCode = computed(() => this._currentLanguage()?.code ?? 'en', /* @ts-ignore */
|
|
256
|
+
...(ngDevMode ? [{ debugName: "currentLanguageCode" }] : /* istanbul ignore next */ []));
|
|
253
257
|
constructor() {
|
|
254
258
|
effect(() => {
|
|
255
259
|
const language = this._currentLanguage();
|
|
@@ -375,10 +379,10 @@ class LocalizationStateService {
|
|
|
375
379
|
updateFallbackMessages(messages) {
|
|
376
380
|
this._fallbackMessages.update((current) => ({ ...current, ...messages }));
|
|
377
381
|
}
|
|
378
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
379
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
382
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: LocalizationStateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
383
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: LocalizationStateService, providedIn: 'root' });
|
|
380
384
|
}
|
|
381
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
385
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: LocalizationStateService, decorators: [{
|
|
382
386
|
type: Injectable,
|
|
383
387
|
args: [{ providedIn: 'root' }]
|
|
384
388
|
}], ctorParameters: () => [] });
|
|
@@ -400,10 +404,10 @@ class TranslationApiService extends ApiResourceService {
|
|
|
400
404
|
bulkUpdate(translations) {
|
|
401
405
|
return this.http.post(`${this.baseUrl}/update-many-values`, { translations });
|
|
402
406
|
}
|
|
403
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
404
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
407
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TranslationApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
408
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TranslationApiService, providedIn: 'root' });
|
|
405
409
|
}
|
|
406
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
410
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TranslationApiService, decorators: [{
|
|
407
411
|
type: Injectable,
|
|
408
412
|
args: [{ providedIn: 'root' }]
|
|
409
413
|
}], ctorParameters: () => [] });
|
|
@@ -415,10 +419,10 @@ class TranslationKeyApiService extends ApiResourceService {
|
|
|
415
419
|
getModules() {
|
|
416
420
|
return this.http.post(`${this.baseUrl}/get-modules`, {});
|
|
417
421
|
}
|
|
418
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
419
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
422
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TranslationKeyApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
423
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TranslationKeyApiService, providedIn: 'root' });
|
|
420
424
|
}
|
|
421
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
425
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TranslationKeyApiService, decorators: [{
|
|
422
426
|
type: Injectable,
|
|
423
427
|
args: [{ providedIn: 'root' }]
|
|
424
428
|
}], ctorParameters: () => [] });
|
|
@@ -482,10 +486,10 @@ class TranslationLoaderService {
|
|
|
482
486
|
loadTranslationsAsync(languageCode, clearModules = false) {
|
|
483
487
|
return from(this.loadTranslations(languageCode, clearModules));
|
|
484
488
|
}
|
|
485
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
486
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
489
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TranslationLoaderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
490
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TranslationLoaderService, providedIn: 'root' });
|
|
487
491
|
}
|
|
488
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
492
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TranslationLoaderService, decorators: [{
|
|
489
493
|
type: Injectable,
|
|
490
494
|
args: [{ providedIn: 'root' }]
|
|
491
495
|
}] });
|
|
@@ -497,10 +501,12 @@ class LanguageSelectorComponent {
|
|
|
497
501
|
document = inject(DOCUMENT);
|
|
498
502
|
elementRef = inject(ElementRef);
|
|
499
503
|
languages = this.localizationState.availableLanguages;
|
|
500
|
-
_isActive = signal(false,
|
|
504
|
+
_isActive = signal(false, /* @ts-ignore */
|
|
505
|
+
...(ngDevMode ? [{ debugName: "_isActive" }] : /* istanbul ignore next */ []));
|
|
501
506
|
isActive = this._isActive.asReadonly();
|
|
502
507
|
selectedLanguageCode = this.localizationState.currentLanguageCode;
|
|
503
|
-
selectedLanguage = computed(() => this.languages().find((l) => l.code === this.selectedLanguageCode()) ?? null,
|
|
508
|
+
selectedLanguage = computed(() => this.languages().find((l) => l.code === this.selectedLanguageCode()) ?? null, /* @ts-ignore */
|
|
509
|
+
...(ngDevMode ? [{ debugName: "selectedLanguage" }] : /* istanbul ignore next */ []));
|
|
504
510
|
constructor() {
|
|
505
511
|
fromEvent(this.document, 'click')
|
|
506
512
|
.pipe(takeUntilDestroyed(this.destroyRef), filter(() => this._isActive()))
|
|
@@ -525,8 +531,8 @@ class LanguageSelectorComponent {
|
|
|
525
531
|
.subscribe();
|
|
526
532
|
}
|
|
527
533
|
}
|
|
528
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
529
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
534
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: LanguageSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
535
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: LanguageSelectorComponent, isStandalone: true, selector: "lib-language-selector", host: { classAttribute: "relative" }, ngImport: i0, template: `
|
|
530
536
|
<button
|
|
531
537
|
type="button"
|
|
532
538
|
class="layout-topbar-action"
|
|
@@ -563,7 +569,7 @@ class LanguageSelectorComponent {
|
|
|
563
569
|
</div>
|
|
564
570
|
`, 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"] }] });
|
|
565
571
|
}
|
|
566
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
572
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: LanguageSelectorComponent, decorators: [{
|
|
567
573
|
type: Component,
|
|
568
574
|
args: [{
|
|
569
575
|
selector: 'lib-language-selector',
|
|
@@ -613,7 +619,8 @@ class LanguageSelectorPanelComponent {
|
|
|
613
619
|
translationLoader = inject(TranslationLoaderService);
|
|
614
620
|
destroyRef = inject(DestroyRef);
|
|
615
621
|
languages = this.localizationState.availableLanguages;
|
|
616
|
-
_selectedLanguageCode = signal(this.localizationState.currentLanguageCode(),
|
|
622
|
+
_selectedLanguageCode = signal(this.localizationState.currentLanguageCode(), /* @ts-ignore */
|
|
623
|
+
...(ngDevMode ? [{ debugName: "_selectedLanguageCode" }] : /* istanbul ignore next */ []));
|
|
617
624
|
selectedLanguageCode = this._selectedLanguageCode.asReadonly();
|
|
618
625
|
constructor() {
|
|
619
626
|
effect(() => {
|
|
@@ -634,8 +641,8 @@ class LanguageSelectorPanelComponent {
|
|
|
634
641
|
.subscribe();
|
|
635
642
|
}
|
|
636
643
|
}
|
|
637
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
638
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
644
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: LanguageSelectorPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
645
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.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: `
|
|
639
646
|
<div class="flex flex-col">
|
|
640
647
|
@for (lang of languages(); track lang.id) {
|
|
641
648
|
<button
|
|
@@ -654,7 +661,7 @@ class LanguageSelectorPanelComponent {
|
|
|
654
661
|
</div>
|
|
655
662
|
`, isInline: true });
|
|
656
663
|
}
|
|
657
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
664
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: LanguageSelectorPanelComponent, decorators: [{
|
|
658
665
|
type: Component,
|
|
659
666
|
args: [{
|
|
660
667
|
selector: 'lib-language-selector-panel',
|
|
@@ -724,9 +731,12 @@ class LanguageFormPage {
|
|
|
724
731
|
destroyRef = inject(DestroyRef);
|
|
725
732
|
routeParams = toSignal(this.route.paramMap);
|
|
726
733
|
loadTriggered = false;
|
|
727
|
-
isSaving = signal(false,
|
|
728
|
-
|
|
729
|
-
|
|
734
|
+
isSaving = signal(false, /* @ts-ignore */
|
|
735
|
+
...(ngDevMode ? [{ debugName: "isSaving" }] : /* istanbul ignore next */ []));
|
|
736
|
+
existingLanguage = signal(null, /* @ts-ignore */
|
|
737
|
+
...(ngDevMode ? [{ debugName: "existingLanguage" }] : /* istanbul ignore next */ []));
|
|
738
|
+
isEditMode = computed(() => !!this.existingLanguage(), /* @ts-ignore */
|
|
739
|
+
...(ngDevMode ? [{ debugName: "isEditMode" }] : /* istanbul ignore next */ []));
|
|
730
740
|
translate(key, vars) {
|
|
731
741
|
return this.translateAdapter?.translate(key, vars) ?? key;
|
|
732
742
|
}
|
|
@@ -739,7 +749,8 @@ class LanguageFormPage {
|
|
|
739
749
|
label: this.translate('localization.language.direction.rtl'),
|
|
740
750
|
value: 'rtl',
|
|
741
751
|
},
|
|
742
|
-
],
|
|
752
|
+
], /* @ts-ignore */
|
|
753
|
+
...(ngDevMode ? [{ debugName: "directionOptions" }] : /* istanbul ignore next */ []));
|
|
743
754
|
formModel = signal({
|
|
744
755
|
code: '',
|
|
745
756
|
name: '',
|
|
@@ -748,7 +759,8 @@ class LanguageFormPage {
|
|
|
748
759
|
serial: '',
|
|
749
760
|
isActive: true,
|
|
750
761
|
isDefault: false,
|
|
751
|
-
},
|
|
762
|
+
}, /* @ts-ignore */
|
|
763
|
+
...(ngDevMode ? [{ debugName: "formModel" }] : /* istanbul ignore next */ []));
|
|
752
764
|
formTree = form(this.formModel, (f) => {
|
|
753
765
|
required(f.code, {
|
|
754
766
|
message: this.translate('localization.validation.code.required'),
|
|
@@ -766,7 +778,8 @@ class LanguageFormPage {
|
|
|
766
778
|
isFormValid = computed(() => {
|
|
767
779
|
const model = this.formModel();
|
|
768
780
|
return model.code.trim().length > 0 && model.name.trim().length > 0;
|
|
769
|
-
},
|
|
781
|
+
}, /* @ts-ignore */
|
|
782
|
+
...(ngDevMode ? [{ debugName: "isFormValid" }] : /* istanbul ignore next */ []));
|
|
770
783
|
constructor() {
|
|
771
784
|
effect(() => {
|
|
772
785
|
const params = this.routeParams();
|
|
@@ -847,8 +860,8 @@ class LanguageFormPage {
|
|
|
847
860
|
onCancel() {
|
|
848
861
|
this.router.navigate(['/localization/languages']);
|
|
849
862
|
}
|
|
850
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
851
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
863
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: LanguageFormPage, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
864
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: LanguageFormPage, isStandalone: true, selector: "lib-language-form-page", ngImport: i0, template: `
|
|
852
865
|
<p-card>
|
|
853
866
|
<ng-template #header>
|
|
854
867
|
<div class="flex justify-between items-center p-4">
|
|
@@ -959,35 +972,38 @@ class LanguageFormPage {
|
|
|
959
972
|
|
|
960
973
|
<!-- Actions -->
|
|
961
974
|
<div class="flex justify-end gap-4 md:col-span-2 pt-4">
|
|
962
|
-
<
|
|
963
|
-
|
|
975
|
+
<button
|
|
976
|
+
pButton
|
|
964
977
|
severity="secondary"
|
|
965
978
|
[outlined]="true"
|
|
966
|
-
(
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
979
|
+
(click)="onCancel()"
|
|
980
|
+
>
|
|
981
|
+
<span pButtonLabel>{{ 'shared.cancel' | translate }}</span>
|
|
982
|
+
</button>
|
|
983
|
+
<button
|
|
984
|
+
pButton
|
|
985
|
+
type="submit"
|
|
986
|
+
[disabled]="!isFormValid() || isSaving()"
|
|
987
|
+
>
|
|
988
|
+
@if (isSaving()) {
|
|
989
|
+
<span pButtonIcon class="pi pi-spinner pi-spin"></span>
|
|
990
|
+
}
|
|
991
|
+
<span pButtonLabel>{{
|
|
970
992
|
isEditMode()
|
|
971
993
|
? ('shared.update' | translate)
|
|
972
994
|
: ('shared.create' | translate)
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
[loading]="isSaving()"
|
|
976
|
-
[disabled]="!isFormValid() || isSaving()"
|
|
977
|
-
/>
|
|
995
|
+
}}</span>
|
|
996
|
+
</button>
|
|
978
997
|
</div>
|
|
979
998
|
</form>
|
|
980
999
|
</p-card>
|
|
981
|
-
|
|
982
|
-
<p-toast />
|
|
983
|
-
`, 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.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: i6.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" }] });
|
|
1000
|
+
`, 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: "directive", type: i2.ButtonDirective, selector: "[pButton]", inputs: ["pButton", "pButtonPT", "pButtonUnstyled", "hostName", "text", "plain", "raised", "size", "outlined", "link", "rounded", "fluid", "variant", "iconOnly", "loading", "severity"] }, { kind: "directive", type: i2.ButtonLabel, selector: "[pButtonLabel]", inputs: ["pButtonLabelPT", "pButtonLabelUnstyled"] }, { kind: "directive", type: i2.ButtonIcon, selector: "[pButtonIcon]", inputs: ["pButtonIconPT", "pButtonUnstyled"] }, { kind: "component", type: i3.Card, selector: "p-card", inputs: ["header", "subheader"] }, { kind: "directive", type: i4.InputText, selector: "[pInputText]", inputs: ["hostName", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "component", type: i5.Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "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", "multiple", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo", "motionOptions"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: FormField, selector: "[formField]", inputs: ["formField"], exportAs: ["formField"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
984
1001
|
}
|
|
985
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1002
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: LanguageFormPage, decorators: [{
|
|
986
1003
|
type: Component,
|
|
987
1004
|
args: [{
|
|
988
1005
|
selector: 'lib-language-form-page',
|
|
989
1006
|
imports: [AngularModule, PrimeModule, FormsModule, FormField, TranslatePipe],
|
|
990
|
-
providers: [MessageService],
|
|
991
1007
|
template: `
|
|
992
1008
|
<p-card>
|
|
993
1009
|
<ng-template #header>
|
|
@@ -1099,27 +1115,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
1099
1115
|
|
|
1100
1116
|
<!-- Actions -->
|
|
1101
1117
|
<div class="flex justify-end gap-4 md:col-span-2 pt-4">
|
|
1102
|
-
<
|
|
1103
|
-
|
|
1118
|
+
<button
|
|
1119
|
+
pButton
|
|
1104
1120
|
severity="secondary"
|
|
1105
1121
|
[outlined]="true"
|
|
1106
|
-
(
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1122
|
+
(click)="onCancel()"
|
|
1123
|
+
>
|
|
1124
|
+
<span pButtonLabel>{{ 'shared.cancel' | translate }}</span>
|
|
1125
|
+
</button>
|
|
1126
|
+
<button
|
|
1127
|
+
pButton
|
|
1128
|
+
type="submit"
|
|
1129
|
+
[disabled]="!isFormValid() || isSaving()"
|
|
1130
|
+
>
|
|
1131
|
+
@if (isSaving()) {
|
|
1132
|
+
<span pButtonIcon class="pi pi-spinner pi-spin"></span>
|
|
1133
|
+
}
|
|
1134
|
+
<span pButtonLabel>{{
|
|
1110
1135
|
isEditMode()
|
|
1111
1136
|
? ('shared.update' | translate)
|
|
1112
1137
|
: ('shared.create' | translate)
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
[loading]="isSaving()"
|
|
1116
|
-
[disabled]="!isFormValid() || isSaving()"
|
|
1117
|
-
/>
|
|
1138
|
+
}}</span>
|
|
1139
|
+
</button>
|
|
1118
1140
|
</div>
|
|
1119
1141
|
</form>
|
|
1120
1142
|
</p-card>
|
|
1121
|
-
|
|
1122
|
-
<p-toast />
|
|
1123
1143
|
`,
|
|
1124
1144
|
}]
|
|
1125
1145
|
}], ctorParameters: () => [] });
|
|
@@ -1202,8 +1222,8 @@ class LanguageListPage {
|
|
|
1202
1222
|
},
|
|
1203
1223
|
});
|
|
1204
1224
|
}
|
|
1205
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1206
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1225
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: LanguageListPage, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1226
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: LanguageListPage, isStandalone: true, selector: "lib-language-list-page", ngImport: i0, template: `
|
|
1207
1227
|
<div class="card">
|
|
1208
1228
|
<div
|
|
1209
1229
|
class="flex flex-col sm:flex-row justify-between items-start sm:items-center gap-3 mb-4"
|
|
@@ -1216,13 +1236,15 @@ class LanguageListPage {
|
|
|
1216
1236
|
{{ 'localization.language.subtitle' | translate }}
|
|
1217
1237
|
</p>
|
|
1218
1238
|
</div>
|
|
1219
|
-
<
|
|
1239
|
+
<button
|
|
1240
|
+
pButton
|
|
1220
1241
|
*hasPermission="LANGUAGE_PERMISSIONS.CREATE"
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1242
|
+
(click)="onCreate()"
|
|
1243
|
+
class="w-full sm:w-auto"
|
|
1244
|
+
>
|
|
1245
|
+
<span pButtonIcon class="pi pi-plus"></span>
|
|
1246
|
+
<span pButtonLabel>{{ 'localization.language.new' | translate }}</span>
|
|
1247
|
+
</button>
|
|
1226
1248
|
</div>
|
|
1227
1249
|
|
|
1228
1250
|
<div class="overflow-x-auto -mx-4 sm:mx-0">
|
|
@@ -1281,36 +1303,42 @@ class LanguageListPage {
|
|
|
1281
1303
|
<td>
|
|
1282
1304
|
<div class="flex gap-1">
|
|
1283
1305
|
@if (!lang.isDefault) {
|
|
1284
|
-
<
|
|
1306
|
+
<button
|
|
1307
|
+
pButton
|
|
1285
1308
|
*hasPermission="LANGUAGE_PERMISSIONS.UPDATE"
|
|
1286
|
-
icon="pi pi-star"
|
|
1287
1309
|
[text]="true"
|
|
1288
1310
|
size="small"
|
|
1289
1311
|
[pTooltip]="
|
|
1290
1312
|
'localization.language.set.default' | translate
|
|
1291
1313
|
"
|
|
1292
|
-
(
|
|
1293
|
-
|
|
1314
|
+
(click)="onSetDefault(lang)"
|
|
1315
|
+
>
|
|
1316
|
+
<span pButtonIcon class="pi pi-star"></span>
|
|
1317
|
+
</button>
|
|
1294
1318
|
}
|
|
1295
|
-
<
|
|
1319
|
+
<button
|
|
1320
|
+
pButton
|
|
1296
1321
|
*hasPermission="LANGUAGE_PERMISSIONS.UPDATE"
|
|
1297
|
-
icon="pi pi-pencil"
|
|
1298
1322
|
[text]="true"
|
|
1299
1323
|
severity="secondary"
|
|
1300
1324
|
size="small"
|
|
1301
1325
|
[pTooltip]="'shared.edit' | translate"
|
|
1302
|
-
(
|
|
1303
|
-
|
|
1304
|
-
|
|
1326
|
+
(click)="onEdit(lang.id)"
|
|
1327
|
+
>
|
|
1328
|
+
<span pButtonIcon class="pi pi-pencil"></span>
|
|
1329
|
+
</button>
|
|
1330
|
+
<button
|
|
1331
|
+
pButton
|
|
1305
1332
|
*hasPermission="LANGUAGE_PERMISSIONS.DELETE"
|
|
1306
|
-
icon="pi pi-trash"
|
|
1307
1333
|
[text]="true"
|
|
1308
1334
|
severity="danger"
|
|
1309
1335
|
size="small"
|
|
1310
1336
|
[pTooltip]="'shared.delete' | translate"
|
|
1311
1337
|
[disabled]="lang.isDefault"
|
|
1312
|
-
(
|
|
1313
|
-
|
|
1338
|
+
(click)="onDelete(lang)"
|
|
1339
|
+
>
|
|
1340
|
+
<span pButtonIcon class="pi pi-trash"></span>
|
|
1341
|
+
</button>
|
|
1314
1342
|
</div>
|
|
1315
1343
|
</td>
|
|
1316
1344
|
</tr>
|
|
@@ -1326,17 +1354,13 @@ class LanguageListPage {
|
|
|
1326
1354
|
</p-table>
|
|
1327
1355
|
</div>
|
|
1328
1356
|
</div>
|
|
1329
|
-
|
|
1330
|
-
<p-confirmDialog />
|
|
1331
|
-
<p-toast />
|
|
1332
|
-
`, 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: i3$1.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$1.Tag, selector: "p-tag", inputs: ["styleClass", "severity", "value", "icon", "rounded"] }, { kind: "component", type: i6.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$1.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" }] });
|
|
1357
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: AngularModule }, { kind: "ngmodule", type: PrimeModule }, { kind: "directive", type: i2.ButtonDirective, selector: "[pButton]", inputs: ["pButton", "pButtonPT", "pButtonUnstyled", "hostName", "text", "plain", "raised", "size", "outlined", "link", "rounded", "fluid", "variant", "iconOnly", "loading", "severity"] }, { kind: "directive", type: i2.ButtonLabel, selector: "[pButtonLabel]", inputs: ["pButtonLabelPT", "pButtonLabelUnstyled"] }, { kind: "directive", type: i2.ButtonIcon, selector: "[pButtonIcon]", inputs: ["pButtonIconPT", "pButtonUnstyled"] }, { kind: "component", type: i2$1.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "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", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll"], outputs: ["contextMenuSelectionChange", "firstChange", "rowsChange", "totalRecordsChange", "selectionChange", "selectAllChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "onStateSave", "onStateRestore"] }, { kind: "component", type: i3$1.Tag, selector: "p-tag", inputs: ["severity", "value", "icon", "rounded"] }, { kind: "directive", type: i4$1.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "showOnEllipsis", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "pTooltipPT", "pTooltipUnstyled"] }, { kind: "directive", type: HasPermissionDirective, selector: "[hasPermission]", inputs: ["hasPermission"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
1333
1358
|
}
|
|
1334
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1359
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: LanguageListPage, decorators: [{
|
|
1335
1360
|
type: Component,
|
|
1336
1361
|
args: [{
|
|
1337
1362
|
selector: 'lib-language-list-page',
|
|
1338
1363
|
imports: [AngularModule, PrimeModule, HasPermissionDirective, TranslatePipe],
|
|
1339
|
-
providers: [ConfirmationService, MessageService],
|
|
1340
1364
|
template: `
|
|
1341
1365
|
<div class="card">
|
|
1342
1366
|
<div
|
|
@@ -1350,13 +1374,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
1350
1374
|
{{ 'localization.language.subtitle' | translate }}
|
|
1351
1375
|
</p>
|
|
1352
1376
|
</div>
|
|
1353
|
-
<
|
|
1377
|
+
<button
|
|
1378
|
+
pButton
|
|
1354
1379
|
*hasPermission="LANGUAGE_PERMISSIONS.CREATE"
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1380
|
+
(click)="onCreate()"
|
|
1381
|
+
class="w-full sm:w-auto"
|
|
1382
|
+
>
|
|
1383
|
+
<span pButtonIcon class="pi pi-plus"></span>
|
|
1384
|
+
<span pButtonLabel>{{ 'localization.language.new' | translate }}</span>
|
|
1385
|
+
</button>
|
|
1360
1386
|
</div>
|
|
1361
1387
|
|
|
1362
1388
|
<div class="overflow-x-auto -mx-4 sm:mx-0">
|
|
@@ -1415,36 +1441,42 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
1415
1441
|
<td>
|
|
1416
1442
|
<div class="flex gap-1">
|
|
1417
1443
|
@if (!lang.isDefault) {
|
|
1418
|
-
<
|
|
1444
|
+
<button
|
|
1445
|
+
pButton
|
|
1419
1446
|
*hasPermission="LANGUAGE_PERMISSIONS.UPDATE"
|
|
1420
|
-
icon="pi pi-star"
|
|
1421
1447
|
[text]="true"
|
|
1422
1448
|
size="small"
|
|
1423
1449
|
[pTooltip]="
|
|
1424
1450
|
'localization.language.set.default' | translate
|
|
1425
1451
|
"
|
|
1426
|
-
(
|
|
1427
|
-
|
|
1452
|
+
(click)="onSetDefault(lang)"
|
|
1453
|
+
>
|
|
1454
|
+
<span pButtonIcon class="pi pi-star"></span>
|
|
1455
|
+
</button>
|
|
1428
1456
|
}
|
|
1429
|
-
<
|
|
1457
|
+
<button
|
|
1458
|
+
pButton
|
|
1430
1459
|
*hasPermission="LANGUAGE_PERMISSIONS.UPDATE"
|
|
1431
|
-
icon="pi pi-pencil"
|
|
1432
1460
|
[text]="true"
|
|
1433
1461
|
severity="secondary"
|
|
1434
1462
|
size="small"
|
|
1435
1463
|
[pTooltip]="'shared.edit' | translate"
|
|
1436
|
-
(
|
|
1437
|
-
|
|
1438
|
-
|
|
1464
|
+
(click)="onEdit(lang.id)"
|
|
1465
|
+
>
|
|
1466
|
+
<span pButtonIcon class="pi pi-pencil"></span>
|
|
1467
|
+
</button>
|
|
1468
|
+
<button
|
|
1469
|
+
pButton
|
|
1439
1470
|
*hasPermission="LANGUAGE_PERMISSIONS.DELETE"
|
|
1440
|
-
icon="pi pi-trash"
|
|
1441
1471
|
[text]="true"
|
|
1442
1472
|
severity="danger"
|
|
1443
1473
|
size="small"
|
|
1444
1474
|
[pTooltip]="'shared.delete' | translate"
|
|
1445
1475
|
[disabled]="lang.isDefault"
|
|
1446
|
-
(
|
|
1447
|
-
|
|
1476
|
+
(click)="onDelete(lang)"
|
|
1477
|
+
>
|
|
1478
|
+
<span pButtonIcon class="pi pi-trash"></span>
|
|
1479
|
+
</button>
|
|
1448
1480
|
</div>
|
|
1449
1481
|
</td>
|
|
1450
1482
|
</tr>
|
|
@@ -1460,9 +1492,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
1460
1492
|
</p-table>
|
|
1461
1493
|
</div>
|
|
1462
1494
|
</div>
|
|
1463
|
-
|
|
1464
|
-
<p-confirmDialog />
|
|
1465
|
-
<p-toast />
|
|
1466
1495
|
`,
|
|
1467
1496
|
}]
|
|
1468
1497
|
}] });
|
|
@@ -1496,9 +1525,10 @@ class LocalizationContainerPage {
|
|
|
1496
1525
|
if (!permissions.length)
|
|
1497
1526
|
return [];
|
|
1498
1527
|
return this.allTabs.filter((tab) => this.permissionValidator.hasPermission(tab.permission));
|
|
1499
|
-
},
|
|
1500
|
-
|
|
1501
|
-
static
|
|
1528
|
+
}, /* @ts-ignore */
|
|
1529
|
+
...(ngDevMode ? [{ debugName: "visibleTabs" }] : /* istanbul ignore next */ []));
|
|
1530
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: LocalizationContainerPage, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1531
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: LocalizationContainerPage, isStandalone: true, selector: "lib-localization-container", ngImport: i0, template: `
|
|
1502
1532
|
<div class="p-2 sm:p-4">
|
|
1503
1533
|
<div class="mb-4">
|
|
1504
1534
|
<h1 class="text-xl sm:text-2xl font-bold m-0">{{ 'localization.title' | translate }}</h1>
|
|
@@ -1520,9 +1550,9 @@ class LocalizationContainerPage {
|
|
|
1520
1550
|
|
|
1521
1551
|
<router-outlet />
|
|
1522
1552
|
</div>
|
|
1523
|
-
`, 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" }] });
|
|
1553
|
+
`, 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", "browserUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
1524
1554
|
}
|
|
1525
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1555
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: LocalizationContainerPage, decorators: [{
|
|
1526
1556
|
type: Component,
|
|
1527
1557
|
args: [{ selector: 'lib-localization-container', imports: [RouterOutlet, RouterLink, RouterLinkActive, TranslatePipe], template: `
|
|
1528
1558
|
<div class="p-2 sm:p-4">
|
|
@@ -1606,24 +1636,33 @@ class TranslationKeyFormPage {
|
|
|
1606
1636
|
destroyRef = inject(DestroyRef);
|
|
1607
1637
|
routeParams = toSignal(this.route.paramMap);
|
|
1608
1638
|
loadTriggered = false;
|
|
1609
|
-
isSaving = signal(false,
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1639
|
+
isSaving = signal(false, /* @ts-ignore */
|
|
1640
|
+
...(ngDevMode ? [{ debugName: "isSaving" }] : /* istanbul ignore next */ []));
|
|
1641
|
+
isLoadingLanguages = signal(false, /* @ts-ignore */
|
|
1642
|
+
...(ngDevMode ? [{ debugName: "isLoadingLanguages" }] : /* istanbul ignore next */ []));
|
|
1643
|
+
existingKey = signal(null, /* @ts-ignore */
|
|
1644
|
+
...(ngDevMode ? [{ debugName: "existingKey" }] : /* istanbul ignore next */ []));
|
|
1645
|
+
isEditMode = computed(() => !!this.existingKey(), /* @ts-ignore */
|
|
1646
|
+
...(ngDevMode ? [{ debugName: "isEditMode" }] : /* istanbul ignore next */ []));
|
|
1647
|
+
languages = signal([], /* @ts-ignore */
|
|
1648
|
+
...(ngDevMode ? [{ debugName: "languages" }] : /* istanbul ignore next */ []));
|
|
1649
|
+
modules = signal([], /* @ts-ignore */
|
|
1650
|
+
...(ngDevMode ? [{ debugName: "modules" }] : /* istanbul ignore next */ []));
|
|
1651
|
+
translations = signal([], /* @ts-ignore */
|
|
1652
|
+
...(ngDevMode ? [{ debugName: "translations" }] : /* istanbul ignore next */ []));
|
|
1616
1653
|
translate(key, vars) {
|
|
1617
1654
|
return this.translateAdapter?.translate(key, vars) ?? key;
|
|
1618
1655
|
}
|
|
1619
|
-
moduleOptions = computed(() => this.modules().map((m) => ({ label: m, value: m })),
|
|
1656
|
+
moduleOptions = computed(() => this.modules().map((m) => ({ label: m, value: m })), /* @ts-ignore */
|
|
1657
|
+
...(ngDevMode ? [{ debugName: "moduleOptions" }] : /* istanbul ignore next */ []));
|
|
1620
1658
|
formModel = signal({
|
|
1621
1659
|
key: '',
|
|
1622
1660
|
module: '',
|
|
1623
1661
|
defaultMessage: '',
|
|
1624
1662
|
description: '',
|
|
1625
1663
|
variables: '',
|
|
1626
|
-
},
|
|
1664
|
+
}, /* @ts-ignore */
|
|
1665
|
+
...(ngDevMode ? [{ debugName: "formModel" }] : /* istanbul ignore next */ []));
|
|
1627
1666
|
formTree = form(this.formModel, (f) => {
|
|
1628
1667
|
required(f.key, {
|
|
1629
1668
|
message: this.translate('localization.validation.key.required'),
|
|
@@ -1637,7 +1676,8 @@ class TranslationKeyFormPage {
|
|
|
1637
1676
|
return (model.key.trim().length > 0 &&
|
|
1638
1677
|
model.module.trim().length > 0 &&
|
|
1639
1678
|
model.defaultMessage.trim().length > 0);
|
|
1640
|
-
},
|
|
1679
|
+
}, /* @ts-ignore */
|
|
1680
|
+
...(ngDevMode ? [{ debugName: "isFormValid" }] : /* istanbul ignore next */ []));
|
|
1641
1681
|
constructor() {
|
|
1642
1682
|
effect(() => {
|
|
1643
1683
|
const params = this.routeParams();
|
|
@@ -1846,8 +1886,8 @@ class TranslationKeyFormPage {
|
|
|
1846
1886
|
onCancel() {
|
|
1847
1887
|
this.router.navigate(['/localization/keys']);
|
|
1848
1888
|
}
|
|
1849
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1850
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1889
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TranslationKeyFormPage, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1890
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: TranslationKeyFormPage, isStandalone: true, selector: "lib-translation-key-form-page", ngImport: i0, template: `
|
|
1851
1891
|
<p-card>
|
|
1852
1892
|
<ng-template #header>
|
|
1853
1893
|
<div class="flex justify-between items-center p-4">
|
|
@@ -1958,7 +1998,7 @@ class TranslationKeyFormPage {
|
|
|
1958
1998
|
</h4>
|
|
1959
1999
|
@if (isLoadingLanguages()) {
|
|
1960
2000
|
<div class="flex justify-center py-4">
|
|
1961
|
-
<p-
|
|
2001
|
+
<p-progressspinner strokeWidth="4" />
|
|
1962
2002
|
</div>
|
|
1963
2003
|
} @else if (languages().length === 0) {
|
|
1964
2004
|
<p class="text-muted-color text-center py-4">
|
|
@@ -2002,35 +2042,38 @@ class TranslationKeyFormPage {
|
|
|
2002
2042
|
|
|
2003
2043
|
<!-- Actions -->
|
|
2004
2044
|
<div class="flex justify-end gap-4 pt-4">
|
|
2005
|
-
<
|
|
2006
|
-
|
|
2045
|
+
<button
|
|
2046
|
+
pButton
|
|
2007
2047
|
severity="secondary"
|
|
2008
2048
|
[outlined]="true"
|
|
2009
|
-
(
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2049
|
+
(click)="onCancel()"
|
|
2050
|
+
>
|
|
2051
|
+
<span pButtonLabel>{{ 'shared.cancel' | translate }}</span>
|
|
2052
|
+
</button>
|
|
2053
|
+
<button
|
|
2054
|
+
pButton
|
|
2055
|
+
type="submit"
|
|
2056
|
+
[disabled]="!isFormValid() || isSaving()"
|
|
2057
|
+
>
|
|
2058
|
+
@if (isSaving()) {
|
|
2059
|
+
<span pButtonIcon class="pi pi-spinner pi-spin"></span>
|
|
2060
|
+
}
|
|
2061
|
+
<span pButtonLabel>{{
|
|
2013
2062
|
isEditMode()
|
|
2014
2063
|
? ('shared.update' | translate)
|
|
2015
2064
|
: ('shared.create' | translate)
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
[loading]="isSaving()"
|
|
2019
|
-
[disabled]="!isFormValid() || isSaving()"
|
|
2020
|
-
/>
|
|
2065
|
+
}}</span>
|
|
2066
|
+
</button>
|
|
2021
2067
|
</div>
|
|
2022
2068
|
</form>
|
|
2023
2069
|
</p-card>
|
|
2024
|
-
|
|
2025
|
-
<p-toast />
|
|
2026
|
-
`, 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.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$1.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: i6.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" }] });
|
|
2070
|
+
`, 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]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[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: "directive", type: i2.ButtonDirective, selector: "[pButton]", inputs: ["pButton", "pButtonPT", "pButtonUnstyled", "hostName", "text", "plain", "raised", "size", "outlined", "link", "rounded", "fluid", "variant", "iconOnly", "loading", "severity"] }, { kind: "directive", type: i2.ButtonLabel, selector: "[pButtonLabel]", inputs: ["pButtonLabelPT", "pButtonLabelUnstyled"] }, { kind: "directive", type: i2.ButtonIcon, selector: "[pButtonIcon]", inputs: ["pButtonIconPT", "pButtonUnstyled"] }, { kind: "component", type: i3.Card, selector: "p-card", inputs: ["header", "subheader"] }, { kind: "directive", type: i4.InputText, selector: "[pInputText]", inputs: ["hostName", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "component", type: i5.Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "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", "multiple", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo", "motionOptions"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "component", type: i3$1.Tag, selector: "p-tag", inputs: ["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: i8.ProgressSpinner, selector: "p-progress-spinner, p-progressspinner", inputs: ["value", "strokeWidth", "animationDuration", "min", "max", "ariaLabel", "fill"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: FormField, selector: "[formField]", inputs: ["formField"], exportAs: ["formField"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
2027
2071
|
}
|
|
2028
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2072
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TranslationKeyFormPage, decorators: [{
|
|
2029
2073
|
type: Component,
|
|
2030
2074
|
args: [{
|
|
2031
2075
|
selector: 'lib-translation-key-form-page',
|
|
2032
2076
|
imports: [AngularModule, PrimeModule, FormsModule, FormField, TranslatePipe],
|
|
2033
|
-
providers: [MessageService],
|
|
2034
2077
|
template: `
|
|
2035
2078
|
<p-card>
|
|
2036
2079
|
<ng-template #header>
|
|
@@ -2142,7 +2185,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
2142
2185
|
</h4>
|
|
2143
2186
|
@if (isLoadingLanguages()) {
|
|
2144
2187
|
<div class="flex justify-center py-4">
|
|
2145
|
-
<p-
|
|
2188
|
+
<p-progressspinner strokeWidth="4" />
|
|
2146
2189
|
</div>
|
|
2147
2190
|
} @else if (languages().length === 0) {
|
|
2148
2191
|
<p class="text-muted-color text-center py-4">
|
|
@@ -2186,27 +2229,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
2186
2229
|
|
|
2187
2230
|
<!-- Actions -->
|
|
2188
2231
|
<div class="flex justify-end gap-4 pt-4">
|
|
2189
|
-
<
|
|
2190
|
-
|
|
2232
|
+
<button
|
|
2233
|
+
pButton
|
|
2191
2234
|
severity="secondary"
|
|
2192
2235
|
[outlined]="true"
|
|
2193
|
-
(
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2236
|
+
(click)="onCancel()"
|
|
2237
|
+
>
|
|
2238
|
+
<span pButtonLabel>{{ 'shared.cancel' | translate }}</span>
|
|
2239
|
+
</button>
|
|
2240
|
+
<button
|
|
2241
|
+
pButton
|
|
2242
|
+
type="submit"
|
|
2243
|
+
[disabled]="!isFormValid() || isSaving()"
|
|
2244
|
+
>
|
|
2245
|
+
@if (isSaving()) {
|
|
2246
|
+
<span pButtonIcon class="pi pi-spinner pi-spin"></span>
|
|
2247
|
+
}
|
|
2248
|
+
<span pButtonLabel>{{
|
|
2197
2249
|
isEditMode()
|
|
2198
2250
|
? ('shared.update' | translate)
|
|
2199
2251
|
: ('shared.create' | translate)
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
[loading]="isSaving()"
|
|
2203
|
-
[disabled]="!isFormValid() || isSaving()"
|
|
2204
|
-
/>
|
|
2252
|
+
}}</span>
|
|
2253
|
+
</button>
|
|
2205
2254
|
</div>
|
|
2206
2255
|
</form>
|
|
2207
2256
|
</p-card>
|
|
2208
|
-
|
|
2209
|
-
<p-toast />
|
|
2210
2257
|
`,
|
|
2211
2258
|
}]
|
|
2212
2259
|
}], ctorParameters: () => [] });
|
|
@@ -2226,17 +2273,25 @@ class TranslationKeyListPage {
|
|
|
2226
2273
|
messageService = inject(MessageService);
|
|
2227
2274
|
translateService = inject(TranslateService);
|
|
2228
2275
|
destroyRef = inject(DestroyRef);
|
|
2229
|
-
isLoading = signal(false,
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2276
|
+
isLoading = signal(false, /* @ts-ignore */
|
|
2277
|
+
...(ngDevMode ? [{ debugName: "isLoading" }] : /* istanbul ignore next */ []));
|
|
2278
|
+
languages = signal([], /* @ts-ignore */
|
|
2279
|
+
...(ngDevMode ? [{ debugName: "languages" }] : /* istanbul ignore next */ []));
|
|
2280
|
+
modules = signal([], /* @ts-ignore */
|
|
2281
|
+
...(ngDevMode ? [{ debugName: "modules" }] : /* istanbul ignore next */ []));
|
|
2282
|
+
translationKeys = signal([], /* @ts-ignore */
|
|
2283
|
+
...(ngDevMode ? [{ debugName: "translationKeys" }] : /* istanbul ignore next */ []));
|
|
2284
|
+
translationCounts = signal(new Map(), /* @ts-ignore */
|
|
2285
|
+
...(ngDevMode ? [{ debugName: "translationCounts" }] : /* istanbul ignore next */ []));
|
|
2286
|
+
selectedModule = signal(null, /* @ts-ignore */
|
|
2287
|
+
...(ngDevMode ? [{ debugName: "selectedModule" }] : /* istanbul ignore next */ []));
|
|
2288
|
+
searchTerm = signal('', /* @ts-ignore */
|
|
2289
|
+
...(ngDevMode ? [{ debugName: "searchTerm" }] : /* istanbul ignore next */ []));
|
|
2236
2290
|
moduleOptions = computed(() => [
|
|
2237
2291
|
{ label: this.translateService.translate('shared.all'), value: null },
|
|
2238
2292
|
...this.modules().map((m) => ({ label: m, value: m })),
|
|
2239
|
-
],
|
|
2293
|
+
], /* @ts-ignore */
|
|
2294
|
+
...(ngDevMode ? [{ debugName: "moduleOptions" }] : /* istanbul ignore next */ []));
|
|
2240
2295
|
filteredKeys = computed(() => {
|
|
2241
2296
|
let keys = this.translationKeys();
|
|
2242
2297
|
const module = this.selectedModule();
|
|
@@ -2250,7 +2305,8 @@ class TranslationKeyListPage {
|
|
|
2250
2305
|
k.module.toLowerCase().includes(search));
|
|
2251
2306
|
}
|
|
2252
2307
|
return keys;
|
|
2253
|
-
},
|
|
2308
|
+
}, /* @ts-ignore */
|
|
2309
|
+
...(ngDevMode ? [{ debugName: "filteredKeys" }] : /* istanbul ignore next */ []));
|
|
2254
2310
|
ngOnInit() {
|
|
2255
2311
|
this.loadData();
|
|
2256
2312
|
}
|
|
@@ -2339,8 +2395,8 @@ class TranslationKeyListPage {
|
|
|
2339
2395
|
},
|
|
2340
2396
|
});
|
|
2341
2397
|
}
|
|
2342
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2343
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
2398
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TranslationKeyListPage, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2399
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: TranslationKeyListPage, isStandalone: true, selector: "lib-translation-key-list-page", ngImport: i0, template: `
|
|
2344
2400
|
<div class="card">
|
|
2345
2401
|
<div
|
|
2346
2402
|
class="flex flex-col sm:flex-row justify-between items-start sm:items-center gap-3 mb-4"
|
|
@@ -2354,12 +2410,14 @@ class TranslationKeyListPage {
|
|
|
2354
2410
|
</p>
|
|
2355
2411
|
</div>
|
|
2356
2412
|
<div class="flex gap-2">
|
|
2357
|
-
<
|
|
2413
|
+
<button
|
|
2414
|
+
pButton
|
|
2358
2415
|
*hasPermission="TRANSLATION_KEY_PERMISSIONS.CREATE"
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2416
|
+
(click)="onCreate()"
|
|
2417
|
+
>
|
|
2418
|
+
<span pButtonIcon class="pi pi-plus"></span>
|
|
2419
|
+
<span pButtonLabel>{{ 'localization.key.new' | translate }}</span>
|
|
2420
|
+
</button>
|
|
2363
2421
|
</div>
|
|
2364
2422
|
</div>
|
|
2365
2423
|
|
|
@@ -2446,24 +2504,28 @@ class TranslationKeyListPage {
|
|
|
2446
2504
|
</td>
|
|
2447
2505
|
<td>
|
|
2448
2506
|
<div class="flex gap-1">
|
|
2449
|
-
<
|
|
2507
|
+
<button
|
|
2508
|
+
pButton
|
|
2450
2509
|
*hasPermission="TRANSLATION_KEY_PERMISSIONS.UPDATE"
|
|
2451
|
-
icon="pi pi-pencil"
|
|
2452
2510
|
[text]="true"
|
|
2453
2511
|
severity="secondary"
|
|
2454
2512
|
size="small"
|
|
2455
2513
|
[pTooltip]="'shared.edit' | translate"
|
|
2456
|
-
(
|
|
2457
|
-
|
|
2458
|
-
|
|
2514
|
+
(click)="onEdit(key)"
|
|
2515
|
+
>
|
|
2516
|
+
<span pButtonIcon class="pi pi-pencil"></span>
|
|
2517
|
+
</button>
|
|
2518
|
+
<button
|
|
2519
|
+
pButton
|
|
2459
2520
|
*hasPermission="TRANSLATION_KEY_PERMISSIONS.DELETE"
|
|
2460
|
-
icon="pi pi-trash"
|
|
2461
2521
|
[text]="true"
|
|
2462
2522
|
severity="danger"
|
|
2463
2523
|
size="small"
|
|
2464
2524
|
[pTooltip]="'shared.delete' | translate"
|
|
2465
|
-
(
|
|
2466
|
-
|
|
2525
|
+
(click)="onDelete(key)"
|
|
2526
|
+
>
|
|
2527
|
+
<span pButtonIcon class="pi pi-trash"></span>
|
|
2528
|
+
</button>
|
|
2467
2529
|
</div>
|
|
2468
2530
|
</td>
|
|
2469
2531
|
</tr>
|
|
@@ -2477,12 +2539,9 @@ class TranslationKeyListPage {
|
|
|
2477
2539
|
</ng-template>
|
|
2478
2540
|
</p-table>
|
|
2479
2541
|
</div>
|
|
2480
|
-
|
|
2481
|
-
<p-confirmDialog />
|
|
2482
|
-
<p-toast />
|
|
2483
|
-
`, 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.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: i3$1.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$1.Tag, selector: "p-tag", inputs: ["styleClass", "severity", "value", "icon", "rounded"] }, { kind: "component", type: i6.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$1.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" }] });
|
|
2542
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: AngularModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[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: "directive", type: i2.ButtonDirective, selector: "[pButton]", inputs: ["pButton", "pButtonPT", "pButtonUnstyled", "hostName", "text", "plain", "raised", "size", "outlined", "link", "rounded", "fluid", "variant", "iconOnly", "loading", "severity"] }, { kind: "directive", type: i2.ButtonLabel, selector: "[pButtonLabel]", inputs: ["pButtonLabelPT", "pButtonLabelUnstyled"] }, { kind: "directive", type: i2.ButtonIcon, selector: "[pButtonIcon]", inputs: ["pButtonIconPT", "pButtonUnstyled"] }, { kind: "component", type: i3$2.IconField, selector: "p-iconfield, p-icon-field", inputs: ["hostName", "iconPosition"] }, { kind: "component", type: i4$2.InputIcon, selector: "p-inputicon", inputs: ["hostName"] }, { kind: "directive", type: i4.InputText, selector: "[pInputText]", inputs: ["hostName", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "component", type: i5.Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "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", "multiple", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo", "motionOptions"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "component", type: i2$1.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "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", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll"], outputs: ["contextMenuSelectionChange", "firstChange", "rowsChange", "totalRecordsChange", "selectionChange", "selectAllChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "onStateSave", "onStateRestore"] }, { kind: "component", type: i3$1.Tag, selector: "p-tag", inputs: ["severity", "value", "icon", "rounded"] }, { kind: "directive", type: i4$1.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "showOnEllipsis", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "pTooltipPT", "pTooltipUnstyled"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: HasPermissionDirective, selector: "[hasPermission]", inputs: ["hasPermission"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
2484
2543
|
}
|
|
2485
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2544
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TranslationKeyListPage, decorators: [{
|
|
2486
2545
|
type: Component,
|
|
2487
2546
|
args: [{
|
|
2488
2547
|
selector: 'lib-translation-key-list-page',
|
|
@@ -2493,7 +2552,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
2493
2552
|
HasPermissionDirective,
|
|
2494
2553
|
TranslatePipe,
|
|
2495
2554
|
],
|
|
2496
|
-
providers: [ConfirmationService, MessageService],
|
|
2497
2555
|
template: `
|
|
2498
2556
|
<div class="card">
|
|
2499
2557
|
<div
|
|
@@ -2508,12 +2566,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
2508
2566
|
</p>
|
|
2509
2567
|
</div>
|
|
2510
2568
|
<div class="flex gap-2">
|
|
2511
|
-
<
|
|
2569
|
+
<button
|
|
2570
|
+
pButton
|
|
2512
2571
|
*hasPermission="TRANSLATION_KEY_PERMISSIONS.CREATE"
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2572
|
+
(click)="onCreate()"
|
|
2573
|
+
>
|
|
2574
|
+
<span pButtonIcon class="pi pi-plus"></span>
|
|
2575
|
+
<span pButtonLabel>{{ 'localization.key.new' | translate }}</span>
|
|
2576
|
+
</button>
|
|
2517
2577
|
</div>
|
|
2518
2578
|
</div>
|
|
2519
2579
|
|
|
@@ -2600,24 +2660,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
2600
2660
|
</td>
|
|
2601
2661
|
<td>
|
|
2602
2662
|
<div class="flex gap-1">
|
|
2603
|
-
<
|
|
2663
|
+
<button
|
|
2664
|
+
pButton
|
|
2604
2665
|
*hasPermission="TRANSLATION_KEY_PERMISSIONS.UPDATE"
|
|
2605
|
-
icon="pi pi-pencil"
|
|
2606
2666
|
[text]="true"
|
|
2607
2667
|
severity="secondary"
|
|
2608
2668
|
size="small"
|
|
2609
2669
|
[pTooltip]="'shared.edit' | translate"
|
|
2610
|
-
(
|
|
2611
|
-
|
|
2612
|
-
|
|
2670
|
+
(click)="onEdit(key)"
|
|
2671
|
+
>
|
|
2672
|
+
<span pButtonIcon class="pi pi-pencil"></span>
|
|
2673
|
+
</button>
|
|
2674
|
+
<button
|
|
2675
|
+
pButton
|
|
2613
2676
|
*hasPermission="TRANSLATION_KEY_PERMISSIONS.DELETE"
|
|
2614
|
-
icon="pi pi-trash"
|
|
2615
2677
|
[text]="true"
|
|
2616
2678
|
severity="danger"
|
|
2617
2679
|
size="small"
|
|
2618
2680
|
[pTooltip]="'shared.delete' | translate"
|
|
2619
|
-
(
|
|
2620
|
-
|
|
2681
|
+
(click)="onDelete(key)"
|
|
2682
|
+
>
|
|
2683
|
+
<span pButtonIcon class="pi pi-trash"></span>
|
|
2684
|
+
</button>
|
|
2621
2685
|
</div>
|
|
2622
2686
|
</td>
|
|
2623
2687
|
</tr>
|
|
@@ -2631,9 +2695,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
2631
2695
|
</ng-template>
|
|
2632
2696
|
</p-table>
|
|
2633
2697
|
</div>
|
|
2634
|
-
|
|
2635
|
-
<p-confirmDialog />
|
|
2636
|
-
<p-toast />
|
|
2637
2698
|
`,
|
|
2638
2699
|
}]
|
|
2639
2700
|
}] });
|