@datorama/core 22.2.6 → 22.5.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.
Files changed (29) hide show
  1. package/bundle.scss +22 -0
  2. package/bundles/datorama-core.umd.js +17 -11
  3. package/bundles/datorama-core.umd.js.map +1 -1
  4. package/bundles/datorama-core.umd.min.js +3 -3
  5. package/bundles/datorama-core.umd.min.js.map +1 -1
  6. package/datorama-core.metadata.json +1 -1
  7. package/esm2015/lib/date-picker/date-picker-container/date-picker-container.component.js +5 -5
  8. package/esm2015/lib/grid-v2/grid-controller/grid-controller.component.js +1 -1
  9. package/esm2015/lib/grid-v2/grid-filter/grid-filter.component.js +1 -1
  10. package/esm2015/lib/grid-v2/grid-filter/grid-filter.types.js +1 -1
  11. package/esm2015/lib/grid-v2/grid-store/grid.service.js +1 -1
  12. package/esm2015/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +1 -1
  13. package/esm2015/lib/select/select.component.js +12 -7
  14. package/esm2015/lib/version.js +2 -2
  15. package/esm5/lib/date-picker/date-picker-container/date-picker-container.component.js +5 -5
  16. package/esm5/lib/grid-v2/grid-controller/grid-controller.component.js +1 -1
  17. package/esm5/lib/grid-v2/grid-filter/grid-filter.component.js +1 -1
  18. package/esm5/lib/grid-v2/grid-filter/grid-filter.types.js +1 -1
  19. package/esm5/lib/grid-v2/grid-store/grid.service.js +1 -1
  20. package/esm5/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +1 -1
  21. package/esm5/lib/select/select.component.js +13 -7
  22. package/esm5/lib/version.js +2 -2
  23. package/fesm2015/datorama-core.js +16 -11
  24. package/fesm2015/datorama-core.js.map +1 -1
  25. package/fesm5/datorama-core.js +17 -11
  26. package/fesm5/datorama-core.js.map +1 -1
  27. package/lib/date-picker/date-picker-container/date-picker-container.component.d.ts +1 -1
  28. package/lib/select/select.component.d.ts +1 -0
  29. package/package.json +1 -1
@@ -8549,8 +8549,8 @@ var DatoSelectComponent = /** @class */ (function (_super) {
8549
8549
  }
8550
8550
  }
8551
8551
  this.onChange(this._model);
8552
- this.datoOverlay.scheduleUpdate();
8553
8552
  this.cdr.markForCheck();
8553
+ this.asyncUpdateDropdownPosition();
8554
8554
  };
8555
8555
  DatoSelectComponent.prototype.reorderOptions = function (newOrder) {
8556
8556
  this._model = newOrder;
@@ -8571,9 +8571,7 @@ var DatoSelectComponent = /** @class */ (function (_super) {
8571
8571
  updateDisabled && this.updateDisabledState();
8572
8572
  this.onChange(this._model);
8573
8573
  this.cdr.markForCheck();
8574
- if (this.datoOverlay.attached) {
8575
- this.datoOverlay.scheduleUpdate();
8576
- }
8574
+ this.asyncUpdateDropdownPosition();
8577
8575
  };
8578
8576
  DatoSelectComponent.prototype.preventBodyScroll = function (event) {
8579
8577
  if (isArrowUpDown(event)) {
@@ -8828,7 +8826,7 @@ var DatoSelectComponent = /** @class */ (function (_super) {
8828
8826
  _this.searchTerm = value;
8829
8827
  _this.keyManager.setActiveItem(-1);
8830
8828
  _this.cdr.markForCheck();
8831
- _this.datoOverlay && _this.datoOverlay.scheduleUpdate();
8829
+ _this.asyncUpdateDropdownPosition();
8832
8830
  });
8833
8831
  };
8834
8832
  /**
@@ -8932,7 +8930,7 @@ var DatoSelectComponent = /** @class */ (function (_super) {
8932
8930
  updateDisabled && this.updateDisabledState();
8933
8931
  this.onChange(this._model);
8934
8932
  this.cdr.markForCheck();
8935
- this.datoOverlay.scheduleUpdate();
8933
+ this.asyncUpdateDropdownPosition();
8936
8934
  };
8937
8935
  DatoSelectComponent.prototype.activateInfiniteScroll = function () {
8938
8936
  var _this = this;
@@ -8985,6 +8983,14 @@ var DatoSelectComponent = /** @class */ (function (_super) {
8985
8983
  finally { if (e_9) throw e_9.error; }
8986
8984
  }
8987
8985
  };
8986
+ // Make sure the overlay will be update AFTER Change Detection was done
8987
+ // So the items in the input (and its height) is update
8988
+ DatoSelectComponent.prototype.asyncUpdateDropdownPosition = function () {
8989
+ var _this = this;
8990
+ if (this.datoOverlay && this.datoOverlay.attached) {
8991
+ setTimeout(function () { return _this.datoOverlay.scheduleUpdate(); }, 0);
8992
+ }
8993
+ };
8988
8994
  DatoSelectComponent.ctorParameters = function () { return [
8989
8995
  { type: ChangeDetectorRef },
8990
8996
  { type: DatoTranslateService },
@@ -18271,9 +18277,11 @@ var DatoDatePickerContainerComponent = /** @class */ (function (_super) {
18271
18277
  .subscribe(function (event) {
18272
18278
  _this.toggle.emit(event);
18273
18279
  _this.open = false;
18280
+ _this.cdr.detectChanges();
18274
18281
  _this.input && _this.setInputValue();
18275
18282
  });
18276
18283
  this.open = true;
18284
+ this.cdr.detectChanges();
18277
18285
  this.input && this.handleEnter();
18278
18286
  }
18279
18287
  };
@@ -18327,9 +18335,7 @@ var DatoDatePickerContainerComponent = /** @class */ (function (_super) {
18327
18335
  };
18328
18336
  DatoDatePickerContainerComponent.prototype.handleEnter = function () {
18329
18337
  var _this = this;
18330
- this.input.keydown$
18331
- .pipe(filter$1(isEnter), takeUntil(this.toggle))
18332
- .subscribe(function () {
18338
+ this.input.keydown$.pipe(filter$1(isEnter), takeUntil(this.toggle)).subscribe(function () {
18333
18339
  _this.setInputValue();
18334
18340
  _this.popover.closeById(DATE_PICKER_POPOVER_ID);
18335
18341
  _this.input.blur();
@@ -18394,7 +18400,7 @@ var DatoDatePickerContainerComponent = /** @class */ (function (_super) {
18394
18400
  DatoDatePickerContainerComponent = __decorate([
18395
18401
  Component({
18396
18402
  selector: 'dato-date-picker',
18397
- template: "<div class=\"d-flex {{ triggerStyle }} items-center dato-date-picker-trigger\" (click)=\"openDatepicker(origin)\" #origin\n [class.pointer]=\"!viewMode\">\n <ng-template #defaultView>\n <dato-icon datoIcon=\"calendarcore\" width=\"16px\" class=\"primary-400-color\"></dato-icon>\n <div class=\"ellipsis\"\n [datoTooltip]=\"dateLabel + ' ' + dateRange\"\n [datoTooltipPosition]=\"labelTooltipPosition\"\n [datoTooltipOnTextOverflow]=\"true\">\n <span class=\"dato-note date-label\" *ngIf=\"dateLabel\">{{dateLabel | translate}}&nbsp;</span>\n <span class=\"dato-note date-range\">{{dateRange}}</span>\n </div>\n </ng-template>\n\n <ng-template [ngTemplateOutlet]=\"triggerTpl ? triggerTpl : defaultView\"\n [ngTemplateOutletContext]=\"{label: dateLabel, range: dateRange, icon: 'calendar'}\"></ng-template>\n </div>\n",
18403
+ template: "<div class=\"d-flex {{ triggerStyle }} items-center dato-date-picker-trigger\" [class.open]=\"open\" (click)=\"openDatepicker(origin)\" #origin\n [class.pointer]=\"!viewMode\">\n <ng-template #defaultView>\n <dato-icon datoIcon=\"calendarcore\" width=\"16px\" class=\"primary-400-color\"></dato-icon>\n <div class=\"ellipsis\"\n [datoTooltip]=\"dateLabel + ' ' + dateRange\"\n [datoTooltipPosition]=\"labelTooltipPosition\"\n [datoTooltipOnTextOverflow]=\"true\">\n <span class=\"dato-note date-label\" *ngIf=\"dateLabel\">{{dateLabel | translate}}&nbsp;</span>\n <span class=\"dato-note date-range\">{{dateRange}}</span>\n </div>\n </ng-template>\n\n <ng-template [ngTemplateOutlet]=\"triggerTpl ? triggerTpl : defaultView\"\n [ngTemplateOutletContext]=\"{label: dateLabel, range: dateRange, icon: 'calendar'}\"></ng-template>\n </div>\n",
18398
18404
  changeDetection: ChangeDetectionStrategy.OnPush
18399
18405
  }),
18400
18406
  __param(0, Self()), __param(0, Optional()),
@@ -25187,7 +25193,7 @@ function fixNgLeaks() {
25187
25193
  };
25188
25194
  }
25189
25195
 
25190
- window.coreVersion = '22.2.6';
25196
+ window.coreVersion = '22.5.1';
25191
25197
 
25192
25198
  /**
25193
25199
  * @license