@tap-payments/os-micro-frontend-shared 0.1.140-test.3 → 0.1.141
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/components/ActionMenu/style.d.ts +1 -1
- package/build/components/AppServices/AppServices.d.ts +10 -5
- package/build/components/AppServices/AppServices.js +18 -18
- package/build/components/AppServices/ServiceItem.d.ts +2 -4
- package/build/components/AppServices/ServiceItem.js +2 -4
- package/build/components/AppServicesBar/AppServicesBar.d.ts +22 -0
- package/build/components/AppServicesBar/AppServicesBar.js +18 -0
- package/build/components/AppServicesBar/index.d.ts +3 -0
- package/build/components/AppServicesBar/index.js +3 -0
- package/build/components/AppServicesBar/style.d.ts +4 -0
- package/build/components/AppServicesBar/style.js +6 -0
- package/build/components/AppWindowWrapper/headers/AccountHeader/components/AccountHeaderTitle/AccountHeaderTitle.d.ts +1 -1
- package/build/components/AppWindowWrapper/headers/AccountHeader/components/AccountHeaderTitle/AccountHeaderTitle.js +1 -1
- package/build/components/AppWindowWrapper/headers/AppWindowHeader/AppWindowHeaderBase.d.ts +1 -1
- package/build/components/AppWindowWrapper/headers/AppWindowHeader/AppWindowHeaderBase.js +2 -2
- package/build/components/JSONViewer/components/JSONTitleBar/JSONTitleBar.d.ts +1 -1
- package/build/components/JSONViewer/components/JSONTitleBar/JSONTitleBar.js +1 -1
- package/build/components/ListLayout/ListLayout.d.ts +10 -0
- package/build/components/ListLayout/ListLayout.js +20 -0
- package/build/components/ListLayout/index.d.ts +2 -0
- package/build/components/ListLayout/index.js +2 -0
- package/build/components/ListLayout/styles.d.ts +4 -0
- package/build/components/ListLayout/styles.js +9 -0
- package/build/components/MFWidgetLoader/MFWidgetLoader.d.ts +2 -0
- package/build/components/MFWidgetLoader/MFWidgetLoader.js +12 -0
- package/build/components/MFWidgetLoader/index.d.ts +2 -0
- package/build/components/MFWidgetLoader/index.js +2 -0
- package/build/components/SearchButton/styles.d.ts +1 -1
- package/build/components/StatusButton/constant.d.ts +0 -2
- package/build/components/StatusButton/constant.js +1 -3
- package/build/components/StatusButton/style.d.ts +1 -1
- package/build/components/Toolbar/style.d.ts +5 -2
- package/build/components/Toolbar/style.js +6 -1
- package/build/components/VirtualTables/SheetViewVirtualTable/SheetViewVirtualTable.d.ts +1 -1
- package/build/components/VirtualTables/SheetViewVirtualTable/SheetViewVirtualTable.js +2 -2
- package/build/components/VirtualTables/VirtualTable/VirtualTable.d.ts +1 -1
- package/build/components/VirtualTables/VirtualTable/VirtualTable.js +2 -2
- package/build/components/VirtualTables/VirtualTableWithCard/VirtualTableWithCard.d.ts +1 -1
- package/build/components/VirtualTables/VirtualTableWithCard/VirtualTableWithCard.js +2 -2
- package/build/components/Window/Window.d.ts +2 -1
- package/build/components/Window/Window.js +5 -3
- package/build/components/index.d.ts +5 -0
- package/build/components/index.js +5 -0
- package/build/constants/apps.d.ts +3 -0
- package/build/constants/apps.js +3 -0
- package/build/constants/assets.d.ts +0 -2
- package/build/constants/assets.js +0 -2
- package/build/types/apps.d.ts +50 -1
- package/build/types/table.d.ts +1 -1
- package/package.json +30 -3
|
@@ -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" | "
|
|
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 {
|
|
2
|
+
import { AppService } from '../../types/index.js';
|
|
3
3
|
import { ServiceItemProps } from './ServiceItem';
|
|
4
4
|
interface AppServicesProps extends Pick<ServiceItemProps, 'onClickServiceItem'> {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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({
|
|
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,31 +10,32 @@ 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({
|
|
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
|
|
23
|
-
var _a
|
|
24
|
-
if (
|
|
25
|
-
return (_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
|
|
28
|
-
}, [
|
|
25
|
+
return services !== null && services !== void 0 ? services : [];
|
|
26
|
+
}, [appCode, services]);
|
|
29
27
|
const handleChange = (event) => {
|
|
30
28
|
setSelectedOption(event.target.value);
|
|
31
29
|
};
|
|
32
30
|
const handleOpenDropdown = () => {
|
|
33
31
|
setOpenDropdown((prev) => !prev);
|
|
34
32
|
};
|
|
33
|
+
// NOTE: Removed `pathname` from deps — tab title now updates based on serviceCode changes.
|
|
34
|
+
// Revisit if issues arise with tab title updates during navigation.
|
|
35
35
|
const activeTabTitle = useMemo(() => {
|
|
36
36
|
var _a, _b;
|
|
37
|
-
return getNameText((_b = (_a =
|
|
38
|
-
}, [
|
|
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
|
+
}, [servicesList, i18n.language, serviceCode]);
|
|
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(
|
|
51
|
-
}, [
|
|
52
|
-
const navigateToService = (
|
|
53
|
-
|
|
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:
|
|
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
|
-
|
|
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,
|
|
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,
|
|
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:
|
|
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,22 @@
|
|
|
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
|
+
serviceCode: string;
|
|
8
|
+
services: AppService[];
|
|
9
|
+
isMaximized: boolean;
|
|
10
|
+
dimensions: {
|
|
11
|
+
width: number | string;
|
|
12
|
+
};
|
|
13
|
+
ui: {
|
|
14
|
+
onStartDrag: DragControls['start'];
|
|
15
|
+
};
|
|
16
|
+
onChangeServiceCode: (serviceCode: string) => void;
|
|
17
|
+
onClickServiceItem: (code: string) => void;
|
|
18
|
+
sx?: SxProps<Theme>;
|
|
19
|
+
}
|
|
20
|
+
declare function AppServicesBar({ appCode, services, isMaximized, dimensions, serviceCode, ui: { onStartDrag }, onChangeServiceCode, onClickServiceItem, sx, }: Readonly<AppServicesBarProps>): import("react/jsx-runtime").JSX.Element | null;
|
|
21
|
+
declare const _default: import("react").MemoExoticComponent<typeof AppServicesBar>;
|
|
22
|
+
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, serviceCode, 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: serviceCode, services: services, isMaximized: isMaximized, appCode: appCode, onChangeServiceCode: onChangeServiceCode }) })));
|
|
17
|
+
}
|
|
18
|
+
export default memo(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>, {}, {}>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { AccountHeaderTitleProps } from './type';
|
|
3
|
-
declare function AccountHeaderTitle({ title, onClose, onMaximize, maximized, id, onRequestClick, isSidebarExpanded, isHovered, onMouseHover, onMouseLeave, showSectionsButton, }: AccountHeaderTitleProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare function AccountHeaderTitle({ title, onClose, onMaximize, maximized, id, onRequestClick, isSidebarExpanded, isHovered, onMouseHover, onMouseLeave, showSectionsButton, }: Readonly<AccountHeaderTitleProps>): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare const _default: import("react").MemoExoticComponent<typeof AccountHeaderTitle>;
|
|
5
5
|
export default _default;
|
|
@@ -5,6 +5,6 @@ import { StyledHeaderWrapperStyled } from '../../../../../Toolbar/style';
|
|
|
5
5
|
import { CloseIcon, ExpandButton, MaximizeIcon } from '../../../../../ToolbarIcon';
|
|
6
6
|
import { teamWindowIcon } from '../../../../../../constants/index.js';
|
|
7
7
|
function AccountHeaderTitle({ title, onClose, onMaximize, maximized = false, id, onRequestClick, isSidebarExpanded = false, isHovered = false, onMouseHover, onMouseLeave, showSectionsButton, }) {
|
|
8
|
-
return (_jsx(StyledHeaderWrapperStyled, Object.assign({ id: id, "data-testid": "UserTitleBar", maximized: maximized || false
|
|
8
|
+
return (_jsx(StyledHeaderWrapperStyled, Object.assign({ id: id, "data-testid": "UserTitleBar", maximized: maximized || false }, { children: _jsx(Toolbar, { onMouseEnter: onMouseHover, onMouseLeave: onMouseLeave, isMaximized: maximized, isHovered: isHovered, title: title, icon: teamWindowIcon, leftActions: _jsxs(_Fragment, { children: [_jsx(CloseIcon, { onClick: onClose }), _jsx(MaximizeIcon, { isMaximized: maximized, onClick: onMaximize }), showSectionsButton && (_jsx(ExpandButton, Object.assign({ onClick: onRequestClick, isExpanded: isSidebarExpanded, isHovered: isHovered }, { children: "Sections" })))] }) }) })));
|
|
9
9
|
}
|
|
10
10
|
export default memo(AccountHeaderTitle);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { AppWindowHeaderBaseProps } from './type';
|
|
3
|
-
declare function AppWindowHeaderBase({ title, maximized, id, isHovered, onMouseHover, onMouseLeave, leftActions,
|
|
3
|
+
declare function AppWindowHeaderBase({ title, maximized, id, isHovered, onMouseHover, onMouseLeave, leftActions, titleIconSrc, sx, ...rootProps }: AppWindowHeaderBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare const _default: import("react").MemoExoticComponent<typeof AppWindowHeaderBase>;
|
|
5
5
|
export default _default;
|
|
@@ -14,7 +14,7 @@ import { memo } from 'react';
|
|
|
14
14
|
import Toolbar from '../../../Toolbar';
|
|
15
15
|
import { StyledHeaderWrapperStyled } from '../../../Toolbar/style';
|
|
16
16
|
function AppWindowHeaderBase(_a) {
|
|
17
|
-
var { title, maximized = false, id, isHovered = false, onMouseHover, onMouseLeave, leftActions,
|
|
18
|
-
return (_jsx(StyledHeaderWrapperStyled, Object.assign({ className: "header-wrapper", id: id, maximized: maximized || false,
|
|
17
|
+
var { title, maximized = false, id, isHovered = false, onMouseHover, onMouseLeave, leftActions, titleIconSrc, sx } = _a, rootProps = __rest(_a, ["title", "maximized", "id", "isHovered", "onMouseHover", "onMouseLeave", "leftActions", "titleIconSrc", "sx"]);
|
|
18
|
+
return (_jsx(StyledHeaderWrapperStyled, Object.assign({ className: "header-wrapper", id: id, maximized: maximized || false, sx: sx }, rootProps, { children: _jsx(Toolbar, { onMouseEnter: onMouseHover, onMouseLeave: onMouseLeave, isMaximized: maximized, isHovered: isHovered, title: title || '', icon: titleIconSrc, leftActions: leftActions }) })));
|
|
19
19
|
}
|
|
20
20
|
export default memo(AppWindowHeaderBase);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { JSONTitleBarProps } from './type';
|
|
3
|
-
declare function JSONTitleBar({ title, onClose, onMaximize, maximized, id, onMouseHover, onMouseLeave, onRequestClick, isRequestExpanded, showRequestIcon, isHovered, }: JSONTitleBarProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare function JSONTitleBar({ title, onClose, onMaximize, maximized, id, onMouseHover, onMouseLeave, onRequestClick, isRequestExpanded, showRequestIcon, isHovered, }: Readonly<JSONTitleBarProps>): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare const _default: import("react").MemoExoticComponent<typeof JSONTitleBar>;
|
|
5
5
|
export default _default;
|
|
@@ -4,6 +4,6 @@ import Toolbar, { StyledHeaderWrapperStyled } from '../../../Toolbar';
|
|
|
4
4
|
import { CloseIcon, ExpandButton, MaximizeIcon } from '../../../ToolbarIcon';
|
|
5
5
|
import { jsonIcon } from '../../../../constants/index.js';
|
|
6
6
|
function JSONTitleBar({ title, onClose, onMaximize, maximized = false, id, onMouseHover, onMouseLeave, onRequestClick, isRequestExpanded = false, showRequestIcon = false, isHovered = false, }) {
|
|
7
|
-
return (_jsx(StyledHeaderWrapperStyled, Object.assign({ id: id, maximized: maximized || false
|
|
7
|
+
return (_jsx(StyledHeaderWrapperStyled, Object.assign({ id: id, maximized: maximized || false }, { children: _jsx(Toolbar, { isHovered: true, onMouseEnter: onMouseHover, onMouseLeave: onMouseLeave, isMaximized: maximized, title: title, icon: jsonIcon, leftActions: _jsxs(_Fragment, { children: [_jsx(CloseIcon, { onClick: onClose }), _jsx(MaximizeIcon, { isMaximized: maximized, onClick: onMaximize }), showRequestIcon && (_jsx(ExpandButton, Object.assign({ onClick: onRequestClick, isExpanded: isRequestExpanded, isHovered: isHovered }, { children: "Request" })))] }) }) })));
|
|
8
8
|
}
|
|
9
9
|
export default memo(JSONTitleBar);
|
|
@@ -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,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,12 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Stack } from '@mui/material';
|
|
3
|
+
import Skeleton from '@mui/material/Skeleton';
|
|
4
|
+
const MFWidgetLoader = () => {
|
|
5
|
+
return (_jsxs(Stack, Object.assign({ height: "100%", borderRadius: "0 0 12px 12px", overflow: "hidden" }, { children: [_jsxs(Stack, Object.assign({ direction: "row", spacing: 1, height: "4.1875rem", sx: {
|
|
6
|
+
pb: '1.2rem',
|
|
7
|
+
paddingInline: '32px',
|
|
8
|
+
pt: '4px',
|
|
9
|
+
background: (theme) => theme.palette.background.transparent[0],
|
|
10
|
+
} }, { children: [_jsx(Skeleton, { sx: { bgcolor: 'gray.300' }, variant: "rounded", width: 70, height: 33 }), _jsx(Skeleton, { sx: { bgcolor: 'gray.300' }, variant: "rounded", width: 70, height: 33 }), _jsx(Skeleton, { sx: { bgcolor: 'gray.300' }, variant: "rounded", width: 70, height: 33 })] })), _jsx(Box, { flex: 1, bgcolor: "#fff" })] })));
|
|
11
|
+
};
|
|
12
|
+
export default MFWidgetLoader;
|
|
@@ -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,4 +1,4 @@
|
|
|
1
|
-
import { initiatedIcon, abandonedIcon, cancelledIcon, reportsIcon, searchIcon, chevronDownIcon, unAuthorizedIcon, settlementInitiatedIcon, unCapturedIcon, capturedIcon, authorizedIcon, openFlagIcon, closedFlagIcon, reverseActionIcon, authenticatedIcon, unauthenticatedIcon, paidOutFilterIcon, scheduledFilterIcon, completedBlackIcon,
|
|
1
|
+
import { initiatedIcon, abandonedIcon, cancelledIcon, reportsIcon, searchIcon, chevronDownIcon, unAuthorizedIcon, settlementInitiatedIcon, unCapturedIcon, capturedIcon, authorizedIcon, openFlagIcon, closedFlagIcon, reverseActionIcon, authenticatedIcon, unauthenticatedIcon, paidOutFilterIcon, scheduledFilterIcon, completedBlackIcon,
|
|
2
2
|
// trashBinIcon,
|
|
3
3
|
} from '../../constants/index.js';
|
|
4
4
|
export const statusButtonIcons = {
|
|
@@ -22,6 +22,4 @@ export const statusButtonIcons = {
|
|
|
22
22
|
paidOut: paidOutFilterIcon,
|
|
23
23
|
scheduled: scheduledFilterIcon,
|
|
24
24
|
checked: completedBlackIcon,
|
|
25
|
-
dashedChecked: dashedCheckIcon,
|
|
26
|
-
deactivated: deactivatedIcon,
|
|
27
25
|
};
|
|
@@ -21,7 +21,7 @@ export declare const CountBadge: import("@emotion/styled").StyledComponent<impor
|
|
|
21
21
|
}, {}, {}>;
|
|
22
22
|
export declare const StatusIcon: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<Theme> & {
|
|
23
23
|
variant: StatusButtonVariant;
|
|
24
|
-
icon?: "search" | "scheduled" | "paidOut" | "reversed" | "checked" | "initiated" | "captured" | "unCaptured" | "inProgress" | "abandoned" | "cancelled" | "authorized" | "unauthenticated" | "authenticated" | "unSettled" | "reports" | "chevronDown" | "unAuthorized" | "openFlag" | "closedFlag" |
|
|
24
|
+
icon?: "search" | "scheduled" | "paidOut" | "reversed" | "checked" | "initiated" | "captured" | "unCaptured" | "inProgress" | "abandoned" | "cancelled" | "authorized" | "unauthenticated" | "authenticated" | "unSettled" | "reports" | "chevronDown" | "unAuthorized" | "openFlag" | "closedFlag" | undefined;
|
|
25
25
|
}, React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
26
26
|
export declare const StyledFilterName: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<Theme>, React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, {}>;
|
|
27
27
|
export declare const StyledDropdown: import("@emotion/styled").StyledComponent<import("../DropdownMenu").IProps & import("@mui/system").MUIStyledCommonProps<Theme>, {}, {}>;
|
|
@@ -9,10 +9,14 @@ export declare const StyledBox: import("@emotion/styled").StyledComponent<import
|
|
|
9
9
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
10
10
|
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
11
11
|
export declare const StyledHeaderWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
12
|
-
sandboxMode?: boolean | undefined;
|
|
13
12
|
maximized?: boolean | undefined;
|
|
14
13
|
isDragging?: boolean | undefined;
|
|
15
14
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
15
|
+
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"> & {
|
|
16
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
17
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
18
|
+
isDragging?: boolean | undefined;
|
|
19
|
+
}, {}, {}>;
|
|
16
20
|
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
21
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
18
22
|
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
@@ -20,7 +24,6 @@ export declare const ToolbarStyled: import("@emotion/styled").StyledComponent<im
|
|
|
20
24
|
isHovered?: boolean | undefined;
|
|
21
25
|
}, {}, {}>;
|
|
22
26
|
export declare const StyledHeaderWrapperStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
23
|
-
sandboxMode?: boolean | undefined;
|
|
24
27
|
maximized?: boolean | undefined;
|
|
25
28
|
isDragging?: boolean | undefined;
|
|
26
29
|
} & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, {}, {}>;
|
|
@@ -38,12 +38,17 @@ export const StyledBox = styled(Box)(({ theme }) => ({
|
|
|
38
38
|
}));
|
|
39
39
|
export const StyledHeaderWrapper = styled('div', {
|
|
40
40
|
shouldForwardProp: (prop) => prop !== 'sandboxMode' && prop !== 'maximized' && prop !== 'isDragging',
|
|
41
|
-
})(({
|
|
41
|
+
})(({ maximized, isDragging }) => (Object.assign(Object.assign(Object.assign({}, (!maximized && {
|
|
42
42
|
borderTopRightRadius: 12,
|
|
43
43
|
borderTopLeftRadius: 12,
|
|
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({}, (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,
|
|
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,
|
|
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
|
// Custom hooks for state management
|
|
11
11
|
const { selectedCell, selectedColumn, selectedRow, showBackDrop, setShowBackdrop, handleCellClick, handleColumnClick, handleChipClick, selectedChip, } = useTableState();
|
|
12
12
|
// Table data processing
|
|
@@ -41,7 +41,7 @@ function SheetViewVirtualTable({ columns, rows, threshold = SHEET_VIEW_TABLE_THR
|
|
|
41
41
|
handleChipClick,
|
|
42
42
|
});
|
|
43
43
|
const onPointerDown = (e) => {
|
|
44
|
-
|
|
44
|
+
onStartDrag === null || onStartDrag === void 0 ? void 0 : onStartDrag(e);
|
|
45
45
|
};
|
|
46
46
|
const createVirtualTableContainer = useCallback((columnsData, containerKey, isPinned = false, fixedWidth) => {
|
|
47
47
|
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,
|
|
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,
|
|
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
|
-
|
|
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,
|
|
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,
|
|
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
|
-
|
|
39
|
+
onStartDrag === null || onStartDrag === void 0 ? void 0 : onStartDrag(e);
|
|
40
40
|
};
|
|
41
41
|
const isDelayedFetchingNextPage = useDelayToSetValue({
|
|
42
42
|
value: isFetchingNextPage,
|
|
@@ -18,7 +18,8 @@ interface WindowWrapperProps {
|
|
|
18
18
|
order?: number;
|
|
19
19
|
openOrder?: number;
|
|
20
20
|
};
|
|
21
|
+
sandboxMode?: boolean;
|
|
21
22
|
}
|
|
22
|
-
declare function WindowWrapper({ children, id, onResize, isMaximized, isMinimized, dragControls, onClick, options: { width, height, minHeight, minWidth, maxHeight, maxWidth, order, openOrder }, }: WindowWrapperProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
declare function WindowWrapper({ children, id, onResize, isMaximized, isMinimized, dragControls, onClick, options: { width, height, minHeight, minWidth, maxHeight, maxWidth, order, openOrder }, sandboxMode, }: Readonly<WindowWrapperProps>): import("react/jsx-runtime").JSX.Element;
|
|
23
24
|
declare const _default: import("react").MemoExoticComponent<typeof WindowWrapper>;
|
|
24
25
|
export default _default;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { memo, useMemo, useState, useRef, useEffect } from 'react';
|
|
3
|
+
import { useTheme } from '@mui/material';
|
|
3
4
|
import { motion } from 'framer-motion';
|
|
4
5
|
import { Resizable } from 're-resizable';
|
|
5
6
|
import { APP_WINDOW_Z_INDEX, FOOTER_HEIGHT, HEADER_HEIGHT } from '../../constants/index.js';
|
|
6
7
|
import { contentStyle, ContentWrapper, initalStyle, resizableMainStyle, AppContainerWrapper, AppContainerContainer } from './style';
|
|
7
|
-
function WindowWrapper({ children, id, onResize, isMaximized, isMinimized, dragControls, onClick, options: { width, height, minHeight, minWidth, maxHeight, maxWidth, order, openOrder = 1 }, }) {
|
|
8
|
+
function WindowWrapper({ children, id, onResize, isMaximized, isMinimized, dragControls, onClick, options: { width, height, minHeight, minWidth, maxHeight, maxWidth, order, openOrder = 1 }, sandboxMode = false, }) {
|
|
9
|
+
const theme = useTheme();
|
|
8
10
|
const [isDrag, setIsDrag] = useState(true);
|
|
9
11
|
const modalRef = useRef(null);
|
|
10
12
|
const constraintsRef = useRef(null);
|
|
@@ -16,9 +18,9 @@ function WindowWrapper({ children, id, onResize, isMaximized, isMinimized, dragC
|
|
|
16
18
|
onClick === null || onClick === void 0 ? void 0 : onClick();
|
|
17
19
|
setIsDrag(false);
|
|
18
20
|
};
|
|
19
|
-
const resizableStyle = useMemo(() => (Object.assign(Object.assign(Object.assign({}, resizableMainStyle), { maxWidth: width, borderRadius: !isMaximized ? 12 : '0 !important' }), (!isMaximized && {
|
|
21
|
+
const resizableStyle = useMemo(() => (Object.assign(Object.assign(Object.assign(Object.assign({}, resizableMainStyle), { maxWidth: width, borderRadius: !isMaximized ? 12 : '0 !important' }), (!isMaximized && {
|
|
20
22
|
top: 0,
|
|
21
|
-
}))), [isMaximized,
|
|
23
|
+
})), { background: sandboxMode ? theme.palette.common.lightOrange : theme.palette.background.transparent[0], backdropFilter: 'blur(32px)' })), [width, isMaximized, sandboxMode]);
|
|
22
24
|
useEffect(() => {
|
|
23
25
|
var _a;
|
|
24
26
|
(_a = resizableRef.current) === null || _a === void 0 ? void 0 : _a.updateSize({
|
|
@@ -115,3 +115,8 @@ export { default as ToggleView, type ToggleViewsValues, ToggleViews } from './To
|
|
|
115
115
|
export { default as LanguageDropdown } from './LanguageDropdown';
|
|
116
116
|
export { default as DisplayAmount } from './DisplayAmount';
|
|
117
117
|
export { default as AmountInput } from './AmountInput';
|
|
118
|
+
export { default as AppServicesBar } from './AppServicesBar';
|
|
119
|
+
export * from './AppServicesBar';
|
|
120
|
+
export { default as ListLayout } from './ListLayout';
|
|
121
|
+
export * from './ListLayout';
|
|
122
|
+
export { default as MFWidgetLoader } from './MFWidgetLoader';
|
|
@@ -115,3 +115,8 @@ export { default as ToggleView, ToggleViews } from './ToggleView';
|
|
|
115
115
|
export { default as LanguageDropdown } from './LanguageDropdown';
|
|
116
116
|
export { default as DisplayAmount } from './DisplayAmount';
|
|
117
117
|
export { default as AmountInput } from './AmountInput';
|
|
118
|
+
export { default as AppServicesBar } from './AppServicesBar';
|
|
119
|
+
export * from './AppServicesBar';
|
|
120
|
+
export { default as ListLayout } from './ListLayout';
|
|
121
|
+
export * from './ListLayout';
|
|
122
|
+
export { default as MFWidgetLoader } from './MFWidgetLoader';
|
package/build/constants/apps.js
CHANGED
|
@@ -72,8 +72,6 @@ export declare const percentage100Icon: string;
|
|
|
72
72
|
export declare const maximizeIcon: string;
|
|
73
73
|
export declare const minimizeIcon: string;
|
|
74
74
|
export declare const closeIcon: string;
|
|
75
|
-
export declare const dashedCheckIcon: string;
|
|
76
|
-
export declare const deactivatedIcon: string;
|
|
77
75
|
export declare const topUpIcon: string;
|
|
78
76
|
export declare const deMaximizeIcon: string;
|
|
79
77
|
export declare const pendingFlag: string;
|
|
@@ -77,8 +77,6 @@ export const percentage100Icon = `${lightUrl}/percentage100.svg`;
|
|
|
77
77
|
export const maximizeIcon = `${lightUrl}/maximize.svg`;
|
|
78
78
|
export const minimizeIcon = `${lightUrl}/minimize.svg`;
|
|
79
79
|
export const closeIcon = `${lightUrl}/close.svg`;
|
|
80
|
-
export const dashedCheckIcon = `${lightUrl}/dashedCheckIcon.svg`;
|
|
81
|
-
export const deactivatedIcon = `${lightUrl}/deactivatedIcon.svg`;
|
|
82
80
|
export const topUpIcon = `${lightUrl}/topup.svg`;
|
|
83
81
|
export const deMaximizeIcon = `${appBaseUrl}/demaximize.svg`;
|
|
84
82
|
export const pendingFlag = `${lightUrl}/pendingFlag.svg`;
|
package/build/types/apps.d.ts
CHANGED
|
@@ -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,47 @@ export interface UserApp {
|
|
|
63
68
|
name: TextAndLang[];
|
|
64
69
|
app_services: AppService[];
|
|
65
70
|
}
|
|
71
|
+
export type NavigateFunction = (params: {
|
|
72
|
+
instanceId?: string;
|
|
73
|
+
appId?: string;
|
|
74
|
+
appCode: string;
|
|
75
|
+
serviceCode: string;
|
|
76
|
+
state?: any;
|
|
77
|
+
}) => void;
|
|
78
|
+
export type MFWidgetBaseProps = {
|
|
79
|
+
instanceId: string;
|
|
80
|
+
i18n?: i18n;
|
|
81
|
+
app?: UserApp;
|
|
82
|
+
appWindow: {
|
|
83
|
+
isMinimized: boolean;
|
|
84
|
+
isMaximized: boolean;
|
|
85
|
+
order: number;
|
|
86
|
+
dimensions: Pick<AppDetails['dimensions'], 'width' | 'height'>;
|
|
87
|
+
};
|
|
88
|
+
features: {
|
|
89
|
+
hasReportsApp: boolean;
|
|
90
|
+
hasHeader: boolean;
|
|
91
|
+
sandboxMode: boolean;
|
|
92
|
+
initialServiceCode?: string;
|
|
93
|
+
};
|
|
94
|
+
segment: Pick<Segment, 'id' | 'brands' | 'countries'> & {
|
|
95
|
+
defaultCountry?: SegmentCountry;
|
|
96
|
+
};
|
|
97
|
+
ui: {
|
|
98
|
+
theme: Theme;
|
|
99
|
+
onStartDrag: DragControls['start'];
|
|
100
|
+
};
|
|
101
|
+
calendar: {
|
|
102
|
+
mode: CalenderMode;
|
|
103
|
+
onSwitch: (mode: CalenderMode) => void;
|
|
104
|
+
};
|
|
105
|
+
navigation: {
|
|
106
|
+
navigate: NavigateFunction;
|
|
107
|
+
};
|
|
108
|
+
timezone: {
|
|
109
|
+
current?: Timezone | null;
|
|
110
|
+
default?: Timezone;
|
|
111
|
+
onChange: (timezone: Timezone) => void;
|
|
112
|
+
onChangeHistory: (timezone: Timezone) => void;
|
|
113
|
+
};
|
|
114
|
+
};
|
package/build/types/table.d.ts
CHANGED
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.
|
|
5
|
-
"testVersion":
|
|
4
|
+
"version": "0.1.141",
|
|
5
|
+
"testVersion": 0,
|
|
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",
|
|
@@ -136,4 +163,4 @@
|
|
|
136
163
|
"publishConfig": {
|
|
137
164
|
"registry": "https://registry.npmjs.org/"
|
|
138
165
|
}
|
|
139
|
-
}
|
|
166
|
+
}
|