@datorama/core 21.4.0-rc.8 → 22.0.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.
Files changed (55) hide show
  1. package/bundle.scss +2 -2
  2. package/bundles/datorama-core.umd.js +155 -141
  3. package/bundles/datorama-core.umd.js.map +1 -1
  4. package/bundles/datorama-core.umd.min.js +15 -15
  5. package/bundles/datorama-core.umd.min.js.map +1 -1
  6. package/datorama-core.d.ts +0 -1
  7. package/datorama-core.metadata.json +1 -1
  8. package/esm2015/datorama-core.js +1 -2
  9. package/esm2015/lib/breadcrumbs/breadcrumbs.component.js +2 -4
  10. package/esm2015/lib/grid-v2/grid/grid-v2.types.js +1 -1
  11. package/esm2015/lib/grid-v2/grid-controller/grid-controller.component.js +5 -5
  12. package/esm2015/lib/grid-v2/grid-filter/filter-validator.js +9 -9
  13. package/esm2015/lib/grid-v2/grid-filter/grid-filter.component.js +28 -16
  14. package/esm2015/lib/grid-v2/grid-filter/grid-filter.types.js +1 -1
  15. package/esm2015/lib/grid-v2/grid-pagination/grid-pagination.component.js +5 -3
  16. package/esm2015/lib/grid-v2/grid-settings.js +2 -2
  17. package/esm2015/lib/grid-v2/grid-store/grid.query.js +12 -9
  18. package/esm2015/lib/grid-v2/grid-store/grid.service.js +29 -17
  19. package/esm2015/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +1 -7
  20. package/esm2015/lib/rich-text/rich-text.directive.js +33 -15
  21. package/esm2015/lib/select/select.component.js +10 -5
  22. package/esm2015/lib/version.js +2 -2
  23. package/esm5/datorama-core.js +1 -2
  24. package/esm5/lib/breadcrumbs/breadcrumbs.component.js +2 -4
  25. package/esm5/lib/grid-v2/grid/grid-v2.types.js +1 -1
  26. package/esm5/lib/grid-v2/grid-controller/grid-controller.component.js +5 -5
  27. package/esm5/lib/grid-v2/grid-filter/filter-validator.js +12 -9
  28. package/esm5/lib/grid-v2/grid-filter/grid-filter.component.js +28 -16
  29. package/esm5/lib/grid-v2/grid-filter/grid-filter.types.js +1 -1
  30. package/esm5/lib/grid-v2/grid-pagination/grid-pagination.component.js +6 -3
  31. package/esm5/lib/grid-v2/grid-settings.js +2 -2
  32. package/esm5/lib/grid-v2/grid-store/grid.query.js +16 -13
  33. package/esm5/lib/grid-v2/grid-store/grid.service.js +51 -32
  34. package/esm5/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +1 -13
  35. package/esm5/lib/rich-text/rich-text.directive.js +34 -16
  36. package/esm5/lib/select/select.component.js +10 -5
  37. package/esm5/lib/version.js +2 -2
  38. package/fesm2015/datorama-core.js +125 -114
  39. package/fesm2015/datorama-core.js.map +1 -1
  40. package/fesm5/datorama-core.js +156 -141
  41. package/fesm5/datorama-core.js.map +1 -1
  42. package/i18n/locale-en_US.json +2 -1
  43. package/lib/grid-v2/grid/grid-v2.types.d.ts +0 -1
  44. package/lib/grid-v2/grid-controller/grid-controller.component.d.ts +3 -2
  45. package/lib/grid-v2/grid-filter/filter-validator.d.ts +4 -3
  46. package/lib/grid-v2/grid-filter/grid-filter.types.d.ts +4 -3
  47. package/lib/grid-v2/grid-settings.d.ts +2 -2
  48. package/lib/grid-v2/grid-store/grid.query.d.ts +3 -2
  49. package/lib/grid-v2/grid-store/grid.service.d.ts +4 -3
  50. package/lib/grid-v2/grid-toolbar/grid-toolbar.component.d.ts +0 -2
  51. package/lib/rich-text/rich-text.directive.d.ts +6 -4
  52. package/package.json +1 -1
  53. package/esm2015/lib/rich-text/rich-text.service.js +0 -50
  54. package/esm5/lib/rich-text/rich-text.service.js +0 -51
  55. package/lib/rich-text/rich-text.service.d.ts +0 -10
@@ -8430,8 +8430,9 @@ var DatoSelectComponent = /** @class */ (function (_super) {
8430
8430
  DatoSelectComponent.prototype.writeValue = function (activeOptions) {
8431
8431
  this._model = activeOptions ? coerceArray$1(activeOptions) : [];
8432
8432
  if (this.options) {
8433
+ var overTheLimit = this.limitSelectedTo && this.isMulti && this._model.length >= this.limitSelectedTo;
8433
8434
  this.markAsActive(this._model, { deselectAll: true });
8434
- this.limitSelectedTo && this.updateDisabledState();
8435
+ overTheLimit && this.updateDisabledState();
8435
8436
  }
8436
8437
  /** For later updates */
8437
8438
  this.cdr.markForCheck();
@@ -8468,7 +8469,7 @@ var DatoSelectComponent = /** @class */ (function (_super) {
8468
8469
  */
8469
8470
  if (this.hasValue && this._initialOpen) {
8470
8471
  this.markAsActive(this._model);
8471
- if (this.limitSelectedTo) {
8472
+ if (this.limitSelectedTo && this._model.length === this.limitSelectedTo) {
8472
8473
  this.updateDisabledState();
8473
8474
  }
8474
8475
  this._initialOpen = false;
@@ -8557,6 +8558,7 @@ var DatoSelectComponent = /** @class */ (function (_super) {
8557
8558
  };
8558
8559
  DatoSelectComponent.prototype.removeOption = function (option) {
8559
8560
  var _this = this;
8561
+ var updateDisabled = this.limitSelectedTo && this._model.length === this.limitSelectedTo;
8560
8562
  this._model = this._model.filter(function (current) { return current[_this.idKey] !== option[_this.idKey]; });
8561
8563
  var optionToRemove = this.options.find(function (datoOption) { return datoOption.option && datoOption.option[_this.idKey] === option[_this.idKey]; });
8562
8564
  /**
@@ -8566,7 +8568,7 @@ var DatoSelectComponent = /** @class */ (function (_super) {
8566
8568
  if (optionToRemove) {
8567
8569
  optionToRemove.active = false;
8568
8570
  }
8569
- this.limitSelectedTo && this.updateDisabledState();
8571
+ updateDisabled && this.updateDisabledState();
8570
8572
  this.onChange(this._model);
8571
8573
  this.cdr.markForCheck();
8572
8574
  if (this.datoOverlay.attached) {
@@ -8916,6 +8918,9 @@ var DatoSelectComponent = /** @class */ (function (_super) {
8916
8918
  if (!datoOption) {
8917
8919
  return;
8918
8920
  }
8921
+ var modelLength = this._model.length;
8922
+ var updateDisabled = this.limitSelectedTo &&
8923
+ (modelLength === this.limitSelectedTo || (modelLength === this.limitSelectedTo - 1 && !datoOption.active));
8919
8924
  datoOption.active = !datoOption.active;
8920
8925
  var rawOption = datoOption.option;
8921
8926
  if (datoOption.active) {
@@ -8924,7 +8929,7 @@ var DatoSelectComponent = /** @class */ (function (_super) {
8924
8929
  else {
8925
8930
  this._model = this._model.filter(function (current) { return current[_this.idKey] !== rawOption[_this.idKey]; });
8926
8931
  }
8927
- this.limitSelectedTo && this.updateDisabledState();
8932
+ updateDisabled && this.updateDisabledState();
8928
8933
  this.onChange(this._model);
8929
8934
  this.cdr.markForCheck();
8930
8935
  this.datoOverlay.scheduleUpdate();
@@ -11377,15 +11382,14 @@ var GridQuery = /** @class */ (function (_super) {
11377
11382
  };
11378
11383
  GridQuery.prototype.getSort = function () {
11379
11384
  if (this.gridRef.gridOptions.pivotMode) {
11380
- var _a = this.api.grid.getSortModel().pop() || {}, sort = _a.sort, colId_1 = _a.colId;
11381
- var column = this.api.columns.getColumn(colId_1);
11382
- var secondaryColumns = this.api.columns.getSecondaryColumns();
11383
- var pivotedColumn_1 = secondaryColumns && secondaryColumns.find(function (col) { return col.getColId() === colId_1; });
11384
- if (pivotedColumn_1) {
11385
- var uniquePivotParents = uniq(secondaryColumns.map(function (column) { return column.getParent(); }));
11386
- var secondaryColumn = secondaryColumns.find(function (col) { return col.getColId() === pivotedColumn_1.getColId(); });
11385
+ var _a = this.api.grid.getSortModel().pop() || {}, sort = _a.sort, colId = _a.colId;
11386
+ var column = this.api.columns.getColumn(colId);
11387
+ var pivotedColumn = this.getSecondaryColumn(colId);
11388
+ if (pivotedColumn) {
11389
+ var uniquePivotParents = uniq(this.api.columns.getSecondaryColumns().map(function (column) { return column.getParent(); }));
11390
+ var secondaryColumn = this.getSecondaryColumn(pivotedColumn.getColId());
11387
11391
  var pivotColIndex = uniquePivotParents.indexOf(secondaryColumn.getParent());
11388
- return { colId: getColField(pivotedColumn_1.getColDef()), sort: sort, pivotColIndex: pivotColIndex };
11392
+ return { colId: getColField(pivotedColumn.getColDef()), sort: sort, pivotColIndex: pivotColIndex };
11389
11393
  }
11390
11394
  else if (column) {
11391
11395
  return { colId: getColField(column.getColDef()), sort: sort };
@@ -11419,10 +11423,10 @@ var GridQuery = /** @class */ (function (_super) {
11419
11423
  };
11420
11424
  GridQuery.prototype.filterChanged = function () {
11421
11425
  return this.selectFilter().pipe(map$1(function (filter) {
11422
- return Object.keys(filter).reduce(function (filters, key) {
11423
- if (filter[key]) {
11424
- var _a = filter[key], conditional = _a.conditional, pivotFieldsMap = _a.pivotFieldsMap;
11425
- filters.push({ column: key, filter: conditional, pivotFieldsMap: pivotFieldsMap });
11426
+ return Object.keys(filter).reduce(function (filters, field) {
11427
+ var datoFilter = filter[field];
11428
+ if (datoFilter) {
11429
+ filters.push({ field: field, filter: datoFilter });
11426
11430
  }
11427
11431
  return filters;
11428
11432
  }, []);
@@ -11488,6 +11492,10 @@ var GridQuery = /** @class */ (function (_super) {
11488
11492
  GridQuery.prototype.selectIsSelectAllRowsEnabled = function () {
11489
11493
  return this.select(function (state) { return state.serverSidePagination.selectAllRowsEnabled; });
11490
11494
  };
11495
+ GridQuery.prototype.getSecondaryColumn = function (colId) {
11496
+ var secondaryColumns = this.api.columns.getSecondaryColumns();
11497
+ return secondaryColumns && secondaryColumns.find(function (col) { return col.getColId() === colId; });
11498
+ };
11491
11499
  GridQuery.prototype.filterCheckboxSelectionColumn = function (columns) {
11492
11500
  return columns.filter(function (column) { return !column.getUserProvidedColDef() || !column.getUserProvidedColDef().checkboxSelection; });
11493
11501
  };
@@ -11600,9 +11608,10 @@ function validateStringCondition(rowValue, _a) {
11600
11608
  return !isEmpty(valueLowerCase);
11601
11609
  }
11602
11610
  }
11603
- function validateNumberCondition(unparsedRowValue, _a) {
11611
+ function validateNumberCondition(unparsedRowValue, _a, filterKey) {
11604
11612
  var condition = _a.condition, value = _a.value, rangeEnd = _a.rangeEnd;
11605
- var rowValue = !!unparsedRowValue ? parseFloat(unparsedRowValue) : null;
11613
+ if (filterKey === void 0) { filterKey = ''; }
11614
+ var rowValue = !!unparsedRowValue ? parseFloat(unparsedRowValue[filterKey] || unparsedRowValue) : null;
11606
11615
  var filterValue = parseFloat(value);
11607
11616
  switch (condition) {
11608
11617
  case DatoFilterConditions.EQUALS:
@@ -11650,14 +11659,14 @@ function validateDateCondition(rowValue, _a) {
11650
11659
  }
11651
11660
  }
11652
11661
  function validateCondition(_a) {
11653
- var rowValue = _a.rowValue, filter = _a.filter, type = _a.type;
11662
+ var rowValue = _a.rowValue, condition = _a.condition, type = _a.type, filterKey = _a.filterKey;
11654
11663
  switch (type) {
11655
11664
  case DatoGridFilterTypes.Date:
11656
- return validateDateCondition(rowValue, filter);
11665
+ return validateDateCondition(rowValue, condition);
11657
11666
  case DatoGridFilterTypes.Number:
11658
- return validateNumberCondition(rowValue, filter);
11667
+ return validateNumberCondition(rowValue, condition, filterKey);
11659
11668
  default:
11660
- return validateStringCondition(rowValue, filter);
11669
+ return validateStringCondition(rowValue, condition);
11661
11670
  }
11662
11671
  }
11663
11672
  function validateFilter(_a, activeFilters) {
@@ -11668,7 +11677,7 @@ function validateFilter(_a, activeFilters) {
11668
11677
  var _loop_1 = function (filter) {
11669
11678
  var filterPasses = true;
11670
11679
  var _a = activeFilters[filter], byValue = _a.byValue, conditional = _a.conditional, pivotKeys = _a.pivotKeys;
11671
- var currentRowPivotKeys = row.parent.childrenMapped && getRowPivotKeys(row.parent.childrenMapped);
11680
+ var currentRowPivotKeys = (row.parent && row.parent.childrenMapped && getRowPivotKeys(row.parent.childrenMapped)) || [];
11672
11681
  var rowValue = api.getValue(filter, row);
11673
11682
  /** If value is under a pivoted column but doesn't match the filter pivot */
11674
11683
  if (pivotKeys && pivotKeys.length > 0 && !isArrayValuesEqual(pivotKeys, currentRowPivotKeys)) {
@@ -11677,7 +11686,9 @@ function validateFilter(_a, activeFilters) {
11677
11686
  if (conditional) {
11678
11687
  var operator = conditional.operator, conditions = conditional.conditions, type_1 = conditional.type;
11679
11688
  var conditionsRelation = operator === OperatorTypes.AND ? 'every' : 'some';
11680
- filterPasses = conditions[conditionsRelation](function (filter) { return validateCondition({ rowValue: rowValue, filter: filter, type: type_1 }); });
11689
+ filterPasses = conditions[conditionsRelation](function (condition) {
11690
+ return validateCondition({ rowValue: rowValue, condition: condition, type: type_1, filterKey: filter });
11691
+ });
11681
11692
  }
11682
11693
  if (filterPasses && byValue) {
11683
11694
  var includesValue = byValue.values.includes(rowValue);
@@ -11805,7 +11816,7 @@ function toolbarActionToContextAction(params) {
11805
11816
  return contextActions;
11806
11817
  }
11807
11818
 
11808
- var DATO_GRID_STORAGE_API = new InjectionToken('DATO_GRID_STORAGE_AP');
11819
+ var DATO_GRID_STORAGE_API = new InjectionToken('DATO_GRID_STORAGE_API');
11809
11820
 
11810
11821
  var defaultEditableColumnRenderer = function (params) {
11811
11822
  return params && params.value ? "<div class=\"value-wrapper ellipsis\">" + params.value + "</div>" : null;
@@ -12477,12 +12488,12 @@ var mapToValue = function (_a) {
12477
12488
  var ɵ0$1 = mapToValue;
12478
12489
  var mapToListItem = function (val) { return ({ id: val, label: isNil(val) ? "(Empty)" : ("" + val).trim(), value: val }); };
12479
12490
  var ɵ1$1 = mapToListItem;
12480
- var mapToListItemWithFormatted = function (_a) {
12491
+ var mapToListItemWithFormatted = function (_a, key) {
12481
12492
  var value = _a.value, formattedValue = _a.formattedValue;
12482
12493
  return ({
12483
- id: value,
12484
- label: isNil(formattedValue) ? "(Empty)" : ("" + formattedValue).trim(),
12485
- value: value
12494
+ id: key && value ? value[key] : value,
12495
+ label: isNil(formattedValue) ? "(Empty)" : ("" + (key ? formattedValue[key] : formattedValue)).trim(),
12496
+ value: key && value ? value[key] : value
12486
12497
  });
12487
12498
  };
12488
12499
  var ɵ2$1 = mapToListItemWithFormatted;
@@ -12621,15 +12632,18 @@ var DatoGridFilterComponent = /** @class */ (function () {
12621
12632
  var _this = this;
12622
12633
  var _b = this.popover.data, gridService = _b.gridService, gridQuery = _b.gridQuery;
12623
12634
  var _c = this.colDef, filter = _c.filter, _d = _c.filtersConfig, filtersConfig = _d === void 0 ? {} : _d, pivotValueColumn = _c.pivotValueColumn, pivotKeys = _c.pivotKeys;
12635
+ var colDefs = gridQuery.api.columns.getAllColumns().map(function (column) { return column.getColDef(); });
12624
12636
  this.colField = getColField(this.colDef);
12637
+ var colDef = colDefs.find(function (colDef) { return colDef.field === _this.colField; });
12638
+ var colFilter = filter || colDef.filter;
12639
+ var filterOptions = DatoGridFilterOptionsMap[colFilter];
12625
12640
  this.pivotColumn = gridQuery.api.columns.getSecondaryPivotColumn(pivotKeys, pivotValueColumn);
12626
12641
  if (filtersConfig.sections) {
12627
12642
  this.filterSections = (_a = {}, _a[filtersConfig.sections] = true, _a);
12628
12643
  }
12629
12644
  this.keepPredefinedListOriginalOrder =
12630
12645
  filtersConfig.keepPredefinedListOriginalOrder && !isEmpty(filtersConfig.predefinedListValues);
12631
- var filterOptions = DatoGridFilterOptionsMap[filter];
12632
- this.filterType = filterOptions ? filter : DatoGridFilterTypes.String;
12646
+ this.filterType = filterOptions ? colFilter : DatoGridFilterTypes.String;
12633
12647
  this.listLabelType = this.filterType.toLowerCase();
12634
12648
  this.listSortByKey = this.filterType === DatoGridFilterTypes.Number && this.colDef.valueFormatter ? 'id' : 'label';
12635
12649
  this.gridQuery = gridQuery;
@@ -12664,9 +12678,11 @@ var DatoGridFilterComponent = /** @class */ (function () {
12664
12678
  var columnValues = this.getColumnValues();
12665
12679
  this.columnValues = columnValues.map(function (_a) {
12666
12680
  var value = _a.value;
12667
- return value;
12681
+ return !isNil(_this.pivotColumn) && value ? value[_this.colField] : value;
12682
+ });
12683
+ this.listOptions = columnValues.map(function (colValue) {
12684
+ return mapToListItemWithFormatted(colValue, !isNil(_this.pivotColumn) && _this.colField);
12668
12685
  });
12669
- this.listOptions = columnValues.map(mapToListItemWithFormatted);
12670
12686
  }
12671
12687
  }
12672
12688
  else {
@@ -12704,6 +12720,7 @@ var DatoGridFilterComponent = /** @class */ (function () {
12704
12720
  isEmpty(filter)
12705
12721
  ? this.gridService.clearColumnFilter(this.colField)
12706
12722
  : this.gridService.setColumnFilter(column, filter);
12723
+ this.gridService.notifyFilterUpdate();
12707
12724
  }
12708
12725
  };
12709
12726
  DatoGridFilterComponent.prototype.clearFilters = function () {
@@ -12757,19 +12774,25 @@ var DatoGridFilterComponent = /** @class */ (function () {
12757
12774
  var _this = this;
12758
12775
  var _a = this.filterForm.value, byValue = _a.byValue, conditional = _a.conditional;
12759
12776
  var filter = {};
12760
- filter.pivotKeys = this.pivotKeys;
12761
- if (this.pivotColumn) {
12762
- filter.pivotFieldsMap = this.getPivotFields(this.pivotColumn.getParent()).reduce(function (fieldMap, field, index) {
12763
- fieldMap[field] = _this.pivotKeys[index];
12764
- return fieldMap;
12765
- }, {});
12766
- }
12767
12777
  if (this.filterSections.Conditional) {
12768
12778
  this.setConditionalFilter(filter, conditional);
12769
12779
  }
12770
12780
  if (this.filterSections.By_Value) {
12771
12781
  this.setByValueFilter(filter, byValue);
12772
12782
  }
12783
+ /** If filters applied, add the extra properties to be used by pivot mode */
12784
+ if (filter.byValue || filter.conditional) {
12785
+ filter.colId = this.colDef.colId;
12786
+ filter.pivotKeys = this.pivotKeys;
12787
+ if (this.pivotColumn) {
12788
+ filter.pivotFieldsMap = this.getPivotFields(this.pivotColumn.getParent()).reduce(function (fieldMap, field, index) {
12789
+ if (_this.pivotKeys[index]) {
12790
+ fieldMap[field] = _this.pivotKeys[index];
12791
+ }
12792
+ return fieldMap;
12793
+ }, {});
12794
+ }
12795
+ }
12773
12796
  return filter;
12774
12797
  };
12775
12798
  DatoGridFilterComponent.prototype.initForm = function () {
@@ -14151,12 +14174,45 @@ var GridService = /** @class */ (function () {
14151
14174
  });
14152
14175
  this.notifyFilterUpdate();
14153
14176
  };
14154
- GridService.prototype.setColumnFilter = function (column, filter) {
14177
+ GridService.prototype.setColumnFilter = function (column, filter, notifyGrid) {
14178
+ if (notifyGrid === void 0) { notifyGrid = true; }
14155
14179
  this._logEvent("Grids - Filter Applied" /* GRID_FILTER_APPLIED */, {
14156
14180
  column: column.getColId(),
14157
14181
  numOfConditions: (filter.conditional && filter.conditional.conditions.length) || 0,
14158
14182
  byValue: !!filter.byValue ? 'Yes' : 'No'
14159
14183
  });
14184
+ this.updateFilter(column, filter);
14185
+ if (notifyGrid) {
14186
+ this.notifyFilterUpdate();
14187
+ }
14188
+ };
14189
+ GridService.prototype.setGridFilters = function (filters) {
14190
+ var e_2, _a;
14191
+ if (this.api) {
14192
+ try {
14193
+ for (var filters_1 = __values(filters), filters_1_1 = filters_1.next(); !filters_1_1.done; filters_1_1 = filters_1.next()) {
14194
+ var filter = filters_1_1.value.filter;
14195
+ var column = this.api.columns.getColumn(filter.colId);
14196
+ if (column) {
14197
+ this.setColumnFilter(column, filter);
14198
+ }
14199
+ else {
14200
+ var pivotColumn = this.gridQuery.getSecondaryColumn(filter.colId);
14201
+ this.setColumnFilter(pivotColumn, filter);
14202
+ }
14203
+ }
14204
+ }
14205
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
14206
+ finally {
14207
+ try {
14208
+ if (filters_1_1 && !filters_1_1.done && (_a = filters_1.return)) _a.call(filters_1);
14209
+ }
14210
+ finally { if (e_2) throw e_2.error; }
14211
+ }
14212
+ this.notifyFilterUpdate();
14213
+ }
14214
+ };
14215
+ GridService.prototype.updateFilter = function (column, filter) {
14160
14216
  var colField = getColField(column.getColDef());
14161
14217
  this.store.update(function (state) {
14162
14218
  var _a;
@@ -14164,7 +14220,6 @@ var GridService = /** @class */ (function () {
14164
14220
  settings: __assign(__assign({}, state.settings), { filter: __assign(__assign({}, state.settings.filter), (_a = {}, _a[colField] = filter, _a)) })
14165
14221
  };
14166
14222
  });
14167
- this.notifyFilterUpdate();
14168
14223
  };
14169
14224
  GridService.prototype.setSearchTerm = function (searchTerm) {
14170
14225
  this.store.update(function (state) {
@@ -14212,8 +14267,7 @@ var GridService = /** @class */ (function () {
14212
14267
  this.updateSettings({ gridAlignment: gridAlignment, columnsSizes: null });
14213
14268
  };
14214
14269
  GridService.prototype.saveSettingsToServer = function (settings) {
14215
- var isGlobal = this.gridQuery.getGridOptions().isGlobalSettings;
14216
- this.storageAPI.set(this.gridName, settings, isGlobal);
14270
+ this.storageAPI.set(this.gridName, settings);
14217
14271
  };
14218
14272
  /**
14219
14273
  * @internal used to log grid events to the platform's logging service
@@ -14457,7 +14511,7 @@ var GridService = /** @class */ (function () {
14457
14511
  this.api.grid.onFilterChanged();
14458
14512
  };
14459
14513
  GridService.prototype.buildServerRequestFilters = function (filter) {
14460
- var e_2, _a;
14514
+ var e_3, _a;
14461
14515
  var columnsFilters = {};
14462
14516
  try {
14463
14517
  for (var _b = __values(Object.entries(filter)), _c = _b.next(); !_c.done; _c = _b.next()) {
@@ -14493,12 +14547,12 @@ var GridService = /** @class */ (function () {
14493
14547
  }
14494
14548
  }
14495
14549
  }
14496
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
14550
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
14497
14551
  finally {
14498
14552
  try {
14499
14553
  if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
14500
14554
  }
14501
- finally { if (e_2) throw e_2.error; }
14555
+ finally { if (e_3) throw e_3.error; }
14502
14556
  }
14503
14557
  return columnsFilters;
14504
14558
  };
@@ -14551,7 +14605,7 @@ var GridService = /** @class */ (function () {
14551
14605
  return { operator: OperatorTypes.AND, filters: [columnFilter, searchFilter] };
14552
14606
  };
14553
14607
  GridService.prototype.buildServerColumnFilters_v2_1 = function (filter) {
14554
- var e_3, _a;
14608
+ var e_4, _a;
14555
14609
  var columnFilters = [];
14556
14610
  try {
14557
14611
  for (var _b = __values(Object.entries(filter)), _c = _b.next(); !_c.done; _c = _b.next()) {
@@ -14576,12 +14630,12 @@ var GridService = /** @class */ (function () {
14576
14630
  columnFilters.push(columnFilter);
14577
14631
  }
14578
14632
  }
14579
- catch (e_3_1) { e_3 = { error: e_3_1 }; }
14633
+ catch (e_4_1) { e_4 = { error: e_4_1 }; }
14580
14634
  finally {
14581
14635
  try {
14582
14636
  if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
14583
14637
  }
14584
- finally { if (e_3) throw e_3.error; }
14638
+ finally { if (e_4) throw e_4.error; }
14585
14639
  }
14586
14640
  return columnFilters;
14587
14641
  };
@@ -14674,26 +14728,14 @@ var GridService = /** @class */ (function () {
14674
14728
  /**
14675
14729
  * When pivoting,
14676
14730
  * we add the field name to the column header class in order to access it through the auto generated pivot column.
14677
- * @private
14678
14731
  */
14679
14732
  GridService.prototype.initPivotSecondaryColsProcess = function (_a) {
14733
+ var _this = this;
14680
14734
  var gridOptions = _a.gridOptions;
14681
14735
  gridOptions.processSecondaryColDef = function (colDef) {
14682
- var api = colDef.headerComponentParams && colDef.headerComponentParams.gridQuery.api;
14683
- if (api) {
14684
- var valueColumns = colDef.headerComponentParams.gridQuery.api.columns.getValueColumns();
14685
- var originalColDef = valueColumns
14686
- .map(function (_a) {
14687
- var userProvidedColDef = _a.userProvidedColDef;
14688
- return userProvidedColDef;
14689
- })
14690
- .find(function (_a) {
14691
- var colId = _a.colId;
14692
- return colId === colDef.pivotValueColumn.getColId();
14693
- });
14694
- if (originalColDef) {
14695
- colDef.filter = originalColDef.filter;
14696
- }
14736
+ var userProvidedColDef = colDef.pivotValueColumn && colDef.pivotValueColumn.getUserProvidedColDef();
14737
+ if (userProvidedColDef) {
14738
+ colDef.filter = userProvidedColDef.filter;
14697
14739
  }
14698
14740
  if (colDef.pivotKeys) {
14699
14741
  colDef.pivotKeys = colDef.pivotKeys.map(function (key) {
@@ -14709,7 +14751,7 @@ var GridService = /** @class */ (function () {
14709
14751
  var field = parsedValue.field, value = parsedValue.value;
14710
14752
  colGroupDef.headerClass = [field];
14711
14753
  colGroupDef.headerName = value;
14712
- if (colGroupDef.children && colGroupDef.children.length > 1) {
14754
+ if (colGroupDef.children && colGroupDef.children.length > 0) {
14713
14755
  colGroupDef.headerClass.push('group-pivot-cell');
14714
14756
  }
14715
14757
  }
@@ -14719,7 +14761,7 @@ var GridService = /** @class */ (function () {
14719
14761
  var pivotTotalColumnIds = colChild && colChild.pivotTotalColumnIds;
14720
14762
  if (pivotTotalColumnIds && pivotTotalColumnIds.length > 0) {
14721
14763
  colGroupDef.headerClass = ['total-pivot-cell'];
14722
- colGroupDef.headerName = 'Total';
14764
+ colGroupDef.headerName = _this.translate.transform('core.total');
14723
14765
  }
14724
14766
  }
14725
14767
  else {
@@ -14736,7 +14778,7 @@ var GridService = /** @class */ (function () {
14736
14778
  GridService.prototype.setPivotModeRows = function (data) {
14737
14779
  var pivotColumns = this.gridQuery.getAllPivotColumns();
14738
14780
  var convertedData = data.map(function (currentValue, index) {
14739
- var e_4, _a;
14781
+ var e_5, _a;
14740
14782
  var mappedValues = __assign({}, currentValue);
14741
14783
  try {
14742
14784
  for (var pivotColumns_1 = __values(pivotColumns), pivotColumns_1_1 = pivotColumns_1.next(); !pivotColumns_1_1.done; pivotColumns_1_1 = pivotColumns_1.next()) {
@@ -14746,12 +14788,12 @@ var GridService = /** @class */ (function () {
14746
14788
  mappedValues[field] = JSON.stringify(pivotValue);
14747
14789
  }
14748
14790
  }
14749
- catch (e_4_1) { e_4 = { error: e_4_1 }; }
14791
+ catch (e_5_1) { e_5 = { error: e_5_1 }; }
14750
14792
  finally {
14751
14793
  try {
14752
14794
  if (pivotColumns_1_1 && !pivotColumns_1_1.done && (_a = pivotColumns_1.return)) _a.call(pivotColumns_1);
14753
14795
  }
14754
- finally { if (e_4) throw e_4.error; }
14796
+ finally { if (e_5) throw e_5.error; }
14755
14797
  }
14756
14798
  return mappedValues;
14757
14799
  });
@@ -15223,10 +15265,7 @@ var DatoGridControllerComponent = /** @class */ (function () {
15223
15265
  .pipe(switchMap(function () {
15224
15266
  _this.gridOptions = _this.normalizeOptions();
15225
15267
  agGrid.gridOptions = _this.gridOptions;
15226
- var isGlobal = _this.gridOptions.isGlobalSettings;
15227
- var settingsLoader = _this.gridOptions.saveSettings === false
15228
- ? of(null)
15229
- : _this.storageAPI.get(_this.gridOptions.gridName, isGlobal);
15268
+ var settingsLoader = _this.gridOptions.saveSettings === false ? of(null) : _this.storageAPI.get(_this.gridOptions.gridName);
15230
15269
  return combineLatest([agGrid.gridReady, settingsLoader]);
15231
15270
  }), untilDestroyed(this))
15232
15271
  .subscribe(function (_a) {
@@ -15270,6 +15309,9 @@ var DatoGridControllerComponent = /** @class */ (function () {
15270
15309
  DatoGridControllerComponent.prototype.setGridRows = function (data) {
15271
15310
  this.gridService.setRows(data);
15272
15311
  };
15312
+ DatoGridControllerComponent.prototype.setGridFilters = function (filters) {
15313
+ this.gridService.setGridFilters(filters);
15314
+ };
15273
15315
  DatoGridControllerComponent.prototype.onFilterChanged = function () {
15274
15316
  return this.gridQuery.filterChanged();
15275
15317
  };
@@ -16181,8 +16223,11 @@ var DatoGridPaginationV2Component = /** @class */ (function () {
16181
16223
  return page;
16182
16224
  };
16183
16225
  DatoGridPaginationV2Component.prototype.toggleGroupsState = function () {
16184
- this.isExpanded ? this.gridApi.collapseAll() : this.gridApi.expandAll();
16226
+ var _this = this;
16185
16227
  this.isExpanded = !this.isExpanded;
16228
+ this.gridApi.forEachNode(function (node) {
16229
+ node.setExpanded(_this.isExpanded);
16230
+ });
16186
16231
  };
16187
16232
  DatoGridPaginationV2Component.prototype.autoFitGrid = function (type) {
16188
16233
  this.gridService.fitGrid(type);
@@ -16275,7 +16320,7 @@ var DatoGridPaginationV2Component = /** @class */ (function () {
16275
16320
  Component({
16276
16321
  selector: 'dato-grid-pagination-v2',
16277
16322
  changeDetection: ChangeDetectionStrategy.OnPush,
16278
- template: "<div class=\"d-flex-row d-flex-auto d-flex-wrap container\" [class.small]=\"smallVersion\"\n [attr.data-pages-count]=\"totalPages\"\n [attr.data-current-page]=\"pageNumbersDisplay.currentPage\"\n [attr.data-page-size]=\"rowsPerPage\"\n [attr.data-rows-count]=\"rowCount\">\n <div *ngIf=\"totalPages > 1\" #navigation\n class=\"navigation d-flex-row d-flex-0-0-auto align-center\">\n\n <!-- First Page -->\n <dato-icon-button *ngIf=\"!disableButtons\"\n class=\"mr-4\" data-auto-id=\"pagiantion-first-page\"\n icon=\"chevron-left-double\"\n datoType=\"secondary\"\n datoSize=\"md\"\n [disabled]=\"prevPageDisabled\"\n (click)=\"navigateFirstPage()\">\n </dato-icon-button>\n\n <!-- Previous Page -->\n <dato-icon-button icon=\"arrow-left\" datoType=\"secondary\" datoSize=\"md\"\n [disabled]=\"prevPageDisabled\" data-auto-id=\"pagiantion-previous-page\"\n (click)=\"navigatePrevPage()\">\n </dato-icon-button>\n\n\n <div class=\"d-flex mx-5 align-center number-container\">\n <dato-link class=\"page-number mx-5\" datoType=\"secondary\" datoSize=\"sm\" data-auto-id=\"pagiantion-previous-batch\"\n *ngIf=\"pageNumbersDisplay.showFirstEllipsis && !smallVersion\"\n (click)=\"showPreviousBatch()\">...\n </dato-link>\n <dato-link class=\"page-number mx-5\" [datoType]=\"page === pageNumbersDisplay.currentPage ? 'primary' : 'secondary'\" datoSize=\"sm\"\n *ngFor=\"let page of pageNumbersDisplay.pages; index as i; trackBy: trackByPage;\" [attr.data-auto-id]=\"'pagiantion-page-' + i\"\n (click)=\"navigatePage(page - 1)\">\n {{page}}\n </dato-link>\n\n <div class=\"d-flex\" *ngIf=\"pageNumbersDisplay.showLastPage && !smallVersion\">\n <dato-link class=\"page-number mx-5\" datoType=\"secondary\" datoSize=\"sm\" data-auto-id=\"pagiantion-next-batch\"\n (click)=\"showNextBatch()\">...</dato-link>\n <dato-link class=\"page-number mx-5\" datoType=\"secondary\" datoSize=\"sm\"\n [attr.data-auto-id]=\"'pagiantion-page-' + totalPages\"\n (click)=\"navigatePage(totalPages - 1)\">\n {{totalPages}}\n </dato-link>\n </div>\n\n </div>\n\n <!-- Next Page -->\n <dato-icon-button icon=\"arrow-right\" datoType=\"secondary\" datoSize=\"md\"\n (click)=\"navigateNextPage()\" data-auto-id=\"pagiantion-next-page\"\n [disabled]=\"nextPageDisabled\">\n </dato-icon-button>\n\n <!-- Last Page -->\n <dato-icon-button *ngIf=\"!disableButtons\"\n class=\"ml-4\" icon=\"chevron-right-double\"\n datoType=\"secondary\" datoSize=\"md\" data-auto-id=\"pagiantion-last-page\"\n [disabled]=\"nextPageDisabled\"\n (click)=\"navigatePage(totalPages - 1)\">\n </dato-icon-button>\n\n </div>\n\n <div *ngIf=\"totalPages > 1 && !smallVersion\"\n class=\"separator mx-10 my-auto primary-100-background-color\">\n </div>\n\n <div class=\"total d-flex-0-0-auto d-flex-row align-center\">\n <span class=\"dato-note primary-300-color\">{{rowsRange}}</span>\n </div>\n\n <div *ngIf=\"showBottomControls\" class=\"grid-controls d-flex d-flex-1 justify-end\">\n <dato-icon-button [icon]=\"isExpanded ? 'collapse' : 'expand'\" datoType=\"secondary\" datoSize=\"md\"\n (click)=\"toggleGroupsState()\" data-auto-id=\"pagiantion-next-page\">\n </dato-icon-button>\n\n <dato-icon-button class=\"mx-4\" icon=\"maximize-horizontal\" datoType=\"secondary\" datoSize=\"md\"\n (click)=\"autoFitGrid('container')\" data-auto-id=\"pagiantion-next-page\">\n </dato-icon-button>\n\n <dato-icon-button icon=\"minimize-horizontal\" datoType=\"secondary\" datoSize=\"md\"\n (click)=\"autoFitGrid('content')\" data-auto-id=\"pagiantion-next-page\">\n </dato-icon-button>\n </div>\n</div>\n",
16323
+ template: "<div class=\"d-flex-row d-flex-auto d-flex-wrap container\" [class.small]=\"smallVersion\"\n [attr.data-pages-count]=\"totalPages\"\n [attr.data-current-page]=\"pageNumbersDisplay.currentPage\"\n [attr.data-page-size]=\"rowsPerPage\"\n [attr.data-rows-count]=\"rowCount\">\n <div *ngIf=\"totalPages > 1\" #navigation\n class=\"navigation d-flex-row d-flex-0-0-auto align-center\">\n\n <!-- First Page -->\n <dato-icon-button *ngIf=\"!disableButtons\"\n class=\"mr-4\" data-auto-id=\"pagiantion-first-page\"\n icon=\"chevron-left-double\"\n datoType=\"secondary\"\n datoSize=\"md\"\n [disabled]=\"prevPageDisabled\"\n (click)=\"navigateFirstPage()\">\n </dato-icon-button>\n\n <!-- Previous Page -->\n <dato-icon-button icon=\"arrow-left\" datoType=\"secondary\" datoSize=\"md\"\n [disabled]=\"prevPageDisabled\" data-auto-id=\"pagiantion-previous-page\"\n (click)=\"navigatePrevPage()\">\n </dato-icon-button>\n\n\n <div class=\"d-flex mx-5 align-center number-container\">\n <dato-link class=\"page-number mx-5\" datoType=\"secondary\" datoSize=\"sm\" data-auto-id=\"pagiantion-previous-batch\"\n *ngIf=\"pageNumbersDisplay.showFirstEllipsis && !smallVersion\"\n (click)=\"showPreviousBatch()\">...\n </dato-link>\n <dato-link class=\"page-number mx-5\" [datoType]=\"page === pageNumbersDisplay.currentPage ? 'primary' : 'secondary'\" datoSize=\"sm\"\n *ngFor=\"let page of pageNumbersDisplay.pages; index as i; trackBy: trackByPage;\" [attr.data-auto-id]=\"'pagiantion-page-' + i\"\n (click)=\"navigatePage(page - 1)\">\n {{page}}\n </dato-link>\n\n <div class=\"d-flex\" *ngIf=\"pageNumbersDisplay.showLastPage && !smallVersion\">\n <dato-link class=\"page-number mx-5\" datoType=\"secondary\" datoSize=\"sm\" data-auto-id=\"pagiantion-next-batch\"\n (click)=\"showNextBatch()\">...</dato-link>\n <dato-link class=\"page-number mx-5\" datoType=\"secondary\" datoSize=\"sm\"\n [attr.data-auto-id]=\"'pagiantion-page-' + totalPages\"\n (click)=\"navigatePage(totalPages - 1)\">\n {{totalPages}}\n </dato-link>\n </div>\n\n </div>\n\n <!-- Next Page -->\n <dato-icon-button icon=\"arrow-right\" datoType=\"secondary\" datoSize=\"md\"\n (click)=\"navigateNextPage()\" data-auto-id=\"pagiantion-next-page\"\n [disabled]=\"nextPageDisabled\">\n </dato-icon-button>\n\n <!-- Last Page -->\n <dato-icon-button *ngIf=\"!disableButtons\"\n class=\"ml-4\" icon=\"chevron-right-double\"\n datoType=\"secondary\" datoSize=\"md\" data-auto-id=\"pagiantion-last-page\"\n [disabled]=\"nextPageDisabled\"\n (click)=\"navigatePage(totalPages - 1)\">\n </dato-icon-button>\n\n </div>\n\n <div *ngIf=\"totalPages > 1 && !smallVersion\"\n class=\"separator mx-10 my-auto primary-100-background-color\">\n </div>\n\n <div class=\"total d-flex-0-0-auto d-flex-row align-center\">\n <span class=\"dato-note primary-300-color\">{{rowsRange}}</span>\n </div>\n\n <div *ngIf=\"showBottomControls\" class=\"grid-controls d-flex d-flex-1 justify-end\">\n <dato-icon-button [icon]=\"isExpanded ? 'collapse' : 'expand'\" datoType=\"secondary\" datoSize=\"md\"\n (click)=\"toggleGroupsState()\" data-auto-id=\"pagiantion-expand-collapse\"\n [datoTooltipV2]=\"isExpanded ? 'core.collapse-rows' : 'core.expand-rows'\">\n </dato-icon-button>\n\n <dato-icon-button class=\"mx-4\" icon=\"maximize-horizontal\" datoType=\"secondary\" datoSize=\"md\"\n (click)=\"autoFitGrid('content')\" [datoTooltipV2]=\"'core.fit-to-content'\"\n data-auto-id=\"pagiantion-fit-to-content\">\n </dato-icon-button>\n\n <dato-icon-button icon=\"minimize-horizontal\" datoType=\"secondary\" datoSize=\"md\"\n (click)=\"autoFitGrid('container')\" [datoTooltipV2]=\"'core.fit-to-container'\"\n data-auto-id=\"pagiantion-fit-to-container\">\n </dato-icon-button>\n </div>\n</div>\n",
16279
16324
  providers: [DecimalPipe],
16280
16325
  styles: [":host{padding:12px 0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;min-height:25px}:host .container{height:25px}:host .navigation .page-number{transition:color .3s ease-in-out}:host .navigation .page-number:first-of-type{margin-left:7px}:host .navigation .page-number:last-of-type{margin-right:7px}:host .separator{width:1px;height:25px}:host .container.small .navigation,:host .container.small .total{margin-top:8px;margin-left:auto;margin-right:auto}"]
16281
16326
  }),
@@ -16497,18 +16542,6 @@ var DatoGridV2ToolbarComponent = /** @class */ (function () {
16497
16542
  this.registerGroupListeners();
16498
16543
  this.subscribeRowsSelectionData();
16499
16544
  };
16500
- DatoGridV2ToolbarComponent.prototype.getCellValueChangeEvent = function () {
16501
- var _this = this;
16502
- return this.gridController.gridQuery.waitForGrid(function () {
16503
- return _this.gridQuery.gridRef.cellValueChanged.pipe(debounceTime(100), untilDestroyed(_this));
16504
- });
16505
- };
16506
- DatoGridV2ToolbarComponent.prototype.getRowDataUpdatedEvent = function () {
16507
- var _this = this;
16508
- return this.gridController.gridQuery.waitForGrid(function () {
16509
- return _this.gridQuery.gridRef.rowDataUpdated.pipe(debounceTime(100), untilDestroyed(_this));
16510
- });
16511
- };
16512
16545
  DatoGridV2ToolbarComponent.prototype.onActionClick = function (action) {
16513
16546
  if (isFunction(action.onClick)) {
16514
16547
  var selectedRowsCount = this.gridController.gridQuery.getSelectedRowsCount();
@@ -20980,40 +21013,6 @@ var DatoEditableHeaderModule = /** @class */ (function () {
20980
21013
  * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
20981
21014
  */
20982
21015
 
20983
- var RichTextService = /** @class */ (function () {
20984
- function RichTextService(http, config) {
20985
- this.http = http;
20986
- this.config = config;
20987
- }
20988
- RichTextService.prototype.getLib = function (appendScriptFunc, appendStyleFunc) {
20989
- if (!this.richTextScript$) {
20990
- this.initLib(appendScriptFunc, appendStyleFunc);
20991
- }
20992
- return this.richTextScript$;
20993
- };
20994
- RichTextService.prototype.initLib = function (appendScriptFunc, appendStyleFunc) {
20995
- this.richTextScript$ = combineLatest([
20996
- this.http
20997
- .get(this.config.paths.richText + "/index.js", { responseType: 'text' })
20998
- .pipe(tap(function (lib) { return appendScriptFunc(lib, 'rich-text-editor'); })),
20999
- this.http
21000
- .get(this.config.paths.richText + "/plugins/autocomplete/plugin.css", { responseType: 'text' })
21001
- .pipe(tap(function (style) { return appendStyleFunc(style, 'tinymce-autocomplete'); }))
21002
- ]).pipe(shareReplay(1));
21003
- };
21004
- RichTextService.ctorParameters = function () { return [
21005
- { type: HttpClient },
21006
- { type: undefined, decorators: [{ type: Inject, args: [DATO_CORE_CONFIG,] }] }
21007
- ]; };
21008
- RichTextService.ɵprov = ɵɵdefineInjectable({ factory: function RichTextService_Factory() { return new RichTextService(ɵɵinject(HttpClient), ɵɵinject(DATO_CORE_CONFIG)); }, token: RichTextService, providedIn: "root" });
21009
- RichTextService = __decorate([
21010
- Injectable({ providedIn: 'root' }),
21011
- __param(1, Inject(DATO_CORE_CONFIG)),
21012
- __metadata("design:paramtypes", [HttpClient, Object])
21013
- ], RichTextService);
21014
- return RichTextService;
21015
- }());
21016
-
21017
21016
  /**
21018
21017
  * @license
21019
21018
  * Copyright Datorama. All Rights Reserved.
@@ -21027,12 +21026,12 @@ var getTinymce = function () {
21027
21026
  var ɵ0$3 = getTinymce;
21028
21027
  var DatoRichTextDirective = /** @class */ (function (_super) {
21029
21028
  __extends(DatoRichTextDirective, _super);
21030
- function DatoRichTextDirective(ngZone, richTextService, config, host) {
21029
+ function DatoRichTextDirective(ngZone, http, host, config) {
21031
21030
  var _this = _super.call(this) || this;
21032
21031
  _this.ngZone = ngZone;
21033
- _this.richTextService = richTextService;
21034
- _this.config = config;
21032
+ _this.http = http;
21035
21033
  _this.host = host;
21034
+ _this.config = config;
21036
21035
  _this.autocompleteOptions = {};
21037
21036
  _this.forcePlainTextPasting = false;
21038
21037
  _this.format = 'html';
@@ -21066,11 +21065,28 @@ var DatoRichTextDirective = /** @class */ (function (_super) {
21066
21065
  base: this.config.paths.richText,
21067
21066
  query: ''
21068
21067
  };
21069
- this.richTextService
21070
- .getLib(appendScript, appendStyle)
21071
- .pipe(untilDestroyed(this))
21072
- .subscribe(function () {
21073
- _this.init.call(_this);
21068
+ /**
21069
+ * We support only one instance in load time
21070
+ */
21071
+ if (window.tinymce) {
21072
+ this.init.call(this);
21073
+ }
21074
+ else {
21075
+ this.loadLib().subscribe(function (lib) {
21076
+ appendScript(lib, 'rich-text-editor');
21077
+ _this.init.call(_this);
21078
+ _this.loadAutoCompleteStyle();
21079
+ });
21080
+ }
21081
+ };
21082
+ DatoRichTextDirective.prototype.loadLib = function () {
21083
+ return this.http.get(this.config.paths.richText + "/index.js", { responseType: 'text' });
21084
+ };
21085
+ DatoRichTextDirective.prototype.loadAutoCompleteStyle = function () {
21086
+ this.http
21087
+ .get(this.config.paths.richText + "/plugins/autocomplete/plugin.css", { responseType: 'text' })
21088
+ .subscribe(function (style) {
21089
+ appendStyle(style, 'tinymce-autocomplete');
21074
21090
  });
21075
21091
  };
21076
21092
  DatoRichTextDirective.prototype.initEditor = function (_, editor) {
@@ -21163,9 +21179,9 @@ var DatoRichTextDirective = /** @class */ (function (_super) {
21163
21179
  var DatoRichTextDirective_1;
21164
21180
  DatoRichTextDirective.ctorParameters = function () { return [
21165
21181
  { type: NgZone },
21166
- { type: RichTextService },
21167
- { type: undefined, decorators: [{ type: Inject, args: [DATO_CORE_CONFIG,] }] },
21168
- { type: ElementRef }
21182
+ { type: HttpClient },
21183
+ { type: ElementRef },
21184
+ { type: undefined, decorators: [{ type: Inject, args: [DATO_CORE_CONFIG,] }] }
21169
21185
  ]; };
21170
21186
  __decorate([
21171
21187
  Input(),
@@ -21231,9 +21247,10 @@ var DatoRichTextDirective = /** @class */ (function (_super) {
21231
21247
  }
21232
21248
  ]
21233
21249
  }),
21234
- __param(2, Inject(DATO_CORE_CONFIG)),
21250
+ __param(3, Inject(DATO_CORE_CONFIG)),
21235
21251
  __metadata("design:paramtypes", [NgZone,
21236
- RichTextService, Object, ElementRef])
21252
+ HttpClient,
21253
+ ElementRef, Object])
21237
21254
  ], DatoRichTextDirective);
21238
21255
  return DatoRichTextDirective;
21239
21256
  }(BaseCustomControl));
@@ -23756,9 +23773,7 @@ var DatoBreadcrumbsComponent = /** @class */ (function () {
23756
23773
  };
23757
23774
  DatoBreadcrumbsComponent.prototype.initEditableHeader = function () {
23758
23775
  var _this = this;
23759
- this.headerControl.valueChanges
23760
- .pipe(debounceTime(300), untilDestroyed(this))
23761
- .subscribe(function (res) {
23776
+ this.headerControl.valueChanges.pipe(debounceTime(300), untilDestroyed(this)).subscribe(function (res) {
23762
23777
  _this.updateEditableText.emit(res);
23763
23778
  _this.cdr.detectChanges();
23764
23779
  });
@@ -25101,7 +25116,7 @@ function fixNgLeaks() {
25101
25116
  };
25102
25117
  }
25103
25118
 
25104
- window.coreVersion = '21.4.0-rc.';
25119
+ window.coreVersion = '22.0.1';
25105
25120
 
25106
25121
  /**
25107
25122
  * @license
@@ -25115,5 +25130,5 @@ window.coreVersion = '21.4.0-rc.';
25115
25130
  * Generated bundle index. Do not edit.
25116
25131
  */
25117
25132
 
25118
- export { APP_TRANSLATE, AceService, BaseCustomControl, COMPARE_RESULT, CUSTOM_RANGE_ID, ColorPalette, ConfirmationType, ContentRef, ContentType, CustomHeaderControllerService, DATE_PICKER_CONFIG, DATE_PICKER_POPOVER_ID, DATO_CORE_LOGGER, DATO_FORM_ERRORS, DATO_GRID_STORAGE_API, DEFAULT_FORMAT, DEFAULT_GRID_SEARCH_DEBOUNCE_TIME, DatePickerConfig, DatePickerMonthComponent, DateType, DatoAccordionComponent, DatoAccordionContentComponent, DatoAccordionGroupComponent, DatoAccordionHeaderComponent, DatoAccordionModule, DatoAceDirective, DatoAceDraggableDirective, DatoAceModule, DatoActionType, DatoAutoCompleteContentDirective, DatoAutoFocusDirective, DatoAutocompleteComponent, DatoAutocompleteDirective, DatoAutocompleteModule, DatoBreadcrumbsComponent, DatoBreadcrumbsModule, DatoButtonComponent, DatoButtonGroupComponent, DatoButtonGroupModule, DatoButtonModule, DatoCamelCasePipe, DatoCarouselComponent, DatoCarouselItemDirective, DatoCarouselItemElement, DatoCarouselModule, DatoCheckboxComponent, DatoCheckboxModule, DatoClipboardDirective, DatoColorDirective, DatoConfirmationDialogComponent, DatoControlErrorComponent, DatoControlErrorContainerDirective, DatoControlErrorsDirective, DatoCoreError, DatoCoreModule, DatoCustomHeaderTemplateComponent, DatoCustomHeaderTemplateDirective, DatoCustomMoreMenuTemplateDirective, DatoDatePickerContainerComponent, DatoDatePickerModule, DatoDatePickerRangeComponent, DatoDatePickerSingleComponent, DatoDialog, DatoDialogCloseDirective, DatoDialogComponent, DatoDialogContentComponent, DatoDialogDismissDirective, DatoDialogFooterComponent, DatoDialogHeaderComponent, DatoDialogModule, DatoDialogRef, DatoDirectivesModule, DatoDisableControlDirective, DatoDraggableDirective, DatoDynamicContentComponent, DatoDynamicContentModule, DatoEditableHeaderComponent, DatoEditableHeaderModule, DatoFileInputComponent, DatoFileInputDefaultComponent, DatoFileInputModule, DatoFilterConditions, DatoFontDirective, DatoFontIconComponent, DatoFontIconModule, DatoFormSubmitDirective, DatoFormValidationModule, DatoGrid, DatoGridAPI, DatoGridAvatarCellComponent, DatoGridColumnDisplayMenuComponent, DatoGridColumnHeaderComponent, DatoGridColumnHeaderMoreMenuComponent, DatoGridColumnTypes, DatoGridComponent, DatoGridControllerComponent, DatoGridDateFilterOptions, DatoGridFilterComponent, DatoGridFilterOptionsMap, DatoGridFilterSections, DatoGridFilterTypes, DatoGridGroupsMenuComponent, DatoGridHeaderComponent, DatoGridHeaderV2Component, DatoGridInitialsCellComponent, DatoGridItemsCellComponent, DatoGridModule, DatoGridMoreMenuActions, DatoGridNumberFilterOptions, DatoGridOnHoverComponent, DatoGridPaginationComponent, DatoGridPaginationV2Component, DatoGridStatusCellComponent, DatoGridStringFilterOptions, DatoGridToolbarComponent, DatoGridToolbarItemDirective, DatoGridToolbarItemElementDirective, DatoGridV2Component, DatoGridV2LoaderComponent, DatoGridV2Module, DatoGridV2NoDataOverlayComponent, DatoGridV2ToolbarButtonComponent, DatoGridV2ToolbarComponent, DatoGroupComponent, DatoHighlightPipe, DatoHotkeys, DatoHotkeysDirective, DatoHotkeysHelpComponent, DatoHotkeysModule, DatoIconButtonComponent, DatoIconButtonModule, DatoIconComponent, DatoIconModule, DatoInfiniteScrollComponent, DatoInfiniteScrollModule, DatoInputComponent, DatoInputModule, DatoInputNumberComponent, DatoInputNumberDirective, DatoInputNumberModule, DatoKebabCasePipe, DatoLinkButtonComponent, DatoLinkButtonModule, DatoListComponent, DatoListModule, DatoListNoDataComponent, DatoListNoResultComponent, DatoListV2Component, DatoListV2Module, DatoLoaderComponent, DatoLoadersModule, DatoMenuComponent, DatoMenuContentDirective, DatoMenuItemDirective, DatoMenuModule, DatoMenuTriggerForDirective, DatoMultiOptionComponent, DatoMultiOptionV2Component, DatoOperatorTogglerComponent, DatoOperatorTogglerModule, DatoOptionComponent, DatoOptionV2Component, DatoOptionsModule, DatoOriginDirective, DatoOverlay, DatoPageLoaderComponent, DatoPanel, DatoPanelComponent, DatoPanelContentComponent, DatoPanelFooterComponent, DatoPanelHeaderComponent, DatoPanelInternalConfig, DatoPanelModule, DatoPanelRef, DatoPillsComponent, DatoPillsModule, DatoPipesModule, DatoPopover, DatoPopoverComponent, DatoPopoverModule, DatoProgressBarComponent, DatoProgressBarModule, DatoRadioComponent, DatoRadioModule, DatoRichTextDirective, DatoRichTextModule, DatoSearchResultsGroupSortPipe, DatoSearchResultsSortPipe, DatoSearchableContainerComponent, DatoSearchableDirective, DatoSearchableHighlightDirective, DatoSearchableModule, DatoSelectActiveDirective, DatoSelectComponent, DatoSelectEmptyComponent, DatoSelectModule, DatoSliderComponent, DatoSliderModule, DatoSnackbar, DatoSnackbarComponent, DatoSnackbarModule, DatoSortableComponent, DatoSortableHandleDirective, DatoSortableModule, DatoStaticImageSrcDirective, DatoStaticImagesSrcModule, DatoSubscribeContext, DatoSubscribeDirective, DatoTab, DatoTabContent, DatoTabTitle, DatoTabsModule, DatoTabset, DatoTemplatePortal, DatoTextModule, DatoThemesModule, DatoToast, DatoToastComponent, DatoToastModule, DatoTogglerComponent, DatoTogglerModule, DatoTooltipDirective, DatoTooltipV2Directive, DatoTrackByPropPipe, DatoTranslateService, DatoTreePipe, DatoTriggerMulti, DatoTriggerSingle, DialogConfig, DialogResultStatus, Dimensions, EventModifiersPlugin, GridActionType, GridMinWidths, GridRowSelectionType, GridToolbarService, ISO_FORMAT, IconRegistry, KeyCodes, KeyboardEventKeys, ListValueTypes, MockService, OperatorTypes, POPPER_BOUNDARY, PaletteDirective, PanelResultCloseTrigger, PillType, PopoverCloseDirective, PopoverContentDirective, PopoverRef, PopoverTrigger, ROOT_NODE_ID, RelativeDateType, RenderMethod, RowSelectionType, RowSelectionTypeV2, SELECT_MAX_HEIGHT, SUPPORTED_LOCALES, SelectType, SnackbarRef, SnackbarType, Store, SvgRegistry, ToolbarActionType, ToolbarArea, ToolbarConfirmation, ToolbarDeleteConfirmation, ToolbarHandler, TranslatePipe, Types, _valueChanges, a, addClass, addJSObjectCompletor, allowedFileTypes, alphabeticalGroupSort, alphabeticalSort, appendChild, appendScript, appendStyle, appendToBody, assertString, camelCase, capitalize, cloneDeep, closest, coerceArray, coerceElement, compareWith, compose, convertFromTreeData, convertToTreeData, copyToClipboard, createComponent, createElement, createGUID, createHTMLCompletor, curry, dateCompare, daysOfTheMonth, debounce, declarations$2 as declarations, deepEqual, deepmerge, defaultActions$1 as defaultActions, defaultConfig, defaultEditableColumnRenderer, defaultGridOptions, defaultGridTreeLabel, defaultOptionsDisplayLimit, defaultTreeOptions, dialogSizePreset, diff, difference, differenceBy, dimensionsChanges, directives, drop, editableCellRendererWithSearchHighlight, escape, escapeRegExp, filter, filterByControlValue, filterByTerm, filterDialogDismissed, filterDialogSuccess, filterGroupByControlValue, filterGroupByTerm, filterKey, find, findIndex, findKey, fixNgLeaks, forEach, formatKeys, generateMonths, get, getAttr, getCustomRange, getDateISOString, getDefaultConfirmationOptions, getDefaultOptions, getDefaultsToastOptions, getElementCoords, getFunctionName, getGridConfiguration, getGridModel, getInitials, getLocalizedFormat, getMultiTemplate, getOptionTemplate, getPopperDefaults, getUTCDate, getVisibleActions, gridTreeFilePathKey, groupBy, groupSortOrder, has, inView, intersection, invert, isArrayValuesEqual, isArrowUpDown, isBoolean, isEmpty, isEmptyString, isEnter, isEqual, isEscape, isFraction, isFunction, isMacintosh, isNil, isNumber, isObject, isRangeCondition, isRangeCustom, isString, isTestEnv, isValidMediaLink, kebabCase, keyBy, keysSymbols, last, map, mapKeys, mapValues, maxFileSize, merge, minBy, mockInDev, mocks, ngContentResolver, noop, normalizeData, omit, omitBy, optionalDebounce, pallete, parseDateString, partial, polling, prependChild, publicApi$1 as publicApi, query, queryAll, random, rawDiff, reject, relativeDateTypes, removeClass, resolveRange, round, searchHighlightCellRenderer, searchResultsGroupSort, searchResultsSort, setAttr, setAttribute, setDimensions, setEmptyFolderClass, setGridConfiguration, setGridModel, setMaxDimensions, setMinDimensions, setStyle, setStyles, size, sortBy, stubs, supportedLocales, tapLog, tapOnce, throttle, toBoolean, toFormData, toNumber, toResponseBody, toString, toggleClass, toolbarActionToContextAction, tryParsePivotValue, unescape, union, uniq, uniqBy, uploadProgress, validBase64Image, validUrl, validateCondition, validateDate, validateDateCondition, validateFilter, validateNumberCondition, validateRange, validateStringCondition, values, workerMap, zoneStable, ɵ0$2 as ɵ0, ɵ1$2 as ɵ1, ɵ2, DATO_CORE_CONFIG as ɵb, DatoGridHelper as ɵc, Popper as ɵd, GridQuery as ɵe, GridStore as ɵf, GridService as ɵg, DatoDateRangesFilterPipe as ɵh, ListStore as ɵi, DatoListSelectAllComponent as ɵj, DatoGridMultiSelectColumnHeaderComponent as ɵk, DatoGridItemsCountCellComponent as ɵl, DatoGridV2ToolbarMoreMenuComponent as ɵm, DatoGridSearchBarComponent as ɵn, RichTextService as ɵo };
25133
+ export { APP_TRANSLATE, AceService, BaseCustomControl, COMPARE_RESULT, CUSTOM_RANGE_ID, ColorPalette, ConfirmationType, ContentRef, ContentType, CustomHeaderControllerService, DATE_PICKER_CONFIG, DATE_PICKER_POPOVER_ID, DATO_CORE_LOGGER, DATO_FORM_ERRORS, DATO_GRID_STORAGE_API, DEFAULT_FORMAT, DEFAULT_GRID_SEARCH_DEBOUNCE_TIME, DatePickerConfig, DatePickerMonthComponent, DateType, DatoAccordionComponent, DatoAccordionContentComponent, DatoAccordionGroupComponent, DatoAccordionHeaderComponent, DatoAccordionModule, DatoAceDirective, DatoAceDraggableDirective, DatoAceModule, DatoActionType, DatoAutoCompleteContentDirective, DatoAutoFocusDirective, DatoAutocompleteComponent, DatoAutocompleteDirective, DatoAutocompleteModule, DatoBreadcrumbsComponent, DatoBreadcrumbsModule, DatoButtonComponent, DatoButtonGroupComponent, DatoButtonGroupModule, DatoButtonModule, DatoCamelCasePipe, DatoCarouselComponent, DatoCarouselItemDirective, DatoCarouselItemElement, DatoCarouselModule, DatoCheckboxComponent, DatoCheckboxModule, DatoClipboardDirective, DatoColorDirective, DatoConfirmationDialogComponent, DatoControlErrorComponent, DatoControlErrorContainerDirective, DatoControlErrorsDirective, DatoCoreError, DatoCoreModule, DatoCustomHeaderTemplateComponent, DatoCustomHeaderTemplateDirective, DatoCustomMoreMenuTemplateDirective, DatoDatePickerContainerComponent, DatoDatePickerModule, DatoDatePickerRangeComponent, DatoDatePickerSingleComponent, DatoDialog, DatoDialogCloseDirective, DatoDialogComponent, DatoDialogContentComponent, DatoDialogDismissDirective, DatoDialogFooterComponent, DatoDialogHeaderComponent, DatoDialogModule, DatoDialogRef, DatoDirectivesModule, DatoDisableControlDirective, DatoDraggableDirective, DatoDynamicContentComponent, DatoDynamicContentModule, DatoEditableHeaderComponent, DatoEditableHeaderModule, DatoFileInputComponent, DatoFileInputDefaultComponent, DatoFileInputModule, DatoFilterConditions, DatoFontDirective, DatoFontIconComponent, DatoFontIconModule, DatoFormSubmitDirective, DatoFormValidationModule, DatoGrid, DatoGridAPI, DatoGridAvatarCellComponent, DatoGridColumnDisplayMenuComponent, DatoGridColumnHeaderComponent, DatoGridColumnHeaderMoreMenuComponent, DatoGridColumnTypes, DatoGridComponent, DatoGridControllerComponent, DatoGridDateFilterOptions, DatoGridFilterComponent, DatoGridFilterOptionsMap, DatoGridFilterSections, DatoGridFilterTypes, DatoGridGroupsMenuComponent, DatoGridHeaderComponent, DatoGridHeaderV2Component, DatoGridInitialsCellComponent, DatoGridItemsCellComponent, DatoGridModule, DatoGridMoreMenuActions, DatoGridNumberFilterOptions, DatoGridOnHoverComponent, DatoGridPaginationComponent, DatoGridPaginationV2Component, DatoGridStatusCellComponent, DatoGridStringFilterOptions, DatoGridToolbarComponent, DatoGridToolbarItemDirective, DatoGridToolbarItemElementDirective, DatoGridV2Component, DatoGridV2LoaderComponent, DatoGridV2Module, DatoGridV2NoDataOverlayComponent, DatoGridV2ToolbarButtonComponent, DatoGridV2ToolbarComponent, DatoGroupComponent, DatoHighlightPipe, DatoHotkeys, DatoHotkeysDirective, DatoHotkeysHelpComponent, DatoHotkeysModule, DatoIconButtonComponent, DatoIconButtonModule, DatoIconComponent, DatoIconModule, DatoInfiniteScrollComponent, DatoInfiniteScrollModule, DatoInputComponent, DatoInputModule, DatoInputNumberComponent, DatoInputNumberDirective, DatoInputNumberModule, DatoKebabCasePipe, DatoLinkButtonComponent, DatoLinkButtonModule, DatoListComponent, DatoListModule, DatoListNoDataComponent, DatoListNoResultComponent, DatoListV2Component, DatoListV2Module, DatoLoaderComponent, DatoLoadersModule, DatoMenuComponent, DatoMenuContentDirective, DatoMenuItemDirective, DatoMenuModule, DatoMenuTriggerForDirective, DatoMultiOptionComponent, DatoMultiOptionV2Component, DatoOperatorTogglerComponent, DatoOperatorTogglerModule, DatoOptionComponent, DatoOptionV2Component, DatoOptionsModule, DatoOriginDirective, DatoOverlay, DatoPageLoaderComponent, DatoPanel, DatoPanelComponent, DatoPanelContentComponent, DatoPanelFooterComponent, DatoPanelHeaderComponent, DatoPanelInternalConfig, DatoPanelModule, DatoPanelRef, DatoPillsComponent, DatoPillsModule, DatoPipesModule, DatoPopover, DatoPopoverComponent, DatoPopoverModule, DatoProgressBarComponent, DatoProgressBarModule, DatoRadioComponent, DatoRadioModule, DatoRichTextDirective, DatoRichTextModule, DatoSearchResultsGroupSortPipe, DatoSearchResultsSortPipe, DatoSearchableContainerComponent, DatoSearchableDirective, DatoSearchableHighlightDirective, DatoSearchableModule, DatoSelectActiveDirective, DatoSelectComponent, DatoSelectEmptyComponent, DatoSelectModule, DatoSliderComponent, DatoSliderModule, DatoSnackbar, DatoSnackbarComponent, DatoSnackbarModule, DatoSortableComponent, DatoSortableHandleDirective, DatoSortableModule, DatoStaticImageSrcDirective, DatoStaticImagesSrcModule, DatoSubscribeContext, DatoSubscribeDirective, DatoTab, DatoTabContent, DatoTabTitle, DatoTabsModule, DatoTabset, DatoTemplatePortal, DatoTextModule, DatoThemesModule, DatoToast, DatoToastComponent, DatoToastModule, DatoTogglerComponent, DatoTogglerModule, DatoTooltipDirective, DatoTooltipV2Directive, DatoTrackByPropPipe, DatoTranslateService, DatoTreePipe, DatoTriggerMulti, DatoTriggerSingle, DialogConfig, DialogResultStatus, Dimensions, EventModifiersPlugin, GridActionType, GridMinWidths, GridRowSelectionType, GridToolbarService, ISO_FORMAT, IconRegistry, KeyCodes, KeyboardEventKeys, ListValueTypes, MockService, OperatorTypes, POPPER_BOUNDARY, PaletteDirective, PanelResultCloseTrigger, PillType, PopoverCloseDirective, PopoverContentDirective, PopoverRef, PopoverTrigger, ROOT_NODE_ID, RelativeDateType, RenderMethod, RowSelectionType, RowSelectionTypeV2, SELECT_MAX_HEIGHT, SUPPORTED_LOCALES, SelectType, SnackbarRef, SnackbarType, Store, SvgRegistry, ToolbarActionType, ToolbarArea, ToolbarConfirmation, ToolbarDeleteConfirmation, ToolbarHandler, TranslatePipe, Types, _valueChanges, a, addClass, addJSObjectCompletor, allowedFileTypes, alphabeticalGroupSort, alphabeticalSort, appendChild, appendScript, appendStyle, appendToBody, assertString, camelCase, capitalize, cloneDeep, closest, coerceArray, coerceElement, compareWith, compose, convertFromTreeData, convertToTreeData, copyToClipboard, createComponent, createElement, createGUID, createHTMLCompletor, curry, dateCompare, daysOfTheMonth, debounce, declarations$2 as declarations, deepEqual, deepmerge, defaultActions$1 as defaultActions, defaultConfig, defaultEditableColumnRenderer, defaultGridOptions, defaultGridTreeLabel, defaultOptionsDisplayLimit, defaultTreeOptions, dialogSizePreset, diff, difference, differenceBy, dimensionsChanges, directives, drop, editableCellRendererWithSearchHighlight, escape, escapeRegExp, filter, filterByControlValue, filterByTerm, filterDialogDismissed, filterDialogSuccess, filterGroupByControlValue, filterGroupByTerm, filterKey, find, findIndex, findKey, fixNgLeaks, forEach, formatKeys, generateMonths, get, getAttr, getCustomRange, getDateISOString, getDefaultConfirmationOptions, getDefaultOptions, getDefaultsToastOptions, getElementCoords, getFunctionName, getGridConfiguration, getGridModel, getInitials, getLocalizedFormat, getMultiTemplate, getOptionTemplate, getPopperDefaults, getUTCDate, getVisibleActions, gridTreeFilePathKey, groupBy, groupSortOrder, has, inView, intersection, invert, isArrayValuesEqual, isArrowUpDown, isBoolean, isEmpty, isEmptyString, isEnter, isEqual, isEscape, isFraction, isFunction, isMacintosh, isNil, isNumber, isObject, isRangeCondition, isRangeCustom, isString, isTestEnv, isValidMediaLink, kebabCase, keyBy, keysSymbols, last, map, mapKeys, mapValues, maxFileSize, merge, minBy, mockInDev, mocks, ngContentResolver, noop, normalizeData, omit, omitBy, optionalDebounce, pallete, parseDateString, partial, polling, prependChild, publicApi$1 as publicApi, query, queryAll, random, rawDiff, reject, relativeDateTypes, removeClass, resolveRange, round, searchHighlightCellRenderer, searchResultsGroupSort, searchResultsSort, setAttr, setAttribute, setDimensions, setEmptyFolderClass, setGridConfiguration, setGridModel, setMaxDimensions, setMinDimensions, setStyle, setStyles, size, sortBy, stubs, supportedLocales, tapLog, tapOnce, throttle, toBoolean, toFormData, toNumber, toResponseBody, toString, toggleClass, toolbarActionToContextAction, tryParsePivotValue, unescape, union, uniq, uniqBy, uploadProgress, validBase64Image, validUrl, validateCondition, validateDate, validateDateCondition, validateFilter, validateNumberCondition, validateRange, validateStringCondition, values, workerMap, zoneStable, ɵ0$2 as ɵ0, ɵ1$2 as ɵ1, ɵ2, DATO_CORE_CONFIG as ɵb, DatoGridHelper as ɵc, Popper as ɵd, GridQuery as ɵe, GridStore as ɵf, GridService as ɵg, DatoDateRangesFilterPipe as ɵh, ListStore as ɵi, DatoListSelectAllComponent as ɵj, DatoGridMultiSelectColumnHeaderComponent as ɵk, DatoGridItemsCountCellComponent as ɵl, DatoGridV2ToolbarMoreMenuComponent as ɵm, DatoGridSearchBarComponent as ɵn };
25119
25134
  //# sourceMappingURL=datorama-core.js.map