@rolatech/angular-cart 18.0.7 → 19.0.0-beta.0
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/fesm2022/{rolatech-angular-cart-cart-checkout.routes-dugb0QFh.mjs → rolatech-angular-cart-cart-checkout.routes-DP6Bh23E.mjs} +23 -22
- package/fesm2022/rolatech-angular-cart-cart-checkout.routes-DP6Bh23E.mjs.map +1 -0
- package/fesm2022/{rolatech-angular-cart-rolatech-angular-cart-DZDvpMFE.mjs → rolatech-angular-cart-rolatech-angular-cart-BcUrm79L.mjs} +30 -31
- package/fesm2022/rolatech-angular-cart-rolatech-angular-cart-BcUrm79L.mjs.map +1 -0
- package/fesm2022/rolatech-angular-cart.mjs +1 -1
- package/lib/pages/cart-checkout/cart-checkout-product/cart-checkout-product.component.d.ts +1 -0
- package/package.json +6 -4
- package/themes/_default.scss +1 -1
- package/esm2022/index.mjs +0 -5
- package/esm2022/lib/components/cart-checkout-action/cart-checkout-action.component.mjs +0 -21
- package/esm2022/lib/components/cart-checkout-item/cart-checkout-item.component.mjs +0 -40
- package/esm2022/lib/components/cart-checkout-summary/cart-checkout-summary.component.mjs +0 -25
- package/esm2022/lib/components/cart-icon/cart-icon.component.mjs +0 -52
- package/esm2022/lib/components/cart-side/cart-side.component.mjs +0 -105
- package/esm2022/lib/components/index.mjs +0 -3
- package/esm2022/lib/interfaces/cart.mjs +0 -2
- package/esm2022/lib/interfaces/index.mjs +0 -2
- package/esm2022/lib/pages/cart-checkout/cart-checkout-course/cart-checkout-course.component.mjs +0 -55
- package/esm2022/lib/pages/cart-checkout/cart-checkout-index/cart-checkout-index.component.mjs +0 -12
- package/esm2022/lib/pages/cart-checkout/cart-checkout-product/cart-checkout-product.component.mjs +0 -71
- package/esm2022/lib/pages/cart-checkout/cart-checkout-variant/cart-checkout-variant.component.mjs +0 -59
- package/esm2022/lib/pages/cart-checkout/cart-checkout.routes.mjs +0 -24
- package/esm2022/lib/pages/cart-index/cart-index.component.mjs +0 -83
- package/esm2022/lib/pages/cart.routes.mjs +0 -12
- package/esm2022/lib/state/cart.state.mjs +0 -20
- package/esm2022/lib/state/index.mjs +0 -2
- package/esm2022/rolatech-angular-cart.mjs +0 -5
- package/fesm2022/rolatech-angular-cart-cart-checkout.routes-dugb0QFh.mjs.map +0 -1
- package/fesm2022/rolatech-angular-cart-rolatech-angular-cart-DZDvpMFE.mjs.map +0 -1
|
@@ -9,7 +9,7 @@ import * as i1 from '@angular/material/button';
|
|
|
9
9
|
import { MatButtonModule } from '@angular/material/button';
|
|
10
10
|
import { FixedPipe, OptionsFormatPipe } from '@rolatech/angular-common';
|
|
11
11
|
import { ProductType } from '@rolatech/angular-product';
|
|
12
|
-
import { C as CartCheckoutSummaryComponent, a as CartCheckoutItemComponent, b as CartCheckoutActionComponent } from './rolatech-angular-cart-rolatech-angular-cart-
|
|
12
|
+
import { C as CartCheckoutSummaryComponent, a as CartCheckoutItemComponent, b as CartCheckoutActionComponent } from './rolatech-angular-cart-rolatech-angular-cart-BcUrm79L.mjs';
|
|
13
13
|
import * as i4 from '@angular/cdk/text-field';
|
|
14
14
|
import { TextFieldModule } from '@angular/cdk/text-field';
|
|
15
15
|
import * as i2 from '@angular/material/form-field';
|
|
@@ -20,12 +20,12 @@ import * as i1$1 from '@angular/forms';
|
|
|
20
20
|
import { FormsModule } from '@angular/forms';
|
|
21
21
|
|
|
22
22
|
class CartCheckoutIndexComponent {
|
|
23
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
24
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
23
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: CartCheckoutIndexComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
24
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: CartCheckoutIndexComponent, isStandalone: true, selector: "rolatech-cart-checkout-index", ngImport: i0, template: "<p>cart-checkout-index works!</p>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
|
|
25
25
|
}
|
|
26
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
26
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: CartCheckoutIndexComponent, decorators: [{
|
|
27
27
|
type: Component,
|
|
28
|
-
args: [{ selector: 'rolatech-cart-checkout-index',
|
|
28
|
+
args: [{ selector: 'rolatech-cart-checkout-index', imports: [CommonModule], template: "<p>cart-checkout-index works!</p>\n" }]
|
|
29
29
|
}] });
|
|
30
30
|
|
|
31
31
|
class CartCheckoutCourseComponent extends BaseComponent {
|
|
@@ -66,12 +66,12 @@ class CartCheckoutCourseComponent extends BaseComponent {
|
|
|
66
66
|
},
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
70
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
69
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: CartCheckoutCourseComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
70
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: CartCheckoutCourseComponent, isStandalone: true, selector: "rolatech-cart-checkout-course", usesInheritance: true, ngImport: i0, template: "@if (course) {\n <rolatech-container>\n <rolatech-toolbar title=\"\u8BA2\u5355\u786E\u8BA4\" large></rolatech-toolbar>\n <div class=\"flex flex-col md:flex-row gap-3 mt-3\">\n <div class=\"md:w-2/3 md:pr-16\">\n <div class=\"flex flex-col\">\n <div class=\"text-xl\">\u8BFE\u7A0B\u4FE1\u606F</div>\n @if (course) {\n <div>\n <div class=\"flex justify-between py-3\">\n <div class=\"flex w-full\">\n <div class=\"w-1/4 aspect-video bg-[--rt-raised-background] h-fit\">\n @if (course.media) {\n <div class=\"object-cover aspect-video rounded-lg\">\n @defer (on viewport()) {\n <rolatech-thumbnail [src]=\"course.media[0].url + '!w400'\" size=\"medium\"> </rolatech-thumbnail>\n } @placeholder {\n <div class=\"bg-[--rt-raised-background] h-full w-full object-cover aspect-video rounded-lg\"></div>\n }\n </div>\n }\n </div>\n <div class=\"w-3/4 ml-3 flex flex-col justify-between\">\n <span class=\"font-medium\">{{ course.name }}</span>\n <span class=\"text-sm text-[--rt-text-secondary]\">\u7C7B\u578B {{ type[course.type] }}</span>\n </div>\n </div>\n <div>\u00A5{{ course.pricing[0].total | fixed }}</div>\n </div>\n @if (course.schedule) {\n <div class=\"flex justify-between py-3\">\n <span>\u5F00\u8BFE\u65E5\u671F</span>\n <span>{{ course.schedule[0].startAt }}</span>\n </div>\n }\n </div>\n }\n </div>\n </div>\n <div class=\"md:w-1/3\">\n <div class=\"text-2xl font-medium mb-2\">\u7EDF\u8BA1</div>\n <div class=\"divide-y\">\n <div class=\"flex justify-between py-2 pb-32 md:pb-3\">\n <span> \u8BA2\u5355\u91D1\u989D </span>\n <span> \u00A5{{ course.pricing[0].total | fixed }} </span>\n </div>\n <div class=\"py-3 bottom-0 left-0 right-0 md:static\">\n <div>\n <div class=\"flex justify-between\">\n <span class=\"text-lg font-medium\">\u603B\u8BA1</span>\n <span>\u00A5{{ course.pricing[0].total | fixed }}</span>\n </div>\n <a mat-flat-button class=\"w-full min-h-11 my-6\" (click)=\"createOrder()\">\u63D0\u4EA4\u8BA2\u5355</a>\n </div>\n </div>\n </div>\n </div>\n </div>\n </rolatech-container>\n}\n", styles: [""], dependencies: [{ kind: "component", type: ContainerComponent, selector: "rolatech-container" }, { kind: "component", type: ToolbarComponent, selector: "rolatech-toolbar", inputs: ["title", "subtitle", "back", "link", "large", "divider"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "pipe", type: FixedPipe, name: "fixed" }], deferBlockDependencies: [() => [ThumbnailComponent]] }); }
|
|
71
71
|
}
|
|
72
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
72
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: CartCheckoutCourseComponent, decorators: [{
|
|
73
73
|
type: Component,
|
|
74
|
-
args: [{ selector: 'rolatech-cart-checkout-course',
|
|
74
|
+
args: [{ selector: 'rolatech-cart-checkout-course', imports: [ContainerComponent, ToolbarComponent, ThumbnailComponent, MatButtonModule, FixedPipe], template: "@if (course) {\n <rolatech-container>\n <rolatech-toolbar title=\"\u8BA2\u5355\u786E\u8BA4\" large></rolatech-toolbar>\n <div class=\"flex flex-col md:flex-row gap-3 mt-3\">\n <div class=\"md:w-2/3 md:pr-16\">\n <div class=\"flex flex-col\">\n <div class=\"text-xl\">\u8BFE\u7A0B\u4FE1\u606F</div>\n @if (course) {\n <div>\n <div class=\"flex justify-between py-3\">\n <div class=\"flex w-full\">\n <div class=\"w-1/4 aspect-video bg-[--rt-raised-background] h-fit\">\n @if (course.media) {\n <div class=\"object-cover aspect-video rounded-lg\">\n @defer (on viewport()) {\n <rolatech-thumbnail [src]=\"course.media[0].url + '!w400'\" size=\"medium\"> </rolatech-thumbnail>\n } @placeholder {\n <div class=\"bg-[--rt-raised-background] h-full w-full object-cover aspect-video rounded-lg\"></div>\n }\n </div>\n }\n </div>\n <div class=\"w-3/4 ml-3 flex flex-col justify-between\">\n <span class=\"font-medium\">{{ course.name }}</span>\n <span class=\"text-sm text-[--rt-text-secondary]\">\u7C7B\u578B {{ type[course.type] }}</span>\n </div>\n </div>\n <div>\u00A5{{ course.pricing[0].total | fixed }}</div>\n </div>\n @if (course.schedule) {\n <div class=\"flex justify-between py-3\">\n <span>\u5F00\u8BFE\u65E5\u671F</span>\n <span>{{ course.schedule[0].startAt }}</span>\n </div>\n }\n </div>\n }\n </div>\n </div>\n <div class=\"md:w-1/3\">\n <div class=\"text-2xl font-medium mb-2\">\u7EDF\u8BA1</div>\n <div class=\"divide-y\">\n <div class=\"flex justify-between py-2 pb-32 md:pb-3\">\n <span> \u8BA2\u5355\u91D1\u989D </span>\n <span> \u00A5{{ course.pricing[0].total | fixed }} </span>\n </div>\n <div class=\"py-3 bottom-0 left-0 right-0 md:static\">\n <div>\n <div class=\"flex justify-between\">\n <span class=\"text-lg font-medium\">\u603B\u8BA1</span>\n <span>\u00A5{{ course.pricing[0].total | fixed }}</span>\n </div>\n <a mat-flat-button class=\"w-full min-h-11 my-6\" (click)=\"createOrder()\">\u63D0\u4EA4\u8BA2\u5355</a>\n </div>\n </div>\n </div>\n </div>\n </div>\n </rolatech-container>\n}\n" }]
|
|
75
75
|
}] });
|
|
76
76
|
|
|
77
77
|
class CartCheckoutProductComponent extends BaseComponent {
|
|
@@ -84,12 +84,15 @@ class CartCheckoutProductComponent extends BaseComponent {
|
|
|
84
84
|
this.type = ProductType;
|
|
85
85
|
this.quantity = 1;
|
|
86
86
|
this.note = '';
|
|
87
|
+
this.address = {};
|
|
87
88
|
}
|
|
88
89
|
ngOnInit() {
|
|
89
90
|
this.getProduct();
|
|
90
91
|
}
|
|
91
92
|
createOrder() {
|
|
92
|
-
this.orderService
|
|
93
|
+
this.orderService
|
|
94
|
+
.create({ type: 'PRODUCT', productId: this.id, note: this.note, shippingAddress: this.address })
|
|
95
|
+
.subscribe({
|
|
93
96
|
next: (res) => {
|
|
94
97
|
this.router.navigateByUrl(`/orders/${res.data.id}`);
|
|
95
98
|
},
|
|
@@ -106,15 +109,14 @@ class CartCheckoutProductComponent extends BaseComponent {
|
|
|
106
109
|
},
|
|
107
110
|
});
|
|
108
111
|
}
|
|
109
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
110
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
112
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: CartCheckoutProductComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
113
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: CartCheckoutProductComponent, isStandalone: true, selector: "rolatech-cart-checkout-product", usesInheritance: true, ngImport: i0, template: "@if (product) {\n <rolatech-container>\n <rolatech-toolbar title=\"\u8BA2\u5355\u786E\u8BA4\" large></rolatech-toolbar>\n <div class=\"flex flex-col md:flex-row gap-3 mt-3\">\n <div class=\"md:w-2/3 md:pr-16\">\n <div class=\"flex flex-col\">\n <div class=\"text-xl\">\u5546\u54C1\u4FE1\u606F</div>\n <rolatech-cart-checkout-item\n [name]=\"product.name\"\n [description]=\"product.description\"\n [thumbnail]=\"product.media[0].url + '!w200'\"\n [price]=\"product.price\"\n [(quantity)]=\"quantity\"\n ></rolatech-cart-checkout-item>\n </div>\n <div>\n <div class=\"text-md py-2\">\u6536\u8D27\u4EBA\u4FE1\u606F</div>\n <div class=\"flex flex-col md:flex-row gap-2\">\n <mat-form-field appearance=\"fill\">\n <mat-label>\u59D3\u540D</mat-label>\n <input matInput type=\"text\" [(ngModel)]=\"address.name\" />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label>\u7535\u8BDD</mat-label>\n <input matInput type=\"text\" [(ngModel)]=\"address.phone\" />\n </mat-form-field>\n </div>\n <div class=\"flex flex-col md:flex-row gap-2\">\n <mat-form-field appearance=\"fill\">\n <mat-label>\u7701\u4EFD</mat-label>\n <input matInput type=\"text\" [(ngModel)]=\"address.province\" />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label>\u57CE\u5E02</mat-label>\n <input matInput type=\"text\" [(ngModel)]=\"address.city\" />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label>\u5730\u533A</mat-label>\n <input matInput type=\"text\" [(ngModel)]=\"address.district\" />\n </mat-form-field>\n </div>\n\n <mat-form-field appearance=\"fill\">\n <mat-label>\u8BE6\u7EC6\u5730\u5740</mat-label>\n <textarea matInput type=\"text\" [(ngModel)]=\"address.detail\" cdkTextareaAutosize cdkAutosizeMinRows=\"3\"></textarea>\n </mat-form-field>\n </div>\n <div>\n <div class=\"text-md\">\u5907\u6CE8</div>\n <mat-form-field appearance=\"fill\">\n <textarea matInput type=\"text\" [(ngModel)]=\"note\" cdkTextareaAutosize cdkAutosizeMinRows=\"3\"></textarea>\n </mat-form-field>\n </div>\n </div>\n <div class=\"md:w-1/3\">\n @if (product.priceType && product.priceType.toString() === 'PARTIAL') {\n <rolatech-cart-checkout-summary [total]=\"product.price\" [deposit]=\"product.deposit\"></rolatech-cart-checkout-summary>\n } @else {\n <rolatech-cart-checkout-summary [total]=\"product.price\"></rolatech-cart-checkout-summary>\n }\n <rolatech-cart-checkout-action\n (create)=\"createOrder()\"\n [title]=\"product.priceType && product.priceType.toString() === 'FIXED' ? '\u63D0\u4EA4\u8BA2\u5355' : '\u63D0\u4EA4\u8BA2\u5355'\"\n ></rolatech-cart-checkout-action>\n </div>\n </div>\n </rolatech-container>\n}\n", styles: ["mat-form-field{width:100%}\n"], dependencies: [{ kind: "component", type: ContainerComponent, selector: "rolatech-container" }, { kind: "component", type: ToolbarComponent, selector: "rolatech-toolbar", inputs: ["title", "subtitle", "back", "link", "large", "divider"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: CartCheckoutSummaryComponent, selector: "rolatech-cart-checkout-summary", inputs: ["deposit", "total"] }, { kind: "component", type: CartCheckoutItemComponent, selector: "rolatech-cart-checkout-item", inputs: ["thumbnail", "name", "description", "quantity", "price", "max"], outputs: ["quantityChange", "add", "remove", "delete"] }, { kind: "component", type: CartCheckoutActionComponent, selector: "rolatech-cart-checkout-action", inputs: ["title"], outputs: ["create"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: i4.CdkTextareaAutosize, selector: "textarea[cdkTextareaAutosize]", inputs: ["cdkAutosizeMinRows", "cdkAutosizeMaxRows", "cdkTextareaAutosize", "placeholder"], exportAs: ["cdkTextareaAutosize"] }, { kind: "ngmodule", type: TextFieldModule }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
111
114
|
}
|
|
112
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
115
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: CartCheckoutProductComponent, decorators: [{
|
|
113
116
|
type: Component,
|
|
114
|
-
args: [{ selector: 'rolatech-cart-checkout-product',
|
|
117
|
+
args: [{ selector: 'rolatech-cart-checkout-product', imports: [
|
|
115
118
|
ContainerComponent,
|
|
116
119
|
ToolbarComponent,
|
|
117
|
-
ThumbnailComponent,
|
|
118
120
|
MatButtonModule,
|
|
119
121
|
CartCheckoutSummaryComponent,
|
|
120
122
|
CartCheckoutItemComponent,
|
|
@@ -123,7 +125,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
|
|
|
123
125
|
MatFormFieldModule,
|
|
124
126
|
MatInputModule,
|
|
125
127
|
TextFieldModule,
|
|
126
|
-
], encapsulation: ViewEncapsulation.None, template: "@if (product) {\n <rolatech-container>\n <rolatech-toolbar title=\"\u8BA2\u5355\u786E\u8BA4\" large></rolatech-toolbar>\n <div class=\"flex flex-col md:flex-row gap-3 mt-3\">\n <div class=\"md:w-2/3 md:pr-16\">\n <div class=\"flex flex-col\">\n <div class=\"text-xl\">\u5546\u54C1\u4FE1\u606F</div>\n <rolatech-cart-checkout-item\n [name]=\"product.name\"\n [description]=\"product.description\"\n [thumbnail]=\"product.media[0].url + '!w200'\"\n [price]=\"product.price\"\n [(quantity)]=\"quantity\"\n ></rolatech-cart-checkout-item>\n </div>\n <div>\n <div class=\"text-md\">\u5907\u6CE8</div>\n <mat-form-field appearance=\"fill\">\n <textarea matInput type=\"text\" [(ngModel)]=\"note\" cdkTextareaAutosize cdkAutosizeMinRows=\"3\"></textarea>\n </mat-form-field>\n </div>\n </div>\n <div class=\"md:w-1/3\">\n @if (product.priceType && product.priceType.toString() === 'PARTIAL') {\n <rolatech-cart-checkout-summary [total]=\"product.price\" [deposit]=\"product.deposit\"></rolatech-cart-checkout-summary>\n } @else {\n <rolatech-cart-checkout-summary [total]=\"product.price\"></rolatech-cart-checkout-summary>\n }\n <rolatech-cart-checkout-action\n (create)=\"createOrder()\"\n [title]=\"product.priceType && product.priceType.toString() === 'FIXED' ? '\u63D0\u4EA4\u8BA2\u5355' : '\u63D0\u4EA4\u8BA2\u5355'\"\n ></rolatech-cart-checkout-action>\n </div>\n </div>\n </rolatech-container>\n}\n", styles: ["mat-form-field{width:100%}\n"] }]
|
|
128
|
+
], encapsulation: ViewEncapsulation.None, template: "@if (product) {\n <rolatech-container>\n <rolatech-toolbar title=\"\u8BA2\u5355\u786E\u8BA4\" large></rolatech-toolbar>\n <div class=\"flex flex-col md:flex-row gap-3 mt-3\">\n <div class=\"md:w-2/3 md:pr-16\">\n <div class=\"flex flex-col\">\n <div class=\"text-xl\">\u5546\u54C1\u4FE1\u606F</div>\n <rolatech-cart-checkout-item\n [name]=\"product.name\"\n [description]=\"product.description\"\n [thumbnail]=\"product.media[0].url + '!w200'\"\n [price]=\"product.price\"\n [(quantity)]=\"quantity\"\n ></rolatech-cart-checkout-item>\n </div>\n <div>\n <div class=\"text-md py-2\">\u6536\u8D27\u4EBA\u4FE1\u606F</div>\n <div class=\"flex flex-col md:flex-row gap-2\">\n <mat-form-field appearance=\"fill\">\n <mat-label>\u59D3\u540D</mat-label>\n <input matInput type=\"text\" [(ngModel)]=\"address.name\" />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label>\u7535\u8BDD</mat-label>\n <input matInput type=\"text\" [(ngModel)]=\"address.phone\" />\n </mat-form-field>\n </div>\n <div class=\"flex flex-col md:flex-row gap-2\">\n <mat-form-field appearance=\"fill\">\n <mat-label>\u7701\u4EFD</mat-label>\n <input matInput type=\"text\" [(ngModel)]=\"address.province\" />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label>\u57CE\u5E02</mat-label>\n <input matInput type=\"text\" [(ngModel)]=\"address.city\" />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label>\u5730\u533A</mat-label>\n <input matInput type=\"text\" [(ngModel)]=\"address.district\" />\n </mat-form-field>\n </div>\n\n <mat-form-field appearance=\"fill\">\n <mat-label>\u8BE6\u7EC6\u5730\u5740</mat-label>\n <textarea matInput type=\"text\" [(ngModel)]=\"address.detail\" cdkTextareaAutosize cdkAutosizeMinRows=\"3\"></textarea>\n </mat-form-field>\n </div>\n <div>\n <div class=\"text-md\">\u5907\u6CE8</div>\n <mat-form-field appearance=\"fill\">\n <textarea matInput type=\"text\" [(ngModel)]=\"note\" cdkTextareaAutosize cdkAutosizeMinRows=\"3\"></textarea>\n </mat-form-field>\n </div>\n </div>\n <div class=\"md:w-1/3\">\n @if (product.priceType && product.priceType.toString() === 'PARTIAL') {\n <rolatech-cart-checkout-summary [total]=\"product.price\" [deposit]=\"product.deposit\"></rolatech-cart-checkout-summary>\n } @else {\n <rolatech-cart-checkout-summary [total]=\"product.price\"></rolatech-cart-checkout-summary>\n }\n <rolatech-cart-checkout-action\n (create)=\"createOrder()\"\n [title]=\"product.priceType && product.priceType.toString() === 'FIXED' ? '\u63D0\u4EA4\u8BA2\u5355' : '\u63D0\u4EA4\u8BA2\u5355'\"\n ></rolatech-cart-checkout-action>\n </div>\n </div>\n </rolatech-container>\n}\n", styles: ["mat-form-field{width:100%}\n"] }]
|
|
127
129
|
}] });
|
|
128
130
|
|
|
129
131
|
class CartCheckoutVariantComponent extends BaseComponent {
|
|
@@ -158,15 +160,14 @@ class CartCheckoutVariantComponent extends BaseComponent {
|
|
|
158
160
|
},
|
|
159
161
|
});
|
|
160
162
|
}
|
|
161
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
162
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
163
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: CartCheckoutVariantComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
164
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: CartCheckoutVariantComponent, isStandalone: true, selector: "rolatech-cart-checkout-variant", usesInheritance: true, ngImport: i0, template: "@if (variant) {\n <rolatech-container>\n <rolatech-toolbar title=\"\u8BA2\u5355\u786E\u8BA4\" large></rolatech-toolbar>\n <div class=\"flex flex-col md:flex-row gap-3 mt-3\">\n <div class=\"md:w-2/3 md:pr-16\">\n <div class=\"flex flex-col\">\n <div class=\"text-xl\">\u5546\u54C1\u4FE1\u606F</div>\n <rolatech-cart-checkout-item\n [name]=\"variant.title ? variant.title : product.name\"\n [description]=\"variant.options | options\"\n [thumbnail]=\"variant.media ? variant.media[0].url + '!w200' : product.media[0].url + '!w200'\"\n [price]=\"variant.price\"\n [(quantity)]=\"quantity\"\n [max]=\"3\"\n ></rolatech-cart-checkout-item>\n </div>\n </div>\n <div class=\"md:w-1/3\">\n <rolatech-cart-checkout-summary\n [total]=\"variant.price * quantity\"\n [deposit]=\"product.deposit\"\n ></rolatech-cart-checkout-summary>\n <rolatech-cart-checkout-action (create)=\"createOrder()\"></rolatech-cart-checkout-action>\n </div>\n </div>\n </rolatech-container>\n}\n", styles: [""], dependencies: [{ kind: "component", type: ContainerComponent, selector: "rolatech-container" }, { kind: "component", type: ToolbarComponent, selector: "rolatech-toolbar", inputs: ["title", "subtitle", "back", "link", "large", "divider"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: CartCheckoutSummaryComponent, selector: "rolatech-cart-checkout-summary", inputs: ["deposit", "total"] }, { kind: "component", type: CartCheckoutItemComponent, selector: "rolatech-cart-checkout-item", inputs: ["thumbnail", "name", "description", "quantity", "price", "max"], outputs: ["quantityChange", "add", "remove", "delete"] }, { kind: "component", type: CartCheckoutActionComponent, selector: "rolatech-cart-checkout-action", inputs: ["title"], outputs: ["create"] }, { kind: "pipe", type: OptionsFormatPipe, name: "options" }] }); }
|
|
163
165
|
}
|
|
164
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
166
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: CartCheckoutVariantComponent, decorators: [{
|
|
165
167
|
type: Component,
|
|
166
|
-
args: [{ selector: 'rolatech-cart-checkout-variant',
|
|
168
|
+
args: [{ selector: 'rolatech-cart-checkout-variant', imports: [
|
|
167
169
|
ContainerComponent,
|
|
168
170
|
ToolbarComponent,
|
|
169
|
-
ThumbnailComponent,
|
|
170
171
|
MatButtonModule,
|
|
171
172
|
CartCheckoutSummaryComponent,
|
|
172
173
|
CartCheckoutItemComponent,
|
|
@@ -195,4 +196,4 @@ const cartCheckoutRoutes = [
|
|
|
195
196
|
];
|
|
196
197
|
|
|
197
198
|
export { cartCheckoutRoutes as default };
|
|
198
|
-
//# sourceMappingURL=rolatech-angular-cart-cart-checkout.routes-
|
|
199
|
+
//# sourceMappingURL=rolatech-angular-cart-cart-checkout.routes-DP6Bh23E.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rolatech-angular-cart-cart-checkout.routes-DP6Bh23E.mjs","sources":["../../../../packages/angular-cart/src/lib/pages/cart-checkout/cart-checkout-index/cart-checkout-index.component.ts","../../../../packages/angular-cart/src/lib/pages/cart-checkout/cart-checkout-index/cart-checkout-index.component.html","../../../../packages/angular-cart/src/lib/pages/cart-checkout/cart-checkout-course/cart-checkout-course.component.ts","../../../../packages/angular-cart/src/lib/pages/cart-checkout/cart-checkout-course/cart-checkout-course.component.html","../../../../packages/angular-cart/src/lib/pages/cart-checkout/cart-checkout-product/cart-checkout-product.component.ts","../../../../packages/angular-cart/src/lib/pages/cart-checkout/cart-checkout-product/cart-checkout-product.component.html","../../../../packages/angular-cart/src/lib/pages/cart-checkout/cart-checkout-variant/cart-checkout-variant.component.ts","../../../../packages/angular-cart/src/lib/pages/cart-checkout/cart-checkout-variant/cart-checkout-variant.component.html","../../../../packages/angular-cart/src/lib/pages/cart-checkout/cart-checkout.routes.ts"],"sourcesContent":["import { Component } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n@Component({\n selector: 'rolatech-cart-checkout-index',\n imports: [CommonModule],\n templateUrl: './cart-checkout-index.component.html',\n styleUrl: './cart-checkout-index.component.scss',\n})\nexport class CartCheckoutIndexComponent {}\n","<p>cart-checkout-index works!</p>\n","import { Component, inject, OnInit } from '@angular/core';\nimport { BaseComponent, ContainerComponent, ThumbnailComponent, ToolbarComponent } from '@rolatech/angular-components';\nimport { AuthUserService } from '@rolatech/angular-auth';\nimport { CourseService, Course, CourseType } from '@rolatech/angular-course';\nimport { OrderService } from '@rolatech/angular-services';\nimport { MatButtonModule } from '@angular/material/button';\nimport { FixedPipe } from '@rolatech/angular-common';\n\n@Component({\n selector: 'rolatech-cart-checkout-course',\n imports: [ContainerComponent, ToolbarComponent, ThumbnailComponent, MatButtonModule, FixedPipe],\n templateUrl: './cart-checkout-course.component.html',\n styleUrl: './cart-checkout-course.component.scss',\n})\nexport class CartCheckoutCourseComponent extends BaseComponent implements OnInit {\n courseService = inject(CourseService);\n orderService = inject(OrderService);\n authUserService = inject(AuthUserService);\n course!: Course;\n type = CourseType;\n purchased = false;\n ngOnInit(): void {\n this.findCourse();\n this.findPurchasedByCourseId();\n }\n createOrder() {\n this.orderService.create({ productId: this.id, type: 'COURSE' }).subscribe({\n next: (res: any) => {\n this.router.navigateByUrl(`/orders/${res.data.id}`);\n },\n error: (error) => {\n this.snackBarService.open(error.message);\n },\n });\n }\n findCourse() {\n this.courseService.get(this.id).subscribe({\n next: (res: any) => {\n this.course = res.data;\n this.titleService.setTitle(`订单确认 - ${this.course.name}`);\n },\n });\n }\n findPurchasedByCourseId() {\n this.courseService.findPurchasedByCourseId(this.id).subscribe({\n next: (res: any) => {\n this.purchased = res.data ? true : false;\n },\n });\n }\n}\n","@if (course) {\n <rolatech-container>\n <rolatech-toolbar title=\"订单确认\" large></rolatech-toolbar>\n <div class=\"flex flex-col md:flex-row gap-3 mt-3\">\n <div class=\"md:w-2/3 md:pr-16\">\n <div class=\"flex flex-col\">\n <div class=\"text-xl\">课程信息</div>\n @if (course) {\n <div>\n <div class=\"flex justify-between py-3\">\n <div class=\"flex w-full\">\n <div class=\"w-1/4 aspect-video bg-[--rt-raised-background] h-fit\">\n @if (course.media) {\n <div class=\"object-cover aspect-video rounded-lg\">\n @defer (on viewport()) {\n <rolatech-thumbnail [src]=\"course.media[0].url + '!w400'\" size=\"medium\"> </rolatech-thumbnail>\n } @placeholder {\n <div class=\"bg-[--rt-raised-background] h-full w-full object-cover aspect-video rounded-lg\"></div>\n }\n </div>\n }\n </div>\n <div class=\"w-3/4 ml-3 flex flex-col justify-between\">\n <span class=\"font-medium\">{{ course.name }}</span>\n <span class=\"text-sm text-[--rt-text-secondary]\">类型 {{ type[course.type] }}</span>\n </div>\n </div>\n <div>¥{{ course.pricing[0].total | fixed }}</div>\n </div>\n @if (course.schedule) {\n <div class=\"flex justify-between py-3\">\n <span>开课日期</span>\n <span>{{ course.schedule[0].startAt }}</span>\n </div>\n }\n </div>\n }\n </div>\n </div>\n <div class=\"md:w-1/3\">\n <div class=\"text-2xl font-medium mb-2\">统计</div>\n <div class=\"divide-y\">\n <div class=\"flex justify-between py-2 pb-32 md:pb-3\">\n <span> 订单金额 </span>\n <span> ¥{{ course.pricing[0].total | fixed }} </span>\n </div>\n <div class=\"py-3 bottom-0 left-0 right-0 md:static\">\n <div>\n <div class=\"flex justify-between\">\n <span class=\"text-lg font-medium\">总计</span>\n <span>¥{{ course.pricing[0].total | fixed }}</span>\n </div>\n <a mat-flat-button class=\"w-full min-h-11 my-6\" (click)=\"createOrder()\">提交订单</a>\n </div>\n </div>\n </div>\n </div>\n </div>\n </rolatech-container>\n}\n","import { Component, inject, OnInit, ViewEncapsulation } from '@angular/core';\nimport { BaseComponent, ContainerComponent, ToolbarComponent } from '@rolatech/angular-components';\nimport { AuthUserService } from '@rolatech/angular-auth';\nimport { MatButtonModule } from '@angular/material/button';\nimport { Product, ProductType } from '@rolatech/angular-product';\nimport { OrderService } from '@rolatech/angular-services';\nimport { CartCheckoutSummaryComponent } from '../../../components/cart-checkout-summary/cart-checkout-summary.component';\nimport { CartCheckoutItemComponent } from '../../../components/cart-checkout-item/cart-checkout-item.component';\nimport { CartCheckoutActionComponent } from '../../../components/cart-checkout-action/cart-checkout-action.component';\nimport { CartService, ProductService } from '@rolatech/angular-services';\nimport { TextFieldModule } from '@angular/cdk/text-field';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { FormsModule } from '@angular/forms';\n\n@Component({\n selector: 'rolatech-cart-checkout-product',\n imports: [\n ContainerComponent,\n ToolbarComponent,\n MatButtonModule,\n CartCheckoutSummaryComponent,\n CartCheckoutItemComponent,\n CartCheckoutActionComponent,\n FormsModule,\n MatFormFieldModule,\n MatInputModule,\n TextFieldModule,\n ],\n templateUrl: './cart-checkout-product.component.html',\n styleUrl: './cart-checkout-product.component.scss',\n encapsulation: ViewEncapsulation.None,\n})\nexport class CartCheckoutProductComponent extends BaseComponent implements OnInit {\n productService = inject(ProductService);\n cartService = inject(CartService);\n orderService = inject(OrderService);\n authUserService = inject(AuthUserService);\n product!: Product;\n type = ProductType;\n quantity = 1;\n note = '';\n address: any = {};\n ngOnInit(): void {\n this.getProduct();\n }\n createOrder() {\n this.orderService\n .create({ type: 'PRODUCT', productId: this.id, note: this.note, shippingAddress: this.address })\n .subscribe({\n next: (res: any) => {\n this.router.navigateByUrl(`/orders/${res.data.id}`);\n },\n error: (error) => {\n this.snackBarService.open(error.message);\n },\n });\n }\n getProduct() {\n this.productService.get(this.id).subscribe({\n next: (res: any) => {\n this.product = res.data;\n this.titleService.setTitle(`订单确认 - ${this.product.name}`);\n },\n });\n }\n}\n","@if (product) {\n <rolatech-container>\n <rolatech-toolbar title=\"订单确认\" large></rolatech-toolbar>\n <div class=\"flex flex-col md:flex-row gap-3 mt-3\">\n <div class=\"md:w-2/3 md:pr-16\">\n <div class=\"flex flex-col\">\n <div class=\"text-xl\">商品信息</div>\n <rolatech-cart-checkout-item\n [name]=\"product.name\"\n [description]=\"product.description\"\n [thumbnail]=\"product.media[0].url + '!w200'\"\n [price]=\"product.price\"\n [(quantity)]=\"quantity\"\n ></rolatech-cart-checkout-item>\n </div>\n <div>\n <div class=\"text-md py-2\">收货人信息</div>\n <div class=\"flex flex-col md:flex-row gap-2\">\n <mat-form-field appearance=\"fill\">\n <mat-label>姓名</mat-label>\n <input matInput type=\"text\" [(ngModel)]=\"address.name\" />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label>电话</mat-label>\n <input matInput type=\"text\" [(ngModel)]=\"address.phone\" />\n </mat-form-field>\n </div>\n <div class=\"flex flex-col md:flex-row gap-2\">\n <mat-form-field appearance=\"fill\">\n <mat-label>省份</mat-label>\n <input matInput type=\"text\" [(ngModel)]=\"address.province\" />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label>城市</mat-label>\n <input matInput type=\"text\" [(ngModel)]=\"address.city\" />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label>地区</mat-label>\n <input matInput type=\"text\" [(ngModel)]=\"address.district\" />\n </mat-form-field>\n </div>\n\n <mat-form-field appearance=\"fill\">\n <mat-label>详细地址</mat-label>\n <textarea matInput type=\"text\" [(ngModel)]=\"address.detail\" cdkTextareaAutosize cdkAutosizeMinRows=\"3\"></textarea>\n </mat-form-field>\n </div>\n <div>\n <div class=\"text-md\">备注</div>\n <mat-form-field appearance=\"fill\">\n <textarea matInput type=\"text\" [(ngModel)]=\"note\" cdkTextareaAutosize cdkAutosizeMinRows=\"3\"></textarea>\n </mat-form-field>\n </div>\n </div>\n <div class=\"md:w-1/3\">\n @if (product.priceType && product.priceType.toString() === 'PARTIAL') {\n <rolatech-cart-checkout-summary [total]=\"product.price\" [deposit]=\"product.deposit\"></rolatech-cart-checkout-summary>\n } @else {\n <rolatech-cart-checkout-summary [total]=\"product.price\"></rolatech-cart-checkout-summary>\n }\n <rolatech-cart-checkout-action\n (create)=\"createOrder()\"\n [title]=\"product.priceType && product.priceType.toString() === 'FIXED' ? '提交订单' : '提交订单'\"\n ></rolatech-cart-checkout-action>\n </div>\n </div>\n </rolatech-container>\n}\n","import { Component, inject, OnInit } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { ContainerComponent, ToolbarComponent, BaseComponent } from '@rolatech/angular-components';\nimport { CartCheckoutActionComponent } from '../../../components/cart-checkout-action/cart-checkout-action.component';\nimport { CartCheckoutItemComponent } from '../../../components/cart-checkout-item/cart-checkout-item.component';\nimport { CartCheckoutSummaryComponent } from '../../../components/cart-checkout-summary/cart-checkout-summary.component';\nimport { Product, ProductVariant } from '@rolatech/angular-product';\nimport { OptionsFormatPipe } from '@rolatech/angular-common';\nimport { OrderService } from '@rolatech/angular-services';\nimport { ProductService, CartService } from '@rolatech/angular-services';\n\n@Component({\n selector: 'rolatech-cart-checkout-variant',\n imports: [\n ContainerComponent,\n ToolbarComponent,\n MatButtonModule,\n CartCheckoutSummaryComponent,\n CartCheckoutItemComponent,\n CartCheckoutActionComponent,\n OptionsFormatPipe,\n ],\n templateUrl: './cart-checkout-variant.component.html',\n styleUrl: './cart-checkout-variant.component.scss',\n})\nexport class CartCheckoutVariantComponent extends BaseComponent implements OnInit {\n productService = inject(ProductService);\n orderService = inject(OrderService);\n cartService = inject(CartService);\n product!: Product;\n variant!: ProductVariant;\n variantId = '';\n quantity = 1;\n constructor() {\n super();\n this.variantId = this.route.snapshot.params['variant-id'];\n }\n\n ngOnInit(): void {\n this.getProduct();\n }\n getProduct() {\n this.productService.get(this.id).subscribe({\n next: (res: any) => {\n this.product = res.data;\n this.variant = res.data.variants.find((item) => item.id === this.variantId);\n this.titleService.setTitle(`订单确认 - ${this.product.name}`);\n },\n });\n }\n createOrder() {\n this.orderService.create({ type: 'PRODUCT', variantId: this.variant.id }).subscribe({\n next: (res: any) => {\n this.router.navigateByUrl(`/orders/${res.data.id}`);\n },\n error: (error) => {\n this.snackBarService.open(error.message);\n },\n });\n }\n}\n","@if (variant) {\n <rolatech-container>\n <rolatech-toolbar title=\"订单确认\" large></rolatech-toolbar>\n <div class=\"flex flex-col md:flex-row gap-3 mt-3\">\n <div class=\"md:w-2/3 md:pr-16\">\n <div class=\"flex flex-col\">\n <div class=\"text-xl\">商品信息</div>\n <rolatech-cart-checkout-item\n [name]=\"variant.title ? variant.title : product.name\"\n [description]=\"variant.options | options\"\n [thumbnail]=\"variant.media ? variant.media[0].url + '!w200' : product.media[0].url + '!w200'\"\n [price]=\"variant.price\"\n [(quantity)]=\"quantity\"\n [max]=\"3\"\n ></rolatech-cart-checkout-item>\n </div>\n </div>\n <div class=\"md:w-1/3\">\n <rolatech-cart-checkout-summary\n [total]=\"variant.price * quantity\"\n [deposit]=\"product.deposit\"\n ></rolatech-cart-checkout-summary>\n <rolatech-cart-checkout-action (create)=\"createOrder()\"></rolatech-cart-checkout-action>\n </div>\n </div>\n </rolatech-container>\n}\n","import { Routes } from '@angular/router';\nimport { CartCheckoutIndexComponent } from './cart-checkout-index/cart-checkout-index.component';\nimport { CartCheckoutCourseComponent } from './cart-checkout-course/cart-checkout-course.component';\nimport { CartCheckoutProductComponent } from './cart-checkout-product/cart-checkout-product.component';\nimport { CartCheckoutVariantComponent } from './cart-checkout-variant/cart-checkout-variant.component';\n\nconst cartCheckoutRoutes: Routes = [\n {\n path: '',\n component: CartCheckoutIndexComponent,\n },\n {\n path: 'courses/:id',\n component: CartCheckoutCourseComponent,\n },\n {\n path: 'products/:id',\n component: CartCheckoutProductComponent,\n },\n {\n path: 'products/:id/variants/:variant-id',\n component: CartCheckoutVariantComponent,\n },\n];\nexport default cartCheckoutRoutes;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;MASa,0BAA0B,CAAA;8GAA1B,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAA1B,0BAA0B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,8BAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECTvC,qCACA,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,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A,IAAI,EAAE,cAAc;AACpB,QAAA,SAAS,EAAE,4BAA4B;AACxC,KAAA;AACD,IAAA;AACE,QAAA,IAAI,EAAE,mCAAmC;AACzC,QAAA,SAAS,EAAE,4BAA4B;AACxC,KAAA;;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { input, model, computed, output, Component, inject, effect, Injectable, ViewEncapsulation } from '@angular/core';
|
|
3
3
|
import * as i1$1 from '@angular/common';
|
|
4
|
-
import { CommonModule
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
5
|
import * as i4 from '@angular/material/icon';
|
|
6
6
|
import { MatIcon } from '@angular/material/icon';
|
|
7
7
|
import * as i1 from '@angular/material/button';
|
|
@@ -44,12 +44,12 @@ class CartCheckoutItemComponent {
|
|
|
44
44
|
onDelete() {
|
|
45
45
|
this.delete.emit();
|
|
46
46
|
}
|
|
47
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
48
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
47
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: CartCheckoutItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
48
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: CartCheckoutItemComponent, isStandalone: true, selector: "rolatech-cart-checkout-item", inputs: { thumbnail: { classPropertyName: "thumbnail", publicName: "thumbnail", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, quantity: { classPropertyName: "quantity", publicName: "quantity", isSignal: true, isRequired: false, transformFunction: null }, price: { classPropertyName: "price", publicName: "price", isSignal: true, isRequired: true, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { quantity: "quantityChange", add: "add", remove: "remove", delete: "delete" }, ngImport: i0, template: "<div class=\"flex justify-between py-3\">\n <div class=\"flex w-full\">\n <div class=\"w-1/4 aspect-video bg-[--rt-raised-background] rounded-lg h-fit\">\n <div class=\"object-cover aspect-video\">\n @defer (on viewport()) {\n <rolatech-thumbnail [src]=\"thumbnail()\" size=\"medium\" mode=\"full\"> </rolatech-thumbnail>\n } @placeholder {\n <div class=\"bg-[--rt-raised-background] h-full w-full object-cover aspect-video\"></div>\n }\n </div>\n </div>\n <div class=\"w-3/4 ml-3 flex flex-col justify-between\">\n <!-- info -->\n <div class=\"flex justify-between\">\n <div class=\"flex flex-col\">\n <span class=\"text-lg font-bold line-clamp-1\">{{ name() }}</span>\n <span class=\"text-sm text-[--rt-text-secondary] mt-2 line-clamp-2\">{{ description() }}</span>\n </div>\n <div class=\"p-1\">\u00A5{{ priceDisplay() }}</div>\n </div>\n <!-- action -->\n <div class=\"flex justify-between items-center w-full\">\n <div class=\"flex items-center text-sm\">\n <span class=\"mr-3\">\u6570\u91CF</span>\n <button mat-icon-button (click)=\"onRemove()\" [disabled]=\"quantity() === 1\">\n <mat-icon>remove</mat-icon>\n </button>\n <span class=\"w-11 text-center\">{{ quantity() }}</span>\n <button mat-icon-button (click)=\"onAdd()\" [disabled]=\"quantity() === max()\">\n <mat-icon>add</mat-icon>\n </button>\n </div>\n <button mat-icon-button (click)=\"onDelete()\">\n <mat-icon>delete</mat-icon>\n </button>\n </div>\n </div>\n </div>\n</div>\n", styles: ["mat-icon{scale:.7}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }], deferBlockDependencies: [() => [import('@rolatech/angular-components').then(m => m.ThumbnailComponent)]] }); }
|
|
49
49
|
}
|
|
50
|
-
i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "
|
|
50
|
+
i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "19.0.3", ngImport: i0, type: CartCheckoutItemComponent, resolveDeferredDeps: () => [import('@rolatech/angular-components').then(m => m.ThumbnailComponent)], resolveMetadata: ThumbnailComponent => ({ decorators: [{
|
|
51
51
|
type: Component,
|
|
52
|
-
args: [{ selector: 'rolatech-cart-checkout-item',
|
|
52
|
+
args: [{ selector: 'rolatech-cart-checkout-item', imports: [CommonModule, ThumbnailComponent, MatIcon, MatButtonModule], template: "<div class=\"flex justify-between py-3\">\n <div class=\"flex w-full\">\n <div class=\"w-1/4 aspect-video bg-[--rt-raised-background] rounded-lg h-fit\">\n <div class=\"object-cover aspect-video\">\n @defer (on viewport()) {\n <rolatech-thumbnail [src]=\"thumbnail()\" size=\"medium\" mode=\"full\"> </rolatech-thumbnail>\n } @placeholder {\n <div class=\"bg-[--rt-raised-background] h-full w-full object-cover aspect-video\"></div>\n }\n </div>\n </div>\n <div class=\"w-3/4 ml-3 flex flex-col justify-between\">\n <!-- info -->\n <div class=\"flex justify-between\">\n <div class=\"flex flex-col\">\n <span class=\"text-lg font-bold line-clamp-1\">{{ name() }}</span>\n <span class=\"text-sm text-[--rt-text-secondary] mt-2 line-clamp-2\">{{ description() }}</span>\n </div>\n <div class=\"p-1\">\u00A5{{ priceDisplay() }}</div>\n </div>\n <!-- action -->\n <div class=\"flex justify-between items-center w-full\">\n <div class=\"flex items-center text-sm\">\n <span class=\"mr-3\">\u6570\u91CF</span>\n <button mat-icon-button (click)=\"onRemove()\" [disabled]=\"quantity() === 1\">\n <mat-icon>remove</mat-icon>\n </button>\n <span class=\"w-11 text-center\">{{ quantity() }}</span>\n <button mat-icon-button (click)=\"onAdd()\" [disabled]=\"quantity() === max()\">\n <mat-icon>add</mat-icon>\n </button>\n </div>\n <button mat-icon-button (click)=\"onDelete()\">\n <mat-icon>delete</mat-icon>\n </button>\n </div>\n </div>\n </div>\n</div>\n", styles: ["mat-icon{scale:.7}\n"] }]
|
|
53
53
|
}], ctorParameters: null, propDecorators: null }) });
|
|
54
54
|
|
|
55
55
|
class CartCheckoutActionComponent {
|
|
@@ -60,12 +60,12 @@ class CartCheckoutActionComponent {
|
|
|
60
60
|
onCreate() {
|
|
61
61
|
this.create.emit();
|
|
62
62
|
}
|
|
63
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
64
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
63
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: CartCheckoutActionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
64
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.0.3", type: CartCheckoutActionComponent, isStandalone: true, selector: "rolatech-cart-checkout-action", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { create: "create" }, ngImport: i0, template: "<a mat-flat-button class=\"w-full min-h-11 my-6\" (click)=\"onCreate()\">{{ title() }}</a>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button]", exportAs: ["matButton", "matAnchor"] }] }); }
|
|
65
65
|
}
|
|
66
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
66
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: CartCheckoutActionComponent, decorators: [{
|
|
67
67
|
type: Component,
|
|
68
|
-
args: [{ selector: 'rolatech-cart-checkout-action',
|
|
68
|
+
args: [{ selector: 'rolatech-cart-checkout-action', imports: [CommonModule, MatButtonModule], template: "<a mat-flat-button class=\"w-full min-h-11 my-6\" (click)=\"onCreate()\">{{ title() }}</a>\n" }]
|
|
69
69
|
}] });
|
|
70
70
|
|
|
71
71
|
class CartCheckoutSummaryComponent {
|
|
@@ -82,12 +82,12 @@ class CartCheckoutSummaryComponent {
|
|
|
82
82
|
return ((this.total() - this.deposit()) / 100).toFixed(2);
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
86
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
85
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: CartCheckoutSummaryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
86
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: CartCheckoutSummaryComponent, isStandalone: true, selector: "rolatech-cart-checkout-summary", inputs: { deposit: { classPropertyName: "deposit", publicName: "deposit", isSignal: true, isRequired: false, transformFunction: null }, total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<div class=\"text-2xl font-medium mb-2\">\u7EDF\u8BA1</div>\n<div class=\"divide-y\">\n @if (deposit()) {\n <div class=\"flex justify-between py-2 pb-32 md:pb-3\">\n <span>\u5B9A\u91D1</span>\n <span> \u00A5{{ depositDisplay() }} </span>\n </div>\n <div class=\"flex justify-between py-2 pb-32 md:pb-3\">\n <span> \u5C3E\u6B3E </span>\n <span> \u00A5{{ remainingDisplay() }} </span>\n </div>\n } @else {\n <div class=\"flex justify-between py-2 pb-32 md:pb-3\">\n <span> \u5E94\u4ED8\u91D1\u989D </span>\n <span> \u00A5{{ totalDisplay() }} </span>\n </div>\n }\n\n <div class=\"py-3 bottom-0 left-0 right-0 md:static\">\n <div>\n <div class=\"flex justify-between\">\n <span class=\"text-lg font-medium\">\u603B\u8BA1</span>\n <span>\u00A5{{ totalDisplay() }}</span>\n </div>\n </div>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
|
|
87
87
|
}
|
|
88
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
88
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: CartCheckoutSummaryComponent, decorators: [{
|
|
89
89
|
type: Component,
|
|
90
|
-
args: [{ selector: 'rolatech-cart-checkout-summary',
|
|
90
|
+
args: [{ selector: 'rolatech-cart-checkout-summary', imports: [CommonModule], template: "<div class=\"text-2xl font-medium mb-2\">\u7EDF\u8BA1</div>\n<div class=\"divide-y\">\n @if (deposit()) {\n <div class=\"flex justify-between py-2 pb-32 md:pb-3\">\n <span>\u5B9A\u91D1</span>\n <span> \u00A5{{ depositDisplay() }} </span>\n </div>\n <div class=\"flex justify-between py-2 pb-32 md:pb-3\">\n <span> \u5C3E\u6B3E </span>\n <span> \u00A5{{ remainingDisplay() }} </span>\n </div>\n } @else {\n <div class=\"flex justify-between py-2 pb-32 md:pb-3\">\n <span> \u5E94\u4ED8\u91D1\u989D </span>\n <span> \u00A5{{ totalDisplay() }} </span>\n </div>\n }\n\n <div class=\"py-3 bottom-0 left-0 right-0 md:static\">\n <div>\n <div class=\"flex justify-between\">\n <span class=\"text-lg font-medium\">\u603B\u8BA1</span>\n <span>\u00A5{{ totalDisplay() }}</span>\n </div>\n </div>\n </div>\n</div>\n" }]
|
|
91
91
|
}] });
|
|
92
92
|
|
|
93
93
|
class CartIndexComponent {
|
|
@@ -145,12 +145,12 @@ class CartIndexComponent {
|
|
|
145
145
|
});
|
|
146
146
|
}
|
|
147
147
|
deleteAllCarts() { }
|
|
148
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
149
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
148
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: CartIndexComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
149
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: CartIndexComponent, isStandalone: true, selector: "rolatech-cart-index", ngImport: i0, template: "<rolatech-container>\n <rolatech-toolbar title=\"\u8D2D\u7269\u8F66\" large></rolatech-toolbar>\n <div class=\"flex flex-col md:flex-row gap-3 mt-3\">\n <div class=\"md:w-2/3 md:pr-16\">\n <div>\n @for (item of carts; track $index) {\n @if (item.variant) {\n <rolatech-cart-checkout-item\n [name]=\"item.variant.title ? item.variant.title : item.product.name\"\n [description]=\"item.variant.options | options\"\n [thumbnail]=\"item.variant.media ? item.variant.media[0].url + '!w400' : item.product.media[0].url + '!w400'\"\n [price]=\"item.variant ? item.variant.price * item.quantity : item.product.price\"\n [(quantity)]=\"item.quantity\"\n [max]=\"3\"\n (add)=\"onAdd(item)\"\n (remove)=\"onRemove(item)\"\n (delete)=\"onDelete(item)\"\n ></rolatech-cart-checkout-item>\n } @else {\n <rolatech-cart-checkout-item\n [name]=\"item.product.name\"\n [description]=\"item.product.description\"\n [thumbnail]=\"item.product.media[0].url + '!w400'\"\n [price]=\"item.product.price * item.quantity\"\n [(quantity)]=\"item.quantity\"\n [max]=\"3\"\n (add)=\"onAdd(item)\"\n (remove)=\"onRemove(item)\"\n (delete)=\"onDelete(item)\"\n ></rolatech-cart-checkout-item>\n }\n }\n </div>\n </div>\n <div class=\"md:w-1/3\">\n <rolatech-cart-checkout-summary [total]=\"totalPrice\"></rolatech-cart-checkout-summary>\n <rolatech-cart-checkout-action (create)=\"createOrder()\"></rolatech-cart-checkout-action>\n </div>\n </div>\n</rolatech-container>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: ContainerComponent, selector: "rolatech-container" }, { kind: "component", type: ToolbarComponent, selector: "rolatech-toolbar", inputs: ["title", "subtitle", "back", "link", "large", "divider"] }, { kind: "component", type: CartCheckoutItemComponent, selector: "rolatech-cart-checkout-item", inputs: ["thumbnail", "name", "description", "quantity", "price", "max"], outputs: ["quantityChange", "add", "remove", "delete"] }, { kind: "component", type: CartCheckoutSummaryComponent, selector: "rolatech-cart-checkout-summary", inputs: ["deposit", "total"] }, { kind: "component", type: CartCheckoutActionComponent, selector: "rolatech-cart-checkout-action", inputs: ["title"], outputs: ["create"] }, { kind: "pipe", type: OptionsFormatPipe, name: "options" }] }); }
|
|
150
150
|
}
|
|
151
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
151
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: CartIndexComponent, decorators: [{
|
|
152
152
|
type: Component,
|
|
153
|
-
args: [{ selector: 'rolatech-cart-index',
|
|
153
|
+
args: [{ selector: 'rolatech-cart-index', imports: [
|
|
154
154
|
CommonModule,
|
|
155
155
|
ContainerComponent,
|
|
156
156
|
ToolbarComponent,
|
|
@@ -168,7 +168,7 @@ const cartRoutes = [
|
|
|
168
168
|
},
|
|
169
169
|
{
|
|
170
170
|
path: 'checkout',
|
|
171
|
-
loadChildren: () => import('./rolatech-angular-cart-cart-checkout.routes-
|
|
171
|
+
loadChildren: () => import('./rolatech-angular-cart-cart-checkout.routes-DP6Bh23E.mjs'),
|
|
172
172
|
},
|
|
173
173
|
];
|
|
174
174
|
|
|
@@ -242,14 +242,13 @@ class CartSideComponent {
|
|
|
242
242
|
},
|
|
243
243
|
});
|
|
244
244
|
}
|
|
245
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
246
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
245
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: CartSideComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
246
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: CartSideComponent, isStandalone: true, selector: "rolatech-cart-side", inputs: { router: { classPropertyName: "router", publicName: "router", isSignal: true, isRequired: false, transformFunction: null }, info: { classPropertyName: "info", publicName: "info", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { info: "infoChange" }, ngImport: i0, template: "<div class=\"px-2\">\n <button mat-icon-button class=\"flex\" (click)=\"show()\">\n <mat-icon aria-hidden=\"false\" [matBadge]=\"count\" [matBadgeHidden]=\"count === 0\">shopping_bag</mat-icon>\n </button>\n</div>\n<div\n [ngClass]=\"{ 'translate-none': info(), 'translate-y-full md:translate-x-full md:translate-y-0': !info() }\"\n class=\"fixed top-0 right-0 z-[1001] h-screen p-4 overflow-y-auto transition-transform bg-[--rt-raised-background] w-full md:w-[600px] shadow-xl\"\n>\n <div class=\"flex justify-between items-center sm:p-4\">\n <div class=\"text-2xl font-bold\">\u8D2D\u7269\u8F66</div>\n <button mat-icon-button (click)=\"dismiss()\">\n <mat-icon>close</mat-icon>\n </button>\n </div>\n @if (!loading) {\n <div class=\"mt-3 p-1 sm:p-4\">\n @for (item of carts; track item) {\n @if (item.variant) {\n <rolatech-cart-checkout-item\n [name]=\"item.variant.title ? item.variant.title : item.product.name\"\n [description]=\"item.variant.options | options\"\n [thumbnail]=\"item.variant.media ? item.variant.media[0].url + '!w400' : item.product.media[0].url + '!w400'\"\n [price]=\"item.variant ? item.variant.price * item.quantity : item.product.price\"\n [(quantity)]=\"item.quantity\"\n [max]=\"3\"\n (add)=\"onAdd(item)\"\n (remove)=\"onRemove(item)\"\n (delete)=\"onDelete(item)\"\n ></rolatech-cart-checkout-item>\n } @else {\n <rolatech-cart-checkout-item\n [name]=\"item.product.name\"\n [description]=\"item.product.description\"\n [thumbnail]=\"item.product.media[0].url + '!w400'\"\n [price]=\"item.product.price * item.quantity\"\n [(quantity)]=\"item.quantity\"\n [max]=\"3\"\n (add)=\"onAdd(item)\"\n (remove)=\"onRemove(item)\"\n (delete)=\"onDelete(item)\"\n ></rolatech-cart-checkout-item>\n }\n }\n <mat-divider></mat-divider>\n <div class=\"h-14 flex justify-between items-center\">\n <div class=\"text-lg font-bold\">\u603B\u8BA1</div>\n <div>\u00A5{{ totalPrice }}</div>\n </div>\n <div class=\"flex flex-row gap-3 w-full items-center justify-center mt-3\">\n <button mat-flat-button [routerLink]=\"router()\" (click)=\"dismiss()\" class=\"w-8/12\">\n <a>\u53BB\u8D2D\u7269\u8F66\u7ED3\u7B97</a>\n </button>\n <button mat-stroked-button (click)=\"dismiss()\" class=\"w-4/12\">\n <a>\u7EE7\u7EED\u8D2D\u7269</a>\n </button>\n </div>\n </div>\n }\n @if (loading) {\n <div>\n <rolatech-spinner></rolatech-spinner>\n </div>\n }\n</div>\n<div\n (click)=\"dismiss()\"\n [ngClass]=\"info() ? 'visible' : 'invisible'\"\n class=\"bg-[--rt-10-percent-layer] fixed h-screen inset-0 z-[1000]\"\n></div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: MatBadge, selector: "[matBadge]", inputs: ["matBadgeColor", "matBadgeOverlap", "matBadgeDisabled", "matBadgePosition", "matBadge", "matBadgeDescription", "matBadgeSize", "matBadgeHidden"] }, { kind: "component", type: SpinnerComponent, selector: "rolatech-spinner", inputs: ["title"] }, { kind: "component", type: CartCheckoutItemComponent, selector: "rolatech-cart-checkout-item", inputs: ["thumbnail", "name", "description", "quantity", "price", "max"], outputs: ["quantityChange", "add", "remove", "delete"] }, { kind: "pipe", type: OptionsFormatPipe, name: "options" }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }] }); }
|
|
247
247
|
}
|
|
248
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
248
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: CartSideComponent, decorators: [{
|
|
249
249
|
type: Component,
|
|
250
|
-
args: [{ selector: 'rolatech-cart-side',
|
|
250
|
+
args: [{ selector: 'rolatech-cart-side', imports: [
|
|
251
251
|
CommonModule,
|
|
252
|
-
NgClass,
|
|
253
252
|
MatButtonModule,
|
|
254
253
|
MatIcon,
|
|
255
254
|
MatBadge,
|
|
@@ -268,10 +267,10 @@ class CartState {
|
|
|
268
267
|
getCount() {
|
|
269
268
|
return this.$count.asObservable();
|
|
270
269
|
}
|
|
271
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
272
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
270
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: CartState, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
271
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: CartState, providedIn: 'root' }); }
|
|
273
272
|
}
|
|
274
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
273
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: CartState, decorators: [{
|
|
275
274
|
type: Injectable,
|
|
276
275
|
args: [{
|
|
277
276
|
providedIn: 'root',
|
|
@@ -311,12 +310,12 @@ class CartIconComponent {
|
|
|
311
310
|
},
|
|
312
311
|
});
|
|
313
312
|
}
|
|
314
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
315
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
313
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: CartIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
314
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: CartIconComponent, isStandalone: true, selector: "rolatech-cart-icon", inputs: { router: { classPropertyName: "router", publicName: "router", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"px-2\">\n <button mat-icon-button class=\"flex\" onclick=\"this.blur()\" [matMenuTriggerFor]=\"notificationsMenu\">\n <mat-icon aria-hidden=\"false\" [matBadge]=\"count\" [matBadgeHidden]=\"count === 0\">shopping_bag</mat-icon>\n </button>\n</div>\n<mat-menu #notificationsMenu=\"matMenu\" class=\"custom-menu\">\n <div class=\"flex flex-col divide-y min-w-[320px]\">\n <div class=\"h-11 px-3 flex justify-between items-center\">\n <span class=\"font-medium\">\u8D2D\u7269\u8F66</span>\n @if (count) {\n <span class=\"text-sm font-medium cursor-pointer hover:underline\" (click)=\"deleteAll()\">\u5220\u9664\u5168\u90E8</span>\n }\n </div>\n <div>\n @if (carts && carts.length > 0) {\n <div class=\"divide-y\">\n @for (item of carts; track item) {\n <div class=\"p-2 cursor-pointer hover:bg-[--rt-raised-background]\" [routerLink]=\"[router(), item.id]\">\n <div>\n {{ item.title }}\n </div>\n <div class=\"text-sm\">\n {{ item.content }}\n </div>\n </div>\n }\n </div>\n } @else {\n <div class=\"h-32 flex justify-center items-center\">\u6682\u65E0</div>\n }\n </div>\n <div class=\"h-11 flex justify-center items-center cursor-pointer hover:bg-[--rt-raised-background]\" [routerLink]=\"router()\">\n <a class=\"flex justify-center items-center\">\n <span class=\"text-sm text-[--rt-brand-color]\"> \u524D\u5F80\u8D2D\u7269\u8F66 </span>\n </a>\n </div>\n </div>\n</mat-menu>\n", styles: ["rolatech-cart-icon{color:var(--rt-text-primary, #000)}.custom-menu{color:var(--rt-text-primary, #000)}\n"], dependencies: [{ kind: "ngmodule", type: AngularCommonModule }, { kind: "directive", type: i1$2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: AngularComponentsModule }, { kind: "directive", type: i2.MatBadge, selector: "[matBadge]", inputs: ["matBadgeColor", "matBadgeOverlap", "matBadgeDisabled", "matBadgePosition", "matBadge", "matBadgeDescription", "matBadgeSize", "matBadgeHidden"] }, { kind: "component", type: i1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i5.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "directive", type: i5.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
316
315
|
}
|
|
317
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
316
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: CartIconComponent, decorators: [{
|
|
318
317
|
type: Component,
|
|
319
|
-
args: [{ selector: 'rolatech-cart-icon',
|
|
318
|
+
args: [{ selector: 'rolatech-cart-icon', imports: [AngularCommonModule, AngularComponentsModule], encapsulation: ViewEncapsulation.None, template: "<div class=\"px-2\">\n <button mat-icon-button class=\"flex\" onclick=\"this.blur()\" [matMenuTriggerFor]=\"notificationsMenu\">\n <mat-icon aria-hidden=\"false\" [matBadge]=\"count\" [matBadgeHidden]=\"count === 0\">shopping_bag</mat-icon>\n </button>\n</div>\n<mat-menu #notificationsMenu=\"matMenu\" class=\"custom-menu\">\n <div class=\"flex flex-col divide-y min-w-[320px]\">\n <div class=\"h-11 px-3 flex justify-between items-center\">\n <span class=\"font-medium\">\u8D2D\u7269\u8F66</span>\n @if (count) {\n <span class=\"text-sm font-medium cursor-pointer hover:underline\" (click)=\"deleteAll()\">\u5220\u9664\u5168\u90E8</span>\n }\n </div>\n <div>\n @if (carts && carts.length > 0) {\n <div class=\"divide-y\">\n @for (item of carts; track item) {\n <div class=\"p-2 cursor-pointer hover:bg-[--rt-raised-background]\" [routerLink]=\"[router(), item.id]\">\n <div>\n {{ item.title }}\n </div>\n <div class=\"text-sm\">\n {{ item.content }}\n </div>\n </div>\n }\n </div>\n } @else {\n <div class=\"h-32 flex justify-center items-center\">\u6682\u65E0</div>\n }\n </div>\n <div class=\"h-11 flex justify-center items-center cursor-pointer hover:bg-[--rt-raised-background]\" [routerLink]=\"router()\">\n <a class=\"flex justify-center items-center\">\n <span class=\"text-sm text-[--rt-brand-color]\"> \u524D\u5F80\u8D2D\u7269\u8F66 </span>\n </a>\n </div>\n </div>\n</mat-menu>\n", styles: ["rolatech-cart-icon{color:var(--rt-text-primary, #000)}.custom-menu{color:var(--rt-text-primary, #000)}\n"] }]
|
|
320
319
|
}] });
|
|
321
320
|
|
|
322
321
|
/**
|
|
@@ -324,4 +323,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
|
|
|
324
323
|
*/
|
|
325
324
|
|
|
326
325
|
export { CartCheckoutSummaryComponent as C, CartCheckoutItemComponent as a, CartCheckoutActionComponent as b, cartRoutes as c, CartSideComponent as d, CartIconComponent as e, CartState as f };
|
|
327
|
-
//# sourceMappingURL=rolatech-angular-cart-rolatech-angular-cart-
|
|
326
|
+
//# sourceMappingURL=rolatech-angular-cart-rolatech-angular-cart-BcUrm79L.mjs.map
|