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

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 (47) hide show
  1. package/bundles/datorama-core.umd.js +92 -66
  2. package/bundles/datorama-core.umd.js.map +1 -1
  3. package/bundles/datorama-core.umd.min.js +16 -16
  4. package/bundles/datorama-core.umd.min.js.map +1 -1
  5. package/datorama-core.d.ts +1 -0
  6. package/datorama-core.metadata.json +1 -1
  7. package/esm2015/datorama-core.js +2 -1
  8. package/esm2015/lib/breadcrumbs/breadcrumbs.component.js +4 -2
  9. package/esm2015/lib/grid-v2/grid/grid-v2.types.js +1 -1
  10. package/esm2015/lib/grid-v2/grid-column-cell-components/grid-status-cell/grid-status-cell.component.js +6 -10
  11. package/esm2015/lib/grid-v2/grid-controller/grid-controller.component.js +5 -2
  12. package/esm2015/lib/grid-v2/grid-settings.js +2 -2
  13. package/esm2015/lib/grid-v2/grid-store/grid.service.js +3 -2
  14. package/esm2015/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +7 -1
  15. package/esm2015/lib/loaders/page-loader/page-loader.component.js +7 -2
  16. package/esm2015/lib/rich-text/rich-text.directive.js +20 -38
  17. package/esm2015/lib/rich-text/rich-text.service.js +50 -0
  18. package/esm2015/lib/select/select.component.js +5 -10
  19. package/esm2015/lib/select/trigger-single/trigger-single.component.js +2 -7
  20. package/esm2015/lib/version.js +2 -2
  21. package/esm5/datorama-core.js +2 -1
  22. package/esm5/lib/breadcrumbs/breadcrumbs.component.js +4 -2
  23. package/esm5/lib/grid-v2/grid/grid-v2.types.js +1 -1
  24. package/esm5/lib/grid-v2/grid-column-cell-components/grid-status-cell/grid-status-cell.component.js +6 -10
  25. package/esm5/lib/grid-v2/grid-controller/grid-controller.component.js +5 -2
  26. package/esm5/lib/grid-v2/grid-settings.js +2 -2
  27. package/esm5/lib/grid-v2/grid-store/grid.service.js +3 -2
  28. package/esm5/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +13 -1
  29. package/esm5/lib/loaders/page-loader/page-loader.component.js +7 -2
  30. package/esm5/lib/rich-text/rich-text.directive.js +21 -39
  31. package/esm5/lib/rich-text/rich-text.service.js +51 -0
  32. package/esm5/lib/select/select.component.js +5 -10
  33. package/esm5/lib/select/trigger-single/trigger-single.component.js +2 -7
  34. package/esm5/lib/version.js +2 -2
  35. package/fesm2015/datorama-core.js +84 -66
  36. package/fesm2015/datorama-core.js.map +1 -1
  37. package/fesm5/datorama-core.js +92 -67
  38. package/fesm5/datorama-core.js.map +1 -1
  39. package/lib/grid-v2/grid/grid-v2.types.d.ts +3 -4
  40. package/lib/grid-v2/grid-column-cell-components/grid-status-cell/grid-status-cell.component.d.ts +1 -6
  41. package/lib/grid-v2/grid-settings.d.ts +2 -2
  42. package/lib/grid-v2/grid-toolbar/grid-toolbar.component.d.ts +2 -0
  43. package/lib/loaders/page-loader/page-loader.component.d.ts +1 -0
  44. package/lib/rich-text/rich-text.directive.d.ts +4 -6
  45. package/lib/rich-text/rich-text.service.d.ts +10 -0
  46. package/lib/select/trigger-single/trigger-single.component.d.ts +1 -2
  47. package/package.json +2 -2
@@ -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;
@@ -14644,7 +14634,8 @@
14644
14634
  this.updateSettings({ gridAlignment: gridAlignment, columnsSizes: null });
14645
14635
  };
14646
14636
  GridService.prototype.saveSettingsToServer = function (settings) {
14647
- this.storageAPI.set(this.gridName, settings);
14637
+ var isGlobal = this.gridQuery.getGridOptions().isGlobalSettings;
14638
+ this.storageAPI.set(this.gridName, settings, isGlobal);
14648
14639
  };
14649
14640
  /**
14650
14641
  * @internal used to log grid events to the platform's logging service
@@ -15649,7 +15640,10 @@
15649
15640
  .pipe(operators.switchMap(function () {
15650
15641
  _this.gridOptions = _this.normalizeOptions();
15651
15642
  agGrid.gridOptions = _this.gridOptions;
15652
- var settingsLoader = _this.gridOptions.saveSettings === false ? rxjs.of(null) : _this.storageAPI.get(_this.gridOptions.gridName);
15643
+ var isGlobal = _this.gridOptions.isGlobalSettings;
15644
+ var settingsLoader = _this.gridOptions.saveSettings === false
15645
+ ? rxjs.of(null)
15646
+ : _this.storageAPI.get(_this.gridOptions.gridName, isGlobal);
15653
15647
  return rxjs.combineLatest([agGrid.gridReady, settingsLoader]);
15654
15648
  }), ngxTakeUntilDestroy.untilDestroyed(this))
15655
15649
  .subscribe(function (_a) {
@@ -16931,6 +16925,18 @@
16931
16925
  this.registerGroupListeners();
16932
16926
  this.subscribeRowsSelectionData();
16933
16927
  };
16928
+ DatoGridV2ToolbarComponent.prototype.getCellValueChangeEvent = function () {
16929
+ var _this = this;
16930
+ return this.gridController.gridQuery.waitForGrid(function () {
16931
+ return _this.gridQuery.gridRef.cellValueChanged.pipe(operators.debounceTime(100), ngxTakeUntilDestroy.untilDestroyed(_this));
16932
+ });
16933
+ };
16934
+ DatoGridV2ToolbarComponent.prototype.getRowDataUpdatedEvent = function () {
16935
+ var _this = this;
16936
+ return this.gridController.gridQuery.waitForGrid(function () {
16937
+ return _this.gridQuery.gridRef.rowDataUpdated.pipe(operators.debounceTime(100), ngxTakeUntilDestroy.untilDestroyed(_this));
16938
+ });
16939
+ };
16934
16940
  DatoGridV2ToolbarComponent.prototype.onActionClick = function (action) {
16935
16941
  if (isFunction(action.onClick)) {
16936
16942
  var selectedRowsCount = this.gridController.gridQuery.getSelectedRowsCount();
@@ -19545,6 +19551,7 @@
19545
19551
  function DatoPageLoaderComponent() {
19546
19552
  this.msg = '';
19547
19553
  this.salesforce = false;
19554
+ this.size = 'medium';
19548
19555
  this.circleIds = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i'];
19549
19556
  }
19550
19557
  __decorate([
@@ -19555,10 +19562,14 @@
19555
19562
  core.Input(),
19556
19563
  __metadata("design:type", Object)
19557
19564
  ], DatoPageLoaderComponent.prototype, "salesforce", void 0);
19565
+ __decorate([
19566
+ core.Input(),
19567
+ __metadata("design:type", String)
19568
+ ], DatoPageLoaderComponent.prototype, "size", void 0);
19558
19569
  DatoPageLoaderComponent = __decorate([
19559
19570
  core.Component({
19560
19571
  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>",
19572
+ 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
19573
  changeDetection: core.ChangeDetectionStrategy.OnPush
19563
19574
  })
19564
19575
  ], DatoPageLoaderComponent);
@@ -20537,7 +20548,6 @@
20537
20548
  var DatoGridStatusCellComponent = /** @class */ (function () {
20538
20549
  function DatoGridStatusCellComponent(cdr) {
20539
20550
  this.cdr = cdr;
20540
- this.DEFAULT_MIN_WIDTH = 100;
20541
20551
  }
20542
20552
  DatoGridStatusCellComponent.prototype.agInit = function (params) {
20543
20553
  var value = params.value, valueFormatted = params.valueFormatted, node = params.node;
@@ -20552,16 +20562,12 @@
20552
20562
  var mainCustomCellConfig = customCellConfig || {};
20553
20563
  var valueCustomCellConfig = valueToCustomCellConfig ? valueToCustomCellConfig[params.value] || {} : {};
20554
20564
  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;
20565
+ var textCssClass = config.textCssClass, icon = config.icon, iconCssClass = config.iconCssClass, showSpinner = config.showSpinner, getIsVisible = config.getIsVisible;
20556
20566
  this.isVisible = !getIsVisible || getIsVisible(params.data);
20557
- this.color = color || 'primary';
20558
- this.backgroundClass = this.color + "-" + (this.color === 'accent' ? '100' : '200') + "-background-color";
20559
20567
  this.icon = icon;
20560
- this.minWidth = minWidth || this.DEFAULT_MIN_WIDTH;
20561
- this.cssClass = cssClass || '';
20562
20568
  this.iconCssClass = iconCssClass || '';
20569
+ this.textCssClass = textCssClass || '';
20563
20570
  this.showSpinner = showSpinner;
20564
- this.additionalText = getAdditionalText ? getAdditionalText(params.data) : null;
20565
20571
  };
20566
20572
  DatoGridStatusCellComponent.prototype.refresh = function (params) {
20567
20573
  this.agInit(params);
@@ -20574,8 +20580,9 @@
20574
20580
  DatoGridStatusCellComponent = __decorate([
20575
20581
  core.Component({
20576
20582
  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
20583
+ 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 ellipsis status {{textCssClass}}\"\n [datoTooltipV2]=\"status\" [showOnlyOnTextOverflow]=\"true\" [tooltipCheckInView]=\"false\">\n {{status}}\n </div>\n</div>\n<span *ngIf=\"isGroup\">{{status}}</span>\n",
20584
+ changeDetection: core.ChangeDetectionStrategy.OnPush,
20585
+ styles: [".status{line-height:18px}"]
20579
20586
  }),
20580
20587
  __metadata("design:paramtypes", [core.ChangeDetectorRef])
20581
20588
  ], DatoGridStatusCellComponent);
@@ -21406,6 +21413,40 @@
21406
21413
  * found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
21407
21414
  */
21408
21415
 
21416
+ var RichTextService = /** @class */ (function () {
21417
+ function RichTextService(http, config) {
21418
+ this.http = http;
21419
+ this.config = config;
21420
+ }
21421
+ RichTextService.prototype.getLib = function (appendScriptFunc, appendStyleFunc) {
21422
+ if (!this.richTextScript$) {
21423
+ this.initLib(appendScriptFunc, appendStyleFunc);
21424
+ }
21425
+ return this.richTextScript$;
21426
+ };
21427
+ RichTextService.prototype.initLib = function (appendScriptFunc, appendStyleFunc) {
21428
+ this.richTextScript$ = rxjs.combineLatest([
21429
+ this.http
21430
+ .get(this.config.paths.richText + "/index.js", { responseType: 'text' })
21431
+ .pipe(operators.tap(function (lib) { return appendScriptFunc(lib, 'rich-text-editor'); })),
21432
+ this.http
21433
+ .get(this.config.paths.richText + "/plugins/autocomplete/plugin.css", { responseType: 'text' })
21434
+ .pipe(operators.tap(function (style) { return appendStyleFunc(style, 'tinymce-autocomplete'); }))
21435
+ ]).pipe(operators.shareReplay(1));
21436
+ };
21437
+ RichTextService.ctorParameters = function () { return [
21438
+ { type: http.HttpClient },
21439
+ { type: undefined, decorators: [{ type: core.Inject, args: [DATO_CORE_CONFIG,] }] }
21440
+ ]; };
21441
+ RichTextService.ɵprov = core.ɵɵdefineInjectable({ factory: function RichTextService_Factory() { return new RichTextService(core.ɵɵinject(http.HttpClient), core.ɵɵinject(DATO_CORE_CONFIG)); }, token: RichTextService, providedIn: "root" });
21442
+ RichTextService = __decorate([
21443
+ core.Injectable({ providedIn: 'root' }),
21444
+ __param(1, core.Inject(DATO_CORE_CONFIG)),
21445
+ __metadata("design:paramtypes", [http.HttpClient, Object])
21446
+ ], RichTextService);
21447
+ return RichTextService;
21448
+ }());
21449
+
21409
21450
  /**
21410
21451
  * @license
21411
21452
  * Copyright Datorama. All Rights Reserved.
@@ -21419,20 +21460,20 @@
21419
21460
  var ɵ0$3 = getTinymce;
21420
21461
  var DatoRichTextDirective = /** @class */ (function (_super) {
21421
21462
  __extends(DatoRichTextDirective, _super);
21422
- function DatoRichTextDirective(ngZone, http, host, config) {
21463
+ function DatoRichTextDirective(ngZone, richTextService, config, host) {
21423
21464
  var _this = _super.call(this) || this;
21424
21465
  _this.ngZone = ngZone;
21425
- _this.http = http;
21426
- _this.host = host;
21466
+ _this.richTextService = richTextService;
21427
21467
  _this.config = config;
21468
+ _this.host = host;
21428
21469
  _this.autocompleteOptions = {};
21429
21470
  _this.forcePlainTextPasting = false;
21430
21471
  _this.format = 'html';
21431
21472
  _this.isOneLine = false;
21432
21473
  _this.initialValue = '';
21433
- _this.defaultPlugins = 'link fullscreen textcolor colorpicker image lists table textpattern autocomplete';
21474
+ _this.defaultPlugins = 'link fullscreen image lists table autocomplete';
21434
21475
  _this.defaultToolbar = [
21435
- 'fontselect fontsizeselect forecolor backcolor bold italic underline link',
21476
+ 'fontfamily fontsize forecolor backcolor bold italic underline link',
21436
21477
  'alignleft aligncenter alignright alignjustify outdent indent | table numlist bullist | image fullscreen'
21437
21478
  ];
21438
21479
  return _this;
@@ -21458,28 +21499,11 @@
21458
21499
  base: this.config.paths.richText,
21459
21500
  query: ''
21460
21501
  };
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');
21502
+ this.richTextService
21503
+ .getLib(appendScript, appendStyle)
21504
+ .pipe(ngxTakeUntilDestroy.untilDestroyed(this))
21505
+ .subscribe(function () {
21506
+ _this.init.call(_this);
21483
21507
  });
21484
21508
  };
21485
21509
  DatoRichTextDirective.prototype.initEditor = function (_, editor) {
@@ -21503,8 +21527,6 @@
21503
21527
  target: this.host.nativeElement,
21504
21528
  width: this.width || 600,
21505
21529
  height: this.height || 300,
21506
- force_br_newlines: true,
21507
- force_p_newlines: false,
21508
21530
  resize: 'both',
21509
21531
  branding: false,
21510
21532
  inline: this.inline,
@@ -21512,10 +21534,12 @@
21512
21534
  readonly: this.disabled,
21513
21535
  plugins: this.plugins || this.defaultPlugins,
21514
21536
  toolbar: isNil(this.toolbar) ? this.defaultToolbar : this.toolbar,
21515
- fontsize_formats: '8px 10px 12px 14px 18px 24px 36px',
21537
+ font_size_formats: '8px 10px 12px 14px 18px 24px 36px',
21516
21538
  min_width: 480,
21517
21539
  menubar: false,
21518
21540
  autocomplete: this.autocompleteOptions,
21541
+ suffix: '.min',
21542
+ skin: 'tinymce-5',
21519
21543
  setup: function (editor) {
21520
21544
  _this.editor = editor;
21521
21545
  editor.on('init', function (e) {
@@ -21572,9 +21596,9 @@
21572
21596
  var DatoRichTextDirective_1;
21573
21597
  DatoRichTextDirective.ctorParameters = function () { return [
21574
21598
  { type: core.NgZone },
21575
- { type: http.HttpClient },
21576
- { type: core.ElementRef },
21577
- { type: undefined, decorators: [{ type: core.Inject, args: [DATO_CORE_CONFIG,] }] }
21599
+ { type: RichTextService },
21600
+ { type: undefined, decorators: [{ type: core.Inject, args: [DATO_CORE_CONFIG,] }] },
21601
+ { type: core.ElementRef }
21578
21602
  ]; };
21579
21603
  __decorate([
21580
21604
  core.Input(),
@@ -21640,10 +21664,9 @@
21640
21664
  }
21641
21665
  ]
21642
21666
  }),
21643
- __param(3, core.Inject(DATO_CORE_CONFIG)),
21667
+ __param(2, core.Inject(DATO_CORE_CONFIG)),
21644
21668
  __metadata("design:paramtypes", [core.NgZone,
21645
- http.HttpClient,
21646
- core.ElementRef, Object])
21669
+ RichTextService, Object, core.ElementRef])
21647
21670
  ], DatoRichTextDirective);
21648
21671
  return DatoRichTextDirective;
21649
21672
  }(BaseCustomControl));
@@ -24166,7 +24189,9 @@
24166
24189
  };
24167
24190
  DatoBreadcrumbsComponent.prototype.initEditableHeader = function () {
24168
24191
  var _this = this;
24169
- this.headerControl.valueChanges.pipe(operators.debounceTime(300), ngxTakeUntilDestroy.untilDestroyed(this)).subscribe(function (res) {
24192
+ this.headerControl.valueChanges
24193
+ .pipe(operators.debounceTime(300), ngxTakeUntilDestroy.untilDestroyed(this))
24194
+ .subscribe(function (res) {
24170
24195
  _this.updateEditableText.emit(res);
24171
24196
  _this.cdr.detectChanges();
24172
24197
  });
@@ -25529,7 +25554,7 @@
25529
25554
  };
25530
25555
  }
25531
25556
 
25532
- window.coreVersion = '22.9.7';
25557
+ window.coreVersion = '22.10.7-rc.';
25533
25558
 
25534
25559
  exports.APP_TRANSLATE = APP_TRANSLATE;
25535
25560
  exports.AceService = AceService;
@@ -25971,6 +25996,7 @@
25971
25996
  exports.ɵl = DatoGridItemsCountCellComponent;
25972
25997
  exports.ɵm = DatoGridV2ToolbarMoreMenuComponent;
25973
25998
  exports.ɵn = DatoGridSearchBarComponent;
25999
+ exports.ɵo = RichTextService;
25974
26000
 
25975
26001
  Object.defineProperty(exports, '__esModule', { value: true });
25976
26002