@rolatech/angular-checkout 19.0.0-beta.10

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/README.md ADDED
@@ -0,0 +1,7 @@
1
+ # angular-checkout
2
+
3
+ This library was generated with [Nx](https://nx.dev).
4
+
5
+ ## Running unit tests
6
+
7
+ Run `nx test angular-checkout` to execute the unit tests.
@@ -0,0 +1,353 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, Component, input, output, computed, booleanAttribute, model, ViewEncapsulation } from '@angular/core';
3
+ import { BaseComponent, ThumbnailComponent, ContainerComponent, ToolbarComponent } from '@rolatech/angular-components';
4
+ import { AuthUserService } from '@rolatech/angular-auth';
5
+ import { CourseService, CourseType } from '@rolatech/angular-course';
6
+ import { OrderService, ProductService, CartService, TitleService } from '@rolatech/angular-services';
7
+ import * as i1 from '@angular/material/button';
8
+ import { MatButtonModule } from '@angular/material/button';
9
+ import { FixedPipe, OptionsFormatPipe } from '@rolatech/angular-common';
10
+ import { ProductType } from '@rolatech/angular-product';
11
+ import * as i4 from '@angular/cdk/text-field';
12
+ import { TextFieldModule } from '@angular/cdk/text-field';
13
+ import * as i2$1 from '@angular/material/form-field';
14
+ import { MatFormFieldModule } from '@angular/material/form-field';
15
+ import * as i3 from '@angular/material/input';
16
+ import { MatInputModule } from '@angular/material/input';
17
+ import * as i1$1 from '@angular/forms';
18
+ import { FormsModule } from '@angular/forms';
19
+ import { CommonModule } from '@angular/common';
20
+ import { MatIcon } from '@angular/material/icon';
21
+ import * as i2 from '@angular/material/checkbox';
22
+ import { MatCheckboxModule } from '@angular/material/checkbox';
23
+ import { sumBy, uniq, map } from 'lodash';
24
+ import { Router } from '@angular/router';
25
+
26
+ class CheckoutCourseComponent extends BaseComponent {
27
+ courseService = inject(CourseService);
28
+ orderService = inject(OrderService);
29
+ authUserService = inject(AuthUserService);
30
+ course;
31
+ type = CourseType;
32
+ purchased = false;
33
+ ngOnInit() {
34
+ this.findCourse();
35
+ this.findPurchasedByCourseId();
36
+ }
37
+ createOrder() {
38
+ this.orderService.create({ productId: this.id, type: 'COURSE' }).subscribe({
39
+ next: (res) => {
40
+ this.router.navigateByUrl(`/orders/${res.data.id}`);
41
+ },
42
+ error: (error) => {
43
+ this.snackBarService.open(error.message);
44
+ },
45
+ });
46
+ }
47
+ findCourse() {
48
+ this.courseService.get(this.id).subscribe({
49
+ next: (res) => {
50
+ this.course = res.data;
51
+ this.titleService.setTitle(`订单确认 - ${this.course.name}`);
52
+ },
53
+ });
54
+ }
55
+ findPurchasedByCourseId() {
56
+ this.courseService.findPurchasedByCourseId(this.id).subscribe({
57
+ next: (res) => {
58
+ this.purchased = res.data ? true : false;
59
+ },
60
+ });
61
+ }
62
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: CheckoutCourseComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
63
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: CheckoutCourseComponent, isStandalone: true, selector: "rolatech-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 divide-[--rt-10-percent-layer]\">\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]] });
64
+ }
65
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: CheckoutCourseComponent, decorators: [{
66
+ type: Component,
67
+ args: [{ selector: 'rolatech-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 divide-[--rt-10-percent-layer]\">\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" }]
68
+ }] });
69
+
70
+ class CheckoutActionComponent {
71
+ title = input('提交订单');
72
+ create = output();
73
+ onCreate() {
74
+ this.create.emit();
75
+ }
76
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: CheckoutActionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
77
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.2", type: CheckoutActionComponent, isStandalone: true, selector: "rolatech-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"] }] });
78
+ }
79
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: CheckoutActionComponent, decorators: [{
80
+ type: Component,
81
+ args: [{ selector: 'rolatech-checkout-action', imports: [CommonModule, MatButtonModule], template: "<a mat-flat-button class=\"w-full min-h-11 my-6\" (click)=\"onCreate()\">{{ title() }}</a>\n" }]
82
+ }] });
83
+
84
+ class CheckoutSummaryComponent {
85
+ deposit = input(0);
86
+ total = input.required();
87
+ quantity = input(1);
88
+ // totalDisplay = computed(() => {
89
+ // return ((this.total() / 100) * this.quantity()).toFixed(2);
90
+ // });
91
+ depositDisplay = computed(() => {
92
+ return (this.deposit() / 100).toFixed(2);
93
+ });
94
+ remainingDisplay = computed(() => {
95
+ return ((this.total() - this.deposit()) / 100).toFixed(2);
96
+ });
97
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: CheckoutSummaryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
98
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: CheckoutSummaryComponent, isStandalone: true, selector: "rolatech-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 }, quantity: { classPropertyName: "quantity", publicName: "quantity", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"text-2xl font-medium mb-2\">\u7EDF\u8BA1</div>\n<div class=\"divide-y divide-[--rt-10-percent-layer] pb-32 md:pb-3\">\n @if (deposit()) {\n <div class=\"flex justify-between py-2\">\n <span>\u5B9A\u91D1</span>\n <span> \u00A5{{ depositDisplay() }} </span>\n </div>\n <div class=\"flex justify-between py-2\">\n <span> \u5C3E\u6B3E </span>\n <span> \u00A5{{ remainingDisplay() }} </span>\n </div>\n } @else {\n <div class=\"flex justify-between py-2\">\n <span> \u5546\u54C1\u6570\u91CF </span>\n <span> {{ quantity() }}\u4EF6 </span>\n </div>\n <div class=\"flex justify-between py-2\">\n <span> \u5E94\u4ED8\u91D1\u989D </span>\n <span> \u00A5{{ total() | fixed }} </span>\n </div>\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{{ total() | fixed }}</span>\n </div>\n </div>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: FixedPipe, name: "fixed" }] });
99
+ }
100
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: CheckoutSummaryComponent, decorators: [{
101
+ type: Component,
102
+ args: [{ selector: 'rolatech-checkout-summary', imports: [CommonModule, FixedPipe], template: "<div class=\"text-2xl font-medium mb-2\">\u7EDF\u8BA1</div>\n<div class=\"divide-y divide-[--rt-10-percent-layer] pb-32 md:pb-3\">\n @if (deposit()) {\n <div class=\"flex justify-between py-2\">\n <span>\u5B9A\u91D1</span>\n <span> \u00A5{{ depositDisplay() }} </span>\n </div>\n <div class=\"flex justify-between py-2\">\n <span> \u5C3E\u6B3E </span>\n <span> \u00A5{{ remainingDisplay() }} </span>\n </div>\n } @else {\n <div class=\"flex justify-between py-2\">\n <span> \u5546\u54C1\u6570\u91CF </span>\n <span> {{ quantity() }}\u4EF6 </span>\n </div>\n <div class=\"flex justify-between py-2\">\n <span> \u5E94\u4ED8\u91D1\u989D </span>\n <span> \u00A5{{ total() | fixed }} </span>\n </div>\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{{ total() | fixed }}</span>\n </div>\n </div>\n </div>\n</div>\n" }]
103
+ }] });
104
+
105
+ class CheckoutItemComponent {
106
+ selectable = input(false, { transform: booleanAttribute });
107
+ thumbnail = input();
108
+ name = input();
109
+ selected = model(false);
110
+ description = input();
111
+ quantity = model(1);
112
+ price = input.required();
113
+ max = input();
114
+ priceDisplay = computed(() => {
115
+ return (this.price() / 100).toFixed(2);
116
+ });
117
+ add = output();
118
+ remove = output();
119
+ delete = output();
120
+ toggleSelect = output();
121
+ onAdd() {
122
+ this.quantity.update((item) => item + 1);
123
+ this.add.emit();
124
+ }
125
+ onRemove() {
126
+ this.quantity.update((item) => item - 1);
127
+ this.remove.emit();
128
+ }
129
+ onDelete() {
130
+ this.delete.emit();
131
+ }
132
+ onToggleSelect() {
133
+ this.selected.update((item) => !item);
134
+ console.log(this.selected());
135
+ this.toggleSelect.emit();
136
+ }
137
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: CheckoutItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
138
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: CheckoutItemComponent, isStandalone: true, selector: "rolatech-checkout-item", inputs: { selectable: { classPropertyName: "selectable", publicName: "selectable", isSignal: true, isRequired: false, transformFunction: null }, thumbnail: { classPropertyName: "thumbnail", publicName: "thumbnail", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", 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: { selected: "selectedChange", quantity: "quantityChange", add: "add", remove: "remove", delete: "delete", toggleSelect: "toggleSelect" }, ngImport: i0, template: "<div class=\"flex justify-between py-3\">\n <div class=\"flex w-full\">\n @if (selectable()) {\n <mat-checkbox [checked]=\"selected()\" (change)=\"onToggleSelect()\" (click)=\"$event.stopPropagation()\"></mat-checkbox>\n }\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"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i2.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }], deferBlockDependencies: [() => [import('@rolatech/angular-components').then(m => m.ThumbnailComponent)]] });
139
+ }
140
+ i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "19.2.2", ngImport: i0, type: CheckoutItemComponent, resolveDeferredDeps: () => [import('@rolatech/angular-components').then(m => m.ThumbnailComponent)], resolveMetadata: ThumbnailComponent => ({ decorators: [{
141
+ type: Component,
142
+ args: [{ selector: 'rolatech-checkout-item', imports: [CommonModule, ThumbnailComponent, MatIcon, MatButtonModule, MatCheckboxModule], template: "<div class=\"flex justify-between py-3\">\n <div class=\"flex w-full\">\n @if (selectable()) {\n <mat-checkbox [checked]=\"selected()\" (change)=\"onToggleSelect()\" (click)=\"$event.stopPropagation()\"></mat-checkbox>\n }\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"] }]
143
+ }], ctorParameters: null, propDecorators: null }) });
144
+
145
+ class CheckoutProductComponent extends BaseComponent {
146
+ productService = inject(ProductService);
147
+ cartService = inject(CartService);
148
+ orderService = inject(OrderService);
149
+ authUserService = inject(AuthUserService);
150
+ product;
151
+ type = ProductType;
152
+ quantity = 1;
153
+ note = '';
154
+ address = {};
155
+ ngOnInit() {
156
+ this.getProduct();
157
+ }
158
+ createOrder() {
159
+ this.orderService
160
+ .create({ type: 'PRODUCT', productId: this.id, note: this.note, shippingAddress: this.address, quantity: this.quantity })
161
+ .subscribe({
162
+ next: (res) => {
163
+ this.router.navigateByUrl(`/orders/${res.data.id}`);
164
+ },
165
+ error: (error) => {
166
+ this.snackBarService.open(error.message);
167
+ },
168
+ });
169
+ }
170
+ getProduct() {
171
+ this.productService.get(this.id).subscribe({
172
+ next: (res) => {
173
+ this.product = res.data;
174
+ this.titleService.setTitle(`订单确认 - ${this.product.name}`);
175
+ },
176
+ });
177
+ }
178
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: CheckoutProductComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
179
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: CheckoutProductComponent, isStandalone: true, selector: "rolatech-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-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-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-checkout-summary [total]=\"product.price\" [deposit]=\"product.deposit\"></rolatech-checkout-summary>\n } @else {\n <rolatech-checkout-summary [total]=\"product.price\" [quantity]=\"quantity\"></rolatech-checkout-summary>\n }\n <rolatech-checkout-action\n (create)=\"createOrder()\"\n [title]=\"product.priceType && product.priceType.toString() === 'FIXED' ? '\u63D0\u4EA4\u8BA2\u5355' : '\u63D0\u4EA4\u8BA2\u5355'\"\n ></rolatech-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: CheckoutSummaryComponent, selector: "rolatech-checkout-summary", inputs: ["deposit", "total", "quantity"] }, { kind: "component", type: CheckoutItemComponent, selector: "rolatech-checkout-item", inputs: ["selectable", "thumbnail", "name", "selected", "description", "quantity", "price", "max"], outputs: ["selectedChange", "quantityChange", "add", "remove", "delete", "toggleSelect"] }, { kind: "component", type: CheckoutActionComponent, selector: "rolatech-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$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.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 });
180
+ }
181
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: CheckoutProductComponent, decorators: [{
182
+ type: Component,
183
+ args: [{ selector: 'rolatech-checkout-product', imports: [
184
+ ContainerComponent,
185
+ ToolbarComponent,
186
+ MatButtonModule,
187
+ CheckoutSummaryComponent,
188
+ CheckoutItemComponent,
189
+ CheckoutActionComponent,
190
+ FormsModule,
191
+ MatFormFieldModule,
192
+ MatInputModule,
193
+ TextFieldModule,
194
+ ], 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-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-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-checkout-summary [total]=\"product.price\" [deposit]=\"product.deposit\"></rolatech-checkout-summary>\n } @else {\n <rolatech-checkout-summary [total]=\"product.price\" [quantity]=\"quantity\"></rolatech-checkout-summary>\n }\n <rolatech-checkout-action\n (create)=\"createOrder()\"\n [title]=\"product.priceType && product.priceType.toString() === 'FIXED' ? '\u63D0\u4EA4\u8BA2\u5355' : '\u63D0\u4EA4\u8BA2\u5355'\"\n ></rolatech-checkout-action>\n </div>\n </div>\n </rolatech-container>\n}\n", styles: ["mat-form-field{width:100%}\n"] }]
195
+ }] });
196
+
197
+ class CheckoutShippingComponent {
198
+ address = model();
199
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: CheckoutShippingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
200
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.2", type: CheckoutShippingComponent, isStandalone: true, selector: "rolatech-checkout-shipping", inputs: { address: { classPropertyName: "address", publicName: "address", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { address: "addressChange" }, ngImport: i0, template: "<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", styles: ["mat-form-field{width:100%}\n"], dependencies: [{ 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$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.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 }] });
201
+ }
202
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: CheckoutShippingComponent, decorators: [{
203
+ type: Component,
204
+ args: [{ selector: 'rolatech-checkout-shipping', imports: [FormsModule, MatFormFieldModule, MatInputModule, TextFieldModule], template: "<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", styles: ["mat-form-field{width:100%}\n"] }]
205
+ }] });
206
+
207
+ class CheckoutProductVariantComponent extends BaseComponent {
208
+ productService = inject(ProductService);
209
+ orderService = inject(OrderService);
210
+ cartService = inject(CartService);
211
+ product;
212
+ variant;
213
+ variantId = '';
214
+ quantity = 1;
215
+ address = {};
216
+ note = '';
217
+ constructor() {
218
+ super();
219
+ this.variantId = this.route.snapshot.params['variant-id'];
220
+ }
221
+ ngOnInit() {
222
+ this.getProduct();
223
+ }
224
+ getProduct() {
225
+ this.productService.get(this.id).subscribe({
226
+ next: (res) => {
227
+ this.product = res.data;
228
+ this.variant = res.data.variants.find((item) => item.id === this.variantId);
229
+ this.titleService.setTitle(`订单确认 - ${this.product.name}`);
230
+ },
231
+ });
232
+ }
233
+ createOrder() {
234
+ this.orderService
235
+ .create({
236
+ type: 'PRODUCT',
237
+ variantId: this.variant.id,
238
+ shippingAddress: this.address,
239
+ note: this.note,
240
+ quantity: this.quantity,
241
+ })
242
+ .subscribe({
243
+ next: (res) => {
244
+ this.router.navigateByUrl(`/orders/${res.data.id}`);
245
+ },
246
+ error: (error) => {
247
+ this.snackBarService.open(error.message);
248
+ },
249
+ });
250
+ }
251
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: CheckoutProductVariantComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
252
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: CheckoutProductVariantComponent, isStandalone: true, selector: "rolatech-checkout-product-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-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-checkout-item>\n </div>\n <div>\n <rolatech-checkout-shipping [address]=\"address\"></rolatech-checkout-shipping>\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\n <div class=\"md:w-1/3\">\n <rolatech-checkout-summary\n [total]=\"variant.price * quantity\"\n [deposit]=\"product.deposit\"\n [quantity]=\"quantity\"\n ></rolatech-checkout-summary>\n <rolatech-checkout-action (create)=\"createOrder()\"></rolatech-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: CheckoutShippingComponent, selector: "rolatech-checkout-shipping", inputs: ["address"], outputs: ["addressChange"] }, { kind: "component", type: CheckoutSummaryComponent, selector: "rolatech-checkout-summary", inputs: ["deposit", "total", "quantity"] }, { kind: "component", type: CheckoutItemComponent, selector: "rolatech-checkout-item", inputs: ["selectable", "thumbnail", "name", "selected", "description", "quantity", "price", "max"], outputs: ["selectedChange", "quantityChange", "add", "remove", "delete", "toggleSelect"] }, { kind: "component", type: CheckoutActionComponent, selector: "rolatech-checkout-action", inputs: ["title"], outputs: ["create"] }, { kind: "pipe", type: OptionsFormatPipe, name: "options" }, { 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$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { 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 }] });
253
+ }
254
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: CheckoutProductVariantComponent, decorators: [{
255
+ type: Component,
256
+ args: [{ selector: 'rolatech-checkout-product-variant', imports: [
257
+ ContainerComponent,
258
+ ToolbarComponent,
259
+ MatButtonModule,
260
+ CheckoutShippingComponent,
261
+ CheckoutSummaryComponent,
262
+ CheckoutItemComponent,
263
+ CheckoutActionComponent,
264
+ OptionsFormatPipe,
265
+ FormsModule,
266
+ MatFormFieldModule,
267
+ MatInputModule,
268
+ TextFieldModule,
269
+ ], 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-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-checkout-item>\n </div>\n <div>\n <rolatech-checkout-shipping [address]=\"address\"></rolatech-checkout-shipping>\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\n <div class=\"md:w-1/3\">\n <rolatech-checkout-summary\n [total]=\"variant.price * quantity\"\n [deposit]=\"product.deposit\"\n [quantity]=\"quantity\"\n ></rolatech-checkout-summary>\n <rolatech-checkout-action (create)=\"createOrder()\"></rolatech-checkout-action>\n </div>\n </div>\n </rolatech-container>\n}\n", styles: ["mat-form-field{width:100%}\n"] }]
270
+ }], ctorParameters: () => [] });
271
+
272
+ class CheckoutCartComponent {
273
+ cartService = inject(CartService);
274
+ productService = inject(ProductService);
275
+ orderService = inject(OrderService);
276
+ titleService = inject(TitleService);
277
+ router = inject(Router);
278
+ carts = [];
279
+ totalPrice = 0;
280
+ address = {};
281
+ note = '';
282
+ quantity = 1;
283
+ ngOnInit() {
284
+ this.titleService.setTitle('购物车结算');
285
+ this.findCarts();
286
+ }
287
+ findCarts() {
288
+ this.cartService.findDetails({ filter: 'selected:true' }).subscribe({
289
+ next: (res) => {
290
+ this.carts = res.data;
291
+ this.calcPrice();
292
+ },
293
+ });
294
+ }
295
+ calcPrice() {
296
+ const selectedCarts = this.carts.filter((item) => item.selected);
297
+ this.totalPrice = sumBy(selectedCarts, (item) => item.variant ? item.quantity * item.variant.price : item.quantity * item.product.price);
298
+ this.quantity = sumBy(selectedCarts, (item) => item.quantity);
299
+ }
300
+ createOrder() {
301
+ const ids = uniq(map(this.carts, 'id')); // [12, 14, 16, 18]
302
+ this.orderService.create({ type: 'PRODUCT', cartIds: ids, shippingAddress: this.address, note: this.note }).subscribe({
303
+ next: (res) => {
304
+ this.router.navigateByUrl(`/orders/${res.data.id}`);
305
+ },
306
+ });
307
+ }
308
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: CheckoutCartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
309
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: CheckoutCartComponent, isStandalone: true, selector: "rolatech-checkout-cart", ngImport: i0, template: "<rolatech-container>\n <rolatech-toolbar title=\"\u8D2D\u7269\u8F66\u7ED3\u7B97\" large back></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-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 ></rolatech-checkout-item>\n } @else {\n <rolatech-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 ></rolatech-checkout-item>\n }\n }\n </div>\n <div>\n <rolatech-checkout-shipping [address]=\"address\"></rolatech-checkout-shipping>\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 <rolatech-checkout-summary [total]=\"totalPrice\" [quantity]=\"quantity\"></rolatech-checkout-summary>\n <rolatech-checkout-action (create)=\"createOrder()\"></rolatech-checkout-action>\n </div>\n </div>\n</rolatech-container>\n", styles: ["mat-form-field{width:100%}\n"], 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: CheckoutItemComponent, selector: "rolatech-checkout-item", inputs: ["selectable", "thumbnail", "name", "selected", "description", "quantity", "price", "max"], outputs: ["selectedChange", "quantityChange", "add", "remove", "delete", "toggleSelect"] }, { kind: "component", type: CheckoutSummaryComponent, selector: "rolatech-checkout-summary", inputs: ["deposit", "total", "quantity"] }, { kind: "component", type: CheckoutActionComponent, selector: "rolatech-checkout-action", inputs: ["title"], outputs: ["create"] }, { kind: "pipe", type: OptionsFormatPipe, name: "options" }, { kind: "component", type: CheckoutShippingComponent, selector: "rolatech-checkout-shipping", inputs: ["address"], outputs: ["addressChange"] }, { 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$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { 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 }] });
310
+ }
311
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: CheckoutCartComponent, decorators: [{
312
+ type: Component,
313
+ args: [{ selector: 'rolatech-checkout-cart', imports: [
314
+ CommonModule,
315
+ ContainerComponent,
316
+ ToolbarComponent,
317
+ CheckoutItemComponent,
318
+ CheckoutSummaryComponent,
319
+ CheckoutActionComponent,
320
+ OptionsFormatPipe,
321
+ CheckoutShippingComponent,
322
+ FormsModule,
323
+ MatFormFieldModule,
324
+ MatInputModule,
325
+ TextFieldModule,
326
+ ], template: "<rolatech-container>\n <rolatech-toolbar title=\"\u8D2D\u7269\u8F66\u7ED3\u7B97\" large back></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-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 ></rolatech-checkout-item>\n } @else {\n <rolatech-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 ></rolatech-checkout-item>\n }\n }\n </div>\n <div>\n <rolatech-checkout-shipping [address]=\"address\"></rolatech-checkout-shipping>\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 <rolatech-checkout-summary [total]=\"totalPrice\" [quantity]=\"quantity\"></rolatech-checkout-summary>\n <rolatech-checkout-action (create)=\"createOrder()\"></rolatech-checkout-action>\n </div>\n </div>\n</rolatech-container>\n", styles: ["mat-form-field{width:100%}\n"] }]
327
+ }] });
328
+
329
+ const checkoutRoutes = [
330
+ {
331
+ path: 'courses/:id',
332
+ component: CheckoutCourseComponent,
333
+ },
334
+ {
335
+ path: 'products/:id',
336
+ component: CheckoutProductComponent,
337
+ },
338
+ {
339
+ path: 'products/:id/variants/:variant-id',
340
+ component: CheckoutProductVariantComponent,
341
+ },
342
+ {
343
+ path: 'cart',
344
+ component: CheckoutCartComponent,
345
+ },
346
+ ];
347
+
348
+ /**
349
+ * Generated bundle index. Do not edit.
350
+ */
351
+
352
+ export { CheckoutActionComponent, CheckoutItemComponent, CheckoutShippingComponent, CheckoutSummaryComponent, checkoutRoutes };
353
+ //# sourceMappingURL=rolatech-angular-checkout.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rolatech-angular-checkout.mjs","sources":["../../../../packages/angular-checkout/src/lib/pages/checkout-course/checkout-course.component.ts","../../../../packages/angular-checkout/src/lib/pages/checkout-course/checkout-course.component.html","../../../../packages/angular-checkout/src/lib/components/checkout-action/checkout-action.component.ts","../../../../packages/angular-checkout/src/lib/components/checkout-action/checkout-action.component.html","../../../../packages/angular-checkout/src/lib/components/checkout-summary/checkout-summary.component.ts","../../../../packages/angular-checkout/src/lib/components/checkout-summary/checkout-summary.component.html","../../../../packages/angular-checkout/src/lib/components/checkout-item/checkout-item.component.ts","../../../../packages/angular-checkout/src/lib/components/checkout-item/checkout-item.component.html","../../../../packages/angular-checkout/src/lib/pages/checkout-product/checkout-product.component.ts","../../../../packages/angular-checkout/src/lib/pages/checkout-product/checkout-product.component.html","../../../../packages/angular-checkout/src/lib/components/checkout-shipping/checkout-shipping.component.ts","../../../../packages/angular-checkout/src/lib/components/checkout-shipping/checkout-shipping.component.html","../../../../packages/angular-checkout/src/lib/pages/checkout-product-variant/checkout-product-variant.component.ts","../../../../packages/angular-checkout/src/lib/pages/checkout-product-variant/checkout-product-variant.component.html","../../../../packages/angular-checkout/src/lib/pages/checkout-cart/checkout-cart.component.ts","../../../../packages/angular-checkout/src/lib/pages/checkout-cart/checkout-cart.component.html","../../../../packages/angular-checkout/src/lib/pages/checkout.routes.ts","../../../../packages/angular-checkout/src/rolatech-angular-checkout.ts"],"sourcesContent":["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-checkout-course',\n imports: [ContainerComponent, ToolbarComponent, ThumbnailComponent, MatButtonModule, FixedPipe],\n templateUrl: './checkout-course.component.html',\n styleUrl: './checkout-course.component.scss',\n})\nexport class CheckoutCourseComponent 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 divide-[--rt-10-percent-layer]\">\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, input, output } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatButtonModule } from '@angular/material/button';\n\n@Component({\n selector: 'rolatech-checkout-action',\n imports: [CommonModule, MatButtonModule],\n templateUrl: './checkout-action.component.html',\n styleUrl: './checkout-action.component.scss',\n})\nexport class CheckoutActionComponent {\n title = input<string>('提交订单');\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()\">{{ title() }}</a>\n","import { Component, computed, input } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FixedPipe } from '@rolatech/angular-common';\n\n@Component({\n selector: 'rolatech-checkout-summary',\n imports: [CommonModule, FixedPipe],\n templateUrl: './checkout-summary.component.html',\n styleUrl: './checkout-summary.component.scss',\n})\nexport class CheckoutSummaryComponent {\n deposit = input(0);\n total = input.required<number>();\n quantity = input<number>(1);\n // totalDisplay = computed(() => {\n // return ((this.total() / 100) * this.quantity()).toFixed(2);\n // });\n depositDisplay = computed(() => {\n return (this.deposit() / 100).toFixed(2);\n });\n remainingDisplay = computed(() => {\n return ((this.total() - this.deposit()) / 100).toFixed(2);\n });\n}\n","<div class=\"text-2xl font-medium mb-2\">统计</div>\n<div class=\"divide-y divide-[--rt-10-percent-layer] pb-32 md:pb-3\">\n @if (deposit()) {\n <div class=\"flex justify-between py-2\">\n <span>定金</span>\n <span> ¥{{ depositDisplay() }} </span>\n </div>\n <div class=\"flex justify-between py-2\">\n <span> 尾款 </span>\n <span> ¥{{ remainingDisplay() }} </span>\n </div>\n } @else {\n <div class=\"flex justify-between py-2\">\n <span> 商品数量 </span>\n <span> {{ quantity() }}件 </span>\n </div>\n <div class=\"flex justify-between py-2\">\n <span> 应付金额 </span>\n <span> ¥{{ total() | fixed }} </span>\n </div>\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\">总计</span>\n <span>¥{{ total() | fixed }}</span>\n </div>\n </div>\n </div>\n</div>\n","import { booleanAttribute, Component, computed, input, model, output } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ThumbnailComponent } from '@rolatech/angular-components';\nimport { MatIcon } from '@angular/material/icon';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\n\n@Component({\n selector: 'rolatech-checkout-item',\n imports: [CommonModule, ThumbnailComponent, MatIcon, MatButtonModule, MatCheckboxModule],\n templateUrl: './checkout-item.component.html',\n styleUrl: './checkout-item.component.scss',\n})\nexport class CheckoutItemComponent {\n selectable = input(false, { transform: booleanAttribute });\n thumbnail = input<string>();\n name = input<string>();\n selected = model<boolean>(false);\n description = input<string>();\n quantity = model<number>(1);\n price = input.required<number>();\n max = input<number>();\n priceDisplay = computed(() => {\n return (this.price() / 100).toFixed(2);\n });\n add = output();\n remove = output();\n delete = output();\n toggleSelect = output();\n\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 onToggleSelect() {\n this.selected.update((item) => !item);\n console.log(this.selected());\n this.toggleSelect.emit();\n }\n}\n","<div class=\"flex justify-between py-3\">\n <div class=\"flex w-full\">\n @if (selectable()) {\n <mat-checkbox [checked]=\"selected()\" (change)=\"onToggleSelect()\" (click)=\"$event.stopPropagation()\"></mat-checkbox>\n }\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\">¥{{ 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, 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 { 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';\nimport { CheckoutActionComponent } from '../../components/checkout-action/checkout-action.component';\nimport { CheckoutSummaryComponent } from '../../components/checkout-summary/checkout-summary.component';\nimport { CheckoutItemComponent } from '../../components/checkout-item/checkout-item.component';\n\n@Component({\n selector: 'rolatech-checkout-product',\n imports: [\n ContainerComponent,\n ToolbarComponent,\n MatButtonModule,\n CheckoutSummaryComponent,\n CheckoutItemComponent,\n CheckoutActionComponent,\n FormsModule,\n MatFormFieldModule,\n MatInputModule,\n TextFieldModule,\n ],\n templateUrl: './checkout-product.component.html',\n styleUrl: './checkout-product.component.scss',\n encapsulation: ViewEncapsulation.None,\n})\nexport class CheckoutProductComponent 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, quantity: this.quantity })\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-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-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-checkout-summary [total]=\"product.price\" [deposit]=\"product.deposit\"></rolatech-checkout-summary>\n } @else {\n <rolatech-checkout-summary [total]=\"product.price\" [quantity]=\"quantity\"></rolatech-checkout-summary>\n }\n <rolatech-checkout-action\n (create)=\"createOrder()\"\n [title]=\"product.priceType && product.priceType.toString() === 'FIXED' ? '提交订单' : '提交订单'\"\n ></rolatech-checkout-action>\n </div>\n </div>\n </rolatech-container>\n}\n","import { Component, model } from '@angular/core';\nimport { TextFieldModule } from '@angular/cdk/text-field';\nimport { FormsModule } from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\n\n@Component({\n selector: 'rolatech-checkout-shipping',\n imports: [FormsModule, MatFormFieldModule, MatInputModule, TextFieldModule],\n templateUrl: './checkout-shipping.component.html',\n styleUrl: './checkout-shipping.component.scss',\n})\nexport class CheckoutShippingComponent {\n address = model<any>();\n}\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","import { Component, inject, OnInit } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { ContainerComponent, ToolbarComponent, BaseComponent } from '@rolatech/angular-components';\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';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { TextFieldModule } from '@angular/cdk/text-field';\nimport { FormsModule } from '@angular/forms';\nimport { MatInputModule } from '@angular/material/input';\nimport { CheckoutSummaryComponent } from '../../components/checkout-summary/checkout-summary.component';\nimport { CheckoutShippingComponent } from '../../components/checkout-shipping/checkout-shipping.component';\nimport { CheckoutItemComponent } from '../../components/checkout-item/checkout-item.component';\nimport { CheckoutActionComponent } from '../../components/checkout-action/checkout-action.component';\n\n@Component({\n selector: 'rolatech-checkout-product-variant',\n imports: [\n ContainerComponent,\n ToolbarComponent,\n MatButtonModule,\n CheckoutShippingComponent,\n CheckoutSummaryComponent,\n CheckoutItemComponent,\n CheckoutActionComponent,\n OptionsFormatPipe,\n FormsModule,\n MatFormFieldModule,\n MatInputModule,\n TextFieldModule,\n ],\n templateUrl: './checkout-product-variant.component.html',\n styleUrl: './checkout-product-variant.component.scss',\n})\nexport class CheckoutProductVariantComponent 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 address: any = {};\n note = '';\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\n .create({\n type: 'PRODUCT',\n variantId: this.variant.id,\n shippingAddress: this.address,\n note: this.note,\n quantity: this.quantity,\n })\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}\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-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-checkout-item>\n </div>\n <div>\n <rolatech-checkout-shipping [address]=\"address\"></rolatech-checkout-shipping>\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\n <div class=\"md:w-1/3\">\n <rolatech-checkout-summary\n [total]=\"variant.price * quantity\"\n [deposit]=\"product.deposit\"\n [quantity]=\"quantity\"\n ></rolatech-checkout-summary>\n <rolatech-checkout-action (create)=\"createOrder()\"></rolatech-checkout-action>\n </div>\n </div>\n </rolatech-container>\n}\n","import { Component, inject, OnInit } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { CartService, ProductService, OrderService, TitleService } from '@rolatech/angular-services';\nimport { map, sumBy, uniq } from 'lodash';\nimport { Router } from '@angular/router';\nimport { TextFieldModule } from '@angular/cdk/text-field';\nimport { FormsModule } from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { OptionsFormatPipe } from '@rolatech/angular-common';\nimport { ContainerComponent, ToolbarComponent } from '@rolatech/angular-components';\nimport { CheckoutActionComponent } from '../../components/checkout-action/checkout-action.component';\nimport { CheckoutItemComponent } from '../../components/checkout-item/checkout-item.component';\nimport { CheckoutShippingComponent } from '../../components/checkout-shipping/checkout-shipping.component';\nimport { CheckoutSummaryComponent } from '../../components/checkout-summary/checkout-summary.component';\n\n@Component({\n selector: 'rolatech-checkout-cart',\n imports: [\n CommonModule,\n ContainerComponent,\n ToolbarComponent,\n CheckoutItemComponent,\n CheckoutSummaryComponent,\n CheckoutActionComponent,\n OptionsFormatPipe,\n CheckoutShippingComponent,\n FormsModule,\n MatFormFieldModule,\n MatInputModule,\n TextFieldModule,\n ],\n templateUrl: './checkout-cart.component.html',\n styleUrl: './checkout-cart.component.scss',\n})\nexport class CheckoutCartComponent implements OnInit {\n cartService = inject(CartService);\n productService = inject(ProductService);\n orderService = inject(OrderService);\n titleService = inject(TitleService);\n router = inject(Router);\n carts: any = [];\n totalPrice = 0;\n address: any = {};\n note = '';\n quantity = 1;\n ngOnInit(): void {\n this.titleService.setTitle('购物车结算');\n this.findCarts();\n }\n findCarts() {\n this.cartService.findDetails({ filter: 'selected:true' }).subscribe({\n next: (res: any) => {\n this.carts = res.data;\n this.calcPrice();\n },\n });\n }\n calcPrice(): any {\n const selectedCarts = this.carts.filter((item) => item.selected);\n this.totalPrice = sumBy(selectedCarts, (item: any) =>\n item.variant ? item.quantity * item.variant.price : item.quantity * item.product.price,\n );\n this.quantity = sumBy(selectedCarts, (item: any) => item.quantity);\n }\n\n createOrder() {\n const ids = uniq(map(this.carts, 'id')); // [12, 14, 16, 18]\n this.orderService.create({ type: 'PRODUCT', cartIds: ids, shippingAddress: this.address, note: this.note }).subscribe({\n next: (res: any) => {\n this.router.navigateByUrl(`/orders/${res.data.id}`);\n },\n });\n }\n}\n","<rolatech-container>\n <rolatech-toolbar title=\"购物车结算\" large back></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-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 ></rolatech-checkout-item>\n } @else {\n <rolatech-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 ></rolatech-checkout-item>\n }\n }\n </div>\n <div>\n <rolatech-checkout-shipping [address]=\"address\"></rolatech-checkout-shipping>\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 <rolatech-checkout-summary [total]=\"totalPrice\" [quantity]=\"quantity\"></rolatech-checkout-summary>\n <rolatech-checkout-action (create)=\"createOrder()\"></rolatech-checkout-action>\n </div>\n </div>\n</rolatech-container>\n","import { Routes } from '@angular/router';\nimport { CheckoutCourseComponent } from './checkout-course/checkout-course.component';\nimport { CheckoutProductComponent } from './checkout-product/checkout-product.component';\nimport { CheckoutProductVariantComponent } from './checkout-product-variant/checkout-product-variant.component';\nimport { CheckoutCartComponent } from './checkout-cart/checkout-cart.component';\n\nexport const checkoutRoutes: Routes = [\n {\n path: 'courses/:id',\n component: CheckoutCourseComponent,\n },\n {\n path: 'products/:id',\n component: CheckoutProductComponent,\n },\n {\n path: 'products/:id/variants/:variant-id',\n component: CheckoutProductVariantComponent,\n },\n {\n path: 'cart',\n component: CheckoutCartComponent,\n },\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './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IAAA,EACd,eAAe,EAAA,CAAA,EAAA,CAAA;;2FAKN,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAnBjC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,wBAAwB,EACzB,OAAA,EAAA;wBACP,YAAY;wBACZ,kBAAkB;wBAClB,gBAAgB;wBAChB,qBAAqB;wBACrB,wBAAwB;wBACxB,uBAAuB;wBACvB,iBAAiB;wBACjB,yBAAyB;wBACzB,WAAW;wBACX,kBAAkB;wBAClB,cAAc;wBACd,eAAe;AAChB,qBAAA,EAAA,QAAA,EAAA,q5DAAA,EAAA,MAAA,EAAA,CAAA,8BAAA,CAAA,EAAA;;;AEzBU,MAAA,cAAc,GAAW;AACpC,IAAA;AACE,QAAA,IAAI,EAAE,aAAa;AACnB,QAAA,SAAS,EAAE,uBAAuB;AACnC,KAAA;AACD,IAAA;AACE,QAAA,IAAI,EAAE,cAAc;AACpB,QAAA,SAAS,EAAE,wBAAwB;AACpC,KAAA;AACD,IAAA;AACE,QAAA,IAAI,EAAE,mCAAmC;AACzC,QAAA,SAAS,EAAE,+BAA+B;AAC3C,KAAA;AACD,IAAA;AACE,QAAA,IAAI,EAAE,MAAM;AACZ,QAAA,SAAS,EAAE,qBAAqB;AACjC,KAAA;;;ACtBH;;AAEG;;;;"}
package/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export { checkoutRoutes } from './lib/pages/checkout.routes';
2
+ export * from './lib/components';
@@ -0,0 +1,8 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class CheckoutActionComponent {
3
+ title: import("@angular/core").InputSignal<string>;
4
+ create: import("@angular/core").OutputEmitterRef<void>;
5
+ onCreate(): void;
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<CheckoutActionComponent, never>;
7
+ static ɵcmp: i0.ɵɵComponentDeclaration<CheckoutActionComponent, "rolatech-checkout-action", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; }, { "create": "create"; }, never, never, true, never>;
8
+ }
@@ -0,0 +1,22 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class CheckoutItemComponent {
3
+ selectable: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
4
+ thumbnail: import("@angular/core").InputSignal<string | undefined>;
5
+ name: import("@angular/core").InputSignal<string | undefined>;
6
+ selected: import("@angular/core").ModelSignal<boolean>;
7
+ description: import("@angular/core").InputSignal<string | undefined>;
8
+ quantity: import("@angular/core").ModelSignal<number>;
9
+ price: import("@angular/core").InputSignal<number>;
10
+ max: import("@angular/core").InputSignal<number | undefined>;
11
+ priceDisplay: import("@angular/core").Signal<string>;
12
+ add: import("@angular/core").OutputEmitterRef<void>;
13
+ remove: import("@angular/core").OutputEmitterRef<void>;
14
+ delete: import("@angular/core").OutputEmitterRef<void>;
15
+ toggleSelect: import("@angular/core").OutputEmitterRef<void>;
16
+ onAdd(): void;
17
+ onRemove(): void;
18
+ onDelete(): void;
19
+ onToggleSelect(): void;
20
+ static ɵfac: i0.ɵɵFactoryDeclaration<CheckoutItemComponent, never>;
21
+ static ɵcmp: i0.ɵɵComponentDeclaration<CheckoutItemComponent, "rolatech-checkout-item", never, { "selectable": { "alias": "selectable"; "required": false; "isSignal": true; }; "thumbnail": { "alias": "thumbnail"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; "quantity": { "alias": "quantity"; "required": false; "isSignal": true; }; "price": { "alias": "price"; "required": true; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; }, { "selected": "selectedChange"; "quantity": "quantityChange"; "add": "add"; "remove": "remove"; "delete": "delete"; "toggleSelect": "toggleSelect"; }, never, never, true, never>;
22
+ }
@@ -0,0 +1,6 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class CheckoutShippingComponent {
3
+ address: import("@angular/core").ModelSignal<any>;
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<CheckoutShippingComponent, never>;
5
+ static ɵcmp: i0.ɵɵComponentDeclaration<CheckoutShippingComponent, "rolatech-checkout-shipping", never, { "address": { "alias": "address"; "required": false; "isSignal": true; }; }, { "address": "addressChange"; }, never, never, true, never>;
6
+ }
@@ -0,0 +1,10 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class CheckoutSummaryComponent {
3
+ deposit: import("@angular/core").InputSignal<number>;
4
+ total: import("@angular/core").InputSignal<number>;
5
+ quantity: import("@angular/core").InputSignal<number>;
6
+ depositDisplay: import("@angular/core").Signal<string>;
7
+ remainingDisplay: import("@angular/core").Signal<string>;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<CheckoutSummaryComponent, never>;
9
+ static ɵcmp: i0.ɵɵComponentDeclaration<CheckoutSummaryComponent, "rolatech-checkout-summary", never, { "deposit": { "alias": "deposit"; "required": false; "isSignal": true; }; "total": { "alias": "total"; "required": true; "isSignal": true; }; "quantity": { "alias": "quantity"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
10
+ }
@@ -0,0 +1,4 @@
1
+ export { CheckoutActionComponent } from './checkout-action/checkout-action.component';
2
+ export { CheckoutShippingComponent } from './checkout-shipping/checkout-shipping.component';
3
+ export { CheckoutSummaryComponent } from './checkout-summary/checkout-summary.component';
4
+ export { CheckoutItemComponent } from './checkout-item/checkout-item.component';
@@ -0,0 +1,22 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { CartService, ProductService, OrderService, TitleService } from '@rolatech/angular-services';
3
+ import { Router } from '@angular/router';
4
+ import * as i0 from "@angular/core";
5
+ export declare class CheckoutCartComponent implements OnInit {
6
+ cartService: CartService;
7
+ productService: ProductService;
8
+ orderService: OrderService;
9
+ titleService: TitleService;
10
+ router: Router;
11
+ carts: any;
12
+ totalPrice: number;
13
+ address: any;
14
+ note: string;
15
+ quantity: number;
16
+ ngOnInit(): void;
17
+ findCarts(): void;
18
+ calcPrice(): any;
19
+ createOrder(): void;
20
+ static ɵfac: i0.ɵɵFactoryDeclaration<CheckoutCartComponent, never>;
21
+ static ɵcmp: i0.ɵɵComponentDeclaration<CheckoutCartComponent, "rolatech-checkout-cart", never, {}, {}, never, never, true, never>;
22
+ }
@@ -0,0 +1,20 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { BaseComponent } from '@rolatech/angular-components';
3
+ import { AuthUserService } from '@rolatech/angular-auth';
4
+ import { CourseService, Course, CourseType } from '@rolatech/angular-course';
5
+ import { OrderService } from '@rolatech/angular-services';
6
+ import * as i0 from "@angular/core";
7
+ export declare class CheckoutCourseComponent extends BaseComponent implements OnInit {
8
+ courseService: CourseService;
9
+ orderService: OrderService;
10
+ authUserService: AuthUserService;
11
+ course: Course;
12
+ type: typeof CourseType;
13
+ purchased: boolean;
14
+ ngOnInit(): void;
15
+ createOrder(): void;
16
+ findCourse(): void;
17
+ findPurchasedByCourseId(): void;
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<CheckoutCourseComponent, never>;
19
+ static ɵcmp: i0.ɵɵComponentDeclaration<CheckoutCourseComponent, "rolatech-checkout-course", never, {}, {}, never, never, true, never>;
20
+ }
@@ -0,0 +1,23 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { BaseComponent } from '@rolatech/angular-components';
3
+ import { AuthUserService } from '@rolatech/angular-auth';
4
+ import { Product, ProductType } from '@rolatech/angular-product';
5
+ import { OrderService } from '@rolatech/angular-services';
6
+ import { CartService, ProductService } from '@rolatech/angular-services';
7
+ import * as i0 from "@angular/core";
8
+ export declare class CheckoutProductComponent extends BaseComponent implements OnInit {
9
+ productService: ProductService;
10
+ cartService: CartService;
11
+ orderService: OrderService;
12
+ authUserService: AuthUserService;
13
+ product: Product;
14
+ type: typeof ProductType;
15
+ quantity: number;
16
+ note: string;
17
+ address: any;
18
+ ngOnInit(): void;
19
+ createOrder(): void;
20
+ getProduct(): void;
21
+ static ɵfac: i0.ɵɵFactoryDeclaration<CheckoutProductComponent, never>;
22
+ static ɵcmp: i0.ɵɵComponentDeclaration<CheckoutProductComponent, "rolatech-checkout-product", never, {}, {}, never, never, true, never>;
23
+ }
@@ -0,0 +1,23 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { BaseComponent } from '@rolatech/angular-components';
3
+ import { Product, ProductVariant } from '@rolatech/angular-product';
4
+ import { OrderService } from '@rolatech/angular-services';
5
+ import { ProductService, CartService } from '@rolatech/angular-services';
6
+ import * as i0 from "@angular/core";
7
+ export declare class CheckoutProductVariantComponent extends BaseComponent implements OnInit {
8
+ productService: ProductService;
9
+ orderService: OrderService;
10
+ cartService: CartService;
11
+ product: Product;
12
+ variant: ProductVariant;
13
+ variantId: string;
14
+ quantity: number;
15
+ address: any;
16
+ note: string;
17
+ constructor();
18
+ ngOnInit(): void;
19
+ getProduct(): void;
20
+ createOrder(): void;
21
+ static ɵfac: i0.ɵɵFactoryDeclaration<CheckoutProductVariantComponent, never>;
22
+ static ɵcmp: i0.ɵɵComponentDeclaration<CheckoutProductVariantComponent, "rolatech-checkout-product-variant", never, {}, {}, never, never, true, never>;
23
+ }
@@ -0,0 +1,2 @@
1
+ import { Routes } from '@angular/router';
2
+ export declare const checkoutRoutes: Routes;
package/package.json ADDED
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "@rolatech/angular-checkout",
3
+ "version": "19.0.0-beta.10",
4
+ "peerDependencies": {
5
+ "@angular/common": "^19.2.0",
6
+ "@angular/core": "^19.2.0",
7
+ "@nx/angular": "^19.0.0 || ^20.0.0"
8
+ },
9
+ "sideEffects": false,
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://github.com/viablecell/rolatech-web.git"
13
+ },
14
+ "license": "MIT",
15
+ "publishConfig": {
16
+ "access": "public"
17
+ },
18
+ "module": "fesm2022/rolatech-angular-checkout.mjs",
19
+ "typings": "index.d.ts",
20
+ "exports": {
21
+ "./package.json": {
22
+ "default": "./package.json"
23
+ },
24
+ ".": {
25
+ "types": "./index.d.ts",
26
+ "default": "./fesm2022/rolatech-angular-checkout.mjs"
27
+ }
28
+ },
29
+ "dependencies": {
30
+ "tslib": "^2.3.0"
31
+ }
32
+ }