@vendure/admin-ui 1.4.3 → 1.4.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 (51) hide show
  1. package/bundles/vendure-admin-ui-catalog.umd.js +68 -28
  2. package/bundles/vendure-admin-ui-catalog.umd.js.map +1 -1
  3. package/bundles/vendure-admin-ui-core.umd.js +101 -40
  4. package/bundles/vendure-admin-ui-core.umd.js.map +1 -1
  5. package/bundles/vendure-admin-ui-dashboard.umd.js.map +1 -1
  6. package/bundles/vendure-admin-ui-settings.umd.js +1 -1
  7. package/bundles/vendure-admin-ui-settings.umd.js.map +1 -1
  8. package/catalog/components/facet-detail/facet-detail.component.d.ts +7 -2
  9. package/catalog/vendure-admin-ui-catalog.metadata.json +1 -1
  10. package/core/common/generated-types.d.ts +7 -7
  11. package/core/common/version.d.ts +1 -1
  12. package/core/data/utils/remove-readonly-custom-fields.d.ts +12 -3
  13. package/core/providers/i18n/i18n.service.d.ts +3 -1
  14. package/core/shared/directives/if-default-channel-active.directive.d.ts +1 -1
  15. package/core/shared/directives/if-multichannel.directive.d.ts +1 -1
  16. package/core/shared/pipes/locale-base.pipe.d.ts +5 -0
  17. package/core/vendure-admin-ui-core.metadata.json +1 -1
  18. package/esm2015/catalog/components/facet-detail/facet-detail.component.js +44 -16
  19. package/esm2015/catalog/components/product-list/product-list.component.js +2 -2
  20. package/esm2015/core/common/base-detail.component.js +4 -4
  21. package/esm2015/core/common/generated-types.js +1 -1
  22. package/esm2015/core/common/introspection-result.js +1 -1
  23. package/esm2015/core/common/utilities/create-updated-translatable.js +1 -1
  24. package/esm2015/core/common/version.js +2 -2
  25. package/esm2015/core/components/main-nav/main-nav.component.js +3 -3
  26. package/esm2015/core/data/utils/remove-readonly-custom-fields.js +15 -3
  27. package/esm2015/core/providers/i18n/i18n.service.js +14 -5
  28. package/esm2015/core/shared/components/rich-text-editor/prosemirror/prosemirror.service.js +2 -2
  29. package/esm2015/core/shared/components/tabbed-custom-fields/tabbed-custom-fields.component.js +3 -2
  30. package/esm2015/core/shared/directives/if-default-channel-active.directive.js +2 -2
  31. package/esm2015/core/shared/directives/if-multichannel.directive.js +2 -2
  32. package/esm2015/core/shared/dynamic-form-inputs/select-form-input/select-form-input.component.js +2 -2
  33. package/esm2015/core/shared/pipes/asset-preview.pipe.js +2 -2
  34. package/esm2015/core/shared/pipes/locale-base.pipe.js +23 -1
  35. package/esm2015/core/shared/pipes/locale-currency-name.pipe.js +4 -4
  36. package/esm2015/core/shared/pipes/locale-currency.pipe.js +2 -2
  37. package/esm2015/core/shared/pipes/locale-date.pipe.js +2 -2
  38. package/esm2015/core/shared/pipes/locale-language-name.pipe.js +2 -3
  39. package/esm2015/core/shared/pipes/locale-region-name.pipe.js +2 -3
  40. package/esm2015/dashboard/widgets/latest-orders-widget/latest-orders-widget.component.js +1 -1
  41. package/esm2015/settings/components/channel-list/channel-list.component.js +2 -2
  42. package/fesm2015/vendure-admin-ui-catalog.js +44 -16
  43. package/fesm2015/vendure-admin-ui-catalog.js.map +1 -1
  44. package/fesm2015/vendure-admin-ui-core.js +66 -26
  45. package/fesm2015/vendure-admin-ui-core.js.map +1 -1
  46. package/fesm2015/vendure-admin-ui-dashboard.js.map +1 -1
  47. package/fesm2015/vendure-admin-ui-settings.js +1 -1
  48. package/fesm2015/vendure-admin-ui-settings.js.map +1 -1
  49. package/package.json +11 -11
  50. package/settings/vendure-admin-ui-settings.metadata.json +1 -1
  51. package/static/i18n-messages/pt_PT.json +22 -22
@@ -1235,7 +1235,7 @@ export declare type Discount = {
1235
1235
  amount: Scalars['Int'];
1236
1236
  amountWithTax: Scalars['Int'];
1237
1237
  };
1238
- /** Retured when attemting to create a Customer with an email address already registered to an existing User. */
1238
+ /** Returned when attempting to create a Customer with an email address already registered to an existing User. */
1239
1239
  export declare type EmailAddressConflictError = ErrorResult & {
1240
1240
  __typename?: 'EmailAddressConflictError';
1241
1241
  errorCode: ErrorCode;
@@ -2653,14 +2653,14 @@ export declare type NativeAuthInput = {
2653
2653
  username: Scalars['String'];
2654
2654
  password: Scalars['String'];
2655
2655
  };
2656
- /** Retured when attempting an operation that relies on the NativeAuthStrategy, if that strategy is not configured. */
2656
+ /** Returned when attempting an operation that relies on the NativeAuthStrategy, if that strategy is not configured. */
2657
2657
  export declare type NativeAuthStrategyError = ErrorResult & {
2658
2658
  __typename?: 'NativeAuthStrategyError';
2659
2659
  errorCode: ErrorCode;
2660
2660
  message: Scalars['String'];
2661
2661
  };
2662
2662
  export declare type NativeAuthenticationResult = CurrentUser | InvalidCredentialsError | NativeAuthStrategyError;
2663
- /** Retured when attemting to set a negative OrderLine quantity. */
2663
+ /** Returned when attempting to set a negative OrderLine quantity. */
2664
2664
  export declare type NegativeQuantityError = ErrorResult & {
2665
2665
  __typename?: 'NegativeQuantityError';
2666
2666
  errorCode: ErrorCode;
@@ -2827,7 +2827,7 @@ export declare type OrderItem = Node & {
2827
2827
  fulfillment?: Maybe<Fulfillment>;
2828
2828
  refundId?: Maybe<Scalars['ID']>;
2829
2829
  };
2830
- /** Retured when the maximum order size limit has been reached. */
2830
+ /** Returned when the maximum order size limit has been reached. */
2831
2831
  export declare type OrderLimitError = ErrorResult & {
2832
2832
  __typename?: 'OrderLimitError';
2833
2833
  errorCode: ErrorCode;
@@ -3578,7 +3578,7 @@ export declare type Query = {
3578
3578
  assets: AssetList;
3579
3579
  channel?: Maybe<Channel>;
3580
3580
  channels: Array<Channel>;
3581
- /** Get a Collection either by id or slug. If neither id nor slug is speicified, an error will result. */
3581
+ /** Get a Collection either by id or slug. If neither id nor slug is specified, an error will result. */
3582
3582
  collection?: Maybe<Collection>;
3583
3583
  collectionFilters: Array<ConfigurableOperationDefinition>;
3584
3584
  collections: CollectionList;
@@ -3606,7 +3606,7 @@ export declare type Query = {
3606
3606
  paymentMethodHandlers: Array<ConfigurableOperationDefinition>;
3607
3607
  paymentMethods: PaymentMethodList;
3608
3608
  pendingSearchIndexUpdates: Scalars['Int'];
3609
- /** Get a Product either by id or slug. If neither id nor slug is speicified, an error will result. */
3609
+ /** Get a Product either by id or slug. If neither id nor slug is specified, an error will result. */
3610
3610
  product?: Maybe<Product>;
3611
3611
  productOptionGroup?: Maybe<ProductOptionGroup>;
3612
3612
  productOptionGroups: Array<ProductOptionGroup>;
@@ -3967,7 +3967,7 @@ export declare type SearchResult = {
3967
3967
  facetValueIds: Array<Scalars['ID']>;
3968
3968
  /** An array of ids of the Collections in which this result appears */
3969
3969
  collectionIds: Array<Scalars['ID']>;
3970
- /** A relevence score for the result. Differs between database implementations */
3970
+ /** A relevance score for the result. Differs between database implementations */
3971
3971
  score: Scalars['Float'];
3972
3972
  };
3973
3973
  export declare type SearchResultAsset = {
@@ -1 +1 @@
1
- export declare const ADMIN_UI_VERSION = "1.4.3";
1
+ export declare const ADMIN_UI_VERSION = "1.4.7";
@@ -1,5 +1,11 @@
1
1
  import { DocumentNode } from 'graphql';
2
2
  import { CustomFieldConfig } from '../../common/generated-types';
3
+ declare type InputWithOptionalCustomFields = Record<string, any> & {
4
+ customFields?: Record<string, any>;
5
+ };
6
+ declare type EntityInput = InputWithOptionalCustomFields & {
7
+ translations?: InputWithOptionalCustomFields[];
8
+ };
3
9
  /**
4
10
  * Checks the current documentNode for an operation with a variable named "Create<Entity>Input" or "Update<Entity>Input"
5
11
  * and if a match is found, returns the <Entity> name.
@@ -9,6 +15,9 @@ export declare function isEntityCreateOrUpdateMutation(documentNode: DocumentNod
9
15
  * Removes any `readonly` custom fields from an entity (including its translations).
10
16
  * To be used before submitting the entity for a create or update request.
11
17
  */
12
- export declare function removeReadonlyCustomFields<T extends {
13
- input?: any;
14
- } & Record<string, any> = any>(variables: T, customFieldConfig: CustomFieldConfig[]): T;
18
+ export declare function removeReadonlyCustomFields(variables: {
19
+ input?: EntityInput | EntityInput[];
20
+ } | EntityInput | EntityInput[], customFieldConfig: CustomFieldConfig[]): {
21
+ input?: EntityInput | EntityInput[];
22
+ } | EntityInput | EntityInput[];
23
+ export {};
@@ -1,10 +1,12 @@
1
1
  import { TranslateService } from '@ngx-translate/core';
2
2
  import { LanguageCode } from '../../common/generated-types';
3
+ /** @dynamic */
3
4
  export declare class I18nService {
4
5
  private ngxTranslate;
6
+ private document;
5
7
  _availableLanguages: LanguageCode[];
6
8
  get availableLanguages(): LanguageCode[];
7
- constructor(ngxTranslate: TranslateService);
9
+ constructor(ngxTranslate: TranslateService, document: Document);
8
10
  /**
9
11
  * Set the default language
10
12
  */
@@ -6,7 +6,7 @@ export declare class IfDefaultChannelActiveDirective extends IfDirectiveBase<[]>
6
6
  private changeDetectorRef;
7
7
  constructor(_viewContainer: ViewContainerRef, templateRef: TemplateRef<any>, dataService: DataService, changeDetectorRef: ChangeDetectorRef);
8
8
  /**
9
- * A template to show if the current user does not have the speicified permission.
9
+ * A template to show if the current user does not have the specified permission.
10
10
  */
11
11
  set vdrIfMultichannelElse(templateRef: TemplateRef<any> | null);
12
12
  private defaultChannelIsActive;
@@ -19,7 +19,7 @@ export declare class IfMultichannelDirective extends IfDirectiveBase<[]> {
19
19
  private dataService;
20
20
  constructor(_viewContainer: ViewContainerRef, templateRef: TemplateRef<any>, dataService: DataService);
21
21
  /**
22
- * A template to show if the current user does not have the speicified permission.
22
+ * A template to show if the current user does not have the specified permission.
23
23
  */
24
24
  set vdrIfMultichannelElse(templateRef: TemplateRef<any> | null);
25
25
  }
@@ -9,5 +9,10 @@ export declare abstract class LocaleBasePipe implements OnDestroy, PipeTransform
9
9
  private readonly subscription;
10
10
  protected constructor(dataService?: DataService, changeDetectorRef?: ChangeDetectorRef);
11
11
  ngOnDestroy(): void;
12
+ /**
13
+ * Returns the active locale after attempting to ensure that the locale string
14
+ * is valid for the Intl API.
15
+ */
16
+ protected getActiveLocale(localeOverride?: unknown): string;
12
17
  abstract transform(value: any, ...args: any[]): any;
13
18
  }