@datorama/core 22.13.0-beta.11 → 22.13.0-beta.12
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 +41 -73
- package/bundles/datorama-core.umd.js.map +1 -1
- package/bundles/datorama-core.umd.min.js +5 -5
- package/bundles/datorama-core.umd.min.js.map +1 -1
- package/datorama-core.metadata.json +1 -1
- package/esm2015/lib/directives/clipboard.directive.js +7 -16
- package/esm2015/lib/grid/grid/grid.component.js +2 -31
- package/esm2015/lib/grid-v2/grid-controller/grid-controller.component.js +4 -4
- package/esm2015/lib/grid-v2/grid-store/grid.service.js +32 -29
- package/esm5/lib/directives/clipboard.directive.js +7 -16
- package/esm5/lib/grid/grid/grid.component.js +2 -31
- package/esm5/lib/grid-v2/grid-controller/grid-controller.component.js +4 -4
- package/esm5/lib/grid-v2/grid-store/grid.service.js +32 -29
- package/fesm2015/datorama-core.js +40 -73
- package/fesm2015/datorama-core.js.map +1 -1
- package/fesm5/datorama-core.js +40 -73
- package/fesm5/datorama-core.js.map +1 -1
- package/lib/directives/clipboard.directive.d.ts +2 -1
- package/lib/grid-v2/grid-controller/grid-controller.component.d.ts +2 -2
- package/lib/grid-v2/grid-store/grid.service.d.ts +369 -1
- package/package.json +1 -1
|
@@ -3946,19 +3946,11 @@
|
|
|
3946
3946
|
return DatoDisableControlDirective;
|
|
3947
3947
|
}());
|
|
3948
3948
|
|
|
3949
|
-
function
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
setStyles(el, { position: 'absolute', left: '-9999px' });
|
|
3955
|
-
var remove = appendToBody(el);
|
|
3956
|
-
// Select text inside element
|
|
3957
|
-
el.select();
|
|
3958
|
-
// Copy text to clipboard
|
|
3959
|
-
document.execCommand('copy');
|
|
3960
|
-
// Remove temporary element
|
|
3961
|
-
remove();
|
|
3949
|
+
function writeToClipboard(value) {
|
|
3950
|
+
navigator.clipboard.writeText(value);
|
|
3951
|
+
}
|
|
3952
|
+
function readFromClipboard() {
|
|
3953
|
+
return navigator.clipboard.readText();
|
|
3962
3954
|
}
|
|
3963
3955
|
var DatoClipboardDirective = /** @class */ (function () {
|
|
3964
3956
|
function DatoClipboardDirective() {
|
|
@@ -3972,7 +3964,7 @@
|
|
|
3972
3964
|
configurable: true
|
|
3973
3965
|
});
|
|
3974
3966
|
DatoClipboardDirective.prototype.onClick = function () {
|
|
3975
|
-
|
|
3967
|
+
writeToClipboard(this.value);
|
|
3976
3968
|
this.copied.emit(this.value);
|
|
3977
3969
|
};
|
|
3978
3970
|
__decorate([
|
|
@@ -5907,35 +5899,7 @@
|
|
|
5907
5899
|
rowDeselection: true,
|
|
5908
5900
|
unSortIcon: true,
|
|
5909
5901
|
animateRows: true,
|
|
5910
|
-
rememberGroupStateWhenNewData: true
|
|
5911
|
-
getContextMenuItems: function (params) {
|
|
5912
|
-
return [
|
|
5913
|
-
{
|
|
5914
|
-
name: 'Copy',
|
|
5915
|
-
action: function () {
|
|
5916
|
-
var value = params.value;
|
|
5917
|
-
copyToClipboard(value);
|
|
5918
|
-
}
|
|
5919
|
-
},
|
|
5920
|
-
{
|
|
5921
|
-
name: 'Copy with Headers',
|
|
5922
|
-
action: function () {
|
|
5923
|
-
var value = params.value;
|
|
5924
|
-
var headerName = params.column.getColDef().headerName;
|
|
5925
|
-
copyToClipboard(headerName + "\n" + value);
|
|
5926
|
-
}
|
|
5927
|
-
},
|
|
5928
|
-
{
|
|
5929
|
-
name: 'Paste',
|
|
5930
|
-
action: function () {
|
|
5931
|
-
//
|
|
5932
|
-
},
|
|
5933
|
-
disabled: true
|
|
5934
|
-
},
|
|
5935
|
-
'separator',
|
|
5936
|
-
'export'
|
|
5937
|
-
];
|
|
5938
|
-
}
|
|
5902
|
+
rememberGroupStateWhenNewData: true
|
|
5939
5903
|
};
|
|
5940
5904
|
_this.infinitePagination = false;
|
|
5941
5905
|
_this.isRowsCollapsed = true;
|
|
@@ -14390,26 +14354,41 @@
|
|
|
14390
14354
|
this.loadSavedSettings(savedSettings);
|
|
14391
14355
|
}
|
|
14392
14356
|
};
|
|
14357
|
+
GridService.prototype.initGridOptions = function (gridOptions) {
|
|
14358
|
+
var options = __assign({}, gridOptions);
|
|
14359
|
+
if (typeof gridOptions.enableSearch === 'undefined') {
|
|
14360
|
+
options.enableSearch = options.enableV2_1;
|
|
14361
|
+
}
|
|
14362
|
+
if (typeof gridOptions.enableBackground === 'undefined') {
|
|
14363
|
+
options.enableBackground = options.enableV2_1;
|
|
14364
|
+
}
|
|
14365
|
+
if (typeof gridOptions.showMultiSelectionCheckboxes === 'undefined') {
|
|
14366
|
+
options.showMultiSelectionCheckboxes =
|
|
14367
|
+
gridOptions.enableV2_1 && options.rowSelection !== exports.GridRowSelectionType.SINGLE;
|
|
14368
|
+
}
|
|
14369
|
+
if (typeof gridOptions.enableSearchHighlight === 'undefined') {
|
|
14370
|
+
options.enableSearchHighlight = options.enableSearch && defaultGridOptions.enableSearchHighlight;
|
|
14371
|
+
}
|
|
14372
|
+
if (gridOptions.usePivotGridStyle) {
|
|
14373
|
+
var rowHeight_1 = 30;
|
|
14374
|
+
options.rowHeight = rowHeight_1;
|
|
14375
|
+
options.defaultColDef = __assign(__assign({}, options.defaultColDef), { cellClassRules: this.getPivotModeCellClassRules(), headerClass: this.getPivotHeaderClass.bind(this), cellStyle: function (params) {
|
|
14376
|
+
var style = { lineHeight: rowHeight_1 + "px" };
|
|
14377
|
+
if (params.colDef.type === exports.DatoGridColumnTypes.Number) {
|
|
14378
|
+
style.textAlign = 'end';
|
|
14379
|
+
}
|
|
14380
|
+
return style;
|
|
14381
|
+
} });
|
|
14382
|
+
options.autoGroupColumnDef = __assign(__assign({}, options.autoGroupColumnDef), { cellClassRules: this.getPivotModeCellClassRules(), headerClass: this.getPivotHeaderClass.bind(this) });
|
|
14383
|
+
}
|
|
14384
|
+
return options;
|
|
14385
|
+
};
|
|
14393
14386
|
GridService.prototype.normalizeOptions = function (params) {
|
|
14394
14387
|
var _this = this;
|
|
14395
14388
|
this.customHeadersTemplates = params.customHeadersTemplates;
|
|
14396
14389
|
var headerComponentParams = { gridService: this, gridQuery: this.gridQuery };
|
|
14397
14390
|
params.gridOptions.autoGroupColumnDef = __assign(__assign({}, headerComponentParams), params.gridOptions.autoGroupColumnDef);
|
|
14398
14391
|
params.gridOptions.defaultColDef = __assign(__assign({}, params.gridOptions.defaultColDef), { headerComponentParams: headerComponentParams });
|
|
14399
|
-
if (typeof params.gridOptions.enableSearch === 'undefined') {
|
|
14400
|
-
params.gridOptions.enableSearch = params.gridOptions.enableV2_1;
|
|
14401
|
-
}
|
|
14402
|
-
if (typeof params.gridOptions.enableBackground === 'undefined') {
|
|
14403
|
-
params.gridOptions.enableBackground = params.gridOptions.enableV2_1;
|
|
14404
|
-
}
|
|
14405
|
-
if (typeof params.gridOptions.showMultiSelectionCheckboxes === 'undefined') {
|
|
14406
|
-
params.gridOptions.showMultiSelectionCheckboxes =
|
|
14407
|
-
params.gridOptions.enableV2_1 && params.gridOptions.rowSelection !== exports.GridRowSelectionType.SINGLE;
|
|
14408
|
-
}
|
|
14409
|
-
if (typeof params.gridOptions.enableSearchHighlight === 'undefined') {
|
|
14410
|
-
params.gridOptions.enableSearchHighlight =
|
|
14411
|
-
params.gridOptions.enableSearch && defaultGridOptions.enableSearchHighlight;
|
|
14412
|
-
}
|
|
14413
14392
|
params.gridOptions.columnDefs = this.normalizeColumns(params.gridOptions.columnDefs, params.gridOptions);
|
|
14414
14393
|
/** Add core filters */
|
|
14415
14394
|
params.gridOptions.isExternalFilterPresent = function () { return true; };
|
|
@@ -14448,18 +14427,6 @@
|
|
|
14448
14427
|
this.initPivotSecondaryColsProcess(params);
|
|
14449
14428
|
params.gridOptions.saveSettings = false;
|
|
14450
14429
|
}
|
|
14451
|
-
if (params.gridOptions.usePivotGridStyle) {
|
|
14452
|
-
var rowHeight_1 = 30;
|
|
14453
|
-
params.gridOptions.rowHeight = rowHeight_1;
|
|
14454
|
-
params.gridOptions.defaultColDef = __assign(__assign({}, params.gridOptions.defaultColDef), { cellClassRules: this.getPivotModeCellClassRules(), headerClass: this.getPivotHeaderClass.bind(this), cellStyle: function (params) {
|
|
14455
|
-
var style = { lineHeight: rowHeight_1 + "px" };
|
|
14456
|
-
if (params.colDef.type === exports.DatoGridColumnTypes.Number) {
|
|
14457
|
-
style.textAlign = 'end';
|
|
14458
|
-
}
|
|
14459
|
-
return style;
|
|
14460
|
-
} });
|
|
14461
|
-
params.gridOptions.autoGroupColumnDef = __assign(__assign({}, params.gridOptions.autoGroupColumnDef), { cellClassRules: this.getPivotModeCellClassRules(), headerClass: this.getPivotHeaderClass.bind(this) });
|
|
14462
|
-
}
|
|
14463
14430
|
return params.gridOptions;
|
|
14464
14431
|
};
|
|
14465
14432
|
GridService.prototype.getPivotHeaderClass = function (params) {
|
|
@@ -14897,7 +14864,7 @@
|
|
|
14897
14864
|
var rawValue = _this.api.grid.getValue(column.getColId(), row);
|
|
14898
14865
|
var formatter = column.getColDef().valueFormatter;
|
|
14899
14866
|
var value = formatter && typeof formatter !== 'string' ? formatter(rawValue) : rawValue;
|
|
14900
|
-
|
|
14867
|
+
writeToClipboard(value);
|
|
14901
14868
|
};
|
|
14902
14869
|
if (node.isSelected()) {
|
|
14903
14870
|
selected = _this.gridQuery.getSelectedRowNodes();
|
|
@@ -15773,8 +15740,8 @@
|
|
|
15773
15740
|
this.onGridChange = new core.EventEmitter();
|
|
15774
15741
|
this.rowActions = [];
|
|
15775
15742
|
this.gridActions = [];
|
|
15776
|
-
this.contentInit = new rxjs.Subject();
|
|
15777
15743
|
this.gridReady$ = this.gridQuery.gridReady$;
|
|
15744
|
+
this.contentInit = new rxjs.Subject();
|
|
15778
15745
|
this.gridElements = {
|
|
15779
15746
|
centerViewport: null,
|
|
15780
15747
|
centerContainer: null,
|
|
@@ -15787,7 +15754,7 @@
|
|
|
15787
15754
|
return this._gridOptions;
|
|
15788
15755
|
},
|
|
15789
15756
|
set: function (gridOptions) {
|
|
15790
|
-
this._gridOptions = gridOptions;
|
|
15757
|
+
this._gridOptions = this.gridService.initGridOptions(gridOptions);
|
|
15791
15758
|
this.gridService.treeData = gridOptions.treeData;
|
|
15792
15759
|
this.gridService.isPivotMode = gridOptions.pivotMode;
|
|
15793
15760
|
if (this.agGridEl) {
|
|
@@ -25994,7 +25961,6 @@
|
|
|
25994
25961
|
exports.compose = compose;
|
|
25995
25962
|
exports.convertFromTreeData = convertFromTreeData;
|
|
25996
25963
|
exports.convertToTreeData = convertToTreeData;
|
|
25997
|
-
exports.copyToClipboard = copyToClipboard;
|
|
25998
25964
|
exports.createComponent = createComponent;
|
|
25999
25965
|
exports.createElement = createElement;
|
|
26000
25966
|
exports.createGUID = createGUID;
|
|
@@ -26110,6 +26076,7 @@
|
|
|
26110
26076
|
exports.queryAll = queryAll;
|
|
26111
26077
|
exports.random = random;
|
|
26112
26078
|
exports.rawDiff = rawDiff;
|
|
26079
|
+
exports.readFromClipboard = readFromClipboard;
|
|
26113
26080
|
exports.reject = reject;
|
|
26114
26081
|
exports.relativeDateTypes = relativeDateTypes;
|
|
26115
26082
|
exports.removeClass = removeClass;
|
|
@@ -26159,6 +26126,7 @@
|
|
|
26159
26126
|
exports.validateStringCondition = validateStringCondition;
|
|
26160
26127
|
exports.values = values;
|
|
26161
26128
|
exports.workerMap = workerMap;
|
|
26129
|
+
exports.writeToClipboard = writeToClipboard;
|
|
26162
26130
|
exports.zoneStable = zoneStable;
|
|
26163
26131
|
exports.ɵ0 = ɵ0$2;
|
|
26164
26132
|
exports.ɵ1 = ɵ1$2;
|