@datorama/core 22.0.1 → 22.1.1-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.
- package/bundles/datorama-core.umd.js +85 -50
- package/bundles/datorama-core.umd.js.map +1 -1
- package/bundles/datorama-core.umd.min.js +14 -14
- package/bundles/datorama-core.umd.min.js.map +1 -1
- package/datorama-core.d.ts +1 -0
- package/datorama-core.metadata.json +1 -1
- package/esm2015/datorama-core.js +2 -1
- package/esm2015/lib/breadcrumbs/breadcrumbs.component.js +4 -2
- package/esm2015/lib/grid-v2/grid/grid-v2.types.js +1 -1
- package/esm2015/lib/grid-v2/grid-controller/grid-controller.component.js +5 -2
- package/esm2015/lib/grid-v2/grid-pagination/grid-pagination.component.js +5 -4
- package/esm2015/lib/grid-v2/grid-settings.js +2 -2
- package/esm2015/lib/grid-v2/grid-store/grid.service.js +3 -2
- package/esm2015/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +13 -2
- package/esm2015/lib/rich-text/rich-text.directive.js +15 -33
- package/esm2015/lib/rich-text/rich-text.service.js +50 -0
- package/esm2015/lib/select/select.component.js +5 -10
- package/esm2015/lib/version.js +2 -2
- package/esm5/datorama-core.js +2 -1
- package/esm5/lib/breadcrumbs/breadcrumbs.component.js +4 -2
- package/esm5/lib/grid-v2/grid/grid-v2.types.js +1 -1
- package/esm5/lib/grid-v2/grid-controller/grid-controller.component.js +5 -2
- package/esm5/lib/grid-v2/grid-pagination/grid-pagination.component.js +5 -5
- package/esm5/lib/grid-v2/grid-settings.js +2 -2
- package/esm5/lib/grid-v2/grid-store/grid.service.js +3 -2
- package/esm5/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +19 -2
- package/esm5/lib/rich-text/rich-text.directive.js +16 -34
- package/esm5/lib/rich-text/rich-text.service.js +51 -0
- package/esm5/lib/select/select.component.js +5 -10
- package/esm5/lib/version.js +2 -2
- package/fesm2015/datorama-core.js +77 -49
- package/fesm2015/datorama-core.js.map +1 -1
- package/fesm5/datorama-core.js +85 -51
- package/fesm5/datorama-core.js.map +1 -1
- package/lib/grid-v2/grid/grid-v2.types.d.ts +1 -0
- package/lib/grid-v2/grid-settings.d.ts +2 -2
- package/lib/grid-v2/grid-toolbar/grid-toolbar.component.d.ts +3 -0
- package/lib/rich-text/rich-text.directive.d.ts +4 -6
- package/lib/rich-text/rich-text.service.d.ts +10 -0
- package/package.json +1 -1
|
@@ -8629,9 +8629,8 @@
|
|
|
8629
8629
|
DatoSelectComponent.prototype.writeValue = function (activeOptions) {
|
|
8630
8630
|
this._model = activeOptions ? akita.coerceArray(activeOptions) : [];
|
|
8631
8631
|
if (this.options) {
|
|
8632
|
-
var overTheLimit = this.limitSelectedTo && this.isMulti && this._model.length >= this.limitSelectedTo;
|
|
8633
8632
|
this.markAsActive(this._model, { deselectAll: true });
|
|
8634
|
-
|
|
8633
|
+
this.limitSelectedTo && this.updateDisabledState();
|
|
8635
8634
|
}
|
|
8636
8635
|
/** For later updates */
|
|
8637
8636
|
this.cdr.markForCheck();
|
|
@@ -8668,7 +8667,7 @@
|
|
|
8668
8667
|
*/
|
|
8669
8668
|
if (this.hasValue && this._initialOpen) {
|
|
8670
8669
|
this.markAsActive(this._model);
|
|
8671
|
-
if (this.limitSelectedTo
|
|
8670
|
+
if (this.limitSelectedTo) {
|
|
8672
8671
|
this.updateDisabledState();
|
|
8673
8672
|
}
|
|
8674
8673
|
this._initialOpen = false;
|
|
@@ -8757,7 +8756,6 @@
|
|
|
8757
8756
|
};
|
|
8758
8757
|
DatoSelectComponent.prototype.removeOption = function (option) {
|
|
8759
8758
|
var _this = this;
|
|
8760
|
-
var updateDisabled = this.limitSelectedTo && this._model.length === this.limitSelectedTo;
|
|
8761
8759
|
this._model = this._model.filter(function (current) { return current[_this.idKey] !== option[_this.idKey]; });
|
|
8762
8760
|
var optionToRemove = this.options.find(function (datoOption) { return datoOption.option && datoOption.option[_this.idKey] === option[_this.idKey]; });
|
|
8763
8761
|
/**
|
|
@@ -8767,7 +8765,7 @@
|
|
|
8767
8765
|
if (optionToRemove) {
|
|
8768
8766
|
optionToRemove.active = false;
|
|
8769
8767
|
}
|
|
8770
|
-
|
|
8768
|
+
this.limitSelectedTo && this.updateDisabledState();
|
|
8771
8769
|
this.onChange(this._model);
|
|
8772
8770
|
this.cdr.markForCheck();
|
|
8773
8771
|
if (this.datoOverlay.attached) {
|
|
@@ -9117,9 +9115,6 @@
|
|
|
9117
9115
|
if (!datoOption) {
|
|
9118
9116
|
return;
|
|
9119
9117
|
}
|
|
9120
|
-
var modelLength = this._model.length;
|
|
9121
|
-
var updateDisabled = this.limitSelectedTo &&
|
|
9122
|
-
(modelLength === this.limitSelectedTo || (modelLength === this.limitSelectedTo - 1 && !datoOption.active));
|
|
9123
9118
|
datoOption.active = !datoOption.active;
|
|
9124
9119
|
var rawOption = datoOption.option;
|
|
9125
9120
|
if (datoOption.active) {
|
|
@@ -9128,7 +9123,7 @@
|
|
|
9128
9123
|
else {
|
|
9129
9124
|
this._model = this._model.filter(function (current) { return current[_this.idKey] !== rawOption[_this.idKey]; });
|
|
9130
9125
|
}
|
|
9131
|
-
|
|
9126
|
+
this.limitSelectedTo && this.updateDisabledState();
|
|
9132
9127
|
this.onChange(this._model);
|
|
9133
9128
|
this.cdr.markForCheck();
|
|
9134
9129
|
this.datoOverlay.scheduleUpdate();
|
|
@@ -12015,7 +12010,7 @@
|
|
|
12015
12010
|
return contextActions;
|
|
12016
12011
|
}
|
|
12017
12012
|
|
|
12018
|
-
var DATO_GRID_STORAGE_API = new core.InjectionToken('
|
|
12013
|
+
var DATO_GRID_STORAGE_API = new core.InjectionToken('DATO_GRID_STORAGE_AP');
|
|
12019
12014
|
|
|
12020
12015
|
var defaultEditableColumnRenderer = function (params) {
|
|
12021
12016
|
return params && params.value ? "<div class=\"value-wrapper ellipsis\">" + params.value + "</div>" : null;
|
|
@@ -14466,7 +14461,8 @@
|
|
|
14466
14461
|
this.updateSettings({ gridAlignment: gridAlignment, columnsSizes: null });
|
|
14467
14462
|
};
|
|
14468
14463
|
GridService.prototype.saveSettingsToServer = function (settings) {
|
|
14469
|
-
this.
|
|
14464
|
+
var isGlobal = this.gridQuery.getGridOptions().isGlobalSettings;
|
|
14465
|
+
this.storageAPI.set(this.gridName, settings, isGlobal);
|
|
14470
14466
|
};
|
|
14471
14467
|
/**
|
|
14472
14468
|
* @internal used to log grid events to the platform's logging service
|
|
@@ -15464,7 +15460,10 @@
|
|
|
15464
15460
|
.pipe(operators.switchMap(function () {
|
|
15465
15461
|
_this.gridOptions = _this.normalizeOptions();
|
|
15466
15462
|
agGrid.gridOptions = _this.gridOptions;
|
|
15467
|
-
var
|
|
15463
|
+
var isGlobal = _this.gridOptions.isGlobalSettings;
|
|
15464
|
+
var settingsLoader = _this.gridOptions.saveSettings === false
|
|
15465
|
+
? rxjs.of(null)
|
|
15466
|
+
: _this.storageAPI.get(_this.gridOptions.gridName, isGlobal);
|
|
15468
15467
|
return rxjs.combineLatest([agGrid.gridReady, settingsLoader]);
|
|
15469
15468
|
}), ngxTakeUntilDestroy.untilDestroyed(this))
|
|
15470
15469
|
.subscribe(function (_a) {
|
|
@@ -16422,11 +16421,11 @@
|
|
|
16422
16421
|
return page;
|
|
16423
16422
|
};
|
|
16424
16423
|
DatoGridPaginationV2Component.prototype.toggleGroupsState = function () {
|
|
16425
|
-
|
|
16424
|
+
this.isExpanded ? this.gridApi.collapseAll() : this.gridApi.expandAll();
|
|
16426
16425
|
this.isExpanded = !this.isExpanded;
|
|
16427
|
-
this.gridApi.forEachNode(
|
|
16428
|
-
|
|
16429
|
-
});
|
|
16426
|
+
// this.gridApi.forEachNode((node: RowNode) => {
|
|
16427
|
+
// node.setExpanded(this.isExpanded);
|
|
16428
|
+
// });
|
|
16430
16429
|
};
|
|
16431
16430
|
DatoGridPaginationV2Component.prototype.autoFitGrid = function (type) {
|
|
16432
16431
|
this.gridService.fitGrid(type);
|
|
@@ -16633,6 +16632,7 @@
|
|
|
16633
16632
|
this.gridActions = { mainList: [], moreMenu: [] };
|
|
16634
16633
|
this.searchPlaceholder = this.translate.transform('core.search');
|
|
16635
16634
|
this.rowActionsShortLabelThreshold = 1539;
|
|
16635
|
+
this.displayCustomGridActionsSeparator = true;
|
|
16636
16636
|
this.openMenus = {
|
|
16637
16637
|
group: false,
|
|
16638
16638
|
settings: false
|
|
@@ -16741,6 +16741,18 @@
|
|
|
16741
16741
|
this.registerGroupListeners();
|
|
16742
16742
|
this.subscribeRowsSelectionData();
|
|
16743
16743
|
};
|
|
16744
|
+
DatoGridV2ToolbarComponent.prototype.getCellValueChangeEvent = function () {
|
|
16745
|
+
var _this = this;
|
|
16746
|
+
return this.gridController.gridQuery.waitForGrid(function () {
|
|
16747
|
+
return _this.gridQuery.gridRef.cellValueChanged.pipe(operators.debounceTime(100), ngxTakeUntilDestroy.untilDestroyed(_this));
|
|
16748
|
+
});
|
|
16749
|
+
};
|
|
16750
|
+
DatoGridV2ToolbarComponent.prototype.getRowDataUpdatedEvent = function () {
|
|
16751
|
+
var _this = this;
|
|
16752
|
+
return this.gridController.gridQuery.waitForGrid(function () {
|
|
16753
|
+
return _this.gridQuery.gridRef.rowDataUpdated.pipe(operators.debounceTime(100), ngxTakeUntilDestroy.untilDestroyed(_this));
|
|
16754
|
+
});
|
|
16755
|
+
};
|
|
16744
16756
|
DatoGridV2ToolbarComponent.prototype.onActionClick = function (action) {
|
|
16745
16757
|
if (isFunction(action.onClick)) {
|
|
16746
16758
|
var selectedRowsCount = this.gridController.gridQuery.getSelectedRowsCount();
|
|
@@ -17040,10 +17052,14 @@
|
|
|
17040
17052
|
core.Input(),
|
|
17041
17053
|
__metadata("design:type", Number)
|
|
17042
17054
|
], DatoGridV2ToolbarComponent.prototype, "rowActionsShortLabelThreshold", void 0);
|
|
17055
|
+
__decorate([
|
|
17056
|
+
core.Input(),
|
|
17057
|
+
__metadata("design:type", Object)
|
|
17058
|
+
], DatoGridV2ToolbarComponent.prototype, "displayCustomGridActionsSeparator", void 0);
|
|
17043
17059
|
DatoGridV2ToolbarComponent = __decorate([
|
|
17044
17060
|
core.Component({
|
|
17045
17061
|
selector: 'dato-grid-toolbar-v2',
|
|
17046
|
-
template: "<section *ngIf=\"gridController.gridQuery.gridReady$ | async\" class=\"d-flex mb-20 justify-between items-center main-container\" [class.mx-30]=\"enableBackground\">\n\n <section [ngClass]=\"{ 'd-flex items-center right-section': enableV2_1 }\">\n <!-- Dynamic content for the left area -->\n <div data-auto-id=\"grid-toolbar-dynamic-left\">\n <ng-content select=\"[toolbarLeftArea]\"></ng-content>\n </div>\n\n <div class=\"d-flex items-center\">\n <dato-grid-search-bar *ngIf=\"enableSearch\" [searchPlaceholder]=\"searchPlaceholder\"></dato-grid-search-bar>\n <ng-container *ngIf=\"enableV2_1 && selectedRowsCount > 0\">\n <div class=\"d-flex items-center\">\n <div class=\"chip align-center d-flex dato-note px-9 nowrap ml-16\">\n <span data-auto-id=\"grid-selected-items-text\">{{ (allPageRowsSelected ? 'core.all-items-in-page-selected' : 'core.selected-items') | translate:{ itemsCount: selectedRowsCount } }}</span>\n <dato-icon datoType=\"primary\" datoIcon=\"close\" datoSize=\"md\" class=\"ml-6 pointer\" (click)=\"clearSelectedRows()\"\n data-auto-id=\"grid-clear-selected-rows\"></dato-icon>\n </div>\n <dato-link *ngIf=\"allPageRowsSelected\" (click)=\"selectAllPages()\" datoSize=\"sm\" class=\"ml-10\"\n data-auto-id=\"grid-select-all-pages\">\n <span>{{'core.select-all-items' | translate:{ itemsCount: totalRowsCount } }}</span>\n </dato-link>\n </div>\n <div *ngIf=\"hasRowActions\" class=\"separator\"></div>\n </ng-container>\n </div>\n\n <!-- Row Actions-->\n <div class=\"d-flex items-center\" *ngIf=\"isRowActionsVisible\">\n\n <ng-container *ngFor=\"let rowAction of rowActions.mainList; index as i; last as isLast\">\n\n <div *ngIf=\"!isRowActionHidden(rowAction)\"\n [attr.data-auto-id]=\"'grid-toolbar-action-' + rowAction.key\"\n [attr.data-action-index]=\"'grid-toolbar-action-' + i\"\n [class.disabled-action]=\"isActionDisabled(rowAction)\">\n <ng-container [ngTemplateOutlet]=\"rowAction.template || defaultButton\"\n [ngTemplateOutletContext]=\"{disabled: isActionDisabled(rowAction)}\"></ng-container>\n </div>\n\n <ng-template #defaultButton>\n <div (click)=\"onActionClick(rowAction)\">\n <dato-grid-toolbar-button [icon]=\"rowAction.icon\"\n [disabled]=\"isActionDisabled(rowAction)\"\n [label]=\"rowAction.label\"\n [shortLabel]=\"rowAction.shortLabel\"\n [tooltip]=\"rowAction.tooltip\"\n [getMenu]=\"rowAction.getMenu\"\n [enableV2_1]=\"enableV2_1\"\n [isLast]=\"isLast\"\n [widthToHideLabel]=\"widthToHideActionsLabels\">\n </dato-grid-toolbar-button>\n </div>\n </ng-template>\n </ng-container>\n\n <div *ngIf=\"rowActions.moreMenu.length > 0\" class=\"separator\"></div>\n <dato-grid-toolbar-more-menu [actions]=\"rowActions.moreMenu\" (actionClick)=\"onActionClick($event)\" [isRowActions]=\"true\">\n </dato-grid-toolbar-more-menu>\n </div>\n\n </section>\n\n\n <!-- General Actions -->\n <div class=\"d-flex items-center\">\n <!-- Dynamic content for the right area -->\n <div #customActions data-auto-id=\"grid-toolbar-dynamic-right\">\n <ng-content select=\"[toolbarRightArea]\"></ng-content>\n </div>\n <div *ngIf=\"customActions.childNodes.length\" class=\"separator\"></div>\n <!-- Group buttons -->\n <div *ngIf=\"groupsAllowed\" class=\"d-flex grouping-section opacity-0 invisible\" [class.open]=\"openMenus.group || hasGroups\">\n <dato-icon-button [class.active]=\"openMenus.group\" (click)=\"executeTableAction('Group from Toolbar')\"\n data-auto-id=\"grid-toolbar-open-groups\"\n removeIconPadding datoSize=\"md\" datoType=\"none\" icon=\"group\" iconWidth=\"17px\"\n datoTooltip=\"core.row-grouping\" #groupTrigger\n class=\"mr-10 pointer\"></dato-icon-button>\n <dato-icon-button data-auto-id=\"grid-toolbar-toggle-expand\" datoSize=\"md\" datoType=\"none\"\n (click)=\"executeTableAction('Collapse Expand')\"\n [icon]=\"rowGroupsCollapsed ? 'expand' : 'collapse'\"\n [disabled]=\"!hasGroups\"\n [datoTooltip]=\"'core.' + (rowGroupsCollapsed ? 'expand' : 'collapse') + '-rows'\"\n class=\"pointer\"></dato-icon-button>\n <div class=\"separator\"></div>\n </div>\n\n <!-- Settings and export -->\n <ng-container *ngIf=\"createAction\">\n <dato-button datoSize=\"sm\" class=\"pointer primary-300-color\" (click)=\"onActionClick(createAction)\"\n [datoTooltip]=\"createAction.tooltip\" [attr.data-auto-id]=\"'grid-toolbar-action-' + createAction.key\">\n <dato-icon *ngIf=\"createAction.icon\" [icon]=\"createAction.icon\" class=\"mr-5\"></dato-icon>\n {{ createAction.label | translate }}\n </dato-button>\n <div class=\"separator\"></div>\n </ng-container>\n <ng-container *ngFor=\"let gridAction of gridActions.mainList; index as i\">\n <div *ngIf=\"gridAction.getMenu else button\" [datoMenuTriggerFor]=\"gridAction.getMenu()\">\n <ng-container [ngTemplateOutlet]=\"button\"></ng-container>\n </div>\n <ng-template #button>\n <dato-icon datoSize=\"sm\" (click)=\"onActionClick(gridAction)\"\n [attr.data-auto-id]=\"'grid-toolbar-action-' + gridAction.key\"\n [attr.data-action-index]=\"'grid-toolbar-general-action-' + i\"\n [icon]=\"gridAction.icon\" class=\"pointer primary-300-color\"\n [class.mr-16]=\"!gridAction.separator\"\n [datoTooltip]=\"gridAction.tooltip || gridAction.label\">\n </dato-icon>\n </ng-template>\n <div *ngIf=\"gridAction.separator\" class=\"separator\"></div>\n </ng-container>\n\n <dato-icon data-auto-id=\"grid-toolbar-export\" datoSize=\"sm\"\n (click)=\"executeTableAction('Export')\" *ngIf=\"displayExport && !isTreeMode\"\n icon=\"export\" class=\"pointer mr-16 primary-300-color\" datoTooltip=\"core.export-table\"></dato-icon>\n <dato-icon [class.active]=\"openMenus.settings\" (click)=\"openMenus.settings = true\"\n data-auto-id=\"grid-toolbar-settings\" datoSize=\"sm\"\n icon=\"account\" class=\"pointer primary-300-color\" datoTooltip=\"core.table-settings\"\n #settingsTrigger\n [datoMenuTriggerFor]=\"settingsMenu\"></dato-icon>\n\n <ng-container *ngIf=\"gridActions.moreMenu.length > 0\">\n <div class=\"separator\"></div>\n <dato-grid-toolbar-more-menu [actions]=\"gridActions.moreMenu\" (actionClick)=\"onActionClick($event)\" [isRowActions]=\"false\">\n </dato-grid-toolbar-more-menu>\n </ng-container>\n\n\n <dato-menu #settingsMenu=\"datoMenu\" menuClass=\"grid-settings-menu\" placement=\"bottom-end\"\n (menuClosed)=\"openMenus.settings = false\">\n <ng-template datoMenuContent>\n <button data-auto-id=\"grid-toolbar-settings-autofit-page\" datoMenuItem\n (click)=\"executeTableAction('Autofit to Page')\">\n <dato-icon datoSize=\"sm\" icon=\"maximize-horizontal\" class=\"mr-8 primary-300-color\"></dato-icon>\n {{ 'core.autofitPage' | translate }}</button>\n <button data-auto-id=\"grid-toolbar-settings-autofit-content\" datoMenuItem\n (click)=\"executeTableAction('Autofit to Content')\">\n <dato-icon datoSize=\"sm\" icon=\"minimize-horizontal\" class=\"mr-8 primary-300-color\"></dato-icon>\n {{ 'core.autofitContent' | translate }}</button>\n <ng-container *ngIf=\"groupsAllowed\">\n <button data-auto-id=\"grid-toolbar-settings-group\" datoMenuItem (click)=\"executeTableAction('Group from Settings')\">\n <dato-icon datoSize=\"sm\" icon=\"group\" class=\"mr-4 primary-300-color\"></dato-icon>\n {{ 'core.group' | translate }}\n </button>\n </ng-container>\n <button data-auto-id=\"grid-toolbar-settings-toggle-columns\" datoMenuItem (click)=\"executeTableAction('Show Hide Column')\">\n <dato-icon datoSize=\"sm\" icon=\"hide\" class=\"mr-8 primary-300-color\"></dato-icon>\n <span>{{ 'core.hideShowColumns' | translate }}<span\n class=\"dato-simple-italic ml-5 primary-200-color\">{{hiddenColumns}}</span></span>\n </button>\n <button data-auto-id=\"grid-toolbar-settings-reset-settings\" datoMenuItem\n (click)=\"executeTableAction('Reset Settings')\">\n <dato-icon datoSize=\"sm\" icon=\"reset-table\" class=\"mr-8 primary-300-color\"></dato-icon>\n {{ 'core.resetTableSettings' | translate }}\n </button>\n <button data-auto-id=\"grid-toolbar-settings-reset-filters\" datoMenuItem\n (click)=\"executeTableAction('Reset Filters')\">\n <dato-icon datoSize=\"sm\" icon=\"reset-filters\" class=\"mr-8 primary-300-color\"></dato-icon>\n {{ 'core.resetAllFilters' | translate }}\n </button>\n <button data-auto-id=\"grid-toolbar-export\" datoMenuItem\n (click)=\"executeTableAction('Export')\" *ngIf=\"this.displayExport && isTreeMode\">\n <dato-icon datoSize=\"sm\"\n icon=\"export\" class=\"pointer mr-5 primary-300-color\" datoTooltip=\"core.export-table\"></dato-icon>\n {{ 'core.export-table' | translate }}\n </button>\n </ng-template>\n </dato-menu>\n </div>\n</section>\n\n\n",
|
|
17062
|
+
template: "<section *ngIf=\"gridController.gridQuery.gridReady$ | async\" class=\"d-flex mb-20 justify-between items-center main-container\" [class.mx-30]=\"enableBackground\">\n\n <section [ngClass]=\"{ 'd-flex items-center right-section': enableV2_1 }\">\n <!-- Dynamic content for the left area -->\n <div data-auto-id=\"grid-toolbar-dynamic-left\">\n <ng-content select=\"[toolbarLeftArea]\"></ng-content>\n </div>\n\n <div class=\"d-flex items-center\">\n <dato-grid-search-bar *ngIf=\"enableSearch\" [searchPlaceholder]=\"searchPlaceholder\"></dato-grid-search-bar>\n <ng-container *ngIf=\"enableV2_1 && selectedRowsCount > 0\">\n <div class=\"d-flex items-center\">\n <div class=\"chip align-center d-flex dato-note px-9 nowrap ml-16\">\n <span data-auto-id=\"grid-selected-items-text\">{{ (allPageRowsSelected ? 'core.all-items-in-page-selected' : 'core.selected-items') | translate:{ itemsCount: selectedRowsCount } }}</span>\n <dato-icon datoType=\"primary\" datoIcon=\"close\" datoSize=\"md\" class=\"ml-6 pointer\" (click)=\"clearSelectedRows()\"\n data-auto-id=\"grid-clear-selected-rows\"></dato-icon>\n </div>\n <dato-link *ngIf=\"allPageRowsSelected\" (click)=\"selectAllPages()\" datoSize=\"sm\" class=\"ml-10\"\n data-auto-id=\"grid-select-all-pages\">\n <span>{{'core.select-all-items' | translate:{ itemsCount: totalRowsCount } }}</span>\n </dato-link>\n </div>\n <div *ngIf=\"hasRowActions\" class=\"separator\"></div>\n </ng-container>\n </div>\n\n <!-- Row Actions-->\n <div class=\"d-flex items-center\" *ngIf=\"isRowActionsVisible\">\n\n <ng-container *ngFor=\"let rowAction of rowActions.mainList; index as i; last as isLast\">\n\n <div *ngIf=\"!isRowActionHidden(rowAction)\"\n [attr.data-auto-id]=\"'grid-toolbar-action-' + rowAction.key\"\n [attr.data-action-index]=\"'grid-toolbar-action-' + i\"\n [class.disabled-action]=\"isActionDisabled(rowAction)\">\n <ng-container [ngTemplateOutlet]=\"rowAction.template || defaultButton\"\n [ngTemplateOutletContext]=\"{disabled: isActionDisabled(rowAction)}\"></ng-container>\n </div>\n\n <ng-template #defaultButton>\n <div (click)=\"onActionClick(rowAction)\">\n <dato-grid-toolbar-button [icon]=\"rowAction.icon\"\n [disabled]=\"isActionDisabled(rowAction)\"\n [label]=\"rowAction.label\"\n [shortLabel]=\"rowAction.shortLabel\"\n [tooltip]=\"rowAction.tooltip\"\n [getMenu]=\"rowAction.getMenu\"\n [enableV2_1]=\"enableV2_1\"\n [isLast]=\"isLast\"\n [widthToHideLabel]=\"widthToHideActionsLabels\">\n </dato-grid-toolbar-button>\n </div>\n </ng-template>\n </ng-container>\n\n <div *ngIf=\"rowActions.moreMenu.length > 0\" class=\"separator\"></div>\n <dato-grid-toolbar-more-menu [actions]=\"rowActions.moreMenu\" (actionClick)=\"onActionClick($event)\" [isRowActions]=\"true\">\n </dato-grid-toolbar-more-menu>\n </div>\n\n </section>\n\n\n <!-- General Actions -->\n <div class=\"d-flex items-center\">\n <!-- Create action -->\n <ng-container *ngIf=\"createAction\">\n <dato-button datoSize=\"sm\" class=\"pointer primary-300-color\" (click)=\"onActionClick(createAction)\"\n [datoTooltip]=\"createAction.tooltip\" [attr.data-auto-id]=\"'grid-toolbar-action-' + createAction.key\">\n <dato-icon *ngIf=\"createAction.icon\" [icon]=\"createAction.icon\" class=\"mr-5\"></dato-icon>\n {{ createAction.label | translate }}\n </dato-button>\n <div class=\"separator\"></div>\n </ng-container>\n\n <!-- Dynamic content for the right area -->\n <div #customActions data-auto-id=\"grid-toolbar-dynamic-right\">\n <ng-content select=\"[toolbarRightArea]\"></ng-content>\n </div>\n <div *ngIf=\"customActions.childNodes.length && displayCustomGridActionsSeparator\" class=\"separator\"></div>\n\n <!-- Group buttons -->\n <div *ngIf=\"groupsAllowed\" class=\"d-flex grouping-section opacity-0 invisible\" [class.open]=\"openMenus.group || hasGroups\">\n <dato-icon-button [class.active]=\"openMenus.group\" (click)=\"executeTableAction('Group from Toolbar')\"\n data-auto-id=\"grid-toolbar-open-groups\"\n removeIconPadding datoSize=\"md\" datoType=\"none\" icon=\"group\" iconWidth=\"17px\"\n datoTooltip=\"core.row-grouping\" #groupTrigger\n class=\"mr-10 pointer\"></dato-icon-button>\n <dato-icon-button data-auto-id=\"grid-toolbar-toggle-expand\" datoSize=\"md\" datoType=\"none\"\n (click)=\"executeTableAction('Collapse Expand')\"\n [icon]=\"rowGroupsCollapsed ? 'expand' : 'collapse'\"\n [disabled]=\"!hasGroups\"\n [datoTooltip]=\"'core.' + (rowGroupsCollapsed ? 'expand' : 'collapse') + '-rows'\"\n class=\"pointer\"></dato-icon-button>\n <div class=\"separator\"></div>\n </div>\n\n <!-- Grid Actions -->\n <ng-container *ngFor=\"let gridAction of gridActions.mainList; index as i\">\n <div *ngIf=\"gridAction.getMenu else button\" [datoMenuTriggerFor]=\"gridAction.getMenu()\">\n <ng-container [ngTemplateOutlet]=\"button\"></ng-container>\n </div>\n <ng-template #button>\n <dato-icon datoSize=\"sm\" (click)=\"onActionClick(gridAction)\"\n [attr.data-auto-id]=\"'grid-toolbar-action-' + gridAction.key\"\n [attr.data-action-index]=\"'grid-toolbar-general-action-' + i\"\n [icon]=\"gridAction.icon\" class=\"pointer primary-300-color\"\n [class.mr-16]=\"!gridAction.separator\"\n [datoTooltip]=\"gridAction.tooltip || gridAction.label\">\n </dato-icon>\n </ng-template>\n <div *ngIf=\"gridAction.separator\" class=\"separator\"></div>\n </ng-container>\n\n <!-- Export -->\n <dato-icon data-auto-id=\"grid-toolbar-export\" datoSize=\"sm\"\n (click)=\"executeTableAction('Export')\" *ngIf=\"displayExport && !isTreeMode\"\n icon=\"export\" class=\"pointer mr-16 primary-300-color\" datoTooltip=\"core.export-table\"></dato-icon>\n\n <!-- Settings -->\n <dato-icon [class.active]=\"openMenus.settings\" (click)=\"openMenus.settings = true\"\n data-auto-id=\"grid-toolbar-settings\" datoSize=\"sm\"\n icon=\"account\" class=\"pointer primary-300-color\" datoTooltip=\"core.table-settings\"\n #settingsTrigger\n [datoMenuTriggerFor]=\"settingsMenu\"></dato-icon>\n\n <!-- More actions menu -->\n <ng-container *ngIf=\"gridActions.moreMenu.length > 0\">\n <div class=\"separator\"></div>\n <dato-grid-toolbar-more-menu [actions]=\"gridActions.moreMenu\" (actionClick)=\"onActionClick($event)\" [isRowActions]=\"false\">\n </dato-grid-toolbar-more-menu>\n </ng-container>\n\n <dato-menu #settingsMenu=\"datoMenu\" menuClass=\"grid-settings-menu\" placement=\"bottom-end\"\n (menuClosed)=\"openMenus.settings = false\">\n <ng-template datoMenuContent>\n <button data-auto-id=\"grid-toolbar-settings-autofit-page\" datoMenuItem\n (click)=\"executeTableAction('Autofit to Page')\">\n <dato-icon datoSize=\"sm\" icon=\"maximize-horizontal\" class=\"mr-8 primary-300-color\"></dato-icon>\n {{ 'core.autofitPage' | translate }}</button>\n <button data-auto-id=\"grid-toolbar-settings-autofit-content\" datoMenuItem\n (click)=\"executeTableAction('Autofit to Content')\">\n <dato-icon datoSize=\"sm\" icon=\"minimize-horizontal\" class=\"mr-8 primary-300-color\"></dato-icon>\n {{ 'core.autofitContent' | translate }}</button>\n <ng-container *ngIf=\"groupsAllowed\">\n <button data-auto-id=\"grid-toolbar-settings-group\" datoMenuItem (click)=\"executeTableAction('Group from Settings')\">\n <dato-icon datoSize=\"sm\" icon=\"group\" class=\"mr-4 primary-300-color\"></dato-icon>\n {{ 'core.group' | translate }}\n </button>\n </ng-container>\n <button data-auto-id=\"grid-toolbar-settings-toggle-columns\" datoMenuItem (click)=\"executeTableAction('Show Hide Column')\">\n <dato-icon datoSize=\"sm\" icon=\"hide\" class=\"mr-8 primary-300-color\"></dato-icon>\n <span>{{ 'core.hideShowColumns' | translate }}<span\n class=\"dato-simple-italic ml-5 primary-200-color\">{{hiddenColumns}}</span></span>\n </button>\n <button data-auto-id=\"grid-toolbar-settings-reset-settings\" datoMenuItem\n (click)=\"executeTableAction('Reset Settings')\">\n <dato-icon datoSize=\"sm\" icon=\"reset-table\" class=\"mr-8 primary-300-color\"></dato-icon>\n {{ 'core.resetTableSettings' | translate }}\n </button>\n <button data-auto-id=\"grid-toolbar-settings-reset-filters\" datoMenuItem\n (click)=\"executeTableAction('Reset Filters')\">\n <dato-icon datoSize=\"sm\" icon=\"reset-filters\" class=\"mr-8 primary-300-color\"></dato-icon>\n {{ 'core.resetAllFilters' | translate }}\n </button>\n <button data-auto-id=\"grid-toolbar-export\" datoMenuItem\n (click)=\"executeTableAction('Export')\" *ngIf=\"this.displayExport && isTreeMode\">\n <dato-icon datoSize=\"sm\"\n icon=\"export\" class=\"pointer mr-5 primary-300-color\" datoTooltip=\"core.export-table\"></dato-icon>\n {{ 'core.export-table' | translate }}\n </button>\n </ng-template>\n </dato-menu>\n </div>\n</section>\n\n\n",
|
|
17047
17063
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
17048
17064
|
styles: [".grouping-section{transition:visibility .2s ease-in-out,width .2s ease-in-out,opacity .2s ease-in-out;width:0}.grouping-section.open{width:75px;visibility:visible;opacity:1}:host .main-container{min-height:24px}:host .right-section{margin-right:50px}:host .separator{width:1px;height:24px;margin:0 16px}.disabled-action{pointer-events:none}"]
|
|
17049
17065
|
}),
|
|
@@ -21212,6 +21228,40 @@
|
|
|
21212
21228
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
21213
21229
|
*/
|
|
21214
21230
|
|
|
21231
|
+
var RichTextService = /** @class */ (function () {
|
|
21232
|
+
function RichTextService(http, config) {
|
|
21233
|
+
this.http = http;
|
|
21234
|
+
this.config = config;
|
|
21235
|
+
}
|
|
21236
|
+
RichTextService.prototype.getLib = function (appendScriptFunc, appendStyleFunc) {
|
|
21237
|
+
if (!this.richTextScript$) {
|
|
21238
|
+
this.initLib(appendScriptFunc, appendStyleFunc);
|
|
21239
|
+
}
|
|
21240
|
+
return this.richTextScript$;
|
|
21241
|
+
};
|
|
21242
|
+
RichTextService.prototype.initLib = function (appendScriptFunc, appendStyleFunc) {
|
|
21243
|
+
this.richTextScript$ = rxjs.combineLatest([
|
|
21244
|
+
this.http
|
|
21245
|
+
.get(this.config.paths.richText + "/index.js", { responseType: 'text' })
|
|
21246
|
+
.pipe(operators.tap(function (lib) { return appendScriptFunc(lib, 'rich-text-editor'); })),
|
|
21247
|
+
this.http
|
|
21248
|
+
.get(this.config.paths.richText + "/plugins/autocomplete/plugin.css", { responseType: 'text' })
|
|
21249
|
+
.pipe(operators.tap(function (style) { return appendStyleFunc(style, 'tinymce-autocomplete'); }))
|
|
21250
|
+
]).pipe(operators.shareReplay(1));
|
|
21251
|
+
};
|
|
21252
|
+
RichTextService.ctorParameters = function () { return [
|
|
21253
|
+
{ type: http.HttpClient },
|
|
21254
|
+
{ type: undefined, decorators: [{ type: core.Inject, args: [DATO_CORE_CONFIG,] }] }
|
|
21255
|
+
]; };
|
|
21256
|
+
RichTextService.ɵprov = core.ɵɵdefineInjectable({ factory: function RichTextService_Factory() { return new RichTextService(core.ɵɵinject(http.HttpClient), core.ɵɵinject(DATO_CORE_CONFIG)); }, token: RichTextService, providedIn: "root" });
|
|
21257
|
+
RichTextService = __decorate([
|
|
21258
|
+
core.Injectable({ providedIn: 'root' }),
|
|
21259
|
+
__param(1, core.Inject(DATO_CORE_CONFIG)),
|
|
21260
|
+
__metadata("design:paramtypes", [http.HttpClient, Object])
|
|
21261
|
+
], RichTextService);
|
|
21262
|
+
return RichTextService;
|
|
21263
|
+
}());
|
|
21264
|
+
|
|
21215
21265
|
/**
|
|
21216
21266
|
* @license
|
|
21217
21267
|
* Copyright Datorama. All Rights Reserved.
|
|
@@ -21225,12 +21275,12 @@
|
|
|
21225
21275
|
var ɵ0$3 = getTinymce;
|
|
21226
21276
|
var DatoRichTextDirective = /** @class */ (function (_super) {
|
|
21227
21277
|
__extends(DatoRichTextDirective, _super);
|
|
21228
|
-
function DatoRichTextDirective(ngZone,
|
|
21278
|
+
function DatoRichTextDirective(ngZone, richTextService, config, host) {
|
|
21229
21279
|
var _this = _super.call(this) || this;
|
|
21230
21280
|
_this.ngZone = ngZone;
|
|
21231
|
-
_this.
|
|
21232
|
-
_this.host = host;
|
|
21281
|
+
_this.richTextService = richTextService;
|
|
21233
21282
|
_this.config = config;
|
|
21283
|
+
_this.host = host;
|
|
21234
21284
|
_this.autocompleteOptions = {};
|
|
21235
21285
|
_this.forcePlainTextPasting = false;
|
|
21236
21286
|
_this.format = 'html';
|
|
@@ -21264,28 +21314,11 @@
|
|
|
21264
21314
|
base: this.config.paths.richText,
|
|
21265
21315
|
query: ''
|
|
21266
21316
|
};
|
|
21267
|
-
|
|
21268
|
-
|
|
21269
|
-
|
|
21270
|
-
|
|
21271
|
-
|
|
21272
|
-
}
|
|
21273
|
-
else {
|
|
21274
|
-
this.loadLib().subscribe(function (lib) {
|
|
21275
|
-
appendScript(lib, 'rich-text-editor');
|
|
21276
|
-
_this.init.call(_this);
|
|
21277
|
-
_this.loadAutoCompleteStyle();
|
|
21278
|
-
});
|
|
21279
|
-
}
|
|
21280
|
-
};
|
|
21281
|
-
DatoRichTextDirective.prototype.loadLib = function () {
|
|
21282
|
-
return this.http.get(this.config.paths.richText + "/index.js", { responseType: 'text' });
|
|
21283
|
-
};
|
|
21284
|
-
DatoRichTextDirective.prototype.loadAutoCompleteStyle = function () {
|
|
21285
|
-
this.http
|
|
21286
|
-
.get(this.config.paths.richText + "/plugins/autocomplete/plugin.css", { responseType: 'text' })
|
|
21287
|
-
.subscribe(function (style) {
|
|
21288
|
-
appendStyle(style, 'tinymce-autocomplete');
|
|
21317
|
+
this.richTextService
|
|
21318
|
+
.getLib(appendScript, appendStyle)
|
|
21319
|
+
.pipe(ngxTakeUntilDestroy.untilDestroyed(this))
|
|
21320
|
+
.subscribe(function () {
|
|
21321
|
+
_this.init.call(_this);
|
|
21289
21322
|
});
|
|
21290
21323
|
};
|
|
21291
21324
|
DatoRichTextDirective.prototype.initEditor = function (_, editor) {
|
|
@@ -21378,9 +21411,9 @@
|
|
|
21378
21411
|
var DatoRichTextDirective_1;
|
|
21379
21412
|
DatoRichTextDirective.ctorParameters = function () { return [
|
|
21380
21413
|
{ type: core.NgZone },
|
|
21381
|
-
{ type:
|
|
21382
|
-
{ type: core.
|
|
21383
|
-
{ type:
|
|
21414
|
+
{ type: RichTextService },
|
|
21415
|
+
{ type: undefined, decorators: [{ type: core.Inject, args: [DATO_CORE_CONFIG,] }] },
|
|
21416
|
+
{ type: core.ElementRef }
|
|
21384
21417
|
]; };
|
|
21385
21418
|
__decorate([
|
|
21386
21419
|
core.Input(),
|
|
@@ -21446,10 +21479,9 @@
|
|
|
21446
21479
|
}
|
|
21447
21480
|
]
|
|
21448
21481
|
}),
|
|
21449
|
-
__param(
|
|
21482
|
+
__param(2, core.Inject(DATO_CORE_CONFIG)),
|
|
21450
21483
|
__metadata("design:paramtypes", [core.NgZone,
|
|
21451
|
-
|
|
21452
|
-
core.ElementRef, Object])
|
|
21484
|
+
RichTextService, Object, core.ElementRef])
|
|
21453
21485
|
], DatoRichTextDirective);
|
|
21454
21486
|
return DatoRichTextDirective;
|
|
21455
21487
|
}(BaseCustomControl));
|
|
@@ -23972,7 +24004,9 @@
|
|
|
23972
24004
|
};
|
|
23973
24005
|
DatoBreadcrumbsComponent.prototype.initEditableHeader = function () {
|
|
23974
24006
|
var _this = this;
|
|
23975
|
-
this.headerControl.valueChanges
|
|
24007
|
+
this.headerControl.valueChanges
|
|
24008
|
+
.pipe(operators.debounceTime(300), ngxTakeUntilDestroy.untilDestroyed(this))
|
|
24009
|
+
.subscribe(function (res) {
|
|
23976
24010
|
_this.updateEditableText.emit(res);
|
|
23977
24011
|
_this.cdr.detectChanges();
|
|
23978
24012
|
});
|
|
@@ -25315,7 +25349,7 @@
|
|
|
25315
25349
|
};
|
|
25316
25350
|
}
|
|
25317
25351
|
|
|
25318
|
-
window.coreVersion = '22.
|
|
25352
|
+
window.coreVersion = '22.1.1-rc.';
|
|
25319
25353
|
|
|
25320
25354
|
exports.APP_TRANSLATE = APP_TRANSLATE;
|
|
25321
25355
|
exports.AceService = AceService;
|
|
@@ -25757,6 +25791,7 @@
|
|
|
25757
25791
|
exports.ɵl = DatoGridItemsCountCellComponent;
|
|
25758
25792
|
exports.ɵm = DatoGridV2ToolbarMoreMenuComponent;
|
|
25759
25793
|
exports.ɵn = DatoGridSearchBarComponent;
|
|
25794
|
+
exports.ɵo = RichTextService;
|
|
25760
25795
|
|
|
25761
25796
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
25762
25797
|
|