igniteui-angular 22.1.0-beta.4 → 22.1.0-beta.5
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/fesm2022/igniteui-angular-accordion.mjs +4 -4
- package/fesm2022/igniteui-angular-accordion.mjs.map +1 -1
- package/fesm2022/igniteui-angular-action-strip.mjs +3 -1
- package/fesm2022/igniteui-angular-action-strip.mjs.map +1 -1
- package/fesm2022/igniteui-angular-avatar.mjs.map +1 -1
- package/fesm2022/igniteui-angular-badge.mjs +3 -2
- package/fesm2022/igniteui-angular-badge.mjs.map +1 -1
- package/fesm2022/igniteui-angular-banner.mjs +2 -2
- package/fesm2022/igniteui-angular-banner.mjs.map +1 -1
- package/fesm2022/igniteui-angular-button-group.mjs.map +1 -1
- package/fesm2022/igniteui-angular-calendar.mjs +9 -8
- package/fesm2022/igniteui-angular-calendar.mjs.map +1 -1
- package/fesm2022/igniteui-angular-card.mjs +2 -2
- package/fesm2022/igniteui-angular-card.mjs.map +1 -1
- package/fesm2022/igniteui-angular-carousel.mjs.map +1 -1
- package/fesm2022/igniteui-angular-chips.mjs.map +1 -1
- package/fesm2022/igniteui-angular-combo.mjs +6 -17
- package/fesm2022/igniteui-angular-combo.mjs.map +1 -1
- package/fesm2022/igniteui-angular-core.mjs +337 -16
- package/fesm2022/igniteui-angular-core.mjs.map +1 -1
- package/fesm2022/igniteui-angular-date-picker.mjs +14 -12
- package/fesm2022/igniteui-angular-date-picker.mjs.map +1 -1
- package/fesm2022/igniteui-angular-dialog.mjs +1 -1
- package/fesm2022/igniteui-angular-dialog.mjs.map +1 -1
- package/fesm2022/igniteui-angular-directives.mjs +61 -47
- package/fesm2022/igniteui-angular-directives.mjs.map +1 -1
- package/fesm2022/igniteui-angular-drop-down.mjs +2 -3
- package/fesm2022/igniteui-angular-drop-down.mjs.map +1 -1
- package/fesm2022/igniteui-angular-expansion-panel.mjs +12 -23
- package/fesm2022/igniteui-angular-expansion-panel.mjs.map +1 -1
- package/fesm2022/igniteui-angular-grids-core.mjs +205 -485
- package/fesm2022/igniteui-angular-grids-core.mjs.map +1 -1
- package/fesm2022/igniteui-angular-grids-grid.mjs +98 -116
- package/fesm2022/igniteui-angular-grids-grid.mjs.map +1 -1
- package/fesm2022/igniteui-angular-grids-hierarchical-grid.mjs +21 -16
- package/fesm2022/igniteui-angular-grids-hierarchical-grid.mjs.map +1 -1
- package/fesm2022/igniteui-angular-grids-lite.mjs.map +1 -1
- package/fesm2022/igniteui-angular-grids-pivot-grid.mjs +153 -75
- package/fesm2022/igniteui-angular-grids-pivot-grid.mjs.map +1 -1
- package/fesm2022/igniteui-angular-grids-tree-grid.mjs +35 -28
- package/fesm2022/igniteui-angular-grids-tree-grid.mjs.map +1 -1
- package/fesm2022/igniteui-angular-icon.mjs.map +1 -1
- package/fesm2022/igniteui-angular-input-group.mjs +19 -4
- package/fesm2022/igniteui-angular-input-group.mjs.map +1 -1
- package/fesm2022/igniteui-angular-list.mjs.map +1 -1
- package/fesm2022/igniteui-angular-navbar.mjs.map +1 -1
- package/fesm2022/igniteui-angular-navigation-drawer.mjs +3 -2
- package/fesm2022/igniteui-angular-navigation-drawer.mjs.map +1 -1
- package/fesm2022/igniteui-angular-paginator.mjs +2 -1
- package/fesm2022/igniteui-angular-paginator.mjs.map +1 -1
- package/fesm2022/igniteui-angular-progressbar.mjs +2 -5
- package/fesm2022/igniteui-angular-progressbar.mjs.map +1 -1
- package/fesm2022/igniteui-angular-query-builder.mjs +21 -20
- package/fesm2022/igniteui-angular-query-builder.mjs.map +1 -1
- package/fesm2022/igniteui-angular-radio.mjs +1 -1
- package/fesm2022/igniteui-angular-radio.mjs.map +1 -1
- package/fesm2022/igniteui-angular-select.mjs.map +1 -1
- package/fesm2022/igniteui-angular-simple-combo.mjs +7 -10
- package/fesm2022/igniteui-angular-simple-combo.mjs.map +1 -1
- package/fesm2022/igniteui-angular-slider.mjs +3 -3
- package/fesm2022/igniteui-angular-slider.mjs.map +1 -1
- package/fesm2022/igniteui-angular-splitter.mjs +1 -1
- package/fesm2022/igniteui-angular-splitter.mjs.map +1 -1
- package/fesm2022/igniteui-angular-stepper.mjs +1 -1
- package/fesm2022/igniteui-angular-stepper.mjs.map +1 -1
- package/fesm2022/igniteui-angular-tabs.mjs.map +1 -1
- package/fesm2022/igniteui-angular-time-picker.mjs +6 -3
- package/fesm2022/igniteui-angular-time-picker.mjs.map +1 -1
- package/fesm2022/igniteui-angular-tree.mjs +10 -8
- package/fesm2022/igniteui-angular-tree.mjs.map +1 -1
- package/lib/core/styles/components/button/_button-theme.scss +24 -31
- package/lib/core/styles/components/icon-button/_icon-button-theme.scss +21 -0
- package/lib/core/styles/spec/_mixins.spec.scss +21 -1
- package/lib/core/styles/themes/_scoping.scss +12 -0
- package/lib/core/styles/themes/generators/_base.scss +0 -1
- package/migrations/migration-collection.json +7 -0
- package/migrations/update-22_1_0_import-migration/index.d.ts +2 -0
- package/migrations/update-22_1_0_import-migration/index.js +200 -0
- package/migrations/update-22_1_0_import-migration/index.spec.d.ts +1 -0
- package/migrations/update-22_1_0_import-migration/index.spec.js +132 -0
- package/package.json +1 -1
- package/styles/igniteui-angular-dark.css +1 -1
- package/styles/igniteui-angular.css +1 -1
- package/styles/igniteui-bootstrap-dark.css +1 -1
- package/styles/igniteui-bootstrap-light.css +1 -1
- package/styles/igniteui-dark-green.css +1 -1
- package/styles/igniteui-fluent-dark-excel.css +1 -1
- package/styles/igniteui-fluent-dark-word.css +1 -1
- package/styles/igniteui-fluent-dark.css +1 -1
- package/styles/igniteui-fluent-light-excel.css +1 -1
- package/styles/igniteui-fluent-light-word.css +1 -1
- package/styles/igniteui-fluent-light.css +1 -1
- package/styles/igniteui-indigo-dark.css +1 -1
- package/styles/igniteui-indigo-light.css +1 -1
- package/styles/maps/igniteui-angular-dark.css.map +1 -1
- package/styles/maps/igniteui-angular.css.map +1 -1
- package/styles/maps/igniteui-bootstrap-dark.css.map +1 -1
- package/styles/maps/igniteui-bootstrap-light.css.map +1 -1
- package/styles/maps/igniteui-dark-green.css.map +1 -1
- package/styles/maps/igniteui-fluent-dark-excel.css.map +1 -1
- package/styles/maps/igniteui-fluent-dark-word.css.map +1 -1
- package/styles/maps/igniteui-fluent-dark.css.map +1 -1
- package/styles/maps/igniteui-fluent-light-excel.css.map +1 -1
- package/styles/maps/igniteui-fluent-light-word.css.map +1 -1
- package/styles/maps/igniteui-fluent-light.css.map +1 -1
- package/styles/maps/igniteui-indigo-dark.css.map +1 -1
- package/styles/maps/igniteui-indigo-light.css.map +1 -1
- package/types/igniteui-angular-avatar.d.ts +1 -1
- package/types/igniteui-angular-banner.d.ts +3 -3
- package/types/igniteui-angular-calendar.d.ts +9 -9
- package/types/igniteui-angular-card.d.ts +2 -2
- package/types/igniteui-angular-carousel.d.ts +9 -9
- package/types/igniteui-angular-chat.d.ts +1 -1
- package/types/igniteui-angular-chips.d.ts +5 -5
- package/types/igniteui-angular-combo.d.ts +13 -17
- package/types/igniteui-angular-core.d.ts +495 -200
- package/types/igniteui-angular-date-picker.d.ts +3 -3
- package/types/igniteui-angular-dialog.d.ts +4 -4
- package/types/igniteui-angular-directives.d.ts +59 -59
- package/types/igniteui-angular-drop-down.d.ts +16 -16
- package/types/igniteui-angular-expansion-panel.d.ts +6 -6
- package/types/igniteui-angular-grids-core.d.ts +782 -1044
- package/types/igniteui-angular-grids-grid.d.ts +267 -104
- package/types/igniteui-angular-grids-hierarchical-grid.d.ts +547 -68
- package/types/igniteui-angular-grids-lite.d.ts +7 -7
- package/types/igniteui-angular-grids-pivot-grid.d.ts +129 -94
- package/types/igniteui-angular-grids-tree-grid.d.ts +51 -5
- package/types/igniteui-angular-icon.d.ts +2 -2
- package/types/igniteui-angular-input-group.d.ts +19 -6
- package/types/igniteui-angular-list.d.ts +4 -4
- package/types/igniteui-angular-navigation-drawer.d.ts +3 -3
- package/types/igniteui-angular-progressbar.d.ts +0 -1
- package/types/igniteui-angular-query-builder.d.ts +9 -9
- package/types/igniteui-angular-radio.d.ts +1 -1
- package/types/igniteui-angular-select.d.ts +5 -5
- package/types/igniteui-angular-simple-combo.d.ts +2 -2
- package/types/igniteui-angular-slider.d.ts +4 -4
- package/types/igniteui-angular-splitter.d.ts +3 -3
- package/types/igniteui-angular-time-picker.d.ts +8 -8
- package/types/igniteui-angular-tree.d.ts +8 -8
|
@@ -28,6 +28,7 @@ class IgxNavigationService {
|
|
|
28
28
|
if (id) {
|
|
29
29
|
return this.navs[id];
|
|
30
30
|
}
|
|
31
|
+
return undefined;
|
|
31
32
|
}
|
|
32
33
|
toggle(id, ...args) {
|
|
33
34
|
if (this.navs[id]) {
|
|
@@ -678,11 +679,11 @@ function getComponentSize(el) {
|
|
|
678
679
|
return globalThis.window?.getComputedStyle(el).getPropertyValue('--component-size');
|
|
679
680
|
}
|
|
680
681
|
/** Get the first item in an array */
|
|
681
|
-
function first(arr) {
|
|
682
|
+
function first$1(arr) {
|
|
682
683
|
return arr.at(0);
|
|
683
684
|
}
|
|
684
685
|
/** Get the last item in an array */
|
|
685
|
-
function last(arr) {
|
|
686
|
+
function last$1(arr) {
|
|
686
687
|
return arr.at(-1);
|
|
687
688
|
}
|
|
688
689
|
/** Calculates the modulo of two numbers, ensuring a non-negative result. */
|
|
@@ -1056,6 +1057,9 @@ class IgxTouchManager {
|
|
|
1056
1057
|
this._pointerId = null;
|
|
1057
1058
|
this._startTarget = null;
|
|
1058
1059
|
this._onPointerDown = (event) => {
|
|
1060
|
+
if (!(event instanceof PointerEvent)) {
|
|
1061
|
+
return;
|
|
1062
|
+
}
|
|
1059
1063
|
if (this._tracking || !this._accepts(event.pointerType) || this._canStart?.(event) === false) {
|
|
1060
1064
|
return;
|
|
1061
1065
|
}
|
|
@@ -1088,6 +1092,9 @@ class IgxTouchManager {
|
|
|
1088
1092
|
}
|
|
1089
1093
|
};
|
|
1090
1094
|
this._onPointerMove = (event) => {
|
|
1095
|
+
if (!(event instanceof PointerEvent)) {
|
|
1096
|
+
return;
|
|
1097
|
+
}
|
|
1091
1098
|
if (!this._tracking || event.pointerId !== this._pointerId || !this._accepts(event.pointerType)) {
|
|
1092
1099
|
return;
|
|
1093
1100
|
}
|
|
@@ -1097,7 +1104,7 @@ class IgxTouchManager {
|
|
|
1097
1104
|
if (!this._panStarted) {
|
|
1098
1105
|
this._panStarted = true;
|
|
1099
1106
|
if (this.callbacks.panStart) {
|
|
1100
|
-
this._runInAngular(() => this.callbacks.panStart(gesture));
|
|
1107
|
+
this._runInAngular(() => this.callbacks.panStart?.(gesture));
|
|
1101
1108
|
}
|
|
1102
1109
|
}
|
|
1103
1110
|
// `panMove` is intentionally invoked outside of the Angular zone (when one is provided)
|
|
@@ -1106,6 +1113,9 @@ class IgxTouchManager {
|
|
|
1106
1113
|
this.callbacks.panMove?.(gesture);
|
|
1107
1114
|
};
|
|
1108
1115
|
this._onPointerUp = (event) => {
|
|
1116
|
+
if (!(event instanceof PointerEvent)) {
|
|
1117
|
+
return;
|
|
1118
|
+
}
|
|
1109
1119
|
if (!this._tracking || event.pointerId !== this._pointerId || !this._accepts(event.pointerType)) {
|
|
1110
1120
|
return;
|
|
1111
1121
|
}
|
|
@@ -1126,6 +1136,9 @@ class IgxTouchManager {
|
|
|
1126
1136
|
});
|
|
1127
1137
|
};
|
|
1128
1138
|
this._onPointerCancel = (event) => {
|
|
1139
|
+
if (!(event instanceof PointerEvent)) {
|
|
1140
|
+
return;
|
|
1141
|
+
}
|
|
1129
1142
|
if (!this._tracking || event.pointerId !== this._pointerId) {
|
|
1130
1143
|
return;
|
|
1131
1144
|
}
|
|
@@ -1133,10 +1146,13 @@ class IgxTouchManager {
|
|
|
1133
1146
|
this._pointerId = null;
|
|
1134
1147
|
if (this.callbacks.panCancel) {
|
|
1135
1148
|
const gesture = this._createEvent(event);
|
|
1136
|
-
this._runInAngular(() => this.callbacks.panCancel(gesture));
|
|
1149
|
+
this._runInAngular(() => this.callbacks.panCancel?.(gesture));
|
|
1137
1150
|
}
|
|
1138
1151
|
};
|
|
1139
1152
|
this._onTouchMove = (event) => {
|
|
1153
|
+
if (!(event instanceof TouchEvent)) {
|
|
1154
|
+
return;
|
|
1155
|
+
}
|
|
1140
1156
|
// Prevent scrolling only while a gesture is actively tracked.
|
|
1141
1157
|
if (this._tracking && event.cancelable) {
|
|
1142
1158
|
event.preventDefault();
|
|
@@ -1397,6 +1413,11 @@ var ColumnPinningPosition;
|
|
|
1397
1413
|
ColumnPinningPosition[ColumnPinningPosition["Start"] = 0] = "Start";
|
|
1398
1414
|
ColumnPinningPosition[ColumnPinningPosition["End"] = 1] = "End";
|
|
1399
1415
|
})(ColumnPinningPosition || (ColumnPinningPosition = {}));
|
|
1416
|
+
/**
|
|
1417
|
+
* Injection token for accessing the grid transaction object.
|
|
1418
|
+
* This allows injecting the grid transaction object into components or services.
|
|
1419
|
+
*/
|
|
1420
|
+
const IgxGridTransaction = /*@__PURE__*/ new InjectionToken('IgxGridTransaction');
|
|
1400
1421
|
/**
|
|
1401
1422
|
* Enumeration representing different calculation modes for grid summaries.
|
|
1402
1423
|
* - rootLevelOnly: Summaries are calculated only for the root level.
|
|
@@ -2262,12 +2283,12 @@ function isDateInRanges(date, ranges) {
|
|
|
2262
2283
|
const days = (range.dateRange ?? []).map((day) => toCalendarDay(day));
|
|
2263
2284
|
switch (range.type) {
|
|
2264
2285
|
case DateRangeType.After:
|
|
2265
|
-
return value.greaterThan(first(days));
|
|
2286
|
+
return value.greaterThan(first$1(days));
|
|
2266
2287
|
case DateRangeType.Before:
|
|
2267
|
-
return value.lessThan(first(days));
|
|
2288
|
+
return value.lessThan(first$1(days));
|
|
2268
2289
|
case DateRangeType.Between: {
|
|
2269
|
-
const min = Math.min(first(days).timestamp, last(days).timestamp);
|
|
2270
|
-
const max = Math.max(first(days).timestamp, last(days).timestamp);
|
|
2290
|
+
const min = Math.min(first$1(days).timestamp, last$1(days).timestamp);
|
|
2291
|
+
const max = Math.max(first$1(days).timestamp, last$1(days).timestamp);
|
|
2271
2292
|
return value.timestamp >= min && value.timestamp <= max;
|
|
2272
2293
|
}
|
|
2273
2294
|
case DateRangeType.Specific:
|
|
@@ -3267,7 +3288,7 @@ function getFilteringCondition(dataType, name) {
|
|
|
3267
3288
|
*/
|
|
3268
3289
|
function recreateOperatorFromDataType(expression, dataType) {
|
|
3269
3290
|
if (!expression.condition?.logic) {
|
|
3270
|
-
return getFilteringCondition(dataType, expression.conditionName || expression.condition?.name);
|
|
3291
|
+
return getFilteringCondition(dataType, (expression.conditionName || expression.condition?.name));
|
|
3271
3292
|
}
|
|
3272
3293
|
return expression.condition;
|
|
3273
3294
|
}
|
|
@@ -3285,7 +3306,7 @@ function recreateExpression(expression, fields) {
|
|
|
3285
3306
|
expression.condition = recreateOperatorFromDataType(expression, field.dataType);
|
|
3286
3307
|
}
|
|
3287
3308
|
else {
|
|
3288
|
-
expression.condition = field.filters.condition(expression.conditionName || expression.condition?.name);
|
|
3309
|
+
expression.condition = field.filters.condition((expression.conditionName || expression.condition?.name));
|
|
3289
3310
|
}
|
|
3290
3311
|
}
|
|
3291
3312
|
if (!expression.condition && expression.conditionName) {
|
|
@@ -4131,6 +4152,7 @@ class DataUtil {
|
|
|
4131
4152
|
if (transaction.path) {
|
|
4132
4153
|
const parent = this.findParentFromPath(data, primaryKey, childDataKey, transaction.path);
|
|
4133
4154
|
let collection = parent ? parent[childDataKey] : data;
|
|
4155
|
+
let updateIndex = -1;
|
|
4134
4156
|
switch (transaction.type) {
|
|
4135
4157
|
case TransactionType.ADD:
|
|
4136
4158
|
// if there is no parent this is ADD row at root level
|
|
@@ -4140,7 +4162,7 @@ class DataUtil {
|
|
|
4140
4162
|
collection.push(transaction.newValue);
|
|
4141
4163
|
break;
|
|
4142
4164
|
case TransactionType.UPDATE:
|
|
4143
|
-
|
|
4165
|
+
updateIndex = collection.findIndex(x => x[primaryKey] === transaction.id);
|
|
4144
4166
|
if (updateIndex !== -1) {
|
|
4145
4167
|
collection[updateIndex] = mergeObjects(cloneStrategy.clone(collection[updateIndex]), transaction.newValue);
|
|
4146
4168
|
}
|
|
@@ -4223,6 +4245,7 @@ class BaseFilteringStrategy {
|
|
|
4223
4245
|
if (expr.condition?.logic) {
|
|
4224
4246
|
return expr.condition.logic(val, expr.searchVal, expr.ignoreCase);
|
|
4225
4247
|
}
|
|
4248
|
+
return undefined;
|
|
4226
4249
|
}
|
|
4227
4250
|
// protected
|
|
4228
4251
|
matchRecord(rec, expressions, grid, entity) {
|
|
@@ -4553,6 +4576,305 @@ class TreeGridMatchingRecordsOnlyFilteringStrategy extends TreeGridFilteringStra
|
|
|
4553
4576
|
class GroupedRecords extends Array {
|
|
4554
4577
|
}
|
|
4555
4578
|
|
|
4579
|
+
const clear = (el) => el === 0 || Boolean(el);
|
|
4580
|
+
const first = (arr) => arr[0];
|
|
4581
|
+
const last = (arr) => arr[arr.length - 1];
|
|
4582
|
+
/* blazorCSSuppress */
|
|
4583
|
+
class IgxSummaryOperand {
|
|
4584
|
+
/**
|
|
4585
|
+
* Counts all the records in the data source.
|
|
4586
|
+
* If filtering is applied, counts only the filtered records.
|
|
4587
|
+
* ```typescript
|
|
4588
|
+
* IgxSummaryOperand.count(dataSource);
|
|
4589
|
+
* ```
|
|
4590
|
+
*
|
|
4591
|
+
* @memberof IgxSummaryOperand
|
|
4592
|
+
*/
|
|
4593
|
+
static count(data) {
|
|
4594
|
+
return data.length;
|
|
4595
|
+
}
|
|
4596
|
+
/**
|
|
4597
|
+
* Executes the static `count` method and returns summary result[]`.
|
|
4598
|
+
* ```typescript
|
|
4599
|
+
* interface IgxSummaryResult {
|
|
4600
|
+
* key: string;
|
|
4601
|
+
* label: string;
|
|
4602
|
+
* summaryResult: any;
|
|
4603
|
+
* }
|
|
4604
|
+
* ```
|
|
4605
|
+
* Can be overridden in the inherited classes to provide customization for the `summary`.
|
|
4606
|
+
* ```typescript
|
|
4607
|
+
* class CustomSummary extends IgxSummaryOperand {
|
|
4608
|
+
* constructor() {
|
|
4609
|
+
* super();
|
|
4610
|
+
* }
|
|
4611
|
+
* public operate(data: any[], allData: any[], fieldName: string, groupRecord: IGroupByRecord): IgxSummaryResult[] {
|
|
4612
|
+
* const result = [];
|
|
4613
|
+
* result.push({
|
|
4614
|
+
* key: "test",
|
|
4615
|
+
* label: "Test",
|
|
4616
|
+
* summaryResult: IgxSummaryOperand.count(data)
|
|
4617
|
+
* });
|
|
4618
|
+
* return result;
|
|
4619
|
+
* }
|
|
4620
|
+
* }
|
|
4621
|
+
* this.grid.getColumnByName('ColumnName').summaries = CustomSummary;
|
|
4622
|
+
* ```
|
|
4623
|
+
*
|
|
4624
|
+
* @memberof IgxSummaryOperand
|
|
4625
|
+
*/
|
|
4626
|
+
operate(data = [], _allData = [], _fieldName, _groupRecord) {
|
|
4627
|
+
return [{
|
|
4628
|
+
key: 'count',
|
|
4629
|
+
label: 'Count',
|
|
4630
|
+
defaultFormatting: false,
|
|
4631
|
+
summaryResult: IgxSummaryOperand.count(data)
|
|
4632
|
+
}];
|
|
4633
|
+
}
|
|
4634
|
+
}
|
|
4635
|
+
/* blazorCSSuppress */
|
|
4636
|
+
// @dynamic
|
|
4637
|
+
class IgxNumberSummaryOperand extends IgxSummaryOperand {
|
|
4638
|
+
/**
|
|
4639
|
+
* Returns the minimum numeric value in the provided data records.
|
|
4640
|
+
* If filtering is applied, returns the minimum value in the filtered data records.
|
|
4641
|
+
* ```typescript
|
|
4642
|
+
* IgxNumberSummaryOperand.min(data);
|
|
4643
|
+
* ```
|
|
4644
|
+
*
|
|
4645
|
+
* @memberof IgxNumberSummaryOperand
|
|
4646
|
+
*/
|
|
4647
|
+
static min(data) {
|
|
4648
|
+
return data.length && data.filter(clear).length ? data.filter(clear).reduce((a, b) => Math.min(a, b)) : 0;
|
|
4649
|
+
}
|
|
4650
|
+
/**
|
|
4651
|
+
* Returns the maximum numeric value in the provided data records.
|
|
4652
|
+
* If filtering is applied, returns the maximum value in the filtered data records.
|
|
4653
|
+
* ```typescript
|
|
4654
|
+
* IgxNumberSummaryOperand.max(data);
|
|
4655
|
+
* ```
|
|
4656
|
+
*
|
|
4657
|
+
* @memberof IgxNumberSummaryOperand
|
|
4658
|
+
*/
|
|
4659
|
+
static max(data) {
|
|
4660
|
+
return data.length && data.filter(clear).length ? data.filter(clear).reduce((a, b) => Math.max(a, b)) : 0;
|
|
4661
|
+
}
|
|
4662
|
+
/**
|
|
4663
|
+
* Returns the sum of the numeric values in the provided data records.
|
|
4664
|
+
* If filtering is applied, returns the sum of the numeric values in the data records.
|
|
4665
|
+
* ```typescript
|
|
4666
|
+
* IgxNumberSummaryOperand.sum(data);
|
|
4667
|
+
* ```
|
|
4668
|
+
*
|
|
4669
|
+
* @memberof IgxNumberSummaryOperand
|
|
4670
|
+
*/
|
|
4671
|
+
static sum(data) {
|
|
4672
|
+
return data.length && data.filter(clear).length ? data.filter(clear).reduce((a, b) => +a + +b) : 0;
|
|
4673
|
+
}
|
|
4674
|
+
/**
|
|
4675
|
+
* Returns the average numeric value in the data provided data records.
|
|
4676
|
+
* If filtering is applied, returns the average numeric value in the filtered data records.
|
|
4677
|
+
* ```typescript
|
|
4678
|
+
* IgxSummaryOperand.average(data);
|
|
4679
|
+
* ```
|
|
4680
|
+
*
|
|
4681
|
+
* @memberof IgxNumberSummaryOperand
|
|
4682
|
+
*/
|
|
4683
|
+
static average(data) {
|
|
4684
|
+
return data.length && data.filter(clear).length ? this.sum(data) / this.count(data) : 0;
|
|
4685
|
+
}
|
|
4686
|
+
/**
|
|
4687
|
+
* Executes the static methods and returns summary result[]`.
|
|
4688
|
+
* ```typescript
|
|
4689
|
+
* interface IgxSummaryResult {
|
|
4690
|
+
* key: string;
|
|
4691
|
+
* label: string;
|
|
4692
|
+
* summaryResult: any;
|
|
4693
|
+
* }
|
|
4694
|
+
* ```
|
|
4695
|
+
* Can be overridden in the inherited classes to provide customization for the `summary`.
|
|
4696
|
+
* ```typescript
|
|
4697
|
+
* class CustomNumberSummary extends IgxNumberSummaryOperand {
|
|
4698
|
+
* constructor() {
|
|
4699
|
+
* super();
|
|
4700
|
+
* }
|
|
4701
|
+
* public operate(data: any[], allData: any[], fieldName: string, groupRecord: IGroupByRecord): IgxSummaryResult[] {
|
|
4702
|
+
* const result = super.operate(data, allData, fieldName, groupRecord);
|
|
4703
|
+
* result.push({
|
|
4704
|
+
* key: "avg",
|
|
4705
|
+
* label: "Avg",
|
|
4706
|
+
* summaryResult: IgxNumberSummaryOperand.average(data)
|
|
4707
|
+
* });
|
|
4708
|
+
* result.push({
|
|
4709
|
+
* key: 'mdn',
|
|
4710
|
+
* label: 'Median',
|
|
4711
|
+
* summaryResult: this.findMedian(data)
|
|
4712
|
+
* });
|
|
4713
|
+
* return result;
|
|
4714
|
+
* }
|
|
4715
|
+
* }
|
|
4716
|
+
* this.grid.getColumnByName('ColumnName').summaries = CustomNumberSummary;
|
|
4717
|
+
* ```
|
|
4718
|
+
*
|
|
4719
|
+
* @memberof IgxNumberSummaryOperand
|
|
4720
|
+
*/
|
|
4721
|
+
operate(data = [], allData = [], fieldName, groupRecord) {
|
|
4722
|
+
const result = super.operate(data, allData, fieldName, groupRecord);
|
|
4723
|
+
result.push({
|
|
4724
|
+
key: 'min',
|
|
4725
|
+
label: 'Min',
|
|
4726
|
+
defaultFormatting: true,
|
|
4727
|
+
summaryResult: IgxNumberSummaryOperand.min(data)
|
|
4728
|
+
});
|
|
4729
|
+
result.push({
|
|
4730
|
+
key: 'max',
|
|
4731
|
+
label: 'Max',
|
|
4732
|
+
defaultFormatting: true,
|
|
4733
|
+
summaryResult: IgxNumberSummaryOperand.max(data)
|
|
4734
|
+
});
|
|
4735
|
+
result.push({
|
|
4736
|
+
key: 'sum',
|
|
4737
|
+
label: 'Sum',
|
|
4738
|
+
defaultFormatting: true,
|
|
4739
|
+
summaryResult: IgxNumberSummaryOperand.sum(data)
|
|
4740
|
+
});
|
|
4741
|
+
result.push({
|
|
4742
|
+
key: 'average',
|
|
4743
|
+
label: 'Avg',
|
|
4744
|
+
defaultFormatting: true,
|
|
4745
|
+
summaryResult: IgxNumberSummaryOperand.average(data)
|
|
4746
|
+
});
|
|
4747
|
+
return result;
|
|
4748
|
+
}
|
|
4749
|
+
}
|
|
4750
|
+
/* blazorCSSuppress */
|
|
4751
|
+
// @dynamic
|
|
4752
|
+
class IgxDateSummaryOperand extends IgxSummaryOperand {
|
|
4753
|
+
/**
|
|
4754
|
+
* Returns the latest date value in the data records.
|
|
4755
|
+
* If filtering is applied, returns the latest date value in the filtered data records.
|
|
4756
|
+
* ```typescript
|
|
4757
|
+
* IgxDateSummaryOperand.latest(data);
|
|
4758
|
+
* ```
|
|
4759
|
+
*
|
|
4760
|
+
* @memberof IgxDateSummaryOperand
|
|
4761
|
+
*/
|
|
4762
|
+
static latest(data) {
|
|
4763
|
+
return data.length && data.filter(clear).length ?
|
|
4764
|
+
first(data.filter(clear).sort((a, b) => new Date(b).valueOf() - new Date(a).valueOf())) : undefined;
|
|
4765
|
+
}
|
|
4766
|
+
/**
|
|
4767
|
+
* Returns the earliest date value in the data records.
|
|
4768
|
+
* If filtering is applied, returns the latest date value in the filtered data records.
|
|
4769
|
+
* ```typescript
|
|
4770
|
+
* IgxDateSummaryOperand.earliest(data);
|
|
4771
|
+
* ```
|
|
4772
|
+
*
|
|
4773
|
+
* @memberof IgxDateSummaryOperand
|
|
4774
|
+
*/
|
|
4775
|
+
static earliest(data) {
|
|
4776
|
+
return data.length && data.filter(clear).length ?
|
|
4777
|
+
last(data.filter(clear).sort((a, b) => new Date(b).valueOf() - new Date(a).valueOf())) : undefined;
|
|
4778
|
+
}
|
|
4779
|
+
/**
|
|
4780
|
+
* Executes the static methods and returns summary result[]`.
|
|
4781
|
+
* ```typescript
|
|
4782
|
+
* interface IgxSummaryResult {
|
|
4783
|
+
* key: string;
|
|
4784
|
+
* label: string;
|
|
4785
|
+
* summaryResult: any;
|
|
4786
|
+
* }
|
|
4787
|
+
* ```
|
|
4788
|
+
* Can be overridden in the inherited classes to provide customization for the `summary`.
|
|
4789
|
+
* ```typescript
|
|
4790
|
+
* class CustomDateSummary extends IgxDateSummaryOperand {
|
|
4791
|
+
* constructor() {
|
|
4792
|
+
* super();
|
|
4793
|
+
* }
|
|
4794
|
+
* public operate(data: any[], allData: any[], fieldName: string, groupRecord: IGroupByRecord): IgxSummaryResult[] {
|
|
4795
|
+
* const result = super.operate(data, allData, fieldName, groupRecord);
|
|
4796
|
+
* result.push({
|
|
4797
|
+
* key: "deadline",
|
|
4798
|
+
* label: "Deadline Date",
|
|
4799
|
+
* summaryResult: this.calculateDeadline(data);
|
|
4800
|
+
* });
|
|
4801
|
+
* return result;
|
|
4802
|
+
* }
|
|
4803
|
+
* }
|
|
4804
|
+
* this.grid.getColumnByName('ColumnName').summaries = CustomDateSummary;
|
|
4805
|
+
* ```
|
|
4806
|
+
*
|
|
4807
|
+
* @memberof IgxDateSummaryOperand
|
|
4808
|
+
*/
|
|
4809
|
+
operate(data = [], allData = [], fieldName, groupRecord) {
|
|
4810
|
+
const result = super.operate(data, allData, fieldName, groupRecord);
|
|
4811
|
+
result.push({
|
|
4812
|
+
key: 'earliest',
|
|
4813
|
+
label: 'Earliest',
|
|
4814
|
+
defaultFormatting: true,
|
|
4815
|
+
summaryResult: IgxDateSummaryOperand.earliest(data)
|
|
4816
|
+
});
|
|
4817
|
+
result.push({
|
|
4818
|
+
key: 'latest',
|
|
4819
|
+
label: 'Latest',
|
|
4820
|
+
defaultFormatting: true,
|
|
4821
|
+
summaryResult: IgxDateSummaryOperand.latest(data)
|
|
4822
|
+
});
|
|
4823
|
+
return result;
|
|
4824
|
+
}
|
|
4825
|
+
}
|
|
4826
|
+
/* blazorCSSuppress */
|
|
4827
|
+
// @dynamic
|
|
4828
|
+
class IgxTimeSummaryOperand extends IgxSummaryOperand {
|
|
4829
|
+
/**
|
|
4830
|
+
* Returns the latest time value in the data records. Compare only the time part of the date.
|
|
4831
|
+
* If filtering is applied, returns the latest time value in the filtered data records.
|
|
4832
|
+
* ```typescript
|
|
4833
|
+
* IgxTimeSummaryOperand.latestTime(data);
|
|
4834
|
+
* ```
|
|
4835
|
+
*
|
|
4836
|
+
* @memberof IgxTimeSummaryOperand
|
|
4837
|
+
*/
|
|
4838
|
+
static latestTime(data) {
|
|
4839
|
+
return data.length && data.filter(clear).length ?
|
|
4840
|
+
first(data.filter(clear).map(v => new Date(v)).sort((a, b) => new Date().setHours(b.getHours(), b.getMinutes(), b.getSeconds()) -
|
|
4841
|
+
new Date().setHours(a.getHours(), a.getMinutes(), a.getSeconds()))) : undefined;
|
|
4842
|
+
}
|
|
4843
|
+
/**
|
|
4844
|
+
* Returns the earliest time value in the data records. Compare only the time part of the date.
|
|
4845
|
+
* If filtering is applied, returns the earliest time value in the filtered data records.
|
|
4846
|
+
* ```typescript
|
|
4847
|
+
* IgxTimeSummaryOperand.earliestTime(data);
|
|
4848
|
+
* ```
|
|
4849
|
+
*
|
|
4850
|
+
* @memberof IgxTimeSummaryOperand
|
|
4851
|
+
*/
|
|
4852
|
+
static earliestTime(data) {
|
|
4853
|
+
return data.length && data.filter(clear).length ?
|
|
4854
|
+
last(data.filter(clear).map(v => new Date(v)).sort((a, b) => new Date().setHours(b.getHours(), b.getMinutes(), b.getSeconds()) -
|
|
4855
|
+
new Date().setHours(a.getHours(), a.getMinutes(), a.getSeconds()))) : undefined;
|
|
4856
|
+
}
|
|
4857
|
+
/**
|
|
4858
|
+
* @memberof IgxTimeSummaryOperand
|
|
4859
|
+
*/
|
|
4860
|
+
operate(data = [], allData = [], fieldName, groupRecord) {
|
|
4861
|
+
const result = super.operate(data, allData, fieldName, groupRecord);
|
|
4862
|
+
result.push({
|
|
4863
|
+
key: 'earliest',
|
|
4864
|
+
label: 'Earliest',
|
|
4865
|
+
defaultFormatting: true,
|
|
4866
|
+
summaryResult: IgxTimeSummaryOperand.earliestTime(data)
|
|
4867
|
+
});
|
|
4868
|
+
result.push({
|
|
4869
|
+
key: 'latest',
|
|
4870
|
+
label: 'Latest',
|
|
4871
|
+
defaultFormatting: true,
|
|
4872
|
+
summaryResult: IgxTimeSummaryOperand.latestTime(data)
|
|
4873
|
+
});
|
|
4874
|
+
return result;
|
|
4875
|
+
}
|
|
4876
|
+
}
|
|
4877
|
+
|
|
4556
4878
|
/**
|
|
4557
4879
|
* Injection token that allows for retrieving the i18n formatter for the IgniteUI components.
|
|
4558
4880
|
*/
|
|
@@ -4607,8 +4929,8 @@ class BaseFormatter {
|
|
|
4607
4929
|
return null;
|
|
4608
4930
|
}
|
|
4609
4931
|
return {
|
|
4610
|
-
dateStyle,
|
|
4611
|
-
timeStyle
|
|
4932
|
+
dateStyle: dateStyle,
|
|
4933
|
+
timeStyle: timeStyle
|
|
4612
4934
|
};
|
|
4613
4935
|
}
|
|
4614
4936
|
/**
|
|
@@ -5755,7 +6077,7 @@ class IgxOverlayService {
|
|
|
5755
6077
|
scrollStrategy: new NoOpScrollStrategy(),
|
|
5756
6078
|
modal: false,
|
|
5757
6079
|
closeOnOutsideClick: true,
|
|
5758
|
-
outlet
|
|
6080
|
+
outlet: outlet
|
|
5759
6081
|
};
|
|
5760
6082
|
return overlaySettings;
|
|
5761
6083
|
}
|
|
@@ -6371,7 +6693,6 @@ class IgxOverlayService {
|
|
|
6371
6693
|
delete info.closeAnimationPlayer;
|
|
6372
6694
|
delete info.ngZone;
|
|
6373
6695
|
delete info.wrapperElement;
|
|
6374
|
-
info = null;
|
|
6375
6696
|
}
|
|
6376
6697
|
playOpenAnimation(info) {
|
|
6377
6698
|
// if there is opening animation already started do nothing
|
|
@@ -7777,5 +8098,5 @@ const TreeResourceStringsEN = prefixResource(IGX_PREFIX, TreeResourceStringsEN$1
|
|
|
7777
8098
|
* Generated bundle index. Do not edit.
|
|
7778
8099
|
*/
|
|
7779
8100
|
|
|
7780
|
-
export { AbsolutePosition, AbsoluteScrollStrategy, ActionStripResourceStringsEN, AutoPositionStrategy, BannerResourceStringsEN, BaseFilteringStrategy, BaseFitPositionStrategy, BaseFormatter, BlockScrollStrategy, ByLevelTreeGridMergeStrategy, CachedDataCloneStrategy, CalendarDay, CalendarResourceStringsEN, CarouselResourceStringsEN, ChipResourceStringsEN, CloseScrollStrategy, ColumnPinningPosition, ComboResourceStringsEN, ConnectedPositioningStrategy, ContainerPositionStrategy, DEFAULT_LOCALE, DataUtil, DatePart, DatePickerResourceStringsEN, DateRangePickerResourceStringsEN, DateRangeType, DateTimeUtil, DefaultDataCloneStrategy, DefaultMergeStrategy, DefaultSortingStrategy, DefaultTreeGridMergeStrategy, EDITOR_PROVIDER, ELEMENTS_TOKEN, ElasticPositionStrategy, ExpressionsTreeUtil, FilterUtil, FilteringExpressionsTree, FilteringExpressionsTreeType, FilteringLogic, FilteringStrategy, FormattedValuesFilteringStrategy, FormattedValuesSortingStrategy, GlobalPositionStrategy, GridColumnDataType, GridResourceStringsEN, GridSummaryCalculationMode, GroupMemberCountSortingStrategy, GroupedRecords, HorizontalAlignment, I18N_FORMATTER, IgxActionStripActionsToken, IgxActionStripToken, IgxAngularAnimationPlayer, IgxAngularAnimationService, IgxBaseTransactionService, IgxBooleanFilteringOperand, IgxCurrencyFormatterPipe, IgxDataRecordSorting, IgxDateFilteringOperand, IgxDateFormatterPipe, IgxDateTimeFilteringOperand, IgxFilteringOperand, IgxFlatTransactionFactory, IgxGrouping, IgxHierarchicalTransactionFactory, IgxHierarchicalTransactionService, IgxNavigationCloseDirective, IgxNavigationService, IgxNavigationToggleDirective, IgxNumberFilteringOperand, IgxNumberFormatterPipe, IgxOverlayOutletDirective, IgxOverlayService, IgxPercentFormatterPipe, IgxPickerActionsDirective, IgxPickerClearComponent, IgxPickerToggleComponent, IgxSelectionAPIService, IgxSorting, IgxStringFilteringOperand, IgxStylesRegistrar, IgxTimeFilteringOperand, IgxTouchManager, IgxTransactionService, InputResourceStringsEN, IntlFormatter, ListResourceStringsEN, NAVIGATION_KEYS, NoOpScrollStrategy, NoopFilteringStrategy, NoopSortingStrategy, OffsetMode, PaginatorResourceStringsEN, PagingError, PickerCalendarOrientation, PickerHeaderOrientation, PickerInteractionMode, PlatformUtil, Point, QueryBuilderResourceStringsEN, RelativePosition, RelativePositionStrategy, ScrollStrategy, SortingDirection, THEME_TOKEN, ThemeToken, TimePickerResourceStringsEN, TransactionEventOrigin, TransactionType, TreeGridFilteringStrategy, TreeGridFormattedValuesFilteringStrategy, TreeGridMatchingRecordsOnlyFilteringStrategy, TreeResourceStringsEN, Util, VerticalAlignment, WEEKDAYS, areEqualArrays, areSameMonth, calendarRange, changei18n, clamp, cloneArray, cloneHierarchicalArray, cloneValue, cloneValueCached, columnFieldPath, compareMaps, copyDescriptors, daysInWeek, first, flatten, formatToParts, generateMonth, getClosestActiveDate, getComponentCssSizeVar, getComponentSize, getComponentTheme, getCurrentResourceStrings, getHierarchy, getNextActiveDate, getPreviousActiveDate, getResizeObserver, getYearRange, intoChunks, isConstructor, isDate, isDateInRanges, isEqual, isHierarchyMatch, isLeftToRight, isNextMonth, isObject, isPreviousMonth, isTree, last, mergeObjects, modulo, normalizeURI, onResourceChangeHandle, parseDate, provideIgniteIntl, recreateExpression, recreateTree, recreateTreeFromFields, registerI18n, rem, resizeObservable, resolveNestedPath, reverseMapper, runAfterRenderOnce, showMessage, toCalendarDay, trackByIdentity, uniqueDates, Size as ɵSize };
|
|
8101
|
+
export { AbsolutePosition, AbsoluteScrollStrategy, ActionStripResourceStringsEN, AutoPositionStrategy, BannerResourceStringsEN, BaseFilteringStrategy, BaseFitPositionStrategy, BaseFormatter, BlockScrollStrategy, ByLevelTreeGridMergeStrategy, CachedDataCloneStrategy, CalendarDay, CalendarResourceStringsEN, CarouselResourceStringsEN, ChipResourceStringsEN, CloseScrollStrategy, ColumnPinningPosition, ComboResourceStringsEN, ConnectedPositioningStrategy, ContainerPositionStrategy, DEFAULT_LOCALE, DataUtil, DatePart, DatePickerResourceStringsEN, DateRangePickerResourceStringsEN, DateRangeType, DateTimeUtil, DefaultDataCloneStrategy, DefaultMergeStrategy, DefaultSortingStrategy, DefaultTreeGridMergeStrategy, EDITOR_PROVIDER, ELEMENTS_TOKEN, ElasticPositionStrategy, ExpressionsTreeUtil, FilterUtil, FilteringExpressionsTree, FilteringExpressionsTreeType, FilteringLogic, FilteringStrategy, FormattedValuesFilteringStrategy, FormattedValuesSortingStrategy, GlobalPositionStrategy, GridColumnDataType, GridResourceStringsEN, GridSummaryCalculationMode, GroupMemberCountSortingStrategy, GroupedRecords, HorizontalAlignment, I18N_FORMATTER, IgxActionStripActionsToken, IgxActionStripToken, IgxAngularAnimationPlayer, IgxAngularAnimationService, IgxBaseTransactionService, IgxBooleanFilteringOperand, IgxCurrencyFormatterPipe, IgxDataRecordSorting, IgxDateFilteringOperand, IgxDateFormatterPipe, IgxDateSummaryOperand, IgxDateTimeFilteringOperand, IgxFilteringOperand, IgxFlatTransactionFactory, IgxGridTransaction, IgxGrouping, IgxHierarchicalTransactionFactory, IgxHierarchicalTransactionService, IgxNavigationCloseDirective, IgxNavigationService, IgxNavigationToggleDirective, IgxNumberFilteringOperand, IgxNumberFormatterPipe, IgxNumberSummaryOperand, IgxOverlayOutletDirective, IgxOverlayService, IgxPercentFormatterPipe, IgxPickerActionsDirective, IgxPickerClearComponent, IgxPickerToggleComponent, IgxSelectionAPIService, IgxSorting, IgxStringFilteringOperand, IgxStylesRegistrar, IgxSummaryOperand, IgxTimeFilteringOperand, IgxTimeSummaryOperand, IgxTouchManager, IgxTransactionService, InputResourceStringsEN, IntlFormatter, ListResourceStringsEN, NAVIGATION_KEYS, NoOpScrollStrategy, NoopFilteringStrategy, NoopSortingStrategy, OffsetMode, PaginatorResourceStringsEN, PagingError, PickerCalendarOrientation, PickerHeaderOrientation, PickerInteractionMode, PlatformUtil, Point, QueryBuilderResourceStringsEN, RelativePosition, RelativePositionStrategy, ScrollStrategy, SortingDirection, THEME_TOKEN, ThemeToken, TimePickerResourceStringsEN, TransactionEventOrigin, TransactionType, TreeGridFilteringStrategy, TreeGridFormattedValuesFilteringStrategy, TreeGridMatchingRecordsOnlyFilteringStrategy, TreeResourceStringsEN, Util, VerticalAlignment, WEEKDAYS, areEqualArrays, areSameMonth, calendarRange, changei18n, clamp, cloneArray, cloneHierarchicalArray, cloneValue, cloneValueCached, columnFieldPath, compareMaps, copyDescriptors, daysInWeek, first$1 as first, flatten, formatToParts, generateMonth, getClosestActiveDate, getComponentCssSizeVar, getComponentSize, getComponentTheme, getCurrentResourceStrings, getHierarchy, getNextActiveDate, getPreviousActiveDate, getResizeObserver, getYearRange, intoChunks, isConstructor, isDate, isDateInRanges, isEqual, isHierarchyMatch, isLeftToRight, isNextMonth, isObject, isPreviousMonth, isTree, last$1 as last, mergeObjects, modulo, normalizeURI, onResourceChangeHandle, parseDate, provideIgniteIntl, recreateExpression, recreateTree, recreateTreeFromFields, registerI18n, rem, resizeObservable, resolveNestedPath, reverseMapper, runAfterRenderOnce, showMessage, toCalendarDay, trackByIdentity, uniqueDates, Size as ɵSize };
|
|
7781
8102
|
//# sourceMappingURL=igniteui-angular-core.mjs.map
|