@vendure/admin-ui 2.2.4 → 2.2.5
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/core/common/version.d.ts +1 -1
- package/core/extension/register-route-component.d.ts +1 -1
- package/core/shared/components/dropdown/dropdown-menu.component.d.ts +5 -2
- package/core/shared/components/order-state-label/order-state-label.component.d.ts +1 -1
- package/core/shared/dynamic-form-inputs/default-form-inputs.d.ts +1 -1
- package/esm2022/catalog/catalog.module.mjs +7 -7
- package/esm2022/core/common/version.mjs +2 -2
- package/esm2022/core/shared/components/dropdown/dropdown-menu.component.mjs +59 -36
- package/esm2022/core/shared/components/zone-selector/zone-selector.component.mjs +14 -14
- package/esm2022/core/shared/shared.module.mjs +1 -1
- package/esm2022/marketing/marketing.module.mjs +2 -2
- package/esm2022/settings/components/channel-detail/channel-detail.component.mjs +29 -10
- package/fesm2022/vendure-admin-ui-catalog.mjs +6 -6
- package/fesm2022/vendure-admin-ui-catalog.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-core.mjs +72 -49
- package/fesm2022/vendure-admin-ui-core.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-marketing.mjs +1 -1
- package/fesm2022/vendure-admin-ui-marketing.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-settings.mjs +27 -8
- package/fesm2022/vendure-admin-ui-settings.mjs.map +1 -1
- package/marketing/components/promotion-list/promotion-list.component.d.ts +1 -1
- package/package.json +8 -8
- package/LICENSE +0 -9
|
@@ -7393,21 +7393,44 @@ class DropdownMenuComponent {
|
|
|
7393
7393
|
}
|
|
7394
7394
|
}
|
|
7395
7395
|
}
|
|
7396
|
-
constructor(overlay, viewContainerRef, dropdown, localizationService) {
|
|
7396
|
+
constructor(overlay, viewContainerRef, dropdown, localizationService, changeDetector) {
|
|
7397
7397
|
this.overlay = overlay;
|
|
7398
7398
|
this.viewContainerRef = viewContainerRef;
|
|
7399
7399
|
this.dropdown = dropdown;
|
|
7400
7400
|
this.localizationService = localizationService;
|
|
7401
|
+
this.changeDetector = changeDetector;
|
|
7401
7402
|
this.position = 'bottom-left';
|
|
7403
|
+
this.resizeObserver = new ResizeObserver(entries => {
|
|
7404
|
+
const margin = 12;
|
|
7405
|
+
for (const entry of entries) {
|
|
7406
|
+
const contentWrapper = entry.target.querySelector('.dropdown-content-wrapper');
|
|
7407
|
+
if (contentWrapper) {
|
|
7408
|
+
const { bottom, top } = contentWrapper?.getBoundingClientRect();
|
|
7409
|
+
if (bottom > window.innerHeight - margin) {
|
|
7410
|
+
// dropdown is going off the bottom of the screen
|
|
7411
|
+
this.maxHeight = window.innerHeight - top - margin;
|
|
7412
|
+
this.changeDetector.markForCheck();
|
|
7413
|
+
}
|
|
7414
|
+
if (top < margin) {
|
|
7415
|
+
// dropdown is going off the top of the screen
|
|
7416
|
+
this.maxHeight = bottom - margin;
|
|
7417
|
+
this.changeDetector.markForCheck();
|
|
7418
|
+
}
|
|
7419
|
+
}
|
|
7420
|
+
}
|
|
7421
|
+
});
|
|
7402
7422
|
}
|
|
7403
7423
|
ngOnInit() {
|
|
7404
7424
|
this.direction$ = this.localizationService.direction$;
|
|
7405
7425
|
this.dropdown.onOpenChange(isOpen => {
|
|
7406
7426
|
if (isOpen) {
|
|
7407
7427
|
this.overlayRef.attach(this.menuPortal);
|
|
7428
|
+
this.resizeObserver.observe(this.overlayRef.overlayElement);
|
|
7408
7429
|
}
|
|
7409
7430
|
else {
|
|
7410
7431
|
this.overlayRef.detach();
|
|
7432
|
+
this.resizeObserver.unobserve(this.overlayRef.overlayElement);
|
|
7433
|
+
this.maxHeight = undefined;
|
|
7411
7434
|
}
|
|
7412
7435
|
});
|
|
7413
7436
|
}
|
|
@@ -7473,45 +7496,45 @@ class DropdownMenuComponent {
|
|
|
7473
7496
|
inverted.overlayY = pos.overlayY === 'top' ? 'bottom' : 'top';
|
|
7474
7497
|
return inverted;
|
|
7475
7498
|
}
|
|
7476
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: DropdownMenuComponent, deps: [{ token: i1$3.Overlay }, { token: i0.ViewContainerRef }, { token: DropdownComponent }, { token: LocalizationService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7477
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.4", type: DropdownMenuComponent, selector: "vdr-dropdown-menu", inputs: { position: ["vdrPosition", "position"], customClasses: "customClasses" }, host: { listeners: { "window:keydown.escape": "onEscapeKeydown($event)", "window:keydown": "onArrowKey($event)" } }, viewQueries: [{ propertyName: "menuTemplate", first: true, predicate: ["menu"], descendants: true, static: true }], ngImport: i0, template: `
|
|
7478
|
-
<ng-template #menu>
|
|
7479
|
-
<div [dir]="direction$ | async">
|
|
7480
|
-
<div class="dropdown open">
|
|
7481
|
-
<div class="dropdown-menu" [ngClass]="customClasses">
|
|
7482
|
-
<div
|
|
7483
|
-
class="dropdown-content-wrapper"
|
|
7484
|
-
[cdkTrapFocus]="true"
|
|
7485
|
-
[cdkTrapFocusAutoCapture]="true"
|
|
7486
|
-
>
|
|
7487
|
-
<ng-content></ng-content>
|
|
7488
|
-
</div>
|
|
7489
|
-
</div>
|
|
7490
|
-
</div>
|
|
7491
|
-
</div>
|
|
7492
|
-
</ng-template>
|
|
7499
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: DropdownMenuComponent, deps: [{ token: i1$3.Overlay }, { token: i0.ViewContainerRef }, { token: DropdownComponent }, { token: LocalizationService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7500
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.4", type: DropdownMenuComponent, selector: "vdr-dropdown-menu", inputs: { position: ["vdrPosition", "position"], customClasses: "customClasses" }, host: { listeners: { "window:keydown.escape": "onEscapeKeydown($event)", "window:keydown": "onArrowKey($event)" } }, viewQueries: [{ propertyName: "menuTemplate", first: true, predicate: ["menu"], descendants: true, static: true }], ngImport: i0, template: `
|
|
7501
|
+
<ng-template #menu>
|
|
7502
|
+
<div [dir]="direction$ | async">
|
|
7503
|
+
<div class="dropdown open">
|
|
7504
|
+
<div class="dropdown-menu" [ngClass]="customClasses" [style.maxHeight.px]="maxHeight">
|
|
7505
|
+
<div
|
|
7506
|
+
class="dropdown-content-wrapper"
|
|
7507
|
+
[cdkTrapFocus]="true"
|
|
7508
|
+
[cdkTrapFocusAutoCapture]="true"
|
|
7509
|
+
>
|
|
7510
|
+
<ng-content></ng-content>
|
|
7511
|
+
</div>
|
|
7512
|
+
</div>
|
|
7513
|
+
</div>
|
|
7514
|
+
</div>
|
|
7515
|
+
</ng-template>
|
|
7493
7516
|
`, isInline: true, styles: [".clear-backdrop{background-color:#ff69b4}::ng-deep .dropdown-menu{max-width:initial}::ng-deep .dropdown-menu .dropdown-item{display:flex;align-items:center;padding:3px 24px}::ng-deep .dropdown-menu .dropdown-item clr-icon{margin-inline-end:3px}::ng-deep .dropdown-menu .dropdown-item:focus{outline:var(--color-dropdown-item-focus-outline) solid 1px;outline-offset:1px 0}.dropdown.open>.dropdown-menu{position:relative;top:0;height:100%;overflow-y:auto}:host{opacity:1;transition:opacity .3s}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.Dir, selector: "[dir]", inputs: ["dir"], outputs: ["dirChange"], exportAs: ["dir"] }, { kind: "directive", type: i5.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
7494
7517
|
}
|
|
7495
7518
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.4", ngImport: i0, type: DropdownMenuComponent, decorators: [{
|
|
7496
7519
|
type: Component,
|
|
7497
|
-
args: [{ selector: 'vdr-dropdown-menu', template: `
|
|
7498
|
-
<ng-template #menu>
|
|
7499
|
-
<div [dir]="direction$ | async">
|
|
7500
|
-
<div class="dropdown open">
|
|
7501
|
-
<div class="dropdown-menu" [ngClass]="customClasses">
|
|
7502
|
-
<div
|
|
7503
|
-
class="dropdown-content-wrapper"
|
|
7504
|
-
[cdkTrapFocus]="true"
|
|
7505
|
-
[cdkTrapFocusAutoCapture]="true"
|
|
7506
|
-
>
|
|
7507
|
-
<ng-content></ng-content>
|
|
7508
|
-
</div>
|
|
7509
|
-
</div>
|
|
7510
|
-
</div>
|
|
7511
|
-
</div>
|
|
7512
|
-
</ng-template>
|
|
7520
|
+
args: [{ selector: 'vdr-dropdown-menu', template: `
|
|
7521
|
+
<ng-template #menu>
|
|
7522
|
+
<div [dir]="direction$ | async">
|
|
7523
|
+
<div class="dropdown open">
|
|
7524
|
+
<div class="dropdown-menu" [ngClass]="customClasses" [style.maxHeight.px]="maxHeight">
|
|
7525
|
+
<div
|
|
7526
|
+
class="dropdown-content-wrapper"
|
|
7527
|
+
[cdkTrapFocus]="true"
|
|
7528
|
+
[cdkTrapFocusAutoCapture]="true"
|
|
7529
|
+
>
|
|
7530
|
+
<ng-content></ng-content>
|
|
7531
|
+
</div>
|
|
7532
|
+
</div>
|
|
7533
|
+
</div>
|
|
7534
|
+
</div>
|
|
7535
|
+
</ng-template>
|
|
7513
7536
|
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".clear-backdrop{background-color:#ff69b4}::ng-deep .dropdown-menu{max-width:initial}::ng-deep .dropdown-menu .dropdown-item{display:flex;align-items:center;padding:3px 24px}::ng-deep .dropdown-menu .dropdown-item clr-icon{margin-inline-end:3px}::ng-deep .dropdown-menu .dropdown-item:focus{outline:var(--color-dropdown-item-focus-outline) solid 1px;outline-offset:1px 0}.dropdown.open>.dropdown-menu{position:relative;top:0;height:100%;overflow-y:auto}:host{opacity:1;transition:opacity .3s}\n"] }]
|
|
7514
|
-
}], ctorParameters: () => [{ type: i1$3.Overlay }, { type: i0.ViewContainerRef }, { type: DropdownComponent }, { type: LocalizationService }], propDecorators: { position: [{
|
|
7537
|
+
}], ctorParameters: () => [{ type: i1$3.Overlay }, { type: i0.ViewContainerRef }, { type: DropdownComponent }, { type: LocalizationService }, { type: i0.ChangeDetectorRef }], propDecorators: { position: [{
|
|
7515
7538
|
type: Input,
|
|
7516
7539
|
args: ['vdrPosition']
|
|
7517
7540
|
}], customClasses: [{
|
|
@@ -7603,7 +7626,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.4", ngImpor
|
|
|
7603
7626
|
}], ctorParameters: () => [{ type: AlertsService }] });
|
|
7604
7627
|
|
|
7605
7628
|
// Auto-generated by the set-version.js script.
|
|
7606
|
-
const ADMIN_UI_VERSION = '2.2.
|
|
7629
|
+
const ADMIN_UI_VERSION = '2.2.5';
|
|
7607
7630
|
|
|
7608
7631
|
/* eslint-disable @angular-eslint/directive-selector */
|
|
7609
7632
|
class FormFieldControlDirective {
|
|
@@ -18964,18 +18987,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.4", ngImpor
|
|
|
18964
18987
|
}]
|
|
18965
18988
|
}], ctorParameters: () => [{ type: I18nService }] });
|
|
18966
18989
|
|
|
18967
|
-
const GET_ZONE_SELECTOR_LIST = gql `
|
|
18968
|
-
query GetZoneSelectorList($options: ZoneListOptions) {
|
|
18969
|
-
zones(options: $options) {
|
|
18970
|
-
items {
|
|
18971
|
-
id
|
|
18972
|
-
createdAt
|
|
18973
|
-
updatedAt
|
|
18974
|
-
name
|
|
18975
|
-
}
|
|
18976
|
-
totalItems
|
|
18977
|
-
}
|
|
18978
|
-
}
|
|
18990
|
+
const GET_ZONE_SELECTOR_LIST = gql `
|
|
18991
|
+
query GetZoneSelectorList($options: ZoneListOptions) {
|
|
18992
|
+
zones(options: $options) {
|
|
18993
|
+
items {
|
|
18994
|
+
id
|
|
18995
|
+
createdAt
|
|
18996
|
+
updatedAt
|
|
18997
|
+
name
|
|
18998
|
+
}
|
|
18999
|
+
totalItems
|
|
19000
|
+
}
|
|
19001
|
+
}
|
|
18979
19002
|
`;
|
|
18980
19003
|
/**
|
|
18981
19004
|
* @description
|
|
@@ -18993,7 +19016,7 @@ class ZoneSelectorComponent {
|
|
|
18993
19016
|
this.selectedId$ = new Subject();
|
|
18994
19017
|
this.disabled = false;
|
|
18995
19018
|
this.zones$ = this.dataService
|
|
18996
|
-
.query(GetZoneSelectorListDocument, { options: { take: 999 } }
|
|
19019
|
+
.query(GetZoneSelectorListDocument, { options: { take: 999 } })
|
|
18997
19020
|
.mapSingle(result => result.zones.items);
|
|
18998
19021
|
}
|
|
18999
19022
|
onChange(selected) {
|