@datorama/core 22.12.5 → 22.12.7-beta.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 +29 -17
- package/bundles/datorama-core.umd.js.map +1 -1
- package/bundles/datorama-core.umd.min.js +26 -26
- package/bundles/datorama-core.umd.min.js.map +1 -1
- package/datorama-core.metadata.json +1 -1
- package/esm2015/lib/grid-v2/grid/grid-v2.config.js +2 -2
- package/esm2015/lib/grid-v2/grid/grid-v2.types.js +16 -8
- package/esm2015/lib/grid-v2/grid-controller/grid-controller.component.js +10 -7
- package/esm2015/lib/grid-v2/grid-store/grid.service.js +6 -4
- package/esm2015/lib/grid-v2/grid-v2.util.js +1 -1
- package/esm2015/lib/icon/icon.types.js +1 -1
- package/esm2015/lib/progress-bar/progress-bar.component.js +2 -2
- package/esm2015/lib/version.js +2 -2
- package/esm5/lib/grid-v2/grid/grid-v2.config.js +2 -2
- package/esm5/lib/grid-v2/grid/grid-v2.types.js +17 -8
- package/esm5/lib/grid-v2/grid-controller/grid-controller.component.js +10 -7
- package/esm5/lib/grid-v2/grid-store/grid.service.js +6 -4
- package/esm5/lib/grid-v2/grid-v2.util.js +1 -1
- package/esm5/lib/icon/icon.types.js +1 -1
- package/esm5/lib/progress-bar/progress-bar.component.js +2 -2
- package/esm5/lib/version.js +2 -2
- package/fesm2015/datorama-core.js +28 -17
- package/fesm2015/datorama-core.js.map +1 -1
- package/fesm5/datorama-core.js +29 -17
- package/fesm5/datorama-core.js.map +1 -1
- package/lib/grid-v2/grid/grid-v2.types.d.ts +3 -2
- package/lib/grid-v2/grid-v2.util.d.ts +1 -1
- package/package.json +1 -1
|
@@ -12110,18 +12110,25 @@
|
|
|
12110
12110
|
var defaultEditableColumnRenderer = function (params) {
|
|
12111
12111
|
return params && params.value ? "<div class=\"value-wrapper ellipsis\">" + params.value + "</div>" : null;
|
|
12112
12112
|
};
|
|
12113
|
-
var editableCellRendererWithSearchHighlight = function (params, searchTerm) {
|
|
12113
|
+
var editableCellRendererWithSearchHighlight = function (params, searchTerm, allowHTML) {
|
|
12114
12114
|
if (!params || !params.value) {
|
|
12115
12115
|
return null;
|
|
12116
12116
|
}
|
|
12117
|
-
return "<div class=\"value-wrapper ellipsis\">" + searchHighlightCellRenderer(params, searchTerm) + "</div>";
|
|
12117
|
+
return "<div class=\"value-wrapper ellipsis\">" + searchHighlightCellRenderer(params, searchTerm, allowHTML) + "</div>";
|
|
12118
12118
|
};
|
|
12119
|
-
var searchHighlightCellRenderer = function (params, searchTerm) {
|
|
12119
|
+
var searchHighlightCellRenderer = function (params, searchTerm, allowHTML) {
|
|
12120
|
+
if (allowHTML === void 0) { allowHTML = true; }
|
|
12121
|
+
var cellValue = (params.valueFormatted || params.value || '').toString();
|
|
12122
|
+
if (!allowHTML) {
|
|
12123
|
+
cellValue = escape(cellValue);
|
|
12124
|
+
}
|
|
12125
|
+
else {
|
|
12126
|
+
cellValue = DOMPurify.sanitize(cellValue);
|
|
12127
|
+
}
|
|
12120
12128
|
searchTerm = (searchTerm || '').trim();
|
|
12121
|
-
|
|
12122
|
-
|
|
12123
|
-
|
|
12124
|
-
: value;
|
|
12129
|
+
return searchTerm ?
|
|
12130
|
+
cellValue.replace(new RegExp(searchTerm, 'gi'), function (str) { return "<span class=\"search-highlight\">" + str + "</span>"; }) :
|
|
12131
|
+
cellValue;
|
|
12125
12132
|
};
|
|
12126
12133
|
|
|
12127
12134
|
(function (GridMinWidths) {
|
|
@@ -13792,7 +13799,7 @@
|
|
|
13792
13799
|
type: exports.DatoGridColumnTypes.String,
|
|
13793
13800
|
menuTabs: ['filterMenuTab'],
|
|
13794
13801
|
headerComponentFramework: DatoGridColumnHeaderComponent
|
|
13795
|
-
}, suppressCellSelection: true, suppressPropertyNamesCheck: true, rowHeight: 35, headerHeight: 30, rowSelection: exports.GridRowSelectionType.MULTIPLE, rowDeselection: true, unSortIcon: true, animateRows: true, rememberGroupStateWhenNewData: true, groupMultiAutoColumn: true, groupDefaultExpanded: -1, usePivotGridStyle: false }, (isTestEnv() ? { suppressColumnVirtualisation: true, rowBuffer: 99999 } : {}));
|
|
13802
|
+
}, suppressCellSelection: true, suppressPropertyNamesCheck: true, rowHeight: 35, headerHeight: 30, rowSelection: exports.GridRowSelectionType.MULTIPLE, rowDeselection: true, unSortIcon: true, animateRows: true, rememberGroupStateWhenNewData: true, groupMultiAutoColumn: true, groupDefaultExpanded: -1, usePivotGridStyle: false, disabledHTMLRenderingFields: [] }, (isTestEnv() ? { suppressColumnVirtualisation: true, rowBuffer: 99999 } : {}));
|
|
13796
13803
|
var DEFAULT_GRID_SEARCH_DEBOUNCE_TIME = {
|
|
13797
13804
|
CLIENT: 200,
|
|
13798
13805
|
SERVER: 250
|
|
@@ -14480,11 +14487,13 @@
|
|
|
14480
14487
|
!this.hasCellRenderer(normalized, gridOptions) &&
|
|
14481
14488
|
gridOptions.enableSearchHighlight) {
|
|
14482
14489
|
normalized.cellRenderer = function (params) {
|
|
14490
|
+
var colField = getColField(params.colDef);
|
|
14491
|
+
var allowHTML = !gridOptions.disabledHTMLRenderingFields || !gridOptions.disabledHTMLRenderingFields.includes(colField);
|
|
14483
14492
|
var isEditable = (isFunction(normalized.editable) && normalized.editable(params)) ||
|
|
14484
14493
|
(!isFunction(normalized.editable) && normalized.editable);
|
|
14485
14494
|
return isEditable
|
|
14486
|
-
? editableCellRendererWithSearchHighlight(params, _this.gridQuery.getSearchTerm())
|
|
14487
|
-
: searchHighlightCellRenderer(params, _this.gridQuery.getSearchTerm());
|
|
14495
|
+
? editableCellRendererWithSearchHighlight(params, _this.gridQuery.getSearchTerm(), allowHTML)
|
|
14496
|
+
: searchHighlightCellRenderer(params, _this.gridQuery.getSearchTerm(), allowHTML);
|
|
14488
14497
|
};
|
|
14489
14498
|
}
|
|
14490
14499
|
};
|
|
@@ -15797,6 +15806,7 @@
|
|
|
15797
15806
|
}
|
|
15798
15807
|
var gridApi = { grid: api, columns: columnApi };
|
|
15799
15808
|
_this.gridService._setApi(gridApi, agGrid);
|
|
15809
|
+
debugger;
|
|
15800
15810
|
_this.gridQuery._setApi(gridApi, agGrid);
|
|
15801
15811
|
_this.gridService.initSettings(savedSettings || {});
|
|
15802
15812
|
_this.registerSettingsListeners(gridApi, agGrid);
|
|
@@ -15825,7 +15835,7 @@
|
|
|
15825
15835
|
rowActions: this.rowActions
|
|
15826
15836
|
};
|
|
15827
15837
|
var normalized = this.gridService.normalizeOptions(params);
|
|
15828
|
-
var defaults = __assign(__assign(__assign({}, defaultGridOptions), (this.gridOptions.treeData ? defaultTreeOptions : {})), { icons: this.getGridIcons() });
|
|
15838
|
+
var defaults = __assign(__assign(__assign({}, defaultGridOptions), (this.gridOptions.treeData ? defaultTreeOptions : {})), { icons: this.getGridIcons(), disabledHTMLRenderingFields: normalized.disabledHTMLRenderingFields || defaultGridOptions.disabledHTMLRenderingFields });
|
|
15829
15839
|
return deepmerge(defaults, normalized);
|
|
15830
15840
|
};
|
|
15831
15841
|
DatoGridControllerComponent.prototype.setGridRows = function (data) {
|
|
@@ -16037,18 +16047,20 @@
|
|
|
16037
16047
|
var textOverflow = cell.offsetWidth < cell.scrollWidth;
|
|
16038
16048
|
if (textOverflow) {
|
|
16039
16049
|
clearTimeout(this.cellMouseOutTimer);
|
|
16040
|
-
var
|
|
16050
|
+
var colField = getColField(event.colDef);
|
|
16051
|
+
var allowHTML = !this.gridOptions.disabledHTMLRenderingFields || !this.gridOptions.disabledHTMLRenderingFields.includes(colField);
|
|
16052
|
+
var params = { cell: cell, value: cell.innerText, allowHTML: allowHTML };
|
|
16041
16053
|
isNil(this.tooltip) ? this.createAndShowTooltip(params) : this.updateTooltip(params);
|
|
16042
16054
|
}
|
|
16043
16055
|
};
|
|
16044
16056
|
DatoGridControllerComponent.prototype.createAndShowTooltip = function (_a) {
|
|
16045
|
-
var cell = _a.cell, value = _a.value;
|
|
16057
|
+
var cell = _a.cell, value = _a.value, allowHTML = _a.allowHTML;
|
|
16046
16058
|
this.tooltip = new Tooltip(cell, {
|
|
16047
16059
|
placement: 'top',
|
|
16048
16060
|
container: document.body,
|
|
16049
16061
|
trigger: 'manual',
|
|
16050
|
-
title: DOMPurify.sanitize(value),
|
|
16051
|
-
html:
|
|
16062
|
+
title: allowHTML ? DOMPurify.sanitize(value) : value,
|
|
16063
|
+
html: allowHTML,
|
|
16052
16064
|
popperOptions: {
|
|
16053
16065
|
modifiers: {
|
|
16054
16066
|
preventOverflow: { enabled: false }
|
|
@@ -25130,7 +25142,7 @@
|
|
|
25130
25142
|
DatoProgressBarComponent = __decorate([
|
|
25131
25143
|
core.Component({
|
|
25132
25144
|
selector: 'dato-progress-bar',
|
|
25133
|
-
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 items-center dato-note primary-400-color\">\n <div class=\"legend-color mr-4\" [ngClass]=\"part.color ? part.color + '-background-color' : ''\"></div>\n <div>{{ part.legendLabel || part.tooltip }}</div>\n <div class=\"primary-300-color ml-3\" *ngIf=\"part.legendSecondaryLabel\">{{ part.legendSecondaryLabel }}</div>\n </div>\n </div>\n</div>\n",
|
|
25145
|
+
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 *ngIf=\"part.legendLabel || part.tooltip\" class=\"d-flex items-center dato-note primary-400-color\">\n <div class=\"legend-color mr-4\" [ngClass]=\"part.color ? part.color + '-background-color' : ''\"></div>\n <div>{{ part.legendLabel || part.tooltip }}</div>\n <div class=\"primary-300-color ml-3\" *ngIf=\"part.legendSecondaryLabel\">{{ part.legendSecondaryLabel }}</div>\n </div>\n </div>\n</div>\n",
|
|
25134
25146
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
25135
25147
|
encapsulation: core.ViewEncapsulation.None,
|
|
25136
25148
|
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:8px;height:8px;min-width:8px;border-radius:50%}"]
|
|
@@ -25687,7 +25699,7 @@
|
|
|
25687
25699
|
};
|
|
25688
25700
|
}
|
|
25689
25701
|
|
|
25690
|
-
window.coreVersion = '22.12.
|
|
25702
|
+
window.coreVersion = '22.12.7';
|
|
25691
25703
|
|
|
25692
25704
|
exports.APP_TRANSLATE = APP_TRANSLATE;
|
|
25693
25705
|
exports.AceService = AceService;
|