@linzjs/step-ag-grid 7.3.2 → 7.5.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/dist/index.js CHANGED
@@ -1330,6 +1330,15 @@ var isFloat = function (value) {
1330
1330
  var regexp = /^-?\d+(\.\d+)?$/;
1331
1331
  return regexp.test(value);
1332
1332
  };
1333
+ var findParentWithClass = function (className, child) {
1334
+ for (var node = child; node; node = node.parentNode) {
1335
+ // When nodes are in portals they aren't type node anymore hence treating it as any here
1336
+ if (node.classList && node.classList.contains(className)) {
1337
+ return node;
1338
+ }
1339
+ }
1340
+ return null;
1341
+ };
1333
1342
  var hasParentClass = function (className, child) {
1334
1343
  for (var node = child; node; node = node.parentNode) {
1335
1344
  // When nodes are in portals they aren't type node anymore hence treating it as any here
@@ -4420,7 +4429,7 @@ var useStateDeferred = function (initialValue) {
4420
4429
  var minimumInProgressTimeMs = 950;
4421
4430
  var ActionButton = function (_a) {
4422
4431
  var _b, _c, _d;
4423
- var icon = _a.icon, name = _a.name, inProgressName = _a.inProgressName, dataTestId = _a.dataTestId, style = _a.style, className = _a.className, title = _a.title, onAction = _a.onAction, externalSetInProgress = _a.externalSetInProgress, _e = _a.size, size = _e === void 0 ? "sm" : _e, _f = _a.iconPosition, iconPosition = _f === void 0 ? "left" : _f, _g = _a.level, level = _g === void 0 ? "tertiary" : _g, ariaLabel = _a["aria-label"];
4432
+ var icon = _a.icon, name = _a.name, inProgressName = _a.inProgressName, dataTestId = _a.dataTestId, style = _a.style, className = _a.className, title = _a.title, onClick = _a.onClick, _e = _a.size, size = _e === void 0 ? "sm" : _e, _f = _a.iconPosition, iconPosition = _f === void 0 ? "left" : _f, _g = _a.level, level = _g === void 0 ? "tertiary" : _g, ariaLabel = _a["aria-label"];
4424
4433
  var _h = React.useState(false), inProgress = _h[0], setInProgress = _h[1];
4425
4434
  var lastInProgress = usePrevious(inProgress !== null && inProgress !== void 0 ? inProgress : false);
4426
4435
  var _j = useStateDeferred(inProgress), localInProgress = _j[0], setLocalInProgress = _j[1], setLocalInProgressDeferred = _j[2];
@@ -4435,18 +4444,16 @@ var ActionButton = function (_a) {
4435
4444
  return __generator(this, function (_a) {
4436
4445
  switch (_a.label) {
4437
4446
  case 0:
4438
- promise = onAction();
4447
+ promise = onClick();
4439
4448
  isPromise = typeof promise !== "undefined";
4440
4449
  if (!isPromise) return [3 /*break*/, 3];
4441
4450
  setInProgress(true);
4442
- externalSetInProgress && setInProgress(true);
4443
4451
  if (!isPromise) return [3 /*break*/, 2];
4444
4452
  return [4 /*yield*/, promise];
4445
4453
  case 1:
4446
4454
  _a.sent();
4447
4455
  _a.label = 2;
4448
4456
  case 2:
4449
- externalSetInProgress && setInProgress(false);
4450
4457
  setInProgress(false);
4451
4458
  _a.label = 3;
4452
4459
  case 3: return [2 /*return*/];
@@ -24375,6 +24382,11 @@ var findQuick = function (filter, container) { return __awaiter(void 0, void 0,
24375
24382
  });
24376
24383
  }); };
24377
24384
 
24385
+ var countRows = function (within) { return __awaiter(void 0, void 0, void 0, function () {
24386
+ return __generator(this, function (_a) {
24387
+ return [2 /*return*/, getAllQuick({ tagName: "div[row-id]:not(:empty)" }, within).length];
24388
+ });
24389
+ }); };
24378
24390
  var findRow = function (rowId, within) { return __awaiter(void 0, void 0, void 0, function () {
24379
24391
  return __generator(this, function (_a) {
24380
24392
  return [2 /*return*/, findQuick({ tagName: "div[row-id='".concat(rowId, "']:not(:empty)") }, within)];
@@ -24427,7 +24439,7 @@ var findCell = function (rowId, colId, within) { return __awaiter(void 0, void 0
24427
24439
  }
24428
24440
  });
24429
24441
  }); };
24430
- var cellContains = function (rowId, colId, text, within) { return __awaiter(void 0, void 0, void 0, function () {
24442
+ var findCellContains = function (rowId, colId, text, within) { return __awaiter(void 0, void 0, void 0, function () {
24431
24443
  return __generator(this, function (_a) {
24432
24444
  switch (_a.label) {
24433
24445
  case 0: return [4 /*yield*/, waitForWrapper(function () { return __awaiter(void 0, void 0, void 0, function () {
@@ -24721,18 +24733,20 @@ exports.bearingCorrectionValueFormatter = bearingCorrectionValueFormatter;
24721
24733
  exports.bearingNumberParser = bearingNumberParser;
24722
24734
  exports.bearingStringValidator = bearingStringValidator;
24723
24735
  exports.bearingValueFormatter = bearingValueFormatter;
24724
- exports.cellContains = cellContains;
24725
24736
  exports.clickActionButton = clickActionButton;
24726
24737
  exports.clickMenuOption = clickMenuOption;
24727
24738
  exports.clickMultiSelectOption = clickMultiSelectOption;
24728
24739
  exports.closeMenu = closeMenu;
24729
24740
  exports.convertDDToDMS = convertDDToDMS;
24741
+ exports.countRows = countRows;
24730
24742
  exports.deselectRow = deselectRow;
24731
24743
  exports.editCell = editCell;
24732
24744
  exports.findActionButton = findActionButton;
24733
24745
  exports.findCell = findCell;
24746
+ exports.findCellContains = findCellContains;
24734
24747
  exports.findMenuOption = findMenuOption;
24735
24748
  exports.findMultiSelectOption = findMultiSelectOption;
24749
+ exports.findParentWithClass = findParentWithClass;
24736
24750
  exports.findRow = findRow;
24737
24751
  exports.getMultiSelectOptions = getMultiSelectOptions;
24738
24752
  exports.hasParentClass = hasParentClass;