@rolatech/angular-cart 18.0.4 → 18.0.6
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/esm2022/lib/components/cart-checkout-action/cart-checkout-action.component.mjs +7 -6
- package/esm2022/lib/components/cart-checkout-item/cart-checkout-item.component.mjs +5 -5
- package/esm2022/lib/components/cart-checkout-summary/cart-checkout-summary.component.mjs +15 -8
- package/esm2022/lib/components/cart-icon/cart-icon.component.mjs +5 -5
- package/esm2022/lib/components/cart-side/cart-side.component.mjs +3 -3
- package/esm2022/lib/pages/cart-checkout/cart-checkout-course/cart-checkout-course.component.mjs +6 -5
- package/esm2022/lib/pages/cart-checkout/cart-checkout-index/cart-checkout-index.component.mjs +3 -3
- package/esm2022/lib/pages/cart-checkout/cart-checkout-product/cart-checkout-product.component.mjs +19 -6
- package/esm2022/lib/pages/cart-checkout/cart-checkout-variant/cart-checkout-variant.component.mjs +5 -5
- package/esm2022/lib/pages/cart-index/cart-index.component.mjs +5 -5
- package/esm2022/lib/state/cart.state.mjs +3 -3
- package/fesm2022/rolatech-angular-cart-cart-checkout.routes-DXSzHk3i.mjs +198 -0
- package/fesm2022/rolatech-angular-cart-cart-checkout.routes-DXSzHk3i.mjs.map +1 -0
- package/fesm2022/{rolatech-angular-cart-rolatech-angular-cart-50X3aLUV.mjs → rolatech-angular-cart-rolatech-angular-cart-8pTgdl4S.mjs} +39 -31
- package/fesm2022/rolatech-angular-cart-rolatech-angular-cart-8pTgdl4S.mjs.map +1 -0
- package/fesm2022/rolatech-angular-cart.mjs +1 -14
- package/fesm2022/rolatech-angular-cart.mjs.map +1 -1
- package/lib/components/cart-checkout-action/cart-checkout-action.component.d.ts +2 -1
- package/lib/components/cart-checkout-summary/cart-checkout-summary.component.d.ts +6 -3
- package/lib/pages/cart-checkout/cart-checkout-product/cart-checkout-product.component.d.ts +1 -0
- package/package.json +1 -1
- package/themes/_default.scss +1 -1
- package/fesm2022/rolatech-angular-cart-cart-checkout.routes-C4b44b9z.mjs +0 -192
- package/fesm2022/rolatech-angular-cart-cart-checkout.routes-C4b44b9z.mjs.map +0 -1
- package/fesm2022/rolatech-angular-cart-rolatech-angular-cart-50X3aLUV.mjs.map +0 -1
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, inject, ViewEncapsulation } from '@angular/core';
|
|
3
|
-
import { CommonModule } from '@angular/common';
|
|
4
|
-
import { BaseComponent, ContainerComponent, ToolbarComponent, ThumbnailComponent } from '@rolatech/angular-components';
|
|
5
|
-
import { AuthUserService } from '@rolatech/angular-auth';
|
|
6
|
-
import { CourseService, CourseType } from '@rolatech/angular-course';
|
|
7
|
-
import { OrderService, ProductService, CartService } from '@rolatech/angular-services';
|
|
8
|
-
import * as i1 from '@angular/material/button';
|
|
9
|
-
import { MatButtonModule } from '@angular/material/button';
|
|
10
|
-
import { ProductType } from '@rolatech/angular-product';
|
|
11
|
-
import { C as CartCheckoutSummaryComponent, a as CartCheckoutItemComponent, b as CartCheckoutActionComponent } from './rolatech-angular-cart-rolatech-angular-cart-50X3aLUV.mjs';
|
|
12
|
-
import { OptionsFormatPipe } from '@rolatech/angular-common';
|
|
13
|
-
import '@angular/material/icon';
|
|
14
|
-
import 'lodash';
|
|
15
|
-
import '@angular/router';
|
|
16
|
-
import '@angular/material/badge';
|
|
17
|
-
import '@angular/material/divider';
|
|
18
|
-
import 'rxjs';
|
|
19
|
-
import '@angular/material/menu';
|
|
20
|
-
|
|
21
|
-
class CartCheckoutIndexComponent {
|
|
22
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: CartCheckoutIndexComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
23
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", 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 }] }); }
|
|
24
|
-
}
|
|
25
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: CartCheckoutIndexComponent, decorators: [{
|
|
26
|
-
type: Component,
|
|
27
|
-
args: [{ selector: 'rolatech-cart-checkout-index', standalone: true, imports: [CommonModule], template: "<p>cart-checkout-index works!</p>\n" }]
|
|
28
|
-
}] });
|
|
29
|
-
|
|
30
|
-
class CartCheckoutCourseComponent extends BaseComponent {
|
|
31
|
-
constructor() {
|
|
32
|
-
super(...arguments);
|
|
33
|
-
this.courseService = inject(CourseService);
|
|
34
|
-
this.orderService = inject(OrderService);
|
|
35
|
-
this.authUserService = inject(AuthUserService);
|
|
36
|
-
this.type = CourseType;
|
|
37
|
-
this.purchased = false;
|
|
38
|
-
}
|
|
39
|
-
ngOnInit() {
|
|
40
|
-
this.findCourse();
|
|
41
|
-
this.findPurchasedByCourseId();
|
|
42
|
-
}
|
|
43
|
-
createOrder() {
|
|
44
|
-
this.orderService.create({ productId: this.id, type: 'COURSE' }).subscribe({
|
|
45
|
-
next: (res) => {
|
|
46
|
-
this.router.navigateByUrl(`/orders/${res.data.id}`);
|
|
47
|
-
},
|
|
48
|
-
error: (error) => {
|
|
49
|
-
this.snackBarService.open(error.message);
|
|
50
|
-
},
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
findCourse() {
|
|
54
|
-
this.courseService.get(this.id).subscribe({
|
|
55
|
-
next: (res) => {
|
|
56
|
-
this.course = res.data;
|
|
57
|
-
this.titleService.setTitle(`订单确认 - ${this.course.name}`);
|
|
58
|
-
},
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
findPurchasedByCourseId() {
|
|
62
|
-
this.courseService.findPurchasedByCourseId(this.id).subscribe({
|
|
63
|
-
next: (res) => {
|
|
64
|
-
this.purchased = res.data ? true : false;
|
|
65
|
-
},
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: CartCheckoutCourseComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
69
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", 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-gray-200 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-gray-200 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-gray-600\">\u7C7B\u578B {{ type[course.type] }}</span>\n </div>\n </div>\n <div>\u00A5{{ (course.pricing[0].total / 100).toFixed(2) }}</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 / 100).toFixed(2) }} </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 / 100).toFixed(2) }}</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"] }], deferBlockDependencies: [() => [ThumbnailComponent]] }); }
|
|
70
|
-
}
|
|
71
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: CartCheckoutCourseComponent, decorators: [{
|
|
72
|
-
type: Component,
|
|
73
|
-
args: [{ selector: 'rolatech-cart-checkout-course', standalone: true, imports: [ContainerComponent, ToolbarComponent, ThumbnailComponent, MatButtonModule], 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-gray-200 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-gray-200 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-gray-600\">\u7C7B\u578B {{ type[course.type] }}</span>\n </div>\n </div>\n <div>\u00A5{{ (course.pricing[0].total / 100).toFixed(2) }}</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 / 100).toFixed(2) }} </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 / 100).toFixed(2) }}</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" }]
|
|
74
|
-
}] });
|
|
75
|
-
|
|
76
|
-
class CartCheckoutProductComponent extends BaseComponent {
|
|
77
|
-
constructor() {
|
|
78
|
-
super(...arguments);
|
|
79
|
-
this.productService = inject(ProductService);
|
|
80
|
-
this.cartService = inject(CartService);
|
|
81
|
-
this.orderService = inject(OrderService);
|
|
82
|
-
this.authUserService = inject(AuthUserService);
|
|
83
|
-
this.type = ProductType;
|
|
84
|
-
this.quantity = 1;
|
|
85
|
-
}
|
|
86
|
-
ngOnInit() {
|
|
87
|
-
this.getProduct();
|
|
88
|
-
}
|
|
89
|
-
createOrder() {
|
|
90
|
-
this.orderService.create({ type: 'PRODUCT', productId: this.id }).subscribe({
|
|
91
|
-
next: (res) => {
|
|
92
|
-
this.router.navigateByUrl(`/orders/${res.data.id}`);
|
|
93
|
-
},
|
|
94
|
-
error: (error) => {
|
|
95
|
-
this.snackBarService.open(error.message);
|
|
96
|
-
},
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
getProduct() {
|
|
100
|
-
this.productService.get(this.id).subscribe({
|
|
101
|
-
next: (res) => {
|
|
102
|
-
this.product = res.data;
|
|
103
|
-
this.titleService.setTitle(`订单确认 - ${this.product.name}`);
|
|
104
|
-
},
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: CartCheckoutProductComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
108
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", 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=\"md:w-1/3\">\n <rolatech-cart-checkout-summary [price]=\"product.price\"></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: ["price"] }, { 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", outputs: ["create"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
109
|
-
}
|
|
110
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: CartCheckoutProductComponent, decorators: [{
|
|
111
|
-
type: Component,
|
|
112
|
-
args: [{ selector: 'rolatech-cart-checkout-product', standalone: true, imports: [
|
|
113
|
-
ContainerComponent,
|
|
114
|
-
ToolbarComponent,
|
|
115
|
-
ThumbnailComponent,
|
|
116
|
-
MatButtonModule,
|
|
117
|
-
CartCheckoutSummaryComponent,
|
|
118
|
-
CartCheckoutItemComponent,
|
|
119
|
-
CartCheckoutActionComponent,
|
|
120
|
-
], 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=\"md:w-1/3\">\n <rolatech-cart-checkout-summary [price]=\"product.price\"></rolatech-cart-checkout-summary>\n <rolatech-cart-checkout-action (create)=\"createOrder()\"></rolatech-cart-checkout-action>\n </div>\n </div>\n </rolatech-container>\n}\n" }]
|
|
121
|
-
}] });
|
|
122
|
-
|
|
123
|
-
class CartCheckoutVariantComponent extends BaseComponent {
|
|
124
|
-
constructor() {
|
|
125
|
-
super();
|
|
126
|
-
this.productService = inject(ProductService);
|
|
127
|
-
this.orderService = inject(OrderService);
|
|
128
|
-
this.cartService = inject(CartService);
|
|
129
|
-
this.variantId = '';
|
|
130
|
-
this.quantity = 1;
|
|
131
|
-
this.variantId = this.route.snapshot.params['variant-id'];
|
|
132
|
-
}
|
|
133
|
-
ngOnInit() {
|
|
134
|
-
this.getProduct();
|
|
135
|
-
}
|
|
136
|
-
getProduct() {
|
|
137
|
-
this.productService.get(this.id).subscribe({
|
|
138
|
-
next: (res) => {
|
|
139
|
-
this.product = res.data;
|
|
140
|
-
this.variant = res.data.variants.find((item) => item.id === this.variantId);
|
|
141
|
-
this.titleService.setTitle(`订单确认 - ${this.product.name}`);
|
|
142
|
-
},
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
createOrder() {
|
|
146
|
-
this.orderService.create({ type: 'PRODUCT', variantId: this.variant.id }).subscribe({
|
|
147
|
-
next: (res) => {
|
|
148
|
-
this.router.navigateByUrl(`/orders/${res.data.id}`);
|
|
149
|
-
},
|
|
150
|
-
error: (error) => {
|
|
151
|
-
this.snackBarService.open(error.message);
|
|
152
|
-
},
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: CartCheckoutVariantComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
156
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", 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 [price]=\"variant.price * quantity\"></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: ["price"] }, { 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", outputs: ["create"] }, { kind: "pipe", type: OptionsFormatPipe, name: "options" }] }); }
|
|
157
|
-
}
|
|
158
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: CartCheckoutVariantComponent, decorators: [{
|
|
159
|
-
type: Component,
|
|
160
|
-
args: [{ selector: 'rolatech-cart-checkout-variant', standalone: true, imports: [
|
|
161
|
-
ContainerComponent,
|
|
162
|
-
ToolbarComponent,
|
|
163
|
-
ThumbnailComponent,
|
|
164
|
-
MatButtonModule,
|
|
165
|
-
CartCheckoutSummaryComponent,
|
|
166
|
-
CartCheckoutItemComponent,
|
|
167
|
-
CartCheckoutActionComponent,
|
|
168
|
-
OptionsFormatPipe,
|
|
169
|
-
], 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 [price]=\"variant.price * quantity\"></rolatech-cart-checkout-summary>\n <rolatech-cart-checkout-action (create)=\"createOrder()\"></rolatech-cart-checkout-action>\n </div>\n </div>\n </rolatech-container>\n}\n" }]
|
|
170
|
-
}], ctorParameters: () => [] });
|
|
171
|
-
|
|
172
|
-
const cartCheckoutRoutes = [
|
|
173
|
-
{
|
|
174
|
-
path: '',
|
|
175
|
-
component: CartCheckoutIndexComponent,
|
|
176
|
-
},
|
|
177
|
-
{
|
|
178
|
-
path: 'courses/:id',
|
|
179
|
-
component: CartCheckoutCourseComponent,
|
|
180
|
-
},
|
|
181
|
-
{
|
|
182
|
-
path: 'products/:id',
|
|
183
|
-
component: CartCheckoutProductComponent,
|
|
184
|
-
},
|
|
185
|
-
{
|
|
186
|
-
path: 'products/:id/variants/:variant-id',
|
|
187
|
-
component: CartCheckoutVariantComponent,
|
|
188
|
-
},
|
|
189
|
-
];
|
|
190
|
-
|
|
191
|
-
export { cartCheckoutRoutes as default };
|
|
192
|
-
//# sourceMappingURL=rolatech-angular-cart-cart-checkout.routes-C4b44b9z.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rolatech-angular-cart-cart-checkout.routes-C4b44b9z.mjs","sources":["../../../../libs/angular-cart/src/lib/pages/cart-checkout/cart-checkout-index/cart-checkout-index.component.ts","../../../../libs/angular-cart/src/lib/pages/cart-checkout/cart-checkout-index/cart-checkout-index.component.html","../../../../libs/angular-cart/src/lib/pages/cart-checkout/cart-checkout-course/cart-checkout-course.component.ts","../../../../libs/angular-cart/src/lib/pages/cart-checkout/cart-checkout-course/cart-checkout-course.component.html","../../../../libs/angular-cart/src/lib/pages/cart-checkout/cart-checkout-product/cart-checkout-product.component.ts","../../../../libs/angular-cart/src/lib/pages/cart-checkout/cart-checkout-product/cart-checkout-product.component.html","../../../../libs/angular-cart/src/lib/pages/cart-checkout/cart-checkout-variant/cart-checkout-variant.component.ts","../../../../libs/angular-cart/src/lib/pages/cart-checkout/cart-checkout-variant/cart-checkout-variant.component.html","../../../../libs/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 standalone: true,\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';\n\n@Component({\n selector: 'rolatech-cart-checkout-course',\n standalone: true,\n imports: [ContainerComponent, ToolbarComponent, ThumbnailComponent, MatButtonModule],\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-gray-200 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-gray-200 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-gray-600\">类型 {{ type[course.type] }}</span>\n </div>\n </div>\n <div>¥{{ (course.pricing[0].total / 100).toFixed(2) }}</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 / 100).toFixed(2) }} </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 / 100).toFixed(2) }}</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, ThumbnailComponent, 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';\n\n@Component({\n selector: 'rolatech-cart-checkout-product',\n standalone: true,\n imports: [\n ContainerComponent,\n ToolbarComponent,\n ThumbnailComponent,\n MatButtonModule,\n CartCheckoutSummaryComponent,\n CartCheckoutItemComponent,\n CartCheckoutActionComponent,\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 ngOnInit(): void {\n this.getProduct();\n }\n createOrder() {\n this.orderService.create({ type: 'PRODUCT', productId: this.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 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=\"md:w-1/3\">\n <rolatech-cart-checkout-summary [price]=\"product.price\"></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 { Component, computed, forwardRef, inject, OnInit } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { ContainerComponent, ToolbarComponent, ThumbnailComponent, 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 standalone: true,\n imports: [\n ContainerComponent,\n ToolbarComponent,\n ThumbnailComponent,\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 [price]=\"variant.price * quantity\"></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":";;;;;;;;;;;;;;;;;;;;MAUa,0BAA0B,CAAA;8GAA1B,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;kGAA1B,0BAA0B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,8BAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECVvC,qCACA,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDKY,YAAY,EAAA,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAIX,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAPtC,SAAS;AACE,YAAA,IAAA,EAAA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AE,0BAA0B;AACtC,KAAA;AACD,IAAA;AACE,QAAA,IAAI,EAAE,aAAa;AACnB,QAAA,SAAS,EAAE,2BAA2B;AACvC,KAAA;AACD,IAAA;AACE,QAAA,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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rolatech-angular-cart-rolatech-angular-cart-50X3aLUV.mjs","sources":["../../../../libs/angular-cart/src/lib/components/cart-checkout-item/cart-checkout-item.component.ts","../../../../libs/angular-cart/src/lib/components/cart-checkout-item/cart-checkout-item.component.html","../../../../libs/angular-cart/src/lib/components/cart-checkout-action/cart-checkout-action.component.ts","../../../../libs/angular-cart/src/lib/components/cart-checkout-action/cart-checkout-action.component.html","../../../../libs/angular-cart/src/lib/components/cart-checkout-summary/cart-checkout-summary.component.ts","../../../../libs/angular-cart/src/lib/components/cart-checkout-summary/cart-checkout-summary.component.html","../../../../libs/angular-cart/src/lib/pages/cart-index/cart-index.component.ts","../../../../libs/angular-cart/src/lib/pages/cart-index/cart-index.component.html","../../../../libs/angular-cart/src/lib/pages/cart.routes.ts","../../../../libs/angular-cart/src/lib/components/cart-side/cart-side.component.ts","../../../../libs/angular-cart/src/lib/components/cart-side/cart-side.component.html","../../../../libs/angular-cart/src/lib/state/cart.state.ts","../../../../libs/angular-cart/src/lib/components/cart-icon/cart-icon.component.ts","../../../../libs/angular-cart/src/lib/components/cart-icon/cart-icon.component.html","../../../../libs/angular-cart/src/rolatech-angular-cart.ts"],"sourcesContent":["import { Component, computed, input, model, output } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ThumbnailComponent } from '@rolatech/angular-components';\nimport { Product, ProductMedia, ProductVariant } from '@rolatech/angular-product';\nimport { MatIcon } from '@angular/material/icon';\nimport { MatButtonModule } from '@angular/material/button';\n\n@Component({\n selector: 'rolatech-cart-checkout-item',\n standalone: true,\n imports: [CommonModule, ThumbnailComponent, MatIcon, MatButtonModule],\n templateUrl: './cart-checkout-item.component.html',\n styleUrl: './cart-checkout-item.component.scss',\n})\nexport class CartCheckoutItemComponent {\n thumbnail = input<string>();\n name = input<string>();\n description = input<string>();\n quantity = model<number>(1);\n price = input.required<number>();\n priceDisplay = computed(() => {\n return (this.price() / 100).toFixed(2);\n });\n add = output();\n remove = output();\n delete = output();\n max = input<number>();\n onAdd() {\n this.quantity.update((item) => item + 1);\n this.add.emit();\n }\n onRemove() {\n this.quantity.update((item) => item - 1);\n this.remove.emit();\n }\n onDelete() {\n this.delete.emit();\n }\n}\n","<div class=\"flex justify-between py-3\">\n <div class=\"flex w-full\">\n <div class=\"w-1/4 aspect-video bg-gray-200 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-gray-200 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-gray-600 mt-2 line-clamp-2\">{{ description() }}</span>\n </div>\n <div class=\"p-1\">¥{{ 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\">数量</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","import { Component, output } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatButtonModule } from '@angular/material/button';\n\n@Component({\n selector: 'rolatech-cart-checkout-action',\n standalone: true,\n imports: [CommonModule, MatButtonModule],\n templateUrl: './cart-checkout-action.component.html',\n styleUrl: './cart-checkout-action.component.scss',\n})\nexport class CartCheckoutActionComponent {\n create = output();\n onCreate() {\n this.create.emit();\n }\n}\n","<a mat-flat-button class=\"w-full min-h-11 my-6\" (click)=\"onCreate()\">提交订单</a>\n","import { Component, computed, input } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n@Component({\n selector: 'rolatech-cart-checkout-summary',\n standalone: true,\n imports: [CommonModule],\n templateUrl: './cart-checkout-summary.component.html',\n styleUrl: './cart-checkout-summary.component.scss',\n})\nexport class CartCheckoutSummaryComponent {\n price = input.required<number>();\n priceDisplay = computed(() => {\n return (this.price() / 100).toFixed(2);\n });\n}\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> ¥{{ priceDisplay() }} </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>¥{{ priceDisplay() }}</span>\n </div>\n </div>\n </div>\n</div>\n","import { Component, inject, OnInit } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { CartCheckoutItemComponent } from '../../components/cart-checkout-item/cart-checkout-item.component';\nimport { ContainerComponent, ToolbarComponent } from '@rolatech/angular-components';\nimport { CartService } from '@rolatech/angular-services';\nimport { OptionsFormatPipe } from '@rolatech/angular-common';\nimport { CartCheckoutActionComponent } from '../../components/cart-checkout-action/cart-checkout-action.component';\nimport { CartCheckoutSummaryComponent } from '../../components/cart-checkout-summary/cart-checkout-summary.component';\nimport { sumBy, map, uniq } from 'lodash';\nimport { ProductService, OrderService } from '@rolatech/angular-services';\nimport { Router } from '@angular/router';\n\n@Component({\n selector: 'rolatech-cart-index',\n standalone: true,\n imports: [\n CommonModule,\n ContainerComponent,\n ToolbarComponent,\n CartCheckoutItemComponent,\n CartCheckoutSummaryComponent,\n CartCheckoutActionComponent,\n OptionsFormatPipe,\n ],\n templateUrl: './cart-index.component.html',\n styleUrl: './cart-index.component.scss',\n})\nexport class CartIndexComponent implements OnInit {\n cartService = inject(CartService);\n productService = inject(ProductService);\n orderService = inject(OrderService);\n router = inject(Router);\n carts: any = [];\n totalPrice = 0;\n ngOnInit(): void {\n this.findCarts();\n }\n findCarts() {\n this.cartService.findDetails({}).subscribe({\n next: (res: any) => {\n this.carts = res.data;\n this.calcPrice();\n },\n });\n }\n calcPrice(): any {\n this.totalPrice = sumBy(this.carts, (item: any) =>\n item.variant ? item.quantity * item.variant.price : item.quantity * item.product.price,\n );\n }\n onAdd(cart: any) {\n this.cartService.update(cart.id, { quantity: cart.quantity }).subscribe({\n next: (res) => {\n this.calcPrice();\n },\n });\n }\n onRemove(cart: any) {\n this.cartService.update(cart.id, { quantity: cart.quantity }).subscribe({\n next: (res) => {\n this.calcPrice();\n },\n });\n }\n onDelete(cart: any) {\n this.cartService.delete(cart.id).subscribe({\n next: (res) => {\n const index = this.carts.findIndex((item) => item.id === cart.id);\n this.carts.splice(index, 1);\n this.calcPrice();\n },\n });\n }\n createOrder() {\n const ids = uniq(map(this.carts, 'id')); // [12, 14, 16, 18]\n this.orderService.create({ type: 'PRODUCT', cartIds: ids }).subscribe({\n next: (res: any) => {\n this.router.navigateByUrl(`/orders/${res.data.id}`);\n },\n });\n }\n deleteAllCarts() {}\n}\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>\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 [price]=\"totalPrice\"></rolatech-cart-checkout-summary>\n <rolatech-cart-checkout-action (create)=\"createOrder()\"></rolatech-cart-checkout-action>\n </div>\n </div>\n</rolatech-container>\n","import { Routes } from '@angular/router';\nimport { CartIndexComponent } from './cart-index/cart-index.component';\n\nexport const cartRoutes: Routes = [\n {\n path: '',\n component: CartIndexComponent,\n },\n {\n path: 'checkout',\n loadChildren: () => import('./cart-checkout/cart-checkout.routes'),\n },\n];\n","import { Component, computed, effect, inject, input, model, OnDestroy, OnInit } from '@angular/core';\nimport { CommonModule, NgClass } from '@angular/common';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIcon } from '@angular/material/icon';\nimport { MatBadge } from '@angular/material/badge';\nimport { SpinnerComponent } from '@rolatech/angular-components';\nimport { CartService } from '@rolatech/angular-services';\nimport { Subscription } from 'rxjs';\nimport { CartCheckoutItemComponent } from '../cart-checkout-item/cart-checkout-item.component';\nimport { RouterLink } from '@angular/router';\nimport { sumBy } from 'lodash';\nimport { MatDivider } from '@angular/material/divider';\nimport { OptionsFormatPipe } from '@rolatech/angular-common';\n\n@Component({\n selector: 'rolatech-cart-side',\n standalone: true,\n imports: [\n CommonModule,\n NgClass,\n MatButtonModule,\n MatIcon,\n MatBadge,\n SpinnerComponent,\n CartCheckoutItemComponent,\n OptionsFormatPipe,\n RouterLink,\n MatDivider,\n ],\n templateUrl: './cart-side.component.html',\n styleUrl: './cart-side.component.scss',\n})\nexport class CartSideComponent implements OnDestroy {\n router = input<string>('/cart');\n cartService = inject(CartService);\n carts: any;\n info = model(false);\n loading = false;\n count = 0;\n totalPrice = '';\n private countSubscription!: Subscription;\n toggle = effect(() => {\n if (this.info()) {\n document.body.style.overflow = 'hidden';\n } else {\n document.body.style.overflow = 'auto';\n }\n });\n\n ngOnDestroy() {\n if (this.countSubscription) this.countSubscription.unsubscribe();\n }\n calcPrice(): any {\n const price = sumBy(this.carts, (item: any) =>\n item.variant ? item.quantity * item.variant.price : item.quantity * item.product.price,\n );\n this.totalPrice = (price / 100).toFixed(2);\n }\n show() {\n this.info.set(true);\n this.loading = true;\n this.cartService.findDetails({}).subscribe({\n next: (res: any) => {\n this.carts = res.data;\n this.loading = false;\n this.calcPrice();\n },\n error: (error) => {\n this.loading = false;\n },\n });\n }\n dismiss() {\n this.info.set(false);\n }\n onAdd(cart: any) {\n this.cartService.update(cart.id, { quantity: cart.quantity }).subscribe({\n next: (res) => {\n this.calcPrice();\n },\n });\n }\n onRemove(cart: any) {\n this.cartService.update(cart.id, { quantity: cart.quantity }).subscribe({\n next: (res) => {\n this.calcPrice();\n },\n });\n }\n onDelete(cart: any) {\n this.cartService.delete(cart.id).subscribe({\n next: (res) => {\n const index = this.carts.findIndex((item) => item.id === cart.id);\n this.carts.splice(index, 1);\n this.calcPrice();\n },\n });\n }\n}\n","<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\">购物车</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\">总计</div>\n <div>¥{{ 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>去购物车结算</a>\n </button>\n <button mat-stroked-button (click)=\"dismiss()\" class=\"w-4/12\">\n <a>继续购物</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","import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class CartState {\n $count = new BehaviorSubject(0);\n getCount() {\n return this.$count.asObservable();\n }\n}\n","import { Component, inject, input, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { AngularCommonModule } from '@rolatech/angular-common';\nimport { AngularComponentsModule } from '@rolatech/angular-components';\nimport { CartService } from '@rolatech/angular-services';\nimport { CartState } from '../../state';\n\n@Component({\n selector: 'rolatech-cart-icon',\n standalone: true,\n imports: [AngularCommonModule, AngularComponentsModule],\n templateUrl: './cart-icon.component.html',\n styleUrl: './cart-icon.component.scss',\n encapsulation: ViewEncapsulation.None,\n})\nexport class CartIconComponent implements OnInit, OnDestroy {\n router = input<string>('/cart');\n carts: any = [];\n cartService = inject(CartService);\n cartState = inject(CartState);\n\n count = 0;\n private countSubscription!: Subscription;\n ngOnInit(): void {\n this.cartState.$count.subscribe((data) => {\n this.count = data;\n });\n this.loadCarts();\n }\n ngOnDestroy() {\n if (this.countSubscription) this.countSubscription.unsubscribe();\n }\n\n loadCarts() {\n const options = {};\n this.cartService.find(options).subscribe({\n next: (res: any) => {\n this.carts = res.data;\n },\n });\n }\n deleteAll() {\n this.cartService.deleteAll().subscribe({\n next: (res) => {\n this.carts = [];\n },\n });\n }\n}\n","<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\">购物车</span>\n @if (count) {\n <span class=\"text-sm font-medium cursor-pointer hover:underline\" (click)=\"deleteAll()\">删除全部</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\">暂无</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-orange-600\"> 前往购物车 </span>\n </a>\n </div>\n </div>\n</mat-menu>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i3"],"mappings":";;;;;;;;;;;;;;;;;;;;MAca,yBAAyB,CAAA;AAPtC,IAAA,WAAA,GAAA;QAQE,IAAS,CAAA,SAAA,GAAG,KAAK,EAAU,CAAC;QAC5B,IAAI,CAAA,IAAA,GAAG,KAAK,EAAU,CAAC;QACvB,IAAW,CAAA,WAAA,GAAG,KAAK,EAAU,CAAC;AAC9B,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAS,CAAC,CAAC,CAAC;AAC5B,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,EAAU,CAAC;AACjC,QAAA,IAAA,CAAA,YAAY,GAAG,QAAQ,CAAC,MAAK;AAC3B,YAAA,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;AACzC,SAAC,CAAC,CAAC;QACH,IAAG,CAAA,GAAA,GAAG,MAAM,E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