@oliasoft-open-source/react-ui-library 5.18.0-beta-1 → 5.18.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 +24 -24
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -965,30 +965,30 @@ const Trigger$1 = React.forwardRef(({ active: e, isDisabled: t, badgeTitle: n, b
|
|
|
965
965
|
var isMenuEmpty = (e) => {
|
|
966
966
|
let { sections: t } = e;
|
|
967
967
|
return !isValidElement(t) && (!Array.isArray(t) || t.every((e) => isEmpty(e)));
|
|
968
|
-
}, useContextMenu = ({ sections: e, width: t, placement: n, possiblePlacements: r, closeOnOptionClick: i, closeParent: a, tree: o, path: s,
|
|
969
|
-
let { hasMousePosition:
|
|
970
|
-
isOpen:
|
|
971
|
-
trigger:
|
|
968
|
+
}, useContextMenu = ({ sections: e, width: t, placement: n, possiblePlacements: r, closeOnOptionClick: i, closeParent: a, tree: o, path: s, overflowContainer: c, maxHeight: l, testId: u }) => {
|
|
969
|
+
let { hasMousePosition: d, resetMousePosition: f, handleMouseEvent: p, trigger: m } = useMousePositionAsTrigger(), h = f, g = d, { layerProps: _, renderLayer: v } = useLayer({
|
|
970
|
+
isOpen: g,
|
|
971
|
+
trigger: m,
|
|
972
972
|
...placementOptions$1(n),
|
|
973
973
|
possiblePlacements: r,
|
|
974
974
|
ResizeObserver: ResizeObserver$1,
|
|
975
|
-
onOutsideClick:
|
|
976
|
-
overflowContainer:
|
|
975
|
+
onOutsideClick: h,
|
|
976
|
+
overflowContainer: c
|
|
977
977
|
});
|
|
978
|
-
return [
|
|
979
|
-
...
|
|
978
|
+
return [g && v(/* @__PURE__ */ jsx("div", {
|
|
979
|
+
..._,
|
|
980
980
|
children: /* @__PURE__ */ jsx(Layer$2, {
|
|
981
981
|
isNested: !1,
|
|
982
982
|
width: t,
|
|
983
983
|
sections: e,
|
|
984
984
|
closeOnOptionClick: i,
|
|
985
|
-
close: a ||
|
|
985
|
+
close: a || h,
|
|
986
986
|
tree: o,
|
|
987
987
|
path: s,
|
|
988
|
-
maxHeight:
|
|
989
|
-
testId:
|
|
988
|
+
maxHeight: l,
|
|
989
|
+
testId: u && `${u}-layer`
|
|
990
990
|
})
|
|
991
|
-
})),
|
|
991
|
+
})), p];
|
|
992
992
|
}, ContextMenu = ({ menu: e, width: t, disabled: n = !1, closeOnOptionClick: r = !0, closeParent: i, tree: a, path: o, groupOrder: c, testId: l }) => {
|
|
993
993
|
let u = useContext(DisabledContext), { label: d, trigger: f, fullHeightTrigger: p, colored: m, small: h, component: g, placement: _, possiblePlacements: v = ["bottom-start", "top-start"] } = e, [y, b] = useContextMenu({
|
|
994
994
|
sections: e.sections,
|
|
@@ -3137,24 +3137,24 @@ const InputGroupAddon = ({ children: e, groupOrder: t, small: n = !1 }) => {
|
|
|
3137
3137
|
})
|
|
3138
3138
|
]
|
|
3139
3139
|
});
|
|
3140
|
-
}, Footer = ({
|
|
3141
|
-
let
|
|
3142
|
-
if (
|
|
3143
|
-
var
|
|
3144
|
-
let { rowCount: n, rowsPerPage: r } =
|
|
3145
|
-
return n > Number(r == null || (
|
|
3140
|
+
}, Footer = ({ pagination: e, actions: t, content: n, testId: r }) => {
|
|
3141
|
+
let i = t && t.length, a = n != null, o = () => {
|
|
3142
|
+
if (e) {
|
|
3143
|
+
var t;
|
|
3144
|
+
let { rowCount: n, rowsPerPage: r } = e;
|
|
3145
|
+
return n > Number(r == null || (t = r.options) == null || (t = t[0]) == null ? void 0 : t.value);
|
|
3146
3146
|
}
|
|
3147
3147
|
return !1;
|
|
3148
3148
|
};
|
|
3149
|
-
return
|
|
3149
|
+
return i || a || o() ? /* @__PURE__ */ jsxs("div", {
|
|
3150
3150
|
className: footer_module_default.footer,
|
|
3151
|
-
"data-testid": `${
|
|
3152
|
-
children: [
|
|
3151
|
+
"data-testid": `${r == null ? "pagination" : r}-footer`,
|
|
3152
|
+
children: [a ? /* @__PURE__ */ jsx("div", {
|
|
3153
3153
|
className: footer_module_default.section,
|
|
3154
|
-
children: /* @__PURE__ */ jsx("div", { children:
|
|
3155
|
-
}) : null,
|
|
3154
|
+
children: /* @__PURE__ */ jsx("div", { children: n })
|
|
3155
|
+
}) : null, i || o() ? /* @__PURE__ */ jsxs("div", {
|
|
3156
3156
|
className: footer_module_default.section,
|
|
3157
|
-
children: [
|
|
3157
|
+
children: [e && o() ? /* @__PURE__ */ jsx(Pagination, { pagination: e }) : /* @__PURE__ */ jsx("div", {}), i && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Actions, { actions: t }) })]
|
|
3158
3158
|
}) : null]
|
|
3159
3159
|
}) : null;
|
|
3160
3160
|
};
|
package/package.json
CHANGED