@ts-core/angular 15.0.38 → 15.0.40

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.
@@ -3387,6 +3387,7 @@ class ValueStorage extends DestroyableContainer {
3387
3387
  let item = !_.isNil(value) ? this.deserialize(value) : null;
3388
3388
  this.cookies.put(this.name, item);
3389
3389
  this.storage.set(this.name, item);
3390
+ return value;
3390
3391
  }
3391
3392
  destroy() {
3392
3393
  if (this.isDestroyed) {
@@ -6077,6 +6078,12 @@ class WindowConfig {
6077
6078
 
6078
6079
  class WindowService extends Destroyable {
6079
6080
  }
6081
+ WindowService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: WindowService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
6082
+ WindowService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: WindowService, providedIn: 'root' });
6083
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: WindowService, decorators: [{
6084
+ type: Injectable,
6085
+ args: [{ providedIn: 'root' }]
6086
+ }] });
6080
6087
 
6081
6088
  var WindowServiceEvent;
6082
6089
  (function (WindowServiceEvent) {
@@ -6386,6 +6393,12 @@ class NotificationConfig extends WindowConfig {
6386
6393
 
6387
6394
  class NotificationService extends Destroyable {
6388
6395
  }
6396
+ NotificationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NotificationService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
6397
+ NotificationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NotificationService, providedIn: 'root' });
6398
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NotificationService, decorators: [{
6399
+ type: Injectable,
6400
+ args: [{ providedIn: 'root' }]
6401
+ }] });
6389
6402
 
6390
6403
  var NotificationServiceEvent;
6391
6404
  (function (NotificationServiceEvent) {
@@ -6397,6 +6410,12 @@ var NotificationServiceEvent;
6397
6410
 
6398
6411
  class BottomSheetService extends Destroyable {
6399
6412
  }
6413
+ BottomSheetService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BottomSheetService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
6414
+ BottomSheetService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BottomSheetService, providedIn: 'root' });
6415
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: BottomSheetService, decorators: [{
6416
+ type: Injectable,
6417
+ args: [{ providedIn: 'root' }]
6418
+ }] });
6400
6419
 
6401
6420
  class LocalStorageService extends DestroyableContainer {
6402
6421
  //--------------------------------------------------------------------------
@@ -6454,6 +6473,15 @@ class LocalStorageService extends DestroyableContainer {
6454
6473
  }
6455
6474
 
6456
6475
  class DateValueStorage extends ValueStorage {
6476
+ constructor() {
6477
+ //--------------------------------------------------------------------------
6478
+ //
6479
+ // Public Methods
6480
+ //
6481
+ //--------------------------------------------------------------------------
6482
+ super(...arguments);
6483
+ this.defaultExpirationDelta = 0;
6484
+ }
6457
6485
  //--------------------------------------------------------------------------
6458
6486
  //
6459
6487
  // Protected Methods
@@ -6470,11 +6498,23 @@ class DateValueStorage extends ValueStorage {
6470
6498
  // Public Methods
6471
6499
  //
6472
6500
  //--------------------------------------------------------------------------
6501
+ isMore(item) {
6502
+ return this.has() ? this.get().getTime() > item.getTime() : false;
6503
+ }
6504
+ isLess(item) {
6505
+ return this.has() ? this.get().getTime() < item.getTime() : false;
6506
+ }
6507
+ isEqual(item) {
6508
+ return this.has() ? this.get().getTime() === item.getTime() : false;
6509
+ }
6473
6510
  isExpired(item) {
6474
- if (_.isNil(item)) {
6475
- item = new Date();
6511
+ return this.has() ? this.isLess(item) : true;
6512
+ }
6513
+ isExpiredFromNow(delta) {
6514
+ if (_.isNil(delta)) {
6515
+ delta = this.defaultExpirationDelta;
6476
6516
  }
6477
- return this.has() ? this.get().getTime() < item.getTime() : true;
6517
+ return this.isExpired(DateUtil.getDate(Date.now() + delta));
6478
6518
  }
6479
6519
  }
6480
6520