@rolatech/angular-course 20.2.6-beta.1 → 20.2.7-beta.1

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.
@@ -45,11 +45,11 @@ class CourseCategoryIndexComponent extends BaseComponent {
45
45
  },
46
46
  });
47
47
  }
48
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: CourseCategoryIndexComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
49
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.0", type: CourseCategoryIndexComponent, isStandalone: true, selector: "rolatech-course-category-index", usesInheritance: true, ngImport: i0, template: "<div>\n <div class=\"hidden md:block\">\n <rolatech-category-breadcrumb [categories]=\"c\"></rolatech-category-breadcrumb>\n <div class=\"text-2xl font-medium mt-2\">\u5168\u90E8\u8BFE\u7A0B</div>\n </div>\n\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 list>\n @for (item of courses; track $index) {\n @defer {\n <rolatech-rich-item\n [routerLink]=\"['/courses/', item.id]\"\n [thumbnail]=\"item.media[0].url + '!w400'\"\n [title]=\"item.name\"\n [subtitle]=\"item.description\"\n [price]=\"item.pricing[0].total | fixed\"\n ></rolatech-rich-item>\n }\n }\n </rolatech-rich-view>\n }\n</div>\n", styles: ["rolatech-rich-item{--rt-rich-view-item-margin: 0px}\n"], dependencies: [{ kind: "ngmodule", type: AngularCommonModule }, { kind: "ngmodule", type: AngularComponentsModule }, { kind: "component", type: RichViewComponent, selector: "rolatech-rich-view", inputs: ["list", "wrap"] }, { kind: "component", type: CategoryBreadcrumbComponent, selector: "rolatech-category-breadcrumb", inputs: ["categories"], outputs: ["categoriesChange"] }], deferBlockDependencies: [() => [i1.RouterLink, RichItemComponent,
48
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: CourseCategoryIndexComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
49
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: CourseCategoryIndexComponent, isStandalone: true, selector: "rolatech-course-category-index", usesInheritance: true, ngImport: i0, template: "<div>\n <div class=\"hidden md:block\">\n <rolatech-category-breadcrumb [categories]=\"c\"></rolatech-category-breadcrumb>\n <div class=\"text-2xl font-medium mt-2\">\u5168\u90E8\u8BFE\u7A0B</div>\n </div>\n\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 list>\n @for (item of courses; track $index) {\n @defer {\n <rolatech-rich-item\n [routerLink]=\"['/courses/', item.id]\"\n [thumbnail]=\"item.media[0].url + '!w400'\"\n [title]=\"item.name\"\n [subtitle]=\"item.description\"\n [price]=\"item.pricing[0].total | fixed\"\n ></rolatech-rich-item>\n }\n }\n </rolatech-rich-view>\n }\n</div>\n", styles: ["rolatech-rich-item{--rt-rich-view-item-margin: 0px}\n"], dependencies: [{ kind: "ngmodule", type: AngularCommonModule }, { kind: "ngmodule", type: AngularComponentsModule }, { kind: "component", type: RichViewComponent, selector: "rolatech-rich-view", inputs: ["list", "wrap"] }, { kind: "component", type: CategoryBreadcrumbComponent, selector: "rolatech-category-breadcrumb", inputs: ["categories"], outputs: ["categoriesChange"] }], deferBlockDependencies: [() => [i1.RouterLink, RichItemComponent,
50
50
  FixedPipe]] }); }
51
51
  }
52
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: CourseCategoryIndexComponent, decorators: [{
52
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: CourseCategoryIndexComponent, decorators: [{
53
53
  type: Component,
54
54
  args: [{ selector: 'rolatech-course-category-index', imports: [
55
55
  AngularCommonModule,
@@ -62,4 +62,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImpor
62
62
  }] });
63
63
 
64
64
  export { CourseCategoryIndexComponent };
65
- //# sourceMappingURL=rolatech-angular-course-course-category-index.component-0GMBxM91.mjs.map
65
+ //# sourceMappingURL=rolatech-angular-course-course-category-index.component-xrCJZHEI.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"rolatech-angular-course-course-category-index.component-0GMBxM91.mjs","sources":["../../../../packages/angular-course/src/lib/pages/course/course-category-index/course-category-index.component.ts","../../../../packages/angular-course/src/lib/pages/course/course-category-index/course-category-index.component.html"],"sourcesContent":["import { Component, inject, OnInit } from '@angular/core';\nimport { AngularCommonModule, FixedPipe } from '@rolatech/angular-common';\nimport { AngularComponentsModule, RichViewComponent, RichItemComponent, BaseComponent } from '@rolatech/angular-components';\nimport { Course, CourseCategory } from '../../../interfaces';\nimport { CourseService, CategoryService } from '../../../services';\nimport { CategoryBreadcrumbComponent } from '@rolatech/angular-category';\n\n@Component({\n selector: 'rolatech-course-category-index',\n imports: [\n AngularCommonModule,\n AngularComponentsModule,\n RichViewComponent,\n RichItemComponent,\n FixedPipe,\n CategoryBreadcrumbComponent,\n ],\n templateUrl: './course-category-index.component.html',\n styleUrl: './course-category-index.component.scss',\n})\nexport class CourseCategoryIndexComponent extends BaseComponent implements OnInit {\n courses: Course[] = [];\n categories: CourseCategory[] = [];\n courseService = inject(CourseService);\n categoryService = inject(CategoryService);\n meta: any;\n loading = false;\n c = [{ name: '分类', path: '/categories' }];\n ngOnInit(): void {\n this.findCategories();\n this.findCourses();\n this.titleService.setTitle('课程');\n }\n findCourses() {\n this.loading = true;\n const options = {\n sort: 'updatedAt desc',\n filter: 'published:true',\n };\n this.courseService.find(options).subscribe({\n next: (res: any) => {\n this.courses = res.data;\n this.meta = res.meta;\n this.loading = false;\n },\n error: (error) => {\n this.loading = false;\n },\n });\n }\n findCategories() {\n this.categoryService.find({}).subscribe({\n next: (res: any) => {\n this.categories = res.data;\n },\n });\n }\n}\n","<div>\n <div class=\"hidden md:block\">\n <rolatech-category-breadcrumb [categories]=\"c\"></rolatech-category-breadcrumb>\n <div class=\"text-2xl font-medium mt-2\">全部课程</div>\n </div>\n\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 list>\n @for (item of courses; track $index) {\n @defer {\n <rolatech-rich-item\n [routerLink]=\"['/courses/', item.id]\"\n [thumbnail]=\"item.media[0].url + '!w400'\"\n [title]=\"item.name\"\n [subtitle]=\"item.description\"\n [price]=\"item.pricing[0].total | fixed\"\n ></rolatech-rich-item>\n }\n }\n </rolatech-rich-view>\n }\n</div>\n"],"names":[],"mappings":";;;;;;;;AAoBM,MAAO,4BAA6B,SAAQ,aAAa,CAAA;AAb/D,IAAA,WAAA,GAAA;;QAcE,IAAA,CAAA,OAAO,GAAa,EAAE;QACtB,IAAA,CAAA,UAAU,GAAqB,EAAE;AACjC,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,aAAa,CAAC;AACrC,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,eAAe,CAAC;QAEzC,IAAA,CAAA,OAAO,GAAG,KAAK;AACf,QAAA,IAAA,CAAA,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;AA8B1C,IAAA;IA7BC,QAAQ,GAAA;QACN,IAAI,CAAC,cAAc,EAAE;QACrB,IAAI,CAAC,WAAW,EAAE;AAClB,QAAA,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC;IAClC;IACA,WAAW,GAAA;AACT,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI;AACnB,QAAA,MAAM,OAAO,GAAG;AACd,YAAA,IAAI,EAAE,gBAAgB;AACtB,YAAA,MAAM,EAAE,gBAAgB;SACzB;QACD,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC;AACzC,YAAA,IAAI,E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AAA,CAAA,kBAAA,CAAA,EAAA,CAAA,EAAA,sBAAA,EAAA,CAAA,MAAA,CAAA,EAAA,CAAA,UAAA,EAF3B,iBAAiB;gBACjB,SAAS,CAAA,CAAA,EAAA,CAAA,CAAA;;2FAMA,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBAbxC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,gCAAgC,EAAA,OAAA,EACjC;wBACP,mBAAmB;wBACnB,uBAAuB;wBACvB,iBAAiB;wBACjB,iBAAiB;wBACjB,SAAS;wBACT,2BAA2B;AAC5B,qBAAA,EAAA,QAAA,EAAA,6+CAAA,EAAA,MAAA,EAAA,CAAA,uDAAA,CAAA,EAAA;;;;;"}
1
+ {"version":3,"file":"rolatech-angular-course-course-category-index.component-xrCJZHEI.mjs","sources":["../../../../packages/angular-course/src/lib/pages/course/course-category-index/course-category-index.component.ts","../../../../packages/angular-course/src/lib/pages/course/course-category-index/course-category-index.component.html"],"sourcesContent":["import { Component, inject, OnInit } from '@angular/core';\nimport { AngularCommonModule, FixedPipe } from '@rolatech/angular-common';\nimport { AngularComponentsModule, RichViewComponent, RichItemComponent, BaseComponent } from '@rolatech/angular-components';\nimport { Course, CourseCategory } from '../../../interfaces';\nimport { CourseService, CategoryService } from '../../../services';\nimport { CategoryBreadcrumbComponent } from '@rolatech/angular-category';\n\n@Component({\n selector: 'rolatech-course-category-index',\n imports: [\n AngularCommonModule,\n AngularComponentsModule,\n RichViewComponent,\n RichItemComponent,\n FixedPipe,\n CategoryBreadcrumbComponent,\n ],\n templateUrl: './course-category-index.component.html',\n styleUrl: './course-category-index.component.scss',\n})\nexport class CourseCategoryIndexComponent extends BaseComponent implements OnInit {\n courses: Course[] = [];\n categories: CourseCategory[] = [];\n courseService = inject(CourseService);\n categoryService = inject(CategoryService);\n meta: any;\n loading = false;\n c = [{ name: '分类', path: '/categories' }];\n ngOnInit(): void {\n this.findCategories();\n this.findCourses();\n this.titleService.setTitle('课程');\n }\n findCourses() {\n this.loading = true;\n const options = {\n sort: 'updatedAt desc',\n filter: 'published:true',\n };\n this.courseService.find(options).subscribe({\n next: (res: any) => {\n this.courses = res.data;\n this.meta = res.meta;\n this.loading = false;\n },\n error: (error) => {\n this.loading = false;\n },\n });\n }\n findCategories() {\n this.categoryService.find({}).subscribe({\n next: (res: any) => {\n this.categories = res.data;\n },\n });\n }\n}\n","<div>\n <div class=\"hidden md:block\">\n <rolatech-category-breadcrumb [categories]=\"c\"></rolatech-category-breadcrumb>\n <div class=\"text-2xl font-medium mt-2\">全部课程</div>\n </div>\n\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 list>\n @for (item of courses; track $index) {\n @defer {\n <rolatech-rich-item\n [routerLink]=\"['/courses/', item.id]\"\n [thumbnail]=\"item.media[0].url + '!w400'\"\n [title]=\"item.name\"\n [subtitle]=\"item.description\"\n [price]=\"item.pricing[0].total | fixed\"\n ></rolatech-rich-item>\n }\n }\n </rolatech-rich-view>\n }\n</div>\n"],"names":[],"mappings":";;;;;;;;AAoBM,MAAO,4BAA6B,SAAQ,aAAa,CAAA;AAb/D,IAAA,WAAA,GAAA;;QAcE,IAAA,CAAA,OAAO,GAAa,EAAE;QACtB,IAAA,CAAA,UAAU,GAAqB,EAAE;AAC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minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: CourseIndexComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
47
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.0", type: CourseIndexComponent, isStandalone: true, selector: "rolatech-course-index", usesInheritance: true, 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\u8BFE\u7A0B</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 list>\n @for (item of courses; track $index) {\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.pricing[0].total | fixed\"\n ></rolatech-rich-item>\n }\n }\n </rolatech-rich-view>\n }\n</div>\n", styles: ["img:before{border-radius:12px}\n"], dependencies: [{ kind: "ngmodule", type: AngularCommonModule }, { kind: "ngmodule", type: AngularComponentsModule }, { kind: "component", type: RichViewComponent, selector: "rolatech-rich-view", inputs: ["list", "wrap"] }], deferBlockDependencies: [() => [i1.RouterLink, RichItemComponent, FixedPipe]] }); }
46
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: CourseIndexComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
47
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: CourseIndexComponent, isStandalone: true, selector: "rolatech-course-index", usesInheritance: true, 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\u8BFE\u7A0B</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 list>\n @for (item of courses; track $index) {\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.pricing[0].total | fixed\"\n ></rolatech-rich-item>\n }\n }\n </rolatech-rich-view>\n }\n</div>\n", styles: ["img:before{border-radius:12px}\n"], dependencies: [{ kind: "ngmodule", type: AngularCommonModule }, { kind: "ngmodule", type: AngularComponentsModule }, { kind: "component", type: RichViewComponent, selector: "rolatech-rich-view", inputs: ["list", "wrap"] }], deferBlockDependencies: [() => [i1.RouterLink, RichItemComponent, FixedPipe]] }); }
48
48
  }
49
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: CourseIndexComponent, decorators: [{
49
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: CourseIndexComponent, decorators: [{
50
50
  type: Component,
51
51
  args: [{ imports: [AngularCommonModule, AngularComponentsModule, RichViewComponent, RichItemComponent, FixedPipe], selector: 'rolatech-course-index', 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\u8BFE\u7A0B</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 list>\n @for (item of courses; track $index) {\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.pricing[0].total | fixed\"\n ></rolatech-rich-item>\n }\n }\n </rolatech-rich-view>\n }\n</div>\n", styles: ["img:before{border-radius:12px}\n"] }]
52
52
  }] });
53
53
 
54
54
  export { CourseIndexComponent };
55
- //# sourceMappingURL=rolatech-angular-course-course-index.component-BsU93jIn.mjs.map
55
+ //# sourceMappingURL=rolatech-angular-course-course-index.component-B7-FCQQn.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"rolatech-angular-course-course-index.component-BsU93jIn.mjs","sources":["../../../../packages/angular-course/src/lib/pages/course/course-index/course-index.component.ts","../../../../packages/angular-course/src/lib/pages/course/course-index/course-index.component.html"],"sourcesContent":["import { Component, inject, OnInit } from '@angular/core';\nimport { CourseCategory, Course } from '../../../interfaces';\nimport { CategoryService, CourseService } from '../../../services';\nimport { AngularCommonModule, FixedPipe } from '@rolatech/angular-common';\nimport { AngularComponentsModule, BaseComponent, RichItemComponent, RichViewComponent } from '@rolatech/angular-components';\n\n@Component({\n imports: [AngularCommonModule, AngularComponentsModule, RichViewComponent, RichItemComponent, FixedPipe],\n selector: 'rolatech-course-index',\n templateUrl: './course-index.component.html',\n styleUrls: ['./course-index.component.scss'],\n})\nexport class CourseIndexComponent extends BaseComponent implements OnInit {\n courses: Course[] = [];\n categories: CourseCategory[] = [];\n courseService = inject(CourseService);\n categoryService = inject(CategoryService);\n meta: any;\n loading = false;\n\n ngOnInit(): void {\n this.findCategories();\n this.findCourses();\n this.titleService.setTitle('课程');\n }\n findCourses() {\n this.loading = true;\n const options = {\n sort: 'updatedAt desc',\n filter: 'published:true',\n };\n this.courseService.find(options).subscribe({\n next: (res: any) => {\n this.courses = res.data;\n this.meta = res.meta;\n this.loading = false;\n },\n error: (error) => {\n this.loading = false;\n },\n });\n }\n findCategories() {\n this.categoryService.find({}).subscribe({\n next: (res: any) => {\n this.categories = res.data;\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 list>\n @for (item of courses; track $index) {\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.pricing[0].total | fixed\"\n ></rolatech-rich-item>\n }\n }\n </rolatech-rich-view>\n }\n</div>\n"],"names":[],"mappings":";;;;;;;AAYM,MAAO,oBAAqB,SAAQ,aAAa,CAAA;AANvD,IAAA,WAAA,GAAA;;QAOE,IAAA,CAAA,OAAO,GAAa,EAAE;QACtB,IAAA,CAAA,UAAU,GAAqB,EAAE;AACjC,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,aAAa,CAAC;AACrC,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,eAAe,CAAC;QAEzC,IAAA,CAAA,OAAO,GAAG,KAAK;AA+BhB,IAAA;IA7BC,QAAQ,GAAA;QACN,IAAI,CAAC,cAAc,EAAE;QACrB,IAAI,CAAC,WAAW,EAAE;AAClB,QAAA,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC;IAClC;IACA,WAAW,GAAA;AACT,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI;AACnB,QAAA,MAAM,OAAO,GAAG;AACd,YAAA,IAAI,EAAE,gBAAgB;AACtB,YAAA,MAAM,EAAE,gBAAgB;SACzB;QACD,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC;AACzC,YAAA,IAAI,EAAE,CAAC,GAAQ,KAAI;AACjB,gBAAA,IAAI,CAAC,OA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AAmB,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,SAAS,CAAC,EAAA,QAAA,EAC9F,uBAAuB,EAAA,QAAA,EAAA,45CAAA,EAAA,MAAA,EAAA,CAAA,kCAAA,CAAA,EAAA;;;;;"}
1
+ {"version":3,"file":"rolatech-angular-course-course-index.component-B7-FCQQn.mjs","sources":["../../../../packages/angular-course/src/lib/pages/course/course-index/course-index.component.ts","../../../../packages/angular-course/src/lib/pages/course/course-index/course-index.component.html"],"sourcesContent":["import { Component, inject, OnInit } from '@angular/core';\nimport { CourseCategory, Course } from '../../../interfaces';\nimport { CategoryService, CourseService } from '../../../services';\nimport { AngularCommonModule, FixedPipe } from '@rolatech/angular-common';\nimport { AngularComponentsModule, BaseComponent, RichItemComponent, RichViewComponent } from '@rolatech/angular-components';\n\n@Component({\n imports: [AngularCommonModule, AngularComponentsModule, RichViewComponent, RichItemComponent, FixedPipe],\n selector: 'rolatech-course-index',\n templateUrl: './course-index.component.html',\n styleUrls: ['./course-index.component.scss'],\n})\nexport class CourseIndexComponent extends BaseComponent implements OnInit {\n courses: Course[] = [];\n categories: CourseCategory[] = [];\n courseService = inject(CourseService);\n categoryService = inject(CategoryService);\n meta: any;\n loading = false;\n\n ngOnInit(): void {\n this.findCategories();\n this.findCourses();\n this.titleService.setTitle('课程');\n }\n findCourses() {\n this.loading = true;\n const options = {\n sort: 'updatedAt desc',\n filter: 'published:true',\n };\n this.courseService.find(options).subscribe({\n next: (res: any) => {\n this.courses = res.data;\n this.meta = res.meta;\n this.loading = false;\n },\n error: (error) => {\n this.loading = false;\n },\n });\n }\n findCategories() {\n this.categoryService.find({}).subscribe({\n next: (res: any) => {\n this.categories = res.data;\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 list>\n @for (item of courses; track $index) {\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.pricing[0].total | fixed\"\n ></rolatech-rich-item>\n }\n }\n </rolatech-rich-view>\n }\n</div>\n"],"names":[],"mappings":";;;;;;;AAYM,MAAO,oBAAqB,SAAQ,aAAa,CAAA;AANvD,IAAA,WAAA,GAAA;;QAOE,IAAA,CAAA,OAAO,GAAa,EAAE;QACtB,IAAA,CAAA,UAAU,GAAqB,EAAE;AACjC,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,aAAa,CAAC;AACrC,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,eAAe,CAAC;QAEzC,IAAA,CAAA,OAAO,GAAG,KAAK;AA+BhB,IAAA;IA7BC,QAAQ,GAAA;QACN,IAAI,CAAC,cAAc,EAAE;QACrB,IAAI,CAAC,WAAW,EAAE;AAClB,QAAA,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC;IAClC;IACA,WAAW,GAAA;AACT,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI;AACnB,QAAA,MAAM,OAAO,GAAG;AACd,YAAA,IAAI,EAAE,gBAAgB;AACtB,YAAA,MAAM,EA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