@ts-core/angular 21.0.0 → 21.0.1

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.
@@ -570,7 +570,7 @@ class ViewUtil {
570
570
  return NaN;
571
571
  }
572
572
  let value = parseFloat(ViewUtil.getStyle(container, 'minHeight'));
573
- if (isNaN(value)) {
573
+ if (_.isNaN(value)) {
574
574
  value = 0;
575
575
  }
576
576
  return value;
@@ -1825,7 +1825,7 @@ class AutoScrollBottomDirective extends InfiniteScrollDirective {
1825
1825
  if (value === this._trigger) {
1826
1826
  return;
1827
1827
  }
1828
- if (!isNaN(this._trigger) && !isNaN(value)) {
1828
+ if (!_.isNaN(this._trigger) && !_.isNaN(value)) {
1829
1829
  this.triggerDelta = value - this._trigger;
1830
1830
  }
1831
1831
  this._trigger = value;
@@ -2253,7 +2253,7 @@ class StructureDirective extends Destroyable {
2253
2253
  //
2254
2254
  //--------------------------------------------------------------------------
2255
2255
  set isNeedAdd(value) {
2256
- if (value == this._isNeedAdd) {
2256
+ if (value === this._isNeedAdd) {
2257
2257
  return;
2258
2258
  }
2259
2259
  this._isNeedAdd = value;
@@ -2302,9 +2302,9 @@ class ScrollCheckDirective extends Destroyable {
2302
2302
  }
2303
2303
  let offset = !_.isNaN(this.offset) ? this.offset : 0;
2304
2304
  value = this.scrollValue + this.clientHeight + offset >= this.scrollHeight;
2305
- this.bottom.next(value);
2305
+ this.bottom.emit(value);
2306
2306
  value = this.scrollValue <= offset;
2307
- this.top.next(value);
2307
+ this.top.emit(value);
2308
2308
  };
2309
2309
  //--------------------------------------------------------------------------
2310
2310
  //
@@ -2331,7 +2331,7 @@ class ScrollCheckDirective extends Destroyable {
2331
2331
  //
2332
2332
  //--------------------------------------------------------------------------
2333
2333
  set scrollLimit(value) {
2334
- if (value == this._scrollLimit) {
2334
+ if (value === this._scrollLimit) {
2335
2335
  return;
2336
2336
  }
2337
2337
  this._scrollLimit = value;
@@ -3194,8 +3194,8 @@ class Loginable extends Loadable {
3194
3194
  if (this.login.isLoggedIn) {
3195
3195
  this.loginedHandler();
3196
3196
  }
3197
- this.login.logined.pipe().subscribe(() => this.loginedHandler());
3198
- this.login.logouted.pipe().subscribe(() => this.logoutedHandler());
3197
+ this.login.logined.pipe(takeUntil(this.destroyed)).subscribe(() => this.loginedHandler());
3198
+ this.login.logouted.pipe(takeUntil(this.destroyed)).subscribe(() => this.logoutedHandler());
3199
3199
  }
3200
3200
  async loginedHandler() { }
3201
3201
  async logoutedHandler() { }
@@ -3830,7 +3830,7 @@ class MenuItems extends DestroyableContainer {
3830
3830
  remove(item) {
3831
3831
  let index = this._items.indexOf(item);
3832
3832
  if (index > -1) {
3833
- this._items.slice(index, 1);
3833
+ this._items.splice(index, 1);
3834
3834
  }
3835
3835
  return item;
3836
3836
  }
@@ -4358,8 +4358,7 @@ class RouterSelectListItems extends SelectListItems {
4358
4358
  this.selectedItem = !_.isNil(item) ? item : _.first(this.collection);
4359
4359
  }
4360
4360
  setFragment(item) {
4361
- let index = _.indexOf(this.collection, item);
4362
- this.router.setFragment(index > 0 ? item.data.toString() : null);
4361
+ this.router.setFragment(_.indexOf(this.collection, item) > -1 ? item.data.toString() : null);
4363
4362
  }
4364
4363
  getRouterSelectedItem() {
4365
4364
  return _.find(this.collection, { data: this.router.getFragment() });
@@ -4533,6 +4532,44 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
4533
4532
  }]
4534
4533
  }] });
4535
4534
 
4535
+ class PrettifyPipe {
4536
+ // --------------------------------------------------------------------------
4537
+ //
4538
+ // Static Properties
4539
+ //
4540
+ // --------------------------------------------------------------------------
4541
+ static EMPTY_SYMBOL = '-';
4542
+ // --------------------------------------------------------------------------
4543
+ //
4544
+ // Static Methods
4545
+ //
4546
+ // --------------------------------------------------------------------------
4547
+ static transform(value) {
4548
+ let isNil = _.isNil(value);
4549
+ if (!isNil && !_.isNumber(value)) {
4550
+ isNil = _.isEmpty(value);
4551
+ }
4552
+ return !isNil ? value : PrettifyPipe.EMPTY_SYMBOL;
4553
+ }
4554
+ // --------------------------------------------------------------------------
4555
+ //
4556
+ // Public Methods
4557
+ //
4558
+ // --------------------------------------------------------------------------
4559
+ transform(value) {
4560
+ return PrettifyPipe.transform(value);
4561
+ }
4562
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: PrettifyPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
4563
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.0.8", ngImport: i0, type: PrettifyPipe, isStandalone: false, name: "viPrettify" });
4564
+ }
4565
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: PrettifyPipe, decorators: [{
4566
+ type: Pipe,
4567
+ args: [{
4568
+ name: 'viPrettify',
4569
+ standalone: false
4570
+ }]
4571
+ }] });
4572
+
4536
4573
  class MomentDateAdaptivePipe {
4537
4574
  // --------------------------------------------------------------------------
4538
4575
  //
@@ -4549,8 +4586,8 @@ class MomentDateAdaptivePipe {
4549
4586
  //
4550
4587
  // --------------------------------------------------------------------------
4551
4588
  static transform(value) {
4552
- if (_.isNaN(value)) {
4553
- return '---';
4589
+ if (_.isNil(value)) {
4590
+ return PrettifyPipe.EMPTY_SYMBOL;
4554
4591
  }
4555
4592
  let item = MomentDatePipe.parseMoment(value);
4556
4593
  let duration = moment.duration(moment().diff(item));
@@ -4797,44 +4834,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
4797
4834
  }]
4798
4835
  }] });
4799
4836
 
4800
- class PrettifyPipe {
4801
- // --------------------------------------------------------------------------
4802
- //
4803
- // Static Properties
4804
- //
4805
- // --------------------------------------------------------------------------
4806
- static EMPTY_SYMBOL = '-';
4807
- // --------------------------------------------------------------------------
4808
- //
4809
- // Static Methods
4810
- //
4811
- // --------------------------------------------------------------------------
4812
- static transform(value) {
4813
- let isNil = _.isNil(value);
4814
- if (!isNil && !_.isNumber(value)) {
4815
- isNil = _.isEmpty(value);
4816
- }
4817
- return !isNil ? value : PrettifyPipe.EMPTY_SYMBOL;
4818
- }
4819
- // --------------------------------------------------------------------------
4820
- //
4821
- // Public Methods
4822
- //
4823
- // --------------------------------------------------------------------------
4824
- transform(value) {
4825
- return PrettifyPipe.transform(value);
4826
- }
4827
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: PrettifyPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
4828
- static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.0.8", ngImport: i0, type: PrettifyPipe, isStandalone: false, name: "viPrettify" });
4829
- }
4830
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: PrettifyPipe, decorators: [{
4831
- type: Pipe,
4832
- args: [{
4833
- name: 'viPrettify',
4834
- standalone: false
4835
- }]
4836
- }] });
4837
-
4838
4837
  class TimePipe {
4839
4838
  // --------------------------------------------------------------------------
4840
4839
  //
@@ -5040,7 +5039,7 @@ class PipeServiceBase extends Destroyable {
5040
5039
  commitLanguageProperties() {
5041
5040
  let locale = this.language.locale ? this.language.locale : 'en';
5042
5041
  this._locale = locale === 'en' ? 'en-US' : locale;
5043
- if (PipeServiceBase.DATE) {
5042
+ if (!_.isNil(PipeServiceBase.DATE)) {
5044
5043
  PipeServiceBase.DATE = new DatePipe(this.locale);
5045
5044
  }
5046
5045
  }
@@ -5050,7 +5049,7 @@ class PipeServiceBase extends Destroyable {
5050
5049
  //
5051
5050
  // --------------------------------------------------------------------------
5052
5051
  get date() {
5053
- if (!PipeServiceBase.DATE) {
5052
+ if (_.isNil(PipeServiceBase.DATE)) {
5054
5053
  PipeServiceBase.DATE = new DatePipe(this.locale);
5055
5054
  }
5056
5055
  return PipeServiceBase.DATE;
@@ -5280,7 +5279,7 @@ class RouterServiceBase extends Loadable {
5280
5279
  else {
5281
5280
  this.params.delete(name);
5282
5281
  }
5283
- if (!_.isNil(extras)) {
5282
+ if (_.isNil(extras)) {
5284
5283
  extras = { replaceUrl: true };
5285
5284
  }
5286
5285
  this.applyExtras(extras);
@@ -5292,7 +5291,7 @@ class RouterServiceBase extends Loadable {
5292
5291
  }
5293
5292
  clearParams(extras) {
5294
5293
  this.params.clear();
5295
- if (!_.isNil(extras)) {
5294
+ if (_.isNil(extras)) {
5296
5295
  extras = { replaceUrl: true };
5297
5296
  }
5298
5297
  this.applyExtras(extras);
@@ -6298,7 +6297,7 @@ var UserServiceBaseEvent;
6298
6297
  class IWindow extends Destroyable {
6299
6298
  // --------------------------------------------------------------------------
6300
6299
  //
6301
- // Public Properties
6300
+ // Properties
6302
6301
  //
6303
6302
  // --------------------------------------------------------------------------
6304
6303
  isOnTop = false;
@@ -6310,6 +6309,9 @@ class IWindow extends Destroyable {
6310
6309
  backdrop;
6311
6310
  config;
6312
6311
  content;
6312
+ onTop;
6313
+ disabled;
6314
+ minimized;
6313
6315
  }
6314
6316
  var WindowEvent;
6315
6317
  (function (WindowEvent) {
@@ -6318,9 +6320,9 @@ var WindowEvent;
6318
6320
  WindowEvent["CONTENT_READY"] = "CONTENT_READY";
6319
6321
  WindowEvent["MOVED"] = "MOVED";
6320
6322
  WindowEvent["RESIZED"] = "RESIZED";
6321
- WindowEvent["DISABLED_CHANGED"] = "DISABLED_CHANGED";
6322
- WindowEvent["MINIMIZED_CHANGED"] = "MINIMIZED_CHANGED";
6323
6323
  WindowEvent["IS_ON_TOP_CHANGED"] = "IS_ON_TOP_CHANGED";
6324
+ WindowEvent["IS_DISABLED_CHANGED"] = "IS_DISABLED_CHANGED";
6325
+ WindowEvent["IS_MINIMIZED_CHANGED"] = "IS_MINIMIZED_CHANGED";
6324
6326
  WindowEvent["EXPAND"] = "EXPAND";
6325
6327
  WindowEvent["SET_ON_TOP"] = "SET_ON_TOP";
6326
6328
  })(WindowEvent || (WindowEvent = {}));
@@ -6457,7 +6459,7 @@ class WindowBase extends DestroyableContainer {
6457
6459
  return this._height;
6458
6460
  }
6459
6461
  set height(value) {
6460
- value = WindowBase.parseWidth(value, this.getConfig());
6462
+ value = WindowBase.parseHeight(value, this.getConfig());
6461
6463
  if (value === this._height) {
6462
6464
  return;
6463
6465
  }
@@ -6596,7 +6598,7 @@ class WindowConfig {
6596
6598
  if (!_.isNaN(this._elementMinY)) {
6597
6599
  return this._elementMinY;
6598
6600
  }
6599
- this._elementMinY = 0 - ViewUtil.getStageHeight();
6601
+ this._elementMinY = -ViewUtil.getStageHeight();
6600
6602
  if (!_.isNaN(this.paddingTop)) {
6601
6603
  this._elementMinY += this.paddingTop;
6602
6604
  }
@@ -6633,11 +6635,11 @@ class WindowConfig {
6633
6635
  return this._elementMaxX;
6634
6636
  }
6635
6637
  get elementWidth() {
6636
- if (this._elementWidth) {
6638
+ if (!_.isNil(this._elementWidth)) {
6637
6639
  return this._elementWidth;
6638
6640
  }
6639
6641
  this._elementWidth = 'auto';
6640
- if (this.defaultWidth) {
6642
+ if (!_.isNaN(this.defaultWidth)) {
6641
6643
  this._elementWidth = this.defaultWidth + 'px';
6642
6644
  }
6643
6645
  return this._elementWidth;
@@ -6676,11 +6678,11 @@ class WindowConfig {
6676
6678
  return this._elementMaxWidth;
6677
6679
  }
6678
6680
  get elementHeight() {
6679
- if (this._elementHeight) {
6681
+ if (!_.isNil(this._elementHeight)) {
6680
6682
  return this._elementHeight;
6681
6683
  }
6682
6684
  this._elementHeight = 'auto';
6683
- if (this.defaultHeight) {
6685
+ if (!_.isNaN(this.defaultHeight)) {
6684
6686
  this._elementHeight = this.defaultHeight + 'px';
6685
6687
  }
6686
6688
  return this._elementHeight;
@@ -6737,7 +6739,7 @@ class IWindowContent extends DestroyableContainer {
6737
6739
  container;
6738
6740
  // --------------------------------------------------------------------------
6739
6741
  //
6740
- // Properties=
6742
+ // Properties
6741
6743
  //
6742
6744
  // --------------------------------------------------------------------------
6743
6745
  _window;
@@ -6812,12 +6814,21 @@ class IWindowContent extends DestroyableContainer {
6812
6814
  get isOnTop() {
6813
6815
  return !_.isNil(this.window) ? this.window.isOnTop : false;
6814
6816
  }
6817
+ get onTop() {
6818
+ return !_.isNil(this.window) ? this.window.onTop : null;
6819
+ }
6815
6820
  get isMinimized() {
6816
6821
  return !_.isNil(this.window) ? this.window.isMinimized : false;
6817
6822
  }
6823
+ get minimized() {
6824
+ return !_.isNil(this.window) ? this.window.minimized : null;
6825
+ }
6818
6826
  get events() {
6819
6827
  return !_.isNil(this.window) ? this.window.events : null;
6820
6828
  }
6829
+ get disabled() {
6830
+ return !_.isNil(this.window) ? this.window.disabled : null;
6831
+ }
6821
6832
  set isDisabled(value) {
6822
6833
  if (!_.isNil(this.window)) {
6823
6834
  this.window.isDisabled = value;