@datorama/core 22.9.8-rc.1 → 22.9.8

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.
@@ -8430,88 +8430,6 @@
8430
8430
  return !!window.Cypress;
8431
8431
  }
8432
8432
 
8433
- /**
8434
- * @license
8435
- * Copyright Datorama. All Rights Reserved.
8436
- *
8437
- * Use of this source code is governed by an Apache License 2.0 license that can be
8438
- * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
8439
- */
8440
- var DatoTriggerSingle = /** @class */ (function () {
8441
- function DatoTriggerSingle(cdr) {
8442
- this.cdr = cdr;
8443
- this._placeholder = '';
8444
- }
8445
- Object.defineProperty(DatoTriggerSingle.prototype, "placeholder", {
8446
- set: function (value) {
8447
- this._placeholder = value;
8448
- this.cdr.detectChanges();
8449
- },
8450
- enumerable: true,
8451
- configurable: true
8452
- });
8453
- Object.defineProperty(DatoTriggerSingle.prototype, "context", {
8454
- set: function (value) {
8455
- this._model = { $implicit: value };
8456
- this.cdr.detectChanges();
8457
- },
8458
- enumerable: true,
8459
- configurable: true
8460
- });
8461
- Object.defineProperty(DatoTriggerSingle.prototype, "hidePlaceholder", {
8462
- get: function () {
8463
- return !this._model || !this._model.$implicit;
8464
- },
8465
- enumerable: true,
8466
- configurable: true
8467
- });
8468
- DatoTriggerSingle.prototype.ngOnInit = function () {
8469
- this.cdr.detach();
8470
- };
8471
- Object.defineProperty(DatoTriggerSingle.prototype, "getLabel", {
8472
- get: function () {
8473
- return this._model && this._model.$implicit && this._model.$implicit[this.labelKey];
8474
- },
8475
- enumerable: true,
8476
- configurable: true
8477
- });
8478
- DatoTriggerSingle.ctorParameters = function () { return [
8479
- { type: core.ChangeDetectorRef }
8480
- ]; };
8481
- __decorate([
8482
- core.Input(),
8483
- __metadata("design:type", core.TemplateRef)
8484
- ], DatoTriggerSingle.prototype, "loadingTemplate", void 0);
8485
- __decorate([
8486
- core.Input(),
8487
- __metadata("design:type", DatoSelectActiveDirective)
8488
- ], DatoTriggerSingle.prototype, "active", void 0);
8489
- __decorate([
8490
- core.Input(),
8491
- __metadata("design:type", Object),
8492
- __metadata("design:paramtypes", [Object])
8493
- ], DatoTriggerSingle.prototype, "placeholder", null);
8494
- __decorate([
8495
- core.Input(),
8496
- __metadata("design:type", String)
8497
- ], DatoTriggerSingle.prototype, "labelKey", void 0);
8498
- __decorate([
8499
- core.Input(),
8500
- __metadata("design:type", Object),
8501
- __metadata("design:paramtypes", [Object])
8502
- ], DatoTriggerSingle.prototype, "context", null);
8503
- DatoTriggerSingle = __decorate([
8504
- core.Component({
8505
- selector: 'dato-trigger-single',
8506
- template: "<ng-template *ngIf=\"loadingTemplate\" [ngTemplateOutlet]=\"loadingTemplate\"></ng-template>\n<ng-container\n *ngIf=\"active && !hidePlaceholder\"\n [ngTemplateOutlet]=\"active.tpl\"\n [ngTemplateOutletContext]=\"_model\">\n</ng-container>\n<ng-container *ngIf=\"!active\">{{getLabel | translate}}</ng-container>\n<span class=\"dato-select__placeholder\" *ngIf=\"hidePlaceholder\">{{_placeholder}}</span>\n<dato-icon datoIcon=\"arrow-down\" datoSize=\"sm\" class=\"dato-select__single__arrow\"></dato-icon>\n",
8507
- changeDetection: core.ChangeDetectionStrategy.OnPush,
8508
- styles: [":host{display:block;position:relative;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host dato-icon{position:absolute;top:50%;transform:translateY(-50%);right:10px}"]
8509
- }),
8510
- __metadata("design:paramtypes", [core.ChangeDetectorRef])
8511
- ], DatoTriggerSingle);
8512
- return DatoTriggerSingle;
8513
- }());
8514
-
8515
8433
  /**
8516
8434
  * @license
8517
8435
  * Copyright Datorama. All Rights Reserved.
@@ -9402,10 +9320,6 @@
9402
9320
  { type: undefined, decorators: [{ type: core.Attribute, args: ['datoSize',] }] },
9403
9321
  { type: String, decorators: [{ type: core.Attribute, args: ['width',] }] }
9404
9322
  ]; };
9405
- __decorate([
9406
- core.ViewChild('datoTriggerSingle'),
9407
- __metadata("design:type", DatoTriggerSingle)
9408
- ], DatoSelectComponent.prototype, "datoTriggerSingle", void 0);
9409
9323
  __decorate([
9410
9324
  core.ViewChild('dropdown'),
9411
9325
  __metadata("design:type", core.TemplateRef)
@@ -9572,7 +9486,7 @@
9572
9486
  DatoSelectComponent = __decorate([
9573
9487
  core.Component({
9574
9488
  selector: 'dato-select',
9575
- template: "<section class=\"dato-select__trigger\" [class.dato-select--naked]=\"_naked\" [class.dato-select--disabled]=\"_disabled\">\n\n <div class=\"dato-select__single\" *ngIf=\"isSingle\" [ngClass]=\"_dropdownClass\">\n <dato-input [class.force-hide]=\"(!open && isCombo) || !isCombo\" [placeholder]=\"searchPlaceholder | translate\"\n (keyup)=\"keyup($event)\" [isFocused]=\"_focus\" [isLoading]=\"isLoading\" [formControl]=\"searchControl\" type=\"search\">\n </dato-input>\n\n <dato-trigger-single #datoTriggerSingle [loadingTemplate]=\"loadingTemplate\" [active]=\"active\" datoErrorValidationBorderAnchor tabindex=\"0\" [labelKey]=\"labelKey\"\n [context]=\"_model[0]\" [class.force-hide]=\"open && isCombo\" [placeholder]=\"placeholder | translate\"\n class=\"ontop-overlay\" (keydown)=\"preventBodyScroll($event)\" (keyup)=\"keyup($event)\" (click)=\"openDropdown()\">\n </dato-trigger-single>\n </div>\n\n <dato-trigger-multi [loadingTemplate]=\"loadingTemplate\" [options]=\"_model\" datoErrorValidationBorderAnchor [control]=\"searchControl\"\n [placeholder]=\"placeholder | translate\" [labelKey]=\"labelKey\" [idKey]=\"idKey\" (keyup)=\"keyup($event)\"\n [isLoading]=\"isLoading\" [keepFocus]=\"keepFocus\" [limitTo]=\"limitTo\" [clickOutside]=\"_clickOutside\" [isSortable]=\"isSortable\"\n [selectAllChipTxt]=\"selectAllChipTxt\"\n [showSelectAllChip]=\"selectAllChipTxt && showSelectAllChip\"\n (unselectAll)=\"checkAll(false)\"\n (removeOption)=\"removeOption($event)\" (reorderOptions)=\"reorderOptions($event)\" *ngIf=\"isMulti\"\n (click)=\"openDropdown($event)\"></dato-trigger-multi>\n\n</section>\n\n<ng-template #dropdown>\n <section class=\"dato-select__dropdown-container\" tabindex=\"0\" (keyup)=\"keyup($event)\">\n\n <!-- HEADER -->\n\n <header class=\"dato-select__header dato-select__option dato-select__option--simple\" data-is-floating\n *ngIf=\"isMulti && allowSelectAll\" [class.force-hide]=\"_showEmptyResults\" [class.ml-10]=\"containsGroups\">\n <dato-checkbox [checked]=\"_isAllChecked\" (check)=\"checkAll($event)\"\n [indeterminatelyChecked]=\"_isIndeterminatelyChecked\">\n {{'core.select-all' | translate}}<span class=\"primary-300-color note-italic ml-5\">{{_count}}</span>\n </dato-checkbox>\n </header>\n\n <!-- END HEADER -->\n\n <!-- DROPDOWN -->\n\n <div class=\"dato-select__dropdown\">\n\n <ng-content></ng-content>\n\n <dato-select-empty [show]=\"_showEmptyResults\">{{_noItemsLabel}}</dato-select-empty>\n <div class=\"dato-select__option dato-select-infinite-spinner\" data-is-floating *ngIf=\"infiniteScrollLoading\">\n <span class=\"dato-input__spinner\"></span>\n </div>\n\n </div>\n\n <!-- END DROPDOWN -->\n\n\n <!-- FOOTER -->\n\n <footer class=\"dato-select__footer d-flex\" [class.with-actions]=\"_withActions\">\n\n <ng-content select=\"[datoSelectFooter]\"></ng-content>\n\n <ng-container *ngIf=\"_withActions\">\n <dato-link class=\"mr-20\" datoType=\"secondary\" (click)=\"close()\">Cancel</dato-link>\n <dato-button datoSize=\"sm\" (click)=\"save.emit(); close();\">Save</dato-button>\n </ng-container>\n\n </footer>\n\n <!-- END FOOTER -->\n\n </section>\n\n</ng-template>\n",
9489
+ template: "<section class=\"dato-select__trigger\" [class.dato-select--naked]=\"_naked\" [class.dato-select--disabled]=\"_disabled\">\n\n <div class=\"dato-select__single\" *ngIf=\"isSingle\" [ngClass]=\"_dropdownClass\">\n <dato-input [class.force-hide]=\"(!open && isCombo) || !isCombo\" [placeholder]=\"searchPlaceholder | translate\"\n (keyup)=\"keyup($event)\" [isFocused]=\"_focus\" [isLoading]=\"isLoading\" [formControl]=\"searchControl\" type=\"search\">\n </dato-input>\n\n <dato-trigger-single [loadingTemplate]=\"loadingTemplate\" [active]=\"active\" datoErrorValidationBorderAnchor tabindex=\"0\" [labelKey]=\"labelKey\"\n [context]=\"_model[0]\" [class.force-hide]=\"open && isCombo\" [placeholder]=\"placeholder | translate\"\n class=\"ontop-overlay\" (keydown)=\"preventBodyScroll($event)\" (keyup)=\"keyup($event)\" (click)=\"openDropdown()\">\n </dato-trigger-single>\n </div>\n\n <dato-trigger-multi [loadingTemplate]=\"loadingTemplate\" [options]=\"_model\" datoErrorValidationBorderAnchor [control]=\"searchControl\"\n [placeholder]=\"placeholder | translate\" [labelKey]=\"labelKey\" [idKey]=\"idKey\" (keyup)=\"keyup($event)\"\n [isLoading]=\"isLoading\" [keepFocus]=\"keepFocus\" [limitTo]=\"limitTo\" [clickOutside]=\"_clickOutside\" [isSortable]=\"isSortable\"\n [selectAllChipTxt]=\"selectAllChipTxt\"\n [showSelectAllChip]=\"selectAllChipTxt && showSelectAllChip\"\n (unselectAll)=\"checkAll(false)\"\n (removeOption)=\"removeOption($event)\" (reorderOptions)=\"reorderOptions($event)\" *ngIf=\"isMulti\"\n (click)=\"openDropdown($event)\"></dato-trigger-multi>\n\n</section>\n\n<ng-template #dropdown>\n <section class=\"dato-select__dropdown-container\" tabindex=\"0\" (keyup)=\"keyup($event)\">\n\n <!-- HEADER -->\n\n <header class=\"dato-select__header dato-select__option dato-select__option--simple\" data-is-floating\n *ngIf=\"isMulti && allowSelectAll\" [class.force-hide]=\"_showEmptyResults\" [class.ml-10]=\"containsGroups\">\n <dato-checkbox [checked]=\"_isAllChecked\" (check)=\"checkAll($event)\"\n [indeterminatelyChecked]=\"_isIndeterminatelyChecked\">\n {{'core.select-all' | translate}}<span class=\"primary-300-color note-italic ml-5\">{{_count}}</span>\n </dato-checkbox>\n </header>\n\n <!-- END HEADER -->\n\n <!-- DROPDOWN -->\n\n <div class=\"dato-select__dropdown\">\n\n <ng-content></ng-content>\n\n <dato-select-empty [show]=\"_showEmptyResults\">{{_noItemsLabel}}</dato-select-empty>\n <div class=\"dato-select__option dato-select-infinite-spinner\" data-is-floating *ngIf=\"infiniteScrollLoading\">\n <span class=\"dato-input__spinner\"></span>\n </div>\n\n </div>\n\n <!-- END DROPDOWN -->\n\n\n <!-- FOOTER -->\n\n <footer class=\"dato-select__footer d-flex\" [class.with-actions]=\"_withActions\">\n\n <ng-content select=\"[datoSelectFooter]\"></ng-content>\n\n <ng-container *ngIf=\"_withActions\">\n <dato-link class=\"mr-20\" datoType=\"secondary\" (click)=\"close()\">Cancel</dato-link>\n <dato-button datoSize=\"sm\" (click)=\"save.emit(); close();\">Save</dato-button>\n </ng-container>\n\n </footer>\n\n <!-- END FOOTER -->\n\n </section>\n\n</ng-template>\n",
9576
9490
  preserveWhitespaces: false,
9577
9491
  providers: [valueAccessor$3, DatoOverlay],
9578
9492
  encapsulation: core.ViewEncapsulation.None,
@@ -9590,6 +9504,88 @@
9590
9504
  return DatoSelectComponent;
9591
9505
  }(BaseCustomControl));
9592
9506
 
9507
+ /**
9508
+ * @license
9509
+ * Copyright Datorama. All Rights Reserved.
9510
+ *
9511
+ * Use of this source code is governed by an Apache License 2.0 license that can be
9512
+ * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
9513
+ */
9514
+ var DatoTriggerSingle = /** @class */ (function () {
9515
+ function DatoTriggerSingle(cdr) {
9516
+ this.cdr = cdr;
9517
+ this._placeholder = '';
9518
+ }
9519
+ Object.defineProperty(DatoTriggerSingle.prototype, "placeholder", {
9520
+ set: function (value) {
9521
+ this._placeholder = value;
9522
+ this.cdr.detectChanges();
9523
+ },
9524
+ enumerable: true,
9525
+ configurable: true
9526
+ });
9527
+ Object.defineProperty(DatoTriggerSingle.prototype, "context", {
9528
+ set: function (value) {
9529
+ this._model = { $implicit: value };
9530
+ this.cdr.detectChanges();
9531
+ },
9532
+ enumerable: true,
9533
+ configurable: true
9534
+ });
9535
+ Object.defineProperty(DatoTriggerSingle.prototype, "hidePlaceholder", {
9536
+ get: function () {
9537
+ return !this._model || !this._model.$implicit;
9538
+ },
9539
+ enumerable: true,
9540
+ configurable: true
9541
+ });
9542
+ DatoTriggerSingle.prototype.ngOnInit = function () {
9543
+ this.cdr.detach();
9544
+ };
9545
+ Object.defineProperty(DatoTriggerSingle.prototype, "getLabel", {
9546
+ get: function () {
9547
+ return this._model && this._model.$implicit && this._model.$implicit[this.labelKey];
9548
+ },
9549
+ enumerable: true,
9550
+ configurable: true
9551
+ });
9552
+ DatoTriggerSingle.ctorParameters = function () { return [
9553
+ { type: core.ChangeDetectorRef }
9554
+ ]; };
9555
+ __decorate([
9556
+ core.Input(),
9557
+ __metadata("design:type", core.TemplateRef)
9558
+ ], DatoTriggerSingle.prototype, "loadingTemplate", void 0);
9559
+ __decorate([
9560
+ core.Input(),
9561
+ __metadata("design:type", DatoSelectActiveDirective)
9562
+ ], DatoTriggerSingle.prototype, "active", void 0);
9563
+ __decorate([
9564
+ core.Input(),
9565
+ __metadata("design:type", Object),
9566
+ __metadata("design:paramtypes", [Object])
9567
+ ], DatoTriggerSingle.prototype, "placeholder", null);
9568
+ __decorate([
9569
+ core.Input(),
9570
+ __metadata("design:type", String)
9571
+ ], DatoTriggerSingle.prototype, "labelKey", void 0);
9572
+ __decorate([
9573
+ core.Input(),
9574
+ __metadata("design:type", Object),
9575
+ __metadata("design:paramtypes", [Object])
9576
+ ], DatoTriggerSingle.prototype, "context", null);
9577
+ DatoTriggerSingle = __decorate([
9578
+ core.Component({
9579
+ selector: 'dato-trigger-single',
9580
+ template: "<ng-template *ngIf=\"loadingTemplate\" [ngTemplateOutlet]=\"loadingTemplate\"></ng-template>\n<ng-container\n *ngIf=\"active && !hidePlaceholder\"\n [ngTemplateOutlet]=\"active.tpl\"\n [ngTemplateOutletContext]=\"_model\">\n</ng-container>\n<ng-container *ngIf=\"!active\">{{getLabel | translate}}</ng-container>\n<span class=\"dato-select__placeholder\" *ngIf=\"hidePlaceholder\">{{_placeholder}}</span>\n<dato-icon datoIcon=\"arrow-down\" datoSize=\"sm\" class=\"dato-select__single__arrow\"></dato-icon>\n",
9581
+ changeDetection: core.ChangeDetectionStrategy.OnPush,
9582
+ styles: [":host{display:block;position:relative;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host dato-icon{position:absolute;top:50%;transform:translateY(-50%);right:10px}"]
9583
+ }),
9584
+ __metadata("design:paramtypes", [core.ChangeDetectorRef])
9585
+ ], DatoTriggerSingle);
9586
+ return DatoTriggerSingle;
9587
+ }());
9588
+
9593
9589
  /**
9594
9590
  * @license
9595
9591
  * Copyright Datorama. All Rights Reserved.
@@ -16478,7 +16474,13 @@
16478
16474
  DatoGridPaginationV2Component.prototype.ngOnInit = function () {
16479
16475
  var _this = this;
16480
16476
  this.gridQuery
16481
- .waitForGrid(function () { return _this.gridQuery.gridRef.filterChanged; })
16477
+ .waitForGrid(function () {
16478
+ return rxjs.combineLatest([
16479
+ _this.gridQuery.gridRef.filterChanged,
16480
+ _this.gridQuery.gridRef.rowGroupOpened.pipe(operators.startWith(true)),
16481
+ _this.gridQuery.gridRef.expandOrCollapseAll.pipe(operators.startWith(true))
16482
+ ]);
16483
+ })
16482
16484
  .pipe(ngxTakeUntilDestroy.untilDestroyed(this))
16483
16485
  .subscribe(function () {
16484
16486
  _this.gridApi.paginationGoToPage(0);