@datarailsshared/datarailsshared 1.4.176 → 1.4.178

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.
@@ -613,13 +613,13 @@
613
613
  }
614
614
  Object.defineProperty(MonthTagComponent.prototype, "isLocked", {
615
615
  get: function () {
616
- return this.date ? !this.dateFilter(moment$7.unix(this.date).utc()) : false;
616
+ return this.date ? !this.dateFilter(moment$7.unix(this.date)) : false;
617
617
  },
618
618
  enumerable: false,
619
619
  configurable: true
620
620
  });
621
621
  MonthTagComponent.prototype.initDate = function () {
622
- this.date = this.defaultValue || moment$7().utc().unix();
622
+ this.date = this.defaultValue || moment$7().unix();
623
623
  this.dateObj.date = this.date;
624
624
  };
625
625
  MonthTagComponent.prototype.initName = function () {
@@ -628,7 +628,7 @@
628
628
  }
629
629
  };
630
630
  MonthTagComponent.prototype.chosenTagHandler = function (value) {
631
- var resultDate = moment$7.unix(value).utc();
631
+ var resultDate = moment$7.unix(value);
632
632
  resultDate.hour(12);
633
633
  var resultTag = {
634
634
  name: this.name,
@@ -687,7 +687,7 @@
687
687
  get: function () {
688
688
  var _this = this;
689
689
  return this.quarters
690
- ? this.quarters.some(function (quarter) { return !_this.dateFilter(moment$6.unix(quarter.value).utc()); })
690
+ ? this.quarters.some(function (quarter) { return !_this.dateFilter(moment$6.unix(quarter.value)); })
691
691
  : false;
692
692
  },
693
693
  enumerable: false,
@@ -722,7 +722,7 @@
722
722
  }
723
723
  };
724
724
  QuarterTagComponent.prototype.chosenTagHandler = function (quarter) {
725
- var resultDate = moment$6.unix(quarter.value).utc();
725
+ var resultDate = moment$6.unix(quarter.value);
726
726
  var resultTag = {
727
727
  name: this.name,
728
728
  value: resultDate.unix(),
@@ -817,14 +817,14 @@
817
817
  }
818
818
  Object.defineProperty(WeekTagComponent.prototype, "isLocked", {
819
819
  get: function () {
820
- return this.date ? !this.dateFilter(moment$5.unix(this.date).utc()) : false;
820
+ return this.date ? !this.dateFilter(moment$5.unix(this.date)) : false;
821
821
  },
822
822
  enumerable: false,
823
823
  configurable: true
824
824
  });
825
825
  WeekTagComponent.prototype.ngOnInit = function () {
826
826
  this.initName();
827
- var timestamp = this.defaultValue || moment$5().utc().unix();
827
+ var timestamp = this.defaultValue || moment$5().unix();
828
828
  this.date = timestamp;
829
829
  this.dateObj.date = timestamp;
830
830
  this.chosenTagHandler(timestamp);
@@ -844,7 +844,7 @@
844
844
  };
845
845
  ;
846
846
  WeekTagComponent.prototype.chosenTagHandler = function (value) {
847
- var resultDate = moment$5.unix(value).utc();
847
+ var resultDate = moment$5.unix(value);
848
848
  var resultTag = {
849
849
  name: this.name,
850
850
  value: resultDate.unix(),
@@ -903,13 +903,13 @@
903
903
  }
904
904
  Object.defineProperty(YearTagComponent.prototype, "isLocked", {
905
905
  get: function () {
906
- return this.date ? !this.dateFilter(moment$4.unix(this.date).utc()) : false;
906
+ return this.date ? !this.dateFilter(moment$4.unix(this.date)) : false;
907
907
  },
908
908
  enumerable: false,
909
909
  configurable: true
910
910
  });
911
911
  YearTagComponent.prototype.initDate = function () {
912
- this.date = this.defaultValue || moment$4().utc().unix();
912
+ this.date = this.defaultValue || moment$4().unix();
913
913
  this.dateObj.date = this.date;
914
914
  };
915
915
  YearTagComponent.prototype.initName = function () {
@@ -918,7 +918,7 @@
918
918
  }
919
919
  };
920
920
  YearTagComponent.prototype.chosenTagHandler = function (value) {
921
- var resultDate = moment$4.unix(value).utc();
921
+ var resultDate = moment$4.unix(value);
922
922
  resultDate.hour(12);
923
923
  var resultTag = {
924
924
  name: this.name,
@@ -1221,13 +1221,13 @@
1221
1221
  }
1222
1222
  Object.defineProperty(DayTagComponent.prototype, "isLocked", {
1223
1223
  get: function () {
1224
- return this.date ? !this.dateFilter(moment$3.unix(this.date).utc()) : false;
1224
+ return this.date ? !this.dateFilter(moment$3.unix(this.date)) : false;
1225
1225
  },
1226
1226
  enumerable: false,
1227
1227
  configurable: true
1228
1228
  });
1229
1229
  DayTagComponent.prototype.initDate = function () {
1230
- this.date = this.defaultValue || moment$3().utc().unix();
1230
+ this.date = this.defaultValue || moment$3().unix();
1231
1231
  this.dateObj.date = this.date;
1232
1232
  };
1233
1233
  DayTagComponent.prototype.initName = function () {
@@ -1236,7 +1236,7 @@
1236
1236
  }
1237
1237
  };
1238
1238
  DayTagComponent.prototype.chosenTagHandler = function (value) {
1239
- var date = moment$3.unix(value).utc();
1239
+ var date = moment$3.unix(value);
1240
1240
  var resultTag = {
1241
1241
  name: this.name,
1242
1242
  value: date.unix(),
@@ -5704,6 +5704,7 @@
5704
5704
  forms.ReactiveFormsModule,
5705
5705
  common.CommonModule,
5706
5706
  ngSelect.NgSelectModule,
5707
+ core.MatNativeDateModule,
5707
5708
  datepicker.MatDatepickerModule,
5708
5709
  tooltip.MatTooltipModule,
5709
5710
  DrTooltipModule
@@ -6465,9 +6466,11 @@
6465
6466
  };
6466
6467
 
6467
6468
  var DrChatSuggestionsComponent = /** @class */ (function () {
6468
- function DrChatSuggestionsComponent() {
6469
+ function DrChatSuggestionsComponent(cdr) {
6470
+ this.cdr = cdr;
6469
6471
  this._nonHiddenValues = [];
6470
6472
  this.visibleValues = [];
6473
+ this.isSuggestedMenuOpen = false;
6471
6474
  this.values = [];
6472
6475
  this.fullScreen = false;
6473
6476
  this.buttonMode = false;
@@ -6493,15 +6496,13 @@
6493
6496
  this.filterValues();
6494
6497
  };
6495
6498
  DrChatSuggestionsComponent.prototype.onItemClick = function (item) {
6496
- var _this = this;
6497
6499
  if (this.waitForReply) {
6498
6500
  return;
6499
6501
  }
6502
+ this.isSuggestedMenuOpen = false;
6500
6503
  this.suggestionSelect.emit(item);
6501
6504
  this.hiddenValues = __spreadArray(__spreadArray([], __read(this.hiddenValues)), [item]);
6502
6505
  this.filterValues();
6503
- this.suggestionCardsList.nativeElement.style.visibility = 'hidden';
6504
- setTimeout(function () { return _this.suggestionCardsList.nativeElement.style.visibility = ''; }, 10);
6505
6506
  };
6506
6507
  DrChatSuggestionsComponent.prototype.filterValues = function () {
6507
6508
  var hiddenValues = this.hiddenValues;
@@ -6520,29 +6521,37 @@
6520
6521
  var item = nonHiddenValues.splice(randomIndex, 1)[0];
6521
6522
  this.visibleValues.push(item);
6522
6523
  }
6524
+ this.cdr.markForCheck();
6523
6525
  };
6524
6526
  DrChatSuggestionsComponent.prototype.clearHidden = function () {
6525
6527
  localStorage.setItem('aiChatSuggestions', null);
6526
6528
  this.filterValues();
6527
6529
  };
6530
+ DrChatSuggestionsComponent.prototype.toggleSuggestedMenu = function () {
6531
+ this.isSuggestedMenuOpen = !this.isSuggestedMenuOpen;
6532
+ if (this.isSuggestedMenuOpen) {
6533
+ this.fillVisibleValues();
6534
+ }
6535
+ };
6528
6536
  return DrChatSuggestionsComponent;
6529
6537
  }());
6530
6538
  DrChatSuggestionsComponent.decorators = [
6531
6539
  { type: i0.Component, args: [{
6532
6540
  selector: 'dr-chat-suggestions',
6533
- template: "<div class=\"chat-suggestions\">\n <ng-container *ngIf=\"buttonMode; else suggestionCards\">\n <div class=\"chat-suggestions__container\" (mouseenter)=\"fillVisibleValues()\">\n <dr-button theme=\"ghost\" class=\"chat-suggestions__container__button\">\n Suggested chats\n </dr-button>\n <ng-container *ngTemplateOutlet=\"suggestionCards\"></ng-container>\n </div>\n </ng-container>\n</div>\n\n<ng-template #suggestionCards>\n <div class=\"chat-suggestions__items\" #suggestionCardsList>\n <div class=\"chat-suggestions__items__background\"></div>\n <div *ngFor=\"let item of visibleValues\"\n class=\"chat-suggestions__items__item\" (click)=\"onItemClick(item)\">\n {{ item }}\n </div>\n </div>\n</ng-template>\n",
6541
+ template: "<div class=\"chat-suggestions\">\n <ng-container *ngIf=\"buttonMode; else suggestionCards\">\n <div class=\"chat-suggestions__container\"\n [class.chat-suggestions__container--opened]=\"isSuggestedMenuOpen\"\n *ngIf=\"visibleValues.length\">\n <dr-button theme=\"ghost\" class=\"chat-suggestions__container__button\" (click)=\"toggleSuggestedMenu()\">\n Suggested chats\n </dr-button>\n <ng-container *ngTemplateOutlet=\"suggestionCards\"></ng-container>\n </div>\n </ng-container>\n</div>\n\n<ng-template #suggestionCards>\n <div class=\"chat-suggestions__items\">\n <div class=\"chat-suggestions__items__background\"></div>\n <div *ngFor=\"let item of visibleValues\"\n class=\"chat-suggestions__items__item\" (click)=\"onItemClick(item)\">\n {{ item }}\n </div>\n </div>\n</ng-template>\n",
6534
6542
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
6535
- styles: [":host{display:flex;align-items:flex-start;justify-content:center}:host .chat-suggestions{display:flex;width:100%;max-width:970px}:host .chat-suggestions__container{display:flex;position:relative;width:auto;margin-top:12px;padding:0 24px}:host .chat-suggestions__container:hover{width:100%}:host .chat-suggestions__container:hover .chat-suggestions__container__button::ng-deep button{color:#4646ce;background:#f2f2fb}:host .chat-suggestions__container:hover .chat-suggestions__items,:host .chat-suggestions__container:hover .chat-suggestions__items__background{display:flex}:host .chat-suggestions__container__button::ng-deep button{background:#F2F2FF!important;border-radius:4px}:host .chat-suggestions__container .chat-suggestions__items{display:none;position:absolute;width:100%;bottom:0;left:0;padding-bottom:32px;z-index:2}:host .chat-suggestions__items{display:flex;flex-wrap:wrap;width:100%;justify-content:space-between;padding:0 24px}:host .chat-suggestions__items__background{display:none;position:absolute;top:-32px;right:0;bottom:32px;left:0;background:white;opacity:.7;z-index:-1}:host .chat-suggestions__items__item{margin:0 0 20px;display:inline-flex;height:76px;width:275px;padding:16px;border-radius:8px;background:#F2F2FF;box-shadow:0 1px 2px #00000026;font-size:14px;line-height:24px;color:#25258c}:host .chat-suggestions__items__item:hover{cursor:pointer;background:#EAEAFF}\n"]
6543
+ styles: [":host{display:flex;align-items:flex-start;justify-content:center}:host .chat-suggestions{display:flex;width:100%;max-width:970px}:host .chat-suggestions__container{display:flex;position:relative;width:auto;margin-top:12px;padding:0 24px}:host .chat-suggestions__container__button{z-index:3}:host .chat-suggestions__container__button::ng-deep button{background:#F2F2FB!important;border-radius:4px;cursor:pointer}:host .chat-suggestions__container .chat-suggestions__items{display:none;position:absolute;width:100%;bottom:0;left:0;padding-bottom:32px;z-index:2}:host .chat-suggestions__container--opened{width:100%}:host .chat-suggestions__container--opened .chat-suggestions__container__button::ng-deep button{color:#4646ce;background:#F2F2FB}:host .chat-suggestions__container--opened .chat-suggestions__items,:host .chat-suggestions__container--opened .chat-suggestions__items__background{display:flex}:host .chat-suggestions__items{display:flex;flex-wrap:wrap;width:100%;justify-content:space-between;padding:0 24px}:host .chat-suggestions__items__background{display:none;position:absolute;top:-32px;right:0;bottom:32px;left:0;background:#FFFFFF;opacity:.7;z-index:-1}:host .chat-suggestions__items__item{margin:0 0 20px;display:inline-flex;height:76px;width:275px;padding:16px;border-radius:8px;background:#F2F2FB;box-shadow:0 1px 2px #00000026;font-size:14px;line-height:24px;color:#25258c}:host .chat-suggestions__items__item:hover{cursor:pointer;background:#EAEAFF}\n"]
6536
6544
  },] }
6537
6545
  ];
6538
- DrChatSuggestionsComponent.ctorParameters = function () { return []; };
6546
+ DrChatSuggestionsComponent.ctorParameters = function () { return [
6547
+ { type: i0.ChangeDetectorRef }
6548
+ ]; };
6539
6549
  DrChatSuggestionsComponent.propDecorators = {
6540
6550
  values: [{ type: i0.Input }],
6541
6551
  fullScreen: [{ type: i0.Input }],
6542
6552
  buttonMode: [{ type: i0.Input }],
6543
6553
  waitForReply: [{ type: i0.Input }],
6544
- suggestionSelect: [{ type: i0.Output }],
6545
- suggestionCardsList: [{ type: i0.ViewChild, args: ['suggestionCardsList',] }]
6554
+ suggestionSelect: [{ type: i0.Output }]
6546
6555
  };
6547
6556
 
6548
6557
  var DrChatComponent = /** @class */ (function () {