@datorama/core 22.9.10 → 22.10.1-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.
- package/bundle.scss +137 -131
- package/bundles/datorama-core.umd.js +184 -195
- package/bundles/datorama-core.umd.js.map +1 -1
- package/bundles/datorama-core.umd.min.js +45 -38
- package/bundles/datorama-core.umd.min.js.map +1 -1
- package/datorama-core.d.ts +0 -1
- package/datorama-core.metadata.json +1 -1
- package/esm2015/datorama-core.js +1 -2
- package/esm2015/lib/breadcrumbs/breadcrumbs.component.js +2 -4
- package/esm2015/lib/grid-v2/grid/grid-v2.types.js +1 -9
- package/esm2015/lib/grid-v2/grid-column-cell-components/grid-status-cell/grid-status-cell.component.js +12 -19
- package/esm2015/lib/grid-v2/grid-controller/grid-controller.component.js +2 -5
- package/esm2015/lib/grid-v2/grid-pagination/grid-pagination.component.js +3 -2
- package/esm2015/lib/grid-v2/grid-settings.js +2 -2
- package/esm2015/lib/grid-v2/grid-store/grid.service.js +29 -3
- package/esm2015/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +1 -7
- package/esm2015/lib/loaders/page-loader/page-loader.component.js +2 -7
- package/esm2015/lib/rich-text/rich-text.directive.js +38 -20
- package/esm2015/lib/select/select.component.js +18 -5
- package/esm2015/lib/select/trigger-single/trigger-single.component.js +4 -1
- package/esm2015/lib/version.js +2 -2
- package/esm5/datorama-core.js +1 -2
- package/esm5/lib/breadcrumbs/breadcrumbs.component.js +2 -4
- package/esm5/lib/grid-v2/grid/grid-v2.types.js +1 -9
- package/esm5/lib/grid-v2/grid-column-cell-components/grid-status-cell/grid-status-cell.component.js +12 -20
- package/esm5/lib/grid-v2/grid-controller/grid-controller.component.js +2 -5
- package/esm5/lib/grid-v2/grid-pagination/grid-pagination.component.js +5 -2
- package/esm5/lib/grid-v2/grid-settings.js +2 -2
- package/esm5/lib/grid-v2/grid-store/grid.service.js +29 -3
- package/esm5/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +1 -13
- package/esm5/lib/loaders/page-loader/page-loader.component.js +2 -7
- package/esm5/lib/rich-text/rich-text.directive.js +39 -21
- package/esm5/lib/select/select.component.js +18 -5
- package/esm5/lib/select/trigger-single/trigger-single.component.js +4 -1
- package/esm5/lib/version.js +2 -2
- package/fesm2015/datorama-core.js +165 -169
- package/fesm2015/datorama-core.js.map +1 -1
- package/fesm5/datorama-core.js +185 -195
- package/fesm5/datorama-core.js.map +1 -1
- package/lib/grid-v2/grid/grid-v2.types.d.ts +3 -12
- package/lib/grid-v2/grid-column-cell-components/grid-status-cell/grid-status-cell.component.d.ts +5 -3
- package/lib/grid-v2/grid-settings.d.ts +2 -2
- package/lib/grid-v2/grid-store/grid.service.d.ts +1 -0
- package/lib/grid-v2/grid-toolbar/grid-toolbar.component.d.ts +0 -2
- package/lib/loaders/page-loader/page-loader.component.d.ts +0 -1
- package/lib/rich-text/rich-text.directive.d.ts +6 -4
- package/lib/select/select.component.d.ts +2 -0
- package/lib/select/trigger-single/trigger-single.component.d.ts +1 -0
- package/package.json +2 -2
- package/esm2015/lib/rich-text/rich-text.service.js +0 -50
- package/esm5/lib/rich-text/rich-text.service.js +0 -51
- package/lib/rich-text/rich-text.service.d.ts +0 -10
|
@@ -8430,6 +8430,91 @@
|
|
|
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.prototype.triggerChangeDetection = function () {
|
|
8479
|
+
this.cdr.detectChanges();
|
|
8480
|
+
};
|
|
8481
|
+
DatoTriggerSingle.ctorParameters = function () { return [
|
|
8482
|
+
{ type: core.ChangeDetectorRef }
|
|
8483
|
+
]; };
|
|
8484
|
+
__decorate([
|
|
8485
|
+
core.Input(),
|
|
8486
|
+
__metadata("design:type", core.TemplateRef)
|
|
8487
|
+
], DatoTriggerSingle.prototype, "loadingTemplate", void 0);
|
|
8488
|
+
__decorate([
|
|
8489
|
+
core.Input(),
|
|
8490
|
+
__metadata("design:type", DatoSelectActiveDirective)
|
|
8491
|
+
], DatoTriggerSingle.prototype, "active", void 0);
|
|
8492
|
+
__decorate([
|
|
8493
|
+
core.Input(),
|
|
8494
|
+
__metadata("design:type", Object),
|
|
8495
|
+
__metadata("design:paramtypes", [Object])
|
|
8496
|
+
], DatoTriggerSingle.prototype, "placeholder", null);
|
|
8497
|
+
__decorate([
|
|
8498
|
+
core.Input(),
|
|
8499
|
+
__metadata("design:type", String)
|
|
8500
|
+
], DatoTriggerSingle.prototype, "labelKey", void 0);
|
|
8501
|
+
__decorate([
|
|
8502
|
+
core.Input(),
|
|
8503
|
+
__metadata("design:type", Object),
|
|
8504
|
+
__metadata("design:paramtypes", [Object])
|
|
8505
|
+
], DatoTriggerSingle.prototype, "context", null);
|
|
8506
|
+
DatoTriggerSingle = __decorate([
|
|
8507
|
+
core.Component({
|
|
8508
|
+
selector: 'dato-trigger-single',
|
|
8509
|
+
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",
|
|
8510
|
+
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
8511
|
+
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}"]
|
|
8512
|
+
}),
|
|
8513
|
+
__metadata("design:paramtypes", [core.ChangeDetectorRef])
|
|
8514
|
+
], DatoTriggerSingle);
|
|
8515
|
+
return DatoTriggerSingle;
|
|
8516
|
+
}());
|
|
8517
|
+
|
|
8433
8518
|
/**
|
|
8434
8519
|
* @license
|
|
8435
8520
|
* Copyright Datorama. All Rights Reserved.
|
|
@@ -8748,8 +8833,9 @@
|
|
|
8748
8833
|
DatoSelectComponent.prototype.writeValue = function (activeOptions) {
|
|
8749
8834
|
this._model = activeOptions ? akita.coerceArray(activeOptions) : [];
|
|
8750
8835
|
if (this.options) {
|
|
8836
|
+
var overTheLimit = this.limitSelectedTo && this.isMulti && this._model.length >= this.limitSelectedTo;
|
|
8751
8837
|
this.markAsActive(this._model, { deselectAll: true });
|
|
8752
|
-
|
|
8838
|
+
overTheLimit && this.updateDisabledState();
|
|
8753
8839
|
}
|
|
8754
8840
|
/** For later updates */
|
|
8755
8841
|
this.cdr.markForCheck();
|
|
@@ -8877,6 +8963,7 @@
|
|
|
8877
8963
|
};
|
|
8878
8964
|
DatoSelectComponent.prototype.removeOption = function (option) {
|
|
8879
8965
|
var _this = this;
|
|
8966
|
+
var updateDisabled = this.limitSelectedTo && this._model.length === this.limitSelectedTo;
|
|
8880
8967
|
this._model = this._model.filter(function (current) { return current[_this.idKey] !== option[_this.idKey]; });
|
|
8881
8968
|
var optionToRemove = this.options.find(function (datoOption) { return datoOption.option && datoOption.option[_this.idKey] === option[_this.idKey]; });
|
|
8882
8969
|
/**
|
|
@@ -8886,7 +8973,7 @@
|
|
|
8886
8973
|
if (optionToRemove) {
|
|
8887
8974
|
optionToRemove.active = false;
|
|
8888
8975
|
}
|
|
8889
|
-
|
|
8976
|
+
updateDisabled && this.updateDisabledState();
|
|
8890
8977
|
this.onChange(this._model);
|
|
8891
8978
|
this.cdr.markForCheck();
|
|
8892
8979
|
this.asyncUpdateDropdownPosition();
|
|
@@ -9234,6 +9321,9 @@
|
|
|
9234
9321
|
if (!datoOption) {
|
|
9235
9322
|
return;
|
|
9236
9323
|
}
|
|
9324
|
+
var modelLength = this._model.length;
|
|
9325
|
+
var updateDisabled = this.limitSelectedTo &&
|
|
9326
|
+
(modelLength === this.limitSelectedTo || (modelLength === this.limitSelectedTo - 1 && !datoOption.active));
|
|
9237
9327
|
datoOption.active = !datoOption.active;
|
|
9238
9328
|
var rawOption = datoOption.option;
|
|
9239
9329
|
if (datoOption.active) {
|
|
@@ -9242,7 +9332,7 @@
|
|
|
9242
9332
|
else {
|
|
9243
9333
|
this._model = this._model.filter(function (current) { return current[_this.idKey] !== rawOption[_this.idKey]; });
|
|
9244
9334
|
}
|
|
9245
|
-
|
|
9335
|
+
updateDisabled && this.updateDisabledState();
|
|
9246
9336
|
this.onChange(this._model);
|
|
9247
9337
|
this.cdr.markForCheck();
|
|
9248
9338
|
this.asyncUpdateDropdownPosition();
|
|
@@ -9306,6 +9396,9 @@
|
|
|
9306
9396
|
setTimeout(function () { return _this.datoOverlay.scheduleUpdate(); }, 0);
|
|
9307
9397
|
}
|
|
9308
9398
|
};
|
|
9399
|
+
DatoSelectComponent.prototype.triggerChangeDetectionInDatoSingle = function () {
|
|
9400
|
+
this.datoTriggerSingle.triggerChangeDetection();
|
|
9401
|
+
};
|
|
9309
9402
|
DatoSelectComponent.ctorParameters = function () { return [
|
|
9310
9403
|
{ type: core.ChangeDetectorRef },
|
|
9311
9404
|
{ type: DatoTranslateService },
|
|
@@ -9315,6 +9408,10 @@
|
|
|
9315
9408
|
{ type: undefined, decorators: [{ type: core.Attribute, args: ['datoSize',] }] },
|
|
9316
9409
|
{ type: String, decorators: [{ type: core.Attribute, args: ['width',] }] }
|
|
9317
9410
|
]; };
|
|
9411
|
+
__decorate([
|
|
9412
|
+
core.ViewChild('datoTriggerSingle'),
|
|
9413
|
+
__metadata("design:type", DatoTriggerSingle)
|
|
9414
|
+
], DatoSelectComponent.prototype, "datoTriggerSingle", void 0);
|
|
9318
9415
|
__decorate([
|
|
9319
9416
|
core.ViewChild('dropdown'),
|
|
9320
9417
|
__metadata("design:type", core.TemplateRef)
|
|
@@ -9481,7 +9578,7 @@
|
|
|
9481
9578
|
DatoSelectComponent = __decorate([
|
|
9482
9579
|
core.Component({
|
|
9483
9580
|
selector: 'dato-select',
|
|
9484
|
-
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",
|
|
9581
|
+
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",
|
|
9485
9582
|
preserveWhitespaces: false,
|
|
9486
9583
|
providers: [valueAccessor$3, DatoOverlay],
|
|
9487
9584
|
encapsulation: core.ViewEncapsulation.None,
|
|
@@ -9499,88 +9596,6 @@
|
|
|
9499
9596
|
return DatoSelectComponent;
|
|
9500
9597
|
}(BaseCustomControl));
|
|
9501
9598
|
|
|
9502
|
-
/**
|
|
9503
|
-
* @license
|
|
9504
|
-
* Copyright Datorama. All Rights Reserved.
|
|
9505
|
-
*
|
|
9506
|
-
* Use of this source code is governed by an Apache License 2.0 license that can be
|
|
9507
|
-
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
9508
|
-
*/
|
|
9509
|
-
var DatoTriggerSingle = /** @class */ (function () {
|
|
9510
|
-
function DatoTriggerSingle(cdr) {
|
|
9511
|
-
this.cdr = cdr;
|
|
9512
|
-
this._placeholder = '';
|
|
9513
|
-
}
|
|
9514
|
-
Object.defineProperty(DatoTriggerSingle.prototype, "placeholder", {
|
|
9515
|
-
set: function (value) {
|
|
9516
|
-
this._placeholder = value;
|
|
9517
|
-
this.cdr.detectChanges();
|
|
9518
|
-
},
|
|
9519
|
-
enumerable: true,
|
|
9520
|
-
configurable: true
|
|
9521
|
-
});
|
|
9522
|
-
Object.defineProperty(DatoTriggerSingle.prototype, "context", {
|
|
9523
|
-
set: function (value) {
|
|
9524
|
-
this._model = { $implicit: value };
|
|
9525
|
-
this.cdr.detectChanges();
|
|
9526
|
-
},
|
|
9527
|
-
enumerable: true,
|
|
9528
|
-
configurable: true
|
|
9529
|
-
});
|
|
9530
|
-
Object.defineProperty(DatoTriggerSingle.prototype, "hidePlaceholder", {
|
|
9531
|
-
get: function () {
|
|
9532
|
-
return !this._model || !this._model.$implicit;
|
|
9533
|
-
},
|
|
9534
|
-
enumerable: true,
|
|
9535
|
-
configurable: true
|
|
9536
|
-
});
|
|
9537
|
-
DatoTriggerSingle.prototype.ngOnInit = function () {
|
|
9538
|
-
this.cdr.detach();
|
|
9539
|
-
};
|
|
9540
|
-
Object.defineProperty(DatoTriggerSingle.prototype, "getLabel", {
|
|
9541
|
-
get: function () {
|
|
9542
|
-
return this._model && this._model.$implicit && this._model.$implicit[this.labelKey];
|
|
9543
|
-
},
|
|
9544
|
-
enumerable: true,
|
|
9545
|
-
configurable: true
|
|
9546
|
-
});
|
|
9547
|
-
DatoTriggerSingle.ctorParameters = function () { return [
|
|
9548
|
-
{ type: core.ChangeDetectorRef }
|
|
9549
|
-
]; };
|
|
9550
|
-
__decorate([
|
|
9551
|
-
core.Input(),
|
|
9552
|
-
__metadata("design:type", core.TemplateRef)
|
|
9553
|
-
], DatoTriggerSingle.prototype, "loadingTemplate", void 0);
|
|
9554
|
-
__decorate([
|
|
9555
|
-
core.Input(),
|
|
9556
|
-
__metadata("design:type", DatoSelectActiveDirective)
|
|
9557
|
-
], DatoTriggerSingle.prototype, "active", void 0);
|
|
9558
|
-
__decorate([
|
|
9559
|
-
core.Input(),
|
|
9560
|
-
__metadata("design:type", Object),
|
|
9561
|
-
__metadata("design:paramtypes", [Object])
|
|
9562
|
-
], DatoTriggerSingle.prototype, "placeholder", null);
|
|
9563
|
-
__decorate([
|
|
9564
|
-
core.Input(),
|
|
9565
|
-
__metadata("design:type", String)
|
|
9566
|
-
], DatoTriggerSingle.prototype, "labelKey", void 0);
|
|
9567
|
-
__decorate([
|
|
9568
|
-
core.Input(),
|
|
9569
|
-
__metadata("design:type", Object),
|
|
9570
|
-
__metadata("design:paramtypes", [Object])
|
|
9571
|
-
], DatoTriggerSingle.prototype, "context", null);
|
|
9572
|
-
DatoTriggerSingle = __decorate([
|
|
9573
|
-
core.Component({
|
|
9574
|
-
selector: 'dato-trigger-single',
|
|
9575
|
-
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",
|
|
9576
|
-
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
9577
|
-
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}"]
|
|
9578
|
-
}),
|
|
9579
|
-
__metadata("design:paramtypes", [core.ChangeDetectorRef])
|
|
9580
|
-
], DatoTriggerSingle);
|
|
9581
|
-
return DatoTriggerSingle;
|
|
9582
|
-
}());
|
|
9583
|
-
|
|
9584
9599
|
/**
|
|
9585
9600
|
* @license
|
|
9586
9601
|
* Copyright Datorama. All Rights Reserved.
|
|
@@ -12047,7 +12062,7 @@
|
|
|
12047
12062
|
return contextActions;
|
|
12048
12063
|
}
|
|
12049
12064
|
|
|
12050
|
-
var DATO_GRID_STORAGE_API = new core.InjectionToken('
|
|
12065
|
+
var DATO_GRID_STORAGE_API = new core.InjectionToken('DATO_GRID_STORAGE_API');
|
|
12051
12066
|
|
|
12052
12067
|
var defaultEditableColumnRenderer = function (params) {
|
|
12053
12068
|
return params && params.value ? "<div class=\"value-wrapper ellipsis\">" + params.value + "</div>" : null;
|
|
@@ -12087,14 +12102,6 @@
|
|
|
12087
12102
|
GridRowSelectionType["MULTIPLE"] = "multiple";
|
|
12088
12103
|
})(exports.GridRowSelectionType || (exports.GridRowSelectionType = {}));
|
|
12089
12104
|
|
|
12090
|
-
(function (GridStatusColumnTypes) {
|
|
12091
|
-
GridStatusColumnTypes["SUCCESS"] = "SUCCESS";
|
|
12092
|
-
GridStatusColumnTypes["FAILURE"] = "FAILURE";
|
|
12093
|
-
GridStatusColumnTypes["IN_PROGRESS"] = "IN_PROGRESS";
|
|
12094
|
-
GridStatusColumnTypes["PENDING"] = "PENDING";
|
|
12095
|
-
GridStatusColumnTypes["WAITING"] = "WAITING";
|
|
12096
|
-
})(exports.GridStatusColumnTypes || (exports.GridStatusColumnTypes = {}));
|
|
12097
|
-
|
|
12098
12105
|
/**
|
|
12099
12106
|
* @license
|
|
12100
12107
|
* Copyright Datorama. All Rights Reserved.
|
|
@@ -14336,9 +14343,36 @@
|
|
|
14336
14343
|
this.initPivotSecondaryColsProcess(params);
|
|
14337
14344
|
params.gridOptions.enableV2_1 = true;
|
|
14338
14345
|
params.gridOptions.saveSettings = false;
|
|
14346
|
+
params.gridOptions.defaultColDef.cellClass = this.getPivotCellClass.bind(this);
|
|
14347
|
+
params.gridOptions.autoGroupColumnDef.cellClass = this.getPivotCellClass.bind(this);
|
|
14339
14348
|
}
|
|
14340
14349
|
return params.gridOptions;
|
|
14341
14350
|
};
|
|
14351
|
+
GridService.prototype.getPivotCellClass = function (params) {
|
|
14352
|
+
var _a = params.node, leafGroup = _a.leafGroup, childIndex = _a.childIndex, rowGroupIndex = _a.rowGroupIndex;
|
|
14353
|
+
var gridQuery = params.colDef.headerComponentParams.gridQuery;
|
|
14354
|
+
var cellClass = "";
|
|
14355
|
+
if (gridQuery && gridQuery.api) {
|
|
14356
|
+
var columns = gridQuery.api.columns;
|
|
14357
|
+
var allDisplayedColumns = columns.getAllDisplayedColumns();
|
|
14358
|
+
var col = allDisplayedColumns.find(function (column) {
|
|
14359
|
+
return column.getColId() === params.colDef.colId;
|
|
14360
|
+
});
|
|
14361
|
+
var colIndex = allDisplayedColumns.indexOf(col);
|
|
14362
|
+
if (rowGroupIndex <= colIndex) {
|
|
14363
|
+
if (leafGroup) {
|
|
14364
|
+
if (childIndex % 2 === 0) {
|
|
14365
|
+
/** If row is even */
|
|
14366
|
+
cellClass += ' primary-100-background-color';
|
|
14367
|
+
}
|
|
14368
|
+
}
|
|
14369
|
+
else {
|
|
14370
|
+
cellClass += 'primary-0-background-color pointer dato-simple-bold';
|
|
14371
|
+
}
|
|
14372
|
+
}
|
|
14373
|
+
}
|
|
14374
|
+
return cellClass;
|
|
14375
|
+
};
|
|
14342
14376
|
GridService.prototype.normalizeColumns = function (colDefs, gridOptions) {
|
|
14343
14377
|
var _this = this;
|
|
14344
14378
|
if (gridOptions === void 0) { gridOptions = null; }
|
|
@@ -14642,8 +14676,7 @@
|
|
|
14642
14676
|
this.updateSettings({ gridAlignment: gridAlignment, columnsSizes: null });
|
|
14643
14677
|
};
|
|
14644
14678
|
GridService.prototype.saveSettingsToServer = function (settings) {
|
|
14645
|
-
|
|
14646
|
-
this.storageAPI.set(this.gridName, settings, isGlobal);
|
|
14679
|
+
this.storageAPI.set(this.gridName, settings);
|
|
14647
14680
|
};
|
|
14648
14681
|
/**
|
|
14649
14682
|
* @internal used to log grid events to the platform's logging service
|
|
@@ -15648,10 +15681,7 @@
|
|
|
15648
15681
|
.pipe(operators.switchMap(function () {
|
|
15649
15682
|
_this.gridOptions = _this.normalizeOptions();
|
|
15650
15683
|
agGrid.gridOptions = _this.gridOptions;
|
|
15651
|
-
var
|
|
15652
|
-
var settingsLoader = _this.gridOptions.saveSettings === false
|
|
15653
|
-
? rxjs.of(null)
|
|
15654
|
-
: _this.storageAPI.get(_this.gridOptions.gridName, isGlobal);
|
|
15684
|
+
var settingsLoader = _this.gridOptions.saveSettings === false ? rxjs.of(null) : _this.storageAPI.get(_this.gridOptions.gridName);
|
|
15655
15685
|
return rxjs.combineLatest([agGrid.gridReady, settingsLoader]);
|
|
15656
15686
|
}), ngxTakeUntilDestroy.untilDestroyed(this))
|
|
15657
15687
|
.subscribe(function (_a) {
|
|
@@ -16492,7 +16522,9 @@
|
|
|
16492
16522
|
DatoGridPaginationV2Component.prototype.ngOnInit = function () {
|
|
16493
16523
|
var _this = this;
|
|
16494
16524
|
this.gridQuery
|
|
16495
|
-
.waitForGrid(function () {
|
|
16525
|
+
.waitForGrid(function () {
|
|
16526
|
+
return rxjs.merge(_this.gridQuery.gridRef.filterChanged, _this.gridQuery.gridRef.rowGroupOpened, _this.gridQuery.gridRef.expandOrCollapseAll);
|
|
16527
|
+
})
|
|
16496
16528
|
.pipe(ngxTakeUntilDestroy.untilDestroyed(this))
|
|
16497
16529
|
.subscribe(function () {
|
|
16498
16530
|
_this.gridApi.paginationGoToPage(0);
|
|
@@ -16944,18 +16976,6 @@
|
|
|
16944
16976
|
this.registerGroupListeners();
|
|
16945
16977
|
this.subscribeRowsSelectionData();
|
|
16946
16978
|
};
|
|
16947
|
-
DatoGridV2ToolbarComponent.prototype.getCellValueChangeEvent = function () {
|
|
16948
|
-
var _this = this;
|
|
16949
|
-
return this.gridController.gridQuery.waitForGrid(function () {
|
|
16950
|
-
return _this.gridQuery.gridRef.cellValueChanged.pipe(operators.debounceTime(100), ngxTakeUntilDestroy.untilDestroyed(_this));
|
|
16951
|
-
});
|
|
16952
|
-
};
|
|
16953
|
-
DatoGridV2ToolbarComponent.prototype.getRowDataUpdatedEvent = function () {
|
|
16954
|
-
var _this = this;
|
|
16955
|
-
return this.gridController.gridQuery.waitForGrid(function () {
|
|
16956
|
-
return _this.gridQuery.gridRef.rowDataUpdated.pipe(operators.debounceTime(100), ngxTakeUntilDestroy.untilDestroyed(_this));
|
|
16957
|
-
});
|
|
16958
|
-
};
|
|
16959
16979
|
DatoGridV2ToolbarComponent.prototype.onActionClick = function (action) {
|
|
16960
16980
|
if (isFunction(action.onClick)) {
|
|
16961
16981
|
var selectedRowsCount = this.gridController.gridQuery.getSelectedRowsCount();
|
|
@@ -19570,7 +19590,6 @@
|
|
|
19570
19590
|
function DatoPageLoaderComponent() {
|
|
19571
19591
|
this.msg = '';
|
|
19572
19592
|
this.salesforce = false;
|
|
19573
|
-
this.size = 'medium';
|
|
19574
19593
|
this.circleIds = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i'];
|
|
19575
19594
|
}
|
|
19576
19595
|
__decorate([
|
|
@@ -19581,14 +19600,10 @@
|
|
|
19581
19600
|
core.Input(),
|
|
19582
19601
|
__metadata("design:type", Object)
|
|
19583
19602
|
], DatoPageLoaderComponent.prototype, "salesforce", void 0);
|
|
19584
|
-
__decorate([
|
|
19585
|
-
core.Input(),
|
|
19586
|
-
__metadata("design:type", String)
|
|
19587
|
-
], DatoPageLoaderComponent.prototype, "size", void 0);
|
|
19588
19603
|
DatoPageLoaderComponent = __decorate([
|
|
19589
19604
|
core.Component({
|
|
19590
19605
|
selector: 'dato-page-loader',
|
|
19591
|
-
template: "<div class=\"d-flex-column align-center\">\n <ng-container *ngIf=\"salesforce; else datoramaPageLoader\">\n <div class=\"slds-spinner_container\">\n <div role=\"status\" class=\"slds-spinner slds-
|
|
19606
|
+
template: "<div class=\"d-flex-column align-center\">\n <ng-container *ngIf=\"salesforce; else datoramaPageLoader\">\n <div class=\"slds-spinner_container\">\n <div role=\"status\" class=\"slds-spinner slds-spinner_medium slds-spinner_brand\">\n <div class=\"slds-spinner__dot-a\"></div>\n <div class=\"slds-spinner__dot-b\"></div>\n </div>\n </div>\n </ng-container>\n <ng-template #datoramaPageLoader>\n <div class=\"animation-container d-flex align-center d-flex-wrap\">\n <div class=\"circle d-flex align-center\" *ngFor=\"let id of circleIds\" [ngClass]=\"'circle-' + id\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\">\n <circle cx=\"6\" cy=\"6\" r=\"5\" />\n </svg>\n </div>\n </div>\n </ng-template>\n <span class=\"loading-message simple-bold\">{{msg | translate}}</span>\n</div>",
|
|
19592
19607
|
changeDetection: core.ChangeDetectionStrategy.OnPush
|
|
19593
19608
|
})
|
|
19594
19609
|
], DatoPageLoaderComponent);
|
|
@@ -20566,15 +20581,8 @@
|
|
|
20566
20581
|
|
|
20567
20582
|
var DatoGridStatusCellComponent = /** @class */ (function () {
|
|
20568
20583
|
function DatoGridStatusCellComponent(cdr) {
|
|
20569
|
-
var _a;
|
|
20570
20584
|
this.cdr = cdr;
|
|
20571
|
-
this.
|
|
20572
|
-
_a[exports.GridStatusColumnTypes.SUCCESS] = { icon: 'success-line', iconCssClass: 'green-400-color' },
|
|
20573
|
-
_a[exports.GridStatusColumnTypes.FAILURE] = { icon: 'failed-line', iconCssClass: 'red-400-color' },
|
|
20574
|
-
_a[exports.GridStatusColumnTypes.PENDING] = { icon: 'time', iconCssClass: 'yellow-400-color' },
|
|
20575
|
-
_a[exports.GridStatusColumnTypes.WAITING] = { icon: 'info-line', iconCssClass: 'orange-400-color' },
|
|
20576
|
-
_a[exports.GridStatusColumnTypes.IN_PROGRESS] = { showSpinner: true },
|
|
20577
|
-
_a);
|
|
20585
|
+
this.DEFAULT_MIN_WIDTH = 100;
|
|
20578
20586
|
}
|
|
20579
20587
|
DatoGridStatusCellComponent.prototype.agInit = function (params) {
|
|
20580
20588
|
var value = params.value, valueFormatted = params.valueFormatted, node = params.node;
|
|
@@ -20589,14 +20597,15 @@
|
|
|
20589
20597
|
var mainCustomCellConfig = customCellConfig || {};
|
|
20590
20598
|
var valueCustomCellConfig = valueToCustomCellConfig ? valueToCustomCellConfig[params.value] || {} : {};
|
|
20591
20599
|
var config = __assign(__assign({}, mainCustomCellConfig), valueCustomCellConfig);
|
|
20592
|
-
var
|
|
20593
|
-
var defaultConfig = this.defaultConfigByStatus[status] || {};
|
|
20600
|
+
var color = config.color, icon = config.icon, cssClass = config.cssClass, iconCssClass = config.iconCssClass, minWidth = config.minWidth, showSpinner = config.showSpinner, getAdditionalText = config.getAdditionalText, getIsVisible = config.getIsVisible;
|
|
20594
20601
|
this.isVisible = !getIsVisible || getIsVisible(params.data);
|
|
20595
|
-
this.
|
|
20596
|
-
this.
|
|
20597
|
-
this.
|
|
20598
|
-
this.
|
|
20599
|
-
this.
|
|
20602
|
+
this.color = color || 'primary';
|
|
20603
|
+
this.backgroundClass = this.color + "-" + (this.color === 'accent' ? '100' : '200') + "-background-color";
|
|
20604
|
+
this.icon = icon;
|
|
20605
|
+
this.minWidth = minWidth || this.DEFAULT_MIN_WIDTH;
|
|
20606
|
+
this.cssClass = cssClass || '';
|
|
20607
|
+
this.iconCssClass = iconCssClass || '';
|
|
20608
|
+
this.showSpinner = showSpinner;
|
|
20600
20609
|
this.additionalText = getAdditionalText ? getAdditionalText(params.data) : null;
|
|
20601
20610
|
};
|
|
20602
20611
|
DatoGridStatusCellComponent.prototype.refresh = function (params) {
|
|
@@ -20610,9 +20619,8 @@
|
|
|
20610
20619
|
DatoGridStatusCellComponent = __decorate([
|
|
20611
20620
|
core.Component({
|
|
20612
20621
|
selector: 'dato-grid-status-cell',
|
|
20613
|
-
template: "<div *ngIf=\"!isGroup && isVisible\" class=\"height-100 d-flex items-center\">\n <
|
|
20614
|
-
changeDetection: core.ChangeDetectionStrategy.OnPush
|
|
20615
|
-
styles: [".line-height-18{line-height:18px}"]
|
|
20622
|
+
template: "<div *ngIf=\"!isGroup && isVisible\" class=\"height-100 d-flex items-center\">\n <div *ngIf=\"status\" class=\"d-flex justify-center items-center px-15 py-5 {{backgroundClass}} {{cssClass}}\" [style.min-width.px]=\"minWidth\">\n <dato-icon *ngIf=\"icon\" class=\"mr-5 {{iconCssClass}}\" [icon]=\"icon\" datoSize=\"sm\"></dato-icon>\n <div class=\"dato-note {{color}}-800-color\" [class.ellipsis]=\"!additionalText\"\n [datoTooltipV2]=\"status\" [showOnlyOnTextOverflow]=\"true\" [tooltipCheckInView]=\"false\" [datoTooltipDisabled]=\"!!additionalText\">\n {{status}}\n </div>\n <div *ngIf=\"additionalText\" class=\"dato-note {{color}}-800-color ml-3 ellipsis\"\n [datoTooltipV2]=\"status + ' ' + additionalText\" [showOnlyOnTextOverflow]=\"true\" [tooltipCheckInView]=\"false\">\n {{additionalText}}\n </div>\n <span *ngIf=\"showSpinner\" class=\"dato-spinner-loader ml-5\"></span>\n </div>\n</div>\n<span *ngIf=\"isGroup\">{{status}}</span>\n",
|
|
20623
|
+
changeDetection: core.ChangeDetectionStrategy.OnPush
|
|
20616
20624
|
}),
|
|
20617
20625
|
__metadata("design:paramtypes", [core.ChangeDetectorRef])
|
|
20618
20626
|
], DatoGridStatusCellComponent);
|
|
@@ -21443,40 +21451,6 @@
|
|
|
21443
21451
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
21444
21452
|
*/
|
|
21445
21453
|
|
|
21446
|
-
var RichTextService = /** @class */ (function () {
|
|
21447
|
-
function RichTextService(http, config) {
|
|
21448
|
-
this.http = http;
|
|
21449
|
-
this.config = config;
|
|
21450
|
-
}
|
|
21451
|
-
RichTextService.prototype.getLib = function (appendScriptFunc, appendStyleFunc) {
|
|
21452
|
-
if (!this.richTextScript$) {
|
|
21453
|
-
this.initLib(appendScriptFunc, appendStyleFunc);
|
|
21454
|
-
}
|
|
21455
|
-
return this.richTextScript$;
|
|
21456
|
-
};
|
|
21457
|
-
RichTextService.prototype.initLib = function (appendScriptFunc, appendStyleFunc) {
|
|
21458
|
-
this.richTextScript$ = rxjs.combineLatest([
|
|
21459
|
-
this.http
|
|
21460
|
-
.get(this.config.paths.richText + "/index.js", { responseType: 'text' })
|
|
21461
|
-
.pipe(operators.tap(function (lib) { return appendScriptFunc(lib, 'rich-text-editor'); })),
|
|
21462
|
-
this.http
|
|
21463
|
-
.get(this.config.paths.richText + "/plugins/autocomplete/plugin.css", { responseType: 'text' })
|
|
21464
|
-
.pipe(operators.tap(function (style) { return appendStyleFunc(style, 'tinymce-autocomplete'); }))
|
|
21465
|
-
]).pipe(operators.shareReplay(1));
|
|
21466
|
-
};
|
|
21467
|
-
RichTextService.ctorParameters = function () { return [
|
|
21468
|
-
{ type: http.HttpClient },
|
|
21469
|
-
{ type: undefined, decorators: [{ type: core.Inject, args: [DATO_CORE_CONFIG,] }] }
|
|
21470
|
-
]; };
|
|
21471
|
-
RichTextService.ɵprov = core.ɵɵdefineInjectable({ factory: function RichTextService_Factory() { return new RichTextService(core.ɵɵinject(http.HttpClient), core.ɵɵinject(DATO_CORE_CONFIG)); }, token: RichTextService, providedIn: "root" });
|
|
21472
|
-
RichTextService = __decorate([
|
|
21473
|
-
core.Injectable({ providedIn: 'root' }),
|
|
21474
|
-
__param(1, core.Inject(DATO_CORE_CONFIG)),
|
|
21475
|
-
__metadata("design:paramtypes", [http.HttpClient, Object])
|
|
21476
|
-
], RichTextService);
|
|
21477
|
-
return RichTextService;
|
|
21478
|
-
}());
|
|
21479
|
-
|
|
21480
21454
|
/**
|
|
21481
21455
|
* @license
|
|
21482
21456
|
* Copyright Datorama. All Rights Reserved.
|
|
@@ -21490,20 +21464,20 @@
|
|
|
21490
21464
|
var ɵ0$3 = getTinymce;
|
|
21491
21465
|
var DatoRichTextDirective = /** @class */ (function (_super) {
|
|
21492
21466
|
__extends(DatoRichTextDirective, _super);
|
|
21493
|
-
function DatoRichTextDirective(ngZone,
|
|
21467
|
+
function DatoRichTextDirective(ngZone, http, host, config) {
|
|
21494
21468
|
var _this = _super.call(this) || this;
|
|
21495
21469
|
_this.ngZone = ngZone;
|
|
21496
|
-
_this.
|
|
21497
|
-
_this.config = config;
|
|
21470
|
+
_this.http = http;
|
|
21498
21471
|
_this.host = host;
|
|
21472
|
+
_this.config = config;
|
|
21499
21473
|
_this.autocompleteOptions = {};
|
|
21500
21474
|
_this.forcePlainTextPasting = false;
|
|
21501
21475
|
_this.format = 'html';
|
|
21502
21476
|
_this.isOneLine = false;
|
|
21503
21477
|
_this.initialValue = '';
|
|
21504
|
-
_this.defaultPlugins = 'link fullscreen image lists table autocomplete';
|
|
21478
|
+
_this.defaultPlugins = 'link fullscreen textcolor colorpicker image lists table textpattern autocomplete';
|
|
21505
21479
|
_this.defaultToolbar = [
|
|
21506
|
-
'
|
|
21480
|
+
'fontselect fontsizeselect forecolor backcolor bold italic underline link',
|
|
21507
21481
|
'alignleft aligncenter alignright alignjustify outdent indent | table numlist bullist | image fullscreen'
|
|
21508
21482
|
];
|
|
21509
21483
|
return _this;
|
|
@@ -21529,11 +21503,28 @@
|
|
|
21529
21503
|
base: this.config.paths.richText,
|
|
21530
21504
|
query: ''
|
|
21531
21505
|
};
|
|
21532
|
-
|
|
21533
|
-
|
|
21534
|
-
|
|
21535
|
-
|
|
21536
|
-
|
|
21506
|
+
/**
|
|
21507
|
+
* We support only one instance in load time
|
|
21508
|
+
*/
|
|
21509
|
+
if (window.tinymce) {
|
|
21510
|
+
this.init.call(this);
|
|
21511
|
+
}
|
|
21512
|
+
else {
|
|
21513
|
+
this.loadLib().subscribe(function (lib) {
|
|
21514
|
+
appendScript(lib, 'rich-text-editor');
|
|
21515
|
+
_this.init.call(_this);
|
|
21516
|
+
_this.loadAutoCompleteStyle();
|
|
21517
|
+
});
|
|
21518
|
+
}
|
|
21519
|
+
};
|
|
21520
|
+
DatoRichTextDirective.prototype.loadLib = function () {
|
|
21521
|
+
return this.http.get(this.config.paths.richText + "/index.js", { responseType: 'text' });
|
|
21522
|
+
};
|
|
21523
|
+
DatoRichTextDirective.prototype.loadAutoCompleteStyle = function () {
|
|
21524
|
+
this.http
|
|
21525
|
+
.get(this.config.paths.richText + "/plugins/autocomplete/plugin.css", { responseType: 'text' })
|
|
21526
|
+
.subscribe(function (style) {
|
|
21527
|
+
appendStyle(style, 'tinymce-autocomplete');
|
|
21537
21528
|
});
|
|
21538
21529
|
};
|
|
21539
21530
|
DatoRichTextDirective.prototype.initEditor = function (_, editor) {
|
|
@@ -21557,6 +21548,8 @@
|
|
|
21557
21548
|
target: this.host.nativeElement,
|
|
21558
21549
|
width: this.width || 600,
|
|
21559
21550
|
height: this.height || 300,
|
|
21551
|
+
force_br_newlines: true,
|
|
21552
|
+
force_p_newlines: false,
|
|
21560
21553
|
resize: 'both',
|
|
21561
21554
|
branding: false,
|
|
21562
21555
|
inline: this.inline,
|
|
@@ -21564,12 +21557,10 @@
|
|
|
21564
21557
|
readonly: this.disabled,
|
|
21565
21558
|
plugins: this.plugins || this.defaultPlugins,
|
|
21566
21559
|
toolbar: isNil(this.toolbar) ? this.defaultToolbar : this.toolbar,
|
|
21567
|
-
|
|
21560
|
+
fontsize_formats: '8px 10px 12px 14px 18px 24px 36px',
|
|
21568
21561
|
min_width: 480,
|
|
21569
21562
|
menubar: false,
|
|
21570
21563
|
autocomplete: this.autocompleteOptions,
|
|
21571
|
-
suffix: '.min',
|
|
21572
|
-
skin: 'tinymce-5',
|
|
21573
21564
|
setup: function (editor) {
|
|
21574
21565
|
_this.editor = editor;
|
|
21575
21566
|
editor.on('init', function (e) {
|
|
@@ -21626,9 +21617,9 @@
|
|
|
21626
21617
|
var DatoRichTextDirective_1;
|
|
21627
21618
|
DatoRichTextDirective.ctorParameters = function () { return [
|
|
21628
21619
|
{ type: core.NgZone },
|
|
21629
|
-
{ type:
|
|
21630
|
-
{ type:
|
|
21631
|
-
{ type: core.
|
|
21620
|
+
{ type: http.HttpClient },
|
|
21621
|
+
{ type: core.ElementRef },
|
|
21622
|
+
{ type: undefined, decorators: [{ type: core.Inject, args: [DATO_CORE_CONFIG,] }] }
|
|
21632
21623
|
]; };
|
|
21633
21624
|
__decorate([
|
|
21634
21625
|
core.Input(),
|
|
@@ -21694,9 +21685,10 @@
|
|
|
21694
21685
|
}
|
|
21695
21686
|
]
|
|
21696
21687
|
}),
|
|
21697
|
-
__param(
|
|
21688
|
+
__param(3, core.Inject(DATO_CORE_CONFIG)),
|
|
21698
21689
|
__metadata("design:paramtypes", [core.NgZone,
|
|
21699
|
-
|
|
21690
|
+
http.HttpClient,
|
|
21691
|
+
core.ElementRef, Object])
|
|
21700
21692
|
], DatoRichTextDirective);
|
|
21701
21693
|
return DatoRichTextDirective;
|
|
21702
21694
|
}(BaseCustomControl));
|
|
@@ -24219,9 +24211,7 @@
|
|
|
24219
24211
|
};
|
|
24220
24212
|
DatoBreadcrumbsComponent.prototype.initEditableHeader = function () {
|
|
24221
24213
|
var _this = this;
|
|
24222
|
-
this.headerControl.valueChanges
|
|
24223
|
-
.pipe(operators.debounceTime(300), ngxTakeUntilDestroy.untilDestroyed(this))
|
|
24224
|
-
.subscribe(function (res) {
|
|
24214
|
+
this.headerControl.valueChanges.pipe(operators.debounceTime(300), ngxTakeUntilDestroy.untilDestroyed(this)).subscribe(function (res) {
|
|
24225
24215
|
_this.updateEditableText.emit(res);
|
|
24226
24216
|
_this.cdr.detectChanges();
|
|
24227
24217
|
});
|
|
@@ -25584,7 +25574,7 @@
|
|
|
25584
25574
|
};
|
|
25585
25575
|
}
|
|
25586
25576
|
|
|
25587
|
-
window.coreVersion = '22.10.
|
|
25577
|
+
window.coreVersion = '22.10.0';
|
|
25588
25578
|
|
|
25589
25579
|
exports.APP_TRANSLATE = APP_TRANSLATE;
|
|
25590
25580
|
exports.AceService = AceService;
|
|
@@ -26026,7 +26016,6 @@
|
|
|
26026
26016
|
exports.ɵl = DatoGridItemsCountCellComponent;
|
|
26027
26017
|
exports.ɵm = DatoGridV2ToolbarMoreMenuComponent;
|
|
26028
26018
|
exports.ɵn = DatoGridSearchBarComponent;
|
|
26029
|
-
exports.ɵo = RichTextService;
|
|
26030
26019
|
|
|
26031
26020
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
26032
26021
|
|