@rolatech/angular-course 19.0.0-beta.3 → 19.0.0-beta.5

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.
@@ -10,6 +10,10 @@ export declare class CourseCategoryIndexComponent extends BaseComponent implemen
10
10
  categoryService: CategoryService;
11
11
  meta: any;
12
12
  loading: boolean;
13
+ c: {
14
+ name: string;
15
+ path: string;
16
+ }[];
13
17
  ngOnInit(): void;
14
18
  findCourses(): void;
15
19
  findCategories(): void;
@@ -1,15 +1,12 @@
1
1
  import { OnInit } from '@angular/core';
2
- import { MatDialog } from '@angular/material/dialog';
3
2
  import { PageEvent, MatPaginator } from '@angular/material/paginator';
4
- import { MatSnackBar } from '@angular/material/snack-bar';
5
3
  import { MatTableDataSource } from '@angular/material/table';
4
+ import { BaseComponent } from '@rolatech/angular-components';
6
5
  import { Course } from '../../../interfaces';
7
6
  import { CourseService } from '../../../services';
8
7
  import * as i0 from "@angular/core";
9
- export declare class CourseManageRequestComponent implements OnInit {
10
- private dialog;
11
- private snackBar;
12
- private courseService;
8
+ export declare class CourseManageApplicationComponent extends BaseComponent implements OnInit {
9
+ courseService: CourseService;
13
10
  isLoading: boolean;
14
11
  isSearch: boolean;
15
12
  pageEvent: PageEvent;
@@ -28,9 +25,8 @@ export declare class CourseManageRequestComponent implements OnInit {
28
25
  }[];
29
26
  status: any;
30
27
  orderString: string;
31
- constructor(dialog: MatDialog, snackBar: MatSnackBar, courseService: CourseService);
32
28
  ngOnInit(): void;
33
29
  find(event?: PageEvent | null): any;
34
- static ɵfac: i0.ɵɵFactoryDeclaration<CourseManageRequestComponent, never>;
35
- static ɵcmp: i0.ɵɵComponentDeclaration<CourseManageRequestComponent, "rolatech-course-manage-request", never, {}, {}, never, never, true, never>;
30
+ static ɵfac: i0.ɵɵFactoryDeclaration<CourseManageApplicationComponent, never>;
31
+ static ɵcmp: i0.ɵɵComponentDeclaration<CourseManageApplicationComponent, "rolatech-course-manage-application", never, {}, {}, never, never, true, never>;
36
32
  }
@@ -0,0 +1,5 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class CourseManageApplicationDetailComponent {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<CourseManageApplicationDetailComponent, never>;
4
+ static ɵcmp: i0.ɵɵComponentDeclaration<CourseManageApplicationDetailComponent, "rolatech-course-manage-application-detail", never, {}, {}, never, never, true, never>;
5
+ }
package/package.json CHANGED
@@ -1,13 +1,25 @@
1
1
  {
2
2
  "name": "@rolatech/angular-course",
3
- "version": "19.0.0-beta.3",
3
+ "version": "19.0.0-beta.5",
4
4
  "private": false,
5
5
  "peerDependencies": {
6
+ "@angular/core": "^19.0.0",
6
7
  "@angular/common": "^19.0.0",
7
- "@angular/core": "^19.0.0"
8
+ "@angular/router": "^19.0.0",
9
+ "@angular/material": "^19.0.0",
10
+ "@angular/forms": "^19.0.0",
11
+ "@angular/platform-browser": "^19.0.0",
12
+ "@nx/angular": "^19.0.0 || ^20.0.0",
13
+ "rxjs": "^6.5.3 || ^7.4.0"
8
14
  },
9
15
  "dependencies": {
10
- "tslib": "^2.5.0"
16
+ "@rolatech/angular-common": "19.0.0-beta.5",
17
+ "@rolatech/angular-components": "19.0.0-beta.5",
18
+ "@rolatech/angular-services": "19.0.0-beta.5",
19
+ "@rolatech/angular-auth": "19.0.0-beta.5",
20
+ "@rolatech/angular-category": "19.0.0-beta.5",
21
+ "@rolatech/angular-comment": "19.0.0-beta.5",
22
+ "tslib": "^2.3.0"
11
23
  },
12
24
  "sideEffects": false,
13
25
  "repository": {
@@ -1,55 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { inject, Component } from '@angular/core';
3
- import { AngularCommonModule, FixedPipe } from '@rolatech/angular-common';
4
- import { BaseComponent, AngularComponentsModule, RichViewComponent, RichItemComponent } from '@rolatech/angular-components';
5
- import { CourseService, CategoryService } from './rolatech-angular-course.mjs';
6
- import * as i1 from '@angular/router';
7
-
8
- class CourseCategoryIndexComponent extends BaseComponent {
9
- constructor() {
10
- super(...arguments);
11
- this.courses = [];
12
- this.categories = [];
13
- this.courseService = inject(CourseService);
14
- this.categoryService = inject(CategoryService);
15
- this.loading = false;
16
- }
17
- ngOnInit() {
18
- this.findCategories();
19
- this.findCourses();
20
- this.titleService.setTitle('课程');
21
- }
22
- findCourses() {
23
- this.loading = true;
24
- const options = {
25
- sort: 'updatedAt desc',
26
- filter: 'published:true',
27
- };
28
- this.courseService.find(options).subscribe({
29
- next: (res) => {
30
- this.courses = res.data;
31
- this.meta = res.meta;
32
- this.loading = false;
33
- },
34
- error: (error) => {
35
- this.loading = false;
36
- },
37
- });
38
- }
39
- findCategories() {
40
- this.categoryService.find({}).subscribe({
41
- next: (res) => {
42
- this.categories = res.data;
43
- },
44
- });
45
- }
46
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: CourseCategoryIndexComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
47
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: CourseCategoryIndexComponent, isStandalone: true, selector: "rolatech-course-category-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
- }
49
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: CourseCategoryIndexComponent, decorators: [{
50
- type: Component,
51
- args: [{ selector: 'rolatech-course-category-index', imports: [AngularCommonModule, AngularComponentsModule, RichViewComponent, RichItemComponent, FixedPipe], 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
- }] });
53
-
54
- export { CourseCategoryIndexComponent };
55
- //# sourceMappingURL=rolatech-angular-course-course-category-index.component-B94mbBqD.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rolatech-angular-course-course-category-index.component-B94mbBqD.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';\n\n@Component({\n selector: 'rolatech-course-category-index',\n imports: [AngularCommonModule, AngularComponentsModule, RichViewComponent, RichItemComponent, FixedPipe],\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\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,4BAA6B,SAAQ,aAAa,CAAA;AAN/D,IAAA,WAAA,GAAA;;QAOE,IAAO,CAAA,OAAA,GAAa,EAAE;QACtB,IAAU,CAAA,UAAA,GAAqB,EAAE;AACjC,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,aAAa,CAAC;AACrC,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,eAAe,CAAC;QAEzC,IAAO,CAAA,OAAA,GAAG,KAAK;AA+BhB;IA7BC,QAAQ,GAAA;QACN,IAAI,CAAC,cAAc,EAAE;QACrB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