@linzjs/step-ag-grid 7.3.0 → 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.
@@ -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) => void;
17
+ ensureRowVisible: (id: number | string) => boolean;
18
18
  ensureSelectedRowIsVisible: () => void;
19
19
  sizeColumnsToFit: () => void;
20
20
  stopEditing: () => void;
@@ -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
- node && gridApi.ensureNodeVisible(node);
2212
+ if (!node)
2213
+ return false;
2214
+ gridApi.ensureNodeVisible(node);
2215
+ return true;
2212
2216
  });
2213
2217
  };
2214
2218
  /**
@@ -3380,7 +3384,7 @@ var GridFormDropDown = function (props) {
3380
3384
  return [2 /*return*/];
3381
3385
  });
3382
3386
  }); }
3383
- } }, { children: item.subComponent && (jsx(item.subComponent, {}, "".concat(fieldToString(field), "-").concat(index, "_subcomponent_inner"))) }))); } }), "".concat(item.label, "_subcomponent")))] }, "menu-wrapper-".concat(index)));
3387
+ } }, { children: item.subComponent && (jsx("div", __assign({ className: "subComponent" }, { children: jsx(item.subComponent, {}, "".concat(fieldToString(field), "-").concat(index, "_subcomponent_inner")) }))) }))); } }), "".concat(item.label, "_subcomponent")))] }, "menu-wrapper-".concat(index)));
3384
3388
  })] }) }))] }));
3385
3389
  };
3386
3390
 
@@ -3751,7 +3755,7 @@ var MenuSubComponent = function (props) {
3751
3755
  subComponentIsValid["".concat(item.value)] = valid;
3752
3756
  },
3753
3757
  triggerSave: triggerSave
3754
- } }, { children: jsx(item.subComponent, {}) })));
3758
+ } }, { children: jsx("div", __assign({ className: "subComponent" }, { children: jsx(item.subComponent, {}) })) })));
3755
3759
  } }), "".concat(item.value, "_subcomponent")));
3756
3760
  };
3757
3761
 
@@ -3897,7 +3901,7 @@ var GridFormPopoverMenu = function (props) {
3897
3901
  subComponentIsValid.current = valid;
3898
3902
  },
3899
3903
  triggerSave: triggerSave
3900
- } }, { children: jsx(item.subComponent, {}) })));
3904
+ } }, { children: jsx("div", __assign({ className: "subComponent" }, { children: jsx(item.subComponent, {}) })) })));
3901
3905
  } }), "".concat(item.label, "_subcomponent")))] }, "".concat(item.label))));
3902
3906
  }) }) })));
3903
3907
  };
@@ -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) {
@@ -4319,7 +4323,7 @@ var GridFormSubComponentTextArea = function (props) {
4319
4323
  useEffect(function () {
4320
4324
  setValid(value != null && invalid() == null);
4321
4325
  }, [setValid, invalid, value]);
4322
- return (jsx("div", __assign({ className: clsx("FreeTextInput LuiDeprecatedForms", props.className) }, { children: jsx(TextAreaInput, { className: "free-text-input", value: value, onChange: function (e) { return setValue(e.target.value); }, error: invalid(), helpText: helpText, autoFocus: true, placeholder: props.placeholder }) })));
4326
+ return (jsx("div", __assign({ className: clsx("FreeTextInput", props.className) }, { children: jsx(TextAreaInput, { className: "free-text-input", value: value, onChange: function (e) { return setValue(e.target.value); }, error: invalid(), helpText: helpText, autoFocus: true, placeholder: props.placeholder }) })));
4323
4327
  };
4324
4328
 
4325
4329
  var css_248z = ".ActionButton{align-items:center;display:flex}.ActionButton-minimal{padding-right:38px!important}.ActionButton .LuiIcon{margin:0 4px!important}.ActionButton-minimalArea{position:relative}.ActionButton-minimalAreaDisplay{position:absolute}.ActionButton-minimalAreaExpand{visibility:hidden}.ActionButton-inProgress{background-color:#e2f3f7!important;color:#007198!important;cursor:progress}.ActionButton-inProgress svg *{fill:#0000!important}.ActionButton-fill{justify-content:center;width:100%}";
@@ -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
  });
@@ -24453,14 +24457,14 @@ var editCell = function (rowId, colId, within) { return __awaiter(void 0, void 0
24453
24457
  case 1:
24454
24458
  cell = _a.sent();
24455
24459
  userEvent.dblClick(cell);
24456
- return [4 /*yield*/, findOpenMenu()];
24457
- case 2:
24458
- _a.sent();
24459
24460
  return [2 /*return*/];
24460
24461
  }
24461
24462
  });
24462
24463
  }); })];
24463
24464
  case 1:
24465
+ _a.sent();
24466
+ return [4 /*yield*/, findOpenMenu()];
24467
+ case 2:
24464
24468
  _a.sent();
24465
24469
  return [2 /*return*/];
24466
24470
  }
@@ -24501,7 +24505,7 @@ var findMenuOption = function (menuOptionText) { return __awaiter(void 0, void 0
24501
24505
  return [2 /*return*/, menuOption];
24502
24506
  }
24503
24507
  });
24504
- }); })];
24508
+ }); }, { timeout: 10000 })];
24505
24509
  case 1: return [2 /*return*/, _a.sent()];
24506
24510
  }
24507
24511
  });
@@ -24533,8 +24537,11 @@ var openAndClickMenuOption = function (rowId, colId, menuOptionText, within) { r
24533
24537
  case 0: return [4 /*yield*/, editCell(rowId, colId, within)];
24534
24538
  case 1:
24535
24539
  _a.sent();
24536
- return [4 /*yield*/, clickMenuOption(menuOptionText)];
24540
+ return [4 /*yield*/, wait$2(100)];
24537
24541
  case 2:
24542
+ _a.sent();
24543
+ return [4 /*yield*/, clickMenuOption(menuOptionText)];
24544
+ case 3:
24538
24545
  _a.sent();
24539
24546
  return [2 /*return*/];
24540
24547
  }
@@ -24587,9 +24594,10 @@ var typeOtherInput = function (value) { return __awaiter(void 0, void 0, void 0,
24587
24594
  case 0: return [4 /*yield*/, findOpenMenu()];
24588
24595
  case 1:
24589
24596
  openMenu = _a.sent();
24590
- return [4 /*yield*/, findQuick({ tagName: "input[type='text']" }, openMenu)];
24597
+ return [4 /*yield*/, findQuick({ classes: ".subComponent", child: { tagName: "input[type='text']" } }, openMenu)];
24591
24598
  case 2:
24592
24599
  otherInput = _a.sent();
24600
+ userEvent.clear(otherInput);
24593
24601
  userEvent.type(otherInput, value);
24594
24602
  return [2 /*return*/];
24595
24603
  }
@@ -24602,9 +24610,10 @@ var typeOtherTextArea = function (value) { return __awaiter(void 0, void 0, void
24602
24610
  case 0: return [4 /*yield*/, findOpenMenu()];
24603
24611
  case 1:
24604
24612
  openMenu = _a.sent();
24605
- return [4 /*yield*/, findQuick({ tagName: "textarea" }, openMenu)];
24613
+ return [4 /*yield*/, findQuick({ classes: ".subComponent", child: { tagName: "textarea" } }, openMenu)];
24606
24614
  case 2:
24607
24615
  otherTextArea = _a.sent();
24616
+ userEvent.clear(otherTextArea);
24608
24617
  userEvent.type(otherTextArea, value);
24609
24618
  return [2 /*return*/];
24610
24619
  }