@linzjs/step-ag-grid 7.4.0 → 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 +12 -4
- package/dist/index.js.map +1 -1
- package/dist/src/lui/ActionButton.d.ts +2 -3
- package/dist/src/utils/util.d.ts +1 -0
- package/dist/step-ag-grid.esm.js +12 -5
- package/dist/step-ag-grid.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/lui/ActionButton.tsx +3 -8
- package/src/stories/components/ActionButton.stories.tsx +3 -3
- package/src/stories/grid/GridPopoutEditGenericTextArea.stories.tsx +1 -1
- package/src/utils/util.ts +10 -0
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,
|
|
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 =
|
|
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*/];
|
|
@@ -24739,6 +24746,7 @@ exports.findCell = findCell;
|
|
|
24739
24746
|
exports.findCellContains = findCellContains;
|
|
24740
24747
|
exports.findMenuOption = findMenuOption;
|
|
24741
24748
|
exports.findMultiSelectOption = findMultiSelectOption;
|
|
24749
|
+
exports.findParentWithClass = findParentWithClass;
|
|
24742
24750
|
exports.findRow = findRow;
|
|
24743
24751
|
exports.getMultiSelectOptions = getMultiSelectOptions;
|
|
24744
24752
|
exports.hasParentClass = hasParentClass;
|