@tap-payments/os-micro-frontend-shared 0.1.96-test.20 → 0.1.96-test.21

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.
@@ -4,15 +4,12 @@ import { SxProps, Theme } from '@mui/material/styles';
4
4
  import { AppService } from '../../types/index.js';
5
5
  export interface AppServicesBarProps {
6
6
  appCode: string;
7
+ serviceCode: string;
7
8
  services: AppService[];
8
9
  isMaximized: boolean;
9
10
  dimensions: {
10
11
  width: number | string;
11
12
  };
12
- features: {
13
- sandboxMode: boolean;
14
- initialServiceCode?: string;
15
- };
16
13
  ui: {
17
14
  onStartDrag: DragControls['start'];
18
15
  };
@@ -20,6 +17,6 @@ export interface AppServicesBarProps {
20
17
  onClickServiceItem: (code: string) => void;
21
18
  sx?: SxProps<Theme>;
22
19
  }
23
- declare function AppServicesBar({ appCode, services, isMaximized, dimensions, features: { initialServiceCode }, ui: { onStartDrag }, onChangeServiceCode, onClickServiceItem, sx, }: Readonly<AppServicesBarProps>): import("react/jsx-runtime").JSX.Element | null;
20
+ declare function AppServicesBar({ appCode, services, isMaximized, dimensions, serviceCode, ui: { onStartDrag }, onChangeServiceCode, onClickServiceItem, sx, }: Readonly<AppServicesBarProps>): import("react/jsx-runtime").JSX.Element | null;
24
21
  declare const _default: import("react").MemoExoticComponent<typeof AppServicesBar>;
25
22
  export default _default;
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { memo, useCallback, useState } from 'react';
3
3
  import { AppServices } from '../index.js';
4
4
  import { StyledAppHeaderWrapper } from '../Toolbar/style';
5
- function AppServicesBar({ appCode, services, isMaximized, dimensions, features: { initialServiceCode }, ui: { onStartDrag }, onChangeServiceCode, onClickServiceItem, sx, }) {
5
+ function AppServicesBar({ appCode, services, isMaximized, dimensions, serviceCode, ui: { onStartDrag }, onChangeServiceCode, onClickServiceItem, sx, }) {
6
6
  const [isDragging, setIsDragging] = useState(false);
7
7
  const onPointerDown = useCallback((e) => {
8
8
  onStartDrag === null || onStartDrag === void 0 ? void 0 : onStartDrag(e);
@@ -13,6 +13,6 @@ function AppServicesBar({ appCode, services, isMaximized, dimensions, features:
13
13
  };
14
14
  if (!appCode || !services.length)
15
15
  return null;
16
- return (_jsx(StyledAppHeaderWrapper, Object.assign({ id: "app-header-wrapper", onPointerDown: onPointerDown, onPointerUp: onPointerUp, isDragging: isDragging, sx: sx }, { children: _jsx(AppServices, { onClickServiceItem: onClickServiceItem, dimensions: { width: dimensions.width }, serviceCode: initialServiceCode !== null && initialServiceCode !== void 0 ? initialServiceCode : '', services: services, isMaximized: isMaximized, appCode: appCode, onChangeServiceCode: onChangeServiceCode }) })));
16
+ return (_jsx(StyledAppHeaderWrapper, Object.assign({ id: "app-header-wrapper", onPointerDown: onPointerDown, onPointerUp: onPointerUp, isDragging: isDragging, sx: sx }, { children: _jsx(AppServices, { onClickServiceItem: onClickServiceItem, dimensions: { width: dimensions.width }, serviceCode: serviceCode, services: services, isMaximized: isMaximized, appCode: appCode, onChangeServiceCode: onChangeServiceCode }) })));
17
17
  }
18
18
  export default memo(AppServicesBar);
@@ -89,7 +89,7 @@ export type MFWidgetBaseProps = {
89
89
  hasReportsApp: boolean;
90
90
  hasHeader: boolean;
91
91
  sandboxMode: boolean;
92
- serviceCode?: string;
92
+ initialServiceCode?: string;
93
93
  };
94
94
  segment: Pick<Segment, 'id' | 'brands' | 'countries'> & {
95
95
  defaultCountry?: SegmentCountry;
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.96-test.20",
5
- "testVersion": 20,
4
+ "version": "0.1.96-test.21",
5
+ "testVersion": 21,
6
6
  "type": "module",
7
7
  "main": "build/index.js",
8
8
  "module": "build/index.js",