@onecx/angular-accelerator 6.0.0-rc.15 → 6.0.0-rc.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/onecx-angular-accelerator-testing.mjs +2 -36
- package/fesm2022/onecx-angular-accelerator-testing.mjs.map +1 -1
- package/fesm2022/onecx-angular-accelerator.mjs +8 -452
- package/fesm2022/onecx-angular-accelerator.mjs.map +1 -1
- package/index.d.ts +1 -11
- package/lib/angular-accelerator.module.d.ts +27 -29
- package/lib/utils/dateutils.d.ts +0 -4
- package/package.json +8 -8
- package/testing/index.d.ts +0 -1
- package/lib/components/button-dialog/button-dialog.component.d.ts +0 -47
- package/lib/components/data-loading-error/data-loading-error.component.d.ts +0 -8
- package/lib/injection-tokens/has-permission-checker.d.ts +0 -13
- package/lib/services/translation-cache.service.d.ts +0 -19
- package/lib/utils/async-translate-loader.utils.d.ts +0 -12
- package/lib/utils/caching-translate-loader.utils.d.ts +0 -16
- package/lib/utils/create-remote-component-and-mfe-translate-loader.utils.d.ts +0 -6
- package/lib/utils/create-remote-component-translate-loader.utils.d.ts +0 -5
- package/lib/utils/create-translate-loader.utils.d.ts +0 -8
- package/lib/utils/translate.combined.loader.d.ts +0 -12
- package/testing/button-dialog.harness.d.ts +0 -17
- /package/lib/components/{button-dialog → dialog}/dialog-message-content/dialog-message-content.component.d.ts +0 -0
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { HAS_PERMISSION_CHECKER, SKIP_STYLE_SCOPING, getScopeIdentifier, dataStyleIdKey, dataNoPortalLayoutStylesKey, providePermissionChecker, TRANSLATION_PATH, provideTranslationConnectionService } from '@onecx/angular-utils';
|
|
2
|
-
export { AlwaysGrantPermissionChecker, HAS_PERMISSION_CHECKER } from '@onecx/angular-utils';
|
|
3
1
|
import * as i0 from '@angular/core';
|
|
4
2
|
import { inject, ElementRef, Input, Directive, Renderer2, ViewContainerRef, TemplateRef, HostListener, EventEmitter, Output, Injectable, Injector, LOCALE_ID, Pipe, ContentChild, ViewEncapsulation, Component, ViewChild, ContentChildren, NgZone, ChangeDetectorRef, ViewChildren, QueryList, isDevMode, Type, NgModule, APP_INITIALIZER } from '@angular/core';
|
|
5
3
|
import { UserService, AppStateService, ConfigurationService, CONFIG_KEY, ShellCapabilityService, Capability, AppConfigService } from '@onecx/angular-integration-interface';
|
|
4
|
+
import { HAS_PERMISSION_CHECKER, SKIP_STYLE_SCOPING, getScopeIdentifier, dataStyleIdKey, dataNoPortalLayoutStylesKey, providePermissionChecker, TRANSLATION_PATH, provideTranslationConnectionService } from '@onecx/angular-utils';
|
|
6
5
|
import { HttpClient } from '@angular/common/http';
|
|
7
6
|
import * as i3 from '@angular/forms';
|
|
8
7
|
import { FormGroupDirective, FormControlName, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
9
|
-
import { BehaviorSubject, map, filter, concat, of, from, combineLatest, startWith, debounceTime, mergeMap, first, forkJoin, shareReplay, switchMap, toArray, withLatestFrom, ReplaySubject, timestamp, distinctUntilChanged, isObservable,
|
|
10
|
-
import { SyncableTopic, getLocation, isValidDate
|
|
8
|
+
import { BehaviorSubject, map, filter, concat, of, from, combineLatest, startWith, debounceTime, mergeMap, first, forkJoin, shareReplay, switchMap, toArray, withLatestFrom, ReplaySubject, timestamp, distinctUntilChanged, isObservable, firstValueFrom, skip } from 'rxjs';
|
|
9
|
+
import { SyncableTopic, getLocation, isValidDate, getUTCDateWithoutTimezoneIssues } from '@onecx/accelerator';
|
|
11
10
|
import * as i1 from '@angular/common';
|
|
12
|
-
import { DatePipe, DecimalPipe, CurrencyPipe, formatDate, CommonModule
|
|
11
|
+
import { DatePipe, DecimalPipe, CurrencyPipe, formatDate, CommonModule } from '@angular/common';
|
|
13
12
|
import * as i2$1 from 'primeng/button';
|
|
14
13
|
import { ButtonModule } from 'primeng/button';
|
|
15
14
|
import * as i5 from 'primeng/skeleton';
|
|
@@ -64,12 +63,6 @@ import { TimelineModule } from 'primeng/timeline';
|
|
|
64
63
|
import { DynamicDialogConfig, DynamicDialogRef, DialogService } from 'primeng/dynamicdialog';
|
|
65
64
|
import { EventsTopic } from '@onecx/integration-interface';
|
|
66
65
|
import { providePrimeNG } from 'primeng/config';
|
|
67
|
-
import { TranslateHttpLoader } from '@ngx-translate/http-loader';
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* This checker always returns true, basically disabling the permission system on the UI side
|
|
71
|
-
* @deprecated Please import from `@onecx/angular-utils` instead.
|
|
72
|
-
*/
|
|
73
66
|
|
|
74
67
|
class OcxContentContainerDirective {
|
|
75
68
|
constructor() {
|
|
@@ -3152,7 +3145,7 @@ class DataTableComponent extends DataSortBase {
|
|
|
3152
3145
|
return true;
|
|
3153
3146
|
}
|
|
3154
3147
|
const d = new Date(value);
|
|
3155
|
-
return isValidDate
|
|
3148
|
+
return isValidDate(d);
|
|
3156
3149
|
}
|
|
3157
3150
|
getColumnTypeTemplate(templates, columnType, templateType) {
|
|
3158
3151
|
let template;
|
|
@@ -5368,32 +5361,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImpo
|
|
|
5368
5361
|
type: Input
|
|
5369
5362
|
}] } });
|
|
5370
5363
|
|
|
5371
|
-
/**
|
|
5372
|
-
* Show this data not found page component if the main entity of a page could not be loaded.
|
|
5373
|
-
*/
|
|
5374
|
-
class DataLoadingErrorComponent {
|
|
5375
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DataLoadingErrorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5376
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", type: DataLoadingErrorComponent, isStandalone: false, selector: "ocx-data-loading-error", ngImport: i0, template: `<div class="p-4">
|
|
5377
|
-
<h1>{{ 'OCX_DATA_LOADING_ERROR.TITLE' | translate }}</h1>
|
|
5378
|
-
<div style="white-space: pre-line">
|
|
5379
|
-
{{ 'OCX_DATA_LOADING_ERROR.MESSAGE' | translate }}
|
|
5380
|
-
</div>
|
|
5381
|
-
</div> `, isInline: true, dependencies: [{ kind: "pipe", type: i8.TranslatePipe, name: "translate" }] }); }
|
|
5382
|
-
}
|
|
5383
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: DataLoadingErrorComponent, decorators: [{
|
|
5384
|
-
type: Component,
|
|
5385
|
-
args: [{
|
|
5386
|
-
standalone: false,
|
|
5387
|
-
selector: 'ocx-data-loading-error',
|
|
5388
|
-
template: `<div class="p-4">
|
|
5389
|
-
<h1>{{ 'OCX_DATA_LOADING_ERROR.TITLE' | translate }}</h1>
|
|
5390
|
-
<div style="white-space: pre-line">
|
|
5391
|
-
{{ 'OCX_DATA_LOADING_ERROR.MESSAGE' | translate }}
|
|
5392
|
-
</div>
|
|
5393
|
-
</div> `,
|
|
5394
|
-
}]
|
|
5395
|
-
}] });
|
|
5396
|
-
|
|
5397
5364
|
class DialogMessageContentComponent {
|
|
5398
5365
|
constructor() {
|
|
5399
5366
|
this.message = 'message';
|
|
@@ -5414,245 +5381,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImpo
|
|
|
5414
5381
|
type: Input
|
|
5415
5382
|
}] } });
|
|
5416
5383
|
|
|
5417
|
-
class ButtonDialogComponent {
|
|
5418
|
-
constructor() {
|
|
5419
|
-
this.dynamicDialogConfig = inject(DynamicDialogConfig);
|
|
5420
|
-
this.dynamicDialogRef = inject(DynamicDialogRef);
|
|
5421
|
-
this.defaultPrimaryButtonDetails = {
|
|
5422
|
-
key: 'OCX_BUTTON_DIALOG.CONFIRM',
|
|
5423
|
-
};
|
|
5424
|
-
this.defaultSecondaryButtonDetails = {
|
|
5425
|
-
key: 'OCX_BUTTON_DIALOG.CANCEL',
|
|
5426
|
-
};
|
|
5427
|
-
this.defaultDialogData = {
|
|
5428
|
-
component: DialogMessageContentComponent,
|
|
5429
|
-
config: {
|
|
5430
|
-
primaryButtonDetails: this.defaultPrimaryButtonDetails,
|
|
5431
|
-
secondaryButtonIncluded: true,
|
|
5432
|
-
secondaryButtonDetails: this.defaultSecondaryButtonDetails,
|
|
5433
|
-
},
|
|
5434
|
-
componentData: {},
|
|
5435
|
-
};
|
|
5436
|
-
this.config = {};
|
|
5437
|
-
this.resultEmitter = new EventEmitter();
|
|
5438
|
-
this.dialogData = this.defaultDialogData;
|
|
5439
|
-
this.customButtonsDisabled$ = new BehaviorSubject({});
|
|
5440
|
-
this.leftCustomButtons = [];
|
|
5441
|
-
this.rightCustomButtons = [];
|
|
5442
|
-
}
|
|
5443
|
-
set secondaryButton(content) {
|
|
5444
|
-
if (content) {
|
|
5445
|
-
this._secondaryButton = content;
|
|
5446
|
-
}
|
|
5447
|
-
}
|
|
5448
|
-
get secondaryButton() {
|
|
5449
|
-
return this._secondaryButton;
|
|
5450
|
-
}
|
|
5451
|
-
ngAfterViewInit() {
|
|
5452
|
-
if (this.dialogData.config.autoFocusButton === 'primary' || !this.dialogData.config.autoFocusButton) {
|
|
5453
|
-
this.primaryButton.element.nativeElement.focus();
|
|
5454
|
-
}
|
|
5455
|
-
else if (this.dialogData.config.autoFocusButton === 'secondary') {
|
|
5456
|
-
this.secondaryButton.element.nativeElement.focus();
|
|
5457
|
-
}
|
|
5458
|
-
else if (this.dialogData.config.autoFocusButton === 'custom') {
|
|
5459
|
-
const button = this.customButtons.find((customButton) => {
|
|
5460
|
-
return customButton.nativeElement.id === this.dialogData.config.autoFocusButtonCustomId;
|
|
5461
|
-
});
|
|
5462
|
-
setTimeout(() => {
|
|
5463
|
-
button?.nativeElement.focus();
|
|
5464
|
-
});
|
|
5465
|
-
}
|
|
5466
|
-
}
|
|
5467
|
-
ngOnInit() {
|
|
5468
|
-
this.loadComponent();
|
|
5469
|
-
}
|
|
5470
|
-
primaryButtonAction() {
|
|
5471
|
-
return this.buttonAction('primary');
|
|
5472
|
-
}
|
|
5473
|
-
secondaryButtonAction() {
|
|
5474
|
-
return this.buttonAction('secondary');
|
|
5475
|
-
}
|
|
5476
|
-
customButtonAction(button) {
|
|
5477
|
-
return this.buttonAction(`custom`, button.id);
|
|
5478
|
-
}
|
|
5479
|
-
resolveCustomButtonDisabled(customButtonsDisabled, buttonId) {
|
|
5480
|
-
return buttonId in customButtonsDisabled ? customButtonsDisabled[buttonId] : true;
|
|
5481
|
-
}
|
|
5482
|
-
loadComponent() {
|
|
5483
|
-
if (this.dynamicDialogConfig.data) {
|
|
5484
|
-
this.setUpDialogDataForDynamicConfig();
|
|
5485
|
-
}
|
|
5486
|
-
else {
|
|
5487
|
-
this.setUpDialogDataForInput();
|
|
5488
|
-
}
|
|
5489
|
-
}
|
|
5490
|
-
setUpDialogDataForDynamicConfig() {
|
|
5491
|
-
const dynamicConfigData = this.dynamicDialogConfig.data;
|
|
5492
|
-
if (dynamicConfigData.config) {
|
|
5493
|
-
const dialogConfig = dynamicConfigData.config;
|
|
5494
|
-
if (!!dialogConfig.primaryButtonDetails && !!dialogConfig.primaryButtonDetails.key) {
|
|
5495
|
-
this.dialogData.config.primaryButtonDetails = dialogConfig.primaryButtonDetails;
|
|
5496
|
-
}
|
|
5497
|
-
if (dialogConfig.secondaryButtonIncluded !== undefined) {
|
|
5498
|
-
this.dialogData.config.secondaryButtonIncluded = dialogConfig.secondaryButtonIncluded;
|
|
5499
|
-
}
|
|
5500
|
-
if (!!dialogConfig.secondaryButtonDetails && !!dialogConfig.secondaryButtonDetails.key) {
|
|
5501
|
-
this.dialogData.config.secondaryButtonDetails = dialogConfig.secondaryButtonDetails;
|
|
5502
|
-
}
|
|
5503
|
-
this.dialogData.config.autoFocusButton = dialogConfig.autoFocusButton;
|
|
5504
|
-
this.dialogData.config.autoFocusButtonCustomId = dialogConfig.autoFocusButtonCustomId;
|
|
5505
|
-
}
|
|
5506
|
-
if (dynamicConfigData.component) {
|
|
5507
|
-
this.dialogData.component = dynamicConfigData.component;
|
|
5508
|
-
}
|
|
5509
|
-
if (dynamicConfigData.componentData) {
|
|
5510
|
-
this.dialogData.componentData = dynamicConfigData.componentData;
|
|
5511
|
-
}
|
|
5512
|
-
this.setupCustomButtons(dynamicConfigData);
|
|
5513
|
-
const viewContainerRef = this.dialogHost;
|
|
5514
|
-
viewContainerRef.clear();
|
|
5515
|
-
if (this.dialogData.component) {
|
|
5516
|
-
const componentRef = viewContainerRef.createComponent(this.dialogData.component);
|
|
5517
|
-
if (this.isDialogPrimaryButtonDisabledImplemented(componentRef.instance)) {
|
|
5518
|
-
this.primaryButtonDisabled$ = componentRef.instance.primaryButtonEnabled.pipe(startWith(false), map((isEnabled) => !isEnabled));
|
|
5519
|
-
}
|
|
5520
|
-
if (this.isDialogSecondaryButtonDisabledImplemented(componentRef.instance)) {
|
|
5521
|
-
this.secondaryButtonDisabled$ = componentRef.instance.secondaryButtonEnabled.pipe(startWith(false), map((isEnabled) => !isEnabled));
|
|
5522
|
-
}
|
|
5523
|
-
if (this.isDialogCustomButtonDisabledImplemented(componentRef.instance)) {
|
|
5524
|
-
const initCustomButtons = {};
|
|
5525
|
-
this.rightCustomButtons.concat(this.leftCustomButtons).map((button) => {
|
|
5526
|
-
initCustomButtons[button.id] = true;
|
|
5527
|
-
});
|
|
5528
|
-
this.customButtonsDisabled$.next(initCustomButtons);
|
|
5529
|
-
componentRef.instance.customButtonEnabled
|
|
5530
|
-
.pipe(withLatestFrom(this.customButtonsDisabled$), map(([buttonEnabled, customButtonsDisabled]) => {
|
|
5531
|
-
if (customButtonsDisabled[buttonEnabled.id] !== !buttonEnabled.enabled) {
|
|
5532
|
-
customButtonsDisabled[buttonEnabled.id] = !buttonEnabled.enabled;
|
|
5533
|
-
}
|
|
5534
|
-
return customButtonsDisabled;
|
|
5535
|
-
}))
|
|
5536
|
-
.subscribe(this.customButtonsDisabled$);
|
|
5537
|
-
}
|
|
5538
|
-
//populate container
|
|
5539
|
-
Object.keys(this.dialogData.componentData).forEach((k) => {
|
|
5540
|
-
componentRef.setInput(k, this.dialogData.componentData[k]);
|
|
5541
|
-
});
|
|
5542
|
-
this.componentRef = componentRef;
|
|
5543
|
-
}
|
|
5544
|
-
}
|
|
5545
|
-
setUpDialogDataForInput() {
|
|
5546
|
-
this.dialogData.component = undefined;
|
|
5547
|
-
this.dialogData.componentData = undefined;
|
|
5548
|
-
if (this.config) {
|
|
5549
|
-
if (!!this.config.primaryButtonDetails && !!this.config.primaryButtonDetails.key) {
|
|
5550
|
-
this.dialogData.config.primaryButtonDetails = this.config.primaryButtonDetails;
|
|
5551
|
-
}
|
|
5552
|
-
if (this.config.secondaryButtonIncluded) {
|
|
5553
|
-
this.dialogData.config.secondaryButtonIncluded = this.config.secondaryButtonIncluded;
|
|
5554
|
-
}
|
|
5555
|
-
if (!!this.config.secondaryButtonDetails && !!this.config.secondaryButtonDetails.key) {
|
|
5556
|
-
this.dialogData.config.secondaryButtonDetails = this.config.secondaryButtonDetails;
|
|
5557
|
-
}
|
|
5558
|
-
}
|
|
5559
|
-
this.dialogData.config.customButtons = this.config.customButtons;
|
|
5560
|
-
this.setupCustomButtons(this.dialogData);
|
|
5561
|
-
}
|
|
5562
|
-
buttonAction(resultButtonClickedName, buttonId) {
|
|
5563
|
-
if (!this.componentRef) {
|
|
5564
|
-
this.resultEmitter.emit(resultButtonClickedName);
|
|
5565
|
-
return;
|
|
5566
|
-
}
|
|
5567
|
-
const state = {
|
|
5568
|
-
button: resultButtonClickedName,
|
|
5569
|
-
result: undefined,
|
|
5570
|
-
id: buttonId,
|
|
5571
|
-
};
|
|
5572
|
-
this.resolveButtonClick(state);
|
|
5573
|
-
}
|
|
5574
|
-
setupCustomButtons(dialogData) {
|
|
5575
|
-
this.leftCustomButtons = dialogData.config.customButtons?.filter((button) => button.alignment === 'left') ?? [];
|
|
5576
|
-
this.rightCustomButtons = dialogData.config.customButtons?.filter((button) => button.alignment === 'right') ?? [];
|
|
5577
|
-
}
|
|
5578
|
-
resolveButtonClick(state) {
|
|
5579
|
-
const component = this.componentRef.instance;
|
|
5580
|
-
const hasDialogResult = this.isDialogResultImplemented(component);
|
|
5581
|
-
if (hasDialogResult) {
|
|
5582
|
-
state.result = component.dialogResult;
|
|
5583
|
-
}
|
|
5584
|
-
const closeResult = state;
|
|
5585
|
-
// check if component implements DialogButtonClicked
|
|
5586
|
-
if (this.isDialogButtonClickedImplemented(component)) {
|
|
5587
|
-
const buttonResult = component.ocxDialogButtonClicked(state);
|
|
5588
|
-
// If undefined or void is returned, close dialog and return result
|
|
5589
|
-
if (buttonResult === undefined) {
|
|
5590
|
-
if (hasDialogResult) {
|
|
5591
|
-
closeResult.result = component.dialogResult;
|
|
5592
|
-
}
|
|
5593
|
-
return this.dynamicDialogRef.close(closeResult);
|
|
5594
|
-
}
|
|
5595
|
-
this.toObservable(buttonResult).subscribe((result) => {
|
|
5596
|
-
if (result === true) {
|
|
5597
|
-
if (hasDialogResult) {
|
|
5598
|
-
closeResult.result = component.dialogResult;
|
|
5599
|
-
}
|
|
5600
|
-
this.dynamicDialogRef.close(closeResult);
|
|
5601
|
-
}
|
|
5602
|
-
});
|
|
5603
|
-
}
|
|
5604
|
-
else {
|
|
5605
|
-
return this.dynamicDialogRef.close(closeResult);
|
|
5606
|
-
}
|
|
5607
|
-
}
|
|
5608
|
-
toObservable(ocxDialogButtonClickedResult) {
|
|
5609
|
-
if (ocxDialogButtonClickedResult === undefined) {
|
|
5610
|
-
return of(true);
|
|
5611
|
-
}
|
|
5612
|
-
if (isObservable(ocxDialogButtonClickedResult)) {
|
|
5613
|
-
return ocxDialogButtonClickedResult;
|
|
5614
|
-
}
|
|
5615
|
-
return from(Promise.resolve(ocxDialogButtonClickedResult));
|
|
5616
|
-
}
|
|
5617
|
-
isDialogResultImplemented(component) {
|
|
5618
|
-
return 'dialogResult' in component;
|
|
5619
|
-
}
|
|
5620
|
-
isDialogButtonClickedImplemented(component) {
|
|
5621
|
-
return typeof component.ocxDialogButtonClicked === 'function';
|
|
5622
|
-
}
|
|
5623
|
-
isDialogPrimaryButtonDisabledImplemented(component) {
|
|
5624
|
-
return 'primaryButtonEnabled' in component;
|
|
5625
|
-
}
|
|
5626
|
-
isDialogSecondaryButtonDisabledImplemented(component) {
|
|
5627
|
-
return 'secondaryButtonEnabled' in component;
|
|
5628
|
-
}
|
|
5629
|
-
isDialogCustomButtonDisabledImplemented(component) {
|
|
5630
|
-
return 'customButtonEnabled' in component;
|
|
5631
|
-
}
|
|
5632
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: ButtonDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5633
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.11", type: ButtonDialogComponent, isStandalone: false, selector: "ocx-button-dialog", inputs: { config: "config" }, outputs: { resultEmitter: "resultEmitter" }, viewQueries: [{ propertyName: "dialogHost", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "primaryButton", first: true, predicate: ["primaryButton"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "secondaryButton", first: true, predicate: ["secondaryButton"], descendants: true, read: ViewContainerRef }, { propertyName: "customButtons", predicate: ["customButton"], descendants: true }], ngImport: i0, template: "<div>\n <div class=\"buttonDialogScrollableContent\">\n <ng-container #container></ng-container>\n <ng-content></ng-content>\n </div>\n <div class=\"w-full flex-row justify-content-end flex flex-wrap gap-2\">\n @for (button of leftCustomButtons; track button; let i = $index) {\n <div [ngStyle]=\"{'margin-right': (i === leftCustomButtons.length - 1) ? 'auto' : 0}\">\n <ng-container *ngTemplateOutlet=\"customButtonTemplate; context: {button: button}\"> </ng-container>\n </div>\n }\n @for (button of rightCustomButtons; track button) {\n <div>\n <ng-container *ngTemplateOutlet=\"customButtonTemplate; context: {button: button}\"> </ng-container>\n </div>\n }\n <div>\n @if (dialogData.config.secondaryButtonIncluded) {\n <button\n #secondaryButton\n id=\"{{dialogData.config.secondaryButtonDetails?.id ?? 'buttonDialogSecondaryButton'}}\"\n pButton\n [icon]=\"dialogData.config.secondaryButtonDetails!.icon !== undefined ? dialogData.config.secondaryButtonDetails!.icon : ''\"\n (click)=\"secondaryButtonAction()\"\n [label]=\"dialogData.config.secondaryButtonDetails!.key | translate:dialogData.config.secondaryButtonDetails?.parameters\"\n [disabled]=\"secondaryButtonDisabled$ | async\"\n [pTooltip]=\"dialogData.config.secondaryButtonDetails!.tooltipKey ? (dialogData.config.secondaryButtonDetails!.tooltipKey | translate) : null\"\n [tooltipPosition]=\"dialogData.config.secondaryButtonDetails?.tooltipPosition ?? ''\"\n [attr.aria-label]=\"dialogData.config.secondaryButtonDetails!.key | translate:dialogData.config.secondaryButtonDetails?.parameters\"\n ></button>\n }\n </div>\n <div>\n <button\n #primaryButton\n id=\"{{dialogData.config.primaryButtonDetails?.id ?? 'buttonDialogPrimaryButton'}}\"\n pButton\n [icon]=\"dialogData.config.primaryButtonDetails!.icon !== undefined ? dialogData.config.primaryButtonDetails!.icon : ''\"\n (click)=\"primaryButtonAction()\"\n [label]=\"dialogData.config.primaryButtonDetails!.key | translate:dialogData.config.primaryButtonDetails?.parameters\"\n [disabled]=\"primaryButtonDisabled$ | async\"\n [pTooltip]=\"dialogData.config.primaryButtonDetails!.tooltipKey ? (dialogData.config.primaryButtonDetails!.tooltipKey | translate) : null\"\n [tooltipPosition]=\"dialogData.config.primaryButtonDetails?.tooltipPosition ?? ''\"\n [attr.aria-label]=\"dialogData.config.primaryButtonDetails!.key | translate:dialogData.config.primaryButtonDetails?.parameters\"\n ></button>\n </div>\n </div>\n</div>\n\n<ng-template #customButtonTemplate let-button=\"button\">\n <button\n #customButton\n id=\"{{button.id}}\"\n pButton\n [icon]=\"button.icon !== undefined ? button.icon : ''\"\n (click)=\"customButtonAction(button)\"\n [label]=\"button.key | translate:button.parameters\"\n [disabled]=\"resolveCustomButtonDisabled((customButtonsDisabled$ | async) ?? {}, button.id)\"\n [pTooltip]=\"button.tooltipKey ? (button.tooltipKey | translate) : null\"\n [tooltipPosition]=\"button.tooltipPosition ?? ''\"\n [attr.aria-label]=\"button.key | translate:button.parameters\"\n ></button>\n</ng-template>\n", styles: [".buttonDialogScrollableContent{overflow:auto;max-height:500px;margin-bottom:20px}\n"], dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain", "fluid", "label", "icon", "buttonProps"] }, { kind: "directive", type: i4$1.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i8.TranslatePipe, name: "translate" }] }); }
|
|
5634
|
-
}
|
|
5635
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: ButtonDialogComponent, decorators: [{
|
|
5636
|
-
type: Component,
|
|
5637
|
-
args: [{ standalone: false, selector: 'ocx-button-dialog', template: "<div>\n <div class=\"buttonDialogScrollableContent\">\n <ng-container #container></ng-container>\n <ng-content></ng-content>\n </div>\n <div class=\"w-full flex-row justify-content-end flex flex-wrap gap-2\">\n @for (button of leftCustomButtons; track button; let i = $index) {\n <div [ngStyle]=\"{'margin-right': (i === leftCustomButtons.length - 1) ? 'auto' : 0}\">\n <ng-container *ngTemplateOutlet=\"customButtonTemplate; context: {button: button}\"> </ng-container>\n </div>\n }\n @for (button of rightCustomButtons; track button) {\n <div>\n <ng-container *ngTemplateOutlet=\"customButtonTemplate; context: {button: button}\"> </ng-container>\n </div>\n }\n <div>\n @if (dialogData.config.secondaryButtonIncluded) {\n <button\n #secondaryButton\n id=\"{{dialogData.config.secondaryButtonDetails?.id ?? 'buttonDialogSecondaryButton'}}\"\n pButton\n [icon]=\"dialogData.config.secondaryButtonDetails!.icon !== undefined ? dialogData.config.secondaryButtonDetails!.icon : ''\"\n (click)=\"secondaryButtonAction()\"\n [label]=\"dialogData.config.secondaryButtonDetails!.key | translate:dialogData.config.secondaryButtonDetails?.parameters\"\n [disabled]=\"secondaryButtonDisabled$ | async\"\n [pTooltip]=\"dialogData.config.secondaryButtonDetails!.tooltipKey ? (dialogData.config.secondaryButtonDetails!.tooltipKey | translate) : null\"\n [tooltipPosition]=\"dialogData.config.secondaryButtonDetails?.tooltipPosition ?? ''\"\n [attr.aria-label]=\"dialogData.config.secondaryButtonDetails!.key | translate:dialogData.config.secondaryButtonDetails?.parameters\"\n ></button>\n }\n </div>\n <div>\n <button\n #primaryButton\n id=\"{{dialogData.config.primaryButtonDetails?.id ?? 'buttonDialogPrimaryButton'}}\"\n pButton\n [icon]=\"dialogData.config.primaryButtonDetails!.icon !== undefined ? dialogData.config.primaryButtonDetails!.icon : ''\"\n (click)=\"primaryButtonAction()\"\n [label]=\"dialogData.config.primaryButtonDetails!.key | translate:dialogData.config.primaryButtonDetails?.parameters\"\n [disabled]=\"primaryButtonDisabled$ | async\"\n [pTooltip]=\"dialogData.config.primaryButtonDetails!.tooltipKey ? (dialogData.config.primaryButtonDetails!.tooltipKey | translate) : null\"\n [tooltipPosition]=\"dialogData.config.primaryButtonDetails?.tooltipPosition ?? ''\"\n [attr.aria-label]=\"dialogData.config.primaryButtonDetails!.key | translate:dialogData.config.primaryButtonDetails?.parameters\"\n ></button>\n </div>\n </div>\n</div>\n\n<ng-template #customButtonTemplate let-button=\"button\">\n <button\n #customButton\n id=\"{{button.id}}\"\n pButton\n [icon]=\"button.icon !== undefined ? button.icon : ''\"\n (click)=\"customButtonAction(button)\"\n [label]=\"button.key | translate:button.parameters\"\n [disabled]=\"resolveCustomButtonDisabled((customButtonsDisabled$ | async) ?? {}, button.id)\"\n [pTooltip]=\"button.tooltipKey ? (button.tooltipKey | translate) : null\"\n [tooltipPosition]=\"button.tooltipPosition ?? ''\"\n [attr.aria-label]=\"button.key | translate:button.parameters\"\n ></button>\n</ng-template>\n", styles: [".buttonDialogScrollableContent{overflow:auto;max-height:500px;margin-bottom:20px}\n"] }]
|
|
5638
|
-
}], propDecorators: { config: [{
|
|
5639
|
-
type: Input
|
|
5640
|
-
}], resultEmitter: [{
|
|
5641
|
-
type: Output
|
|
5642
|
-
}], dialogHost: [{
|
|
5643
|
-
type: ViewChild,
|
|
5644
|
-
args: ['container', { static: true, read: ViewContainerRef }]
|
|
5645
|
-
}], primaryButton: [{
|
|
5646
|
-
type: ViewChild,
|
|
5647
|
-
args: ['primaryButton', { static: true, read: ViewContainerRef }]
|
|
5648
|
-
}], secondaryButton: [{
|
|
5649
|
-
type: ViewChild,
|
|
5650
|
-
args: ['secondaryButton', { static: false, read: ViewContainerRef }]
|
|
5651
|
-
}], customButtons: [{
|
|
5652
|
-
type: ViewChildren,
|
|
5653
|
-
args: ['customButton']
|
|
5654
|
-
}] } });
|
|
5655
|
-
|
|
5656
5384
|
class DialogContentComponent {
|
|
5657
5385
|
constructor() {
|
|
5658
5386
|
this.dynamicDialogConfig = inject(DynamicDialogConfig);
|
|
@@ -5981,46 +5709,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImpo
|
|
|
5981
5709
|
type: Input
|
|
5982
5710
|
}] } });
|
|
5983
5711
|
|
|
5984
|
-
// This topic is defined here and not in integration-interface, because
|
|
5985
|
-
// it is not used as framework independent integration but for improving
|
|
5986
|
-
// angular specific things
|
|
5987
|
-
class TranslationCacheTopic extends SyncableTopic {
|
|
5988
|
-
constructor() {
|
|
5989
|
-
super('translationCache', 2);
|
|
5990
|
-
}
|
|
5991
|
-
}
|
|
5992
|
-
/**
|
|
5993
|
-
* @deprecated Please import from `@onecx/angular-utils` instead.
|
|
5994
|
-
*/
|
|
5995
|
-
class TranslationCacheService {
|
|
5996
|
-
constructor() {
|
|
5997
|
-
this.translationTopic$ = new TranslationCacheTopic();
|
|
5998
|
-
window['onecxTranslations'] ??= {};
|
|
5999
|
-
}
|
|
6000
|
-
ngOnDestroy() {
|
|
6001
|
-
this.translationTopic$.destroy();
|
|
6002
|
-
}
|
|
6003
|
-
getTranslationFile(url, cacheMissFunction) {
|
|
6004
|
-
if (window['onecxTranslations'][url]) {
|
|
6005
|
-
return of(window['onecxTranslations'][url]);
|
|
6006
|
-
}
|
|
6007
|
-
if (window['onecxTranslations'][url] === null) {
|
|
6008
|
-
return this.translationTopic$.pipe(filter((messageUrl) => messageUrl === url), map(() => window['onecxTranslations'][url]), first());
|
|
6009
|
-
}
|
|
6010
|
-
window['onecxTranslations'][url] = null;
|
|
6011
|
-
return cacheMissFunction().pipe(tap((t) => {
|
|
6012
|
-
window['onecxTranslations'][url] = t;
|
|
6013
|
-
this.translationTopic$.publish(url);
|
|
6014
|
-
}), map(() => window['onecxTranslations'][url]), first());
|
|
6015
|
-
}
|
|
6016
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: TranslationCacheService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
6017
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: TranslationCacheService, providedIn: 'root' }); }
|
|
6018
|
-
}
|
|
6019
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: TranslationCacheService, decorators: [{
|
|
6020
|
-
type: Injectable,
|
|
6021
|
-
args: [{ providedIn: 'root' }]
|
|
6022
|
-
}], ctorParameters: () => [] });
|
|
6023
|
-
|
|
6024
5712
|
class PortalDialogService {
|
|
6025
5713
|
constructor() {
|
|
6026
5714
|
this.dialogService = inject(DialogService);
|
|
@@ -6238,12 +5926,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImpo
|
|
|
6238
5926
|
providedIn: 'root',
|
|
6239
5927
|
}]
|
|
6240
5928
|
}] });
|
|
6241
|
-
/**
|
|
6242
|
-
* @deprecated Will be removed. Please use isValidDate() from @onecx/accelerator
|
|
6243
|
-
*/
|
|
6244
|
-
function isValidDate(value) {
|
|
6245
|
-
return value instanceof Date && !isNaN(value);
|
|
6246
|
-
}
|
|
6247
5929
|
|
|
6248
5930
|
class ExportDataService {
|
|
6249
5931
|
constructor() {
|
|
@@ -6572,7 +6254,6 @@ class AngularAcceleratorModule {
|
|
|
6572
6254
|
SearchHeaderComponent,
|
|
6573
6255
|
DiagramComponent,
|
|
6574
6256
|
GroupByCountDiagramComponent,
|
|
6575
|
-
DataLoadingErrorComponent,
|
|
6576
6257
|
OcxContentComponent,
|
|
6577
6258
|
OcxContentContainerComponent,
|
|
6578
6259
|
IfPermissionDirective,
|
|
@@ -6589,7 +6270,6 @@ class AngularAcceleratorModule {
|
|
|
6589
6270
|
LoadingIndicatorComponent,
|
|
6590
6271
|
LoadingIndicatorDirective,
|
|
6591
6272
|
BasicDirective,
|
|
6592
|
-
ButtonDialogComponent,
|
|
6593
6273
|
DialogFooterComponent,
|
|
6594
6274
|
DialogContentComponent,
|
|
6595
6275
|
DialogInlineComponent,
|
|
@@ -6612,7 +6292,6 @@ class AngularAcceleratorModule {
|
|
|
6612
6292
|
SearchHeaderComponent,
|
|
6613
6293
|
DiagramComponent,
|
|
6614
6294
|
GroupByCountDiagramComponent,
|
|
6615
|
-
DataLoadingErrorComponent,
|
|
6616
6295
|
OcxContentComponent,
|
|
6617
6296
|
OcxContentContainerComponent,
|
|
6618
6297
|
IfPermissionDirective,
|
|
@@ -6629,7 +6308,6 @@ class AngularAcceleratorModule {
|
|
|
6629
6308
|
LoadingIndicatorComponent,
|
|
6630
6309
|
LoadingIndicatorDirective,
|
|
6631
6310
|
BasicDirective,
|
|
6632
|
-
ButtonDialogComponent,
|
|
6633
6311
|
DialogFooterComponent,
|
|
6634
6312
|
DialogContentComponent,
|
|
6635
6313
|
DialogInlineComponent,
|
|
@@ -6694,7 +6372,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImpo
|
|
|
6694
6372
|
SearchHeaderComponent,
|
|
6695
6373
|
DiagramComponent,
|
|
6696
6374
|
GroupByCountDiagramComponent,
|
|
6697
|
-
DataLoadingErrorComponent,
|
|
6698
6375
|
OcxContentComponent,
|
|
6699
6376
|
OcxContentContainerComponent,
|
|
6700
6377
|
IfPermissionDirective,
|
|
@@ -6711,7 +6388,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImpo
|
|
|
6711
6388
|
LoadingIndicatorComponent,
|
|
6712
6389
|
LoadingIndicatorDirective,
|
|
6713
6390
|
BasicDirective,
|
|
6714
|
-
ButtonDialogComponent,
|
|
6715
6391
|
DialogFooterComponent,
|
|
6716
6392
|
DialogContentComponent,
|
|
6717
6393
|
DialogInlineComponent,
|
|
@@ -6757,7 +6433,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImpo
|
|
|
6757
6433
|
SearchHeaderComponent,
|
|
6758
6434
|
DiagramComponent,
|
|
6759
6435
|
GroupByCountDiagramComponent,
|
|
6760
|
-
DataLoadingErrorComponent,
|
|
6761
6436
|
OcxContentComponent,
|
|
6762
6437
|
OcxContentContainerComponent,
|
|
6763
6438
|
IfPermissionDirective,
|
|
@@ -6774,7 +6449,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImpo
|
|
|
6774
6449
|
LoadingIndicatorComponent,
|
|
6775
6450
|
LoadingIndicatorDirective,
|
|
6776
6451
|
BasicDirective,
|
|
6777
|
-
ButtonDialogComponent,
|
|
6778
6452
|
DialogFooterComponent,
|
|
6779
6453
|
DialogContentComponent,
|
|
6780
6454
|
DialogInlineComponent,
|
|
@@ -6790,37 +6464,6 @@ const atLeastOneFieldFilledValidator = (form) => {
|
|
|
6790
6464
|
return null;
|
|
6791
6465
|
};
|
|
6792
6466
|
|
|
6793
|
-
/**
|
|
6794
|
-
* @deprecated Please import from `@onecx/angular-utils` instead.
|
|
6795
|
-
*/
|
|
6796
|
-
class AsyncTranslateLoader {
|
|
6797
|
-
static { this.lastTimerId = 0; }
|
|
6798
|
-
constructor(translateLoader$) {
|
|
6799
|
-
this.translateLoader$ = translateLoader$;
|
|
6800
|
-
this.timerId = AsyncTranslateLoader.lastTimerId++;
|
|
6801
|
-
}
|
|
6802
|
-
getTranslation(lang) {
|
|
6803
|
-
return this.translateLoader$.pipe(tap(() => console.time('AsyncTranslateLoader_' + this.timerId)), defaultIfEmpty(undefined), first(), mergeMap((translateLoader) => translateLoader?.getTranslation(lang) ?? of({})), tap(() => console.timeEnd('AsyncTranslateLoader_' + this.timerId)));
|
|
6804
|
-
}
|
|
6805
|
-
}
|
|
6806
|
-
|
|
6807
|
-
/**
|
|
6808
|
-
* @deprecated Please import from `@onecx/angular-utils` instead.
|
|
6809
|
-
*/
|
|
6810
|
-
class CachingTranslateLoader {
|
|
6811
|
-
constructor(translationCache, http, prefix, suffix) {
|
|
6812
|
-
this.translationCache = translationCache;
|
|
6813
|
-
this.http = http;
|
|
6814
|
-
this.prefix = prefix;
|
|
6815
|
-
this.suffix = suffix;
|
|
6816
|
-
this.translateLoader = new TranslateHttpLoader(this.http, this.prefix, this.suffix);
|
|
6817
|
-
}
|
|
6818
|
-
getTranslation(lang) {
|
|
6819
|
-
const url = `${this.prefix}${lang}${this.suffix}`;
|
|
6820
|
-
return this.translationCache.getTranslationFile(url, () => this.translateLoader.getTranslation(lang));
|
|
6821
|
-
}
|
|
6822
|
-
}
|
|
6823
|
-
|
|
6824
6467
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
6825
6468
|
class DataOperationStrategy {
|
|
6826
6469
|
endsWith(column, value, target) {
|
|
@@ -6902,94 +6545,6 @@ class DataOperationStrategy {
|
|
|
6902
6545
|
}
|
|
6903
6546
|
}
|
|
6904
6547
|
|
|
6905
|
-
/**
|
|
6906
|
-
* @deprecated Please import from `@onecx/angular-utils` instead.
|
|
6907
|
-
*/
|
|
6908
|
-
class TranslateCombinedLoader {
|
|
6909
|
-
constructor(...loaders) {
|
|
6910
|
-
this._loaders = loaders;
|
|
6911
|
-
}
|
|
6912
|
-
getTranslation(lang) {
|
|
6913
|
-
return forkJoin(this._loaders.map((l) => l.getTranslation(lang).pipe(catchError(err => {
|
|
6914
|
-
console.error('Failed to load translation file', l, err);
|
|
6915
|
-
return of({});
|
|
6916
|
-
})))).pipe(map((allTranslations) => {
|
|
6917
|
-
let result = {};
|
|
6918
|
-
allTranslations.forEach((translations) => {
|
|
6919
|
-
result = this.mergeDeep(result, translations);
|
|
6920
|
-
});
|
|
6921
|
-
return result;
|
|
6922
|
-
}));
|
|
6923
|
-
}
|
|
6924
|
-
isObject(item) {
|
|
6925
|
-
return item && typeof item === 'object' && !Array.isArray(item);
|
|
6926
|
-
}
|
|
6927
|
-
mergeDeep(target, source) {
|
|
6928
|
-
const output = Object.assign({}, target);
|
|
6929
|
-
if (this.isObject(target) && this.isObject(source)) {
|
|
6930
|
-
Object.keys(source).forEach((key) => {
|
|
6931
|
-
if (this.isObject(source[key])) {
|
|
6932
|
-
if (!(key in target))
|
|
6933
|
-
Object.assign(output, { [key]: source[key] });
|
|
6934
|
-
else
|
|
6935
|
-
output[key] = this.mergeDeep(target[key], source[key]);
|
|
6936
|
-
}
|
|
6937
|
-
else {
|
|
6938
|
-
Object.assign(output, { [key]: source[key] });
|
|
6939
|
-
}
|
|
6940
|
-
});
|
|
6941
|
-
}
|
|
6942
|
-
return output;
|
|
6943
|
-
}
|
|
6944
|
-
}
|
|
6945
|
-
|
|
6946
|
-
let lastTranslateLoaderTimerId$1 = 0;
|
|
6947
|
-
/**
|
|
6948
|
-
* @deprecated Please import from `@onecx/angular-utils` instead.
|
|
6949
|
-
*/
|
|
6950
|
-
function createTranslateLoader(http, appStateService, translationCacheService) {
|
|
6951
|
-
const ts = translationCacheService ?? inject(TranslationCacheService);
|
|
6952
|
-
const timerId = lastTranslateLoaderTimerId$1++;
|
|
6953
|
-
console.time('createTranslateLoader_' + timerId);
|
|
6954
|
-
return new AsyncTranslateLoader(combineLatest([appStateService.currentMfe$.asObservable(), appStateService.globalLoading$.asObservable()]).pipe(filter(([, isLoading]) => !isLoading), map(([currentMfe]) => {
|
|
6955
|
-
return new TranslateCombinedLoader(
|
|
6956
|
-
// translations of shell or of app in standalone mode
|
|
6957
|
-
new CachingTranslateLoader(ts, http, `./assets/i18n/`, '.json'),
|
|
6958
|
-
// translations of portal-integration-angular of app
|
|
6959
|
-
new CachingTranslateLoader(ts, http, Location.joinWithSlash(currentMfe.remoteBaseUrl, `onecx-portal-lib/assets/i18n/`), '.json'),
|
|
6960
|
-
// translations of portal-integration-angular of shell
|
|
6961
|
-
new CachingTranslateLoader(ts, http, `./onecx-portal-lib/assets/i18n/`, '.json'),
|
|
6962
|
-
// Primelocale Translations
|
|
6963
|
-
new CachingTranslateLoader(ts, http, Location.joinWithSlash(currentMfe.remoteBaseUrl, `onecx-portal-lib/assets/i18n/primeng/`), '.json'),
|
|
6964
|
-
// translations of the app
|
|
6965
|
-
new CachingTranslateLoader(ts, http, Location.joinWithSlash(currentMfe.remoteBaseUrl, `assets/i18n/`), '.json'));
|
|
6966
|
-
}), tap(() => console.timeEnd('createTranslateLoader_' + timerId))));
|
|
6967
|
-
}
|
|
6968
|
-
|
|
6969
|
-
let lastTranslateLoaderTimerId = 0;
|
|
6970
|
-
function createRemoteComponentTranslateLoader(http, baseUrlReplaySubject$, translationCacheService) {
|
|
6971
|
-
const ts = translationCacheService ?? inject(TranslationCacheService);
|
|
6972
|
-
const timerId = lastTranslateLoaderTimerId++;
|
|
6973
|
-
console.time('createRemoteComponentTranslateLoader_' + timerId);
|
|
6974
|
-
return new AsyncTranslateLoader(baseUrlReplaySubject$.pipe(map((baseUrl) => {
|
|
6975
|
-
return new TranslateCombinedLoader(
|
|
6976
|
-
// translations of shell or of app in standalone mode
|
|
6977
|
-
new CachingTranslateLoader(ts, http, `./assets/i18n/`, '.json'),
|
|
6978
|
-
// translations of portal-integration-angular of app
|
|
6979
|
-
new CachingTranslateLoader(ts, http, Location.joinWithSlash(baseUrl, `onecx-portal-lib/assets/i18n/`), '.json'),
|
|
6980
|
-
// translations of portal-integration-angular of shell
|
|
6981
|
-
new CachingTranslateLoader(ts, http, `./onecx-portal-lib/assets/i18n/`, '.json'),
|
|
6982
|
-
// translations of the app
|
|
6983
|
-
new CachingTranslateLoader(ts, http, Location.joinWithSlash(baseUrl, `assets/i18n/`), '.json'));
|
|
6984
|
-
}), tap(() => console.timeEnd('createRemoteComponentTranslateLoader_' + timerId))));
|
|
6985
|
-
}
|
|
6986
|
-
|
|
6987
|
-
function createRemoteComponentAndMfeTranslateLoader(httpClient, baseUrl, translationCacheService, appStateService) {
|
|
6988
|
-
return new AsyncTranslateLoader(appStateService.currentMfe$.pipe(map((currentMfe) => {
|
|
6989
|
-
return new TranslateCombinedLoader(createRemoteComponentTranslateLoader(httpClient, baseUrl, translationCacheService), new CachingTranslateLoader(translationCacheService, httpClient, Location.joinWithSlash(currentMfe.remoteBaseUrl, 'assets/i18n/'), '.json'));
|
|
6990
|
-
})));
|
|
6991
|
-
}
|
|
6992
|
-
|
|
6993
6548
|
function enumToDropdownOptions(translateService, enumType, translationKeyPrefix) {
|
|
6994
6549
|
return translateService.get(Object.values(enumType).map((v) => translationKeyPrefix + v)).pipe(map((translations) => Object.values(enumType).map((v) => ({
|
|
6995
6550
|
label: translations[translationKeyPrefix + v],
|
|
@@ -7014,7 +6569,7 @@ function buildSearchCriteria(formRawValue, datePickers, { removeNullValues = fal
|
|
|
7014
6569
|
if (value == null && removeNullValues) {
|
|
7015
6570
|
return acc;
|
|
7016
6571
|
}
|
|
7017
|
-
if (isValidDate
|
|
6572
|
+
if (isValidDate(value) && !_hasShowTime(datePickers, key)) {
|
|
7018
6573
|
value = getUTCDateWithoutTimezoneIssues(value);
|
|
7019
6574
|
}
|
|
7020
6575
|
return {
|
|
@@ -7059,10 +6614,11 @@ class ImageLogoUrlUtils {
|
|
|
7059
6614
|
}
|
|
7060
6615
|
|
|
7061
6616
|
// injection tokens + related utilities
|
|
6617
|
+
// directives
|
|
7062
6618
|
|
|
7063
6619
|
/**
|
|
7064
6620
|
* Generated bundle index. Do not edit.
|
|
7065
6621
|
*/
|
|
7066
6622
|
|
|
7067
|
-
export { AdvancedDirective, AngularAcceleratorMissingTranslationHandler, AngularAcceleratorModule, AngularAcceleratorPrimeNgModule,
|
|
6623
|
+
export { AdvancedDirective, AngularAcceleratorMissingTranslationHandler, AngularAcceleratorModule, AngularAcceleratorPrimeNgModule, BasicDirective, BreadcrumbService, ColorUtils, ColumnGroupSelectionComponent, ColumnType, CustomGroupColumnSelectorComponent, DataLayoutSelectionComponent, DataListGridComponent, DataListGridSortingComponent, DataOperationStrategy, DataTableComponent, DataViewComponent, DateUtils, DiagramComponent, DialogContentComponent, DialogFooterComponent, DialogInlineComponent, DialogMessageContentComponent, DynamicPipe, ExportDataService, FilterType, FilterViewComponent, GlobalErrorComponent, GroupByCountDiagramComponent, IfBreakpointDirective, IfPermissionDirective, ImageLogoUrlUtils, InteractiveDataViewComponent, LifecycleComponent, LoadingIndicatorComponent, LoadingIndicatorDirective, ObjectUtils, OcxContentComponent, OcxContentContainerComponent, OcxContentContainerDirective, OcxContentDirective, OcxTimeAgoPipe, PageHeaderComponent, PortalDialogService, RelativeDatePipe, SearchHeaderComponent, SrcDirective, TemplateDirective, TemplateType, TooltipOnOverflowDirective, atLeastOneFieldFilledValidator, buildSearchCriteria, enumToDropdownOptions, findEntryWithKeyword, findTemplate, flattenObject, limit, providePortalDialogService, removeKeyword, searchPrefixWithSpecialChars };
|
|
7068
6624
|
//# sourceMappingURL=onecx-angular-accelerator.mjs.map
|