@skyux/ag-grid 5.9.6 → 5.11.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/bundles/skyux-ag-grid.umd.js +314 -76
- package/documentation.json +526 -335
- package/esm2015/index.js +2 -0
- package/esm2015/index.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/ag-grid.service.js +1 -1
- package/esm2015/lib/modules/ag-grid/ag-grid.service.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-autocomplete/cell-editor-autocomplete.component.js +36 -3
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-autocomplete/cell-editor-autocomplete.component.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-autocomplete/cell-editor-autocomplete.module.js +14 -4
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-autocomplete/cell-editor-autocomplete.module.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-currency/cell-editor-currency.component.js +42 -7
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-currency/cell-editor-currency.component.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-currency/cell-editor-currency.module.js +14 -4
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-currency/cell-editor-currency.module.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-datepicker/cell-editor-datepicker.component.js +60 -13
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-datepicker/cell-editor-datepicker.component.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-datepicker/cell-editor-datepicker.module.js +4 -4
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-datepicker/cell-editor-datepicker.module.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-lookup/cell-editor-lookup.component.js +35 -9
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-lookup/cell-editor-lookup.component.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-number/cell-editor-number.component.js +33 -3
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-number/cell-editor-number.component.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-number/cell-editor-number.module.js +4 -4
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-number/cell-editor-number.module.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-text/cell-editor-text.component.js +32 -3
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-text/cell-editor-text.component.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-text/cell-editor-text.module.js +4 -4
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-text/cell-editor-text.module.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/types/cell-editor-initial-action.js +13 -0
- package/esm2015/lib/modules/ag-grid/types/cell-editor-initial-action.js.map +1 -0
- package/esm2015/lib/modules/ag-grid/types/cell-editor-utils.js +31 -0
- package/esm2015/lib/modules/ag-grid/types/cell-editor-utils.js.map +1 -0
- package/fesm2015/skyux-ag-grid.js +296 -58
- package/fesm2015/skyux-ag-grid.js.map +1 -1
- package/index.d.ts +2 -0
- package/lib/modules/ag-grid/cell-editors/cell-editor-autocomplete/cell-editor-autocomplete.component.d.ts +4 -2
- package/lib/modules/ag-grid/cell-editors/cell-editor-autocomplete/cell-editor-autocomplete.module.d.ts +1 -1
- package/lib/modules/ag-grid/cell-editors/cell-editor-currency/cell-editor-currency.component.d.ts +8 -3
- package/lib/modules/ag-grid/cell-editors/cell-editor-currency/cell-editor-currency.module.d.ts +1 -1
- package/lib/modules/ag-grid/cell-editors/cell-editor-datepicker/cell-editor-datepicker.component.d.ts +7 -4
- package/lib/modules/ag-grid/cell-editors/cell-editor-datepicker/cell-editor-datepicker.module.d.ts +1 -1
- package/lib/modules/ag-grid/cell-editors/cell-editor-lookup/cell-editor-lookup.component.d.ts +2 -1
- package/lib/modules/ag-grid/cell-editors/cell-editor-number/cell-editor-number.component.d.ts +4 -2
- package/lib/modules/ag-grid/cell-editors/cell-editor-number/cell-editor-number.module.d.ts +1 -1
- package/lib/modules/ag-grid/cell-editors/cell-editor-text/cell-editor-text.component.d.ts +4 -2
- package/lib/modules/ag-grid/cell-editors/cell-editor-text/cell-editor-text.module.d.ts +1 -1
- package/lib/modules/ag-grid/types/cell-editor-initial-action.d.ts +11 -0
- package/lib/modules/ag-grid/types/cell-editor-utils.d.ts +9 -0
- package/package.json +12 -12
package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-text/cell-editor-text.component.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cell-editor-text.component.js","sourceRoot":"","sources":["../../../../../../../../../../libs/components/ag-grid/src/lib/modules/ag-grid/cell-editors/cell-editor-text/cell-editor-text.component.ts","../../../../../../../../../../libs/components/ag-grid/src/lib/modules/ag-grid/cell-editors/cell-editor-text/cell-editor-text.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,SAAS,EACT,UAAU,EACV,SAAS,GACV,MAAM,eAAe,CAAC;;;;
|
|
1
|
+
{"version":3,"file":"cell-editor-text.component.js","sourceRoot":"","sources":["../../../../../../../../../../libs/components/ag-grid/src/lib/modules/ag-grid/cell-editors/cell-editor-text/cell-editor-text.component.ts","../../../../../../../../../../libs/components/ag-grid/src/lib/modules/ag-grid/cell-editors/cell-editor-text/cell-editor-text.component.html"],"names":[],"mappings":";;AAAA,OAAO,EACL,uBAAuB,EACvB,SAAS,EACT,UAAU,EACV,SAAS,GACV,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAKxD,OAAO,EAAE,gCAAgC,EAAE,MAAM,wCAAwC,CAAC;AAE1F,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;;;;AAEzE;;GAEG;AAOH,MAAM,OAAO,gCAAgC;IAN7C;QAYS,eAAU,GAAG,IAAI,SAAS,CAAC;YAChC,IAAI,EAAE,IAAI,WAAW,EAAE;SACxB,CAAC,CAAC;QAUH,gEAA+C;KAiDhD;IA/CC;;;OAGG;IACI,MAAM,CAAC,MAA+B;;QAC3C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QAErB,uBAAA,IAAI,iDAAgB,wBAAwB,CAAC,sBAAsB,CAAC,MAAM,CAAC,MAAA,CAAC;QAC5E,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAC5C,QAAQ,uBAAA,IAAI,qDAAa,EAAE;YACzB,KAAK,gCAAgC,CAAC,MAAM;gBAC1C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;gBAC5B,MAAM;YACR,KAAK,gCAAgC,CAAC,OAAO;gBAC3C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;gBACnC,MAAM;YACR,KAAK,gCAAgC,CAAC,WAAW,CAAC;YAClD,KAAK,gCAAgC,CAAC,SAAS,CAAC;YAChD;gBACE,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;gBAC/B,MAAM;SACT;QAED,IAAI,CAAC,SAAS,GAAG,MAAA,MAAM,CAAC,sBAAsB,0CAAE,SAAS,CAAC;QAC1D,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC;QAClD,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,GAAG,CAAC,CAAC;QAC1C,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC;QACvD,IAAI,CAAC,uBAAuB;YAC1B,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;IACvD,CAAC;IAED;;OAEG;IACI,gBAAgB;QACrB,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC;QACjC,IAAI,uBAAA,IAAI,qDAAa,KAAK,gCAAgC,CAAC,WAAW,EAAE;YACtE,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC;SACnC;IACH,CAAC;IAED;;OAEG;IACI,QAAQ;QACb,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,KAAK,IAAI,SAAS,CAAC;IACxD,CAAC;;;8HAlEU,gCAAgC;kHAAhC,gCAAgC,2JAeH,UAAU,6BCvCpD,qZAcA;4FDUa,gCAAgC;kBAN5C,SAAS;mBAAC;oBACT,QAAQ,EAAE,8BAA8B;oBACxC,WAAW,EAAE,mCAAmC;oBAChD,SAAS,EAAE,CAAC,mCAAmC,CAAC;oBAChD,eAAe,EAAE,uBAAuB,CAAC,MAAM;iBAChD;8BAiBS,KAAK;sBADZ,SAAS;uBAAC,mBAAmB,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE","sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n ViewChild,\n} from '@angular/core';\nimport { FormControl, FormGroup } from '@angular/forms';\n\nimport { ICellEditorAngularComp } from 'ag-grid-angular';\nimport { ICellEditorParams } from 'ag-grid-community';\n\nimport { SkyAgGridCellEditorInitialAction } from '../../types/cell-editor-initial-action';\nimport { SkyCellEditorTextParams } from '../../types/cell-editor-text-params';\nimport { SkyAgGridCellEditorUtils } from '../../types/cell-editor-utils';\n\n/**\n * @internal\n */\n@Component({\n selector: 'sky-ag-grid-cell-editor-text',\n templateUrl: './cell-editor-text.component.html',\n styleUrls: ['./cell-editor-text.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SkyAgGridCellEditorTextComponent\n implements ICellEditorAngularComp\n{\n public textInputLabel: string;\n public columnHeader: string;\n public columnWidth: number;\n public editorForm = new FormGroup({\n text: new FormControl(),\n });\n public rowHeightWithoutBorders: number;\n public rowNumber: number;\n public maxlength: number;\n\n private params: ICellEditorParams;\n\n @ViewChild('skyCellEditorText', { read: ElementRef })\n private input: ElementRef;\n\n #triggerType: SkyAgGridCellEditorInitialAction;\n\n /**\n * agInit is called by agGrid once after the editor is created and provides the editor with the information it needs.\n * @param params The cell editor params that include data about the cell, column, row, and grid.\n */\n public agInit(params: SkyCellEditorTextParams): void {\n this.params = params;\n\n this.#triggerType = SkyAgGridCellEditorUtils.getEditorInitialAction(params);\n const control = this.editorForm.get('text');\n switch (this.#triggerType) {\n case SkyAgGridCellEditorInitialAction.Delete:\n control.setValue(undefined);\n break;\n case SkyAgGridCellEditorInitialAction.Replace:\n control.setValue(params.charPress);\n break;\n case SkyAgGridCellEditorInitialAction.Highlighted:\n case SkyAgGridCellEditorInitialAction.Untouched:\n default:\n control.setValue(params.value);\n break;\n }\n\n this.maxlength = params.skyComponentProperties?.maxlength;\n this.columnHeader = this.params.colDef.headerName;\n this.rowNumber = this.params.rowIndex + 1;\n this.columnWidth = this.params.column.getActualWidth();\n this.rowHeightWithoutBorders =\n this.params.node && this.params.node.rowHeight - 4;\n }\n\n /**\n * 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.\n */\n public afterGuiAttached(): void {\n this.input.nativeElement.focus();\n if (this.#triggerType === SkyAgGridCellEditorInitialAction.Highlighted) {\n this.input.nativeElement.select();\n }\n }\n\n /**\n * getValue is called by agGrid when editing is stopped to get the new value of the cell.\n */\n public getValue(): string | undefined {\n return this.editorForm.get('text').value || undefined;\n }\n}\n","<ng-container [formGroup]=\"editorForm\">\n <input\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\"\n #skyCellEditorText\n />\n</ng-container>\n"]}
|
package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-text/cell-editor-text.module.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { NgModule } from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { ReactiveFormsModule } from '@angular/forms';
|
|
3
3
|
import { SkyAgGridResourcesModule } from '../../../shared/sky-ag-grid-resources.module';
|
|
4
4
|
import { SkyAgGridCellEditorTextComponent } from './cell-editor-text.component';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export class SkyAgGridCellEditorTextModule {
|
|
7
7
|
}
|
|
8
8
|
SkyAgGridCellEditorTextModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorTextModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
9
|
-
SkyAgGridCellEditorTextModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorTextModule, declarations: [SkyAgGridCellEditorTextComponent], imports: [SkyAgGridResourcesModule,
|
|
10
|
-
SkyAgGridCellEditorTextModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorTextModule, imports: [[SkyAgGridResourcesModule,
|
|
9
|
+
SkyAgGridCellEditorTextModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorTextModule, declarations: [SkyAgGridCellEditorTextComponent], imports: [SkyAgGridResourcesModule, ReactiveFormsModule], exports: [SkyAgGridCellEditorTextComponent] });
|
|
10
|
+
SkyAgGridCellEditorTextModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorTextModule, imports: [[SkyAgGridResourcesModule, ReactiveFormsModule]] });
|
|
11
11
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorTextModule, decorators: [{
|
|
12
12
|
type: NgModule,
|
|
13
13
|
args: [{
|
|
14
|
-
imports: [SkyAgGridResourcesModule,
|
|
14
|
+
imports: [SkyAgGridResourcesModule, ReactiveFormsModule],
|
|
15
15
|
declarations: [SkyAgGridCellEditorTextComponent],
|
|
16
16
|
exports: [SkyAgGridCellEditorTextComponent],
|
|
17
17
|
}]
|
package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-text/cell-editor-text.module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cell-editor-text.module.js","sourceRoot":"","sources":["../../../../../../../../../../libs/components/ag-grid/src/lib/modules/ag-grid/cell-editors/cell-editor-text/cell-editor-text.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"cell-editor-text.module.js","sourceRoot":"","sources":["../../../../../../../../../../libs/components/ag-grid/src/lib/modules/ag-grid/cell-editors/cell-editor-text/cell-editor-text.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAErD,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AAExF,OAAO,EAAE,gCAAgC,EAAE,MAAM,8BAA8B,CAAC;;AAOhF,MAAM,OAAO,6BAA6B;;2HAA7B,6BAA6B;4HAA7B,6BAA6B,iBAHzB,gCAAgC,aADrC,wBAAwB,EAAE,mBAAmB,aAE7C,gCAAgC;4HAE/B,6BAA6B,YAJ/B,CAAC,wBAAwB,EAAE,mBAAmB,CAAC;4FAI7C,6BAA6B;kBALzC,QAAQ;mBAAC;oBACR,OAAO,EAAE,CAAC,wBAAwB,EAAE,mBAAmB,CAAC;oBACxD,YAAY,EAAE,CAAC,gCAAgC,CAAC;oBAChD,OAAO,EAAE,CAAC,gCAAgC,CAAC;iBAC5C","sourcesContent":["import { NgModule } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { SkyAgGridResourcesModule } from '../../../shared/sky-ag-grid-resources.module';\n\nimport { SkyAgGridCellEditorTextComponent } from './cell-editor-text.component';\n\n@NgModule({\n imports: [SkyAgGridResourcesModule, ReactiveFormsModule],\n declarations: [SkyAgGridCellEditorTextComponent],\n exports: [SkyAgGridCellEditorTextComponent],\n})\nexport class SkyAgGridCellEditorTextModule {}\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** The intiial action that a cell editor should take when initialized. */
|
|
2
|
+
export var SkyAgGridCellEditorInitialAction;
|
|
3
|
+
(function (SkyAgGridCellEditorInitialAction) {
|
|
4
|
+
/** The cell should be cleared. */
|
|
5
|
+
SkyAgGridCellEditorInitialAction[SkyAgGridCellEditorInitialAction["Delete"] = 0] = "Delete";
|
|
6
|
+
/** The cell value should be highlighted. */
|
|
7
|
+
SkyAgGridCellEditorInitialAction[SkyAgGridCellEditorInitialAction["Highlighted"] = 1] = "Highlighted";
|
|
8
|
+
/** The cell value should be replaced with the initializing value. */
|
|
9
|
+
SkyAgGridCellEditorInitialAction[SkyAgGridCellEditorInitialAction["Replace"] = 2] = "Replace";
|
|
10
|
+
/** The cell should not be modified and the cursor is placed at the end of the value. */
|
|
11
|
+
SkyAgGridCellEditorInitialAction[SkyAgGridCellEditorInitialAction["Untouched"] = 3] = "Untouched";
|
|
12
|
+
})(SkyAgGridCellEditorInitialAction || (SkyAgGridCellEditorInitialAction = {}));
|
|
13
|
+
//# sourceMappingURL=cell-editor-initial-action.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cell-editor-initial-action.js","sourceRoot":"","sources":["../../../../../../../../../libs/components/ag-grid/src/lib/modules/ag-grid/types/cell-editor-initial-action.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,MAAM,CAAN,IAAY,gCASX;AATD,WAAY,gCAAgC;IAC1C,kCAAkC;IAClC,2FAAU,CAAA;IACV,4CAA4C;IAC5C,qGAAe,CAAA;IACf,qEAAqE;IACrE,6FAAW,CAAA;IACX,wFAAwF;IACxF,iGAAa,CAAA;AACf,CAAC,EATW,gCAAgC,KAAhC,gCAAgC,QAS3C","sourcesContent":["/** The intiial action that a cell editor should take when initialized. */\nexport enum SkyAgGridCellEditorInitialAction {\n /** The cell should be cleared. */\n Delete = 0,\n /** The cell value should be highlighted. */\n Highlighted = 1,\n /** The cell value should be replaced with the initializing value. */\n Replace = 2,\n /** The cell should not be modified and the cursor is placed at the end of the value. */\n Untouched = 3,\n}\n"]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { KeyCode } from 'ag-grid-community';
|
|
2
|
+
import { SkyAgGridCellEditorInitialAction } from './cell-editor-initial-action';
|
|
3
|
+
export class SkyAgGridCellEditorUtils {
|
|
4
|
+
/**
|
|
5
|
+
* Gets the intiial action that a cell editor should take when initialized.
|
|
6
|
+
* @param params The editor's initializing parameters.
|
|
7
|
+
*/
|
|
8
|
+
static getEditorInitialAction(params) {
|
|
9
|
+
if (params.cellStartedEdit) {
|
|
10
|
+
if (params.keyPress === KeyCode.BACKSPACE ||
|
|
11
|
+
params.keyPress === KeyCode.DELETE) {
|
|
12
|
+
return SkyAgGridCellEditorInitialAction.Delete;
|
|
13
|
+
}
|
|
14
|
+
else if (params.charPress) {
|
|
15
|
+
return SkyAgGridCellEditorInitialAction.Replace;
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
if (params.keyPress !== KeyCode.F2) {
|
|
19
|
+
return SkyAgGridCellEditorInitialAction.Highlighted;
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
return SkyAgGridCellEditorInitialAction.Untouched;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
return SkyAgGridCellEditorInitialAction.Untouched;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=cell-editor-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cell-editor-utils.js","sourceRoot":"","sources":["../../../../../../../../../libs/components/ag-grid/src/lib/modules/ag-grid/types/cell-editor-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE/D,OAAO,EAAE,gCAAgC,EAAE,MAAM,8BAA8B,CAAC;AAEhF,MAAM,OAAO,wBAAwB;IACnC;;;OAGG;IACI,MAAM,CAAC,sBAAsB,CAClC,MAAyB;QAEzB,IAAI,MAAM,CAAC,eAAe,EAAE;YAC1B,IACE,MAAM,CAAC,QAAQ,KAAK,OAAO,CAAC,SAAS;gBACrC,MAAM,CAAC,QAAQ,KAAK,OAAO,CAAC,MAAM,EAClC;gBACA,OAAO,gCAAgC,CAAC,MAAM,CAAC;aAChD;iBAAM,IAAI,MAAM,CAAC,SAAS,EAAE;gBAC3B,OAAO,gCAAgC,CAAC,OAAO,CAAC;aACjD;iBAAM;gBACL,IAAI,MAAM,CAAC,QAAQ,KAAK,OAAO,CAAC,EAAE,EAAE;oBAClC,OAAO,gCAAgC,CAAC,WAAW,CAAC;iBACrD;qBAAM;oBACL,OAAO,gCAAgC,CAAC,SAAS,CAAC;iBACnD;aACF;SACF;aAAM;YACL,OAAO,gCAAgC,CAAC,SAAS,CAAC;SACnD;IACH,CAAC;CACF","sourcesContent":["import { ICellEditorParams, KeyCode } from 'ag-grid-community';\n\nimport { SkyAgGridCellEditorInitialAction } from './cell-editor-initial-action';\n\nexport class SkyAgGridCellEditorUtils {\n /**\n * Gets the intiial action that a cell editor should take when initialized.\n * @param params The editor's initializing parameters.\n */\n public static getEditorInitialAction(\n params: ICellEditorParams\n ): SkyAgGridCellEditorInitialAction {\n if (params.cellStartedEdit) {\n if (\n params.keyPress === KeyCode.BACKSPACE ||\n params.keyPress === KeyCode.DELETE\n ) {\n return SkyAgGridCellEditorInitialAction.Delete;\n } else if (params.charPress) {\n return SkyAgGridCellEditorInitialAction.Replace;\n } else {\n if (params.keyPress !== KeyCode.F2) {\n return SkyAgGridCellEditorInitialAction.Highlighted;\n } else {\n return SkyAgGridCellEditorInitialAction.Untouched;\n }\n }\n } else {\n return SkyAgGridCellEditorInitialAction.Untouched;\n }\n }\n}\n"]}
|