@skyux/ag-grid 11.36.2 → 11.38.0
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/css/sky-ag-grid.css +12 -0
- package/documentation.json +697 -640
- package/esm2022/lib/modules/ag-grid/ag-grid-row-delete.directive.mjs +26 -36
- package/esm2022/lib/modules/ag-grid/ag-grid-wrapper.component.mjs +13 -4
- package/esm2022/lib/modules/ag-grid/cell-editors/cell-editor-autocomplete/cell-editor-autocomplete.component.mjs +13 -5
- package/esm2022/lib/modules/ag-grid/cell-editors/cell-editor-currency/cell-editor-currency.component.mjs +13 -3
- package/esm2022/lib/modules/ag-grid/cell-editors/cell-editor-lookup/cell-editor-lookup.component.mjs +13 -5
- package/esm2022/lib/modules/ag-grid/cell-editors/cell-editor-number/cell-editor-number.component.mjs +22 -8
- package/esm2022/lib/modules/ag-grid/cell-editors/cell-editor-text/cell-editor-text.component.mjs +14 -3
- package/fesm2022/skyux-ag-grid.mjs +103 -53
- package/fesm2022/skyux-ag-grid.mjs.map +1 -1
- package/lib/modules/ag-grid/ag-grid-row-delete.directive.d.ts +1 -1
- package/lib/modules/ag-grid/ag-grid-wrapper.component.d.ts +6 -1
- package/lib/modules/ag-grid/cell-editors/cell-editor-autocomplete/cell-editor-autocomplete.component.d.ts +1 -1
- package/lib/modules/ag-grid/cell-editors/cell-editor-currency/cell-editor-currency.component.d.ts +1 -0
- package/lib/modules/ag-grid/cell-editors/cell-editor-lookup/cell-editor-lookup.component.d.ts +1 -1
- package/lib/modules/ag-grid/cell-editors/cell-editor-number/cell-editor-number.component.d.ts +1 -0
- package/lib/modules/ag-grid/cell-editors/cell-editor-text/cell-editor-text.component.d.ts +1 -0
- package/package.json +13 -13
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i1$1 from '@angular/common';
|
|
2
2
|
import { DOCUMENT, CommonModule, AsyncPipe, NgTemplateOutlet } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { NgModule, Injectable, inject, ChangeDetectorRef, ElementRef, booleanAttribute, Component, ChangeDetectionStrategy, ContentChild, HostBinding, Input, contentChildren, effect, Directive, TemplateRef, ViewChildren, ViewChild, EventEmitter, EnvironmentInjector, ViewContainerRef, Output, HostListener, ViewEncapsulation,
|
|
4
|
+
import { NgModule, Injectable, input, numberAttribute, computed, inject, ChangeDetectorRef, ElementRef, booleanAttribute, Component, ChangeDetectionStrategy, ContentChild, HostBinding, Input, contentChildren, effect, Directive, TemplateRef, ViewChildren, ViewChild, EventEmitter, contentChild, EnvironmentInjector, ViewContainerRef, Output, HostListener, ViewEncapsulation, signal, Optional } from '@angular/core';
|
|
5
5
|
import * as i1 from '@skyux/core';
|
|
6
6
|
import { SkyMutationObserverService, SkyMediaQueryService, SkyAffixService, SkyDynamicComponentService, SkyOverlayService, SkyScrollableHostService, SKY_STACKING_CONTEXT, SkyAffixAutoFitContext, SkyIdModule, SkyNumericModule, SkyDynamicComponentLocation, SkyViewkeeperModule, SkyLogService } from '@skyux/core';
|
|
7
7
|
import * as i1$2 from '@skyux/data-manager';
|
|
@@ -18,7 +18,7 @@ import { AgGridAngular, AgGridModule } from 'ag-grid-angular';
|
|
|
18
18
|
import * as i3 from '@skyux/i18n';
|
|
19
19
|
import { SkyLibResourcesService, SkyI18nModule } from '@skyux/i18n';
|
|
20
20
|
import { toSignal } from '@angular/core/rxjs-interop';
|
|
21
|
-
import { Subject, BehaviorSubject, ReplaySubject, takeUntil, combineLatest, distinctUntilChanged, of, take, fromEvent, Subscription, fromEventPattern, isObservable } from 'rxjs';
|
|
21
|
+
import { Subject, BehaviorSubject, ReplaySubject, takeUntil, combineLatest, distinctUntilChanged, of, take, merge, debounce, animationFrames, fromEvent, Subscription, fromEventPattern, isObservable } from 'rxjs';
|
|
22
22
|
import { takeUntil as takeUntil$1, filter, first } from 'rxjs/operators';
|
|
23
23
|
import { ModuleRegistry, ModuleNames, KeyCode, PopupComponent } from 'ag-grid-community';
|
|
24
24
|
import * as i1$3 from '@angular/forms';
|
|
@@ -334,6 +334,15 @@ class SkyAgGridWrapperComponent {
|
|
|
334
334
|
#hasEditableClass;
|
|
335
335
|
constructor() {
|
|
336
336
|
this.isNormalLayout = false;
|
|
337
|
+
/**
|
|
338
|
+
* The minimum height of the grid in pixels. The default value is `50`.
|
|
339
|
+
*/
|
|
340
|
+
this.minHeight = input(50, {
|
|
341
|
+
transform: numberAttribute,
|
|
342
|
+
});
|
|
343
|
+
this.minHeightStyle = computed(() => {
|
|
344
|
+
return `--sky-ag-grid-min-height: ${this.minHeight()}px;`;
|
|
345
|
+
});
|
|
337
346
|
this.#_viewkeeperClasses = [];
|
|
338
347
|
this.#ngUnsubscribe = new Subject();
|
|
339
348
|
this.#themeSvc = inject(SkyThemeService, {
|
|
@@ -548,11 +557,11 @@ class SkyAgGridWrapperComponent {
|
|
|
548
557
|
}
|
|
549
558
|
}
|
|
550
559
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SkyAgGridWrapperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
551
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
560
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.13", type: SkyAgGridWrapperComponent, selector: "sky-ag-grid-wrapper", inputs: { compact: { classPropertyName: "compact", publicName: "compact", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, minHeight: { classPropertyName: "minHeight", publicName: "minHeight", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.sky-ag-grid-layout-normal": "this.isNormalLayout" } }, queries: [{ propertyName: "agGrid", first: true, predicate: AgGridAngular, descendants: true, static: true }], ngImport: i0, template: "<span\n class=\"nav-anchor\"\n tabindex=\"0\"\n [id]=\"beforeAnchorId\"\n (focusin)=\"onAnchorFocus($event)\"\n>\n</span>\n<div\n class=\"sky-ag-grid\"\n tabindex=\"0\"\n [class.sky-ag-grid-top-scrollbar]=\"\n agGrid?.gridOptions?.context &&\n agGrid?.gridOptions?.context['enableTopScroll']\n \"\n [ngClass]=\"wrapperClasses$ | async\"\n [id]=\"gridId\"\n [skyViewkeeper]=\"viewkeeperClasses\"\n [style]=\"minHeightStyle()\"\n (keydown)=\"onGridKeydown($event)\"\n (keyup.escape)=\"onKeyUpEscape($event)\"\n>\n <ng-content />\n</div>\n<span\n tabindex=\"0\"\n class=\"nav-anchor\"\n [id]=\"afterAnchorId\"\n (focusin)=\"onAnchorFocus($event)\"\n>\n</span>\n", dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.λ3, selector: "[skyViewkeeper]", inputs: ["skyViewkeeper"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
552
561
|
}
|
|
553
562
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SkyAgGridWrapperComponent, decorators: [{
|
|
554
563
|
type: Component,
|
|
555
|
-
args: [{ selector: 'sky-ag-grid-wrapper', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span\n class=\"nav-anchor\"\n tabindex=\"0\"\n [id]=\"beforeAnchorId\"\n (focusin)=\"onAnchorFocus($event)\"\n>\n</span>\n<div\n class=\"sky-ag-grid\"\n tabindex=\"0\"\n [class.sky-ag-grid-top-scrollbar]=\"\n agGrid?.gridOptions?.context &&\n agGrid?.gridOptions?.context['enableTopScroll']\n \"\n [ngClass]=\"wrapperClasses$ | async\"\n [id]=\"gridId\"\n [skyViewkeeper]=\"viewkeeperClasses\"\n (keydown)=\"onGridKeydown($event)\"\n (keyup.escape)=\"onKeyUpEscape($event)\"\n>\n <ng-content />\n</div>\n<span\n tabindex=\"0\"\n class=\"nav-anchor\"\n [id]=\"afterAnchorId\"\n (focusin)=\"onAnchorFocus($event)\"\n>\n</span>\n" }]
|
|
564
|
+
args: [{ selector: 'sky-ag-grid-wrapper', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span\n class=\"nav-anchor\"\n tabindex=\"0\"\n [id]=\"beforeAnchorId\"\n (focusin)=\"onAnchorFocus($event)\"\n>\n</span>\n<div\n class=\"sky-ag-grid\"\n tabindex=\"0\"\n [class.sky-ag-grid-top-scrollbar]=\"\n agGrid?.gridOptions?.context &&\n agGrid?.gridOptions?.context['enableTopScroll']\n \"\n [ngClass]=\"wrapperClasses$ | async\"\n [id]=\"gridId\"\n [skyViewkeeper]=\"viewkeeperClasses\"\n [style]=\"minHeightStyle()\"\n (keydown)=\"onGridKeydown($event)\"\n (keyup.escape)=\"onKeyUpEscape($event)\"\n>\n <ng-content />\n</div>\n<span\n tabindex=\"0\"\n class=\"nav-anchor\"\n [id]=\"afterAnchorId\"\n (focusin)=\"onAnchorFocus($event)\"\n>\n</span>\n" }]
|
|
556
565
|
}], ctorParameters: () => [], propDecorators: { agGrid: [{
|
|
557
566
|
type: ContentChild,
|
|
558
567
|
args: [AgGridAngular, {
|
|
@@ -973,7 +982,7 @@ class SkyAgGridRowDeleteDirective {
|
|
|
973
982
|
});
|
|
974
983
|
if (this.#rowDeleteComponent.inlineDeleteTemplateRef) {
|
|
975
984
|
overlay.attachTemplate(this.#rowDeleteComponent.inlineDeleteTemplateRef, {
|
|
976
|
-
$implicit: this.agGrid
|
|
985
|
+
$implicit: this.agGrid()?.api.getRowNode(id),
|
|
977
986
|
tableWidth: () => this.#elementRef.nativeElement.querySelector('.sky-ag-grid')
|
|
978
987
|
.offsetWidth,
|
|
979
988
|
getRowDeleteItem: (row) => this.getRowDeleteItem(row),
|
|
@@ -1037,6 +1046,7 @@ class SkyAgGridRowDeleteDirective {
|
|
|
1037
1046
|
#scrollableHostService;
|
|
1038
1047
|
#stackingContext;
|
|
1039
1048
|
#viewContainerRef;
|
|
1049
|
+
#viewInit;
|
|
1040
1050
|
constructor() {
|
|
1041
1051
|
/**
|
|
1042
1052
|
* Emits a `SkyAgGridRowDeleteCancelArgs` object when a row's inline delete is cancelled.
|
|
@@ -1051,6 +1061,7 @@ class SkyAgGridRowDeleteDirective {
|
|
|
1051
1061
|
*/
|
|
1052
1062
|
this.rowDeleteIdsChange = new EventEmitter();
|
|
1053
1063
|
this.#rowDeleteConfigs = [];
|
|
1064
|
+
this.agGrid = contentChild(AgGridAngular);
|
|
1054
1065
|
this.#ngUnsubscribe = new Subject();
|
|
1055
1066
|
this.#rowDeleteContents = {};
|
|
1056
1067
|
this.#clipPath = new BehaviorSubject(undefined);
|
|
@@ -1064,6 +1075,7 @@ class SkyAgGridRowDeleteDirective {
|
|
|
1064
1075
|
this.#scrollableHostService = inject(SkyScrollableHostService);
|
|
1065
1076
|
this.#stackingContext = inject(SKY_STACKING_CONTEXT, { optional: true });
|
|
1066
1077
|
this.#viewContainerRef = inject(ViewContainerRef);
|
|
1078
|
+
this.#viewInit = new Subject();
|
|
1067
1079
|
this.#hasStackingContext = !!this.#stackingContext;
|
|
1068
1080
|
if (this.#stackingContext) {
|
|
1069
1081
|
this.#stackingContext.zIndex
|
|
@@ -1072,29 +1084,22 @@ class SkyAgGridRowDeleteDirective {
|
|
|
1072
1084
|
this.#zIndex.next(zIndex);
|
|
1073
1085
|
});
|
|
1074
1086
|
}
|
|
1087
|
+
effect(() => {
|
|
1088
|
+
const agGrid = this.agGrid();
|
|
1089
|
+
if (agGrid) {
|
|
1090
|
+
merge(agGrid.filterChanged, agGrid.firstDataRendered, agGrid.gridReady, agGrid.rowDataUpdated, agGrid.sortChanged, this.#viewInit)
|
|
1091
|
+
.pipe(takeUntil$1(this.#ngUnsubscribe), debounce(() => animationFrames()))
|
|
1092
|
+
.subscribe(() => {
|
|
1093
|
+
this.#updateRowDeleteStates();
|
|
1094
|
+
});
|
|
1095
|
+
}
|
|
1096
|
+
});
|
|
1075
1097
|
}
|
|
1076
1098
|
ngAfterContentInit() {
|
|
1077
1099
|
this.#rowDeleteComponent = this.#dynamicComponentSvc.createComponent(SkyAgGridRowDeleteComponent, {
|
|
1078
1100
|
environmentInjector: this.#environmentInjector,
|
|
1079
1101
|
viewContainerRef: this.#viewContainerRef,
|
|
1080
1102
|
}).instance;
|
|
1081
|
-
if (this.agGrid) {
|
|
1082
|
-
this.agGrid.rowDataUpdated
|
|
1083
|
-
.pipe(takeUntil$1(this.#ngUnsubscribe))
|
|
1084
|
-
.subscribe(() => {
|
|
1085
|
-
this.#updateRowDeleteStates();
|
|
1086
|
-
});
|
|
1087
|
-
this.agGrid.sortChanged
|
|
1088
|
-
.pipe(takeUntil$1(this.#ngUnsubscribe))
|
|
1089
|
-
.subscribe(() => {
|
|
1090
|
-
this.#updateRowDeleteStates();
|
|
1091
|
-
});
|
|
1092
|
-
this.agGrid.filterChanged
|
|
1093
|
-
.pipe(takeUntil$1(this.#ngUnsubscribe))
|
|
1094
|
-
.subscribe(() => {
|
|
1095
|
-
this.#updateRowDeleteStates();
|
|
1096
|
-
});
|
|
1097
|
-
}
|
|
1098
1103
|
}
|
|
1099
1104
|
ngAfterViewInit() {
|
|
1100
1105
|
if (this.#hasStackingContext) {
|
|
@@ -1105,6 +1110,7 @@ class SkyAgGridRowDeleteDirective {
|
|
|
1105
1110
|
this.#clipPath.next(clipPath);
|
|
1106
1111
|
});
|
|
1107
1112
|
}
|
|
1113
|
+
this.#viewInit.next();
|
|
1108
1114
|
}
|
|
1109
1115
|
ngOnDestroy() {
|
|
1110
1116
|
this.#ngUnsubscribe.next();
|
|
@@ -1148,20 +1154,16 @@ class SkyAgGridRowDeleteDirective {
|
|
|
1148
1154
|
}
|
|
1149
1155
|
#destroyRowDelete(id) {
|
|
1150
1156
|
const rowDeleteContents = this.#rowDeleteContents[id];
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
this.#rowDeleteConfigs = this.#rowDeleteConfigs.filter((config) => config.id !== id);
|
|
1158
|
-
this.#rowDeleteIdsInternal = this.rowDeleteIds?.filter((arrayId) => arrayId !== id);
|
|
1159
|
-
this.rowDeleteIdsChange.emit(this.#rowDeleteIdsInternal);
|
|
1160
|
-
}
|
|
1157
|
+
rowDeleteContents?.affixer.destroy();
|
|
1158
|
+
this.#overlayService.close(rowDeleteContents?.overlay);
|
|
1159
|
+
delete this.#rowDeleteContents[id];
|
|
1160
|
+
this.#rowDeleteConfigs = this.#rowDeleteConfigs.filter((config) => config.id !== id);
|
|
1161
|
+
this.#rowDeleteIdsInternal = this.rowDeleteIds?.filter((arrayId) => arrayId !== id);
|
|
1162
|
+
this.rowDeleteIdsChange.emit(this.#rowDeleteIdsInternal);
|
|
1161
1163
|
}
|
|
1162
1164
|
#updateRowDeleteStates() {
|
|
1163
1165
|
this.#rowDeleteConfigs.forEach((config) => {
|
|
1164
|
-
if (!this.agGrid?.api.getRowNode(config.id)) {
|
|
1166
|
+
if (!this.agGrid()?.api.getRowNode(config.id)) {
|
|
1165
1167
|
this.#destroyRowDelete(config.id);
|
|
1166
1168
|
}
|
|
1167
1169
|
else {
|
|
@@ -1173,7 +1175,7 @@ class SkyAgGridRowDeleteDirective {
|
|
|
1173
1175
|
this.#changeDetector.markForCheck();
|
|
1174
1176
|
}
|
|
1175
1177
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SkyAgGridRowDeleteDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1176
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
1178
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "18.2.13", type: SkyAgGridRowDeleteDirective, selector: "[skyAgGridRowDelete]", inputs: { rowDeleteIds: "rowDeleteIds" }, outputs: { rowDeleteCancel: "rowDeleteCancel", rowDeleteConfirm: "rowDeleteConfirm", rowDeleteIdsChange: "rowDeleteIdsChange" }, queries: [{ propertyName: "agGrid", first: true, predicate: AgGridAngular, descendants: true, isSignal: true }], ngImport: i0 }); }
|
|
1177
1179
|
}
|
|
1178
1180
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SkyAgGridRowDeleteDirective, decorators: [{
|
|
1179
1181
|
type: Directive,
|
|
@@ -1188,9 +1190,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
1188
1190
|
type: Output
|
|
1189
1191
|
}], rowDeleteIdsChange: [{
|
|
1190
1192
|
type: Output
|
|
1191
|
-
}], agGrid: [{
|
|
1192
|
-
type: ContentChild,
|
|
1193
|
-
args: [AgGridAngular]
|
|
1194
1193
|
}] } });
|
|
1195
1194
|
|
|
1196
1195
|
/** The initial action that a cell editor should take when initialized. */
|
|
@@ -1256,8 +1255,16 @@ class SkyAgGridCellEditorAutocompleteComponent {
|
|
|
1256
1255
|
#triggerType;
|
|
1257
1256
|
#params;
|
|
1258
1257
|
#elementRef;
|
|
1259
|
-
onBlur() {
|
|
1260
|
-
|
|
1258
|
+
onBlur(event) {
|
|
1259
|
+
if (event.relatedTarget &&
|
|
1260
|
+
event.relatedTarget === this.#params?.eGridCell) {
|
|
1261
|
+
// If focus is being set to the grid cell, schedule focus on the input.
|
|
1262
|
+
// This happens when the refreshCells API is called.
|
|
1263
|
+
this.afterGuiAttached();
|
|
1264
|
+
}
|
|
1265
|
+
else {
|
|
1266
|
+
this.#stopEditingOnBlur();
|
|
1267
|
+
}
|
|
1261
1268
|
}
|
|
1262
1269
|
agInit(params) {
|
|
1263
1270
|
this.#params = params;
|
|
@@ -1315,7 +1322,7 @@ class SkyAgGridCellEditorAutocompleteComponent {
|
|
|
1315
1322
|
}
|
|
1316
1323
|
}
|
|
1317
1324
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SkyAgGridCellEditorAutocompleteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1318
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SkyAgGridCellEditorAutocompleteComponent, selector: "sky-ag-grid-cell-editor-autocomplete", host: { listeners: { "
|
|
1325
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SkyAgGridCellEditorAutocompleteComponent, selector: "sky-ag-grid-cell-editor-autocomplete", host: { listeners: { "focusout": "onBlur($event)" } }, viewQueries: [{ propertyName: "input", first: true, predicate: ["skyCellEditorAutocomplete"], descendants: true, read: ElementRef }], ngImport: i0, template: "<div class=\"sky-ag-grid-cell-editor-autocomplete\" [formGroup]=\"editorForm\">\n <sky-autocomplete\n [data]=\"skyComponentProperties.data\"\n [debounceTime]=\"skyComponentProperties.debounceTime\"\n [descriptorProperty]=\"skyComponentProperties.descriptorProperty\"\n [propertiesToSearch]=\"skyComponentProperties.propertiesToSearch\"\n [search]=\"skyComponentProperties.search\"\n [searchFilters]=\"skyComponentProperties.searchFilters\"\n [searchResultsLimit]=\"skyComponentProperties.searchResultsLimit\"\n [searchResultTemplate]=\"skyComponentProperties.searchResultTemplate\"\n [searchTextMinimumCharacters]=\"\n skyComponentProperties.searchTextMinimumCharacters\n \"\n (selectionChange)=\"\n skyComponentProperties.selectionChange &&\n skyComponentProperties.selectionChange($event)\n \"\n (openChange)=\"onAutocompleteOpenChange($event)\"\n >\n <input\n #skyCellEditorAutocomplete\n formControlName=\"selection\"\n skyAutocomplete\n type=\"text\"\n [attr.aria-label]=\"\n 'sky_ag_grid_cell_editor_autocomplete_aria_label'\n | skyLibResources: columnHeader : rowNumber\n \"\n />\n </sky-autocomplete>\n</div>\n", styles: ["sky-autocomplete input{border:none;box-shadow:none}\n"], dependencies: [{ kind: "directive", type: i1$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i2$1.λ2, selector: "sky-autocomplete", inputs: ["ariaLabelledBy", "data", "debounceTime", "descriptorProperty", "enableShowMore", "messageStream", "wrapperClass", "propertiesToSearch", "search", "searchResultTemplate", "searchTextMinimumCharacters", "searchFilters", "searchResultsLimit", "showAddButton", "noResultsFoundText", "searchAsyncDisabled"], outputs: ["addClick", "showMoreClick", "selectionChange", "searchAsync", "openChange"] }, { kind: "directive", type: i2$1.λ1, selector: "input[skyAutocomplete], textarea[skyAutocomplete]", inputs: ["autocompleteAttribute", "disabled"] }, { kind: "pipe", type: i3.SkyLibResourcesPipe, name: "skyLibResources" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1319
1326
|
}
|
|
1320
1327
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SkyAgGridCellEditorAutocompleteComponent, decorators: [{
|
|
1321
1328
|
type: Component,
|
|
@@ -1325,7 +1332,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
1325
1332
|
args: ['skyCellEditorAutocomplete', { read: ElementRef }]
|
|
1326
1333
|
}], onBlur: [{
|
|
1327
1334
|
type: HostListener,
|
|
1328
|
-
args: ['
|
|
1335
|
+
args: ['focusout', ['$event']]
|
|
1329
1336
|
}] } });
|
|
1330
1337
|
|
|
1331
1338
|
class SkyAgGridCellEditorAutocompleteModule {
|
|
@@ -1365,6 +1372,13 @@ class SkyAgGridCellEditorCurrencyComponent {
|
|
|
1365
1372
|
this.#changeDetector = inject(ChangeDetectorRef);
|
|
1366
1373
|
this.#initialized = false;
|
|
1367
1374
|
}
|
|
1375
|
+
onFocusOut(event) {
|
|
1376
|
+
if (event.relatedTarget && event.relatedTarget === this.params?.eGridCell) {
|
|
1377
|
+
// If focus is being set to the grid cell, schedule focus on the input.
|
|
1378
|
+
// This happens when the refreshCells API is called.
|
|
1379
|
+
this.afterGuiAttached();
|
|
1380
|
+
}
|
|
1381
|
+
}
|
|
1368
1382
|
#triggerType;
|
|
1369
1383
|
#changeDetector;
|
|
1370
1384
|
#initialized;
|
|
@@ -1446,7 +1460,7 @@ class SkyAgGridCellEditorCurrencyComponent {
|
|
|
1446
1460
|
this.#initialized = true;
|
|
1447
1461
|
}
|
|
1448
1462
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SkyAgGridCellEditorCurrencyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1449
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SkyAgGridCellEditorCurrencyComponent, selector: "sky-ag-grid-cell-editor-currency", viewQueries: [{ propertyName: "input", first: true, predicate: ["skyCellEditorCurrency"], descendants: true, read: ElementRef }], ngImport: i0, template: "<ng-container [formGroup]=\"editorForm\">\n <input\n #skyCellEditorCurrency\n type=\"text\"\n [formControl]=\"currency\"\n [attr.aria-label]=\"\n 'sky_ag_grid_cell_editor_currency_aria_label'\n | skyLibResources: columnHeader : rowNumber\n \"\n [style.width.px]=\"columnWidth\"\n [style.height.px]=\"rowHeightWithoutBorders\"\n [skyAutonumeric]=\"skyComponentProperties\"\n [skyAutonumericFormChangesUnformatted]=\"params?.eventKey?.length === 1\"\n (keyup.enter)=\"onPressEnter()\"\n (keyup.escape)=\"onPressEscape()\"\n />\n</ng-container>\n", styles: ["input{border:none;padding-left:11px}\n"], dependencies: [{ kind: "directive", type: i1$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.λ1, selector: "input[skyAutonumeric]", inputs: ["skyAutonumeric", "skyAutonumericFormChangesUnformatted"] }, { kind: "pipe", type: i3.SkyLibResourcesPipe, name: "skyLibResources" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1463
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SkyAgGridCellEditorCurrencyComponent, selector: "sky-ag-grid-cell-editor-currency", host: { listeners: { "focusout": "onFocusOut($event)" } }, viewQueries: [{ propertyName: "input", first: true, predicate: ["skyCellEditorCurrency"], descendants: true, read: ElementRef }], ngImport: i0, template: "<ng-container [formGroup]=\"editorForm\">\n <input\n #skyCellEditorCurrency\n type=\"text\"\n [formControl]=\"currency\"\n [attr.aria-label]=\"\n 'sky_ag_grid_cell_editor_currency_aria_label'\n | skyLibResources: columnHeader : rowNumber\n \"\n [style.width.px]=\"columnWidth\"\n [style.height.px]=\"rowHeightWithoutBorders\"\n [skyAutonumeric]=\"skyComponentProperties\"\n [skyAutonumericFormChangesUnformatted]=\"params?.eventKey?.length === 1\"\n (keyup.enter)=\"onPressEnter()\"\n (keyup.escape)=\"onPressEscape()\"\n />\n</ng-container>\n", styles: ["input{border:none;padding-left:11px}\n"], dependencies: [{ kind: "directive", type: i1$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.λ1, selector: "input[skyAutonumeric]", inputs: ["skyAutonumeric", "skyAutonumericFormChangesUnformatted"] }, { kind: "pipe", type: i3.SkyLibResourcesPipe, name: "skyLibResources" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1450
1464
|
}
|
|
1451
1465
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SkyAgGridCellEditorCurrencyComponent, decorators: [{
|
|
1452
1466
|
type: Component,
|
|
@@ -1454,6 +1468,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
1454
1468
|
}], propDecorators: { input: [{
|
|
1455
1469
|
type: ViewChild,
|
|
1456
1470
|
args: ['skyCellEditorCurrency', { read: ElementRef }]
|
|
1471
|
+
}], onFocusOut: [{
|
|
1472
|
+
type: HostListener,
|
|
1473
|
+
args: ['focusout', ['$event']]
|
|
1457
1474
|
}] } });
|
|
1458
1475
|
|
|
1459
1476
|
class SkyAgGridCellEditorCurrencyModule {
|
|
@@ -1696,8 +1713,16 @@ class SkyAgGridCellEditorLookupComponent {
|
|
|
1696
1713
|
#triggerType;
|
|
1697
1714
|
#changeDetector;
|
|
1698
1715
|
#elementRef;
|
|
1699
|
-
onBlur() {
|
|
1700
|
-
|
|
1716
|
+
onBlur(event) {
|
|
1717
|
+
if (event.relatedTarget &&
|
|
1718
|
+
event.relatedTarget === this.#params?.eGridCell) {
|
|
1719
|
+
// If focus is being set to the grid cell, schedule focus on the input.
|
|
1720
|
+
// This happens when the refreshCells API is called.
|
|
1721
|
+
this.afterGuiAttached();
|
|
1722
|
+
}
|
|
1723
|
+
else {
|
|
1724
|
+
this.#stopEditingOnBlur();
|
|
1725
|
+
}
|
|
1701
1726
|
}
|
|
1702
1727
|
agInit(params) {
|
|
1703
1728
|
this.#params = params;
|
|
@@ -1796,7 +1821,7 @@ class SkyAgGridCellEditorLookupComponent {
|
|
|
1796
1821
|
}
|
|
1797
1822
|
}
|
|
1798
1823
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SkyAgGridCellEditorLookupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1799
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: SkyAgGridCellEditorLookupComponent, selector: "sky-ag-grid-cell-editor-lookup", host: { listeners: { "
|
|
1824
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: SkyAgGridCellEditorLookupComponent, selector: "sky-ag-grid-cell-editor-lookup", host: { listeners: { "focusout": "onBlur($event)" }, properties: { "style.width.px": "this.width" } }, ngImport: i0, template: "@if (isAlive && useAsyncSearch) {\n <sky-input-box\n [disabled]=\"skyComponentProperties?.disabled\"\n [formGroup]=\"editorForm\"\n >\n <sky-lookup\n formControlName=\"selection\"\n [ariaLabelledBy]=\"\n skyComponentProperties?.ariaLabelledBy ?? screenReaderLabel.id\n \"\n [autocompleteAttribute]=\"skyComponentProperties?.autocompleteAttribute\"\n [data]=\"skyComponentProperties?.data\"\n [debounceTime]=\"skyComponentProperties?.debounceTime\"\n [descriptorProperty]=\"skyComponentProperties?.descriptorProperty\"\n [enableShowMore]=\"skyComponentProperties?.enableShowMore\"\n [idProperty]=\"skyComponentProperties?.idProperty\"\n [placeholderText]=\"skyComponentProperties?.placeholderText\"\n [propertiesToSearch]=\"skyComponentProperties?.propertiesToSearch\"\n [search]=\"skyComponentProperties?.search\"\n [searchFilters]=\"skyComponentProperties?.searchFilters\"\n [searchResultsLimit]=\"skyComponentProperties?.searchResultsLimit\"\n [searchResultTemplate]=\"skyComponentProperties?.searchResultTemplate\"\n [searchTextMinimumCharacters]=\"\n skyComponentProperties?.searchTextMinimumCharacters\n \"\n [selectMode]=\"skyComponentProperties?.selectMode\"\n [showAddButton]=\"skyComponentProperties?.showAddButton\"\n [showMoreConfig]=\"skyComponentProperties?.showMoreConfig\"\n [wrapperClass]=\"skyComponentProperties?.wrapperClass\"\n (searchAsync)=\"skyComponentProperties?.searchAsync?.($event)\"\n (addClick)=\"skyComponentProperties?.addClick?.($event)\"\n (openChange)=\"onLookupOpenChange($event)\"\n />\n </sky-input-box>\n}\n@if (isAlive && !useAsyncSearch) {\n <sky-input-box\n [disabled]=\"skyComponentProperties?.disabled\"\n [formGroup]=\"editorForm\"\n >\n <sky-lookup\n formControlName=\"selection\"\n [ariaLabelledBy]=\"\n skyComponentProperties?.ariaLabelledBy ?? screenReaderLabel.id\n \"\n [autocompleteAttribute]=\"skyComponentProperties?.autocompleteAttribute\"\n [data]=\"skyComponentProperties?.data\"\n [debounceTime]=\"skyComponentProperties?.debounceTime\"\n [descriptorProperty]=\"skyComponentProperties?.descriptorProperty\"\n [enableShowMore]=\"skyComponentProperties?.enableShowMore\"\n [idProperty]=\"skyComponentProperties?.idProperty\"\n [placeholderText]=\"skyComponentProperties?.placeholderText\"\n [propertiesToSearch]=\"skyComponentProperties?.propertiesToSearch\"\n [search]=\"skyComponentProperties?.search\"\n [searchFilters]=\"skyComponentProperties?.searchFilters\"\n [searchResultsLimit]=\"skyComponentProperties?.searchResultsLimit\"\n [searchResultTemplate]=\"skyComponentProperties?.searchResultTemplate\"\n [searchTextMinimumCharacters]=\"\n skyComponentProperties?.searchTextMinimumCharacters\n \"\n [selectMode]=\"skyComponentProperties?.selectMode\"\n [showAddButton]=\"skyComponentProperties?.showAddButton\"\n [showMoreConfig]=\"skyComponentProperties?.showMoreConfig\"\n [wrapperClass]=\"skyComponentProperties?.wrapperClass\"\n (addClick)=\"skyComponentProperties?.addClick?.($event)\"\n (openChange)=\"onLookupOpenChange($event)\"\n />\n </sky-input-box>\n}\n<div #screenReaderLabel=\"skyId\" class=\"sky-screen-reader-only\" skyId>\n {{ labelText }}\n</div>\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.λ2, selector: "[skyId]", exportAs: ["skyId"] }, { kind: "component", type: i3$1.λ10, selector: "sky-input-box", inputs: ["hasErrors", "disabled", "labelText", "characterLimit", "stacked", "helpPopoverTitle", "helpPopoverContent", "helpKey", "hintText"] }, { kind: "component", type: i2$1.λ4, selector: "sky-lookup", inputs: ["ariaLabel", "ariaLabelledBy", "autocompleteAttribute", "data", "disabled", "required", "enableShowMore", "placeholderText", "idProperty", "showAddButton", "showMoreConfig", "selectMode", "wrapperClass"], outputs: ["addClick", "openChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1800
1825
|
}
|
|
1801
1826
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SkyAgGridCellEditorLookupComponent, decorators: [{
|
|
1802
1827
|
type: Component,
|
|
@@ -1806,7 +1831,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
1806
1831
|
args: ['style.width.px']
|
|
1807
1832
|
}], onBlur: [{
|
|
1808
1833
|
type: HostListener,
|
|
1809
|
-
args: ['
|
|
1834
|
+
args: ['focusout', ['$event']]
|
|
1810
1835
|
}] } });
|
|
1811
1836
|
|
|
1812
1837
|
class SkyAgGridCellEditorLookupModule {
|
|
@@ -1843,6 +1868,14 @@ class SkyAgGridCellEditorNumberComponent {
|
|
|
1843
1868
|
number: new UntypedFormControl(),
|
|
1844
1869
|
});
|
|
1845
1870
|
}
|
|
1871
|
+
onFocusOut(event) {
|
|
1872
|
+
if (event.relatedTarget &&
|
|
1873
|
+
event.relatedTarget === this.#params?.eGridCell) {
|
|
1874
|
+
// If focus is being set to the grid cell, schedule focus on the input.
|
|
1875
|
+
// This happens when the refreshCells API is called.
|
|
1876
|
+
this.afterGuiAttached();
|
|
1877
|
+
}
|
|
1878
|
+
}
|
|
1846
1879
|
#params;
|
|
1847
1880
|
#triggerType;
|
|
1848
1881
|
/**
|
|
@@ -1879,12 +1912,15 @@ class SkyAgGridCellEditorNumberComponent {
|
|
|
1879
1912
|
* afterGuiAttached is called by agGrid after the editor is rendered in the DOM. Once it is attached the editor is ready to be focused on.
|
|
1880
1913
|
*/
|
|
1881
1914
|
afterGuiAttached() {
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
if (this
|
|
1885
|
-
this.input.nativeElement.
|
|
1915
|
+
// AG Grid sets focus to the cell via setTimeout, and this queues the input to focus after that.
|
|
1916
|
+
setTimeout(() => {
|
|
1917
|
+
if (this.input) {
|
|
1918
|
+
this.input.nativeElement.focus();
|
|
1919
|
+
if (this.#triggerType === SkyAgGridCellEditorInitialAction.Highlighted) {
|
|
1920
|
+
this.input.nativeElement.select();
|
|
1921
|
+
}
|
|
1886
1922
|
}
|
|
1887
|
-
}
|
|
1923
|
+
});
|
|
1888
1924
|
}
|
|
1889
1925
|
/**
|
|
1890
1926
|
* getValue is called by agGrid when editing is stopped to get the new value of the cell.
|
|
@@ -1894,7 +1930,7 @@ class SkyAgGridCellEditorNumberComponent {
|
|
|
1894
1930
|
return val !== undefined && val !== null ? val : undefined;
|
|
1895
1931
|
}
|
|
1896
1932
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SkyAgGridCellEditorNumberComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1897
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SkyAgGridCellEditorNumberComponent, selector: "sky-ag-grid-cell-editor-number", viewQueries: [{ propertyName: "input", first: true, predicate: ["skyCellEditorNumber"], descendants: true, read: ElementRef }], ngImport: i0, template: "<ng-container [formGroup]=\"editorForm\">\n <input\n #skyCellEditorNumber\n formControlName=\"number\"\n type=\"number\"\n [attr.aria-label]=\"\n 'sky_ag_grid_cell_editor_number_aria_label'\n | skyLibResources: columnHeader : rowNumber\n \"\n [style.width.px]=\"columnWidth\"\n [style.height.px]=\"rowHeightWithoutBorders\"\n [max]=\"max ?? null\"\n [min]=\"min ?? null\"\n />\n</ng-container>\n", styles: ["input{border:none;text-align:right}\n"], dependencies: [{ kind: "directive", type: i1$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$3.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$3.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i1$3.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i1$3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "pipe", type: i3.SkyLibResourcesPipe, name: "skyLibResources" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1933
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SkyAgGridCellEditorNumberComponent, selector: "sky-ag-grid-cell-editor-number", host: { listeners: { "focusout": "onFocusOut($event)" } }, viewQueries: [{ propertyName: "input", first: true, predicate: ["skyCellEditorNumber"], descendants: true, read: ElementRef }], ngImport: i0, template: "<ng-container [formGroup]=\"editorForm\">\n <input\n #skyCellEditorNumber\n formControlName=\"number\"\n type=\"number\"\n [attr.aria-label]=\"\n 'sky_ag_grid_cell_editor_number_aria_label'\n | skyLibResources: columnHeader : rowNumber\n \"\n [style.width.px]=\"columnWidth\"\n [style.height.px]=\"rowHeightWithoutBorders\"\n [max]=\"max ?? null\"\n [min]=\"min ?? null\"\n />\n</ng-container>\n", styles: ["input{border:none;text-align:right}\n"], dependencies: [{ kind: "directive", type: i1$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$3.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$3.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i1$3.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i1$3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "pipe", type: i3.SkyLibResourcesPipe, name: "skyLibResources" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1898
1934
|
}
|
|
1899
1935
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SkyAgGridCellEditorNumberComponent, decorators: [{
|
|
1900
1936
|
type: Component,
|
|
@@ -1902,6 +1938,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
1902
1938
|
}], propDecorators: { input: [{
|
|
1903
1939
|
type: ViewChild,
|
|
1904
1940
|
args: ['skyCellEditorNumber', { read: ElementRef }]
|
|
1941
|
+
}], onFocusOut: [{
|
|
1942
|
+
type: HostListener,
|
|
1943
|
+
args: ['focusout', ['$event']]
|
|
1905
1944
|
}] } });
|
|
1906
1945
|
|
|
1907
1946
|
class SkyAgGridCellEditorNumberModule {
|
|
@@ -1927,6 +1966,14 @@ class SkyAgGridCellEditorTextComponent {
|
|
|
1927
1966
|
text: new UntypedFormControl(),
|
|
1928
1967
|
});
|
|
1929
1968
|
}
|
|
1969
|
+
onFocusOut(event) {
|
|
1970
|
+
if (event.relatedTarget &&
|
|
1971
|
+
event.relatedTarget === this.#params?.eGridCell) {
|
|
1972
|
+
// If focus is being set to the grid cell, schedule focus on the input.
|
|
1973
|
+
// This happens when the refreshCells API is called.
|
|
1974
|
+
this.afterGuiAttached();
|
|
1975
|
+
}
|
|
1976
|
+
}
|
|
1930
1977
|
#params;
|
|
1931
1978
|
#triggerType;
|
|
1932
1979
|
/**
|
|
@@ -1979,7 +2026,7 @@ class SkyAgGridCellEditorTextComponent {
|
|
|
1979
2026
|
return this.editorForm.get('text')?.value || undefined;
|
|
1980
2027
|
}
|
|
1981
2028
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SkyAgGridCellEditorTextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1982
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SkyAgGridCellEditorTextComponent, selector: "sky-ag-grid-cell-editor-text", viewQueries: [{ propertyName: "input", first: true, predicate: ["skyCellEditorText"], descendants: true, read: ElementRef }], ngImport: i0, template: "<ng-container [formGroup]=\"editorForm\">\n <input\n #skyCellEditorText\n formControlName=\"text\"\n type=\"text\"\n [attr.aria-label]=\"\n 'sky_ag_grid_cell_editor_text_aria_label'\n | skyLibResources: columnHeader : rowNumber\n \"\n [style.width.px]=\"columnWidth\"\n [style.height.px]=\"rowHeightWithoutBorders\"\n [maxlength]=\"maxlength ?? null\"\n />\n</ng-container>\n", styles: ["input{border:none;padding-left:11px}\n"], dependencies: [{ kind: "directive", type: i1$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$3.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1$3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "pipe", type: i3.SkyLibResourcesPipe, name: "skyLibResources" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2029
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SkyAgGridCellEditorTextComponent, selector: "sky-ag-grid-cell-editor-text", host: { listeners: { "focusout": "onFocusOut($event)" } }, viewQueries: [{ propertyName: "input", first: true, predicate: ["skyCellEditorText"], descendants: true, read: ElementRef }], ngImport: i0, template: "<ng-container [formGroup]=\"editorForm\">\n <input\n #skyCellEditorText\n formControlName=\"text\"\n type=\"text\"\n [attr.aria-label]=\"\n 'sky_ag_grid_cell_editor_text_aria_label'\n | skyLibResources: columnHeader : rowNumber\n \"\n [style.width.px]=\"columnWidth\"\n [style.height.px]=\"rowHeightWithoutBorders\"\n [maxlength]=\"maxlength ?? null\"\n />\n</ng-container>\n", styles: ["input{border:none;padding-left:11px}\n"], dependencies: [{ kind: "directive", type: i1$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$3.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1$3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "pipe", type: i3.SkyLibResourcesPipe, name: "skyLibResources" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1983
2030
|
}
|
|
1984
2031
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SkyAgGridCellEditorTextComponent, decorators: [{
|
|
1985
2032
|
type: Component,
|
|
@@ -1987,6 +2034,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
1987
2034
|
}], propDecorators: { input: [{
|
|
1988
2035
|
type: ViewChild,
|
|
1989
2036
|
args: ['skyCellEditorText', { read: ElementRef }]
|
|
2037
|
+
}], onFocusOut: [{
|
|
2038
|
+
type: HostListener,
|
|
2039
|
+
args: ['focusout', ['$event']]
|
|
1990
2040
|
}] } });
|
|
1991
2041
|
|
|
1992
2042
|
class SkyAgGridCellEditorTextModule {
|