@rolatech/angular-cart 20.2.8-beta.6 → 20.2.8-beta.7
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.
|
@@ -85,10 +85,10 @@ class CartIndexComponent {
|
|
|
85
85
|
},
|
|
86
86
|
});
|
|
87
87
|
}
|
|
88
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0
|
|
89
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0
|
|
88
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: CartIndexComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
89
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.0", 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-checkout-item\n selectable\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 [(selected)]=\"item.selected\"\n (toggleSelect)=\"onChange(item)\"\n ></rolatech-checkout-item>\n } @else {\n <rolatech-checkout-item\n selectable\n [(selected)]=\"item.selected\"\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 (toggleSelect)=\"onChange(item)\"\n ></rolatech-checkout-item>\n }\n }\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)=\"checkout()\" title=\"\u7ACB\u5373\u7ED3\u7B97\"></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: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: MatInputModule }, { kind: "ngmodule", type: TextFieldModule }, { kind: "pipe", type: OptionsFormatPipe, name: "options" }] }); }
|
|
90
90
|
}
|
|
91
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0
|
|
91
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: CartIndexComponent, decorators: [{
|
|
92
92
|
type: Component,
|
|
93
93
|
args: [{ selector: 'rolatech-cart-index', imports: [
|
|
94
94
|
CommonModule,
|
|
@@ -182,10 +182,10 @@ class CartSideComponent {
|
|
|
182
182
|
},
|
|
183
183
|
});
|
|
184
184
|
}
|
|
185
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0
|
|
186
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0
|
|
185
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: CartSideComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
186
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.0", 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-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-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 (add)=\"onAdd(item)\"\n (remove)=\"onRemove(item)\"\n (delete)=\"onDelete(item)\"\n ></rolatech-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.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { 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: CheckoutItemComponent, selector: "rolatech-checkout-item", inputs: ["selectable", "thumbnail", "name", "selected", "description", "quantity", "price", "max"], outputs: ["selectedChange", "quantityChange", "add", "remove", "delete", "toggleSelect"] }, { 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"] }, { kind: "pipe", type: OptionsFormatPipe, name: "options" }] }); }
|
|
187
187
|
}
|
|
188
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0
|
|
188
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: CartSideComponent, decorators: [{
|
|
189
189
|
type: Component,
|
|
190
190
|
args: [{ selector: 'rolatech-cart-side', imports: [
|
|
191
191
|
CommonModule,
|
|
@@ -207,10 +207,10 @@ class CartState {
|
|
|
207
207
|
getCount() {
|
|
208
208
|
return this.$count.asObservable();
|
|
209
209
|
}
|
|
210
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0
|
|
211
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0
|
|
210
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: CartState, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
211
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: CartState, providedIn: 'root' }); }
|
|
212
212
|
}
|
|
213
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0
|
|
213
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: CartState, decorators: [{
|
|
214
214
|
type: Injectable,
|
|
215
215
|
args: [{
|
|
216
216
|
providedIn: 'root',
|
|
@@ -250,10 +250,10 @@ class CartIconComponent {
|
|
|
250
250
|
},
|
|
251
251
|
});
|
|
252
252
|
}
|
|
253
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0
|
|
254
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0
|
|
253
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: CartIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
254
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.0", 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 min-w-[320px] divide-y divide-[--rt-10-percent-layer]\">\n <div class=\"h-11 px-3 flex justify-between items-center\">\n <span class=\"font-medium\" i18n>Cart</span>\n @if (count) {\n <span class=\"text-sm font-medium cursor-pointer hover:underline\" (click)=\"deleteAll()\" i18n>Delete All</span>\n }\n </div>\n <div>\n @if (carts && carts.length > 0) {\n <div class=\"divide-y divide-[--rt-10-percent-layer]\">\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\" i18n>Empty</div>\n }\n </div>\n <div class=\"h-11 flex justify-center items-center cursor-pointer hover:bg-[--rt-raised-background]\" [routerLink]=\"router()\">\n <a class=\"flex justify-center items-center\">\n <span class=\"text-sm text-[--rt-brand-color]\" i18n> Cart </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$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: AngularComponentsModule }, { kind: "directive", type: i2$1.MatBadge, selector: "[matBadge]", inputs: ["matBadgeColor", "matBadgeOverlap", "matBadgeDisabled", "matBadgePosition", "matBadge", "matBadgeDescription", "matBadgeSize", "matBadgeHidden"] }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { 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 }); }
|
|
255
255
|
}
|
|
256
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0
|
|
256
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: CartIconComponent, decorators: [{
|
|
257
257
|
type: Component,
|
|
258
258
|
args: [{ selector: 'rolatech-cart-icon', imports: [AngularCommonModule, AngularComponentsModule], encapsulation: ViewEncapsulation.None, template: "<div class=\"px-2\">\n <button mat-icon-button class=\"flex\" onclick=\"this.blur()\" [matMenuTriggerFor]=\"notificationsMenu\">\n <mat-icon aria-hidden=\"false\" [matBadge]=\"count\" [matBadgeHidden]=\"count === 0\">shopping_bag</mat-icon>\n </button>\n</div>\n<mat-menu #notificationsMenu=\"matMenu\" class=\"custom-menu\">\n <div class=\"flex flex-col min-w-[320px] divide-y divide-[--rt-10-percent-layer]\">\n <div class=\"h-11 px-3 flex justify-between items-center\">\n <span class=\"font-medium\" i18n>Cart</span>\n @if (count) {\n <span class=\"text-sm font-medium cursor-pointer hover:underline\" (click)=\"deleteAll()\" i18n>Delete All</span>\n }\n </div>\n <div>\n @if (carts && carts.length > 0) {\n <div class=\"divide-y divide-[--rt-10-percent-layer]\">\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\" i18n>Empty</div>\n }\n </div>\n <div class=\"h-11 flex justify-center items-center cursor-pointer hover:bg-[--rt-raised-background]\" [routerLink]=\"router()\">\n <a class=\"flex justify-center items-center\">\n <span class=\"text-sm text-[--rt-brand-color]\" i18n> Cart </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"] }]
|
|
259
259
|
}], propDecorators: { router: [{ type: i0.Input, args: [{ isSignal: true, alias: "router", required: false }] }] } });
|