@datorama/core 22.9.9-rc → 22.9.9-rc.3
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/bundles/datorama-core.umd.js +93 -65
- package/bundles/datorama-core.umd.js.map +1 -1
- package/bundles/datorama-core.umd.min.js +16 -16
- package/bundles/datorama-core.umd.min.js.map +1 -1
- package/datorama-core.d.ts +1 -0
- package/datorama-core.metadata.json +1 -1
- package/esm2015/datorama-core.js +2 -1
- package/esm2015/lib/breadcrumbs/breadcrumbs.component.js +4 -2
- package/esm2015/lib/grid-v2/grid/grid-v2.types.js +1 -1
- package/esm2015/lib/grid-v2/grid-column-cell-components/grid-status-cell/grid-status-cell.component.js +7 -9
- package/esm2015/lib/grid-v2/grid-controller/grid-controller.component.js +5 -2
- package/esm2015/lib/grid-v2/grid-settings.js +2 -2
- package/esm2015/lib/grid-v2/grid-store/grid.service.js +3 -2
- package/esm2015/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +7 -1
- package/esm2015/lib/loaders/page-loader/page-loader.component.js +7 -2
- package/esm2015/lib/rich-text/rich-text.directive.js +20 -38
- package/esm2015/lib/rich-text/rich-text.service.js +50 -0
- package/esm2015/lib/select/select.component.js +5 -10
- package/esm2015/lib/select/trigger-single/trigger-single.component.js +2 -7
- package/esm2015/lib/version.js +2 -2
- package/esm5/datorama-core.js +2 -1
- package/esm5/lib/breadcrumbs/breadcrumbs.component.js +4 -2
- package/esm5/lib/grid-v2/grid/grid-v2.types.js +1 -1
- package/esm5/lib/grid-v2/grid-column-cell-components/grid-status-cell/grid-status-cell.component.js +7 -9
- package/esm5/lib/grid-v2/grid-controller/grid-controller.component.js +5 -2
- package/esm5/lib/grid-v2/grid-settings.js +2 -2
- package/esm5/lib/grid-v2/grid-store/grid.service.js +3 -2
- package/esm5/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +13 -1
- package/esm5/lib/loaders/page-loader/page-loader.component.js +7 -2
- package/esm5/lib/rich-text/rich-text.directive.js +21 -39
- package/esm5/lib/rich-text/rich-text.service.js +51 -0
- package/esm5/lib/select/select.component.js +5 -10
- package/esm5/lib/select/trigger-single/trigger-single.component.js +2 -7
- package/esm5/lib/version.js +2 -2
- package/fesm2015/datorama-core.js +85 -65
- package/fesm2015/datorama-core.js.map +1 -1
- package/fesm5/datorama-core.js +93 -66
- package/fesm5/datorama-core.js.map +1 -1
- package/lib/grid-v2/grid/grid-v2.types.d.ts +4 -3
- package/lib/grid-v2/grid-column-cell-components/grid-status-cell/grid-status-cell.component.d.ts +2 -5
- package/lib/grid-v2/grid-settings.d.ts +2 -2
- package/lib/grid-v2/grid-toolbar/grid-toolbar.component.d.ts +2 -0
- package/lib/loaders/page-loader/page-loader.component.d.ts +1 -0
- package/lib/rich-text/rich-text.directive.d.ts +4 -6
- package/lib/rich-text/rich-text.service.d.ts +10 -0
- package/lib/select/trigger-single/trigger-single.component.d.ts +1 -2
- package/package.json +2 -2
|
@@ -8748,9 +8748,8 @@
|
|
|
8748
8748
|
DatoSelectComponent.prototype.writeValue = function (activeOptions) {
|
|
8749
8749
|
this._model = activeOptions ? akita.coerceArray(activeOptions) : [];
|
|
8750
8750
|
if (this.options) {
|
|
8751
|
-
var overTheLimit = this.limitSelectedTo && this.isMulti && this._model.length >= this.limitSelectedTo;
|
|
8752
8751
|
this.markAsActive(this._model, { deselectAll: true });
|
|
8753
|
-
|
|
8752
|
+
this.limitSelectedTo && this.updateDisabledState();
|
|
8754
8753
|
}
|
|
8755
8754
|
/** For later updates */
|
|
8756
8755
|
this.cdr.markForCheck();
|
|
@@ -8878,7 +8877,6 @@
|
|
|
8878
8877
|
};
|
|
8879
8878
|
DatoSelectComponent.prototype.removeOption = function (option) {
|
|
8880
8879
|
var _this = this;
|
|
8881
|
-
var updateDisabled = this.limitSelectedTo && this._model.length === this.limitSelectedTo;
|
|
8882
8880
|
this._model = this._model.filter(function (current) { return current[_this.idKey] !== option[_this.idKey]; });
|
|
8883
8881
|
var optionToRemove = this.options.find(function (datoOption) { return datoOption.option && datoOption.option[_this.idKey] === option[_this.idKey]; });
|
|
8884
8882
|
/**
|
|
@@ -8888,7 +8886,7 @@
|
|
|
8888
8886
|
if (optionToRemove) {
|
|
8889
8887
|
optionToRemove.active = false;
|
|
8890
8888
|
}
|
|
8891
|
-
|
|
8889
|
+
this.limitSelectedTo && this.updateDisabledState();
|
|
8892
8890
|
this.onChange(this._model);
|
|
8893
8891
|
this.cdr.markForCheck();
|
|
8894
8892
|
this.asyncUpdateDropdownPosition();
|
|
@@ -9236,9 +9234,6 @@
|
|
|
9236
9234
|
if (!datoOption) {
|
|
9237
9235
|
return;
|
|
9238
9236
|
}
|
|
9239
|
-
var modelLength = this._model.length;
|
|
9240
|
-
var updateDisabled = this.limitSelectedTo &&
|
|
9241
|
-
(modelLength === this.limitSelectedTo || (modelLength === this.limitSelectedTo - 1 && !datoOption.active));
|
|
9242
9237
|
datoOption.active = !datoOption.active;
|
|
9243
9238
|
var rawOption = datoOption.option;
|
|
9244
9239
|
if (datoOption.active) {
|
|
@@ -9247,7 +9242,7 @@
|
|
|
9247
9242
|
else {
|
|
9248
9243
|
this._model = this._model.filter(function (current) { return current[_this.idKey] !== rawOption[_this.idKey]; });
|
|
9249
9244
|
}
|
|
9250
|
-
|
|
9245
|
+
this.limitSelectedTo && this.updateDisabledState();
|
|
9251
9246
|
this.onChange(this._model);
|
|
9252
9247
|
this.cdr.markForCheck();
|
|
9253
9248
|
this.asyncUpdateDropdownPosition();
|
|
@@ -9486,7 +9481,7 @@
|
|
|
9486
9481
|
DatoSelectComponent = __decorate([
|
|
9487
9482
|
core.Component({
|
|
9488
9483
|
selector: 'dato-select',
|
|
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 [
|
|
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",
|
|
9490
9485
|
preserveWhitespaces: false,
|
|
9491
9486
|
providers: [valueAccessor$3, DatoOverlay],
|
|
9492
9487
|
encapsulation: core.ViewEncapsulation.None,
|
|
@@ -9514,7 +9509,6 @@
|
|
|
9514
9509
|
var DatoTriggerSingle = /** @class */ (function () {
|
|
9515
9510
|
function DatoTriggerSingle(cdr) {
|
|
9516
9511
|
this.cdr = cdr;
|
|
9517
|
-
this.isLoading = false;
|
|
9518
9512
|
this._placeholder = '';
|
|
9519
9513
|
}
|
|
9520
9514
|
Object.defineProperty(DatoTriggerSingle.prototype, "placeholder", {
|
|
@@ -9553,10 +9547,6 @@
|
|
|
9553
9547
|
DatoTriggerSingle.ctorParameters = function () { return [
|
|
9554
9548
|
{ type: core.ChangeDetectorRef }
|
|
9555
9549
|
]; };
|
|
9556
|
-
__decorate([
|
|
9557
|
-
core.Input(),
|
|
9558
|
-
__metadata("design:type", Object)
|
|
9559
|
-
], DatoTriggerSingle.prototype, "isLoading", void 0);
|
|
9560
9550
|
__decorate([
|
|
9561
9551
|
core.Input(),
|
|
9562
9552
|
__metadata("design:type", core.TemplateRef)
|
|
@@ -9582,7 +9572,7 @@
|
|
|
9582
9572
|
DatoTriggerSingle = __decorate([
|
|
9583
9573
|
core.Component({
|
|
9584
9574
|
selector: 'dato-trigger-single',
|
|
9585
|
-
template: "<ng-template *ngIf=\"
|
|
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",
|
|
9586
9576
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
9587
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}"]
|
|
9588
9578
|
}),
|
|
@@ -12057,7 +12047,7 @@
|
|
|
12057
12047
|
return contextActions;
|
|
12058
12048
|
}
|
|
12059
12049
|
|
|
12060
|
-
var DATO_GRID_STORAGE_API = new core.InjectionToken('
|
|
12050
|
+
var DATO_GRID_STORAGE_API = new core.InjectionToken('DATO_GRID_STORAGE_AP');
|
|
12061
12051
|
|
|
12062
12052
|
var defaultEditableColumnRenderer = function (params) {
|
|
12063
12053
|
return params && params.value ? "<div class=\"value-wrapper ellipsis\">" + params.value + "</div>" : null;
|
|
@@ -14644,7 +14634,8 @@
|
|
|
14644
14634
|
this.updateSettings({ gridAlignment: gridAlignment, columnsSizes: null });
|
|
14645
14635
|
};
|
|
14646
14636
|
GridService.prototype.saveSettingsToServer = function (settings) {
|
|
14647
|
-
this.
|
|
14637
|
+
var isGlobal = this.gridQuery.getGridOptions().isGlobalSettings;
|
|
14638
|
+
this.storageAPI.set(this.gridName, settings, isGlobal);
|
|
14648
14639
|
};
|
|
14649
14640
|
/**
|
|
14650
14641
|
* @internal used to log grid events to the platform's logging service
|
|
@@ -15649,7 +15640,10 @@
|
|
|
15649
15640
|
.pipe(operators.switchMap(function () {
|
|
15650
15641
|
_this.gridOptions = _this.normalizeOptions();
|
|
15651
15642
|
agGrid.gridOptions = _this.gridOptions;
|
|
15652
|
-
var
|
|
15643
|
+
var isGlobal = _this.gridOptions.isGlobalSettings;
|
|
15644
|
+
var settingsLoader = _this.gridOptions.saveSettings === false
|
|
15645
|
+
? rxjs.of(null)
|
|
15646
|
+
: _this.storageAPI.get(_this.gridOptions.gridName, isGlobal);
|
|
15653
15647
|
return rxjs.combineLatest([agGrid.gridReady, settingsLoader]);
|
|
15654
15648
|
}), ngxTakeUntilDestroy.untilDestroyed(this))
|
|
15655
15649
|
.subscribe(function (_a) {
|
|
@@ -16931,6 +16925,18 @@
|
|
|
16931
16925
|
this.registerGroupListeners();
|
|
16932
16926
|
this.subscribeRowsSelectionData();
|
|
16933
16927
|
};
|
|
16928
|
+
DatoGridV2ToolbarComponent.prototype.getCellValueChangeEvent = function () {
|
|
16929
|
+
var _this = this;
|
|
16930
|
+
return this.gridController.gridQuery.waitForGrid(function () {
|
|
16931
|
+
return _this.gridQuery.gridRef.cellValueChanged.pipe(operators.debounceTime(100), ngxTakeUntilDestroy.untilDestroyed(_this));
|
|
16932
|
+
});
|
|
16933
|
+
};
|
|
16934
|
+
DatoGridV2ToolbarComponent.prototype.getRowDataUpdatedEvent = function () {
|
|
16935
|
+
var _this = this;
|
|
16936
|
+
return this.gridController.gridQuery.waitForGrid(function () {
|
|
16937
|
+
return _this.gridQuery.gridRef.rowDataUpdated.pipe(operators.debounceTime(100), ngxTakeUntilDestroy.untilDestroyed(_this));
|
|
16938
|
+
});
|
|
16939
|
+
};
|
|
16934
16940
|
DatoGridV2ToolbarComponent.prototype.onActionClick = function (action) {
|
|
16935
16941
|
if (isFunction(action.onClick)) {
|
|
16936
16942
|
var selectedRowsCount = this.gridController.gridQuery.getSelectedRowsCount();
|
|
@@ -19545,6 +19551,7 @@
|
|
|
19545
19551
|
function DatoPageLoaderComponent() {
|
|
19546
19552
|
this.msg = '';
|
|
19547
19553
|
this.salesforce = false;
|
|
19554
|
+
this.size = 'medium';
|
|
19548
19555
|
this.circleIds = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i'];
|
|
19549
19556
|
}
|
|
19550
19557
|
__decorate([
|
|
@@ -19555,10 +19562,14 @@
|
|
|
19555
19562
|
core.Input(),
|
|
19556
19563
|
__metadata("design:type", Object)
|
|
19557
19564
|
], DatoPageLoaderComponent.prototype, "salesforce", void 0);
|
|
19565
|
+
__decorate([
|
|
19566
|
+
core.Input(),
|
|
19567
|
+
__metadata("design:type", String)
|
|
19568
|
+
], DatoPageLoaderComponent.prototype, "size", void 0);
|
|
19558
19569
|
DatoPageLoaderComponent = __decorate([
|
|
19559
19570
|
core.Component({
|
|
19560
19571
|
selector: 'dato-page-loader',
|
|
19561
|
-
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-
|
|
19572
|
+
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_brand\" [ngClass]=\"'slds-spinner_' + size\">\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>\n",
|
|
19562
19573
|
changeDetection: core.ChangeDetectionStrategy.OnPush
|
|
19563
19574
|
})
|
|
19564
19575
|
], DatoPageLoaderComponent);
|
|
@@ -20537,7 +20548,6 @@
|
|
|
20537
20548
|
var DatoGridStatusCellComponent = /** @class */ (function () {
|
|
20538
20549
|
function DatoGridStatusCellComponent(cdr) {
|
|
20539
20550
|
this.cdr = cdr;
|
|
20540
|
-
this.DEFAULT_MIN_WIDTH = 100;
|
|
20541
20551
|
}
|
|
20542
20552
|
DatoGridStatusCellComponent.prototype.agInit = function (params) {
|
|
20543
20553
|
var value = params.value, valueFormatted = params.valueFormatted, node = params.node;
|
|
@@ -20552,14 +20562,12 @@
|
|
|
20552
20562
|
var mainCustomCellConfig = customCellConfig || {};
|
|
20553
20563
|
var valueCustomCellConfig = valueToCustomCellConfig ? valueToCustomCellConfig[params.value] || {} : {};
|
|
20554
20564
|
var config = __assign(__assign({}, mainCustomCellConfig), valueCustomCellConfig);
|
|
20555
|
-
var
|
|
20565
|
+
var textCssClass = config.textCssClass, icon = config.icon, iconCssClass = config.iconCssClass, showSpinner = config.showSpinner, getAdditionalText = config.getAdditionalText, additionalTextCssClass = config.additionalTextCssClass, getIsVisible = config.getIsVisible;
|
|
20556
20566
|
this.isVisible = !getIsVisible || getIsVisible(params.data);
|
|
20557
|
-
this.color = color || 'primary';
|
|
20558
|
-
this.backgroundClass = this.color + "-" + (this.color === 'accent' ? '100' : '200') + "-background-color";
|
|
20559
20567
|
this.icon = icon;
|
|
20560
|
-
this.minWidth = minWidth || this.DEFAULT_MIN_WIDTH;
|
|
20561
|
-
this.cssClass = cssClass || '';
|
|
20562
20568
|
this.iconCssClass = iconCssClass || '';
|
|
20569
|
+
this.textCssClass = textCssClass || '';
|
|
20570
|
+
this.additionalTextCssClass = additionalTextCssClass || '';
|
|
20563
20571
|
this.showSpinner = showSpinner;
|
|
20564
20572
|
this.additionalText = getAdditionalText ? getAdditionalText(params.data) : null;
|
|
20565
20573
|
};
|
|
@@ -20574,8 +20582,9 @@
|
|
|
20574
20582
|
DatoGridStatusCellComponent = __decorate([
|
|
20575
20583
|
core.Component({
|
|
20576
20584
|
selector: 'dato-grid-status-cell',
|
|
20577
|
-
template: "<div *ngIf=\"!isGroup && isVisible\" class=\"height-100 d-flex items-center\">\n <
|
|
20578
|
-
changeDetection: core.ChangeDetectionStrategy.OnPush
|
|
20585
|
+
template: "<div *ngIf=\"!isGroup && isVisible\" class=\"height-100 d-flex items-center\">\n <dato-icon *ngIf=\"icon\" class=\"mr-6 {{iconCssClass}}\" [icon]=\"icon\" datoSize=\"sm\"></dato-icon>\n <dato-page-loader *ngIf=\"showSpinner\" [salesforce]=\"true\" size=\"x-small\" class=\"mr-10 mt-15\"></dato-page-loader>\n <div class=\"dato-simple status line-height-18 {{textCssClass}}\" [class.ellipsis]=\"!additionalText\"\n [datoTooltipV2]=\"status\" [showOnlyOnTextOverflow]=\"true\" [tooltipCheckInView]=\"false\">\n {{status}}\n </div>\n <div *ngIf=\"additionalText\" class=\"dato-simple ml-3 ellipsis line-height-18 {{additionalTextCssClass}}\"\n [datoTooltipV2]=\"status + ' ' + additionalText\" [showOnlyOnTextOverflow]=\"true\" [tooltipCheckInView]=\"false\">\n {{additionalText}}\n </div>\n</div>\n<span *ngIf=\"isGroup\">{{status}}</span>\n",
|
|
20586
|
+
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
20587
|
+
styles: [".line-height-18{line-height:18px}"]
|
|
20579
20588
|
}),
|
|
20580
20589
|
__metadata("design:paramtypes", [core.ChangeDetectorRef])
|
|
20581
20590
|
], DatoGridStatusCellComponent);
|
|
@@ -21406,6 +21415,40 @@
|
|
|
21406
21415
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
21407
21416
|
*/
|
|
21408
21417
|
|
|
21418
|
+
var RichTextService = /** @class */ (function () {
|
|
21419
|
+
function RichTextService(http, config) {
|
|
21420
|
+
this.http = http;
|
|
21421
|
+
this.config = config;
|
|
21422
|
+
}
|
|
21423
|
+
RichTextService.prototype.getLib = function (appendScriptFunc, appendStyleFunc) {
|
|
21424
|
+
if (!this.richTextScript$) {
|
|
21425
|
+
this.initLib(appendScriptFunc, appendStyleFunc);
|
|
21426
|
+
}
|
|
21427
|
+
return this.richTextScript$;
|
|
21428
|
+
};
|
|
21429
|
+
RichTextService.prototype.initLib = function (appendScriptFunc, appendStyleFunc) {
|
|
21430
|
+
this.richTextScript$ = rxjs.combineLatest([
|
|
21431
|
+
this.http
|
|
21432
|
+
.get(this.config.paths.richText + "/index.js", { responseType: 'text' })
|
|
21433
|
+
.pipe(operators.tap(function (lib) { return appendScriptFunc(lib, 'rich-text-editor'); })),
|
|
21434
|
+
this.http
|
|
21435
|
+
.get(this.config.paths.richText + "/plugins/autocomplete/plugin.css", { responseType: 'text' })
|
|
21436
|
+
.pipe(operators.tap(function (style) { return appendStyleFunc(style, 'tinymce-autocomplete'); }))
|
|
21437
|
+
]).pipe(operators.shareReplay(1));
|
|
21438
|
+
};
|
|
21439
|
+
RichTextService.ctorParameters = function () { return [
|
|
21440
|
+
{ type: http.HttpClient },
|
|
21441
|
+
{ type: undefined, decorators: [{ type: core.Inject, args: [DATO_CORE_CONFIG,] }] }
|
|
21442
|
+
]; };
|
|
21443
|
+
RichTextService.ɵprov = core.ɵɵdefineInjectable({ factory: function RichTextService_Factory() { return new RichTextService(core.ɵɵinject(http.HttpClient), core.ɵɵinject(DATO_CORE_CONFIG)); }, token: RichTextService, providedIn: "root" });
|
|
21444
|
+
RichTextService = __decorate([
|
|
21445
|
+
core.Injectable({ providedIn: 'root' }),
|
|
21446
|
+
__param(1, core.Inject(DATO_CORE_CONFIG)),
|
|
21447
|
+
__metadata("design:paramtypes", [http.HttpClient, Object])
|
|
21448
|
+
], RichTextService);
|
|
21449
|
+
return RichTextService;
|
|
21450
|
+
}());
|
|
21451
|
+
|
|
21409
21452
|
/**
|
|
21410
21453
|
* @license
|
|
21411
21454
|
* Copyright Datorama. All Rights Reserved.
|
|
@@ -21419,20 +21462,20 @@
|
|
|
21419
21462
|
var ɵ0$3 = getTinymce;
|
|
21420
21463
|
var DatoRichTextDirective = /** @class */ (function (_super) {
|
|
21421
21464
|
__extends(DatoRichTextDirective, _super);
|
|
21422
|
-
function DatoRichTextDirective(ngZone,
|
|
21465
|
+
function DatoRichTextDirective(ngZone, richTextService, config, host) {
|
|
21423
21466
|
var _this = _super.call(this) || this;
|
|
21424
21467
|
_this.ngZone = ngZone;
|
|
21425
|
-
_this.
|
|
21426
|
-
_this.host = host;
|
|
21468
|
+
_this.richTextService = richTextService;
|
|
21427
21469
|
_this.config = config;
|
|
21470
|
+
_this.host = host;
|
|
21428
21471
|
_this.autocompleteOptions = {};
|
|
21429
21472
|
_this.forcePlainTextPasting = false;
|
|
21430
21473
|
_this.format = 'html';
|
|
21431
21474
|
_this.isOneLine = false;
|
|
21432
21475
|
_this.initialValue = '';
|
|
21433
|
-
_this.defaultPlugins = 'link fullscreen
|
|
21476
|
+
_this.defaultPlugins = 'link fullscreen image lists table autocomplete';
|
|
21434
21477
|
_this.defaultToolbar = [
|
|
21435
|
-
'
|
|
21478
|
+
'fontfamily fontsize forecolor backcolor bold italic underline link',
|
|
21436
21479
|
'alignleft aligncenter alignright alignjustify outdent indent | table numlist bullist | image fullscreen'
|
|
21437
21480
|
];
|
|
21438
21481
|
return _this;
|
|
@@ -21458,28 +21501,11 @@
|
|
|
21458
21501
|
base: this.config.paths.richText,
|
|
21459
21502
|
query: ''
|
|
21460
21503
|
};
|
|
21461
|
-
|
|
21462
|
-
|
|
21463
|
-
|
|
21464
|
-
|
|
21465
|
-
|
|
21466
|
-
}
|
|
21467
|
-
else {
|
|
21468
|
-
this.loadLib().subscribe(function (lib) {
|
|
21469
|
-
appendScript(lib, 'rich-text-editor');
|
|
21470
|
-
_this.init.call(_this);
|
|
21471
|
-
_this.loadAutoCompleteStyle();
|
|
21472
|
-
});
|
|
21473
|
-
}
|
|
21474
|
-
};
|
|
21475
|
-
DatoRichTextDirective.prototype.loadLib = function () {
|
|
21476
|
-
return this.http.get(this.config.paths.richText + "/index.js", { responseType: 'text' });
|
|
21477
|
-
};
|
|
21478
|
-
DatoRichTextDirective.prototype.loadAutoCompleteStyle = function () {
|
|
21479
|
-
this.http
|
|
21480
|
-
.get(this.config.paths.richText + "/plugins/autocomplete/plugin.css", { responseType: 'text' })
|
|
21481
|
-
.subscribe(function (style) {
|
|
21482
|
-
appendStyle(style, 'tinymce-autocomplete');
|
|
21504
|
+
this.richTextService
|
|
21505
|
+
.getLib(appendScript, appendStyle)
|
|
21506
|
+
.pipe(ngxTakeUntilDestroy.untilDestroyed(this))
|
|
21507
|
+
.subscribe(function () {
|
|
21508
|
+
_this.init.call(_this);
|
|
21483
21509
|
});
|
|
21484
21510
|
};
|
|
21485
21511
|
DatoRichTextDirective.prototype.initEditor = function (_, editor) {
|
|
@@ -21503,8 +21529,6 @@
|
|
|
21503
21529
|
target: this.host.nativeElement,
|
|
21504
21530
|
width: this.width || 600,
|
|
21505
21531
|
height: this.height || 300,
|
|
21506
|
-
force_br_newlines: true,
|
|
21507
|
-
force_p_newlines: false,
|
|
21508
21532
|
resize: 'both',
|
|
21509
21533
|
branding: false,
|
|
21510
21534
|
inline: this.inline,
|
|
@@ -21512,10 +21536,12 @@
|
|
|
21512
21536
|
readonly: this.disabled,
|
|
21513
21537
|
plugins: this.plugins || this.defaultPlugins,
|
|
21514
21538
|
toolbar: isNil(this.toolbar) ? this.defaultToolbar : this.toolbar,
|
|
21515
|
-
|
|
21539
|
+
font_size_formats: '8px 10px 12px 14px 18px 24px 36px',
|
|
21516
21540
|
min_width: 480,
|
|
21517
21541
|
menubar: false,
|
|
21518
21542
|
autocomplete: this.autocompleteOptions,
|
|
21543
|
+
suffix: '.min',
|
|
21544
|
+
skin: 'tinymce-5',
|
|
21519
21545
|
setup: function (editor) {
|
|
21520
21546
|
_this.editor = editor;
|
|
21521
21547
|
editor.on('init', function (e) {
|
|
@@ -21572,9 +21598,9 @@
|
|
|
21572
21598
|
var DatoRichTextDirective_1;
|
|
21573
21599
|
DatoRichTextDirective.ctorParameters = function () { return [
|
|
21574
21600
|
{ type: core.NgZone },
|
|
21575
|
-
{ type:
|
|
21576
|
-
{ type: core.
|
|
21577
|
-
{ type:
|
|
21601
|
+
{ type: RichTextService },
|
|
21602
|
+
{ type: undefined, decorators: [{ type: core.Inject, args: [DATO_CORE_CONFIG,] }] },
|
|
21603
|
+
{ type: core.ElementRef }
|
|
21578
21604
|
]; };
|
|
21579
21605
|
__decorate([
|
|
21580
21606
|
core.Input(),
|
|
@@ -21640,10 +21666,9 @@
|
|
|
21640
21666
|
}
|
|
21641
21667
|
]
|
|
21642
21668
|
}),
|
|
21643
|
-
__param(
|
|
21669
|
+
__param(2, core.Inject(DATO_CORE_CONFIG)),
|
|
21644
21670
|
__metadata("design:paramtypes", [core.NgZone,
|
|
21645
|
-
|
|
21646
|
-
core.ElementRef, Object])
|
|
21671
|
+
RichTextService, Object, core.ElementRef])
|
|
21647
21672
|
], DatoRichTextDirective);
|
|
21648
21673
|
return DatoRichTextDirective;
|
|
21649
21674
|
}(BaseCustomControl));
|
|
@@ -24166,7 +24191,9 @@
|
|
|
24166
24191
|
};
|
|
24167
24192
|
DatoBreadcrumbsComponent.prototype.initEditableHeader = function () {
|
|
24168
24193
|
var _this = this;
|
|
24169
|
-
this.headerControl.valueChanges
|
|
24194
|
+
this.headerControl.valueChanges
|
|
24195
|
+
.pipe(operators.debounceTime(300), ngxTakeUntilDestroy.untilDestroyed(this))
|
|
24196
|
+
.subscribe(function (res) {
|
|
24170
24197
|
_this.updateEditableText.emit(res);
|
|
24171
24198
|
_this.cdr.detectChanges();
|
|
24172
24199
|
});
|
|
@@ -25529,7 +25556,7 @@
|
|
|
25529
25556
|
};
|
|
25530
25557
|
}
|
|
25531
25558
|
|
|
25532
|
-
window.coreVersion = '22.
|
|
25559
|
+
window.coreVersion = '22.10.7-rc.';
|
|
25533
25560
|
|
|
25534
25561
|
exports.APP_TRANSLATE = APP_TRANSLATE;
|
|
25535
25562
|
exports.AceService = AceService;
|
|
@@ -25971,6 +25998,7 @@
|
|
|
25971
25998
|
exports.ɵl = DatoGridItemsCountCellComponent;
|
|
25972
25999
|
exports.ɵm = DatoGridV2ToolbarMoreMenuComponent;
|
|
25973
26000
|
exports.ɵn = DatoGridSearchBarComponent;
|
|
26001
|
+
exports.ɵo = RichTextService;
|
|
25974
26002
|
|
|
25975
26003
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
25976
26004
|
|