@linzjs/step-ag-grid 7.3.1 → 7.3.2
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/dist/index.js +11 -5
- package/dist/index.js.map +1 -1
- package/dist/src/contexts/GridContext.d.ts +1 -1
- package/dist/step-ag-grid.esm.js +11 -5
- package/dist/step-ag-grid.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/gridForm/GridFormTextArea.tsx +1 -1
- package/src/components/gridForm/GridFormTextInput.tsx +4 -1
- package/src/contexts/GridContext.tsx +2 -1
- package/src/contexts/GridContextProvider.tsx +5 -3
- package/src/utils/testUtil.ts +9 -4
|
@@ -14,7 +14,7 @@ export interface GridContextType {
|
|
|
14
14
|
selectRowsByIdWithFlash: (rowIds?: number[]) => void;
|
|
15
15
|
flashRows: (rowIds?: number[]) => void;
|
|
16
16
|
flashRowsDiff: (updateFn: () => Promise<any>) => Promise<void>;
|
|
17
|
-
ensureRowVisible: (id: number) =>
|
|
17
|
+
ensureRowVisible: (id: number | string) => boolean;
|
|
18
18
|
ensureSelectedRowIsVisible: () => void;
|
|
19
19
|
sizeColumnsToFit: () => void;
|
|
20
20
|
stopEditing: () => void;
|
package/dist/step-ag-grid.esm.js
CHANGED
|
@@ -1991,6 +1991,7 @@ var GridContext = createContext({
|
|
|
1991
1991
|
}); },
|
|
1992
1992
|
ensureRowVisible: function () {
|
|
1993
1993
|
console.error("no context provider for ensureRowVisible");
|
|
1994
|
+
return true;
|
|
1994
1995
|
},
|
|
1995
1996
|
ensureSelectedRowIsVisible: function () {
|
|
1996
1997
|
console.error("no context provider for ensureSelectedRowIsVisible");
|
|
@@ -2206,9 +2207,12 @@ var GridContextProvider = function (props) {
|
|
|
2206
2207
|
return gridApiOp(function (gridApi) { return isNotEmpty(gridApi.getEditingCells()); }, function () { return false; });
|
|
2207
2208
|
};
|
|
2208
2209
|
var ensureRowVisible = function (id) {
|
|
2209
|
-
gridApiOp(function (gridApi) {
|
|
2210
|
+
return gridApiOp(function (gridApi) {
|
|
2210
2211
|
var node = gridApi.getRowNode("".concat(id));
|
|
2211
|
-
|
|
2212
|
+
if (!node)
|
|
2213
|
+
return false;
|
|
2214
|
+
gridApi.ensureNodeVisible(node);
|
|
2215
|
+
return true;
|
|
2212
2216
|
});
|
|
2213
2217
|
};
|
|
2214
2218
|
/**
|
|
@@ -4246,7 +4250,7 @@ var GridFormTextArea = function (props) {
|
|
|
4246
4250
|
invalid: invalid,
|
|
4247
4251
|
save: save
|
|
4248
4252
|
}).popoverWrapper;
|
|
4249
|
-
return popoverWrapper(jsx("div", __assign({ style: { display: "flex", flexDirection: "row", width: (_b = props.width) !== null && _b !== void 0 ? _b : 240 } }, { children: jsx(TextAreaInput, { value: value, onChange: function (e) { return setValue(e.target.value); }, error: invalid(), placeholder: props.placeholder, helpText: helpText }) })));
|
|
4253
|
+
return popoverWrapper(jsx("div", __assign({ className: "subComponent", style: { display: "flex", flexDirection: "row", width: (_b = props.width) !== null && _b !== void 0 ? _b : 240 } }, { children: jsx(TextAreaInput, { value: value, onChange: function (e) { return setValue(e.target.value); }, error: invalid(), placeholder: props.placeholder, helpText: helpText }) })));
|
|
4250
4254
|
};
|
|
4251
4255
|
|
|
4252
4256
|
var GridPopoverTextArea = function (colDef, params) { return GridCell(colDef, __assign({ editor: GridFormTextArea }, params)); };
|
|
@@ -4283,7 +4287,7 @@ var GridFormTextInput = function (props) {
|
|
|
4283
4287
|
invalid: invalid,
|
|
4284
4288
|
save: save
|
|
4285
4289
|
}).popoverWrapper;
|
|
4286
|
-
return popoverWrapper(jsx("div", __assign({ style: { display: "flex", flexDirection: "row", width: (_b = props.width) !== null && _b !== void 0 ? _b : 240 }, className: "FormTest" }, { children: jsx(TextInputFormatted, { value: value, onChange: function (e) { return setValue(e.target.value); }, error: invalid(), formatted: props.units, style: { width: "100%" }, placeholder: props.placeholder, helpText: helpText }) })));
|
|
4290
|
+
return popoverWrapper(jsx("div", __assign({ style: { display: "flex", flexDirection: "row", width: (_b = props.width) !== null && _b !== void 0 ? _b : 240 }, className: "FormTest subComponent" }, { children: jsx(TextInputFormatted, { value: value, onChange: function (e) { return setValue(e.target.value); }, error: invalid(), formatted: props.units, style: { width: "100%" }, placeholder: props.placeholder, helpText: helpText }) })));
|
|
4287
4291
|
};
|
|
4288
4292
|
|
|
4289
4293
|
var GridPopoverTextInput = function (colDef, params) {
|
|
@@ -24416,7 +24420,7 @@ var cellContains = function (rowId, colId, text, within) { return __awaiter(void
|
|
|
24416
24420
|
case 2: return [2 /*return*/, _a.sent()];
|
|
24417
24421
|
}
|
|
24418
24422
|
});
|
|
24419
|
-
}); })];
|
|
24423
|
+
}); }, { timeout: 10000 })];
|
|
24420
24424
|
case 1: return [2 /*return*/, _a.sent()];
|
|
24421
24425
|
}
|
|
24422
24426
|
});
|
|
@@ -24593,6 +24597,7 @@ var typeOtherInput = function (value) { return __awaiter(void 0, void 0, void 0,
|
|
|
24593
24597
|
return [4 /*yield*/, findQuick({ classes: ".subComponent", child: { tagName: "input[type='text']" } }, openMenu)];
|
|
24594
24598
|
case 2:
|
|
24595
24599
|
otherInput = _a.sent();
|
|
24600
|
+
userEvent.clear(otherInput);
|
|
24596
24601
|
userEvent.type(otherInput, value);
|
|
24597
24602
|
return [2 /*return*/];
|
|
24598
24603
|
}
|
|
@@ -24608,6 +24613,7 @@ var typeOtherTextArea = function (value) { return __awaiter(void 0, void 0, void
|
|
|
24608
24613
|
return [4 /*yield*/, findQuick({ classes: ".subComponent", child: { tagName: "textarea" } }, openMenu)];
|
|
24609
24614
|
case 2:
|
|
24610
24615
|
otherTextArea = _a.sent();
|
|
24616
|
+
userEvent.clear(otherTextArea);
|
|
24611
24617
|
userEvent.type(otherTextArea, value);
|
|
24612
24618
|
return [2 /*return*/];
|
|
24613
24619
|
}
|