@vendure/admin-ui 2.0.0-next.21 → 2.0.0-next.23

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 (87) hide show
  1. package/catalog/components/bulk-add-facet-values-dialog/bulk-add-facet-values-dialog.component.d.ts +0 -1
  2. package/catalog/components/product-detail/product-detail.component.d.ts +2 -7
  3. package/catalog/components/product-variants-list/product-variants-list.component.d.ts +10 -10
  4. package/catalog/providers/product-detail/product-detail.service.d.ts +1 -2
  5. package/core/common/generated-types.d.ts +72 -0
  6. package/core/common/version.d.ts +1 -1
  7. package/core/data/definitions/facet-definitions.d.ts +1 -0
  8. package/core/data/providers/facet-data.service.d.ts +4 -0
  9. package/core/providers/custom-history-entry-component/history-entry-component-types.d.ts +81 -0
  10. package/core/providers/custom-history-entry-component/history-entry-component.service.d.ts +19 -0
  11. package/core/public_api.d.ts +2 -1
  12. package/core/shared/components/facet-value-selector/facet-value-selector.component.d.ts +16 -16
  13. package/core/shared/dynamic-form-inputs/facet-value-form-input/facet-value-form-input.component.d.ts +3 -11
  14. package/core/shared/dynamic-form-inputs/register-dynamic-input-components.d.ts +1 -2
  15. package/customer/components/customer-detail/customer-detail.component.d.ts +3 -3
  16. package/customer/components/customer-history/customer-history-entry-host.component.d.ts +19 -0
  17. package/customer/components/customer-history/customer-history.component.d.ts +38 -10
  18. package/customer/customer.module.d.ts +4 -3
  19. package/customer/public_api.d.ts +1 -0
  20. package/esm2020/catalog/components/apply-facet-dialog/apply-facet-dialog.component.mjs +3 -3
  21. package/esm2020/catalog/components/bulk-add-facet-values-dialog/bulk-add-facet-values-dialog.component.mjs +3 -4
  22. package/esm2020/catalog/components/facet-detail/facet-detail.component.mjs +11 -6
  23. package/esm2020/catalog/components/product-detail/product-detail.component.mjs +17 -48
  24. package/esm2020/catalog/components/product-list/product-list-bulk-actions.mjs +4 -7
  25. package/esm2020/catalog/components/product-variants-list/product-variants-list.component.mjs +39 -33
  26. package/esm2020/catalog/providers/product-detail/product-detail.service.mjs +1 -4
  27. package/esm2020/core/common/generated-types.mjs +1 -1
  28. package/esm2020/core/common/introspection-result.mjs +2 -1
  29. package/esm2020/core/common/version.mjs +2 -2
  30. package/esm2020/core/data/data.module.mjs +8 -1
  31. package/esm2020/core/data/definitions/facet-definitions.mjs +12 -1
  32. package/esm2020/core/data/providers/facet-data.service.mjs +5 -2
  33. package/esm2020/core/providers/custom-history-entry-component/history-entry-component-types.mjs +2 -0
  34. package/esm2020/core/providers/custom-history-entry-component/history-entry-component.service.mjs +40 -0
  35. package/esm2020/core/public_api.mjs +3 -2
  36. package/esm2020/core/shared/components/facet-value-selector/facet-value-selector.component.mjs +52 -25
  37. package/esm2020/core/shared/components/timeline-entry/timeline-entry.component.mjs +3 -3
  38. package/esm2020/core/shared/dynamic-form-inputs/facet-value-form-input/facet-value-form-input.component.mjs +8 -18
  39. package/esm2020/customer/components/customer-detail/customer-detail.component.mjs +2 -1
  40. package/esm2020/customer/components/customer-history/customer-history-entry-host.component.mjs +64 -0
  41. package/esm2020/customer/components/customer-history/customer-history.component.mjs +16 -10
  42. package/esm2020/customer/customer.module.mjs +5 -2
  43. package/esm2020/customer/providers/routing/customer-resolver.mjs +5 -3
  44. package/esm2020/customer/public_api.mjs +2 -1
  45. package/esm2020/login/components/login/login.component.mjs +36 -9
  46. package/esm2020/order/components/order-detail/order-detail.component.mjs +1 -1
  47. package/esm2020/order/components/order-history/order-history-entry-host.component.mjs +64 -0
  48. package/esm2020/order/components/order-history/order-history.component.mjs +19 -14
  49. package/esm2020/order/order.module.mjs +8 -5
  50. package/esm2020/order/public_api.mjs +2 -1
  51. package/esm2020/settings/components/admin-detail/admin-detail.component.mjs +5 -4
  52. package/fesm2015/vendure-admin-ui-catalog.mjs +69 -96
  53. package/fesm2015/vendure-admin-ui-catalog.mjs.map +1 -1
  54. package/fesm2015/vendure-admin-ui-core.mjs +167 -90
  55. package/fesm2015/vendure-admin-ui-core.mjs.map +1 -1
  56. package/fesm2015/vendure-admin-ui-customer.mjs +93 -21
  57. package/fesm2015/vendure-admin-ui-customer.mjs.map +1 -1
  58. package/fesm2015/vendure-admin-ui-login.mjs +35 -8
  59. package/fesm2015/vendure-admin-ui-login.mjs.map +1 -1
  60. package/fesm2015/vendure-admin-ui-order.mjs +76 -8
  61. package/fesm2015/vendure-admin-ui-order.mjs.map +1 -1
  62. package/fesm2015/vendure-admin-ui-settings.mjs +4 -3
  63. package/fesm2015/vendure-admin-ui-settings.mjs.map +1 -1
  64. package/fesm2020/vendure-admin-ui-catalog.mjs +68 -96
  65. package/fesm2020/vendure-admin-ui-catalog.mjs.map +1 -1
  66. package/fesm2020/vendure-admin-ui-core.mjs +165 -90
  67. package/fesm2020/vendure-admin-ui-core.mjs.map +1 -1
  68. package/fesm2020/vendure-admin-ui-customer.mjs +92 -21
  69. package/fesm2020/vendure-admin-ui-customer.mjs.map +1 -1
  70. package/fesm2020/vendure-admin-ui-login.mjs +35 -8
  71. package/fesm2020/vendure-admin-ui-login.mjs.map +1 -1
  72. package/fesm2020/vendure-admin-ui-order.mjs +75 -8
  73. package/fesm2020/vendure-admin-ui-order.mjs.map +1 -1
  74. package/fesm2020/vendure-admin-ui-settings.mjs +4 -3
  75. package/fesm2020/vendure-admin-ui-settings.mjs.map +1 -1
  76. package/login/components/login/login.component.d.ts +9 -1
  77. package/order/components/order-detail/order-detail.component.d.ts +3 -3
  78. package/order/components/order-history/order-history-entry-host.component.d.ts +19 -0
  79. package/order/components/order-history/order-history.component.d.ts +40 -13
  80. package/order/order.module.d.ts +4 -3
  81. package/order/public_api.d.ts +1 -0
  82. package/package.json +2 -2
  83. package/static/i18n-messages/de.json +3 -1
  84. package/static/i18n-messages/en.json +3 -1
  85. package/static/styles/_variables.scss +1 -0
  86. package/core/common/utilities/flatten-facet-values.d.ts +0 -2
  87. package/esm2020/core/common/utilities/flatten-facet-values.mjs +0 -4
@@ -23,7 +23,6 @@ export declare class BulkAddFacetValuesDialogComponent implements OnInit, OnDest
23
23
  resolveWith: (result?: FacetWithValuesFragment[]) => void;
24
24
  mode: 'product' | 'variant';
25
25
  ids?: string[];
26
- facets: FacetWithValuesFragment[];
27
26
  state: 'loading' | 'ready' | 'saving';
28
27
  selectedValues: FacetWithValuesFragment[];
29
28
  items: ProductOrVariant[];
@@ -2,7 +2,7 @@ import { Location } from '@angular/common';
2
2
  import { ChangeDetectorRef, OnDestroy, OnInit } from '@angular/core';
3
3
  import { FormBuilder, FormControl, FormGroup } from '@angular/forms';
4
4
  import { ActivatedRoute, Router } from '@angular/router';
5
- import { BaseDetailComponent, CustomFieldConfig, DataService, FacetWithValuesFragment, GetProductWithVariantsQuery, LanguageCode, ModalService, NotificationService, Permission, ProductDetailFragment, ProductVariantFragment, ServerConfigService, TaxCategoryFragment, UpdateProductOptionInput } from '@vendure/admin-ui/core';
5
+ import { BaseDetailComponent, CustomFieldConfig, DataService, GetProductWithVariantsQuery, LanguageCode, ModalService, NotificationService, Permission, ProductDetailFragment, ProductVariantFragment, ServerConfigService, TaxCategoryFragment, UpdateProductOptionInput } from '@vendure/admin-ui/core';
6
6
  import { BehaviorSubject, Observable } from 'rxjs';
7
7
  import { ProductDetailService } from '../../providers/product-detail/product-detail.service';
8
8
  import { CreateProductVariantsConfig } from '../generate-product-variants/generate-product-variants.component';
@@ -32,11 +32,10 @@ export declare class ProductDetailComponent extends BaseDetailComponent<NonNulla
32
32
  [variantId: string]: SelectedAssets;
33
33
  };
34
34
  variantFacetValueChanges: {
35
- [variantId: string]: string[];
35
+ [variantId: string]: ProductVariantFragment['facetValues'];
36
36
  };
37
37
  productChannels$: Observable<ProductDetailFragment['channels']>;
38
38
  facetValues$: Observable<ProductDetailFragment['facetValues']>;
39
- facets$: Observable<FacetWithValuesFragment[]>;
40
39
  totalItems$: Observable<number>;
41
40
  currentPage$: BehaviorSubject<number>;
42
41
  itemsPerPage$: BehaviorSubject<number>;
@@ -73,10 +72,6 @@ export declare class ProductDetailComponent extends BaseDetailComponent<NonNulla
73
72
  autoUpdate: boolean;
74
73
  }): void;
75
74
  removeProductFacetValue(facetValueId: string): void;
76
- /**
77
- * Opens a dialog to select FacetValues to apply to the select ProductVariants.
78
- */
79
- selectVariantFacetValue(selectedVariantIds: string[]): void;
80
75
  variantsToCreateAreValid(): boolean;
81
76
  private displayFacetValueModal;
82
77
  create(): void;
@@ -1,13 +1,14 @@
1
- import { ChangeDetectorRef, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
1
+ import { ChangeDetectorRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
2
2
  import { FormArray, FormGroup } from '@angular/forms';
3
- import { CustomFieldConfig, DataService, FacetValueFragment, FacetWithValuesFragment, GlobalFlag, LanguageCode, ModalService, Permission, ProductDetailFragment, ProductOptionFragment, ProductVariantFragment, TaxCategory, UpdateProductOptionInput } from '@vendure/admin-ui/core';
3
+ import { CustomFieldConfig, DataService, GlobalFlag, LanguageCode, ModalService, Permission, ProductDetailFragment, ProductOptionFragment, ProductVariantFragment, TaxCategory, UpdateProductOptionInput } from '@vendure/admin-ui/core';
4
+ import { Subscription } from 'rxjs';
4
5
  import { AssetChange } from '../assets/assets.component';
5
6
  import { PaginationConfig, SelectedAssets } from '../product-detail/product-detail.types';
6
7
  import * as i0 from "@angular/core";
7
8
  export interface VariantAssetChange extends AssetChange {
8
9
  variantId: string;
9
10
  }
10
- export declare class ProductVariantsListComponent implements OnChanges, OnInit, OnDestroy {
11
+ export declare class ProductVariantsListComponent implements OnInit, OnDestroy {
11
12
  private changeDetector;
12
13
  private modalService;
13
14
  private dataService;
@@ -16,7 +17,6 @@ export declare class ProductVariantsListComponent implements OnChanges, OnInit,
16
17
  paginationConfig: PaginationConfig;
17
18
  channelPriceIncludesTax: boolean;
18
19
  taxCategories: TaxCategory[];
19
- facets: FacetWithValuesFragment[];
20
20
  optionGroups: ProductDetailFragment['optionGroups'];
21
21
  customFields: CustomFieldConfig[];
22
22
  customOptionFields: CustomFieldConfig[];
@@ -24,6 +24,9 @@ export declare class ProductVariantsListComponent implements OnChanges, OnInit,
24
24
  pendingAssetChanges: {
25
25
  [variantId: string]: SelectedAssets;
26
26
  };
27
+ pendingFacetValueChanges: {
28
+ [variantId: string]: ProductVariantFragment['facetValues'];
29
+ };
27
30
  assignToChannel: EventEmitter<ProductVariantFragment>;
28
31
  removeFromChannel: EventEmitter<{
29
32
  channelId: string;
@@ -31,7 +34,6 @@ export declare class ProductVariantsListComponent implements OnChanges, OnInit,
31
34
  }>;
32
35
  assetChange: EventEmitter<VariantAssetChange>;
33
36
  selectionChange: EventEmitter<string[]>;
34
- selectFacetValueClick: EventEmitter<string[]>;
35
37
  updateProductOption: EventEmitter<UpdateProductOptionInput & {
36
38
  autoUpdate: boolean;
37
39
  }>;
@@ -41,11 +43,9 @@ export declare class ProductVariantsListComponent implements OnChanges, OnInit,
41
43
  globalTrackInventory: boolean;
42
44
  globalOutOfStockThreshold: number;
43
45
  readonly updatePermission: Permission[];
44
- private facetValues;
45
46
  private subscription;
46
47
  constructor(changeDetector: ChangeDetectorRef, modalService: ModalService, dataService: DataService);
47
48
  ngOnInit(): void;
48
- ngOnChanges(changes: SimpleChanges): void;
49
49
  ngOnDestroy(): void;
50
50
  isDefaultChannel(channelCode: string): boolean;
51
51
  trackById(index: number, item: ProductVariantFragment): string;
@@ -59,8 +59,7 @@ export declare class ProductVariantsListComponent implements OnChanges, OnInit,
59
59
  toggleSelectVariant(variantId: string): void;
60
60
  optionGroupName(optionGroupId: string): string | undefined;
61
61
  optionName(option: ProductOptionFragment): string;
62
- pendingFacetValues(variant: ProductVariantFragment): FacetValueFragment[];
63
- existingFacetValues(variant: ProductVariantFragment): {
62
+ currentOrPendingFacetValues(variant: ProductVariantFragment): {
64
63
  __typename?: "FacetValue" | undefined;
65
64
  id: string;
66
65
  code: string;
@@ -71,11 +70,12 @@ export declare class ProductVariantsListComponent implements OnChanges, OnInit,
71
70
  name: string;
72
71
  };
73
72
  }[];
73
+ selectFacetValue(variant: ProductVariantFragment): Subscription;
74
74
  removeFacetValue(variant: ProductVariantFragment, facetValueId: string): void;
75
75
  isVariantSelected(variantId: string): boolean;
76
76
  editOption(option: ProductVariantFragment['options'][number]): void;
77
77
  private buildFormGroupMap;
78
78
  private getFacetValueIds;
79
79
  static ɵfac: i0.ɵɵFactoryDeclaration<ProductVariantsListComponent, never>;
80
- static ɵcmp: i0.ɵɵComponentDeclaration<ProductVariantsListComponent, "vdr-product-variants-list", never, { "formArray": "productVariantsFormArray"; "variants": "variants"; "paginationConfig": "paginationConfig"; "channelPriceIncludesTax": "channelPriceIncludesTax"; "taxCategories": "taxCategories"; "facets": "facets"; "optionGroups": "optionGroups"; "customFields": "customFields"; "customOptionFields": "customOptionFields"; "activeLanguage": "activeLanguage"; "pendingAssetChanges": "pendingAssetChanges"; }, { "assignToChannel": "assignToChannel"; "removeFromChannel": "removeFromChannel"; "assetChange": "assetChange"; "selectionChange": "selectionChange"; "selectFacetValueClick": "selectFacetValueClick"; "updateProductOption": "updateProductOption"; }, never, never>;
80
+ static ɵcmp: i0.ɵɵComponentDeclaration<ProductVariantsListComponent, "vdr-product-variants-list", never, { "formArray": "productVariantsFormArray"; "variants": "variants"; "paginationConfig": "paginationConfig"; "channelPriceIncludesTax": "channelPriceIncludesTax"; "taxCategories": "taxCategories"; "optionGroups": "optionGroups"; "customFields": "customFields"; "customOptionFields": "customOptionFields"; "activeLanguage": "activeLanguage"; "pendingAssetChanges": "pendingAssetChanges"; "pendingFacetValueChanges": "pendingFacetValueChanges"; }, { "assignToChannel": "assignToChannel"; "removeFromChannel": "removeFromChannel"; "assetChange": "assetChange"; "selectionChange": "selectionChange"; "updateProductOption": "updateProductOption"; }, never, never>;
81
81
  }
@@ -1,4 +1,4 @@
1
- import { CreateProductInput, DataService, FacetWithValuesFragment, GetProductWithVariantsQuery, LanguageCode, UpdateProductInput, UpdateProductMutation, UpdateProductOptionInput, UpdateProductVariantInput, UpdateProductVariantsMutation } from '@vendure/admin-ui/core';
1
+ import { CreateProductInput, DataService, GetProductWithVariantsQuery, LanguageCode, UpdateProductInput, UpdateProductMutation, UpdateProductOptionInput, UpdateProductVariantInput, UpdateProductVariantsMutation } from '@vendure/admin-ui/core';
2
2
  import { Observable } from 'rxjs';
3
3
  import { CreateProductVariantsConfig } from '../../components/generate-product-variants/generate-product-variants.component';
4
4
  import * as i0 from "@angular/core";
@@ -9,7 +9,6 @@ import * as i0 from "@angular/core";
9
9
  export declare class ProductDetailService {
10
10
  private dataService;
11
11
  constructor(dataService: DataService);
12
- getFacets(): Observable<FacetWithValuesFragment[]>;
13
12
  getTaxCategories(): Observable<{
14
13
  __typename?: "TaxCategory" | undefined;
15
14
  id: string;
@@ -275,6 +275,7 @@ export declare type BooleanListOperators = {
275
275
  /** Operators for filtering on a Boolean field */
276
276
  export declare type BooleanOperators = {
277
277
  eq?: InputMaybe<Scalars['Boolean']>;
278
+ isNull?: InputMaybe<Scalars['Boolean']>;
278
279
  };
279
280
  /** Returned if an attempting to cancel lines from an Order which is still active */
280
281
  export declare type CancelActiveOrderError = ErrorResult & {
@@ -1245,6 +1246,7 @@ export declare type DateOperators = {
1245
1246
  before?: InputMaybe<Scalars['DateTime']>;
1246
1247
  between?: InputMaybe<DateRange>;
1247
1248
  eq?: InputMaybe<Scalars['DateTime']>;
1249
+ isNull?: InputMaybe<Scalars['Boolean']>;
1248
1250
  };
1249
1251
  export declare type DateRange = {
1250
1252
  end: Scalars['DateTime'];
@@ -1450,6 +1452,31 @@ export declare type FacetValueFilterInput = {
1450
1452
  and?: InputMaybe<Scalars['ID']>;
1451
1453
  or?: InputMaybe<Array<Scalars['ID']>>;
1452
1454
  };
1455
+ export declare type FacetValueFilterParameter = {
1456
+ code?: InputMaybe<StringOperators>;
1457
+ createdAt?: InputMaybe<DateOperators>;
1458
+ id?: InputMaybe<IdOperators>;
1459
+ languageCode?: InputMaybe<StringOperators>;
1460
+ name?: InputMaybe<StringOperators>;
1461
+ updatedAt?: InputMaybe<DateOperators>;
1462
+ };
1463
+ export declare type FacetValueList = PaginatedList & {
1464
+ __typename?: 'FacetValueList';
1465
+ items: Array<FacetValue>;
1466
+ totalItems: Scalars['Int'];
1467
+ };
1468
+ export declare type FacetValueListOptions = {
1469
+ /** Allows the results to be filtered */
1470
+ filter?: InputMaybe<FacetValueFilterParameter>;
1471
+ /** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */
1472
+ filterOperator?: InputMaybe<LogicalOperator>;
1473
+ /** Skips the first n results, for use in pagination */
1474
+ skip?: InputMaybe<Scalars['Int']>;
1475
+ /** Specifies which properties to sort the results by */
1476
+ sort?: InputMaybe<FacetValueSortParameter>;
1477
+ /** Takes n results, for use in pagination */
1478
+ take?: InputMaybe<Scalars['Int']>;
1479
+ };
1453
1480
  /**
1454
1481
  * Which FacetValues are present in the products returned
1455
1482
  * by the search, and in what quantity.
@@ -1459,6 +1486,13 @@ export declare type FacetValueResult = {
1459
1486
  count: Scalars['Int'];
1460
1487
  facetValue: FacetValue;
1461
1488
  };
1489
+ export declare type FacetValueSortParameter = {
1490
+ code?: InputMaybe<SortOrder>;
1491
+ createdAt?: InputMaybe<SortOrder>;
1492
+ id?: InputMaybe<SortOrder>;
1493
+ name?: InputMaybe<SortOrder>;
1494
+ updatedAt?: InputMaybe<SortOrder>;
1495
+ };
1462
1496
  export declare type FacetValueTranslation = {
1463
1497
  __typename?: 'FacetValueTranslation';
1464
1498
  createdAt: Scalars['DateTime'];
@@ -1608,6 +1642,7 @@ export declare type IdListOperators = {
1608
1642
  export declare type IdOperators = {
1609
1643
  eq?: InputMaybe<Scalars['String']>;
1610
1644
  in?: InputMaybe<Array<Scalars['String']>>;
1645
+ isNull?: InputMaybe<Scalars['Boolean']>;
1611
1646
  notEq?: InputMaybe<Scalars['String']>;
1612
1647
  notIn?: InputMaybe<Array<Scalars['String']>>;
1613
1648
  };
@@ -2922,6 +2957,7 @@ export declare type NumberOperators = {
2922
2957
  eq?: InputMaybe<Scalars['Float']>;
2923
2958
  gt?: InputMaybe<Scalars['Float']>;
2924
2959
  gte?: InputMaybe<Scalars['Float']>;
2960
+ isNull?: InputMaybe<Scalars['Boolean']>;
2925
2961
  lt?: InputMaybe<Scalars['Float']>;
2926
2962
  lte?: InputMaybe<Scalars['Float']>;
2927
2963
  };
@@ -3861,6 +3897,7 @@ export declare type Query = {
3861
3897
  /** Returns a list of eligible shipping methods for the draft Order */
3862
3898
  eligibleShippingMethodsForDraftOrder: Array<ShippingMethodQuote>;
3863
3899
  facet?: Maybe<Facet>;
3900
+ facetValues: FacetValueList;
3864
3901
  facets: FacetList;
3865
3902
  fulfillmentHandlers: Array<ConfigurableOperationDefinition>;
3866
3903
  globalSettings: GlobalSettings;
@@ -3960,6 +3997,9 @@ export declare type QueryEligibleShippingMethodsForDraftOrderArgs = {
3960
3997
  export declare type QueryFacetArgs = {
3961
3998
  id: Scalars['ID'];
3962
3999
  };
4000
+ export declare type QueryFacetValuesArgs = {
4001
+ options?: InputMaybe<FacetValueListOptions>;
4002
+ };
3963
4003
  export declare type QueryFacetsArgs = {
3964
4004
  options?: InputMaybe<FacetListOptions>;
3965
4005
  };
@@ -4459,6 +4499,7 @@ export declare type StringOperators = {
4459
4499
  contains?: InputMaybe<Scalars['String']>;
4460
4500
  eq?: InputMaybe<Scalars['String']>;
4461
4501
  in?: InputMaybe<Array<Scalars['String']>>;
4502
+ isNull?: InputMaybe<Scalars['Boolean']>;
4462
4503
  notContains?: InputMaybe<Scalars['String']>;
4463
4504
  notEq?: InputMaybe<Scalars['String']>;
4464
4505
  notIn?: InputMaybe<Array<Scalars['String']>>;
@@ -7010,6 +7051,37 @@ export declare type GetFacetListQuery = {
7010
7051
  }>;
7011
7052
  };
7012
7053
  };
7054
+ export declare type GetFacetValueListQueryVariables = Exact<{
7055
+ options?: InputMaybe<FacetValueListOptions>;
7056
+ }>;
7057
+ export declare type GetFacetValueListQuery = {
7058
+ facetValues: {
7059
+ __typename?: 'FacetValueList';
7060
+ totalItems: number;
7061
+ items: Array<{
7062
+ __typename?: 'FacetValue';
7063
+ id: string;
7064
+ createdAt: any;
7065
+ updatedAt: any;
7066
+ languageCode: LanguageCode;
7067
+ code: string;
7068
+ name: string;
7069
+ translations: Array<{
7070
+ __typename?: 'FacetValueTranslation';
7071
+ id: string;
7072
+ languageCode: LanguageCode;
7073
+ name: string;
7074
+ }>;
7075
+ facet: {
7076
+ __typename?: 'Facet';
7077
+ id: string;
7078
+ createdAt: any;
7079
+ updatedAt: any;
7080
+ name: string;
7081
+ };
7082
+ }>;
7083
+ };
7084
+ };
7013
7085
  export declare type GetFacetWithValuesQueryVariables = Exact<{
7014
7086
  id: Scalars['ID'];
7015
7087
  }>;
@@ -1 +1 @@
1
- export declare const ADMIN_UI_VERSION = "2.0.0-next.21";
1
+ export declare const ADMIN_UI_VERSION = "2.0.0-next.23";
@@ -8,6 +8,7 @@ export declare const CREATE_FACET_VALUES: import("apollo-angular").TypedDocument
8
8
  export declare const UPDATE_FACET_VALUES: import("apollo-angular").TypedDocumentNode<unknown, unknown>;
9
9
  export declare const DELETE_FACET_VALUES: import("apollo-angular").TypedDocumentNode<unknown, unknown>;
10
10
  export declare const GET_FACET_LIST: import("apollo-angular").TypedDocumentNode<unknown, unknown>;
11
+ export declare const GET_FACET_VALUE_LIST: import("apollo-angular").TypedDocumentNode<unknown, unknown>;
11
12
  export declare const GET_FACET_WITH_VALUES: import("apollo-angular").TypedDocumentNode<unknown, unknown>;
12
13
  export declare const ASSIGN_FACETS_TO_CHANNEL: import("apollo-angular").TypedDocumentNode<unknown, unknown>;
13
14
  export declare const REMOVE_FACETS_FROM_CHANNEL: import("apollo-angular").TypedDocumentNode<unknown, unknown>;
@@ -1,3 +1,4 @@
1
+ import { WatchQueryFetchPolicy } from '@apollo/client/core';
1
2
  import * as Codegen from '../../common/generated-types';
2
3
  import { BaseDataService } from './base-data.service';
3
4
  export declare class FacetDataService {
@@ -6,6 +7,9 @@ export declare class FacetDataService {
6
7
  getFacets(take?: number, skip?: number): import("@vendure/admin-ui/core").QueryResult<Codegen.GetFacetListQuery, Codegen.Exact<{
7
8
  options?: Codegen.InputMaybe<Codegen.FacetListOptions> | undefined;
8
9
  }>>;
10
+ getFacetValues(options: Codegen.FacetValueListOptions, fetchPolicy?: WatchQueryFetchPolicy): import("@vendure/admin-ui/core").QueryResult<Codegen.GetFacetValueListQuery, Codegen.Exact<{
11
+ options?: Codegen.InputMaybe<Codegen.FacetValueListOptions> | undefined;
12
+ }>>;
9
13
  getAllFacets(): import("@vendure/admin-ui/core").QueryResult<Codegen.GetFacetListQuery, Codegen.Exact<{
10
14
  options?: Codegen.InputMaybe<Codegen.FacetListOptions> | undefined;
11
15
  }>>;
@@ -0,0 +1,81 @@
1
+ import { Type } from '@angular/core';
2
+ import { CustomerFragment, GetOrderHistoryQuery, OrderDetailFragment } from '../../common/generated-types';
3
+ import { TimelineDisplayType } from '../../shared/components/timeline-entry/timeline-entry.component';
4
+ export declare type TimelineHistoryEntry = NonNullable<GetOrderHistoryQuery['order']>['history']['items'][number];
5
+ /**
6
+ * @description
7
+ * This interface should be implemented by components intended to display a history entry in the
8
+ * Order or Customer history timeline. If the component needs access to the Order or Customer object itself,
9
+ * you should implement {@link OrderHistoryEntryComponent} or {@link CustomerHistoryEntryComponent} respectively.
10
+ *
11
+ * @since 1.9.0
12
+ * @docsCategory custom-history-entry-components
13
+ */
14
+ export interface HistoryEntryComponent {
15
+ /**
16
+ * @description
17
+ * The HistoryEntry data.
18
+ */
19
+ entry: TimelineHistoryEntry;
20
+ /**
21
+ * @description
22
+ * Defines whether this entry is highlighted with a "success", "error" etc. color.
23
+ */
24
+ getDisplayType: (entry: TimelineHistoryEntry) => TimelineDisplayType;
25
+ /**
26
+ * @description
27
+ * Featured entries are always expanded. Non-featured entries start of collapsed and can be clicked
28
+ * to expand.
29
+ */
30
+ isFeatured: (entry: TimelineHistoryEntry) => boolean;
31
+ /**
32
+ * @description
33
+ * Returns the name of the person who did this action. For example, it could be the Customer's name
34
+ * or "Administrator".
35
+ */
36
+ getName?: (entry: TimelineHistoryEntry) => string | undefined;
37
+ /**
38
+ * @description
39
+ * Optional Clarity icon shape to display with the entry. Examples: `'note'`, `['success-standard', 'is-solid']`
40
+ */
41
+ getIconShape?: (entry: TimelineHistoryEntry) => string | string[] | undefined;
42
+ }
43
+ /**
44
+ * @description
45
+ * Used to implement a {@link HistoryEntryComponent} which requires access to the Order object.
46
+ *
47
+ * @since 1.9.0
48
+ * @docsCategory custom-history-entry-components
49
+ */
50
+ export interface OrderHistoryEntryComponent extends HistoryEntryComponent {
51
+ order: OrderDetailFragment;
52
+ }
53
+ /**
54
+ * @description
55
+ * Used to implement a {@link HistoryEntryComponent} which requires access to the Customer object.
56
+ *
57
+ * @since 1.9.0
58
+ * @docsCategory custom-history-entry-components
59
+ */
60
+ export interface CustomerHistoryEntryComponent extends HistoryEntryComponent {
61
+ customer: CustomerFragment;
62
+ }
63
+ /**
64
+ * @description
65
+ * Configuration for registering a custom {@link HistoryEntryComponent}.
66
+ *
67
+ * @since 1.9.0
68
+ * @docsCategory custom-history-entry-components
69
+ */
70
+ export interface HistoryEntryConfig {
71
+ /**
72
+ * @description
73
+ * The type should correspond to the custom HistoryEntryType string.
74
+ */
75
+ type: string;
76
+ /**
77
+ * @description
78
+ * The component to be rendered for this history entry type.
79
+ */
80
+ component: Type<HistoryEntryComponent>;
81
+ }
@@ -0,0 +1,19 @@
1
+ import { Provider, Type } from '@angular/core';
2
+ import { HistoryEntryComponent, HistoryEntryConfig } from './history-entry-component-types';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * @description
6
+ * Registers a {@link HistoryEntryComponent} for displaying history entries in the Order/Customer
7
+ * history timeline.
8
+ *
9
+ * @since 1.9.0
10
+ * @docsCategory custom-history-entry-components
11
+ */
12
+ export declare function registerHistoryEntryComponent(config: HistoryEntryConfig): Provider;
13
+ export declare class HistoryEntryComponentService {
14
+ private customEntryComponents;
15
+ registerComponent(config: HistoryEntryConfig): void;
16
+ getComponent(type: string): Type<HistoryEntryComponent> | undefined;
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<HistoryEntryComponentService, never>;
18
+ static ɵprov: i0.ɵɵInjectableDeclaration<HistoryEntryComponentService>;
19
+ }
@@ -15,7 +15,6 @@ export * from './common/utilities/bulk-action-utils';
15
15
  export * from './common/utilities/configurable-operation-utils';
16
16
  export * from './common/utilities/create-updated-translatable';
17
17
  export * from './common/utilities/find-translation';
18
- export * from './common/utilities/flatten-facet-values';
19
18
  export * from './common/utilities/get-default-ui-language';
20
19
  export * from './common/utilities/interpolate-description';
21
20
  export * from './common/utilities/selection-manager';
@@ -77,6 +76,8 @@ export * from './providers/component-registry/component-registry.service';
77
76
  export * from './providers/custom-detail-component/custom-detail-component-types';
78
77
  export * from './providers/custom-detail-component/custom-detail-component.service';
79
78
  export * from './providers/custom-field-component/custom-field-component.service';
79
+ export * from './providers/custom-history-entry-component/history-entry-component-types';
80
+ export * from './providers/custom-history-entry-component/history-entry-component.service';
80
81
  export * from './providers/dashboard-widget/dashboard-widget-types';
81
82
  export * from './providers/dashboard-widget/dashboard-widget.service';
82
83
  export * from './providers/dashboard-widget/register-dashboard-widget';
@@ -1,14 +1,9 @@
1
- import { EventEmitter, OnInit } from '@angular/core';
1
+ import { ChangeDetectorRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
2
2
  import { ControlValueAccessor } from '@angular/forms';
3
- import { FacetValueFragment, FacetWithValuesFragment } from '../../../common/generated-types';
3
+ import { Observable, Subject } from 'rxjs';
4
+ import { FacetValueFragment } from '../../../common/generated-types';
4
5
  import { DataService } from '../../../data/providers/data.service';
5
6
  import * as i0 from "@angular/core";
6
- export declare type FacetValueSeletorItem = {
7
- name: string;
8
- facetName: string;
9
- id: string;
10
- value: FacetValueFragment;
11
- };
12
7
  /**
13
8
  * @description
14
9
  * A form control for selecting facet values.
@@ -31,27 +26,32 @@ export declare type FacetValueSeletorItem = {
31
26
  * ```
32
27
  * @docsCategory components
33
28
  */
34
- export declare class FacetValueSelectorComponent implements OnInit, ControlValueAccessor {
29
+ export declare class FacetValueSelectorComponent implements OnInit, OnDestroy, ControlValueAccessor {
35
30
  private dataService;
31
+ private changeDetectorRef;
36
32
  selectedValuesChange: EventEmitter<FacetValueFragment[]>;
37
- facets: FacetWithValuesFragment[];
38
33
  readonly: boolean;
39
- transformControlValueAccessorValue: (value: FacetValueSeletorItem[]) => any[];
34
+ transformControlValueAccessorValue: (value: FacetValueFragment[]) => any[];
35
+ searchInput$: Subject<string>;
36
+ searchLoading: boolean;
37
+ searchResults$: Observable<FacetValueFragment[]>;
38
+ selectedIds$: Subject<string[]>;
40
39
  private ngSelect;
41
- facetValues: FacetValueSeletorItem[];
42
40
  onChangeFn: (val: any) => void;
43
41
  onTouchFn: () => void;
44
42
  disabled: boolean;
45
43
  value: Array<string | FacetValueFragment>;
46
- constructor(dataService: DataService);
44
+ private subscription;
45
+ constructor(dataService: DataService, changeDetectorRef: ChangeDetectorRef);
47
46
  ngOnInit(): void;
48
- onChange(selected: FacetValueSeletorItem[]): void;
47
+ private initSearchResults;
48
+ ngOnDestroy(): void;
49
+ onChange(selected: FacetValueFragment[]): void;
49
50
  registerOnChange(fn: any): void;
50
51
  registerOnTouched(fn: any): void;
51
52
  setDisabledState(isDisabled: boolean): void;
52
53
  focus(): void;
53
54
  writeValue(obj: string | FacetValueFragment[] | Array<string | number> | null): void;
54
- private toSelectorItem;
55
55
  static ɵfac: i0.ɵɵFactoryDeclaration<FacetValueSelectorComponent, never>;
56
- static ɵcmp: i0.ɵɵComponentDeclaration<FacetValueSelectorComponent, "vdr-facet-value-selector", never, { "facets": "facets"; "readonly": "readonly"; "transformControlValueAccessorValue": "transformControlValueAccessorValue"; }, { "selectedValuesChange": "selectedValuesChange"; }, never, never>;
56
+ static ɵcmp: i0.ɵɵComponentDeclaration<FacetValueSelectorComponent, "vdr-facet-value-selector", never, { "readonly": "readonly"; "transformControlValueAccessorValue": "transformControlValueAccessorValue"; }, { "selectedValuesChange": "selectedValuesChange"; }, never, never>;
57
57
  }
@@ -1,11 +1,7 @@
1
- import { OnInit } from '@angular/core';
2
1
  import { FormControl } from '@angular/forms';
3
2
  import { DefaultFormComponentId } from '@vendure/common/lib/shared-types';
4
- import { Observable } from 'rxjs';
5
3
  import { FormInputComponent, InputComponentConfig } from '../../../common/component-registry-types';
6
- import { FacetWithValuesFragment } from '../../../common/generated-types';
7
- import { DataService } from '../../../data/providers/data.service';
8
- import { FacetValueSeletorItem } from '../../components/facet-value-selector/facet-value-selector.component';
4
+ import { FacetValueFragment } from '../../../common/generated-types';
9
5
  import * as i0 from "@angular/core";
10
6
  /**
11
7
  * @description
@@ -15,17 +11,13 @@ import * as i0 from "@angular/core";
15
11
  * @docsCategory custom-input-components
16
12
  * @docsPage default-inputs
17
13
  */
18
- export declare class FacetValueFormInputComponent implements FormInputComponent, OnInit {
19
- private dataService;
14
+ export declare class FacetValueFormInputComponent implements FormInputComponent {
20
15
  static readonly id: DefaultFormComponentId;
21
16
  readonly isListInput = true;
22
17
  readonly: boolean;
23
18
  formControl: FormControl;
24
- facets$: Observable<FacetWithValuesFragment[]>;
25
19
  config: InputComponentConfig;
26
- constructor(dataService: DataService);
27
- ngOnInit(): void;
28
- valueTransformFn: (values: FacetValueSeletorItem[]) => string | FacetValueSeletorItem[];
20
+ valueTransformFn: (values: FacetValueFragment[]) => string | FacetValueFragment[];
29
21
  static ɵfac: i0.ɵɵFactoryDeclaration<FacetValueFormInputComponent, never>;
30
22
  static ɵcmp: i0.ɵɵComponentDeclaration<FacetValueFormInputComponent, "vdr-facet-value-form-input", never, {}, {}, never, never>;
31
23
  }
@@ -6,12 +6,11 @@ import { JsonEditorFormInputComponent } from './code-editor-form-input/json-edit
6
6
  import { CombinationModeFormInputComponent } from './combination-mode-form-input/combination-mode-form-input.component';
7
7
  import { CurrencyFormInputComponent } from './currency-form-input/currency-form-input.component';
8
8
  import { CustomerGroupFormInputComponent } from './customer-group-form-input/customer-group-form-input.component';
9
- import { FacetValueFormInputComponent } from './facet-value-form-input/facet-value-form-input.component';
10
9
  import { PasswordFormInputComponent } from './password-form-input/password-form-input.component';
11
10
  import { ProductMultiSelectorFormInputComponent } from './product-multi-selector-form-input/product-multi-selector-form-input.component';
12
11
  import { ProductSelectorFormInputComponent } from './product-selector-form-input/product-selector-form-input.component';
13
12
  import { SelectFormInputComponent } from './select-form-input/select-form-input.component';
14
- export declare const defaultFormInputs: (typeof HtmlEditorFormInputComponent | typeof JsonEditorFormInputComponent | typeof CombinationModeFormInputComponent | typeof CurrencyFormInputComponent | typeof CustomerGroupFormInputComponent | typeof FacetValueFormInputComponent | typeof PasswordFormInputComponent | typeof ProductMultiSelectorFormInputComponent | typeof ProductSelectorFormInputComponent | typeof SelectFormInputComponent)[];
13
+ export declare const defaultFormInputs: (typeof HtmlEditorFormInputComponent | typeof JsonEditorFormInputComponent | typeof CombinationModeFormInputComponent | typeof CurrencyFormInputComponent | typeof CustomerGroupFormInputComponent | typeof PasswordFormInputComponent | typeof ProductMultiSelectorFormInputComponent | typeof ProductSelectorFormInputComponent | typeof SelectFormInputComponent)[];
15
14
  /**
16
15
  * @description
17
16
  * Registers a custom FormInputComponent which can be used to control the argument inputs
@@ -1,7 +1,7 @@
1
1
  import { ChangeDetectorRef, OnDestroy, OnInit } from '@angular/core';
2
2
  import { FormBuilder, FormControl, FormGroup } from '@angular/forms';
3
3
  import { ActivatedRoute, Router } from '@angular/router';
4
- import { BaseDetailComponent, CustomFieldConfig, DataService, GetAvailableCountriesQuery, GetCustomerHistoryQuery, GetCustomerQuery, HistoryEntry, ModalService, NotificationService, ServerConfigService } from '@vendure/admin-ui/core';
4
+ import { BaseDetailComponent, CustomFieldConfig, DataService, GetAvailableCountriesQuery, GetCustomerHistoryQuery, GetCustomerQuery, TimelineHistoryEntry, ModalService, NotificationService, ServerConfigService } from '@vendure/admin-ui/core';
5
5
  import { Observable, Subject } from 'rxjs';
6
6
  import * as i0 from "@angular/core";
7
7
  declare type CustomerWithOrders = NonNullable<GetCustomerQuery['customer']>;
@@ -43,8 +43,8 @@ export declare class CustomerDetailComponent extends BaseDetailComponent<Custome
43
43
  addNoteToCustomer({ note }: {
44
44
  note: string;
45
45
  }): void;
46
- updateNote(entry: HistoryEntry): void;
47
- deleteNote(entry: HistoryEntry): import("rxjs").Subscription;
46
+ updateNote(entry: TimelineHistoryEntry): void;
47
+ deleteNote(entry: TimelineHistoryEntry): import("rxjs").Subscription;
48
48
  protected setFormValues(entity: CustomerWithOrders): void;
49
49
  /**
50
50
  * Refetch the customer with the current order list settings.
@@ -0,0 +1,19 @@
1
+ import { ComponentFactoryResolver, EventEmitter, OnDestroy, OnInit, ViewContainerRef } from '@angular/core';
2
+ import { CustomerFragment, CustomerHistoryEntryComponent, HistoryEntryComponentService, TimelineHistoryEntry } from '@vendure/admin-ui/core';
3
+ import * as i0 from "@angular/core";
4
+ export declare class CustomerHistoryEntryHostComponent implements OnInit, OnDestroy {
5
+ private componentFactoryResolver;
6
+ private historyEntryComponentService;
7
+ entry: TimelineHistoryEntry;
8
+ customer: CustomerFragment;
9
+ expanded: boolean;
10
+ expandClick: EventEmitter<void>;
11
+ portalRef: ViewContainerRef;
12
+ instance: CustomerHistoryEntryComponent;
13
+ private componentRef;
14
+ constructor(componentFactoryResolver: ComponentFactoryResolver, historyEntryComponentService: HistoryEntryComponentService);
15
+ ngOnInit(): void;
16
+ ngOnDestroy(): void;
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<CustomerHistoryEntryHostComponent, never>;
18
+ static ɵcmp: i0.ɵɵComponentDeclaration<CustomerHistoryEntryHostComponent, "vdr-customer-history-entry-host", ["historyEntry"], { "entry": "entry"; "customer": "customer"; "expanded": "expanded"; }, { "expandClick": "expandClick"; }, never, never>;
19
+ }
@@ -1,23 +1,51 @@
1
1
  import { EventEmitter } from '@angular/core';
2
- import { CustomerFragment, GetCustomerHistoryQuery, HistoryEntry, HistoryEntryType, TimelineDisplayType } from '@vendure/admin-ui/core';
2
+ import { CustomerFragment, HistoryEntryComponentService, HistoryEntryType, TimelineDisplayType, TimelineHistoryEntry } from '@vendure/admin-ui/core';
3
3
  import * as i0 from "@angular/core";
4
- declare type HistoryItem = NonNullable<GetCustomerHistoryQuery['customer']>['history']['items'][number];
5
4
  export declare class CustomerHistoryComponent {
5
+ private historyEntryComponentService;
6
6
  customer: CustomerFragment;
7
- history: HistoryItem[];
7
+ history: TimelineHistoryEntry[];
8
8
  addNote: EventEmitter<{
9
9
  note: string;
10
10
  }>;
11
- updateNote: EventEmitter<HistoryEntry>;
12
- deleteNote: EventEmitter<HistoryEntry>;
11
+ updateNote: EventEmitter<{
12
+ __typename?: "HistoryEntry" | undefined;
13
+ id: string;
14
+ type: HistoryEntryType;
15
+ createdAt: any;
16
+ isPublic: boolean;
17
+ data: any;
18
+ administrator?: {
19
+ __typename?: "Administrator" | undefined;
20
+ id: string;
21
+ firstName: string;
22
+ lastName: string;
23
+ } | null | undefined;
24
+ }>;
25
+ deleteNote: EventEmitter<{
26
+ __typename?: "HistoryEntry" | undefined;
27
+ id: string;
28
+ type: HistoryEntryType;
29
+ createdAt: any;
30
+ isPublic: boolean;
31
+ data: any;
32
+ administrator?: {
33
+ __typename?: "Administrator" | undefined;
34
+ id: string;
35
+ firstName: string;
36
+ lastName: string;
37
+ } | null | undefined;
38
+ }>;
13
39
  note: string;
40
+ expanded: boolean;
14
41
  readonly type: typeof HistoryEntryType;
15
- getDisplayType(entry: HistoryItem): TimelineDisplayType;
16
- getTimelineIcon(entry: HistoryItem): string | [string, string] | undefined;
17
- isFeatured(entry: HistoryItem): boolean;
18
- getName(entry: HistoryItem): string;
42
+ constructor(historyEntryComponentService: HistoryEntryComponentService);
43
+ hasCustomComponent(type: string): boolean;
44
+ getDisplayType(entry: TimelineHistoryEntry): TimelineDisplayType;
45
+ getTimelineIcon(entry: TimelineHistoryEntry): string | [string, string] | undefined;
46
+ isFeatured(entry: TimelineHistoryEntry): boolean;
47
+ getName(entry: TimelineHistoryEntry): string;
19
48
  addNoteToCustomer(): void;
20
49
  static ɵfac: i0.ɵɵFactoryDeclaration<CustomerHistoryComponent, never>;
21
50
  static ɵcmp: i0.ɵɵComponentDeclaration<CustomerHistoryComponent, "vdr-customer-history", never, { "customer": "customer"; "history": "history"; }, { "addNote": "addNote"; "updateNote": "updateNote"; "deleteNote": "deleteNote"; }, never, never>;
22
51
  }
23
- export {};