@datorama/core 22.0.2 → 22.1.1-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.
- package/bundles/datorama-core.umd.js +98 -58
- 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 +4 -1
- package/esm2015/lib/grid-v2/grid-settings.js +2 -2
- package/esm2015/lib/grid-v2/grid-store/grid.service.js +17 -14
- 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 +4 -1
- package/esm5/lib/grid-v2/grid-settings.js +2 -2
- package/esm5/lib/grid-v2/grid-store/grid.service.js +17 -14
- 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 +90 -58
- package/fesm2015/datorama-core.js.map +1 -1
- package/fesm5/datorama-core.js +98 -59
- 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
|
|
@@ -14936,12 +14932,13 @@
|
|
|
14936
14932
|
if (userProvidedColDef) {
|
|
14937
14933
|
colDef.filter = userProvidedColDef.filter;
|
|
14938
14934
|
}
|
|
14939
|
-
if (colDef.pivotKeys) {
|
|
14940
|
-
|
|
14941
|
-
|
|
14942
|
-
|
|
14943
|
-
|
|
14944
|
-
}
|
|
14935
|
+
// if (colDef.pivotKeys) {
|
|
14936
|
+
// colDef.pivotKeys = colDef.pivotKeys.map(key => {
|
|
14937
|
+
// const parsedKey = tryParsePivotValue(key);
|
|
14938
|
+
//
|
|
14939
|
+
// return (parsedKey && parsedKey.value) || '';
|
|
14940
|
+
// });
|
|
14941
|
+
// }
|
|
14945
14942
|
};
|
|
14946
14943
|
gridOptions.processSecondaryColGroupDef = function (colGroupDef) {
|
|
14947
14944
|
if (colGroupDef.headerName) {
|
|
@@ -14966,12 +14963,13 @@
|
|
|
14966
14963
|
else {
|
|
14967
14964
|
colGroupDef.headerClass = ['empty-pivot-header'];
|
|
14968
14965
|
}
|
|
14969
|
-
if (colGroupDef.pivotKeys) {
|
|
14970
|
-
|
|
14971
|
-
|
|
14972
|
-
|
|
14973
|
-
|
|
14974
|
-
}
|
|
14966
|
+
// if (colGroupDef.pivotKeys) {
|
|
14967
|
+
// colGroupDef.pivotKeys = colGroupDef.pivotKeys.map(key => {
|
|
14968
|
+
// const parsedKey = tryParsePivotValue(key);
|
|
14969
|
+
//
|
|
14970
|
+
// return (parsedKey && parsedKey.value) || '';
|
|
14971
|
+
// });
|
|
14972
|
+
// }
|
|
14975
14973
|
};
|
|
14976
14974
|
};
|
|
14977
14975
|
GridService.prototype.setPivotModeRows = function (data) {
|
|
@@ -15464,7 +15462,10 @@
|
|
|
15464
15462
|
.pipe(operators.switchMap(function () {
|
|
15465
15463
|
_this.gridOptions = _this.normalizeOptions();
|
|
15466
15464
|
agGrid.gridOptions = _this.gridOptions;
|
|
15467
|
-
var
|
|
15465
|
+
var isGlobal = _this.gridOptions.isGlobalSettings;
|
|
15466
|
+
var settingsLoader = _this.gridOptions.saveSettings === false
|
|
15467
|
+
? rxjs.of(null)
|
|
15468
|
+
: _this.storageAPI.get(_this.gridOptions.gridName, isGlobal);
|
|
15468
15469
|
return rxjs.combineLatest([agGrid.gridReady, settingsLoader]);
|
|
15469
15470
|
}), ngxTakeUntilDestroy.untilDestroyed(this))
|
|
15470
15471
|
.subscribe(function (_a) {
|
|
@@ -16424,6 +16425,9 @@
|
|
|
16424
16425
|
DatoGridPaginationV2Component.prototype.toggleGroupsState = function () {
|
|
16425
16426
|
this.isExpanded ? this.gridApi.collapseAll() : this.gridApi.expandAll();
|
|
16426
16427
|
this.isExpanded = !this.isExpanded;
|
|
16428
|
+
// this.gridApi.forEachNode((node: RowNode) => {
|
|
16429
|
+
// node.setExpanded(this.isExpanded);
|
|
16430
|
+
// });
|
|
16427
16431
|
};
|
|
16428
16432
|
DatoGridPaginationV2Component.prototype.autoFitGrid = function (type) {
|
|
16429
16433
|
this.gridService.fitGrid(type);
|
|
@@ -16630,6 +16634,7 @@
|
|
|
16630
16634
|
this.gridActions = { mainList: [], moreMenu: [] };
|
|
16631
16635
|
this.searchPlaceholder = this.translate.transform('core.search');
|
|
16632
16636
|
this.rowActionsShortLabelThreshold = 1539;
|
|
16637
|
+
this.displayCustomGridActionsSeparator = true;
|
|
16633
16638
|
this.openMenus = {
|
|
16634
16639
|
group: false,
|
|
16635
16640
|
settings: false
|
|
@@ -16738,6 +16743,18 @@
|
|
|
16738
16743
|
this.registerGroupListeners();
|
|
16739
16744
|
this.subscribeRowsSelectionData();
|
|
16740
16745
|
};
|
|
16746
|
+
DatoGridV2ToolbarComponent.prototype.getCellValueChangeEvent = function () {
|
|
16747
|
+
var _this = this;
|
|
16748
|
+
return this.gridController.gridQuery.waitForGrid(function () {
|
|
16749
|
+
return _this.gridQuery.gridRef.cellValueChanged.pipe(operators.debounceTime(100), ngxTakeUntilDestroy.untilDestroyed(_this));
|
|
16750
|
+
});
|
|
16751
|
+
};
|
|
16752
|
+
DatoGridV2ToolbarComponent.prototype.getRowDataUpdatedEvent = function () {
|
|
16753
|
+
var _this = this;
|
|
16754
|
+
return this.gridController.gridQuery.waitForGrid(function () {
|
|
16755
|
+
return _this.gridQuery.gridRef.rowDataUpdated.pipe(operators.debounceTime(100), ngxTakeUntilDestroy.untilDestroyed(_this));
|
|
16756
|
+
});
|
|
16757
|
+
};
|
|
16741
16758
|
DatoGridV2ToolbarComponent.prototype.onActionClick = function (action) {
|
|
16742
16759
|
if (isFunction(action.onClick)) {
|
|
16743
16760
|
var selectedRowsCount = this.gridController.gridQuery.getSelectedRowsCount();
|
|
@@ -17037,10 +17054,14 @@
|
|
|
17037
17054
|
core.Input(),
|
|
17038
17055
|
__metadata("design:type", Number)
|
|
17039
17056
|
], DatoGridV2ToolbarComponent.prototype, "rowActionsShortLabelThreshold", void 0);
|
|
17057
|
+
__decorate([
|
|
17058
|
+
core.Input(),
|
|
17059
|
+
__metadata("design:type", Object)
|
|
17060
|
+
], DatoGridV2ToolbarComponent.prototype, "displayCustomGridActionsSeparator", void 0);
|
|
17040
17061
|
DatoGridV2ToolbarComponent = __decorate([
|
|
17041
17062
|
core.Component({
|
|
17042
17063
|
selector: 'dato-grid-toolbar-v2',
|
|
17043
|
-
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",
|
|
17064
|
+
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",
|
|
17044
17065
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
17045
17066
|
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}"]
|
|
17046
17067
|
}),
|
|
@@ -21209,6 +21230,40 @@
|
|
|
21209
21230
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
21210
21231
|
*/
|
|
21211
21232
|
|
|
21233
|
+
var RichTextService = /** @class */ (function () {
|
|
21234
|
+
function RichTextService(http, config) {
|
|
21235
|
+
this.http = http;
|
|
21236
|
+
this.config = config;
|
|
21237
|
+
}
|
|
21238
|
+
RichTextService.prototype.getLib = function (appendScriptFunc, appendStyleFunc) {
|
|
21239
|
+
if (!this.richTextScript$) {
|
|
21240
|
+
this.initLib(appendScriptFunc, appendStyleFunc);
|
|
21241
|
+
}
|
|
21242
|
+
return this.richTextScript$;
|
|
21243
|
+
};
|
|
21244
|
+
RichTextService.prototype.initLib = function (appendScriptFunc, appendStyleFunc) {
|
|
21245
|
+
this.richTextScript$ = rxjs.combineLatest([
|
|
21246
|
+
this.http
|
|
21247
|
+
.get(this.config.paths.richText + "/index.js", { responseType: 'text' })
|
|
21248
|
+
.pipe(operators.tap(function (lib) { return appendScriptFunc(lib, 'rich-text-editor'); })),
|
|
21249
|
+
this.http
|
|
21250
|
+
.get(this.config.paths.richText + "/plugins/autocomplete/plugin.css", { responseType: 'text' })
|
|
21251
|
+
.pipe(operators.tap(function (style) { return appendStyleFunc(style, 'tinymce-autocomplete'); }))
|
|
21252
|
+
]).pipe(operators.shareReplay(1));
|
|
21253
|
+
};
|
|
21254
|
+
RichTextService.ctorParameters = function () { return [
|
|
21255
|
+
{ type: http.HttpClient },
|
|
21256
|
+
{ type: undefined, decorators: [{ type: core.Inject, args: [DATO_CORE_CONFIG,] }] }
|
|
21257
|
+
]; };
|
|
21258
|
+
RichTextService.ɵprov = core.ɵɵdefineInjectable({ factory: function RichTextService_Factory() { return new RichTextService(core.ɵɵinject(http.HttpClient), core.ɵɵinject(DATO_CORE_CONFIG)); }, token: RichTextService, providedIn: "root" });
|
|
21259
|
+
RichTextService = __decorate([
|
|
21260
|
+
core.Injectable({ providedIn: 'root' }),
|
|
21261
|
+
__param(1, core.Inject(DATO_CORE_CONFIG)),
|
|
21262
|
+
__metadata("design:paramtypes", [http.HttpClient, Object])
|
|
21263
|
+
], RichTextService);
|
|
21264
|
+
return RichTextService;
|
|
21265
|
+
}());
|
|
21266
|
+
|
|
21212
21267
|
/**
|
|
21213
21268
|
* @license
|
|
21214
21269
|
* Copyright Datorama. All Rights Reserved.
|
|
@@ -21222,12 +21277,12 @@
|
|
|
21222
21277
|
var ɵ0$3 = getTinymce;
|
|
21223
21278
|
var DatoRichTextDirective = /** @class */ (function (_super) {
|
|
21224
21279
|
__extends(DatoRichTextDirective, _super);
|
|
21225
|
-
function DatoRichTextDirective(ngZone,
|
|
21280
|
+
function DatoRichTextDirective(ngZone, richTextService, config, host) {
|
|
21226
21281
|
var _this = _super.call(this) || this;
|
|
21227
21282
|
_this.ngZone = ngZone;
|
|
21228
|
-
_this.
|
|
21229
|
-
_this.host = host;
|
|
21283
|
+
_this.richTextService = richTextService;
|
|
21230
21284
|
_this.config = config;
|
|
21285
|
+
_this.host = host;
|
|
21231
21286
|
_this.autocompleteOptions = {};
|
|
21232
21287
|
_this.forcePlainTextPasting = false;
|
|
21233
21288
|
_this.format = 'html';
|
|
@@ -21261,28 +21316,11 @@
|
|
|
21261
21316
|
base: this.config.paths.richText,
|
|
21262
21317
|
query: ''
|
|
21263
21318
|
};
|
|
21264
|
-
|
|
21265
|
-
|
|
21266
|
-
|
|
21267
|
-
|
|
21268
|
-
|
|
21269
|
-
}
|
|
21270
|
-
else {
|
|
21271
|
-
this.loadLib().subscribe(function (lib) {
|
|
21272
|
-
appendScript(lib, 'rich-text-editor');
|
|
21273
|
-
_this.init.call(_this);
|
|
21274
|
-
_this.loadAutoCompleteStyle();
|
|
21275
|
-
});
|
|
21276
|
-
}
|
|
21277
|
-
};
|
|
21278
|
-
DatoRichTextDirective.prototype.loadLib = function () {
|
|
21279
|
-
return this.http.get(this.config.paths.richText + "/index.js", { responseType: 'text' });
|
|
21280
|
-
};
|
|
21281
|
-
DatoRichTextDirective.prototype.loadAutoCompleteStyle = function () {
|
|
21282
|
-
this.http
|
|
21283
|
-
.get(this.config.paths.richText + "/plugins/autocomplete/plugin.css", { responseType: 'text' })
|
|
21284
|
-
.subscribe(function (style) {
|
|
21285
|
-
appendStyle(style, 'tinymce-autocomplete');
|
|
21319
|
+
this.richTextService
|
|
21320
|
+
.getLib(appendScript, appendStyle)
|
|
21321
|
+
.pipe(ngxTakeUntilDestroy.untilDestroyed(this))
|
|
21322
|
+
.subscribe(function () {
|
|
21323
|
+
_this.init.call(_this);
|
|
21286
21324
|
});
|
|
21287
21325
|
};
|
|
21288
21326
|
DatoRichTextDirective.prototype.initEditor = function (_, editor) {
|
|
@@ -21375,9 +21413,9 @@
|
|
|
21375
21413
|
var DatoRichTextDirective_1;
|
|
21376
21414
|
DatoRichTextDirective.ctorParameters = function () { return [
|
|
21377
21415
|
{ type: core.NgZone },
|
|
21378
|
-
{ type:
|
|
21379
|
-
{ type: core.
|
|
21380
|
-
{ type:
|
|
21416
|
+
{ type: RichTextService },
|
|
21417
|
+
{ type: undefined, decorators: [{ type: core.Inject, args: [DATO_CORE_CONFIG,] }] },
|
|
21418
|
+
{ type: core.ElementRef }
|
|
21381
21419
|
]; };
|
|
21382
21420
|
__decorate([
|
|
21383
21421
|
core.Input(),
|
|
@@ -21443,10 +21481,9 @@
|
|
|
21443
21481
|
}
|
|
21444
21482
|
]
|
|
21445
21483
|
}),
|
|
21446
|
-
__param(
|
|
21484
|
+
__param(2, core.Inject(DATO_CORE_CONFIG)),
|
|
21447
21485
|
__metadata("design:paramtypes", [core.NgZone,
|
|
21448
|
-
|
|
21449
|
-
core.ElementRef, Object])
|
|
21486
|
+
RichTextService, Object, core.ElementRef])
|
|
21450
21487
|
], DatoRichTextDirective);
|
|
21451
21488
|
return DatoRichTextDirective;
|
|
21452
21489
|
}(BaseCustomControl));
|
|
@@ -23969,7 +24006,9 @@
|
|
|
23969
24006
|
};
|
|
23970
24007
|
DatoBreadcrumbsComponent.prototype.initEditableHeader = function () {
|
|
23971
24008
|
var _this = this;
|
|
23972
|
-
this.headerControl.valueChanges
|
|
24009
|
+
this.headerControl.valueChanges
|
|
24010
|
+
.pipe(operators.debounceTime(300), ngxTakeUntilDestroy.untilDestroyed(this))
|
|
24011
|
+
.subscribe(function (res) {
|
|
23973
24012
|
_this.updateEditableText.emit(res);
|
|
23974
24013
|
_this.cdr.detectChanges();
|
|
23975
24014
|
});
|
|
@@ -25312,7 +25351,7 @@
|
|
|
25312
25351
|
};
|
|
25313
25352
|
}
|
|
25314
25353
|
|
|
25315
|
-
window.coreVersion = '22.
|
|
25354
|
+
window.coreVersion = '22.1.1-rc.';
|
|
25316
25355
|
|
|
25317
25356
|
exports.APP_TRANSLATE = APP_TRANSLATE;
|
|
25318
25357
|
exports.AceService = AceService;
|
|
@@ -25754,6 +25793,7 @@
|
|
|
25754
25793
|
exports.ɵl = DatoGridItemsCountCellComponent;
|
|
25755
25794
|
exports.ɵm = DatoGridV2ToolbarMoreMenuComponent;
|
|
25756
25795
|
exports.ɵn = DatoGridSearchBarComponent;
|
|
25796
|
+
exports.ɵo = RichTextService;
|
|
25757
25797
|
|
|
25758
25798
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
25759
25799
|
|