@ng-vagabond-lab/ng-dsv 0.2.52 → 0.2.53

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.
@@ -157,6 +157,8 @@ class BaseSearchContainer extends BaseContainer {
157
157
  this.authService.canFetch(this.service.ssr())) {
158
158
  this.doFetch();
159
159
  }
160
+ });
161
+ effect(() => {
160
162
  if (this.service?.datas()?.length > 0) {
161
163
  this.service?.isLoading.set(false);
162
164
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ng-vagabond-lab-ng-dsv-base.mjs","sources":["../../../projects/ng-dsv/base/service/base/base.service.ts","../../../projects/ng-dsv/base/service/base/base-api.service.ts","../../../projects/ng-dsv/base/service/seo/seo.service.ts","../../../projects/ng-dsv/base/container/base.container.ts","../../../projects/ng-dsv/base/service/analytics/analytics.service.ts","../../../projects/ng-dsv/base/container/main/base-main.container.ts","../../../projects/ng-dsv/base/container/route/base-route.container.ts","../../../projects/ng-dsv/base/container/search/base-search.container.ts","../../../projects/ng-dsv/base/utils/base.utils.ts","../../../projects/ng-dsv/base/ng-vagabond-lab-ng-dsv-base.ts"],"sourcesContent":["import { Directive, inject, signal, TransferState } from '@angular/core';\nimport { ToastService } from '@ng-vagabond-lab/ng-dsv/ds/toast';\nimport { I18nService } from '@ng-vagabond-lab/ng-dsv/i18n';\nimport { PlatformService } from '@ng-vagabond-lab/ng-dsv/platform';\n\n@Directive()\nexport abstract class BaseService {\n readonly toastService = inject(ToastService);\n readonly transferState = inject(TransferState);\n readonly platformService = inject(PlatformService);\n readonly i18nService = inject(I18nService);\n readonly translateService = this.i18nService.translateService;\n\n readonly loaded = signal<boolean>(true);\n\n isPlatformBrowser(): boolean {\n return this.platformService.isPlatformBrowser();\n }\n}\n","import { Directive, inject } from '@angular/core';\nimport { ApiService } from '@ng-vagabond-lab/ng-dsv/api';\nimport { BaseService } from './base.service';\n\n@Directive()\nexport abstract class BaseApiService extends BaseService {\n readonly apiService = inject(ApiService);\n}\n","import { inject, Injectable, makeStateKey } from '@angular/core';\nimport { Meta, Title } from '@angular/platform-browser';\nimport { EnvironmentService } from '@ng-vagabond-lab/ng-dsv/environment';\nimport { BaseApiService } from '../base/base-api.service';\n\n@Injectable({ providedIn: 'root' })\nexport class SeoService extends BaseApiService {\n readonly environmentService = inject(EnvironmentService);\n readonly title = inject(Title);\n readonly meta = inject(Meta);\n\n setMeta(title: string, description: string, image?: string): void {\n const newTitle = this.environmentService.config()?.APP_NAME + ' - ' + title;\n this.title.setTitle(newTitle);\n this.transferState.set(makeStateKey<string>('title'), newTitle);\n this.meta.updateTag({ name: 'description', content: description });\n image && this.meta.updateTag({ property: 'og:image', content: image });\n }\n}\n","import { computed, Directive, effect, inject, signal } from '@angular/core';\nimport { AuthService } from '@ng-vagabond-lab/ng-dsv/module/auth';\nimport { RouterService } from '@ng-vagabond-lab/ng-dsv/router';\nimport { SeoService } from '../service/seo/seo.service';\n\n@Directive()\nexport abstract class BaseContainer {\n readonly authService = inject(AuthService);\n readonly seoService = inject(SeoService);\n readonly routerService = inject(RouterService);\n\n protected requiredRole = signal<string>('');\n\n readonly hasAccess = computed<boolean>(() => {\n const role = this.requiredRole();\n return !role || this.authService.hasRole(role);\n });\n\n constructor() {\n effect(() => {\n if (!this.hasAccess()) {\n this.routerService.router.navigate(['/']);\n }\n });\n }\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport { inject, PLATFORM_ID, Service } from '@angular/core';\n\n@Service()\nexport class AnalyticsService {\n readonly platformId = inject(PLATFORM_ID);\n\n init(analyticsId?: string): void {\n if (!isPlatformBrowser(this.platformId) || !analyticsId) {\n return;\n }\n\n const script = document.createElement('script');\n script.async = true;\n script.src = `https://www.googletagmanager.com/gtag/js?id=${analyticsId}`;\n document.head.appendChild(script);\n\n const inlineScript = document.createElement('script');\n inlineScript.innerHTML = `\n window.dataLayer = window.dataLayer || [];\n function gtag(){ dataLayer.push(arguments); }\n gtag('js', new Date());\n gtag('config', '${analyticsId}');\n `;\n document.head.appendChild(inlineScript);\n }\n}\n","import { Directive, effect, inject, signal } from '@angular/core';\nimport { EnvironmentService } from '@ng-vagabond-lab/ng-dsv/environment';\nimport { AuthService } from '@ng-vagabond-lab/ng-dsv/module/auth';\nimport { RouterService } from '@ng-vagabond-lab/ng-dsv/router';\nimport { AnalyticsService } from '../../service/analytics/analytics.service';\n\n@Directive()\nexport abstract class BaseMainContainer {\n readonly authService = inject(AuthService);\n readonly routerService = inject(RouterService);\n readonly environmentService = inject(EnvironmentService);\n readonly analyticsService = inject(AnalyticsService);\n\n readonly initRefreshToken = signal<boolean>(false);\n\n constructor() {\n this.analyticsService.init(this.environmentService.config()?.ANALYTICS_ID);\n effect(() => {\n if (this.authService.isPlatformBrowser() && !this.initRefreshToken()) {\n this.initRefreshToken.set(true);\n this.authService.refreshToken();\n }\n });\n }\n}\n","import { Directive, inject } from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { ActivatedRoute } from '@angular/router';\nimport { BaseContainer } from '../base.container';\n\n@Directive()\nexport abstract class BaseRouteContainer extends BaseContainer {\n readonly activatedRoute = inject<ActivatedRoute>(ActivatedRoute);\n\n readonly routeParams = toSignal(this.activatedRoute.params);\n}\n","import { Directive, effect, ElementRef, inject } from '@angular/core';\nimport { ApiDto } from '@ng-vagabond-lab/ng-dsv/api';\nimport { SCROLL_CLASS, scrollToTop } from '@ng-vagabond-lab/ng-dsv/ds/scroll';\nimport { BaseSearchService } from '../../service';\nimport { BaseContainer } from '../base.container';\n\n@Directive()\nexport abstract class BaseSearchContainer<\n T extends BaseSearchService<U>,\n U extends ApiDto,\n> extends BaseContainer {\n readonly element = inject(ElementRef);\n\n readonly service: T | undefined = undefined;\n\n constructor(searchService: T) {\n super();\n this.service = searchService;\n this.service.isLoading.set(true);\n effect(() => {\n if (\n this.service?.datas().length === 0 &&\n this.service.search() === '' &&\n !this.service.stopFetch() &&\n this.authService.canFetch(this.service.ssr())\n ) {\n this.doFetch();\n }\n if (this.service?.datas()?.length! > 0) {\n this.service?.isLoading.set(false);\n }\n });\n }\n\n doFetch(search: string | undefined = this.service?.search()): void {\n this.service?.fetchByPage(search as string, this.service?.page());\n }\n\n doSearch(search: string): void {\n this.service?.page.set(1);\n scrollToTop(this.element, SCROLL_CLASS);\n this.doFetch(search);\n }\n}\n","import { OutputEmitterRef } from '@angular/core';\n\nexport const isCallback = <T>(callback: OutputEmitterRef<T>): boolean => {\n const listeners = callback['listeners' as keyof OutputEmitterRef<T>];\n return listeners?.length > 0;\n};\n\nexport const generateArray = (length: number = 20): number[] => Array.from({ length }, (_, i) => i);\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;MAMsB,WAAW,CAAA;AACpB,IAAA,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC;AACnC,IAAA,aAAa,GAAG,MAAM,CAAC,aAAa,CAAC;AACrC,IAAA,eAAe,GAAG,MAAM,CAAC,eAAe,CAAC;AACzC,IAAA,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;AACjC,IAAA,gBAAgB,GAAG,IAAI,CAAC,WAAW,CAAC,gBAAgB;IAEpD,MAAM,GAAG,MAAM,CAAU,IAAI;+EAAC;IAEvC,iBAAiB,GAAA;AACb,QAAA,OAAO,IAAI,CAAC,eAAe,CAAC,iBAAiB,EAAE;IACnD;uGAXkB,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAX,WAAW,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAX,WAAW,EAAA,UAAA,EAAA,CAAA;kBADhC;;;ACAK,MAAgB,cAAe,SAAQ,WAAW,CAAA;AAC3C,IAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;uGADtB,cAAc,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA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K,EAAE,EAAE,MAAO,GAAG,CAAC,EAAE;gBACpC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC;YACtC;AACJ,QAAA,CAAC,CAAC;IACN;AAEA,IAAA,OAAO,CAAC,MAAA,GAA6B,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,EAAA;AACvD,QAAA,IAAI,CAAC,OAAO,EAAE,WAAW,CAAC,MAAgB,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC;IACrE;AAEA,IAAA,QAAQ,CAAC,MAAc,EAAA;QACnB,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AACzB,QAAA,WAAW,CAAC,IAAI,CAAC,OAAO,EAAE,YAAY,CAAC;AACvC,QAAA,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC;IACxB;uGAnCkB,mBAAmB,EAAA,IAAA,EAAA,SAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAnB,mBAAmB,EAAA,YAAA,EAAA,IAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBADxC;;;ACJM,MAAM,UAAU,GAAG,CAAI,QAA6B,KAAa;AACpE,IAAA,MAAM,SAAS,GAAG,QAAQ,CAAC,WAAwC,CAAC;AACpE,IAAA,OAAO,SAAS,EAAE,MAAM,GAAG,CAAC;AAChC;AAEO,MAAM,aAAa,GAAG,CAAC,MAAA,GAAiB,EAAE,KAAe,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC;;ACPlG;;AAEG;;"}
1
+ {"version":3,"file":"ng-vagabond-lab-ng-dsv-base.mjs","sources":["../../../projects/ng-dsv/base/service/base/base.service.ts","../../../projects/ng-dsv/base/service/base/base-api.service.ts","../../../projects/ng-dsv/base/service/seo/seo.service.ts","../../../projects/ng-dsv/base/container/base.container.ts","../../../projects/ng-dsv/base/service/analytics/analytics.service.ts","../../../projects/ng-dsv/base/container/main/base-main.container.ts","../../../projects/ng-dsv/base/container/route/base-route.container.ts","../../../projects/ng-dsv/base/container/search/base-search.container.ts","../../../projects/ng-dsv/base/utils/base.utils.ts","../../../projects/ng-dsv/base/ng-vagabond-lab-ng-dsv-base.ts"],"sourcesContent":["import { Directive, inject, signal, TransferState } from '@angular/core';\nimport { ToastService } from '@ng-vagabond-lab/ng-dsv/ds/toast';\nimport { I18nService } from '@ng-vagabond-lab/ng-dsv/i18n';\nimport { PlatformService } from '@ng-vagabond-lab/ng-dsv/platform';\n\n@Directive()\nexport abstract class BaseService {\n readonly toastService = inject(ToastService);\n readonly transferState = inject(TransferState);\n readonly platformService = inject(PlatformService);\n readonly i18nService = inject(I18nService);\n readonly translateService = this.i18nService.translateService;\n\n readonly loaded = signal<boolean>(true);\n\n isPlatformBrowser(): boolean {\n return this.platformService.isPlatformBrowser();\n }\n}\n","import { Directive, inject } from '@angular/core';\nimport { ApiService } from '@ng-vagabond-lab/ng-dsv/api';\nimport { BaseService } from './base.service';\n\n@Directive()\nexport abstract class BaseApiService extends BaseService {\n readonly apiService = inject(ApiService);\n}\n","import { inject, Injectable, makeStateKey } from '@angular/core';\nimport { Meta, Title } from '@angular/platform-browser';\nimport { EnvironmentService } from '@ng-vagabond-lab/ng-dsv/environment';\nimport { BaseApiService } from '../base/base-api.service';\n\n@Injectable({ providedIn: 'root' })\nexport class SeoService extends BaseApiService {\n readonly environmentService = inject(EnvironmentService);\n readonly title = inject(Title);\n readonly meta = inject(Meta);\n\n setMeta(title: string, description: string, image?: string): void {\n const newTitle = this.environmentService.config()?.APP_NAME + ' - ' + title;\n this.title.setTitle(newTitle);\n this.transferState.set(makeStateKey<string>('title'), newTitle);\n this.meta.updateTag({ name: 'description', content: description });\n image && this.meta.updateTag({ property: 'og:image', content: image });\n }\n}\n","import { computed, Directive, effect, inject, signal } from '@angular/core';\nimport { AuthService } from '@ng-vagabond-lab/ng-dsv/module/auth';\nimport { RouterService } from '@ng-vagabond-lab/ng-dsv/router';\nimport { SeoService } from '../service/seo/seo.service';\n\n@Directive()\nexport abstract class BaseContainer {\n readonly authService = inject(AuthService);\n readonly seoService = inject(SeoService);\n readonly routerService = inject(RouterService);\n\n protected requiredRole = signal<string>('');\n\n readonly hasAccess = computed<boolean>(() => {\n const role = this.requiredRole();\n return !role || this.authService.hasRole(role);\n });\n\n constructor() {\n effect(() => {\n if (!this.hasAccess()) {\n this.routerService.router.navigate(['/']);\n }\n });\n }\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport { inject, PLATFORM_ID, Service } from '@angular/core';\n\n@Service()\nexport class AnalyticsService {\n readonly platformId = inject(PLATFORM_ID);\n\n init(analyticsId?: string): void {\n if (!isPlatformBrowser(this.platformId) || !analyticsId) {\n return;\n }\n\n const script = document.createElement('script');\n script.async = true;\n script.src = `https://www.googletagmanager.com/gtag/js?id=${analyticsId}`;\n document.head.appendChild(script);\n\n const inlineScript = document.createElement('script');\n inlineScript.innerHTML = `\n window.dataLayer = window.dataLayer || [];\n function gtag(){ dataLayer.push(arguments); }\n gtag('js', new Date());\n gtag('config', '${analyticsId}');\n `;\n document.head.appendChild(inlineScript);\n }\n}\n","import { Directive, effect, inject, signal } from '@angular/core';\nimport { EnvironmentService } from '@ng-vagabond-lab/ng-dsv/environment';\nimport { AuthService } from '@ng-vagabond-lab/ng-dsv/module/auth';\nimport { RouterService } from '@ng-vagabond-lab/ng-dsv/router';\nimport { AnalyticsService } from '../../service/analytics/analytics.service';\n\n@Directive()\nexport abstract class BaseMainContainer {\n readonly authService = inject(AuthService);\n readonly routerService = inject(RouterService);\n readonly environmentService = inject(EnvironmentService);\n readonly analyticsService = inject(AnalyticsService);\n\n readonly initRefreshToken = signal<boolean>(false);\n\n constructor() {\n this.analyticsService.init(this.environmentService.config()?.ANALYTICS_ID);\n effect(() => {\n if (this.authService.isPlatformBrowser() && !this.initRefreshToken()) {\n this.initRefreshToken.set(true);\n this.authService.refreshToken();\n }\n });\n }\n}\n","import { Directive, inject } from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { ActivatedRoute } from '@angular/router';\nimport { BaseContainer } from '../base.container';\n\n@Directive()\nexport abstract class BaseRouteContainer extends BaseContainer {\n readonly activatedRoute = inject<ActivatedRoute>(ActivatedRoute);\n\n readonly routeParams = toSignal(this.activatedRoute.params);\n}\n","import { Directive, effect, ElementRef, inject } from '@angular/core';\nimport { ApiDto } from '@ng-vagabond-lab/ng-dsv/api';\nimport { SCROLL_CLASS, scrollToTop } from '@ng-vagabond-lab/ng-dsv/ds/scroll';\nimport { BaseSearchService } from '../../service';\nimport { BaseContainer } from '../base.container';\n\n@Directive()\nexport abstract class BaseSearchContainer<\n T extends BaseSearchService<U>,\n U extends ApiDto,\n> extends BaseContainer {\n readonly element = inject(ElementRef);\n\n readonly service: T | undefined = undefined;\n\n constructor(searchService: T) {\n super();\n this.service = searchService;\n this.service.isLoading.set(true);\n effect(() => {\n if (\n this.service?.datas().length === 0 &&\n this.service.search() === '' &&\n !this.service.stopFetch() &&\n this.authService.canFetch(this.service.ssr())\n ) {\n this.doFetch();\n }\n });\n effect(() => {\n if (this.service?.datas()?.length! > 0) {\n this.service?.isLoading.set(false);\n }\n });\n }\n\n doFetch(search: string | undefined = this.service?.search()): void {\n this.service?.fetchByPage(search as string, this.service?.page());\n }\n\n doSearch(search: string): void {\n this.service?.page.set(1);\n scrollToTop(this.element, SCROLL_CLASS);\n this.doFetch(search);\n }\n}\n","import { OutputEmitterRef } from '@angular/core';\n\nexport const isCallback = <T>(callback: OutputEmitterRef<T>): boolean => {\n const listeners = callback['listeners' as keyof OutputEmitterRef<T>];\n return listeners?.length > 0;\n};\n\nexport const generateArray = (length: number = 20): number[] => Array.from({ length }, (_, i) => i);\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';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,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AACzB,QAAA,WAAW,CAAC,IAAI,CAAC,OAAO,EAAE,YAAY,CAAC;AACvC,QAAA,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC;IACxB;uGArCkB,mBAAmB,EAAA,IAAA,EAAA,SAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAnB,mBAAmB,EAAA,YAAA,EAAA,IAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBADxC;;;ACJM,MAAM,UAAU,GAAG,CAAI,QAA6B,KAAa;AACpE,IAAA,MAAM,SAAS,GAAG,QAAQ,CAAC,WAAwC,CAAC;AACpE,IAAA,OAAO,SAAS,EAAE,MAAM,GAAG,CAAC;AAChC;AAEO,MAAM,aAAa,GAAG,CAAC,MAAA,GAAiB,EAAE,KAAe,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC;;ACPlG;;AAEG;;"}
@@ -47,11 +47,11 @@ class NotificationComponent {
47
47
  this.checkboxRef()?.nativeElement.querySelector('input').click();
48
48
  }
49
49
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: NotificationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
50
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", 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" }] });
50
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", 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.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" }] });
51
51
  }
52
52
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: NotificationComponent, decorators: [{
53
53
  type: Component,
54
- 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"] }]
54
+ 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.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"] }]
55
55
  }], 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 }] }] } });
56
56
 
57
57
  class NotificationSearchService extends BaseSearchService {
@@ -78,6 +78,8 @@ class NotificationService extends BaseApiService {
78
78
  this.notificationSearchService.notifications.set([]);
79
79
  this.notificationSearchService.search.set('');
80
80
  this.notificationSearchService.page.set(1);
81
+ this.notificationSearchService.stopFetch.set(false);
82
+ this.notificationSearchService.lasturl.set('');
81
83
  }
82
84
  this.nbRead.set(Number(data));
83
85
  });
@@ -1 +1 @@
1
- {"version":3,"file":"ng-vagabond-lab-ng-dsv-module-notification.mjs","sources":["../../../projects/ng-dsv/module/notification/component/notification.component.ts","../../../projects/ng-dsv/module/notification/component/notification.component.html","../../../projects/ng-dsv/module/notification/service/notification-search.service.ts","../../../projects/ng-dsv/module/notification/service/notification.service.ts","../../../projects/ng-dsv/module/notification/container/button/notification-button.container.ts","../../../projects/ng-dsv/module/notification/container/button/notification-button.container.html","../../../projects/ng-dsv/module/notification/container/notification.container.ts","../../../projects/ng-dsv/module/notification/container/notification.container.html","../../../projects/ng-dsv/module/notification/route/notification.route.ts","../../../projects/ng-dsv/module/notification/ng-vagabond-lab-ng-dsv-module-notification.ts"],"sourcesContent":["import { Component, effect, ElementRef, input, output, signal, viewChild } from '@angular/core';\nimport { form } from '@angular/forms/signals';\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 { DsvFormSignalCheckboxComponent } from '@ng-vagabond-lab/ng-dsv/ds/form/signal';\nimport { NotificationDto } from '../dto/notification.dto';\n\n@Component({\n selector: 'app-notification',\n imports: [DateFormatPipe, DsvButtonComponent, RouterLink, DsvFormSignalCheckboxComponent],\n templateUrl: './notification.component.html',\n styleUrls: ['./notification.component.scss'],\n})\nexport class NotificationComponent {\n readonly notification = input<NotificationDto>();\n readonly readonly = input<boolean>(false);\n\n readonly callback = output<NotificationDto>();\n\n readonly checkboxRef = viewChild<ElementRef>('checkbox');\n\n readonly url = signal<string>('');\n\n readonly readForm = form(\n signal({\n read: this.notification()?.read,\n }),\n );\n\n constructor() {\n effect(() => {\n try {\n this.notification()?.url && this.url.set(new URL(this.notification()?.url!).pathname);\n } catch (error) {\n console.error('Error occurred while processing notification URL:', this.notification()?.url, error);\n }\n });\n effect(() => {\n this.readForm().reset({\n read: this.notification()?.read,\n });\n });\n }\n\n triggerCheckbox(): void {\n this.checkboxRef()?.nativeElement.querySelector('input').click();\n }\n}\n","@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","import { Injectable } from '@angular/core';\nimport { BaseSearchService } from '@ng-vagabond-lab/ng-dsv/base/service';\nimport { NotificationDto } from '../dto/notification.dto';\n\n@Injectable({ providedIn: 'root' })\nexport class NotificationSearchService extends BaseSearchService<NotificationDto> {\n readonly notifications = this.datas;\n\n override getEndPoint(): string {\n return '/notification/search';\n }\n}\n","import { inject, Injectable, signal } from '@angular/core';\nimport { JSONObject } from '@ng-vagabond-lab/ng-dsv/api';\nimport { BaseApiService } from '@ng-vagabond-lab/ng-dsv/base/service';\nimport { RouterService } from '@ng-vagabond-lab/ng-dsv/router';\nimport { NotificationDto } from '../dto/notification.dto';\nimport { NotificationSearchService } from './notification-search.service';\n\n@Injectable({ providedIn: 'root' })\nexport class NotificationService extends BaseApiService {\n readonly notificationSearchService = inject(NotificationSearchService);\n readonly routerService = inject(RouterService);\n\n readonly nbRead = signal<number>(0);\n\n fetchNbRead(): void {\n this.apiService.get<number>('/notification/count', (data) => {\n if (data !== this.nbRead()) {\n this.notificationSearchService.notifications.set([]);\n this.notificationSearchService.search.set('');\n this.notificationSearchService.page.set(1);\n }\n this.nbRead.set(Number(data));\n });\n }\n\n readAll(callback: () => void): void {\n this.apiService.put<JSONObject>('/notification/read-all', {}, () => {\n this.nbRead.set(0);\n callback();\n });\n }\n\n notificationRead(notification: NotificationDto): void {\n this.apiService.put('/notification/read/' + notification.id, {}, () => {\n this.nbRead.update((nb) => nb + (notification.read ? -1 : 1));\n });\n }\n}\n","import { Component, effect, inject, signal } from '@angular/core';\nimport { RouterLink } from '@angular/router';\nimport { DsvButtonComponent } from '@ng-vagabond-lab/ng-dsv/ds/button';\nimport { DsvChipComponent } from '@ng-vagabond-lab/ng-dsv/ds/chip';\nimport { AuthService } from '@ng-vagabond-lab/ng-dsv/module/auth';\nimport { NotificationService } from '../../service/notification.service';\n\n@Component({\n selector: 'app-notification-button-container',\n imports: [DsvButtonComponent, DsvChipComponent, RouterLink],\n templateUrl: './notification-button.container.html',\n styleUrls: ['./notification-button.container.scss'],\n})\nexport class NotificationButtonContainer {\n readonly authService = inject(AuthService);\n readonly notificationService = inject(NotificationService);\n\n readonly nbRead = signal<string>('');\n\n constructor() {\n effect(() => {\n const nbRead = this.notificationService.nbRead();\n if (nbRead > 99) {\n this.nbRead.set('99+');\n } else if (nbRead > 0) {\n this.nbRead.set(nbRead.toString());\n } else {\n this.nbRead.set('');\n }\n });\n }\n}\n","@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","import { Component, inject } from '@angular/core';\nimport { BaseSearchContainer } from '@ng-vagabond-lab/ng-dsv/base';\nimport { DsvCardComponent } from '@ng-vagabond-lab/ng-dsv/ds/card';\nimport { DsvFormReactiveSearchbarComponent } from '@ng-vagabond-lab/ng-dsv/ds/form/reactive';\nimport { DsvModalAlertComponent, DsvModalButtonComponent } from '@ng-vagabond-lab/ng-dsv/ds/modal';\nimport { DsvScrollInfiniteContainer } from '@ng-vagabond-lab/ng-dsv/ds/scroll';\nimport { NotificationComponent } from '../component/notification.component';\nimport { NotificationDto } from '../dto/notification.dto';\nimport { NotificationSearchService } from '../service/notification-search.service';\nimport { NotificationService } from '../service/notification.service';\n\n@Component({\n selector: 'app-notification-container',\n imports: [\n DsvCardComponent,\n DsvScrollInfiniteContainer,\n NotificationComponent,\n DsvModalAlertComponent,\n DsvModalButtonComponent,\n DsvFormReactiveSearchbarComponent,\n ],\n templateUrl: './notification.container.html',\n styleUrls: ['./notification.container.scss'],\n})\nexport class NotificationContainer extends BaseSearchContainer<NotificationSearchService, NotificationDto> {\n readonly notificationService = inject(NotificationService);\n\n constructor(public notificationSearchService: NotificationSearchService) {\n super(notificationSearchService);\n this.requiredRole.set('USER');\n }\n\n doRead(notificaton: NotificationDto): void {\n notificaton.read = !notificaton.read;\n this.notificationService.notificationRead(notificaton);\n }\n\n doReadAll(): void {\n this.notificationService.readAll(() => {\n this.notificationSearchService.notifications.update((notifications) => [\n ...notifications.map((notification) => ({ ...notification, read: true })),\n ]);\n });\n }\n}\n","<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ésultat trouvé</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","import { Routes } from '@angular/router';\n\nexport const NotificationRoute: Routes = [\n {\n path: '',\n loadComponent: () =>\n import('../container/notification.container').then((m) => m.NotificationContainer),\n },\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.NotificationSearchService"],"mappings":";;;;;;;;;;;;;;;;;MAca,qBAAqB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EAC7B;wBACL,gBAAgB;wBAChB,0BAA0B;wBAC1B,qBAAqB;wBACrB,sBAAsB;wBACtB,uBAAuB;wBACvB,iCAAiC;AACpC,qBAAA,EAAA,QAAA,EAAA,gmDAAA,EAAA,MAAA,EAAA,CAAA,2XAAA,CAAA,EAAA;;;;;;;;AElBE,MAAM,iBAAiB,GAAW;AACrC,IAAA;AACI,QAAA,IAAI,EAAE,EAAE;AACR,QAAA,aAAa,EAAE,MACX,sEAA6C,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,qBAAqB,CAAC;AACzF,KAAA;;;ACPL;;AAEG;;"}
1
+ {"version":3,"file":"ng-vagabond-lab-ng-dsv-module-notification.mjs","sources":["../../../projects/ng-dsv/module/notification/component/notification.component.ts","../../../projects/ng-dsv/module/notification/component/notification.component.html","../../../projects/ng-dsv/module/notification/service/notification-search.service.ts","../../../projects/ng-dsv/module/notification/service/notification.service.ts","../../../projects/ng-dsv/module/notification/container/button/notification-button.container.ts","../../../projects/ng-dsv/module/notification/container/button/notification-button.container.html","../../../projects/ng-dsv/module/notification/container/notification.container.ts","../../../projects/ng-dsv/module/notification/container/notification.container.html","../../../projects/ng-dsv/module/notification/route/notification.route.ts","../../../projects/ng-dsv/module/notification/ng-vagabond-lab-ng-dsv-module-notification.ts"],"sourcesContent":["import { Component, effect, ElementRef, input, output, signal, viewChild } from '@angular/core';\nimport { form } from '@angular/forms/signals';\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 { DsvFormSignalCheckboxComponent } from '@ng-vagabond-lab/ng-dsv/ds/form/signal';\nimport { NotificationDto } from '../dto/notification.dto';\n\n@Component({\n selector: 'app-notification',\n imports: [DateFormatPipe, DsvButtonComponent, RouterLink, DsvFormSignalCheckboxComponent],\n templateUrl: './notification.component.html',\n styleUrls: ['./notification.component.scss'],\n})\nexport class NotificationComponent {\n readonly notification = input<NotificationDto>();\n readonly readonly = input<boolean>(false);\n\n readonly callback = output<NotificationDto>();\n\n readonly checkboxRef = viewChild<ElementRef>('checkbox');\n\n readonly url = signal<string>('');\n\n readonly readForm = form(\n signal({\n read: this.notification()?.read,\n }),\n );\n\n constructor() {\n effect(() => {\n try {\n this.notification()?.url && this.url.set(new URL(this.notification()?.url!).pathname);\n } catch (error) {\n console.error('Error occurred while processing notification URL:', this.notification()?.url, error);\n }\n });\n effect(() => {\n this.readForm().reset({\n read: this.notification()?.read,\n });\n });\n }\n\n triggerCheckbox(): void {\n this.checkboxRef()?.nativeElement.querySelector('input').click();\n }\n}\n","@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","import { Injectable } from '@angular/core';\nimport { BaseSearchService } from '@ng-vagabond-lab/ng-dsv/base/service';\nimport { NotificationDto } from '../dto/notification.dto';\n\n@Injectable({ providedIn: 'root' })\nexport class NotificationSearchService extends BaseSearchService<NotificationDto> {\n readonly notifications = this.datas;\n\n override getEndPoint(): string {\n return '/notification/search';\n }\n}\n","import { inject, Injectable, signal } from '@angular/core';\nimport { JSONObject } from '@ng-vagabond-lab/ng-dsv/api';\nimport { BaseApiService } from '@ng-vagabond-lab/ng-dsv/base/service';\nimport { RouterService } from '@ng-vagabond-lab/ng-dsv/router';\nimport { NotificationDto } from '../dto/notification.dto';\nimport { NotificationSearchService } from './notification-search.service';\n\n@Injectable({ providedIn: 'root' })\nexport class NotificationService extends BaseApiService {\n readonly notificationSearchService = inject(NotificationSearchService);\n readonly routerService = inject(RouterService);\n\n readonly nbRead = signal<number>(0);\n\n fetchNbRead(): void {\n this.apiService.get<number>('/notification/count', (data) => {\n if (data !== this.nbRead()) {\n this.notificationSearchService.notifications.set([]);\n this.notificationSearchService.search.set('');\n this.notificationSearchService.page.set(1);\n this.notificationSearchService.stopFetch.set(false);\n this.notificationSearchService.lasturl.set('');\n }\n this.nbRead.set(Number(data));\n });\n }\n\n readAll(callback: () => void): void {\n this.apiService.put<JSONObject>('/notification/read-all', {}, () => {\n this.nbRead.set(0);\n callback();\n });\n }\n\n notificationRead(notification: NotificationDto): void {\n this.apiService.put('/notification/read/' + notification.id, {}, () => {\n this.nbRead.update((nb) => nb + (notification.read ? -1 : 1));\n });\n }\n}\n","import { Component, effect, inject, signal } from '@angular/core';\nimport { RouterLink } from '@angular/router';\nimport { DsvButtonComponent } from '@ng-vagabond-lab/ng-dsv/ds/button';\nimport { DsvChipComponent } from '@ng-vagabond-lab/ng-dsv/ds/chip';\nimport { AuthService } from '@ng-vagabond-lab/ng-dsv/module/auth';\nimport { NotificationService } from '../../service/notification.service';\n\n@Component({\n selector: 'app-notification-button-container',\n imports: [DsvButtonComponent, DsvChipComponent, RouterLink],\n templateUrl: './notification-button.container.html',\n styleUrls: ['./notification-button.container.scss'],\n})\nexport class NotificationButtonContainer {\n readonly authService = inject(AuthService);\n readonly notificationService = inject(NotificationService);\n\n readonly nbRead = signal<string>('');\n\n constructor() {\n effect(() => {\n const nbRead = this.notificationService.nbRead();\n if (nbRead > 99) {\n this.nbRead.set('99+');\n } else if (nbRead > 0) {\n this.nbRead.set(nbRead.toString());\n } else {\n this.nbRead.set('');\n }\n });\n }\n}\n","@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","import { Component, inject } from '@angular/core';\nimport { BaseSearchContainer } from '@ng-vagabond-lab/ng-dsv/base';\nimport { DsvCardComponent } from '@ng-vagabond-lab/ng-dsv/ds/card';\nimport { DsvFormReactiveSearchbarComponent } from '@ng-vagabond-lab/ng-dsv/ds/form/reactive';\nimport { DsvModalAlertComponent, DsvModalButtonComponent } from '@ng-vagabond-lab/ng-dsv/ds/modal';\nimport { DsvScrollInfiniteContainer } from '@ng-vagabond-lab/ng-dsv/ds/scroll';\nimport { NotificationComponent } from '../component/notification.component';\nimport { NotificationDto } from '../dto/notification.dto';\nimport { NotificationSearchService } from '../service/notification-search.service';\nimport { NotificationService } from '../service/notification.service';\n\n@Component({\n selector: 'app-notification-container',\n imports: [\n DsvCardComponent,\n DsvScrollInfiniteContainer,\n NotificationComponent,\n DsvModalAlertComponent,\n DsvModalButtonComponent,\n DsvFormReactiveSearchbarComponent,\n ],\n templateUrl: './notification.container.html',\n styleUrls: ['./notification.container.scss'],\n})\nexport class NotificationContainer extends BaseSearchContainer<NotificationSearchService, NotificationDto> {\n readonly notificationService = inject(NotificationService);\n\n constructor(public notificationSearchService: NotificationSearchService) {\n super(notificationSearchService);\n this.requiredRole.set('USER');\n }\n\n doRead(notificaton: NotificationDto): void {\n notificaton.read = !notificaton.read;\n this.notificationService.notificationRead(notificaton);\n }\n\n doReadAll(): void {\n this.notificationService.readAll(() => {\n this.notificationSearchService.notifications.update((notifications) => [\n ...notifications.map((notification) => ({ ...notification, read: true })),\n ]);\n });\n }\n}\n","<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ésultat trouvé</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","import { Routes } from '@angular/router';\n\nexport const NotificationRoute: Routes = [\n {\n path: '',\n loadComponent: () =>\n import('../container/notification.container').then((m) => m.NotificationContainer),\n },\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.NotificationSearchService"],"mappings":";;;;;;;;;;;;;;;;;MAca,qBAAqB,CAAA;AACrB,IAAA,YAAY,GAAG,KAAK;gGAAmB;IACvC,QAAQ,GAAG,KAAK,CAAU,KAAK;iFAAC;IAEhC,QAAQ,GAAG,MAAM,EAAmB;IAEpC,WAAW,GAAG,SAAS,CAAa,UAAU;oFAAC;IAE/C,GAAG,GAAG,MAAM,CAAS,EAAE;4EAAC;AAExB,IAAA,QAAQ,GAAG,IAAI,CACpB,MAAM,CAAC;AACH,QAAA,IAAI,EAAE,IAAI,CAAC,YAAY,EAAE,EAAE,IAAI;AAClC,KAAA,CAAC,CACL;AAED,IAAA,WAAA,GAAA;QACI,MAAM,CAAC,MAAK;AACR,YAAA,IAAI;gBACA,IAAI,CAAC,YAAY,EAAE,EAAE,GAAG,IAAI,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C,CAAC,KAAK,CAAC,CAAC,qBAAqB,CAAC;AACzF,KAAA;;;ACPL;;AAEG;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ng-vagabond-lab/ng-dsv",
3
- "version": "0.2.52",
3
+ "version": "0.2.53",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^20.0.0",
6
6
  "@angular/core": "^20.0.0"