@tap-payments/os-micro-frontend-shared 0.1.33-test.6 → 0.1.33-test.7

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.
@@ -19,15 +19,6 @@ function WindowWrapper({ children, id, onResize, isMaximized, isMinimized, dragC
19
19
  const resizableStyle = useMemo(() => (Object.assign(Object.assign(Object.assign({}, resizableMainStyle), { maxWidth: width, borderRadius: !isMaximized ? 12 : '0 !important' }), (!isMaximized && {
20
20
  top: 0,
21
21
  }))), [isMaximized, width]);
22
- const dragConstraints = useMemo(() => {
23
- var _a, _b, _c, _d, _e, _f, _g;
24
- return ({
25
- right: Number((_a = modalRef.current) === null || _a === void 0 ? void 0 : _a.clientWidth) + Number((_b = modalRef.current) === null || _b === void 0 ? void 0 : _b.offsetLeft) - 10,
26
- left: -(Number((_c = modalRef.current) === null || _c === void 0 ? void 0 : _c.clientWidth) + Number((_d = modalRef.current) === null || _d === void 0 ? void 0 : _d.offsetLeft) - 10),
27
- top: -(Number((_e = modalRef.current) === null || _e === void 0 ? void 0 : _e.clientHeight) + Number((_f = constraintsRef.current) === null || _f === void 0 ? void 0 : _f.offsetTop) - 10),
28
- bottom: window.innerHeight - Number((_g = modalRef.current) === null || _g === void 0 ? void 0 : _g.offsetHeight) - 10,
29
- });
30
- }, []);
31
22
  useEffect(() => {
32
23
  var _a;
33
24
  (_a = resizableRef.current) === null || _a === void 0 ? void 0 : _a.updateSize({
@@ -35,7 +26,7 @@ function WindowWrapper({ children, id, onResize, isMaximized, isMinimized, dragC
35
26
  height: isMaximized ? '100vh' : '100%',
36
27
  });
37
28
  }, [isMaximized, width]);
38
- return (_jsx(AppContainerWrapper, Object.assign({ id: "app-container-wrapper", "data-testid": "AppContainerWrapper" }, { children: _jsx(AppContainerContainer, Object.assign({ "data-testid": "AppContainerContainer" }, { children: _jsx(motion.div, Object.assign({ id: "app-content", "data-add-id": id, "data-testid": "AppContent", ref: constraintsRef, initial: initalStyle }, { children: _jsx(ContentWrapper, Object.assign({ id: "content-wrapper", drag: !isMaximized && isDrag, dragMomentum: false, dragConstraints: dragConstraints, onDragStart: onClick, onDragEnter: onClick, onClick: onClick, dragControls: dragControls, dragListener: false, style: Object.assign(Object.assign(Object.assign({}, (order && {
29
+ return (_jsx(AppContainerWrapper, Object.assign({ id: "app-container-wrapper", "data-testid": "AppContainerWrapper" }, { children: _jsx(AppContainerContainer, Object.assign({ "data-testid": "AppContainerContainer" }, { children: _jsx(motion.div, Object.assign({ id: "app-content", "data-add-id": id, "data-testid": "AppContent", ref: constraintsRef, initial: initalStyle }, { children: _jsx(ContentWrapper, Object.assign({ id: "content-wrapper", drag: !isMaximized && isDrag, dragMomentum: false, dragConstraints: false, onDragStart: onClick, onDragEnter: onClick, onClick: onClick, dragControls: dragControls, dragListener: false, style: Object.assign(Object.assign(Object.assign({}, (order && {
39
30
  zIndex: Number(order) + APP_WINDOW_Z_INDEX,
40
31
  })), contentStyle), { height }), initial: Object.assign({ marginInline: 'auto', scale: 0, left: 0 }, (!isMaximized && {
41
32
  left: 48 * (openOrder - 1),
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@tap-payments/os-micro-frontend-shared",
3
3
  "description": "Shared components and utilities for Tap Payments micro frontends",
4
- "version": "0.1.33-test.6",
5
- "testVersion": 6,
4
+ "version": "0.1.33-test.7",
5
+ "testVersion": 7,
6
6
  "type": "module",
7
7
  "main": "build/index.js",
8
8
  "module": "build/index.js",