@vendure/admin-ui 1.5.2 → 1.6.2

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 (126) hide show
  1. package/bundles/vendure-admin-ui-catalog.umd.js +212 -173
  2. package/bundles/vendure-admin-ui-catalog.umd.js.map +1 -1
  3. package/bundles/vendure-admin-ui-core.umd.js +2337 -1864
  4. package/bundles/vendure-admin-ui-core.umd.js.map +1 -1
  5. package/bundles/vendure-admin-ui-dashboard.umd.js +3 -3
  6. package/bundles/vendure-admin-ui-dashboard.umd.js.map +1 -1
  7. package/bundles/vendure-admin-ui-login.umd.js +2 -2
  8. package/bundles/vendure-admin-ui-login.umd.js.map +1 -1
  9. package/bundles/vendure-admin-ui-marketing.umd.js +1 -1
  10. package/bundles/vendure-admin-ui-marketing.umd.js.map +1 -1
  11. package/bundles/vendure-admin-ui-order.umd.js +1 -1
  12. package/bundles/vendure-admin-ui-order.umd.js.map +1 -1
  13. package/catalog/components/collection-contents/collection-contents.component.d.ts +7 -2
  14. package/catalog/components/collection-detail/collection-detail.component.d.ts +12 -4
  15. package/catalog/components/collection-list/collection-list.component.d.ts +2 -0
  16. package/catalog/components/collection-tree/array-to-tree.d.ts +1 -1
  17. package/catalog/components/collection-tree/collection-tree-node.component.d.ts +5 -1
  18. package/catalog/components/collection-tree/collection-tree.component.d.ts +1 -0
  19. package/catalog/components/product-variants-editor/product-variants-editor.component.d.ts +13 -10
  20. package/catalog/providers/product-detail/product-detail.service.d.ts +2 -2
  21. package/catalog/public_api.d.ts +0 -1
  22. package/catalog/vendure-admin-ui-catalog.metadata.json +1 -1
  23. package/core/common/generated-types.d.ts +32 -3
  24. package/core/common/utilities/selection-manager.d.ts +23 -0
  25. package/core/common/version.d.ts +1 -1
  26. package/core/components/app-shell/app-shell.component.d.ts +1 -0
  27. package/core/data/definitions/collection-definitions.d.ts +1 -0
  28. package/core/data/providers/collection-data.service.d.ts +6 -2
  29. package/core/providers/local-storage/local-storage.service.d.ts +1 -0
  30. package/core/public_api.d.ts +5 -0
  31. package/core/shared/components/asset-gallery/asset-gallery.component.d.ts +21 -6
  32. package/core/shared/components/configurable-input/configurable-input.component.d.ts +7 -2
  33. package/core/shared/components/product-multi-selector-dialog/product-multi-selector-dialog.component.d.ts +35 -0
  34. package/{catalog → core/shared}/components/product-search-input/product-search-input.component.d.ts +1 -1
  35. package/core/shared/components/select-toggle/select-toggle.component.d.ts +1 -0
  36. package/core/shared/dynamic-form-inputs/combination-mode-form-input/combination-mode-form-input.component.d.ts +25 -0
  37. package/core/shared/dynamic-form-inputs/product-multi-selector-form-input/product-multi-selector-form-input.component.d.ts +20 -0
  38. package/core/shared/dynamic-form-inputs/register-dynamic-input-components.d.ts +3 -1
  39. package/core/shared/dynamic-form-inputs/relation-form-input/asset/relation-asset-input.component.d.ts +5 -2
  40. package/core/vendure-admin-ui-core.metadata.json +1 -1
  41. package/dashboard/vendure-admin-ui-dashboard.metadata.json +1 -1
  42. package/esm2015/catalog/catalog.module.js +1 -3
  43. package/esm2015/catalog/components/assets/assets.component.js +1 -1
  44. package/esm2015/catalog/components/collection-contents/collection-contents.component.js +51 -14
  45. package/esm2015/catalog/components/collection-detail/collection-detail.component.js +67 -29
  46. package/esm2015/catalog/components/collection-list/collection-list.component.js +30 -4
  47. package/esm2015/catalog/components/collection-tree/array-to-tree.js +3 -3
  48. package/esm2015/catalog/components/collection-tree/collection-tree-node.component.js +27 -4
  49. package/esm2015/catalog/components/collection-tree/collection-tree.component.js +4 -2
  50. package/esm2015/catalog/components/product-detail/product-detail.component.js +1 -1
  51. package/esm2015/catalog/components/product-list/product-list.component.js +3 -3
  52. package/esm2015/catalog/components/product-variants-editor/product-variants-editor.component.js +7 -2
  53. package/esm2015/catalog/components/product-variants-list/product-variants-list.component.js +1 -1
  54. package/esm2015/catalog/public_api.js +1 -2
  55. package/esm2015/core/app.component.module.js +1 -1
  56. package/esm2015/core/common/base-detail.component.js +1 -1
  57. package/esm2015/core/common/deactivate-aware.js +1 -1
  58. package/esm2015/core/common/generated-types.js +1 -1
  59. package/esm2015/core/common/introspection-result.js +255 -189
  60. package/esm2015/core/common/utilities/configurable-operation-utils.js +2 -2
  61. package/esm2015/core/common/utilities/selection-manager.js +64 -0
  62. package/esm2015/core/common/version.js +2 -2
  63. package/esm2015/core/components/app-shell/app-shell.component.js +4 -3
  64. package/esm2015/core/components/main-nav/main-nav.component.js +2 -2
  65. package/esm2015/core/core.module.js +1 -1
  66. package/esm2015/core/data/definitions/collection-definitions.js +18 -1
  67. package/esm2015/core/data/definitions/order-definitions.js +431 -430
  68. package/esm2015/core/data/definitions/shared-definitions.js +29 -28
  69. package/esm2015/core/data/providers/collection-data.service.js +5 -2
  70. package/esm2015/core/providers/local-storage/local-storage.service.js +1 -1
  71. package/esm2015/core/public_api.js +6 -1
  72. package/esm2015/core/shared/components/address-form/address-form.component.js +2 -2
  73. package/esm2015/core/shared/components/asset-gallery/asset-gallery.component.js +24 -42
  74. package/esm2015/core/shared/components/configurable-input/configurable-input.component.js +13 -3
  75. package/esm2015/core/shared/components/formatted-address/formatted-address.component.js +2 -2
  76. package/esm2015/core/shared/components/help-tooltip/help-tooltip.component.js +1 -1
  77. package/esm2015/core/shared/components/product-multi-selector-dialog/product-multi-selector-dialog.component.js +129 -0
  78. package/esm2015/core/shared/components/product-search-input/product-search-input.component.js +104 -0
  79. package/esm2015/core/shared/components/rich-text-editor/rich-text-editor.component.js +1 -1
  80. package/esm2015/core/shared/components/select-toggle/select-toggle.component.js +5 -3
  81. package/esm2015/core/shared/dynamic-form-inputs/combination-mode-form-input/combination-mode-form-input.component.js +45 -0
  82. package/esm2015/core/shared/dynamic-form-inputs/product-multi-selector-form-input/product-multi-selector-form-input.component.js +53 -0
  83. package/esm2015/core/shared/dynamic-form-inputs/register-dynamic-input-components.js +5 -1
  84. package/esm2015/core/shared/dynamic-form-inputs/relation-form-input/asset/relation-asset-input.component.js +8 -7
  85. package/esm2015/core/shared/shared.module.js +9 -1
  86. package/esm2015/dashboard/components/dashboard/dashboard.component.js +1 -1
  87. package/esm2015/dashboard/components/dashboard-widget/dashboard-widget.component.js +2 -2
  88. package/esm2015/dashboard/widgets/order-summary-widget/order-summary-widget.component.js +1 -1
  89. package/esm2015/login/components/login/login.component.js +3 -3
  90. package/esm2015/marketing/components/promotion-detail/promotion-detail.component.js +2 -2
  91. package/esm2015/order/components/order-list/order-list.component.js +2 -2
  92. package/fesm2015/vendure-admin-ui-catalog.js +187 -158
  93. package/fesm2015/vendure-admin-ui-catalog.js.map +1 -1
  94. package/fesm2015/vendure-admin-ui-core.js +1824 -1359
  95. package/fesm2015/vendure-admin-ui-core.js.map +1 -1
  96. package/fesm2015/vendure-admin-ui-dashboard.js +3 -3
  97. package/fesm2015/vendure-admin-ui-dashboard.js.map +1 -1
  98. package/fesm2015/vendure-admin-ui-login.js +2 -2
  99. package/fesm2015/vendure-admin-ui-login.js.map +1 -1
  100. package/fesm2015/vendure-admin-ui-marketing.js +1 -1
  101. package/fesm2015/vendure-admin-ui-marketing.js.map +1 -1
  102. package/fesm2015/vendure-admin-ui-order.js +1 -1
  103. package/fesm2015/vendure-admin-ui-order.js.map +1 -1
  104. package/login/vendure-admin-ui-login.metadata.json +1 -1
  105. package/marketing/vendure-admin-ui-marketing.metadata.json +1 -1
  106. package/order/vendure-admin-ui-order.metadata.json +1 -1
  107. package/package.json +2 -2
  108. package/static/i18n-messages/cs.json +683 -673
  109. package/static/i18n-messages/de.json +683 -673
  110. package/static/i18n-messages/en.json +684 -674
  111. package/static/i18n-messages/es.json +683 -673
  112. package/static/i18n-messages/fr.json +683 -673
  113. package/static/i18n-messages/it.json +683 -673
  114. package/static/i18n-messages/pl.json +683 -673
  115. package/static/i18n-messages/pt_BR.json +683 -673
  116. package/static/i18n-messages/pt_PT.json +683 -673
  117. package/static/i18n-messages/ru.json +683 -673
  118. package/static/i18n-messages/uk.json +683 -673
  119. package/static/i18n-messages/zh_Hans.json +683 -673
  120. package/static/i18n-messages/zh_Hant.json +683 -673
  121. package/static/styles/global/_forms.scss +4 -5
  122. package/static/styles/global/_overrides.scss +5 -1
  123. package/static/styles/global/_utilities.scss +9 -0
  124. package/static/styles/theme/default.scss +13 -1
  125. package/static/theme.min.css +1 -1
  126. package/esm2015/catalog/components/product-search-input/product-search-input.component.js +0 -104
@@ -3335,6 +3335,10 @@ export declare type PermissionDefinition = {
3335
3335
  description: Scalars['String'];
3336
3336
  assignable: Scalars['Boolean'];
3337
3337
  };
3338
+ export declare type PreviewCollectionVariantsInput = {
3339
+ parentId?: Maybe<Scalars['ID']>;
3340
+ filters: Array<ConfigurableOperationInput>;
3341
+ };
3338
3342
  /** The price range where the result has more than one price */
3339
3343
  export declare type PriceRange = {
3340
3344
  __typename?: 'PriceRange';
@@ -3677,6 +3681,8 @@ export declare type Query = {
3677
3681
  paymentMethodHandlers: Array<ConfigurableOperationDefinition>;
3678
3682
  paymentMethods: PaymentMethodList;
3679
3683
  pendingSearchIndexUpdates: Scalars['Int'];
3684
+ /** Used for real-time previews of the contents of a Collection */
3685
+ previewCollectionVariants: ProductVariantList;
3680
3686
  /** Get a Product either by id or slug. If neither id nor slug is specified, an error will result. */
3681
3687
  product?: Maybe<Product>;
3682
3688
  productOptionGroup?: Maybe<ProductOptionGroup>;
@@ -3781,6 +3787,10 @@ export declare type QueryPaymentMethodArgs = {
3781
3787
  export declare type QueryPaymentMethodsArgs = {
3782
3788
  options?: Maybe<PaymentMethodListOptions>;
3783
3789
  };
3790
+ export declare type QueryPreviewCollectionVariantsArgs = {
3791
+ input: PreviewCollectionVariantsInput;
3792
+ options?: Maybe<ProductVariantListOptions>;
3793
+ };
3784
3794
  export declare type QueryProductArgs = {
3785
3795
  id?: Maybe<Scalars['ID']>;
3786
3796
  slug?: Maybe<Scalars['String']>;
@@ -5053,10 +5063,23 @@ export declare type GetCollectionContentsQuery = {
5053
5063
  } & Pick<ProductVariantList, 'totalItems'> & {
5054
5064
  items: Array<({
5055
5065
  __typename?: 'ProductVariant';
5056
- } & Pick<ProductVariant, 'id' | 'productId' | 'name'>)>;
5066
+ } & Pick<ProductVariant, 'id' | 'productId' | 'name' | 'sku'>)>;
5057
5067
  });
5058
5068
  })>;
5059
5069
  };
5070
+ export declare type PreviewCollectionContentsQueryVariables = Exact<{
5071
+ input: PreviewCollectionVariantsInput;
5072
+ options?: Maybe<ProductVariantListOptions>;
5073
+ }>;
5074
+ export declare type PreviewCollectionContentsQuery = {
5075
+ previewCollectionVariants: ({
5076
+ __typename?: 'ProductVariantList';
5077
+ } & Pick<ProductVariantList, 'totalItems'> & {
5078
+ items: Array<({
5079
+ __typename?: 'ProductVariant';
5080
+ } & Pick<ProductVariant, 'id' | 'productId' | 'name' | 'sku'>)>;
5081
+ });
5082
+ };
5060
5083
  export declare type AddressFragment = ({
5061
5084
  __typename?: 'Address';
5062
5085
  } & Pick<Address, 'id' | 'createdAt' | 'updatedAt' | 'fullName' | 'company' | 'streetLine1' | 'streetLine2' | 'city' | 'province' | 'postalCode' | 'phoneNumber' | 'defaultShippingAddress' | 'defaultBillingAddress'> & {
@@ -5384,7 +5407,7 @@ export declare type OrderAddressFragment = ({
5384
5407
  } & Pick<OrderAddress, 'fullName' | 'company' | 'streetLine1' | 'streetLine2' | 'city' | 'province' | 'postalCode' | 'country' | 'countryCode' | 'phoneNumber'>);
5385
5408
  export declare type OrderFragment = ({
5386
5409
  __typename?: 'Order';
5387
- } & Pick<Order, 'id' | 'createdAt' | 'updatedAt' | 'orderPlacedAt' | 'code' | 'state' | 'nextStates' | 'total' | 'currencyCode'> & {
5410
+ } & Pick<Order, 'id' | 'createdAt' | 'updatedAt' | 'orderPlacedAt' | 'code' | 'state' | 'nextStates' | 'total' | 'totalWithTax' | 'currencyCode'> & {
5388
5411
  customer?: Maybe<({
5389
5412
  __typename?: 'Customer';
5390
5413
  } & Pick<Customer, 'id' | 'firstName' | 'lastName'>)>;
@@ -7501,7 +7524,7 @@ export declare type ConfigurableOperationDefFragment = ({
7501
7524
  } & Pick<ConfigurableOperationDefinition, 'code' | 'description'> & {
7502
7525
  args: Array<({
7503
7526
  __typename?: 'ConfigArgDefinition';
7504
- } & Pick<ConfigArgDefinition, 'name' | 'type' | 'required' | 'defaultValue' | 'list' | 'ui' | 'label'>)>;
7527
+ } & Pick<ConfigArgDefinition, 'name' | 'type' | 'required' | 'defaultValue' | 'list' | 'ui' | 'label' | 'description'>)>;
7505
7528
  });
7506
7529
  declare type ErrorResult_AlreadyRefundedError_Fragment = ({
7507
7530
  __typename?: 'AlreadyRefundedError';
@@ -7927,6 +7950,12 @@ export declare namespace GetCollectionContents {
7927
7950
  type ProductVariants = (NonNullable<(NonNullable<GetCollectionContentsQuery['collection']>)['productVariants']>);
7928
7951
  type Items = NonNullable<(NonNullable<(NonNullable<(NonNullable<GetCollectionContentsQuery['collection']>)['productVariants']>)['items']>)[number]>;
7929
7952
  }
7953
+ export declare namespace PreviewCollectionContents {
7954
+ type Variables = PreviewCollectionContentsQueryVariables;
7955
+ type Query = PreviewCollectionContentsQuery;
7956
+ type PreviewCollectionVariants = (NonNullable<PreviewCollectionContentsQuery['previewCollectionVariants']>);
7957
+ type Items = NonNullable<(NonNullable<(NonNullable<PreviewCollectionContentsQuery['previewCollectionVariants']>)['items']>)[number]>;
7958
+ }
7930
7959
  export declare namespace Address {
7931
7960
  type Fragment = AddressFragment;
7932
7961
  type Country = (NonNullable<AddressFragment['country']>);
@@ -0,0 +1,23 @@
1
+ export interface SelectionManagerOptions<T> {
2
+ multiSelect: boolean;
3
+ itemsAreEqual: (a: T, b: T) => boolean;
4
+ additiveMode: boolean;
5
+ }
6
+ /**
7
+ * @description
8
+ * A helper class used to manage selection of list items. Supports multiple selection via
9
+ * cmd/ctrl/shift key.
10
+ */
11
+ export declare class SelectionManager<T> {
12
+ private options;
13
+ constructor(options: SelectionManagerOptions<T>);
14
+ get selection(): T[];
15
+ private _selection;
16
+ private items;
17
+ setMultiSelect(isMultiSelect: boolean): void;
18
+ setCurrentItems(items: T[]): void;
19
+ toggleSelection(item: T, event?: MouseEvent): void;
20
+ selectMultiple(items: T[]): void;
21
+ isSelected(item: T): boolean;
22
+ lastSelected(): T;
23
+ }
@@ -1 +1 @@
1
- export declare const ADMIN_UI_VERSION = "1.5.2";
1
+ export declare const ADMIN_UI_VERSION = "1.6.2";
@@ -17,6 +17,7 @@ export declare class AppShellComponent implements OnInit {
17
17
  userName$: Observable<string>;
18
18
  uiLanguageAndLocale$: Observable<[LanguageCode, string | undefined]>;
19
19
  availableLanguages: LanguageCode[];
20
+ hideVendureBranding: boolean | undefined;
20
21
  constructor(authService: AuthService, dataService: DataService, router: Router, i18nService: I18nService, modalService: ModalService, localStorageService: LocalStorageService);
21
22
  ngOnInit(): void;
22
23
  selectUiLanguage(): void;
@@ -7,3 +7,4 @@ export declare const UPDATE_COLLECTION: import("graphql").DocumentNode;
7
7
  export declare const MOVE_COLLECTION: import("graphql").DocumentNode;
8
8
  export declare const DELETE_COLLECTION: import("graphql").DocumentNode;
9
9
  export declare const GET_COLLECTION_CONTENTS: import("graphql").DocumentNode;
10
+ export declare const PREVIEW_COLLECTION_CONTENTS: import("graphql").DocumentNode;
@@ -1,4 +1,4 @@
1
- import { CreateCollectionInput, MoveCollectionInput, UpdateCollectionInput } from '../../common/generated-types';
1
+ import { CreateCollectionInput, MoveCollectionInput, PreviewCollectionContentsQuery, PreviewCollectionVariantsInput, ProductVariantListOptions, UpdateCollectionInput } from '../../common/generated-types';
2
2
  import { BaseDataService } from './base-data.service';
3
3
  export declare class CollectionDataService {
4
4
  private baseDataService;
@@ -14,8 +14,12 @@ export declare class CollectionDataService {
14
14
  updateCollection(input: UpdateCollectionInput): import("rxjs").Observable<import("../../common/generated-types").UpdateCollectionMutation>;
15
15
  moveCollection(inputs: MoveCollectionInput[]): import("rxjs").Observable<import("../../common/generated-types").MoveCollectionMutation[]>;
16
16
  deleteCollection(id: string): import("rxjs").Observable<import("../../common/generated-types").DeleteCollectionMutation>;
17
+ previewCollectionVariants(input: PreviewCollectionVariantsInput, options: ProductVariantListOptions): import("../query-result").QueryResult<PreviewCollectionContentsQuery, import("../../common/generated-types").Exact<{
18
+ input: PreviewCollectionVariantsInput;
19
+ options?: import("../../common/generated-types").Maybe<ProductVariantListOptions> | undefined;
20
+ }>>;
17
21
  getCollectionContents(id: string, take?: number, skip?: number, filterTerm?: string): import("../query-result").QueryResult<import("../../common/generated-types").GetCollectionContentsQuery, import("../../common/generated-types").Exact<{
18
22
  id: string;
19
- options?: import("../../common/generated-types").Maybe<import("../../common/generated-types").ProductVariantListOptions> | undefined;
23
+ options?: import("../../common/generated-types").Maybe<ProductVariantListOptions> | undefined;
20
24
  }>>;
21
25
  }
@@ -10,6 +10,7 @@ export declare type LocalStorageTypeMap = {
10
10
  orderListLastCustomFilters: any;
11
11
  dashboardWidgetLayout: WidgetLayoutDefinition;
12
12
  activeTheme: string;
13
+ livePreviewCollectionContents: boolean;
13
14
  };
14
15
  export declare type LocalStorageLocationBasedTypeMap = {
15
16
  shippingTestOrder: any;
@@ -17,6 +17,7 @@ export * from './common/utilities/find-translation';
17
17
  export * from './common/utilities/flatten-facet-values';
18
18
  export * from './common/utilities/get-default-ui-language';
19
19
  export * from './common/utilities/interpolate-description';
20
+ export * from './common/utilities/selection-manager';
20
21
  export * from './common/utilities/string-to-color';
21
22
  export * from './common/version';
22
23
  export * from './components/app-shell/app-shell.component';
@@ -144,6 +145,8 @@ export * from './shared/components/modal-dialog/modal-dialog.component';
144
145
  export * from './shared/components/object-tree/object-tree.component';
145
146
  export * from './shared/components/order-state-label/order-state-label.component';
146
147
  export * from './shared/components/pagination-controls/pagination-controls.component';
148
+ export * from './shared/components/product-multi-selector-dialog/product-multi-selector-dialog.component';
149
+ export * from './shared/components/product-search-input/product-search-input.component';
147
150
  export * from './shared/components/product-selector/product-selector.component';
148
151
  export * from './shared/components/rich-text-editor/external-image-dialog/external-image-dialog.component';
149
152
  export * from './shared/components/rich-text-editor/link-dialog/link-dialog.component';
@@ -174,6 +177,7 @@ export * from './shared/directives/if-multichannel.directive';
174
177
  export * from './shared/directives/if-permissions.directive';
175
178
  export * from './shared/dynamic-form-inputs/boolean-form-input/boolean-form-input.component';
176
179
  export * from './shared/dynamic-form-inputs/code-editor-form-input/json-editor-form-input.component';
180
+ export * from './shared/dynamic-form-inputs/combination-mode-form-input/combination-mode-form-input.component';
177
181
  export * from './shared/dynamic-form-inputs/currency-form-input/currency-form-input.component';
178
182
  export * from './shared/dynamic-form-inputs/customer-group-form-input/customer-group-form-input.component';
179
183
  export * from './shared/dynamic-form-inputs/date-form-input/date-form-input.component';
@@ -181,6 +185,7 @@ export * from './shared/dynamic-form-inputs/dynamic-form-input/dynamic-form-inpu
181
185
  export * from './shared/dynamic-form-inputs/facet-value-form-input/facet-value-form-input.component';
182
186
  export * from './shared/dynamic-form-inputs/number-form-input/number-form-input.component';
183
187
  export * from './shared/dynamic-form-inputs/password-form-input/password-form-input.component';
188
+ export * from './shared/dynamic-form-inputs/product-multi-selector-form-input/product-multi-selector-form-input.component';
184
189
  export * from './shared/dynamic-form-inputs/product-selector-form-input/product-selector-form-input.component';
185
190
  export * from './shared/dynamic-form-inputs/register-dynamic-input-components';
186
191
  export * from './shared/dynamic-form-inputs/relation-form-input/asset/relation-asset-input.component';
@@ -1,5 +1,6 @@
1
- import { EventEmitter, OnChanges } from '@angular/core';
2
- import { Asset, GetAssetList } from '../../../common/generated-types';
1
+ import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
2
+ import { GetAssetList } from '../../../common/generated-types';
3
+ import { SelectionManager } from '../../../common/utilities/selection-manager';
3
4
  import { ModalService } from '../../../providers/modal/modal.service';
4
5
  export declare type AssetLike = GetAssetList.Items;
5
6
  export declare class AssetGalleryComponent implements OnChanges {
@@ -20,7 +21,7 @@ export declare class AssetGalleryComponent implements OnChanges {
20
21
  } & Pick<import("../../../common/generated-types").Tag, "id" | "value">)[];
21
22
  } & {
22
23
  __typename?: "Asset" | undefined;
23
- } & Pick<Asset, "id" | "createdAt" | "updatedAt" | "name" | "fileSize" | "mimeType" | "type" | "preview" | "source" | "width" | "height"> & {
24
+ } & Pick<import("../../../common/generated-types").Asset, "id" | "createdAt" | "updatedAt" | "name" | "fileSize" | "mimeType" | "type" | "preview" | "source" | "width" | "height"> & {
24
25
  focalPoint?: import("../../../common/generated-types").Maybe<{
25
26
  __typename?: "Coordinate" | undefined;
26
27
  } & Pick<import("../../../common/generated-types").Coordinate, "x" | "y">> | undefined;
@@ -35,14 +36,28 @@ export declare class AssetGalleryComponent implements OnChanges {
35
36
  } & Pick<import("../../../common/generated-types").Tag, "id" | "value">)[];
36
37
  } & {
37
38
  __typename?: "Asset" | undefined;
38
- } & Pick<Asset, "id" | "createdAt" | "updatedAt" | "name" | "fileSize" | "mimeType" | "type" | "preview" | "source" | "width" | "height"> & {
39
+ } & Pick<import("../../../common/generated-types").Asset, "id" | "createdAt" | "updatedAt" | "name" | "fileSize" | "mimeType" | "type" | "preview" | "source" | "width" | "height"> & {
39
40
  focalPoint?: import("../../../common/generated-types").Maybe<{
40
41
  __typename?: "Coordinate" | undefined;
41
42
  } & Pick<import("../../../common/generated-types").Coordinate, "x" | "y">> | undefined;
42
43
  })[]>;
43
- selection: AssetLike[];
44
+ selectionManager: SelectionManager<{
45
+ __typename?: "Asset" | undefined;
46
+ } & {
47
+ tags: ({
48
+ __typename?: "Tag" | undefined;
49
+ } & {
50
+ __typename?: "Tag" | undefined;
51
+ } & Pick<import("../../../common/generated-types").Tag, "id" | "value">)[];
52
+ } & {
53
+ __typename?: "Asset" | undefined;
54
+ } & Pick<import("../../../common/generated-types").Asset, "id" | "createdAt" | "updatedAt" | "name" | "fileSize" | "mimeType" | "type" | "preview" | "source" | "width" | "height"> & {
55
+ focalPoint?: import("../../../common/generated-types").Maybe<{
56
+ __typename?: "Coordinate" | undefined;
57
+ } & Pick<import("../../../common/generated-types").Coordinate, "x" | "y">> | undefined;
58
+ }>;
44
59
  constructor(modalService: ModalService);
45
- ngOnChanges(): void;
60
+ ngOnChanges(changes: SimpleChanges): void;
46
61
  toggleSelection(asset: AssetLike, event?: MouseEvent): void;
47
62
  selectMultiple(assets: AssetLike[]): void;
48
63
  isSelected(asset: AssetLike): boolean;
@@ -1,14 +1,16 @@
1
- import { EventEmitter, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
1
+ import { EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
2
2
  import { AbstractControl, ControlValueAccessor, FormGroup, ValidationErrors, Validator } from '@angular/forms';
3
+ import { Observable } from 'rxjs';
3
4
  import { ConfigArg, ConfigArgDefinition, ConfigurableOperation, ConfigurableOperationDefinition } from '../../../common/generated-types';
4
5
  /**
5
6
  * A form input which renders a card with the internal form fields of the given ConfigurableOperation.
6
7
  */
7
- export declare class ConfigurableInputComponent implements OnChanges, OnDestroy, ControlValueAccessor, Validator {
8
+ export declare class ConfigurableInputComponent implements OnInit, OnChanges, OnDestroy, ControlValueAccessor, Validator {
8
9
  operation?: ConfigurableOperation;
9
10
  operationDefinition?: ConfigurableOperationDefinition;
10
11
  readonly: boolean;
11
12
  removable: boolean;
13
+ position: number;
12
14
  remove: EventEmitter<ConfigurableOperation>;
13
15
  argValues: {
14
16
  [name: string]: any;
@@ -16,8 +18,11 @@ export declare class ConfigurableInputComponent implements OnChanges, OnDestroy,
16
18
  onChange: (val: any) => void;
17
19
  onTouch: () => void;
18
20
  form: FormGroup;
21
+ positionChange$: Observable<number>;
22
+ private positionChangeSubject;
19
23
  private subscription;
20
24
  interpolateDescription(): string;
25
+ ngOnInit(): void;
21
26
  ngOnChanges(changes: SimpleChanges): void;
22
27
  ngOnDestroy(): void;
23
28
  registerOnChange(fn: any): void;
@@ -0,0 +1,35 @@
1
+ import { ChangeDetectorRef, OnInit } from '@angular/core';
2
+ import { PaginationInstance } from 'ngx-pagination';
3
+ import { BehaviorSubject, Observable } from 'rxjs';
4
+ import { SearchProductsQuery } from '../../../common/generated-types';
5
+ import { SelectionManager } from '../../../common/utilities/selection-manager';
6
+ import { DataService } from '../../../data/providers/data.service';
7
+ import { Dialog } from '../../../providers/modal/modal.service';
8
+ export declare type SearchItem = SearchProductsQuery['search']['items'][number];
9
+ export declare class ProductMultiSelectorDialogComponent implements OnInit, Dialog<SearchItem[]> {
10
+ private dataService;
11
+ private changeDetector;
12
+ mode: 'product' | 'variant';
13
+ initialSelectionIds: string[];
14
+ items$: Observable<SearchItem[]>;
15
+ facetValues$: Observable<SearchProductsQuery['search']['facetValues']>;
16
+ searchTerm$: BehaviorSubject<string>;
17
+ searchFacetValueIds$: BehaviorSubject<string[]>;
18
+ paginationConfig: PaginationInstance;
19
+ selectionManager: SelectionManager<SearchItem>;
20
+ resolveWith: (result?: SearchItem[]) => void;
21
+ private paginationConfig$;
22
+ constructor(dataService: DataService, changeDetector: ChangeDetectorRef);
23
+ ngOnInit(): void;
24
+ trackByFn(index: number, item: SearchItem): string;
25
+ setSearchTerm(term: string): void;
26
+ setFacetValueIds(ids: string[]): void;
27
+ toggleSelection(item: SearchItem, event: MouseEvent): void;
28
+ clearSelection(): void;
29
+ isSelected(item: SearchItem): boolean;
30
+ entityInfoClick(event: MouseEvent): void;
31
+ pageChange(page: number): void;
32
+ itemsPerPageChange(itemsPerPage: number): void;
33
+ select(): void;
34
+ cancel(): void;
35
+ }
@@ -1,5 +1,5 @@
1
1
  import { EventEmitter } from '@angular/core';
2
- import { SearchProducts } from '@vendure/admin-ui/core';
2
+ import { SearchProducts } from '../../../common/generated-types';
3
3
  export declare class ProductSearchInputComponent {
4
4
  facetValueResults: SearchProducts.FacetValues[];
5
5
  searchTermChange: EventEmitter<string>;
@@ -5,6 +5,7 @@ import { EventEmitter } from '@angular/core';
5
5
  export declare class SelectToggleComponent {
6
6
  size: 'small' | 'large';
7
7
  selected: boolean;
8
+ hiddenWhenOff: boolean;
8
9
  disabled: boolean;
9
10
  label: string | undefined;
10
11
  selectedChange: EventEmitter<boolean>;
@@ -0,0 +1,25 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { FormControl } from '@angular/forms';
3
+ import { DefaultFormComponentConfig, DefaultFormComponentId } from '@vendure/common/lib/shared-types';
4
+ import { Observable } from 'rxjs';
5
+ import { FormInputComponent } from '../../../common/component-registry-types';
6
+ import { ConfigurableInputComponent } from '../../components/configurable-input/configurable-input.component';
7
+ /**
8
+ * @description
9
+ * A special input used to display the "Combination mode" AND/OR toggle.
10
+ *
11
+ * @docsCategory custom-input-components
12
+ * @docsPage default-inputs
13
+ */
14
+ export declare class CombinationModeFormInputComponent implements FormInputComponent, OnInit {
15
+ private configurableInputComponent;
16
+ static readonly id: DefaultFormComponentId;
17
+ readonly: boolean;
18
+ formControl: FormControl;
19
+ config: DefaultFormComponentConfig<'combination-mode-form-input'>;
20
+ selectable$: Observable<boolean>;
21
+ constructor(configurableInputComponent: ConfigurableInputComponent);
22
+ ngOnInit(): void;
23
+ setCombinationModeAnd(): void;
24
+ setCombinationModeOr(): void;
25
+ }
@@ -0,0 +1,20 @@
1
+ import { ChangeDetectorRef, OnInit } from '@angular/core';
2
+ import { FormControl } from '@angular/forms';
3
+ import { DefaultFormComponentConfig, DefaultFormComponentId } from '@vendure/common/lib/shared-types';
4
+ import { FormInputComponent } from '../../../common/component-registry-types';
5
+ import { DataService } from '../../../data/providers/data.service';
6
+ import { ModalService } from '../../../providers/modal/modal.service';
7
+ export declare class ProductMultiSelectorFormInputComponent implements OnInit, FormInputComponent {
8
+ private modalService;
9
+ private dataService;
10
+ private changeDetector;
11
+ config: DefaultFormComponentConfig<'product-multi-form-input'>;
12
+ formControl: FormControl;
13
+ readonly: boolean;
14
+ mode: 'product' | 'variant';
15
+ readonly isListInput = true;
16
+ static readonly id: DefaultFormComponentId;
17
+ constructor(modalService: ModalService, dataService: DataService, changeDetector: ChangeDetectorRef);
18
+ ngOnInit(): void;
19
+ select(): void;
20
+ }
@@ -2,12 +2,14 @@ import { FactoryProvider, Type } from '@angular/core';
2
2
  import { FormInputComponent } from '../../common/component-registry-types';
3
3
  import { CustomFieldControl, CustomFieldEntityName } from '../../providers/custom-field-component/custom-field-component.service';
4
4
  import { JsonEditorFormInputComponent } from './code-editor-form-input/json-editor-form-input.component';
5
+ import { CombinationModeFormInputComponent } from './combination-mode-form-input/combination-mode-form-input.component';
5
6
  import { CurrencyFormInputComponent } from './currency-form-input/currency-form-input.component';
6
7
  import { CustomerGroupFormInputComponent } from './customer-group-form-input/customer-group-form-input.component';
7
8
  import { FacetValueFormInputComponent } from './facet-value-form-input/facet-value-form-input.component';
8
9
  import { PasswordFormInputComponent } from './password-form-input/password-form-input.component';
10
+ import { ProductMultiSelectorFormInputComponent } from './product-multi-selector-form-input/product-multi-selector-form-input.component';
9
11
  import { ProductSelectorFormInputComponent } from './product-selector-form-input/product-selector-form-input.component';
10
- export declare const defaultFormInputs: (typeof ProductSelectorFormInputComponent | typeof CustomerGroupFormInputComponent | typeof PasswordFormInputComponent | typeof CurrencyFormInputComponent | typeof FacetValueFormInputComponent | typeof JsonEditorFormInputComponent)[];
12
+ export declare const defaultFormInputs: (typeof ProductSelectorFormInputComponent | typeof CustomerGroupFormInputComponent | typeof PasswordFormInputComponent | typeof CurrencyFormInputComponent | typeof FacetValueFormInputComponent | typeof JsonEditorFormInputComponent | typeof ProductMultiSelectorFormInputComponent | typeof CombinationModeFormInputComponent)[];
11
13
  /**
12
14
  * @description
13
15
  * Registers a custom FormInputComponent which can be used to control the argument inputs
@@ -1,14 +1,17 @@
1
1
  import { OnInit } from '@angular/core';
2
2
  import { FormControl } from '@angular/forms';
3
+ import { DefaultFormComponentId } from '@vendure/common/lib/shared-types';
3
4
  import { Observable } from 'rxjs';
5
+ import { FormInputComponent } from '../../../../common/component-registry-types';
4
6
  import { GetAsset, RelationCustomFieldConfig } from '../../../../common/generated-types';
5
7
  import { DataService } from '../../../../data/providers/data.service';
6
8
  import { ModalService } from '../../../../providers/modal/modal.service';
7
- export declare class RelationAssetInputComponent implements OnInit {
9
+ export declare class RelationAssetInputComponent implements FormInputComponent, OnInit {
8
10
  private modalService;
9
11
  private dataService;
12
+ static readonly id: DefaultFormComponentId;
10
13
  readonly: boolean;
11
- parentFormControl: FormControl;
14
+ formControl: FormControl;
12
15
  config: RelationCustomFieldConfig;
13
16
  asset$: Observable<GetAsset.Asset | undefined>;
14
17
  constructor(modalService: ModalService, dataService: DataService);