@vendure/admin-ui 3.0.6 → 3.0.7
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/shared/components/data-table-filter-presets/data-table-filter-presets.component.d.ts +1 -0
- package/esm2022/catalog/components/product-variant-quick-jump/product-variant-quick-jump.component.mjs +12 -12
- package/esm2022/core/common/version.mjs +2 -2
- package/esm2022/core/shared/components/data-table-filter-presets/data-table-filter-presets.component.mjs +23 -3
- package/esm2022/core/shared/components/product-variant-selector/product-variant-selector.component.mjs +1 -1
- package/esm2022/order/order.routes.mjs +1 -1
- package/fesm2022/vendure-admin-ui-catalog.mjs +11 -11
- package/fesm2022/vendure-admin-ui-catalog.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-core.mjs +23 -3
- package/fesm2022/vendure-admin-ui-core.mjs.map +1 -1
- package/fesm2022/vendure-admin-ui-order.mjs.map +1 -1
- package/package.json +13 -13
|
@@ -7742,7 +7742,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
7742
7742
|
}], ctorParameters: () => [{ type: AlertsService }] });
|
|
7743
7743
|
|
|
7744
7744
|
// Auto-generated by the set-version.js script.
|
|
7745
|
-
const ADMIN_UI_VERSION = '3.0.
|
|
7745
|
+
const ADMIN_UI_VERSION = '3.0.7';
|
|
7746
7746
|
|
|
7747
7747
|
/* eslint-disable @angular-eslint/directive-selector */
|
|
7748
7748
|
class FormFieldControlDirective {
|
|
@@ -17782,6 +17782,26 @@ class DataTableFilterPresetsComponent {
|
|
|
17782
17782
|
});
|
|
17783
17783
|
this.serializedActiveFilters = this.filters.serialize();
|
|
17784
17784
|
this.filterPresets$ = this.filterPresetService.presetChanges$.pipe(startWith(this.filterPresetService.getFilterPresets(this.dataTableId)));
|
|
17785
|
+
// When any query param changes, we want to trigger change detection
|
|
17786
|
+
// so that the links for each preset are updated.
|
|
17787
|
+
this.route.queryParamMap
|
|
17788
|
+
.pipe(takeUntil(this.destroy$))
|
|
17789
|
+
.subscribe(() => this.changeDetectorRef.markForCheck());
|
|
17790
|
+
}
|
|
17791
|
+
getQueryParamsForPreset(preset, serializedActiveFilters) {
|
|
17792
|
+
// Clone the current query params to avoid mutating them directly
|
|
17793
|
+
const currentParams = { ...this.route.snapshot.queryParams };
|
|
17794
|
+
if (preset === serializedActiveFilters) {
|
|
17795
|
+
// Toggling off: remove 'filters' and 'page' params
|
|
17796
|
+
delete currentParams['filters'];
|
|
17797
|
+
delete currentParams['page'];
|
|
17798
|
+
}
|
|
17799
|
+
else {
|
|
17800
|
+
// Toggling on: set 'filters' and 'page' params
|
|
17801
|
+
currentParams['filters'] = preset;
|
|
17802
|
+
currentParams['page'] = 1;
|
|
17803
|
+
}
|
|
17804
|
+
return currentParams;
|
|
17785
17805
|
}
|
|
17786
17806
|
ngOnDestroy() {
|
|
17787
17807
|
this.destroy$.next();
|
|
@@ -17816,11 +17836,11 @@ class DataTableFilterPresetsComponent {
|
|
|
17816
17836
|
this.filterPresetService.reorderPresets(this.dataTableId, event.previousIndex, event.currentIndex);
|
|
17817
17837
|
}
|
|
17818
17838
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DataTableFilterPresetsComponent, deps: [{ token: i1$1.ActivatedRoute }, { token: FilterPresetService }, { token: ModalService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
17819
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: DataTableFilterPresetsComponent, selector: "vdr-data-table-filter-presets", inputs: { dataTableId: "dataTableId", filters: "filters" }, ngImport: i0, template: "<ng-container *ngIf=\"filterPresets$ | async as filterPresets\">\r\n <div\r\n class=\"preset-tabs\"\r\n *ngIf=\"filters && filterPresets.length\"\r\n cdkDropList\r\n cdkDropListOrientation=\"horizontal\"\r\n (cdkDropListDropped)=\"drop($event)\"\r\n >\r\n <div\r\n *ngFor=\"let preset of filterPresets\"\r\n class=\"preset-tab\"\r\n [class.active]=\"preset.value === serializedActiveFilters\"\r\n cdkDrag\r\n cdkDragBoundary=\".preset-tabs\"\r\n cdkDragLockAxis=\"x\"\r\n >\r\n <div class=\"drag-handle\" cdkDragHandle>\r\n <clr-icon shape=\"drag-handle\"></clr-icon>\r\n </div>\r\n <a\r\n [routerLink]=\"['./']\"\r\n [queryParams]=\"preset.value
|
|
17839
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: DataTableFilterPresetsComponent, selector: "vdr-data-table-filter-presets", inputs: { dataTableId: "dataTableId", filters: "filters" }, ngImport: i0, template: "<ng-container *ngIf=\"filterPresets$ | async as filterPresets\">\r\n <div\r\n class=\"preset-tabs\"\r\n *ngIf=\"filters && filterPresets.length\"\r\n cdkDropList\r\n cdkDropListOrientation=\"horizontal\"\r\n (cdkDropListDropped)=\"drop($event)\"\r\n >\r\n <div\r\n *ngFor=\"let preset of filterPresets\"\r\n class=\"preset-tab\"\r\n [class.active]=\"preset.value === serializedActiveFilters\"\r\n cdkDrag\r\n cdkDragBoundary=\".preset-tabs\"\r\n cdkDragLockAxis=\"x\"\r\n >\r\n <div class=\"drag-handle\" cdkDragHandle>\r\n <clr-icon shape=\"drag-handle\"></clr-icon>\r\n </div>\r\n <a\r\n [routerLink]=\"['./']\"\r\n [queryParams]=\"getQueryParamsForPreset(preset.value, serializedActiveFilters)\"\r\n >\r\n <div>{{ preset.name }}</div>\r\n </a>\r\n <vdr-dropdown>\r\n <button class=\"icon-button\" vdrDropdownTrigger>\r\n <clr-icon shape=\"ellipsis-vertical\" size=\"12\"/>\r\n </button>\r\n <vdr-dropdown-menu vdrPosition=\"bottom-left\">\r\n <button vdrDropdownItem (click)=\"renameFilterPreset(preset.name)\">\r\n <clr-icon shape=\"edit\"></clr-icon>\r\n {{ 'common.rename-filter-preset' | translate }}\r\n </button>\r\n <button vdrDropdownItem (click)=\"deleteFilterPreset(preset.name)\">\r\n <clr-icon shape=\"trash\" class=\"is-danger\"></clr-icon>\r\n {{ 'common.delete' | translate }}\r\n </button>\r\n </vdr-dropdown-menu>\r\n </vdr-dropdown>\r\n </div>\r\n </div>\r\n</ng-container>\r\n", styles: [".preset-tabs{padding-inline-start:var(--surface-margin-left);margin:var(--space-unit) 0;gap:calc(var(--space-unit) * .5);display:flex;overflow-x:auto;overflow-y:hidden}.preset-tab{display:flex;align-items:center;gap:calc(var(--space-unit) * .5);font-size:var(--font-size-sm);white-space:nowrap;text-transform:none;padding:0 calc(var(--space-unit) * 1);border:1px solid var(--color-weight-300);border-radius:var(--border-radius-lg);cursor:pointer}.preset-tab>a{padding-inline-end:0;color:var(--color-weight-600)}.preset-tab.active{border-color:var(--color-primary-700);background-color:var(--color-primary-700);color:var(--color-primary-100)}.preset-tab.active>a{color:var(--color-primary-100)}.preset-tab.active button.icon-button{color:var(--color-primary-100)}.preset-tab-link{display:flex;align-items:center;gap:calc(var(--space-unit) * .5)}.drag-handle{cursor:move}.cdk-drag-preview{box-sizing:border-box;opacity:.8;background:var(--color-weight-100);box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.preset-tabs.cdk-drop-list-dragging .preset-tab:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}\n"], dependencies: [{ kind: "directive", type: i1$2.ClrIconCustomTag, selector: "clr-icon" }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i4$1.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i4$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i4$1.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "component", type: DropdownComponent, selector: "vdr-dropdown", inputs: ["manualToggle"] }, { kind: "component", type: DropdownMenuComponent, selector: "vdr-dropdown-menu", inputs: ["vdrPosition", "customClasses"] }, { kind: "directive", type: DropdownTriggerDirective, selector: "[vdrDropdownTrigger]" }, { kind: "directive", type: DropdownItemDirective, selector: "[vdrDropdownItem]" }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
17820
17840
|
}
|
|
17821
17841
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DataTableFilterPresetsComponent, decorators: [{
|
|
17822
17842
|
type: Component,
|
|
17823
|
-
args: [{ selector: 'vdr-data-table-filter-presets', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"filterPresets$ | async as filterPresets\">\r\n <div\r\n class=\"preset-tabs\"\r\n *ngIf=\"filters && filterPresets.length\"\r\n cdkDropList\r\n cdkDropListOrientation=\"horizontal\"\r\n (cdkDropListDropped)=\"drop($event)\"\r\n >\r\n <div\r\n *ngFor=\"let preset of filterPresets\"\r\n class=\"preset-tab\"\r\n [class.active]=\"preset.value === serializedActiveFilters\"\r\n cdkDrag\r\n cdkDragBoundary=\".preset-tabs\"\r\n cdkDragLockAxis=\"x\"\r\n >\r\n <div class=\"drag-handle\" cdkDragHandle>\r\n <clr-icon shape=\"drag-handle\"></clr-icon>\r\n </div>\r\n <a\r\n [routerLink]=\"['./']\"\r\n [queryParams]=\"preset.value
|
|
17843
|
+
args: [{ selector: 'vdr-data-table-filter-presets', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"filterPresets$ | async as filterPresets\">\r\n <div\r\n class=\"preset-tabs\"\r\n *ngIf=\"filters && filterPresets.length\"\r\n cdkDropList\r\n cdkDropListOrientation=\"horizontal\"\r\n (cdkDropListDropped)=\"drop($event)\"\r\n >\r\n <div\r\n *ngFor=\"let preset of filterPresets\"\r\n class=\"preset-tab\"\r\n [class.active]=\"preset.value === serializedActiveFilters\"\r\n cdkDrag\r\n cdkDragBoundary=\".preset-tabs\"\r\n cdkDragLockAxis=\"x\"\r\n >\r\n <div class=\"drag-handle\" cdkDragHandle>\r\n <clr-icon shape=\"drag-handle\"></clr-icon>\r\n </div>\r\n <a\r\n [routerLink]=\"['./']\"\r\n [queryParams]=\"getQueryParamsForPreset(preset.value, serializedActiveFilters)\"\r\n >\r\n <div>{{ preset.name }}</div>\r\n </a>\r\n <vdr-dropdown>\r\n <button class=\"icon-button\" vdrDropdownTrigger>\r\n <clr-icon shape=\"ellipsis-vertical\" size=\"12\"/>\r\n </button>\r\n <vdr-dropdown-menu vdrPosition=\"bottom-left\">\r\n <button vdrDropdownItem (click)=\"renameFilterPreset(preset.name)\">\r\n <clr-icon shape=\"edit\"></clr-icon>\r\n {{ 'common.rename-filter-preset' | translate }}\r\n </button>\r\n <button vdrDropdownItem (click)=\"deleteFilterPreset(preset.name)\">\r\n <clr-icon shape=\"trash\" class=\"is-danger\"></clr-icon>\r\n {{ 'common.delete' | translate }}\r\n </button>\r\n </vdr-dropdown-menu>\r\n </vdr-dropdown>\r\n </div>\r\n </div>\r\n</ng-container>\r\n", styles: [".preset-tabs{padding-inline-start:var(--surface-margin-left);margin:var(--space-unit) 0;gap:calc(var(--space-unit) * .5);display:flex;overflow-x:auto;overflow-y:hidden}.preset-tab{display:flex;align-items:center;gap:calc(var(--space-unit) * .5);font-size:var(--font-size-sm);white-space:nowrap;text-transform:none;padding:0 calc(var(--space-unit) * 1);border:1px solid var(--color-weight-300);border-radius:var(--border-radius-lg);cursor:pointer}.preset-tab>a{padding-inline-end:0;color:var(--color-weight-600)}.preset-tab.active{border-color:var(--color-primary-700);background-color:var(--color-primary-700);color:var(--color-primary-100)}.preset-tab.active>a{color:var(--color-primary-100)}.preset-tab.active button.icon-button{color:var(--color-primary-100)}.preset-tab-link{display:flex;align-items:center;gap:calc(var(--space-unit) * .5)}.drag-handle{cursor:move}.cdk-drag-preview{box-sizing:border-box;opacity:.8;background:var(--color-weight-100);box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.preset-tabs.cdk-drop-list-dragging .preset-tab:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}\n"] }]
|
|
17824
17844
|
}], ctorParameters: () => [{ type: i1$1.ActivatedRoute }, { type: FilterPresetService }, { type: ModalService }, { type: i0.ChangeDetectorRef }], propDecorators: { dataTableId: [{
|
|
17825
17845
|
type: Input,
|
|
17826
17846
|
args: [{ required: true }]
|