@datorama/core 22.9.10 → 22.10.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 (49) hide show
  1. package/bundle.scss +137 -131
  2. package/bundles/datorama-core.umd.js +104 -136
  3. package/bundles/datorama-core.umd.js.map +1 -1
  4. package/bundles/datorama-core.umd.min.js +38 -38
  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 -9
  11. package/esm2015/lib/grid-v2/grid-column-cell-components/grid-status-cell/grid-status-cell.component.js +12 -19
  12. package/esm2015/lib/grid-v2/grid-controller/grid-controller.component.js +13 -30
  13. package/esm2015/lib/grid-v2/grid-pagination/grid-pagination.component.js +3 -2
  14. package/esm2015/lib/grid-v2/grid-settings.js +2 -2
  15. package/esm2015/lib/grid-v2/grid-store/grid.service.js +29 -3
  16. package/esm2015/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +1 -7
  17. package/esm2015/lib/loaders/page-loader/page-loader.component.js +2 -7
  18. package/esm2015/lib/rich-text/rich-text.directive.js +38 -20
  19. package/esm2015/lib/select/select.component.js +9 -4
  20. package/esm2015/lib/version.js +2 -2
  21. package/esm5/datorama-core.js +1 -2
  22. package/esm5/lib/breadcrumbs/breadcrumbs.component.js +2 -4
  23. package/esm5/lib/grid-v2/grid/grid-v2.types.js +1 -9
  24. package/esm5/lib/grid-v2/grid-column-cell-components/grid-status-cell/grid-status-cell.component.js +12 -20
  25. package/esm5/lib/grid-v2/grid-controller/grid-controller.component.js +15 -29
  26. package/esm5/lib/grid-v2/grid-pagination/grid-pagination.component.js +5 -2
  27. package/esm5/lib/grid-v2/grid-settings.js +2 -2
  28. package/esm5/lib/grid-v2/grid-store/grid.service.js +29 -3
  29. package/esm5/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +1 -13
  30. package/esm5/lib/loaders/page-loader/page-loader.component.js +2 -7
  31. package/esm5/lib/rich-text/rich-text.directive.js +39 -21
  32. package/esm5/lib/select/select.component.js +9 -4
  33. package/esm5/lib/version.js +2 -2
  34. package/fesm2015/datorama-core.js +100 -128
  35. package/fesm2015/datorama-core.js.map +1 -1
  36. package/fesm5/datorama-core.js +105 -136
  37. package/fesm5/datorama-core.js.map +1 -1
  38. package/lib/grid-v2/grid/grid-v2.types.d.ts +3 -12
  39. package/lib/grid-v2/grid-column-cell-components/grid-status-cell/grid-status-cell.component.d.ts +5 -3
  40. package/lib/grid-v2/grid-controller/grid-controller.component.d.ts +0 -1
  41. package/lib/grid-v2/grid-settings.d.ts +2 -2
  42. package/lib/grid-v2/grid-store/grid.service.d.ts +1 -0
  43. package/lib/grid-v2/grid-toolbar/grid-toolbar.component.d.ts +0 -2
  44. package/lib/loaders/page-loader/page-loader.component.d.ts +0 -1
  45. package/lib/rich-text/rich-text.directive.d.ts +6 -4
  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
@@ -8748,8 +8748,9 @@
8748
8748
  DatoSelectComponent.prototype.writeValue = function (activeOptions) {
8749
8749
  this._model = activeOptions ? akita.coerceArray(activeOptions) : [];
8750
8750
  if (this.options) {
8751
+ var overTheLimit = this.limitSelectedTo && this.isMulti && this._model.length >= this.limitSelectedTo;
8751
8752
  this.markAsActive(this._model, { deselectAll: true });
8752
- this.limitSelectedTo && this.updateDisabledState();
8753
+ overTheLimit && this.updateDisabledState();
8753
8754
  }
8754
8755
  /** For later updates */
8755
8756
  this.cdr.markForCheck();
@@ -8877,6 +8878,7 @@
8877
8878
  };
8878
8879
  DatoSelectComponent.prototype.removeOption = function (option) {
8879
8880
  var _this = this;
8881
+ var updateDisabled = this.limitSelectedTo && this._model.length === this.limitSelectedTo;
8880
8882
  this._model = this._model.filter(function (current) { return current[_this.idKey] !== option[_this.idKey]; });
8881
8883
  var optionToRemove = this.options.find(function (datoOption) { return datoOption.option && datoOption.option[_this.idKey] === option[_this.idKey]; });
8882
8884
  /**
@@ -8886,7 +8888,7 @@
8886
8888
  if (optionToRemove) {
8887
8889
  optionToRemove.active = false;
8888
8890
  }
8889
- this.limitSelectedTo && this.updateDisabledState();
8891
+ updateDisabled && this.updateDisabledState();
8890
8892
  this.onChange(this._model);
8891
8893
  this.cdr.markForCheck();
8892
8894
  this.asyncUpdateDropdownPosition();
@@ -9234,6 +9236,9 @@
9234
9236
  if (!datoOption) {
9235
9237
  return;
9236
9238
  }
9239
+ var modelLength = this._model.length;
9240
+ var updateDisabled = this.limitSelectedTo &&
9241
+ (modelLength === this.limitSelectedTo || (modelLength === this.limitSelectedTo - 1 && !datoOption.active));
9237
9242
  datoOption.active = !datoOption.active;
9238
9243
  var rawOption = datoOption.option;
9239
9244
  if (datoOption.active) {
@@ -9242,7 +9247,7 @@
9242
9247
  else {
9243
9248
  this._model = this._model.filter(function (current) { return current[_this.idKey] !== rawOption[_this.idKey]; });
9244
9249
  }
9245
- this.limitSelectedTo && this.updateDisabledState();
9250
+ updateDisabled && this.updateDisabledState();
9246
9251
  this.onChange(this._model);
9247
9252
  this.cdr.markForCheck();
9248
9253
  this.asyncUpdateDropdownPosition();
@@ -12047,7 +12052,7 @@
12047
12052
  return contextActions;
12048
12053
  }
12049
12054
 
12050
- var DATO_GRID_STORAGE_API = new core.InjectionToken('DATO_GRID_STORAGE_AP');
12055
+ var DATO_GRID_STORAGE_API = new core.InjectionToken('DATO_GRID_STORAGE_API');
12051
12056
 
12052
12057
  var defaultEditableColumnRenderer = function (params) {
12053
12058
  return params && params.value ? "<div class=\"value-wrapper ellipsis\">" + params.value + "</div>" : null;
@@ -12087,14 +12092,6 @@
12087
12092
  GridRowSelectionType["MULTIPLE"] = "multiple";
12088
12093
  })(exports.GridRowSelectionType || (exports.GridRowSelectionType = {}));
12089
12094
 
12090
- (function (GridStatusColumnTypes) {
12091
- GridStatusColumnTypes["SUCCESS"] = "SUCCESS";
12092
- GridStatusColumnTypes["FAILURE"] = "FAILURE";
12093
- GridStatusColumnTypes["IN_PROGRESS"] = "IN_PROGRESS";
12094
- GridStatusColumnTypes["PENDING"] = "PENDING";
12095
- GridStatusColumnTypes["WAITING"] = "WAITING";
12096
- })(exports.GridStatusColumnTypes || (exports.GridStatusColumnTypes = {}));
12097
-
12098
12095
  /**
12099
12096
  * @license
12100
12097
  * Copyright Datorama. All Rights Reserved.
@@ -14336,9 +14333,36 @@
14336
14333
  this.initPivotSecondaryColsProcess(params);
14337
14334
  params.gridOptions.enableV2_1 = true;
14338
14335
  params.gridOptions.saveSettings = false;
14336
+ params.gridOptions.defaultColDef.cellClass = this.getPivotCellClass.bind(this);
14337
+ params.gridOptions.autoGroupColumnDef.cellClass = this.getPivotCellClass.bind(this);
14339
14338
  }
14340
14339
  return params.gridOptions;
14341
14340
  };
14341
+ GridService.prototype.getPivotCellClass = function (params) {
14342
+ var _a = params.node, leafGroup = _a.leafGroup, childIndex = _a.childIndex, rowGroupIndex = _a.rowGroupIndex;
14343
+ var gridQuery = params.colDef.headerComponentParams.gridQuery;
14344
+ var cellClass = "";
14345
+ if (gridQuery && gridQuery.api) {
14346
+ var columns = gridQuery.api.columns;
14347
+ var allDisplayedColumns = columns.getAllDisplayedColumns();
14348
+ var col = allDisplayedColumns.find(function (column) {
14349
+ return column.getColId() === params.colDef.colId;
14350
+ });
14351
+ var colIndex = allDisplayedColumns.indexOf(col);
14352
+ if (rowGroupIndex <= colIndex) {
14353
+ if (leafGroup) {
14354
+ if (childIndex % 2 === 0) {
14355
+ /** If row is even */
14356
+ cellClass += ' primary-100-background-color';
14357
+ }
14358
+ }
14359
+ else {
14360
+ cellClass += 'primary-0-background-color pointer dato-simple-bold';
14361
+ }
14362
+ }
14363
+ }
14364
+ return cellClass;
14365
+ };
14342
14366
  GridService.prototype.normalizeColumns = function (colDefs, gridOptions) {
14343
14367
  var _this = this;
14344
14368
  if (gridOptions === void 0) { gridOptions = null; }
@@ -14642,8 +14666,7 @@
14642
14666
  this.updateSettings({ gridAlignment: gridAlignment, columnsSizes: null });
14643
14667
  };
14644
14668
  GridService.prototype.saveSettingsToServer = function (settings) {
14645
- var isGlobal = this.gridQuery.getGridOptions().isGlobalSettings;
14646
- this.storageAPI.set(this.gridName, settings, isGlobal);
14669
+ this.storageAPI.set(this.gridName, settings);
14647
14670
  };
14648
14671
  /**
14649
14672
  * @internal used to log grid events to the platform's logging service
@@ -15631,7 +15654,7 @@
15631
15654
  });
15632
15655
  DatoGridControllerComponent.prototype.ngOnDestroy = function () {
15633
15656
  this.contentInit.complete();
15634
- this.clearTooltip();
15657
+ this.tooltip && this.clearTooltip();
15635
15658
  this.rowHoverComponent && this.rowHoverComponent.destroy();
15636
15659
  this.rowHoverComponent = null;
15637
15660
  };
@@ -15648,10 +15671,7 @@
15648
15671
  .pipe(operators.switchMap(function () {
15649
15672
  _this.gridOptions = _this.normalizeOptions();
15650
15673
  agGrid.gridOptions = _this.gridOptions;
15651
- var isGlobal = _this.gridOptions.isGlobalSettings;
15652
- var settingsLoader = _this.gridOptions.saveSettings === false
15653
- ? rxjs.of(null)
15654
- : _this.storageAPI.get(_this.gridOptions.gridName, isGlobal);
15674
+ var settingsLoader = _this.gridOptions.saveSettings === false ? rxjs.of(null) : _this.storageAPI.get(_this.gridOptions.gridName);
15655
15675
  return rxjs.combineLatest([agGrid.gridReady, settingsLoader]);
15656
15676
  }), ngxTakeUntilDestroy.untilDestroyed(this))
15657
15677
  .subscribe(function (_a) {
@@ -15861,51 +15881,40 @@
15861
15881
  });
15862
15882
  this.addOnHoverElement();
15863
15883
  }
15864
- agGrid.cellMouseOver.pipe(ngxTakeUntilDestroy.untilDestroyed(this)).subscribe(function (event) {
15865
- var node = event.node, column = event.column;
15866
- if (lastHoveredCell === node.id + "-" + column.getColId()) {
15867
- clearTimeout(_this.cellMouseOutTimer);
15868
- return;
15869
- }
15870
- lastHoveredCell = node.id + "-" + column.getColId();
15884
+ agGrid.cellMouseOver
15885
+ .pipe(operators.filter(function (_a) {
15886
+ var node = _a.node, column = _a.column;
15887
+ return lastHoveredCell !== node.id + "-" + column.getColId();
15888
+ }), ngxTakeUntilDestroy.untilDestroyed(this))
15889
+ .subscribe(function (event) {
15890
+ lastHoveredCell = event.node.id + "-" + event.column.getColId();
15871
15891
  _this.showTooltip(event);
15872
15892
  var row = event.event.target.parentElement;
15873
- if (onHoverEnabled && (node.group === false || isNil(node.group)) && _this.lastHoveredRow !== row) {
15893
+ if (onHoverEnabled && (event.node.group === false || isNil(event.node.group)) && _this.lastHoveredRow !== row) {
15874
15894
  var previousNode = _this.lastHoveredRow;
15875
15895
  _this.lastHoveredRow = row;
15876
15896
  _this.toggleRowHoverClass([previousNode, _this.lastHoveredRow]);
15877
15897
  _this.setOnHoverState(true, event);
15878
15898
  }
15879
15899
  });
15880
- var onTooltipOut = rxjs.merge(rxjs.fromEvent(bodyViewport, 'scroll'), rxjs.fromEvent(this.agGridEl, 'mouseleave'));
15881
- onTooltipOut.pipe(ngxTakeUntilDestroy.untilDestroyed(this)).subscribe(function () {
15882
- lastHoveredCell = null;
15883
- _this.clearTooltip();
15884
- });
15885
- agGrid.cellMouseOut
15900
+ var onTooltipOut = rxjs.merge(rxjs.fromEvent(bodyViewport, 'scroll'), rxjs.fromEvent(this.agGridEl, 'mouseleave'), agGrid.cellMouseOut);
15901
+ onTooltipOut
15886
15902
  .pipe(operators.filter(function () { return !isNil(_this.tooltip); }), ngxTakeUntilDestroy.untilDestroyed(this))
15887
15903
  .subscribe(function () {
15888
- _this.cellMouseOutTimer = window.setTimeout(function () { return _this.clearTooltip(); });
15904
+ _this.clearTooltip();
15889
15905
  });
15890
15906
  };
15891
15907
  /**
15892
15908
  * Dispose the tooltip
15893
15909
  */
15894
15910
  DatoGridControllerComponent.prototype.clearTooltip = function () {
15895
- this.tooltip && this.tooltip.dispose();
15911
+ this.tooltip.dispose();
15896
15912
  this.tooltip = null;
15897
15913
  };
15898
15914
  DatoGridControllerComponent.prototype.showTooltip = function (event) {
15899
15915
  var cell = event.event.target;
15900
- if (cell.tagName === 'SPAN' && cell.scrollWidth === 0) {
15901
- cell = cell.parentElement;
15902
- }
15903
- if (event.colDef.editable) {
15904
- cell = cell.querySelector('.value-wrapper') || cell;
15905
- }
15906
15916
  var textOverflow = cell.offsetWidth < cell.scrollWidth;
15907
15917
  if (textOverflow) {
15908
- clearTimeout(this.cellMouseOutTimer);
15909
15918
  var params = { cell: cell, value: cell.innerText };
15910
15919
  isNil(this.tooltip) ? this.createAndShowTooltip(params) : this.updateTooltip(params);
15911
15920
  }
@@ -16492,7 +16501,9 @@
16492
16501
  DatoGridPaginationV2Component.prototype.ngOnInit = function () {
16493
16502
  var _this = this;
16494
16503
  this.gridQuery
16495
- .waitForGrid(function () { return _this.gridQuery.gridRef.filterChanged; })
16504
+ .waitForGrid(function () {
16505
+ return rxjs.merge(_this.gridQuery.gridRef.filterChanged, _this.gridQuery.gridRef.rowGroupOpened, _this.gridQuery.gridRef.expandOrCollapseAll);
16506
+ })
16496
16507
  .pipe(ngxTakeUntilDestroy.untilDestroyed(this))
16497
16508
  .subscribe(function () {
16498
16509
  _this.gridApi.paginationGoToPage(0);
@@ -16944,18 +16955,6 @@
16944
16955
  this.registerGroupListeners();
16945
16956
  this.subscribeRowsSelectionData();
16946
16957
  };
16947
- DatoGridV2ToolbarComponent.prototype.getCellValueChangeEvent = function () {
16948
- var _this = this;
16949
- return this.gridController.gridQuery.waitForGrid(function () {
16950
- return _this.gridQuery.gridRef.cellValueChanged.pipe(operators.debounceTime(100), ngxTakeUntilDestroy.untilDestroyed(_this));
16951
- });
16952
- };
16953
- DatoGridV2ToolbarComponent.prototype.getRowDataUpdatedEvent = function () {
16954
- var _this = this;
16955
- return this.gridController.gridQuery.waitForGrid(function () {
16956
- return _this.gridQuery.gridRef.rowDataUpdated.pipe(operators.debounceTime(100), ngxTakeUntilDestroy.untilDestroyed(_this));
16957
- });
16958
- };
16959
16958
  DatoGridV2ToolbarComponent.prototype.onActionClick = function (action) {
16960
16959
  if (isFunction(action.onClick)) {
16961
16960
  var selectedRowsCount = this.gridController.gridQuery.getSelectedRowsCount();
@@ -19570,7 +19569,6 @@
19570
19569
  function DatoPageLoaderComponent() {
19571
19570
  this.msg = '';
19572
19571
  this.salesforce = false;
19573
- this.size = 'medium';
19574
19572
  this.circleIds = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i'];
19575
19573
  }
19576
19574
  __decorate([
@@ -19581,14 +19579,10 @@
19581
19579
  core.Input(),
19582
19580
  __metadata("design:type", Object)
19583
19581
  ], DatoPageLoaderComponent.prototype, "salesforce", void 0);
19584
- __decorate([
19585
- core.Input(),
19586
- __metadata("design:type", String)
19587
- ], DatoPageLoaderComponent.prototype, "size", void 0);
19588
19582
  DatoPageLoaderComponent = __decorate([
19589
19583
  core.Component({
19590
19584
  selector: 'dato-page-loader',
19591
- template: "<div class=\"d-flex-column align-center\">\n <ng-container *ngIf=\"salesforce; else datoramaPageLoader\">\n <div class=\"slds-spinner_container\">\n <div role=\"status\" class=\"slds-spinner slds-spinner_brand\" [ngClass]=\"'slds-spinner_' + size\">\n <div class=\"slds-spinner__dot-a\"></div>\n <div class=\"slds-spinner__dot-b\"></div>\n </div>\n </div>\n </ng-container>\n <ng-template #datoramaPageLoader>\n <div class=\"animation-container d-flex align-center d-flex-wrap\">\n <div class=\"circle d-flex align-center\" *ngFor=\"let id of circleIds\" [ngClass]=\"'circle-' + id\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\">\n <circle cx=\"6\" cy=\"6\" r=\"5\" />\n </svg>\n </div>\n </div>\n </ng-template>\n <span class=\"loading-message simple-bold\">{{msg | translate}}</span>\n</div>\n",
19585
+ template: "<div class=\"d-flex-column align-center\">\n <ng-container *ngIf=\"salesforce; else datoramaPageLoader\">\n <div class=\"slds-spinner_container\">\n <div role=\"status\" class=\"slds-spinner slds-spinner_medium slds-spinner_brand\">\n <div class=\"slds-spinner__dot-a\"></div>\n <div class=\"slds-spinner__dot-b\"></div>\n </div>\n </div>\n </ng-container>\n <ng-template #datoramaPageLoader>\n <div class=\"animation-container d-flex align-center d-flex-wrap\">\n <div class=\"circle d-flex align-center\" *ngFor=\"let id of circleIds\" [ngClass]=\"'circle-' + id\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\">\n <circle cx=\"6\" cy=\"6\" r=\"5\" />\n </svg>\n </div>\n </div>\n </ng-template>\n <span class=\"loading-message simple-bold\">{{msg | translate}}</span>\n</div>",
19592
19586
  changeDetection: core.ChangeDetectionStrategy.OnPush
19593
19587
  })
19594
19588
  ], DatoPageLoaderComponent);
@@ -20566,15 +20560,8 @@
20566
20560
 
20567
20561
  var DatoGridStatusCellComponent = /** @class */ (function () {
20568
20562
  function DatoGridStatusCellComponent(cdr) {
20569
- var _a;
20570
20563
  this.cdr = cdr;
20571
- this.defaultConfigByStatus = (_a = {},
20572
- _a[exports.GridStatusColumnTypes.SUCCESS] = { icon: 'success-line', iconCssClass: 'green-400-color' },
20573
- _a[exports.GridStatusColumnTypes.FAILURE] = { icon: 'failed-line', iconCssClass: 'red-400-color' },
20574
- _a[exports.GridStatusColumnTypes.PENDING] = { icon: 'time', iconCssClass: 'yellow-400-color' },
20575
- _a[exports.GridStatusColumnTypes.WAITING] = { icon: 'info-line', iconCssClass: 'orange-400-color' },
20576
- _a[exports.GridStatusColumnTypes.IN_PROGRESS] = { showSpinner: true },
20577
- _a);
20564
+ this.DEFAULT_MIN_WIDTH = 100;
20578
20565
  }
20579
20566
  DatoGridStatusCellComponent.prototype.agInit = function (params) {
20580
20567
  var value = params.value, valueFormatted = params.valueFormatted, node = params.node;
@@ -20589,14 +20576,15 @@
20589
20576
  var mainCustomCellConfig = customCellConfig || {};
20590
20577
  var valueCustomCellConfig = valueToCustomCellConfig ? valueToCustomCellConfig[params.value] || {} : {};
20591
20578
  var config = __assign(__assign({}, mainCustomCellConfig), valueCustomCellConfig);
20592
- var textCssClass = config.textCssClass, icon = config.icon, iconCssClass = config.iconCssClass, showSpinner = config.showSpinner, getAdditionalText = config.getAdditionalText, additionalTextCssClass = config.additionalTextCssClass, getIsVisible = config.getIsVisible, status = config.status;
20593
- var defaultConfig = this.defaultConfigByStatus[status] || {};
20579
+ var color = config.color, icon = config.icon, cssClass = config.cssClass, iconCssClass = config.iconCssClass, minWidth = config.minWidth, showSpinner = config.showSpinner, getAdditionalText = config.getAdditionalText, getIsVisible = config.getIsVisible;
20594
20580
  this.isVisible = !getIsVisible || getIsVisible(params.data);
20595
- this.icon = icon || defaultConfig.icon;
20596
- this.iconCssClass = iconCssClass || defaultConfig.iconCssClass || '';
20597
- this.textCssClass = textCssClass || '';
20598
- this.additionalTextCssClass = additionalTextCssClass || '';
20599
- this.showSpinner = !!showSpinner || !!defaultConfig.showSpinner;
20581
+ this.color = color || 'primary';
20582
+ this.backgroundClass = this.color + "-" + (this.color === 'accent' ? '100' : '200') + "-background-color";
20583
+ this.icon = icon;
20584
+ this.minWidth = minWidth || this.DEFAULT_MIN_WIDTH;
20585
+ this.cssClass = cssClass || '';
20586
+ this.iconCssClass = iconCssClass || '';
20587
+ this.showSpinner = showSpinner;
20600
20588
  this.additionalText = getAdditionalText ? getAdditionalText(params.data) : null;
20601
20589
  };
20602
20590
  DatoGridStatusCellComponent.prototype.refresh = function (params) {
@@ -20610,9 +20598,8 @@
20610
20598
  DatoGridStatusCellComponent = __decorate([
20611
20599
  core.Component({
20612
20600
  selector: 'dato-grid-status-cell',
20613
- template: "<div *ngIf=\"!isGroup && isVisible\" class=\"height-100 d-flex items-center\">\n <dato-icon *ngIf=\"icon\" class=\"mr-6 {{iconCssClass}}\" [icon]=\"icon\" datoSize=\"sm\"></dato-icon>\n <dato-page-loader *ngIf=\"showSpinner\" [salesforce]=\"true\" size=\"x-small\" class=\"mr-10 mt-15\"></dato-page-loader>\n <div class=\"dato-simple status line-height-18 {{textCssClass}}\" [class.ellipsis]=\"!additionalText\"\n [datoTooltipV2]=\"status\" [showOnlyOnTextOverflow]=\"true\" [tooltipCheckInView]=\"false\">\n {{status}}\n </div>\n <div *ngIf=\"additionalText\" class=\"dato-simple ml-3 ellipsis line-height-18 {{additionalTextCssClass}}\"\n [datoTooltipV2]=\"status + ' ' + additionalText\" [showOnlyOnTextOverflow]=\"true\" [tooltipCheckInView]=\"false\">\n {{additionalText}}\n </div>\n</div>\n<span *ngIf=\"isGroup\">{{status}}</span>\n",
20614
- changeDetection: core.ChangeDetectionStrategy.OnPush,
20615
- styles: [".line-height-18{line-height:18px}"]
20601
+ template: "<div *ngIf=\"!isGroup && isVisible\" class=\"height-100 d-flex items-center\">\n <div *ngIf=\"status\" class=\"d-flex justify-center items-center px-15 py-5 {{backgroundClass}} {{cssClass}}\" [style.min-width.px]=\"minWidth\">\n <dato-icon *ngIf=\"icon\" class=\"mr-5 {{iconCssClass}}\" [icon]=\"icon\" datoSize=\"sm\"></dato-icon>\n <div class=\"dato-note {{color}}-800-color\" [class.ellipsis]=\"!additionalText\"\n [datoTooltipV2]=\"status\" [showOnlyOnTextOverflow]=\"true\" [tooltipCheckInView]=\"false\" [datoTooltipDisabled]=\"!!additionalText\">\n {{status}}\n </div>\n <div *ngIf=\"additionalText\" class=\"dato-note {{color}}-800-color ml-3 ellipsis\"\n [datoTooltipV2]=\"status + ' ' + additionalText\" [showOnlyOnTextOverflow]=\"true\" [tooltipCheckInView]=\"false\">\n {{additionalText}}\n </div>\n <span *ngIf=\"showSpinner\" class=\"dato-spinner-loader ml-5\"></span>\n </div>\n</div>\n<span *ngIf=\"isGroup\">{{status}}</span>\n",
20602
+ changeDetection: core.ChangeDetectionStrategy.OnPush
20616
20603
  }),
20617
20604
  __metadata("design:paramtypes", [core.ChangeDetectorRef])
20618
20605
  ], DatoGridStatusCellComponent);
@@ -21443,40 +21430,6 @@
21443
21430
  * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
21444
21431
  */
21445
21432
 
21446
- var RichTextService = /** @class */ (function () {
21447
- function RichTextService(http, config) {
21448
- this.http = http;
21449
- this.config = config;
21450
- }
21451
- RichTextService.prototype.getLib = function (appendScriptFunc, appendStyleFunc) {
21452
- if (!this.richTextScript$) {
21453
- this.initLib(appendScriptFunc, appendStyleFunc);
21454
- }
21455
- return this.richTextScript$;
21456
- };
21457
- RichTextService.prototype.initLib = function (appendScriptFunc, appendStyleFunc) {
21458
- this.richTextScript$ = rxjs.combineLatest([
21459
- this.http
21460
- .get(this.config.paths.richText + "/index.js", { responseType: 'text' })
21461
- .pipe(operators.tap(function (lib) { return appendScriptFunc(lib, 'rich-text-editor'); })),
21462
- this.http
21463
- .get(this.config.paths.richText + "/plugins/autocomplete/plugin.css", { responseType: 'text' })
21464
- .pipe(operators.tap(function (style) { return appendStyleFunc(style, 'tinymce-autocomplete'); }))
21465
- ]).pipe(operators.shareReplay(1));
21466
- };
21467
- RichTextService.ctorParameters = function () { return [
21468
- { type: http.HttpClient },
21469
- { type: undefined, decorators: [{ type: core.Inject, args: [DATO_CORE_CONFIG,] }] }
21470
- ]; };
21471
- RichTextService.ɵprov = core.ɵɵdefineInjectable({ factory: function RichTextService_Factory() { return new RichTextService(core.ɵɵinject(http.HttpClient), core.ɵɵinject(DATO_CORE_CONFIG)); }, token: RichTextService, providedIn: "root" });
21472
- RichTextService = __decorate([
21473
- core.Injectable({ providedIn: 'root' }),
21474
- __param(1, core.Inject(DATO_CORE_CONFIG)),
21475
- __metadata("design:paramtypes", [http.HttpClient, Object])
21476
- ], RichTextService);
21477
- return RichTextService;
21478
- }());
21479
-
21480
21433
  /**
21481
21434
  * @license
21482
21435
  * Copyright Datorama. All Rights Reserved.
@@ -21490,20 +21443,20 @@
21490
21443
  var ɵ0$3 = getTinymce;
21491
21444
  var DatoRichTextDirective = /** @class */ (function (_super) {
21492
21445
  __extends(DatoRichTextDirective, _super);
21493
- function DatoRichTextDirective(ngZone, richTextService, config, host) {
21446
+ function DatoRichTextDirective(ngZone, http, host, config) {
21494
21447
  var _this = _super.call(this) || this;
21495
21448
  _this.ngZone = ngZone;
21496
- _this.richTextService = richTextService;
21497
- _this.config = config;
21449
+ _this.http = http;
21498
21450
  _this.host = host;
21451
+ _this.config = config;
21499
21452
  _this.autocompleteOptions = {};
21500
21453
  _this.forcePlainTextPasting = false;
21501
21454
  _this.format = 'html';
21502
21455
  _this.isOneLine = false;
21503
21456
  _this.initialValue = '';
21504
- _this.defaultPlugins = 'link fullscreen image lists table autocomplete';
21457
+ _this.defaultPlugins = 'link fullscreen textcolor colorpicker image lists table textpattern autocomplete';
21505
21458
  _this.defaultToolbar = [
21506
- 'fontfamily fontsize forecolor backcolor bold italic underline link',
21459
+ 'fontselect fontsizeselect forecolor backcolor bold italic underline link',
21507
21460
  'alignleft aligncenter alignright alignjustify outdent indent | table numlist bullist | image fullscreen'
21508
21461
  ];
21509
21462
  return _this;
@@ -21529,11 +21482,28 @@
21529
21482
  base: this.config.paths.richText,
21530
21483
  query: ''
21531
21484
  };
21532
- this.richTextService
21533
- .getLib(appendScript, appendStyle)
21534
- .pipe(ngxTakeUntilDestroy.untilDestroyed(this))
21535
- .subscribe(function () {
21536
- _this.init.call(_this);
21485
+ /**
21486
+ * We support only one instance in load time
21487
+ */
21488
+ if (window.tinymce) {
21489
+ this.init.call(this);
21490
+ }
21491
+ else {
21492
+ this.loadLib().subscribe(function (lib) {
21493
+ appendScript(lib, 'rich-text-editor');
21494
+ _this.init.call(_this);
21495
+ _this.loadAutoCompleteStyle();
21496
+ });
21497
+ }
21498
+ };
21499
+ DatoRichTextDirective.prototype.loadLib = function () {
21500
+ return this.http.get(this.config.paths.richText + "/index.js", { responseType: 'text' });
21501
+ };
21502
+ DatoRichTextDirective.prototype.loadAutoCompleteStyle = function () {
21503
+ this.http
21504
+ .get(this.config.paths.richText + "/plugins/autocomplete/plugin.css", { responseType: 'text' })
21505
+ .subscribe(function (style) {
21506
+ appendStyle(style, 'tinymce-autocomplete');
21537
21507
  });
21538
21508
  };
21539
21509
  DatoRichTextDirective.prototype.initEditor = function (_, editor) {
@@ -21557,6 +21527,8 @@
21557
21527
  target: this.host.nativeElement,
21558
21528
  width: this.width || 600,
21559
21529
  height: this.height || 300,
21530
+ force_br_newlines: true,
21531
+ force_p_newlines: false,
21560
21532
  resize: 'both',
21561
21533
  branding: false,
21562
21534
  inline: this.inline,
@@ -21564,12 +21536,10 @@
21564
21536
  readonly: this.disabled,
21565
21537
  plugins: this.plugins || this.defaultPlugins,
21566
21538
  toolbar: isNil(this.toolbar) ? this.defaultToolbar : this.toolbar,
21567
- font_size_formats: '8px 10px 12px 14px 18px 24px 36px',
21539
+ fontsize_formats: '8px 10px 12px 14px 18px 24px 36px',
21568
21540
  min_width: 480,
21569
21541
  menubar: false,
21570
21542
  autocomplete: this.autocompleteOptions,
21571
- suffix: '.min',
21572
- skin: 'tinymce-5',
21573
21543
  setup: function (editor) {
21574
21544
  _this.editor = editor;
21575
21545
  editor.on('init', function (e) {
@@ -21626,9 +21596,9 @@
21626
21596
  var DatoRichTextDirective_1;
21627
21597
  DatoRichTextDirective.ctorParameters = function () { return [
21628
21598
  { type: core.NgZone },
21629
- { type: RichTextService },
21630
- { type: undefined, decorators: [{ type: core.Inject, args: [DATO_CORE_CONFIG,] }] },
21631
- { type: core.ElementRef }
21599
+ { type: http.HttpClient },
21600
+ { type: core.ElementRef },
21601
+ { type: undefined, decorators: [{ type: core.Inject, args: [DATO_CORE_CONFIG,] }] }
21632
21602
  ]; };
21633
21603
  __decorate([
21634
21604
  core.Input(),
@@ -21694,9 +21664,10 @@
21694
21664
  }
21695
21665
  ]
21696
21666
  }),
21697
- __param(2, core.Inject(DATO_CORE_CONFIG)),
21667
+ __param(3, core.Inject(DATO_CORE_CONFIG)),
21698
21668
  __metadata("design:paramtypes", [core.NgZone,
21699
- RichTextService, Object, core.ElementRef])
21669
+ http.HttpClient,
21670
+ core.ElementRef, Object])
21700
21671
  ], DatoRichTextDirective);
21701
21672
  return DatoRichTextDirective;
21702
21673
  }(BaseCustomControl));
@@ -24219,9 +24190,7 @@
24219
24190
  };
24220
24191
  DatoBreadcrumbsComponent.prototype.initEditableHeader = function () {
24221
24192
  var _this = this;
24222
- this.headerControl.valueChanges
24223
- .pipe(operators.debounceTime(300), ngxTakeUntilDestroy.untilDestroyed(this))
24224
- .subscribe(function (res) {
24193
+ this.headerControl.valueChanges.pipe(operators.debounceTime(300), ngxTakeUntilDestroy.untilDestroyed(this)).subscribe(function (res) {
24225
24194
  _this.updateEditableText.emit(res);
24226
24195
  _this.cdr.detectChanges();
24227
24196
  });
@@ -25584,7 +25553,7 @@
25584
25553
  };
25585
25554
  }
25586
25555
 
25587
- window.coreVersion = '22.10.7-rc.';
25556
+ window.coreVersion = '22.10.0';
25588
25557
 
25589
25558
  exports.APP_TRANSLATE = APP_TRANSLATE;
25590
25559
  exports.AceService = AceService;
@@ -26026,7 +25995,6 @@
26026
25995
  exports.ɵl = DatoGridItemsCountCellComponent;
26027
25996
  exports.ɵm = DatoGridV2ToolbarMoreMenuComponent;
26028
25997
  exports.ɵn = DatoGridSearchBarComponent;
26029
- exports.ɵo = RichTextService;
26030
25998
 
26031
25999
  Object.defineProperty(exports, '__esModule', { value: true });
26032
26000