@datorama/core 22.9.8-rc → 22.9.8-rc.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.
@@ -8231,6 +8231,88 @@ function isTestEnv() {
8231
8231
  return !!window.Cypress;
8232
8232
  }
8233
8233
 
8234
+ /**
8235
+ * @license
8236
+ * Copyright Datorama. All Rights Reserved.
8237
+ *
8238
+ * Use of this source code is governed by an Apache License 2.0 license that can be
8239
+ * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
8240
+ */
8241
+ var DatoTriggerSingle = /** @class */ (function () {
8242
+ function DatoTriggerSingle(cdr) {
8243
+ this.cdr = cdr;
8244
+ this._placeholder = '';
8245
+ }
8246
+ Object.defineProperty(DatoTriggerSingle.prototype, "placeholder", {
8247
+ set: function (value) {
8248
+ this._placeholder = value;
8249
+ this.cdr.detectChanges();
8250
+ },
8251
+ enumerable: true,
8252
+ configurable: true
8253
+ });
8254
+ Object.defineProperty(DatoTriggerSingle.prototype, "context", {
8255
+ set: function (value) {
8256
+ this._model = { $implicit: value };
8257
+ this.cdr.detectChanges();
8258
+ },
8259
+ enumerable: true,
8260
+ configurable: true
8261
+ });
8262
+ Object.defineProperty(DatoTriggerSingle.prototype, "hidePlaceholder", {
8263
+ get: function () {
8264
+ return !this._model || !this._model.$implicit;
8265
+ },
8266
+ enumerable: true,
8267
+ configurable: true
8268
+ });
8269
+ DatoTriggerSingle.prototype.ngOnInit = function () {
8270
+ this.cdr.detach();
8271
+ };
8272
+ Object.defineProperty(DatoTriggerSingle.prototype, "getLabel", {
8273
+ get: function () {
8274
+ return this._model && this._model.$implicit && this._model.$implicit[this.labelKey];
8275
+ },
8276
+ enumerable: true,
8277
+ configurable: true
8278
+ });
8279
+ DatoTriggerSingle.ctorParameters = function () { return [
8280
+ { type: ChangeDetectorRef }
8281
+ ]; };
8282
+ __decorate([
8283
+ Input(),
8284
+ __metadata("design:type", TemplateRef)
8285
+ ], DatoTriggerSingle.prototype, "loadingTemplate", void 0);
8286
+ __decorate([
8287
+ Input(),
8288
+ __metadata("design:type", DatoSelectActiveDirective)
8289
+ ], DatoTriggerSingle.prototype, "active", void 0);
8290
+ __decorate([
8291
+ Input(),
8292
+ __metadata("design:type", Object),
8293
+ __metadata("design:paramtypes", [Object])
8294
+ ], DatoTriggerSingle.prototype, "placeholder", null);
8295
+ __decorate([
8296
+ Input(),
8297
+ __metadata("design:type", String)
8298
+ ], DatoTriggerSingle.prototype, "labelKey", void 0);
8299
+ __decorate([
8300
+ Input(),
8301
+ __metadata("design:type", Object),
8302
+ __metadata("design:paramtypes", [Object])
8303
+ ], DatoTriggerSingle.prototype, "context", null);
8304
+ DatoTriggerSingle = __decorate([
8305
+ Component({
8306
+ selector: 'dato-trigger-single',
8307
+ 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",
8308
+ changeDetection: ChangeDetectionStrategy.OnPush,
8309
+ 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}"]
8310
+ }),
8311
+ __metadata("design:paramtypes", [ChangeDetectorRef])
8312
+ ], DatoTriggerSingle);
8313
+ return DatoTriggerSingle;
8314
+ }());
8315
+
8234
8316
  /**
8235
8317
  * @license
8236
8318
  * Copyright Datorama. All Rights Reserved.
@@ -9121,6 +9203,10 @@ var DatoSelectComponent = /** @class */ (function (_super) {
9121
9203
  { type: undefined, decorators: [{ type: Attribute, args: ['datoSize',] }] },
9122
9204
  { type: String, decorators: [{ type: Attribute, args: ['width',] }] }
9123
9205
  ]; };
9206
+ __decorate([
9207
+ ViewChild('datoTriggerSingle'),
9208
+ __metadata("design:type", DatoTriggerSingle)
9209
+ ], DatoSelectComponent.prototype, "datoTriggerSingle", void 0);
9124
9210
  __decorate([
9125
9211
  ViewChild('dropdown'),
9126
9212
  __metadata("design:type", TemplateRef)
@@ -9287,7 +9373,7 @@ var DatoSelectComponent = /** @class */ (function (_super) {
9287
9373
  DatoSelectComponent = __decorate([
9288
9374
  Component({
9289
9375
  selector: 'dato-select',
9290
- 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",
9376
+ 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",
9291
9377
  preserveWhitespaces: false,
9292
9378
  providers: [valueAccessor$3, DatoOverlay],
9293
9379
  encapsulation: ViewEncapsulation.None,
@@ -9305,88 +9391,6 @@ var DatoSelectComponent = /** @class */ (function (_super) {
9305
9391
  return DatoSelectComponent;
9306
9392
  }(BaseCustomControl));
9307
9393
 
9308
- /**
9309
- * @license
9310
- * Copyright Datorama. All Rights Reserved.
9311
- *
9312
- * Use of this source code is governed by an Apache License 2.0 license that can be
9313
- * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
9314
- */
9315
- var DatoTriggerSingle = /** @class */ (function () {
9316
- function DatoTriggerSingle(cdr) {
9317
- this.cdr = cdr;
9318
- this._placeholder = '';
9319
- }
9320
- Object.defineProperty(DatoTriggerSingle.prototype, "placeholder", {
9321
- set: function (value) {
9322
- this._placeholder = value;
9323
- this.cdr.detectChanges();
9324
- },
9325
- enumerable: true,
9326
- configurable: true
9327
- });
9328
- Object.defineProperty(DatoTriggerSingle.prototype, "context", {
9329
- set: function (value) {
9330
- this._model = { $implicit: value };
9331
- this.cdr.detectChanges();
9332
- },
9333
- enumerable: true,
9334
- configurable: true
9335
- });
9336
- Object.defineProperty(DatoTriggerSingle.prototype, "hidePlaceholder", {
9337
- get: function () {
9338
- return !this._model || !this._model.$implicit;
9339
- },
9340
- enumerable: true,
9341
- configurable: true
9342
- });
9343
- DatoTriggerSingle.prototype.ngOnInit = function () {
9344
- this.cdr.detach();
9345
- };
9346
- Object.defineProperty(DatoTriggerSingle.prototype, "getLabel", {
9347
- get: function () {
9348
- return this._model && this._model.$implicit && this._model.$implicit[this.labelKey];
9349
- },
9350
- enumerable: true,
9351
- configurable: true
9352
- });
9353
- DatoTriggerSingle.ctorParameters = function () { return [
9354
- { type: ChangeDetectorRef }
9355
- ]; };
9356
- __decorate([
9357
- Input(),
9358
- __metadata("design:type", TemplateRef)
9359
- ], DatoTriggerSingle.prototype, "loadingTemplate", void 0);
9360
- __decorate([
9361
- Input(),
9362
- __metadata("design:type", DatoSelectActiveDirective)
9363
- ], DatoTriggerSingle.prototype, "active", void 0);
9364
- __decorate([
9365
- Input(),
9366
- __metadata("design:type", Object),
9367
- __metadata("design:paramtypes", [Object])
9368
- ], DatoTriggerSingle.prototype, "placeholder", null);
9369
- __decorate([
9370
- Input(),
9371
- __metadata("design:type", String)
9372
- ], DatoTriggerSingle.prototype, "labelKey", void 0);
9373
- __decorate([
9374
- Input(),
9375
- __metadata("design:type", Object),
9376
- __metadata("design:paramtypes", [Object])
9377
- ], DatoTriggerSingle.prototype, "context", null);
9378
- DatoTriggerSingle = __decorate([
9379
- Component({
9380
- selector: 'dato-trigger-single',
9381
- 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",
9382
- changeDetection: ChangeDetectionStrategy.OnPush,
9383
- 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}"]
9384
- }),
9385
- __metadata("design:paramtypes", [ChangeDetectorRef])
9386
- ], DatoTriggerSingle);
9387
- return DatoTriggerSingle;
9388
- }());
9389
-
9390
9394
  /**
9391
9395
  * @license
9392
9396
  * Copyright Datorama. All Rights Reserved.
@@ -25325,7 +25329,7 @@ function fixNgLeaks() {
25325
25329
  };
25326
25330
  }
25327
25331
 
25328
- window.coreVersion = '22.9.7';
25332
+ window.coreVersion = '22.9.8';
25329
25333
 
25330
25334
  /**
25331
25335
  * @license