@paubox/ui 1.9.0 → 1.9.1
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/index.esm.js +17 -9
- package/package.json +1 -1
- package/src/lib/Modal/Modal.d.ts +1 -0
package/index.esm.js
CHANGED
|
@@ -22324,6 +22324,8 @@ var Popper = function(param) {
|
|
|
22324
22324
|
], onClose, open);
|
|
22325
22325
|
var updatePosition = useCallback(function() {
|
|
22326
22326
|
if (!anchorRef.current || !containerRef.current) return;
|
|
22327
|
+
// Check if anchor element is still connected to the DOM
|
|
22328
|
+
if (!anchorRef.current.isConnected) return;
|
|
22327
22329
|
var anchorRect = anchorRef.current.getBoundingClientRect();
|
|
22328
22330
|
var popperRect = containerRef.current.getBoundingClientRect();
|
|
22329
22331
|
var el = anchorRef.current;
|
|
@@ -24821,6 +24823,8 @@ var Select = function(_param) {
|
|
|
24821
24823
|
disabled: disabled,
|
|
24822
24824
|
sz: sz,
|
|
24823
24825
|
value: value,
|
|
24826
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
24827
|
+
onChange: function() {},
|
|
24824
24828
|
error: error,
|
|
24825
24829
|
children: !value ? /*#__PURE__*/ jsx(SelectOption, {
|
|
24826
24830
|
value: "",
|
|
@@ -29171,14 +29175,15 @@ var Modal = function(param) {
|
|
|
29171
29175
|
}),
|
|
29172
29176
|
Boolean(actions === null || actions === void 0 ? void 0 : actions.length) && /*#__PURE__*/ jsx(ModalFooter, {
|
|
29173
29177
|
children: actions === null || actions === void 0 ? void 0 : actions.map(function(_param) {
|
|
29174
|
-
var label = _param.label, rest = _object_without_properties$4(_param, [
|
|
29178
|
+
var id = _param.id, label = _param.label, rest = _object_without_properties$4(_param, [
|
|
29179
|
+
"id",
|
|
29175
29180
|
"label"
|
|
29176
29181
|
]);
|
|
29177
29182
|
return /*#__PURE__*/ jsx(Button, _object_spread_props$7(_object_spread$8({
|
|
29178
29183
|
"data-testid": "".concat(testId, "-").concat(formatForId(label), "-button")
|
|
29179
29184
|
}, rest), {
|
|
29180
29185
|
children: label
|
|
29181
|
-
}));
|
|
29186
|
+
}), id !== null && id !== void 0 ? id : formatForId(label));
|
|
29182
29187
|
})
|
|
29183
29188
|
}),
|
|
29184
29189
|
loading && /*#__PURE__*/ jsx(LoadingOverlay, {})
|
|
@@ -34326,13 +34331,9 @@ var Table = function(param) {
|
|
|
34326
34331
|
]);
|
|
34327
34332
|
var handleContextMenu = useCallback(function(e, row) {
|
|
34328
34333
|
e.stopPropagation();
|
|
34334
|
+
ctxMenuAnchorRef.current = e.currentTarget;
|
|
34329
34335
|
setCtxMenuRow(function(prev) {
|
|
34330
|
-
|
|
34331
|
-
ctxMenuAnchorRef.current = null;
|
|
34332
|
-
return null;
|
|
34333
|
-
}
|
|
34334
|
-
ctxMenuAnchorRef.current = e.currentTarget;
|
|
34335
|
-
return row.original;
|
|
34336
|
+
return prev === row.original ? null : row.original;
|
|
34336
34337
|
});
|
|
34337
34338
|
}, []);
|
|
34338
34339
|
var contextColumn = useMemo(function() {
|
|
@@ -34345,6 +34346,12 @@ var Table = function(param) {
|
|
|
34345
34346
|
cell: function(param) {
|
|
34346
34347
|
var row = param.row;
|
|
34347
34348
|
return /*#__PURE__*/ jsx(ContextMenuButton, {
|
|
34349
|
+
ref: function(el) {
|
|
34350
|
+
// Keep anchor ref in sync when this row's menu is open
|
|
34351
|
+
if (ctxMenuRow === row.original && el) {
|
|
34352
|
+
ctxMenuAnchorRef.current = el;
|
|
34353
|
+
}
|
|
34354
|
+
},
|
|
34348
34355
|
onClick: function(e) {
|
|
34349
34356
|
e.stopPropagation();
|
|
34350
34357
|
handleContextMenu(e, row);
|
|
@@ -34359,7 +34366,8 @@ var Table = function(param) {
|
|
|
34359
34366
|
};
|
|
34360
34367
|
}, [
|
|
34361
34368
|
handleContextMenu,
|
|
34362
|
-
testId
|
|
34369
|
+
testId,
|
|
34370
|
+
ctxMenuRow
|
|
34363
34371
|
]);
|
|
34364
34372
|
var allColumns = useMemo(function() {
|
|
34365
34373
|
var cols = _to_consumable_array(tableColumns);
|
package/package.json
CHANGED