@datorama/core 22.1.1-rc.1 → 22.2.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/bundle.scss +16 -17
- package/bundles/datorama-core.umd.js +148 -113
- package/bundles/datorama-core.umd.js.map +1 -1
- package/bundles/datorama-core.umd.min.js +15 -15
- package/bundles/datorama-core.umd.min.js.map +1 -1
- package/datorama-core.d.ts +0 -1
- package/datorama-core.metadata.json +1 -1
- package/esm2015/datorama-core.js +1 -2
- package/esm2015/lib/breadcrumbs/breadcrumbs.component.js +2 -4
- package/esm2015/lib/grid-v2/grid/grid-v2.types.js +1 -1
- package/esm2015/lib/grid-v2/grid-controller/grid-controller.component.js +11 -6
- package/esm2015/lib/grid-v2/grid-filter/filter-validator.js +3 -1
- package/esm2015/lib/grid-v2/grid-filter/grid-filter.component.js +12 -4
- package/esm2015/lib/grid-v2/grid-filter/grid-filter.types.js +3 -1
- package/esm2015/lib/grid-v2/grid-pagination/grid-pagination.component.js +5 -5
- package/esm2015/lib/grid-v2/grid-settings.js +2 -2
- package/esm2015/lib/grid-v2/grid-store/grid.query.js +13 -14
- package/esm2015/lib/grid-v2/grid-store/grid.service.js +32 -8
- package/esm2015/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +1 -7
- package/esm2015/lib/icon/icon.types.js +1 -1
- package/esm2015/lib/progress-bar/progress-bar.component.js +36 -16
- package/esm2015/lib/rich-text/rich-text.directive.js +33 -15
- package/esm2015/lib/select/select.component.js +10 -5
- package/esm2015/lib/version.js +2 -2
- package/esm5/datorama-core.js +1 -2
- package/esm5/lib/breadcrumbs/breadcrumbs.component.js +2 -4
- package/esm5/lib/grid-v2/grid/grid-v2.types.js +1 -1
- package/esm5/lib/grid-v2/grid-controller/grid-controller.component.js +11 -6
- package/esm5/lib/grid-v2/grid-filter/filter-validator.js +3 -1
- package/esm5/lib/grid-v2/grid-filter/grid-filter.component.js +12 -4
- package/esm5/lib/grid-v2/grid-filter/grid-filter.types.js +3 -1
- package/esm5/lib/grid-v2/grid-pagination/grid-pagination.component.js +5 -5
- package/esm5/lib/grid-v2/grid-settings.js +2 -2
- package/esm5/lib/grid-v2/grid-store/grid.query.js +13 -14
- package/esm5/lib/grid-v2/grid-store/grid.service.js +32 -8
- package/esm5/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +1 -13
- package/esm5/lib/icon/icon.types.js +1 -1
- package/esm5/lib/progress-bar/progress-bar.component.js +36 -16
- package/esm5/lib/rich-text/rich-text.directive.js +34 -16
- package/esm5/lib/select/select.component.js +10 -5
- package/esm5/lib/version.js +2 -2
- package/fesm2015/datorama-core.js +148 -105
- package/fesm2015/datorama-core.js.map +1 -1
- package/fesm5/datorama-core.js +149 -113
- package/fesm5/datorama-core.js.map +1 -1
- package/i18n/locale-en_US.json +2 -0
- package/lib/grid-v2/grid/grid-v2.types.d.ts +1 -2
- package/lib/grid-v2/grid-controller/grid-controller.component.d.ts +1 -0
- package/lib/grid-v2/grid-filter/grid-filter.types.d.ts +3 -1
- package/lib/grid-v2/grid-pagination/grid-pagination.component.d.ts +1 -0
- package/lib/grid-v2/grid-settings.d.ts +2 -2
- package/lib/grid-v2/grid-store/grid.service.d.ts +2 -1
- package/lib/grid-v2/grid-toolbar/grid-toolbar.component.d.ts +0 -2
- package/lib/icon/icon.types.d.ts +1 -1
- package/lib/progress-bar/progress-bar.component.d.ts +8 -2
- package/lib/rich-text/rich-text.directive.d.ts +6 -4
- package/package.json +1 -1
- package/esm2015/lib/rich-text/rich-text.service.js +0 -50
- package/esm5/lib/rich-text/rich-text.service.js +0 -51
- package/lib/rich-text/rich-text.service.d.ts +0 -10
package/bundle.scss
CHANGED
|
@@ -14300,6 +14300,19 @@ dato-grid-v2 .ag-cell {
|
|
|
14300
14300
|
border-right: solid 1px themify(primary-300, 0.5);
|
|
14301
14301
|
}
|
|
14302
14302
|
|
|
14303
|
+
dato-grid-v2 ag-grid-angular .ag-floating-bottom {
|
|
14304
|
+
border: none !important;
|
|
14305
|
+
}
|
|
14306
|
+
|
|
14307
|
+
dato-grid-v2 ag-grid-angular .ag-floating-bottom .ag-row {
|
|
14308
|
+
background-color: themify(primary-0) !important;
|
|
14309
|
+
border: 1px solid themify(primary-200);
|
|
14310
|
+
}
|
|
14311
|
+
|
|
14312
|
+
dato-grid-v2 ag-grid-angular .ag-floating-bottom .ag-row .ag-cell {
|
|
14313
|
+
border-right: none;
|
|
14314
|
+
}
|
|
14315
|
+
|
|
14303
14316
|
dato-grid-v2 ag-grid-angular.enable-v2_1 {
|
|
14304
14317
|
padding-top: 8px;
|
|
14305
14318
|
}
|
|
@@ -14341,19 +14354,6 @@ dato-grid-v2 ag-grid-angular.pivot-mode .ag-row.ag-row-group:not(.ag-row-level-0
|
|
|
14341
14354
|
font-weight: 400;
|
|
14342
14355
|
}
|
|
14343
14356
|
|
|
14344
|
-
dato-grid-v2 ag-grid-angular.pivot-mode .ag-floating-bottom {
|
|
14345
|
-
border: none;
|
|
14346
|
-
}
|
|
14347
|
-
|
|
14348
|
-
dato-grid-v2 ag-grid-angular.pivot-mode .ag-floating-bottom .ag-row {
|
|
14349
|
-
background-color: themify(primary-0);
|
|
14350
|
-
border: 1px solid themify(primary-200);
|
|
14351
|
-
}
|
|
14352
|
-
|
|
14353
|
-
dato-grid-v2 ag-grid-angular.pivot-mode .ag-floating-bottom .ag-row .ag-cell {
|
|
14354
|
-
border-right: none;
|
|
14355
|
-
}
|
|
14356
|
-
|
|
14357
14357
|
dato-grid-v2 ag-grid-angular.pivot-mode .ag-ltr .ag-row-group-leaf-indent {
|
|
14358
14358
|
margin-left: 0;
|
|
14359
14359
|
}
|
|
@@ -14364,6 +14364,7 @@ dato-grid-v2 ag-grid-angular.pivot-mode .ag-cell {
|
|
|
14364
14364
|
|
|
14365
14365
|
dato-grid-v2 ag-grid-angular.pivot-mode .ag-header-row .ag-header-cell {
|
|
14366
14366
|
border: none;
|
|
14367
|
+
border-top: 1px solid themify(primary-200);
|
|
14367
14368
|
}
|
|
14368
14369
|
|
|
14369
14370
|
dato-grid-v2 ag-grid-angular.pivot-mode .ag-header-row .ag-header-cell dato-grid-column-header {
|
|
@@ -14394,11 +14395,9 @@ dato-grid-v2 ag-grid-angular.pivot-mode .ag-header-row .ag-header-group-cell .ag
|
|
|
14394
14395
|
}
|
|
14395
14396
|
|
|
14396
14397
|
dato-grid-v2 ag-grid-angular.pivot-mode .ag-header-row .ag-header-group-cell.ag-header-group-cell-with-group {
|
|
14397
|
-
border-
|
|
14398
|
-
}
|
|
14399
|
-
|
|
14400
|
-
dato-grid-v2 ag-grid-angular.pivot-mode .ag-header-row .ag-header-group-cell.ag-header-group-cell-with-group:not(:last-child) {
|
|
14398
|
+
border-top: 1px solid themify(primary-200);
|
|
14401
14399
|
border-right: 1px solid themify(primary-200);
|
|
14400
|
+
background-color: themify(primary-100);
|
|
14402
14401
|
}
|
|
14403
14402
|
|
|
14404
14403
|
dato-grid-v2 ag-grid-angular.pivot-mode .ag-header-row .ag-header-group-cell.ag-header-group-cell-with-group.empty-pivot-header {
|
|
@@ -8629,8 +8629,9 @@
|
|
|
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;
|
|
8632
8633
|
this.markAsActive(this._model, { deselectAll: true });
|
|
8633
|
-
|
|
8634
|
+
overTheLimit && this.updateDisabledState();
|
|
8634
8635
|
}
|
|
8635
8636
|
/** For later updates */
|
|
8636
8637
|
this.cdr.markForCheck();
|
|
@@ -8667,7 +8668,7 @@
|
|
|
8667
8668
|
*/
|
|
8668
8669
|
if (this.hasValue && this._initialOpen) {
|
|
8669
8670
|
this.markAsActive(this._model);
|
|
8670
|
-
if (this.limitSelectedTo) {
|
|
8671
|
+
if (this.limitSelectedTo && this._model.length === this.limitSelectedTo) {
|
|
8671
8672
|
this.updateDisabledState();
|
|
8672
8673
|
}
|
|
8673
8674
|
this._initialOpen = false;
|
|
@@ -8756,6 +8757,7 @@
|
|
|
8756
8757
|
};
|
|
8757
8758
|
DatoSelectComponent.prototype.removeOption = function (option) {
|
|
8758
8759
|
var _this = this;
|
|
8760
|
+
var updateDisabled = this.limitSelectedTo && this._model.length === this.limitSelectedTo;
|
|
8759
8761
|
this._model = this._model.filter(function (current) { return current[_this.idKey] !== option[_this.idKey]; });
|
|
8760
8762
|
var optionToRemove = this.options.find(function (datoOption) { return datoOption.option && datoOption.option[_this.idKey] === option[_this.idKey]; });
|
|
8761
8763
|
/**
|
|
@@ -8765,7 +8767,7 @@
|
|
|
8765
8767
|
if (optionToRemove) {
|
|
8766
8768
|
optionToRemove.active = false;
|
|
8767
8769
|
}
|
|
8768
|
-
|
|
8770
|
+
updateDisabled && this.updateDisabledState();
|
|
8769
8771
|
this.onChange(this._model);
|
|
8770
8772
|
this.cdr.markForCheck();
|
|
8771
8773
|
if (this.datoOverlay.attached) {
|
|
@@ -9115,6 +9117,9 @@
|
|
|
9115
9117
|
if (!datoOption) {
|
|
9116
9118
|
return;
|
|
9117
9119
|
}
|
|
9120
|
+
var modelLength = this._model.length;
|
|
9121
|
+
var updateDisabled = this.limitSelectedTo &&
|
|
9122
|
+
(modelLength === this.limitSelectedTo || (modelLength === this.limitSelectedTo - 1 && !datoOption.active));
|
|
9118
9123
|
datoOption.active = !datoOption.active;
|
|
9119
9124
|
var rawOption = datoOption.option;
|
|
9120
9125
|
if (datoOption.active) {
|
|
@@ -9123,7 +9128,7 @@
|
|
|
9123
9128
|
else {
|
|
9124
9129
|
this._model = this._model.filter(function (current) { return current[_this.idKey] !== rawOption[_this.idKey]; });
|
|
9125
9130
|
}
|
|
9126
|
-
|
|
9131
|
+
updateDisabled && this.updateDisabledState();
|
|
9127
9132
|
this.onChange(this._model);
|
|
9128
9133
|
this.cdr.markForCheck();
|
|
9129
9134
|
this.datoOverlay.scheduleUpdate();
|
|
@@ -11578,20 +11583,17 @@
|
|
|
11578
11583
|
if (this.gridRef.gridOptions.pivotMode) {
|
|
11579
11584
|
var _a = this.api.grid.getSortModel().pop() || {}, sort = _a.sort, colId = _a.colId;
|
|
11580
11585
|
var column = this.api.columns.getColumn(colId);
|
|
11581
|
-
|
|
11582
|
-
|
|
11583
|
-
var uniquePivotParents = uniq(this.api.columns.getSecondaryColumns().map(function (column) { return column.getParent(); }));
|
|
11584
|
-
var secondaryColumn = this.getSecondaryColumn(pivotedColumn.getColId());
|
|
11585
|
-
var pivotColIndex = uniquePivotParents.indexOf(secondaryColumn.getParent());
|
|
11586
|
-
return { colId: getColField(pivotedColumn.getColDef()), sort: sort, pivotColIndex: pivotColIndex };
|
|
11586
|
+
if (column) {
|
|
11587
|
+
return { colId: colId, sort: sort, colField: getColField(column.getColDef()) };
|
|
11587
11588
|
}
|
|
11588
|
-
else
|
|
11589
|
-
|
|
11589
|
+
else {
|
|
11590
|
+
var secondaryColumn = this.getSecondaryColumn(colId);
|
|
11591
|
+
if (secondaryColumn) {
|
|
11592
|
+
return { colId: colId, sort: sort, colField: getColField(secondaryColumn.getColDef()) };
|
|
11593
|
+
}
|
|
11590
11594
|
}
|
|
11591
11595
|
}
|
|
11592
|
-
|
|
11593
|
-
return this.api.grid.getSortModel().pop();
|
|
11594
|
-
}
|
|
11596
|
+
return this.api.grid.getSortModel().pop();
|
|
11595
11597
|
};
|
|
11596
11598
|
GridQuery.prototype.selectSort = function () {
|
|
11597
11599
|
return this.select(function (state) { return state.settings.sort; });
|
|
@@ -11688,7 +11690,10 @@
|
|
|
11688
11690
|
};
|
|
11689
11691
|
GridQuery.prototype.getSecondaryColumn = function (colId) {
|
|
11690
11692
|
var secondaryColumns = this.api.columns.getSecondaryColumns();
|
|
11691
|
-
|
|
11693
|
+
if (secondaryColumns) {
|
|
11694
|
+
return secondaryColumns.find(function (col) { return col.getColId() === colId; });
|
|
11695
|
+
}
|
|
11696
|
+
return null;
|
|
11692
11697
|
};
|
|
11693
11698
|
GridQuery.prototype.filterCheckboxSelectionColumn = function (columns) {
|
|
11694
11699
|
return columns.filter(function (column) { return !column.getUserProvidedColDef() || !column.getUserProvidedColDef().checkboxSelection; });
|
|
@@ -11740,6 +11745,8 @@
|
|
|
11740
11745
|
DatoFilterConditions["NOT_IN_LIST"] = "NOT_IN_LIST";
|
|
11741
11746
|
DatoFilterConditions["IS_EMPTY"] = "IS_EMPTY";
|
|
11742
11747
|
DatoFilterConditions["NOT_EMPTY"] = "NOT_EMPTY";
|
|
11748
|
+
DatoFilterConditions["IS_NULL"] = "IS_NULL";
|
|
11749
|
+
DatoFilterConditions["NOT_NULL"] = "NOT_NULL";
|
|
11743
11750
|
})(exports.DatoFilterConditions || (exports.DatoFilterConditions = {}));
|
|
11744
11751
|
var DatoGridDateFilterOptions = [
|
|
11745
11752
|
exports.DatoFilterConditions.IN_RANGE,
|
|
@@ -11823,8 +11830,10 @@
|
|
|
11823
11830
|
case exports.DatoFilterConditions.IN_RANGE:
|
|
11824
11831
|
return rowValue >= filterValue && rowValue <= parseFloat(rangeEnd);
|
|
11825
11832
|
case exports.DatoFilterConditions.IS_EMPTY:
|
|
11833
|
+
case exports.DatoFilterConditions.IS_NULL:
|
|
11826
11834
|
return isNil(rowValue);
|
|
11827
11835
|
case exports.DatoFilterConditions.NOT_EMPTY:
|
|
11836
|
+
case exports.DatoFilterConditions.NOT_NULL:
|
|
11828
11837
|
return !isNil(rowValue);
|
|
11829
11838
|
}
|
|
11830
11839
|
}
|
|
@@ -12010,7 +12019,7 @@
|
|
|
12010
12019
|
return contextActions;
|
|
12011
12020
|
}
|
|
12012
12021
|
|
|
12013
|
-
var DATO_GRID_STORAGE_API = new core.InjectionToken('
|
|
12022
|
+
var DATO_GRID_STORAGE_API = new core.InjectionToken('DATO_GRID_STORAGE_API');
|
|
12014
12023
|
|
|
12015
12024
|
var defaultEditableColumnRenderer = function (params) {
|
|
12016
12025
|
return params && params.value ? "<div class=\"value-wrapper ellipsis\">" + params.value + "</div>" : null;
|
|
@@ -12825,10 +12834,11 @@
|
|
|
12825
12834
|
var _a;
|
|
12826
12835
|
var _this = this;
|
|
12827
12836
|
var _b = this.popover.data, gridService = _b.gridService, gridQuery = _b.gridQuery;
|
|
12828
|
-
var _c = this.colDef, filter = _c.filter,
|
|
12837
|
+
var _c = this.colDef, filter = _c.filter, pivotValueColumn = _c.pivotValueColumn, pivotKeys = _c.pivotKeys;
|
|
12829
12838
|
var colDefs = gridQuery.api.columns.getAllColumns().map(function (column) { return column.getColDef(); });
|
|
12830
12839
|
this.colField = getColField(this.colDef);
|
|
12831
12840
|
var colDef = colDefs.find(function (colDef) { return colDef.field === _this.colField; });
|
|
12841
|
+
var filtersConfig = colDef.filtersConfig || this.colDef.filtersConfig || {};
|
|
12832
12842
|
var colFilter = filter || colDef.filter;
|
|
12833
12843
|
var filterOptions = DatoGridFilterOptionsMap[colFilter];
|
|
12834
12844
|
this.pivotColumn = gridQuery.api.columns.getSecondaryPivotColumn(pivotKeys, pivotValueColumn);
|
|
@@ -12850,7 +12860,11 @@
|
|
|
12850
12860
|
if (this.filterSections.Conditional) {
|
|
12851
12861
|
var filterConditions = filterOptions || DatoGridStringFilterOptions;
|
|
12852
12862
|
if (filtersConfig.showEmptyConditions) {
|
|
12853
|
-
|
|
12863
|
+
var emptyConditions = [exports.DatoFilterConditions.IS_EMPTY, exports.DatoFilterConditions.NOT_EMPTY];
|
|
12864
|
+
if (this.filterType === exports.DatoGridFilterTypes.Number) {
|
|
12865
|
+
emptyConditions = [exports.DatoFilterConditions.IS_NULL, exports.DatoFilterConditions.NOT_NULL];
|
|
12866
|
+
}
|
|
12867
|
+
filterConditions = __spread(filterConditions, emptyConditions);
|
|
12854
12868
|
}
|
|
12855
12869
|
this.conditionalFilterOptions = filterConditions.map(function (operand, id) { return ({
|
|
12856
12870
|
id: id,
|
|
@@ -13241,7 +13255,10 @@
|
|
|
13241
13255
|
valueControl.updateValueAndValidity();
|
|
13242
13256
|
};
|
|
13243
13257
|
DatoGridFilterComponent.prototype.isEmptyOperand = function (operand) {
|
|
13244
|
-
return operand === exports.DatoFilterConditions.IS_EMPTY ||
|
|
13258
|
+
return (operand === exports.DatoFilterConditions.IS_EMPTY ||
|
|
13259
|
+
operand === exports.DatoFilterConditions.NOT_EMPTY ||
|
|
13260
|
+
operand === exports.DatoFilterConditions.IS_NULL ||
|
|
13261
|
+
operand === exports.DatoFilterConditions.NOT_NULL);
|
|
13245
13262
|
};
|
|
13246
13263
|
DatoGridFilterComponent.prototype.isStringArray = function (value) {
|
|
13247
13264
|
return isString(value[0]);
|
|
@@ -14382,17 +14399,19 @@
|
|
|
14382
14399
|
};
|
|
14383
14400
|
GridService.prototype.setGridFilters = function (filters) {
|
|
14384
14401
|
var e_2, _a;
|
|
14385
|
-
if (this.api) {
|
|
14402
|
+
if (this.api && filters) {
|
|
14386
14403
|
try {
|
|
14387
14404
|
for (var filters_1 = __values(filters), filters_1_1 = filters_1.next(); !filters_1_1.done; filters_1_1 = filters_1.next()) {
|
|
14388
14405
|
var filter = filters_1_1.value.filter;
|
|
14389
14406
|
var column = this.api.columns.getColumn(filter.colId);
|
|
14390
14407
|
if (column) {
|
|
14391
|
-
this.setColumnFilter(column, filter);
|
|
14408
|
+
this.setColumnFilter(column, filter, false);
|
|
14392
14409
|
}
|
|
14393
14410
|
else {
|
|
14394
|
-
var
|
|
14395
|
-
|
|
14411
|
+
var secondaryColumn = this.gridQuery.getSecondaryColumn(filter.colId);
|
|
14412
|
+
if (secondaryColumn) {
|
|
14413
|
+
this.setColumnFilter(secondaryColumn, filter, false);
|
|
14414
|
+
}
|
|
14396
14415
|
}
|
|
14397
14416
|
}
|
|
14398
14417
|
}
|
|
@@ -14403,7 +14422,23 @@
|
|
|
14403
14422
|
}
|
|
14404
14423
|
finally { if (e_2) throw e_2.error; }
|
|
14405
14424
|
}
|
|
14406
|
-
this.
|
|
14425
|
+
this.api.grid.onFilterChanged();
|
|
14426
|
+
}
|
|
14427
|
+
};
|
|
14428
|
+
GridService.prototype.setGridSort = function (gridSort) {
|
|
14429
|
+
if (this.api && gridSort) {
|
|
14430
|
+
var colId = gridSort.colId, sort = gridSort.sort;
|
|
14431
|
+
var column = this.api.columns.getColumn(colId);
|
|
14432
|
+
if (column) {
|
|
14433
|
+
column.setSort(sort);
|
|
14434
|
+
}
|
|
14435
|
+
else {
|
|
14436
|
+
var secondaryColumn = this.gridQuery.getSecondaryColumn(colId);
|
|
14437
|
+
if (secondaryColumn) {
|
|
14438
|
+
secondaryColumn.setSort(sort);
|
|
14439
|
+
}
|
|
14440
|
+
}
|
|
14441
|
+
this.api.grid.onSortChanged();
|
|
14407
14442
|
}
|
|
14408
14443
|
};
|
|
14409
14444
|
GridService.prototype.updateFilter = function (column, filter) {
|
|
@@ -14461,8 +14496,7 @@
|
|
|
14461
14496
|
this.updateSettings({ gridAlignment: gridAlignment, columnsSizes: null });
|
|
14462
14497
|
};
|
|
14463
14498
|
GridService.prototype.saveSettingsToServer = function (settings) {
|
|
14464
|
-
|
|
14465
|
-
this.storageAPI.set(this.gridName, settings, isGlobal);
|
|
14499
|
+
this.storageAPI.set(this.gridName, settings);
|
|
14466
14500
|
};
|
|
14467
14501
|
/**
|
|
14468
14502
|
* @internal used to log grid events to the platform's logging service
|
|
@@ -14869,6 +14903,13 @@
|
|
|
14869
14903
|
column: column
|
|
14870
14904
|
};
|
|
14871
14905
|
}
|
|
14906
|
+
if (condition === exports.DatoFilterConditions.IS_NULL || condition === exports.DatoFilterConditions.NOT_NULL) {
|
|
14907
|
+
return {
|
|
14908
|
+
condition: exports.DatoFilterConditions.IS_NULL,
|
|
14909
|
+
value: condition === exports.DatoFilterConditions.IS_NULL ? 'true' : 'false',
|
|
14910
|
+
column: column
|
|
14911
|
+
};
|
|
14912
|
+
}
|
|
14872
14913
|
return __assign(__assign({}, item), { column: column });
|
|
14873
14914
|
})
|
|
14874
14915
|
};
|
|
@@ -15460,10 +15501,7 @@
|
|
|
15460
15501
|
.pipe(operators.switchMap(function () {
|
|
15461
15502
|
_this.gridOptions = _this.normalizeOptions();
|
|
15462
15503
|
agGrid.gridOptions = _this.gridOptions;
|
|
15463
|
-
var
|
|
15464
|
-
var settingsLoader = _this.gridOptions.saveSettings === false
|
|
15465
|
-
? rxjs.of(null)
|
|
15466
|
-
: _this.storageAPI.get(_this.gridOptions.gridName, isGlobal);
|
|
15504
|
+
var settingsLoader = _this.gridOptions.saveSettings === false ? rxjs.of(null) : _this.storageAPI.get(_this.gridOptions.gridName);
|
|
15467
15505
|
return rxjs.combineLatest([agGrid.gridReady, settingsLoader]);
|
|
15468
15506
|
}), ngxTakeUntilDestroy.untilDestroyed(this))
|
|
15469
15507
|
.subscribe(function (_a) {
|
|
@@ -15471,6 +15509,11 @@
|
|
|
15471
15509
|
if (!_this.gridOptions.rowData) {
|
|
15472
15510
|
api.showLoadingOverlay();
|
|
15473
15511
|
}
|
|
15512
|
+
if (!_this.gridOptions.statusBar) {
|
|
15513
|
+
/** Fix ag-grid bug that doesn't add ag-hidden class to the status bar, which only get fixed in later versions */
|
|
15514
|
+
var el = agGridEl.querySelector('.ag-status-bar');
|
|
15515
|
+
addClass(el, 'ag-hidden');
|
|
15516
|
+
}
|
|
15474
15517
|
var gridApi = { grid: api, columns: columnApi };
|
|
15475
15518
|
_this.gridService._setApi(gridApi, agGrid);
|
|
15476
15519
|
_this.gridQuery._setApi(gridApi, agGrid);
|
|
@@ -15510,6 +15553,9 @@
|
|
|
15510
15553
|
DatoGridControllerComponent.prototype.setGridFilters = function (filters) {
|
|
15511
15554
|
this.gridService.setGridFilters(filters);
|
|
15512
15555
|
};
|
|
15556
|
+
DatoGridControllerComponent.prototype.setGridSort = function (sort) {
|
|
15557
|
+
this.gridService.setGridSort(sort);
|
|
15558
|
+
};
|
|
15513
15559
|
DatoGridControllerComponent.prototype.onFilterChanged = function () {
|
|
15514
15560
|
return this.gridQuery.filterChanged();
|
|
15515
15561
|
};
|
|
@@ -16248,6 +16294,7 @@
|
|
|
16248
16294
|
// Show fit cell content and collapse/expand row groups controls
|
|
16249
16295
|
this.showBottomControls = false;
|
|
16250
16296
|
this.isExpanded = true;
|
|
16297
|
+
this.hasRowGroupColumns = false;
|
|
16251
16298
|
this.isServerSidePagination = false;
|
|
16252
16299
|
// The number of pages displayed in the navigation panel for each view as defined by product.
|
|
16253
16300
|
this.MINI_DISPLAY_LENGTH = 2;
|
|
@@ -16296,8 +16343,10 @@
|
|
|
16296
16343
|
});
|
|
16297
16344
|
this.gridQuery.gridReady$
|
|
16298
16345
|
.pipe(operators.tap(function () {
|
|
16346
|
+
var rowGroupColumns = _this.gridQuery.api.columns.getRowGroupColumns();
|
|
16299
16347
|
_this.gridApi = _this.gridQuery.api.grid;
|
|
16300
16348
|
_this.showBottomControls = _this.gridQuery.getGridOptions().showBottomControls;
|
|
16349
|
+
_this.hasRowGroupColumns = rowGroupColumns && rowGroupColumns.length > 0;
|
|
16301
16350
|
}), operators.switchMap(function () {
|
|
16302
16351
|
_this.isServerSidePagination = _this.gridQuery.isServerSide;
|
|
16303
16352
|
return _this.isServerSidePagination ? _this.gridQuery.serverDataLoaded$ : _this.gridQuery.rowDataChanged$;
|
|
@@ -16423,9 +16472,6 @@
|
|
|
16423
16472
|
DatoGridPaginationV2Component.prototype.toggleGroupsState = function () {
|
|
16424
16473
|
this.isExpanded ? this.gridApi.collapseAll() : this.gridApi.expandAll();
|
|
16425
16474
|
this.isExpanded = !this.isExpanded;
|
|
16426
|
-
// this.gridApi.forEachNode((node: RowNode) => {
|
|
16427
|
-
// node.setExpanded(this.isExpanded);
|
|
16428
|
-
// });
|
|
16429
16475
|
};
|
|
16430
16476
|
DatoGridPaginationV2Component.prototype.autoFitGrid = function (type) {
|
|
16431
16477
|
this.gridService.fitGrid(type);
|
|
@@ -16518,7 +16564,7 @@
|
|
|
16518
16564
|
core.Component({
|
|
16519
16565
|
selector: 'dato-grid-pagination-v2',
|
|
16520
16566
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
16521
|
-
template: "<div class=\"d-flex-row d-flex-auto d-flex-wrap container\" [class.small]=\"smallVersion\"\n [attr.data-pages-count]=\"totalPages\"\n [attr.data-current-page]=\"pageNumbersDisplay.currentPage\"\n [attr.data-page-size]=\"rowsPerPage\"\n [attr.data-rows-count]=\"rowCount\">\n <div *ngIf=\"totalPages > 1\" #navigation\n class=\"navigation d-flex-row d-flex-0-0-auto align-center\">\n\n <!-- First Page -->\n <dato-icon-button *ngIf=\"!disableButtons\"\n class=\"mr-4\" data-auto-id=\"pagiantion-first-page\"\n icon=\"chevron-left-double\"\n datoType=\"secondary\"\n datoSize=\"md\"\n [disabled]=\"prevPageDisabled\"\n (click)=\"navigateFirstPage()\">\n </dato-icon-button>\n\n <!-- Previous Page -->\n <dato-icon-button icon=\"arrow-left\" datoType=\"secondary\" datoSize=\"md\"\n [disabled]=\"prevPageDisabled\" data-auto-id=\"pagiantion-previous-page\"\n (click)=\"navigatePrevPage()\">\n </dato-icon-button>\n\n\n <div class=\"d-flex mx-5 align-center number-container\">\n <dato-link class=\"page-number mx-5\" datoType=\"secondary\" datoSize=\"sm\" data-auto-id=\"pagiantion-previous-batch\"\n *ngIf=\"pageNumbersDisplay.showFirstEllipsis && !smallVersion\"\n (click)=\"showPreviousBatch()\">...\n </dato-link>\n <dato-link class=\"page-number mx-5\" [datoType]=\"page === pageNumbersDisplay.currentPage ? 'primary' : 'secondary'\" datoSize=\"sm\"\n *ngFor=\"let page of pageNumbersDisplay.pages; index as i; trackBy: trackByPage;\" [attr.data-auto-id]=\"'pagiantion-page-' + i\"\n (click)=\"navigatePage(page - 1)\">\n {{page}}\n </dato-link>\n\n <div class=\"d-flex\" *ngIf=\"pageNumbersDisplay.showLastPage && !smallVersion\">\n <dato-link class=\"page-number mx-5\" datoType=\"secondary\" datoSize=\"sm\" data-auto-id=\"pagiantion-next-batch\"\n (click)=\"showNextBatch()\">...</dato-link>\n <dato-link class=\"page-number mx-5\" datoType=\"secondary\" datoSize=\"sm\"\n [attr.data-auto-id]=\"'pagiantion-page-' + totalPages\"\n (click)=\"navigatePage(totalPages - 1)\">\n {{totalPages}}\n </dato-link>\n </div>\n\n </div>\n\n <!-- Next Page -->\n <dato-icon-button icon=\"arrow-right\" datoType=\"secondary\" datoSize=\"md\"\n (click)=\"navigateNextPage()\" data-auto-id=\"pagiantion-next-page\"\n [disabled]=\"nextPageDisabled\">\n </dato-icon-button>\n\n <!-- Last Page -->\n <dato-icon-button *ngIf=\"!disableButtons\"\n class=\"ml-4\" icon=\"chevron-right-double\"\n datoType=\"secondary\" datoSize=\"md\" data-auto-id=\"pagiantion-last-page\"\n [disabled]=\"nextPageDisabled\"\n (click)=\"navigatePage(totalPages - 1)\">\n </dato-icon-button>\n\n </div>\n\n <div *ngIf=\"totalPages > 1 && !smallVersion\"\n class=\"separator mx-10 my-auto primary-100-background-color\">\n </div>\n\n <div class=\"total d-flex-0-0-auto d-flex-row align-center\">\n <span class=\"dato-note primary-300-color\">{{rowsRange}}</span>\n </div>\n\n <div *ngIf=\"showBottomControls\" class=\"grid-controls d-flex d-flex-1 justify-end\">\n <dato-icon-button [icon]=\"isExpanded ? 'collapse' : 'expand'\" datoType=\"secondary\"
|
|
16567
|
+
template: "<div class=\"d-flex-row d-flex-auto d-flex-wrap container\" [class.small]=\"smallVersion\"\n [attr.data-pages-count]=\"totalPages\"\n [attr.data-current-page]=\"pageNumbersDisplay.currentPage\"\n [attr.data-page-size]=\"rowsPerPage\"\n [attr.data-rows-count]=\"rowCount\">\n <div *ngIf=\"totalPages > 1\" #navigation\n class=\"navigation d-flex-row d-flex-0-0-auto align-center\">\n\n <!-- First Page -->\n <dato-icon-button *ngIf=\"!disableButtons\"\n class=\"mr-4\" data-auto-id=\"pagiantion-first-page\"\n icon=\"chevron-left-double\"\n datoType=\"secondary\"\n datoSize=\"md\"\n [disabled]=\"prevPageDisabled\"\n (click)=\"navigateFirstPage()\">\n </dato-icon-button>\n\n <!-- Previous Page -->\n <dato-icon-button icon=\"arrow-left\" datoType=\"secondary\" datoSize=\"md\"\n [disabled]=\"prevPageDisabled\" data-auto-id=\"pagiantion-previous-page\"\n (click)=\"navigatePrevPage()\">\n </dato-icon-button>\n\n\n <div class=\"d-flex mx-5 align-center number-container\">\n <dato-link class=\"page-number mx-5\" datoType=\"secondary\" datoSize=\"sm\" data-auto-id=\"pagiantion-previous-batch\"\n *ngIf=\"pageNumbersDisplay.showFirstEllipsis && !smallVersion\"\n (click)=\"showPreviousBatch()\">...\n </dato-link>\n <dato-link class=\"page-number mx-5\" [datoType]=\"page === pageNumbersDisplay.currentPage ? 'primary' : 'secondary'\" datoSize=\"sm\"\n *ngFor=\"let page of pageNumbersDisplay.pages; index as i; trackBy: trackByPage;\" [attr.data-auto-id]=\"'pagiantion-page-' + i\"\n (click)=\"navigatePage(page - 1)\">\n {{page}}\n </dato-link>\n\n <div class=\"d-flex\" *ngIf=\"pageNumbersDisplay.showLastPage && !smallVersion\">\n <dato-link class=\"page-number mx-5\" datoType=\"secondary\" datoSize=\"sm\" data-auto-id=\"pagiantion-next-batch\"\n (click)=\"showNextBatch()\">...</dato-link>\n <dato-link class=\"page-number mx-5\" datoType=\"secondary\" datoSize=\"sm\"\n [attr.data-auto-id]=\"'pagiantion-page-' + totalPages\"\n (click)=\"navigatePage(totalPages - 1)\">\n {{totalPages}}\n </dato-link>\n </div>\n\n </div>\n\n <!-- Next Page -->\n <dato-icon-button icon=\"arrow-right\" datoType=\"secondary\" datoSize=\"md\"\n (click)=\"navigateNextPage()\" data-auto-id=\"pagiantion-next-page\"\n [disabled]=\"nextPageDisabled\">\n </dato-icon-button>\n\n <!-- Last Page -->\n <dato-icon-button *ngIf=\"!disableButtons\"\n class=\"ml-4\" icon=\"chevron-right-double\"\n datoType=\"secondary\" datoSize=\"md\" data-auto-id=\"pagiantion-last-page\"\n [disabled]=\"nextPageDisabled\"\n (click)=\"navigatePage(totalPages - 1)\">\n </dato-icon-button>\n\n </div>\n\n <div *ngIf=\"totalPages > 1 && !smallVersion\"\n class=\"separator mx-10 my-auto primary-100-background-color\">\n </div>\n\n <div class=\"total d-flex-0-0-auto d-flex-row align-center\">\n <span class=\"dato-note primary-300-color\">{{rowsRange}}</span>\n </div>\n\n <div *ngIf=\"showBottomControls\" class=\"grid-controls d-flex d-flex-1 justify-end\">\n <dato-icon-button *ngIf=\"hasRowGroupColumns\" [icon]=\"isExpanded ? 'collapse' : 'expand'\" datoType=\"secondary\"\n datoSize=\"md\" (click)=\"toggleGroupsState()\" data-auto-id=\"pagination-expand-collapse\"\n [datoTooltipV2]=\"isExpanded ? 'core.collapse-rows' : 'core.expand-rows'\">\n </dato-icon-button>\n\n <dato-icon-button class=\"mx-4\" icon=\"maximize-horizontal\" datoType=\"secondary\" datoSize=\"md\"\n (click)=\"autoFitGrid('content')\" [datoTooltipV2]=\"'core.fit-to-content'\"\n data-auto-id=\"pagination-fit-to-content\">\n </dato-icon-button>\n\n <dato-icon-button icon=\"minimize-horizontal\" datoType=\"secondary\" datoSize=\"md\"\n (click)=\"autoFitGrid('container')\" [datoTooltipV2]=\"'core.fit-to-container'\"\n data-auto-id=\"pagination-fit-to-container\">\n </dato-icon-button>\n </div>\n</div>\n",
|
|
16522
16568
|
providers: [common.DecimalPipe],
|
|
16523
16569
|
styles: [":host{padding:12px 0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;min-height:25px}:host .container{height:25px}:host .navigation .page-number{transition:color .3s ease-in-out}:host .navigation .page-number:first-of-type{margin-left:7px}:host .navigation .page-number:last-of-type{margin-right:7px}:host .separator{width:1px;height:25px}:host .container.small .navigation,:host .container.small .total{margin-top:8px;margin-left:auto;margin-right:auto}"]
|
|
16524
16570
|
}),
|
|
@@ -16741,18 +16787,6 @@
|
|
|
16741
16787
|
this.registerGroupListeners();
|
|
16742
16788
|
this.subscribeRowsSelectionData();
|
|
16743
16789
|
};
|
|
16744
|
-
DatoGridV2ToolbarComponent.prototype.getCellValueChangeEvent = function () {
|
|
16745
|
-
var _this = this;
|
|
16746
|
-
return this.gridController.gridQuery.waitForGrid(function () {
|
|
16747
|
-
return _this.gridQuery.gridRef.cellValueChanged.pipe(operators.debounceTime(100), ngxTakeUntilDestroy.untilDestroyed(_this));
|
|
16748
|
-
});
|
|
16749
|
-
};
|
|
16750
|
-
DatoGridV2ToolbarComponent.prototype.getRowDataUpdatedEvent = function () {
|
|
16751
|
-
var _this = this;
|
|
16752
|
-
return this.gridController.gridQuery.waitForGrid(function () {
|
|
16753
|
-
return _this.gridQuery.gridRef.rowDataUpdated.pipe(operators.debounceTime(100), ngxTakeUntilDestroy.untilDestroyed(_this));
|
|
16754
|
-
});
|
|
16755
|
-
};
|
|
16756
16790
|
DatoGridV2ToolbarComponent.prototype.onActionClick = function (action) {
|
|
16757
16791
|
if (isFunction(action.onClick)) {
|
|
16758
16792
|
var selectedRowsCount = this.gridController.gridQuery.getSelectedRowsCount();
|
|
@@ -21228,40 +21262,6 @@
|
|
|
21228
21262
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
21229
21263
|
*/
|
|
21230
21264
|
|
|
21231
|
-
var RichTextService = /** @class */ (function () {
|
|
21232
|
-
function RichTextService(http, config) {
|
|
21233
|
-
this.http = http;
|
|
21234
|
-
this.config = config;
|
|
21235
|
-
}
|
|
21236
|
-
RichTextService.prototype.getLib = function (appendScriptFunc, appendStyleFunc) {
|
|
21237
|
-
if (!this.richTextScript$) {
|
|
21238
|
-
this.initLib(appendScriptFunc, appendStyleFunc);
|
|
21239
|
-
}
|
|
21240
|
-
return this.richTextScript$;
|
|
21241
|
-
};
|
|
21242
|
-
RichTextService.prototype.initLib = function (appendScriptFunc, appendStyleFunc) {
|
|
21243
|
-
this.richTextScript$ = rxjs.combineLatest([
|
|
21244
|
-
this.http
|
|
21245
|
-
.get(this.config.paths.richText + "/index.js", { responseType: 'text' })
|
|
21246
|
-
.pipe(operators.tap(function (lib) { return appendScriptFunc(lib, 'rich-text-editor'); })),
|
|
21247
|
-
this.http
|
|
21248
|
-
.get(this.config.paths.richText + "/plugins/autocomplete/plugin.css", { responseType: 'text' })
|
|
21249
|
-
.pipe(operators.tap(function (style) { return appendStyleFunc(style, 'tinymce-autocomplete'); }))
|
|
21250
|
-
]).pipe(operators.shareReplay(1));
|
|
21251
|
-
};
|
|
21252
|
-
RichTextService.ctorParameters = function () { return [
|
|
21253
|
-
{ type: http.HttpClient },
|
|
21254
|
-
{ type: undefined, decorators: [{ type: core.Inject, args: [DATO_CORE_CONFIG,] }] }
|
|
21255
|
-
]; };
|
|
21256
|
-
RichTextService.ɵprov = core.ɵɵdefineInjectable({ factory: function RichTextService_Factory() { return new RichTextService(core.ɵɵinject(http.HttpClient), core.ɵɵinject(DATO_CORE_CONFIG)); }, token: RichTextService, providedIn: "root" });
|
|
21257
|
-
RichTextService = __decorate([
|
|
21258
|
-
core.Injectable({ providedIn: 'root' }),
|
|
21259
|
-
__param(1, core.Inject(DATO_CORE_CONFIG)),
|
|
21260
|
-
__metadata("design:paramtypes", [http.HttpClient, Object])
|
|
21261
|
-
], RichTextService);
|
|
21262
|
-
return RichTextService;
|
|
21263
|
-
}());
|
|
21264
|
-
|
|
21265
21265
|
/**
|
|
21266
21266
|
* @license
|
|
21267
21267
|
* Copyright Datorama. All Rights Reserved.
|
|
@@ -21275,12 +21275,12 @@
|
|
|
21275
21275
|
var ɵ0$3 = getTinymce;
|
|
21276
21276
|
var DatoRichTextDirective = /** @class */ (function (_super) {
|
|
21277
21277
|
__extends(DatoRichTextDirective, _super);
|
|
21278
|
-
function DatoRichTextDirective(ngZone,
|
|
21278
|
+
function DatoRichTextDirective(ngZone, http, host, config) {
|
|
21279
21279
|
var _this = _super.call(this) || this;
|
|
21280
21280
|
_this.ngZone = ngZone;
|
|
21281
|
-
_this.
|
|
21282
|
-
_this.config = config;
|
|
21281
|
+
_this.http = http;
|
|
21283
21282
|
_this.host = host;
|
|
21283
|
+
_this.config = config;
|
|
21284
21284
|
_this.autocompleteOptions = {};
|
|
21285
21285
|
_this.forcePlainTextPasting = false;
|
|
21286
21286
|
_this.format = 'html';
|
|
@@ -21314,11 +21314,28 @@
|
|
|
21314
21314
|
base: this.config.paths.richText,
|
|
21315
21315
|
query: ''
|
|
21316
21316
|
};
|
|
21317
|
-
|
|
21318
|
-
|
|
21319
|
-
|
|
21320
|
-
|
|
21321
|
-
|
|
21317
|
+
/**
|
|
21318
|
+
* We support only one instance in load time
|
|
21319
|
+
*/
|
|
21320
|
+
if (window.tinymce) {
|
|
21321
|
+
this.init.call(this);
|
|
21322
|
+
}
|
|
21323
|
+
else {
|
|
21324
|
+
this.loadLib().subscribe(function (lib) {
|
|
21325
|
+
appendScript(lib, 'rich-text-editor');
|
|
21326
|
+
_this.init.call(_this);
|
|
21327
|
+
_this.loadAutoCompleteStyle();
|
|
21328
|
+
});
|
|
21329
|
+
}
|
|
21330
|
+
};
|
|
21331
|
+
DatoRichTextDirective.prototype.loadLib = function () {
|
|
21332
|
+
return this.http.get(this.config.paths.richText + "/index.js", { responseType: 'text' });
|
|
21333
|
+
};
|
|
21334
|
+
DatoRichTextDirective.prototype.loadAutoCompleteStyle = function () {
|
|
21335
|
+
this.http
|
|
21336
|
+
.get(this.config.paths.richText + "/plugins/autocomplete/plugin.css", { responseType: 'text' })
|
|
21337
|
+
.subscribe(function (style) {
|
|
21338
|
+
appendStyle(style, 'tinymce-autocomplete');
|
|
21322
21339
|
});
|
|
21323
21340
|
};
|
|
21324
21341
|
DatoRichTextDirective.prototype.initEditor = function (_, editor) {
|
|
@@ -21411,9 +21428,9 @@
|
|
|
21411
21428
|
var DatoRichTextDirective_1;
|
|
21412
21429
|
DatoRichTextDirective.ctorParameters = function () { return [
|
|
21413
21430
|
{ type: core.NgZone },
|
|
21414
|
-
{ type:
|
|
21415
|
-
{ type:
|
|
21416
|
-
{ type: core.
|
|
21431
|
+
{ type: http.HttpClient },
|
|
21432
|
+
{ type: core.ElementRef },
|
|
21433
|
+
{ type: undefined, decorators: [{ type: core.Inject, args: [DATO_CORE_CONFIG,] }] }
|
|
21417
21434
|
]; };
|
|
21418
21435
|
__decorate([
|
|
21419
21436
|
core.Input(),
|
|
@@ -21479,9 +21496,10 @@
|
|
|
21479
21496
|
}
|
|
21480
21497
|
]
|
|
21481
21498
|
}),
|
|
21482
|
-
__param(
|
|
21499
|
+
__param(3, core.Inject(DATO_CORE_CONFIG)),
|
|
21483
21500
|
__metadata("design:paramtypes", [core.NgZone,
|
|
21484
|
-
|
|
21501
|
+
http.HttpClient,
|
|
21502
|
+
core.ElementRef, Object])
|
|
21485
21503
|
], DatoRichTextDirective);
|
|
21486
21504
|
return DatoRichTextDirective;
|
|
21487
21505
|
}(BaseCustomControl));
|
|
@@ -24004,9 +24022,7 @@
|
|
|
24004
24022
|
};
|
|
24005
24023
|
DatoBreadcrumbsComponent.prototype.initEditableHeader = function () {
|
|
24006
24024
|
var _this = this;
|
|
24007
|
-
this.headerControl.valueChanges
|
|
24008
|
-
.pipe(operators.debounceTime(300), ngxTakeUntilDestroy.untilDestroyed(this))
|
|
24009
|
-
.subscribe(function (res) {
|
|
24025
|
+
this.headerControl.valueChanges.pipe(operators.debounceTime(300), ngxTakeUntilDestroy.untilDestroyed(this)).subscribe(function (res) {
|
|
24010
24026
|
_this.updateEditableText.emit(res);
|
|
24011
24027
|
_this.cdr.detectChanges();
|
|
24012
24028
|
});
|
|
@@ -24695,22 +24711,17 @@
|
|
|
24695
24711
|
}());
|
|
24696
24712
|
|
|
24697
24713
|
var DatoProgressBarComponent = /** @class */ (function () {
|
|
24698
|
-
function DatoProgressBarComponent() {
|
|
24714
|
+
function DatoProgressBarComponent(cdr) {
|
|
24715
|
+
this.cdr = cdr;
|
|
24699
24716
|
this.barColor = 'primary-100';
|
|
24700
24717
|
this.thresholds = [33, 66];
|
|
24701
24718
|
}
|
|
24702
24719
|
DatoProgressBarComponent.prototype.ngOnInit = function () {
|
|
24703
|
-
if (!this.parts
|
|
24704
|
-
|
|
24705
|
-
|
|
24706
|
-
|
|
24707
|
-
this.
|
|
24708
|
-
{
|
|
24709
|
-
percent: this.percent,
|
|
24710
|
-
color: this.color,
|
|
24711
|
-
tooltip: this.tooltip
|
|
24712
|
-
}
|
|
24713
|
-
];
|
|
24720
|
+
if (!this.parts) {
|
|
24721
|
+
this.percent = this.percent || 0;
|
|
24722
|
+
this.isByPercent = true;
|
|
24723
|
+
this.hasInitialColor = !!this.color;
|
|
24724
|
+
this.initSinglePart();
|
|
24714
24725
|
}
|
|
24715
24726
|
else if (this.parts &&
|
|
24716
24727
|
this.parts.every(function (part) { return part.weight >= 0; }) &&
|
|
@@ -24718,6 +24729,27 @@
|
|
|
24718
24729
|
this.initPartsPercent();
|
|
24719
24730
|
}
|
|
24720
24731
|
};
|
|
24732
|
+
DatoProgressBarComponent.prototype.ngOnChanges = function (changes) {
|
|
24733
|
+
if (this.isByPercent &&
|
|
24734
|
+
((changes.percent && !changes.percent.firstChange) ||
|
|
24735
|
+
(changes.color && !changes.color.firstChange) ||
|
|
24736
|
+
(changes.tooltip && !changes.tooltip.firstChange))) {
|
|
24737
|
+
this.initSinglePart();
|
|
24738
|
+
this.cdr.detectChanges();
|
|
24739
|
+
}
|
|
24740
|
+
};
|
|
24741
|
+
DatoProgressBarComponent.prototype.initSinglePart = function () {
|
|
24742
|
+
if (!this.color || !this.hasInitialColor) {
|
|
24743
|
+
this.initColor();
|
|
24744
|
+
}
|
|
24745
|
+
this.parts = [
|
|
24746
|
+
{
|
|
24747
|
+
percent: this.percent,
|
|
24748
|
+
color: this.color,
|
|
24749
|
+
tooltip: this.tooltip
|
|
24750
|
+
}
|
|
24751
|
+
];
|
|
24752
|
+
};
|
|
24721
24753
|
DatoProgressBarComponent.prototype.initColor = function () {
|
|
24722
24754
|
if (isEmpty(this.thresholds)) {
|
|
24723
24755
|
this.color = 'accent-400';
|
|
@@ -24758,6 +24790,9 @@
|
|
|
24758
24790
|
}
|
|
24759
24791
|
}
|
|
24760
24792
|
};
|
|
24793
|
+
DatoProgressBarComponent.ctorParameters = function () { return [
|
|
24794
|
+
{ type: core.ChangeDetectorRef }
|
|
24795
|
+
]; };
|
|
24761
24796
|
__decorate([
|
|
24762
24797
|
core.Input(),
|
|
24763
24798
|
__metadata("design:type", String)
|
|
@@ -24793,11 +24828,12 @@
|
|
|
24793
24828
|
DatoProgressBarComponent = __decorate([
|
|
24794
24829
|
core.Component({
|
|
24795
24830
|
selector: 'dato-progress-bar',
|
|
24796
|
-
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",
|
|
24831
|
+
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",
|
|
24797
24832
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
24798
24833
|
encapsulation: core.ViewEncapsulation.None,
|
|
24799
24834
|
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%}"]
|
|
24800
|
-
})
|
|
24835
|
+
}),
|
|
24836
|
+
__metadata("design:paramtypes", [core.ChangeDetectorRef])
|
|
24801
24837
|
], DatoProgressBarComponent);
|
|
24802
24838
|
return DatoProgressBarComponent;
|
|
24803
24839
|
}());
|
|
@@ -25349,7 +25385,7 @@
|
|
|
25349
25385
|
};
|
|
25350
25386
|
}
|
|
25351
25387
|
|
|
25352
|
-
window.coreVersion = '22.
|
|
25388
|
+
window.coreVersion = '22.2.2';
|
|
25353
25389
|
|
|
25354
25390
|
exports.APP_TRANSLATE = APP_TRANSLATE;
|
|
25355
25391
|
exports.AceService = AceService;
|
|
@@ -25791,7 +25827,6 @@
|
|
|
25791
25827
|
exports.ɵl = DatoGridItemsCountCellComponent;
|
|
25792
25828
|
exports.ɵm = DatoGridV2ToolbarMoreMenuComponent;
|
|
25793
25829
|
exports.ɵn = DatoGridSearchBarComponent;
|
|
25794
|
-
exports.ɵo = RichTextService;
|
|
25795
25830
|
|
|
25796
25831
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
25797
25832
|
|