@skyux/ag-grid 12.44.0 → 12.44.1
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/skyux-ag-grid.mjs +30 -0
- package/fesm2022/skyux-ag-grid.mjs.map +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 -1
- package/package.json +13 -13
|
@@ -1477,6 +1477,9 @@ class SkyAgGridCellEditorCurrencyComponent {
|
|
|
1477
1477
|
// This happens when the refreshCells API is called.
|
|
1478
1478
|
this.afterGuiAttached();
|
|
1479
1479
|
}
|
|
1480
|
+
else if (event.target === this.input?.nativeElement) {
|
|
1481
|
+
this.#stopEditingOnBlur();
|
|
1482
|
+
}
|
|
1480
1483
|
}
|
|
1481
1484
|
#triggerType;
|
|
1482
1485
|
#changeDetector;
|
|
@@ -1556,6 +1559,11 @@ class SkyAgGridCellEditorCurrencyComponent {
|
|
|
1556
1559
|
}
|
|
1557
1560
|
this.#initialized = true;
|
|
1558
1561
|
}
|
|
1562
|
+
#stopEditingOnBlur() {
|
|
1563
|
+
if (this.params?.api.getGridOption('stopEditingWhenCellsLoseFocus')) {
|
|
1564
|
+
this.params?.api.stopEditing();
|
|
1565
|
+
}
|
|
1566
|
+
}
|
|
1559
1567
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SkyAgGridCellEditorCurrencyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1560
1568
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: SkyAgGridCellEditorCurrencyComponent, isStandalone: true, 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 [skyAutonumeric]=\"skyComponentProperties\"\n [skyAutonumericFormChangesUnformatted]=\"params?.eventKey?.length === 1\"\n (keyup.enter)=\"onPressEnter()\"\n (keyup.escape)=\"onPressEscape()\"\n />\n</ng-container>\n", styles: ["input:not(.sky-theme-modern *){--sky-override-ag-grid-currency-editor-left-padding: 9px}:host-context(.sky-theme-modern:not(.sky-theme-brand-base)) input{--sky-override-ag-grid-currency-editor-left-padding: 10px}:host{height:100%;width:100%}input{background-color:transparent;border:none;height:100%;width:100%;padding-left:var(--sky-override-ag-grid-currency-editor-left-padding, calc(var(--sky-comp-grid-cell-space-inset-left) - var(--sky-border-width-input-focus)))}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { 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: "ngmodule", type: ReactiveFormsModule }, { 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: "ngmodule", type: SkyAutonumericModule }, { kind: "directive", type: i2$1.λ1, selector: "input[skyAutonumeric]", inputs: ["skyAutonumeric", "skyAutonumericFormChangesUnformatted"] }, { kind: "ngmodule", type: SkyI18nModule }, { kind: "pipe", type: i3.SkyLibResourcesPipe, name: "skyLibResources" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1561
1569
|
}
|
|
@@ -1901,6 +1909,9 @@ class SkyAgGridCellEditorNumberComponent {
|
|
|
1901
1909
|
// This happens when the refreshCells API is called.
|
|
1902
1910
|
this.afterGuiAttached();
|
|
1903
1911
|
}
|
|
1912
|
+
else if (event.target === this.input?.nativeElement) {
|
|
1913
|
+
this.#stopEditingOnBlur();
|
|
1914
|
+
}
|
|
1904
1915
|
}
|
|
1905
1916
|
#params;
|
|
1906
1917
|
#triggerType;
|
|
@@ -1934,6 +1945,9 @@ class SkyAgGridCellEditorNumberComponent {
|
|
|
1934
1945
|
this.columnWidth = this.#params.column.getActualWidth();
|
|
1935
1946
|
this.rowHeightWithoutBorders = this.#params.node.rowHeight - 4;
|
|
1936
1947
|
}
|
|
1948
|
+
refresh(params) {
|
|
1949
|
+
this.agInit(params);
|
|
1950
|
+
}
|
|
1937
1951
|
/**
|
|
1938
1952
|
* 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.
|
|
1939
1953
|
*/
|
|
@@ -1955,6 +1969,11 @@ class SkyAgGridCellEditorNumberComponent {
|
|
|
1955
1969
|
const val = this.editorForm.get('number')?.value;
|
|
1956
1970
|
return val !== undefined && val !== null ? val : undefined;
|
|
1957
1971
|
}
|
|
1972
|
+
#stopEditingOnBlur() {
|
|
1973
|
+
if (this.#params?.api.getGridOption('stopEditingWhenCellsLoseFocus')) {
|
|
1974
|
+
this.#params?.api.stopEditing();
|
|
1975
|
+
}
|
|
1976
|
+
}
|
|
1958
1977
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SkyAgGridCellEditorNumberComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1959
1978
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: SkyAgGridCellEditorNumberComponent, isStandalone: true, 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{background-color:transparent;border:none;text-align:right}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { 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: "ngmodule", type: ReactiveFormsModule }, { 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: "ngmodule", type: SkyI18nModule }, { kind: "pipe", type: i3.SkyLibResourcesPipe, name: "skyLibResources" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1960
1979
|
}
|
|
@@ -1985,6 +2004,9 @@ class SkyAgGridCellEditorTextComponent {
|
|
|
1985
2004
|
// This happens when the refreshCells API is called.
|
|
1986
2005
|
this.afterGuiAttached();
|
|
1987
2006
|
}
|
|
2007
|
+
else if (event.target === this.input?.nativeElement) {
|
|
2008
|
+
this.#stopEditingOnBlur();
|
|
2009
|
+
}
|
|
1988
2010
|
}
|
|
1989
2011
|
#params;
|
|
1990
2012
|
#triggerType;
|
|
@@ -2015,6 +2037,9 @@ class SkyAgGridCellEditorTextComponent {
|
|
|
2015
2037
|
this.columnHeader = this.#params.api.getDisplayNameForColumn(this.#params.column, 'header');
|
|
2016
2038
|
this.rowNumber = this.#params.rowIndex + 1;
|
|
2017
2039
|
}
|
|
2040
|
+
refresh(params) {
|
|
2041
|
+
this.agInit(params);
|
|
2042
|
+
}
|
|
2018
2043
|
/**
|
|
2019
2044
|
* 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.
|
|
2020
2045
|
*/
|
|
@@ -2035,6 +2060,11 @@ class SkyAgGridCellEditorTextComponent {
|
|
|
2035
2060
|
getValue() {
|
|
2036
2061
|
return this.editorForm.get('text')?.value || undefined;
|
|
2037
2062
|
}
|
|
2063
|
+
#stopEditingOnBlur() {
|
|
2064
|
+
if (this.#params?.api.getGridOption('stopEditingWhenCellsLoseFocus')) {
|
|
2065
|
+
this.#params?.api.stopEditing();
|
|
2066
|
+
}
|
|
2067
|
+
}
|
|
2038
2068
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SkyAgGridCellEditorTextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2039
2069
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: SkyAgGridCellEditorTextComponent, isStandalone: true, 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 [maxlength]=\"maxlength ?? null\"\n />\n</ng-container>\n", styles: ["input:not(.sky-theme-modern *){--sky-override-ag-grid-text-editor-left-padding: 9px}:host-context(.sky-theme-modern:not(.sky-theme-brand-base)) input{--sky-override-ag-grid-text-editor-left-padding: 10px}:host{height:100%;width:100%;display:flex}input{background-color:transparent;border:none;height:100%;width:100%;padding-left:var(--sky-override-ag-grid-text-editor-left-padding, calc(var(--sky-comp-grid-cell-space-inset-left) - var(--sky-border-width-input-focus)))}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { 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: "ngmodule", type: ReactiveFormsModule }, { 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: "ngmodule", type: SkyI18nModule }, { kind: "pipe", type: i3.SkyLibResourcesPipe, name: "skyLibResources" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2040
2070
|
}
|