@datorama/core 22.0.2 → 22.0.4-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 +113 -59
- 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-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 +34 -15
- 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-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 +34 -15
- 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 +105 -59
- package/fesm2015/datorama-core.js.map +1 -1
- package/fesm5/datorama-core.js +113 -60
- 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 +8 -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) {
|
|
@@ -16630,6 +16629,7 @@
|
|
|
16630
16629
|
this.gridActions = { mainList: [], moreMenu: [] };
|
|
16631
16630
|
this.searchPlaceholder = this.translate.transform('core.search');
|
|
16632
16631
|
this.rowActionsShortLabelThreshold = 1539;
|
|
16632
|
+
this.displayCustomGridActionsSeparator = true;
|
|
16633
16633
|
this.openMenus = {
|
|
16634
16634
|
group: false,
|
|
16635
16635
|
settings: false
|
|
@@ -16738,6 +16738,18 @@
|
|
|
16738
16738
|
this.registerGroupListeners();
|
|
16739
16739
|
this.subscribeRowsSelectionData();
|
|
16740
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
|
+
};
|
|
16741
16753
|
DatoGridV2ToolbarComponent.prototype.onActionClick = function (action) {
|
|
16742
16754
|
if (isFunction(action.onClick)) {
|
|
16743
16755
|
var selectedRowsCount = this.gridController.gridQuery.getSelectedRowsCount();
|
|
@@ -17037,10 +17049,14 @@
|
|
|
17037
17049
|
core.Input(),
|
|
17038
17050
|
__metadata("design:type", Number)
|
|
17039
17051
|
], DatoGridV2ToolbarComponent.prototype, "rowActionsShortLabelThreshold", void 0);
|
|
17052
|
+
__decorate([
|
|
17053
|
+
core.Input(),
|
|
17054
|
+
__metadata("design:type", Object)
|
|
17055
|
+
], DatoGridV2ToolbarComponent.prototype, "displayCustomGridActionsSeparator", void 0);
|
|
17040
17056
|
DatoGridV2ToolbarComponent = __decorate([
|
|
17041
17057
|
core.Component({
|
|
17042
17058
|
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",
|
|
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",
|
|
17044
17060
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
17045
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}"]
|
|
17046
17062
|
}),
|
|
@@ -21209,6 +21225,40 @@
|
|
|
21209
21225
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
21210
21226
|
*/
|
|
21211
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
|
+
|
|
21212
21262
|
/**
|
|
21213
21263
|
* @license
|
|
21214
21264
|
* Copyright Datorama. All Rights Reserved.
|
|
@@ -21222,12 +21272,12 @@
|
|
|
21222
21272
|
var ɵ0$3 = getTinymce;
|
|
21223
21273
|
var DatoRichTextDirective = /** @class */ (function (_super) {
|
|
21224
21274
|
__extends(DatoRichTextDirective, _super);
|
|
21225
|
-
function DatoRichTextDirective(ngZone,
|
|
21275
|
+
function DatoRichTextDirective(ngZone, richTextService, config, host) {
|
|
21226
21276
|
var _this = _super.call(this) || this;
|
|
21227
21277
|
_this.ngZone = ngZone;
|
|
21228
|
-
_this.
|
|
21229
|
-
_this.host = host;
|
|
21278
|
+
_this.richTextService = richTextService;
|
|
21230
21279
|
_this.config = config;
|
|
21280
|
+
_this.host = host;
|
|
21231
21281
|
_this.autocompleteOptions = {};
|
|
21232
21282
|
_this.forcePlainTextPasting = false;
|
|
21233
21283
|
_this.format = 'html';
|
|
@@ -21261,28 +21311,11 @@
|
|
|
21261
21311
|
base: this.config.paths.richText,
|
|
21262
21312
|
query: ''
|
|
21263
21313
|
};
|
|
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');
|
|
21314
|
+
this.richTextService
|
|
21315
|
+
.getLib(appendScript, appendStyle)
|
|
21316
|
+
.pipe(ngxTakeUntilDestroy.untilDestroyed(this))
|
|
21317
|
+
.subscribe(function () {
|
|
21318
|
+
_this.init.call(_this);
|
|
21286
21319
|
});
|
|
21287
21320
|
};
|
|
21288
21321
|
DatoRichTextDirective.prototype.initEditor = function (_, editor) {
|
|
@@ -21375,9 +21408,9 @@
|
|
|
21375
21408
|
var DatoRichTextDirective_1;
|
|
21376
21409
|
DatoRichTextDirective.ctorParameters = function () { return [
|
|
21377
21410
|
{ type: core.NgZone },
|
|
21378
|
-
{ type:
|
|
21379
|
-
{ type: core.
|
|
21380
|
-
{ type:
|
|
21411
|
+
{ type: RichTextService },
|
|
21412
|
+
{ type: undefined, decorators: [{ type: core.Inject, args: [DATO_CORE_CONFIG,] }] },
|
|
21413
|
+
{ type: core.ElementRef }
|
|
21381
21414
|
]; };
|
|
21382
21415
|
__decorate([
|
|
21383
21416
|
core.Input(),
|
|
@@ -21443,10 +21476,9 @@
|
|
|
21443
21476
|
}
|
|
21444
21477
|
]
|
|
21445
21478
|
}),
|
|
21446
|
-
__param(
|
|
21479
|
+
__param(2, core.Inject(DATO_CORE_CONFIG)),
|
|
21447
21480
|
__metadata("design:paramtypes", [core.NgZone,
|
|
21448
|
-
|
|
21449
|
-
core.ElementRef, Object])
|
|
21481
|
+
RichTextService, Object, core.ElementRef])
|
|
21450
21482
|
], DatoRichTextDirective);
|
|
21451
21483
|
return DatoRichTextDirective;
|
|
21452
21484
|
}(BaseCustomControl));
|
|
@@ -23969,7 +24001,9 @@
|
|
|
23969
24001
|
};
|
|
23970
24002
|
DatoBreadcrumbsComponent.prototype.initEditableHeader = function () {
|
|
23971
24003
|
var _this = this;
|
|
23972
|
-
this.headerControl.valueChanges
|
|
24004
|
+
this.headerControl.valueChanges
|
|
24005
|
+
.pipe(operators.debounceTime(300), ngxTakeUntilDestroy.untilDestroyed(this))
|
|
24006
|
+
.subscribe(function (res) {
|
|
23973
24007
|
_this.updateEditableText.emit(res);
|
|
23974
24008
|
_this.cdr.detectChanges();
|
|
23975
24009
|
});
|
|
@@ -24658,22 +24692,16 @@
|
|
|
24658
24692
|
}());
|
|
24659
24693
|
|
|
24660
24694
|
var DatoProgressBarComponent = /** @class */ (function () {
|
|
24661
|
-
function DatoProgressBarComponent() {
|
|
24695
|
+
function DatoProgressBarComponent(cdr) {
|
|
24696
|
+
this.cdr = cdr;
|
|
24662
24697
|
this.barColor = 'primary-100';
|
|
24663
24698
|
this.thresholds = [33, 66];
|
|
24664
24699
|
}
|
|
24665
24700
|
DatoProgressBarComponent.prototype.ngOnInit = function () {
|
|
24666
24701
|
if (!this.parts && this.percent) {
|
|
24667
|
-
|
|
24668
|
-
|
|
24669
|
-
|
|
24670
|
-
this.parts = [
|
|
24671
|
-
{
|
|
24672
|
-
percent: this.percent,
|
|
24673
|
-
color: this.color,
|
|
24674
|
-
tooltip: this.tooltip
|
|
24675
|
-
}
|
|
24676
|
-
];
|
|
24702
|
+
this.isByPercent = true;
|
|
24703
|
+
this.hasInitialColor = !!this.color;
|
|
24704
|
+
this.initSinglePart();
|
|
24677
24705
|
}
|
|
24678
24706
|
else if (this.parts &&
|
|
24679
24707
|
this.parts.every(function (part) { return part.weight >= 0; }) &&
|
|
@@ -24681,6 +24709,27 @@
|
|
|
24681
24709
|
this.initPartsPercent();
|
|
24682
24710
|
}
|
|
24683
24711
|
};
|
|
24712
|
+
DatoProgressBarComponent.prototype.ngOnChanges = function (changes) {
|
|
24713
|
+
if (this.isByPercent &&
|
|
24714
|
+
((changes.percent && !changes.percent.firstChange) ||
|
|
24715
|
+
(changes.color && !changes.color.firstChange) ||
|
|
24716
|
+
(changes.tooltip && !changes.tooltip.firstChange))) {
|
|
24717
|
+
this.initSinglePart();
|
|
24718
|
+
this.cdr.detectChanges();
|
|
24719
|
+
}
|
|
24720
|
+
};
|
|
24721
|
+
DatoProgressBarComponent.prototype.initSinglePart = function () {
|
|
24722
|
+
if (!this.color || !this.hasInitialColor) {
|
|
24723
|
+
this.initColor();
|
|
24724
|
+
}
|
|
24725
|
+
this.parts = [
|
|
24726
|
+
{
|
|
24727
|
+
percent: this.percent,
|
|
24728
|
+
color: this.color,
|
|
24729
|
+
tooltip: this.tooltip
|
|
24730
|
+
}
|
|
24731
|
+
];
|
|
24732
|
+
};
|
|
24684
24733
|
DatoProgressBarComponent.prototype.initColor = function () {
|
|
24685
24734
|
if (isEmpty(this.thresholds)) {
|
|
24686
24735
|
this.color = 'accent-400';
|
|
@@ -24721,6 +24770,9 @@
|
|
|
24721
24770
|
}
|
|
24722
24771
|
}
|
|
24723
24772
|
};
|
|
24773
|
+
DatoProgressBarComponent.ctorParameters = function () { return [
|
|
24774
|
+
{ type: core.ChangeDetectorRef }
|
|
24775
|
+
]; };
|
|
24724
24776
|
__decorate([
|
|
24725
24777
|
core.Input(),
|
|
24726
24778
|
__metadata("design:type", String)
|
|
@@ -24756,11 +24808,12 @@
|
|
|
24756
24808
|
DatoProgressBarComponent = __decorate([
|
|
24757
24809
|
core.Component({
|
|
24758
24810
|
selector: 'dato-progress-bar',
|
|
24759
|
-
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",
|
|
24811
|
+
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",
|
|
24760
24812
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
24761
24813
|
encapsulation: core.ViewEncapsulation.None,
|
|
24762
24814
|
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%}"]
|
|
24763
|
-
})
|
|
24815
|
+
}),
|
|
24816
|
+
__metadata("design:paramtypes", [core.ChangeDetectorRef])
|
|
24764
24817
|
], DatoProgressBarComponent);
|
|
24765
24818
|
return DatoProgressBarComponent;
|
|
24766
24819
|
}());
|
|
@@ -25312,7 +25365,7 @@
|
|
|
25312
25365
|
};
|
|
25313
25366
|
}
|
|
25314
25367
|
|
|
25315
|
-
window.coreVersion = '22.
|
|
25368
|
+
window.coreVersion = '22.1.3-rc.';
|
|
25316
25369
|
|
|
25317
25370
|
exports.APP_TRANSLATE = APP_TRANSLATE;
|
|
25318
25371
|
exports.AceService = AceService;
|
|
@@ -25754,6 +25807,7 @@
|
|
|
25754
25807
|
exports.ɵl = DatoGridItemsCountCellComponent;
|
|
25755
25808
|
exports.ɵm = DatoGridV2ToolbarMoreMenuComponent;
|
|
25756
25809
|
exports.ɵn = DatoGridSearchBarComponent;
|
|
25810
|
+
exports.ɵo = RichTextService;
|
|
25757
25811
|
|
|
25758
25812
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
25759
25813
|
|