@rolatech/angular-product 17.1.10 → 19.0.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/fesm2022/{rolatech-angular-product-product-index.component-sLpwxg6g.mjs → rolatech-angular-product-product-index.component-Dy6tCxJf.mjs} +6 -7
  2. package/fesm2022/rolatech-angular-product-product-index.component-Dy6tCxJf.mjs.map +1 -0
  3. package/fesm2022/rolatech-angular-product.mjs +271 -224
  4. package/fesm2022/rolatech-angular-product.mjs.map +1 -1
  5. package/lib/pages/product/product-category/product-category.component.d.ts +1 -2
  6. package/lib/pages/product/product-layout/product-layout.component.d.ts +1 -2
  7. package/lib/pages/product-manage/product-manage-info/product-manage-info.component.d.ts +1 -2
  8. package/lib/pages/product-manage/product-manage-inventory/product-manage-inventory.component.d.ts +26 -2
  9. package/lib/services/index.d.ts +0 -2
  10. package/package.json +8 -6
  11. package/themes/_default.scss +1 -1
  12. package/esm2022/index.mjs +0 -7
  13. package/esm2022/lib/components/index.mjs +0 -12
  14. package/esm2022/lib/components/product-action/product-action.component.mjs +0 -32
  15. package/esm2022/lib/components/product-info/product-info.component.mjs +0 -19
  16. package/esm2022/lib/components/product-item/product-item.component.mjs +0 -17
  17. package/esm2022/lib/components/product-manage-option-add/product-manage-option-add.component.mjs +0 -68
  18. package/esm2022/lib/components/product-manage-option-item/product-manage-option-item.component.mjs +0 -49
  19. package/esm2022/lib/components/product-manage-variant/product-manage-variant.component.mjs +0 -127
  20. package/esm2022/lib/components/product-mange-option-action/product-manage-option-action.component.mjs +0 -22
  21. package/esm2022/lib/components/product-mange-section-item/product-mange-section-item.component.mjs +0 -89
  22. package/esm2022/lib/components/product-media/product-media.component.mjs +0 -34
  23. package/esm2022/lib/components/product-option/product-option.component.mjs +0 -23
  24. package/esm2022/lib/components/product-owner-renderer/product-owner-renderer.component.mjs +0 -20
  25. package/esm2022/lib/components/product-pricing/product-pricing.component.mjs +0 -31
  26. package/esm2022/lib/components/product-section/product-section.component.mjs +0 -26
  27. package/esm2022/lib/interfaces/category.mjs +0 -2
  28. package/esm2022/lib/interfaces/index.mjs +0 -2
  29. package/esm2022/lib/interfaces/product.mjs +0 -36
  30. package/esm2022/lib/pages/product/product-category/product-category.component.mjs +0 -74
  31. package/esm2022/lib/pages/product/product-details/product-details.component.mjs +0 -185
  32. package/esm2022/lib/pages/product/product-details/selected.pipe.mjs +0 -18
  33. package/esm2022/lib/pages/product/product-index/product-index.component.mjs +0 -43
  34. package/esm2022/lib/pages/product/product-layout/product-layout.component.mjs +0 -50
  35. package/esm2022/lib/pages/product/product.routes.mjs +0 -24
  36. package/esm2022/lib/pages/product-manage/product-manage-content/product-manage-content.component.mjs +0 -12
  37. package/esm2022/lib/pages/product-manage/product-manage-create/product-manage-create.component.mjs +0 -61
  38. package/esm2022/lib/pages/product-manage/product-manage-index/product-manage-index.component.mjs +0 -155
  39. package/esm2022/lib/pages/product-manage/product-manage-info/product-manage-info.component.mjs +0 -112
  40. package/esm2022/lib/pages/product-manage/product-manage-inventory/product-manage-inventory.component.mjs +0 -14
  41. package/esm2022/lib/pages/product-manage/product-manage-item/product-manage-item.component.mjs +0 -28
  42. package/esm2022/lib/pages/product-manage/product-manage-item-header/product-manage-item-header.component.mjs +0 -12
  43. package/esm2022/lib/pages/product-manage/product-manage-layout/product-manage-layout.component.mjs +0 -55
  44. package/esm2022/lib/pages/product-manage/product-manage-media/product-manage-media.component.mjs +0 -137
  45. package/esm2022/lib/pages/product-manage/product-manage-options/product-manage-options.component.mjs +0 -102
  46. package/esm2022/lib/pages/product-manage/product-manage-pricing/product-manage-pricing.component.mjs +0 -12
  47. package/esm2022/lib/pages/product-manage/product-manage-schedule/product-manage-schedule.component.mjs +0 -14
  48. package/esm2022/lib/pages/product-manage/product-manage-sections/product-manage-sections.component.mjs +0 -171
  49. package/esm2022/lib/pages/product-manage/product-manage-variants/product-manage-variants.component.mjs +0 -133
  50. package/esm2022/lib/pages/product-manage/product-manage.routes.mjs +0 -60
  51. package/esm2022/lib/services/index.mjs +0 -4
  52. package/esm2022/lib/services/product-category.service.mjs +0 -38
  53. package/esm2022/provider.mjs +0 -13
  54. package/esm2022/rolatech-angular-product.mjs +0 -5
  55. package/fesm2022/rolatech-angular-product-product-index.component-sLpwxg6g.mjs.map +0 -1
  56. package/lib/components/product-mange-option-action/product-manage-option-action.component.d.ts +0 -10
  57. package/lib/services/product-category.service.d.ts +0 -12
@@ -3,7 +3,6 @@ import { inject, signal, Component, ViewEncapsulation } from '@angular/core';
3
3
  import { ProductService } from '@rolatech/angular-services';
4
4
  import { AngularComponentsModule, RichViewComponent, RichItemComponent } from '@rolatech/angular-components';
5
5
  import { AngularCommonModule } from '@rolatech/angular-common';
6
- import { ProductItemComponent } from './rolatech-angular-product.mjs';
7
6
  import * as i1 from '@angular/router';
8
7
 
9
8
  class ProductIndexComponent {
@@ -22,7 +21,7 @@ class ProductIndexComponent {
22
21
  sort: 'updatedAt desc',
23
22
  // filter: 'published:true',
24
23
  };
25
- this.productService.find(options).subscribe({
24
+ this.productService.find(options, false).subscribe({
26
25
  next: (res) => {
27
26
  // this.products = res.data;
28
27
  this.products.set(res.data);
@@ -34,13 +33,13 @@ class ProductIndexComponent {
34
33
  },
35
34
  });
36
35
  }
37
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: ProductIndexComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
38
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.7", type: ProductIndexComponent, isStandalone: true, selector: "rolatech-product-index", ngImport: i0, template: "<div class=\"min-w-[320px] max-w-[1120px] m-auto\">\n <div class=\"p-3 hidden md:block text-2xl font-medium\">\u5168\u90E8\u5546\u54C1</div>\n @if (loading) {\n @for (number of [0, 1, 2, 3, 4, 5]; track number) {\n <div class=\"flex flex-row animate-pulse mt-3 mr-4 cursor-pointer w-full\">\n <div class=\"h-fit w-2/5 md:w-1/4 aspect-video hover:bg-[--rt-base-background] rounded-lg\"></div>\n <div class=\"w-3/5 md:w-3/4 ml-3 py-1 flex flex-col justify-between\">\n <div class=\"space-y-3\">\n <div class=\"h-4 bg-[--rt-base-background] rounded col-span-2\"></div>\n <div class=\"h-2 bg-[--rt-base-background] rounded col-span-1\"></div>\n <div class=\"h-2 bg-[--rt-base-background] rounded col-span-1 py-1\"></div>\n </div>\n <div>\n <div class=\"h-2 bg-[--rt-base-background] rounded col-span-2 py-1\"></div>\n </div>\n </div>\n </div>\n }\n } @else {\n <rolatech-rich-view wrap>\n @for (item of products(); track item) {\n @defer {\n <rolatech-rich-item\n [routerLink]=\"['./', item.id]\"\n [thumbnail]=\"item.media[0].url + '!w400'\"\n [title]=\"item.name\"\n [subtitle]=\"item.description\"\n [price]=\"item.price / 100\"\n thumbnailRatio=\"square\"\n ></rolatech-rich-item>\n }\n }\n </rolatech-rich-view>\n }\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: AngularCommonModule }, { kind: "ngmodule", type: AngularComponentsModule }, { kind: "component", type: RichViewComponent, selector: "rolatech-rich-view", inputs: ["list", "wrap"] }], encapsulation: i0.ViewEncapsulation.None, deferBlockDependencies: [() => [i1.RouterLink, RichItemComponent]] }); }
36
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: ProductIndexComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
37
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: ProductIndexComponent, isStandalone: true, selector: "rolatech-product-index", ngImport: i0, template: "<div class=\"min-w-[320px] max-w-[1120px] m-auto\">\n <div class=\"p-3 hidden md:block text-2xl font-medium\">\u5168\u90E8\u5546\u54C1</div>\n @if (loading) {\n @for (number of [0, 1, 2, 3, 4, 5]; track number) {\n <div class=\"flex flex-row animate-pulse mt-3 mr-4 cursor-pointer w-full\">\n <div class=\"h-fit w-2/5 md:w-1/4 aspect-video hover:bg-[--rt-base-background] rounded-lg\"></div>\n <div class=\"w-3/5 md:w-3/4 ml-3 py-1 flex flex-col justify-between\">\n <div class=\"space-y-3\">\n <div class=\"h-4 bg-[--rt-base-background] rounded col-span-2\"></div>\n <div class=\"h-2 bg-[--rt-base-background] rounded col-span-1\"></div>\n <div class=\"h-2 bg-[--rt-base-background] rounded col-span-1 py-1\"></div>\n </div>\n <div>\n <div class=\"h-2 bg-[--rt-base-background] rounded col-span-2 py-1\"></div>\n </div>\n </div>\n </div>\n }\n } @else {\n <rolatech-rich-view wrap>\n @for (item of products(); track item) {\n @defer {\n <rolatech-rich-item\n [routerLink]=\"['./', item.id]\"\n [thumbnail]=\"item.media[0].url + '!w400'\"\n [title]=\"item.name\"\n [subtitle]=\"item.description\"\n [price]=\"item.price / 100\"\n thumbnailRatio=\"square\"\n ></rolatech-rich-item>\n }\n }\n </rolatech-rich-view>\n }\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: AngularCommonModule }, { kind: "ngmodule", type: AngularComponentsModule }, { kind: "component", type: RichViewComponent, selector: "rolatech-rich-view", inputs: ["list", "wrap"] }], encapsulation: i0.ViewEncapsulation.None, deferBlockDependencies: [() => [i1.RouterLink, RichItemComponent]] }); }
39
38
  }
40
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: ProductIndexComponent, decorators: [{
39
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: ProductIndexComponent, decorators: [{
41
40
  type: Component,
42
- args: [{ selector: 'rolatech-product-index', standalone: true, imports: [AngularCommonModule, AngularComponentsModule, RichViewComponent, RichItemComponent, ProductItemComponent], encapsulation: ViewEncapsulation.None, template: "<div class=\"min-w-[320px] max-w-[1120px] m-auto\">\n <div class=\"p-3 hidden md:block text-2xl font-medium\">\u5168\u90E8\u5546\u54C1</div>\n @if (loading) {\n @for (number of [0, 1, 2, 3, 4, 5]; track number) {\n <div class=\"flex flex-row animate-pulse mt-3 mr-4 cursor-pointer w-full\">\n <div class=\"h-fit w-2/5 md:w-1/4 aspect-video hover:bg-[--rt-base-background] rounded-lg\"></div>\n <div class=\"w-3/5 md:w-3/4 ml-3 py-1 flex flex-col justify-between\">\n <div class=\"space-y-3\">\n <div class=\"h-4 bg-[--rt-base-background] rounded col-span-2\"></div>\n <div class=\"h-2 bg-[--rt-base-background] rounded col-span-1\"></div>\n <div class=\"h-2 bg-[--rt-base-background] rounded col-span-1 py-1\"></div>\n </div>\n <div>\n <div class=\"h-2 bg-[--rt-base-background] rounded col-span-2 py-1\"></div>\n </div>\n </div>\n </div>\n }\n } @else {\n <rolatech-rich-view wrap>\n @for (item of products(); track item) {\n @defer {\n <rolatech-rich-item\n [routerLink]=\"['./', item.id]\"\n [thumbnail]=\"item.media[0].url + '!w400'\"\n [title]=\"item.name\"\n [subtitle]=\"item.description\"\n [price]=\"item.price / 100\"\n thumbnailRatio=\"square\"\n ></rolatech-rich-item>\n }\n }\n </rolatech-rich-view>\n }\n</div>\n" }]
41
+ args: [{ selector: 'rolatech-product-index', imports: [AngularCommonModule, AngularComponentsModule, RichViewComponent, RichItemComponent], encapsulation: ViewEncapsulation.None, template: "<div class=\"min-w-[320px] max-w-[1120px] m-auto\">\n <div class=\"p-3 hidden md:block text-2xl font-medium\">\u5168\u90E8\u5546\u54C1</div>\n @if (loading) {\n @for (number of [0, 1, 2, 3, 4, 5]; track number) {\n <div class=\"flex flex-row animate-pulse mt-3 mr-4 cursor-pointer w-full\">\n <div class=\"h-fit w-2/5 md:w-1/4 aspect-video hover:bg-[--rt-base-background] rounded-lg\"></div>\n <div class=\"w-3/5 md:w-3/4 ml-3 py-1 flex flex-col justify-between\">\n <div class=\"space-y-3\">\n <div class=\"h-4 bg-[--rt-base-background] rounded col-span-2\"></div>\n <div class=\"h-2 bg-[--rt-base-background] rounded col-span-1\"></div>\n <div class=\"h-2 bg-[--rt-base-background] rounded col-span-1 py-1\"></div>\n </div>\n <div>\n <div class=\"h-2 bg-[--rt-base-background] rounded col-span-2 py-1\"></div>\n </div>\n </div>\n </div>\n }\n } @else {\n <rolatech-rich-view wrap>\n @for (item of products(); track item) {\n @defer {\n <rolatech-rich-item\n [routerLink]=\"['./', item.id]\"\n [thumbnail]=\"item.media[0].url + '!w400'\"\n [title]=\"item.name\"\n [subtitle]=\"item.description\"\n [price]=\"item.price / 100\"\n thumbnailRatio=\"square\"\n ></rolatech-rich-item>\n }\n }\n </rolatech-rich-view>\n }\n</div>\n" }]
43
42
  }], ctorParameters: () => [] });
44
43
 
45
44
  export { ProductIndexComponent };
46
- //# sourceMappingURL=rolatech-angular-product-product-index.component-sLpwxg6g.mjs.map
45
+ //# sourceMappingURL=rolatech-angular-product-product-index.component-Dy6tCxJf.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rolatech-angular-product-product-index.component-Dy6tCxJf.mjs","sources":["../../../../packages/angular-product/src/lib/pages/product/product-index/product-index.component.ts","../../../../packages/angular-product/src/lib/pages/product/product-index/product-index.component.html"],"sourcesContent":["import { Component, inject, OnInit, signal, ViewEncapsulation } from '@angular/core';\nimport { ProductService } from '@rolatech/angular-services';\nimport { Product } from '../../../interfaces/product';\nimport { RichViewComponent, RichItemComponent, AngularComponentsModule } from '@rolatech/angular-components';\nimport { AngularCommonModule } from '@rolatech/angular-common';\n@Component({\n selector: 'rolatech-product-index',\n imports: [AngularCommonModule, AngularComponentsModule, RichViewComponent, RichItemComponent],\n templateUrl: './product-index.component.html',\n styleUrl: './product-index.component.scss',\n encapsulation: ViewEncapsulation.None,\n})\nexport class ProductIndexComponent implements OnInit {\n productService = inject(ProductService);\n // products: Product[] = [];\n products = signal<Product[]>([]);\n\n meta: any;\n loading = false;\n constructor() {}\n\n ngOnInit(): void {\n this.findProducts();\n }\n findProducts() {\n this.loading = true;\n const options = {\n sort: 'updatedAt desc',\n // filter: 'published:true',\n };\n this.productService.find(options, false).subscribe({\n next: (res: any) => {\n // this.products = res.data;\n this.products.set(res.data);\n this.meta = res.meta;\n this.loading = false;\n },\n error: (error) => {\n this.loading = false;\n },\n });\n }\n}\n","<div class=\"min-w-[320px] max-w-[1120px] m-auto\">\n <div class=\"p-3 hidden md:block text-2xl font-medium\">全部商品</div>\n @if (loading) {\n @for (number of [0, 1, 2, 3, 4, 5]; track number) {\n <div class=\"flex flex-row animate-pulse mt-3 mr-4 cursor-pointer w-full\">\n <div class=\"h-fit w-2/5 md:w-1/4 aspect-video hover:bg-[--rt-base-background] rounded-lg\"></div>\n <div class=\"w-3/5 md:w-3/4 ml-3 py-1 flex flex-col justify-between\">\n <div class=\"space-y-3\">\n <div class=\"h-4 bg-[--rt-base-background] rounded col-span-2\"></div>\n <div class=\"h-2 bg-[--rt-base-background] rounded col-span-1\"></div>\n <div class=\"h-2 bg-[--rt-base-background] rounded col-span-1 py-1\"></div>\n </div>\n <div>\n <div class=\"h-2 bg-[--rt-base-background] rounded col-span-2 py-1\"></div>\n </div>\n </div>\n </div>\n }\n } @else {\n <rolatech-rich-view wrap>\n @for (item of products(); track item) {\n @defer {\n <rolatech-rich-item\n [routerLink]=\"['./', item.id]\"\n [thumbnail]=\"item.media[0].url + '!w400'\"\n [title]=\"item.name\"\n [subtitle]=\"item.description\"\n [price]=\"item.price / 100\"\n thumbnailRatio=\"square\"\n ></rolatech-rich-item>\n }\n }\n </rolatech-rich-view>\n }\n</div>\n"],"names":[],"mappings":";;;;;;;MAYa,qBAAqB,CAAA;AAOhC,IAAA,WAAA,GAAA;AANA,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;;AAEvC,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAY,EAAE,CAAC;QAGhC,IAAO,CAAA,OAAA,GAAG,KAAK;;IAGf,QAAQ,GAAA;QACN,IAAI,CAAC,YAAY,EAAE;;IAErB,YAAY,GAAA;AACV,QAAA,IAAI,CAAC,OAAO,GA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