@tap-payments/os-micro-frontend-shared 0.1.95 → 0.1.96-test.11

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.
Files changed (59) hide show
  1. package/build/components/ActionMenu/style.d.ts +1 -1
  2. package/build/components/AppServices/AppServices.d.ts +10 -5
  3. package/build/components/AppServices/AppServices.js +16 -18
  4. package/build/components/AppServices/ServiceItem.d.ts +2 -4
  5. package/build/components/AppServices/ServiceItem.js +2 -4
  6. package/build/components/AppServicesBar/AppServicesBar.d.ts +25 -0
  7. package/build/components/AppServicesBar/AppServicesBar.js +18 -0
  8. package/build/components/AppServicesBar/index.d.ts +3 -0
  9. package/build/components/AppServicesBar/index.js +3 -0
  10. package/build/components/AppServicesBar/style.d.ts +4 -0
  11. package/build/components/AppServicesBar/style.js +6 -0
  12. package/build/components/ListLayout/ListLayout.d.ts +10 -0
  13. package/build/components/ListLayout/ListLayout.js +20 -0
  14. package/build/components/ListLayout/index.d.ts +2 -0
  15. package/build/components/ListLayout/index.js +2 -0
  16. package/build/components/ListLayout/styles.d.ts +4 -0
  17. package/build/components/ListLayout/styles.js +9 -0
  18. package/build/components/SearchButton/styles.d.ts +1 -1
  19. package/build/components/StatusIcons/AuthorizedIcon/AuthorizedIcon.d.ts +4 -2
  20. package/build/components/StatusIcons/AuthorizedIcon/AuthorizedIcon.js +9 -4
  21. package/build/components/StatusIcons/ChargeStatusIcon/ChargeStatusIcon.d.ts +2 -1
  22. package/build/components/StatusIcons/ChargeStatusIcon/ChargeStatusIcon.js +2 -2
  23. package/build/components/StatusIcons/DestinationIcon/DestinationIcon.d.ts +5 -2
  24. package/build/components/StatusIcons/DestinationIcon/DestinationIcon.js +13 -5
  25. package/build/components/StatusIcons/PayoutIcon/PayoutIcon.d.ts +5 -1
  26. package/build/components/StatusIcons/PayoutIcon/PayoutIcon.js +8 -3
  27. package/build/components/StatusIcons/RefundIcon/RefundIcon.d.ts +5 -1
  28. package/build/components/StatusIcons/RefundIcon/RefundIcon.js +18 -10
  29. package/build/components/ToggleView/ToggleView.d.ts +16 -0
  30. package/build/components/ToggleView/ToggleView.js +32 -0
  31. package/build/components/ToggleView/ToggleWrapper.d.ts +4 -0
  32. package/build/components/ToggleView/ToggleWrapper.js +8 -0
  33. package/build/components/ToggleView/index.d.ts +3 -0
  34. package/build/components/ToggleView/index.js +3 -0
  35. package/build/components/ToggleView/style.d.ts +14 -0
  36. package/build/components/ToggleView/style.js +31 -0
  37. package/build/components/ToggleView/types.d.ts +6 -0
  38. package/build/components/ToggleView/types.js +6 -0
  39. package/build/components/Toolbar/style.d.ts +6 -0
  40. package/build/components/Toolbar/style.js +5 -0
  41. package/build/components/VirtualTables/SheetViewVirtualTable/SheetViewVirtualTable.d.ts +1 -1
  42. package/build/components/VirtualTables/SheetViewVirtualTable/SheetViewVirtualTable.js +2 -2
  43. package/build/components/VirtualTables/VirtualTable/VirtualTable.d.ts +1 -1
  44. package/build/components/VirtualTables/VirtualTable/VirtualTable.js +2 -2
  45. package/build/components/VirtualTables/VirtualTableWithCard/VirtualTableWithCard.d.ts +1 -1
  46. package/build/components/VirtualTables/VirtualTableWithCard/VirtualTableWithCard.js +2 -2
  47. package/build/components/index.d.ts +6 -0
  48. package/build/components/index.js +6 -0
  49. package/build/constants/apps.d.ts +3 -0
  50. package/build/constants/apps.js +3 -0
  51. package/build/constants/table/cell/authorizationTableCellWidth.d.ts +1 -1
  52. package/build/constants/table/cell/authorizationTableCellWidth.js +1 -1
  53. package/build/constants/table/cell/chargeTableCellWidth.d.ts +1 -1
  54. package/build/constants/table/cell/chargeTableCellWidth.js +1 -1
  55. package/build/constants/table/cell/destinationsTableCellWidth.d.ts +67 -7
  56. package/build/constants/table/cell/destinationsTableCellWidth.js +67 -7
  57. package/build/types/apps.d.ts +52 -1
  58. package/build/types/table.d.ts +1 -1
  59. package/package.json +29 -2
@@ -15,7 +15,7 @@ export declare const Charge: import("@emotion/styled").StyledComponent<import("@
15
15
  export declare const DropDownChargeGapColumn: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
16
16
  export declare const StyledAmount: import("@emotion/styled").StyledComponent<Pick<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & {
17
17
  ref?: ((instance: HTMLInputElement | null) => void) | import("react").RefObject<HTMLInputElement> | null | undefined;
18
- }, "width" | "height" | "hidden" | "type" | "color" | "content" | "translate" | "value" | "list" | "form" | "slot" | "style" | "title" | "name" | "ref" | "pattern" | "key" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "children" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "size" | "multiple" | "autoComplete" | "readOnly" | "required" | "max" | "src" | "alt" | "formAction" | "formMethod" | "formNoValidate" | "formTarget" | "min" | "accept" | "capture" | "checked" | "formEncType" | "minLength"> & {
18
+ }, "width" | "height" | "hidden" | "type" | "color" | "content" | "translate" | "name" | "value" | "list" | "form" | "slot" | "style" | "title" | "ref" | "pattern" | "key" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "children" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "size" | "multiple" | "autoComplete" | "readOnly" | "required" | "max" | "src" | "alt" | "formAction" | "formMethod" | "formNoValidate" | "formTarget" | "min" | "accept" | "capture" | "checked" | "formEncType" | "minLength"> & {
19
19
  allowDecimals?: boolean | undefined;
20
20
  allowNegativeValue?: boolean | undefined;
21
21
  id?: string | undefined;
@@ -1,11 +1,16 @@
1
1
  import React from 'react';
2
- import { AppDetails, UserApp } from '../../types/index.js';
2
+ import { AppService } from '../../types/index.js';
3
3
  import { ServiceItemProps } from './ServiceItem';
4
4
  interface AppServicesProps extends Pick<ServiceItemProps, 'onClickServiceItem'> {
5
- appInfo: AppDetails;
6
- userApp?: UserApp;
7
- onChangeAppServiceCode?: (serviceCode: string) => void;
5
+ serviceCode: string;
6
+ services: AppService[];
7
+ isMaximized: boolean;
8
+ appCode: string;
9
+ dimensions: {
10
+ width: string | number;
11
+ };
12
+ onChangeServiceCode?: (serviceCode: string) => void;
8
13
  }
9
- declare function AppServices({ appInfo, userApp, onChangeAppServiceCode, onClickServiceItem }: AppServicesProps): import("react/jsx-runtime").JSX.Element;
14
+ declare function AppServices({ isMaximized, serviceCode, dimensions, appCode, services, onChangeServiceCode, onClickServiceItem, }: Readonly<AppServicesProps>): import("react/jsx-runtime").JSX.Element;
10
15
  declare const _default: React.MemoExoticComponent<typeof AppServices>;
11
16
  export default _default;
@@ -2,7 +2,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React, { memo, useEffect, useRef, useState, useMemo } from 'react';
3
3
  import { Box } from '@mui/material';
4
4
  import { useTranslation } from 'react-i18next';
5
- import { useLocation } from 'react-router';
6
5
  import { StyledIconForDropDown, StyledMenuTitle, StyledOption, StyledSelect, StyledSelectComponent } from '../index.js';
7
6
  import { APP_CODES, blackHeadingDownArrow, blueHeadingDropdownArrow } from '../../constants/index.js';
8
7
  import { getNameText } from '../../utils/index.js';
@@ -11,21 +10,20 @@ import { Wrapper } from './style';
11
10
  const selectedIcon = (props) => {
12
11
  return (_jsx(StyledIconForDropDown, { src: props.className.includes('MuiSelect-iconOpen') ? blueHeadingDropdownArrow : blackHeadingDownArrow, alt: "dropdown" }));
13
12
  };
14
- function AppServices({ appInfo, userApp, onChangeAppServiceCode, onClickServiceItem }) {
13
+ function AppServices({ isMaximized, serviceCode, dimensions, appCode, services, onChangeServiceCode, onClickServiceItem, }) {
15
14
  const [initServicesWidth, setInitServicesWidth] = useState(0);
16
15
  const [isDropdown, setIsDropdown] = useState(false);
17
16
  const [selectedOption, setSelectedOption] = useState('');
18
17
  const servicesRef = useRef(null);
19
18
  const [openDropdown, setOpenDropdown] = React.useState(false);
20
- const pathname = useLocation();
21
19
  const { i18n } = useTranslation();
22
- const services = useMemo(() => {
23
- var _a, _b;
24
- if (appInfo.appCode === APP_CODES.account.code) {
25
- return (_a = userApp === null || userApp === void 0 ? void 0 : userApp.app_services.filter((service) => service.code === APP_CODES.account.services.account.code)) !== null && _a !== void 0 ? _a : [];
20
+ const servicesList = useMemo(() => {
21
+ var _a;
22
+ if (appCode === APP_CODES.account.code) {
23
+ return (_a = services.filter((service) => service.code === APP_CODES.account.services.account.code)) !== null && _a !== void 0 ? _a : [];
26
24
  }
27
- return (_b = userApp === null || userApp === void 0 ? void 0 : userApp.app_services) !== null && _b !== void 0 ? _b : [];
28
- }, [appInfo.appCode, userApp === null || userApp === void 0 ? void 0 : userApp.app_services]);
25
+ return services !== null && services !== void 0 ? services : [];
26
+ }, [appCode, services]);
29
27
  const handleChange = (event) => {
30
28
  setSelectedOption(event.target.value);
31
29
  };
@@ -34,8 +32,8 @@ function AppServices({ appInfo, userApp, onChangeAppServiceCode, onClickServiceI
34
32
  };
35
33
  const activeTabTitle = useMemo(() => {
36
34
  var _a, _b;
37
- return getNameText((_b = (_a = services.filter((service) => service.code.toLowerCase() === decodeURIComponent(appInfo.serviceCode).toLowerCase())) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.name, i18n.language);
38
- }, [pathname, appInfo.serviceCode]);
35
+ return getNameText((_b = (_a = servicesList.filter((service) => service.code.toLowerCase() === decodeURIComponent(serviceCode).toLowerCase())) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.name, i18n.language);
36
+ }, [servicesList, i18n.language, serviceCode]);
39
37
  useEffect(() => {
40
38
  setSelectedOption(activeTabTitle);
41
39
  }, [activeTabTitle]);
@@ -47,14 +45,14 @@ function AppServices({ appInfo, userApp, onChangeAppServiceCode, onClickServiceI
47
45
  setInitServicesWidth(((_a = servicesRef.current) === null || _a === void 0 ? void 0 : _a.offsetWidth) + iconSize + iconGap + iconMargin);
48
46
  }, []);
49
47
  useEffect(() => {
50
- setIsDropdown(Number(appInfo === null || appInfo === void 0 ? void 0 : appInfo.dimensions.width) < initServicesWidth + 10);
51
- }, [appInfo === null || appInfo === void 0 ? void 0 : appInfo.dimensions.width]);
52
- const navigateToService = (serviceCode) => {
53
- onChangeAppServiceCode === null || onChangeAppServiceCode === void 0 ? void 0 : onChangeAppServiceCode(serviceCode);
48
+ setIsDropdown(Number(dimensions.width) < initServicesWidth + 10);
49
+ }, [dimensions.width, initServicesWidth]);
50
+ const navigateToService = (newServiceCode) => {
51
+ onChangeServiceCode === null || onChangeServiceCode === void 0 ? void 0 : onChangeServiceCode(newServiceCode);
54
52
  setOpenDropdown(false);
55
53
  };
56
54
  const renderValue = (selected) => _jsx(StyledSelectComponent, { children: selected });
57
- return (_jsxs(Wrapper, Object.assign({ maximized: appInfo.isMaximized }, { children: [services.length && !isDropdown && (_jsx(Box, Object.assign({ ref: servicesRef, display: "flex", gap: "8px", flexDirection: "row", sx: { userSelect: 'none' } }, { children: services.map((service, idx) => (_jsx(ServiceItem, { appInfo: appInfo, onClickServiceItem: onClickServiceItem, navigateToMenuItem: navigateToService, name: getNameText(service.name, i18n.language) || '', code: service.code }, `service-item-${service.code}-${idx}`))) }))), services.length && isDropdown && (_jsx(StyledSelect, Object.assign({ open: openDropdown, onClick: handleOpenDropdown, displayEmpty: true, inputProps: { 'aria-label': 'Without label' }, MenuProps: {
55
+ return (_jsxs(Wrapper, Object.assign({ maximized: isMaximized }, { children: [!!services.length && !isDropdown && (_jsx(Box, Object.assign({ ref: servicesRef, display: "flex", gap: "8px", flexDirection: "row", sx: { userSelect: 'none' } }, { children: services.map((service, idx) => (_jsx(ServiceItem, { activeCode: serviceCode, onClickServiceItem: onClickServiceItem, navigateToMenuItem: navigateToService, name: getNameText(service.name, i18n.language) || '', code: service.code }, `service-item-${service.code}-${idx}`))) }))), !!services.length && isDropdown && (_jsx(StyledSelect, Object.assign({ open: openDropdown, onClick: handleOpenDropdown, displayEmpty: true, inputProps: { 'aria-label': 'Without label' }, MenuProps: {
58
56
  anchorOrigin: {
59
57
  vertical: 40,
60
58
  horizontal: 83,
@@ -74,7 +72,7 @@ function AppServices({ appInfo, userApp, onChangeAppServiceCode, onClickServiceI
74
72
  paddingTop: '0px !important',
75
73
  paddingBottom: '0px !important',
76
74
  },
77
- } }, { children: services.map((service) => {
75
+ } }, { children: services.map((service, idx) => {
78
76
  var _a;
79
77
  if (((_a = getNameText(service.name, i18n.language)) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === (selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.toLowerCase())) {
80
78
  return null;
@@ -83,7 +81,7 @@ function AppServices({ appInfo, userApp, onChangeAppServiceCode, onClickServiceI
83
81
  e.preventDefault();
84
82
  e.stopPropagation();
85
83
  navigateToService(service.code);
86
- } }, { children: _jsx(StyledMenuTitle, { children: getNameText(service.name, i18n.language) }) })));
84
+ } }, { children: _jsx(StyledMenuTitle, { children: getNameText(service.name, i18n.language) }) }), `option-${service.code}-${idx}`));
87
85
  }) })))] })));
88
86
  }
89
87
  export default memo(AppServices);
@@ -1,14 +1,12 @@
1
1
  /// <reference types="react" />
2
- import { AppDetails } from '../../types/index.js';
3
2
  export interface ServiceItemProps {
4
- appInfo: AppDetails;
3
+ activeCode: string;
5
4
  isDropdown?: boolean;
6
5
  name: string;
7
6
  code: string;
8
- onDropdownClick?: () => void;
9
7
  navigateToMenuItem: (serviceCode: string) => void;
10
8
  onClickServiceItem?: (code: string) => void;
11
9
  }
12
- declare function ServiceItem({ isDropdown, name, code, appInfo, onDropdownClick, navigateToMenuItem, onClickServiceItem }: ServiceItemProps): import("react/jsx-runtime").JSX.Element;
10
+ declare function ServiceItem({ isDropdown, name, code, activeCode, navigateToMenuItem, onClickServiceItem }: Readonly<ServiceItemProps>): import("react/jsx-runtime").JSX.Element;
13
11
  declare const _default: import("react").MemoExoticComponent<typeof ServiceItem>;
14
12
  export default _default;
@@ -5,7 +5,7 @@ import { DropdownMenu, Icon } from '../index.js';
5
5
  import { isInsightService } from '../../utils/index.js';
6
6
  import { homeIcon, newWindowIcon } from '../../constants/index.js';
7
7
  import { ServiceItemStyled } from './style';
8
- function ServiceItem({ isDropdown = false, name, code, appInfo, onDropdownClick, navigateToMenuItem, onClickServiceItem }) {
8
+ function ServiceItem({ isDropdown = false, name, code, activeCode, navigateToMenuItem, onClickServiceItem }) {
9
9
  const [anchorEl, setAnchorEl] = useState(null);
10
10
  const { t } = useTranslation();
11
11
  const open = Boolean(anchorEl);
@@ -13,7 +13,7 @@ function ServiceItem({ isDropdown = false, name, code, appInfo, onDropdownClick,
13
13
  setAnchorEl(null);
14
14
  };
15
15
  const isHomeService = isInsightService(code);
16
- return (_jsxs(_Fragment, { children: [_jsx(ServiceItemStyled, Object.assign({ isDropdown: isDropdown, className: appInfo.serviceCode.toLowerCase() === code.toLowerCase() ? 'active' : '', onClick: (e) => {
16
+ return (_jsxs(_Fragment, { children: [_jsx(ServiceItemStyled, Object.assign({ isDropdown: isDropdown, className: activeCode.toLowerCase() === code.toLowerCase() ? 'active' : '', onClick: (e) => {
17
17
  e.preventDefault();
18
18
  e.stopPropagation();
19
19
  navigateToMenuItem(code);
@@ -31,8 +31,6 @@ function ServiceItem({ isDropdown = false, name, code, appInfo, onDropdownClick,
31
31
  e.stopPropagation();
32
32
  onClickServiceItem === null || onClickServiceItem === void 0 ? void 0 : onClickServiceItem(code);
33
33
  handleClose();
34
- if (onDropdownClick)
35
- onDropdownClick();
36
34
  },
37
35
  },
38
36
  ] })] }));
@@ -0,0 +1,25 @@
1
+ /// <reference types="react" />
2
+ import { DragControls } from 'framer-motion';
3
+ import { SxProps, Theme } from '@mui/material/styles';
4
+ import { AppService } from '../../types/index.js';
5
+ export interface AppServicesBarProps {
6
+ appCode: string;
7
+ services: AppService[];
8
+ isMaximized: boolean;
9
+ dimensions: {
10
+ width: number | string;
11
+ };
12
+ features: {
13
+ sandboxMode: boolean;
14
+ initialServiceCode?: string;
15
+ };
16
+ ui: {
17
+ onStartDrag: DragControls['start'];
18
+ };
19
+ onChangeServiceCode: (serviceCode: string) => void;
20
+ onClickServiceItem: (code: string) => void;
21
+ sx?: SxProps<Theme>;
22
+ }
23
+ declare function AppServicesBar({ appCode, services, isMaximized, dimensions, features: { initialServiceCode }, ui: { onStartDrag }, onChangeServiceCode, onClickServiceItem, sx, }: Readonly<AppServicesBarProps>): import("react/jsx-runtime").JSX.Element | null;
24
+ declare const _default: import("react").MemoExoticComponent<typeof AppServicesBar>;
25
+ export default _default;
@@ -0,0 +1,18 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { memo, useCallback, useState } from 'react';
3
+ import { AppServices } from '../index.js';
4
+ import { StyledAppHeaderWrapper } from '../Toolbar/style';
5
+ function AppServicesBar({ appCode, services, isMaximized, dimensions, features: { initialServiceCode }, ui: { onStartDrag }, onChangeServiceCode, onClickServiceItem, sx, }) {
6
+ const [isDragging, setIsDragging] = useState(false);
7
+ const onPointerDown = useCallback((e) => {
8
+ onStartDrag === null || onStartDrag === void 0 ? void 0 : onStartDrag(e);
9
+ setIsDragging(true);
10
+ }, [onStartDrag, setIsDragging]);
11
+ const onPointerUp = () => {
12
+ setIsDragging(false);
13
+ };
14
+ if (!appCode || !services.length)
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 }) })));
17
+ }
18
+ export default memo(AppServicesBar);
@@ -0,0 +1,3 @@
1
+ import AppServicesBar from './AppServicesBar';
2
+ export * from './AppServicesBar';
3
+ export default AppServicesBar;
@@ -0,0 +1,3 @@
1
+ import AppServicesBar from './AppServicesBar';
2
+ export * from './AppServicesBar';
3
+ export default AppServicesBar;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ export declare const AppContainerHeader: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
3
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
4
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
@@ -0,0 +1,6 @@
1
+ import Box from '@mui/material/Box';
2
+ import { styled } from '@mui/material/styles';
3
+ export const AppContainerHeader = styled(Box)(() => ({
4
+ display: 'flex',
5
+ alignItems: 'center'
6
+ }));
@@ -0,0 +1,10 @@
1
+ import { type ComponentPropsWithoutRef } from 'react';
2
+ import { ListLayoutStyled } from './styles';
3
+ interface ListLayoutProps extends ComponentPropsWithoutRef<typeof ListLayoutStyled> {
4
+ }
5
+ declare function ListLayout({ children, ...props }: Readonly<ListLayoutProps>): import("react/jsx-runtime").JSX.Element;
6
+ declare namespace ListLayout {
7
+ var displayName: string;
8
+ }
9
+ declare const _default: import("react").MemoExoticComponent<typeof ListLayout>;
10
+ export default _default;
@@ -0,0 +1,20 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import { memo } from 'react';
14
+ import { ListLayoutStyled } from './styles';
15
+ function ListLayout(_a) {
16
+ var { children } = _a, props = __rest(_a, ["children"]);
17
+ return (_jsx(ListLayoutStyled, Object.assign({ component: 'article', "data-testid": 'ListLayout' }, props, { children: children })));
18
+ }
19
+ ListLayout.displayName = 'ListLayout';
20
+ export default memo(ListLayout);
@@ -0,0 +1,2 @@
1
+ import ListLayout from './ListLayout';
2
+ export default ListLayout;
@@ -0,0 +1,2 @@
1
+ import ListLayout from './ListLayout';
2
+ export default ListLayout;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ export declare const ListLayoutStyled: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
3
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
4
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
@@ -0,0 +1,9 @@
1
+ import Box from '@mui/material/Box';
2
+ import { styled } from '@mui/material/styles';
3
+ export const ListLayoutStyled = styled(Box)(() => ({
4
+ flex: 1,
5
+ position: 'relative',
6
+ display: 'flex',
7
+ flexDirection: 'column',
8
+ height: '100%',
9
+ }));
@@ -9,12 +9,12 @@ export declare const StyledInput: import("@emotion/styled").StyledComponent<{
9
9
  color?: string | undefined;
10
10
  content?: string | undefined;
11
11
  translate?: "yes" | "no" | undefined;
12
+ name?: string | undefined;
12
13
  value?: string | number | readonly string[] | undefined;
13
14
  list?: string | undefined;
14
15
  form?: string | undefined;
15
16
  slot?: string | undefined;
16
17
  title?: string | undefined;
17
- name?: string | undefined;
18
18
  className?: string | undefined;
19
19
  pattern?: string | undefined;
20
20
  defaultChecked?: boolean | undefined;
@@ -1,11 +1,13 @@
1
1
  /// <reference types="react" />
2
2
  import { type AuthorizedStatusType } from '../../TableCells';
3
- import { TableMode } from '../../../types/index.js';
3
+ import { SelectionProps, TableMode } from '../../../types/index.js';
4
4
  type AuthorizedIconProps = {
5
5
  iconStyles?: React.CSSProperties;
6
6
  authorizedStatus?: AuthorizedStatusType;
7
7
  isTextShown?: boolean;
8
8
  tableMode?: TableMode;
9
+ chipIndex?: number;
10
+ selectionProps?: SelectionProps;
9
11
  };
10
- export declare const AuthorizedIcon: ({ authorizedStatus, isTextShown, iconStyles, tableMode }: AuthorizedIconProps) => import("react/jsx-runtime").JSX.Element;
12
+ export declare const AuthorizedIcon: ({ authorizedStatus, isTextShown, iconStyles, tableMode, chipIndex, selectionProps }: AuthorizedIconProps) => import("react/jsx-runtime").JSX.Element;
11
13
  export {};
@@ -6,10 +6,15 @@ import Tooltip from '../../Tooltip';
6
6
  import { authorizedStatusIcons } from '../../TableCells/CustomCells/StatusCell/constant';
7
7
  import Icon from '../../Icon';
8
8
  import { TextLabel } from '../../TableCells/CustomCells/style';
9
- export const AuthorizedIcon = ({ authorizedStatus, isTextShown, iconStyles, tableMode }) => {
9
+ import StatusChipWithCopy from '../../StatusChipWithCopy';
10
+ export const AuthorizedIcon = ({ authorizedStatus, isTextShown, iconStyles, tableMode, chipIndex = 0, selectionProps = {} }) => {
10
11
  const { t } = useTranslation();
11
12
  const theme = useTheme();
12
- return (_jsx(Tooltip, Object.assign({ title: tableMode === 'sheet' ? '' : t(camelCase(authorizedStatus)) }, { children: isTextShown ? (_jsx(TextLabel, Object.assign({ "data-testid": "StatusCell_AuthorizedStatusLabel", sx: Object.assign({ color: theme.palette.info.dark }, (tableMode === 'sheet' && {
13
- height: '18px',
14
- })) }, { children: t(camelCase(authorizedStatus)) }))) : (_jsx(Icon, { src: authorizedStatusIcons[authorizedStatus], alt: "authorized-icon", "data-testid": "StatusCell_AuthorizedStatusIcon", sx: iconStyles })) })));
13
+ const status = t(camelCase(authorizedStatus));
14
+ if (tableMode === 'sheet') {
15
+ return (_jsx(StatusChipWithCopy, Object.assign({ copyText: status, chipIndex: chipIndex, selectionProps: selectionProps }, { children: status })));
16
+ }
17
+ return (_jsx(Tooltip, Object.assign({ title: status }, { children: isTextShown ? (_jsx(TextLabel, Object.assign({ "data-testid": "StatusCell_AuthorizedStatusLabel", sx: {
18
+ color: theme.palette.info.dark,
19
+ } }, { children: status }))) : (_jsx(Icon, { src: authorizedStatusIcons[authorizedStatus], alt: "authorized-icon", "data-testid": "StatusCell_AuthorizedStatusIcon", sx: iconStyles })) })));
15
20
  };
@@ -1,7 +1,7 @@
1
1
  import { CSSProperties } from 'react';
2
2
  import { SelectionProps } from '../../../types/index.js';
3
3
  import { type ChargeStatus } from '../../TableCells';
4
- export declare function ChargeStatusIcon({ chargeStatus, gatewayTooltip, acquirerTooltip, chargeTooltip, errorCode, isTextShown, gatewayCode, acquirerCode, unCapturedStyles, iconStyles, iconWrapperStyles, gatewayIconWrapperStyles, gatewayContainerStyles, gateWayIconStyles, showBadge, isSheetViewShown, selectionProps, }: Readonly<{
4
+ export declare function ChargeStatusIcon({ chargeStatus, gatewayTooltip, acquirerTooltip, chargeTooltip, errorCode, isTextShown, gatewayCode, acquirerCode, unCapturedStyles, iconStyles, iconWrapperStyles, gatewayIconWrapperStyles, gatewayContainerStyles, gateWayIconStyles, showBadge, isSheetViewShown, selectionProps, chipIndex, }: Readonly<{
5
5
  chargeStatus?: ChargeStatus;
6
6
  gatewayTooltip?: string;
7
7
  showAuthorizedStatus?: boolean;
@@ -20,4 +20,5 @@ export declare function ChargeStatusIcon({ chargeStatus, gatewayTooltip, acquire
20
20
  showBadge?: boolean;
21
21
  isSheetViewShown?: boolean;
22
22
  selectionProps?: SelectionProps;
23
+ chipIndex?: number;
23
24
  }>): import("react/jsx-runtime").JSX.Element;
@@ -8,7 +8,7 @@ import StatusChipWithCopy from '../../StatusChipWithCopy';
8
8
  import { capturedStatusesStyles, unCapturedStatusesStyles, statusIcons } from '../../TableCells/CustomCells/StatusCell/constant';
9
9
  import { StatusIcon, StatusIconWrapper, TextLabel } from '../../TableCells/CustomCells/style';
10
10
  import { AcquirerContainerAnimationVariants, ErrorCodeLabel, ErrorCodeLabelAnimationVariants, ErrorCodeVariants, ErrorCodeWrapper, GateWayIcon, GatewayIconWrapper, GatewayIconWrapperAnimationTransition, GatewaysContainer, GatewaysContainerAnimationVariants, StatusTextLabel, UnCapturedBadge, UnCapturedContainer, errorCodeLabelAnimation, TextViewWrapper, } from './style';
11
- export function ChargeStatusIcon({ chargeStatus, gatewayTooltip, acquirerTooltip, chargeTooltip, errorCode, isTextShown, gatewayCode, acquirerCode, unCapturedStyles, iconStyles, iconWrapperStyles, gatewayIconWrapperStyles, gatewayContainerStyles, gateWayIconStyles, showBadge = true, isSheetViewShown = false, selectionProps = {}, }) {
11
+ export function ChargeStatusIcon({ chargeStatus, gatewayTooltip, acquirerTooltip, chargeTooltip, errorCode, isTextShown, gatewayCode, acquirerCode, unCapturedStyles, iconStyles, iconWrapperStyles, gatewayIconWrapperStyles, gatewayContainerStyles, gateWayIconStyles, showBadge = true, isSheetViewShown = false, selectionProps = {}, chipIndex = 0, }) {
12
12
  const unCapturedStatusStyle = chargeStatus ? unCapturedStatusesStyles[chargeStatus] : null;
13
13
  const captureStatusStyle = chargeStatus ? capturedStatusesStyles[chargeStatus] : null;
14
14
  const theme = useTheme();
@@ -18,7 +18,7 @@ export function ChargeStatusIcon({ chargeStatus, gatewayTooltip, acquirerTooltip
18
18
  const gatewayTooltipTitle = gatewayTooltip && (_jsxs(_Fragment, { children: [_jsx("div", { children: "Gateway" }), _jsx("div", { children: gatewayTooltip })] }));
19
19
  const chargeIcon = chargeStatus && statusIcons[chargeStatus] && (_jsx("div", Object.assign({ "data-testid": "ChargeStatusIcon_ChargeIcon", style: Object.assign({ display: 'flex', alignItems: 'center', justifyContent: 'center', width: '16px', height: '16px', borderRadius: unCapturedStatusStyle ? '50%' : '' }, iconWrapperStyles) }, { children: _jsx(StatusIcon, { src: statusIcons[chargeStatus], alt: "charge-icon", "data-testid": "ChargeStatusIcon_StatusIcon", style: Object.assign({ borderRadius: unCapturedStatusStyle ? '50%' : '', width: '16px', height: '16px' }, iconStyles) }) })));
20
20
  if (isSheetViewShown) {
21
- return (_jsxs(TextViewWrapper, { children: [_jsxs(StatusChipWithCopy, Object.assign({ copyText: t(camelCase(chargeStatus)), chipIndex: 0, selectionProps: selectionProps }, { children: [t(camelCase(chargeStatus)), " ", errorCode] })), unCapturedStatusStyle && (_jsxs(_Fragment, { children: [gatewayCode && (_jsxs(StatusChipWithCopy, Object.assign({ copyText: "Gateway", chipIndex: 1, selectionProps: selectionProps }, { children: ["Gateway ", gatewayCode] }))), acquirerCode && (_jsxs(StatusChipWithCopy, Object.assign({ copyText: "Acquirer", chipIndex: 2, selectionProps: selectionProps }, { children: ["Acquirer ", acquirerCode] })))] }))] }));
21
+ return (_jsxs(TextViewWrapper, { children: [_jsxs(StatusChipWithCopy, Object.assign({ copyText: t(camelCase(chargeStatus)), chipIndex: chipIndex, selectionProps: selectionProps }, { children: [t(camelCase(chargeStatus)), " ", errorCode] })), unCapturedStatusStyle && (_jsxs(_Fragment, { children: [gatewayCode && (_jsxs(StatusChipWithCopy, Object.assign({ copyText: "Gateway", chipIndex: 1, selectionProps: selectionProps }, { children: ["Gateway ", gatewayCode] }))), acquirerCode && (_jsxs(StatusChipWithCopy, Object.assign({ copyText: "Acquirer", chipIndex: 2, selectionProps: selectionProps }, { children: ["Acquirer ", acquirerCode] })))] }))] }));
22
22
  }
23
23
  if (isTextShown) {
24
24
  return (_jsxs(TextViewWrapper, { children: [_jsx(Tooltip, Object.assign({ title: chargeTooltipTitle }, { children: _jsxs(StatusTextLabel, Object.assign({ "data-testid": "ChargeStatusIcon_isTextShown", "data-status": camelCase(chargeStatus), sx: {
@@ -1,5 +1,8 @@
1
- import { DestinationStatus } from '../../../types/index.js';
2
- export declare function DestinationIcon({ status, isTextShown, }: Readonly<{
1
+ import { DestinationStatus, SelectionProps } from '../../../types/index.js';
2
+ export declare function DestinationIcon({ status, isTextShown, isSheetViewShown, chipIndex, selectionProps, }: Readonly<{
3
3
  status: DestinationStatus;
4
4
  isTextShown?: boolean;
5
+ isSheetViewShown?: boolean;
6
+ chipIndex?: number;
7
+ selectionProps?: SelectionProps;
5
8
  }>): import("react/jsx-runtime").JSX.Element;
@@ -5,10 +5,18 @@ import Tooltip from '../../Tooltip';
5
5
  import { camelCase } from 'lodash';
6
6
  import { useTheme } from '@mui/material';
7
7
  import { t } from 'i18next';
8
- export function DestinationIcon({ status, isTextShown, }) {
8
+ import StatusChipWithCopy from '../../StatusChipWithCopy';
9
+ export function DestinationIcon({ status, isTextShown, isSheetViewShown, chipIndex = 0, selectionProps = {}, }) {
9
10
  const theme = useTheme();
10
- return isTextShown && destinationStatusIcons[status] ? (_jsx(TextLabel, Object.assign({ "data-testid": "ChargeStatusIcon_isTextShown", "data-status": camelCase(status), sx: {
11
- background: '#1F88D00D',
12
- color: status === 'PROCESSED' ? theme.palette.info.dark : theme.palette.common.black,
13
- } }, { children: t(camelCase(status)) }))) : (_jsx(StatusIconWrapper, Object.assign({ className: "destination-status" }, { children: status && destinationStatusIcons[status] && (_jsx(Tooltip, Object.assign({ title: t(camelCase(status)) }, { children: _jsx(StatusIcon, { src: destinationStatusIcons[status], alt: "destination-icon" }) }))) })));
11
+ const statusText = t(camelCase(status));
12
+ if (isSheetViewShown && destinationStatusIcons[status]) {
13
+ return (_jsx(StatusChipWithCopy, Object.assign({ copyText: statusText, chipIndex: chipIndex, selectionProps: selectionProps }, { children: statusText })));
14
+ }
15
+ if (isTextShown && destinationStatusIcons[status]) {
16
+ return (_jsx(TextLabel, Object.assign({ "data-testid": "ChargeStatusIcon_isTextShown", "data-status": camelCase(status), sx: {
17
+ background: '#1F88D00D',
18
+ color: status === 'PROCESSED' ? theme.palette.info.dark : theme.palette.common.black,
19
+ } }, { children: statusText })));
20
+ }
21
+ return (_jsx(StatusIconWrapper, Object.assign({ className: "destination-status" }, { children: status && destinationStatusIcons[status] && (_jsx(Tooltip, Object.assign({ title: t(camelCase(status)) }, { children: _jsx(StatusIcon, { src: destinationStatusIcons[status], alt: "destination-icon" }) }))) })));
14
22
  }
@@ -1,10 +1,14 @@
1
1
  /// <reference types="react" />
2
2
  import { PayoutStatusType } from '../../TableCells';
3
+ import { SelectionProps } from '../../../types/index.js';
3
4
  type PayoutIconProps = {
4
5
  iconStyles?: React.CSSProperties;
5
6
  payoutStatus?: PayoutStatusType;
6
7
  payoutTooltip?: React.ReactNode;
7
8
  isTextShown?: boolean;
9
+ isSheetViewShown?: boolean;
10
+ chipIndex?: number;
11
+ selectionProps?: SelectionProps;
8
12
  };
9
- export declare const PayoutIcon: ({ payoutStatus, isTextShown, payoutTooltip, iconStyles }: PayoutIconProps) => import("react/jsx-runtime").JSX.Element;
13
+ export declare const PayoutIcon: ({ payoutStatus, isTextShown, payoutTooltip, iconStyles, isSheetViewShown, chipIndex, selectionProps, }: PayoutIconProps) => import("react/jsx-runtime").JSX.Element;
10
14
  export {};
@@ -5,8 +5,13 @@ import Tooltip from '../../Tooltip';
5
5
  import { StatusIcon } from '../../TableCells/CustomCells/style';
6
6
  import { StatusTextLabel } from '../../TableCells/CustomCells/InvoiceStatusCell/style';
7
7
  import { payoutStatusIcons } from '../../TableCells/CustomCells/StatusCell/constant';
8
- export const PayoutIcon = ({ payoutStatus = 'PENDING', isTextShown, payoutTooltip, iconStyles }) => {
8
+ import StatusChipWithCopy from '../../StatusChipWithCopy';
9
+ export const PayoutIcon = ({ payoutStatus = 'PENDING', isTextShown, payoutTooltip, iconStyles, isSheetViewShown, chipIndex = 0, selectionProps = {}, }) => {
9
10
  const { t } = useTranslation();
10
- const title = payoutTooltip ? payoutTooltip : t(camelCase(payoutStatus));
11
- return (_jsx(Tooltip, Object.assign({ title: title }, { children: isTextShown ? (_jsx(StatusTextLabel, Object.assign({ "data-testid": "StatusCell_PayoutStatusLabel" }, { children: t(camelCase(payoutStatus)) }))) : (_jsx(StatusIcon, { src: payoutStatusIcons[payoutStatus], alt: "settled-icon", "data-testid": "StatusCell_PayoutStatusIcon", style: iconStyles })) })));
11
+ const statusText = t(camelCase(payoutStatus));
12
+ const title = payoutTooltip ? payoutTooltip : statusText;
13
+ if (isSheetViewShown) {
14
+ return (_jsx(StatusChipWithCopy, Object.assign({ chipIndex: chipIndex, copyText: statusText, selectionProps: selectionProps }, { children: statusText })));
15
+ }
16
+ return (_jsx(Tooltip, Object.assign({ title: title }, { children: isTextShown ? (_jsx(StatusTextLabel, Object.assign({ "data-testid": "StatusCell_PayoutStatusLabel" }, { children: statusText }))) : (_jsx(StatusIcon, { src: payoutStatusIcons[payoutStatus], alt: "settled-icon", "data-testid": "StatusCell_PayoutStatusIcon", style: iconStyles })) })));
12
17
  };
@@ -1,11 +1,15 @@
1
1
  /// <reference types="react" />
2
2
  import { type RefundStatusType } from '../../TableCells';
3
+ import { SelectionProps } from '../../../types/index.js';
3
4
  type RefundIconProps = {
4
5
  iconStyles?: React.CSSProperties;
5
6
  refundStatus?: RefundStatusType;
6
7
  refundTooltip?: React.ReactNode;
7
8
  refundCount?: number;
8
9
  isTextShown?: boolean;
10
+ isSheetViewShown?: boolean;
11
+ chipIndex?: number;
12
+ selectionProps?: SelectionProps;
9
13
  };
10
- declare const RefundIcon: ({ isTextShown, refundStatus, refundTooltip, refundCount, iconStyles }: RefundIconProps) => import("react/jsx-runtime").JSX.Element;
14
+ declare const RefundIcon: ({ isTextShown, refundStatus, refundTooltip, refundCount, iconStyles, isSheetViewShown, chipIndex, selectionProps, }: RefundIconProps) => import("react/jsx-runtime").JSX.Element;
11
15
  export default RefundIcon;
@@ -1,4 +1,4 @@
1
- import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
2
  import camelCase from 'lodash/camelCase';
3
3
  import { useTranslation } from 'react-i18next';
4
4
  import Tooltip from '../../Tooltip';
@@ -8,9 +8,15 @@ import { MultiRefundContainer, MultiRefundIcon, RefundsCountBadge } from '../../
8
8
  import { StatusIcon } from '../../TableCells/CustomCells/style';
9
9
  import { StatusTextLabel } from '../../TableCells/CustomCells/InvoiceStatusCell/style';
10
10
  import { refundStatusIcons, refundStyles } from '../../TableCells/CustomCells/StatusCell/constant';
11
- const RefundIcon = ({ isTextShown, refundStatus = 'PENDING', refundTooltip = '', refundCount, iconStyles }) => {
11
+ import StatusChipWithCopy from '../../StatusChipWithCopy';
12
+ const RefundIcon = ({ isTextShown, refundStatus = 'PENDING', refundTooltip = '', refundCount, iconStyles, isSheetViewShown, chipIndex = 0, selectionProps = {}, }) => {
12
13
  const { t } = useTranslation();
13
14
  const theme = useTheme();
15
+ const refundCountShown = (refundCount || 0) > 1;
16
+ const status = t(camelCase(refundStatus));
17
+ if (isSheetViewShown) {
18
+ return (_jsxs(StatusChipWithCopy, Object.assign({ chipIndex: chipIndex, selectionProps: selectionProps, copyText: status }, { children: [status, " ", refundCountShown ? `${refundCount}x` : null] })));
19
+ }
14
20
  const refundCountBadge = (_jsxs(RefundsCountBadge, Object.assign({ "data-testid": "StatusCell_RefundsCountBadge", initial: { width: 0, opacity: 0, padding: '0px' }, transition: {
15
21
  animate: {
16
22
  duration: 0.5,
@@ -31,8 +37,8 @@ const RefundIcon = ({ isTextShown, refundStatus = 'PENDING', refundTooltip = '',
31
37
  opacity: 1,
32
38
  },
33
39
  } }, { children: [refundCount, "x"] })));
34
- const refundCountShown = (refundCount || 0) > 1;
35
- return (_jsx(_Fragment, { children: isTextShown ? (_jsx(Tooltip, Object.assign({ title: _jsx("div", { children: _jsx("div", { children: refundTooltip }) }) }, { children: _jsx(StatusTextLabel, Object.assign({ "data-testid": "StatusCell_RefundStatusLabel", sx: {
40
+ if (isTextShown) {
41
+ return (_jsx(Tooltip, Object.assign({ title: _jsx("div", { children: _jsx("div", { children: refundTooltip }) }) }, { children: _jsx(StatusTextLabel, Object.assign({ "data-testid": "StatusCell_RefundStatusLabel", sx: {
36
42
  color: refundStyles[refundStatus].color,
37
43
  backgroundColor: refundStyles[refundStatus].backgroundColor,
38
44
  width: '90px',
@@ -41,11 +47,13 @@ const RefundIcon = ({ isTextShown, refundStatus = 'PENDING', refundTooltip = '',
41
47
  boxShadow: theme.shadows[4],
42
48
  gap: theme.spacing(0.5),
43
49
  },
44
- } }, { children: [t(camelCase(refundStatus)), " ", refundCountShown ? refundCountBadge : null] })) })) }))) : (_jsx(Tooltip, Object.assign({ title: _jsx("div", { children: _jsx("div", { children: refundTooltip }) }) }, { children: refundCountShown ? (_jsxs(MultiRefundContainer, Object.assign({ whileHover: ['animate', 'fadeIn'], animate: "start", variants: {
45
- animate: {
46
- boxShadow: theme.shadows[4],
47
- gap: theme.spacing(0.5),
48
- },
49
- } }, { children: [_jsx(MultiRefundIcon, { src: refundSettledIcon, alt: "multi-refunded-icon", "data-testid": "StatusCell_MultiRefundIcon" }), refundCountBadge] }))) : (_jsx(StatusIcon, { src: refundStatusIcons[refundStatus], alt: "refunded-icon", "data-testid": "StatusCell_RefundStatusIcon", style: iconStyles })) }))) }));
50
+ } }, { children: [status, " ", refundCountShown ? refundCountBadge : null] })) })) })));
51
+ }
52
+ return (_jsx(Tooltip, Object.assign({ title: _jsx("div", { children: _jsx("div", { children: refundTooltip }) }) }, { children: refundCountShown ? (_jsxs(MultiRefundContainer, Object.assign({ whileHover: ['animate', 'fadeIn'], animate: "start", variants: {
53
+ animate: {
54
+ boxShadow: theme.shadows[4],
55
+ gap: theme.spacing(0.5),
56
+ },
57
+ } }, { children: [_jsx(MultiRefundIcon, { src: refundSettledIcon, alt: "multi-refunded-icon", "data-testid": "StatusCell_MultiRefundIcon" }), refundCountBadge] }))) : (_jsx(StatusIcon, { src: refundStatusIcons[refundStatus], alt: "refunded-icon", "data-testid": "StatusCell_RefundStatusIcon", style: iconStyles })) })));
50
58
  };
51
59
  export default RefundIcon;
@@ -0,0 +1,16 @@
1
+ /// <reference types="react" />
2
+ import { ToggleViews, ToggleViewsValues } from './types';
3
+ declare const DEFAULT_TOGGLE_VIEWS: {
4
+ icon: import("react/jsx-runtime").JSX.Element;
5
+ value: ToggleViews;
6
+ }[];
7
+ export interface ToggleViewProps {
8
+ onToggleClick: (view: ToggleViewsValues) => void;
9
+ currentView: ToggleViewsValues;
10
+ getOverrideViews?: (defaultViews: typeof DEFAULT_TOGGLE_VIEWS) => {
11
+ icon: React.ReactNode;
12
+ value: ToggleViewsValues;
13
+ }[];
14
+ }
15
+ declare const ToggleView: (props: ToggleViewProps) => import("react/jsx-runtime").JSX.Element | null;
16
+ export default ToggleView;