@datorama/core 22.0.1 → 22.0.4-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 +106 -61
- 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 +2 -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/progress-bar/progress-bar.component.js +26 -13
- 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 +2 -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/progress-bar/progress-bar.component.js +26 -13
- 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 +98 -60
- package/fesm2015/datorama-core.js.map +1 -1
- package/fesm5/datorama-core.js +106 -62
- 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/progress-bar/progress-bar.component.d.ts +6 -2
- 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 +2 -2
|
@@ -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,8 @@
|
|
|
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(function (node) {
|
|
16428
|
-
node.setExpanded(_this.isExpanded);
|
|
16429
|
-
});
|
|
16430
16426
|
};
|
|
16431
16427
|
DatoGridPaginationV2Component.prototype.autoFitGrid = function (type) {
|
|
16432
16428
|
this.gridService.fitGrid(type);
|
|
@@ -16633,6 +16629,7 @@
|
|
|
16633
16629
|
this.gridActions = { mainList: [], moreMenu: [] };
|
|
16634
16630
|
this.searchPlaceholder = this.translate.transform('core.search');
|
|
16635
16631
|
this.rowActionsShortLabelThreshold = 1539;
|
|
16632
|
+
this.displayCustomGridActionsSeparator = true;
|
|
16636
16633
|
this.openMenus = {
|
|
16637
16634
|
group: false,
|
|
16638
16635
|
settings: false
|
|
@@ -16741,6 +16738,18 @@
|
|
|
16741
16738
|
this.registerGroupListeners();
|
|
16742
16739
|
this.subscribeRowsSelectionData();
|
|
16743
16740
|
};
|
|
16741
|
+
DatoGridV2ToolbarComponent.prototype.getCellValueChangeEvent = function () {
|
|
16742
|
+
var _this = this;
|
|
16743
|
+
return this.gridController.gridQuery.waitForGrid(function () {
|
|
16744
|
+
return _this.gridQuery.gridRef.cellValueChanged.pipe(operators.debounceTime(100), ngxTakeUntilDestroy.untilDestroyed(_this));
|
|
16745
|
+
});
|
|
16746
|
+
};
|
|
16747
|
+
DatoGridV2ToolbarComponent.prototype.getRowDataUpdatedEvent = function () {
|
|
16748
|
+
var _this = this;
|
|
16749
|
+
return this.gridController.gridQuery.waitForGrid(function () {
|
|
16750
|
+
return _this.gridQuery.gridRef.rowDataUpdated.pipe(operators.debounceTime(100), ngxTakeUntilDestroy.untilDestroyed(_this));
|
|
16751
|
+
});
|
|
16752
|
+
};
|
|
16744
16753
|
DatoGridV2ToolbarComponent.prototype.onActionClick = function (action) {
|
|
16745
16754
|
if (isFunction(action.onClick)) {
|
|
16746
16755
|
var selectedRowsCount = this.gridController.gridQuery.getSelectedRowsCount();
|
|
@@ -17040,10 +17049,14 @@
|
|
|
17040
17049
|
core.Input(),
|
|
17041
17050
|
__metadata("design:type", Number)
|
|
17042
17051
|
], DatoGridV2ToolbarComponent.prototype, "rowActionsShortLabelThreshold", void 0);
|
|
17052
|
+
__decorate([
|
|
17053
|
+
core.Input(),
|
|
17054
|
+
__metadata("design:type", Object)
|
|
17055
|
+
], DatoGridV2ToolbarComponent.prototype, "displayCustomGridActionsSeparator", void 0);
|
|
17043
17056
|
DatoGridV2ToolbarComponent = __decorate([
|
|
17044
17057
|
core.Component({
|
|
17045
17058
|
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",
|
|
17059
|
+
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
17060
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
17048
17061
|
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
17062
|
}),
|
|
@@ -21212,6 +21225,40 @@
|
|
|
21212
21225
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
21213
21226
|
*/
|
|
21214
21227
|
|
|
21228
|
+
var RichTextService = /** @class */ (function () {
|
|
21229
|
+
function RichTextService(http, config) {
|
|
21230
|
+
this.http = http;
|
|
21231
|
+
this.config = config;
|
|
21232
|
+
}
|
|
21233
|
+
RichTextService.prototype.getLib = function (appendScriptFunc, appendStyleFunc) {
|
|
21234
|
+
if (!this.richTextScript$) {
|
|
21235
|
+
this.initLib(appendScriptFunc, appendStyleFunc);
|
|
21236
|
+
}
|
|
21237
|
+
return this.richTextScript$;
|
|
21238
|
+
};
|
|
21239
|
+
RichTextService.prototype.initLib = function (appendScriptFunc, appendStyleFunc) {
|
|
21240
|
+
this.richTextScript$ = rxjs.combineLatest([
|
|
21241
|
+
this.http
|
|
21242
|
+
.get(this.config.paths.richText + "/index.js", { responseType: 'text' })
|
|
21243
|
+
.pipe(operators.tap(function (lib) { return appendScriptFunc(lib, 'rich-text-editor'); })),
|
|
21244
|
+
this.http
|
|
21245
|
+
.get(this.config.paths.richText + "/plugins/autocomplete/plugin.css", { responseType: 'text' })
|
|
21246
|
+
.pipe(operators.tap(function (style) { return appendStyleFunc(style, 'tinymce-autocomplete'); }))
|
|
21247
|
+
]).pipe(operators.shareReplay(1));
|
|
21248
|
+
};
|
|
21249
|
+
RichTextService.ctorParameters = function () { return [
|
|
21250
|
+
{ type: http.HttpClient },
|
|
21251
|
+
{ type: undefined, decorators: [{ type: core.Inject, args: [DATO_CORE_CONFIG,] }] }
|
|
21252
|
+
]; };
|
|
21253
|
+
RichTextService.ɵprov = core.ɵɵdefineInjectable({ factory: function RichTextService_Factory() { return new RichTextService(core.ɵɵinject(http.HttpClient), core.ɵɵinject(DATO_CORE_CONFIG)); }, token: RichTextService, providedIn: "root" });
|
|
21254
|
+
RichTextService = __decorate([
|
|
21255
|
+
core.Injectable({ providedIn: 'root' }),
|
|
21256
|
+
__param(1, core.Inject(DATO_CORE_CONFIG)),
|
|
21257
|
+
__metadata("design:paramtypes", [http.HttpClient, Object])
|
|
21258
|
+
], RichTextService);
|
|
21259
|
+
return RichTextService;
|
|
21260
|
+
}());
|
|
21261
|
+
|
|
21215
21262
|
/**
|
|
21216
21263
|
* @license
|
|
21217
21264
|
* Copyright Datorama. All Rights Reserved.
|
|
@@ -21225,12 +21272,12 @@
|
|
|
21225
21272
|
var ɵ0$3 = getTinymce;
|
|
21226
21273
|
var DatoRichTextDirective = /** @class */ (function (_super) {
|
|
21227
21274
|
__extends(DatoRichTextDirective, _super);
|
|
21228
|
-
function DatoRichTextDirective(ngZone,
|
|
21275
|
+
function DatoRichTextDirective(ngZone, richTextService, config, host) {
|
|
21229
21276
|
var _this = _super.call(this) || this;
|
|
21230
21277
|
_this.ngZone = ngZone;
|
|
21231
|
-
_this.
|
|
21232
|
-
_this.host = host;
|
|
21278
|
+
_this.richTextService = richTextService;
|
|
21233
21279
|
_this.config = config;
|
|
21280
|
+
_this.host = host;
|
|
21234
21281
|
_this.autocompleteOptions = {};
|
|
21235
21282
|
_this.forcePlainTextPasting = false;
|
|
21236
21283
|
_this.format = 'html';
|
|
@@ -21264,28 +21311,11 @@
|
|
|
21264
21311
|
base: this.config.paths.richText,
|
|
21265
21312
|
query: ''
|
|
21266
21313
|
};
|
|
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');
|
|
21314
|
+
this.richTextService
|
|
21315
|
+
.getLib(appendScript, appendStyle)
|
|
21316
|
+
.pipe(ngxTakeUntilDestroy.untilDestroyed(this))
|
|
21317
|
+
.subscribe(function () {
|
|
21318
|
+
_this.init.call(_this);
|
|
21289
21319
|
});
|
|
21290
21320
|
};
|
|
21291
21321
|
DatoRichTextDirective.prototype.initEditor = function (_, editor) {
|
|
@@ -21378,9 +21408,9 @@
|
|
|
21378
21408
|
var DatoRichTextDirective_1;
|
|
21379
21409
|
DatoRichTextDirective.ctorParameters = function () { return [
|
|
21380
21410
|
{ type: core.NgZone },
|
|
21381
|
-
{ type:
|
|
21382
|
-
{ type: core.
|
|
21383
|
-
{ type:
|
|
21411
|
+
{ type: RichTextService },
|
|
21412
|
+
{ type: undefined, decorators: [{ type: core.Inject, args: [DATO_CORE_CONFIG,] }] },
|
|
21413
|
+
{ type: core.ElementRef }
|
|
21384
21414
|
]; };
|
|
21385
21415
|
__decorate([
|
|
21386
21416
|
core.Input(),
|
|
@@ -21446,10 +21476,9 @@
|
|
|
21446
21476
|
}
|
|
21447
21477
|
]
|
|
21448
21478
|
}),
|
|
21449
|
-
__param(
|
|
21479
|
+
__param(2, core.Inject(DATO_CORE_CONFIG)),
|
|
21450
21480
|
__metadata("design:paramtypes", [core.NgZone,
|
|
21451
|
-
|
|
21452
|
-
core.ElementRef, Object])
|
|
21481
|
+
RichTextService, Object, core.ElementRef])
|
|
21453
21482
|
], DatoRichTextDirective);
|
|
21454
21483
|
return DatoRichTextDirective;
|
|
21455
21484
|
}(BaseCustomControl));
|
|
@@ -23972,7 +24001,9 @@
|
|
|
23972
24001
|
};
|
|
23973
24002
|
DatoBreadcrumbsComponent.prototype.initEditableHeader = function () {
|
|
23974
24003
|
var _this = this;
|
|
23975
|
-
this.headerControl.valueChanges
|
|
24004
|
+
this.headerControl.valueChanges
|
|
24005
|
+
.pipe(operators.debounceTime(300), ngxTakeUntilDestroy.untilDestroyed(this))
|
|
24006
|
+
.subscribe(function (res) {
|
|
23976
24007
|
_this.updateEditableText.emit(res);
|
|
23977
24008
|
_this.cdr.detectChanges();
|
|
23978
24009
|
});
|
|
@@ -24667,16 +24698,9 @@
|
|
|
24667
24698
|
}
|
|
24668
24699
|
DatoProgressBarComponent.prototype.ngOnInit = function () {
|
|
24669
24700
|
if (!this.parts && this.percent) {
|
|
24670
|
-
|
|
24671
|
-
|
|
24672
|
-
|
|
24673
|
-
this.parts = [
|
|
24674
|
-
{
|
|
24675
|
-
percent: this.percent,
|
|
24676
|
-
color: this.color,
|
|
24677
|
-
tooltip: this.tooltip
|
|
24678
|
-
}
|
|
24679
|
-
];
|
|
24701
|
+
this.isByPercent = true;
|
|
24702
|
+
this.hasInitialColor = !!this.color;
|
|
24703
|
+
this.initSinglePart();
|
|
24680
24704
|
}
|
|
24681
24705
|
else if (this.parts &&
|
|
24682
24706
|
this.parts.every(function (part) { return part.weight >= 0; }) &&
|
|
@@ -24684,6 +24708,26 @@
|
|
|
24684
24708
|
this.initPartsPercent();
|
|
24685
24709
|
}
|
|
24686
24710
|
};
|
|
24711
|
+
DatoProgressBarComponent.prototype.ngOnChanges = function (changes) {
|
|
24712
|
+
if (this.isByPercent &&
|
|
24713
|
+
((changes.percent && !changes.percent.firstChange) ||
|
|
24714
|
+
(changes.color && !changes.color.firstChange) ||
|
|
24715
|
+
(changes.tooltip && !changes.tooltip.firstChange))) {
|
|
24716
|
+
this.initSinglePart();
|
|
24717
|
+
}
|
|
24718
|
+
};
|
|
24719
|
+
DatoProgressBarComponent.prototype.initSinglePart = function () {
|
|
24720
|
+
if (!this.color || !this.hasInitialColor) {
|
|
24721
|
+
this.initColor();
|
|
24722
|
+
}
|
|
24723
|
+
this.parts = [
|
|
24724
|
+
{
|
|
24725
|
+
percent: this.percent,
|
|
24726
|
+
color: this.color,
|
|
24727
|
+
tooltip: this.tooltip
|
|
24728
|
+
}
|
|
24729
|
+
];
|
|
24730
|
+
};
|
|
24687
24731
|
DatoProgressBarComponent.prototype.initColor = function () {
|
|
24688
24732
|
if (isEmpty(this.thresholds)) {
|
|
24689
24733
|
this.color = 'accent-400';
|
|
@@ -24759,7 +24803,7 @@
|
|
|
24759
24803
|
DatoProgressBarComponent = __decorate([
|
|
24760
24804
|
core.Component({
|
|
24761
24805
|
selector: 'dato-progress-bar',
|
|
24762
|
-
template: "<div class=\"bar d-flex width-100 overflow-hidden\"\n [style.width]=\"width\"\n [class]=\"barColor + '-background-color'\">\n <div *ngFor=\"let part of parts; index as i\"\n class=\"part height-100\"\n [ngClass]=\"part.color ? part.color + '-background-color' : ''\"\n [style.width]=\"i > 0 ? 'calc(' + part.percent + '% + 8px)' : part.percent + '%'\"\n [style.z-index]=\"100 - i\"\n [datoTooltipV2]=\"part.tooltip\">\n </div>\n</div>\n\n<div *ngIf=\"showLegend\" class=\"d-flex mt-12\">\n <div *ngFor=\"let part of parts; index as i\" class=\"d-flex mr-16\">\n <div class=\"d-flex dato-note primary-400-color\">\n <div class=\"legend-color mr-6\" [ngClass]=\"part.color ? part.color + '-background-color' : ''\"></div>\n <div>{{ part.legendLabel || part.tooltip }}</div>\n </div>\n </div>\n</div>\n",
|
|
24806
|
+
template: "<div class=\"bar d-flex width-100 overflow-hidden\"\n [style.width]=\"width\"\n [class]=\"barColor + '-background-color'\">\n <div *ngFor=\"let part of parts; index as i\"\n class=\"part height-100\"\n [ngClass]=\"part.color ? part.color + '-background-color' : ''\"\n [style.width]=\"i > 0 ? 'calc(' + part.percent + '% + 8px)' : part.percent + '%'\"\n [style.z-index]=\"100 - i\"\n [datoTooltipV2]=\"part.tooltip\">\n </div>\n</div>\n\n<ng-content></ng-content>\n\n<div *ngIf=\"showLegend\" class=\"d-flex mt-12\">\n <div *ngFor=\"let part of parts; index as i\" class=\"d-flex mr-16\">\n <div class=\"d-flex dato-note primary-400-color\">\n <div class=\"legend-color mr-6\" [ngClass]=\"part.color ? part.color + '-background-color' : ''\"></div>\n <div>{{ part.legendLabel || part.tooltip }}</div>\n </div>\n </div>\n</div>\n",
|
|
24763
24807
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
24764
24808
|
encapsulation: core.ViewEncapsulation.None,
|
|
24765
24809
|
styles: ["dato-progress-bar .bar{height:8px;border-radius:4px}dato-progress-bar .part{border-radius:0 4px 4px 0}dato-progress-bar .part:not(:first-child){margin-left:-8px}dato-progress-bar .legend-color{width:16px;height:16px;min-width:16px;border-radius:50%}"]
|
|
@@ -25315,7 +25359,7 @@
|
|
|
25315
25359
|
};
|
|
25316
25360
|
}
|
|
25317
25361
|
|
|
25318
|
-
window.coreVersion = '22.
|
|
25362
|
+
window.coreVersion = '22.1.3-rc.';
|
|
25319
25363
|
|
|
25320
25364
|
exports.APP_TRANSLATE = APP_TRANSLATE;
|
|
25321
25365
|
exports.AceService = AceService;
|
|
@@ -25757,6 +25801,7 @@
|
|
|
25757
25801
|
exports.ɵl = DatoGridItemsCountCellComponent;
|
|
25758
25802
|
exports.ɵm = DatoGridV2ToolbarMoreMenuComponent;
|
|
25759
25803
|
exports.ɵn = DatoGridSearchBarComponent;
|
|
25804
|
+
exports.ɵo = RichTextService;
|
|
25760
25805
|
|
|
25761
25806
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
25762
25807
|
|