@datorama/core 22.0.6-rc.1 → 22.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/bundles/datorama-core.umd.js +158 -209
  2. package/bundles/datorama-core.umd.js.map +1 -1
  3. package/bundles/datorama-core.umd.min.js +25 -25
  4. package/bundles/datorama-core.umd.min.js.map +1 -1
  5. package/datorama-core.d.ts +0 -1
  6. package/datorama-core.metadata.json +1 -1
  7. package/esm2015/datorama-core.js +1 -2
  8. package/esm2015/lib/accordion/accordion/accordion.component.js +3 -11
  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 +2 -5
  12. package/esm2015/lib/grid-v2/grid-settings.js +2 -2
  13. package/esm2015/lib/grid-v2/grid-store/grid.query.js +3 -3
  14. package/esm2015/lib/grid-v2/grid-store/grid.service.js +2 -3
  15. package/esm2015/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +1 -7
  16. package/esm2015/lib/icon/icon.types.js +1 -1
  17. package/esm2015/lib/rich-text/rich-text.directive.js +33 -15
  18. package/esm2015/lib/select/select.component.js +16 -16
  19. package/esm2015/lib/sortable/sortable.component.js +2 -7
  20. package/esm2015/lib/version.js +2 -2
  21. package/esm5/datorama-core.js +1 -2
  22. package/esm5/lib/accordion/accordion/accordion.component.js +3 -15
  23. package/esm5/lib/breadcrumbs/breadcrumbs.component.js +2 -4
  24. package/esm5/lib/grid-v2/grid/grid-v2.types.js +1 -1
  25. package/esm5/lib/grid-v2/grid-controller/grid-controller.component.js +2 -5
  26. package/esm5/lib/grid-v2/grid-settings.js +2 -2
  27. package/esm5/lib/grid-v2/grid-store/grid.query.js +3 -3
  28. package/esm5/lib/grid-v2/grid-store/grid.service.js +2 -3
  29. package/esm5/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +1 -13
  30. package/esm5/lib/icon/icon.types.js +1 -1
  31. package/esm5/lib/rich-text/rich-text.directive.js +34 -16
  32. package/esm5/lib/select/select.component.js +16 -17
  33. package/esm5/lib/sortable/sortable.component.js +2 -7
  34. package/esm5/lib/version.js +2 -2
  35. package/fesm2015/datorama-core.js +152 -190
  36. package/fesm2015/datorama-core.js.map +1 -1
  37. package/fesm5/datorama-core.js +159 -209
  38. package/fesm5/datorama-core.js.map +1 -1
  39. package/lib/accordion/accordion/accordion.component.d.ts +1 -4
  40. package/lib/grid-v2/grid/grid-v2.types.d.ts +1 -1
  41. package/lib/grid-v2/grid-settings.d.ts +2 -2
  42. package/lib/grid-v2/grid-toolbar/grid-toolbar.component.d.ts +0 -2
  43. package/lib/rich-text/rich-text.directive.d.ts +6 -4
  44. package/lib/select/select.component.d.ts +0 -1
  45. package/lib/sortable/sortable.component.d.ts +1 -3
  46. package/package.json +2 -2
  47. package/esm2015/lib/rich-text/rich-text.service.js +0 -50
  48. package/esm5/lib/rich-text/rich-text.service.js +0 -51
  49. package/lib/rich-text/rich-text.service.d.ts +0 -10
@@ -7609,114 +7609,6 @@
7609
7609
  return false;
7610
7610
  };
7611
7611
 
7612
- /**
7613
- * @license
7614
- * Copyright Datorama. All Rights Reserved.
7615
- *
7616
- * Use of this source code is governed by an Apache License 2.0 license that can be
7617
- * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
7618
- */
7619
- var DatoSortableComponent = /** @class */ (function () {
7620
- function DatoSortableComponent() {
7621
- this.list = [];
7622
- this.noop = noop;
7623
- /**
7624
- * Sortablejs options
7625
- */
7626
- this.datoOptions = {};
7627
- /**
7628
- * Fired once items order has changed
7629
- */
7630
- this.orderUpdated = new core.EventEmitter();
7631
- this.defaultOptions = {
7632
- handle: '.dato-sortable-handler',
7633
- ghostClass: 'dato-sortable-ghost',
7634
- chosenClass: 'dato-sortable-chosen',
7635
- dragClass: 'dato-sortable-drag'
7636
- };
7637
- }
7638
- Object.defineProperty(DatoSortableComponent.prototype, "datoList", {
7639
- set: function (list) {
7640
- var isArr = Array.isArray(list);
7641
- var validInput = isArr || (list instanceof forms.FormControl && Array.isArray(list.value));
7642
- if (!validInput) {
7643
- throw new Error("DatoSortable - datoList expected array or form control but got " + typeof list);
7644
- }
7645
- if (!isArr) {
7646
- this.formControl = list;
7647
- this.list = __spread(this.formControl.value);
7648
- }
7649
- else {
7650
- this.list = list;
7651
- }
7652
- },
7653
- enumerable: true,
7654
- configurable: true
7655
- });
7656
- DatoSortableComponent.prototype.ngOnInit = function () {
7657
- var _this = this;
7658
- var _a = this.datoOptions, dynamicGhostHeight = _a.dynamicGhostHeight, hasStaticItems = _a.hasStaticItems, sortableOptions = __rest(_a, ["dynamicGhostHeight", "hasStaticItems"]);
7659
- var mergedOptions = __assign(__assign(__assign({}, this.defaultOptions), sortableOptions), { onUpdate: function (event) { return (sortableOptions.onUpdate ? sortableOptions.onUpdate(event) : _this.emitUpdate(event)); } });
7660
- if (dynamicGhostHeight) {
7661
- mergedOptions.onStart = function (event) { return _this.setGhostHeight(event); };
7662
- }
7663
- if (hasStaticItems) {
7664
- mergedOptions.onMove = function (event) {
7665
- if (event.related.classList.contains('dato-sortable-static-item')) {
7666
- return false;
7667
- }
7668
- return sortableOptions.onMove ? sortableOptions.onMove(event) : true;
7669
- };
7670
- }
7671
- this.mergedOptions = mergedOptions;
7672
- };
7673
- DatoSortableComponent.prototype.emitUpdate = function (event) {
7674
- if (this.formControl) {
7675
- this.formControl.setValue(this.list);
7676
- }
7677
- this.orderUpdated.emit(event);
7678
- };
7679
- DatoSortableComponent.prototype.setGhostHeight = function (event) {
7680
- var originalEl = event.from.children[event.oldIndex];
7681
- setStyle(originalEl, 'display', 'block');
7682
- var height = originalEl.getBoundingClientRect().height;
7683
- setStyle(originalEl, 'display', 'none');
7684
- var ghostEl = query('.dato-sortable-ghost');
7685
- setStyle(ghostEl, 'height', height + "px");
7686
- };
7687
- __decorate([
7688
- core.ContentChildren(DatoAccordionGroupComponent),
7689
- __metadata("design:type", core.QueryList)
7690
- ], DatoSortableComponent.prototype, "accordionGroups", void 0);
7691
- __decorate([
7692
- core.Input(),
7693
- __metadata("design:type", Object),
7694
- __metadata("design:paramtypes", [Object])
7695
- ], DatoSortableComponent.prototype, "datoList", null);
7696
- __decorate([
7697
- core.Input(),
7698
- __metadata("design:type", Object)
7699
- ], DatoSortableComponent.prototype, "datoOptions", void 0);
7700
- __decorate([
7701
- core.Input(),
7702
- __metadata("design:type", String)
7703
- ], DatoSortableComponent.prototype, "containerClass", void 0);
7704
- __decorate([
7705
- core.Output(),
7706
- __metadata("design:type", Object)
7707
- ], DatoSortableComponent.prototype, "orderUpdated", void 0);
7708
- DatoSortableComponent = __decorate([
7709
- core.Component({
7710
- selector: 'dato-sortable',
7711
- template: "<section [sortablejs]=\"list\" [sortablejsOptions]=\"mergedOptions\" [ngClass]=\"containerClass\"\n (update.stop)=\"noop()\" (add.stop)=\"noop()\" (sort.stop)=\"noop()\" (remove.stop)=\"noop()\"\n (filter.stop)=\"noop()\" (change.stop)=\"noop()\" (drag.stop)=\"noop()\">\n <ng-content></ng-content>\n</section>",
7712
- changeDetection: core.ChangeDetectionStrategy.OnPush,
7713
- encapsulation: core.ViewEncapsulation.None,
7714
- styles: ["dato-sortable{display:inline-block}dato-sortable .dato-sortable-handler{cursor:move;cursor:-webkit-grabbing}.dato-sortable-ghost>*{display:none!important}.dato-sortable-drag{box-shadow:0 2px 14px 0 rgba(0,0,0,.2)}"]
7715
- })
7716
- ], DatoSortableComponent);
7717
- return DatoSortableComponent;
7718
- }());
7719
-
7720
7612
  /**
7721
7613
  * @license
7722
7614
  * Copyright Datorama. All Rights Reserved.
@@ -7762,13 +7654,6 @@
7762
7654
  enumerable: true,
7763
7655
  configurable: true
7764
7656
  });
7765
- Object.defineProperty(DatoAccordionComponent.prototype, "groups", {
7766
- get: function () {
7767
- return this.sortable && this.sortable.accordionGroups.length > 0 ? this.sortable.accordionGroups : this.childGroups;
7768
- },
7769
- enumerable: true,
7770
- configurable: true
7771
- });
7772
7657
  DatoAccordionComponent.prototype.ngOnChanges = function (changes) {
7773
7658
  var _this = this;
7774
7659
  if (changes.expandAll && !changes.expandAll.firstChange) {
@@ -7986,15 +7871,11 @@
7986
7871
  __decorate([
7987
7872
  core.ContentChildren(DatoAccordionGroupComponent),
7988
7873
  __metadata("design:type", core.QueryList)
7989
- ], DatoAccordionComponent.prototype, "childGroups", void 0);
7874
+ ], DatoAccordionComponent.prototype, "groups", void 0);
7990
7875
  __decorate([
7991
7876
  core.ContentChildren(DatoAccordionComponent_1, { descendants: true }),
7992
7877
  __metadata("design:type", core.QueryList)
7993
7878
  ], DatoAccordionComponent.prototype, "childAccordion", void 0);
7994
- __decorate([
7995
- core.ContentChild(DatoSortableComponent, { static: true }),
7996
- __metadata("design:type", DatoSortableComponent)
7997
- ], DatoAccordionComponent.prototype, "sortable", void 0);
7998
7879
  __decorate([
7999
7880
  core.Input(),
8000
7881
  __metadata("design:type", Object)
@@ -8748,8 +8629,9 @@
8748
8629
  DatoSelectComponent.prototype.writeValue = function (activeOptions) {
8749
8630
  this._model = activeOptions ? akita.coerceArray(activeOptions) : [];
8750
8631
  if (this.options) {
8632
+ var overTheLimit = this.limitSelectedTo && this.isMulti && this._model.length >= this.limitSelectedTo;
8751
8633
  this.markAsActive(this._model, { deselectAll: true });
8752
- this.limitSelectedTo && this.updateDisabledState();
8634
+ overTheLimit && this.updateDisabledState();
8753
8635
  }
8754
8636
  /** For later updates */
8755
8637
  this.cdr.markForCheck();
@@ -8786,7 +8668,7 @@
8786
8668
  */
8787
8669
  if (this.hasValue && this._initialOpen) {
8788
8670
  this.markAsActive(this._model);
8789
- if (this.limitSelectedTo) {
8671
+ if (this.limitSelectedTo && this._model.length === this.limitSelectedTo) {
8790
8672
  this.updateDisabledState();
8791
8673
  }
8792
8674
  this._initialOpen = false;
@@ -8866,8 +8748,8 @@
8866
8748
  }
8867
8749
  }
8868
8750
  this.onChange(this._model);
8751
+ this.datoOverlay.scheduleUpdate();
8869
8752
  this.cdr.markForCheck();
8870
- this.asyncUpdateDropdownPosition();
8871
8753
  };
8872
8754
  DatoSelectComponent.prototype.reorderOptions = function (newOrder) {
8873
8755
  this._model = newOrder;
@@ -8875,6 +8757,7 @@
8875
8757
  };
8876
8758
  DatoSelectComponent.prototype.removeOption = function (option) {
8877
8759
  var _this = this;
8760
+ var updateDisabled = this.limitSelectedTo && this._model.length === this.limitSelectedTo;
8878
8761
  this._model = this._model.filter(function (current) { return current[_this.idKey] !== option[_this.idKey]; });
8879
8762
  var optionToRemove = this.options.find(function (datoOption) { return datoOption.option && datoOption.option[_this.idKey] === option[_this.idKey]; });
8880
8763
  /**
@@ -8884,10 +8767,12 @@
8884
8767
  if (optionToRemove) {
8885
8768
  optionToRemove.active = false;
8886
8769
  }
8887
- this.limitSelectedTo && this.updateDisabledState();
8770
+ updateDisabled && this.updateDisabledState();
8888
8771
  this.onChange(this._model);
8889
8772
  this.cdr.markForCheck();
8890
- this.asyncUpdateDropdownPosition();
8773
+ if (this.datoOverlay.attached) {
8774
+ this.datoOverlay.scheduleUpdate();
8775
+ }
8891
8776
  };
8892
8777
  DatoSelectComponent.prototype.preventBodyScroll = function (event) {
8893
8778
  if (isArrowUpDown(event)) {
@@ -9142,7 +9027,7 @@
9142
9027
  _this.searchTerm = value;
9143
9028
  _this.keyManager.setActiveItem(-1);
9144
9029
  _this.cdr.markForCheck();
9145
- _this.asyncUpdateDropdownPosition();
9030
+ _this.datoOverlay && _this.datoOverlay.scheduleUpdate();
9146
9031
  });
9147
9032
  };
9148
9033
  /**
@@ -9232,6 +9117,9 @@
9232
9117
  if (!datoOption) {
9233
9118
  return;
9234
9119
  }
9120
+ var modelLength = this._model.length;
9121
+ var updateDisabled = this.limitSelectedTo &&
9122
+ (modelLength === this.limitSelectedTo || (modelLength === this.limitSelectedTo - 1 && !datoOption.active));
9235
9123
  datoOption.active = !datoOption.active;
9236
9124
  var rawOption = datoOption.option;
9237
9125
  if (datoOption.active) {
@@ -9240,10 +9128,10 @@
9240
9128
  else {
9241
9129
  this._model = this._model.filter(function (current) { return current[_this.idKey] !== rawOption[_this.idKey]; });
9242
9130
  }
9243
- this.limitSelectedTo && this.updateDisabledState();
9131
+ updateDisabled && this.updateDisabledState();
9244
9132
  this.onChange(this._model);
9245
9133
  this.cdr.markForCheck();
9246
- this.asyncUpdateDropdownPosition();
9134
+ this.datoOverlay.scheduleUpdate();
9247
9135
  };
9248
9136
  DatoSelectComponent.prototype.activateInfiniteScroll = function () {
9249
9137
  var _this = this;
@@ -9296,14 +9184,6 @@
9296
9184
  finally { if (e_9) throw e_9.error; }
9297
9185
  }
9298
9186
  };
9299
- // Make sure the overlay will be update AFTER Change Detection was done
9300
- // So the items in the input (and its height) is update
9301
- DatoSelectComponent.prototype.asyncUpdateDropdownPosition = function () {
9302
- var _this = this;
9303
- if (this.datoOverlay && this.datoOverlay.attached) {
9304
- setTimeout(function () { return _this.datoOverlay.scheduleUpdate(); }, 0);
9305
- }
9306
- };
9307
9187
  DatoSelectComponent.ctorParameters = function () { return [
9308
9188
  { type: core.ChangeDetectorRef },
9309
9189
  { type: DatoTranslateService },
@@ -10296,6 +10176,110 @@
10296
10176
  return DatoOptionsModule;
10297
10177
  }());
10298
10178
 
10179
+ /**
10180
+ * @license
10181
+ * Copyright Datorama. All Rights Reserved.
10182
+ *
10183
+ * Use of this source code is governed by an Apache License 2.0 license that can be
10184
+ * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
10185
+ */
10186
+ var DatoSortableComponent = /** @class */ (function () {
10187
+ function DatoSortableComponent() {
10188
+ this.list = [];
10189
+ this.noop = noop;
10190
+ /**
10191
+ * Sortablejs options
10192
+ */
10193
+ this.datoOptions = {};
10194
+ /**
10195
+ * Fired once items order has changed
10196
+ */
10197
+ this.orderUpdated = new core.EventEmitter();
10198
+ this.defaultOptions = {
10199
+ handle: '.dato-sortable-handler',
10200
+ ghostClass: 'dato-sortable-ghost',
10201
+ chosenClass: 'dato-sortable-chosen',
10202
+ dragClass: 'dato-sortable-drag'
10203
+ };
10204
+ }
10205
+ Object.defineProperty(DatoSortableComponent.prototype, "datoList", {
10206
+ set: function (list) {
10207
+ var isArr = Array.isArray(list);
10208
+ var validInput = isArr || (list instanceof forms.FormControl && Array.isArray(list.value));
10209
+ if (!validInput) {
10210
+ throw new Error("DatoSortable - datoList expected array or form control but got " + typeof list);
10211
+ }
10212
+ if (!isArr) {
10213
+ this.formControl = list;
10214
+ this.list = __spread(this.formControl.value);
10215
+ }
10216
+ else {
10217
+ this.list = list;
10218
+ }
10219
+ },
10220
+ enumerable: true,
10221
+ configurable: true
10222
+ });
10223
+ DatoSortableComponent.prototype.ngOnInit = function () {
10224
+ var _this = this;
10225
+ var _a = this.datoOptions, dynamicGhostHeight = _a.dynamicGhostHeight, hasStaticItems = _a.hasStaticItems, sortableOptions = __rest(_a, ["dynamicGhostHeight", "hasStaticItems"]);
10226
+ var mergedOptions = __assign(__assign(__assign({}, this.defaultOptions), sortableOptions), { onUpdate: function (event) { return (sortableOptions.onUpdate ? sortableOptions.onUpdate(event) : _this.emitUpdate(event)); } });
10227
+ if (dynamicGhostHeight) {
10228
+ mergedOptions.onStart = function (event) { return _this.setGhostHeight(event); };
10229
+ }
10230
+ if (hasStaticItems) {
10231
+ mergedOptions.onMove = function (event) {
10232
+ if (event.related.classList.contains('dato-sortable-static-item')) {
10233
+ return false;
10234
+ }
10235
+ return sortableOptions.onMove ? sortableOptions.onMove(event) : true;
10236
+ };
10237
+ }
10238
+ this.mergedOptions = mergedOptions;
10239
+ };
10240
+ DatoSortableComponent.prototype.emitUpdate = function (event) {
10241
+ if (this.formControl) {
10242
+ this.formControl.setValue(this.list);
10243
+ }
10244
+ this.orderUpdated.emit(event);
10245
+ };
10246
+ DatoSortableComponent.prototype.setGhostHeight = function (event) {
10247
+ var originalEl = event.from.children[event.oldIndex];
10248
+ setStyle(originalEl, 'display', 'block');
10249
+ var height = originalEl.getBoundingClientRect().height;
10250
+ setStyle(originalEl, 'display', 'none');
10251
+ var ghostEl = query('.dato-sortable-ghost');
10252
+ setStyle(ghostEl, 'height', height + "px");
10253
+ };
10254
+ __decorate([
10255
+ core.Input(),
10256
+ __metadata("design:type", Object),
10257
+ __metadata("design:paramtypes", [Object])
10258
+ ], DatoSortableComponent.prototype, "datoList", null);
10259
+ __decorate([
10260
+ core.Input(),
10261
+ __metadata("design:type", Object)
10262
+ ], DatoSortableComponent.prototype, "datoOptions", void 0);
10263
+ __decorate([
10264
+ core.Input(),
10265
+ __metadata("design:type", String)
10266
+ ], DatoSortableComponent.prototype, "containerClass", void 0);
10267
+ __decorate([
10268
+ core.Output(),
10269
+ __metadata("design:type", Object)
10270
+ ], DatoSortableComponent.prototype, "orderUpdated", void 0);
10271
+ DatoSortableComponent = __decorate([
10272
+ core.Component({
10273
+ selector: 'dato-sortable',
10274
+ template: "<section [sortablejs]=\"list\" [sortablejsOptions]=\"mergedOptions\" [ngClass]=\"containerClass\"\n (update.stop)=\"noop()\" (add.stop)=\"noop()\" (sort.stop)=\"noop()\" (remove.stop)=\"noop()\"\n (filter.stop)=\"noop()\" (change.stop)=\"noop()\" (drag.stop)=\"noop()\">\n <ng-content></ng-content>\n</section>",
10275
+ changeDetection: core.ChangeDetectionStrategy.OnPush,
10276
+ encapsulation: core.ViewEncapsulation.None,
10277
+ styles: ["dato-sortable{display:inline-block}dato-sortable .dato-sortable-handler{cursor:move;cursor:-webkit-grabbing}.dato-sortable-ghost>*{display:none!important}.dato-sortable-drag{box-shadow:0 2px 14px 0 rgba(0,0,0,.2)}"]
10278
+ })
10279
+ ], DatoSortableComponent);
10280
+ return DatoSortableComponent;
10281
+ }());
10282
+
10299
10283
  /**
10300
10284
  * @license
10301
10285
  * Copyright Datorama. All Rights Reserved.
@@ -11604,10 +11588,10 @@
11604
11588
  var uniquePivotParents = uniq(this.api.columns.getSecondaryColumns().map(function (column) { return column.getParent(); }));
11605
11589
  var secondaryColumn = this.getSecondaryColumn(pivotedColumn.getColId());
11606
11590
  var pivotColIndex = uniquePivotParents.indexOf(secondaryColumn.getParent());
11607
- return { colId: getColField(pivotedColumn.getColDef()), sort: sort, pivotColIndex: pivotColIndex };
11591
+ return { colId: colId, sort: sort, pivotColIndex: pivotColIndex, colField: getColField(pivotedColumn.getColDef()) };
11608
11592
  }
11609
11593
  else if (column) {
11610
- return { colId: getColField(column.getColDef()), sort: sort };
11594
+ return { colId: colId, sort: sort, colField: getColField(column.getColDef()) };
11611
11595
  }
11612
11596
  }
11613
11597
  else {
@@ -12035,7 +12019,7 @@
12035
12019
  return contextActions;
12036
12020
  }
12037
12021
 
12038
- var DATO_GRID_STORAGE_API = new core.InjectionToken('DATO_GRID_STORAGE_AP');
12022
+ var DATO_GRID_STORAGE_API = new core.InjectionToken('DATO_GRID_STORAGE_API');
12039
12023
 
12040
12024
  var defaultEditableColumnRenderer = function (params) {
12041
12025
  return params && params.value ? "<div class=\"value-wrapper ellipsis\">" + params.value + "</div>" : null;
@@ -14494,8 +14478,7 @@
14494
14478
  this.updateSettings({ gridAlignment: gridAlignment, columnsSizes: null });
14495
14479
  };
14496
14480
  GridService.prototype.saveSettingsToServer = function (settings) {
14497
- var isGlobal = this.gridQuery.getGridOptions().isGlobalSettings;
14498
- this.storageAPI.set(this.gridName, settings, isGlobal);
14481
+ this.storageAPI.set(this.gridName, settings);
14499
14482
  };
14500
14483
  /**
14501
14484
  * @internal used to log grid events to the platform's logging service
@@ -15500,10 +15483,7 @@
15500
15483
  .pipe(operators.switchMap(function () {
15501
15484
  _this.gridOptions = _this.normalizeOptions();
15502
15485
  agGrid.gridOptions = _this.gridOptions;
15503
- var isGlobal = _this.gridOptions.isGlobalSettings;
15504
- var settingsLoader = _this.gridOptions.saveSettings === false
15505
- ? rxjs.of(null)
15506
- : _this.storageAPI.get(_this.gridOptions.gridName, isGlobal);
15486
+ var settingsLoader = _this.gridOptions.saveSettings === false ? rxjs.of(null) : _this.storageAPI.get(_this.gridOptions.gridName);
15507
15487
  return rxjs.combineLatest([agGrid.gridReady, settingsLoader]);
15508
15488
  }), ngxTakeUntilDestroy.untilDestroyed(this))
15509
15489
  .subscribe(function (_a) {
@@ -16783,18 +16763,6 @@
16783
16763
  this.registerGroupListeners();
16784
16764
  this.subscribeRowsSelectionData();
16785
16765
  };
16786
- DatoGridV2ToolbarComponent.prototype.getCellValueChangeEvent = function () {
16787
- var _this = this;
16788
- return this.gridController.gridQuery.waitForGrid(function () {
16789
- return _this.gridQuery.gridRef.cellValueChanged.pipe(operators.debounceTime(100), ngxTakeUntilDestroy.untilDestroyed(_this));
16790
- });
16791
- };
16792
- DatoGridV2ToolbarComponent.prototype.getRowDataUpdatedEvent = function () {
16793
- var _this = this;
16794
- return this.gridController.gridQuery.waitForGrid(function () {
16795
- return _this.gridQuery.gridRef.rowDataUpdated.pipe(operators.debounceTime(100), ngxTakeUntilDestroy.untilDestroyed(_this));
16796
- });
16797
- };
16798
16766
  DatoGridV2ToolbarComponent.prototype.onActionClick = function (action) {
16799
16767
  if (isFunction(action.onClick)) {
16800
16768
  var selectedRowsCount = this.gridController.gridQuery.getSelectedRowsCount();
@@ -21270,40 +21238,6 @@
21270
21238
  * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
21271
21239
  */
21272
21240
 
21273
- var RichTextService = /** @class */ (function () {
21274
- function RichTextService(http, config) {
21275
- this.http = http;
21276
- this.config = config;
21277
- }
21278
- RichTextService.prototype.getLib = function (appendScriptFunc, appendStyleFunc) {
21279
- if (!this.richTextScript$) {
21280
- this.initLib(appendScriptFunc, appendStyleFunc);
21281
- }
21282
- return this.richTextScript$;
21283
- };
21284
- RichTextService.prototype.initLib = function (appendScriptFunc, appendStyleFunc) {
21285
- this.richTextScript$ = rxjs.combineLatest([
21286
- this.http
21287
- .get(this.config.paths.richText + "/index.js", { responseType: 'text' })
21288
- .pipe(operators.tap(function (lib) { return appendScriptFunc(lib, 'rich-text-editor'); })),
21289
- this.http
21290
- .get(this.config.paths.richText + "/plugins/autocomplete/plugin.css", { responseType: 'text' })
21291
- .pipe(operators.tap(function (style) { return appendStyleFunc(style, 'tinymce-autocomplete'); }))
21292
- ]).pipe(operators.shareReplay(1));
21293
- };
21294
- RichTextService.ctorParameters = function () { return [
21295
- { type: http.HttpClient },
21296
- { type: undefined, decorators: [{ type: core.Inject, args: [DATO_CORE_CONFIG,] }] }
21297
- ]; };
21298
- RichTextService.ɵprov = core.ɵɵdefineInjectable({ factory: function RichTextService_Factory() { return new RichTextService(core.ɵɵinject(http.HttpClient), core.ɵɵinject(DATO_CORE_CONFIG)); }, token: RichTextService, providedIn: "root" });
21299
- RichTextService = __decorate([
21300
- core.Injectable({ providedIn: 'root' }),
21301
- __param(1, core.Inject(DATO_CORE_CONFIG)),
21302
- __metadata("design:paramtypes", [http.HttpClient, Object])
21303
- ], RichTextService);
21304
- return RichTextService;
21305
- }());
21306
-
21307
21241
  /**
21308
21242
  * @license
21309
21243
  * Copyright Datorama. All Rights Reserved.
@@ -21317,12 +21251,12 @@
21317
21251
  var ɵ0$3 = getTinymce;
21318
21252
  var DatoRichTextDirective = /** @class */ (function (_super) {
21319
21253
  __extends(DatoRichTextDirective, _super);
21320
- function DatoRichTextDirective(ngZone, richTextService, config, host) {
21254
+ function DatoRichTextDirective(ngZone, http, host, config) {
21321
21255
  var _this = _super.call(this) || this;
21322
21256
  _this.ngZone = ngZone;
21323
- _this.richTextService = richTextService;
21324
- _this.config = config;
21257
+ _this.http = http;
21325
21258
  _this.host = host;
21259
+ _this.config = config;
21326
21260
  _this.autocompleteOptions = {};
21327
21261
  _this.forcePlainTextPasting = false;
21328
21262
  _this.format = 'html';
@@ -21356,11 +21290,28 @@
21356
21290
  base: this.config.paths.richText,
21357
21291
  query: ''
21358
21292
  };
21359
- this.richTextService
21360
- .getLib(appendScript, appendStyle)
21361
- .pipe(ngxTakeUntilDestroy.untilDestroyed(this))
21362
- .subscribe(function () {
21363
- _this.init.call(_this);
21293
+ /**
21294
+ * We support only one instance in load time
21295
+ */
21296
+ if (window.tinymce) {
21297
+ this.init.call(this);
21298
+ }
21299
+ else {
21300
+ this.loadLib().subscribe(function (lib) {
21301
+ appendScript(lib, 'rich-text-editor');
21302
+ _this.init.call(_this);
21303
+ _this.loadAutoCompleteStyle();
21304
+ });
21305
+ }
21306
+ };
21307
+ DatoRichTextDirective.prototype.loadLib = function () {
21308
+ return this.http.get(this.config.paths.richText + "/index.js", { responseType: 'text' });
21309
+ };
21310
+ DatoRichTextDirective.prototype.loadAutoCompleteStyle = function () {
21311
+ this.http
21312
+ .get(this.config.paths.richText + "/plugins/autocomplete/plugin.css", { responseType: 'text' })
21313
+ .subscribe(function (style) {
21314
+ appendStyle(style, 'tinymce-autocomplete');
21364
21315
  });
21365
21316
  };
21366
21317
  DatoRichTextDirective.prototype.initEditor = function (_, editor) {
@@ -21453,9 +21404,9 @@
21453
21404
  var DatoRichTextDirective_1;
21454
21405
  DatoRichTextDirective.ctorParameters = function () { return [
21455
21406
  { type: core.NgZone },
21456
- { type: RichTextService },
21457
- { type: undefined, decorators: [{ type: core.Inject, args: [DATO_CORE_CONFIG,] }] },
21458
- { type: core.ElementRef }
21407
+ { type: http.HttpClient },
21408
+ { type: core.ElementRef },
21409
+ { type: undefined, decorators: [{ type: core.Inject, args: [DATO_CORE_CONFIG,] }] }
21459
21410
  ]; };
21460
21411
  __decorate([
21461
21412
  core.Input(),
@@ -21521,9 +21472,10 @@
21521
21472
  }
21522
21473
  ]
21523
21474
  }),
21524
- __param(2, core.Inject(DATO_CORE_CONFIG)),
21475
+ __param(3, core.Inject(DATO_CORE_CONFIG)),
21525
21476
  __metadata("design:paramtypes", [core.NgZone,
21526
- RichTextService, Object, core.ElementRef])
21477
+ http.HttpClient,
21478
+ core.ElementRef, Object])
21527
21479
  ], DatoRichTextDirective);
21528
21480
  return DatoRichTextDirective;
21529
21481
  }(BaseCustomControl));
@@ -24046,9 +23998,7 @@
24046
23998
  };
24047
23999
  DatoBreadcrumbsComponent.prototype.initEditableHeader = function () {
24048
24000
  var _this = this;
24049
- this.headerControl.valueChanges
24050
- .pipe(operators.debounceTime(300), ngxTakeUntilDestroy.untilDestroyed(this))
24051
- .subscribe(function (res) {
24001
+ this.headerControl.valueChanges.pipe(operators.debounceTime(300), ngxTakeUntilDestroy.untilDestroyed(this)).subscribe(function (res) {
24052
24002
  _this.updateEditableText.emit(res);
24053
24003
  _this.cdr.detectChanges();
24054
24004
  });
@@ -25411,7 +25361,7 @@
25411
25361
  };
25412
25362
  }
25413
25363
 
25414
- window.coreVersion = '22.1.5-rc.';
25364
+ window.coreVersion = '22.0.6';
25415
25365
 
25416
25366
  exports.APP_TRANSLATE = APP_TRANSLATE;
25417
25367
  exports.AceService = AceService;
@@ -25853,7 +25803,6 @@
25853
25803
  exports.ɵl = DatoGridItemsCountCellComponent;
25854
25804
  exports.ɵm = DatoGridV2ToolbarMoreMenuComponent;
25855
25805
  exports.ɵn = DatoGridSearchBarComponent;
25856
- exports.ɵo = RichTextService;
25857
25806
 
25858
25807
  Object.defineProperty(exports, '__esModule', { value: true });
25859
25808