@quadrel-enterprise-ui/framework 21.12.16 → 21.12.18
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.
|
@@ -3,7 +3,7 @@ import { Directive, InjectionToken, inject, ElementRef, HostBinding, Input, View
|
|
|
3
3
|
import { Dialog, DialogRef, DIALOG_DATA, DialogModule } from '@angular/cdk/dialog';
|
|
4
4
|
import { quadrelIcons } from '@quadrel-enterprise-ui/icons';
|
|
5
5
|
export { quadrelIconNames } from '@quadrel-enterprise-ui/icons';
|
|
6
|
-
import { BehaviorSubject, pairwise, fromEvent, combineLatest, concat, map as map$1, Subject, throwError, of, ReplaySubject, merge, isObservable, NEVER, Observable, EMPTY, shareReplay, distinctUntilChanged as distinctUntilChanged$1, debounce, timer, switchMap as switchMap$1, asyncScheduler, Subscription, startWith as startWith$1, filter as filter$1, debounceTime as debounceTime$1, firstValueFrom, take as take$1, tap as tap$1, from, delay, defer, throwIfEmpty, EmptyError, queueScheduler, concatMap as concatMap$1, exhaustMap, takeUntil as takeUntil$1,
|
|
6
|
+
import { BehaviorSubject, pairwise, fromEvent, combineLatest, concat, map as map$1, Subject, throwError, of, ReplaySubject, merge, isObservable, NEVER, Observable, EMPTY, shareReplay, distinctUntilChanged as distinctUntilChanged$1, debounce, timer, switchMap as switchMap$1, asyncScheduler, Subscription, startWith as startWith$1, filter as filter$1, debounceTime as debounceTime$1, firstValueFrom, take as take$1, tap as tap$1, from, delay, defer, throwIfEmpty, EmptyError, finalize, queueScheduler, concatMap as concatMap$1, exhaustMap, takeUntil as takeUntil$1, forkJoin, delayWhen, combineLatestWith, withLatestFrom as withLatestFrom$1, async } from 'rxjs';
|
|
7
7
|
import { map, startWith, take, debounceTime, filter, catchError, distinctUntilChanged, switchMap, concatMap, skip, throttleTime, tap, takeUntil, auditTime, withLatestFrom, first, observeOn, pairwise as pairwise$1, mergeMap } from 'rxjs/operators';
|
|
8
8
|
import { v4 } from 'uuid';
|
|
9
9
|
import * as i2 from '@ngx-translate/core';
|
|
@@ -1340,13 +1340,11 @@ class QdDialogComponent {
|
|
|
1340
1340
|
*/
|
|
1341
1341
|
testId = 'dialog';
|
|
1342
1342
|
body;
|
|
1343
|
-
infoBanners;
|
|
1344
1343
|
get hasSectionsClass() {
|
|
1345
1344
|
return this.hasSections;
|
|
1346
1345
|
}
|
|
1347
1346
|
config;
|
|
1348
1347
|
hasSections;
|
|
1349
|
-
hasInfoBanner;
|
|
1350
1348
|
isMobile = false;
|
|
1351
1349
|
_destroyRef = inject(DestroyRef);
|
|
1352
1350
|
_pageDialogCanCloseFn = null;
|
|
@@ -1373,12 +1371,6 @@ class QdDialogComponent {
|
|
|
1373
1371
|
this.hasSections = children.length > 0 && children.every((node) => node.tagName === 'QD-SECTION');
|
|
1374
1372
|
this.changeDetectorRef.detectChanges();
|
|
1375
1373
|
}
|
|
1376
|
-
ngAfterViewInit() {
|
|
1377
|
-
const bannerChildren = Array.from(this.infoBanners?.nativeElement?.childNodes ?? []);
|
|
1378
|
-
this.hasInfoBanner =
|
|
1379
|
-
bannerChildren.length > 0 && bannerChildren.some((node) => node.tagName === 'QD-PAGE-INFO-BANNER');
|
|
1380
|
-
this.changeDetectorRef.detectChanges();
|
|
1381
|
-
}
|
|
1382
1374
|
ngOnDestroy() {
|
|
1383
1375
|
this.dialogService.clearPageDialogCanClose(this.dialogRef);
|
|
1384
1376
|
}
|
|
@@ -1442,20 +1434,17 @@ class QdDialogComponent {
|
|
|
1442
1434
|
});
|
|
1443
1435
|
}
|
|
1444
1436
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: QdDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1445
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: QdDialogComponent, isStandalone: false, selector: "qd-dialog", inputs: { testId: ["data-test-id", "testId"] }, host: { properties: { "class.full-width": "isFullWidth", "class.has-sections": "this.hasSectionsClass" } }, providers: [QdDialogComponent], viewQueries: [{ propertyName: "body", first: true, predicate: ["body"], descendants: true }
|
|
1437
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: QdDialogComponent, isStandalone: false, selector: "qd-dialog", inputs: { testId: ["data-test-id", "testId"] }, host: { properties: { "class.full-width": "isFullWidth", "class.has-sections": "this.hasSectionsClass" } }, providers: [QdDialogComponent], viewQueries: [{ propertyName: "body", first: true, predicate: ["body"], descendants: true }], ngImport: i0, template: "@if (!isFullWidth) {\n<div\n class=\"dialog-header\"\n cdkDrag\n cdkDragRootElement=\".cdk-overlay-pane\"\n cdkDragBoundary=\".cdk-overlay-container\"\n [cdkDragDisabled]=\"!isDragEnabled\"\n [attr.data-test-id]=\"testId + '-header'\"\n>\n <div class=\"title-container\">\n {{ config?.title?.i18n | translate }}\n </div>\n @if (!config?.hideCloseHeaderButton) {\n <button\n qdIconButton\n class=\"close\"\n color=\"secondary\"\n tabindex=\"-1\"\n (click)=\"close()\"\n [attr.aria-label]=\"'i18n.qd.dialog.action.close' | translate\"\n [data-test-id]=\"testId + '-close-button'\"\n >\n <qd-icon icon=\"timesLargeLight\"></qd-icon>\n </button>\n }\n</div>\n} @if (!config?.hideCloseHeaderButton && isFullWidth) {\n<button\n qdIconButton\n class=\"close\"\n color=\"secondary\"\n tabindex=\"-1\"\n (click)=\"close()\"\n [attr.aria-label]=\"'i18n.qd.dialog.action.close' | translate\"\n [data-test-id]=\"testId + '-close-button'\"\n>\n <qd-icon icon=\"timesLargeLight\"></qd-icon>\n</button>\n}\n\n<div class=\"wrapper-body\">\n <div class=\"dialog-info-banners\">\n <ng-content select=\"qd-page-info-banner\"></ng-content>\n </div>\n <div class=\"body\" [class.full-width]=\"isFullWidth\" #body>\n <ng-content></ng-content>\n </div>\n</div>\n\n<div class=\"qd-dialog-actions\">\n @if (config.cancel) {\n <button qdButton qdButtonGhost color=\"secondary\" (click)=\"close()\" [data-test-id]=\"testId + '-cancel-button'\">\n {{ config?.cancel?.label?.i18n ?? \"i18n.qd.dialog.action.cancel\" | translate }}\n </button>\n } @if (config.primary) {\n <button qdButton (click)=\"primaryActionClicked()\" [data-test-id]=\"testId + '-primary-button'\">\n {{ config?.primary?.label?.i18n ?? \"i18n.qd.dialog.action.primary\" | translate }}\n </button>\n }\n <ng-content select=\"qd-dialog-action\"></ng-content>\n</div>\n", styles: ["qd-dialog{display:flex;width:100%;height:100%;flex-direction:column;background:#efefef}qd-dialog.full-width{position:relative;width:calc(100% - 3rem)!important;height:calc(100% - 3rem)!important;margin:1.5rem}qd-dialog.full-width .close{position:absolute;z-index:9999;top:1.25rem;right:1rem;color:#454545;cursor:pointer}.dialog-header{display:flex;height:3.125rem;flex-direction:row;align-items:center;justify-content:space-between;padding:.5rem 1.5rem;border-bottom:2px solid rgb(213,213,213);background:#fff}.dialog-header .title-container{display:block;color:#171717;font-weight:500}.dialog-header .close{cursor:pointer}.dialog-header.cdk-drag:not(.cdk-drag-disabled){cursor:move;-webkit-user-select:none;user-select:none}.wrapper-body{overflow:auto;flex:1;background:#efefef}.wrapper-body .dialog-info-banners:has(>qd-page-info-banner:not(.qd-page-info-banner-empty)){padding:1rem 1.25rem .5rem;border-bottom:rgb(213,213,213) solid .0625rem;background-color:#fff}.wrapper-body .dialog-info-banners>qd-page-info-banner:last-child{margin-bottom:0}.wrapper-body .body.full-width{height:100%}.wrapper-body .body:not(.full-width){max-height:80vh;padding:1rem 1.5rem}.wrapper-body .body:not(.full-width) qd-section{padding-right:1.5rem;padding-left:1.5rem}.wrapper-body .body:not(.full-width) qd-text-section{margin-right:0;margin-left:0}qd-dialog.has-sections .wrapper-body .body:not(.full-width){padding:0}.qd-dialog-actions{display:flex;justify-content:flex-end;padding:.5rem 1.5rem;border-top:2px solid rgb(213,213,213);background:#efefef;column-gap:.625rem}\n"], dependencies: [{ kind: "directive", type: i1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: QdButtonComponent, selector: "button[qdButton], a[qdButton]", inputs: ["disabled", "color", "icon", "data-test-id", "additionalInfo"] }, { kind: "directive", type: QdButtonGhostDirective, selector: "button[qdButtonGhost], a[qdButtonGhost]" }, { kind: "component", type: QdIconButtonComponent, selector: "button[qdIconButton], a[qdIconButton]", inputs: ["color", "data-test-id"] }, { kind: "component", type: QdIconComponent, selector: "qd-icon", inputs: ["icon", "status"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None });
|
|
1446
1438
|
}
|
|
1447
1439
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: QdDialogComponent, decorators: [{
|
|
1448
1440
|
type: Component,
|
|
1449
|
-
args: [{ selector: 'qd-dialog', host: { '[class.full-width]': 'isFullWidth' }, encapsulation: ViewEncapsulation.None, providers: [QdDialogComponent], standalone: false, template: "@if (!isFullWidth) {\n<div\n class=\"dialog-header\"\n cdkDrag\n cdkDragRootElement=\".cdk-overlay-pane\"\n cdkDragBoundary=\".cdk-overlay-container\"\n [cdkDragDisabled]=\"!isDragEnabled\"\n [attr.data-test-id]=\"testId + '-header'\"\n>\n <div class=\"title-container\">\n {{ config?.title?.i18n | translate }}\n </div>\n @if (!config?.hideCloseHeaderButton) {\n <button\n qdIconButton\n class=\"close\"\n color=\"secondary\"\n tabindex=\"-1\"\n (click)=\"close()\"\n [attr.aria-label]=\"'i18n.qd.dialog.action.close' | translate\"\n [data-test-id]=\"testId + '-close-button'\"\n >\n <qd-icon icon=\"timesLargeLight\"></qd-icon>\n </button>\n }\n</div>\n} @if (!config?.hideCloseHeaderButton && isFullWidth) {\n<button\n qdIconButton\n class=\"close\"\n color=\"secondary\"\n tabindex=\"-1\"\n (click)=\"close()\"\n [attr.aria-label]=\"'i18n.qd.dialog.action.close' | translate\"\n [data-test-id]=\"testId + '-close-button'\"\n>\n <qd-icon icon=\"timesLargeLight\"></qd-icon>\n</button>\n}\n\n<div class=\"wrapper-body\">\n <div
|
|
1441
|
+
args: [{ selector: 'qd-dialog', host: { '[class.full-width]': 'isFullWidth' }, encapsulation: ViewEncapsulation.None, providers: [QdDialogComponent], standalone: false, template: "@if (!isFullWidth) {\n<div\n class=\"dialog-header\"\n cdkDrag\n cdkDragRootElement=\".cdk-overlay-pane\"\n cdkDragBoundary=\".cdk-overlay-container\"\n [cdkDragDisabled]=\"!isDragEnabled\"\n [attr.data-test-id]=\"testId + '-header'\"\n>\n <div class=\"title-container\">\n {{ config?.title?.i18n | translate }}\n </div>\n @if (!config?.hideCloseHeaderButton) {\n <button\n qdIconButton\n class=\"close\"\n color=\"secondary\"\n tabindex=\"-1\"\n (click)=\"close()\"\n [attr.aria-label]=\"'i18n.qd.dialog.action.close' | translate\"\n [data-test-id]=\"testId + '-close-button'\"\n >\n <qd-icon icon=\"timesLargeLight\"></qd-icon>\n </button>\n }\n</div>\n} @if (!config?.hideCloseHeaderButton && isFullWidth) {\n<button\n qdIconButton\n class=\"close\"\n color=\"secondary\"\n tabindex=\"-1\"\n (click)=\"close()\"\n [attr.aria-label]=\"'i18n.qd.dialog.action.close' | translate\"\n [data-test-id]=\"testId + '-close-button'\"\n>\n <qd-icon icon=\"timesLargeLight\"></qd-icon>\n</button>\n}\n\n<div class=\"wrapper-body\">\n <div class=\"dialog-info-banners\">\n <ng-content select=\"qd-page-info-banner\"></ng-content>\n </div>\n <div class=\"body\" [class.full-width]=\"isFullWidth\" #body>\n <ng-content></ng-content>\n </div>\n</div>\n\n<div class=\"qd-dialog-actions\">\n @if (config.cancel) {\n <button qdButton qdButtonGhost color=\"secondary\" (click)=\"close()\" [data-test-id]=\"testId + '-cancel-button'\">\n {{ config?.cancel?.label?.i18n ?? \"i18n.qd.dialog.action.cancel\" | translate }}\n </button>\n } @if (config.primary) {\n <button qdButton (click)=\"primaryActionClicked()\" [data-test-id]=\"testId + '-primary-button'\">\n {{ config?.primary?.label?.i18n ?? \"i18n.qd.dialog.action.primary\" | translate }}\n </button>\n }\n <ng-content select=\"qd-dialog-action\"></ng-content>\n</div>\n", styles: ["qd-dialog{display:flex;width:100%;height:100%;flex-direction:column;background:#efefef}qd-dialog.full-width{position:relative;width:calc(100% - 3rem)!important;height:calc(100% - 3rem)!important;margin:1.5rem}qd-dialog.full-width .close{position:absolute;z-index:9999;top:1.25rem;right:1rem;color:#454545;cursor:pointer}.dialog-header{display:flex;height:3.125rem;flex-direction:row;align-items:center;justify-content:space-between;padding:.5rem 1.5rem;border-bottom:2px solid rgb(213,213,213);background:#fff}.dialog-header .title-container{display:block;color:#171717;font-weight:500}.dialog-header .close{cursor:pointer}.dialog-header.cdk-drag:not(.cdk-drag-disabled){cursor:move;-webkit-user-select:none;user-select:none}.wrapper-body{overflow:auto;flex:1;background:#efefef}.wrapper-body .dialog-info-banners:has(>qd-page-info-banner:not(.qd-page-info-banner-empty)){padding:1rem 1.25rem .5rem;border-bottom:rgb(213,213,213) solid .0625rem;background-color:#fff}.wrapper-body .dialog-info-banners>qd-page-info-banner:last-child{margin-bottom:0}.wrapper-body .body.full-width{height:100%}.wrapper-body .body:not(.full-width){max-height:80vh;padding:1rem 1.5rem}.wrapper-body .body:not(.full-width) qd-section{padding-right:1.5rem;padding-left:1.5rem}.wrapper-body .body:not(.full-width) qd-text-section{margin-right:0;margin-left:0}qd-dialog.has-sections .wrapper-body .body:not(.full-width){padding:0}.qd-dialog-actions{display:flex;justify-content:flex-end;padding:.5rem 1.5rem;border-top:2px solid rgb(213,213,213);background:#efefef;column-gap:.625rem}\n"] }]
|
|
1450
1442
|
}], propDecorators: { testId: [{
|
|
1451
1443
|
type: Input,
|
|
1452
1444
|
args: ['data-test-id']
|
|
1453
1445
|
}], body: [{
|
|
1454
1446
|
type: ViewChild,
|
|
1455
1447
|
args: ['body']
|
|
1456
|
-
}], infoBanners: [{
|
|
1457
|
-
type: ViewChild,
|
|
1458
|
-
args: ['banners']
|
|
1459
1448
|
}], hasSectionsClass: [{
|
|
1460
1449
|
type: HostBinding,
|
|
1461
1450
|
args: ['class.has-sections']
|
|
@@ -30668,7 +30657,9 @@ class QdTreeRowExpanderService {
|
|
|
30668
30657
|
destroyRef = inject(DestroyRef);
|
|
30669
30658
|
init(treeId, rowService) {
|
|
30670
30659
|
this.trees.set(treeId, { treeRows: [], rowService });
|
|
30671
|
-
rowService.treeRow
|
|
30660
|
+
rowService.treeRow$
|
|
30661
|
+
.pipe(finalize(() => this.forgetTree(treeId, rowService)), takeUntilDestroyed(this.destroyRef))
|
|
30662
|
+
.subscribe(tree => {
|
|
30672
30663
|
if (tree)
|
|
30673
30664
|
this.trees.get(treeId).treeRows = tree;
|
|
30674
30665
|
});
|
|
@@ -30713,6 +30704,10 @@ class QdTreeRowExpanderService {
|
|
|
30713
30704
|
});
|
|
30714
30705
|
tree.rowService?.updateRows(JSON.parse(JSON.stringify(tree.treeRows)));
|
|
30715
30706
|
}
|
|
30707
|
+
forgetTree(treeId, rowService) {
|
|
30708
|
+
if (this.trees.get(treeId)?.rowService === rowService)
|
|
30709
|
+
this.trees.delete(treeId);
|
|
30710
|
+
}
|
|
30716
30711
|
expand(row) {
|
|
30717
30712
|
if (!row || !row.nestedRows || !row.nestedRows.length)
|
|
30718
30713
|
return;
|
|
@@ -30762,12 +30757,16 @@ const RESERVED_ROW_PROPERTIES = ['uid', 'nestedRows', 'expanded', 'full'];
|
|
|
30762
30757
|
class QdTreeRowsService {
|
|
30763
30758
|
groupService = inject(QdTreeGroupService);
|
|
30764
30759
|
expanderService = inject(QdTreeRowExpanderService, { optional: true });
|
|
30760
|
+
_destroyRef = inject(DestroyRef);
|
|
30765
30761
|
config;
|
|
30766
30762
|
treeRowSubject = new BehaviorSubject(null);
|
|
30767
30763
|
treeRow$ = this.treeRowSubject.asObservable();
|
|
30768
30764
|
get groupColumn() {
|
|
30769
30765
|
return this.groupService.groupColumn;
|
|
30770
30766
|
}
|
|
30767
|
+
constructor() {
|
|
30768
|
+
this._destroyRef.onDestroy(() => this.treeRowSubject.complete());
|
|
30769
|
+
}
|
|
30771
30770
|
initializeRows(data) {
|
|
30772
30771
|
const rows = structuredClone(data);
|
|
30773
30772
|
let treeRows = this.splitRowsByTree(rows);
|
|
@@ -30903,7 +30902,7 @@ class QdTreeRowsService {
|
|
|
30903
30902
|
}
|
|
30904
30903
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: QdTreeRowsService, decorators: [{
|
|
30905
30904
|
type: Injectable
|
|
30906
|
-
}] });
|
|
30905
|
+
}], ctorParameters: () => [] });
|
|
30907
30906
|
|
|
30908
30907
|
class QdTreeRowActionsSecondaryMenuComponent {
|
|
30909
30908
|
tableStoreService = inject(QdTableStoreService);
|