@datorama/core 22.9.9-rc → 22.9.9-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/bundle.scss +6 -6
  2. package/bundles/datorama-core.umd.js +137 -81
  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 +1 -0
  7. package/datorama-core.metadata.json +1 -1
  8. package/esm2015/datorama-core.js +2 -1
  9. package/esm2015/lib/breadcrumbs/breadcrumbs.component.js +4 -2
  10. package/esm2015/lib/grid-v2/grid/grid-v2.types.js +9 -1
  11. package/esm2015/lib/grid-v2/grid-column-cell-components/grid-status-cell/grid-status-cell.component.js +19 -12
  12. package/esm2015/lib/grid-v2/grid-controller/grid-controller.component.js +30 -13
  13. package/esm2015/lib/grid-v2/grid-settings.js +2 -2
  14. package/esm2015/lib/grid-v2/grid-store/grid.service.js +3 -2
  15. package/esm2015/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +7 -1
  16. package/esm2015/lib/loaders/page-loader/page-loader.component.js +7 -2
  17. package/esm2015/lib/rich-text/rich-text.directive.js +20 -38
  18. package/esm2015/lib/rich-text/rich-text.service.js +50 -0
  19. package/esm2015/lib/select/select.component.js +5 -10
  20. package/esm2015/lib/select/trigger-single/trigger-single.component.js +2 -7
  21. package/esm2015/lib/version.js +2 -2
  22. package/esm5/datorama-core.js +2 -1
  23. package/esm5/lib/breadcrumbs/breadcrumbs.component.js +4 -2
  24. package/esm5/lib/grid-v2/grid/grid-v2.types.js +9 -1
  25. package/esm5/lib/grid-v2/grid-column-cell-components/grid-status-cell/grid-status-cell.component.js +20 -12
  26. package/esm5/lib/grid-v2/grid-controller/grid-controller.component.js +29 -15
  27. package/esm5/lib/grid-v2/grid-settings.js +2 -2
  28. package/esm5/lib/grid-v2/grid-store/grid.service.js +3 -2
  29. package/esm5/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +13 -1
  30. package/esm5/lib/loaders/page-loader/page-loader.component.js +7 -2
  31. package/esm5/lib/rich-text/rich-text.directive.js +21 -39
  32. package/esm5/lib/rich-text/rich-text.service.js +51 -0
  33. package/esm5/lib/select/select.component.js +5 -10
  34. package/esm5/lib/select/trigger-single/trigger-single.component.js +2 -7
  35. package/esm5/lib/version.js +2 -2
  36. package/fesm2015/datorama-core.js +129 -79
  37. package/fesm2015/datorama-core.js.map +1 -1
  38. package/fesm5/datorama-core.js +137 -82
  39. package/fesm5/datorama-core.js.map +1 -1
  40. package/lib/grid-v2/grid/grid-v2.types.d.ts +12 -3
  41. package/lib/grid-v2/grid-column-cell-components/grid-status-cell/grid-status-cell.component.d.ts +3 -5
  42. package/lib/grid-v2/grid-controller/grid-controller.component.d.ts +1 -0
  43. package/lib/grid-v2/grid-settings.d.ts +2 -2
  44. package/lib/grid-v2/grid-toolbar/grid-toolbar.component.d.ts +2 -0
  45. package/lib/loaders/page-loader/page-loader.component.d.ts +1 -0
  46. package/lib/rich-text/rich-text.directive.d.ts +4 -6
  47. package/lib/rich-text/rich-text.service.d.ts +10 -0
  48. package/lib/select/trigger-single/trigger-single.component.d.ts +1 -2
  49. package/package.json +2 -2
package/bundle.scss CHANGED
@@ -4870,13 +4870,13 @@ dato-button button[disabled] {
4870
4870
  Secondary
4871
4871
  */
4872
4872
  dato-button[datoType='secondary'] button {
4873
- background-color: themify(primary-300, 0.15);
4874
- color: themify(primary-400);
4873
+ background-color: themify(primary-100);
4874
+ color: themify(primary-600);
4875
4875
  }
4876
4876
 
4877
4877
  dato-button[datoType='secondary'] button:hover {
4878
- background-color: themify(primary-300, 0.25);
4879
- color: themify(primary-500);
4878
+ background-color: themify(primary-200);
4879
+ color: themify(primary-600);
4880
4880
  }
4881
4881
 
4882
4882
  dato-button[datoType='secondary'] dato-icon svg {
@@ -4884,8 +4884,8 @@ dato-button[datoType='secondary'] dato-icon svg {
4884
4884
  }
4885
4885
 
4886
4886
  dato-button[datoType='secondary'] button:active {
4887
- background-color: themify(primary-300, 0.35);
4888
- color: themify(primary-600);
4887
+ background-color: themify(primary-300);
4888
+ color: themify(primary-700);
4889
4889
  }
4890
4890
 
4891
4891
  /**
@@ -8748,9 +8748,8 @@
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;
8752
8751
  this.markAsActive(this._model, { deselectAll: true });
8753
- overTheLimit && this.updateDisabledState();
8752
+ this.limitSelectedTo && this.updateDisabledState();
8754
8753
  }
8755
8754
  /** For later updates */
8756
8755
  this.cdr.markForCheck();
@@ -8878,7 +8877,6 @@
8878
8877
  };
8879
8878
  DatoSelectComponent.prototype.removeOption = function (option) {
8880
8879
  var _this = this;
8881
- var updateDisabled = this.limitSelectedTo && this._model.length === this.limitSelectedTo;
8882
8880
  this._model = this._model.filter(function (current) { return current[_this.idKey] !== option[_this.idKey]; });
8883
8881
  var optionToRemove = this.options.find(function (datoOption) { return datoOption.option && datoOption.option[_this.idKey] === option[_this.idKey]; });
8884
8882
  /**
@@ -8888,7 +8886,7 @@
8888
8886
  if (optionToRemove) {
8889
8887
  optionToRemove.active = false;
8890
8888
  }
8891
- updateDisabled && this.updateDisabledState();
8889
+ this.limitSelectedTo && this.updateDisabledState();
8892
8890
  this.onChange(this._model);
8893
8891
  this.cdr.markForCheck();
8894
8892
  this.asyncUpdateDropdownPosition();
@@ -9236,9 +9234,6 @@
9236
9234
  if (!datoOption) {
9237
9235
  return;
9238
9236
  }
9239
- var modelLength = this._model.length;
9240
- var updateDisabled = this.limitSelectedTo &&
9241
- (modelLength === this.limitSelectedTo || (modelLength === this.limitSelectedTo - 1 && !datoOption.active));
9242
9237
  datoOption.active = !datoOption.active;
9243
9238
  var rawOption = datoOption.option;
9244
9239
  if (datoOption.active) {
@@ -9247,7 +9242,7 @@
9247
9242
  else {
9248
9243
  this._model = this._model.filter(function (current) { return current[_this.idKey] !== rawOption[_this.idKey]; });
9249
9244
  }
9250
- updateDisabled && this.updateDisabledState();
9245
+ this.limitSelectedTo && this.updateDisabledState();
9251
9246
  this.onChange(this._model);
9252
9247
  this.cdr.markForCheck();
9253
9248
  this.asyncUpdateDropdownPosition();
@@ -9486,7 +9481,7 @@
9486
9481
  DatoSelectComponent = __decorate([
9487
9482
  core.Component({
9488
9483
  selector: 'dato-select',
9489
- template: "<section class=\"dato-select__trigger\" [class.dato-select--naked]=\"_naked\" [class.dato-select--disabled]=\"_disabled\">\n\n <div class=\"dato-select__single\" *ngIf=\"isSingle\" [ngClass]=\"_dropdownClass\">\n <dato-input [class.force-hide]=\"(!open && isCombo) || !isCombo\" [placeholder]=\"searchPlaceholder | translate\"\n (keyup)=\"keyup($event)\" [isFocused]=\"_focus\" [isLoading]=\"isLoading\" [formControl]=\"searchControl\" type=\"search\">\n </dato-input>\n\n <dato-trigger-single [isLoading]=\"isLoading\" [loadingTemplate]=\"loadingTemplate\" [active]=\"active\" datoErrorValidationBorderAnchor tabindex=\"0\" [labelKey]=\"labelKey\"\n [context]=\"_model[0]\" [class.force-hide]=\"open && isCombo\" [placeholder]=\"placeholder | translate\"\n class=\"ontop-overlay\" (keydown)=\"preventBodyScroll($event)\" (keyup)=\"keyup($event)\" (click)=\"openDropdown()\">\n </dato-trigger-single>\n </div>\n\n <dato-trigger-multi [loadingTemplate]=\"loadingTemplate\" [options]=\"_model\" datoErrorValidationBorderAnchor [control]=\"searchControl\"\n [placeholder]=\"placeholder | translate\" [labelKey]=\"labelKey\" [idKey]=\"idKey\" (keyup)=\"keyup($event)\"\n [isLoading]=\"isLoading\" [keepFocus]=\"keepFocus\" [limitTo]=\"limitTo\" [clickOutside]=\"_clickOutside\" [isSortable]=\"isSortable\"\n [selectAllChipTxt]=\"selectAllChipTxt\"\n [showSelectAllChip]=\"selectAllChipTxt && showSelectAllChip\"\n (unselectAll)=\"checkAll(false)\"\n (removeOption)=\"removeOption($event)\" (reorderOptions)=\"reorderOptions($event)\" *ngIf=\"isMulti\"\n (click)=\"openDropdown($event)\"></dato-trigger-multi>\n\n</section>\n\n<ng-template #dropdown>\n <section class=\"dato-select__dropdown-container\" tabindex=\"0\" (keyup)=\"keyup($event)\">\n\n <!-- HEADER -->\n\n <header class=\"dato-select__header dato-select__option dato-select__option--simple\" data-is-floating\n *ngIf=\"isMulti && allowSelectAll\" [class.force-hide]=\"_showEmptyResults\" [class.ml-10]=\"containsGroups\">\n <dato-checkbox [checked]=\"_isAllChecked\" (check)=\"checkAll($event)\"\n [indeterminatelyChecked]=\"_isIndeterminatelyChecked\">\n {{'core.select-all' | translate}}<span class=\"primary-300-color note-italic ml-5\">{{_count}}</span>\n </dato-checkbox>\n </header>\n\n <!-- END HEADER -->\n\n <!-- DROPDOWN -->\n\n <div class=\"dato-select__dropdown\">\n\n <ng-content></ng-content>\n\n <dato-select-empty [show]=\"_showEmptyResults\">{{_noItemsLabel}}</dato-select-empty>\n <div class=\"dato-select__option dato-select-infinite-spinner\" data-is-floating *ngIf=\"infiniteScrollLoading\">\n <span class=\"dato-input__spinner\"></span>\n </div>\n\n </div>\n\n <!-- END DROPDOWN -->\n\n\n <!-- FOOTER -->\n\n <footer class=\"dato-select__footer d-flex\" [class.with-actions]=\"_withActions\">\n\n <ng-content select=\"[datoSelectFooter]\"></ng-content>\n\n <ng-container *ngIf=\"_withActions\">\n <dato-link class=\"mr-20\" datoType=\"secondary\" (click)=\"close()\">Cancel</dato-link>\n <dato-button datoSize=\"sm\" (click)=\"save.emit(); close();\">Save</dato-button>\n </ng-container>\n\n </footer>\n\n <!-- END FOOTER -->\n\n </section>\n\n</ng-template>\n",
9484
+ template: "<section class=\"dato-select__trigger\" [class.dato-select--naked]=\"_naked\" [class.dato-select--disabled]=\"_disabled\">\n\n <div class=\"dato-select__single\" *ngIf=\"isSingle\" [ngClass]=\"_dropdownClass\">\n <dato-input [class.force-hide]=\"(!open && isCombo) || !isCombo\" [placeholder]=\"searchPlaceholder | translate\"\n (keyup)=\"keyup($event)\" [isFocused]=\"_focus\" [isLoading]=\"isLoading\" [formControl]=\"searchControl\" type=\"search\">\n </dato-input>\n\n <dato-trigger-single [loadingTemplate]=\"loadingTemplate\" [active]=\"active\" datoErrorValidationBorderAnchor tabindex=\"0\" [labelKey]=\"labelKey\"\n [context]=\"_model[0]\" [class.force-hide]=\"open && isCombo\" [placeholder]=\"placeholder | translate\"\n class=\"ontop-overlay\" (keydown)=\"preventBodyScroll($event)\" (keyup)=\"keyup($event)\" (click)=\"openDropdown()\">\n </dato-trigger-single>\n </div>\n\n <dato-trigger-multi [loadingTemplate]=\"loadingTemplate\" [options]=\"_model\" datoErrorValidationBorderAnchor [control]=\"searchControl\"\n [placeholder]=\"placeholder | translate\" [labelKey]=\"labelKey\" [idKey]=\"idKey\" (keyup)=\"keyup($event)\"\n [isLoading]=\"isLoading\" [keepFocus]=\"keepFocus\" [limitTo]=\"limitTo\" [clickOutside]=\"_clickOutside\" [isSortable]=\"isSortable\"\n [selectAllChipTxt]=\"selectAllChipTxt\"\n [showSelectAllChip]=\"selectAllChipTxt && showSelectAllChip\"\n (unselectAll)=\"checkAll(false)\"\n (removeOption)=\"removeOption($event)\" (reorderOptions)=\"reorderOptions($event)\" *ngIf=\"isMulti\"\n (click)=\"openDropdown($event)\"></dato-trigger-multi>\n\n</section>\n\n<ng-template #dropdown>\n <section class=\"dato-select__dropdown-container\" tabindex=\"0\" (keyup)=\"keyup($event)\">\n\n <!-- HEADER -->\n\n <header class=\"dato-select__header dato-select__option dato-select__option--simple\" data-is-floating\n *ngIf=\"isMulti && allowSelectAll\" [class.force-hide]=\"_showEmptyResults\" [class.ml-10]=\"containsGroups\">\n <dato-checkbox [checked]=\"_isAllChecked\" (check)=\"checkAll($event)\"\n [indeterminatelyChecked]=\"_isIndeterminatelyChecked\">\n {{'core.select-all' | translate}}<span class=\"primary-300-color note-italic ml-5\">{{_count}}</span>\n </dato-checkbox>\n </header>\n\n <!-- END HEADER -->\n\n <!-- DROPDOWN -->\n\n <div class=\"dato-select__dropdown\">\n\n <ng-content></ng-content>\n\n <dato-select-empty [show]=\"_showEmptyResults\">{{_noItemsLabel}}</dato-select-empty>\n <div class=\"dato-select__option dato-select-infinite-spinner\" data-is-floating *ngIf=\"infiniteScrollLoading\">\n <span class=\"dato-input__spinner\"></span>\n </div>\n\n </div>\n\n <!-- END DROPDOWN -->\n\n\n <!-- FOOTER -->\n\n <footer class=\"dato-select__footer d-flex\" [class.with-actions]=\"_withActions\">\n\n <ng-content select=\"[datoSelectFooter]\"></ng-content>\n\n <ng-container *ngIf=\"_withActions\">\n <dato-link class=\"mr-20\" datoType=\"secondary\" (click)=\"close()\">Cancel</dato-link>\n <dato-button datoSize=\"sm\" (click)=\"save.emit(); close();\">Save</dato-button>\n </ng-container>\n\n </footer>\n\n <!-- END FOOTER -->\n\n </section>\n\n</ng-template>\n",
9490
9485
  preserveWhitespaces: false,
9491
9486
  providers: [valueAccessor$3, DatoOverlay],
9492
9487
  encapsulation: core.ViewEncapsulation.None,
@@ -9514,7 +9509,6 @@
9514
9509
  var DatoTriggerSingle = /** @class */ (function () {
9515
9510
  function DatoTriggerSingle(cdr) {
9516
9511
  this.cdr = cdr;
9517
- this.isLoading = false;
9518
9512
  this._placeholder = '';
9519
9513
  }
9520
9514
  Object.defineProperty(DatoTriggerSingle.prototype, "placeholder", {
@@ -9553,10 +9547,6 @@
9553
9547
  DatoTriggerSingle.ctorParameters = function () { return [
9554
9548
  { type: core.ChangeDetectorRef }
9555
9549
  ]; };
9556
- __decorate([
9557
- core.Input(),
9558
- __metadata("design:type", Object)
9559
- ], DatoTriggerSingle.prototype, "isLoading", void 0);
9560
9550
  __decorate([
9561
9551
  core.Input(),
9562
9552
  __metadata("design:type", core.TemplateRef)
@@ -9582,7 +9572,7 @@
9582
9572
  DatoTriggerSingle = __decorate([
9583
9573
  core.Component({
9584
9574
  selector: 'dato-trigger-single',
9585
- template: "<ng-template *ngIf=\"isLoading\" [ngTemplateOutlet]=\"loadingTemplate\"></ng-template>\n<ng-container\n *ngIf=\"active && !hidePlaceholder\"\n [ngTemplateOutlet]=\"active.tpl\"\n [ngTemplateOutletContext]=\"_model\">\n</ng-container>\n<ng-container *ngIf=\"!active\">{{getLabel | translate}}</ng-container>\n<span class=\"dato-select__placeholder\" *ngIf=\"hidePlaceholder\">{{_placeholder}}</span>\n<dato-icon datoIcon=\"arrow-down\" datoSize=\"sm\" class=\"dato-select__single__arrow\"></dato-icon>\n",
9575
+ template: "<ng-template *ngIf=\"loadingTemplate\" [ngTemplateOutlet]=\"loadingTemplate\"></ng-template>\n<ng-container\n *ngIf=\"active && !hidePlaceholder\"\n [ngTemplateOutlet]=\"active.tpl\"\n [ngTemplateOutletContext]=\"_model\">\n</ng-container>\n<ng-container *ngIf=\"!active\">{{getLabel | translate}}</ng-container>\n<span class=\"dato-select__placeholder\" *ngIf=\"hidePlaceholder\">{{_placeholder}}</span>\n<dato-icon datoIcon=\"arrow-down\" datoSize=\"sm\" class=\"dato-select__single__arrow\"></dato-icon>\n",
9586
9576
  changeDetection: core.ChangeDetectionStrategy.OnPush,
9587
9577
  styles: [":host{display:block;position:relative;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host dato-icon{position:absolute;top:50%;transform:translateY(-50%);right:10px}"]
9588
9578
  }),
@@ -12057,7 +12047,7 @@
12057
12047
  return contextActions;
12058
12048
  }
12059
12049
 
12060
- var DATO_GRID_STORAGE_API = new core.InjectionToken('DATO_GRID_STORAGE_API');
12050
+ var DATO_GRID_STORAGE_API = new core.InjectionToken('DATO_GRID_STORAGE_AP');
12061
12051
 
12062
12052
  var defaultEditableColumnRenderer = function (params) {
12063
12053
  return params && params.value ? "<div class=\"value-wrapper ellipsis\">" + params.value + "</div>" : null;
@@ -12097,6 +12087,14 @@
12097
12087
  GridRowSelectionType["MULTIPLE"] = "multiple";
12098
12088
  })(exports.GridRowSelectionType || (exports.GridRowSelectionType = {}));
12099
12089
 
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
+
12100
12098
  /**
12101
12099
  * @license
12102
12100
  * Copyright Datorama. All Rights Reserved.
@@ -14644,7 +14642,8 @@
14644
14642
  this.updateSettings({ gridAlignment: gridAlignment, columnsSizes: null });
14645
14643
  };
14646
14644
  GridService.prototype.saveSettingsToServer = function (settings) {
14647
- this.storageAPI.set(this.gridName, settings);
14645
+ var isGlobal = this.gridQuery.getGridOptions().isGlobalSettings;
14646
+ this.storageAPI.set(this.gridName, settings, isGlobal);
14648
14647
  };
14649
14648
  /**
14650
14649
  * @internal used to log grid events to the platform's logging service
@@ -15632,7 +15631,7 @@
15632
15631
  });
15633
15632
  DatoGridControllerComponent.prototype.ngOnDestroy = function () {
15634
15633
  this.contentInit.complete();
15635
- this.tooltip && this.clearTooltip();
15634
+ this.clearTooltip();
15636
15635
  this.rowHoverComponent && this.rowHoverComponent.destroy();
15637
15636
  this.rowHoverComponent = null;
15638
15637
  };
@@ -15649,7 +15648,10 @@
15649
15648
  .pipe(operators.switchMap(function () {
15650
15649
  _this.gridOptions = _this.normalizeOptions();
15651
15650
  agGrid.gridOptions = _this.gridOptions;
15652
- var settingsLoader = _this.gridOptions.saveSettings === false ? rxjs.of(null) : _this.storageAPI.get(_this.gridOptions.gridName);
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);
15653
15655
  return rxjs.combineLatest([agGrid.gridReady, settingsLoader]);
15654
15656
  }), ngxTakeUntilDestroy.untilDestroyed(this))
15655
15657
  .subscribe(function (_a) {
@@ -15859,40 +15861,51 @@
15859
15861
  });
15860
15862
  this.addOnHoverElement();
15861
15863
  }
15862
- agGrid.cellMouseOver
15863
- .pipe(operators.filter(function (_a) {
15864
- var node = _a.node, column = _a.column;
15865
- return lastHoveredCell !== node.id + "-" + column.getColId();
15866
- }), ngxTakeUntilDestroy.untilDestroyed(this))
15867
- .subscribe(function (event) {
15868
- lastHoveredCell = event.node.id + "-" + event.column.getColId();
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();
15869
15871
  _this.showTooltip(event);
15870
15872
  var row = event.event.target.parentElement;
15871
- if (onHoverEnabled && (event.node.group === false || isNil(event.node.group)) && _this.lastHoveredRow !== row) {
15873
+ if (onHoverEnabled && (node.group === false || isNil(node.group)) && _this.lastHoveredRow !== row) {
15872
15874
  var previousNode = _this.lastHoveredRow;
15873
15875
  _this.lastHoveredRow = row;
15874
15876
  _this.toggleRowHoverClass([previousNode, _this.lastHoveredRow]);
15875
15877
  _this.setOnHoverState(true, event);
15876
15878
  }
15877
15879
  });
15878
- var onTooltipOut = rxjs.merge(rxjs.fromEvent(bodyViewport, 'scroll'), rxjs.fromEvent(this.agGridEl, 'mouseleave'), agGrid.cellMouseOut);
15879
- onTooltipOut
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
15880
15886
  .pipe(operators.filter(function () { return !isNil(_this.tooltip); }), ngxTakeUntilDestroy.untilDestroyed(this))
15881
15887
  .subscribe(function () {
15882
- _this.clearTooltip();
15888
+ _this.cellMouseOutTimer = window.setTimeout(function () { return _this.clearTooltip(); });
15883
15889
  });
15884
15890
  };
15885
15891
  /**
15886
15892
  * Dispose the tooltip
15887
15893
  */
15888
15894
  DatoGridControllerComponent.prototype.clearTooltip = function () {
15889
- this.tooltip.dispose();
15895
+ this.tooltip && this.tooltip.dispose();
15890
15896
  this.tooltip = null;
15891
15897
  };
15892
15898
  DatoGridControllerComponent.prototype.showTooltip = function (event) {
15893
15899
  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
+ }
15894
15906
  var textOverflow = cell.offsetWidth < cell.scrollWidth;
15895
15907
  if (textOverflow) {
15908
+ clearTimeout(this.cellMouseOutTimer);
15896
15909
  var params = { cell: cell, value: cell.innerText };
15897
15910
  isNil(this.tooltip) ? this.createAndShowTooltip(params) : this.updateTooltip(params);
15898
15911
  }
@@ -16931,6 +16944,18 @@
16931
16944
  this.registerGroupListeners();
16932
16945
  this.subscribeRowsSelectionData();
16933
16946
  };
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
+ };
16934
16959
  DatoGridV2ToolbarComponent.prototype.onActionClick = function (action) {
16935
16960
  if (isFunction(action.onClick)) {
16936
16961
  var selectedRowsCount = this.gridController.gridQuery.getSelectedRowsCount();
@@ -19545,6 +19570,7 @@
19545
19570
  function DatoPageLoaderComponent() {
19546
19571
  this.msg = '';
19547
19572
  this.salesforce = false;
19573
+ this.size = 'medium';
19548
19574
  this.circleIds = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i'];
19549
19575
  }
19550
19576
  __decorate([
@@ -19555,10 +19581,14 @@
19555
19581
  core.Input(),
19556
19582
  __metadata("design:type", Object)
19557
19583
  ], DatoPageLoaderComponent.prototype, "salesforce", void 0);
19584
+ __decorate([
19585
+ core.Input(),
19586
+ __metadata("design:type", String)
19587
+ ], DatoPageLoaderComponent.prototype, "size", void 0);
19558
19588
  DatoPageLoaderComponent = __decorate([
19559
19589
  core.Component({
19560
19590
  selector: 'dato-page-loader',
19561
- 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>",
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",
19562
19592
  changeDetection: core.ChangeDetectionStrategy.OnPush
19563
19593
  })
19564
19594
  ], DatoPageLoaderComponent);
@@ -20536,8 +20566,15 @@
20536
20566
 
20537
20567
  var DatoGridStatusCellComponent = /** @class */ (function () {
20538
20568
  function DatoGridStatusCellComponent(cdr) {
20569
+ var _a;
20539
20570
  this.cdr = cdr;
20540
- this.DEFAULT_MIN_WIDTH = 100;
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);
20541
20578
  }
20542
20579
  DatoGridStatusCellComponent.prototype.agInit = function (params) {
20543
20580
  var value = params.value, valueFormatted = params.valueFormatted, node = params.node;
@@ -20552,15 +20589,14 @@
20552
20589
  var mainCustomCellConfig = customCellConfig || {};
20553
20590
  var valueCustomCellConfig = valueToCustomCellConfig ? valueToCustomCellConfig[params.value] || {} : {};
20554
20591
  var config = __assign(__assign({}, mainCustomCellConfig), valueCustomCellConfig);
20555
- 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;
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] || {};
20556
20594
  this.isVisible = !getIsVisible || getIsVisible(params.data);
20557
- this.color = color || 'primary';
20558
- this.backgroundClass = this.color + "-" + (this.color === 'accent' ? '100' : '200') + "-background-color";
20559
- this.icon = icon;
20560
- this.minWidth = minWidth || this.DEFAULT_MIN_WIDTH;
20561
- this.cssClass = cssClass || '';
20562
- this.iconCssClass = iconCssClass || '';
20563
- this.showSpinner = showSpinner;
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;
20564
20600
  this.additionalText = getAdditionalText ? getAdditionalText(params.data) : null;
20565
20601
  };
20566
20602
  DatoGridStatusCellComponent.prototype.refresh = function (params) {
@@ -20574,8 +20610,9 @@
20574
20610
  DatoGridStatusCellComponent = __decorate([
20575
20611
  core.Component({
20576
20612
  selector: 'dato-grid-status-cell',
20577
- 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",
20578
- changeDetection: core.ChangeDetectionStrategy.OnPush
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}"]
20579
20616
  }),
20580
20617
  __metadata("design:paramtypes", [core.ChangeDetectorRef])
20581
20618
  ], DatoGridStatusCellComponent);
@@ -21406,6 +21443,40 @@
21406
21443
  * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
21407
21444
  */
21408
21445
 
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
+
21409
21480
  /**
21410
21481
  * @license
21411
21482
  * Copyright Datorama. All Rights Reserved.
@@ -21419,20 +21490,20 @@
21419
21490
  var ɵ0$3 = getTinymce;
21420
21491
  var DatoRichTextDirective = /** @class */ (function (_super) {
21421
21492
  __extends(DatoRichTextDirective, _super);
21422
- function DatoRichTextDirective(ngZone, http, host, config) {
21493
+ function DatoRichTextDirective(ngZone, richTextService, config, host) {
21423
21494
  var _this = _super.call(this) || this;
21424
21495
  _this.ngZone = ngZone;
21425
- _this.http = http;
21426
- _this.host = host;
21496
+ _this.richTextService = richTextService;
21427
21497
  _this.config = config;
21498
+ _this.host = host;
21428
21499
  _this.autocompleteOptions = {};
21429
21500
  _this.forcePlainTextPasting = false;
21430
21501
  _this.format = 'html';
21431
21502
  _this.isOneLine = false;
21432
21503
  _this.initialValue = '';
21433
- _this.defaultPlugins = 'link fullscreen textcolor colorpicker image lists table textpattern autocomplete';
21504
+ _this.defaultPlugins = 'link fullscreen image lists table autocomplete';
21434
21505
  _this.defaultToolbar = [
21435
- 'fontselect fontsizeselect forecolor backcolor bold italic underline link',
21506
+ 'fontfamily fontsize forecolor backcolor bold italic underline link',
21436
21507
  'alignleft aligncenter alignright alignjustify outdent indent | table numlist bullist | image fullscreen'
21437
21508
  ];
21438
21509
  return _this;
@@ -21458,28 +21529,11 @@
21458
21529
  base: this.config.paths.richText,
21459
21530
  query: ''
21460
21531
  };
21461
- /**
21462
- * We support only one instance in load time
21463
- */
21464
- if (window.tinymce) {
21465
- this.init.call(this);
21466
- }
21467
- else {
21468
- this.loadLib().subscribe(function (lib) {
21469
- appendScript(lib, 'rich-text-editor');
21470
- _this.init.call(_this);
21471
- _this.loadAutoCompleteStyle();
21472
- });
21473
- }
21474
- };
21475
- DatoRichTextDirective.prototype.loadLib = function () {
21476
- return this.http.get(this.config.paths.richText + "/index.js", { responseType: 'text' });
21477
- };
21478
- DatoRichTextDirective.prototype.loadAutoCompleteStyle = function () {
21479
- this.http
21480
- .get(this.config.paths.richText + "/plugins/autocomplete/plugin.css", { responseType: 'text' })
21481
- .subscribe(function (style) {
21482
- appendStyle(style, 'tinymce-autocomplete');
21532
+ this.richTextService
21533
+ .getLib(appendScript, appendStyle)
21534
+ .pipe(ngxTakeUntilDestroy.untilDestroyed(this))
21535
+ .subscribe(function () {
21536
+ _this.init.call(_this);
21483
21537
  });
21484
21538
  };
21485
21539
  DatoRichTextDirective.prototype.initEditor = function (_, editor) {
@@ -21503,8 +21557,6 @@
21503
21557
  target: this.host.nativeElement,
21504
21558
  width: this.width || 600,
21505
21559
  height: this.height || 300,
21506
- force_br_newlines: true,
21507
- force_p_newlines: false,
21508
21560
  resize: 'both',
21509
21561
  branding: false,
21510
21562
  inline: this.inline,
@@ -21512,10 +21564,12 @@
21512
21564
  readonly: this.disabled,
21513
21565
  plugins: this.plugins || this.defaultPlugins,
21514
21566
  toolbar: isNil(this.toolbar) ? this.defaultToolbar : this.toolbar,
21515
- fontsize_formats: '8px 10px 12px 14px 18px 24px 36px',
21567
+ font_size_formats: '8px 10px 12px 14px 18px 24px 36px',
21516
21568
  min_width: 480,
21517
21569
  menubar: false,
21518
21570
  autocomplete: this.autocompleteOptions,
21571
+ suffix: '.min',
21572
+ skin: 'tinymce-5',
21519
21573
  setup: function (editor) {
21520
21574
  _this.editor = editor;
21521
21575
  editor.on('init', function (e) {
@@ -21572,9 +21626,9 @@
21572
21626
  var DatoRichTextDirective_1;
21573
21627
  DatoRichTextDirective.ctorParameters = function () { return [
21574
21628
  { type: core.NgZone },
21575
- { type: http.HttpClient },
21576
- { type: core.ElementRef },
21577
- { type: undefined, decorators: [{ type: core.Inject, args: [DATO_CORE_CONFIG,] }] }
21629
+ { type: RichTextService },
21630
+ { type: undefined, decorators: [{ type: core.Inject, args: [DATO_CORE_CONFIG,] }] },
21631
+ { type: core.ElementRef }
21578
21632
  ]; };
21579
21633
  __decorate([
21580
21634
  core.Input(),
@@ -21640,10 +21694,9 @@
21640
21694
  }
21641
21695
  ]
21642
21696
  }),
21643
- __param(3, core.Inject(DATO_CORE_CONFIG)),
21697
+ __param(2, core.Inject(DATO_CORE_CONFIG)),
21644
21698
  __metadata("design:paramtypes", [core.NgZone,
21645
- http.HttpClient,
21646
- core.ElementRef, Object])
21699
+ RichTextService, Object, core.ElementRef])
21647
21700
  ], DatoRichTextDirective);
21648
21701
  return DatoRichTextDirective;
21649
21702
  }(BaseCustomControl));
@@ -24166,7 +24219,9 @@
24166
24219
  };
24167
24220
  DatoBreadcrumbsComponent.prototype.initEditableHeader = function () {
24168
24221
  var _this = this;
24169
- this.headerControl.valueChanges.pipe(operators.debounceTime(300), ngxTakeUntilDestroy.untilDestroyed(this)).subscribe(function (res) {
24222
+ this.headerControl.valueChanges
24223
+ .pipe(operators.debounceTime(300), ngxTakeUntilDestroy.untilDestroyed(this))
24224
+ .subscribe(function (res) {
24170
24225
  _this.updateEditableText.emit(res);
24171
24226
  _this.cdr.detectChanges();
24172
24227
  });
@@ -25529,7 +25584,7 @@
25529
25584
  };
25530
25585
  }
25531
25586
 
25532
- window.coreVersion = '22.9.7';
25587
+ window.coreVersion = '22.10.7-rc.';
25533
25588
 
25534
25589
  exports.APP_TRANSLATE = APP_TRANSLATE;
25535
25590
  exports.AceService = AceService;
@@ -25971,6 +26026,7 @@
25971
26026
  exports.ɵl = DatoGridItemsCountCellComponent;
25972
26027
  exports.ɵm = DatoGridV2ToolbarMoreMenuComponent;
25973
26028
  exports.ɵn = DatoGridSearchBarComponent;
26029
+ exports.ɵo = RichTextService;
25974
26030
 
25975
26031
  Object.defineProperty(exports, '__esModule', { value: true });
25976
26032