Sfoglia il codice sorgente

chore: Clean up issues after merge

Michael Bromley 3 anni fa
parent
commit
eeb4839f71
30 ha cambiato i file con 3085 aggiunte e 3025 eliminazioni
  1. 8 6
      packages/admin-ui/src/lib/catalog/src/components/assign-to-channel-dialog/assign-to-channel-dialog.component.ts
  2. 6 6
      packages/admin-ui/src/lib/catalog/src/components/collection-list/collection-list-bulk-actions.ts
  3. 16 10
      packages/admin-ui/src/lib/catalog/src/components/facet-list/facet-list-bulk-actions.ts
  4. 2 2
      packages/admin-ui/src/lib/catalog/src/components/facet-list/facet-list.component.ts
  5. 1 1
      packages/admin-ui/src/lib/catalog/src/components/product-detail/product-detail.component.ts
  6. 16 7
      packages/admin-ui/src/lib/catalog/src/components/product-list/product-list-bulk-actions.ts
  7. 1 1
      packages/admin-ui/src/lib/catalog/src/components/product-list/product-list.component.ts
  8. 6 0
      packages/admin-ui/src/lib/catalog/src/public_api.ts
  9. 296 293
      packages/admin-ui/src/lib/core/src/common/generated-types.ts
  10. 38 38
      packages/admin-ui/src/lib/core/src/common/introspection-result.ts
  11. 12 14
      packages/admin-ui/src/lib/core/src/common/utilities/bulk-action-utils.ts
  12. 4 1
      packages/admin-ui/src/lib/core/src/data/providers/collection-data.service.ts
  13. 2 1
      packages/admin-ui/src/lib/core/src/providers/bulk-action-registry/bulk-action-registry.service.ts
  14. 4 1
      packages/admin-ui/src/lib/core/src/providers/bulk-action-registry/register-bulk-action.ts
  15. 1 0
      packages/admin-ui/src/lib/core/src/public_api.ts
  16. 3 1
      packages/admin-ui/src/lib/core/src/shared/components/asset-gallery/asset-gallery.component.ts
  17. 296 292
      packages/asset-server-plugin/e2e/graphql/generated-e2e-asset-server-plugin-types.ts
  18. 287 287
      packages/common/src/generated-shop-types.ts
  19. 296 292
      packages/common/src/generated-types.ts
  20. 20 18
      packages/core/e2e/collection.e2e-spec.ts
  21. 296 292
      packages/core/e2e/graphql/generated-e2e-admin-types.ts
  22. 291 291
      packages/core/e2e/graphql/generated-e2e-shop-types.ts
  23. 12 8
      packages/core/src/common/error/generated-graphql-admin-errors.ts
  24. 1 1
      packages/core/src/service/services/facet.service.ts
  25. 296 292
      packages/elasticsearch-plugin/e2e/graphql/generated-e2e-elasticsearch-plugin-types.ts
  26. 296 292
      packages/payments-plugin/e2e/graphql/generated-admin-types.ts
  27. 291 291
      packages/payments-plugin/e2e/graphql/generated-shop-types.ts
  28. 287 287
      packages/payments-plugin/src/mollie/graphql/generated-shop-types.ts
  29. 0 0
      schema-admin.json
  30. 0 0
      schema-shop.json

+ 8 - 6
packages/admin-ui/src/lib/catalog/src/components/assign-to-channel-dialog/assign-to-channel-dialog.component.ts

@@ -1,19 +1,21 @@
 import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';
 import { FormControl } from '@angular/forms';
-import { DataService, Dialog, GetChannels, NotificationService } from '@vendure/admin-ui/core';
+import { DataService, Dialog, GetChannelsQuery, ItemOf, NotificationService } from '@vendure/admin-ui/core';
 import { combineLatest } from 'rxjs';
 
+type Channel = GetChannelsQuery['channels'][number];
+
 @Component({
     selector: 'vdr-assign-to-channel-dialog',
     templateUrl: './assign-to-channel-dialog.component.html',
     styleUrls: ['./assign-to-channel-dialog.component.scss'],
     changeDetection: ChangeDetectionStrategy.OnPush,
 })
-export class AssignToChannelDialogComponent implements OnInit, Dialog<GetChannels.Channels> {
-    selectedChannel: GetChannels.Channels | null | undefined;
-    currentChannel: GetChannels.Channels;
-    availableChannels: GetChannels.Channels[];
-    resolveWith: (result?: GetChannels.Channels) => void;
+export class AssignToChannelDialogComponent implements OnInit, Dialog<Channel> {
+    selectedChannel: Channel | null | undefined;
+    currentChannel: Channel;
+    availableChannels: Channel[];
+    resolveWith: (result?: Channel) => void;
     selectedChannelIdControl = new FormControl();
 
     // assigned by ModalService.fromComponent() call

+ 6 - 6
packages/admin-ui/src/lib/catalog/src/components/collection-list/collection-list-bulk-actions.ts

@@ -1,9 +1,11 @@
 import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
-import { CollectionListComponent, CollectionPartial } from '@vendure/admin-ui/catalog';
 import {
     BulkAction,
+    currentChannelIsNotDefault,
     DataService,
     DeletionResult,
+    getChannelCodeFromUserStatus,
+    isMultiChannel,
     ModalService,
     NotificationService,
     Permission,
@@ -12,12 +14,10 @@ import { unique } from '@vendure/common/lib/unique';
 import { EMPTY, from, of } from 'rxjs';
 import { mapTo, switchMap } from 'rxjs/operators';
 
-import {
-    currentChannelIsNotDefault,
-    getChannelCodeFromUserStatus,
-    isMultiChannel,
-} from '../../../../core/src/common/utilities/bulk-action-utils';
 import { AssignToChannelDialogComponent } from '../assign-to-channel-dialog/assign-to-channel-dialog.component';
+import { CollectionPartial } from '../collection-tree/collection-tree.types';
+
+import { CollectionListComponent } from './collection-list.component';
 
 export const deleteCollectionsBulkAction: BulkAction<CollectionPartial, CollectionListComponent> = {
     location: 'collection-list',

+ 16 - 10
packages/admin-ui/src/lib/catalog/src/components/facet-list/facet-list-bulk-actions.ts

@@ -1,10 +1,13 @@
 import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
-import { FacetListComponent } from '@vendure/admin-ui/catalog';
 import {
     BulkAction,
+    currentChannelIsNotDefault,
     DataService,
     DeletionResult,
-    GetFacetList,
+    getChannelCodeFromUserStatus,
+    GetFacetListQuery,
+    isMultiChannel,
+    ItemOf,
     ModalService,
     NotificationService,
     Permission,
@@ -13,14 +16,11 @@ import { unique } from '@vendure/common/lib/unique';
 import { EMPTY, of } from 'rxjs';
 import { map, mapTo, switchMap } from 'rxjs/operators';
 
-import {
-    currentChannelIsNotDefault,
-    getChannelCodeFromUserStatus,
-    isMultiChannel,
-} from '../../../../core/src/common/utilities/bulk-action-utils';
 import { AssignToChannelDialogComponent } from '../assign-to-channel-dialog/assign-to-channel-dialog.component';
 
-export const deleteFacetsBulkAction: BulkAction<GetFacetList.Items, FacetListComponent> = {
+import { FacetListComponent } from './facet-list.component';
+
+export const deleteFacetsBulkAction: BulkAction<ItemOf<GetFacetListQuery, 'facets'>, FacetListComponent> = {
     location: 'facet-list',
     label: _('common.delete'),
     icon: 'trash',
@@ -104,7 +104,10 @@ export const deleteFacetsBulkAction: BulkAction<GetFacetList.Items, FacetListCom
     },
 };
 
-export const assignFacetsToChannelBulkAction: BulkAction<GetFacetList.Items, FacetListComponent> = {
+export const assignFacetsToChannelBulkAction: BulkAction<
+    ItemOf<GetFacetListQuery, 'facets'>,
+    FacetListComponent
+> = {
     location: 'facet-list',
     label: _('catalog.assign-to-channel'),
     icon: 'layers',
@@ -145,7 +148,10 @@ export const assignFacetsToChannelBulkAction: BulkAction<GetFacetList.Items, Fac
     },
 };
 
-export const removeFacetsFromChannelBulkAction: BulkAction<GetFacetList.Items, FacetListComponent> = {
+export const removeFacetsFromChannelBulkAction: BulkAction<
+    ItemOf<GetFacetListQuery, 'facets'>,
+    FacetListComponent
+> = {
     location: 'facet-list',
     label: _('catalog.remove-from-channel'),
     getTranslationVars: ({ injector }) => getChannelCodeFromUserStatus(injector.get(DataService)),

+ 2 - 2
packages/admin-ui/src/lib/catalog/src/components/facet-list/facet-list.component.ts

@@ -32,7 +32,7 @@ export class FacetListComponent
     contentLanguage$: Observable<LanguageCode>;
     readonly initialLimit = 3;
     displayLimit: { [id: string]: number } = {};
-    selectionManager: SelectionManager<GetFacetList.Items>;
+    selectionManager: SelectionManager<ItemOf<GetFacetListQuery, 'facets'>>;
 
     constructor(
         private dataService: DataService,
@@ -61,7 +61,7 @@ export class FacetListComponent
                 },
             }),
         );
-        this.selectionManager = new SelectionManager<GetFacetList.Items>({
+        this.selectionManager = new SelectionManager({
             multiSelect: true,
             itemsAreEqual: (a, b) => a.id === b.id,
             additiveMode: true,

+ 1 - 1
packages/admin-ui/src/lib/catalog/src/components/product-detail/product-detail.component.ts

@@ -12,6 +12,7 @@ import {
     FacetWithValuesFragment,
     findTranslation,
     flattenFacetValues,
+    getChannelCodeFromUserStatus,
     GetProductWithVariantsQuery,
     LanguageCode,
     LogicalOperator,
@@ -49,7 +50,6 @@ import {
     tap,
     withLatestFrom,
 } from 'rxjs/operators';
-import { getChannelCodeFromUserStatus } from '../../../../core/src/common/utilities/bulk-action-utils';
 
 import { ProductDetailService } from '../../providers/product-detail/product-detail.service';
 import { ApplyFacetDialogComponent } from '../apply-facet-dialog/apply-facet-dialog.component';

+ 16 - 7
packages/admin-ui/src/lib/catalog/src/components/product-list/product-list-bulk-actions.ts

@@ -1,16 +1,25 @@
 import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
-import { BulkAction, DataService, DeletionResult, ModalService, NotificationService, Permission, SearchProducts, } from '@vendure/admin-ui/core';
+import {
+    BulkAction,
+    currentChannelIsNotDefault,
+    DataService,
+    DeletionResult,
+    getChannelCodeFromUserStatus,
+    isMultiChannel,
+    ModalService,
+    NotificationService,
+    Permission,
+} from '@vendure/admin-ui/core';
 import { unique } from '@vendure/common/lib/unique';
 import { EMPTY, from, of } from 'rxjs';
 import { mapTo, switchMap } from 'rxjs/operators';
 
-import { currentChannelIsNotDefault, getChannelCodeFromUserStatus, isMultiChannel, } from '../../../../core/src/common/utilities/bulk-action-utils';
 import { AssignProductsToChannelDialogComponent } from '../assign-products-to-channel-dialog/assign-products-to-channel-dialog.component';
 import { BulkAddFacetValuesDialogComponent } from '../bulk-add-facet-values-dialog/bulk-add-facet-values-dialog.component';
 
-import { ProductListComponent } from './product-list.component';
+import { ProductListComponent, SearchItem } from './product-list.component';
 
-export const deleteProductsBulkAction: BulkAction<SearchProducts.Items, ProductListComponent> = {
+export const deleteProductsBulkAction: BulkAction<SearchItem, ProductListComponent> = {
     location: 'product-list',
     label: _('common.delete'),
     icon: 'trash',
@@ -64,7 +73,7 @@ export const deleteProductsBulkAction: BulkAction<SearchProducts.Items, ProductL
     },
 };
 
-export const assignProductsToChannelBulkAction: BulkAction<SearchProducts.Items, ProductListComponent> = {
+export const assignProductsToChannelBulkAction: BulkAction<SearchItem, ProductListComponent> = {
     location: 'product-list',
     label: _('catalog.assign-to-channel'),
     icon: 'layers',
@@ -92,7 +101,7 @@ export const assignProductsToChannelBulkAction: BulkAction<SearchProducts.Items,
     },
 };
 
-export const removeProductsFromChannelBulkAction: BulkAction<SearchProducts.Items, ProductListComponent> = {
+export const removeProductsFromChannelBulkAction: BulkAction<SearchItem, ProductListComponent> = {
     location: 'product-list',
     label: _('catalog.remove-from-channel'),
     requiresPermission: userPermissions =>
@@ -156,7 +165,7 @@ export const removeProductsFromChannelBulkAction: BulkAction<SearchProducts.Item
     },
 };
 
-export const assignFacetValuesToProductsBulkAction: BulkAction<SearchProducts.Items, ProductListComponent> = {
+export const assignFacetValuesToProductsBulkAction: BulkAction<SearchItem, ProductListComponent> = {
     location: 'product-list',
     label: _('catalog.edit-facet-values'),
     icon: 'tag',

+ 1 - 1
packages/admin-ui/src/lib/catalog/src/components/product-list/product-list.component.ts

@@ -21,7 +21,7 @@ import {
 import { EMPTY, Observable } from 'rxjs';
 import { delay, map, switchMap, take, takeUntil, tap, withLatestFrom } from 'rxjs/operators';
 
-type SearchItem = ItemOf<SearchProductsQuery, 'search'>;
+export type SearchItem = ItemOf<SearchProductsQuery, 'search'>;
 
 @Component({
     selector: 'vdr-products-list',

+ 6 - 0
packages/admin-ui/src/lib/catalog/src/public_api.ts

@@ -6,8 +6,12 @@ export * from './components/asset-detail/asset-detail.component';
 export * from './components/asset-list/asset-list.component';
 export * from './components/assets/assets.component';
 export * from './components/assign-products-to-channel-dialog/assign-products-to-channel-dialog.component';
+export * from './components/assign-to-channel-dialog/assign-to-channel-dialog.component';
+export * from './components/bulk-add-facet-values-dialog/bulk-add-facet-values-dialog.component';
+export * from './components/bulk-add-facet-values-dialog/bulk-add-facet-values-dialog.graphql';
 export * from './components/collection-contents/collection-contents.component';
 export * from './components/collection-detail/collection-detail.component';
+export * from './components/collection-list/collection-list-bulk-actions';
 export * from './components/collection-list/collection-list.component';
 export * from './components/collection-tree/array-to-tree';
 export * from './components/collection-tree/collection-tree-node.component';
@@ -16,11 +20,13 @@ export * from './components/collection-tree/collection-tree.service';
 export * from './components/collection-tree/collection-tree.types';
 export * from './components/confirm-variant-deletion-dialog/confirm-variant-deletion-dialog.component';
 export * from './components/facet-detail/facet-detail.component';
+export * from './components/facet-list/facet-list-bulk-actions';
 export * from './components/facet-list/facet-list.component';
 export * from './components/generate-product-variants/generate-product-variants.component';
 export * from './components/option-value-input/option-value-input.component';
 export * from './components/product-detail/product-detail.component';
 export * from './components/product-detail/product-detail.types';
+export * from './components/product-list/product-list-bulk-actions';
 export * from './components/product-list/product-list.component';
 export * from './components/product-options-editor/product-options-editor.component';
 export * from './components/product-variants-editor/product-variants-editor.component';

File diff suppressed because it is too large
+ 296 - 293
packages/admin-ui/src/lib/core/src/common/generated-types.ts


+ 38 - 38
packages/admin-ui/src/lib/core/src/common/introspection-result.ts

@@ -8,33 +8,33 @@
       const result: PossibleTypesResultData = {
   "possibleTypes": {
     "AddFulfillmentToOrderResult": [
-      "Fulfillment",
+      "CreateFulfillmentError",
       "EmptyOrderLineSelectionError",
-      "ItemsAlreadyFulfilledError",
+      "Fulfillment",
+      "FulfillmentStateTransitionError",
       "InsufficientStockOnHandError",
       "InvalidFulfillmentHandlerError",
-      "FulfillmentStateTransitionError",
-      "CreateFulfillmentError"
+      "ItemsAlreadyFulfilledError"
     ],
     "AddManualPaymentToOrderResult": [
-      "Order",
-      "ManualPaymentStateError"
+      "ManualPaymentStateError",
+      "Order"
     ],
     "AuthenticationResult": [
       "CurrentUser",
       "InvalidCredentialsError"
     ],
     "CancelOrderResult": [
-      "Order",
+      "CancelActiveOrderError",
       "EmptyOrderLineSelectionError",
-      "QuantityTooGreatError",
       "MultipleOrderError",
-      "CancelActiveOrderError",
-      "OrderStateTransitionError"
+      "Order",
+      "OrderStateTransitionError",
+      "QuantityTooGreatError"
     ],
     "CancelPaymentResult": [
-      "Payment",
       "CancelPaymentError",
+      "Payment",
       "PaymentStateTransitionError"
     ],
     "CreateAssetResult": [
@@ -50,8 +50,8 @@
       "EmailAddressConflictError"
     ],
     "CreatePromotionResult": [
-      "Promotion",
-      "MissingConditionsError"
+      "MissingConditionsError",
+      "Promotion"
     ],
     "CustomField": [
       "BooleanCustomFieldConfig",
@@ -64,13 +64,13 @@
       "TextCustomFieldConfig"
     ],
     "CustomFieldConfig": [
-      "StringCustomFieldConfig",
-      "LocaleStringCustomFieldConfig",
-      "IntCustomFieldConfig",
-      "FloatCustomFieldConfig",
       "BooleanCustomFieldConfig",
       "DateTimeCustomFieldConfig",
+      "FloatCustomFieldConfig",
+      "IntCustomFieldConfig",
+      "LocaleStringCustomFieldConfig",
       "RelationCustomFieldConfig",
+      "StringCustomFieldConfig",
       "TextCustomFieldConfig"
     ],
     "ErrorResult": [
@@ -114,17 +114,17 @@
       "SettlePaymentError"
     ],
     "ModifyOrderResult": [
-      "Order",
+      "CouponCodeExpiredError",
+      "CouponCodeInvalidError",
+      "CouponCodeLimitError",
+      "InsufficientStockError",
+      "NegativeQuantityError",
       "NoChangesSpecifiedError",
+      "Order",
+      "OrderLimitError",
       "OrderModificationStateError",
       "PaymentMethodMissingError",
-      "RefundPaymentIdMissingError",
-      "OrderLimitError",
-      "NegativeQuantityError",
-      "InsufficientStockError",
-      "CouponCodeExpiredError",
-      "CouponCodeInvalidError",
-      "CouponCodeLimitError"
+      "RefundPaymentIdMissingError"
     ],
     "NativeAuthenticationResult": [
       "CurrentUser",
@@ -194,14 +194,14 @@
       "TaxRateList"
     ],
     "RefundOrderResult": [
-      "Refund",
-      "QuantityTooGreatError",
+      "AlreadyRefundedError",
+      "MultipleOrderError",
       "NothingToRefundError",
       "OrderStateTransitionError",
-      "MultipleOrderError",
       "PaymentOrderMismatchError",
+      "QuantityTooGreatError",
+      "Refund",
       "RefundOrderStateError",
-      "AlreadyRefundedError",
       "RefundStateTransitionError"
     ],
     "RemoveFacetFromChannelResult": [
@@ -217,10 +217,10 @@
       "SinglePrice"
     ],
     "SettlePaymentResult": [
+      "OrderStateTransitionError",
       "Payment",
-      "SettlePaymentError",
       "PaymentStateTransitionError",
-      "OrderStateTransitionError"
+      "SettlePaymentError"
     ],
     "SettleRefundResult": [
       "Refund",
@@ -235,12 +235,12 @@
       "StockAdjustment"
     ],
     "StockMovementItem": [
-      "StockAdjustment",
       "Allocation",
-      "Sale",
       "Cancellation",
+      "Release",
       "Return",
-      "Release"
+      "Sale",
+      "StockAdjustment"
     ],
     "TransitionFulfillmentToStateResult": [
       "Fulfillment",
@@ -263,12 +263,12 @@
       "EmailAddressConflictError"
     ],
     "UpdateGlobalSettingsResult": [
-      "GlobalSettings",
-      "ChannelDefaultLanguageError"
+      "ChannelDefaultLanguageError",
+      "GlobalSettings"
     ],
     "UpdatePromotionResult": [
-      "Promotion",
-      "MissingConditionsError"
+      "MissingConditionsError",
+      "Promotion"
     ]
   }
 };

+ 12 - 14
packages/admin-ui/src/lib/core/src/common/utilities/bulk-action-utils.ts

@@ -1,4 +1,5 @@
 import { DEFAULT_CHANNEL_CODE } from '@vendure/common/lib/shared-constants';
+import { lastValueFrom } from 'rxjs';
 
 import { DataService } from '../../data/providers/data.service';
 
@@ -8,15 +9,14 @@ import { DataService } from '../../data/providers/data.service';
  * is supplied, the code of the activeChannel.
  */
 export function getChannelCodeFromUserStatus(dataService: DataService, channelId?: string) {
-    return dataService.client
-        .userStatus()
-        .mapSingle(({ userStatus }) => {
+    return lastValueFrom(
+        dataService.client.userStatus().mapSingle(({ userStatus }) => {
             const channelCode =
                 userStatus.channels.find(c => c.id === (channelId ?? userStatus.activeChannelId))?.code ??
                 'undefined';
             return { channelCode };
-        })
-        .toPromise();
+        }),
+    );
 }
 
 /**
@@ -24,10 +24,9 @@ export function getChannelCodeFromUserStatus(dataService: DataService, channelId
  * Resolves to `true` if multiple Channels are set up.
  */
 export function isMultiChannel(dataService: DataService) {
-    return dataService.client
-        .userStatus()
-        .mapSingle(({ userStatus }) => 1 < userStatus.channels.length)
-        .toPromise();
+    return lastValueFrom(
+        dataService.client.userStatus().mapSingle(({ userStatus }) => 1 < userStatus.channels.length),
+    );
 }
 
 /**
@@ -35,14 +34,13 @@ export function isMultiChannel(dataService: DataService) {
  * Resolves to `true` if the current active Channel is not the default Channel.
  */
 export function currentChannelIsNotDefault(dataService: DataService) {
-    return dataService.client
-        .userStatus()
-        .mapSingle(({ userStatus }) => {
+    return lastValueFrom(
+        dataService.client.userStatus().mapSingle(({ userStatus }) => {
             if (userStatus.channels.length === 1) {
                 return false;
             }
             const defaultChannelId = userStatus.channels.find(c => c.code === DEFAULT_CHANNEL_CODE)?.id;
             return userStatus.activeChannelId !== defaultChannelId;
-        })
-        .toPromise();
+        }),
+    );
 }

+ 4 - 1
packages/admin-ui/src/lib/core/src/data/providers/collection-data.service.ts

@@ -113,7 +113,10 @@ export class CollectionDataService {
         });
     }
 
-    previewCollectionVariants(input: Codegen.PreviewCollectionVariantsInput, options: Codegen.ProductVariantListOptions) {
+    previewCollectionVariants(
+        input: Codegen.PreviewCollectionVariantsInput,
+        options: Codegen.ProductVariantListOptions,
+    ) {
         return this.baseDataService.query<
             Codegen.PreviewCollectionContentsQuery,
             Codegen.PreviewCollectionContentsQueryVariables

+ 2 - 1
packages/admin-ui/src/lib/core/src/providers/bulk-action-registry/bulk-action-registry.service.ts

@@ -1,5 +1,6 @@
 import { Injectable, Type } from '@angular/core';
-import { FormInputComponent } from '@vendure/admin-ui/core';
+
+import { FormInputComponent } from '../../common/component-registry-types';
 
 import { BulkAction, BulkActionLocationId } from './bulk-action-types';
 

+ 4 - 1
packages/admin-ui/src/lib/core/src/providers/bulk-action-registry/register-bulk-action.ts

@@ -1,5 +1,8 @@
 import { APP_INITIALIZER, FactoryProvider } from '@angular/core';
-import { BulkAction, BulkActionRegistryService } from '@vendure/admin-ui/core';
+
+import { BulkActionRegistryService } from '../../providers/bulk-action-registry/bulk-action-registry.service';
+
+import { BulkAction } from './bulk-action-types';
 
 /**
  * @description

+ 1 - 0
packages/admin-ui/src/lib/core/src/public_api.ts

@@ -12,6 +12,7 @@ export * from './common/generated-types';
 export * from './common/introspection-result-wrapper';
 export * from './common/introspection-result';
 export * from './common/single-search-selection-model';
+export * from './common/utilities/bulk-action-utils';
 export * from './common/utilities/configurable-operation-utils';
 export * from './common/utilities/create-updated-translatable';
 export * from './common/utilities/find-translation';

+ 3 - 1
packages/admin-ui/src/lib/core/src/shared/components/asset-gallery/asset-gallery.component.ts

@@ -1,7 +1,9 @@
 import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnChanges, Output, SimpleChanges } from '@angular/core';
-import { ModalService } from '../../../providers/modal/modal.service';
+
 import { SelectionManager } from '../../../common/utilities/selection-manager';
+import { ModalService } from '../../../providers/modal/modal.service';
 import { AssetPreviewDialogComponent } from '../asset-preview-dialog/asset-preview-dialog.component';
+
 import { AssetLike } from './asset-gallery.types';
 
 @Component({

File diff suppressed because it is too large
+ 296 - 292
packages/asset-server-plugin/e2e/graphql/generated-e2e-asset-server-plugin-types.ts


File diff suppressed because it is too large
+ 287 - 287
packages/common/src/generated-shop-types.ts


File diff suppressed because it is too large
+ 296 - 292
packages/common/src/generated-types.ts


+ 20 - 18
packages/core/e2e/collection.e2e-spec.ts

@@ -17,6 +17,7 @@ import { productIdCollectionFilter, variantIdCollectionFilter } from '../src/ind
 import { COLLECTION_FRAGMENT, FACET_VALUE_FRAGMENT } from './graphql/fragments';
 import * as Codegen from './graphql/generated-e2e-admin-types';
 import {
+    ChannelFragment,
     CollectionFragment,
     CurrencyCode,
     DeletionResult,
@@ -54,6 +55,7 @@ describe('Collection resolver', () => {
     let computersBreadcrumbsCollection: CollectionFragment;
     let pearBreadcrumbsCollection: CollectionFragment;
     const SECOND_CHANNEL_TOKEN = 'second_channel_token';
+    let secondChannel: ChannelFragment;
 
     beforeAll(async () => {
         await server.init({
@@ -78,20 +80,20 @@ describe('Collection resolver', () => {
             (values, facet) => [...values, ...facet.values],
             [] as FacetValueFragment[],
         );
-        const { createChannel } = await adminClient.query<Codegen.CreateChannelMutation, Codegen.CreateChannelMutationVariables>(
-            CREATE_CHANNEL,
-            {
-                input: {
-                    code: 'second-channel',
-                    token: SECOND_CHANNEL_TOKEN,
-                    defaultLanguageCode: LanguageCode.en,
-                    currencyCode: CurrencyCode.USD,
-                    pricesIncludeTax: true,
-                    defaultShippingZoneId: 'T_1',
-                    defaultTaxZoneId: 'T_1',
-                },
+        const { createChannel } = await adminClient.query<
+            Codegen.CreateChannelMutation,
+            Codegen.CreateChannelMutationVariables
+        >(CREATE_CHANNEL, {
+            input: {
+                code: 'second-channel',
+                token: SECOND_CHANNEL_TOKEN,
+                defaultLanguageCode: LanguageCode.en,
+                currencyCode: CurrencyCode.USD,
+                pricesIncludeTax: true,
+                defaultShippingZoneId: 'T_1',
+                defaultTaxZoneId: 'T_1',
             },
-        );
+        });
         secondChannel = createChannel;
     }, TEST_SETUP_TIMEOUT_MS);
 
@@ -2355,11 +2357,11 @@ describe('Collection resolver', () => {
                 Codegen.GetCollectionListQueryVariables
             >(GET_COLLECTION_LIST);
 
-            expect(before.items.map(pick(['id', 'name'])).sort(sortById)).toEqual([
-                { id: 'T_28', name: 'top' },
-                { id: 'T_29', name: 'child' },
-                { id: 'T_30', name: 'grandchild' },
-                { id: 'T_8', name: 'Accessories' },
+            expect(before.items.sort(sortById).map(pick(['name']))).toEqual([
+                { name: 'top' },
+                { name: 'child' },
+                { name: 'grandchild' },
+                { name: 'Accessories' },
             ]);
 
             const { deleteCollections } = await adminClient.query<

File diff suppressed because it is too large
+ 296 - 292
packages/core/e2e/graphql/generated-e2e-admin-types.ts


File diff suppressed because it is too large
+ 291 - 291
packages/core/e2e/graphql/generated-e2e-shop-types.ts


+ 12 - 8
packages/core/src/common/error/generated-graphql-admin-errors.ts

@@ -152,12 +152,16 @@ export class FacetInUseError extends ErrorResult {
   readonly __typename = 'FacetInUseError';
   readonly errorCode = 'FACET_IN_USE_ERROR' as any;
   readonly message = 'FACET_IN_USE_ERROR';
+  readonly facetCode: Scalars['String'];
+  readonly productCount: Scalars['Int'];
+  readonly variantCount: Scalars['Int'];
   constructor(
-    public facetCode: Scalars['String'],
-    public productCount: Scalars['Int'],
-    public variantCount: Scalars['Int'],
+    input: { facetCode: Scalars['String'], productCount: Scalars['Int'], variantCount: Scalars['Int'] }
   ) {
     super();
+    this.facetCode = input.facetCode
+    this.productCount = input.productCount
+    this.variantCount = input.variantCount
   }
 }
 
@@ -577,6 +581,11 @@ export const adminErrorOperationTypeResolvers = {
       return isGraphQLError(value) ? (value as any).__typename : 'Refund';
     },
   },
+  RemoveFacetFromChannelResult: {
+    __resolveType(value: any) {
+      return isGraphQLError(value) ? (value as any).__typename : 'Facet';
+    },
+  },
   RemoveOptionGroupFromProductResult: {
     __resolveType(value: any) {
       return isGraphQLError(value) ? (value as any).__typename : 'Product';
@@ -617,11 +626,6 @@ export const adminErrorOperationTypeResolvers = {
       return isGraphQLError(value) ? (value as any).__typename : 'Customer';
     },
   },
-  RemoveFacetFromChannelResult: {
-    __resolveType(value: any) {
-      return isGraphQLError(value) ? (value as any).__typename : 'Facet';
-    },
-  },
   UpdateGlobalSettingsResult: {
     __resolveType(value: any) {
       return isGraphQLError(value) ? (value as any).__typename : 'GlobalSettings';

+ 1 - 1
packages/core/src/service/services/facet.service.ts

@@ -346,7 +346,7 @@ export class FacetService {
                         results.push(result);
                     }
                 } else {
-                    results.push(new FacetInUseError(facet.code, productCount, variantCount));
+                    results.push(new FacetInUseError({ facetCode: facet.code, productCount, variantCount }));
                 }
             }
         }

File diff suppressed because it is too large
+ 296 - 292
packages/elasticsearch-plugin/e2e/graphql/generated-e2e-elasticsearch-plugin-types.ts


File diff suppressed because it is too large
+ 296 - 292
packages/payments-plugin/e2e/graphql/generated-admin-types.ts


File diff suppressed because it is too large
+ 291 - 291
packages/payments-plugin/e2e/graphql/generated-shop-types.ts


File diff suppressed because it is too large
+ 287 - 287
packages/payments-plugin/src/mollie/graphql/generated-shop-types.ts


File diff suppressed because it is too large
+ 0 - 0
schema-admin.json


File diff suppressed because it is too large
+ 0 - 0
schema-shop.json


Some files were not shown because too many files changed in this diff