@vendure/admin-ui 2.0.0-next.1 → 2.0.0-next.4

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.
Files changed (84) hide show
  1. package/catalog/components/collection-contents/collection-contents.component.d.ts +8 -2
  2. package/catalog/components/collection-detail/collection-detail.component.d.ts +11 -4
  3. package/catalog/components/collection-list/collection-list.component.d.ts +2 -0
  4. package/catalog/components/collection-tree/array-to-tree.d.ts +1 -1
  5. package/catalog/components/collection-tree/collection-tree-node.component.d.ts +6 -2
  6. package/catalog/components/collection-tree/collection-tree.component.d.ts +2 -1
  7. package/catalog/components/product-variants-list/product-variants-list.component.d.ts +1 -0
  8. package/core/common/generated-types.d.ts +122 -2
  9. package/core/common/version.d.ts +1 -1
  10. package/core/data/definitions/collection-definitions.d.ts +1 -0
  11. package/core/data/providers/collection-data.service.d.ts +4 -0
  12. package/core/data/providers/promotion-data.service.d.ts +1 -1
  13. package/core/providers/local-storage/local-storage.service.d.ts +1 -0
  14. package/core/public_api.d.ts +1 -0
  15. package/core/shared/components/object-tree/object-tree.component.d.ts +3 -3
  16. package/core/shared/dynamic-form-inputs/relation-form-input/generic/relation-generic-input.component.d.ts +18 -0
  17. package/core/shared/shared.module.d.ts +14 -13
  18. package/esm2020/catalog/components/assets/assets.component.mjs +2 -2
  19. package/esm2020/catalog/components/collection-contents/collection-contents.component.mjs +53 -13
  20. package/esm2020/catalog/components/collection-detail/collection-detail.component.mjs +55 -32
  21. package/esm2020/catalog/components/collection-list/collection-list.component.mjs +30 -5
  22. package/esm2020/catalog/components/collection-tree/array-to-tree.mjs +3 -3
  23. package/esm2020/catalog/components/collection-tree/collection-tree-node.component.mjs +29 -10
  24. package/esm2020/catalog/components/collection-tree/collection-tree.component.mjs +6 -3
  25. package/esm2020/catalog/components/facet-detail/facet-detail.component.mjs +2 -2
  26. package/esm2020/catalog/components/product-variants-list/product-variants-list.component.mjs +9 -3
  27. package/esm2020/core/app.component.module.mjs +1 -1
  28. package/esm2020/core/common/base-detail.component.mjs +1 -1
  29. package/esm2020/core/common/deactivate-aware.mjs +1 -1
  30. package/esm2020/core/common/generated-types.mjs +29 -1
  31. package/esm2020/core/common/introspection-result.mjs +255 -183
  32. package/esm2020/core/common/utilities/configurable-operation-utils.mjs +21 -2
  33. package/esm2020/core/common/version.mjs +2 -2
  34. package/esm2020/core/core.module.mjs +1 -1
  35. package/esm2020/core/data/definitions/collection-definitions.mjs +18 -1
  36. package/esm2020/core/data/definitions/order-definitions.mjs +2 -1
  37. package/esm2020/core/data/definitions/shared-definitions.mjs +29 -28
  38. package/esm2020/core/data/providers/collection-data.service.mjs +5 -2
  39. package/esm2020/core/data/providers/promotion-data.service.mjs +3 -2
  40. package/esm2020/core/providers/local-storage/local-storage.service.mjs +1 -1
  41. package/esm2020/core/public_api.mjs +2 -1
  42. package/esm2020/core/shared/components/asset-preview/asset-preview.component.mjs +4 -4
  43. package/esm2020/core/shared/components/configurable-input/configurable-input.component.mjs +10 -9
  44. package/esm2020/core/shared/components/help-tooltip/help-tooltip.component.mjs +2 -2
  45. package/esm2020/core/shared/components/object-tree/object-tree.component.mjs +4 -4
  46. package/esm2020/core/shared/dynamic-form-inputs/relation-form-input/generic/relation-generic-input.component.mjs +54 -0
  47. package/esm2020/core/shared/dynamic-form-inputs/relation-form-input/relation-form-input.component.mjs +5 -4
  48. package/esm2020/core/shared/dynamic-form-inputs/select-form-input/select-form-input.component.mjs +1 -1
  49. package/esm2020/core/shared/shared.module.mjs +5 -1
  50. package/esm2020/order/components/cancel-order-dialog/cancel-order-dialog.component.mjs +8 -4
  51. package/esm2020/order/components/order-editor/order-editor.component.mjs +26 -10
  52. package/esm2020/order/components/order-table/order-table.component.mjs +2 -2
  53. package/esm2020/order/components/refund-order-dialog/refund-order-dialog.component.mjs +8 -4
  54. package/fesm2015/vendure-admin-ui-catalog.mjs +177 -57
  55. package/fesm2015/vendure-admin-ui-catalog.mjs.map +1 -1
  56. package/fesm2015/vendure-admin-ui-core.mjs +499 -314
  57. package/fesm2015/vendure-admin-ui-core.mjs.map +1 -1
  58. package/fesm2015/vendure-admin-ui-order.mjs +38 -16
  59. package/fesm2015/vendure-admin-ui-order.mjs.map +1 -1
  60. package/fesm2020/vendure-admin-ui-catalog.mjs +175 -59
  61. package/fesm2020/vendure-admin-ui-catalog.mjs.map +1 -1
  62. package/fesm2020/vendure-admin-ui-core.mjs +497 -311
  63. package/fesm2020/vendure-admin-ui-core.mjs.map +1 -1
  64. package/fesm2020/vendure-admin-ui-order.mjs +36 -15
  65. package/fesm2020/vendure-admin-ui-order.mjs.map +1 -1
  66. package/order/components/order-editor/order-editor.component.d.ts +8 -2
  67. package/package.json +2 -2
  68. package/static/i18n-messages/cs.json +2 -0
  69. package/static/i18n-messages/de.json +3 -0
  70. package/static/i18n-messages/en.json +3 -1
  71. package/static/i18n-messages/es.json +2 -0
  72. package/static/i18n-messages/fr.json +2 -0
  73. package/static/i18n-messages/it.json +2 -0
  74. package/static/i18n-messages/pl.json +2 -0
  75. package/static/i18n-messages/pt_BR.json +2 -0
  76. package/static/i18n-messages/pt_PT.json +2 -0
  77. package/static/i18n-messages/ru.json +2 -0
  78. package/static/i18n-messages/uk.json +2 -0
  79. package/static/i18n-messages/zh_Hans.json +2 -0
  80. package/static/i18n-messages/zh_Hant.json +2 -0
  81. package/static/styles/global/_forms.scss +3 -4
  82. package/static/styles/global/_overrides.scss +6 -0
  83. package/static/theme.min.css +1 -1
  84. package/static/vendure-ui-config.json +25 -10
@@ -1,7 +1,7 @@
1
1
  import { OnChanges, OnDestroy, OnInit, SimpleChanges, TemplateRef } from '@angular/core';
2
2
  import { FormControl } from '@angular/forms';
3
3
  import { ActivatedRoute, Router } from '@angular/router';
4
- import { DataService, GetCollectionContentsQuery } from '@vendure/admin-ui/core';
4
+ import { ConfigurableOperationInput, DataService, GetCollectionContentsQuery } from '@vendure/admin-ui/core';
5
5
  import { Observable } from 'rxjs';
6
6
  import * as i0 from "@angular/core";
7
7
  export declare class CollectionContentsComponent implements OnInit, OnChanges, OnDestroy {
@@ -9,13 +9,19 @@ export declare class CollectionContentsComponent implements OnInit, OnChanges, O
9
9
  private router;
10
10
  private dataService;
11
11
  collectionId: string;
12
+ parentId: string;
13
+ updatedFilters: ConfigurableOperationInput[] | undefined;
14
+ previewUpdatedFilters: boolean;
12
15
  headerTemplate: TemplateRef<any>;
13
16
  contents$: Observable<NonNullable<GetCollectionContentsQuery['collection']>['productVariants']['items']>;
14
17
  contentsTotalItems$: Observable<number>;
15
18
  contentsItemsPerPage$: Observable<number>;
16
19
  contentsCurrentPage$: Observable<number>;
17
20
  filterTermControl: FormControl;
21
+ isLoading: boolean;
18
22
  private collectionIdChange$;
23
+ private parentIdChange$;
24
+ private filterChanges$;
19
25
  private refresh$;
20
26
  private destroy$;
21
27
  constructor(route: ActivatedRoute, router: Router, dataService: DataService);
@@ -27,5 +33,5 @@ export declare class CollectionContentsComponent implements OnInit, OnChanges, O
27
33
  refresh(): void;
28
34
  private setParam;
29
35
  static ɵfac: i0.ɵɵFactoryDeclaration<CollectionContentsComponent, never>;
30
- static ɵcmp: i0.ɵɵComponentDeclaration<CollectionContentsComponent, "vdr-collection-contents", never, { "collectionId": "collectionId"; }, {}, ["headerTemplate"], never>;
36
+ static ɵcmp: i0.ɵɵComponentDeclaration<CollectionContentsComponent, "vdr-collection-contents", never, { "collectionId": "collectionId"; "parentId": "parentId"; "updatedFilters": "updatedFilters"; "previewUpdatedFilters": "previewUpdatedFilters"; }, {}, ["headerTemplate"], never>;
31
37
  }
@@ -1,7 +1,8 @@
1
1
  import { ChangeDetectorRef, OnDestroy, OnInit } from '@angular/core';
2
2
  import { FormBuilder, FormGroup } from '@angular/forms';
3
3
  import { ActivatedRoute, Router } from '@angular/router';
4
- import { Asset, BaseDetailComponent, CollectionFragment, ConfigurableOperation, ConfigurableOperationDefinition, CustomFieldConfig, DataService, LanguageCode, ModalService, NotificationService, Permission, ServerConfigService } from '@vendure/admin-ui/core';
4
+ import { Asset, BaseDetailComponent, CollectionFragment, ConfigurableOperation, ConfigurableOperationDefinition, ConfigurableOperationInput, CustomFieldConfig, DataService, LanguageCode, LocalStorageService, ModalService, NotificationService, Permission, ServerConfigService } from '@vendure/admin-ui/core';
5
+ import { Observable } from 'rxjs';
5
6
  import { CollectionContentsComponent } from '../collection-contents/collection-contents.component';
6
7
  import * as i0 from "@angular/core";
7
8
  export declare class CollectionDetailComponent extends BaseDetailComponent<CollectionFragment> implements OnInit, OnDestroy {
@@ -10,6 +11,7 @@ export declare class CollectionDetailComponent extends BaseDetailComponent<Colle
10
11
  private formBuilder;
11
12
  private notificationService;
12
13
  private modalService;
14
+ private localStorageService;
13
15
  customFields: CustomFieldConfig[];
14
16
  detailForm: FormGroup;
15
17
  assetChanges: {
@@ -18,22 +20,27 @@ export declare class CollectionDetailComponent extends BaseDetailComponent<Colle
18
20
  };
19
21
  filters: ConfigurableOperation[];
20
22
  allFilters: ConfigurableOperationDefinition[];
23
+ updatedFilters$: Observable<ConfigurableOperationInput[]>;
24
+ livePreview: boolean;
25
+ parentId$: Observable<string | undefined>;
21
26
  readonly updatePermission: Permission[];
22
27
  contentsComponent: CollectionContentsComponent;
23
- constructor(router: Router, route: ActivatedRoute, serverConfigService: ServerConfigService, changeDetector: ChangeDetectorRef, dataService: DataService, formBuilder: FormBuilder, notificationService: NotificationService, modalService: ModalService);
28
+ constructor(router: Router, route: ActivatedRoute, serverConfigService: ServerConfigService, changeDetector: ChangeDetectorRef, dataService: DataService, formBuilder: FormBuilder, notificationService: NotificationService, modalService: ModalService, localStorageService: LocalStorageService);
24
29
  ngOnInit(): void;
25
30
  ngOnDestroy(): void;
26
- getFilterDefinition(filter: ConfigurableOperation): ConfigurableOperationDefinition | undefined;
31
+ getFilterDefinition(_filter: ConfigurableOperation): ConfigurableOperationDefinition | undefined;
27
32
  assetsChanged(): boolean;
28
33
  /**
29
34
  * If creating a new Collection, automatically generate the slug based on the collection name.
30
35
  */
31
36
  updateSlug(nameValue: string): void;
32
37
  addFilter(collectionFilter: ConfigurableOperation): void;
33
- removeFilter(collectionFilter: ConfigurableOperation): void;
38
+ removeFilter(index: number): void;
34
39
  create(): void;
35
40
  save(): void;
36
41
  canDeactivate(): boolean;
42
+ toggleLivePreview(): void;
43
+ trackByFn(index: number, item: ConfigurableOperation): string;
37
44
  /**
38
45
  * Sets the values of the form on changes to the category or current language.
39
46
  */
@@ -19,11 +19,13 @@ export declare class CollectionListComponent implements OnInit, OnDestroy {
19
19
  availableLanguages$: Observable<LanguageCode[]>;
20
20
  contentLanguage$: Observable<LanguageCode>;
21
21
  expandAll: boolean;
22
+ expandedIds: string[];
22
23
  private queryResult;
23
24
  private destroy$;
24
25
  constructor(dataService: DataService, notificationService: NotificationService, modalService: ModalService, router: Router, route: ActivatedRoute, serverConfigService: ServerConfigService);
25
26
  ngOnInit(): void;
26
27
  ngOnDestroy(): void;
28
+ toggleExpandAll(): void;
27
29
  onRearrange(event: RearrangeEvent): void;
28
30
  deleteCollection(id: string): void;
29
31
  closeContents(): void;
@@ -16,4 +16,4 @@ export declare type RootNode<T extends HasParent> = {
16
16
  * Builds a tree from an array of nodes which have a parent.
17
17
  * Based on https://stackoverflow.com/a/31247960/772859, modified to preserve ordering.
18
18
  */
19
- export declare function arrayToTree<T extends HasParent>(nodes: T[], currentState?: RootNode<T>): RootNode<T>;
19
+ export declare function arrayToTree<T extends HasParent>(nodes: T[], currentState?: RootNode<T>, expandedIds?: string[]): RootNode<T>;
@@ -1,5 +1,6 @@
1
1
  import { CdkDragDrop } from '@angular/cdk/drag-drop';
2
2
  import { OnChanges, OnInit, SimpleChanges } from '@angular/core';
3
+ import { ActivatedRoute, Router } from '@angular/router';
3
4
  import { DataService } from '@vendure/admin-ui/core';
4
5
  import { Observable } from 'rxjs';
5
6
  import { RootNode, TreeNode } from './array-to-tree';
@@ -10,6 +11,8 @@ export declare class CollectionTreeNodeComponent implements OnInit, OnChanges {
10
11
  private parent;
11
12
  private dataService;
12
13
  private collectionTreeService;
14
+ private router;
15
+ private route;
13
16
  depth: number;
14
17
  parentName: string;
15
18
  collectionTree: TreeNode<CollectionPartial>;
@@ -21,16 +24,17 @@ export declare class CollectionTreeNodeComponent implements OnInit, OnChanges {
21
24
  path: string;
22
25
  id: string;
23
26
  }>;
24
- constructor(parent: CollectionTreeNodeComponent, dataService: DataService, collectionTreeService: CollectionTreeService);
27
+ constructor(parent: CollectionTreeNodeComponent, dataService: DataService, collectionTreeService: CollectionTreeService, router: Router, route: ActivatedRoute);
25
28
  ngOnInit(): void;
26
29
  ngOnChanges(changes: SimpleChanges): void;
27
30
  trackByFn(index: number, item: CollectionPartial): string;
31
+ toggleExpanded(collection: TreeNode<CollectionPartial>): void;
28
32
  getMoveListItems(collection: CollectionPartial): void;
29
33
  move(collection: CollectionPartial, parentId: string): void;
30
34
  moveUp(collection: CollectionPartial, currentIndex: number): void;
31
35
  moveDown(collection: CollectionPartial, currentIndex: number): void;
32
36
  drop(event: CdkDragDrop<CollectionPartial | RootNode<CollectionPartial>>): void;
33
37
  delete(id: string): void;
34
- static ɵfac: i0.ɵɵFactoryDeclaration<CollectionTreeNodeComponent, [{ optional: true; skipSelf: true; }, null, null]>;
38
+ static ɵfac: i0.ɵɵFactoryDeclaration<CollectionTreeNodeComponent, [{ optional: true; skipSelf: true; }, null, null, null, null]>;
35
39
  static ɵcmp: i0.ɵɵComponentDeclaration<CollectionTreeNodeComponent, "vdr-collection-tree-node", never, { "collectionTree": "collectionTree"; "activeCollectionId": "activeCollectionId"; "expandAll": "expandAll"; }, {}, never, never>;
36
40
  }
@@ -8,6 +8,7 @@ export declare class CollectionTreeComponent implements OnInit, OnChanges {
8
8
  collections: CollectionPartial[];
9
9
  activeCollectionId: string;
10
10
  expandAll: boolean;
11
+ expandedIds: string[];
11
12
  rearrange: EventEmitter<RearrangeEvent>;
12
13
  deleteCollection: EventEmitter<string>;
13
14
  collectionTree: RootNode<CollectionPartial>;
@@ -15,5 +16,5 @@ export declare class CollectionTreeComponent implements OnInit, OnChanges {
15
16
  ngOnChanges(changes: SimpleChanges): void;
16
17
  ngOnInit(): void;
17
18
  static ɵfac: i0.ɵɵFactoryDeclaration<CollectionTreeComponent, never>;
18
- static ɵcmp: i0.ɵɵComponentDeclaration<CollectionTreeComponent, "vdr-collection-tree", never, { "collections": "collections"; "activeCollectionId": "activeCollectionId"; "expandAll": "expandAll"; }, { "rearrange": "rearrange"; "deleteCollection": "deleteCollection"; }, never, never>;
19
+ static ɵcmp: i0.ɵɵComponentDeclaration<CollectionTreeComponent, "vdr-collection-tree", never, { "collections": "collections"; "activeCollectionId": "activeCollectionId"; "expandAll": "expandAll"; "expandedIds": "expandedIds"; }, { "rearrange": "rearrange"; "deleteCollection": "deleteCollection"; }, never, never>;
19
20
  }
@@ -51,6 +51,7 @@ export declare class ProductVariantsListComponent implements OnChanges, OnInit,
51
51
  trackById(index: number, item: ProductVariantFragment): string;
52
52
  inventoryIsNotTracked(formGroup: FormGroup): boolean;
53
53
  getTaxCategoryName(group: FormGroup): string;
54
+ getStockOnHandMinValue(variant: FormGroup): any;
54
55
  getSaleableStockLevel(variant: ProductVariantFragment): number;
55
56
  areAllSelected(): boolean;
56
57
  onAssetChange(variantId: string, event: AssetChange): void;
@@ -503,6 +503,28 @@ export declare type CountryTranslationInput = {
503
503
  languageCode: LanguageCode;
504
504
  name?: InputMaybe<Scalars['String']>;
505
505
  };
506
+ /** Returned if the provided coupon code is invalid */
507
+ export declare type CouponCodeExpiredError = ErrorResult & {
508
+ __typename?: 'CouponCodeExpiredError';
509
+ couponCode: Scalars['String'];
510
+ errorCode: ErrorCode;
511
+ message: Scalars['String'];
512
+ };
513
+ /** Returned if the provided coupon code is invalid */
514
+ export declare type CouponCodeInvalidError = ErrorResult & {
515
+ __typename?: 'CouponCodeInvalidError';
516
+ couponCode: Scalars['String'];
517
+ errorCode: ErrorCode;
518
+ message: Scalars['String'];
519
+ };
520
+ /** Returned if the provided coupon code is invalid */
521
+ export declare type CouponCodeLimitError = ErrorResult & {
522
+ __typename?: 'CouponCodeLimitError';
523
+ couponCode: Scalars['String'];
524
+ errorCode: ErrorCode;
525
+ limit: Scalars['Int'];
526
+ message: Scalars['String'];
527
+ };
506
528
  export declare type CreateAddressInput = {
507
529
  city?: InputMaybe<Scalars['String']>;
508
530
  company?: InputMaybe<Scalars['String']>;
@@ -1267,6 +1289,9 @@ export declare enum ErrorCode {
1267
1289
  ALREADY_REFUNDED_ERROR = "ALREADY_REFUNDED_ERROR",
1268
1290
  CANCEL_ACTIVE_ORDER_ERROR = "CANCEL_ACTIVE_ORDER_ERROR",
1269
1291
  CHANNEL_DEFAULT_LANGUAGE_ERROR = "CHANNEL_DEFAULT_LANGUAGE_ERROR",
1292
+ COUPON_CODE_EXPIRED_ERROR = "COUPON_CODE_EXPIRED_ERROR",
1293
+ COUPON_CODE_INVALID_ERROR = "COUPON_CODE_INVALID_ERROR",
1294
+ COUPON_CODE_LIMIT_ERROR = "COUPON_CODE_LIMIT_ERROR",
1270
1295
  CREATE_FULFILLMENT_ERROR = "CREATE_FULFILLMENT_ERROR",
1271
1296
  EMAIL_ADDRESS_CONFLICT_ERROR = "EMAIL_ADDRESS_CONFLICT_ERROR",
1272
1297
  EMPTY_ORDER_LINE_SELECTION_ERROR = "EMPTY_ORDER_LINE_SELECTION_ERROR",
@@ -2070,6 +2095,7 @@ export declare type MissingConditionsError = ErrorResult & {
2070
2095
  export declare type ModifyOrderInput = {
2071
2096
  addItems?: InputMaybe<Array<AddItemInput>>;
2072
2097
  adjustOrderLines?: InputMaybe<Array<AdjustOrderLineInput>>;
2098
+ couponCodes?: InputMaybe<Array<Scalars['String']>>;
2073
2099
  dryRun: Scalars['Boolean'];
2074
2100
  note?: InputMaybe<Scalars['String']>;
2075
2101
  options?: InputMaybe<ModifyOrderOptions>;
@@ -2083,7 +2109,7 @@ export declare type ModifyOrderOptions = {
2083
2109
  freezePromotions?: InputMaybe<Scalars['Boolean']>;
2084
2110
  recalculateShipping?: InputMaybe<Scalars['Boolean']>;
2085
2111
  };
2086
- export declare type ModifyOrderResult = InsufficientStockError | NegativeQuantityError | NoChangesSpecifiedError | Order | OrderLimitError | OrderModificationStateError | PaymentMethodMissingError | RefundPaymentIdMissingError;
2112
+ export declare type ModifyOrderResult = CouponCodeExpiredError | CouponCodeInvalidError | CouponCodeLimitError | InsufficientStockError | NegativeQuantityError | NoChangesSpecifiedError | Order | OrderLimitError | OrderModificationStateError | PaymentMethodMissingError | RefundPaymentIdMissingError;
2087
2113
  export declare type MoveCollectionInput = {
2088
2114
  collectionId: Scalars['ID'];
2089
2115
  index: Scalars['Int'];
@@ -3107,6 +3133,31 @@ export declare type PaymentStateTransitionError = ErrorResult & {
3107
3133
  * Permissions for administrators and customers. Used to control access to
3108
3134
  * GraphQL resolvers via the {@link Allow} decorator.
3109
3135
  *
3136
+ * ## Understanding Permission.Owner
3137
+ *
3138
+ * `Permission.Owner` is a special permission which is used in some of the Vendure resolvers to indicate that that resolver should only
3139
+ * be accessible to the "owner" of that resource.
3140
+ *
3141
+ * For example, the Shop API `activeCustomer` query resolver should only return the Customer object for the "owner" of that Customer, i.e.
3142
+ * based on the activeUserId of the current session. As a result, the resolver code looks like this:
3143
+ *
3144
+ * @example
3145
+ * ```TypeScript
3146
+ * \@Query()
3147
+ * \@Allow(Permission.Owner)
3148
+ * async activeCustomer(\@Ctx() ctx: RequestContext): Promise<Customer | undefined> {
3149
+ * const userId = ctx.activeUserId;
3150
+ * if (userId) {
3151
+ * return this.customerService.findOneByUserId(ctx, userId);
3152
+ * }
3153
+ * }
3154
+ * ```
3155
+ *
3156
+ * Here we can see that the "ownership" must be enforced by custom logic inside the resolver. Since "ownership" cannot be defined generally
3157
+ * nor statically encoded at build-time, any resolvers using `Permission.Owner` **must** include logic to enforce that only the owner
3158
+ * of the resource has access. If not, then it is the equivalent of using `Permission.Public`.
3159
+ *
3160
+ *
3110
3161
  * @docsCategory common
3111
3162
  */
3112
3163
  export declare enum Permission {
@@ -3288,6 +3339,10 @@ export declare type PermissionDefinition = {
3288
3339
  description: Scalars['String'];
3289
3340
  name: Scalars['String'];
3290
3341
  };
3342
+ export declare type PreviewCollectionVariantsInput = {
3343
+ filters: Array<ConfigurableOperationInput>;
3344
+ parentId?: InputMaybe<Scalars['ID']>;
3345
+ };
3291
3346
  /** The price range where the result has more than one price */
3292
3347
  export declare type PriceRange = {
3293
3348
  __typename?: 'PriceRange';
@@ -3630,6 +3685,8 @@ export declare type Query = {
3630
3685
  paymentMethodHandlers: Array<ConfigurableOperationDefinition>;
3631
3686
  paymentMethods: PaymentMethodList;
3632
3687
  pendingSearchIndexUpdates: Scalars['Int'];
3688
+ /** Used for real-time previews of the contents of a Collection */
3689
+ previewCollectionVariants: ProductVariantList;
3633
3690
  /** Get a Product either by id or slug. If neither id nor slug is specified, an error will result. */
3634
3691
  product?: Maybe<Product>;
3635
3692
  productOptionGroup?: Maybe<ProductOptionGroup>;
@@ -3734,6 +3791,10 @@ export declare type QueryPaymentMethodArgs = {
3734
3791
  export declare type QueryPaymentMethodsArgs = {
3735
3792
  options?: InputMaybe<PaymentMethodListOptions>;
3736
3793
  };
3794
+ export declare type QueryPreviewCollectionVariantsArgs = {
3795
+ input: PreviewCollectionVariantsInput;
3796
+ options?: InputMaybe<ProductVariantListOptions>;
3797
+ };
3737
3798
  export declare type QueryProductArgs = {
3738
3799
  id?: InputMaybe<Scalars['ID']>;
3739
3800
  slug?: InputMaybe<Scalars['String']>;
@@ -5325,6 +5386,7 @@ export declare type GetCollectionFiltersQuery = {
5325
5386
  list: boolean;
5326
5387
  ui?: any | null;
5327
5388
  label?: string | null;
5389
+ description?: string | null;
5328
5390
  }>;
5329
5391
  }>;
5330
5392
  };
@@ -5800,10 +5862,28 @@ export declare type GetCollectionContentsQuery = {
5800
5862
  id: string;
5801
5863
  productId: string;
5802
5864
  name: string;
5865
+ sku: string;
5803
5866
  }>;
5804
5867
  };
5805
5868
  } | null;
5806
5869
  };
5870
+ export declare type PreviewCollectionContentsQueryVariables = Exact<{
5871
+ input: PreviewCollectionVariantsInput;
5872
+ options?: InputMaybe<ProductVariantListOptions>;
5873
+ }>;
5874
+ export declare type PreviewCollectionContentsQuery = {
5875
+ previewCollectionVariants: {
5876
+ __typename?: 'ProductVariantList';
5877
+ totalItems: number;
5878
+ items: Array<{
5879
+ __typename?: 'ProductVariant';
5880
+ id: string;
5881
+ productId: string;
5882
+ name: string;
5883
+ sku: string;
5884
+ }>;
5885
+ };
5886
+ };
5807
5887
  export declare type AddressFragment = {
5808
5888
  __typename?: 'Address';
5809
5889
  id: string;
@@ -6742,6 +6822,7 @@ export declare type OrderDetailFragment = {
6742
6822
  state: string;
6743
6823
  nextStates: Array<string>;
6744
6824
  active: boolean;
6825
+ couponCodes: Array<string>;
6745
6826
  subTotal: number;
6746
6827
  subTotalWithTax: number;
6747
6828
  total: number;
@@ -6997,6 +7078,7 @@ export declare type GetOrderQuery = {
6997
7078
  state: string;
6998
7079
  nextStates: Array<string>;
6999
7080
  active: boolean;
7081
+ couponCodes: Array<string>;
7000
7082
  subTotal: number;
7001
7083
  subTotalWithTax: number;
7002
7084
  total: number;
@@ -7325,6 +7407,7 @@ export declare type CancelOrderMutation = {
7325
7407
  state: string;
7326
7408
  nextStates: Array<string>;
7327
7409
  active: boolean;
7410
+ couponCodes: Array<string>;
7328
7411
  subTotal: number;
7329
7412
  subTotalWithTax: number;
7330
7413
  total: number;
@@ -7778,6 +7861,18 @@ export declare type ModifyOrderMutationVariables = Exact<{
7778
7861
  }>;
7779
7862
  export declare type ModifyOrderMutation = {
7780
7863
  modifyOrder: {
7864
+ __typename?: 'CouponCodeExpiredError';
7865
+ errorCode: ErrorCode;
7866
+ message: string;
7867
+ } | {
7868
+ __typename?: 'CouponCodeInvalidError';
7869
+ errorCode: ErrorCode;
7870
+ message: string;
7871
+ } | {
7872
+ __typename?: 'CouponCodeLimitError';
7873
+ errorCode: ErrorCode;
7874
+ message: string;
7875
+ } | {
7781
7876
  __typename?: 'InsufficientStockError';
7782
7877
  errorCode: ErrorCode;
7783
7878
  message: string;
@@ -7798,6 +7893,7 @@ export declare type ModifyOrderMutation = {
7798
7893
  state: string;
7799
7894
  nextStates: Array<string>;
7800
7895
  active: boolean;
7896
+ couponCodes: Array<string>;
7801
7897
  subTotal: number;
7802
7898
  subTotalWithTax: number;
7803
7899
  total: number;
@@ -8040,6 +8136,7 @@ export declare type AddManualPaymentMutation = {
8040
8136
  state: string;
8041
8137
  nextStates: Array<string>;
8042
8138
  active: boolean;
8139
+ couponCodes: Array<string>;
8043
8140
  subTotal: number;
8044
8141
  subTotalWithTax: number;
8045
8142
  total: number;
@@ -10331,6 +10428,7 @@ export declare type GetAdjustmentOperationsQuery = {
10331
10428
  list: boolean;
10332
10429
  ui?: any | null;
10333
10430
  label?: string | null;
10431
+ description?: string | null;
10334
10432
  }>;
10335
10433
  }>;
10336
10434
  promotionActions: Array<{
@@ -10346,6 +10444,7 @@ export declare type GetAdjustmentOperationsQuery = {
10346
10444
  list: boolean;
10347
10445
  ui?: any | null;
10348
10446
  label?: string | null;
10447
+ description?: string | null;
10349
10448
  }>;
10350
10449
  }>;
10351
10450
  };
@@ -11250,6 +11349,7 @@ export declare type GetPaymentMethodOperationsQuery = {
11250
11349
  list: boolean;
11251
11350
  ui?: any | null;
11252
11351
  label?: string | null;
11352
+ description?: string | null;
11253
11353
  }>;
11254
11354
  }>;
11255
11355
  paymentMethodHandlers: Array<{
@@ -11265,6 +11365,7 @@ export declare type GetPaymentMethodOperationsQuery = {
11265
11365
  list: boolean;
11266
11366
  ui?: any | null;
11267
11367
  label?: string | null;
11368
+ description?: string | null;
11268
11369
  }>;
11269
11370
  }>;
11270
11371
  };
@@ -16334,6 +16435,7 @@ export declare type ConfigurableOperationDefFragment = {
16334
16435
  list: boolean;
16335
16436
  ui?: any | null;
16336
16437
  label?: string | null;
16438
+ description?: string | null;
16337
16439
  }>;
16338
16440
  };
16339
16441
  declare type ErrorResult_AlreadyRefundedError_Fragment = {
@@ -16351,6 +16453,21 @@ declare type ErrorResult_ChannelDefaultLanguageError_Fragment = {
16351
16453
  errorCode: ErrorCode;
16352
16454
  message: string;
16353
16455
  };
16456
+ declare type ErrorResult_CouponCodeExpiredError_Fragment = {
16457
+ __typename?: 'CouponCodeExpiredError';
16458
+ errorCode: ErrorCode;
16459
+ message: string;
16460
+ };
16461
+ declare type ErrorResult_CouponCodeInvalidError_Fragment = {
16462
+ __typename?: 'CouponCodeInvalidError';
16463
+ errorCode: ErrorCode;
16464
+ message: string;
16465
+ };
16466
+ declare type ErrorResult_CouponCodeLimitError_Fragment = {
16467
+ __typename?: 'CouponCodeLimitError';
16468
+ errorCode: ErrorCode;
16469
+ message: string;
16470
+ };
16354
16471
  declare type ErrorResult_CreateFulfillmentError_Fragment = {
16355
16472
  __typename?: 'CreateFulfillmentError';
16356
16473
  errorCode: ErrorCode;
@@ -16501,7 +16618,7 @@ declare type ErrorResult_SettlePaymentError_Fragment = {
16501
16618
  errorCode: ErrorCode;
16502
16619
  message: string;
16503
16620
  };
16504
- export declare type ErrorResultFragment = ErrorResult_AlreadyRefundedError_Fragment | ErrorResult_CancelActiveOrderError_Fragment | ErrorResult_ChannelDefaultLanguageError_Fragment | ErrorResult_CreateFulfillmentError_Fragment | ErrorResult_EmailAddressConflictError_Fragment | ErrorResult_EmptyOrderLineSelectionError_Fragment | ErrorResult_FulfillmentStateTransitionError_Fragment | ErrorResult_InsufficientStockError_Fragment | ErrorResult_InsufficientStockOnHandError_Fragment | ErrorResult_InvalidCredentialsError_Fragment | ErrorResult_InvalidFulfillmentHandlerError_Fragment | ErrorResult_ItemsAlreadyFulfilledError_Fragment | ErrorResult_LanguageNotAvailableError_Fragment | ErrorResult_ManualPaymentStateError_Fragment | ErrorResult_MimeTypeError_Fragment | ErrorResult_MissingConditionsError_Fragment | ErrorResult_MultipleOrderError_Fragment | ErrorResult_NativeAuthStrategyError_Fragment | ErrorResult_NegativeQuantityError_Fragment | ErrorResult_NoChangesSpecifiedError_Fragment | ErrorResult_NothingToRefundError_Fragment | ErrorResult_OrderLimitError_Fragment | ErrorResult_OrderModificationStateError_Fragment | ErrorResult_OrderStateTransitionError_Fragment | ErrorResult_PaymentMethodMissingError_Fragment | ErrorResult_PaymentOrderMismatchError_Fragment | ErrorResult_PaymentStateTransitionError_Fragment | ErrorResult_ProductOptionInUseError_Fragment | ErrorResult_QuantityTooGreatError_Fragment | ErrorResult_RefundOrderStateError_Fragment | ErrorResult_RefundPaymentIdMissingError_Fragment | ErrorResult_RefundStateTransitionError_Fragment | ErrorResult_SettlePaymentError_Fragment;
16621
+ export declare type ErrorResultFragment = ErrorResult_AlreadyRefundedError_Fragment | ErrorResult_CancelActiveOrderError_Fragment | ErrorResult_ChannelDefaultLanguageError_Fragment | ErrorResult_CouponCodeExpiredError_Fragment | ErrorResult_CouponCodeInvalidError_Fragment | ErrorResult_CouponCodeLimitError_Fragment | ErrorResult_CreateFulfillmentError_Fragment | ErrorResult_EmailAddressConflictError_Fragment | ErrorResult_EmptyOrderLineSelectionError_Fragment | ErrorResult_FulfillmentStateTransitionError_Fragment | ErrorResult_InsufficientStockError_Fragment | ErrorResult_InsufficientStockOnHandError_Fragment | ErrorResult_InvalidCredentialsError_Fragment | ErrorResult_InvalidFulfillmentHandlerError_Fragment | ErrorResult_ItemsAlreadyFulfilledError_Fragment | ErrorResult_LanguageNotAvailableError_Fragment | ErrorResult_ManualPaymentStateError_Fragment | ErrorResult_MimeTypeError_Fragment | ErrorResult_MissingConditionsError_Fragment | ErrorResult_MultipleOrderError_Fragment | ErrorResult_NativeAuthStrategyError_Fragment | ErrorResult_NegativeQuantityError_Fragment | ErrorResult_NoChangesSpecifiedError_Fragment | ErrorResult_NothingToRefundError_Fragment | ErrorResult_OrderLimitError_Fragment | ErrorResult_OrderModificationStateError_Fragment | ErrorResult_OrderStateTransitionError_Fragment | ErrorResult_PaymentMethodMissingError_Fragment | ErrorResult_PaymentOrderMismatchError_Fragment | ErrorResult_PaymentStateTransitionError_Fragment | ErrorResult_ProductOptionInUseError_Fragment | ErrorResult_QuantityTooGreatError_Fragment | ErrorResult_RefundOrderStateError_Fragment | ErrorResult_RefundPaymentIdMissingError_Fragment | ErrorResult_RefundStateTransitionError_Fragment | ErrorResult_SettlePaymentError_Fragment;
16505
16622
  export declare type ShippingMethodFragment = {
16506
16623
  __typename?: 'ShippingMethod';
16507
16624
  id: string;
@@ -16638,6 +16755,7 @@ export declare type GetShippingMethodOperationsQuery = {
16638
16755
  list: boolean;
16639
16756
  ui?: any | null;
16640
16757
  label?: string | null;
16758
+ description?: string | null;
16641
16759
  }>;
16642
16760
  }>;
16643
16761
  shippingCalculators: Array<{
@@ -16653,6 +16771,7 @@ export declare type GetShippingMethodOperationsQuery = {
16653
16771
  list: boolean;
16654
16772
  ui?: any | null;
16655
16773
  label?: string | null;
16774
+ description?: string | null;
16656
16775
  }>;
16657
16776
  }>;
16658
16777
  fulfillmentHandlers: Array<{
@@ -16668,6 +16787,7 @@ export declare type GetShippingMethodOperationsQuery = {
16668
16787
  list: boolean;
16669
16788
  ui?: any | null;
16670
16789
  label?: string | null;
16790
+ description?: string | null;
16671
16791
  }>;
16672
16792
  }>;
16673
16793
  };
@@ -1 +1 @@
1
- export declare const ADMIN_UI_VERSION = "2.0.0-next.1";
1
+ export declare const ADMIN_UI_VERSION = "2.0.0-next.4";
@@ -7,3 +7,4 @@ export declare const UPDATE_COLLECTION: import("apollo-angular").TypedDocumentNo
7
7
  export declare const MOVE_COLLECTION: import("apollo-angular").TypedDocumentNode<unknown, unknown>;
8
8
  export declare const DELETE_COLLECTION: import("apollo-angular").TypedDocumentNode<unknown, unknown>;
9
9
  export declare const GET_COLLECTION_CONTENTS: import("apollo-angular").TypedDocumentNode<unknown, unknown>;
10
+ export declare const PREVIEW_COLLECTION_CONTENTS: import("apollo-angular").TypedDocumentNode<unknown, unknown>;
@@ -14,6 +14,10 @@ export declare class CollectionDataService {
14
14
  updateCollection(input: Codegen.UpdateCollectionInput): import("rxjs").Observable<Codegen.UpdateCollectionMutation>;
15
15
  moveCollection(inputs: Codegen.MoveCollectionInput[]): import("rxjs").Observable<Codegen.MoveCollectionMutation[]>;
16
16
  deleteCollection(id: string): import("rxjs").Observable<Codegen.DeleteCollectionMutation>;
17
+ previewCollectionVariants(input: Codegen.PreviewCollectionVariantsInput, options: Codegen.ProductVariantListOptions): import("@vendure/admin-ui/core").QueryResult<Codegen.PreviewCollectionContentsQuery, Codegen.Exact<{
18
+ input: Codegen.PreviewCollectionVariantsInput;
19
+ options?: Codegen.InputMaybe<Codegen.ProductVariantListOptions> | undefined;
20
+ }>>;
17
21
  getCollectionContents(id: string, take?: number, skip?: number, filterTerm?: string): import("@vendure/admin-ui/core").QueryResult<Codegen.GetCollectionContentsQuery, Codegen.Exact<{
18
22
  id: string;
19
23
  options?: Codegen.InputMaybe<Codegen.ProductVariantListOptions> | undefined;
@@ -3,7 +3,7 @@ import { BaseDataService } from './base-data.service';
3
3
  export declare class PromotionDataService {
4
4
  private baseDataService;
5
5
  constructor(baseDataService: BaseDataService);
6
- getPromotions(take?: number, skip?: number): import("@vendure/admin-ui/core").QueryResult<Codegen.GetPromotionListQuery, Codegen.Exact<{
6
+ getPromotions(take?: number, skip?: number, filter?: Codegen.PromotionFilterParameter): import("@vendure/admin-ui/core").QueryResult<Codegen.GetPromotionListQuery, Codegen.Exact<{
7
7
  options?: Codegen.InputMaybe<Codegen.PromotionListOptions> | undefined;
8
8
  }>>;
9
9
  getPromotion(id: string): import("@vendure/admin-ui/core").QueryResult<Codegen.GetPromotionQuery, Codegen.Exact<{
@@ -11,6 +11,7 @@ export declare type LocalStorageTypeMap = {
11
11
  orderListLastCustomFilters: any;
12
12
  dashboardWidgetLayout: WidgetLayoutDefinition;
13
13
  activeTheme: string;
14
+ livePreviewCollectionContents: boolean;
14
15
  };
15
16
  export declare type LocalStorageLocationBasedTypeMap = {
16
17
  shippingTestOrder: any;
@@ -187,6 +187,7 @@ export * from './shared/dynamic-form-inputs/product-selector-form-input/product-
187
187
  export * from './shared/dynamic-form-inputs/register-dynamic-input-components';
188
188
  export * from './shared/dynamic-form-inputs/relation-form-input/asset/relation-asset-input.component';
189
189
  export * from './shared/dynamic-form-inputs/relation-form-input/customer/relation-customer-input.component';
190
+ export * from './shared/dynamic-form-inputs/relation-form-input/generic/relation-generic-input.component';
190
191
  export * from './shared/dynamic-form-inputs/relation-form-input/product/relation-product-input.component';
191
192
  export * from './shared/dynamic-form-inputs/relation-form-input/product-variant/relation-product-variant-input.component';
192
193
  export * from './shared/dynamic-form-inputs/relation-form-input/relation-card/relation-card.component';
@@ -1,4 +1,4 @@
1
- import { OnInit } from '@angular/core';
1
+ import { OnChanges } from '@angular/core';
2
2
  import * as i0 from "@angular/core";
3
3
  /**
4
4
  * @description
@@ -11,7 +11,7 @@ import * as i0 from "@angular/core";
11
11
  *
12
12
  * @docsCategory components
13
13
  */
14
- export declare class ObjectTreeComponent implements OnInit {
14
+ export declare class ObjectTreeComponent implements OnChanges {
15
15
  value: {
16
16
  [key: string]: any;
17
17
  } | string;
@@ -24,7 +24,7 @@ export declare class ObjectTreeComponent implements OnInit {
24
24
  value: any;
25
25
  }>;
26
26
  constructor(parent: ObjectTreeComponent);
27
- ngOnInit(): void;
27
+ ngOnChanges(): void;
28
28
  isObject(value: any): boolean;
29
29
  private getEntries;
30
30
  static ɵfac: i0.ɵɵFactoryDeclaration<ObjectTreeComponent, [{ optional: true; skipSelf: true; }]>;
@@ -0,0 +1,18 @@
1
+ import { TemplateRef } from '@angular/core';
2
+ import { FormControl } from '@angular/forms';
3
+ import { RelationCustomFieldConfig } from '../../../../common/generated-types';
4
+ import { ModalService } from '../../../../providers/modal/modal.service';
5
+ import * as i0 from "@angular/core";
6
+ export declare class RelationGenericInputComponent {
7
+ private modalService;
8
+ readonly: boolean;
9
+ parentFormControl: FormControl;
10
+ config: RelationCustomFieldConfig;
11
+ relationId: string;
12
+ template: TemplateRef<any>;
13
+ constructor(modalService: ModalService);
14
+ selectRelationId(): void;
15
+ remove(): void;
16
+ static ɵfac: i0.ɵɵFactoryDeclaration<RelationGenericInputComponent, never>;
17
+ static ɵcmp: i0.ɵɵComponentDeclaration<RelationGenericInputComponent, "vdr-relation-generic-input", never, { "readonly": "readonly"; "parentFormControl": "parentFormControl"; "config": "config"; }, {}, never, never>;
18
+ }