@datorama/core 22.0.5-rc.1 → 22.0.6
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 +13 -13
- package/bundles/datorama-core.umd.js +80 -92
- package/bundles/datorama-core.umd.js.map +1 -1
- package/bundles/datorama-core.umd.min.js +15 -15
- 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 -1
- package/esm2015/lib/grid-v2/grid-controller/grid-controller.component.js +8 -6
- package/esm2015/lib/grid-v2/grid-filter/filter-validator.js +3 -1
- package/esm2015/lib/grid-v2/grid-filter/grid-filter.component.js +12 -4
- package/esm2015/lib/grid-v2/grid-filter/grid-filter.types.js +3 -1
- package/esm2015/lib/grid-v2/grid-settings.js +2 -2
- package/esm2015/lib/grid-v2/grid-store/grid.query.js +3 -3
- package/esm2015/lib/grid-v2/grid-store/grid.service.js +9 -3
- package/esm2015/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +1 -7
- package/esm2015/lib/icon/icon.types.js +1 -1
- package/esm2015/lib/rich-text/rich-text.directive.js +33 -15
- package/esm2015/lib/select/select.component.js +16 -16
- 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 -1
- package/esm5/lib/grid-v2/grid-controller/grid-controller.component.js +8 -6
- package/esm5/lib/grid-v2/grid-filter/filter-validator.js +3 -1
- package/esm5/lib/grid-v2/grid-filter/grid-filter.component.js +12 -4
- package/esm5/lib/grid-v2/grid-filter/grid-filter.types.js +3 -1
- package/esm5/lib/grid-v2/grid-settings.js +2 -2
- package/esm5/lib/grid-v2/grid-store/grid.query.js +3 -3
- package/esm5/lib/grid-v2/grid-store/grid.service.js +9 -3
- package/esm5/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +1 -13
- package/esm5/lib/icon/icon.types.js +1 -1
- package/esm5/lib/rich-text/rich-text.directive.js +34 -16
- package/esm5/lib/select/select.component.js +16 -17
- package/esm5/lib/version.js +2 -2
- package/fesm2015/datorama-core.js +80 -83
- package/fesm2015/datorama-core.js.map +1 -1
- package/fesm5/datorama-core.js +81 -92
- package/fesm5/datorama-core.js.map +1 -1
- package/i18n/locale-en_US.json +2 -0
- package/lib/grid-v2/grid/grid-v2.types.d.ts +1 -1
- package/lib/grid-v2/grid-filter/grid-filter.types.d.ts +3 -1
- package/lib/grid-v2/grid-settings.d.ts +2 -2
- package/lib/grid-v2/grid-toolbar/grid-toolbar.component.d.ts +0 -2
- package/lib/icon/icon.types.d.ts +1 -1
- package/lib/rich-text/rich-text.directive.d.ts +6 -4
- package/lib/select/select.component.d.ts +0 -1
- 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
package/bundle.scss
CHANGED
|
@@ -14300,6 +14300,19 @@ dato-grid-v2 .ag-cell {
|
|
|
14300
14300
|
border-right: solid 1px themify(primary-300, 0.5);
|
|
14301
14301
|
}
|
|
14302
14302
|
|
|
14303
|
+
dato-grid-v2 ag-grid-angular .ag-floating-bottom {
|
|
14304
|
+
border: none !important;
|
|
14305
|
+
}
|
|
14306
|
+
|
|
14307
|
+
dato-grid-v2 ag-grid-angular .ag-floating-bottom .ag-row {
|
|
14308
|
+
background-color: themify(primary-0) !important;
|
|
14309
|
+
border: 1px solid themify(primary-200);
|
|
14310
|
+
}
|
|
14311
|
+
|
|
14312
|
+
dato-grid-v2 ag-grid-angular .ag-floating-bottom .ag-row .ag-cell {
|
|
14313
|
+
border-right: none;
|
|
14314
|
+
}
|
|
14315
|
+
|
|
14303
14316
|
dato-grid-v2 ag-grid-angular.enable-v2_1 {
|
|
14304
14317
|
padding-top: 8px;
|
|
14305
14318
|
}
|
|
@@ -14341,19 +14354,6 @@ dato-grid-v2 ag-grid-angular.pivot-mode .ag-row.ag-row-group:not(.ag-row-level-0
|
|
|
14341
14354
|
font-weight: 400;
|
|
14342
14355
|
}
|
|
14343
14356
|
|
|
14344
|
-
dato-grid-v2 ag-grid-angular.pivot-mode .ag-floating-bottom {
|
|
14345
|
-
border: none;
|
|
14346
|
-
}
|
|
14347
|
-
|
|
14348
|
-
dato-grid-v2 ag-grid-angular.pivot-mode .ag-floating-bottom .ag-row {
|
|
14349
|
-
background-color: themify(primary-0);
|
|
14350
|
-
border: 1px solid themify(primary-200);
|
|
14351
|
-
}
|
|
14352
|
-
|
|
14353
|
-
dato-grid-v2 ag-grid-angular.pivot-mode .ag-floating-bottom .ag-row .ag-cell {
|
|
14354
|
-
border-right: none;
|
|
14355
|
-
}
|
|
14356
|
-
|
|
14357
14357
|
dato-grid-v2 ag-grid-angular.pivot-mode .ag-ltr .ag-row-group-leaf-indent {
|
|
14358
14358
|
margin-left: 0;
|
|
14359
14359
|
}
|
|
@@ -8629,8 +8629,9 @@
|
|
|
8629
8629
|
DatoSelectComponent.prototype.writeValue = function (activeOptions) {
|
|
8630
8630
|
this._model = activeOptions ? akita.coerceArray(activeOptions) : [];
|
|
8631
8631
|
if (this.options) {
|
|
8632
|
+
var overTheLimit = this.limitSelectedTo && this.isMulti && this._model.length >= this.limitSelectedTo;
|
|
8632
8633
|
this.markAsActive(this._model, { deselectAll: true });
|
|
8633
|
-
|
|
8634
|
+
overTheLimit && this.updateDisabledState();
|
|
8634
8635
|
}
|
|
8635
8636
|
/** For later updates */
|
|
8636
8637
|
this.cdr.markForCheck();
|
|
@@ -8667,7 +8668,7 @@
|
|
|
8667
8668
|
*/
|
|
8668
8669
|
if (this.hasValue && this._initialOpen) {
|
|
8669
8670
|
this.markAsActive(this._model);
|
|
8670
|
-
if (this.limitSelectedTo) {
|
|
8671
|
+
if (this.limitSelectedTo && this._model.length === this.limitSelectedTo) {
|
|
8671
8672
|
this.updateDisabledState();
|
|
8672
8673
|
}
|
|
8673
8674
|
this._initialOpen = false;
|
|
@@ -8747,8 +8748,8 @@
|
|
|
8747
8748
|
}
|
|
8748
8749
|
}
|
|
8749
8750
|
this.onChange(this._model);
|
|
8751
|
+
this.datoOverlay.scheduleUpdate();
|
|
8750
8752
|
this.cdr.markForCheck();
|
|
8751
|
-
this.asyncUpdateDropdownPosition();
|
|
8752
8753
|
};
|
|
8753
8754
|
DatoSelectComponent.prototype.reorderOptions = function (newOrder) {
|
|
8754
8755
|
this._model = newOrder;
|
|
@@ -8756,6 +8757,7 @@
|
|
|
8756
8757
|
};
|
|
8757
8758
|
DatoSelectComponent.prototype.removeOption = function (option) {
|
|
8758
8759
|
var _this = this;
|
|
8760
|
+
var updateDisabled = this.limitSelectedTo && this._model.length === this.limitSelectedTo;
|
|
8759
8761
|
this._model = this._model.filter(function (current) { return current[_this.idKey] !== option[_this.idKey]; });
|
|
8760
8762
|
var optionToRemove = this.options.find(function (datoOption) { return datoOption.option && datoOption.option[_this.idKey] === option[_this.idKey]; });
|
|
8761
8763
|
/**
|
|
@@ -8765,10 +8767,12 @@
|
|
|
8765
8767
|
if (optionToRemove) {
|
|
8766
8768
|
optionToRemove.active = false;
|
|
8767
8769
|
}
|
|
8768
|
-
|
|
8770
|
+
updateDisabled && this.updateDisabledState();
|
|
8769
8771
|
this.onChange(this._model);
|
|
8770
8772
|
this.cdr.markForCheck();
|
|
8771
|
-
this.
|
|
8773
|
+
if (this.datoOverlay.attached) {
|
|
8774
|
+
this.datoOverlay.scheduleUpdate();
|
|
8775
|
+
}
|
|
8772
8776
|
};
|
|
8773
8777
|
DatoSelectComponent.prototype.preventBodyScroll = function (event) {
|
|
8774
8778
|
if (isArrowUpDown(event)) {
|
|
@@ -9023,7 +9027,7 @@
|
|
|
9023
9027
|
_this.searchTerm = value;
|
|
9024
9028
|
_this.keyManager.setActiveItem(-1);
|
|
9025
9029
|
_this.cdr.markForCheck();
|
|
9026
|
-
_this.
|
|
9030
|
+
_this.datoOverlay && _this.datoOverlay.scheduleUpdate();
|
|
9027
9031
|
});
|
|
9028
9032
|
};
|
|
9029
9033
|
/**
|
|
@@ -9113,6 +9117,9 @@
|
|
|
9113
9117
|
if (!datoOption) {
|
|
9114
9118
|
return;
|
|
9115
9119
|
}
|
|
9120
|
+
var modelLength = this._model.length;
|
|
9121
|
+
var updateDisabled = this.limitSelectedTo &&
|
|
9122
|
+
(modelLength === this.limitSelectedTo || (modelLength === this.limitSelectedTo - 1 && !datoOption.active));
|
|
9116
9123
|
datoOption.active = !datoOption.active;
|
|
9117
9124
|
var rawOption = datoOption.option;
|
|
9118
9125
|
if (datoOption.active) {
|
|
@@ -9121,10 +9128,10 @@
|
|
|
9121
9128
|
else {
|
|
9122
9129
|
this._model = this._model.filter(function (current) { return current[_this.idKey] !== rawOption[_this.idKey]; });
|
|
9123
9130
|
}
|
|
9124
|
-
|
|
9131
|
+
updateDisabled && this.updateDisabledState();
|
|
9125
9132
|
this.onChange(this._model);
|
|
9126
9133
|
this.cdr.markForCheck();
|
|
9127
|
-
this.
|
|
9134
|
+
this.datoOverlay.scheduleUpdate();
|
|
9128
9135
|
};
|
|
9129
9136
|
DatoSelectComponent.prototype.activateInfiniteScroll = function () {
|
|
9130
9137
|
var _this = this;
|
|
@@ -9177,14 +9184,6 @@
|
|
|
9177
9184
|
finally { if (e_9) throw e_9.error; }
|
|
9178
9185
|
}
|
|
9179
9186
|
};
|
|
9180
|
-
// Make sure the overlay will be update AFTER Change Detection was done
|
|
9181
|
-
// So the items in the input (and its height) is update
|
|
9182
|
-
DatoSelectComponent.prototype.asyncUpdateDropdownPosition = function () {
|
|
9183
|
-
var _this = this;
|
|
9184
|
-
if (this.datoOverlay && this.datoOverlay.attached) {
|
|
9185
|
-
setTimeout(function () { return _this.datoOverlay.scheduleUpdate(); }, 0);
|
|
9186
|
-
}
|
|
9187
|
-
};
|
|
9188
9187
|
DatoSelectComponent.ctorParameters = function () { return [
|
|
9189
9188
|
{ type: core.ChangeDetectorRef },
|
|
9190
9189
|
{ type: DatoTranslateService },
|
|
@@ -11589,10 +11588,10 @@
|
|
|
11589
11588
|
var uniquePivotParents = uniq(this.api.columns.getSecondaryColumns().map(function (column) { return column.getParent(); }));
|
|
11590
11589
|
var secondaryColumn = this.getSecondaryColumn(pivotedColumn.getColId());
|
|
11591
11590
|
var pivotColIndex = uniquePivotParents.indexOf(secondaryColumn.getParent());
|
|
11592
|
-
return { colId:
|
|
11591
|
+
return { colId: colId, sort: sort, pivotColIndex: pivotColIndex, colField: getColField(pivotedColumn.getColDef()) };
|
|
11593
11592
|
}
|
|
11594
11593
|
else if (column) {
|
|
11595
|
-
return { colId: getColField(column.getColDef())
|
|
11594
|
+
return { colId: colId, sort: sort, colField: getColField(column.getColDef()) };
|
|
11596
11595
|
}
|
|
11597
11596
|
}
|
|
11598
11597
|
else {
|
|
@@ -11746,6 +11745,8 @@
|
|
|
11746
11745
|
DatoFilterConditions["NOT_IN_LIST"] = "NOT_IN_LIST";
|
|
11747
11746
|
DatoFilterConditions["IS_EMPTY"] = "IS_EMPTY";
|
|
11748
11747
|
DatoFilterConditions["NOT_EMPTY"] = "NOT_EMPTY";
|
|
11748
|
+
DatoFilterConditions["IS_NULL"] = "IS_NULL";
|
|
11749
|
+
DatoFilterConditions["NOT_NULL"] = "NOT_NULL";
|
|
11749
11750
|
})(exports.DatoFilterConditions || (exports.DatoFilterConditions = {}));
|
|
11750
11751
|
var DatoGridDateFilterOptions = [
|
|
11751
11752
|
exports.DatoFilterConditions.IN_RANGE,
|
|
@@ -11829,8 +11830,10 @@
|
|
|
11829
11830
|
case exports.DatoFilterConditions.IN_RANGE:
|
|
11830
11831
|
return rowValue >= filterValue && rowValue <= parseFloat(rangeEnd);
|
|
11831
11832
|
case exports.DatoFilterConditions.IS_EMPTY:
|
|
11833
|
+
case exports.DatoFilterConditions.IS_NULL:
|
|
11832
11834
|
return isNil(rowValue);
|
|
11833
11835
|
case exports.DatoFilterConditions.NOT_EMPTY:
|
|
11836
|
+
case exports.DatoFilterConditions.NOT_NULL:
|
|
11834
11837
|
return !isNil(rowValue);
|
|
11835
11838
|
}
|
|
11836
11839
|
}
|
|
@@ -12016,7 +12019,7 @@
|
|
|
12016
12019
|
return contextActions;
|
|
12017
12020
|
}
|
|
12018
12021
|
|
|
12019
|
-
var DATO_GRID_STORAGE_API = new core.InjectionToken('
|
|
12022
|
+
var DATO_GRID_STORAGE_API = new core.InjectionToken('DATO_GRID_STORAGE_API');
|
|
12020
12023
|
|
|
12021
12024
|
var defaultEditableColumnRenderer = function (params) {
|
|
12022
12025
|
return params && params.value ? "<div class=\"value-wrapper ellipsis\">" + params.value + "</div>" : null;
|
|
@@ -12831,10 +12834,11 @@
|
|
|
12831
12834
|
var _a;
|
|
12832
12835
|
var _this = this;
|
|
12833
12836
|
var _b = this.popover.data, gridService = _b.gridService, gridQuery = _b.gridQuery;
|
|
12834
|
-
var _c = this.colDef, filter = _c.filter,
|
|
12837
|
+
var _c = this.colDef, filter = _c.filter, pivotValueColumn = _c.pivotValueColumn, pivotKeys = _c.pivotKeys;
|
|
12835
12838
|
var colDefs = gridQuery.api.columns.getAllColumns().map(function (column) { return column.getColDef(); });
|
|
12836
12839
|
this.colField = getColField(this.colDef);
|
|
12837
12840
|
var colDef = colDefs.find(function (colDef) { return colDef.field === _this.colField; });
|
|
12841
|
+
var filtersConfig = colDef.filtersConfig || this.colDef.filtersConfig || {};
|
|
12838
12842
|
var colFilter = filter || colDef.filter;
|
|
12839
12843
|
var filterOptions = DatoGridFilterOptionsMap[colFilter];
|
|
12840
12844
|
this.pivotColumn = gridQuery.api.columns.getSecondaryPivotColumn(pivotKeys, pivotValueColumn);
|
|
@@ -12856,7 +12860,11 @@
|
|
|
12856
12860
|
if (this.filterSections.Conditional) {
|
|
12857
12861
|
var filterConditions = filterOptions || DatoGridStringFilterOptions;
|
|
12858
12862
|
if (filtersConfig.showEmptyConditions) {
|
|
12859
|
-
|
|
12863
|
+
var emptyConditions = [exports.DatoFilterConditions.IS_EMPTY, exports.DatoFilterConditions.NOT_EMPTY];
|
|
12864
|
+
if (this.filterType === exports.DatoGridFilterTypes.Number) {
|
|
12865
|
+
emptyConditions = [exports.DatoFilterConditions.IS_NULL, exports.DatoFilterConditions.NOT_NULL];
|
|
12866
|
+
}
|
|
12867
|
+
filterConditions = __spread(filterConditions, emptyConditions);
|
|
12860
12868
|
}
|
|
12861
12869
|
this.conditionalFilterOptions = filterConditions.map(function (operand, id) { return ({
|
|
12862
12870
|
id: id,
|
|
@@ -13247,7 +13255,10 @@
|
|
|
13247
13255
|
valueControl.updateValueAndValidity();
|
|
13248
13256
|
};
|
|
13249
13257
|
DatoGridFilterComponent.prototype.isEmptyOperand = function (operand) {
|
|
13250
|
-
return operand === exports.DatoFilterConditions.IS_EMPTY ||
|
|
13258
|
+
return (operand === exports.DatoFilterConditions.IS_EMPTY ||
|
|
13259
|
+
operand === exports.DatoFilterConditions.NOT_EMPTY ||
|
|
13260
|
+
operand === exports.DatoFilterConditions.IS_NULL ||
|
|
13261
|
+
operand === exports.DatoFilterConditions.NOT_NULL);
|
|
13251
13262
|
};
|
|
13252
13263
|
DatoGridFilterComponent.prototype.isStringArray = function (value) {
|
|
13253
13264
|
return isString(value[0]);
|
|
@@ -14467,8 +14478,7 @@
|
|
|
14467
14478
|
this.updateSettings({ gridAlignment: gridAlignment, columnsSizes: null });
|
|
14468
14479
|
};
|
|
14469
14480
|
GridService.prototype.saveSettingsToServer = function (settings) {
|
|
14470
|
-
|
|
14471
|
-
this.storageAPI.set(this.gridName, settings, isGlobal);
|
|
14481
|
+
this.storageAPI.set(this.gridName, settings);
|
|
14472
14482
|
};
|
|
14473
14483
|
/**
|
|
14474
14484
|
* @internal used to log grid events to the platform's logging service
|
|
@@ -14875,6 +14885,13 @@
|
|
|
14875
14885
|
column: column
|
|
14876
14886
|
};
|
|
14877
14887
|
}
|
|
14888
|
+
if (condition === exports.DatoFilterConditions.IS_NULL || condition === exports.DatoFilterConditions.NOT_NULL) {
|
|
14889
|
+
return {
|
|
14890
|
+
condition: exports.DatoFilterConditions.IS_NULL,
|
|
14891
|
+
value: condition === exports.DatoFilterConditions.IS_NULL ? 'true' : 'false',
|
|
14892
|
+
column: column
|
|
14893
|
+
};
|
|
14894
|
+
}
|
|
14878
14895
|
return __assign(__assign({}, item), { column: column });
|
|
14879
14896
|
})
|
|
14880
14897
|
};
|
|
@@ -15466,10 +15483,7 @@
|
|
|
15466
15483
|
.pipe(operators.switchMap(function () {
|
|
15467
15484
|
_this.gridOptions = _this.normalizeOptions();
|
|
15468
15485
|
agGrid.gridOptions = _this.gridOptions;
|
|
15469
|
-
var
|
|
15470
|
-
var settingsLoader = _this.gridOptions.saveSettings === false
|
|
15471
|
-
? rxjs.of(null)
|
|
15472
|
-
: _this.storageAPI.get(_this.gridOptions.gridName, isGlobal);
|
|
15486
|
+
var settingsLoader = _this.gridOptions.saveSettings === false ? rxjs.of(null) : _this.storageAPI.get(_this.gridOptions.gridName);
|
|
15473
15487
|
return rxjs.combineLatest([agGrid.gridReady, settingsLoader]);
|
|
15474
15488
|
}), ngxTakeUntilDestroy.untilDestroyed(this))
|
|
15475
15489
|
.subscribe(function (_a) {
|
|
@@ -15477,6 +15491,11 @@
|
|
|
15477
15491
|
if (!_this.gridOptions.rowData) {
|
|
15478
15492
|
api.showLoadingOverlay();
|
|
15479
15493
|
}
|
|
15494
|
+
if (!_this.gridOptions.statusBar) {
|
|
15495
|
+
/** Fix ag-grid bug that doesn't add ag-hidden class to the status bar, which only get fixed in later versions */
|
|
15496
|
+
var el = agGridEl.querySelector('.ag-status-bar');
|
|
15497
|
+
addClass(el, 'ag-hidden');
|
|
15498
|
+
}
|
|
15480
15499
|
var gridApi = { grid: api, columns: columnApi };
|
|
15481
15500
|
_this.gridService._setApi(gridApi, agGrid);
|
|
15482
15501
|
_this.gridQuery._setApi(gridApi, agGrid);
|
|
@@ -16744,18 +16763,6 @@
|
|
|
16744
16763
|
this.registerGroupListeners();
|
|
16745
16764
|
this.subscribeRowsSelectionData();
|
|
16746
16765
|
};
|
|
16747
|
-
DatoGridV2ToolbarComponent.prototype.getCellValueChangeEvent = function () {
|
|
16748
|
-
var _this = this;
|
|
16749
|
-
return this.gridController.gridQuery.waitForGrid(function () {
|
|
16750
|
-
return _this.gridQuery.gridRef.cellValueChanged.pipe(operators.debounceTime(100), ngxTakeUntilDestroy.untilDestroyed(_this));
|
|
16751
|
-
});
|
|
16752
|
-
};
|
|
16753
|
-
DatoGridV2ToolbarComponent.prototype.getRowDataUpdatedEvent = function () {
|
|
16754
|
-
var _this = this;
|
|
16755
|
-
return this.gridController.gridQuery.waitForGrid(function () {
|
|
16756
|
-
return _this.gridQuery.gridRef.rowDataUpdated.pipe(operators.debounceTime(100), ngxTakeUntilDestroy.untilDestroyed(_this));
|
|
16757
|
-
});
|
|
16758
|
-
};
|
|
16759
16766
|
DatoGridV2ToolbarComponent.prototype.onActionClick = function (action) {
|
|
16760
16767
|
if (isFunction(action.onClick)) {
|
|
16761
16768
|
var selectedRowsCount = this.gridController.gridQuery.getSelectedRowsCount();
|
|
@@ -21231,40 +21238,6 @@
|
|
|
21231
21238
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
21232
21239
|
*/
|
|
21233
21240
|
|
|
21234
|
-
var RichTextService = /** @class */ (function () {
|
|
21235
|
-
function RichTextService(http, config) {
|
|
21236
|
-
this.http = http;
|
|
21237
|
-
this.config = config;
|
|
21238
|
-
}
|
|
21239
|
-
RichTextService.prototype.getLib = function (appendScriptFunc, appendStyleFunc) {
|
|
21240
|
-
if (!this.richTextScript$) {
|
|
21241
|
-
this.initLib(appendScriptFunc, appendStyleFunc);
|
|
21242
|
-
}
|
|
21243
|
-
return this.richTextScript$;
|
|
21244
|
-
};
|
|
21245
|
-
RichTextService.prototype.initLib = function (appendScriptFunc, appendStyleFunc) {
|
|
21246
|
-
this.richTextScript$ = rxjs.combineLatest([
|
|
21247
|
-
this.http
|
|
21248
|
-
.get(this.config.paths.richText + "/index.js", { responseType: 'text' })
|
|
21249
|
-
.pipe(operators.tap(function (lib) { return appendScriptFunc(lib, 'rich-text-editor'); })),
|
|
21250
|
-
this.http
|
|
21251
|
-
.get(this.config.paths.richText + "/plugins/autocomplete/plugin.css", { responseType: 'text' })
|
|
21252
|
-
.pipe(operators.tap(function (style) { return appendStyleFunc(style, 'tinymce-autocomplete'); }))
|
|
21253
|
-
]).pipe(operators.shareReplay(1));
|
|
21254
|
-
};
|
|
21255
|
-
RichTextService.ctorParameters = function () { return [
|
|
21256
|
-
{ type: http.HttpClient },
|
|
21257
|
-
{ type: undefined, decorators: [{ type: core.Inject, args: [DATO_CORE_CONFIG,] }] }
|
|
21258
|
-
]; };
|
|
21259
|
-
RichTextService.ɵprov = core.ɵɵdefineInjectable({ factory: function RichTextService_Factory() { return new RichTextService(core.ɵɵinject(http.HttpClient), core.ɵɵinject(DATO_CORE_CONFIG)); }, token: RichTextService, providedIn: "root" });
|
|
21260
|
-
RichTextService = __decorate([
|
|
21261
|
-
core.Injectable({ providedIn: 'root' }),
|
|
21262
|
-
__param(1, core.Inject(DATO_CORE_CONFIG)),
|
|
21263
|
-
__metadata("design:paramtypes", [http.HttpClient, Object])
|
|
21264
|
-
], RichTextService);
|
|
21265
|
-
return RichTextService;
|
|
21266
|
-
}());
|
|
21267
|
-
|
|
21268
21241
|
/**
|
|
21269
21242
|
* @license
|
|
21270
21243
|
* Copyright Datorama. All Rights Reserved.
|
|
@@ -21278,12 +21251,12 @@
|
|
|
21278
21251
|
var ɵ0$3 = getTinymce;
|
|
21279
21252
|
var DatoRichTextDirective = /** @class */ (function (_super) {
|
|
21280
21253
|
__extends(DatoRichTextDirective, _super);
|
|
21281
|
-
function DatoRichTextDirective(ngZone,
|
|
21254
|
+
function DatoRichTextDirective(ngZone, http, host, config) {
|
|
21282
21255
|
var _this = _super.call(this) || this;
|
|
21283
21256
|
_this.ngZone = ngZone;
|
|
21284
|
-
_this.
|
|
21285
|
-
_this.config = config;
|
|
21257
|
+
_this.http = http;
|
|
21286
21258
|
_this.host = host;
|
|
21259
|
+
_this.config = config;
|
|
21287
21260
|
_this.autocompleteOptions = {};
|
|
21288
21261
|
_this.forcePlainTextPasting = false;
|
|
21289
21262
|
_this.format = 'html';
|
|
@@ -21317,11 +21290,28 @@
|
|
|
21317
21290
|
base: this.config.paths.richText,
|
|
21318
21291
|
query: ''
|
|
21319
21292
|
};
|
|
21320
|
-
|
|
21321
|
-
|
|
21322
|
-
|
|
21323
|
-
|
|
21324
|
-
|
|
21293
|
+
/**
|
|
21294
|
+
* We support only one instance in load time
|
|
21295
|
+
*/
|
|
21296
|
+
if (window.tinymce) {
|
|
21297
|
+
this.init.call(this);
|
|
21298
|
+
}
|
|
21299
|
+
else {
|
|
21300
|
+
this.loadLib().subscribe(function (lib) {
|
|
21301
|
+
appendScript(lib, 'rich-text-editor');
|
|
21302
|
+
_this.init.call(_this);
|
|
21303
|
+
_this.loadAutoCompleteStyle();
|
|
21304
|
+
});
|
|
21305
|
+
}
|
|
21306
|
+
};
|
|
21307
|
+
DatoRichTextDirective.prototype.loadLib = function () {
|
|
21308
|
+
return this.http.get(this.config.paths.richText + "/index.js", { responseType: 'text' });
|
|
21309
|
+
};
|
|
21310
|
+
DatoRichTextDirective.prototype.loadAutoCompleteStyle = function () {
|
|
21311
|
+
this.http
|
|
21312
|
+
.get(this.config.paths.richText + "/plugins/autocomplete/plugin.css", { responseType: 'text' })
|
|
21313
|
+
.subscribe(function (style) {
|
|
21314
|
+
appendStyle(style, 'tinymce-autocomplete');
|
|
21325
21315
|
});
|
|
21326
21316
|
};
|
|
21327
21317
|
DatoRichTextDirective.prototype.initEditor = function (_, editor) {
|
|
@@ -21414,9 +21404,9 @@
|
|
|
21414
21404
|
var DatoRichTextDirective_1;
|
|
21415
21405
|
DatoRichTextDirective.ctorParameters = function () { return [
|
|
21416
21406
|
{ type: core.NgZone },
|
|
21417
|
-
{ type:
|
|
21418
|
-
{ type:
|
|
21419
|
-
{ type: core.
|
|
21407
|
+
{ type: http.HttpClient },
|
|
21408
|
+
{ type: core.ElementRef },
|
|
21409
|
+
{ type: undefined, decorators: [{ type: core.Inject, args: [DATO_CORE_CONFIG,] }] }
|
|
21420
21410
|
]; };
|
|
21421
21411
|
__decorate([
|
|
21422
21412
|
core.Input(),
|
|
@@ -21482,9 +21472,10 @@
|
|
|
21482
21472
|
}
|
|
21483
21473
|
]
|
|
21484
21474
|
}),
|
|
21485
|
-
__param(
|
|
21475
|
+
__param(3, core.Inject(DATO_CORE_CONFIG)),
|
|
21486
21476
|
__metadata("design:paramtypes", [core.NgZone,
|
|
21487
|
-
|
|
21477
|
+
http.HttpClient,
|
|
21478
|
+
core.ElementRef, Object])
|
|
21488
21479
|
], DatoRichTextDirective);
|
|
21489
21480
|
return DatoRichTextDirective;
|
|
21490
21481
|
}(BaseCustomControl));
|
|
@@ -24007,9 +23998,7 @@
|
|
|
24007
23998
|
};
|
|
24008
23999
|
DatoBreadcrumbsComponent.prototype.initEditableHeader = function () {
|
|
24009
24000
|
var _this = this;
|
|
24010
|
-
this.headerControl.valueChanges
|
|
24011
|
-
.pipe(operators.debounceTime(300), ngxTakeUntilDestroy.untilDestroyed(this))
|
|
24012
|
-
.subscribe(function (res) {
|
|
24001
|
+
this.headerControl.valueChanges.pipe(operators.debounceTime(300), ngxTakeUntilDestroy.untilDestroyed(this)).subscribe(function (res) {
|
|
24013
24002
|
_this.updateEditableText.emit(res);
|
|
24014
24003
|
_this.cdr.detectChanges();
|
|
24015
24004
|
});
|
|
@@ -25372,7 +25361,7 @@
|
|
|
25372
25361
|
};
|
|
25373
25362
|
}
|
|
25374
25363
|
|
|
25375
|
-
window.coreVersion = '22.
|
|
25364
|
+
window.coreVersion = '22.0.6';
|
|
25376
25365
|
|
|
25377
25366
|
exports.APP_TRANSLATE = APP_TRANSLATE;
|
|
25378
25367
|
exports.AceService = AceService;
|
|
@@ -25814,7 +25803,6 @@
|
|
|
25814
25803
|
exports.ɵl = DatoGridItemsCountCellComponent;
|
|
25815
25804
|
exports.ɵm = DatoGridV2ToolbarMoreMenuComponent;
|
|
25816
25805
|
exports.ɵn = DatoGridSearchBarComponent;
|
|
25817
|
-
exports.ɵo = RichTextService;
|
|
25818
25806
|
|
|
25819
25807
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
25820
25808
|
|