@ng-vagabond-lab/ng-dsv 0.2.39 → 0.2.42
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/assets/global.scss +1 -0
- package/assets/style.scss +25 -2
- package/fesm2022/ng-vagabond-lab-ng-dsv-api.mjs +6 -6
- package/fesm2022/ng-vagabond-lab-ng-dsv-base-service.mjs +13 -13
- package/fesm2022/ng-vagabond-lab-ng-dsv-base-service.mjs.map +1 -1
- package/fesm2022/ng-vagabond-lab-ng-dsv-base.mjs +24 -24
- package/fesm2022/ng-vagabond-lab-ng-dsv-date.mjs +3 -3
- package/fesm2022/ng-vagabond-lab-ng-dsv-ds-accordion.mjs +3 -3
- package/fesm2022/ng-vagabond-lab-ng-dsv-ds-avatar.mjs +3 -3
- package/fesm2022/ng-vagabond-lab-ng-dsv-ds-button.mjs +6 -6
- package/fesm2022/ng-vagabond-lab-ng-dsv-ds-card.mjs +12 -12
- package/fesm2022/ng-vagabond-lab-ng-dsv-ds-chip.mjs +3 -3
- package/fesm2022/ng-vagabond-lab-ng-dsv-ds-color.mjs +6 -6
- package/fesm2022/ng-vagabond-lab-ng-dsv-ds-container.mjs +3 -3
- package/fesm2022/ng-vagabond-lab-ng-dsv-ds-file.mjs +43 -11
- package/fesm2022/ng-vagabond-lab-ng-dsv-ds-file.mjs.map +1 -1
- package/fesm2022/ng-vagabond-lab-ng-dsv-ds-form-reactive.mjs +24 -24
- package/fesm2022/ng-vagabond-lab-ng-dsv-ds-form-signal.mjs +27 -27
- package/fesm2022/ng-vagabond-lab-ng-dsv-ds-header.mjs +3 -3
- package/fesm2022/ng-vagabond-lab-ng-dsv-ds-img.mjs +3 -3
- package/fesm2022/ng-vagabond-lab-ng-dsv-ds-item.mjs +3 -3
- package/fesm2022/ng-vagabond-lab-ng-dsv-ds-linear-progress.mjs +3 -3
- package/fesm2022/ng-vagabond-lab-ng-dsv-ds-link-pipe.mjs +6 -6
- package/fesm2022/ng-vagabond-lab-ng-dsv-ds-list.mjs +12 -12
- package/fesm2022/ng-vagabond-lab-ng-dsv-ds-markdown.mjs +35 -0
- package/fesm2022/ng-vagabond-lab-ng-dsv-ds-markdown.mjs.map +1 -0
- package/fesm2022/ng-vagabond-lab-ng-dsv-ds-menu.mjs +12 -12
- package/fesm2022/ng-vagabond-lab-ng-dsv-ds-modal.mjs +12 -12
- package/fesm2022/ng-vagabond-lab-ng-dsv-ds-paginate.mjs +3 -3
- package/fesm2022/ng-vagabond-lab-ng-dsv-ds-scroll.mjs +9 -9
- package/fesm2022/ng-vagabond-lab-ng-dsv-ds-skeleton.mjs +3 -3
- package/fesm2022/ng-vagabond-lab-ng-dsv-ds-tab.mjs +6 -6
- package/fesm2022/ng-vagabond-lab-ng-dsv-ds-table.mjs +3 -3
- package/fesm2022/ng-vagabond-lab-ng-dsv-ds-theme.mjs +10 -10
- package/fesm2022/ng-vagabond-lab-ng-dsv-ds-theme.mjs.map +1 -1
- package/fesm2022/ng-vagabond-lab-ng-dsv-ds-toast.mjs +6 -6
- package/fesm2022/ng-vagabond-lab-ng-dsv-ds-tooltip.mjs +3 -3
- package/fesm2022/ng-vagabond-lab-ng-dsv-environment.mjs +3 -3
- package/fesm2022/ng-vagabond-lab-ng-dsv-i18n.mjs +3 -3
- package/fesm2022/ng-vagabond-lab-ng-dsv-module-admin.mjs +15 -15
- package/fesm2022/ng-vagabond-lab-ng-dsv-module-auth.mjs +9 -9
- package/fesm2022/ng-vagabond-lab-ng-dsv-module-contact.mjs +3 -3
- package/fesm2022/{ng-vagabond-lab-ng-dsv-module-news-news-form.container-CGfhZFgr.mjs → ng-vagabond-lab-ng-dsv-module-news-news-form.container-B89sqBxq.mjs} +8 -6
- package/fesm2022/ng-vagabond-lab-ng-dsv-module-news-news-form.container-B89sqBxq.mjs.map +1 -0
- package/fesm2022/ng-vagabond-lab-ng-dsv-module-news-news-form.container-DYj7fb2V.mjs +105 -0
- package/fesm2022/ng-vagabond-lab-ng-dsv-module-news-news-form.container-DYj7fb2V.mjs.map +1 -0
- package/fesm2022/ng-vagabond-lab-ng-dsv-module-news-news-list.container-BOocOeoi.mjs +176 -0
- package/fesm2022/ng-vagabond-lab-ng-dsv-module-news-news-list.container-BOocOeoi.mjs.map +1 -0
- package/fesm2022/{ng-vagabond-lab-ng-dsv-module-news-news-list.container-CkUQEI5Q.mjs → ng-vagabond-lab-ng-dsv-module-news-news-list.container-dRUMZot2.mjs} +19 -10
- package/fesm2022/ng-vagabond-lab-ng-dsv-module-news-news-list.container-dRUMZot2.mjs.map +1 -0
- package/fesm2022/ng-vagabond-lab-ng-dsv-module-news-news-list.service-C4rdx_5c.mjs +38 -0
- package/fesm2022/ng-vagabond-lab-ng-dsv-module-news-news-list.service-C4rdx_5c.mjs.map +1 -0
- package/fesm2022/ng-vagabond-lab-ng-dsv-module-news-news-list.service-MB7ocRqE.mjs +38 -0
- package/fesm2022/ng-vagabond-lab-ng-dsv-module-news-news-list.service-MB7ocRqE.mjs.map +1 -0
- package/fesm2022/ng-vagabond-lab-ng-dsv-module-news-news.container-BBDrX_yB.mjs +182 -0
- package/fesm2022/ng-vagabond-lab-ng-dsv-module-news-news.container-BBDrX_yB.mjs.map +1 -0
- package/fesm2022/{ng-vagabond-lab-ng-dsv-module-news-news.container-Ce60PdDH.mjs → ng-vagabond-lab-ng-dsv-module-news-news.container-Dv48TkBy.mjs} +16 -13
- package/fesm2022/ng-vagabond-lab-ng-dsv-module-news-news.container-Dv48TkBy.mjs.map +1 -0
- package/fesm2022/ng-vagabond-lab-ng-dsv-module-news.mjs +4 -4
- package/fesm2022/ng-vagabond-lab-ng-dsv-module-notification.mjs +15 -15
- package/fesm2022/ng-vagabond-lab-ng-dsv-platform.mjs +3 -3
- package/fesm2022/ng-vagabond-lab-ng-dsv-router.mjs +9 -9
- package/fesm2022/ng-vagabond-lab-ng-dsv-storage.mjs +7 -4
- package/fesm2022/ng-vagabond-lab-ng-dsv-storage.mjs.map +1 -1
- package/fesm2022/ng-vagabond-lab-ng-dsv-template.mjs +18 -18
- package/package.json +5 -1
- package/types/ng-vagabond-lab-ng-dsv-base-service.d.ts +1 -1
- package/types/ng-vagabond-lab-ng-dsv-base.d.ts +1 -1
- package/types/ng-vagabond-lab-ng-dsv-date.d.ts.map +1 -0
- package/types/ng-vagabond-lab-ng-dsv-ds-accordion.d.ts.map +1 -0
- package/types/ng-vagabond-lab-ng-dsv-ds-avatar.d.ts.map +1 -0
- package/types/ng-vagabond-lab-ng-dsv-ds-file.d.ts +12 -1
- package/types/ng-vagabond-lab-ng-dsv-ds-file.d.ts.map +1 -0
- package/types/ng-vagabond-lab-ng-dsv-ds-form-reactive.d.ts.map +1 -0
- package/types/ng-vagabond-lab-ng-dsv-ds-header.d.ts.map +1 -0
- package/types/ng-vagabond-lab-ng-dsv-ds-img.d.ts.map +1 -0
- package/types/ng-vagabond-lab-ng-dsv-ds-linear-progress.d.ts.map +1 -0
- package/types/ng-vagabond-lab-ng-dsv-ds-link-pipe.d.ts.map +1 -0
- package/types/ng-vagabond-lab-ng-dsv-ds-list.d.ts.map +1 -0
- package/types/ng-vagabond-lab-ng-dsv-ds-markdown.d.ts +12 -0
- package/types/ng-vagabond-lab-ng-dsv-ds-markdown.d.ts.map +1 -0
- package/types/ng-vagabond-lab-ng-dsv-ds-paginate.d.ts.map +1 -0
- package/types/ng-vagabond-lab-ng-dsv-ds-skeleton.d.ts.map +1 -0
- package/types/ng-vagabond-lab-ng-dsv-ds-tab.d.ts.map +1 -0
- package/types/ng-vagabond-lab-ng-dsv-ds-table.d.ts.map +1 -0
- package/types/ng-vagabond-lab-ng-dsv-ds-tooltip.d.ts.map +1 -0
- package/types/ng-vagabond-lab-ng-dsv-module-admin.d.ts.map +1 -0
- package/types/ng-vagabond-lab-ng-dsv-module-contact.d.ts.map +1 -0
- package/types/ng-vagabond-lab-ng-dsv-module-news.d.ts.map +1 -0
- package/types/ng-vagabond-lab-ng-dsv-module-notification.d.ts.map +1 -0
- package/types/ng-vagabond-lab-ng-dsv-template.d.ts.map +1 -0
- package/fesm2022/ng-vagabond-lab-ng-dsv-module-news-news-form.container-CGfhZFgr.mjs.map +0 -1
- package/fesm2022/ng-vagabond-lab-ng-dsv-module-news-news-list.container-CkUQEI5Q.mjs.map +0 -1
- package/fesm2022/ng-vagabond-lab-ng-dsv-module-news-news-list.service-CVVSV7se.mjs +0 -65
- package/fesm2022/ng-vagabond-lab-ng-dsv-module-news-news-list.service-CVVSV7se.mjs.map +0 -1
- package/fesm2022/ng-vagabond-lab-ng-dsv-module-news-news.container-Ce60PdDH.mjs.map +0 -1
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, Component, inject, Injectable, signal, computed, effect } from '@angular/core';
|
|
3
|
+
import { RouterLink } from '@angular/router';
|
|
4
|
+
import { BaseRouteContainer } from '@ng-vagabond-lab/ng-dsv/base';
|
|
5
|
+
import { DsvButtonComponent } from '@ng-vagabond-lab/ng-dsv/ds/button';
|
|
6
|
+
import { AuthService } from '@ng-vagabond-lab/ng-dsv/module/auth';
|
|
7
|
+
import { DateFormatPipe } from '@ng-vagabond-lab/ng-dsv/date';
|
|
8
|
+
import { DsvCardComponent, DsvCardHeaderComponent } from '@ng-vagabond-lab/ng-dsv/ds/card';
|
|
9
|
+
import { DsvFileShowComponent } from '@ng-vagabond-lab/ng-dsv/ds/file';
|
|
10
|
+
import { DsvMarkdownContainer } from '@ng-vagabond-lab/ng-dsv/ds/markdown';
|
|
11
|
+
import { BaseFetchService } from '@ng-vagabond-lab/ng-dsv/base/service';
|
|
12
|
+
import { StoreMap } from '@ng-vagabond-lab/ng-dsv/storage';
|
|
13
|
+
import { N as NewsListService } from './ng-vagabond-lab-ng-dsv-module-news-news-list.service-C4rdx_5c.mjs';
|
|
14
|
+
|
|
15
|
+
const _c0 = [[["", 8, "update-button"]]];
|
|
16
|
+
const _c1 = [".update-button"];
|
|
17
|
+
function NewsCardComponent_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
18
|
+
i0.ɵɵelement(0, "dsv-file-show", 0);
|
|
19
|
+
} if (rf & 2) {
|
|
20
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
21
|
+
i0.ɵɵproperty("src", ctx_r0.news()?.image ?? "");
|
|
22
|
+
} }
|
|
23
|
+
function NewsCardComponent_Conditional_8_Template(rf, ctx) { if (rf & 1) {
|
|
24
|
+
i0.ɵɵtext(0);
|
|
25
|
+
i0.ɵɵpipe(1, "formatDate");
|
|
26
|
+
} if (rf & 2) {
|
|
27
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
28
|
+
i0.ɵɵtextInterpolate1(" Le ", i0.ɵɵpipeBind2(1, 1, ctx_r0.news()?.creationDate, true), " ");
|
|
29
|
+
} }
|
|
30
|
+
class NewsCardComponent {
|
|
31
|
+
news = input(/* @ts-ignore */
|
|
32
|
+
...(ngDevMode ? [undefined, { debugName: "news" }] : /* istanbul ignore next */ []));
|
|
33
|
+
static ɵfac = function NewsCardComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || NewsCardComponent)(); };
|
|
34
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: NewsCardComponent, selectors: [["app-news-card"]], inputs: { news: [1, "news"] }, ngContentSelectors: _c1, decls: 10, vars: 6, consts: [["url", "/api/", 3, "src"], ["icon", "ri-arrow-left-s-line", "color", "inherit", "routerLink", "/news", 1, "round"], [1, "subtitle"], [3, "data"]], template: function NewsCardComponent_Template(rf, ctx) { if (rf & 1) {
|
|
35
|
+
i0.ɵɵprojectionDef(_c0);
|
|
36
|
+
i0.ɵɵelementStart(0, "dsv-card");
|
|
37
|
+
i0.ɵɵconditionalCreate(1, NewsCardComponent_Conditional_1_Template, 1, 1, "dsv-file-show", 0);
|
|
38
|
+
i0.ɵɵelementStart(2, "dsv-card-header");
|
|
39
|
+
i0.ɵɵelement(3, "dsv-button", 1);
|
|
40
|
+
i0.ɵɵelementStart(4, "h1");
|
|
41
|
+
i0.ɵɵtext(5);
|
|
42
|
+
i0.ɵɵelementEnd();
|
|
43
|
+
i0.ɵɵprojection(6);
|
|
44
|
+
i0.ɵɵelementEnd();
|
|
45
|
+
i0.ɵɵelementStart(7, "span", 2);
|
|
46
|
+
i0.ɵɵconditionalCreate(8, NewsCardComponent_Conditional_8_Template, 2, 4);
|
|
47
|
+
i0.ɵɵelementEnd();
|
|
48
|
+
i0.ɵɵelement(9, "dsv-markdown-container", 3);
|
|
49
|
+
i0.ɵɵelementEnd();
|
|
50
|
+
} if (rf & 2) {
|
|
51
|
+
i0.ɵɵadvance();
|
|
52
|
+
i0.ɵɵconditional(ctx.news()?.image ? 1 : -1);
|
|
53
|
+
i0.ɵɵadvance(3);
|
|
54
|
+
i0.ɵɵclassProp("error", !ctx.news()?.active);
|
|
55
|
+
i0.ɵɵadvance();
|
|
56
|
+
i0.ɵɵtextInterpolate(ctx.news()?.title);
|
|
57
|
+
i0.ɵɵadvance(3);
|
|
58
|
+
i0.ɵɵconditional(ctx.news()?.creationDate ? 8 : -1);
|
|
59
|
+
i0.ɵɵadvance();
|
|
60
|
+
i0.ɵɵproperty("data", ctx.news()?.description);
|
|
61
|
+
} }, dependencies: [DsvCardComponent,
|
|
62
|
+
DsvCardHeaderComponent,
|
|
63
|
+
DsvButtonComponent,
|
|
64
|
+
RouterLink,
|
|
65
|
+
DsvFileShowComponent,
|
|
66
|
+
DsvMarkdownContainer,
|
|
67
|
+
DateFormatPipe], styles: ["[_nghost-%COMP%]{display:flex;width:100%;min-height:300px;margin-right:5px;overflow:hidden}[_nghost-%COMP%] dsv-card[_ngcontent-%COMP%]{position:relative}[_nghost-%COMP%] dsv-card[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{margin:0}[_nghost-%COMP%] dsv-card[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0 0 5px}[_nghost-%COMP%] dsv-card[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:calc(100% + 20px)}[_nghost-%COMP%] dsv-card[_ngcontent-%COMP%] .news-image[_ngcontent-%COMP%]{margin:0 0 5px;width:100%}[_nghost-%COMP%] dsv-card[_ngcontent-%COMP%] dsv-card-header[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:5px;margin:0 0 10px}[_nghost-%COMP%] dsv-card[_ngcontent-%COMP%] dsv-card-header[_ngcontent-%COMP%] dsv-button.round[_ngcontent-%COMP%]{--%NS%button-border-radius: 50%}[_nghost-%COMP%] dsv-card[_ngcontent-%COMP%] dsv-card-header[_ngcontent-%COMP%] h1[_ngcontent-%COMP%], [_nghost-%COMP%] dsv-card[_ngcontent-%COMP%] dsv-card-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{flex:1}[_nghost-%COMP%] dsv-markdown-container[_ngcontent-%COMP%]{margin:20px 0}"] });
|
|
68
|
+
}
|
|
69
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NewsCardComponent, [{
|
|
70
|
+
type: Component,
|
|
71
|
+
args: [{ selector: 'app-news-card', imports: [
|
|
72
|
+
DsvCardComponent,
|
|
73
|
+
DateFormatPipe,
|
|
74
|
+
DsvCardHeaderComponent,
|
|
75
|
+
DsvButtonComponent,
|
|
76
|
+
RouterLink,
|
|
77
|
+
DsvFileShowComponent,
|
|
78
|
+
DsvMarkdownContainer,
|
|
79
|
+
], template: "<dsv-card>\n @if (news()?.image) {\n <dsv-file-show url=\"/api/\" [src]=\"news()?.image ?? ''\" />\n }\n <dsv-card-header>\n <dsv-button class=\"round\" icon=\"ri-arrow-left-s-line\" color=\"inherit\" routerLink=\"/news\" />\n <h1 [class.error]=\"!news()?.active\">{{ news()?.title }}</h1>\n <ng-content select=\".update-button\"></ng-content>\n </dsv-card-header>\n <span class=\"subtitle\">\n @if (news()?.creationDate) {\n Le {{ news()?.creationDate! | formatDate: true }}\n }\n </span>\n <dsv-markdown-container [data]=\"news()?.description\" />\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"] }]
|
|
80
|
+
}], null, { news: [{ type: i0.Input, args: [{ isSignal: true, alias: "news", required: false }] }] }); })();
|
|
81
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(NewsCardComponent, { className: "NewsCardComponent", filePath: "component/card/news-card.component.ts", lineNumber: 24 }); })();
|
|
82
|
+
|
|
83
|
+
class NewsService extends BaseFetchService {
|
|
84
|
+
newsListService = inject(NewsListService);
|
|
85
|
+
news = new StoreMap();
|
|
86
|
+
doFetchNews(newsId) {
|
|
87
|
+
const url = '/news/' + newsId;
|
|
88
|
+
const data = this.getDataFromState(url);
|
|
89
|
+
if (data) {
|
|
90
|
+
this.initNews(newsId, data);
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
this.apiService.get(url, (data) => {
|
|
94
|
+
this.setDataToState(url, data);
|
|
95
|
+
this.initNews(newsId, data);
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
initNews(newsId, data) {
|
|
99
|
+
this.news.set(newsId, data);
|
|
100
|
+
}
|
|
101
|
+
createOrUpdate(news, callback) {
|
|
102
|
+
const toast = "La news '" + news.title + "' a bien été " + (news.id ? 'mise a jour' : 'créer') + '.';
|
|
103
|
+
this.apiService.createOrUpdate('news', news, (data) => {
|
|
104
|
+
this.news.set(data.id, data);
|
|
105
|
+
this.newsListService.fetchByPage(this.newsListService.search(), 1);
|
|
106
|
+
callback?.(data);
|
|
107
|
+
}, toast);
|
|
108
|
+
}
|
|
109
|
+
static ɵfac = /*@__PURE__*/ (() => { let ɵNewsService_BaseFactory; return function NewsService_Factory(__ngFactoryType__) { return (ɵNewsService_BaseFactory || (ɵNewsService_BaseFactory = i0.ɵɵgetInheritedFactory(NewsService)))(__ngFactoryType__ || NewsService); }; })();
|
|
110
|
+
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: NewsService, factory: NewsService.ɵfac, providedIn: 'root' });
|
|
111
|
+
}
|
|
112
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NewsService, [{
|
|
113
|
+
type: Injectable,
|
|
114
|
+
args: [{
|
|
115
|
+
providedIn: 'root',
|
|
116
|
+
}]
|
|
117
|
+
}], null, null); })();
|
|
118
|
+
|
|
119
|
+
function NewsContainer_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
120
|
+
i0.ɵɵelement(0, "dsv-button", 2);
|
|
121
|
+
} if (rf & 2) {
|
|
122
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
123
|
+
i0.ɵɵproperty("routerLink", "/news/update/" + ctx_r0.news()?.id);
|
|
124
|
+
} }
|
|
125
|
+
class NewsContainer extends BaseRouteContainer {
|
|
126
|
+
auhService = inject(AuthService);
|
|
127
|
+
newsService = inject(NewsService);
|
|
128
|
+
newsId = signal(0, /* @ts-ignore */
|
|
129
|
+
...(ngDevMode ? [{ debugName: "newsId" }] : /* istanbul ignore next */ []));
|
|
130
|
+
news = signal(undefined, /* @ts-ignore */
|
|
131
|
+
...(ngDevMode ? [{ debugName: "news" }] : /* istanbul ignore next */ []));
|
|
132
|
+
isAdmin = computed(() => this.auhService.hasRole('ADMIN'), /* @ts-ignore */
|
|
133
|
+
...(ngDevMode ? [{ debugName: "isAdmin" }] : /* istanbul ignore next */ []));
|
|
134
|
+
constructor() {
|
|
135
|
+
super();
|
|
136
|
+
effect(() => {
|
|
137
|
+
const newsId = Number(this.routeParams()?.['newsId']);
|
|
138
|
+
if (Number.isInteger(newsId)) {
|
|
139
|
+
this.newsId?.set(newsId);
|
|
140
|
+
if (this.newsService.news.get(newsId)) {
|
|
141
|
+
const news = this.newsService.news.get(newsId);
|
|
142
|
+
this.seoService.setMeta(news?.title, news?.resume, news?.image);
|
|
143
|
+
}
|
|
144
|
+
else if (this.authService.canFetch()) {
|
|
145
|
+
this.newsService.doFetchNews(newsId);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
effect(() => {
|
|
150
|
+
if (this.newsId() && this.newsService.news.data()) {
|
|
151
|
+
this.news.set(this.newsService.news.get(this.newsId()));
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
async doShare(news) {
|
|
156
|
+
await globalThis.navigator.share({
|
|
157
|
+
title: news.title,
|
|
158
|
+
text: news.resume,
|
|
159
|
+
url: 'https://movie-keeper.fr/news/' + news.id,
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
static ɵfac = function NewsContainer_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || NewsContainer)(); };
|
|
163
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: NewsContainer, selectors: [["app-news"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 3, vars: 2, consts: [[3, "news"], ["color", "secondary", "variant", "outlined", "icon", "ri-share-line", 1, "update-button", 3, "callback"], ["color", "secondary", "variant", "outlined", "icon", "ri-tools-line", 1, "update-button", 3, "routerLink"]], template: function NewsContainer_Template(rf, ctx) { if (rf & 1) {
|
|
164
|
+
i0.ɵɵelementStart(0, "app-news-card", 0)(1, "dsv-button", 1);
|
|
165
|
+
i0.ɵɵlistener("callback", function NewsContainer_Template_dsv_button_callback_1_listener() { return ctx.doShare(ctx.news()); });
|
|
166
|
+
i0.ɵɵelementEnd();
|
|
167
|
+
i0.ɵɵconditionalCreate(2, NewsContainer_Conditional_2_Template, 1, 1, "dsv-button", 2);
|
|
168
|
+
i0.ɵɵelementEnd();
|
|
169
|
+
} if (rf & 2) {
|
|
170
|
+
i0.ɵɵproperty("news", ctx.news());
|
|
171
|
+
i0.ɵɵadvance(2);
|
|
172
|
+
i0.ɵɵconditional(ctx.isAdmin() ? 2 : -1);
|
|
173
|
+
} }, dependencies: [NewsCardComponent, DsvButtonComponent, RouterLink], styles: ["[_nghost-%COMP%]{display:flex}"] });
|
|
174
|
+
}
|
|
175
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NewsContainer, [{
|
|
176
|
+
type: Component,
|
|
177
|
+
args: [{ selector: 'app-news', imports: [NewsCardComponent, DsvButtonComponent, RouterLink], template: "<app-news-card [news]=\"news()\">\n <dsv-button\n class=\"update-button\"\n color=\"secondary\"\n variant=\"outlined\"\n icon=\"ri-share-line\"\n (callback)=\"doShare(news()!)\"\n />\n @if (isAdmin()) {\n <dsv-button\n class=\"update-button\"\n color=\"secondary\"\n variant=\"outlined\"\n icon=\"ri-tools-line\"\n [routerLink]=\"'/news/update/' + news()?.id\"\n />\n }\n</app-news-card>\n", styles: [":host{display:flex}\n"] }]
|
|
178
|
+
}], () => [], null); })();
|
|
179
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(NewsContainer, { className: "NewsContainer", filePath: "container/news.container.ts", lineNumber: 16 }); })();
|
|
180
|
+
|
|
181
|
+
export { NewsContainer };
|
|
182
|
+
//# sourceMappingURL=ng-vagabond-lab-ng-dsv-module-news-news.container-BBDrX_yB.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ng-vagabond-lab-ng-dsv-module-news-news.container-BBDrX_yB.mjs","sources":["../../../projects/ng-dsv/module/news/component/card/news-card.component.html","../../../projects/ng-dsv/module/news/component/card/news-card.component.ts","../../../projects/ng-dsv/module/news/service/news.service.ts","../../../projects/ng-dsv/module/news/container/news.container.html","../../../projects/ng-dsv/module/news/container/news.container.ts"],"sourcesContent":["<dsv-card>\n @if (news()?.image) {\n <dsv-file-show url=\"/api/\" [src]=\"news()?.image ?? ''\" />\n }\n <dsv-card-header>\n <dsv-button class=\"round\" icon=\"ri-arrow-left-s-line\" color=\"inherit\" routerLink=\"/news\" />\n <h1 [class.error]=\"!news()?.active\">{{ news()?.title }}</h1>\n <ng-content select=\".update-button\"></ng-content>\n </dsv-card-header>\n <span class=\"subtitle\">\n @if (news()?.creationDate) {\n Le {{ news()?.creationDate! | formatDate: true }}\n }\n </span>\n <dsv-markdown-container [data]=\"news()?.description\" />\n</dsv-card>\n","import { Component, input } from '@angular/core';\nimport { RouterLink } from '@angular/router';\nimport { DateFormatPipe } from '@ng-vagabond-lab/ng-dsv/date';\nimport { DsvButtonComponent } from '@ng-vagabond-lab/ng-dsv/ds/button';\nimport { DsvCardComponent, DsvCardHeaderComponent } 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 { NewsDto } from '../../dto/news.dto';\n\n@Component({\n selector: 'app-news-card',\n imports: [\n DsvCardComponent,\n DateFormatPipe,\n DsvCardHeaderComponent,\n DsvButtonComponent,\n RouterLink,\n DsvFileShowComponent,\n DsvMarkdownContainer,\n ],\n templateUrl: './news-card.component.html',\n styleUrl: './news-card.component.scss',\n})\nexport class NewsCardComponent {\n readonly news = input<NewsDto>();\n}\n","import { inject, Injectable } from '@angular/core';\nimport { ID } from '@ng-vagabond-lab/ng-dsv/api';\nimport { BaseFetchService } from '@ng-vagabond-lab/ng-dsv/base/service';\nimport { StoreMap } from '@ng-vagabond-lab/ng-dsv/storage';\nimport { NewsDto } from '../dto/news.dto';\nimport { NewsListService } from './list/news-list.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class NewsService extends BaseFetchService<NewsDto> {\n readonly newsListService = inject(NewsListService);\n readonly news = new StoreMap<ID, NewsDto>();\n\n doFetchNews(newsId: number): void {\n const url = '/news/' + newsId;\n const data = this.getDataFromState(url);\n if (data) {\n this.initNews(newsId, data);\n return;\n }\n this.apiService.get<NewsDto>(url, (data) => {\n this.setDataToState(url, data);\n this.initNews(newsId, data);\n });\n }\n\n initNews(newsId: ID, data: NewsDto) {\n this.news.set(newsId, data);\n }\n\n createOrUpdate(news: NewsDto, callback?: (data: NewsDto) => void) {\n const toast = \"La news '\" + news.title + \"' a bien été \" + (news.id ? 'mise a jour' : 'créer') + '.';\n this.apiService.createOrUpdate<NewsDto>(\n 'news',\n news,\n (data) => {\n this.news.set(data.id, data);\n this.newsListService.fetchByPage(this.newsListService.search(), 1);\n callback?.(data);\n },\n toast,\n );\n }\n}\n","<app-news-card [news]=\"news()\">\n <dsv-button\n class=\"update-button\"\n color=\"secondary\"\n variant=\"outlined\"\n icon=\"ri-share-line\"\n (callback)=\"doShare(news()!)\"\n />\n @if (isAdmin()) {\n <dsv-button\n class=\"update-button\"\n color=\"secondary\"\n variant=\"outlined\"\n icon=\"ri-tools-line\"\n [routerLink]=\"'/news/update/' + news()?.id\"\n />\n }\n</app-news-card>\n","import { Component, computed, effect, inject, signal } from '@angular/core';\nimport { RouterLink } from '@angular/router';\nimport { BaseRouteContainer } from '@ng-vagabond-lab/ng-dsv/base';\nimport { DsvButtonComponent } from '@ng-vagabond-lab/ng-dsv/ds/button';\nimport { AuthService } from '@ng-vagabond-lab/ng-dsv/module/auth';\nimport { NewsCardComponent } from '../component/card/news-card.component';\nimport { NewsDto } from '../dto/news.dto';\nimport { NewsService } from '../service/news.service';\n\n@Component({\n selector: 'app-news',\n imports: [NewsCardComponent, DsvButtonComponent, RouterLink],\n templateUrl: './news.container.html',\n styleUrl: './news.container.scss',\n})\nexport class NewsContainer extends BaseRouteContainer {\n readonly auhService = inject(AuthService);\n readonly newsService = inject(NewsService);\n\n readonly newsId = signal<number>(0);\n readonly news = signal<NewsDto | undefined>(undefined);\n\n readonly isAdmin = computed<boolean>(() => this.auhService.hasRole('ADMIN'));\n\n constructor() {\n super();\n effect(() => {\n const newsId = Number(this.routeParams()?.['newsId']);\n if (Number.isInteger(newsId)) {\n this.newsId?.set(newsId);\n if (this.newsService.news.get(newsId)) {\n const news = this.newsService.news.get(newsId);\n this.seoService.setMeta(news?.title!, news?.resume!, news?.image);\n } else if (this.authService.canFetch()) {\n this.newsService.doFetchNews(newsId);\n }\n }\n });\n effect(() => {\n if (this.newsId() && this.newsService.news.data()) {\n this.news.set(this.newsService.news.get(this.newsId()));\n }\n });\n }\n\n async doShare(news: NewsDto): Promise<void> {\n await globalThis.navigator.share({\n title: news.title,\n text: news.resume,\n url: 'https://movie-keeper.fr/news/' + news.id,\n });\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;IAEQ,EAAA,CAAA,SAAA,CAAA,CAAA,EAAA,eAAA,EAAA,CAAA,CAAyD;;;IAA9B,EAAA,CAAA,UAAA,CAAA,KAAA,EAAA,MAAA,CAAA,IAAA,EAAA,EAAA,KAAA,IAAA,EAAA,CAA2B;;;IASlD,EAAA,CAAA,MAAA,CAAA,CAAA,CACJ;;;;IADI,EAAA,CAAA,kBAAA,CAAA,MAAA,EAAA,EAAA,CAAA,WAAA,CAAA,CAAA,EAAA,CAAA,EAAA,MAAA,CAAA,IAAA,EAAA,EAAA,YAAA,EAAA,IAAA,CAAA,EAAA,GAAA,CACJ;;MCWK,iBAAiB,CAAA;AACjB,IAAA,IAAI,GAAG,KAAK;wFAAW;2GADvB,iBAAiB,GAAA,CAAA,CAAA,CAAA;6DAAjB,iBAAiB,EAAA,SAAA,EAAA,CAAA,CAAA,eAAA,CAAA,CAAA,EAAA,MAAA,EAAA,EAAA,IAAA,EAAA,CAAA,CAAA,EAAA,MAAA,CAAA,EAAA,EAAA,kBAAA,EAAA,GAAA,EAAA,KAAA,EAAA,EAAA,EAAA,IAAA,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,CAAA,KAAA,EAAA,OAAA,EAAA,CAAA,EAAA,KAAA,CAAA,EAAA,CAAA,M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}
|
|
@@ -6,26 +6,29 @@ import { DsvButtonComponent } from '@ng-vagabond-lab/ng-dsv/ds/button';
|
|
|
6
6
|
import { AuthService } from '@ng-vagabond-lab/ng-dsv/module/auth';
|
|
7
7
|
import { DateFormatPipe } from '@ng-vagabond-lab/ng-dsv/date';
|
|
8
8
|
import { DsvCardComponent, DsvCardHeaderComponent } from '@ng-vagabond-lab/ng-dsv/ds/card';
|
|
9
|
-
import {
|
|
9
|
+
import { DsvFileShowComponent } from '@ng-vagabond-lab/ng-dsv/ds/file';
|
|
10
|
+
import { DsvMarkdownContainer } from '@ng-vagabond-lab/ng-dsv/ds/markdown';
|
|
10
11
|
import { BaseFetchService } from '@ng-vagabond-lab/ng-dsv/base/service';
|
|
11
12
|
import { StoreMap } from '@ng-vagabond-lab/ng-dsv/storage';
|
|
13
|
+
import { N as NewsListService } from './ng-vagabond-lab-ng-dsv-module-news-news-list.service-MB7ocRqE.mjs';
|
|
12
14
|
|
|
13
15
|
class NewsCardComponent {
|
|
14
16
|
news = input(/* @ts-ignore */
|
|
15
17
|
...(ngDevMode ? [undefined, { debugName: "news" }] : /* istanbul ignore next */ []));
|
|
16
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
17
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.
|
|
18
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NewsCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
19
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: NewsCardComponent, isStandalone: true, selector: "app-news-card", inputs: { news: { classPropertyName: "news", publicName: "news", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<dsv-card>\n @if (news()?.image) {\n <dsv-file-show url=\"/api/\" [src]=\"news()?.image ?? ''\" />\n }\n <dsv-card-header>\n <dsv-button class=\"round\" icon=\"ri-arrow-left-s-line\" color=\"inherit\" routerLink=\"/news\" />\n <h1 [class.error]=\"!news()?.active\">{{ news()?.title }}</h1>\n <ng-content select=\".update-button\"></ng-content>\n </dsv-card-header>\n <span class=\"subtitle\">\n @if (news()?.creationDate) {\n Le {{ news()?.creationDate! | formatDate: true }}\n }\n </span>\n <dsv-markdown-container [data]=\"news()?.description\" />\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"], dependencies: [{ kind: "component", type: DsvCardComponent, selector: "dsv-card", inputs: ["border"] }, { kind: "component", type: DsvCardHeaderComponent, selector: "dsv-card-header" }, { kind: "component", type: DsvButtonComponent, selector: "dsv-button", inputs: ["libelle", "routerLink", "icon", "iconEnd", "disabled", "noHover", "type", "prevent"], outputs: ["callback"] }, { 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" }] });
|
|
18
20
|
}
|
|
19
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NewsCardComponent, decorators: [{
|
|
20
22
|
type: Component,
|
|
21
23
|
args: [{ selector: 'app-news-card', imports: [
|
|
22
24
|
DsvCardComponent,
|
|
23
25
|
DateFormatPipe,
|
|
24
|
-
NewsMarkdownContainer,
|
|
25
26
|
DsvCardHeaderComponent,
|
|
26
27
|
DsvButtonComponent,
|
|
27
28
|
RouterLink,
|
|
28
|
-
|
|
29
|
+
DsvFileShowComponent,
|
|
30
|
+
DsvMarkdownContainer,
|
|
31
|
+
], template: "<dsv-card>\n @if (news()?.image) {\n <dsv-file-show url=\"/api/\" [src]=\"news()?.image ?? ''\" />\n }\n <dsv-card-header>\n <dsv-button class=\"round\" icon=\"ri-arrow-left-s-line\" color=\"inherit\" routerLink=\"/news\" />\n <h1 [class.error]=\"!news()?.active\">{{ news()?.title }}</h1>\n <ng-content select=\".update-button\"></ng-content>\n </dsv-card-header>\n <span class=\"subtitle\">\n @if (news()?.creationDate) {\n Le {{ news()?.creationDate! | formatDate: true }}\n }\n </span>\n <dsv-markdown-container [data]=\"news()?.description\" />\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"] }]
|
|
29
32
|
}], propDecorators: { news: [{ type: i0.Input, args: [{ isSignal: true, alias: "news", required: false }] }] } });
|
|
30
33
|
|
|
31
34
|
class NewsService extends BaseFetchService {
|
|
@@ -54,10 +57,10 @@ class NewsService extends BaseFetchService {
|
|
|
54
57
|
callback?.(data);
|
|
55
58
|
}, toast);
|
|
56
59
|
}
|
|
57
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
58
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.
|
|
60
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NewsService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
61
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NewsService, providedIn: 'root' });
|
|
59
62
|
}
|
|
60
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
63
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NewsService, decorators: [{
|
|
61
64
|
type: Injectable,
|
|
62
65
|
args: [{
|
|
63
66
|
providedIn: 'root',
|
|
@@ -101,13 +104,13 @@ class NewsContainer extends BaseRouteContainer {
|
|
|
101
104
|
url: 'https://movie-keeper.fr/news/' + news.id,
|
|
102
105
|
});
|
|
103
106
|
}
|
|
104
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
105
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.
|
|
107
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NewsContainer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
108
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: NewsContainer, isStandalone: true, selector: "app-news", usesInheritance: true, ngImport: i0, template: "<app-news-card [news]=\"news()\">\n <dsv-button\n class=\"update-button\"\n color=\"secondary\"\n variant=\"outlined\"\n icon=\"ri-share-line\"\n (callback)=\"doShare(news()!)\"\n />\n @if (isAdmin()) {\n <dsv-button\n class=\"update-button\"\n color=\"secondary\"\n variant=\"outlined\"\n icon=\"ri-tools-line\"\n [routerLink]=\"'/news/update/' + news()?.id\"\n />\n }\n</app-news-card>\n", styles: [":host{display:flex}\n"], dependencies: [{ kind: "component", type: NewsCardComponent, selector: "app-news-card", inputs: ["news"] }, { kind: "component", type: DsvButtonComponent, selector: "dsv-button", inputs: ["libelle", "routerLink", "icon", "iconEnd", "disabled", "noHover", "type", "prevent"], outputs: ["callback"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }] });
|
|
106
109
|
}
|
|
107
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
110
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NewsContainer, decorators: [{
|
|
108
111
|
type: Component,
|
|
109
112
|
args: [{ selector: 'app-news', imports: [NewsCardComponent, DsvButtonComponent, RouterLink], template: "<app-news-card [news]=\"news()\">\n <dsv-button\n class=\"update-button\"\n color=\"secondary\"\n variant=\"outlined\"\n icon=\"ri-share-line\"\n (callback)=\"doShare(news()!)\"\n />\n @if (isAdmin()) {\n <dsv-button\n class=\"update-button\"\n color=\"secondary\"\n variant=\"outlined\"\n icon=\"ri-tools-line\"\n [routerLink]=\"'/news/update/' + news()?.id\"\n />\n }\n</app-news-card>\n", styles: [":host{display:flex}\n"] }]
|
|
110
113
|
}], ctorParameters: () => [] });
|
|
111
114
|
|
|
112
115
|
export { NewsContainer };
|
|
113
|
-
//# sourceMappingURL=ng-vagabond-lab-ng-dsv-module-news-news.container-
|
|
116
|
+
//# sourceMappingURL=ng-vagabond-lab-ng-dsv-module-news-news.container-Dv48TkBy.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ng-vagabond-lab-ng-dsv-module-news-news.container-Dv48TkBy.mjs","sources":["../../../projects/ng-dsv/module/news/component/card/news-card.component.ts","../../../projects/ng-dsv/module/news/component/card/news-card.component.html","../../../projects/ng-dsv/module/news/service/news.service.ts","../../../projects/ng-dsv/module/news/container/news.container.ts","../../../projects/ng-dsv/module/news/container/news.container.html"],"sourcesContent":["import { Component, input } from '@angular/core';\nimport { RouterLink } from '@angular/router';\nimport { DateFormatPipe } from '@ng-vagabond-lab/ng-dsv/date';\nimport { DsvButtonComponent } from '@ng-vagabond-lab/ng-dsv/ds/button';\nimport { DsvCardComponent, DsvCardHeaderComponent } 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 { NewsDto } from '../../dto/news.dto';\n\n@Component({\n selector: 'app-news-card',\n imports: [\n DsvCardComponent,\n DateFormatPipe,\n DsvCardHeaderComponent,\n DsvButtonComponent,\n RouterLink,\n DsvFileShowComponent,\n DsvMarkdownContainer,\n ],\n templateUrl: './news-card.component.html',\n styleUrl: './news-card.component.scss',\n})\nexport class NewsCardComponent {\n readonly news = input<NewsDto>();\n}\n","<dsv-card>\n @if (news()?.image) {\n <dsv-file-show url=\"/api/\" [src]=\"news()?.image ?? ''\" />\n }\n <dsv-card-header>\n <dsv-button class=\"round\" icon=\"ri-arrow-left-s-line\" color=\"inherit\" routerLink=\"/news\" />\n <h1 [class.error]=\"!news()?.active\">{{ news()?.title }}</h1>\n <ng-content select=\".update-button\"></ng-content>\n </dsv-card-header>\n <span class=\"subtitle\">\n @if (news()?.creationDate) {\n Le {{ news()?.creationDate! | formatDate: true }}\n }\n </span>\n <dsv-markdown-container [data]=\"news()?.description\" />\n</dsv-card>\n","import { inject, Injectable } from '@angular/core';\nimport { ID } from '@ng-vagabond-lab/ng-dsv/api';\nimport { BaseFetchService } from '@ng-vagabond-lab/ng-dsv/base/service';\nimport { StoreMap } from '@ng-vagabond-lab/ng-dsv/storage';\nimport { NewsDto } from '../dto/news.dto';\nimport { NewsListService } from './list/news-list.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class NewsService extends BaseFetchService<NewsDto> {\n readonly newsListService = inject(NewsListService);\n readonly news = new StoreMap<ID, NewsDto>();\n\n doFetchNews(newsId: number): void {\n const url = '/news/' + newsId;\n const data = this.getDataFromState(url);\n if (data) {\n this.initNews(newsId, data);\n return;\n }\n this.apiService.get<NewsDto>(url, (data) => {\n this.setDataToState(url, data);\n this.initNews(newsId, data);\n });\n }\n\n initNews(newsId: ID, data: NewsDto) {\n this.news.set(newsId, data);\n }\n\n createOrUpdate(news: NewsDto, callback?: (data: NewsDto) => void) {\n const toast = \"La news '\" + news.title + \"' a bien été \" + (news.id ? 'mise a jour' : 'créer') + '.';\n this.apiService.createOrUpdate<NewsDto>(\n 'news',\n news,\n (data) => {\n this.news.set(data.id, data);\n this.newsListService.fetchByPage(this.newsListService.search(), 1);\n callback?.(data);\n },\n toast,\n );\n }\n}\n","import { Component, computed, effect, inject, signal } from '@angular/core';\nimport { RouterLink } from '@angular/router';\nimport { BaseRouteContainer } from '@ng-vagabond-lab/ng-dsv/base';\nimport { DsvButtonComponent } from '@ng-vagabond-lab/ng-dsv/ds/button';\nimport { AuthService } from '@ng-vagabond-lab/ng-dsv/module/auth';\nimport { NewsCardComponent } from '../component/card/news-card.component';\nimport { NewsDto } from '../dto/news.dto';\nimport { NewsService } from '../service/news.service';\n\n@Component({\n selector: 'app-news',\n imports: [NewsCardComponent, DsvButtonComponent, RouterLink],\n templateUrl: './news.container.html',\n styleUrl: './news.container.scss',\n})\nexport class NewsContainer extends BaseRouteContainer {\n readonly auhService = inject(AuthService);\n readonly newsService = inject(NewsService);\n\n readonly newsId = signal<number>(0);\n readonly news = signal<NewsDto | undefined>(undefined);\n\n readonly isAdmin = computed<boolean>(() => this.auhService.hasRole('ADMIN'));\n\n constructor() {\n super();\n effect(() => {\n const newsId = Number(this.routeParams()?.['newsId']);\n if (Number.isInteger(newsId)) {\n this.newsId?.set(newsId);\n if (this.newsService.news.get(newsId)) {\n const news = this.newsService.news.get(newsId);\n this.seoService.setMeta(news?.title!, news?.resume!, news?.image);\n } else if (this.authService.canFetch()) {\n this.newsService.doFetchNews(newsId);\n }\n }\n });\n effect(() => {\n if (this.newsId() && this.newsService.news.data()) {\n this.news.set(this.newsService.news.get(this.newsId()));\n }\n });\n }\n\n async doShare(news: NewsDto): Promise<void> {\n await globalThis.navigator.share({\n title: news.title,\n text: news.resume,\n url: 'https://movie-keeper.fr/news/' + news.id,\n });\n }\n}\n","<app-news-card [news]=\"news()\">\n <dsv-button\n class=\"update-button\"\n color=\"secondary\"\n variant=\"outlined\"\n icon=\"ri-share-line\"\n (callback)=\"doShare(news()!)\"\n />\n @if (isAdmin()) {\n <dsv-button\n class=\"update-button\"\n color=\"secondary\"\n variant=\"outlined\"\n icon=\"ri-tools-line\"\n [routerLink]=\"'/news/update/' + news()?.id\"\n />\n }\n</app-news-card>\n"],"names":[],"mappings":";;;;;;;;;;;;;;MAuBa,iBAAiB,CAAA;AACjB,IAAA,IAAI,GAAG,KAAK;wFAAW;uGADvB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAjB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,iBAAiB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,eAAA,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,QAAA,EAAA,EAAA,EAAA,QAAA,ECvB9B,goBAgBA,EAAA,MAA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EAAA,IAAA,EAAE,kBAAkB,8KAAE,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;;2FAIlD,aAAa,EAAA,UAAA,EAAA,CAAA;kBANzB,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,UAAU,WACX,CAAC,iBAAiB,EAAE,kBAAkB,EAAE,UAAU,CAAC,EAAA,QAAA,EAAA,2fAAA,EAAA,MAAA,EAAA,CAAA,uBAAA,CAAA,EAAA;;;;;"}
|
|
@@ -3,21 +3,21 @@ import { authGuard } from '@ng-vagabond-lab/ng-dsv/module/auth';
|
|
|
3
3
|
const NewsRoute = [
|
|
4
4
|
{
|
|
5
5
|
path: '',
|
|
6
|
-
loadComponent: () => import('./ng-vagabond-lab-ng-dsv-module-news-news-list.container-
|
|
6
|
+
loadComponent: () => import('./ng-vagabond-lab-ng-dsv-module-news-news-list.container-dRUMZot2.mjs').then((m) => m.NewsListContainer),
|
|
7
7
|
},
|
|
8
8
|
{
|
|
9
9
|
path: 'create',
|
|
10
|
-
loadComponent: () => import('./ng-vagabond-lab-ng-dsv-module-news-news-form.container-
|
|
10
|
+
loadComponent: () => import('./ng-vagabond-lab-ng-dsv-module-news-news-form.container-B89sqBxq.mjs').then((m) => m.NewsFormContainer),
|
|
11
11
|
canActivate: [authGuard('ADMIN')],
|
|
12
12
|
},
|
|
13
13
|
{
|
|
14
14
|
path: 'update/:newsId',
|
|
15
|
-
loadComponent: () => import('./ng-vagabond-lab-ng-dsv-module-news-news-form.container-
|
|
15
|
+
loadComponent: () => import('./ng-vagabond-lab-ng-dsv-module-news-news-form.container-B89sqBxq.mjs').then((m) => m.NewsFormContainer),
|
|
16
16
|
canActivate: [authGuard('ADMIN')],
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
19
|
path: ':newsId',
|
|
20
|
-
loadComponent: () => import('./ng-vagabond-lab-ng-dsv-module-news-news.container-
|
|
20
|
+
loadComponent: () => import('./ng-vagabond-lab-ng-dsv-module-news-news.container-Dv48TkBy.mjs').then((m) => m.NewsContainer),
|
|
21
21
|
},
|
|
22
22
|
];
|
|
23
23
|
|
|
@@ -41,10 +41,10 @@ class NotificationComponent {
|
|
|
41
41
|
triggerCheckbox() {
|
|
42
42
|
this.checkboxRef()?.nativeElement.querySelector('input').click();
|
|
43
43
|
}
|
|
44
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
45
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.
|
|
44
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NotificationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
45
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: NotificationComponent, isStandalone: true, selector: "app-notification", inputs: { notification: { classPropertyName: "notification", publicName: "notification", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { callback: "callback" }, viewQueries: [{ propertyName: "checkboxRef", first: true, predicate: ["checkbox"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (!readonly()) {\n <div #checkbox>\n <dsv-form-signal-checkbox\n [form]=\"readForm\"\n fieldName=\"read\"\n [withLabel]=\"false\"\n (callbackChange)=\"callback.emit(notification()!)\"\n />\n </div>\n}\n\n<div\n class=\"notification-content\"\n [class.readonly]=\"readonly()\"\n (click)=\"triggerCheckbox()\"\n (keyup)=\"triggerCheckbox()\"\n>\n <b [class.read]=\"!notification()?.read && !readonly()\">\n <span class=\"subtitle\">{{ notification()?.creationDate! | formatDate: true }} : </span>\n {{ notification()?.title }}\n </b>\n <span>{{ notification()?.message }}</span>\n</div>\n\n@if (!readonly()) {\n <dsv-button icon=\"ri-external-link-line\" color=\"secondary\" [routerLink]=\"url()\" [prevent]=\"false\" />\n}\n", styles: [":host{display:flex;flex-direction:row;gap:15px;background:var(--background-card);padding:10px;border-bottom:1px solid var(--border);align-items:center}:host .notification-content{cursor:pointer;display:flex;flex-direction:column;gap:5px;flex:1}:host .notification-content b{margin:5px 0}:host .notification-content.readonly{cursor:default}:host .notification-content .read{color:var(--secondary)}:host dsv-form-signal-checkbox{padding:0!important;margin-bottom:0!important;max-width:30px}:host dsv-button{--button-border-radius: 50%}\n"], dependencies: [{ kind: "component", type: DsvButtonComponent, selector: "dsv-button", inputs: ["libelle", "routerLink", "icon", "iconEnd", "disabled", "noHover", "type", "prevent"], outputs: ["callback"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "component", type: DsvFormSignalCheckboxComponent, selector: "dsv-form-signal-checkbox" }, { kind: "pipe", type: DateFormatPipe, name: "formatDate" }] });
|
|
46
46
|
}
|
|
47
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
47
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NotificationComponent, decorators: [{
|
|
48
48
|
type: Component,
|
|
49
49
|
args: [{ selector: 'app-notification', imports: [DateFormatPipe, DsvButtonComponent, RouterLink, DsvFormSignalCheckboxComponent], template: "@if (!readonly()) {\n <div #checkbox>\n <dsv-form-signal-checkbox\n [form]=\"readForm\"\n fieldName=\"read\"\n [withLabel]=\"false\"\n (callbackChange)=\"callback.emit(notification()!)\"\n />\n </div>\n}\n\n<div\n class=\"notification-content\"\n [class.readonly]=\"readonly()\"\n (click)=\"triggerCheckbox()\"\n (keyup)=\"triggerCheckbox()\"\n>\n <b [class.read]=\"!notification()?.read && !readonly()\">\n <span class=\"subtitle\">{{ notification()?.creationDate! | formatDate: true }} : </span>\n {{ notification()?.title }}\n </b>\n <span>{{ notification()?.message }}</span>\n</div>\n\n@if (!readonly()) {\n <dsv-button icon=\"ri-external-link-line\" color=\"secondary\" [routerLink]=\"url()\" [prevent]=\"false\" />\n}\n", styles: [":host{display:flex;flex-direction:row;gap:15px;background:var(--background-card);padding:10px;border-bottom:1px solid var(--border);align-items:center}:host .notification-content{cursor:pointer;display:flex;flex-direction:column;gap:5px;flex:1}:host .notification-content b{margin:5px 0}:host .notification-content.readonly{cursor:default}:host .notification-content .read{color:var(--secondary)}:host dsv-form-signal-checkbox{padding:0!important;margin-bottom:0!important;max-width:30px}:host dsv-button{--button-border-radius: 50%}\n"] }]
|
|
50
50
|
}], ctorParameters: () => [], propDecorators: { notification: [{ type: i0.Input, args: [{ isSignal: true, alias: "notification", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], callback: [{ type: i0.Output, args: ["callback"] }], checkboxRef: [{ type: i0.ViewChild, args: ['checkbox', { isSignal: true }] }] } });
|
|
@@ -54,10 +54,10 @@ class NotificationSearchService extends BaseSearchService {
|
|
|
54
54
|
getEndPoint() {
|
|
55
55
|
return '/notification/search';
|
|
56
56
|
}
|
|
57
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
58
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.
|
|
57
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NotificationSearchService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
58
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NotificationSearchService, providedIn: 'root' });
|
|
59
59
|
}
|
|
60
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
60
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NotificationSearchService, decorators: [{
|
|
61
61
|
type: Injectable,
|
|
62
62
|
args: [{ providedIn: 'root' }]
|
|
63
63
|
}] });
|
|
@@ -88,10 +88,10 @@ class NotificationService extends BaseApiService {
|
|
|
88
88
|
this.nbRead.update((nb) => nb + (notification.read ? -1 : 1));
|
|
89
89
|
});
|
|
90
90
|
}
|
|
91
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
92
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.
|
|
91
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NotificationService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
92
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NotificationService, providedIn: 'root' });
|
|
93
93
|
}
|
|
94
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
94
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NotificationService, decorators: [{
|
|
95
95
|
type: Injectable,
|
|
96
96
|
args: [{ providedIn: 'root' }]
|
|
97
97
|
}] });
|
|
@@ -115,10 +115,10 @@ class NotificationButtonContainer {
|
|
|
115
115
|
}
|
|
116
116
|
});
|
|
117
117
|
}
|
|
118
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
119
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.
|
|
118
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NotificationButtonContainer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
119
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: NotificationButtonContainer, isStandalone: true, selector: "app-notification-button-container", ngImport: i0, template: "@if (nbRead()) {\n <dsv-chip color=\"secondary\" [text]=\"nbRead()\" routerLink=\"/notification\" />\n}\n<dsv-button\n icon=\"ri-notification-line\"\n routerLink=\"/notification\"\n variant=\"text\"\n color=\"inherit\"\n [prevent]=\"false\"\n/>\n", styles: [":host{position:relative}:host dsv-chip{cursor:pointer;position:absolute;top:-5px;right:-5px;z-index:1;padding:1px 5px;min-width:10px;border-radius:15px;font-size:.9rem;font-weight:300}\n"], dependencies: [{ kind: "component", type: DsvButtonComponent, selector: "dsv-button", inputs: ["libelle", "routerLink", "icon", "iconEnd", "disabled", "noHover", "type", "prevent"], outputs: ["callback"] }, { kind: "component", type: DsvChipComponent, selector: "dsv-chip", inputs: ["text"], outputs: ["delete"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }] });
|
|
120
120
|
}
|
|
121
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
121
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NotificationButtonContainer, decorators: [{
|
|
122
122
|
type: Component,
|
|
123
123
|
args: [{ selector: 'app-notification-button-container', imports: [DsvButtonComponent, DsvChipComponent, RouterLink], template: "@if (nbRead()) {\n <dsv-chip color=\"secondary\" [text]=\"nbRead()\" routerLink=\"/notification\" />\n}\n<dsv-button\n icon=\"ri-notification-line\"\n routerLink=\"/notification\"\n variant=\"text\"\n color=\"inherit\"\n [prevent]=\"false\"\n/>\n", styles: [":host{position:relative}:host dsv-chip{cursor:pointer;position:absolute;top:-5px;right:-5px;z-index:1;padding:1px 5px;min-width:10px;border-radius:15px;font-size:.9rem;font-weight:300}\n"] }]
|
|
124
124
|
}], ctorParameters: () => [] });
|
|
@@ -142,10 +142,10 @@ class NotificationContainer extends BaseSearchContainer {
|
|
|
142
142
|
]);
|
|
143
143
|
});
|
|
144
144
|
}
|
|
145
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
146
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.
|
|
145
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NotificationContainer, deps: [{ token: NotificationSearchService }], target: i0.ɵɵFactoryTarget.Component });
|
|
146
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: NotificationContainer, isStandalone: true, selector: "app-notification-container", usesInheritance: true, ngImport: i0, template: "<dsv-card>\n <div class=\"notification-header\">\n <h2>\n Notifications\n @if (notificationSearchService.total()) {\n <span> ({{ notificationSearchService.total() }})</span>\n }\n </h2>\n <dsv-modal-button\n modalName=\"notification-read-all\"\n text=\"Tout lire ({{ notificationService.nbRead() }})\"\n color=\"secondary\"\n variant=\"outlined\"\n ></dsv-modal-button>\n <dsv-modal-alert\n id=\"notification-read-all\"\n titleText=\"Lire toutes les notifications\"\n text=\"Voulez-vous vraiment lire toute les notifications ?\"\n button=\"Oui\"\n buttonClose=\"Non\"\n (callback)=\"doReadAll()\"\n ></dsv-modal-alert>\n </div>\n <div>\n <dsv-form-reactive-searchbar\n [search]=\"notificationSearchService.search()\"\n (callbackSearch)=\"doSearch($event)\"\n />\n </div>\n</dsv-card>\n\n@if (\n notificationSearchService.notifications().length === 0 &&\n (!notificationSearchService.isLoading() || notificationSearchService.stopFetch())\n) {\n <dsv-card>\n <p>Aucun r\u00E9sultat trouv\u00E9</p>\n </dsv-card>\n} @else {\n <dsv-scroll-infinite [loading]=\"notificationSearchService.isLoading()\" (callback)=\"doFetch()\">\n @for (notification of notificationSearchService.notifications(); track notification.id) {\n <app-notification [notification]=\"notification\" (callback)=\"doRead($event)\" />\n }\n </dsv-scroll-infinite>\n}\n", styles: [":host{display:flex;overflow:hidden;flex-direction:column}:host dsv-card{margin:0 5px 5px;width:calc(100% - 10px);gap:10px}:host dsv-card h2{margin:0}:host dsv-card dsv-form-reactive-searchbar{margin:0}:host .notification-header{display:flex;flex-direction:row;align-items:center;justify-content:space-between}:host dsv-scroll-infinite{flex-direction:column;border-radius:5px}\n"], dependencies: [{ kind: "component", type: DsvCardComponent, selector: "dsv-card", inputs: ["border"] }, { kind: "component", type: DsvScrollInfiniteContainer, selector: "dsv-scroll-infinite", inputs: ["bottomOffset", "loading", "id"], outputs: ["callback"] }, { kind: "component", type: NotificationComponent, selector: "app-notification", inputs: ["notification", "readonly"], outputs: ["callback"] }, { kind: "component", type: DsvModalAlertComponent, selector: "dsv-modal-alert", inputs: ["id", "titleText", "text", "button", "buttonClose"], outputs: ["callback"] }, { kind: "component", type: DsvModalButtonComponent, selector: "dsv-modal-button", inputs: ["modalName", "icon", "variant", "text", "color"], outputs: ["callback"] }, { kind: "component", type: DsvFormReactiveSearchbarComponent, selector: "dsv-form-reactive-searchbar", inputs: ["search"], outputs: ["callbackSearch"] }] });
|
|
147
147
|
}
|
|
148
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
148
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NotificationContainer, decorators: [{
|
|
149
149
|
type: Component,
|
|
150
150
|
args: [{ selector: 'app-notification-container', imports: [
|
|
151
151
|
DsvCardComponent,
|
|
@@ -18,10 +18,10 @@ class PlatformService {
|
|
|
18
18
|
isPlatformBrowser() {
|
|
19
19
|
return isPlatformBrowser(this.platformId);
|
|
20
20
|
}
|
|
21
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
22
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.
|
|
21
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: PlatformService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
22
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: PlatformService, providedIn: 'root' });
|
|
23
23
|
}
|
|
24
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
24
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: PlatformService, decorators: [{
|
|
25
25
|
type: Injectable,
|
|
26
26
|
args: [{
|
|
27
27
|
providedIn: 'root',
|
|
@@ -14,10 +14,10 @@ class RouterExternalPipe {
|
|
|
14
14
|
event.stopPropagation();
|
|
15
15
|
this.dsvLinkExternal.emit();
|
|
16
16
|
}
|
|
17
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
18
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.
|
|
17
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: RouterExternalPipe, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
18
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.4", type: RouterExternalPipe, isStandalone: true, selector: "a[dsvLinkExternal]", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dsvLinkExternal: "dsvLinkExternal" }, host: { attributes: { "target": "_blank", "rel": "noopener noreferrer" }, listeners: { "click": "onClick($event)" }, properties: { "class": "color() + ' text bold'" } }, ngImport: i0 });
|
|
19
19
|
}
|
|
20
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
20
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: RouterExternalPipe, decorators: [{
|
|
21
21
|
type: Directive,
|
|
22
22
|
args: [{
|
|
23
23
|
selector: 'a[dsvLinkExternal]',
|
|
@@ -45,10 +45,10 @@ class RouterInternalPipe {
|
|
|
45
45
|
this.dsvLink.emit();
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
49
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.
|
|
48
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: RouterInternalPipe, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
49
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.4", type: RouterInternalPipe, isStandalone: true, selector: "a[dsvLink]", outputs: { dsvLink: "dsvLink" }, host: { listeners: { "click": "onClick($event)" }, classAttribute: "text" }, ngImport: i0 });
|
|
50
50
|
}
|
|
51
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
51
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: RouterInternalPipe, decorators: [{
|
|
52
52
|
type: Directive,
|
|
53
53
|
args: [{
|
|
54
54
|
selector: 'a[dsvLink]',
|
|
@@ -100,10 +100,10 @@ class RouterService {
|
|
|
100
100
|
goBack() {
|
|
101
101
|
this.location.back();
|
|
102
102
|
}
|
|
103
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
104
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.
|
|
103
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: RouterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
104
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: RouterService, providedIn: 'root' });
|
|
105
105
|
}
|
|
106
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
106
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: RouterService, decorators: [{
|
|
107
107
|
type: Injectable,
|
|
108
108
|
args: [{
|
|
109
109
|
providedIn: 'root',
|
|
@@ -37,10 +37,10 @@ class StorageService {
|
|
|
37
37
|
localStorage.clear();
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
41
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.
|
|
40
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: StorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
41
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: StorageService, providedIn: 'root' });
|
|
42
42
|
}
|
|
43
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
43
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: StorageService, decorators: [{
|
|
44
44
|
type: Injectable,
|
|
45
45
|
args: [{
|
|
46
46
|
providedIn: 'root',
|
|
@@ -92,7 +92,10 @@ class StoreMap {
|
|
|
92
92
|
const existing = map.get(key);
|
|
93
93
|
if (!existing)
|
|
94
94
|
return map;
|
|
95
|
-
|
|
95
|
+
const updatedValue = Array.isArray(existing) && Array.isArray(partial)
|
|
96
|
+
? [...existing, ...partial]
|
|
97
|
+
: { ...existing, ...partial };
|
|
98
|
+
return new Map(map).set(key, updatedValue);
|
|
96
99
|
});
|
|
97
100
|
}
|
|
98
101
|
setMany(entries) {
|