@vendure/admin-ui 2.0.0-next.11 → 2.0.0-next.12
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.
- package/catalog/components/generate-product-variants/generate-product-variants.component.d.ts +3 -3
- package/catalog/components/option-value-input/option-value-input.component.d.ts +21 -9
- package/catalog/components/product-variants-editor/product-variants-editor.component.d.ts +10 -3
- package/core/common/generated-types.d.ts +242 -127
- package/core/common/utilities/configurable-operation-utils.d.ts +4 -2
- package/core/common/version.d.ts +1 -1
- package/core/data/definitions/order-definitions.d.ts +2 -0
- package/core/data/definitions/product-definitions.d.ts +1 -0
- package/core/data/providers/order-data.service.d.ts +1 -0
- package/core/data/providers/product-data.service.d.ts +1 -0
- package/esm2020/catalog/components/generate-product-variants/generate-product-variants.component.mjs +12 -4
- package/esm2020/catalog/components/option-value-input/option-value-input.component.mjs +65 -11
- package/esm2020/catalog/components/product-variants-editor/product-variants-editor.component.mjs +107 -12
- package/esm2020/core/common/generated-types.mjs +2 -1
- package/esm2020/core/common/introspection-result.mjs +191 -255
- package/esm2020/core/common/utilities/configurable-operation-utils.mjs +11 -8
- package/esm2020/core/common/version.mjs +2 -2
- package/esm2020/core/data/definitions/order-definitions.mjs +39 -25
- package/esm2020/core/data/definitions/product-definitions.mjs +743 -735
- package/esm2020/core/data/providers/order-data.service.mjs +7 -2
- package/esm2020/core/data/providers/product-data.service.mjs +5 -2
- package/esm2020/order/components/fulfill-order-dialog/fulfill-order-dialog.component.mjs +6 -2
- package/esm2020/order/components/fulfillment-detail/fulfillment-detail.component.mjs +8 -17
- package/esm2020/order/components/line-fulfillment/line-fulfillment.component.mjs +7 -21
- package/esm2020/order/components/order-detail/order-detail.component.mjs +48 -20
- package/esm2020/order/components/order-payment-card/order-payment-card.component.mjs +2 -2
- package/fesm2015/vendure-admin-ui-catalog.mjs +186 -22
- package/fesm2015/vendure-admin-ui-catalog.mjs.map +1 -1
- package/fesm2015/vendure-admin-ui-core.mjs +937 -967
- package/fesm2015/vendure-admin-ui-core.mjs.map +1 -1
- package/fesm2015/vendure-admin-ui-order.mjs +68 -58
- package/fesm2015/vendure-admin-ui-order.mjs.map +1 -1
- package/fesm2020/vendure-admin-ui-catalog.mjs +179 -22
- package/fesm2020/vendure-admin-ui-catalog.mjs.map +1 -1
- package/fesm2020/vendure-admin-ui-core.mjs +937 -967
- package/fesm2020/vendure-admin-ui-core.mjs.map +1 -1
- package/fesm2020/vendure-admin-ui-order.mjs +66 -57
- package/fesm2020/vendure-admin-ui-order.mjs.map +1 -1
- package/package.json +2 -2
- package/static/i18n-messages/cs.json +2 -1
- package/static/i18n-messages/de.json +2 -1
- package/static/i18n-messages/en.json +3 -1
- package/static/i18n-messages/es.json +2 -1
- package/static/i18n-messages/fr.json +2 -1
- package/static/i18n-messages/it.json +2 -1
- package/static/i18n-messages/pl.json +2 -1
- package/static/i18n-messages/pt_BR.json +2 -1
- package/static/i18n-messages/pt_PT.json +2 -1
- package/static/i18n-messages/ru.json +2 -1
- package/static/i18n-messages/uk.json +2 -1
- package/static/i18n-messages/zh_Hans.json +2 -1
- package/static/i18n-messages/zh_Hant.json +2 -1
- package/static/styles/global/_utilities.scss +1 -0
- package/static/theme.min.css +1 -1
package/catalog/components/generate-product-variants/generate-product-variants.component.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
-
import { CurrencyCode } from '@vendure/admin-ui/core';
|
|
3
|
-
import { DataService } from '@vendure/admin-ui/core';
|
|
1
|
+
import { ElementRef, EventEmitter, OnInit, QueryList } from '@angular/core';
|
|
2
|
+
import { CurrencyCode, DataService } from '@vendure/admin-ui/core';
|
|
4
3
|
import { OptionValueInputComponent } from '../option-value-input/option-value-input.component';
|
|
5
4
|
import * as i0 from "@angular/core";
|
|
6
5
|
export declare type CreateVariantValues = {
|
|
@@ -20,6 +19,7 @@ export declare type CreateProductVariantsConfig = {
|
|
|
20
19
|
export declare class GenerateProductVariantsComponent implements OnInit {
|
|
21
20
|
private dataService;
|
|
22
21
|
variantsChange: EventEmitter<CreateProductVariantsConfig>;
|
|
22
|
+
groupNameInputs: QueryList<ElementRef>;
|
|
23
23
|
optionGroups: Array<{
|
|
24
24
|
name: string;
|
|
25
25
|
values: Array<{
|
|
@@ -1,36 +1,48 @@
|
|
|
1
|
-
import { ChangeDetectorRef, ElementRef, Provider } from '@angular/core';
|
|
1
|
+
import { ChangeDetectorRef, ElementRef, EventEmitter, Provider, QueryList } from '@angular/core';
|
|
2
2
|
import { ControlValueAccessor } from '@angular/forms';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare const OPTION_VALUE_INPUT_VALUE_ACCESSOR: Provider;
|
|
5
|
+
interface Option {
|
|
6
|
+
id?: string;
|
|
7
|
+
name: string;
|
|
8
|
+
locked: boolean;
|
|
9
|
+
}
|
|
5
10
|
export declare class OptionValueInputComponent implements ControlValueAccessor {
|
|
6
11
|
private changeDetector;
|
|
7
12
|
groupName: string;
|
|
8
13
|
textArea: ElementRef<HTMLTextAreaElement>;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
14
|
+
nameInputs: QueryList<ElementRef>;
|
|
15
|
+
options: Option[];
|
|
16
|
+
add: EventEmitter<Option>;
|
|
17
|
+
remove: EventEmitter<Option>;
|
|
18
|
+
edit: EventEmitter<{
|
|
19
|
+
index: number;
|
|
20
|
+
option: Option;
|
|
12
21
|
}>;
|
|
13
22
|
disabled: boolean;
|
|
14
23
|
input: string;
|
|
15
24
|
isFocussed: boolean;
|
|
16
25
|
lastSelected: boolean;
|
|
26
|
+
formValue: Option[];
|
|
27
|
+
editingIndex: number;
|
|
17
28
|
onChangeFn: (value: any) => void;
|
|
18
29
|
onTouchFn: (value: any) => void;
|
|
30
|
+
get optionValues(): Option[];
|
|
19
31
|
constructor(changeDetector: ChangeDetectorRef);
|
|
20
32
|
registerOnChange(fn: any): void;
|
|
21
33
|
registerOnTouched(fn: any): void;
|
|
22
34
|
setDisabledState(isDisabled: boolean): void;
|
|
23
35
|
writeValue(obj: any): void;
|
|
24
36
|
focus(): void;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}): void;
|
|
37
|
+
editName(index: number, event: MouseEvent): void;
|
|
38
|
+
updateOption(index: number, event: InputEvent): void;
|
|
39
|
+
removeOption(option: Option): void;
|
|
29
40
|
handleKey(event: KeyboardEvent): void;
|
|
30
41
|
handleBlur(): void;
|
|
31
42
|
private addOptionValue;
|
|
32
43
|
private parseInputIntoOptions;
|
|
33
44
|
private removeLastOption;
|
|
34
45
|
static ɵfac: i0.ɵɵFactoryDeclaration<OptionValueInputComponent, never>;
|
|
35
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<OptionValueInputComponent, "vdr-option-value-input", never, { "groupName": "groupName"; }, {}, never, never>;
|
|
46
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<OptionValueInputComponent, "vdr-option-value-input", never, { "groupName": "groupName"; "options": "options"; "disabled": "disabled"; }, { "add": "add"; "remove": "remove"; "edit": "edit"; }, never, never>;
|
|
36
47
|
}
|
|
48
|
+
export {};
|
|
@@ -21,6 +21,7 @@ interface OptionGroupUiModel {
|
|
|
21
21
|
id?: string;
|
|
22
22
|
isNew: boolean;
|
|
23
23
|
name: string;
|
|
24
|
+
locked: boolean;
|
|
24
25
|
values: Array<{
|
|
25
26
|
id?: string;
|
|
26
27
|
name: string;
|
|
@@ -34,6 +35,7 @@ export declare class ProductVariantsEditorComponent implements OnInit, Deactivat
|
|
|
34
35
|
private notificationService;
|
|
35
36
|
private modalService;
|
|
36
37
|
formValueChanged: boolean;
|
|
38
|
+
optionsChanged: boolean;
|
|
37
39
|
generatedVariants: GeneratedVariant[];
|
|
38
40
|
optionGroups: OptionGroupUiModel[];
|
|
39
41
|
product: NonNullable<GetProductVariantOptionsQuery['product']>;
|
|
@@ -45,15 +47,20 @@ export declare class ProductVariantsEditorComponent implements OnInit, Deactivat
|
|
|
45
47
|
canDeactivate(): boolean;
|
|
46
48
|
getVariantsToAdd(): GeneratedVariant[];
|
|
47
49
|
getVariantName(variant: GeneratedVariant): string;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
+
addOptionGroup(): void;
|
|
51
|
+
removeOptionGroup(optionGroup: OptionGroupUiModel): void;
|
|
52
|
+
addOption(groupId: string, optionName: string): void;
|
|
53
|
+
removeOption(groupId: string, { id, name }: {
|
|
54
|
+
id?: string;
|
|
55
|
+
name: string;
|
|
56
|
+
}): void;
|
|
50
57
|
generateVariants(): void;
|
|
51
58
|
/**
|
|
52
59
|
* Returns one of the existing variants to base the newly-generated variant's
|
|
53
60
|
* details off.
|
|
54
61
|
*/
|
|
55
62
|
private getVariantPrototype;
|
|
56
|
-
deleteVariant(id: string): void;
|
|
63
|
+
deleteVariant(id: string, options: GeneratedVariant['options']): void;
|
|
57
64
|
save(): void;
|
|
58
65
|
private checkUniqueSkus;
|
|
59
66
|
private confirmDeletionOfObsoleteVariants;
|