@ng-vagabond-lab/ng-dsv 0.2.43 → 0.2.44
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.
- package/fesm2022/{ng-vagabond-lab-ng-dsv-module-news-news-list.container-dRUMZot2.mjs → ng-vagabond-lab-ng-dsv-module-news-news-list.container-vE1ewhD0.mjs} +3 -24
- package/fesm2022/ng-vagabond-lab-ng-dsv-module-news-news-list.container-vE1ewhD0.mjs.map +1 -0
- package/fesm2022/ng-vagabond-lab-ng-dsv-module-news.mjs +28 -2
- package/fesm2022/ng-vagabond-lab-ng-dsv-module-news.mjs.map +1 -1
- package/package.json +1 -1
- package/types/ng-vagabond-lab-ng-dsv-module-news.d.ts +23 -1
- package/fesm2022/ng-vagabond-lab-ng-dsv-module-news-news-list.container-dRUMZot2.mjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { inject, computed, Component } from '@angular/core';
|
|
3
3
|
import { RouterLink } from '@angular/router';
|
|
4
4
|
import { BaseSearchContainer } from '@ng-vagabond-lab/ng-dsv/base';
|
|
5
5
|
import { DsvButtonComponent } from '@ng-vagabond-lab/ng-dsv/ds/button';
|
|
@@ -7,30 +7,9 @@ import { DsvCardComponent, DsvCardHeaderComponent } from '@ng-vagabond-lab/ng-ds
|
|
|
7
7
|
import { DsvFormReactiveSearchbarComponent } from '@ng-vagabond-lab/ng-dsv/ds/form/reactive';
|
|
8
8
|
import { DsvScrollInfiniteContainer } from '@ng-vagabond-lab/ng-dsv/ds/scroll';
|
|
9
9
|
import { AuthService } from '@ng-vagabond-lab/ng-dsv/module/auth';
|
|
10
|
-
import {
|
|
11
|
-
import { DsvFileShowComponent } from '@ng-vagabond-lab/ng-dsv/ds/file';
|
|
12
|
-
import { DsvMarkdownContainer } from '@ng-vagabond-lab/ng-dsv/ds/markdown';
|
|
13
|
-
import { RouterInternalPipe } from '@ng-vagabond-lab/ng-dsv/router';
|
|
10
|
+
import { NewsCardResumeComponent } from './ng-vagabond-lab-ng-dsv-module-news.mjs';
|
|
14
11
|
import { N as NewsListService } from './ng-vagabond-lab-ng-dsv-module-news-news-list.service-MB7ocRqE.mjs';
|
|
15
12
|
|
|
16
|
-
class NewsCardResumeComponent {
|
|
17
|
-
news = input(/* @ts-ignore */
|
|
18
|
-
...(ngDevMode ? [undefined, { debugName: "news" }] : /* istanbul ignore next */ []));
|
|
19
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NewsCardResumeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
20
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: NewsCardResumeComponent, isStandalone: true, selector: "app-news-card-resume", inputs: { news: { classPropertyName: "news", publicName: "news", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<dsv-card [routerLink]=\"'/news/' + news()?.id\">\n @if (news()?.image) {\n <dsv-file-show url=\"/api/\" [src]=\"news()?.image ?? ''\" />\n }\n <h2 [class.error]=\"!news()?.active\">{{ news()?.title }}</h2>\n <span class=\"subtitle\">Le {{ news()?.creationDate! | formatDate: true }}</span>\n <dsv-markdown-container [data]=\"news()?.resume\" />\n <a [href]=\"'/news/' + news()?.id\" dsvLink>Lire la suite...</a>\n</dsv-card>\n", styles: [":host{display:flex;width:100%;min-height:300px;margin-right:5px;overflow:hidden}:host dsv-card{position:relative}:host dsv-card h1{margin:0}:host dsv-card h2{margin:0 0 5px}:host dsv-card img{width:calc(100% + 20px)}:host dsv-card .news-image{margin:0 0 5px;width:100%}:host dsv-card dsv-card-header{display:flex;flex-direction:row;align-items:center;gap:5px;margin:0 0 10px}:host dsv-card dsv-card-header dsv-button.round{--button-border-radius: 50%}:host dsv-card dsv-card-header h1,:host dsv-card dsv-card-header h2{flex:1}:host dsv-markdown-container{margin:20px 0}\n", ":host{margin:0;width:100%;min-height:200px!important}:host,:host a{display:flex;width:100%}\n"], dependencies: [{ kind: "component", type: DsvCardComponent, selector: "dsv-card", inputs: ["border"] }, { kind: "directive", type: RouterInternalPipe, selector: "a[dsvLink]", outputs: ["dsvLink"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "component", type: DsvFileShowComponent, selector: "dsv-file-show", inputs: ["url", "src", "alt"] }, { kind: "component", type: DsvMarkdownContainer, selector: "dsv-markdown-container", inputs: ["data"] }, { kind: "pipe", type: DateFormatPipe, name: "formatDate" }] });
|
|
21
|
-
}
|
|
22
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NewsCardResumeComponent, decorators: [{
|
|
23
|
-
type: Component,
|
|
24
|
-
args: [{ selector: 'app-news-card-resume', imports: [
|
|
25
|
-
DsvCardComponent,
|
|
26
|
-
DateFormatPipe,
|
|
27
|
-
RouterInternalPipe,
|
|
28
|
-
RouterLink,
|
|
29
|
-
DsvFileShowComponent,
|
|
30
|
-
DsvMarkdownContainer,
|
|
31
|
-
], template: "<dsv-card [routerLink]=\"'/news/' + news()?.id\">\n @if (news()?.image) {\n <dsv-file-show url=\"/api/\" [src]=\"news()?.image ?? ''\" />\n }\n <h2 [class.error]=\"!news()?.active\">{{ news()?.title }}</h2>\n <span class=\"subtitle\">Le {{ news()?.creationDate! | formatDate: true }}</span>\n <dsv-markdown-container [data]=\"news()?.resume\" />\n <a [href]=\"'/news/' + news()?.id\" dsvLink>Lire la suite...</a>\n</dsv-card>\n", styles: [":host{display:flex;width:100%;min-height:300px;margin-right:5px;overflow:hidden}:host dsv-card{position:relative}:host dsv-card h1{margin:0}:host dsv-card h2{margin:0 0 5px}:host dsv-card img{width:calc(100% + 20px)}:host dsv-card .news-image{margin:0 0 5px;width:100%}:host dsv-card dsv-card-header{display:flex;flex-direction:row;align-items:center;gap:5px;margin:0 0 10px}:host dsv-card dsv-card-header dsv-button.round{--button-border-radius: 50%}:host dsv-card dsv-card-header h1,:host dsv-card dsv-card-header h2{flex:1}:host dsv-markdown-container{margin:20px 0}\n", ":host{margin:0;width:100%;min-height:200px!important}:host,:host a{display:flex;width:100%}\n"] }]
|
|
32
|
-
}], propDecorators: { news: [{ type: i0.Input, args: [{ isSignal: true, alias: "news", required: false }] }] } });
|
|
33
|
-
|
|
34
13
|
class NewsListContainer extends BaseSearchContainer {
|
|
35
14
|
newsListService;
|
|
36
15
|
auhService = inject(AuthService);
|
|
@@ -58,4 +37,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
58
37
|
}], ctorParameters: () => [{ type: NewsListService }] });
|
|
59
38
|
|
|
60
39
|
export { NewsListContainer };
|
|
61
|
-
//# sourceMappingURL=ng-vagabond-lab-ng-dsv-module-news-news-list.container-
|
|
40
|
+
//# sourceMappingURL=ng-vagabond-lab-ng-dsv-module-news-news-list.container-vE1ewhD0.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ng-vagabond-lab-ng-dsv-module-news-news-list.container-vE1ewhD0.mjs","sources":["../../../projects/ng-dsv/module/news/container/list/news-list.container.ts","../../../projects/ng-dsv/module/news/container/list/news-list.container.html"],"sourcesContent":["import { Component, computed, inject } from '@angular/core';\nimport { RouterLink } from '@angular/router';\nimport { BaseSearchContainer } from '@ng-vagabond-lab/ng-dsv/base';\nimport { DsvButtonComponent } from '@ng-vagabond-lab/ng-dsv/ds/button';\nimport { DsvCardComponent, DsvCardHeaderComponent } from '@ng-vagabond-lab/ng-dsv/ds/card';\nimport { DsvFormReactiveSearchbarComponent } from '@ng-vagabond-lab/ng-dsv/ds/form/reactive';\nimport { DsvScrollInfiniteContainer } from '@ng-vagabond-lab/ng-dsv/ds/scroll';\nimport { AuthService } from '@ng-vagabond-lab/ng-dsv/module/auth';\nimport { NewsCardResumeComponent } from '../../component/card/resume/news-card-resume.component';\nimport { NewsDto } from '../../dto/news.dto';\nimport { NewsListService } from '../../service/list/news-list.service';\n\n@Component({\n selector: 'app-news-list',\n imports: [\n DsvCardComponent,\n DsvFormReactiveSearchbarComponent,\n DsvScrollInfiniteContainer,\n NewsCardResumeComponent,\n DsvButtonComponent,\n DsvCardHeaderComponent,\n RouterLink,\n ],\n templateUrl: './news-list.container.html',\n styleUrl: './news-list.container.scss',\n})\nexport class NewsListContainer extends BaseSearchContainer<NewsListService, NewsDto> {\n readonly auhService = inject(AuthService);\n\n readonly isAdmin = computed<boolean>(() => this.auhService.hasRole('ADMIN'));\n\n constructor(public newsListService: NewsListService) {\n super(newsListService);\n this.seoService.setMeta(\n 'Les dernières news',\n 'Retrouver les dernières news sur movie-keeper.fr',\n '/images/logo.png',\n );\n }\n}\n","<dsv-card>\n <dsv-card-header>\n <h2>\n <i class=\"ri-file-list-3-line\"></i> News\n @if (newsListService.total()) {\n ({{ newsListService.total() }})\n }\n </h2>\n @if (isAdmin()) {\n <dsv-button icon=\"ri-add-line\" color=\"secondary\" variant=\"outlined\" routerLink=\"/news/create\" />\n }\n </dsv-card-header>\n <dsv-form-reactive-searchbar [search]=\"newsListService.search()\" (callbackSearch)=\"doSearch($event)\" />\n</dsv-card>\n\n@if (newsListService.news().length === 0 && (!newsListService.isLoading() || newsListService.stopFetch())) {\n <dsv-card>\n <p>Aucun résultat trouvé</p>\n </dsv-card>\n} @else {\n <dsv-scroll-infinite\n #scroll\n class=\"card-miniature\"\n [loading]=\"newsListService.isLoading()\"\n (callback)=\"doFetch()\"\n >\n @for (news of newsListService.news(); track news.id) {\n <app-news-card-resume [news]=\"news\">\n @if (isAdmin()) {\n <dsv-button\n class=\"update-button\"\n icon=\"ri-tools-line\"\n [routerLink]=\"'/news/update/' + news?.id\"\n />\n }\n </app-news-card-resume>\n }\n <ng-template #skeleton> </ng-template>\n </dsv-scroll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EAAA,OAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAC1B,uBAAuB,EAAA,QAAA,EAAA,sBAAA,EAAA,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACvB,kBAAkB,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,YAAA,EAAA,MAAA,EAAA,SAAA,EAAA,UAAA,EAAA,SAAA,EAAA,MAAA,EAAA,SAAA,CAAA,EAAA,OAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAClB,sBAAsB,4DACtB,UAAU,EAAA,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,CAAA,QAAA,EAAA,aAAA,EAAA,UAAA,EAAA,qBAAA,EAAA,OAAA,EAAA,MAAA,EAAA,YAAA,EAAA,kBAAA,EAAA,oBAAA,EAAA,YAAA,EAAA,YAAA,EAAA,YAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAKL,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAd7B,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,eAAe,EAAA,OAAA,EAChB;wBACL,gBAAgB;wBAChB,iCAAiC;wBACjC,0BAA0B;wBAC1B,uBAAuB;wBACvB,kBAAkB;wBAClB,sBAAsB;wBACtB,UAAU;AACb,qBAAA,EAAA,QAAA,EAAA,i6CAAA,EAAA,MAAA,EAAA,CAAA,sgBAAA,CAAA,EAAA;;;"}
|
|
@@ -1,9 +1,35 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, Component } from '@angular/core';
|
|
3
|
+
import { RouterLink } from '@angular/router';
|
|
4
|
+
import { DateFormatPipe } from '@ng-vagabond-lab/ng-dsv/date';
|
|
5
|
+
import { DsvCardComponent } from '@ng-vagabond-lab/ng-dsv/ds/card';
|
|
6
|
+
import { DsvFileShowComponent } from '@ng-vagabond-lab/ng-dsv/ds/file';
|
|
7
|
+
import { DsvMarkdownContainer } from '@ng-vagabond-lab/ng-dsv/ds/markdown';
|
|
8
|
+
import { RouterInternalPipe } from '@ng-vagabond-lab/ng-dsv/router';
|
|
1
9
|
import { authGuard } from '@ng-vagabond-lab/ng-dsv/module/auth';
|
|
2
10
|
|
|
11
|
+
class NewsCardResumeComponent {
|
|
12
|
+
news = input(/* @ts-ignore */
|
|
13
|
+
...(ngDevMode ? [undefined, { debugName: "news" }] : /* istanbul ignore next */ []));
|
|
14
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NewsCardResumeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
15
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: NewsCardResumeComponent, isStandalone: true, selector: "app-news-card-resume", inputs: { news: { classPropertyName: "news", publicName: "news", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<dsv-card [routerLink]=\"'/news/' + news()?.id\">\n @if (news()?.image) {\n <dsv-file-show url=\"/api/\" [src]=\"news()?.image ?? ''\" />\n }\n <h2 [class.error]=\"!news()?.active\">{{ news()?.title }}</h2>\n <span class=\"subtitle\">Le {{ news()?.creationDate! | formatDate: true }}</span>\n <dsv-markdown-container [data]=\"news()?.resume\" />\n <a [href]=\"'/news/' + news()?.id\" dsvLink>Lire la suite...</a>\n</dsv-card>\n", styles: [":host{display:flex;width:100%;min-height:300px;margin-right:5px;overflow:hidden}:host dsv-card{position:relative}:host dsv-card h1{margin:0}:host dsv-card h2{margin:0 0 5px}:host dsv-card img{width:calc(100% + 20px)}:host dsv-card .news-image{margin:0 0 5px;width:100%}:host dsv-card dsv-card-header{display:flex;flex-direction:row;align-items:center;gap:5px;margin:0 0 10px}:host dsv-card dsv-card-header dsv-button.round{--button-border-radius: 50%}:host dsv-card dsv-card-header h1,:host dsv-card dsv-card-header h2{flex:1}:host dsv-markdown-container{margin:20px 0}\n", ":host{margin:0;width:100%;min-height:200px!important}:host,:host a{display:flex;width:100%}\n"], dependencies: [{ kind: "component", type: DsvCardComponent, selector: "dsv-card", inputs: ["border"] }, { kind: "directive", type: RouterInternalPipe, selector: "a[dsvLink]", outputs: ["dsvLink"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "component", type: DsvFileShowComponent, selector: "dsv-file-show", inputs: ["url", "src", "alt"] }, { kind: "component", type: DsvMarkdownContainer, selector: "dsv-markdown-container", inputs: ["data"] }, { kind: "pipe", type: DateFormatPipe, name: "formatDate" }] });
|
|
16
|
+
}
|
|
17
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NewsCardResumeComponent, decorators: [{
|
|
18
|
+
type: Component,
|
|
19
|
+
args: [{ selector: 'app-news-card-resume', imports: [
|
|
20
|
+
DsvCardComponent,
|
|
21
|
+
DateFormatPipe,
|
|
22
|
+
RouterInternalPipe,
|
|
23
|
+
RouterLink,
|
|
24
|
+
DsvFileShowComponent,
|
|
25
|
+
DsvMarkdownContainer,
|
|
26
|
+
], template: "<dsv-card [routerLink]=\"'/news/' + news()?.id\">\n @if (news()?.image) {\n <dsv-file-show url=\"/api/\" [src]=\"news()?.image ?? ''\" />\n }\n <h2 [class.error]=\"!news()?.active\">{{ news()?.title }}</h2>\n <span class=\"subtitle\">Le {{ news()?.creationDate! | formatDate: true }}</span>\n <dsv-markdown-container [data]=\"news()?.resume\" />\n <a [href]=\"'/news/' + news()?.id\" dsvLink>Lire la suite...</a>\n</dsv-card>\n", styles: [":host{display:flex;width:100%;min-height:300px;margin-right:5px;overflow:hidden}:host dsv-card{position:relative}:host dsv-card h1{margin:0}:host dsv-card h2{margin:0 0 5px}:host dsv-card img{width:calc(100% + 20px)}:host dsv-card .news-image{margin:0 0 5px;width:100%}:host dsv-card dsv-card-header{display:flex;flex-direction:row;align-items:center;gap:5px;margin:0 0 10px}:host dsv-card dsv-card-header dsv-button.round{--button-border-radius: 50%}:host dsv-card dsv-card-header h1,:host dsv-card dsv-card-header h2{flex:1}:host dsv-markdown-container{margin:20px 0}\n", ":host{margin:0;width:100%;min-height:200px!important}:host,:host a{display:flex;width:100%}\n"] }]
|
|
27
|
+
}], propDecorators: { news: [{ type: i0.Input, args: [{ isSignal: true, alias: "news", required: false }] }] } });
|
|
28
|
+
|
|
3
29
|
const NewsRoute = [
|
|
4
30
|
{
|
|
5
31
|
path: '',
|
|
6
|
-
loadComponent: () => import('./ng-vagabond-lab-ng-dsv-module-news-news-list.container-
|
|
32
|
+
loadComponent: () => import('./ng-vagabond-lab-ng-dsv-module-news-news-list.container-vE1ewhD0.mjs').then((m) => m.NewsListContainer),
|
|
7
33
|
},
|
|
8
34
|
{
|
|
9
35
|
path: 'create',
|
|
@@ -27,5 +53,5 @@ const NewsRoute = [
|
|
|
27
53
|
* Generated bundle index. Do not edit.
|
|
28
54
|
*/
|
|
29
55
|
|
|
30
|
-
export { NewsRoute };
|
|
56
|
+
export { NewsCardResumeComponent, NewsRoute };
|
|
31
57
|
//# sourceMappingURL=ng-vagabond-lab-ng-dsv-module-news.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-vagabond-lab-ng-dsv-module-news.mjs","sources":["../../../projects/ng-dsv/module/news/route/news.route.ts","../../../projects/ng-dsv/module/news/public-api.ts","../../../projects/ng-dsv/module/news/ng-vagabond-lab-ng-dsv-module-news.ts"],"sourcesContent":["import { Routes } from '@angular/router';\nimport { authGuard } from '@ng-vagabond-lab/ng-dsv/module/auth';\n\nexport const NewsRoute: Routes = [\n {\n path: '',\n loadComponent: () => import('../container/list/news-list.container').then((m) => m.NewsListContainer),\n },\n {\n path: 'create',\n loadComponent: () => import('../container/form/news-form.container').then((m) => m.NewsFormContainer),\n canActivate: [authGuard('ADMIN')],\n },\n {\n path: 'update/:newsId',\n loadComponent: () => import('../container/form/news-form.container').then((m) => m.NewsFormContainer),\n canActivate: [authGuard('ADMIN')],\n },\n {\n path: ':newsId',\n loadComponent: () => import('../container/news.container').then((m) => m.NewsContainer),\n },\n];\n","//export * from './component/card/news-card.component';\nexport * from './route/news.route';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"ng-vagabond-lab-ng-dsv-module-news.mjs","sources":["../../../projects/ng-dsv/module/news/component/card/resume/news-card-resume.component.ts","../../../projects/ng-dsv/module/news/component/card/resume/news-card-resume.component.html","../../../projects/ng-dsv/module/news/route/news.route.ts","../../../projects/ng-dsv/module/news/public-api.ts","../../../projects/ng-dsv/module/news/ng-vagabond-lab-ng-dsv-module-news.ts"],"sourcesContent":["import { Component, input } from '@angular/core';\nimport { RouterLink } from '@angular/router';\nimport { DateFormatPipe } from '@ng-vagabond-lab/ng-dsv/date';\nimport { DsvCardComponent } from '@ng-vagabond-lab/ng-dsv/ds/card';\nimport { DsvFileShowComponent } from '@ng-vagabond-lab/ng-dsv/ds/file';\nimport { DsvMarkdownContainer } from '@ng-vagabond-lab/ng-dsv/ds/markdown';\nimport { RouterInternalPipe } from '@ng-vagabond-lab/ng-dsv/router';\nimport { NewsDto } from '../../../dto/news.dto';\n\n@Component({\n selector: 'app-news-card-resume',\n imports: [\n DsvCardComponent,\n DateFormatPipe,\n RouterInternalPipe,\n RouterLink,\n DsvFileShowComponent,\n DsvMarkdownContainer,\n ],\n templateUrl: './news-card-resume.component.html',\n styleUrls: ['../news-card.component.scss', './news-card-resume.component.scss'],\n})\nexport class NewsCardResumeComponent {\n readonly news = input<NewsDto>();\n}\n","<dsv-card [routerLink]=\"'/news/' + news()?.id\">\n @if (news()?.image) {\n <dsv-file-show url=\"/api/\" [src]=\"news()?.image ?? ''\" />\n }\n <h2 [class.error]=\"!news()?.active\">{{ news()?.title }}</h2>\n <span class=\"subtitle\">Le {{ news()?.creationDate! | formatDate: true }}</span>\n <dsv-markdown-container [data]=\"news()?.resume\" />\n <a [href]=\"'/news/' + news()?.id\" dsvLink>Lire la suite...</a>\n</dsv-card>\n","import { Routes } from '@angular/router';\nimport { authGuard } from '@ng-vagabond-lab/ng-dsv/module/auth';\n\nexport const NewsRoute: Routes = [\n {\n path: '',\n loadComponent: () => import('../container/list/news-list.container').then((m) => m.NewsListContainer),\n },\n {\n path: 'create',\n loadComponent: () => import('../container/form/news-form.container').then((m) => m.NewsFormContainer),\n canActivate: [authGuard('ADMIN')],\n },\n {\n path: 'update/:newsId',\n loadComponent: () => import('../container/form/news-form.container').then((m) => m.NewsFormContainer),\n canActivate: [authGuard('ADMIN')],\n },\n {\n path: ':newsId',\n loadComponent: () => import('../container/news.container').then((m) => m.NewsContainer),\n },\n];\n","//export * from './component/card/news-card.component';\nexport * from './component/card/resume/news-card-resume.component';\nexport * from './dto/news.dto';\nexport * from './route/news.route';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;MAsBa,uBAAuB,CAAA;AACvB,IAAA,IAAI,GAAG,KAAK;wFAAW;uGADvB,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAvB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,uBAAuB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,sBAAA,EAAA,MAAA,EAAA,EAAA,IAAA,EAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAA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AA,EAAA;;;AEfE,MAAM,SAAS,GAAW;AAC7B,IAAA;AACI,QAAA,IAAI,EAAE,EAAE;AACR,QAAA,aAAa,EAAE,MAAM,OAAO,uEAAuC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,iBAAiB,CAAC;AACxG,KAAA;AACD,IAAA;AACI,QAAA,IAAI,EAAE,QAAQ;AACd,QAAA,aAAa,EAAE,MAAM,OAAO,uEAAuC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,iBAAiB,CAAC;AACrG,QAAA,WAAW,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;AACpC,KAAA;AACD,IAAA;AACI,QAAA,IAAI,EAAE,gBAAgB;AACtB,QAAA,aAAa,EAAE,MAAM,OAAO,uEAAuC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,iBAAiB,CAAC;AACrG,QAAA,WAAW,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;AACpC,KAAA;AACD,IAAA;AACI,QAAA,IAAI,EAAE,SAAS;AACf,QAAA,aAAa,EAAE,MAAM,OAAO,kEAA6B,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,aAAa,CAAC;AAC1F,KAAA;;;ACrBL;;ACAA;;AAEG;;"}
|
package/package.json
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { UserDto } from '@ng-vagabond-lab/ng-dsv/module/auth';
|
|
1
3
|
import { Routes } from '@angular/router';
|
|
2
4
|
|
|
5
|
+
interface NewsDto {
|
|
6
|
+
id: number;
|
|
7
|
+
creationDate?: string;
|
|
8
|
+
title: string;
|
|
9
|
+
avatar: string;
|
|
10
|
+
image: string;
|
|
11
|
+
resume: string;
|
|
12
|
+
description: string;
|
|
13
|
+
tags: string;
|
|
14
|
+
active: boolean;
|
|
15
|
+
user: UserDto;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
declare class NewsCardResumeComponent {
|
|
19
|
+
readonly news: i0.InputSignal<NewsDto | undefined>;
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NewsCardResumeComponent, never>;
|
|
21
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NewsCardResumeComponent, "app-news-card-resume", never, { "news": { "alias": "news"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
22
|
+
}
|
|
23
|
+
|
|
3
24
|
declare const NewsRoute: Routes;
|
|
4
25
|
|
|
5
|
-
export { NewsRoute };
|
|
26
|
+
export { NewsCardResumeComponent, NewsRoute };
|
|
27
|
+
export type { NewsDto };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ng-vagabond-lab-ng-dsv-module-news-news-list.container-dRUMZot2.mjs","sources":["../../../projects/ng-dsv/module/news/component/card/resume/news-card-resume.component.ts","../../../projects/ng-dsv/module/news/component/card/resume/news-card-resume.component.html","../../../projects/ng-dsv/module/news/container/list/news-list.container.ts","../../../projects/ng-dsv/module/news/container/list/news-list.container.html"],"sourcesContent":["import { Component, input } from '@angular/core';\nimport { RouterLink } from '@angular/router';\nimport { DateFormatPipe } from '@ng-vagabond-lab/ng-dsv/date';\nimport { DsvCardComponent } from '@ng-vagabond-lab/ng-dsv/ds/card';\nimport { DsvFileShowComponent } from '@ng-vagabond-lab/ng-dsv/ds/file';\nimport { DsvMarkdownContainer } from '@ng-vagabond-lab/ng-dsv/ds/markdown';\nimport { RouterInternalPipe } from '@ng-vagabond-lab/ng-dsv/router';\nimport { NewsDto } from '../../../dto/news.dto';\n\n@Component({\n selector: 'app-news-card-resume',\n imports: [\n DsvCardComponent,\n DateFormatPipe,\n RouterInternalPipe,\n RouterLink,\n DsvFileShowComponent,\n DsvMarkdownContainer,\n ],\n templateUrl: './news-card-resume.component.html',\n styleUrls: ['../news-card.component.scss', './news-card-resume.component.scss'],\n})\nexport class NewsCardResumeComponent {\n readonly news = input<NewsDto>();\n}\n","<dsv-card [routerLink]=\"'/news/' + news()?.id\">\n @if (news()?.image) {\n <dsv-file-show url=\"/api/\" [src]=\"news()?.image ?? ''\" />\n }\n <h2 [class.error]=\"!news()?.active\">{{ news()?.title }}</h2>\n <span class=\"subtitle\">Le {{ news()?.creationDate! | formatDate: true }}</span>\n <dsv-markdown-container [data]=\"news()?.resume\" />\n <a [href]=\"'/news/' + news()?.id\" dsvLink>Lire la suite...</a>\n</dsv-card>\n","import { Component, computed, inject } from '@angular/core';\nimport { RouterLink } from '@angular/router';\nimport { BaseSearchContainer } from '@ng-vagabond-lab/ng-dsv/base';\nimport { DsvButtonComponent } from '@ng-vagabond-lab/ng-dsv/ds/button';\nimport { DsvCardComponent, DsvCardHeaderComponent } from '@ng-vagabond-lab/ng-dsv/ds/card';\nimport { DsvFormReactiveSearchbarComponent } from '@ng-vagabond-lab/ng-dsv/ds/form/reactive';\nimport { DsvScrollInfiniteContainer } from '@ng-vagabond-lab/ng-dsv/ds/scroll';\nimport { AuthService } from '@ng-vagabond-lab/ng-dsv/module/auth';\nimport { NewsCardResumeComponent } from '../../component/card/resume/news-card-resume.component';\nimport { NewsDto } from '../../dto/news.dto';\nimport { NewsListService } from '../../service/list/news-list.service';\n\n@Component({\n selector: 'app-news-list',\n imports: [\n DsvCardComponent,\n DsvFormReactiveSearchbarComponent,\n DsvScrollInfiniteContainer,\n NewsCardResumeComponent,\n DsvButtonComponent,\n DsvCardHeaderComponent,\n RouterLink,\n ],\n templateUrl: './news-list.container.html',\n styleUrl: './news-list.container.scss',\n})\nexport class NewsListContainer extends BaseSearchContainer<NewsListService, NewsDto> {\n readonly auhService = inject(AuthService);\n\n readonly isAdmin = computed<boolean>(() => this.auhService.hasRole('ADMIN'));\n\n constructor(public newsListService: NewsListService) {\n super(newsListService);\n this.seoService.setMeta(\n 'Les dernières news',\n 'Retrouver les dernières news sur movie-keeper.fr',\n '/images/logo.png',\n );\n }\n}\n","<dsv-card>\n <dsv-card-header>\n <h2>\n <i class=\"ri-file-list-3-line\"></i> News\n @if (newsListService.total()) {\n ({{ newsListService.total() }})\n }\n </h2>\n @if (isAdmin()) {\n <dsv-button icon=\"ri-add-line\" color=\"secondary\" variant=\"outlined\" routerLink=\"/news/create\" />\n }\n </dsv-card-header>\n <dsv-form-reactive-searchbar [search]=\"newsListService.search()\" (callbackSearch)=\"doSearch($event)\" />\n</dsv-card>\n\n@if (newsListService.news().length === 0 && (!newsListService.isLoading() || newsListService.stopFetch())) {\n <dsv-card>\n <p>Aucun résultat trouvé</p>\n </dsv-card>\n} @else {\n <dsv-scroll-infinite\n #scroll\n class=\"card-miniature\"\n [loading]=\"newsListService.isLoading()\"\n (callback)=\"doFetch()\"\n >\n @for (news of newsListService.news(); track news.id) {\n <app-news-card-resume [news]=\"news\">\n @if (isAdmin()) {\n <dsv-button\n class=\"update-button\"\n icon=\"ri-tools-line\"\n [routerLink]=\"'/news/update/' + news?.id\"\n />\n }\n </app-news-card-resume>\n }\n <ng-template #skeleton> </ng-template>\n </dsv-scroll-infinite>\n}\n"],"names":["i1.NewsListService"],"mappings":";;;;;;;;;;;;;;;MAsBa,uBAAuB,CAAA;AACvB,IAAA,IAAI,GAAG,KAAK;wFAAW;uGADvB,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAvB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,uBAAuB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,sBAAA,EAAA,MAAA,EAAA,EAAA,IAAA,EAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAA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