@skyux/ag-grid 5.7.0 → 5.8.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 +63 -35
- package/documentation.json +54 -54
- package/esm2015/lib/modules/ag-grid/ag-grid-wrapper.component.js +8 -1
- package/esm2015/lib/modules/ag-grid/ag-grid-wrapper.component.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/ag-grid.service.js +4 -2
- package/esm2015/lib/modules/ag-grid/ag-grid.service.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/cell-editors/cell-editor-currency/cell-editor-currency.component.js +8 -1
- 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-number/cell-editor-number.component.js +4 -1
- 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-text/cell-editor-text.component.js +3 -1
- 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-validator/ag-grid-cell-validator-tooltip.component.js +31 -24
- package/esm2015/lib/modules/ag-grid/cell-validator/ag-grid-cell-validator-tooltip.component.js.map +1 -1
- package/esm2015/lib/modules/ag-grid/types/cell-editor-number-params.js +2 -0
- package/esm2015/lib/modules/ag-grid/types/cell-editor-number-params.js.map +1 -0
- package/esm2015/lib/modules/ag-grid/types/cell-editor-text-params.js +2 -0
- package/esm2015/lib/modules/ag-grid/types/cell-editor-text-params.js.map +1 -0
- package/esm2015/lib/modules/ag-grid/types/number-properties.js +2 -0
- package/esm2015/lib/modules/ag-grid/types/number-properties.js.map +1 -0
- package/esm2015/lib/modules/ag-grid/types/text-properties.js +2 -0
- package/esm2015/lib/modules/ag-grid/types/text-properties.js.map +1 -0
- package/fesm2015/skyux-ag-grid.js +57 -28
- package/fesm2015/skyux-ag-grid.js.map +1 -1
- package/lib/modules/ag-grid/ag-grid-wrapper.component.d.ts +4 -0
- package/lib/modules/ag-grid/cell-editors/cell-editor-currency/cell-editor-currency.component.d.ts +4 -0
- 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-text/cell-editor-text.component.d.ts +3 -2
- package/lib/modules/ag-grid/cell-validator/ag-grid-cell-validator-tooltip.component.d.ts +5 -6
- package/lib/modules/ag-grid/types/cell-editor-number-params.d.ts +5 -0
- package/lib/modules/ag-grid/types/cell-editor-text-params.d.ts +5 -0
- package/lib/modules/ag-grid/types/number-properties.d.ts +7 -0
- package/lib/modules/ag-grid/types/text-properties.d.ts +6 -0
- package/package.json +13 -13
|
@@ -109,6 +109,13 @@ class SkyAgGridWrapperComponent {
|
|
|
109
109
|
this.viewkeeperClasses.push('.ag-header');
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
|
+
/**
|
|
113
|
+
* Prevent closing a modal when focused in AG Grid.
|
|
114
|
+
*/
|
|
115
|
+
onKeyUpEscape($event) {
|
|
116
|
+
$event.stopPropagation();
|
|
117
|
+
this.agGrid.api.stopEditing(true);
|
|
118
|
+
}
|
|
112
119
|
onGridKeydown(event) {
|
|
113
120
|
if (this.agGrid && !this.isInEditMode && event.key === 'Tab') {
|
|
114
121
|
const idToFocus = event.shiftKey
|
|
@@ -156,7 +163,7 @@ class SkyAgGridWrapperComponent {
|
|
|
156
163
|
}
|
|
157
164
|
}
|
|
158
165
|
SkyAgGridWrapperComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridWrapperComponent, deps: [{ token: SkyAgGridAdapterService }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
159
|
-
SkyAgGridWrapperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyAgGridWrapperComponent, selector: "sky-ag-grid-wrapper", 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 [id]=\"gridId\"\n [skyViewkeeper]=\"viewkeeperClasses\"\n (keydown)=\"onGridKeydown($event)\"\n>\n <ng-content></ng-content>\n</div>\n<span\n tabindex=\"0\"\n class=\"nav-anchor\"\n [id]=\"afterAnchorId\"\n (focusin)=\"onAnchorFocus($event)\"\n>\n</span>\n", directives: [{ type: i1.λ3, selector: "[skyViewkeeper]", inputs: ["skyViewkeeper"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
166
|
+
SkyAgGridWrapperComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyAgGridWrapperComponent, selector: "sky-ag-grid-wrapper", 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 [id]=\"gridId\"\n [skyViewkeeper]=\"viewkeeperClasses\"\n (keydown)=\"onGridKeydown($event)\"\n (keyup.escape)=\"onKeyUpEscape($event)\"\n>\n <ng-content></ng-content>\n</div>\n<span\n tabindex=\"0\"\n class=\"nav-anchor\"\n [id]=\"afterAnchorId\"\n (focusin)=\"onAnchorFocus($event)\"\n>\n</span>\n", directives: [{ type: i1.λ3, selector: "[skyViewkeeper]", inputs: ["skyViewkeeper"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
160
167
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridWrapperComponent, decorators: [{
|
|
161
168
|
type: Component,
|
|
162
169
|
args: [{
|
|
@@ -823,9 +830,16 @@ class SkyAgGridCellEditorCurrencyComponent {
|
|
|
823
830
|
getValue() {
|
|
824
831
|
return this.value;
|
|
825
832
|
}
|
|
833
|
+
/**
|
|
834
|
+
* The autoNumeric library's event handler suppresses the escape key event. This additional handler re-enables AG Grid's default functionality.
|
|
835
|
+
*/
|
|
836
|
+
onPressEscape() {
|
|
837
|
+
this.params.api.stopEditing(true);
|
|
838
|
+
this.params.api.setFocusedCell(this.params.rowIndex, this.params.column);
|
|
839
|
+
}
|
|
826
840
|
}
|
|
827
841
|
SkyAgGridCellEditorCurrencyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorCurrencyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
828
|
-
SkyAgGridCellEditorCurrencyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyAgGridCellEditorCurrencyComponent, selector: "sky-ag-grid-cell-editor-currency", viewQueries: [{ propertyName: "input", first: true, predicate: ["skyCellEditorCurrency"], descendants: true, read: ElementRef }], ngImport: i0, template: "<input\n type=\"text\"\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 [(ngModel)]=\"value\"\n [skyAutonumeric]=\"skyComponentProperties\"\n #skyCellEditorCurrency\n/>\n", styles: ["input{border:none;padding-left:11px}\n"], directives: [{ type: i1$4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2.λ1, selector: "input[skyAutonumeric]", inputs: ["skyAutonumeric"] }, { type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "skyLibResources": i3$1.SkyLibResourcesPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
842
|
+
SkyAgGridCellEditorCurrencyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyAgGridCellEditorCurrencyComponent, selector: "sky-ag-grid-cell-editor-currency", viewQueries: [{ propertyName: "input", first: true, predicate: ["skyCellEditorCurrency"], descendants: true, read: ElementRef }], ngImport: i0, template: "<input\n type=\"text\"\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 [(ngModel)]=\"value\"\n [skyAutonumeric]=\"skyComponentProperties\"\n (keyup.escape)=\"onPressEscape()\"\n #skyCellEditorCurrency\n/>\n", styles: ["input{border:none;padding-left:11px}\n"], directives: [{ type: i1$4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2.λ1, selector: "input[skyAutonumeric]", inputs: ["skyAutonumeric"] }, { type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "skyLibResources": i3$1.SkyLibResourcesPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
829
843
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorCurrencyComponent, decorators: [{
|
|
830
844
|
type: Component,
|
|
831
845
|
args: [{
|
|
@@ -1068,8 +1082,11 @@ class SkyAgGridCellEditorNumberComponent {
|
|
|
1068
1082
|
* @param params The cell editor params that include data about the cell, column, row, and grid.
|
|
1069
1083
|
*/
|
|
1070
1084
|
agInit(params) {
|
|
1085
|
+
var _a, _b;
|
|
1071
1086
|
this.params = params;
|
|
1072
1087
|
this.value = this.params.value;
|
|
1088
|
+
this.max = (_a = params.skyComponentProperties) === null || _a === void 0 ? void 0 : _a.max;
|
|
1089
|
+
this.min = (_b = params.skyComponentProperties) === null || _b === void 0 ? void 0 : _b.min;
|
|
1073
1090
|
this.columnHeader = this.params.colDef.headerName;
|
|
1074
1091
|
this.rowNumber = this.params.rowIndex + 1;
|
|
1075
1092
|
this.columnWidth = this.params.column.getActualWidth();
|
|
@@ -1090,7 +1107,7 @@ class SkyAgGridCellEditorNumberComponent {
|
|
|
1090
1107
|
}
|
|
1091
1108
|
}
|
|
1092
1109
|
SkyAgGridCellEditorNumberComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorNumberComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1093
|
-
SkyAgGridCellEditorNumberComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyAgGridCellEditorNumberComponent, selector: "sky-ag-grid-cell-editor-number", viewQueries: [{ propertyName: "input", first: true, predicate: ["skyCellEditorNumber"], descendants: true, read: ElementRef }], ngImport: i0, template: "<input\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 [(ngModel)]=\"value\"\n #skyCellEditorNumber\n/>\n", styles: ["input{border:none;text-align:right}\n"], directives: [{ type: i1$4.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { type: i1$4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "skyLibResources": i3$1.SkyLibResourcesPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1110
|
+
SkyAgGridCellEditorNumberComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyAgGridCellEditorNumberComponent, selector: "sky-ag-grid-cell-editor-number", viewQueries: [{ propertyName: "input", first: true, predicate: ["skyCellEditorNumber"], descendants: true, read: ElementRef }], ngImport: i0, template: "<input\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 [(ngModel)]=\"value\"\n [max]=\"max\"\n [min]=\"min\"\n #skyCellEditorNumber\n/>\n", styles: ["input{border:none;text-align:right}\n"], directives: [{ type: i1$4.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { type: i1$4.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { type: i1$4.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { type: i1$4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "skyLibResources": i3$1.SkyLibResourcesPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1094
1111
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorNumberComponent, decorators: [{
|
|
1095
1112
|
type: Component,
|
|
1096
1113
|
args: [{
|
|
@@ -1127,8 +1144,10 @@ class SkyAgGridCellEditorTextComponent {
|
|
|
1127
1144
|
* @param params The cell editor params that include data about the cell, column, row, and grid.
|
|
1128
1145
|
*/
|
|
1129
1146
|
agInit(params) {
|
|
1147
|
+
var _a;
|
|
1130
1148
|
this.params = params;
|
|
1131
1149
|
this.value = this.params.charPress || this.params.value;
|
|
1150
|
+
this.maxlength = (_a = params.skyComponentProperties) === null || _a === void 0 ? void 0 : _a.maxlength;
|
|
1132
1151
|
this.columnHeader = this.params.colDef.headerName;
|
|
1133
1152
|
this.rowNumber = this.params.rowIndex + 1;
|
|
1134
1153
|
this.columnWidth = this.params.column.getActualWidth();
|
|
@@ -1149,7 +1168,7 @@ class SkyAgGridCellEditorTextComponent {
|
|
|
1149
1168
|
}
|
|
1150
1169
|
}
|
|
1151
1170
|
SkyAgGridCellEditorTextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorTextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1152
|
-
SkyAgGridCellEditorTextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyAgGridCellEditorTextComponent, selector: "sky-ag-grid-cell-editor-text", viewQueries: [{ propertyName: "input", first: true, predicate: ["skyCellEditorText"], descendants: true, read: ElementRef }], ngImport: i0, template: "<input\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 [(ngModel)]=\"value\"\n #skyCellEditorText\n/>\n", styles: ["input{border:none;padding-left:11px}\n"], directives: [{ type: i1$4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "skyLibResources": i3$1.SkyLibResourcesPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1171
|
+
SkyAgGridCellEditorTextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyAgGridCellEditorTextComponent, selector: "sky-ag-grid-cell-editor-text", viewQueries: [{ propertyName: "input", first: true, predicate: ["skyCellEditorText"], descendants: true, read: ElementRef }], ngImport: i0, template: "<input\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 [(ngModel)]=\"value\"\n [maxlength]=\"maxlength\"\n #skyCellEditorText\n/>\n", styles: ["input{border:none;padding-left:11px}\n"], directives: [{ type: i1$4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i1$4.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }], pipes: { "skyLibResources": i3$1.SkyLibResourcesPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1153
1172
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellEditorTextComponent, decorators: [{
|
|
1154
1173
|
type: Component,
|
|
1155
1174
|
args: [{
|
|
@@ -1181,14 +1200,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1181
1200
|
* @internal
|
|
1182
1201
|
*/
|
|
1183
1202
|
class SkyAgGridCellValidatorTooltipComponent {
|
|
1184
|
-
constructor(changeDetector
|
|
1203
|
+
constructor(changeDetector) {
|
|
1185
1204
|
this.changeDetector = changeDetector;
|
|
1186
|
-
this.zone = zone;
|
|
1187
|
-
this.indicatorShouldShow = true;
|
|
1188
1205
|
this.popoverMessageStream = new Subject();
|
|
1189
1206
|
}
|
|
1190
1207
|
set params(value) {
|
|
1191
|
-
var _a, _b, _c, _d, _e;
|
|
1208
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
1192
1209
|
this.cellRendererParams = value;
|
|
1193
1210
|
/*istanbul ignore next*/
|
|
1194
1211
|
(_a = this.cellRendererParams.api) === null || _a === void 0 ? void 0 : _a.addEventListener(Events.EVENT_CELL_FOCUSED, (eventParams) => {
|
|
@@ -1205,41 +1222,51 @@ class SkyAgGridCellValidatorTooltipComponent {
|
|
|
1205
1222
|
this.showPopover();
|
|
1206
1223
|
}
|
|
1207
1224
|
});
|
|
1225
|
+
(_c = this.cellRendererParams.eGridCell) === null || _c === void 0 ? void 0 : _c.addEventListener('mouseenter', () => {
|
|
1226
|
+
this.scheduleDelayedPopover();
|
|
1227
|
+
});
|
|
1228
|
+
(_d = this.cellRendererParams.eGridCell) === null || _d === void 0 ? void 0 : _d.addEventListener('mouseleave', () => {
|
|
1229
|
+
this.hidePopover();
|
|
1230
|
+
});
|
|
1208
1231
|
/*istanbul ignore next*/
|
|
1209
|
-
(
|
|
1232
|
+
(_e = this.cellRendererParams.api) === null || _e === void 0 ? void 0 : _e.addEventListener(Events.EVENT_CELL_EDITING_STARTED, () => {
|
|
1210
1233
|
this.hidePopover();
|
|
1211
1234
|
});
|
|
1212
|
-
if (typeof ((
|
|
1235
|
+
if (typeof ((_f = this.cellRendererParams.skyComponentProperties) === null || _f === void 0 ? void 0 : _f.validatorMessage) === 'function') {
|
|
1213
1236
|
this.validatorMessage =
|
|
1214
1237
|
this.cellRendererParams.skyComponentProperties.validatorMessage(this.cellRendererParams.value, this.cellRendererParams.data, this.cellRendererParams.rowIndex);
|
|
1215
1238
|
}
|
|
1216
1239
|
else {
|
|
1217
1240
|
this.validatorMessage =
|
|
1218
|
-
(
|
|
1241
|
+
(_g = this.cellRendererParams.skyComponentProperties) === null || _g === void 0 ? void 0 : _g.validatorMessage;
|
|
1219
1242
|
}
|
|
1220
1243
|
this.changeDetector.markForCheck();
|
|
1221
1244
|
}
|
|
1222
|
-
hideIndicator() {
|
|
1223
|
-
this.zone.run(() => {
|
|
1224
|
-
this.indicatorShouldShow = false;
|
|
1225
|
-
this.changeDetector.detectChanges();
|
|
1226
|
-
});
|
|
1227
|
-
}
|
|
1228
1245
|
hidePopover() {
|
|
1246
|
+
this.cancelDelayedPopover();
|
|
1229
1247
|
this.popoverMessageStream.next({ type: SkyPopoverMessageType.Close });
|
|
1230
1248
|
}
|
|
1231
|
-
showIndicator() {
|
|
1232
|
-
this.zone.run(() => {
|
|
1233
|
-
this.indicatorShouldShow = true;
|
|
1234
|
-
this.changeDetector.detectChanges();
|
|
1235
|
-
});
|
|
1236
|
-
}
|
|
1237
1249
|
showPopover() {
|
|
1250
|
+
this.cancelDelayedPopover();
|
|
1238
1251
|
this.popoverMessageStream.next({ type: SkyPopoverMessageType.Open });
|
|
1239
1252
|
}
|
|
1253
|
+
scheduleDelayedPopover() {
|
|
1254
|
+
/* istanbul ignore else */
|
|
1255
|
+
if (!this._hoverTimeout) {
|
|
1256
|
+
this._hoverTimeout = window.setTimeout(() => {
|
|
1257
|
+
this.showPopover();
|
|
1258
|
+
}, 300);
|
|
1259
|
+
}
|
|
1260
|
+
}
|
|
1261
|
+
cancelDelayedPopover() {
|
|
1262
|
+
if (this._hoverTimeout) {
|
|
1263
|
+
window.clearTimeout(this._hoverTimeout);
|
|
1264
|
+
this._hoverTimeout = undefined;
|
|
1265
|
+
}
|
|
1266
|
+
}
|
|
1240
1267
|
}
|
|
1241
|
-
SkyAgGridCellValidatorTooltipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellValidatorTooltipComponent, deps: [{ token: i0.ChangeDetectorRef }
|
|
1242
|
-
SkyAgGridCellValidatorTooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyAgGridCellValidatorTooltipComponent, selector: "sky-ag-grid-cell-validator-tooltip", inputs: { params: "params" }, ngImport: i0, template: "<div\n [skyPopover]=\"validatorPopover\"\n [skyPopoverMessageStream]=\"popoverMessageStream\"\n class=\"sky-validator-cell\"\n>\n <ng-content></ng-content>\n <sky-status-indicator\n
|
|
1268
|
+
SkyAgGridCellValidatorTooltipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellValidatorTooltipComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1269
|
+
SkyAgGridCellValidatorTooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyAgGridCellValidatorTooltipComponent, selector: "sky-ag-grid-cell-validator-tooltip", inputs: { params: "params" }, ngImport: i0, template: "<div\n [skyPopover]=\"validatorPopover\"\n [skyPopoverMessageStream]=\"popoverMessageStream\"\n class=\"sky-validator-cell\"\n>\n <ng-content></ng-content>\n <sky-status-indicator\n descriptionType=\"none\"\n indicatorType=\"danger\"\n class=\"sky-pull-right\"\n ></sky-status-indicator>\n</div>\n<sky-popover #validatorPopover popoverType=\"danger\">\n {{ validatorMessage }}\n</sky-popover>\n", styles: [":host div.sky-validator-cell{height:100%;width:100%}:host div.sky-validator-cell:focus{outline:none}\n"], components: [{ type: i1$7.λ10, selector: "sky-status-indicator", inputs: ["indicatorType", "descriptionType", "customDescription"] }, { type: i2$2.λ6, selector: "sky-popover", inputs: ["alignment", "dismissOnBlur", "placement", "popoverTitle", "popoverType"], outputs: ["popoverClosed", "popoverOpened"] }], directives: [{ type: i2$2.λ7, selector: "[skyPopover]", inputs: ["skyPopover", "skyPopoverAlignment", "skyPopoverMessageStream", "skyPopoverPlacement", "skyPopoverTrigger"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1243
1270
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAgGridCellValidatorTooltipComponent, decorators: [{
|
|
1244
1271
|
type: Component,
|
|
1245
1272
|
args: [{
|
|
@@ -1248,7 +1275,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1248
1275
|
templateUrl: 'ag-grid-cell-validator-tooltip.component.html',
|
|
1249
1276
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1250
1277
|
}]
|
|
1251
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }
|
|
1278
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { params: [{
|
|
1252
1279
|
type: Input
|
|
1253
1280
|
}] } });
|
|
1254
1281
|
|
|
@@ -1940,7 +1967,8 @@ class SkyAgGridService {
|
|
|
1940
1967
|
minWidth: 185,
|
|
1941
1968
|
},
|
|
1942
1969
|
[SkyCellType.Number]: {
|
|
1943
|
-
cellClassRules: Object.assign({ [SkyCellClass.Number]: cellClassRuleTrueExpression }, editableCellClassRules),
|
|
1970
|
+
cellClassRules: Object.assign(Object.assign({ [SkyCellClass.Number]: cellClassRuleTrueExpression }, validatorCellClassRules), editableCellClassRules),
|
|
1971
|
+
cellRendererSelector: getValidatorCellRendererSelector('sky-ag-grid-cell-renderer-validator-tooltip'),
|
|
1944
1972
|
cellEditorFramework: SkyAgGridCellEditorNumberComponent,
|
|
1945
1973
|
headerClass: SkyHeaderClass.RightAligned,
|
|
1946
1974
|
},
|
|
@@ -1957,8 +1985,9 @@ class SkyAgGridService {
|
|
|
1957
1985
|
width: 55,
|
|
1958
1986
|
},
|
|
1959
1987
|
[SkyCellType.Text]: {
|
|
1960
|
-
cellClassRules: Object.assign({ [SkyCellClass.Text]: cellClassRuleTrueExpression }, editableCellClassRules),
|
|
1988
|
+
cellClassRules: Object.assign(Object.assign({ [SkyCellClass.Text]: cellClassRuleTrueExpression }, validatorCellClassRules), editableCellClassRules),
|
|
1961
1989
|
cellEditorFramework: SkyAgGridCellEditorTextComponent,
|
|
1990
|
+
cellRendererSelector: getValidatorCellRendererSelector('sky-ag-grid-cell-renderer-validator-tooltip'),
|
|
1962
1991
|
},
|
|
1963
1992
|
[SkyCellType.Validator]: {
|
|
1964
1993
|
cellClassRules: Object.assign(Object.assign({}, validatorCellClassRules), editableCellClassRules),
|