@rolatech/angular-cart 18.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/README.md +7 -0
  2. package/esm2022/index.mjs +4 -0
  3. package/esm2022/lib/components/cart-checkout-action/cart-checkout-action.component.mjs +20 -0
  4. package/esm2022/lib/components/cart-checkout-item/cart-checkout-item.component.mjs +40 -0
  5. package/esm2022/lib/components/cart-checkout-summary/cart-checkout-summary.component.mjs +18 -0
  6. package/esm2022/lib/components/cart-icon/cart-icon.component.mjs +52 -0
  7. package/esm2022/lib/components/cart-side/cart-side.component.mjs +99 -0
  8. package/esm2022/lib/components/index.mjs +3 -0
  9. package/esm2022/lib/interfaces/cart.mjs +2 -0
  10. package/esm2022/lib/interfaces/index.mjs +2 -0
  11. package/esm2022/lib/pages/cart-checkout/cart-checkout-course/cart-checkout-course.component.mjs +12 -0
  12. package/esm2022/lib/pages/cart-checkout/cart-checkout-index/cart-checkout-index.component.mjs +12 -0
  13. package/esm2022/lib/pages/cart-checkout/cart-checkout-product/cart-checkout-product.component.mjs +58 -0
  14. package/esm2022/lib/pages/cart-checkout/cart-checkout-variant/cart-checkout-variant.component.mjs +59 -0
  15. package/esm2022/lib/pages/cart-checkout/cart-checkout.routes.mjs +24 -0
  16. package/esm2022/lib/pages/cart-index/cart-index.component.mjs +83 -0
  17. package/esm2022/lib/pages/cart.routes.mjs +12 -0
  18. package/esm2022/rolatech-angular-cart.mjs +5 -0
  19. package/esm2022/state/cart.state.mjs +20 -0
  20. package/esm2022/state/index.mjs +2 -0
  21. package/fesm2022/rolatech-angular-cart-cart-checkout.routes-GF-sHoRZ.mjs +153 -0
  22. package/fesm2022/rolatech-angular-cart-cart-checkout.routes-GF-sHoRZ.mjs.map +1 -0
  23. package/fesm2022/rolatech-angular-cart-rolatech-angular-cart-Es6OXxDd.mjs +297 -0
  24. package/fesm2022/rolatech-angular-cart-rolatech-angular-cart-Es6OXxDd.mjs.map +1 -0
  25. package/fesm2022/rolatech-angular-cart.mjs +15 -0
  26. package/fesm2022/rolatech-angular-cart.mjs.map +1 -0
  27. package/index.d.ts +3 -0
  28. package/lib/components/cart-checkout-action/cart-checkout-action.component.d.ts +7 -0
  29. package/lib/components/cart-checkout-item/cart-checkout-item.component.d.ts +18 -0
  30. package/lib/components/cart-checkout-summary/cart-checkout-summary.component.d.ts +7 -0
  31. package/lib/components/cart-icon/cart-icon.component.d.ts +18 -0
  32. package/lib/components/cart-side/cart-side.component.d.ts +23 -0
  33. package/lib/components/index.d.ts +2 -0
  34. package/lib/interfaces/cart.d.ts +4 -0
  35. package/lib/interfaces/index.d.ts +1 -0
  36. package/lib/pages/cart-checkout/cart-checkout-course/cart-checkout-course.component.d.ts +5 -0
  37. package/lib/pages/cart-checkout/cart-checkout-index/cart-checkout-index.component.d.ts +5 -0
  38. package/lib/pages/cart-checkout/cart-checkout-product/cart-checkout-product.component.d.ts +21 -0
  39. package/lib/pages/cart-checkout/cart-checkout-variant/cart-checkout-variant.component.d.ts +21 -0
  40. package/lib/pages/cart-checkout/cart-checkout.routes.d.ts +3 -0
  41. package/lib/pages/cart-index/cart-index.component.d.ts +23 -0
  42. package/lib/pages/cart.routes.d.ts +2 -0
  43. package/package.json +22 -0
  44. package/state/cart.state.d.ts +8 -0
  45. package/state/index.d.ts +1 -0
  46. package/themes/_default.scss +1 -0
@@ -0,0 +1,297 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, model, computed, output, Component, inject, effect, ViewEncapsulation } from '@angular/core';
3
+ import * as i1$1 from '@angular/common';
4
+ import { CommonModule, NgClass } from '@angular/common';
5
+ import * as i4 from '@angular/material/icon';
6
+ import { MatIcon } from '@angular/material/icon';
7
+ import * as i1 from '@angular/material/button';
8
+ import { MatButtonModule } from '@angular/material/button';
9
+ import { ContainerComponent, ToolbarComponent, SpinnerComponent, AngularComponentsModule } from '@rolatech/angular-components';
10
+ import { CartService, ProductService, OrderService } from '@rolatech/angular-services';
11
+ import { OptionsFormatPipe, AngularCommonModule } from '@rolatech/angular-common';
12
+ import { sumBy, uniq, map } from 'lodash';
13
+ import * as i1$2 from '@angular/router';
14
+ import { Router, RouterLink } from '@angular/router';
15
+ import * as i2 from '@angular/material/badge';
16
+ import { MatBadge } from '@angular/material/badge';
17
+ import { MatDivider } from '@angular/material/divider';
18
+ import { CartState } from 'libs/angular-cart/src/state';
19
+ import * as i5 from '@angular/material/menu';
20
+
21
+ class CartCheckoutItemComponent {
22
+ constructor() {
23
+ this.thumbnail = input();
24
+ this.name = input();
25
+ this.description = input();
26
+ this.quantity = model(1);
27
+ this.price = input.required();
28
+ this.priceDisplay = computed(() => {
29
+ return (this.price() / 100).toFixed(2);
30
+ });
31
+ this.add = output();
32
+ this.remove = output();
33
+ this.delete = output();
34
+ this.max = input();
35
+ }
36
+ onAdd() {
37
+ this.quantity.update((item) => item + 1);
38
+ this.add.emit();
39
+ }
40
+ onRemove() {
41
+ this.quantity.update((item) => item - 1);
42
+ this.remove.emit();
43
+ }
44
+ onDelete() {
45
+ this.delete.emit();
46
+ }
47
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: CartCheckoutItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
48
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.4", type: CartCheckoutItemComponent, isStandalone: true, selector: "rolatech-cart-checkout-item", inputs: { thumbnail: { classPropertyName: "thumbnail", publicName: "thumbnail", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, quantity: { classPropertyName: "quantity", publicName: "quantity", isSignal: true, isRequired: false, transformFunction: null }, price: { classPropertyName: "price", publicName: "price", isSignal: true, isRequired: true, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { quantity: "quantityChange", add: "add", remove: "remove", delete: "delete" }, ngImport: i0, template: "<div class=\"flex justify-between py-3\">\n <div class=\"flex w-full\">\n <div class=\"w-1/4 aspect-video bg-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\">{{ name() }}</span>\n <span class=\"text-sm text-gray-600 mt-2\">{{ description() }}</span>\n </div>\n <div>\u00A5{{ priceDisplay() }}</div>\n </div>\n <!-- action -->\n <div class=\"flex justify-between items-center w-full\">\n <div class=\"flex items-center text-sm\">\n <span class=\"mr-3\">\u6570\u91CF</span>\n <button mat-icon-button (click)=\"onRemove()\" [disabled]=\"quantity() === 1\">\n <mat-icon>remove</mat-icon>\n </button>\n <span class=\"w-11 text-center\">{{ quantity() }}</span>\n <button mat-icon-button (click)=\"onAdd()\" [disabled]=\"quantity() === max()\">\n <mat-icon>add</mat-icon>\n </button>\n </div>\n <button mat-icon-button (click)=\"onDelete()\">\n <mat-icon>delete</mat-icon>\n </button>\n </div>\n </div>\n </div>\n</div>\n", styles: ["mat-icon{scale:.7}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }], deferBlockDependencies: [() => [import('@rolatech/angular-components').then(m => m.ThumbnailComponent)]] }); }
49
+ }
50
+ i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "18.1.4", ngImport: i0, type: CartCheckoutItemComponent, resolveDeferredDeps: () => [import('@rolatech/angular-components').then(m => m.ThumbnailComponent)], resolveMetadata: ThumbnailComponent => ({ decorators: [{
51
+ type: Component,
52
+ args: [{ selector: 'rolatech-cart-checkout-item', standalone: true, imports: [CommonModule, ThumbnailComponent, MatIcon, MatButtonModule], template: "<div class=\"flex justify-between py-3\">\n <div class=\"flex w-full\">\n <div class=\"w-1/4 aspect-video bg-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\">{{ name() }}</span>\n <span class=\"text-sm text-gray-600 mt-2\">{{ description() }}</span>\n </div>\n <div>\u00A5{{ priceDisplay() }}</div>\n </div>\n <!-- action -->\n <div class=\"flex justify-between items-center w-full\">\n <div class=\"flex items-center text-sm\">\n <span class=\"mr-3\">\u6570\u91CF</span>\n <button mat-icon-button (click)=\"onRemove()\" [disabled]=\"quantity() === 1\">\n <mat-icon>remove</mat-icon>\n </button>\n <span class=\"w-11 text-center\">{{ quantity() }}</span>\n <button mat-icon-button (click)=\"onAdd()\" [disabled]=\"quantity() === max()\">\n <mat-icon>add</mat-icon>\n </button>\n </div>\n <button mat-icon-button (click)=\"onDelete()\">\n <mat-icon>delete</mat-icon>\n </button>\n </div>\n </div>\n </div>\n</div>\n", styles: ["mat-icon{scale:.7}\n"] }]
53
+ }], ctorParameters: null, propDecorators: null }) });
54
+
55
+ class CartCheckoutActionComponent {
56
+ constructor() {
57
+ this.create = output();
58
+ }
59
+ onCreate() {
60
+ this.create.emit();
61
+ }
62
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: CartCheckoutActionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
63
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.4", type: CartCheckoutActionComponent, isStandalone: true, selector: "rolatech-cart-checkout-action", outputs: { create: "create" }, ngImport: i0, template: "<a mat-flat-button class=\"w-full min-h-11 my-6\" (click)=\"onCreate()\">\u63D0\u4EA4\u8BA2\u5355</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"] }] }); }
64
+ }
65
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: CartCheckoutActionComponent, decorators: [{
66
+ type: Component,
67
+ args: [{ selector: 'rolatech-cart-checkout-action', standalone: true, imports: [CommonModule, MatButtonModule], template: "<a mat-flat-button class=\"w-full min-h-11 my-6\" (click)=\"onCreate()\">\u63D0\u4EA4\u8BA2\u5355</a>\n" }]
68
+ }] });
69
+
70
+ class CartCheckoutSummaryComponent {
71
+ constructor() {
72
+ this.price = input.required();
73
+ this.priceDisplay = computed(() => {
74
+ return (this.price() / 100).toFixed(2);
75
+ });
76
+ }
77
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: CartCheckoutSummaryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
78
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.1.4", type: CartCheckoutSummaryComponent, isStandalone: true, selector: "rolatech-cart-checkout-summary", inputs: { price: { classPropertyName: "price", publicName: "price", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<div class=\"text-2xl font-medium mb-2\">\u7EDF\u8BA1</div>\n<div class=\"divide-y\">\n <div class=\"flex justify-between py-2 pb-32 md:pb-3\">\n <span> \u8BA2\u5355\u91D1\u989D </span>\n <span> \u00A5{{ 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\">\u603B\u8BA1</span>\n <span>\u00A5{{ priceDisplay() }}</span>\n </div>\n </div>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
79
+ }
80
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: CartCheckoutSummaryComponent, decorators: [{
81
+ type: Component,
82
+ args: [{ selector: 'rolatech-cart-checkout-summary', standalone: true, imports: [CommonModule], template: "<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{{ 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\">\u603B\u8BA1</span>\n <span>\u00A5{{ priceDisplay() }}</span>\n </div>\n </div>\n </div>\n</div>\n" }]
83
+ }] });
84
+
85
+ class CartIndexComponent {
86
+ constructor() {
87
+ this.cartService = inject(CartService);
88
+ this.productService = inject(ProductService);
89
+ this.orderService = inject(OrderService);
90
+ this.router = inject(Router);
91
+ this.carts = [];
92
+ this.totalPrice = 0;
93
+ }
94
+ ngOnInit() {
95
+ this.findCarts();
96
+ }
97
+ findCarts() {
98
+ this.cartService.findDetails({}).subscribe({
99
+ next: (res) => {
100
+ this.carts = res.data;
101
+ this.calcPrice();
102
+ },
103
+ });
104
+ }
105
+ calcPrice() {
106
+ this.totalPrice = sumBy(this.carts, (item) => item.variant ? item.quantity * item.variant.price : item.quantity * item.product.price);
107
+ }
108
+ onAdd(cart) {
109
+ this.cartService.update(cart.id, { quantity: cart.quantity }).subscribe({
110
+ next: (res) => {
111
+ this.calcPrice();
112
+ },
113
+ });
114
+ }
115
+ onRemove(cart) {
116
+ this.cartService.update(cart.id, { quantity: cart.quantity }).subscribe({
117
+ next: (res) => {
118
+ this.calcPrice();
119
+ },
120
+ });
121
+ }
122
+ onDelete(cart) {
123
+ this.cartService.delete(cart.id).subscribe({
124
+ next: (res) => {
125
+ const index = this.carts.findIndex((item) => item.id === cart.id);
126
+ this.carts.splice(index, 1);
127
+ this.calcPrice();
128
+ },
129
+ });
130
+ }
131
+ createOrder() {
132
+ const ids = uniq(map(this.carts, 'id')); // [12, 14, 16, 18]
133
+ this.orderService.create({ type: 'PRODUCT', cartIds: ids }).subscribe({
134
+ next: (res) => {
135
+ this.router.navigateByUrl(`/orders/${res.data.id}`);
136
+ },
137
+ });
138
+ }
139
+ deleteAllCarts() { }
140
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: CartIndexComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
141
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.4", type: CartIndexComponent, isStandalone: true, selector: "rolatech-cart-index", ngImport: i0, template: "<rolatech-container>\n <rolatech-toolbar title=\"\u8D2D\u7269\u8F66\" large></rolatech-toolbar>\n <div class=\"flex flex-col md:flex-row gap-3 mt-3\">\n <div class=\"md:w-2/3 md:pr-16\">\n <div>\n @for (item of carts; track $index) {\n @if (item.variant) {\n <rolatech-cart-checkout-item\n [name]=\"item.variant.title ? item.variant.title : item.product.name\"\n [description]=\"item.variant.options | options\"\n [thumbnail]=\"item.variant.media ? item.variant.media[0].url + '!w400' : item.product.media[0].url + '!w400'\"\n [price]=\"item.variant ? item.variant.price * item.quantity : item.product.price\"\n [(quantity)]=\"item.quantity\"\n [max]=\"3\"\n (add)=\"onAdd(item)\"\n (remove)=\"onRemove(item)\"\n (delete)=\"onDelete(item)\"\n ></rolatech-cart-checkout-item>\n } @else {\n <rolatech-cart-checkout-item\n [name]=\"item.product.name\"\n [description]=\"item.product.description\"\n [thumbnail]=\"item.product.media[0].url + '!w400'\"\n [price]=\"item.product.price * item.quantity\"\n [(quantity)]=\"item.quantity\"\n [max]=\"3\"\n (add)=\"onAdd(item)\"\n (remove)=\"onRemove(item)\"\n (delete)=\"onDelete(item)\"\n ></rolatech-cart-checkout-item>\n }\n }\n </div>\n </div>\n <div class=\"md:w-1/3\">\n <rolatech-cart-checkout-summary [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", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: ContainerComponent, selector: "rolatech-container" }, { kind: "component", type: ToolbarComponent, selector: "rolatech-toolbar", inputs: ["title", "subtitle", "back", "link", "large", "divider"] }, { kind: "component", type: CartCheckoutItemComponent, selector: "rolatech-cart-checkout-item", inputs: ["thumbnail", "name", "description", "quantity", "price", "max"], outputs: ["quantityChange", "add", "remove", "delete"] }, { kind: "component", type: CartCheckoutSummaryComponent, selector: "rolatech-cart-checkout-summary", inputs: ["price"] }, { kind: "component", type: CartCheckoutActionComponent, selector: "rolatech-cart-checkout-action", outputs: ["create"] }, { kind: "pipe", type: OptionsFormatPipe, name: "options" }] }); }
142
+ }
143
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: CartIndexComponent, decorators: [{
144
+ type: Component,
145
+ args: [{ selector: 'rolatech-cart-index', standalone: true, imports: [
146
+ CommonModule,
147
+ ContainerComponent,
148
+ ToolbarComponent,
149
+ CartCheckoutItemComponent,
150
+ CartCheckoutSummaryComponent,
151
+ CartCheckoutActionComponent,
152
+ OptionsFormatPipe,
153
+ ], template: "<rolatech-container>\n <rolatech-toolbar title=\"\u8D2D\u7269\u8F66\" large></rolatech-toolbar>\n <div class=\"flex flex-col md:flex-row gap-3 mt-3\">\n <div class=\"md:w-2/3 md:pr-16\">\n <div>\n @for (item of carts; track $index) {\n @if (item.variant) {\n <rolatech-cart-checkout-item\n [name]=\"item.variant.title ? item.variant.title : item.product.name\"\n [description]=\"item.variant.options | options\"\n [thumbnail]=\"item.variant.media ? item.variant.media[0].url + '!w400' : item.product.media[0].url + '!w400'\"\n [price]=\"item.variant ? item.variant.price * item.quantity : item.product.price\"\n [(quantity)]=\"item.quantity\"\n [max]=\"3\"\n (add)=\"onAdd(item)\"\n (remove)=\"onRemove(item)\"\n (delete)=\"onDelete(item)\"\n ></rolatech-cart-checkout-item>\n } @else {\n <rolatech-cart-checkout-item\n [name]=\"item.product.name\"\n [description]=\"item.product.description\"\n [thumbnail]=\"item.product.media[0].url + '!w400'\"\n [price]=\"item.product.price * item.quantity\"\n [(quantity)]=\"item.quantity\"\n [max]=\"3\"\n (add)=\"onAdd(item)\"\n (remove)=\"onRemove(item)\"\n (delete)=\"onDelete(item)\"\n ></rolatech-cart-checkout-item>\n }\n }\n </div>\n </div>\n <div class=\"md:w-1/3\">\n <rolatech-cart-checkout-summary [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" }]
154
+ }] });
155
+
156
+ const cartRoutes = [
157
+ {
158
+ path: '',
159
+ component: CartIndexComponent,
160
+ },
161
+ {
162
+ path: 'checkout',
163
+ loadChildren: () => import('./rolatech-angular-cart-cart-checkout.routes-GF-sHoRZ.mjs'),
164
+ },
165
+ ];
166
+
167
+ class CartSideComponent {
168
+ constructor() {
169
+ this.router = input('/cart');
170
+ this.cartService = inject(CartService);
171
+ this.info = model(false);
172
+ this.loading = false;
173
+ this.count = 0;
174
+ this.totalPrice = '';
175
+ this.toggle = effect(() => {
176
+ if (this.info()) {
177
+ document.body.style.overflow = 'hidden';
178
+ }
179
+ else {
180
+ document.body.style.overflow = 'auto';
181
+ }
182
+ });
183
+ }
184
+ ngOnDestroy() {
185
+ if (this.countSubscription)
186
+ this.countSubscription.unsubscribe();
187
+ }
188
+ calcPrice() {
189
+ const price = sumBy(this.carts, (item) => item.variant ? item.quantity * item.variant.price : item.quantity * item.product.price);
190
+ this.totalPrice = (price / 100).toFixed(2);
191
+ }
192
+ show() {
193
+ this.info.set(true);
194
+ this.loading = true;
195
+ this.cartService.findDetails({}).subscribe({
196
+ next: (res) => {
197
+ this.carts = res.data;
198
+ this.loading = false;
199
+ this.calcPrice();
200
+ },
201
+ error: (error) => {
202
+ this.loading = false;
203
+ },
204
+ });
205
+ }
206
+ dismiss() {
207
+ this.info.set(false);
208
+ }
209
+ onAdd(cart) {
210
+ this.cartService.update(cart.id, { quantity: cart.quantity }).subscribe({
211
+ next: (res) => {
212
+ this.calcPrice();
213
+ },
214
+ });
215
+ }
216
+ onRemove(cart) {
217
+ this.cartService.update(cart.id, { quantity: cart.quantity }).subscribe({
218
+ next: (res) => {
219
+ this.calcPrice();
220
+ },
221
+ });
222
+ }
223
+ onDelete(cart) {
224
+ this.cartService.delete(cart.id).subscribe({
225
+ next: (res) => {
226
+ const index = this.carts.findIndex((item) => item.id === cart.id);
227
+ this.carts.splice(index, 1);
228
+ this.calcPrice();
229
+ },
230
+ });
231
+ }
232
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: CartSideComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
233
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.4", type: CartSideComponent, isStandalone: true, selector: "rolatech-cart-side", inputs: { router: { classPropertyName: "router", publicName: "router", isSignal: true, isRequired: false, transformFunction: null }, info: { classPropertyName: "info", publicName: "info", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { info: "infoChange" }, ngImport: i0, template: "<div class=\"px-2\">\n <button mat-icon-button class=\"flex\" (click)=\"show()\">\n <mat-icon aria-hidden=\"false\" [matBadge]=\"count\" [matBadgeHidden]=\"count === 0\">shopping_bag</mat-icon>\n </button>\n</div>\n<div\n [ngClass]=\"{ 'translate-none': info(), 'translate-y-full md:translate-x-full md:translate-y-0': !info() }\"\n class=\"fixed top-0 right-0 z-[1001] h-screen p-4 overflow-y-auto transition-transform bg-[--rt-raised-background] w-full md:w-[600px] shadow-xl\"\n>\n <div class=\"flex justify-between items-center sm:p-4\">\n <div class=\"text-2xl font-bold\">\u8D2D\u7269\u8F66</div>\n <button mat-icon-button (click)=\"dismiss()\">\n <mat-icon>close</mat-icon>\n </button>\n </div>\n @if (!loading) {\n <div class=\"mt-3 p-1 sm:p-4\">\n @for (item of carts; track item) {\n @if (item.variant) {\n <rolatech-cart-checkout-item\n [name]=\"item.variant.title ? item.variant.title : item.product.name\"\n [description]=\"item.variant.options | options\"\n [thumbnail]=\"item.variant.media ? item.variant.media[0].url + '!w400' : item.product.media[0].url + '!w400'\"\n [price]=\"item.variant ? item.variant.price * item.quantity : item.product.price\"\n [(quantity)]=\"item.quantity\"\n [max]=\"3\"\n (add)=\"onAdd(item)\"\n (remove)=\"onRemove(item)\"\n (delete)=\"onDelete(item)\"\n ></rolatech-cart-checkout-item>\n } @else {\n <rolatech-cart-checkout-item\n [name]=\"item.product.name\"\n [description]=\"item.product.description\"\n [thumbnail]=\"item.product.media[0].url + '!w400'\"\n [price]=\"item.product.price * item.quantity\"\n [(quantity)]=\"item.quantity\"\n [max]=\"3\"\n (add)=\"onAdd(item)\"\n (remove)=\"onRemove(item)\"\n (delete)=\"onDelete(item)\"\n ></rolatech-cart-checkout-item>\n }\n }\n <mat-divider></mat-divider>\n <div class=\"h-14 flex justify-between items-center\">\n <div class=\"text-lg font-bold\">\u603B\u8BA1</div>\n <div>\u00A5{{ totalPrice }}</div>\n </div>\n <div class=\"flex flex-row gap-3 w-full items-center justify-center mt-3\">\n <button mat-flat-button [routerLink]=\"router()\" (click)=\"dismiss()\" class=\"w-8/12\">\n <a>\u53BB\u8D2D\u7269\u8F66\u7ED3\u7B97</a>\n </button>\n <button mat-stroked-button (click)=\"dismiss()\" class=\"w-4/12\">\n <a>\u7EE7\u7EED\u8D2D\u7269</a>\n </button>\n </div>\n </div>\n }\n @if (loading) {\n <div>\n <rolatech-spinner></rolatech-spinner>\n </div>\n }\n</div>\n<div\n (click)=\"dismiss()\"\n [ngClass]=\"info() ? 'visible' : 'invisible'\"\n class=\"bg-[--rt-10-percent-layer] fixed h-screen inset-0 z-[1000]\"\n></div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: MatBadge, selector: "[matBadge]", inputs: ["matBadgeColor", "matBadgeOverlap", "matBadgeDisabled", "matBadgePosition", "matBadge", "matBadgeDescription", "matBadgeSize", "matBadgeHidden"] }, { kind: "component", type: SpinnerComponent, selector: "rolatech-spinner", inputs: ["title"] }, { kind: "component", type: CartCheckoutItemComponent, selector: "rolatech-cart-checkout-item", inputs: ["thumbnail", "name", "description", "quantity", "price", "max"], outputs: ["quantityChange", "add", "remove", "delete"] }, { kind: "pipe", type: OptionsFormatPipe, name: "options" }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }] }); }
234
+ }
235
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: CartSideComponent, decorators: [{
236
+ type: Component,
237
+ args: [{ selector: 'rolatech-cart-side', standalone: true, imports: [
238
+ CommonModule,
239
+ NgClass,
240
+ MatButtonModule,
241
+ MatIcon,
242
+ MatBadge,
243
+ SpinnerComponent,
244
+ CartCheckoutItemComponent,
245
+ OptionsFormatPipe,
246
+ RouterLink,
247
+ MatDivider,
248
+ ], template: "<div class=\"px-2\">\n <button mat-icon-button class=\"flex\" (click)=\"show()\">\n <mat-icon aria-hidden=\"false\" [matBadge]=\"count\" [matBadgeHidden]=\"count === 0\">shopping_bag</mat-icon>\n </button>\n</div>\n<div\n [ngClass]=\"{ 'translate-none': info(), 'translate-y-full md:translate-x-full md:translate-y-0': !info() }\"\n class=\"fixed top-0 right-0 z-[1001] h-screen p-4 overflow-y-auto transition-transform bg-[--rt-raised-background] w-full md:w-[600px] shadow-xl\"\n>\n <div class=\"flex justify-between items-center sm:p-4\">\n <div class=\"text-2xl font-bold\">\u8D2D\u7269\u8F66</div>\n <button mat-icon-button (click)=\"dismiss()\">\n <mat-icon>close</mat-icon>\n </button>\n </div>\n @if (!loading) {\n <div class=\"mt-3 p-1 sm:p-4\">\n @for (item of carts; track item) {\n @if (item.variant) {\n <rolatech-cart-checkout-item\n [name]=\"item.variant.title ? item.variant.title : item.product.name\"\n [description]=\"item.variant.options | options\"\n [thumbnail]=\"item.variant.media ? item.variant.media[0].url + '!w400' : item.product.media[0].url + '!w400'\"\n [price]=\"item.variant ? item.variant.price * item.quantity : item.product.price\"\n [(quantity)]=\"item.quantity\"\n [max]=\"3\"\n (add)=\"onAdd(item)\"\n (remove)=\"onRemove(item)\"\n (delete)=\"onDelete(item)\"\n ></rolatech-cart-checkout-item>\n } @else {\n <rolatech-cart-checkout-item\n [name]=\"item.product.name\"\n [description]=\"item.product.description\"\n [thumbnail]=\"item.product.media[0].url + '!w400'\"\n [price]=\"item.product.price * item.quantity\"\n [(quantity)]=\"item.quantity\"\n [max]=\"3\"\n (add)=\"onAdd(item)\"\n (remove)=\"onRemove(item)\"\n (delete)=\"onDelete(item)\"\n ></rolatech-cart-checkout-item>\n }\n }\n <mat-divider></mat-divider>\n <div class=\"h-14 flex justify-between items-center\">\n <div class=\"text-lg font-bold\">\u603B\u8BA1</div>\n <div>\u00A5{{ totalPrice }}</div>\n </div>\n <div class=\"flex flex-row gap-3 w-full items-center justify-center mt-3\">\n <button mat-flat-button [routerLink]=\"router()\" (click)=\"dismiss()\" class=\"w-8/12\">\n <a>\u53BB\u8D2D\u7269\u8F66\u7ED3\u7B97</a>\n </button>\n <button mat-stroked-button (click)=\"dismiss()\" class=\"w-4/12\">\n <a>\u7EE7\u7EED\u8D2D\u7269</a>\n </button>\n </div>\n </div>\n }\n @if (loading) {\n <div>\n <rolatech-spinner></rolatech-spinner>\n </div>\n }\n</div>\n<div\n (click)=\"dismiss()\"\n [ngClass]=\"info() ? 'visible' : 'invisible'\"\n class=\"bg-[--rt-10-percent-layer] fixed h-screen inset-0 z-[1000]\"\n></div>\n" }]
249
+ }] });
250
+
251
+ class CartIconComponent {
252
+ constructor() {
253
+ this.router = input('/cart');
254
+ this.carts = [];
255
+ this.cartService = inject(CartService);
256
+ this.cartState = inject(CartState);
257
+ this.count = 0;
258
+ }
259
+ ngOnInit() {
260
+ this.cartState.$count.subscribe((data) => {
261
+ this.count = data;
262
+ });
263
+ this.loadCarts();
264
+ }
265
+ ngOnDestroy() {
266
+ if (this.countSubscription)
267
+ this.countSubscription.unsubscribe();
268
+ }
269
+ loadCarts() {
270
+ const options = {};
271
+ this.cartService.find(options).subscribe({
272
+ next: (res) => {
273
+ this.carts = res.data;
274
+ },
275
+ });
276
+ }
277
+ deleteAll() {
278
+ this.cartService.deleteAll().subscribe({
279
+ next: (res) => {
280
+ this.carts = [];
281
+ },
282
+ });
283
+ }
284
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: CartIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
285
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.4", type: CartIconComponent, isStandalone: true, selector: "rolatech-cart-icon", inputs: { router: { classPropertyName: "router", publicName: "router", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"px-2\">\n <button mat-icon-button class=\"flex\" onclick=\"this.blur()\" [matMenuTriggerFor]=\"notificationsMenu\">\n <mat-icon aria-hidden=\"false\" [matBadge]=\"count\" [matBadgeHidden]=\"count === 0\">shopping_bag</mat-icon>\n </button>\n</div>\n<mat-menu #notificationsMenu=\"matMenu\" class=\"custom-menu\">\n <div class=\"flex flex-col divide-y min-w-[320px]\">\n <div class=\"h-11 px-3 flex justify-between items-center\">\n <span class=\"font-medium\">\u8D2D\u7269\u8F66</span>\n @if (count) {\n <span class=\"text-sm font-medium cursor-pointer hover:underline\" (click)=\"deleteAll()\">\u5220\u9664\u5168\u90E8</span>\n }\n </div>\n <div>\n @if (carts && carts.length > 0) {\n <div class=\"divide-y\">\n @for (item of carts; track item) {\n <div class=\"p-2 cursor-pointer hover:bg-[--rt-raised-background]\" [routerLink]=\"[router(), item.id]\">\n <div>\n {{ item.title }}\n </div>\n <div class=\"text-sm\">\n {{ item.content }}\n </div>\n </div>\n }\n </div>\n } @else {\n <div class=\"h-32 flex justify-center items-center\">\u6682\u65E0</div>\n }\n </div>\n <div class=\"h-11 flex justify-center items-center cursor-pointer hover:bg-[--rt-raised-background]\" [routerLink]=\"router()\">\n <a class=\"flex justify-center items-center\">\n <span class=\"text-sm text-orange-600\"> \u524D\u5F80\u8D2D\u7269\u8F66 </span>\n </a>\n </div>\n </div>\n</mat-menu>\n", styles: ["rolatech-cart-icon{color:var(--rt-text-primary, #000)}.custom-menu{color:var(--rt-text-primary, #000)}\n"], dependencies: [{ kind: "ngmodule", type: AngularCommonModule }, { kind: "directive", type: i1$2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: AngularComponentsModule }, { kind: "directive", type: i2.MatBadge, selector: "[matBadge]", inputs: ["matBadgeColor", "matBadgeOverlap", "matBadgeDisabled", "matBadgePosition", "matBadge", "matBadgeDescription", "matBadgeSize", "matBadgeHidden"] }, { kind: "component", type: i1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i5.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "directive", type: i5.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }], encapsulation: i0.ViewEncapsulation.None }); }
286
+ }
287
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: CartIconComponent, decorators: [{
288
+ type: Component,
289
+ args: [{ selector: 'rolatech-cart-icon', standalone: true, imports: [AngularCommonModule, AngularComponentsModule], encapsulation: ViewEncapsulation.None, template: "<div class=\"px-2\">\n <button mat-icon-button class=\"flex\" onclick=\"this.blur()\" [matMenuTriggerFor]=\"notificationsMenu\">\n <mat-icon aria-hidden=\"false\" [matBadge]=\"count\" [matBadgeHidden]=\"count === 0\">shopping_bag</mat-icon>\n </button>\n</div>\n<mat-menu #notificationsMenu=\"matMenu\" class=\"custom-menu\">\n <div class=\"flex flex-col divide-y min-w-[320px]\">\n <div class=\"h-11 px-3 flex justify-between items-center\">\n <span class=\"font-medium\">\u8D2D\u7269\u8F66</span>\n @if (count) {\n <span class=\"text-sm font-medium cursor-pointer hover:underline\" (click)=\"deleteAll()\">\u5220\u9664\u5168\u90E8</span>\n }\n </div>\n <div>\n @if (carts && carts.length > 0) {\n <div class=\"divide-y\">\n @for (item of carts; track item) {\n <div class=\"p-2 cursor-pointer hover:bg-[--rt-raised-background]\" [routerLink]=\"[router(), item.id]\">\n <div>\n {{ item.title }}\n </div>\n <div class=\"text-sm\">\n {{ item.content }}\n </div>\n </div>\n }\n </div>\n } @else {\n <div class=\"h-32 flex justify-center items-center\">\u6682\u65E0</div>\n }\n </div>\n <div class=\"h-11 flex justify-center items-center cursor-pointer hover:bg-[--rt-raised-background]\" [routerLink]=\"router()\">\n <a class=\"flex justify-center items-center\">\n <span class=\"text-sm text-orange-600\"> \u524D\u5F80\u8D2D\u7269\u8F66 </span>\n </a>\n </div>\n </div>\n</mat-menu>\n", styles: ["rolatech-cart-icon{color:var(--rt-text-primary, #000)}.custom-menu{color:var(--rt-text-primary, #000)}\n"] }]
290
+ }] });
291
+
292
+ /**
293
+ * Generated bundle index. Do not edit.
294
+ */
295
+
296
+ export { CartCheckoutSummaryComponent as C, CartCheckoutItemComponent as a, CartCheckoutActionComponent as b, cartRoutes as c, CartSideComponent as d, CartIconComponent as e };
297
+ //# sourceMappingURL=rolatech-angular-cart-rolatech-angular-cart-Es6OXxDd.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rolatech-angular-cart-rolatech-angular-cart-Es6OXxDd.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/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\">{{ name() }}</span>\n <span class=\"text-sm text-gray-600 mt-2\">{{ description() }}</span>\n </div>\n <div>¥{{ 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 { 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 'libs/angular-cart/src/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,GAA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AAA,CAAA,EAAA,OAAA,EAAA,CAAA,YAAA,EAAA,YAAA,EAAA,YAAA,EAAA,aAAA,CAAA,EAAA,QAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;;2FAK3C,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAR7B,SAAS;+BACE,oBAAoB,EAAA,UAAA,EAClB,IAAI,EAAA,OAAA,EACP,CAAC,mBAAmB,EAAE,uBAAuB,CAAC,EAAA,aAAA,EAGxC,iBAAiB,CAAC,IAAI,EAAA,QAAA,EAAA,ukDAAA,EAAA,MAAA,EAAA,CAAA,0GAAA,CAAA,EAAA,CAAA;;;AEbvC;;AAEG;;;;"}
@@ -0,0 +1,15 @@
1
+ export { e as CartIconComponent, d as CartSideComponent, c as cartRoutes } from './rolatech-angular-cart-rolatech-angular-cart-Es6OXxDd.mjs';
2
+ import '@angular/core';
3
+ import '@angular/common';
4
+ import '@angular/material/icon';
5
+ import '@angular/material/button';
6
+ import '@rolatech/angular-components';
7
+ import '@rolatech/angular-services';
8
+ import '@rolatech/angular-common';
9
+ import 'lodash';
10
+ import '@angular/router';
11
+ import '@angular/material/badge';
12
+ import '@angular/material/divider';
13
+ import 'libs/angular-cart/src/state';
14
+ import '@angular/material/menu';
15
+ //# sourceMappingURL=rolatech-angular-cart.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rolatech-angular-cart.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}
package/index.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ export { cartRoutes } from './lib/pages/cart.routes';
2
+ export * from './lib/interfaces';
3
+ export * from './lib/components';
@@ -0,0 +1,7 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class CartCheckoutActionComponent {
3
+ create: import("@angular/core").OutputEmitterRef<void>;
4
+ onCreate(): void;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<CartCheckoutActionComponent, never>;
6
+ static ɵcmp: i0.ɵɵComponentDeclaration<CartCheckoutActionComponent, "rolatech-cart-checkout-action", never, {}, { "create": "create"; }, never, never, true, never>;
7
+ }
@@ -0,0 +1,18 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class CartCheckoutItemComponent {
3
+ thumbnail: import("@angular/core").InputSignal<string | undefined>;
4
+ name: import("@angular/core").InputSignal<string | undefined>;
5
+ description: import("@angular/core").InputSignal<string | undefined>;
6
+ quantity: import("@angular/core").ModelSignal<number>;
7
+ price: import("@angular/core").InputSignal<number>;
8
+ priceDisplay: import("@angular/core").Signal<string>;
9
+ add: import("@angular/core").OutputEmitterRef<void>;
10
+ remove: import("@angular/core").OutputEmitterRef<void>;
11
+ delete: import("@angular/core").OutputEmitterRef<void>;
12
+ max: import("@angular/core").InputSignal<number | undefined>;
13
+ onAdd(): void;
14
+ onRemove(): void;
15
+ onDelete(): void;
16
+ static ɵfac: i0.ɵɵFactoryDeclaration<CartCheckoutItemComponent, never>;
17
+ static ɵcmp: i0.ɵɵComponentDeclaration<CartCheckoutItemComponent, "rolatech-cart-checkout-item", never, { "thumbnail": { "alias": "thumbnail"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "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; }; }, { "quantity": "quantityChange"; "add": "add"; "remove": "remove"; "delete": "delete"; }, never, never, true, never>;
18
+ }
@@ -0,0 +1,7 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class CartCheckoutSummaryComponent {
3
+ price: import("@angular/core").InputSignal<number>;
4
+ priceDisplay: import("@angular/core").Signal<string>;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<CartCheckoutSummaryComponent, never>;
6
+ static ɵcmp: i0.ɵɵComponentDeclaration<CartCheckoutSummaryComponent, "rolatech-cart-checkout-summary", never, { "price": { "alias": "price"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
7
+ }
@@ -0,0 +1,18 @@
1
+ import { OnDestroy, OnInit } from '@angular/core';
2
+ import { CartService } from '@rolatech/angular-services';
3
+ import { CartState } from 'libs/angular-cart/src/state';
4
+ import * as i0 from "@angular/core";
5
+ export declare class CartIconComponent implements OnInit, OnDestroy {
6
+ router: import("@angular/core").InputSignal<string>;
7
+ carts: any;
8
+ cartService: CartService;
9
+ cartState: CartState;
10
+ count: number;
11
+ private countSubscription;
12
+ ngOnInit(): void;
13
+ ngOnDestroy(): void;
14
+ loadCarts(): void;
15
+ deleteAll(): void;
16
+ static ɵfac: i0.ɵɵFactoryDeclaration<CartIconComponent, never>;
17
+ static ɵcmp: i0.ɵɵComponentDeclaration<CartIconComponent, "rolatech-cart-icon", never, { "router": { "alias": "router"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
18
+ }
@@ -0,0 +1,23 @@
1
+ import { OnDestroy } from '@angular/core';
2
+ import { CartService } from '@rolatech/angular-services';
3
+ import * as i0 from "@angular/core";
4
+ export declare class CartSideComponent implements OnDestroy {
5
+ router: import("@angular/core").InputSignal<string>;
6
+ cartService: CartService;
7
+ carts: any;
8
+ info: import("@angular/core").ModelSignal<boolean>;
9
+ loading: boolean;
10
+ count: number;
11
+ totalPrice: string;
12
+ private countSubscription;
13
+ toggle: import("@angular/core").EffectRef;
14
+ ngOnDestroy(): void;
15
+ calcPrice(): any;
16
+ show(): void;
17
+ dismiss(): void;
18
+ onAdd(cart: any): void;
19
+ onRemove(cart: any): void;
20
+ onDelete(cart: any): void;
21
+ static ɵfac: i0.ɵɵFactoryDeclaration<CartSideComponent, never>;
22
+ static ɵcmp: i0.ɵɵComponentDeclaration<CartSideComponent, "rolatech-cart-side", never, { "router": { "alias": "router"; "required": false; "isSignal": true; }; "info": { "alias": "info"; "required": false; "isSignal": true; }; }, { "info": "infoChange"; }, never, never, true, never>;
23
+ }
@@ -0,0 +1,2 @@
1
+ export * from './cart-side/cart-side.component';
2
+ export * from './cart-icon/cart-icon.component';
@@ -0,0 +1,4 @@
1
+ export interface Cart {
2
+ id: string;
3
+ productId: string;
4
+ }
@@ -0,0 +1 @@
1
+ export * from './cart';
@@ -0,0 +1,5 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class CartCheckoutCourseComponent {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<CartCheckoutCourseComponent, never>;
4
+ static ɵcmp: i0.ɵɵComponentDeclaration<CartCheckoutCourseComponent, "rolatech-cart-checkout-course", never, {}, {}, never, never, true, never>;
5
+ }
@@ -0,0 +1,5 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class CartCheckoutIndexComponent {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<CartCheckoutIndexComponent, never>;
4
+ static ɵcmp: i0.ɵɵComponentDeclaration<CartCheckoutIndexComponent, "rolatech-cart-checkout-index", never, {}, {}, never, never, true, never>;
5
+ }
@@ -0,0 +1,21 @@
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 CartCheckoutProductComponent 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
+ ngOnInit(): void;
17
+ createOrder(): void;
18
+ getProduct(): void;
19
+ static ɵfac: i0.ɵɵFactoryDeclaration<CartCheckoutProductComponent, never>;
20
+ static ɵcmp: i0.ɵɵComponentDeclaration<CartCheckoutProductComponent, "rolatech-cart-checkout-product", never, {}, {}, never, never, true, never>;
21
+ }
@@ -0,0 +1,21 @@
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 CartCheckoutVariantComponent 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
+ constructor();
16
+ ngOnInit(): void;
17
+ getProduct(): void;
18
+ createOrder(): void;
19
+ static ɵfac: i0.ɵɵFactoryDeclaration<CartCheckoutVariantComponent, never>;
20
+ static ɵcmp: i0.ɵɵComponentDeclaration<CartCheckoutVariantComponent, "rolatech-cart-checkout-variant", never, {}, {}, never, never, true, never>;
21
+ }