igniteui-angular 18.2.24 → 18.2.26
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/esm2022/lib/directives/tooltip/tooltip-target.directive.mjs +9 -8
- package/esm2022/lib/directives/tooltip/tooltip.directive.mjs +20 -1
- package/esm2022/lib/services/excel/excel-files.mjs +5 -3
- package/esm2022/lib/services/exporter-common/base-export-service.mjs +47 -33
- package/fesm2022/igniteui-angular.mjs +79 -44
- package/fesm2022/igniteui-angular.mjs.map +1 -1
- package/lib/core/styles/components/input/_input-group-component.scss +2 -1
- package/lib/core/styles/components/input/_input-group-theme.scss +53 -5
- package/lib/core/styles/components/stepper/_stepper-theme.scss +8 -1
- package/lib/core/styles/components/tabs/_tabs-theme.scss +17 -14
- package/lib/directives/tooltip/tooltip.directive.d.ts +11 -2
- package/lib/services/exporter-common/base-export-service.d.ts +3 -0
- package/package.json +2 -2
- 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
|
@@ -2,7 +2,7 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { Injectable, Directive, Input, HostListener, EventEmitter, InjectionToken, isDevMode, inject, PLATFORM_ID, Inject, ElementRef, ViewContainerRef, createComponent, Output, HostBinding, Self, Optional, booleanAttribute, SecurityContext, DestroyRef, Component, ContentChildren, ContentChild, RendererStyleFlags2, Pipe, ViewChild, LOCALE_ID, forwardRef, Host, QueryList, ViewChildren, TemplateRef, ChangeDetectionStrategy, SimpleChange, SkipSelf, CUSTOM_ELEMENTS_SCHEMA, reflectComponentType, NgModule } from '@angular/core';
|
|
3
3
|
import * as i4 from '@angular/forms';
|
|
4
4
|
import { NgModel, NgControl, FormControlName, NG_VALUE_ACCESSOR, Validators, NG_VALIDATORS, FormGroup, FormsModule, RequiredValidator, MinValidator, MaxValidator, EmailValidator, MinLengthValidator, MaxLengthValidator, PatternValidator, FormControl, ReactiveFormsModule } from '@angular/forms';
|
|
5
|
-
import { Observable, NEVER, Subject, fromEvent, BehaviorSubject, interval, animationFrameScheduler, noop, merge, Subscription, timer, pipe } from 'rxjs';
|
|
5
|
+
import { Observable, NEVER, Subject, fromEvent, BehaviorSubject, interval, animationFrameScheduler, noop, takeUntil as takeUntil$1, merge, Subscription, timer, pipe } from 'rxjs';
|
|
6
6
|
import { takeUntil, filter, throttle, throttleTime, first as first$2, startWith, take, debounce, tap, switchMap, skipLast, debounceTime, map, shareReplay, takeWhile, timeout, pluck } from 'rxjs/operators';
|
|
7
7
|
import { isPlatformBrowser, formatDate as formatDate$1, CurrencyPipe, formatPercent, formatNumber, getLocaleCurrencyCode, DatePipe, getLocaleDateFormat, FormatWidth, getLocaleDateTimeFormat, DOCUMENT, NgIf, NgTemplateOutlet, NgClass, NgSwitch, NgSwitchCase, NgSwitchDefault, NgFor, TitleCasePipe, getLocaleFirstDayOfWeek, NgStyle, getLocaleCurrencySymbol, formatCurrency as formatCurrency$1, getLocaleNumberFormat, NumberFormatStyle, DecimalPipe, PercentPipe, getCurrencySymbol, AsyncPipe } from '@angular/common';
|
|
8
8
|
import { mergeWith, isEqual as isEqual$1 } from 'lodash-es';
|
|
@@ -3000,31 +3000,49 @@ class IgxBaseExporter {
|
|
|
3000
3000
|
if (keys.length === 0) {
|
|
3001
3001
|
return;
|
|
3002
3002
|
}
|
|
3003
|
-
let startIndex = 0;
|
|
3004
|
-
const key = keys[0];
|
|
3005
3003
|
const records = this.flatRecords.map(r => r.data);
|
|
3006
|
-
const groupedRecords =
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
const
|
|
3016
|
-
const
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3004
|
+
const groupedRecords = this.groupByKeys(records, keys);
|
|
3005
|
+
this.createRowDimension(groupedRecords, keys, columnGroupParent);
|
|
3006
|
+
}
|
|
3007
|
+
groupByKeys(items, keys) {
|
|
3008
|
+
const group = (data, groupKeys) => {
|
|
3009
|
+
if (groupKeys.length === 0)
|
|
3010
|
+
return data;
|
|
3011
|
+
const newKeys = [...groupKeys];
|
|
3012
|
+
const key = newKeys.shift().name;
|
|
3013
|
+
const map = new Map();
|
|
3014
|
+
for (const item of data) {
|
|
3015
|
+
const keyValue = item[key];
|
|
3016
|
+
if (!map.has(keyValue)) {
|
|
3017
|
+
map.set(keyValue, []);
|
|
3018
|
+
}
|
|
3019
|
+
map.get(keyValue).push(item);
|
|
3020
|
+
}
|
|
3021
|
+
for (const [keyValue, value] of map) {
|
|
3022
|
+
map.set(keyValue, group(value, newKeys));
|
|
3023
|
+
}
|
|
3024
|
+
return map;
|
|
3025
|
+
};
|
|
3026
|
+
return group(items, keys);
|
|
3027
|
+
}
|
|
3028
|
+
calculateRowSpan(value) {
|
|
3029
|
+
if (value instanceof Map) {
|
|
3030
|
+
return Array.from(value.values()).reduce((total, current) => total + this.calculateRowSpan(current), 0);
|
|
3024
3031
|
}
|
|
3025
|
-
|
|
3032
|
+
else if (Array.isArray(value)) {
|
|
3033
|
+
return value.length;
|
|
3034
|
+
}
|
|
3035
|
+
return 0;
|
|
3036
|
+
}
|
|
3037
|
+
createRowDimension(node, keys, columnGroupParent) {
|
|
3038
|
+
if (!(node instanceof Map))
|
|
3039
|
+
return;
|
|
3040
|
+
const key = keys[0];
|
|
3041
|
+
const newKeys = keys.filter(k => k.level > key.level);
|
|
3042
|
+
let startIndex = 0;
|
|
3043
|
+
for (const k of node.keys()) {
|
|
3026
3044
|
let groupKey = k;
|
|
3027
|
-
const rowSpan =
|
|
3045
|
+
const rowSpan = this.calculateRowSpan(node.get(k));
|
|
3028
3046
|
const rowDimensionColumn = {
|
|
3029
3047
|
columnSpan: 1,
|
|
3030
3048
|
rowSpan,
|
|
@@ -3035,30 +3053,26 @@ class IgxBaseExporter {
|
|
|
3035
3053
|
pinnedIndex: 0,
|
|
3036
3054
|
level: key.level,
|
|
3037
3055
|
dataType: 'string',
|
|
3038
|
-
headerType:
|
|
3056
|
+
headerType: rowSpan > 1 ? ExportHeaderType.MultiRowHeader : ExportHeaderType.RowHeader,
|
|
3039
3057
|
};
|
|
3040
|
-
if (groupKey
|
|
3041
|
-
this.pivotGridColumns
|
|
3058
|
+
if (!groupKey) {
|
|
3059
|
+
// if (this.pivotGridColumns?.length)
|
|
3060
|
+
// this.pivotGridColumns[this.pivotGridColumns.length - 1].columnSpan += 1;
|
|
3042
3061
|
rowDimensionColumn.headerType = ExportHeaderType.PivotMergedHeader;
|
|
3043
3062
|
groupKey = columnGroupParent;
|
|
3044
3063
|
}
|
|
3045
|
-
if (
|
|
3064
|
+
if (key.level > 0) {
|
|
3046
3065
|
rowDimensionColumn.columnGroupParent = columnGroupParent;
|
|
3047
3066
|
}
|
|
3048
3067
|
else {
|
|
3049
3068
|
rowDimensionColumn.columnGroup = groupKey;
|
|
3050
3069
|
}
|
|
3051
3070
|
this.pivotGridColumns.push(rowDimensionColumn);
|
|
3052
|
-
if (keys.length > 1) {
|
|
3053
|
-
if (groupKey !== columnGroupParent) {
|
|
3054
|
-
this.pivotGridKeyValueMap.set(key.name, groupKey);
|
|
3055
|
-
}
|
|
3056
|
-
const newKeys = keys.filter(kdd => kdd !== key);
|
|
3057
|
-
this.preparePivotGridColumns(newKeys, groupKey);
|
|
3058
|
-
this.pivotGridKeyValueMap.delete(key.name);
|
|
3059
|
-
}
|
|
3060
3071
|
startIndex += rowSpan;
|
|
3061
3072
|
}
|
|
3073
|
+
for (const k of node.keys()) {
|
|
3074
|
+
this.createRowDimension(node.get(k), newKeys, columnGroupParent);
|
|
3075
|
+
}
|
|
3062
3076
|
}
|
|
3063
3077
|
addLevelColumns() {
|
|
3064
3078
|
if (this.options.exportSummaries && this.summaries.size > 0) {
|
|
@@ -4166,7 +4180,7 @@ class WorksheetFile {
|
|
|
4166
4180
|
: owner.maxLevel;
|
|
4167
4181
|
for (const currentCol of headersForLevel) {
|
|
4168
4182
|
const spanLength = isVertical ? currentCol.rowSpan : currentCol.columnSpan;
|
|
4169
|
-
if (currentCol.level === i
|
|
4183
|
+
if (currentCol.level === i) {
|
|
4170
4184
|
let columnCoordinate;
|
|
4171
4185
|
const column = isVertical
|
|
4172
4186
|
? this.rowIndex
|
|
@@ -4177,7 +4191,9 @@ class WorksheetFile {
|
|
|
4177
4191
|
if (currentCol.headerType === ExportHeaderType.PivotRowHeader) {
|
|
4178
4192
|
rowCoordinate = startValue + 1;
|
|
4179
4193
|
}
|
|
4180
|
-
const columnValue =
|
|
4194
|
+
const columnValue = currentCol.headerType === ExportHeaderType.PivotMergedHeader ?
|
|
4195
|
+
dictionary.saveValue(currentCol.field, true, true) :
|
|
4196
|
+
dictionary.saveValue(currentCol.header, true, false);
|
|
4181
4197
|
columnCoordinate = (currentCol.field === GRID_LEVEL_COL
|
|
4182
4198
|
? ExcelStrings.getExcelColumn(worksheetData.columnCount + 1)
|
|
4183
4199
|
: ExcelStrings.getExcelColumn(column)) + rowCoordinate;
|
|
@@ -19298,6 +19314,21 @@ class IgxTooltipDirective extends IgxToggleDirective {
|
|
|
19298
19314
|
* Returns whether open time out has started
|
|
19299
19315
|
*/
|
|
19300
19316
|
this.toBeShown = false;
|
|
19317
|
+
this._destroy$ = new Subject();
|
|
19318
|
+
this.onDocumentTouchStart = this.onDocumentTouchStart.bind(this);
|
|
19319
|
+
this.overlayService.opening.pipe(takeUntil$1(this._destroy$)).subscribe(() => {
|
|
19320
|
+
document.addEventListener('touchstart', this.onDocumentTouchStart, { passive: true });
|
|
19321
|
+
});
|
|
19322
|
+
this.overlayService.closed.pipe(takeUntil$1(this._destroy$)).subscribe(() => {
|
|
19323
|
+
document.removeEventListener('touchstart', this.onDocumentTouchStart);
|
|
19324
|
+
});
|
|
19325
|
+
}
|
|
19326
|
+
/** @hidden */
|
|
19327
|
+
ngOnDestroy() {
|
|
19328
|
+
super.ngOnDestroy();
|
|
19329
|
+
document.removeEventListener('touchstart', this.onDocumentTouchStart);
|
|
19330
|
+
this._destroy$.next(true);
|
|
19331
|
+
this._destroy$.complete();
|
|
19301
19332
|
}
|
|
19302
19333
|
/**
|
|
19303
19334
|
* If there is open animation in progress this method will finish is.
|
|
@@ -19341,6 +19372,9 @@ class IgxTooltipDirective extends IgxToggleDirective {
|
|
|
19341
19372
|
overlaySettings.positionStrategy.settings.closeAnimation = animation;
|
|
19342
19373
|
}
|
|
19343
19374
|
}
|
|
19375
|
+
onDocumentTouchStart(event) {
|
|
19376
|
+
this.tooltipTarget?.onDocumentTouchStart(event);
|
|
19377
|
+
}
|
|
19344
19378
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: IgxTooltipDirective, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: IgxOverlayService }, { token: IgxNavigationService, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
19345
19379
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.4", type: IgxTooltipDirective, isStandalone: true, selector: "[igxTooltip]", inputs: { context: "context", id: "id" }, host: { properties: { "class.igx-tooltip--hidden": "this.hiddenClass", "class.igx-tooltip": "this.defaultClass", "attr.id": "this.id", "attr.role": "this.role" } }, exportAs: ["tooltip"], usesInheritance: true, ngImport: i0 }); }
|
|
19346
19380
|
}
|
|
@@ -19555,6 +19589,7 @@ class IgxTooltipTargetDirective extends IgxToggleActionDirective {
|
|
|
19555
19589
|
if (shouldReturn) {
|
|
19556
19590
|
return;
|
|
19557
19591
|
}
|
|
19592
|
+
this.target.tooltipTarget = this;
|
|
19558
19593
|
const showingArgs = { target: this, tooltip: this.target, cancel: false };
|
|
19559
19594
|
this.tooltipShow.emit(showingArgs);
|
|
19560
19595
|
if (showingArgs.cancel) {
|
|
@@ -19620,18 +19655,23 @@ class IgxTooltipTargetDirective extends IgxToggleActionDirective {
|
|
|
19620
19655
|
this._overlayDefaults.closeOnOutsideClick = false;
|
|
19621
19656
|
this._overlayDefaults.closeOnEscape = true;
|
|
19622
19657
|
this.target.closing.pipe(takeUntil(this.destroy$)).subscribe((event) => {
|
|
19658
|
+
if (this.target.tooltipTarget !== this) {
|
|
19659
|
+
return;
|
|
19660
|
+
}
|
|
19623
19661
|
const hidingArgs = { target: this, tooltip: this.target, cancel: false };
|
|
19624
19662
|
this.tooltipHide.emit(hidingArgs);
|
|
19625
19663
|
if (hidingArgs.cancel) {
|
|
19626
19664
|
event.cancel = true;
|
|
19627
19665
|
}
|
|
19628
19666
|
});
|
|
19667
|
+
this.nativeElement.addEventListener('touchstart', this.onTouchStart = this.onTouchStart.bind(this), { passive: true });
|
|
19629
19668
|
}
|
|
19630
19669
|
/**
|
|
19631
19670
|
* @hidden
|
|
19632
19671
|
*/
|
|
19633
19672
|
ngOnDestroy() {
|
|
19634
19673
|
this.hideTooltip();
|
|
19674
|
+
this.nativeElement.removeEventListener('touchstart', this.onTouchStart);
|
|
19635
19675
|
this.destroy$.next();
|
|
19636
19676
|
this.destroy$.complete();
|
|
19637
19677
|
}
|
|
@@ -19649,6 +19689,7 @@ class IgxTooltipTargetDirective extends IgxToggleActionDirective {
|
|
|
19649
19689
|
this.target.forceClose(this.mergedOverlaySettings);
|
|
19650
19690
|
this.target.toBeHidden = false;
|
|
19651
19691
|
}
|
|
19692
|
+
this.target.tooltipTarget = this;
|
|
19652
19693
|
const showingArgs = { target: this, tooltip: this.target, cancel: false };
|
|
19653
19694
|
this.tooltipShow.emit(showingArgs);
|
|
19654
19695
|
if (showingArgs.cancel) {
|
|
@@ -19716,7 +19757,7 @@ class IgxTooltipTargetDirective extends IgxToggleActionDirective {
|
|
|
19716
19757
|
return false;
|
|
19717
19758
|
}
|
|
19718
19759
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: IgxTooltipTargetDirective, deps: [{ token: i0.ElementRef }, { token: IgxNavigationService, optional: true }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
19719
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.2.4", type: IgxTooltipTargetDirective, isStandalone: true, selector: "[igxTooltipTarget]", inputs: { showDelay: "showDelay", hideDelay: "hideDelay", tooltipDisabled: ["tooltipDisabled", "tooltipDisabled", booleanAttribute], target: ["igxTooltipTarget", "target"], tooltip: "tooltip" }, outputs: { tooltipShow: "tooltipShow", tooltipHide: "tooltipHide" }, host: { listeners: { "click": "onClick()", "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave()"
|
|
19760
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.2.4", type: IgxTooltipTargetDirective, isStandalone: true, selector: "[igxTooltipTarget]", inputs: { showDelay: "showDelay", hideDelay: "hideDelay", tooltipDisabled: ["tooltipDisabled", "tooltipDisabled", booleanAttribute], target: ["igxTooltipTarget", "target"], tooltip: "tooltip" }, outputs: { tooltipShow: "tooltipShow", tooltipHide: "tooltipHide" }, host: { listeners: { "click": "onClick()", "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave()" } }, exportAs: ["tooltipTarget"], usesInheritance: true, ngImport: i0 }); }
|
|
19720
19761
|
}
|
|
19721
19762
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: IgxTooltipTargetDirective, decorators: [{
|
|
19722
19763
|
type: Directive,
|
|
@@ -19754,12 +19795,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImpor
|
|
|
19754
19795
|
}], onMouseLeave: [{
|
|
19755
19796
|
type: HostListener,
|
|
19756
19797
|
args: ['mouseleave']
|
|
19757
|
-
}], onTouchStart: [{
|
|
19758
|
-
type: HostListener,
|
|
19759
|
-
args: ['touchstart']
|
|
19760
|
-
}], onDocumentTouchStart: [{
|
|
19761
|
-
type: HostListener,
|
|
19762
|
-
args: ['document:touchstart', ['$event']]
|
|
19763
19798
|
}] } });
|
|
19764
19799
|
|
|
19765
19800
|
/* NOTE: Tooltip directives collection for ease-of-use import in standalone components scenario */
|