@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.
package/dist/index.js CHANGED
@@ -2012,6 +2012,7 @@ var GridContext = React.createContext({
2012
2012
  }); },
2013
2013
  ensureRowVisible: function () {
2014
2014
  console.error("no context provider for ensureRowVisible");
2015
+ return true;
2015
2016
  },
2016
2017
  ensureSelectedRowIsVisible: function () {
2017
2018
  console.error("no context provider for ensureSelectedRowIsVisible");
@@ -2227,9 +2228,12 @@ var GridContextProvider = function (props) {
2227
2228
  return gridApiOp(function (gridApi) { return isNotEmpty(gridApi.getEditingCells()); }, function () { return false; });
2228
2229
  };
2229
2230
  var ensureRowVisible = function (id) {
2230
- gridApiOp(function (gridApi) {
2231
+ return gridApiOp(function (gridApi) {
2231
2232
  var node = gridApi.getRowNode("".concat(id));
2232
- node && gridApi.ensureNodeVisible(node);
2233
+ if (!node)
2234
+ return false;
2235
+ gridApi.ensureNodeVisible(node);
2236
+ return true;
2233
2237
  });
2234
2238
  };
2235
2239
  /**
@@ -3401,7 +3405,7 @@ var GridFormDropDown = function (props) {
3401
3405
  return [2 /*return*/];
3402
3406
  });
3403
3407
  }); }
3404
- } }, { children: item.subComponent && (jsxRuntime.jsx(item.subComponent, {}, "".concat(fieldToString(field), "-").concat(index, "_subcomponent_inner"))) }))); } }), "".concat(item.label, "_subcomponent")))] }, "menu-wrapper-".concat(index)));
3408
+ } }, { children: item.subComponent && (jsxRuntime.jsx("div", __assign({ className: "subComponent" }, { children: jsxRuntime.jsx(item.subComponent, {}, "".concat(fieldToString(field), "-").concat(index, "_subcomponent_inner")) }))) }))); } }), "".concat(item.label, "_subcomponent")))] }, "menu-wrapper-".concat(index)));
3405
3409
  })] }) }))] }));
3406
3410
  };
3407
3411
 
@@ -3772,7 +3776,7 @@ var MenuSubComponent = function (props) {
3772
3776
  subComponentIsValid["".concat(item.value)] = valid;
3773
3777
  },
3774
3778
  triggerSave: triggerSave
3775
- } }, { children: jsxRuntime.jsx(item.subComponent, {}) })));
3779
+ } }, { children: jsxRuntime.jsx("div", __assign({ className: "subComponent" }, { children: jsxRuntime.jsx(item.subComponent, {}) })) })));
3776
3780
  } }), "".concat(item.value, "_subcomponent")));
3777
3781
  };
3778
3782
 
@@ -3918,7 +3922,7 @@ var GridFormPopoverMenu = function (props) {
3918
3922
  subComponentIsValid.current = valid;
3919
3923
  },
3920
3924
  triggerSave: triggerSave
3921
- } }, { children: jsxRuntime.jsx(item.subComponent, {}) })));
3925
+ } }, { children: jsxRuntime.jsx("div", __assign({ className: "subComponent" }, { children: jsxRuntime.jsx(item.subComponent, {}) })) })));
3922
3926
  } }), "".concat(item.label, "_subcomponent")))] }, "".concat(item.label))));
3923
3927
  }) }) })));
3924
3928
  };
@@ -4267,7 +4271,7 @@ var GridFormTextArea = function (props) {
4267
4271
  invalid: invalid,
4268
4272
  save: save
4269
4273
  }).popoverWrapper;
4270
- return popoverWrapper(jsxRuntime.jsx("div", __assign({ style: { display: "flex", flexDirection: "row", width: (_b = props.width) !== null && _b !== void 0 ? _b : 240 } }, { children: jsxRuntime.jsx(TextAreaInput, { value: value, onChange: function (e) { return setValue(e.target.value); }, error: invalid(), placeholder: props.placeholder, helpText: helpText }) })));
4274
+ return popoverWrapper(jsxRuntime.jsx("div", __assign({ className: "subComponent", style: { display: "flex", flexDirection: "row", width: (_b = props.width) !== null && _b !== void 0 ? _b : 240 } }, { children: jsxRuntime.jsx(TextAreaInput, { value: value, onChange: function (e) { return setValue(e.target.value); }, error: invalid(), placeholder: props.placeholder, helpText: helpText }) })));
4271
4275
  };
4272
4276
 
4273
4277
  var GridPopoverTextArea = function (colDef, params) { return GridCell(colDef, __assign({ editor: GridFormTextArea }, params)); };
@@ -4304,7 +4308,7 @@ var GridFormTextInput = function (props) {
4304
4308
  invalid: invalid,
4305
4309
  save: save
4306
4310
  }).popoverWrapper;
4307
- return popoverWrapper(jsxRuntime.jsx("div", __assign({ style: { display: "flex", flexDirection: "row", width: (_b = props.width) !== null && _b !== void 0 ? _b : 240 }, className: "FormTest" }, { children: jsxRuntime.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 }) })));
4311
+ return popoverWrapper(jsxRuntime.jsx("div", __assign({ style: { display: "flex", flexDirection: "row", width: (_b = props.width) !== null && _b !== void 0 ? _b : 240 }, className: "FormTest subComponent" }, { children: jsxRuntime.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 }) })));
4308
4312
  };
4309
4313
 
4310
4314
  var GridPopoverTextInput = function (colDef, params) {
@@ -4340,7 +4344,7 @@ var GridFormSubComponentTextArea = function (props) {
4340
4344
  React.useEffect(function () {
4341
4345
  setValid(value != null && invalid() == null);
4342
4346
  }, [setValid, invalid, value]);
4343
- return (jsxRuntime.jsx("div", __assign({ className: clsx("FreeTextInput LuiDeprecatedForms", props.className) }, { children: jsxRuntime.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 }) })));
4347
+ return (jsxRuntime.jsx("div", __assign({ className: clsx("FreeTextInput", props.className) }, { children: jsxRuntime.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 }) })));
4344
4348
  };
4345
4349
 
4346
4350
  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%}";
@@ -24437,7 +24441,7 @@ var cellContains = function (rowId, colId, text, within) { return __awaiter(void
24437
24441
  case 2: return [2 /*return*/, _a.sent()];
24438
24442
  }
24439
24443
  });
24440
- }); })];
24444
+ }); }, { timeout: 10000 })];
24441
24445
  case 1: return [2 /*return*/, _a.sent()];
24442
24446
  }
24443
24447
  });
@@ -24474,14 +24478,14 @@ var editCell = function (rowId, colId, within) { return __awaiter(void 0, void 0
24474
24478
  case 1:
24475
24479
  cell = _a.sent();
24476
24480
  userEvent.dblClick(cell);
24477
- return [4 /*yield*/, findOpenMenu()];
24478
- case 2:
24479
- _a.sent();
24480
24481
  return [2 /*return*/];
24481
24482
  }
24482
24483
  });
24483
24484
  }); })];
24484
24485
  case 1:
24486
+ _a.sent();
24487
+ return [4 /*yield*/, findOpenMenu()];
24488
+ case 2:
24485
24489
  _a.sent();
24486
24490
  return [2 /*return*/];
24487
24491
  }
@@ -24522,7 +24526,7 @@ var findMenuOption = function (menuOptionText) { return __awaiter(void 0, void 0
24522
24526
  return [2 /*return*/, menuOption];
24523
24527
  }
24524
24528
  });
24525
- }); })];
24529
+ }); }, { timeout: 10000 })];
24526
24530
  case 1: return [2 /*return*/, _a.sent()];
24527
24531
  }
24528
24532
  });
@@ -24554,8 +24558,11 @@ var openAndClickMenuOption = function (rowId, colId, menuOptionText, within) { r
24554
24558
  case 0: return [4 /*yield*/, editCell(rowId, colId, within)];
24555
24559
  case 1:
24556
24560
  _a.sent();
24557
- return [4 /*yield*/, clickMenuOption(menuOptionText)];
24561
+ return [4 /*yield*/, wait$2(100)];
24558
24562
  case 2:
24563
+ _a.sent();
24564
+ return [4 /*yield*/, clickMenuOption(menuOptionText)];
24565
+ case 3:
24559
24566
  _a.sent();
24560
24567
  return [2 /*return*/];
24561
24568
  }
@@ -24608,9 +24615,10 @@ var typeOtherInput = function (value) { return __awaiter(void 0, void 0, void 0,
24608
24615
  case 0: return [4 /*yield*/, findOpenMenu()];
24609
24616
  case 1:
24610
24617
  openMenu = _a.sent();
24611
- return [4 /*yield*/, findQuick({ tagName: "input[type='text']" }, openMenu)];
24618
+ return [4 /*yield*/, findQuick({ classes: ".subComponent", child: { tagName: "input[type='text']" } }, openMenu)];
24612
24619
  case 2:
24613
24620
  otherInput = _a.sent();
24621
+ userEvent.clear(otherInput);
24614
24622
  userEvent.type(otherInput, value);
24615
24623
  return [2 /*return*/];
24616
24624
  }
@@ -24623,9 +24631,10 @@ var typeOtherTextArea = function (value) { return __awaiter(void 0, void 0, void
24623
24631
  case 0: return [4 /*yield*/, findOpenMenu()];
24624
24632
  case 1:
24625
24633
  openMenu = _a.sent();
24626
- return [4 /*yield*/, findQuick({ tagName: "textarea" }, openMenu)];
24634
+ return [4 /*yield*/, findQuick({ classes: ".subComponent", child: { tagName: "textarea" } }, openMenu)];
24627
24635
  case 2:
24628
24636
  otherTextArea = _a.sent();
24637
+ userEvent.clear(otherTextArea);
24629
24638
  userEvent.type(otherTextArea, value);
24630
24639
  return [2 /*return*/];
24631
24640
  }