@vendure/admin-ui 1.6.0 → 1.6.3
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/bundles/vendure-admin-ui-catalog.umd.js +6 -1
- package/bundles/vendure-admin-ui-catalog.umd.js.map +1 -1
- package/bundles/vendure-admin-ui-core.umd.js +5 -5
- package/bundles/vendure-admin-ui-core.umd.js.map +1 -1
- package/bundles/vendure-admin-ui-dashboard.umd.js +1 -1
- package/bundles/vendure-admin-ui-dashboard.umd.js.map +1 -1
- package/catalog/components/product-variants-editor/product-variants-editor.component.d.ts +13 -10
- package/catalog/vendure-admin-ui-catalog.metadata.json +1 -1
- package/core/common/version.d.ts +1 -1
- package/core/vendure-admin-ui-core.metadata.json +1 -1
- package/esm2015/catalog/components/product-variants-editor/product-variants-editor.component.js +7 -2
- package/esm2015/core/common/generated-types.js +1 -1
- package/esm2015/core/common/introspection-result.js +1 -1
- package/esm2015/core/common/utilities/configurable-operation-utils.js +2 -2
- package/esm2015/core/common/version.js +2 -2
- package/esm2015/core/components/app-shell/app-shell.component.js +1 -1
- package/esm2015/core/components/main-nav/main-nav.component.js +2 -2
- package/esm2015/core/data/definitions/order-definitions.js +431 -431
- package/esm2015/core/shared/components/address-form/address-form.component.js +2 -2
- package/esm2015/core/shared/components/formatted-address/formatted-address.component.js +2 -2
- package/esm2015/core/shared/dynamic-form-inputs/combination-mode-form-input/combination-mode-form-input.component.js +1 -1
- package/esm2015/dashboard/components/dashboard-widget/dashboard-widget.component.js +2 -2
- package/fesm2015/vendure-admin-ui-catalog.js +6 -1
- package/fesm2015/vendure-admin-ui-catalog.js.map +1 -1
- package/fesm2015/vendure-admin-ui-core.js +459 -459
- package/fesm2015/vendure-admin-ui-core.js.map +1 -1
- package/fesm2015/vendure-admin-ui-dashboard.js +1 -1
- package/fesm2015/vendure-admin-ui-dashboard.js.map +1 -1
- package/package.json +2 -2
- package/static/i18n-messages/cs.json +1 -0
- package/static/i18n-messages/de.json +1 -0
- package/static/i18n-messages/en.json +1 -0
- package/static/i18n-messages/es.json +1 -0
- package/static/i18n-messages/fr.json +1 -0
- package/static/i18n-messages/it.json +1 -0
- package/static/i18n-messages/pl.json +1 -0
- package/static/i18n-messages/pt_BR.json +1 -0
- package/static/i18n-messages/pt_PT.json +1 -0
- package/static/i18n-messages/ru.json +1 -0
- package/static/i18n-messages/uk.json +1 -0
- package/static/i18n-messages/zh_Hans.json +1 -0
- package/static/i18n-messages/zh_Hant.json +1 -0
- package/static/styles/global/_utilities.scss +9 -0
- package/static/theme.min.css +1 -1
|
@@ -4,7 +4,7 @@ export class AddressFormComponent {
|
|
|
4
4
|
AddressFormComponent.decorators = [
|
|
5
5
|
{ type: Component, args: [{
|
|
6
6
|
selector: 'vdr-address-form',
|
|
7
|
-
template: "<form [formGroup]=\"formGroup\">\r\n <clr-input-container>\r\n
|
|
7
|
+
template: "<form [formGroup]=\"formGroup\">\r\n <div class=\"clr-row\">\r\n <div class=\"clr-col-md-4\">\r\n <clr-input-container>\r\n <label>{{ 'customer.full-name' | translate }}</label>\r\n <input formControlName=\"fullName\" type=\"text\" clrInput />\r\n </clr-input-container>\r\n </div>\r\n <div class=\"clr-col-md-4\">\r\n <clr-input-container>\r\n <label>{{ 'customer.company' | translate }}</label>\r\n <input formControlName=\"company\" type=\"text\" clrInput />\r\n </clr-input-container>\r\n </div>\r\n </div>\r\n\r\n <div class=\"clr-row\">\r\n <div class=\"clr-col-md-4\">\r\n <clr-input-container>\r\n <label>{{ 'customer.street-line-1' | translate }}</label>\r\n <input formControlName=\"streetLine1\" type=\"text\" clrInput />\r\n </clr-input-container>\r\n </div>\r\n <div class=\"clr-col-md-4\">\r\n <clr-input-container>\r\n <label>{{ 'customer.street-line-2' | translate }}</label>\r\n <input formControlName=\"streetLine2\" type=\"text\" clrInput />\r\n </clr-input-container>\r\n </div>\r\n </div>\r\n <div class=\"clr-row\">\r\n <div class=\"clr-col-md-4\">\r\n <clr-input-container>\r\n <label>{{ 'customer.city' | translate }}</label>\r\n <input formControlName=\"city\" type=\"text\" clrInput />\r\n </clr-input-container>\r\n </div>\r\n <div class=\"clr-col-md-4\">\r\n <clr-input-container>\r\n <label>{{ 'customer.province' | translate }}</label>\r\n <input formControlName=\"province\" type=\"text\" clrInput />\r\n </clr-input-container>\r\n </div>\r\n </div>\r\n <div class=\"clr-row\">\r\n <div class=\"clr-col-md-4\">\r\n <clr-input-container>\r\n <label>{{ 'customer.postal-code' | translate }}</label>\r\n <input formControlName=\"postalCode\" type=\"text\" clrInput />\r\n </clr-input-container>\r\n </div>\r\n <div class=\"clr-col-md-4\">\r\n <clr-input-container>\r\n <label>{{ 'customer.country' | translate }}</label>\r\n <select name=\"countryCode\" formControlName=\"countryCode\" clrInput clrSelect>\r\n <option *ngFor=\"let country of availableCountries\" [value]=\"country.code\">\r\n {{ country.name }}\r\n </option>\r\n </select>\r\n </clr-input-container>\r\n </div>\r\n </div>\r\n <clr-input-container>\r\n <label>{{ 'customer.phone-number' | translate }}</label>\r\n <input formControlName=\"phoneNumber\" type=\"text\" clrInput />\r\n </clr-input-container>\r\n <section formGroupName=\"customFields\" *ngIf=\"formGroup.get('customFields') as customFieldsGroup\">\r\n <label>{{ 'common.custom-fields' | translate }}</label>\r\n <vdr-tabbed-custom-fields\r\n entityName=\"Address\"\r\n [customFields]=\"customFields\"\r\n [customFieldsFormGroup]=\"customFieldsGroup\"\r\n ></vdr-tabbed-custom-fields>\r\n </section>\r\n</form>\r\n",
|
|
8
8
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
9
9
|
styles: [""]
|
|
10
10
|
},] }
|
|
@@ -14,4 +14,4 @@ AddressFormComponent.propDecorators = {
|
|
|
14
14
|
formGroup: [{ type: Input }],
|
|
15
15
|
availableCountries: [{ type: Input }]
|
|
16
16
|
};
|
|
17
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
17
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoi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BjaGFuZ2VEZXRlY3Rpb246IENoYW5nZURldGVjdGlvblN0cmF0ZWd5Lk9uUHVzaCxcclxufSlcclxuZXhwb3J0IGNsYXNzIEFkZHJlc3NGb3JtQ29tcG9uZW50IHtcclxuICAgIEBJbnB1dCgpIGN1c3RvbUZpZWxkczogQ3VzdG9tRmllbGRDb25maWc7XHJcbiAgICBASW5wdXQoKSBmb3JtR3JvdXA6IEZvcm1Hcm91cDtcclxuICAgIEBJbnB1dCgpIGF2YWlsYWJsZUNvdW50cmllczogR2V0QXZhaWxhYmxlQ291bnRyaWVzLkl0ZW1zW107XHJcbn1cclxuIl19
|
|
@@ -26,7 +26,7 @@ export class FormattedAddressComponent {
|
|
|
26
26
|
FormattedAddressComponent.decorators = [
|
|
27
27
|
{ type: Component, args: [{
|
|
28
28
|
selector: 'vdr-formatted-address',
|
|
29
|
-
template: "<ul class=\"address-lines\">\r\n <li *ngIf=\"address.fullName\">{{ address.fullName }}</li>\r\n <li *ngIf=\"address.streetLine1\">{{ address.streetLine1 }}</li>\r\n <li *ngIf=\"address.streetLine2\">{{ address.streetLine2 }}</li>\r\n <li *ngIf=\"address.city\">{{ address.city }}</li>\r\n <li *ngIf=\"address.province\">{{ address.province }}</li>\r\n <li *ngIf=\"address.postalCode\">{{ address.postalCode }}</li>\r\n <li *ngIf=\"address.country\">\r\n <clr-icon shape=\"world\" size=\"12\"></clr-icon>\r\n {{ getCountryName() }}\r\n </li>\r\n <li *ngIf=\"address.phoneNumber\">\r\n <clr-icon shape=\"phone-handset\" size=\"12\"></clr-icon>\r\n {{ address.phoneNumber }}\r\n </li>\r\n <li *ngFor=\"let customField of getCustomFields()\" class=\"custom-field\">\r\n <vdr-labeled-data [label]=\"customField.key\">{{ customField.value }}</vdr-labeled-data>\r\n </li>\r\n</ul>\r\n",
|
|
29
|
+
template: "<ul class=\"address-lines\">\r\n <li *ngIf=\"address.fullName\">{{ address.fullName }}</li>\r\n <li *ngIf=\"address.company\">{{ address.company }}</li>\r\n <li *ngIf=\"address.streetLine1\">{{ address.streetLine1 }}</li>\r\n <li *ngIf=\"address.streetLine2\">{{ address.streetLine2 }}</li>\r\n <li *ngIf=\"address.city\">{{ address.city }}</li>\r\n <li *ngIf=\"address.province\">{{ address.province }}</li>\r\n <li *ngIf=\"address.postalCode\">{{ address.postalCode }}</li>\r\n <li *ngIf=\"address.country\">\r\n <clr-icon shape=\"world\" size=\"12\"></clr-icon>\r\n {{ getCountryName() }}\r\n </li>\r\n <li *ngIf=\"address.phoneNumber\">\r\n <clr-icon shape=\"phone-handset\" size=\"12\"></clr-icon>\r\n {{ address.phoneNumber }}\r\n </li>\r\n <li *ngFor=\"let customField of getCustomFields()\" class=\"custom-field\">\r\n <vdr-labeled-data [label]=\"customField.key\">{{ customField.value }}</vdr-labeled-data>\r\n </li>\r\n</ul>\r\n",
|
|
30
30
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
31
31
|
styles: [".address-lines{list-style-type:none;line-height:1.2em}.custom-field{margin-top:6px}\n"]
|
|
32
32
|
},] }
|
|
@@ -34,4 +34,4 @@ FormattedAddressComponent.decorators = [
|
|
|
34
34
|
FormattedAddressComponent.propDecorators = {
|
|
35
35
|
address: [{ type: Input }]
|
|
36
36
|
};
|
|
37
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
37
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybWF0dGVkLWFkZHJlc3MuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL2xpYi9jb3JlL3NyYy9zaGFyZWQvY29tcG9uZW50cy9mb3JtYXR0ZWQtYWRkcmVzcy9mb3JtYXR0ZWQtYWRkcmVzcy5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLHVCQUF1QixFQUFFLFNBQVMsRUFBRSxLQUFLLEVBQ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AgIH1cclxuICAgIH1cclxuXHJcbiAgICBnZXRDdXN0b21GaWVsZHMoKTogQXJyYXk8eyBrZXk6IHN0cmluZzsgdmFsdWU6IGFueSB9PiB7XHJcbiAgICAgICAgY29uc3QgY3VzdG9tRmllbGRzID0gKHRoaXMuYWRkcmVzcyBhcyBhbnkpLmN1c3RvbUZpZWxkcztcclxuICAgICAgICBpZiAoY3VzdG9tRmllbGRzKSB7XHJcbiAgICAgICAgICAgIHJldHVybiBPYmplY3QuZW50cmllcyhjdXN0b21GaWVsZHMpXHJcbiAgICAgICAgICAgICAgICAuZmlsdGVyKChba2V5XSkgPT4ga2V5ICE9PSAnX190eXBlbmFtZScpXHJcbiAgICAgICAgICAgICAgICAubWFwKChba2V5LCB2YWx1ZV0pID0+ICh7IGtleSwgdmFsdWU6ICh2YWx1ZSBhcyBhbnkpPy50b1N0cmluZygpID8/ICctJyB9KSk7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgcmV0dXJuIFtdO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBwcml2YXRlIGlzQWRkcmVzc0ZyYWdtZW50KGlucHV0OiBBZGRyZXNzRnJhZ21lbnQgfCBPcmRlckFkZHJlc3MpOiBpbnB1dCBpcyBBZGRyZXNzRnJhZ21lbnQge1xyXG4gICAgICAgIHJldHVybiB0eXBlb2YgaW5wdXQuY291bnRyeSAhPT0gJ3N0cmluZyc7XHJcbiAgICB9XHJcbn1cclxuIl19
|
|
@@ -42,4 +42,4 @@ CombinationModeFormInputComponent.decorators = [
|
|
|
42
42
|
CombinationModeFormInputComponent.ctorParameters = () => [
|
|
43
43
|
{ type: ConfigurableInputComponent, decorators: [{ type: Optional }] }
|
|
44
44
|
];
|
|
45
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
45
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tYmluYXRpb24tbW9kZS1mb3JtLWlucHV0LmNvb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udHJvbC5zZXRWYWx1ZShmYWxzZSk7XG4gICAgfVxufVxuIl19
|
|
@@ -12,7 +12,7 @@ export class DashboardWidgetComponent {
|
|
|
12
12
|
const loadComponentResult = this.widgetConfig.loadComponent();
|
|
13
13
|
const componentType = loadComponentResult instanceof Promise ? yield loadComponentResult : loadComponentResult;
|
|
14
14
|
this.componentRef = this.portal.createComponent(this.componentFactoryResolver.resolveComponentFactory(componentType));
|
|
15
|
-
this.componentRef.changeDetectorRef.
|
|
15
|
+
this.componentRef.changeDetectorRef.detectChanges();
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
18
|
ngOnDestroy() {
|
|
@@ -36,4 +36,4 @@ DashboardWidgetComponent.propDecorators = {
|
|
|
36
36
|
widgetConfig: [{ type: Input }],
|
|
37
37
|
portal: [{ type: ViewChild, args: ['portal', { read: ViewContainerRef },] }]
|
|
38
38
|
};
|
|
39
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
39
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGFzaGJvYXJkLXdpZGdldC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvbGliL2Rhc2hib2FyZC9zcmMvY29tcG9uZW50cy9kYXNoYm9hcmQtd2lkZ2V0L2Rhc2hib2FyZC13aWRnZXQuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEVBRUgsdUJBQXVCLEVBQ3ZCLFNBQVMsRUFDVCx3QkFBd0IsRUFFeEIsS0FBSyxFQUdMLFNBQVMsRUFDVCxnQkFBZ0IsR0FDbkIsTUFBTSxlQUFlLENBQUM7QUFTdkIsTUFBTSxPQUFPLHdCQUF3QjtJQVFqQyxZQUFvQix3QkFBa0Q7UUFBbEQsNkJBQXdCLEdBQXhCLHdCQUF3QixDQUEwQjtJQUFHLENBQUM7SUFFMUUsZU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WRXaWRnZXQoKTtcbiAgICB9XG5cbiAgICBwcml2YXRlIGFzeW5jIGxvYWRXaWRnZXQoKSB7XG4gICAgICAgIGNvbnN0IGxvYWRDb21wb25lbnRSZXN1bHQgPSB0aGlzLndpZGdldENvbmZpZy5sb2FkQ29tcG9uZW50KCk7XG4gICAgICAgIGNvbnN0IGNvbXBvbmVudFR5cGUgPVxuICAgICAgICAgICAgbG9hZENvbXBvbmVudFJlc3VsdCBpbnN0YW5jZW9mIFByb21pc2UgPyBhd2FpdCBsb2FkQ29tcG9uZW50UmVzdWx0IDogbG9hZENvbXBvbmVudFJlc3VsdDtcbiAgICAgICAgdGhpcy5jb21wb25lbnRSZWYgPSB0aGlzLnBvcnRhbC5jcmVhdGVDb21wb25lbnQoXG4gICAgICAgICAgICB0aGlzLmNvbXBvbmVudEZhY3RvcnlSZXNvbHZlci5yZXNvbHZlQ29tcG9uZW50RmFjdG9yeShjb21wb25lbnRUeXBlKSxcbiAgICAgICAgKTtcbiAgICAgICAgdGhpcy5jb21wb25lbnRSZWYuY2hhbmdlRGV0ZWN0b3JSZWYuZGV0ZWN0Q2hhbmdlcygpO1xuICAgIH1cblxuICAgIG5nT25EZXN0cm95KCkge1xuICAgICAgICBpZiAodGhpcy5jb21wb25lbnRSZWYpIHtcbiAgICAgICAgICAgIHRoaXMuY29tcG9uZW50UmVmLmRlc3Ryb3koKTtcbiAgICAgICAgfVxuICAgIH1cbn1cbiJdfQ==
|
|
@@ -2216,6 +2216,10 @@ class ProductVariantsEditorComponent {
|
|
|
2216
2216
|
values: [],
|
|
2217
2217
|
});
|
|
2218
2218
|
}
|
|
2219
|
+
removeOption(optionGroup) {
|
|
2220
|
+
this.optionGroups = this.optionGroups.filter(og => og !== optionGroup);
|
|
2221
|
+
this.generateVariants();
|
|
2222
|
+
}
|
|
2219
2223
|
generateVariants() {
|
|
2220
2224
|
const groups = this.optionGroups.map(g => g.values);
|
|
2221
2225
|
const previousVariants = this.generatedVariants;
|
|
@@ -2278,6 +2282,7 @@ class ProductVariantsEditorComponent {
|
|
|
2278
2282
|
});
|
|
2279
2283
|
}
|
|
2280
2284
|
save() {
|
|
2285
|
+
this.optionGroups = this.optionGroups.filter(g => g.values.length);
|
|
2281
2286
|
const newOptionGroups = this.optionGroups
|
|
2282
2287
|
.filter(og => og.isNew)
|
|
2283
2288
|
.map(og => ({
|
|
@@ -2460,7 +2465,7 @@ class ProductVariantsEditorComponent {
|
|
|
2460
2465
|
ProductVariantsEditorComponent.decorators = [
|
|
2461
2466
|
{ type: Component, args: [{
|
|
2462
2467
|
selector: 'vdr-product-variants-editor',
|
|
2463
|
-
template: "<vdr-action-bar>\r\n <vdr-ab-right>\r\n <button\r\n class=\"btn btn-primary\"\r\n (click)=\"save()\"\r\n [disabled]=\"!formValueChanged || getVariantsToAdd().length === 0\"\r\n >\r\n {{ 'common.add-new-variants' | translate: { count: getVariantsToAdd().length } }}\r\n </button>\r\n </vdr-ab-right>\r\n</vdr-action-bar>\r\n\r\n<div *ngFor=\"let group of optionGroups\" class=\"option-groups\">\r\n <div class=\"name\">\r\n <label>{{ 'catalog.option' | translate }}</label>\r\n <input clrInput [(ngModel)]=\"group.name\" name=\"name\" [readonly]=\"!group.isNew\" />\r\n </div>\r\n <div class=\"values\">\r\n <label>{{ 'catalog.option-values' | translate }}</label>\r\n <vdr-option-value-input\r\n #optionValueInputComponent\r\n [(ngModel)]=\"group.values\"\r\n (ngModelChange)=\"generateVariants()\"\r\n [groupName]=\"group.name\"\r\n [disabled]=\"group.name === ''\"\r\n ></vdr-option-value-input>\r\n </div>\r\n</div>\r\n<button\r\n class=\"btn btn-primary-outline btn-sm\"\r\n (click)=\"addOption()\"\r\n>\r\n <clr-icon shape=\"plus\"></clr-icon>\r\n {{ 'catalog.add-option' | translate }}\r\n</button>\r\n\r\n<div class=\"variants-preview\">\r\n <table class=\"table\">\r\n <thead>\r\n <tr>\r\n <th>{{ 'common.create' | translate }}</th>\r\n <th>{{ 'catalog.variant' | translate }}</th>\r\n <th>{{ 'catalog.sku' | translate }}</th>\r\n <th>{{ 'catalog.price' | translate }}</th>\r\n <th>{{ 'catalog.stock-on-hand' | translate }}</th>\r\n <th></th>\r\n </tr>\r\n </thead>\r\n <tr *ngFor=\"let variant of generatedVariants\" [class.disabled]=\"!variant.enabled || variant.existing\">\r\n <td>\r\n <input\r\n type=\"checkbox\"\r\n *ngIf=\"!variant.existing\"\r\n [(ngModel)]=\"variant.enabled\"\r\n name=\"enabled\"\r\n clrCheckbox\r\n (ngModelChange)=\"formValueChanged = true\"\r\n />\r\n </td>\r\n <td>\r\n {{ getVariantName(variant) | translate }}\r\n </td>\r\n <td>\r\n <clr-input-container *ngIf=\"!variant.existing\">\r\n <input\r\n clrInput\r\n type=\"text\"\r\n [(ngModel)]=\"variant.sku\"\r\n [placeholder]=\"'catalog.sku' | translate\"\r\n name=\"sku\"\r\n required\r\n (ngModelChange)=\"onFormChanged(variant)\"\r\n />\r\n </clr-input-container>\r\n <span *ngIf=\"variant.existing\">{{ variant.sku }}</span>\r\n </td>\r\n <td>\r\n <clr-input-container *ngIf=\"!variant.existing\">\r\n <vdr-currency-input\r\n clrInput\r\n [(ngModel)]=\"variant.price\"\r\n name=\"price\"\r\n [currencyCode]=\"currencyCode\"\r\n (ngModelChange)=\"onFormChanged(variant)\"\r\n ></vdr-currency-input>\r\n </clr-input-container>\r\n <span *ngIf=\"variant.existing\">{{ variant.price | localeCurrency: currencyCode }}</span>\r\n </td>\r\n <td>\r\n <clr-input-container *ngIf=\"!variant.existing\">\r\n <input\r\n clrInput\r\n type=\"number\"\r\n [(ngModel)]=\"variant.stock\"\r\n name=\"stock\"\r\n min=\"0\"\r\n step=\"1\"\r\n (ngModelChange)=\"onFormChanged(variant)\"\r\n />\r\n </clr-input-container>\r\n <span *ngIf=\"variant.existing\">{{ variant.stock }}</span>\r\n </td>\r\n <td>\r\n <vdr-dropdown *ngIf=\"variant.productVariantId as productVariantId\">\r\n <button class=\"icon-button\" vdrDropdownTrigger>\r\n <clr-icon shape=\"ellipsis-vertical\"></clr-icon>\r\n </button>\r\n <vdr-dropdown-menu vdrPosition=\"bottom-right\">\r\n <button\r\n type=\"button\"\r\n class=\"delete-button\"\r\n (click)=\"deleteVariant(productVariantId)\"\r\n vdrDropdownItem\r\n >\r\n <clr-icon shape=\"trash\" class=\"is-danger\"></clr-icon>\r\n {{ 'common.delete' | translate }}\r\n </button>\r\n </vdr-dropdown-menu>\r\n </vdr-dropdown>\r\n </td>\r\n </tr>\r\n </table>\r\n</div>\r\n",
|
|
2468
|
+
template: "<vdr-action-bar>\r\n <vdr-ab-right>\r\n <button\r\n class=\"btn btn-primary\"\r\n (click)=\"save()\"\r\n [disabled]=\"!formValueChanged || getVariantsToAdd().length === 0\"\r\n >\r\n {{ 'common.add-new-variants' | translate: { count: getVariantsToAdd().length } }}\r\n </button>\r\n </vdr-ab-right>\r\n</vdr-action-bar>\r\n\r\n<div *ngFor=\"let group of optionGroups\" class=\"option-groups\">\r\n <div class=\"name\">\r\n <label>{{ 'catalog.option' | translate }}</label>\r\n <input clrInput [(ngModel)]=\"group.name\" name=\"name\" [readonly]=\"!group.isNew\" />\r\n </div>\r\n <div class=\"values\">\r\n <label>{{ 'catalog.option-values' | translate }}</label>\r\n <vdr-option-value-input\r\n #optionValueInputComponent\r\n [(ngModel)]=\"group.values\"\r\n (ngModelChange)=\"generateVariants()\"\r\n [groupName]=\"group.name\"\r\n [disabled]=\"group.name === ''\"\r\n ></vdr-option-value-input>\r\n </div>\r\n <div>\r\n <button *ngIf=\"group.isNew\" class=\"btn btn-icon btn-danger-outline mt5\" (click)=\"removeOption(group)\">\r\n <clr-icon shape=\"trash\"></clr-icon>\r\n </button>\r\n </div>\r\n</div>\r\n<button\r\n class=\"btn btn-primary-outline btn-sm\"\r\n (click)=\"addOption()\"\r\n>\r\n <clr-icon shape=\"plus\"></clr-icon>\r\n {{ 'catalog.add-option' | translate }}\r\n</button>\r\n\r\n<div class=\"variants-preview\">\r\n <table class=\"table\">\r\n <thead>\r\n <tr>\r\n <th>{{ 'common.create' | translate }}</th>\r\n <th>{{ 'catalog.variant' | translate }}</th>\r\n <th>{{ 'catalog.sku' | translate }}</th>\r\n <th>{{ 'catalog.price' | translate }}</th>\r\n <th>{{ 'catalog.stock-on-hand' | translate }}</th>\r\n <th></th>\r\n </tr>\r\n </thead>\r\n <tr *ngFor=\"let variant of generatedVariants\" [class.disabled]=\"!variant.enabled || variant.existing\">\r\n <td>\r\n <input\r\n type=\"checkbox\"\r\n *ngIf=\"!variant.existing\"\r\n [(ngModel)]=\"variant.enabled\"\r\n name=\"enabled\"\r\n clrCheckbox\r\n (ngModelChange)=\"formValueChanged = true\"\r\n />\r\n </td>\r\n <td>\r\n {{ getVariantName(variant) | translate }}\r\n </td>\r\n <td>\r\n <clr-input-container *ngIf=\"!variant.existing\">\r\n <input\r\n clrInput\r\n type=\"text\"\r\n [(ngModel)]=\"variant.sku\"\r\n [placeholder]=\"'catalog.sku' | translate\"\r\n name=\"sku\"\r\n required\r\n (ngModelChange)=\"onFormChanged(variant)\"\r\n />\r\n </clr-input-container>\r\n <span *ngIf=\"variant.existing\">{{ variant.sku }}</span>\r\n </td>\r\n <td>\r\n <clr-input-container *ngIf=\"!variant.existing\">\r\n <vdr-currency-input\r\n clrInput\r\n [(ngModel)]=\"variant.price\"\r\n name=\"price\"\r\n [currencyCode]=\"currencyCode\"\r\n (ngModelChange)=\"onFormChanged(variant)\"\r\n ></vdr-currency-input>\r\n </clr-input-container>\r\n <span *ngIf=\"variant.existing\">{{ variant.price | localeCurrency: currencyCode }}</span>\r\n </td>\r\n <td>\r\n <clr-input-container *ngIf=\"!variant.existing\">\r\n <input\r\n clrInput\r\n type=\"number\"\r\n [(ngModel)]=\"variant.stock\"\r\n name=\"stock\"\r\n min=\"0\"\r\n step=\"1\"\r\n (ngModelChange)=\"onFormChanged(variant)\"\r\n />\r\n </clr-input-container>\r\n <span *ngIf=\"variant.existing\">{{ variant.stock }}</span>\r\n </td>\r\n <td>\r\n <vdr-dropdown *ngIf=\"variant.productVariantId as productVariantId\">\r\n <button class=\"icon-button\" vdrDropdownTrigger>\r\n <clr-icon shape=\"ellipsis-vertical\"></clr-icon>\r\n </button>\r\n <vdr-dropdown-menu vdrPosition=\"bottom-right\">\r\n <button\r\n type=\"button\"\r\n class=\"delete-button\"\r\n (click)=\"deleteVariant(productVariantId)\"\r\n vdrDropdownItem\r\n >\r\n <clr-icon shape=\"trash\" class=\"is-danger\"></clr-icon>\r\n {{ 'common.delete' | translate }}\r\n </button>\r\n </vdr-dropdown-menu>\r\n </vdr-dropdown>\r\n </td>\r\n </tr>\r\n </table>\r\n</div>\r\n",
|
|
2464
2469
|
changeDetection: ChangeDetectionStrategy.Default,
|
|
2465
2470
|
styles: [".option-groups{display:flex}.option-groups:first-of-type{margin-top:24px}.values{flex:1;margin:0 6px}.variants-preview tr.disabled td{background-color:var(--color-component-bg-100);color:var(--color-grey-400)}\n"]
|
|
2466
2471
|
},] }
|