@ng-vagabond-lab/ng-dsv 0.0.8 → 0.0.9

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.
@@ -1,12 +1,13 @@
1
- import { OnInit } from '@angular/core';
1
+ import { OnDestroy, OnInit } from '@angular/core';
2
2
  import { ActivatedRoute, Params } from '@angular/router';
3
3
  import { Subscription } from 'rxjs';
4
4
  import * as i0 from "@angular/core";
5
- export declare abstract class BaseRouteComponent implements OnInit {
6
- protected activatedRoute: ActivatedRoute;
5
+ export declare abstract class BaseRouteComponent implements OnInit, OnDestroy {
6
+ activatedRoute: ActivatedRoute;
7
7
  routeObservable: Subscription | null;
8
- constructor(activatedRoute: ActivatedRoute);
8
+ constructor();
9
9
  ngOnInit(): void;
10
+ ngOnDestroy(): void;
10
11
  protected abstract ngOnInitAfter(params: Params): void;
11
12
  static ɵfac: i0.ɵɵFactoryDeclaration<BaseRouteComponent, never>;
12
13
  static ɵcmp: i0.ɵɵComponentDeclaration<BaseRouteComponent, "ng-component", never, {}, {}, never, never, true, never>;
@@ -1,19 +1,20 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component } from '@angular/core';
3
- import * as i1 from '@angular/router';
2
+ import { inject, Component } from '@angular/core';
3
+ import { ActivatedRoute } from '@angular/router';
4
4
 
5
5
  class BaseRouteComponent {
6
- activatedRoute;
6
+ activatedRoute = inject(ActivatedRoute);
7
7
  routeObservable = null;
8
- constructor(activatedRoute) {
9
- this.activatedRoute = activatedRoute;
10
- }
8
+ constructor() { }
11
9
  ngOnInit() {
12
10
  this.routeObservable = this.activatedRoute.params.subscribe((params) => {
13
11
  this.ngOnInitAfter(params);
14
12
  });
15
13
  }
16
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: BaseRouteComponent, deps: [{ token: i1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
14
+ ngOnDestroy() {
15
+ this.routeObservable?.unsubscribe();
16
+ }
17
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: BaseRouteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
17
18
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.7", type: BaseRouteComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: '', isInline: true });
18
19
  }
19
20
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: BaseRouteComponent, decorators: [{
@@ -21,7 +22,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImpor
21
22
  args: [{
22
23
  template: '',
23
24
  }]
24
- }], ctorParameters: () => [{ type: i1.ActivatedRoute }] });
25
+ }], ctorParameters: () => [] });
25
26
 
26
27
  /**
27
28
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"ng-vagabond-lab-ng-dsv-base.mjs","sources":["../../../projects/ng-dsv/base/component/base.route.component.ts","../../../projects/ng-dsv/base/ng-vagabond-lab-ng-dsv-base.ts"],"sourcesContent":["import { Component, OnInit } from '@angular/core';\nimport { ActivatedRoute, Params } from '@angular/router';\nimport { Subscription } from 'rxjs';\n\n@Component({\n template: '',\n})\nexport abstract class BaseRouteComponent implements OnInit {\n routeObservable: Subscription | null = null;\n\n constructor(protected activatedRoute: ActivatedRoute) {}\n\n ngOnInit() {\n this.routeObservable = this.activatedRoute.params.subscribe((params) => {\n this.ngOnInitAfter(params);\n });\n }\n\n protected abstract ngOnInitAfter(params: Params): void;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAOsB,kBAAkB,CAAA;AAGhB,IAAA,cAAA;IAFtB,eAAe,GAAwB,IAAI;AAE3C,IAAA,WAAA,CAAsB,cAA8B,EAAA;QAA9B,IAAc,CAAA,cAAA,GAAd,cAAc;;IAEpC,QAAQ,GAAA;AACN,QAAA,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,MAAM,KAAI;AACrE,YAAA,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC;AAC5B,SAAC,CAAC;;uGARgB,kBAAkB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,cAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAlB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,kBAAkB,wEAF5B,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA;;2FAEQ,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAHvC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,EAAE;AACb,iBAAA;;;ACND;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-vagabond-lab-ng-dsv-base.mjs","sources":["../../../projects/ng-dsv/base/component/base.route.component.ts","../../../projects/ng-dsv/base/ng-vagabond-lab-ng-dsv-base.ts"],"sourcesContent":["import { Component, inject, OnDestroy, OnInit } from '@angular/core';\nimport { ActivatedRoute, Params } from '@angular/router';\nimport { Subscription } from 'rxjs';\n\n@Component({\n template: '',\n})\nexport abstract class BaseRouteComponent implements OnInit, OnDestroy {\n activatedRoute: ActivatedRoute = inject(ActivatedRoute);\n\n routeObservable: Subscription | null = null;\n\n constructor() {}\n\n ngOnInit() {\n this.routeObservable = this.activatedRoute.params.subscribe((params) => {\n this.ngOnInitAfter(params);\n });\n }\n\n ngOnDestroy() {\n this.routeObservable?.unsubscribe();\n }\n\n protected abstract ngOnInitAfter(params: Params): void;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAOsB,kBAAkB,CAAA;AACtC,IAAA,cAAc,GAAmB,MAAM,CAAC,cAAc,CAAC;IAEvD,eAAe,GAAwB,IAAI;AAE3C,IAAA,WAAA,GAAA;IAEA,QAAQ,GAAA;AACN,QAAA,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,MAAM,KAAI;AACrE,YAAA,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC;AAC5B,SAAC,CAAC;;IAGJ,WAAW,GAAA;AACT,QAAA,IAAI,CAAC,eAAe,EAAE,WAAW,EAAE;;uGAdjB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAlB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,kBAAkB,wEAF5B,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA;;2FAEQ,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAHvC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,EAAE;AACb,iBAAA;;;ACND;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ng-vagabond-lab/ng-dsv",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^19.1.7",
6
6
  "@angular/core": "^19.1.7"