@vendure/admin-ui 2.2.0-next.6 → 2.2.0-next.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/catalog/catalog.module.d.ts +3 -3
  2. package/catalog/components/variant-price-strategy-detail/variant-price-strategy-detail.component.d.ts +10 -0
  3. package/catalog/public_api.d.ts +1 -1
  4. package/core/common/generated-types.d.ts +20 -0
  5. package/core/common/version.d.ts +1 -1
  6. package/core/core.module.d.ts +1 -5
  7. package/core/data/utils/is-entity-create-or-update-mutation.d.ts +6 -0
  8. package/core/data/utils/remove-readonly-custom-fields.d.ts +5 -11
  9. package/core/extension/register-alert.d.ts +11 -0
  10. package/core/providers/alerts/alerts.service.d.ts +107 -7
  11. package/core/providers/modal/modal.service.d.ts +2 -2
  12. package/core/public_api.d.ts +3 -0
  13. package/{catalog → core/shared}/components/assets/assets.component.d.ts +2 -1
  14. package/core/shared/shared.module.d.ts +158 -157
  15. package/esm2022/catalog/catalog.module.mjs +5 -5
  16. package/esm2022/catalog/components/collection-detail/collection-detail.component.mjs +4 -5
  17. package/esm2022/catalog/components/product-detail/product-detail.component.mjs +4 -5
  18. package/esm2022/catalog/components/product-variant-detail/product-variant-detail.component.mjs +5 -5
  19. package/esm2022/catalog/components/variant-price-strategy-detail/variant-price-strategy-detail.component.mjs +33 -0
  20. package/esm2022/catalog/public_api.mjs +2 -2
  21. package/esm2022/core/app.component.mjs +1 -1
  22. package/esm2022/core/common/base-detail.component.mjs +1 -1
  23. package/esm2022/core/common/generated-types.mjs +1 -1
  24. package/esm2022/core/common/introspection-result.mjs +1 -1
  25. package/esm2022/core/common/version.mjs +2 -2
  26. package/esm2022/core/components/breadcrumb/breadcrumb.component.mjs +3 -3
  27. package/esm2022/core/core.module.mjs +16 -18
  28. package/esm2022/core/data/data.module.mjs +1 -1
  29. package/esm2022/core/data/providers/base-data.service.mjs +3 -2
  30. package/esm2022/core/data/utils/is-entity-create-or-update-mutation.mjs +45 -0
  31. package/esm2022/core/data/utils/remove-readonly-custom-fields.mjs +15 -80
  32. package/esm2022/core/extension/register-alert.mjs +22 -0
  33. package/esm2022/core/extension/register-route-component.mjs +1 -1
  34. package/esm2022/core/providers/alerts/alerts.service.mjs +29 -13
  35. package/esm2022/core/providers/modal/modal.service.mjs +3 -3
  36. package/esm2022/core/public_api.mjs +4 -1
  37. package/esm2022/{catalog → core/shared}/components/assets/assets.component.mjs +13 -5
  38. package/esm2022/core/shared/shared.module.mjs +5 -1
  39. package/fesm2022/vendure-admin-ui-catalog.mjs +39 -102
  40. package/fesm2022/vendure-admin-ui-catalog.mjs.map +1 -1
  41. package/fesm2022/vendure-admin-ui-core.mjs +1011 -904
  42. package/fesm2022/vendure-admin-ui-core.mjs.map +1 -1
  43. package/package.json +18 -18
  44. package/static/i18n-messages/ar.json +2 -0
  45. package/static/i18n-messages/cs.json +2 -0
  46. package/static/i18n-messages/de.json +2 -0
  47. package/static/i18n-messages/en.json +2 -0
  48. package/static/i18n-messages/es.json +2 -0
  49. package/static/i18n-messages/fa.json +2 -0
  50. package/static/i18n-messages/fr.json +2 -0
  51. package/static/i18n-messages/he.json +2 -0
  52. package/static/i18n-messages/hr.json +2 -0
  53. package/static/i18n-messages/it.json +2 -0
  54. package/static/i18n-messages/ne.json +2 -0
  55. package/static/i18n-messages/pl.json +2 -0
  56. package/static/i18n-messages/pt_BR.json +2 -0
  57. package/static/i18n-messages/pt_PT.json +2 -0
  58. package/static/i18n-messages/ru.json +2 -0
  59. package/static/i18n-messages/sv.json +8 -14
  60. package/static/i18n-messages/uk.json +2 -0
  61. package/static/i18n-messages/zh_Hans.json +2 -0
  62. package/static/i18n-messages/zh_Hant.json +2 -0
  63. package/static/polyfills.ts +66 -66
  64. package/static/styles/theme/dark.scss +1 -1
  65. package/static/styles/theme/default.scss +1 -1
  66. package/static/theme.min.css +1 -1
  67. package/static/vendure-ui-config.json +2 -1
@@ -7,8 +7,8 @@ import * as i4 from "./components/facet-detail/facet-detail.component";
7
7
  import * as i5 from "./components/generate-product-variants/generate-product-variants.component";
8
8
  import * as i6 from "./components/apply-facet-dialog/apply-facet-dialog.component";
9
9
  import * as i7 from "./components/asset-list/asset-list.component";
10
- import * as i8 from "./components/assets/assets.component";
11
- import * as i9 from "./components/variant-price-detail/variant-price-detail.component";
10
+ import * as i8 from "./components/variant-price-detail/variant-price-detail.component";
11
+ import * as i9 from "./components/variant-price-strategy-detail/variant-price-strategy-detail.component";
12
12
  import * as i10 from "./components/collection-list/collection-list.component";
13
13
  import * as i11 from "./components/collection-detail/collection-detail.component";
14
14
  import * as i12 from "./components/collection-tree/collection-tree.component";
@@ -38,6 +38,6 @@ export declare class CatalogModule {
38
38
  private static hasRegisteredTabsAndBulkActions;
39
39
  constructor(bulkActionRegistryService: BulkActionRegistryService, pageService: PageService);
40
40
  static ɵfac: i0.ɵɵFactoryDeclaration<CatalogModule, never>;
41
- static ɵmod: i0.ɵɵNgModuleDeclaration<CatalogModule, [typeof i1.ProductListComponent, typeof i2.ProductDetailComponent, typeof i3.FacetListComponent, typeof i4.FacetDetailComponent, typeof i5.GenerateProductVariantsComponent, typeof i6.ApplyFacetDialogComponent, typeof i7.AssetListComponent, typeof i8.AssetsComponent, typeof i9.VariantPriceDetailComponent, typeof i10.CollectionListComponent, typeof i11.CollectionDetailComponent, typeof i12.CollectionTreeComponent, typeof i13.CollectionTreeNodeComponent, typeof i14.CollectionContentsComponent, typeof i15.ProductVariantsTableComponent, typeof i16.OptionValueInputComponent, typeof i17.UpdateProductOptionDialogComponent, typeof i18.ProductVariantsEditorComponent, typeof i19.AssignProductsToChannelDialogComponent, typeof i20.AssetDetailComponent, typeof i21.ConfirmVariantDeletionDialogComponent, typeof i22.ProductOptionsEditorComponent, typeof i23.BulkAddFacetValuesDialogComponent, typeof i24.CollectionDataTableComponent, typeof i25.CollectionBreadcrumbPipe, typeof i26.MoveCollectionsDialogComponent, typeof i27.ProductVariantListComponent, typeof i2.ProductDetailComponent, typeof i28.ProductVariantDetailComponent, typeof i29.CreateProductVariantDialogComponent, typeof i30.CreateProductOptionGroupDialogComponent, typeof i31.ProductVariantQuickJumpComponent, typeof i32.CreateFacetValueDialogComponent], [typeof i33.SharedModule, typeof i34.RouterModule], [typeof i1.ProductListComponent, typeof i2.ProductDetailComponent, typeof i3.FacetListComponent, typeof i4.FacetDetailComponent, typeof i5.GenerateProductVariantsComponent, typeof i6.ApplyFacetDialogComponent, typeof i7.AssetListComponent, typeof i8.AssetsComponent, typeof i9.VariantPriceDetailComponent, typeof i10.CollectionListComponent, typeof i11.CollectionDetailComponent, typeof i12.CollectionTreeComponent, typeof i13.CollectionTreeNodeComponent, typeof i14.CollectionContentsComponent, typeof i15.ProductVariantsTableComponent, typeof i16.OptionValueInputComponent, typeof i17.UpdateProductOptionDialogComponent, typeof i18.ProductVariantsEditorComponent, typeof i19.AssignProductsToChannelDialogComponent, typeof i20.AssetDetailComponent, typeof i21.ConfirmVariantDeletionDialogComponent, typeof i22.ProductOptionsEditorComponent, typeof i23.BulkAddFacetValuesDialogComponent, typeof i24.CollectionDataTableComponent, typeof i25.CollectionBreadcrumbPipe, typeof i26.MoveCollectionsDialogComponent, typeof i27.ProductVariantListComponent, typeof i2.ProductDetailComponent, typeof i28.ProductVariantDetailComponent, typeof i29.CreateProductVariantDialogComponent, typeof i30.CreateProductOptionGroupDialogComponent, typeof i31.ProductVariantQuickJumpComponent, typeof i32.CreateFacetValueDialogComponent]>;
41
+ static ɵmod: i0.ɵɵNgModuleDeclaration<CatalogModule, [typeof i1.ProductListComponent, typeof i2.ProductDetailComponent, typeof i3.FacetListComponent, typeof i4.FacetDetailComponent, typeof i5.GenerateProductVariantsComponent, typeof i6.ApplyFacetDialogComponent, typeof i7.AssetListComponent, typeof i8.VariantPriceDetailComponent, typeof i9.VariantPriceStrategyDetailComponent, typeof i10.CollectionListComponent, typeof i11.CollectionDetailComponent, typeof i12.CollectionTreeComponent, typeof i13.CollectionTreeNodeComponent, typeof i14.CollectionContentsComponent, typeof i15.ProductVariantsTableComponent, typeof i16.OptionValueInputComponent, typeof i17.UpdateProductOptionDialogComponent, typeof i18.ProductVariantsEditorComponent, typeof i19.AssignProductsToChannelDialogComponent, typeof i20.AssetDetailComponent, typeof i21.ConfirmVariantDeletionDialogComponent, typeof i22.ProductOptionsEditorComponent, typeof i23.BulkAddFacetValuesDialogComponent, typeof i24.CollectionDataTableComponent, typeof i25.CollectionBreadcrumbPipe, typeof i26.MoveCollectionsDialogComponent, typeof i27.ProductVariantListComponent, typeof i2.ProductDetailComponent, typeof i28.ProductVariantDetailComponent, typeof i29.CreateProductVariantDialogComponent, typeof i30.CreateProductOptionGroupDialogComponent, typeof i31.ProductVariantQuickJumpComponent, typeof i32.CreateFacetValueDialogComponent], [typeof i33.SharedModule, typeof i34.RouterModule], [typeof i1.ProductListComponent, typeof i2.ProductDetailComponent, typeof i3.FacetListComponent, typeof i4.FacetDetailComponent, typeof i5.GenerateProductVariantsComponent, typeof i6.ApplyFacetDialogComponent, typeof i7.AssetListComponent, typeof i8.VariantPriceDetailComponent, typeof i9.VariantPriceStrategyDetailComponent, typeof i10.CollectionListComponent, typeof i11.CollectionDetailComponent, typeof i12.CollectionTreeComponent, typeof i13.CollectionTreeNodeComponent, typeof i14.CollectionContentsComponent, typeof i15.ProductVariantsTableComponent, typeof i16.OptionValueInputComponent, typeof i17.UpdateProductOptionDialogComponent, typeof i18.ProductVariantsEditorComponent, typeof i19.AssignProductsToChannelDialogComponent, typeof i20.AssetDetailComponent, typeof i21.ConfirmVariantDeletionDialogComponent, typeof i22.ProductOptionsEditorComponent, typeof i23.BulkAddFacetValuesDialogComponent, typeof i24.CollectionDataTableComponent, typeof i25.CollectionBreadcrumbPipe, typeof i26.MoveCollectionsDialogComponent, typeof i27.ProductVariantListComponent, typeof i2.ProductDetailComponent, typeof i28.ProductVariantDetailComponent, typeof i29.CreateProductVariantDialogComponent, typeof i30.CreateProductOptionGroupDialogComponent, typeof i31.ProductVariantQuickJumpComponent, typeof i32.CreateFacetValueDialogComponent]>;
42
42
  static ɵinj: i0.ɵɵInjectorDeclaration<CatalogModule>;
43
43
  }
@@ -0,0 +1,10 @@
1
+ import { CurrencyCode, ProductVariantDetailQueryProductVariantFragmentFragment } from '@vendure/admin-ui/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class VariantPriceStrategyDetailComponent {
4
+ channelPriceIncludesTax: boolean;
5
+ variant: ProductVariantDetailQueryProductVariantFragmentFragment;
6
+ channelDefaultCurrencyCode: CurrencyCode;
7
+ calculatedPriceDiffersFromInputPrice(): boolean;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<VariantPriceStrategyDetailComponent, never>;
9
+ static ɵcmp: i0.ɵɵComponentDeclaration<VariantPriceStrategyDetailComponent, "vdr-variant-price-strategy-detail", never, { "channelPriceIncludesTax": { "alias": "channelPriceIncludesTax"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "channelDefaultCurrencyCode": { "alias": "channelDefaultCurrencyCode"; "required": false; }; }, {}, never, never, false, never>;
10
+ }
@@ -3,7 +3,6 @@ export * from './catalog.routes';
3
3
  export * from './components/apply-facet-dialog/apply-facet-dialog.component';
4
4
  export * from './components/asset-detail/asset-detail.component';
5
5
  export * from './components/asset-list/asset-list.component';
6
- export * from './components/assets/assets.component';
7
6
  export * from './components/assign-products-to-channel-dialog/assign-products-to-channel-dialog.component';
8
7
  export * from './components/bulk-add-facet-values-dialog/bulk-add-facet-values-dialog.component';
9
8
  export * from './components/bulk-add-facet-values-dialog/bulk-add-facet-values-dialog.graphql';
@@ -43,6 +42,7 @@ export * from './components/product-variants-editor/product-variants-editor.comp
43
42
  export * from './components/product-variants-table/product-variants-table.component';
44
43
  export * from './components/update-product-option-dialog/update-product-option-dialog.component';
45
44
  export * from './components/variant-price-detail/variant-price-detail.component';
45
+ export * from './components/variant-price-strategy-detail/variant-price-strategy-detail.component';
46
46
  export * from './providers/product-detail/product-detail.service';
47
47
  export * from './providers/product-detail/replace-last';
48
48
  export * from './providers/routing/product-variants-resolver';
@@ -583,6 +583,12 @@ export type CoordinateInput = {
583
583
  x: Scalars['Float']['input'];
584
584
  y: Scalars['Float']['input'];
585
585
  };
586
+ /**
587
+ * A Country of the world which your shop operates in.
588
+ *
589
+ * The `code` field is typically a 2-character ISO code such as "GB", "US", "DE" etc. This code is used in certain inputs such as
590
+ * `UpdateAddressInput` and `CreateAddressInput` to specify the country.
591
+ */
586
592
  export type Country = Node & Region & {
587
593
  __typename?: 'Country';
588
594
  code: Scalars['String']['output'];
@@ -665,6 +671,13 @@ export type CouponCodeLimitError = ErrorResult & {
665
671
  limit: Scalars['Int']['output'];
666
672
  message: Scalars['String']['output'];
667
673
  };
674
+ /**
675
+ * Input used to create an Address.
676
+ *
677
+ * The countryCode must correspond to a `code` property of a Country that has been defined in the
678
+ * Vendure server. The `code` property is typically a 2-character ISO code such as "GB", "US", "DE" etc.
679
+ * If an invalid code is passed, the mutation will fail.
680
+ */
668
681
  export type CreateAddressInput = {
669
682
  city?: InputMaybe<Scalars['String']['input']>;
670
683
  company?: InputMaybe<Scalars['String']['input']>;
@@ -5480,6 +5493,13 @@ export type UpdateActiveAdministratorInput = {
5480
5493
  lastName?: InputMaybe<Scalars['String']['input']>;
5481
5494
  password?: InputMaybe<Scalars['String']['input']>;
5482
5495
  };
5496
+ /**
5497
+ * Input used to update an Address.
5498
+ *
5499
+ * The countryCode must correspond to a `code` property of a Country that has been defined in the
5500
+ * Vendure server. The `code` property is typically a 2-character ISO code such as "GB", "US", "DE" etc.
5501
+ * If an invalid code is passed, the mutation will fail.
5502
+ */
5483
5503
  export type UpdateAddressInput = {
5484
5504
  city?: InputMaybe<Scalars['String']['input']>;
5485
5505
  company?: InputMaybe<Scalars['String']['input']>;
@@ -1 +1 @@
1
- export declare const ADMIN_UI_VERSION = "2.2.0-next.6";
1
+ export declare const ADMIN_UI_VERSION = "2.2.0-next.7";
@@ -1,12 +1,10 @@
1
1
  import { PlatformLocation } from '@angular/common';
2
2
  import { HttpClient } from '@angular/common/http';
3
3
  import { Title } from '@angular/platform-browser';
4
- import { DataService } from './data/providers/data.service';
5
4
  import { AlertsService } from './providers/alerts/alerts.service';
6
5
  import { CustomHttpTranslationLoader } from './providers/i18n/custom-http-loader';
7
6
  import { I18nService } from './providers/i18n/i18n.service';
8
7
  import { LocalStorageService } from './providers/local-storage/local-storage.service';
9
- import { NotificationService } from './providers/notification/notification.service';
10
8
  import * as i0 from "@angular/core";
11
9
  import * as i1 from "./components/app-shell/app-shell.component";
12
10
  import * as i2 from "./components/user-menu/user-menu.component";
@@ -30,9 +28,7 @@ export declare class CoreModule {
30
28
  private localStorageService;
31
29
  private titleService;
32
30
  private alertsService;
33
- private dataService;
34
- private notificationService;
35
- constructor(i18nService: I18nService, localStorageService: LocalStorageService, titleService: Title, alertsService: AlertsService, dataService: DataService, notificationService: NotificationService);
31
+ constructor(i18nService: I18nService, localStorageService: LocalStorageService, titleService: Title, alertsService: AlertsService);
36
32
  private initUiLanguagesAndLocales;
37
33
  private initUiTitle;
38
34
  private initAlerts;
@@ -0,0 +1,6 @@
1
+ import { DocumentNode } from 'graphql';
2
+ /**
3
+ * Checks the current documentNode for an operation with a variable named "Create<Entity>Input" or "Update<Entity>Input"
4
+ * and if a match is found, returns the <Entity> name.
5
+ */
6
+ export declare function isEntityCreateOrUpdateMutation(documentNode: DocumentNode): string | undefined;
@@ -1,4 +1,3 @@
1
- import { DocumentNode } from 'graphql';
2
1
  import { CustomFieldConfig } from '../../common/generated-types';
3
2
  type InputWithOptionalCustomFields = Record<string, any> & {
4
3
  customFields?: Record<string, any>;
@@ -6,18 +5,13 @@ type InputWithOptionalCustomFields = Record<string, any> & {
6
5
  type EntityInput = InputWithOptionalCustomFields & {
7
6
  translations?: InputWithOptionalCustomFields[];
8
7
  };
9
- /**
10
- * Checks the current documentNode for an operation with a variable named "Create<Entity>Input" or "Update<Entity>Input"
11
- * and if a match is found, returns the <Entity> name.
12
- */
13
- export declare function isEntityCreateOrUpdateMutation(documentNode: DocumentNode): string | undefined;
8
+ type Variable = EntityInput | EntityInput[];
9
+ type WrappedVariable = {
10
+ input: Variable;
11
+ };
14
12
  /**
15
13
  * Removes any `readonly` custom fields from an entity (including its translations).
16
14
  * To be used before submitting the entity for a create or update request.
17
15
  */
18
- export declare function removeReadonlyCustomFields(variables: {
19
- input?: EntityInput | EntityInput[];
20
- } | EntityInput | EntityInput[], customFieldConfig: CustomFieldConfig[]): {
21
- input?: EntityInput | EntityInput[];
22
- } | EntityInput | EntityInput[];
16
+ export declare function removeReadonlyCustomFields(variables: Variable | WrappedVariable | WrappedVariable[], customFieldConfig: CustomFieldConfig[]): any;
23
17
  export {};
@@ -0,0 +1,11 @@
1
+ import { FactoryProvider } from '@angular/core';
2
+ import { AlertConfig } from '../providers/alerts/alerts.service';
3
+ /**
4
+ * @description
5
+ * Registers an alert which can be displayed in the Admin UI alert dropdown in the top bar.
6
+ * The alert is configured using the {@link AlertConfig} object.
7
+ *
8
+ * @since 2.2.0
9
+ * @docsCategory alerts
10
+ */
11
+ export declare function registerAlert(config: AlertConfig): FactoryProvider;
@@ -1,19 +1,113 @@
1
+ import { Injector } from '@angular/core';
1
2
  import { Observable } from 'rxjs';
2
3
  import { Permission } from '../../common/generated-types';
4
+ import { DataService } from '../../data/providers/data.service';
5
+ import { ModalService } from '../modal/modal.service';
6
+ import { NotificationService } from '../notification/notification.service';
3
7
  import { PermissionsService } from '../permissions/permissions.service';
4
8
  import * as i0 from "@angular/core";
9
+ /**
10
+ * @description
11
+ * The context object which is passed to the `check`, `isAlert`, `label` and `action` functions of an
12
+ * {@link AlertConfig} object.
13
+ *
14
+ * @since 2.2.0
15
+ * @docsCategory alerts
16
+ */
17
+ export interface AlertContext {
18
+ /**
19
+ * @description
20
+ * The Angular [Injector](https://angular.dev/api/core/Injector) which can be used to get instances
21
+ * of services and other providers available in the application.
22
+ */
23
+ injector: Injector;
24
+ /**
25
+ * @description
26
+ * The [DataService](/reference/admin-ui-api/services/data-service), which provides methods for querying the
27
+ * server-side data.
28
+ */
29
+ dataService: DataService;
30
+ /**
31
+ * @description
32
+ * The [NotificationService](/reference/admin-ui-api/services/notification-service), which provides methods for
33
+ * displaying notifications to the user.
34
+ */
35
+ notificationService: NotificationService;
36
+ /**
37
+ * @description
38
+ * The [ModalService](/reference/admin-ui-api/services/modal-service), which provides methods for
39
+ * opening modal dialogs.
40
+ */
41
+ modalService: ModalService;
42
+ }
43
+ /**
44
+ * @description
45
+ * A configuration object for an Admin UI alert.
46
+ *
47
+ * @since 2.2.0
48
+ * @docsCategory alerts
49
+ */
5
50
  export interface AlertConfig<T = any> {
51
+ /**
52
+ * @description
53
+ * A unique identifier for the alert.
54
+ */
6
55
  id: string;
7
- check: () => T | Promise<T> | Observable<T>;
8
- recheckIntervalMs?: number;
9
- isAlert: (value: T) => boolean;
10
- action: (data: T) => void;
11
- label: (data: T) => {
56
+ /**
57
+ * @description
58
+ * A function which is gets the data used to determine whether the alert should be shown.
59
+ * Typically, this function will query the server or some other remote data source.
60
+ *
61
+ * This function will be called once when the Admin UI app bootstraps, and can be also
62
+ * set to run at regular intervals by setting the `recheckIntervalMs` property.
63
+ */
64
+ check: (context: AlertContext) => T | Promise<T> | Observable<T>;
65
+ /**
66
+ * @description
67
+ * A function which returns an Observable which is used to determine when to re-run the `check`
68
+ * function. Whenever the observable emits, the `check` function will be called again.
69
+ *
70
+ * A basic time-interval-based recheck can be achieved by using the `interval` function from RxJS.
71
+ *
72
+ * @example
73
+ * ```ts
74
+ * import { interval } from 'rxjs';
75
+ *
76
+ * // ...
77
+ * recheck: () => interval(60_000)
78
+ * ```
79
+ *
80
+ * If this is not set, the `check` function will only be called once when the Admin UI app bootstraps.
81
+ *
82
+ * @default undefined
83
+ */
84
+ recheck?: (context: AlertContext) => Observable<any>;
85
+ /**
86
+ * @description
87
+ * A function which determines whether the alert should be shown based on the data returned by the `check`
88
+ * function.
89
+ */
90
+ isAlert: (data: T, context: AlertContext) => boolean;
91
+ /**
92
+ * @description
93
+ * A function which is called when the alert is clicked in the Admin UI.
94
+ */
95
+ action: (data: T, context: AlertContext) => void;
96
+ /**
97
+ * @description
98
+ * A function which returns the text used in the UI to describe the alert.
99
+ */
100
+ label: (data: T, context: AlertContext) => {
12
101
  text: string;
13
102
  translationVars?: {
14
103
  [key: string]: string | number;
15
104
  };
16
105
  };
106
+ /**
107
+ * @description
108
+ * A list of permissions which the current Administrator must have in order. If the current
109
+ * Administrator does not have these permissions, none of the other alert functions will be called.
110
+ */
17
111
  requiredPermissions?: Permission[];
18
112
  }
19
113
  export interface ActiveAlert {
@@ -29,22 +123,28 @@ export interface ActiveAlert {
29
123
  }
30
124
  export declare class Alert<T> {
31
125
  private config;
126
+ private context;
32
127
  activeAlert$: Observable<ActiveAlert | undefined>;
33
128
  private hasRun$;
34
129
  private data$;
35
- constructor(config: AlertConfig<T>);
130
+ constructor(config: AlertConfig<T>, context: AlertContext);
36
131
  get id(): string;
37
132
  runCheck(): void;
38
133
  }
39
134
  export declare class AlertsService {
40
135
  private permissionsService;
136
+ private injector;
137
+ private dataService;
138
+ private notificationService;
139
+ private modalService;
41
140
  activeAlerts$: Observable<ActiveAlert[]>;
42
141
  private alertsMap;
43
142
  private configUpdated;
44
- constructor(permissionsService: PermissionsService);
143
+ constructor(permissionsService: PermissionsService, injector: Injector, dataService: DataService, notificationService: NotificationService, modalService: ModalService);
45
144
  configureAlert<T>(config: AlertConfig<T>): void;
46
145
  hasSufficientPermissions(permissions?: Permission[]): Observable<boolean>;
47
146
  refresh(id?: string): void;
147
+ protected createContext(): AlertContext;
48
148
  static ɵfac: i0.ɵɵFactoryDeclaration<AlertsService, never>;
49
149
  static ɵprov: i0.ɵɵInjectableDeclaration<AlertsService>;
50
150
  }
@@ -22,7 +22,7 @@ export declare class ModalService {
22
22
  * displayed in the modal dialog. See example:
23
23
  *
24
24
  * @example
25
- * ```HTML
25
+ * ```ts
26
26
  * class MyDialog implements Dialog {
27
27
  * resolveWith: (result?: any) => void;
28
28
  *
@@ -39,7 +39,7 @@ export declare class ModalService {
39
39
  * ```
40
40
  *
41
41
  * @example
42
- * ```HTML
42
+ * ```html
43
43
  * <ng-template vdrDialogTitle>Title of the modal</ng-template>
44
44
  *
45
45
  * <p>
@@ -71,6 +71,7 @@ export * from './data/query-result';
71
71
  export * from './data/server-config';
72
72
  export * from './data/utils/add-custom-fields';
73
73
  export * from './data/utils/get-server-location';
74
+ export * from './data/utils/is-entity-create-or-update-mutation';
74
75
  export * from './data/utils/remove-readonly-custom-fields';
75
76
  export * from './data/utils/transform-relation-custom-field-inputs';
76
77
  export * from './extension/add-action-bar-dropdown-menu-item';
@@ -79,6 +80,7 @@ export * from './extension/add-nav-menu-item';
79
80
  export * from './extension/components/angular-route.component';
80
81
  export * from './extension/components/route.component';
81
82
  export * from './extension/providers/page-metadata.service';
83
+ export * from './extension/register-alert';
82
84
  export * from './extension/register-bulk-action';
83
85
  export * from './extension/register-custom-detail-component';
84
86
  export * from './extension/register-dashboard-widget';
@@ -138,6 +140,7 @@ export * from './shared/components/asset-preview/asset-preview.component';
138
140
  export * from './shared/components/asset-preview-dialog/asset-preview-dialog.component';
139
141
  export * from './shared/components/asset-preview-links/asset-preview-links.component';
140
142
  export * from './shared/components/asset-search-input/asset-search-input.component';
143
+ export * from './shared/components/assets/assets.component';
141
144
  export * from './shared/components/assign-to-channel-dialog/assign-to-channel-dialog.component';
142
145
  export * from './shared/components/bulk-action-menu/bulk-action-menu.component';
143
146
  export * from './shared/components/card/card.component';
@@ -1,6 +1,7 @@
1
1
  import { CdkDragDrop } from '@angular/cdk/drag-drop';
2
2
  import { ChangeDetectorRef, EventEmitter } from '@angular/core';
3
- import { Asset, ModalService, Permission } from '@vendure/admin-ui/core';
3
+ import { Asset, Permission } from '../../../common/generated-types';
4
+ import { ModalService } from '../../../providers/modal/modal.service';
4
5
  import * as i0 from "@angular/core";
5
6
  export interface AssetChange {
6
7
  assets: Asset[];