@tap-payments/os-micro-frontend-shared 0.1.96-test.4 → 0.1.96-test.5

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 (58) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +12 -12
  3. package/build/components/ActionMenu/style.d.ts +1 -1
  4. package/build/components/AppServices/AppServices.d.ts +10 -5
  5. package/build/components/AppServices/AppServices.js +16 -16
  6. package/build/components/AppServices/ServiceItem.d.ts +2 -4
  7. package/build/components/AppServices/ServiceItem.js +2 -4
  8. package/build/components/AppServicesBar/AppServicesBar.d.ts +24 -0
  9. package/build/components/AppServicesBar/AppServicesBar.js +21 -0
  10. package/build/components/AppServicesBar/index.d.ts +3 -0
  11. package/build/components/AppServicesBar/index.js +3 -0
  12. package/build/components/AppServicesBar/style.d.ts +4 -0
  13. package/build/components/AppServicesBar/style.js +6 -0
  14. package/build/components/ListLayout/ListLayout.d.ts +10 -0
  15. package/build/components/ListLayout/ListLayout.js +20 -0
  16. package/build/components/ListLayout/index.d.ts +2 -0
  17. package/build/components/ListLayout/index.js +2 -0
  18. package/build/components/ListLayout/styles.d.ts +4 -0
  19. package/build/components/ListLayout/styles.js +8 -0
  20. package/build/components/SearchButton/styles.d.ts +1 -1
  21. package/build/components/StatusChip/StatusChip.d.ts +1 -1
  22. package/build/components/StatusChip/StatusChip.js +8 -11
  23. package/build/components/StatusChip/style.d.ts +0 -1
  24. package/build/components/StatusChip/type.d.ts +0 -1
  25. package/build/components/ToggleView/ToggleView.d.ts +16 -0
  26. package/build/components/ToggleView/ToggleView.js +32 -0
  27. package/build/components/ToggleView/ToggleWrapper.d.ts +4 -0
  28. package/build/components/ToggleView/ToggleWrapper.js +8 -0
  29. package/build/components/ToggleView/index.d.ts +3 -0
  30. package/build/components/ToggleView/index.js +3 -0
  31. package/build/components/ToggleView/style.d.ts +14 -0
  32. package/build/components/ToggleView/style.js +31 -0
  33. package/build/components/ToggleView/types.d.ts +6 -0
  34. package/build/components/ToggleView/types.js +6 -0
  35. package/build/components/Toolbar/style.d.ts +6 -0
  36. package/build/components/Toolbar/style.js +5 -0
  37. package/build/components/VirtualTables/SheetViewVirtualTable/SheetViewVirtualTable.d.ts +1 -1
  38. package/build/components/VirtualTables/SheetViewVirtualTable/SheetViewVirtualTable.js +2 -2
  39. package/build/components/VirtualTables/VirtualTable/VirtualTable.d.ts +1 -1
  40. package/build/components/VirtualTables/VirtualTable/VirtualTable.js +2 -2
  41. package/build/components/VirtualTables/VirtualTableWithCard/VirtualTableWithCard.d.ts +1 -1
  42. package/build/components/VirtualTables/VirtualTableWithCard/VirtualTableWithCard.js +2 -2
  43. package/build/components/index.d.ts +6 -0
  44. package/build/components/index.js +6 -0
  45. package/build/constants/apps.d.ts +3 -0
  46. package/build/constants/apps.js +3 -0
  47. package/build/constants/table/cell/authorizationTableCellWidth.d.ts +2 -2
  48. package/build/constants/table/cell/authorizationTableCellWidth.js +2 -2
  49. package/build/constants/table/cell/chargeTableCellWidth.d.ts +2 -2
  50. package/build/constants/table/cell/chargeTableCellWidth.js +2 -2
  51. package/build/constants/table/cell/destinationsTableCellWidth.d.ts +2 -2
  52. package/build/constants/table/cell/destinationsTableCellWidth.js +2 -2
  53. package/build/constants/table/cell/refundTableCellWidth.d.ts +2 -2
  54. package/build/constants/table/cell/refundTableCellWidth.js +2 -2
  55. package/build/types/apps.d.ts +53 -1
  56. package/build/types/table.d.ts +1 -1
  57. package/build/utils/style.js +4 -0
  58. package/package.json +29 -2
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 Tap Payments
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Tap Payments
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,12 +1,12 @@
1
- # os-micro-frontend-shared
2
-
3
- ## Publishing Workflow
4
-
5
- 1. Update version in package.json
6
- 2. Commit changes
7
- 3. Create and push a tag:
8
-
9
- ```bash
10
- npm version patch # or minor, major
11
- git push origin main --tags
12
- ```
1
+ # os-micro-frontend-shared
2
+
3
+ ## Publishing Workflow
4
+
5
+ 1. Update version in package.json
6
+ 2. Commit changes
7
+ 3. Create and push a tag:
8
+
9
+ ```bash
10
+ npm version patch # or minor, major
11
+ git push origin main --tags
12
+ ```
@@ -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;
@@ -11,7 +11,7 @@ import { Wrapper } from './style';
11
11
  const selectedIcon = (props) => {
12
12
  return (_jsx(StyledIconForDropDown, { src: props.className.includes('MuiSelect-iconOpen') ? blueHeadingDropdownArrow : blackHeadingDownArrow, alt: "dropdown" }));
13
13
  };
14
- function AppServices({ appInfo, userApp, onChangeAppServiceCode, onClickServiceItem }) {
14
+ function AppServices({ isMaximized, serviceCode, dimensions, appCode, services, onChangeServiceCode, onClickServiceItem, }) {
15
15
  const [initServicesWidth, setInitServicesWidth] = useState(0);
16
16
  const [isDropdown, setIsDropdown] = useState(false);
17
17
  const [selectedOption, setSelectedOption] = useState('');
@@ -19,13 +19,13 @@ function AppServices({ appInfo, userApp, onChangeAppServiceCode, onClickServiceI
19
19
  const [openDropdown, setOpenDropdown] = React.useState(false);
20
20
  const pathname = useLocation();
21
21
  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 : [];
22
+ const servicesList = useMemo(() => {
23
+ var _a;
24
+ if (appCode === APP_CODES.account.code) {
25
+ return (_a = services.filter((service) => service.code === APP_CODES.account.services.account.code)) !== null && _a !== void 0 ? _a : [];
26
26
  }
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]);
27
+ return services !== null && services !== void 0 ? services : [];
28
+ }, [appCode, services]);
29
29
  const handleChange = (event) => {
30
30
  setSelectedOption(event.target.value);
31
31
  };
@@ -34,8 +34,8 @@ function AppServices({ appInfo, userApp, onChangeAppServiceCode, onClickServiceI
34
34
  };
35
35
  const activeTabTitle = useMemo(() => {
36
36
  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]);
37
+ 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);
38
+ }, [pathname, services, i18n.language]);
39
39
  useEffect(() => {
40
40
  setSelectedOption(activeTabTitle);
41
41
  }, [activeTabTitle]);
@@ -47,14 +47,14 @@ function AppServices({ appInfo, userApp, onChangeAppServiceCode, onClickServiceI
47
47
  setInitServicesWidth(((_a = servicesRef.current) === null || _a === void 0 ? void 0 : _a.offsetWidth) + iconSize + iconGap + iconMargin);
48
48
  }, []);
49
49
  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);
50
+ setIsDropdown(Number(dimensions.width) < initServicesWidth + 10);
51
+ }, [dimensions.width, initServicesWidth]);
52
+ const navigateToService = (newServiceCode) => {
53
+ onChangeServiceCode === null || onChangeServiceCode === void 0 ? void 0 : onChangeServiceCode(newServiceCode);
54
54
  setOpenDropdown(false);
55
55
  };
56
56
  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: {
57
+ 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
58
  anchorOrigin: {
59
59
  vertical: 40,
60
60
  horizontal: 83,
@@ -74,7 +74,7 @@ function AppServices({ appInfo, userApp, onChangeAppServiceCode, onClickServiceI
74
74
  paddingTop: '0px !important',
75
75
  paddingBottom: '0px !important',
76
76
  },
77
- } }, { children: services.map((service) => {
77
+ } }, { children: services.map((service, idx) => {
78
78
  var _a;
79
79
  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
80
  return null;
@@ -83,7 +83,7 @@ function AppServices({ appInfo, userApp, onChangeAppServiceCode, onClickServiceI
83
83
  e.preventDefault();
84
84
  e.stopPropagation();
85
85
  navigateToService(service.code);
86
- } }, { children: _jsx(StyledMenuTitle, { children: getNameText(service.name, i18n.language) }) })));
86
+ } }, { children: _jsx(StyledMenuTitle, { children: getNameText(service.name, i18n.language) }) }), `option-${service.code}-${idx}`));
87
87
  }) })))] })));
88
88
  }
89
89
  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,24 @@
1
+ /// <reference types="react" />
2
+ import { DragControls } from 'framer-motion';
3
+ import { SxProps, Theme } from '@mui/material/styles';
4
+ import { UserApp } from '../../types/index.js';
5
+ export interface AppServicesBarProps {
6
+ app?: UserApp;
7
+ isMaximized: boolean;
8
+ dimensions: {
9
+ width: number | string;
10
+ };
11
+ features: {
12
+ sandboxMode: boolean;
13
+ initialServiceCode?: string;
14
+ };
15
+ ui: {
16
+ onStartDrag: DragControls['start'];
17
+ };
18
+ onChangeServiceCode: (serviceCode: string) => void;
19
+ onClickServiceItem: (code: string) => void;
20
+ sx?: SxProps<Theme>;
21
+ }
22
+ declare function AppServicesBar({ app, isMaximized, dimensions, features: { initialServiceCode }, ui: { onStartDrag }, onChangeServiceCode, onClickServiceItem, sx, }: Readonly<AppServicesBarProps>): import("react/jsx-runtime").JSX.Element | null;
23
+ declare const _default: import("react").MemoExoticComponent<typeof AppServicesBar>;
24
+ export default _default;
@@ -0,0 +1,21 @@
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({ app, 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 (!app)
15
+ return null;
16
+ const services = (app === null || app === void 0 ? void 0 : app.app_services) || [];
17
+ if (!services.length)
18
+ return null;
19
+ 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: app.code, onChangeServiceCode: onChangeServiceCode }) })));
20
+ }
21
+ 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,8 @@
1
+ import Box from '@mui/material/Box';
2
+ import { styled } from '@mui/material/styles';
3
+ export const ListLayoutStyled = styled(Box)(() => ({
4
+ position: 'relative',
5
+ display: 'flex',
6
+ flexDirection: 'column',
7
+ height: '100%'
8
+ }));
@@ -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,3 +1,3 @@
1
1
  import { ChipProps } from './type';
2
- declare const StatusChip: ({ children, unknownText, copyText, expandDirection, ...props }: ChipProps) => import("react/jsx-runtime").JSX.Element;
2
+ declare const StatusChip: ({ children, unknownText, copyText, ...props }: ChipProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export default StatusChip;
@@ -18,7 +18,7 @@ import { copyIcon, greenCheckIcon } from '../../constants/index.js';
18
18
  import { unknownGeographyColors } from './constants';
19
19
  import { ChipStyled, Wrapper, CopyWrapper } from './style';
20
20
  const StatusChip = (_a) => {
21
- var { children, unknownText, copyText, expandDirection = 'right' } = _a, props = __rest(_a, ["children", "unknownText", "copyText", "expandDirection"]);
21
+ var { children, unknownText, copyText } = _a, props = __rest(_a, ["children", "unknownText", "copyText"]);
22
22
  const [showCopy, setShowCopy] = useState(false);
23
23
  const { t } = useTranslation();
24
24
  const isSelected = props.isSelected;
@@ -38,15 +38,12 @@ const StatusChip = (_a) => {
38
38
  };
39
39
  }
40
40
  };
41
- const isCopyActive = isSelected && copyText;
42
- return (_jsxs(motion.div, Object.assign({ style: { position: 'relative' }, animate: { zIndex: isSelected ? 3 : 0 } }, { children: [_jsx(ChipStyled, Object.assign({}, props, { sx: { visibility: 'hidden', pointerEvents: 'none' } }, { children: _jsx(Wrapper, { children: children }) })), _jsx(motion.div, Object.assign({ style: { position: 'absolute', top: 0, zIndex: isSelected ? 3 : 0 }, animate: {
43
- left: isCopyActive && expandDirection === 'left' ? -12 : 0,
44
- }, transition: { delay: isSelected ? 0 : 0.2, duration: 0.2 } }, { children: _jsx(ChipStyled, Object.assign({}, props, { isSelected: isSelected }, { children: _jsxs(motion.div, Object.assign({ layout: "size", style: { display: 'flex', gap: '4px' }, animate: {
45
- paddingRight: isCopyActive ? 12 : 0,
46
- }, transition: { delay: isSelected ? 0 : 0.2, duration: 0.2 } }, { children: [_jsx(Wrapper, { children: children }), _jsx(AnimatePresence, Object.assign({ initial: false }, { children: isCopyActive && (_jsx(CopyWrapper, { children: _jsx(motion.img, { initial: { opacity: 0, x: -5 }, animate: { opacity: 1, x: 0 }, exit: { opacity: 0, x: -2 }, transition: { delay: 0.2, duration: 0.1 }, onClick: handleCopy, src: showCopy ? greenCheckIcon : copyIcon, style: {
47
- height: 12,
48
- width: 12,
49
- objectFit: 'contain',
50
- } }) })) }))] })) })) }))] })));
41
+ return (_jsxs(motion.div, Object.assign({ style: { position: 'relative' }, animate: { zIndex: isSelected ? 3 : 0 } }, { children: [_jsx(ChipStyled, Object.assign({}, props, { sx: { visibility: 'hidden', pointerEvents: 'none' } }, { children: _jsx(Wrapper, { children: children }) })), _jsx(ChipStyled, Object.assign({}, props, { isSelected: isSelected, style: { position: 'absolute', top: 0, left: 0, zIndex: isSelected ? 3 : 0 } }, { children: _jsxs(motion.div, Object.assign({ layout: "size", style: { display: 'flex', gap: '4px' }, animate: {
42
+ paddingRight: isSelected && copyText ? 12 : 0,
43
+ }, transition: { delay: isSelected ? 0 : 0.2, duration: 0.2 } }, { children: [_jsx(Wrapper, { children: children }), _jsx(AnimatePresence, { children: isSelected && copyText && (_jsx(CopyWrapper, { children: _jsx(motion.img, { initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, transition: { delay: isSelected ? 0.2 : 0, duration: 0.1 }, onClick: handleCopy, src: showCopy ? greenCheckIcon : copyIcon, style: {
44
+ height: 12,
45
+ width: 12,
46
+ objectFit: 'contain',
47
+ } }) })) })] })) }))] })));
51
48
  };
52
49
  export default StatusChip;
@@ -11,7 +11,6 @@ export declare const ChipStyled: import("@emotion/styled").StyledComponent<impor
11
11
  maxWidth?: string | undefined;
12
12
  isSelected?: boolean | undefined;
13
13
  copyText?: string | undefined;
14
- expandDirection?: "left" | "right" | undefined;
15
14
  } & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
16
15
  ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
17
16
  }, keyof import("@mui/material/OverridableComponent").CommonProps | keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & {
@@ -10,5 +10,4 @@ export type ChipProps = PropsWithChildren<{
10
10
  maxWidth?: string;
11
11
  isSelected?: boolean;
12
12
  copyText?: string;
13
- expandDirection?: 'left' | 'right';
14
13
  } & BoxProps>;
@@ -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;
@@ -0,0 +1,32 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cardViewButtonIcon, listViewButtonIcon } from '../../constants/index.js';
3
+ import { ActiveOverlay, ViewButton } from './style';
4
+ import { ToggleViews } from './types';
5
+ import { useMemo } from 'react';
6
+ import ToggleWrapper from './ToggleWrapper';
7
+ const DEFAULT_TOGGLE_VIEWS = [
8
+ {
9
+ icon: _jsx("img", { src: cardViewButtonIcon, alt: "card" }),
10
+ value: ToggleViews.CARDS,
11
+ },
12
+ {
13
+ icon: _jsx("img", { src: listViewButtonIcon, alt: ToggleViews.LIST }),
14
+ value: ToggleViews.LIST,
15
+ },
16
+ ];
17
+ const ToggleView = (props) => {
18
+ const { currentView, onToggleClick, getOverrideViews } = props;
19
+ const views = useMemo(() => {
20
+ if (getOverrideViews)
21
+ return getOverrideViews(DEFAULT_TOGGLE_VIEWS);
22
+ return DEFAULT_TOGGLE_VIEWS;
23
+ }, [getOverrideViews]);
24
+ const viewIndex = useMemo(() => views.findIndex((view) => view.value === currentView), [views, currentView]);
25
+ if (!onToggleClick)
26
+ return null;
27
+ return (_jsxs(ToggleWrapper, { children: [views.map((view) => (_jsx(ViewButton, Object.assign({ onClick: () => onToggleClick(view.value), sx: {
28
+ height: '11.6px',
29
+ width: '11.6px',
30
+ }, isActive: currentView === view.value }, { children: view.icon }), view.value))), _jsx(ActiveOverlay, { activeIndex: viewIndex })] }));
31
+ };
32
+ export default ToggleView;
@@ -0,0 +1,4 @@
1
+ import { PropsWithChildren } from 'react';
2
+ import { type BoxProps } from '@mui/material/Box';
3
+ declare const ToggleWrapper: (props: PropsWithChildren<BoxProps>) => import("react/jsx-runtime").JSX.Element;
4
+ export default ToggleWrapper;
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import React from 'react';
3
+ import { ToggleWrapperStyled } from './style';
4
+ const ToggleWrapper = (props) => {
5
+ const viewTogglers = React.Children.count(props.children) - 1;
6
+ return _jsx(ToggleWrapperStyled, Object.assign({}, props, { sx: { width: viewTogglers * 30 + 2 } }));
7
+ };
8
+ export default ToggleWrapper;
@@ -0,0 +1,3 @@
1
+ import ToggleView from './ToggleView';
2
+ export default ToggleView;
3
+ export * from './types';
@@ -0,0 +1,3 @@
1
+ import ToggleView from './ToggleView';
2
+ export default ToggleView;
3
+ export * from './types';
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ export declare const ToggleWrapperStyled: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").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").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
5
+ export declare const ViewButton: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
6
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
7
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
8
+ isActive: boolean;
9
+ }, {}, {}>;
10
+ export declare const ActiveOverlay: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
11
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
12
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
13
+ activeIndex: number;
14
+ }, {}, {}>;
@@ -0,0 +1,31 @@
1
+ import { Box, styled } from '@mui/material';
2
+ export const ToggleWrapperStyled = styled(Box)(({ theme }) => ({
3
+ height: '32px',
4
+ borderRadius: '4px',
5
+ backgroundColor: theme.palette.action.hover,
6
+ padding: '2px',
7
+ display: 'flex',
8
+ alignItems: 'center',
9
+ position: 'relative',
10
+ cursor: 'pointer'
11
+ }));
12
+ export const ViewButton = styled(Box, { shouldForwardProp: (props) => props !== 'isActive' })(({ isActive }) => ({
13
+ flex: 1,
14
+ display: 'flex',
15
+ justifyContent: 'center',
16
+ alignItems: 'center',
17
+ position: 'relative',
18
+ zIndex: 2,
19
+ opacity: isActive ? 1 : 0.5
20
+ }));
21
+ export const ActiveOverlay = styled(Box, { shouldForwardProp: (props) => props !== 'activeIndex' })(({ theme, activeIndex }) => ({
22
+ position: 'absolute',
23
+ top: 2,
24
+ left: activeIndex * 30 + 2,
25
+ transition: 'all 0.25s ease-in-out',
26
+ width: '28px',
27
+ height: '28px',
28
+ backgroundColor: theme.palette.common.white,
29
+ borderRadius: '2px',
30
+ boxShadow: '0px 0px 4px 0px rgba(0, 0, 0, 0.20)'
31
+ }));
@@ -0,0 +1,6 @@
1
+ export declare enum ToggleViews {
2
+ LIST = "LIST",
3
+ CARDS = "CARDS",
4
+ MAP = "MAP"
5
+ }
6
+ export type ToggleViewsValues = `${ToggleViews}` | (string & {});
@@ -0,0 +1,6 @@
1
+ export var ToggleViews;
2
+ (function (ToggleViews) {
3
+ ToggleViews["LIST"] = "LIST";
4
+ ToggleViews["CARDS"] = "CARDS";
5
+ ToggleViews["MAP"] = "MAP";
6
+ })(ToggleViews || (ToggleViews = {}));
@@ -13,6 +13,12 @@ export declare const StyledHeaderWrapper: import("@emotion/styled").StyledCompon
13
13
  maximized?: boolean | undefined;
14
14
  isDragging?: boolean | undefined;
15
15
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
16
+ export declare const StyledAppHeaderWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
17
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
18
+ }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
19
+ sandboxMode?: boolean | undefined;
20
+ isDragging?: boolean | undefined;
21
+ }, {}, {}>;
16
22
  export declare const ToolbarStyled: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
17
23
  ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
18
24
  }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
@@ -44,6 +44,11 @@ export const StyledHeaderWrapper = styled('div', {
44
44
  })), (isDragging && {
45
45
  cursor: 'move',
46
46
  })), { margin: 0 })));
47
+ export const StyledAppHeaderWrapper = styled(Box, {
48
+ shouldForwardProp: (prop) => prop !== 'maximized' && prop !== 'isDragging',
49
+ })(({ isDragging }) => (Object.assign(Object.assign({ backdropFilter: 'blur(32px)' }, (isDragging && {
50
+ cursor: 'move',
51
+ })), { margin: 0 })));
47
52
  export const ToolbarStyled = styled(Box, {
48
53
  shouldForwardProp: (props) => props !== 'maximized' && props !== 'isHovered',
49
54
  })(({ theme, maximized }) => (Object.assign(Object.assign({ height: 32, position: 'relative', display: 'flex', width: '100%', justifyContent: 'center', transition: 'all 0.5s ease-in-out', borderTopLeftRadius: '12px', borderTopRightRadius: '12px' }, (maximized && {
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import { ISheetViewVirtualTable } from './types';
3
- declare function SheetViewVirtualTable({ columns, rows, threshold, showHeader, headerProps, rowProps, footerProps, rowHeight, isLoading, error, columnsSorting, onColumnSort, loadMoreItems, isFetchingNextPage, triggerDataRefetch, scrollToIndex, areAllRowsLoaded, tableBodyStyles, tableTitle, dragControls, onColumnPin, clearBackdropVisibilityTimeout, isPinnable, tableMode, overscanCount, }: Readonly<ISheetViewVirtualTable>): import("react/jsx-runtime").JSX.Element;
3
+ declare function SheetViewVirtualTable({ columns, rows, threshold, showHeader, headerProps, rowProps, footerProps, rowHeight, isLoading, error, columnsSorting, onColumnSort, loadMoreItems, isFetchingNextPage, triggerDataRefetch, scrollToIndex, areAllRowsLoaded, tableBodyStyles, tableTitle, onStartDrag, onColumnPin, clearBackdropVisibilityTimeout, isPinnable, tableMode, overscanCount, }: Readonly<ISheetViewVirtualTable>): import("react/jsx-runtime").JSX.Element;
4
4
  declare const _default: import("react").MemoExoticComponent<typeof SheetViewVirtualTable>;
5
5
  export default _default;
@@ -6,7 +6,7 @@ import { SheetViewTableContainer } from '../components/style';
6
6
  import { SheetViewVirtualTableWrapper } from './style';
7
7
  import { usePinnedColumns, useSynchronizedScroll, useTableState, useTableData, useVirtualTableContainer, usePinnedColumnsWidths } from './hooks';
8
8
  import { PinnedColumn, MainTable, LoadingMainTable, NoDataView, VirtualTable } from './components';
9
- function SheetViewVirtualTable({ columns, rows, threshold = SHEET_VIEW_TABLE_THRESHOLD, showHeader, headerProps, rowProps, footerProps, rowHeight = 28, isLoading, error, columnsSorting, onColumnSort, loadMoreItems, isFetchingNextPage, triggerDataRefetch, scrollToIndex, areAllRowsLoaded = false, tableBodyStyles, tableTitle, dragControls, onColumnPin, clearBackdropVisibilityTimeout = 100, isPinnable = false, tableMode, overscanCount, }) {
9
+ function SheetViewVirtualTable({ columns, rows, threshold = SHEET_VIEW_TABLE_THRESHOLD, showHeader, headerProps, rowProps, footerProps, rowHeight = 28, isLoading, error, columnsSorting, onColumnSort, loadMoreItems, isFetchingNextPage, triggerDataRefetch, scrollToIndex, areAllRowsLoaded = false, tableBodyStyles, tableTitle, onStartDrag, onColumnPin, clearBackdropVisibilityTimeout = 100, isPinnable = false, tableMode, overscanCount, }) {
10
10
  const { selectedCell, selectedColumn, selectedRow, showBackDrop, setShowBackdrop, handleCellClick, handleColumnClick, handleChipClick, selectedChip, } = useTableState();
11
11
  const { isError, tableLoading, tableError, tableEmpty, hasTimeoutError, showNoDataView, lastItemIndex, areTotalRowsNotFillingHeight, itemsCount, isDelayedFetchingNextPage, } = useTableData({
12
12
  rows,
@@ -35,7 +35,7 @@ function SheetViewVirtualTable({ columns, rows, threshold = SHEET_VIEW_TABLE_THR
35
35
  handleChipClick,
36
36
  });
37
37
  const onPointerDown = (e) => {
38
- dragControls === null || dragControls === void 0 ? void 0 : dragControls.start(e);
38
+ onStartDrag === null || onStartDrag === void 0 ? void 0 : onStartDrag(e);
39
39
  };
40
40
  const createVirtualTableContainer = useCallback((columnsData, containerKey, isPinned = false, fixedWidth) => {
41
41
  const listRef = containerKey === 'pinnedStart' ? pinnedStartVirtualListRef : containerKey === 'pinnedEnd' ? pinnedEndVirtualListRef : scrollableVirtualListRef;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import type { IVirtualTable } from '../../../types/index.js';
3
- declare function VirtualTable({ columns, rows, threshold, showHeader, headerProps, rowProps, footerProps, isLoading, error, columnsSorting, onColumnSort, loadMoreItems, isFetchingNextPage, triggerDataRefetch, scrollToIndex, areAllRowsLoaded, tableBodyStyles, tableMode, tableTitle, dragControls, isSheetView, isMinimized, }: Readonly<IVirtualTable>): import("react/jsx-runtime").JSX.Element;
3
+ declare function VirtualTable({ columns, rows, threshold, showHeader, headerProps, rowProps, footerProps, isLoading, error, columnsSorting, onColumnSort, loadMoreItems, isFetchingNextPage, triggerDataRefetch, scrollToIndex, areAllRowsLoaded, tableBodyStyles, tableMode, tableTitle, onStartDrag, isSheetView, isMinimized, }: Readonly<IVirtualTable>): import("react/jsx-runtime").JSX.Element;
4
4
  declare const _default: import("react").MemoExoticComponent<typeof VirtualTable>;
5
5
  export default _default;
@@ -34,11 +34,11 @@ const createItemData = memoize((columns, isLoading, rows, rowProps, scrollToInde
34
34
  areAllRowsLoaded,
35
35
  isSheetView,
36
36
  }));
37
- function VirtualTable({ columns, rows, threshold = TABLE_THRESHOLD, showHeader, headerProps, rowProps, footerProps, isLoading, error, columnsSorting, onColumnSort, loadMoreItems, isFetchingNextPage, triggerDataRefetch, scrollToIndex, areAllRowsLoaded = false, tableBodyStyles, tableMode, tableTitle, dragControls, isSheetView = false, isMinimized, }) {
37
+ function VirtualTable({ columns, rows, threshold = TABLE_THRESHOLD, showHeader, headerProps, rowProps, footerProps, isLoading, error, columnsSorting, onColumnSort, loadMoreItems, isFetchingNextPage, triggerDataRefetch, scrollToIndex, areAllRowsLoaded = false, tableBodyStyles, tableMode, tableTitle, onStartDrag, isSheetView = false, isMinimized, }) {
38
38
  var _a;
39
39
  const theme = useTheme();
40
40
  const onPointerDown = (e) => {
41
- dragControls === null || dragControls === void 0 ? void 0 : dragControls.start(e);
41
+ onStartDrag === null || onStartDrag === void 0 ? void 0 : onStartDrag(e);
42
42
  };
43
43
  const isDelayedFetchingNextPage = useDelayToSetValue({
44
44
  value: isFetchingNextPage,
@@ -8,6 +8,6 @@ export interface VirtualTableWithCardProps extends Omit<IVirtualTable, 'showHead
8
8
  tableHeight: number;
9
9
  tableHeaderHeight?: number;
10
10
  }
11
- declare function VirtualTableWithCard({ rows, threshold, rowProps, footerProps, rowHeight, isLoading, error, tableHeader, loadMoreItems, isFetchingNextPage, triggerDataRefetch, scrollToIndex, areAllRowsLoaded, tableBodyStyles, tableMode, tableTitle, renderCardComponent, cardLoadingComponent, tableHeight, tableHeaderHeight, noDataComponent, dragControls, }: VirtualTableWithCardProps): import("react/jsx-runtime").JSX.Element;
11
+ declare function VirtualTableWithCard({ rows, threshold, rowProps, footerProps, rowHeight, isLoading, error, tableHeader, loadMoreItems, isFetchingNextPage, triggerDataRefetch, scrollToIndex, areAllRowsLoaded, tableBodyStyles, tableMode, tableTitle, renderCardComponent, cardLoadingComponent, tableHeight, tableHeaderHeight, noDataComponent, onStartDrag, }: Readonly<VirtualTableWithCardProps>): import("react/jsx-runtime").JSX.Element;
12
12
  declare const _default: import("react").MemoExoticComponent<typeof VirtualTableWithCard>;
13
13
  export default _default;
@@ -32,11 +32,11 @@ const createItemData = memoize((isLoading, rows, rowProps, scrollToIndex, lastIt
32
32
  areAllRowsLoaded,
33
33
  renderCardComponent,
34
34
  }));
35
- function VirtualTableWithCard({ rows, threshold = TABLE_THRESHOLD, rowProps, footerProps, rowHeight = TABLE_ROW_HEIGHT, isLoading, error, tableHeader, loadMoreItems, isFetchingNextPage, triggerDataRefetch, scrollToIndex, areAllRowsLoaded = false, tableBodyStyles, tableMode, tableTitle, renderCardComponent, cardLoadingComponent, tableHeight, tableHeaderHeight, noDataComponent, dragControls, }) {
35
+ function VirtualTableWithCard({ rows, threshold = TABLE_THRESHOLD, rowProps, footerProps, rowHeight = TABLE_ROW_HEIGHT, isLoading, error, tableHeader, loadMoreItems, isFetchingNextPage, triggerDataRefetch, scrollToIndex, areAllRowsLoaded = false, tableBodyStyles, tableMode, tableTitle, renderCardComponent, cardLoadingComponent, tableHeight, tableHeaderHeight, noDataComponent, onStartDrag, }) {
36
36
  var _a;
37
37
  const theme = useTheme();
38
38
  const onPointerDown = (e) => {
39
- dragControls === null || dragControls === void 0 ? void 0 : dragControls.start(e);
39
+ onStartDrag === null || onStartDrag === void 0 ? void 0 : onStartDrag(e);
40
40
  };
41
41
  const isDelayedFetchingNextPage = useDelayToSetValue({
42
42
  value: isFetchingNextPage,
@@ -97,6 +97,10 @@ export { default as AppServices } from './AppServices';
97
97
  export { default as ScrollLoader } from './ScrollLoader';
98
98
  export * from './ScrollLoader';
99
99
  export * from './TooltipChip';
100
+ export { default as ListLayout } from './ListLayout';
101
+ export * from './ListLayout';
102
+ export { default as ToggleView } from './ToggleView';
103
+ export * from './ToggleView';
100
104
  export * from './RightLeftExpandingCenterChip';
101
105
  export { default as StatusChipWithCopy } from './StatusChipWithCopy';
102
106
  export * from './RadioButton';
@@ -106,3 +110,5 @@ export { default as ColorPicker } from './ColorPicker';
106
110
  export { default as WindowBackdrop } from './WindowBackdrop';
107
111
  export { default as LazyImage } from './LazyImage';
108
112
  export * from './LazyImage';
113
+ export { default as AppServicesBar } from './AppServicesBar';
114
+ export * from './AppServicesBar';
@@ -97,6 +97,10 @@ export { default as AppServices } from './AppServices';
97
97
  export { default as ScrollLoader } from './ScrollLoader';
98
98
  export * from './ScrollLoader';
99
99
  export * from './TooltipChip';
100
+ export { default as ListLayout } from './ListLayout';
101
+ export * from './ListLayout';
102
+ export { default as ToggleView } from './ToggleView';
103
+ export * from './ToggleView';
100
104
  export * from './RightLeftExpandingCenterChip';
101
105
  export { default as StatusChipWithCopy } from './StatusChipWithCopy';
102
106
  export * from './RadioButton';
@@ -106,3 +110,5 @@ export { default as ColorPicker } from './ColorPicker';
106
110
  export { default as WindowBackdrop } from './WindowBackdrop';
107
111
  export { default as LazyImage } from './LazyImage';
108
112
  export * from './LazyImage';
113
+ export { default as AppServicesBar } from './AppServicesBar';
114
+ export * from './AppServicesBar';
@@ -719,3 +719,6 @@ export declare const APP_ICONS: {
719
719
  toolbarIconUrl: string;
720
720
  }[];
721
721
  export declare const excludedApps: string[];
722
+ export declare const MF_APPS_MAPPER: Readonly<{
723
+ TERMINALS: "TERMINALS";
724
+ }>;
@@ -359,3 +359,6 @@ export const APP_ICONS = [
359
359
  },
360
360
  ];
361
361
  export const excludedApps = ['login'];
362
+ export const MF_APPS_MAPPER = Object.freeze({
363
+ TERMINALS: 'TERMINALS',
364
+ });
@@ -57,12 +57,12 @@ export declare const authorizationTableCellWidth: {
57
57
  readonly payment_agreement: {
58
58
  readonly default: "50px";
59
59
  readonly text: "150px";
60
- readonly sheet: "230px";
60
+ readonly sheet: "170px";
61
61
  };
62
62
  readonly amount: {
63
63
  readonly default: "170px";
64
64
  readonly text: "195px";
65
- readonly sheet: "150px";
65
+ readonly sheet: "195px";
66
66
  };
67
67
  readonly destinations: {
68
68
  readonly default: "70px";
@@ -57,12 +57,12 @@ export const authorizationTableCellWidth = {
57
57
  payment_agreement: {
58
58
  default: '50px',
59
59
  text: '150px',
60
- sheet: '230px',
60
+ sheet: '170px',
61
61
  },
62
62
  amount: {
63
63
  default: '170px',
64
64
  text: '195px',
65
- sheet: '150px',
65
+ sheet: '195px',
66
66
  },
67
67
  destinations: {
68
68
  default: '70px',
@@ -52,7 +52,7 @@ export declare const chargeTableCellWidth: {
52
52
  readonly payment_agreement: {
53
53
  readonly default: "50px";
54
54
  readonly text: "150px";
55
- readonly sheet: "230px";
55
+ readonly sheet: "165px";
56
56
  };
57
57
  readonly payment_initiated: {
58
58
  readonly default: "150px";
@@ -222,7 +222,7 @@ export declare const chargeTableCellWidth: {
222
222
  readonly consolidated_amount: {
223
223
  readonly default: "180px";
224
224
  readonly text: "180px";
225
- readonly sheet: "150px";
225
+ readonly sheet: "180px";
226
226
  };
227
227
  readonly customer_amount: {
228
228
  readonly default: "150px";
@@ -52,7 +52,7 @@ export const chargeTableCellWidth = {
52
52
  payment_agreement: {
53
53
  default: '50px',
54
54
  text: '150px',
55
- sheet: '230px',
55
+ sheet: '165px',
56
56
  },
57
57
  payment_initiated: {
58
58
  default: '150px',
@@ -222,7 +222,7 @@ export const chargeTableCellWidth = {
222
222
  consolidated_amount: {
223
223
  default: '180px',
224
224
  text: '180px',
225
- sheet: '150px',
225
+ sheet: '180px',
226
226
  },
227
227
  customer_amount: {
228
228
  default: '150px',
@@ -62,12 +62,12 @@ export declare const destinationsTableCellWidth: {
62
62
  readonly payment_agreement: {
63
63
  readonly default: "50px";
64
64
  readonly text: "250px";
65
- readonly sheet: "230px";
65
+ readonly sheet: "165px";
66
66
  };
67
67
  readonly amount: {
68
68
  readonly default: "195px";
69
69
  readonly text: "195px";
70
- readonly sheet: "150px";
70
+ readonly sheet: "195px";
71
71
  };
72
72
  readonly status: {
73
73
  readonly default: "50px";
@@ -62,12 +62,12 @@ export const destinationsTableCellWidth = {
62
62
  payment_agreement: {
63
63
  default: '50px',
64
64
  text: '250px',
65
- sheet: '230px',
65
+ sheet: '165px',
66
66
  },
67
67
  amount: {
68
68
  default: '195px',
69
69
  text: '195px',
70
- sheet: '150px',
70
+ sheet: '195px',
71
71
  },
72
72
  status: {
73
73
  default: '50px',
@@ -47,7 +47,7 @@ export declare const refundTableCellWidth: {
47
47
  readonly payment_agreement: {
48
48
  readonly default: "50px";
49
49
  readonly text: "200px";
50
- readonly sheet: "230px";
50
+ readonly sheet: "165px";
51
51
  };
52
52
  readonly payment_initiated: {
53
53
  readonly default: "150px";
@@ -92,7 +92,7 @@ export declare const refundTableCellWidth: {
92
92
  readonly amount: {
93
93
  readonly default: "195px";
94
94
  readonly text: "195px";
95
- readonly sheet: "150px";
95
+ readonly sheet: "180px";
96
96
  };
97
97
  readonly payouts: {
98
98
  readonly default: "195px";
@@ -47,7 +47,7 @@ export const refundTableCellWidth = {
47
47
  payment_agreement: {
48
48
  default: '50px',
49
49
  text: '200px',
50
- sheet: '230px',
50
+ sheet: '165px',
51
51
  },
52
52
  payment_initiated: {
53
53
  default: '150px',
@@ -92,7 +92,7 @@ export const refundTableCellWidth = {
92
92
  amount: {
93
93
  default: '195px',
94
94
  text: '195px',
95
- sheet: '150px',
95
+ sheet: '180px',
96
96
  },
97
97
  payouts: {
98
98
  default: '195px',
@@ -1,6 +1,11 @@
1
1
  import { ColumnsView } from './column';
2
- import { TextAndLang } from './user';
2
+ import { Segment, SegmentCountry, TextAndLang } from './user';
3
3
  import { BusinessMerchant } from './merchant';
4
+ import type { i18n } from 'i18next';
5
+ import type { DragControls } from 'framer-motion';
6
+ import { Theme } from '@mui/material';
7
+ import { CalenderMode } from './theme';
8
+ import { Timezone } from './appConfig';
4
9
  export interface AccountAppPayload {
5
10
  disabledAccountDataFetching?: boolean;
6
11
  isAccountDetailsOpen: boolean;
@@ -63,3 +68,50 @@ export interface UserApp {
63
68
  name: TextAndLang[];
64
69
  app_services: AppService[];
65
70
  }
71
+ export type MFWidgetBaseProps = {
72
+ id: string;
73
+ i18n?: i18n;
74
+ app?: UserApp;
75
+ appWindow: {
76
+ isMinimized: boolean;
77
+ isMaximized: boolean;
78
+ order: number;
79
+ dimensions: Pick<AppDetails['dimensions'], 'width' | 'height'>;
80
+ };
81
+ features: {
82
+ hasReportsApp: boolean;
83
+ hasHeader: boolean;
84
+ sandboxMode: boolean;
85
+ initialServiceCode?: string;
86
+ };
87
+ segment: Pick<Segment, 'id' | 'brands' | 'countries'> & {
88
+ defaultCountry?: SegmentCountry;
89
+ };
90
+ ui: {
91
+ theme: Theme;
92
+ onStartDrag: DragControls['start'];
93
+ };
94
+ calendar: {
95
+ mode: CalenderMode;
96
+ onSwitch: (mode: CalenderMode) => void;
97
+ };
98
+ navigation: {
99
+ openAppService: (navigation: {
100
+ id?: string;
101
+ appId?: string;
102
+ appCode: string;
103
+ serviceCode: string;
104
+ state?: unknown;
105
+ }) => void;
106
+ openApp: (app: Pick<AppDetails, 'appCode' | 'serviceCode' | 'payload'> & {
107
+ sandboxMode?: boolean;
108
+ }) => void;
109
+ modifyAppServiceCode: ({ id, serviceCode, appCode }: Pick<AppDetails, 'id' | 'serviceCode' | 'appCode'>) => void;
110
+ };
111
+ timezone: {
112
+ current?: Timezone | null;
113
+ default?: Timezone;
114
+ onChange: (timezone: Timezone) => void;
115
+ onChangeHistory: (timezone: Timezone) => void;
116
+ };
117
+ };
@@ -136,7 +136,7 @@ export interface IVirtualTable<R = any> {
136
136
  height: string | number;
137
137
  width: string | number;
138
138
  };
139
- dragControls?: DragControls;
139
+ onStartDrag?: DragControls['start'];
140
140
  isSheetView?: boolean;
141
141
  isMinimized?: boolean;
142
142
  }
@@ -31,6 +31,10 @@ export const getSelectionStyles = ({ isSelected, isCellSelected, isColumnSelecte
31
31
  const getRowSelectionStyles = () => ({
32
32
  backgroundColor: SELECTION_COLORS.background,
33
33
  color: SELECTION_COLORS.primary,
34
+ border: 'none',
35
+ '&:before': {
36
+ border: 'none',
37
+ },
34
38
  });
35
39
  const getSingleCellSelectionStyles = () => ({
36
40
  border: `${BORDER_STYLES.thin} solid ${SELECTION_COLORS.primary}`,
package/package.json CHANGED
@@ -1,13 +1,14 @@
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.4",
5
- "testVersion": 4,
4
+ "version": "0.1.96-test.5",
5
+ "testVersion": 5,
6
6
  "type": "module",
7
7
  "main": "build/index.js",
8
8
  "module": "build/index.js",
9
9
  "types": "build/index.d.ts",
10
10
  "exports": {
11
+ "./package.json": "./package.json",
11
12
  ".": {
12
13
  "types": "./build/index.d.ts",
13
14
  "import": "./build/index.js",
@@ -127,6 +128,32 @@
127
128
  "vite": "6.0.5",
128
129
  "vite-tsconfig-paths": "^4.2.0"
129
130
  },
131
+ "peerDependencies": {
132
+ "react": "^18",
133
+ "react-dom": "^18",
134
+ "@mui/material": "^5",
135
+ "@emotion/react": "^11",
136
+ "@emotion/styled": "^11",
137
+ "framer-motion": "^10",
138
+ "react-hook-form": "^7",
139
+ "@hookform/resolvers": "^3",
140
+ "react-router-dom": "^7",
141
+ "i18next": "^22",
142
+ "react-i18next": "^12",
143
+ "react-multi-date-picker": "^4",
144
+ "dayjs": "^1",
145
+ "react-dropzone": "^14",
146
+ "react-hot-toast": "^2",
147
+ "recharts": "^2",
148
+ "react-window": "^1.8",
149
+ "react-window-infinite-loader": "^1",
150
+ "react-virtualized-auto-sizer": "^1",
151
+ "re-resizable": "^6",
152
+ "react-draggable": "^4",
153
+ "react-currency-input-field": "^3",
154
+ "react18-input-otp": "^1",
155
+ "@uiw/react-json-view": "^2.0.0-alpha"
156
+ },
130
157
  "lint-staged": {
131
158
  "src/**/*.{ts,tsx,json,js,jsx}": [
132
159
  "yarn run prettier:fix",