@datorama/core 21.4.0-rc.7 → 22.0.0

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 (58) hide show
  1. package/bundle.scss +2 -2
  2. package/bundles/datorama-core.umd.js +154 -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 +8 -8
  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-store/util.js +2 -2
  20. package/esm2015/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +1 -7
  21. package/esm2015/lib/rich-text/rich-text.directive.js +33 -15
  22. package/esm2015/lib/select/select.component.js +10 -5
  23. package/esm2015/lib/version.js +2 -2
  24. package/esm5/datorama-core.js +1 -2
  25. package/esm5/lib/breadcrumbs/breadcrumbs.component.js +2 -4
  26. package/esm5/lib/grid-v2/grid/grid-v2.types.js +1 -1
  27. package/esm5/lib/grid-v2/grid-controller/grid-controller.component.js +5 -5
  28. package/esm5/lib/grid-v2/grid-filter/filter-validator.js +10 -8
  29. package/esm5/lib/grid-v2/grid-filter/grid-filter.component.js +28 -16
  30. package/esm5/lib/grid-v2/grid-filter/grid-filter.types.js +1 -1
  31. package/esm5/lib/grid-v2/grid-pagination/grid-pagination.component.js +6 -3
  32. package/esm5/lib/grid-v2/grid-settings.js +2 -2
  33. package/esm5/lib/grid-v2/grid-store/grid.query.js +16 -13
  34. package/esm5/lib/grid-v2/grid-store/grid.service.js +51 -32
  35. package/esm5/lib/grid-v2/grid-store/util.js +2 -2
  36. package/esm5/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +1 -13
  37. package/esm5/lib/rich-text/rich-text.directive.js +34 -16
  38. package/esm5/lib/select/select.component.js +10 -5
  39. package/esm5/lib/version.js +2 -2
  40. package/fesm2015/datorama-core.js +125 -114
  41. package/fesm2015/datorama-core.js.map +1 -1
  42. package/fesm5/datorama-core.js +155 -141
  43. package/fesm5/datorama-core.js.map +1 -1
  44. package/i18n/locale-en_US.json +2 -1
  45. package/lib/grid-v2/grid/grid-v2.types.d.ts +0 -1
  46. package/lib/grid-v2/grid-controller/grid-controller.component.d.ts +3 -2
  47. package/lib/grid-v2/grid-filter/filter-validator.d.ts +4 -3
  48. package/lib/grid-v2/grid-filter/grid-filter.types.d.ts +4 -3
  49. package/lib/grid-v2/grid-settings.d.ts +2 -2
  50. package/lib/grid-v2/grid-store/grid.query.d.ts +3 -2
  51. package/lib/grid-v2/grid-store/grid.service.d.ts +4 -3
  52. package/lib/grid-v2/grid-store/util.d.ts +1 -1
  53. package/lib/grid-v2/grid-toolbar/grid-toolbar.component.d.ts +0 -2
  54. package/lib/rich-text/rich-text.directive.d.ts +6 -4
  55. package/package.json +1 -1
  56. package/esm2015/lib/rich-text/rich-text.service.js +0 -50
  57. package/esm5/lib/rich-text/rich-text.service.js +0 -51
  58. 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();
@@ -11273,7 +11278,7 @@ function tryParsePivotValue(str) {
11273
11278
  value = JSON.parse(str);
11274
11279
  }
11275
11280
  catch (e) {
11276
- console.error("Can't parse " + str + " from JSON");
11281
+ // Do nothing
11277
11282
  }
11278
11283
  return value;
11279
11284
  }
@@ -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,9 @@ 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
+ var rowValue = !!unparsedRowValue ? parseFloat(unparsedRowValue[filterKey] || unparsedRowValue) : null;
11606
11614
  var filterValue = parseFloat(value);
11607
11615
  switch (condition) {
11608
11616
  case DatoFilterConditions.EQUALS:
@@ -11650,14 +11658,14 @@ function validateDateCondition(rowValue, _a) {
11650
11658
  }
11651
11659
  }
11652
11660
  function validateCondition(_a) {
11653
- var rowValue = _a.rowValue, filter = _a.filter, type = _a.type;
11661
+ var rowValue = _a.rowValue, condition = _a.condition, type = _a.type, filterKey = _a.filterKey;
11654
11662
  switch (type) {
11655
11663
  case DatoGridFilterTypes.Date:
11656
- return validateDateCondition(rowValue, filter);
11664
+ return validateDateCondition(rowValue, condition);
11657
11665
  case DatoGridFilterTypes.Number:
11658
- return validateNumberCondition(rowValue, filter);
11666
+ return validateNumberCondition(rowValue, condition, filterKey);
11659
11667
  default:
11660
- return validateStringCondition(rowValue, filter);
11668
+ return validateStringCondition(rowValue, condition);
11661
11669
  }
11662
11670
  }
11663
11671
  function validateFilter(_a, activeFilters) {
@@ -11677,7 +11685,9 @@ function validateFilter(_a, activeFilters) {
11677
11685
  if (conditional) {
11678
11686
  var operator = conditional.operator, conditions = conditional.conditions, type_1 = conditional.type;
11679
11687
  var conditionsRelation = operator === OperatorTypes.AND ? 'every' : 'some';
11680
- filterPasses = conditions[conditionsRelation](function (filter) { return validateCondition({ rowValue: rowValue, filter: filter, type: type_1 }); });
11688
+ filterPasses = conditions[conditionsRelation](function (condition) {
11689
+ return validateCondition({ rowValue: rowValue, condition: condition, type: type_1, filterKey: filter });
11690
+ });
11681
11691
  }
11682
11692
  if (filterPasses && byValue) {
11683
11693
  var includesValue = byValue.values.includes(rowValue);
@@ -11805,7 +11815,7 @@ function toolbarActionToContextAction(params) {
11805
11815
  return contextActions;
11806
11816
  }
11807
11817
 
11808
- var DATO_GRID_STORAGE_API = new InjectionToken('DATO_GRID_STORAGE_AP');
11818
+ var DATO_GRID_STORAGE_API = new InjectionToken('DATO_GRID_STORAGE_API');
11809
11819
 
11810
11820
  var defaultEditableColumnRenderer = function (params) {
11811
11821
  return params && params.value ? "<div class=\"value-wrapper ellipsis\">" + params.value + "</div>" : null;
@@ -12477,12 +12487,12 @@ var mapToValue = function (_a) {
12477
12487
  var ɵ0$1 = mapToValue;
12478
12488
  var mapToListItem = function (val) { return ({ id: val, label: isNil(val) ? "(Empty)" : ("" + val).trim(), value: val }); };
12479
12489
  var ɵ1$1 = mapToListItem;
12480
- var mapToListItemWithFormatted = function (_a) {
12490
+ var mapToListItemWithFormatted = function (_a, key) {
12481
12491
  var value = _a.value, formattedValue = _a.formattedValue;
12482
12492
  return ({
12483
- id: value,
12484
- label: isNil(formattedValue) ? "(Empty)" : ("" + formattedValue).trim(),
12485
- value: value
12493
+ id: key && value ? value[key] : value,
12494
+ label: isNil(formattedValue) ? "(Empty)" : ("" + (key ? formattedValue[key] : formattedValue)).trim(),
12495
+ value: key && value ? value[key] : value
12486
12496
  });
12487
12497
  };
12488
12498
  var ɵ2$1 = mapToListItemWithFormatted;
@@ -12621,15 +12631,18 @@ var DatoGridFilterComponent = /** @class */ (function () {
12621
12631
  var _this = this;
12622
12632
  var _b = this.popover.data, gridService = _b.gridService, gridQuery = _b.gridQuery;
12623
12633
  var _c = this.colDef, filter = _c.filter, _d = _c.filtersConfig, filtersConfig = _d === void 0 ? {} : _d, pivotValueColumn = _c.pivotValueColumn, pivotKeys = _c.pivotKeys;
12634
+ var colDefs = gridQuery.api.columns.getAllColumns().map(function (column) { return column.getColDef(); });
12624
12635
  this.colField = getColField(this.colDef);
12636
+ var colDef = colDefs.find(function (colDef) { return colDef.field === _this.colField; });
12637
+ var colFilter = filter || colDef.filter;
12638
+ var filterOptions = DatoGridFilterOptionsMap[colFilter];
12625
12639
  this.pivotColumn = gridQuery.api.columns.getSecondaryPivotColumn(pivotKeys, pivotValueColumn);
12626
12640
  if (filtersConfig.sections) {
12627
12641
  this.filterSections = (_a = {}, _a[filtersConfig.sections] = true, _a);
12628
12642
  }
12629
12643
  this.keepPredefinedListOriginalOrder =
12630
12644
  filtersConfig.keepPredefinedListOriginalOrder && !isEmpty(filtersConfig.predefinedListValues);
12631
- var filterOptions = DatoGridFilterOptionsMap[filter];
12632
- this.filterType = filterOptions ? filter : DatoGridFilterTypes.String;
12645
+ this.filterType = filterOptions ? colFilter : DatoGridFilterTypes.String;
12633
12646
  this.listLabelType = this.filterType.toLowerCase();
12634
12647
  this.listSortByKey = this.filterType === DatoGridFilterTypes.Number && this.colDef.valueFormatter ? 'id' : 'label';
12635
12648
  this.gridQuery = gridQuery;
@@ -12664,9 +12677,11 @@ var DatoGridFilterComponent = /** @class */ (function () {
12664
12677
  var columnValues = this.getColumnValues();
12665
12678
  this.columnValues = columnValues.map(function (_a) {
12666
12679
  var value = _a.value;
12667
- return value;
12680
+ return !isNil(_this.pivotColumn) && value ? value[_this.colField] : value;
12681
+ });
12682
+ this.listOptions = columnValues.map(function (colValue) {
12683
+ return mapToListItemWithFormatted(colValue, !isNil(_this.pivotColumn) && _this.colField);
12668
12684
  });
12669
- this.listOptions = columnValues.map(mapToListItemWithFormatted);
12670
12685
  }
12671
12686
  }
12672
12687
  else {
@@ -12704,6 +12719,7 @@ var DatoGridFilterComponent = /** @class */ (function () {
12704
12719
  isEmpty(filter)
12705
12720
  ? this.gridService.clearColumnFilter(this.colField)
12706
12721
  : this.gridService.setColumnFilter(column, filter);
12722
+ this.gridService.notifyFilterUpdate();
12707
12723
  }
12708
12724
  };
12709
12725
  DatoGridFilterComponent.prototype.clearFilters = function () {
@@ -12757,19 +12773,25 @@ var DatoGridFilterComponent = /** @class */ (function () {
12757
12773
  var _this = this;
12758
12774
  var _a = this.filterForm.value, byValue = _a.byValue, conditional = _a.conditional;
12759
12775
  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
12776
  if (this.filterSections.Conditional) {
12768
12777
  this.setConditionalFilter(filter, conditional);
12769
12778
  }
12770
12779
  if (this.filterSections.By_Value) {
12771
12780
  this.setByValueFilter(filter, byValue);
12772
12781
  }
12782
+ /** If filters applied, add the extra properties to be used by pivot mode */
12783
+ if (filter.byValue || filter.conditional) {
12784
+ filter.colId = this.colDef.colId;
12785
+ filter.pivotKeys = this.pivotKeys;
12786
+ if (this.pivotColumn) {
12787
+ filter.pivotFieldsMap = this.getPivotFields(this.pivotColumn.getParent()).reduce(function (fieldMap, field, index) {
12788
+ if (_this.pivotKeys[index]) {
12789
+ fieldMap[field] = _this.pivotKeys[index];
12790
+ }
12791
+ return fieldMap;
12792
+ }, {});
12793
+ }
12794
+ }
12773
12795
  return filter;
12774
12796
  };
12775
12797
  DatoGridFilterComponent.prototype.initForm = function () {
@@ -14151,12 +14173,45 @@ var GridService = /** @class */ (function () {
14151
14173
  });
14152
14174
  this.notifyFilterUpdate();
14153
14175
  };
14154
- GridService.prototype.setColumnFilter = function (column, filter) {
14176
+ GridService.prototype.setColumnFilter = function (column, filter, notifyGrid) {
14177
+ if (notifyGrid === void 0) { notifyGrid = true; }
14155
14178
  this._logEvent("Grids - Filter Applied" /* GRID_FILTER_APPLIED */, {
14156
14179
  column: column.getColId(),
14157
14180
  numOfConditions: (filter.conditional && filter.conditional.conditions.length) || 0,
14158
14181
  byValue: !!filter.byValue ? 'Yes' : 'No'
14159
14182
  });
14183
+ this.updateFilter(column, filter);
14184
+ if (notifyGrid) {
14185
+ this.notifyFilterUpdate();
14186
+ }
14187
+ };
14188
+ GridService.prototype.setGridFilters = function (filters) {
14189
+ var e_2, _a;
14190
+ if (this.api) {
14191
+ try {
14192
+ for (var filters_1 = __values(filters), filters_1_1 = filters_1.next(); !filters_1_1.done; filters_1_1 = filters_1.next()) {
14193
+ var filter = filters_1_1.value.filter;
14194
+ var column = this.api.columns.getColumn(filter.colId);
14195
+ if (column) {
14196
+ this.setColumnFilter(column, filter);
14197
+ }
14198
+ else {
14199
+ var pivotColumn = this.gridQuery.getSecondaryColumn(filter.colId);
14200
+ this.setColumnFilter(pivotColumn, filter);
14201
+ }
14202
+ }
14203
+ }
14204
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
14205
+ finally {
14206
+ try {
14207
+ if (filters_1_1 && !filters_1_1.done && (_a = filters_1.return)) _a.call(filters_1);
14208
+ }
14209
+ finally { if (e_2) throw e_2.error; }
14210
+ }
14211
+ this.notifyFilterUpdate();
14212
+ }
14213
+ };
14214
+ GridService.prototype.updateFilter = function (column, filter) {
14160
14215
  var colField = getColField(column.getColDef());
14161
14216
  this.store.update(function (state) {
14162
14217
  var _a;
@@ -14164,7 +14219,6 @@ var GridService = /** @class */ (function () {
14164
14219
  settings: __assign(__assign({}, state.settings), { filter: __assign(__assign({}, state.settings.filter), (_a = {}, _a[colField] = filter, _a)) })
14165
14220
  };
14166
14221
  });
14167
- this.notifyFilterUpdate();
14168
14222
  };
14169
14223
  GridService.prototype.setSearchTerm = function (searchTerm) {
14170
14224
  this.store.update(function (state) {
@@ -14212,8 +14266,7 @@ var GridService = /** @class */ (function () {
14212
14266
  this.updateSettings({ gridAlignment: gridAlignment, columnsSizes: null });
14213
14267
  };
14214
14268
  GridService.prototype.saveSettingsToServer = function (settings) {
14215
- var isGlobal = this.gridQuery.getGridOptions().isGlobalSettings;
14216
- this.storageAPI.set(this.gridName, settings, isGlobal);
14269
+ this.storageAPI.set(this.gridName, settings);
14217
14270
  };
14218
14271
  /**
14219
14272
  * @internal used to log grid events to the platform's logging service
@@ -14457,7 +14510,7 @@ var GridService = /** @class */ (function () {
14457
14510
  this.api.grid.onFilterChanged();
14458
14511
  };
14459
14512
  GridService.prototype.buildServerRequestFilters = function (filter) {
14460
- var e_2, _a;
14513
+ var e_3, _a;
14461
14514
  var columnsFilters = {};
14462
14515
  try {
14463
14516
  for (var _b = __values(Object.entries(filter)), _c = _b.next(); !_c.done; _c = _b.next()) {
@@ -14493,12 +14546,12 @@ var GridService = /** @class */ (function () {
14493
14546
  }
14494
14547
  }
14495
14548
  }
14496
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
14549
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
14497
14550
  finally {
14498
14551
  try {
14499
14552
  if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
14500
14553
  }
14501
- finally { if (e_2) throw e_2.error; }
14554
+ finally { if (e_3) throw e_3.error; }
14502
14555
  }
14503
14556
  return columnsFilters;
14504
14557
  };
@@ -14551,7 +14604,7 @@ var GridService = /** @class */ (function () {
14551
14604
  return { operator: OperatorTypes.AND, filters: [columnFilter, searchFilter] };
14552
14605
  };
14553
14606
  GridService.prototype.buildServerColumnFilters_v2_1 = function (filter) {
14554
- var e_3, _a;
14607
+ var e_4, _a;
14555
14608
  var columnFilters = [];
14556
14609
  try {
14557
14610
  for (var _b = __values(Object.entries(filter)), _c = _b.next(); !_c.done; _c = _b.next()) {
@@ -14576,12 +14629,12 @@ var GridService = /** @class */ (function () {
14576
14629
  columnFilters.push(columnFilter);
14577
14630
  }
14578
14631
  }
14579
- catch (e_3_1) { e_3 = { error: e_3_1 }; }
14632
+ catch (e_4_1) { e_4 = { error: e_4_1 }; }
14580
14633
  finally {
14581
14634
  try {
14582
14635
  if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
14583
14636
  }
14584
- finally { if (e_3) throw e_3.error; }
14637
+ finally { if (e_4) throw e_4.error; }
14585
14638
  }
14586
14639
  return columnFilters;
14587
14640
  };
@@ -14674,26 +14727,14 @@ var GridService = /** @class */ (function () {
14674
14727
  /**
14675
14728
  * When pivoting,
14676
14729
  * we add the field name to the column header class in order to access it through the auto generated pivot column.
14677
- * @private
14678
14730
  */
14679
14731
  GridService.prototype.initPivotSecondaryColsProcess = function (_a) {
14732
+ var _this = this;
14680
14733
  var gridOptions = _a.gridOptions;
14681
14734
  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
- }
14735
+ var userProvidedColDef = colDef.pivotValueColumn && colDef.pivotValueColumn.getUserProvidedColDef();
14736
+ if (userProvidedColDef) {
14737
+ colDef.filter = userProvidedColDef.filter;
14697
14738
  }
14698
14739
  if (colDef.pivotKeys) {
14699
14740
  colDef.pivotKeys = colDef.pivotKeys.map(function (key) {
@@ -14709,7 +14750,7 @@ var GridService = /** @class */ (function () {
14709
14750
  var field = parsedValue.field, value = parsedValue.value;
14710
14751
  colGroupDef.headerClass = [field];
14711
14752
  colGroupDef.headerName = value;
14712
- if (colGroupDef.children && colGroupDef.children.length > 1) {
14753
+ if (colGroupDef.children && colGroupDef.children.length > 0) {
14713
14754
  colGroupDef.headerClass.push('group-pivot-cell');
14714
14755
  }
14715
14756
  }
@@ -14719,7 +14760,7 @@ var GridService = /** @class */ (function () {
14719
14760
  var pivotTotalColumnIds = colChild && colChild.pivotTotalColumnIds;
14720
14761
  if (pivotTotalColumnIds && pivotTotalColumnIds.length > 0) {
14721
14762
  colGroupDef.headerClass = ['total-pivot-cell'];
14722
- colGroupDef.headerName = 'Total';
14763
+ colGroupDef.headerName = _this.translate.transform('core.total');
14723
14764
  }
14724
14765
  }
14725
14766
  else {
@@ -14736,7 +14777,7 @@ var GridService = /** @class */ (function () {
14736
14777
  GridService.prototype.setPivotModeRows = function (data) {
14737
14778
  var pivotColumns = this.gridQuery.getAllPivotColumns();
14738
14779
  var convertedData = data.map(function (currentValue, index) {
14739
- var e_4, _a;
14780
+ var e_5, _a;
14740
14781
  var mappedValues = __assign({}, currentValue);
14741
14782
  try {
14742
14783
  for (var pivotColumns_1 = __values(pivotColumns), pivotColumns_1_1 = pivotColumns_1.next(); !pivotColumns_1_1.done; pivotColumns_1_1 = pivotColumns_1.next()) {
@@ -14746,12 +14787,12 @@ var GridService = /** @class */ (function () {
14746
14787
  mappedValues[field] = JSON.stringify(pivotValue);
14747
14788
  }
14748
14789
  }
14749
- catch (e_4_1) { e_4 = { error: e_4_1 }; }
14790
+ catch (e_5_1) { e_5 = { error: e_5_1 }; }
14750
14791
  finally {
14751
14792
  try {
14752
14793
  if (pivotColumns_1_1 && !pivotColumns_1_1.done && (_a = pivotColumns_1.return)) _a.call(pivotColumns_1);
14753
14794
  }
14754
- finally { if (e_4) throw e_4.error; }
14795
+ finally { if (e_5) throw e_5.error; }
14755
14796
  }
14756
14797
  return mappedValues;
14757
14798
  });
@@ -15223,10 +15264,7 @@ var DatoGridControllerComponent = /** @class */ (function () {
15223
15264
  .pipe(switchMap(function () {
15224
15265
  _this.gridOptions = _this.normalizeOptions();
15225
15266
  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);
15267
+ var settingsLoader = _this.gridOptions.saveSettings === false ? of(null) : _this.storageAPI.get(_this.gridOptions.gridName);
15230
15268
  return combineLatest([agGrid.gridReady, settingsLoader]);
15231
15269
  }), untilDestroyed(this))
15232
15270
  .subscribe(function (_a) {
@@ -15270,6 +15308,9 @@ var DatoGridControllerComponent = /** @class */ (function () {
15270
15308
  DatoGridControllerComponent.prototype.setGridRows = function (data) {
15271
15309
  this.gridService.setRows(data);
15272
15310
  };
15311
+ DatoGridControllerComponent.prototype.setGridFilters = function (filters) {
15312
+ this.gridService.setGridFilters(filters);
15313
+ };
15273
15314
  DatoGridControllerComponent.prototype.onFilterChanged = function () {
15274
15315
  return this.gridQuery.filterChanged();
15275
15316
  };
@@ -16181,8 +16222,11 @@ var DatoGridPaginationV2Component = /** @class */ (function () {
16181
16222
  return page;
16182
16223
  };
16183
16224
  DatoGridPaginationV2Component.prototype.toggleGroupsState = function () {
16184
- this.isExpanded ? this.gridApi.collapseAll() : this.gridApi.expandAll();
16225
+ var _this = this;
16185
16226
  this.isExpanded = !this.isExpanded;
16227
+ this.gridApi.forEachNode(function (node) {
16228
+ node.setExpanded(_this.isExpanded);
16229
+ });
16186
16230
  };
16187
16231
  DatoGridPaginationV2Component.prototype.autoFitGrid = function (type) {
16188
16232
  this.gridService.fitGrid(type);
@@ -16275,7 +16319,7 @@ var DatoGridPaginationV2Component = /** @class */ (function () {
16275
16319
  Component({
16276
16320
  selector: 'dato-grid-pagination-v2',
16277
16321
  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",
16322
+ 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
16323
  providers: [DecimalPipe],
16280
16324
  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
16325
  }),
@@ -16497,18 +16541,6 @@ var DatoGridV2ToolbarComponent = /** @class */ (function () {
16497
16541
  this.registerGroupListeners();
16498
16542
  this.subscribeRowsSelectionData();
16499
16543
  };
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
16544
  DatoGridV2ToolbarComponent.prototype.onActionClick = function (action) {
16513
16545
  if (isFunction(action.onClick)) {
16514
16546
  var selectedRowsCount = this.gridController.gridQuery.getSelectedRowsCount();
@@ -20980,40 +21012,6 @@ var DatoEditableHeaderModule = /** @class */ (function () {
20980
21012
  * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
20981
21013
  */
20982
21014
 
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
21015
  /**
21018
21016
  * @license
21019
21017
  * Copyright Datorama. All Rights Reserved.
@@ -21027,12 +21025,12 @@ var getTinymce = function () {
21027
21025
  var ɵ0$3 = getTinymce;
21028
21026
  var DatoRichTextDirective = /** @class */ (function (_super) {
21029
21027
  __extends(DatoRichTextDirective, _super);
21030
- function DatoRichTextDirective(ngZone, richTextService, config, host) {
21028
+ function DatoRichTextDirective(ngZone, http, host, config) {
21031
21029
  var _this = _super.call(this) || this;
21032
21030
  _this.ngZone = ngZone;
21033
- _this.richTextService = richTextService;
21034
- _this.config = config;
21031
+ _this.http = http;
21035
21032
  _this.host = host;
21033
+ _this.config = config;
21036
21034
  _this.autocompleteOptions = {};
21037
21035
  _this.forcePlainTextPasting = false;
21038
21036
  _this.format = 'html';
@@ -21066,11 +21064,28 @@ var DatoRichTextDirective = /** @class */ (function (_super) {
21066
21064
  base: this.config.paths.richText,
21067
21065
  query: ''
21068
21066
  };
21069
- this.richTextService
21070
- .getLib(appendScript, appendStyle)
21071
- .pipe(untilDestroyed(this))
21072
- .subscribe(function () {
21073
- _this.init.call(_this);
21067
+ /**
21068
+ * We support only one instance in load time
21069
+ */
21070
+ if (window.tinymce) {
21071
+ this.init.call(this);
21072
+ }
21073
+ else {
21074
+ this.loadLib().subscribe(function (lib) {
21075
+ appendScript(lib, 'rich-text-editor');
21076
+ _this.init.call(_this);
21077
+ _this.loadAutoCompleteStyle();
21078
+ });
21079
+ }
21080
+ };
21081
+ DatoRichTextDirective.prototype.loadLib = function () {
21082
+ return this.http.get(this.config.paths.richText + "/index.js", { responseType: 'text' });
21083
+ };
21084
+ DatoRichTextDirective.prototype.loadAutoCompleteStyle = function () {
21085
+ this.http
21086
+ .get(this.config.paths.richText + "/plugins/autocomplete/plugin.css", { responseType: 'text' })
21087
+ .subscribe(function (style) {
21088
+ appendStyle(style, 'tinymce-autocomplete');
21074
21089
  });
21075
21090
  };
21076
21091
  DatoRichTextDirective.prototype.initEditor = function (_, editor) {
@@ -21163,9 +21178,9 @@ var DatoRichTextDirective = /** @class */ (function (_super) {
21163
21178
  var DatoRichTextDirective_1;
21164
21179
  DatoRichTextDirective.ctorParameters = function () { return [
21165
21180
  { type: NgZone },
21166
- { type: RichTextService },
21167
- { type: undefined, decorators: [{ type: Inject, args: [DATO_CORE_CONFIG,] }] },
21168
- { type: ElementRef }
21181
+ { type: HttpClient },
21182
+ { type: ElementRef },
21183
+ { type: undefined, decorators: [{ type: Inject, args: [DATO_CORE_CONFIG,] }] }
21169
21184
  ]; };
21170
21185
  __decorate([
21171
21186
  Input(),
@@ -21231,9 +21246,10 @@ var DatoRichTextDirective = /** @class */ (function (_super) {
21231
21246
  }
21232
21247
  ]
21233
21248
  }),
21234
- __param(2, Inject(DATO_CORE_CONFIG)),
21249
+ __param(3, Inject(DATO_CORE_CONFIG)),
21235
21250
  __metadata("design:paramtypes", [NgZone,
21236
- RichTextService, Object, ElementRef])
21251
+ HttpClient,
21252
+ ElementRef, Object])
21237
21253
  ], DatoRichTextDirective);
21238
21254
  return DatoRichTextDirective;
21239
21255
  }(BaseCustomControl));
@@ -23756,9 +23772,7 @@ var DatoBreadcrumbsComponent = /** @class */ (function () {
23756
23772
  };
23757
23773
  DatoBreadcrumbsComponent.prototype.initEditableHeader = function () {
23758
23774
  var _this = this;
23759
- this.headerControl.valueChanges
23760
- .pipe(debounceTime(300), untilDestroyed(this))
23761
- .subscribe(function (res) {
23775
+ this.headerControl.valueChanges.pipe(debounceTime(300), untilDestroyed(this)).subscribe(function (res) {
23762
23776
  _this.updateEditableText.emit(res);
23763
23777
  _this.cdr.detectChanges();
23764
23778
  });
@@ -25101,7 +25115,7 @@ function fixNgLeaks() {
25101
25115
  };
25102
25116
  }
25103
25117
 
25104
- window.coreVersion = '21.4.0-rc.';
25118
+ window.coreVersion = '22.0.0';
25105
25119
 
25106
25120
  /**
25107
25121
  * @license
@@ -25115,5 +25129,5 @@ window.coreVersion = '21.4.0-rc.';
25115
25129
  * Generated bundle index. Do not edit.
25116
25130
  */
25117
25131
 
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 };
25132
+ 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
25133
  //# sourceMappingURL=datorama-core.js.map