@tap-payments/os-micro-frontend-shared 0.0.240 → 0.0.243
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/LICENSE +21 -21
- package/README.md +12 -12
- package/build/components/SearchButton/styles.d.ts +1 -1
- package/build/components/StatusChip/style.js +1 -1
- package/build/components/TableCells/CustomCells/ActionCell/ActionCell.d.ts +1 -3
- package/build/components/TableCells/CustomCells/ActionCell/ActionCell.js +4 -5
- package/build/components/TableCells/CustomCells/ActionCell/ActionsColumn.js +4 -8
- package/build/components/TableCells/CustomCells/ActionCell/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/EntityCell/EntityCell.js +4 -3
- package/build/components/TableCells/CustomCells/SourceMergedCell/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/StatusCell/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/index.d.ts +0 -1
- package/build/components/TableCells/CustomCells/index.js +0 -1
- package/build/components/TableCells/CustomCells/style.d.ts +1 -4
- package/build/components/TableCells/CustomCells/style.js +9 -6
- package/build/components/VirtualTable/SheetView/SheetViewTableHeader.js +2 -2
- package/build/components/VirtualTable/SheetView/style.d.ts +1 -0
- package/build/components/VirtualTable/SheetView/style.js +8 -0
- package/build/components/VirtualTable/components/TableRow.js +1 -1
- package/build/components/VirtualTable/style.d.ts +1 -1
- package/build/constants/apps.d.ts +0 -17
- package/build/constants/apps.js +0 -4
- package/build/constants/table/cell/chargeTableCellWidth.d.ts +10 -10
- package/build/constants/table/cell/chargeTableCellWidth.js +10 -10
- package/build/constants/table/cell/merchantsTableCellWidth.d.ts +0 -5
- package/build/constants/table/cell/merchantsTableCellWidth.js +0 -5
- package/package.json +134 -134
- package/build/components/TableCells/CustomCells/SheetViewIDButton/SheetViewIDButton.d.ts +0 -7
- package/build/components/TableCells/CustomCells/SheetViewIDButton/SheetViewIDButton.js +0 -35
- package/build/components/TableCells/CustomCells/SheetViewIDButton/index.d.ts +0 -1
- package/build/components/TableCells/CustomCells/SheetViewIDButton/index.js +0 -1
- package/build/components/TableCells/CustomCells/SheetViewIDButton/style.d.ts +0 -3
- package/build/components/TableCells/CustomCells/SheetViewIDButton/style.js +0 -22
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
|
+
```
|
|
@@ -554,9 +554,9 @@ export declare const Icon: import("@emotion/styled").StyledComponent<{
|
|
|
554
554
|
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLImageElement> | undefined;
|
|
555
555
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLImageElement> | undefined;
|
|
556
556
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLImageElement> | undefined;
|
|
557
|
+
referrerPolicy?: import("react").HTMLAttributeReferrerPolicy | undefined;
|
|
557
558
|
src?: string | undefined;
|
|
558
559
|
alt?: string | undefined;
|
|
559
|
-
referrerPolicy?: import("react").HTMLAttributeReferrerPolicy | undefined;
|
|
560
560
|
crossOrigin?: "" | "anonymous" | "use-credentials" | undefined;
|
|
561
561
|
useMap?: string | undefined;
|
|
562
562
|
loading?: "eager" | "lazy" | undefined;
|
|
@@ -12,7 +12,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
12
12
|
import { Box, styled } from '@mui/material';
|
|
13
13
|
export const ChipStyled = styled(Box)((_a) => {
|
|
14
14
|
var { theme } = _a, props = __rest(_a, ["theme"]);
|
|
15
|
-
const { textColor = theme.palette.text.primary, bgColor =
|
|
15
|
+
const { textColor = theme.palette.text.primary, bgColor = '#EFF1F2', borderColor = '#EFF1F2', disabled = false, padding } = props;
|
|
16
16
|
return {
|
|
17
17
|
display: 'inline-flex',
|
|
18
18
|
alignItems: 'center',
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ActionCellProps } from '../type';
|
|
3
|
-
import { TableMode } from '../../../../types/index.js';
|
|
4
3
|
type Props = Readonly<ActionCellProps> & {
|
|
5
4
|
onJsonViewClick?: () => void;
|
|
6
|
-
tableMode?: TableMode;
|
|
7
5
|
};
|
|
8
|
-
declare function ActionCell({ flag, actions, flagTooltip, flagsCount, dropdownAction, onCloseDropdown, isDropdownShown, row, showJsonViewer, isTextShown, showIdButton, rowId, onJsonViewClick,
|
|
6
|
+
declare function ActionCell({ flag, actions, flagTooltip, flagsCount, dropdownAction, onCloseDropdown, isDropdownShown, row, showJsonViewer, isTextShown, showIdButton, rowId, onJsonViewClick, renderDropdown, ...props }: Props): import("react/jsx-runtime").JSX.Element;
|
|
9
7
|
declare const _default: React.MemoExoticComponent<typeof ActionCell>;
|
|
10
8
|
export default _default;
|
|
@@ -24,15 +24,14 @@ import { useActionCell } from './hooks/useActionCell';
|
|
|
24
24
|
import { ActionCellContainer, ActionIcon, ActionsIconContainer } from './style';
|
|
25
25
|
import { IDButton } from '../IDButton';
|
|
26
26
|
import { BadgeWrapper, IdButtonContainer, TextLabel, TransparentButton } from '../style';
|
|
27
|
-
import SheetViewIDButton from '../SheetViewIDButton/SheetViewIDButton';
|
|
28
27
|
function ActionCell(_a) {
|
|
29
28
|
var _b, _c;
|
|
30
|
-
var { flag, actions, flagTooltip, flagsCount, dropdownAction, onCloseDropdown, isDropdownShown = true, row, showJsonViewer = true, isTextShown, showIdButton = true, rowId, onJsonViewClick,
|
|
29
|
+
var { flag, actions, flagTooltip, flagsCount, dropdownAction, onCloseDropdown, isDropdownShown = true, row, showJsonViewer = true, isTextShown, showIdButton = true, rowId, onJsonViewClick, renderDropdown } = _a, props = __rest(_a, ["flag", "actions", "flagTooltip", "flagsCount", "dropdownAction", "onCloseDropdown", "isDropdownShown", "row", "showJsonViewer", "isTextShown", "showIdButton", "rowId", "onJsonViewClick", "renderDropdown"]);
|
|
31
30
|
const { t } = useTranslation();
|
|
32
31
|
const { open, anchorEl, filteredActions, isAnyActionLoading, isAnyActionHasError, isAnyActionSuccessful, areThereAnyShownActions, handleClick, handleClose, setAnchorEl, } = useActionCell({ actions, isDropdownShown, onCloseDropdown, renderDropdown });
|
|
33
32
|
return (_jsx(TableCell, Object.assign({}, props, { sx: {
|
|
34
33
|
overflow: 'visible',
|
|
35
|
-
} }, { children: _jsxs(ActionCellContainer, Object.assign({ "data-testid": "ActionCell_ActionCellContainer"
|
|
34
|
+
} }, { children: _jsxs(ActionCellContainer, Object.assign({ "data-testid": "ActionCell_ActionCellContainer" }, { children: [flag && (_jsx(_Fragment, { children: isTextShown ? (_jsx(Tooltip, Object.assign({ title: flagTooltip }, { children: _jsx(TextLabel, Object.assign({ "data-testid": "ActionCell_FlagLabel", sx: {
|
|
36
35
|
textAlign: 'left',
|
|
37
36
|
justifyContent: 'flex-start',
|
|
38
37
|
} }, { children: flagTooltip })) }))) : (_jsx(Tooltip, Object.assign({ title: flagTooltip }, { children: _jsxs(BadgeWrapper, Object.assign({ "data-testid": "ActionCell_FlagBadge", sx: {
|
|
@@ -72,12 +71,12 @@ function ActionCell(_a) {
|
|
|
72
71
|
},
|
|
73
72
|
opacity: 1,
|
|
74
73
|
},
|
|
75
|
-
} }, { children: _jsxs(StyledBadge, Object.assign({ compact: true, variant: colorToVariant[(_c = flags[flag]) === null || _c === void 0 ? void 0 : _c.color] || BadgeVariants.ORANGE, "data-testid": "ActionCell_StyledBadge" }, { children: [flagsCount, "x"] })) })))] })) }))) })), showIdButton
|
|
74
|
+
} }, { children: _jsxs(StyledBadge, Object.assign({ compact: true, variant: colorToVariant[(_c = flags[flag]) === null || _c === void 0 ? void 0 : _c.color] || BadgeVariants.ORANGE, "data-testid": "ActionCell_StyledBadge" }, { children: [flagsCount, "x"] })) })))] })) }))) })), showIdButton && _jsx(IDButton, { rowId: rowId || row.id }), _jsxs("div", Object.assign({ "data-testid": "ActionCell_IconsContainer", style: {
|
|
76
75
|
display: 'flex',
|
|
77
76
|
alignItems: 'center',
|
|
78
77
|
justifyContent: 'center',
|
|
79
78
|
gap: '5px',
|
|
80
|
-
} }, { children: [showJsonViewer && (_jsx(_Fragment, { children: _jsx(TransparentButton, Object.assign({ onClick: onJsonViewClick, type: "button", "data-testid": "ActionCell_TransparentButton" }, { children: _jsx(Tooltip, Object.assign({ title: t('jsonViewer') }, { children: _jsx(IdButtonContainer, Object.assign({
|
|
79
|
+
} }, { children: [showJsonViewer && (_jsx(_Fragment, { children: _jsx(TransparentButton, Object.assign({ onClick: onJsonViewClick, type: "button", "data-testid": "ActionCell_TransparentButton" }, { children: _jsx(Tooltip, Object.assign({ title: t('jsonViewer') }, { children: _jsx(IdButtonContainer, Object.assign({ "data-testid": "ActionCell_IdButtonContainer" }, { children: _jsx(motion.img, { src: jsonBlackIcon, alt: "icon" }, "id-icon") })) })) })) })), _jsxs(ActionsIconContainer, Object.assign({ id: "styled-popover", selected: !!dropdownAction || open, "data-testid": "ActionCell_ActionsIconContainer", "data-is-active": areThereAnyShownActions, sx: Object.assign({}, (!areThereAnyShownActions && {
|
|
81
80
|
pointerEvents: 'none',
|
|
82
81
|
})) }, { children: [_jsx(TransparentButton, Object.assign({ onClick: handleClick, "data-testid": "ActionCell_ActionsIconContainer_TransparentButton", "data-is-active": areThereAnyShownActions, sx: Object.assign({}, (!areThereAnyShownActions && {
|
|
83
82
|
pointerEvents: 'none',
|
|
@@ -12,20 +12,16 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
13
|
import { memo } from 'react';
|
|
14
14
|
import { motion } from 'framer-motion';
|
|
15
|
-
import { useTranslation } from 'react-i18next';
|
|
16
15
|
import Tooltip from '../../../Tooltip';
|
|
17
16
|
import { TableCell } from '../../../TableCells';
|
|
18
17
|
import StyledBadge, { BadgeVariants } from '../../../CountBadge';
|
|
19
|
-
import { jsonBlackIcon } from '../../../../constants/index.js';
|
|
20
18
|
import { colorToVariant, flags } from './constant';
|
|
21
19
|
import { ActionCellContainer, ActionIcon } from './style';
|
|
22
|
-
import {
|
|
23
|
-
import
|
|
24
|
-
import SheetViewIDButton from '../SheetViewIDButton/SheetViewIDButton';
|
|
20
|
+
import { BadgeWrapper, TextLabel } from '../style';
|
|
21
|
+
import StatusChip from '../../../StatusChip';
|
|
25
22
|
function ActionsColumn(_a) {
|
|
26
23
|
var _b, _c;
|
|
27
24
|
var { flag, flagTooltip, flagsCount, row, showJsonViewer = true, isTextShown, showIdButton = true, rowId, onJsonViewClick, tableMode } = _a, props = __rest(_a, ["flag", "flagTooltip", "flagsCount", "row", "showJsonViewer", "isTextShown", "showIdButton", "rowId", "onJsonViewClick", "tableMode"]);
|
|
28
|
-
const { t } = useTranslation();
|
|
29
25
|
return (_jsx(TableCell, Object.assign({}, props, { sx: {
|
|
30
26
|
overflow: 'visible',
|
|
31
27
|
} }, { children: _jsxs(ActionCellContainer, Object.assign({ "data-testid": "ActionsColumn_ActionCellContainer", tableMode: tableMode }, { children: [flag && (_jsx(_Fragment, { children: isTextShown ? (_jsx(Tooltip, Object.assign({ title: flagTooltip }, { children: _jsx(TextLabel, Object.assign({ "data-testid": "ActionsColumn_FlagLabel", sx: {
|
|
@@ -68,11 +64,11 @@ function ActionsColumn(_a) {
|
|
|
68
64
|
},
|
|
69
65
|
opacity: 1,
|
|
70
66
|
},
|
|
71
|
-
} }, { children: _jsxs(StyledBadge, Object.assign({ compact: true, variant: colorToVariant[(_c = flags[flag]) === null || _c === void 0 ? void 0 : _c.color] || BadgeVariants.ORANGE, "data-testid": "ActionsColumn_StyledBadge" }, { children: [flagsCount, "x"] })) })))] })) }))) })), showIdButton
|
|
67
|
+
} }, { children: _jsxs(StyledBadge, Object.assign({ compact: true, variant: colorToVariant[(_c = flags[flag]) === null || _c === void 0 ? void 0 : _c.color] || BadgeVariants.ORANGE, "data-testid": "ActionsColumn_StyledBadge" }, { children: [flagsCount, "x"] })) })))] })) }))) })), showIdButton && _jsx(StatusChip, Object.assign({ minWidth: "213px" }, { children: rowId || row.id })), _jsx("div", Object.assign({ "data-testid": "ActionsColumn_IconsContainer", style: {
|
|
72
68
|
display: 'flex',
|
|
73
69
|
alignItems: 'center',
|
|
74
70
|
justifyContent: 'center',
|
|
75
71
|
gap: '5px',
|
|
76
|
-
} }, { children: showJsonViewer &&
|
|
72
|
+
} }, { children: showJsonViewer && _jsx(StatusChip, Object.assign({ onClick: onJsonViewClick }, { children: "View API" })) }))] })) })));
|
|
77
73
|
}
|
|
78
74
|
export default memo(ActionsColumn);
|
|
@@ -272,9 +272,9 @@ export declare const ActionIcon: import("@emotion/styled").StyledComponent<{
|
|
|
272
272
|
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLImageElement> | undefined;
|
|
273
273
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLImageElement> | undefined;
|
|
274
274
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLImageElement> | undefined;
|
|
275
|
+
referrerPolicy?: import("react").HTMLAttributeReferrerPolicy | undefined;
|
|
275
276
|
src?: string | undefined;
|
|
276
277
|
alt?: string | undefined;
|
|
277
|
-
referrerPolicy?: import("react").HTMLAttributeReferrerPolicy | undefined;
|
|
278
278
|
crossOrigin?: "" | "anonymous" | "use-credentials" | undefined;
|
|
279
279
|
useMap?: string | undefined;
|
|
280
280
|
loading?: "eager" | "lazy" | undefined;
|
|
@@ -11,13 +11,14 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
import TableCell from '../../TableCell';
|
|
14
|
+
import Icon from '../../../Icon';
|
|
15
|
+
import { getCountriesIcon } from '../../../../constants/index.js';
|
|
14
16
|
import { EntityName, EntityWrapper, VerificationIcon, EntityContainer, EntityInfoContainer, VerificationContainer, EmptyCell } from './style';
|
|
15
17
|
import { verificationIcon } from './constants';
|
|
16
18
|
import Tooltip from '../../../Tooltip';
|
|
17
|
-
import { CountryFlag } from '../../../index.js';
|
|
18
|
-
import { getCountryName } from '../../../../utils/index.js';
|
|
19
19
|
export default function EntityCell(_a) {
|
|
20
20
|
var { entity, country, verificationStatus, licenseNumber } = _a, props = __rest(_a, ["entity", "country", "verificationStatus", "licenseNumber"]);
|
|
21
|
+
const countryIcon = getCountriesIcon(country);
|
|
21
22
|
const icon = verificationIcon[verificationStatus !== null && verificationStatus !== void 0 ? verificationStatus : 'incomplete'];
|
|
22
|
-
return (_jsx(TableCell, Object.assign({}, props, { sx: { cursor: 'pointer' } }, { children: _jsx(Tooltip, Object.assign({ title: entity }, { children: _jsx(EntityWrapper, { children: licenseNumber ? (_jsxs(EntityContainer, { children: [_jsxs(EntityInfoContainer, { children: [_jsx(
|
|
23
|
+
return (_jsx(TableCell, Object.assign({}, props, { sx: { cursor: 'pointer' } }, { children: _jsx(Tooltip, Object.assign({ title: entity }, { children: _jsx(EntityWrapper, { children: licenseNumber ? (_jsxs(EntityContainer, { children: [_jsxs(EntityInfoContainer, { children: [_jsx(Icon, { src: countryIcon, sx: { width: '16px', height: '11.73' } }), _jsx(EntityName, { children: licenseNumber })] }), _jsx(VerificationContainer, { children: _jsx(VerificationIcon, { src: icon }) })] })) : (_jsx(EmptyCell, { children: "Not Available" })) }) })) })));
|
|
23
24
|
}
|
|
@@ -273,9 +273,9 @@ export declare const MultiRefundIcon: import("@emotion/styled").StyledComponent<
|
|
|
273
273
|
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLImageElement> | undefined;
|
|
274
274
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLImageElement> | undefined;
|
|
275
275
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLImageElement> | undefined;
|
|
276
|
+
referrerPolicy?: import("react").HTMLAttributeReferrerPolicy | undefined;
|
|
276
277
|
src?: string | undefined;
|
|
277
278
|
alt?: string | undefined;
|
|
278
|
-
referrerPolicy?: import("react").HTMLAttributeReferrerPolicy | undefined;
|
|
279
279
|
crossOrigin?: "" | "anonymous" | "use-credentials" | undefined;
|
|
280
280
|
useMap?: string | undefined;
|
|
281
281
|
loading?: "eager" | "lazy" | undefined;
|
|
@@ -262,9 +262,9 @@ export declare const MultiRefundIcon: import("@emotion/styled").StyledComponent<
|
|
|
262
262
|
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLImageElement> | undefined;
|
|
263
263
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLImageElement> | undefined;
|
|
264
264
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLImageElement> | undefined;
|
|
265
|
+
referrerPolicy?: import("react").HTMLAttributeReferrerPolicy | undefined;
|
|
265
266
|
src?: string | undefined;
|
|
266
267
|
alt?: string | undefined;
|
|
267
|
-
referrerPolicy?: import("react").HTMLAttributeReferrerPolicy | undefined;
|
|
268
268
|
crossOrigin?: "" | "anonymous" | "use-credentials" | undefined;
|
|
269
269
|
useMap?: string | undefined;
|
|
270
270
|
loading?: "eager" | "lazy" | undefined;
|
|
@@ -42,7 +42,6 @@ export * from './ApplicationStatusCell';
|
|
|
42
42
|
export * from './SegmentsCell';
|
|
43
43
|
export * from './MarketPlaceCell';
|
|
44
44
|
export * from './IndividualsCell';
|
|
45
|
-
export * from './SheetViewIDButton';
|
|
46
45
|
export * from './BrandsCell';
|
|
47
46
|
export * from './SalesChannelCell';
|
|
48
47
|
export * from './type';
|
|
@@ -42,7 +42,6 @@ export * from './ApplicationStatusCell';
|
|
|
42
42
|
export * from './SegmentsCell';
|
|
43
43
|
export * from './MarketPlaceCell';
|
|
44
44
|
export * from './IndividualsCell';
|
|
45
|
-
export * from './SheetViewIDButton';
|
|
46
45
|
export * from './BrandsCell';
|
|
47
46
|
export * from './SalesChannelCell';
|
|
48
47
|
export * from './type';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { TableMode } from '../../../types/index.js';
|
|
3
2
|
export declare const GeographyBox: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
4
3
|
variant?: "Local" | "Global" | "Regional" | undefined;
|
|
5
4
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
@@ -272,9 +271,7 @@ export declare const StarBadgeWrapper: import("@emotion/styled").StyledComponent
|
|
|
272
271
|
isShown?: boolean | undefined;
|
|
273
272
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
274
273
|
export declare const CountBadge: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
275
|
-
export declare const IdButtonContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme
|
|
276
|
-
tableMode?: TableMode | undefined;
|
|
277
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
274
|
+
export declare const IdButtonContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
278
275
|
export declare const AvatarStyled: import("@emotion/styled").StyledComponent<import("@mui/material").AvatarOwnProps & import("@mui/material").AvatarSlotsAndSlotProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
279
276
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
280
277
|
}, "className" | "style" | "classes" | "children" | "sx" | "src" | "alt" | "variant" | "slots" | "slotProps" | "sizes" | "srcSet" | "imgProps"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -63,12 +63,15 @@ export const CountBadge = styled('span')(({ theme }) => ({
|
|
|
63
63
|
fontSize: '9.782px',
|
|
64
64
|
fontWeight: 600,
|
|
65
65
|
}));
|
|
66
|
-
export const IdButtonContainer = styled('div'
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
66
|
+
export const IdButtonContainer = styled('div')(({ theme }) => ({
|
|
67
|
+
display: 'flex',
|
|
68
|
+
width: '24px',
|
|
69
|
+
height: '24px',
|
|
70
|
+
alignItems: 'center',
|
|
71
|
+
justifyContent: 'center',
|
|
72
|
+
borderRadius: '64px;',
|
|
73
|
+
border: '1px solid #F2F2F2;',
|
|
74
|
+
}));
|
|
72
75
|
export const AvatarStyled = styled(Avatar)(({ theme }) => ({
|
|
73
76
|
width: 24,
|
|
74
77
|
height: 24,
|
|
@@ -5,7 +5,7 @@ import Dropdown from '../../DropdownMenu';
|
|
|
5
5
|
import { columnIcon, pinIcon, sortAzIcon, sortZaIcon, unpinIcon } from '../../../constants/index.js';
|
|
6
6
|
import ColumnFilter from '../components/ColumnFilter';
|
|
7
7
|
import { StyledCell } from '../style';
|
|
8
|
-
import { ActionIcon, ColumnIcon, PinIconContainer, StyledHeader, StyledMUITableRow } from './style';
|
|
8
|
+
import { ActionIcon, ColumnIcon, PinIconContainer, StyledHeader, StyledMUITableRow, HeaderText } from './style';
|
|
9
9
|
function SheetViewTableHeader({ columns, headerProps, showBackDrop, onColumnSort, columnsSorting, pinnedColumns = [], onColumnPin, isPinnable = false, lastColumnId, selectedColumn = null, onColumnClick, }) {
|
|
10
10
|
const [anchorEl, setAnchorEl] = useState(null);
|
|
11
11
|
const open = Boolean(anchorEl);
|
|
@@ -45,7 +45,7 @@ function SheetViewTableHeader({ columns, headerProps, showBackDrop, onColumnSort
|
|
|
45
45
|
const isPinned = pinnedColumns.includes(id);
|
|
46
46
|
const isDefaultPinned = !!column.isDefaultPinned;
|
|
47
47
|
const isSelected = selectedColumn === id;
|
|
48
|
-
return (_jsxs(StyledCell, Object.assign({ "data-id": id, component: "div", "data-testid": "SheetViewVirtualTable_TableHeader_StyledCell", "data-column-id": column.id, "data-column-width": column.width, "data-column-width-used": column.width, "data-column-align": column.align, "data-column-order": column.order, "data-column-header": typeof column.header === 'string' ? column.header : 'component', "data-column-sortable": !!column.sortable, "data-column-filterable": !!column.filter, "data-column-pinned": isPinned, isFirst: isFirst, isLast: isLast, isSheetView: true, onClick: (event) => onColumnClick === null || onColumnClick === void 0 ? void 0 : onColumnClick(id, event), sx: Object.assign({ display: 'flex', gap: theme.spacing(0.5), alignItems: 'center', justifyContent: align === 'right' ? 'flex-end' : 'flex-start', width: column.width, textAlign: align, overflow: 'unset', cursor: 'pointer', boxSizing: 'border-box', border: isSelected ? '1px solid #1F88D0' : '1px solid #F2F2F2', backgroundColor: isSelected ? '#e3f2fd' : '#FCFCFC', height: isSelected ? '100%' : 'auto', minHeight: isSelected ? '28px' : 'auto' }, headerStyle) }, { children: [typeof header === 'function' ? (header()) : (_jsx(Box, Object.assign({ "data-testid": "SheetViewTableHeader_columns_header", sx: { maxWidth: '100%', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' } }, { children: header &&
|
|
48
|
+
return (_jsxs(StyledCell, Object.assign({ "data-id": id, component: "div", "data-testid": "SheetViewVirtualTable_TableHeader_StyledCell", "data-column-id": column.id, "data-column-width": column.width, "data-column-width-used": column.width, "data-column-align": column.align, "data-column-order": column.order, "data-column-header": typeof column.header === 'string' ? column.header : 'component', "data-column-sortable": !!column.sortable, "data-column-filterable": !!column.filter, "data-column-pinned": isPinned, isFirst: isFirst, isLast: isLast, isSheetView: true, onClick: (event) => onColumnClick === null || onColumnClick === void 0 ? void 0 : onColumnClick(id, event), sx: Object.assign({ display: 'flex', gap: theme.spacing(0.5), alignItems: 'center', justifyContent: align === 'right' ? 'flex-end' : 'flex-start', width: column.width, textAlign: align, overflow: 'unset', cursor: 'pointer', boxSizing: 'border-box', border: isSelected ? '1px solid #1F88D0' : '1px solid #F2F2F2', backgroundColor: isSelected ? '#e3f2fd' : '#FCFCFC', height: isSelected ? '100%' : 'auto', minHeight: isSelected ? '28px' : 'auto' }, headerStyle) }, { children: [typeof header === 'function' ? (header()) : (_jsx(Box, Object.assign({ "data-testid": "SheetViewTableHeader_columns_header", sx: { maxWidth: '100%', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' } }, { children: header && _jsx(HeaderText, Object.assign({ "data-testid": "SheetViewVirtualTable_TableHeader_StyledCell_header_text" }, { children: header })) }))), filter && _jsx(ColumnFilter, Object.assign({}, filter)), sortable && _jsx(ColumnIcon, { onClick: sortable ? handleClick : undefined, src: columnIcon, alt: "column-icon", "data-id": id }), isPinnable && pinnable && !isDefaultPinned && !isLast && (_jsx(PinIconContainer, Object.assign({ isPinned: isPinned, onClick: (event) => {
|
|
49
49
|
event.stopPropagation();
|
|
50
50
|
handlePinClick(id);
|
|
51
51
|
}, title: isPinned ? 'Unpin column' : 'Pin column' }, { children: _jsx("img", { src: isPinned ? unpinIcon : pinIcon, alt: "pin-icon" }) })))] }), `${id}-${colIndex}`));
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const ActionIcon: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
3
3
|
export declare const ColumnIcon: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
4
|
+
export declare const HeaderText: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
4
5
|
export declare const PinIconContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
5
6
|
isPinned: boolean;
|
|
6
7
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -10,6 +10,14 @@ export const ColumnIcon = styled('img')(() => ({
|
|
|
10
10
|
height: '6.4px',
|
|
11
11
|
cursor: 'pointer',
|
|
12
12
|
}));
|
|
13
|
+
export const HeaderText = styled('span')(({ theme }) => ({
|
|
14
|
+
color: theme.palette.text.primary,
|
|
15
|
+
textOverflow: 'ellipsis',
|
|
16
|
+
width: '80%',
|
|
17
|
+
overflow: 'hidden',
|
|
18
|
+
fontSize: '12px',
|
|
19
|
+
fontWeight: 600,
|
|
20
|
+
}));
|
|
13
21
|
export const PinIconContainer = styled('div')(({ theme, isPinned }) => ({
|
|
14
22
|
width: '16px',
|
|
15
23
|
height: 'auto',
|
|
@@ -25,7 +25,7 @@ function TableRow({ row, columns, index, rowProps, isSheetView, selectedCell = n
|
|
|
25
25
|
isColumnSelected,
|
|
26
26
|
isLastRow,
|
|
27
27
|
});
|
|
28
|
-
return (_jsx(StyledCell, Object.assign({ component: "div", "data-testid": "TableRow_TableCell", "data-column-id": column.id, "data-column-width": column.width, "data-column-width-used": column.width, "data-column-align": column.align, "data-column-order": column.order, "data-column-header": typeof column.header === 'string' ? column.header : 'component', "data-column-sortable": !!column.sortable, "data-column-filterable": !!column.filter, isFirst: column.id === columns[0].id, isLast: column.id === columns[columns.length - 1].id, onClick: (event) => onCellClick === null || onCellClick === void 0 ? void 0 : onCellClick(index, columnIdStr, event), sx: Object.assign(Object.assign({ width: column.width, minWidth: column.width, textAlign: column.align, justifyContent: column.align === 'right' ? 'flex-end' : 'flex-start', cursor:
|
|
28
|
+
return (_jsx(StyledCell, Object.assign({ component: "div", "data-testid": "TableRow_TableCell", "data-column-id": column.id, "data-column-width": column.width, "data-column-width-used": column.width, "data-column-align": column.align, "data-column-order": column.order, "data-column-header": typeof column.header === 'string' ? column.header : 'component', "data-column-sortable": !!column.sortable, "data-column-filterable": !!column.filter, isFirst: column.id === columns[0].id, isLast: column.id === columns[columns.length - 1].id, onClick: (event) => onCellClick === null || onCellClick === void 0 ? void 0 : onCellClick(index, columnIdStr, event), sx: Object.assign(Object.assign({ width: column.width, minWidth: column.width, textAlign: column.align, justifyContent: column.align === 'right' ? 'flex-end' : 'flex-start', cursor: 'pointer' }, borderStyle), column.cellStyle), isSheetView: isSheetView }, { children: renderCell(column) }), `${column.id}-${colIndex}`));
|
|
29
29
|
}) })), [columns, row, index, selectedCell, selectedColumn, onCellClick, isLastRow]);
|
|
30
30
|
return (_createElement(StyledTableRow, Object.assign({ "data-testid": "TableRow", onClick: rowProps === null || rowProps === void 0 ? void 0 : rowProps.onRowClick, showShadowHighlight: rowProps === null || rowProps === void 0 ? void 0 : rowProps.showShadowHighlight, showLoadedStyle: rowProps === null || rowProps === void 0 ? void 0 : rowProps.showLoadedStyle, component: "article" }, rowProps, { key: index, isSheetView: isSheetView }), content));
|
|
31
31
|
}
|
|
@@ -306,9 +306,9 @@ export declare const ActionIcon: import("@emotion/styled").StyledComponent<{
|
|
|
306
306
|
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLImageElement> | undefined;
|
|
307
307
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLImageElement> | undefined;
|
|
308
308
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLImageElement> | undefined;
|
|
309
|
+
referrerPolicy?: import("react").HTMLAttributeReferrerPolicy | undefined;
|
|
309
310
|
src?: string | undefined;
|
|
310
311
|
alt?: string | undefined;
|
|
311
|
-
referrerPolicy?: import("react").HTMLAttributeReferrerPolicy | undefined;
|
|
312
312
|
crossOrigin?: "" | "anonymous" | "use-credentials" | undefined;
|
|
313
313
|
useMap?: string | undefined;
|
|
314
314
|
loading?: "eager" | "lazy" | undefined;
|
|
@@ -431,23 +431,6 @@ export declare const APP_CODES: {
|
|
|
431
431
|
};
|
|
432
432
|
};
|
|
433
433
|
};
|
|
434
|
-
paymentTechnology: {
|
|
435
|
-
code: string;
|
|
436
|
-
functions: {
|
|
437
|
-
view: {
|
|
438
|
-
code: string;
|
|
439
|
-
};
|
|
440
|
-
sandbox: {
|
|
441
|
-
code: string;
|
|
442
|
-
};
|
|
443
|
-
jsonApi: {
|
|
444
|
-
code: string;
|
|
445
|
-
};
|
|
446
|
-
reports: {
|
|
447
|
-
code: string;
|
|
448
|
-
};
|
|
449
|
-
};
|
|
450
|
-
};
|
|
451
434
|
};
|
|
452
435
|
};
|
|
453
436
|
payouts: {
|
package/build/constants/apps.js
CHANGED
|
@@ -42,7 +42,7 @@ export declare const chargeTableCellWidth: {
|
|
|
42
42
|
readonly source: {
|
|
43
43
|
readonly default: "114px";
|
|
44
44
|
readonly text: "125px";
|
|
45
|
-
readonly sheet: "
|
|
45
|
+
readonly sheet: "625px";
|
|
46
46
|
};
|
|
47
47
|
readonly authenticate: {
|
|
48
48
|
readonly default: "55px";
|
|
@@ -165,19 +165,19 @@ export declare const chargeTableCellWidth: {
|
|
|
165
165
|
readonly sheet: "30px";
|
|
166
166
|
};
|
|
167
167
|
readonly customer_amount: {
|
|
168
|
-
readonly default: "
|
|
169
|
-
readonly text: "
|
|
170
|
-
readonly sheet: "
|
|
168
|
+
readonly default: "150px";
|
|
169
|
+
readonly text: "150px";
|
|
170
|
+
readonly sheet: "150px";
|
|
171
171
|
};
|
|
172
172
|
readonly charge_amount: {
|
|
173
|
-
readonly default: "
|
|
174
|
-
readonly text: "
|
|
175
|
-
readonly sheet: "
|
|
173
|
+
readonly default: "150px";
|
|
174
|
+
readonly text: "150px";
|
|
175
|
+
readonly sheet: "150px";
|
|
176
176
|
};
|
|
177
177
|
readonly settlement_amount: {
|
|
178
|
-
readonly default: "
|
|
179
|
-
readonly text: "
|
|
180
|
-
readonly sheet: "
|
|
178
|
+
readonly default: "150px";
|
|
179
|
+
readonly text: "150px";
|
|
180
|
+
readonly sheet: "150px";
|
|
181
181
|
};
|
|
182
182
|
readonly acquirer_ref: {
|
|
183
183
|
readonly default: "125px";
|
|
@@ -42,7 +42,7 @@ export const chargeTableCellWidth = {
|
|
|
42
42
|
source: {
|
|
43
43
|
default: '114px',
|
|
44
44
|
text: '125px',
|
|
45
|
-
sheet: '
|
|
45
|
+
sheet: '625px',
|
|
46
46
|
},
|
|
47
47
|
authenticate: {
|
|
48
48
|
default: '55px',
|
|
@@ -165,19 +165,19 @@ export const chargeTableCellWidth = {
|
|
|
165
165
|
sheet: '30px',
|
|
166
166
|
},
|
|
167
167
|
customer_amount: {
|
|
168
|
-
default: '
|
|
169
|
-
text: '
|
|
170
|
-
sheet: '
|
|
168
|
+
default: '150px',
|
|
169
|
+
text: '150px',
|
|
170
|
+
sheet: '150px',
|
|
171
171
|
},
|
|
172
172
|
charge_amount: {
|
|
173
|
-
default: '
|
|
174
|
-
text: '
|
|
175
|
-
sheet: '
|
|
173
|
+
default: '150px',
|
|
174
|
+
text: '150px',
|
|
175
|
+
sheet: '150px',
|
|
176
176
|
},
|
|
177
177
|
settlement_amount: {
|
|
178
|
-
default: '
|
|
179
|
-
text: '
|
|
180
|
-
sheet: '
|
|
178
|
+
default: '150px',
|
|
179
|
+
text: '150px',
|
|
180
|
+
sheet: '150px',
|
|
181
181
|
},
|
|
182
182
|
acquirer_ref: {
|
|
183
183
|
default: '125px',
|
package/package.json
CHANGED
|
@@ -1,134 +1,134 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@tap-payments/os-micro-frontend-shared",
|
|
3
|
-
"description": "Shared components and utilities for Tap Payments micro frontends",
|
|
4
|
-
"version": "0.0.
|
|
5
|
-
"testVersion":
|
|
6
|
-
"type": "module",
|
|
7
|
-
"main": "build/index.js",
|
|
8
|
-
"module": "build/index.js",
|
|
9
|
-
"types": "build/index.d.ts",
|
|
10
|
-
"exports": {
|
|
11
|
-
".": {
|
|
12
|
-
"types": "./build/index.d.ts",
|
|
13
|
-
"import": "./build/index.js",
|
|
14
|
-
"require": "./build/index.js"
|
|
15
|
-
},
|
|
16
|
-
"./constants": {
|
|
17
|
-
"types": "./build/constants/index.d.ts",
|
|
18
|
-
"import": "./build/constants/index.js",
|
|
19
|
-
"require": "./build/constants/index.js"
|
|
20
|
-
},
|
|
21
|
-
"./components": {
|
|
22
|
-
"types": "./build/components/index.d.ts",
|
|
23
|
-
"import": "./build/components/index.js",
|
|
24
|
-
"require": "./build/components/index.js"
|
|
25
|
-
},
|
|
26
|
-
"./components/*": {
|
|
27
|
-
"types": "./build/components/*/index.d.ts",
|
|
28
|
-
"import": "./build/components/*/index.js",
|
|
29
|
-
"require": "./build/components/*/index.js"
|
|
30
|
-
},
|
|
31
|
-
"./hooks": {
|
|
32
|
-
"types": "./build/hooks/index.d.ts",
|
|
33
|
-
"import": "./build/hooks/index.js",
|
|
34
|
-
"require": "./build/hooks/index.js"
|
|
35
|
-
},
|
|
36
|
-
"./utils": {
|
|
37
|
-
"types": "./build/utils/index.d.ts",
|
|
38
|
-
"import": "./build/utils/index.js",
|
|
39
|
-
"require": "./build/utils/index.js"
|
|
40
|
-
},
|
|
41
|
-
"./theme": {
|
|
42
|
-
"types": "./build/theme/index.d.ts",
|
|
43
|
-
"import": "./build/theme/index.js",
|
|
44
|
-
"require": "./build/theme/index.js"
|
|
45
|
-
},
|
|
46
|
-
"./types": {
|
|
47
|
-
"types": "./build/types/index.d.ts",
|
|
48
|
-
"import": "./build/types/index.js",
|
|
49
|
-
"require": "./build/types/index.js"
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
"license": "MIT",
|
|
53
|
-
"author": {
|
|
54
|
-
"name": "Ahmed Sharkawy",
|
|
55
|
-
"email": "a.elsharkawy@tap.company"
|
|
56
|
-
},
|
|
57
|
-
"files": [
|
|
58
|
-
"build",
|
|
59
|
-
"readme.md"
|
|
60
|
-
],
|
|
61
|
-
"scripts": {
|
|
62
|
-
"ts:build": "rm -rf build && tsc -p tsconfig.npm.json && tsc-alias -p tsconfig.npm.json",
|
|
63
|
-
"push": "npm version patch --no-git-tag-version && npm run ts:build && npm publish --access public",
|
|
64
|
-
"push:test": "node scripts/increment-test-version.cjs && npm run ts:build && npm publish --access public --tag test && node scripts/restore-version.cjs",
|
|
65
|
-
"dev": "vite",
|
|
66
|
-
"build": "tsc -b && vite build ",
|
|
67
|
-
"prettier": "prettier --list-different \"src/**/*.{md,mdx,ts,js,tsx,jsx,json}\"",
|
|
68
|
-
"prettier:fix": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md,css,json}\"",
|
|
69
|
-
"lint": "eslint . --color",
|
|
70
|
-
"lint:fix": "eslint src --fix --color",
|
|
71
|
-
"preview": "vite preview",
|
|
72
|
-
"prepare": "husky"
|
|
73
|
-
},
|
|
74
|
-
"dependencies": {
|
|
75
|
-
"@emotion/react": "^11.11.0",
|
|
76
|
-
"@emotion/styled": "^11.11.0",
|
|
77
|
-
"@hookform/resolvers": "^3.3.1",
|
|
78
|
-
"@mui/material": "^5.12.3",
|
|
79
|
-
"@uiw/react-json-view": "^2.0.0-alpha.16",
|
|
80
|
-
"axios": "^1.4.0",
|
|
81
|
-
"dayjs": "^1.11.8",
|
|
82
|
-
"framer-motion": "10.11.0",
|
|
83
|
-
"i18next": "^22.4.15",
|
|
84
|
-
"memoize-one": "^6.0.0",
|
|
85
|
-
"re-resizable": "^6.9.9",
|
|
86
|
-
"react": "^18.2.0",
|
|
87
|
-
"react-currency-input-field": "^3.6.11",
|
|
88
|
-
"react-dom": "^18.2.0",
|
|
89
|
-
"react-draggable": "^4.4.6",
|
|
90
|
-
"react-dropzone": "^14.2.3",
|
|
91
|
-
"react-hook-form": "^7.45.4",
|
|
92
|
-
"react-hot-toast": "^2.4.1",
|
|
93
|
-
"react-i18next": "^12.2.2",
|
|
94
|
-
"react-multi-date-picker": "^4.1.2",
|
|
95
|
-
"react-router-dom": "^7.7.0",
|
|
96
|
-
"react-virtualized-auto-sizer": "^1.0.20",
|
|
97
|
-
"react-window": "^1.8.9",
|
|
98
|
-
"react-window-infinite-loader": "^1.0.9",
|
|
99
|
-
"react18-input-otp": "^1.1.4",
|
|
100
|
-
"recharts": "^2.15.1"
|
|
101
|
-
},
|
|
102
|
-
"devDependencies": {
|
|
103
|
-
"@eslint/js": "^9.17.0",
|
|
104
|
-
"@testing-library/jest-dom": "^5.16.5",
|
|
105
|
-
"@types/lodash": "^4.17.15",
|
|
106
|
-
"@types/react": "^18.2.6",
|
|
107
|
-
"@types/react-dom": "^18.3.5",
|
|
108
|
-
"@types/react-virtualized-auto-sizer": "^1.0.8",
|
|
109
|
-
"@types/react-window": "^1.8.5",
|
|
110
|
-
"@types/react-window-infinite-loader": "^1.0.6",
|
|
111
|
-
"@vitejs/plugin-react": "^4.3.4",
|
|
112
|
-
"eslint": "^9.17.0",
|
|
113
|
-
"eslint-plugin-react-hooks": "^5.0.0",
|
|
114
|
-
"eslint-plugin-react-refresh": "^0.4.16",
|
|
115
|
-
"globals": "^15.14.0",
|
|
116
|
-
"husky": "^8.0.3",
|
|
117
|
-
"lint-staged": "^13.2.2",
|
|
118
|
-
"prettier": "^2.8.8",
|
|
119
|
-
"tsc-alias": "^1.8.16",
|
|
120
|
-
"typescript": "5.0.2",
|
|
121
|
-
"typescript-eslint": "^8.18.2",
|
|
122
|
-
"vite": "6.0.5",
|
|
123
|
-
"vite-tsconfig-paths": "^4.2.0"
|
|
124
|
-
},
|
|
125
|
-
"lint-staged": {
|
|
126
|
-
"src/**/*.{ts,tsx,json,js,jsx}": [
|
|
127
|
-
"yarn run prettier:fix",
|
|
128
|
-
"yarn run lint"
|
|
129
|
-
]
|
|
130
|
-
},
|
|
131
|
-
"publishConfig": {
|
|
132
|
-
"registry": "https://registry.npmjs.org/"
|
|
133
|
-
}
|
|
134
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@tap-payments/os-micro-frontend-shared",
|
|
3
|
+
"description": "Shared components and utilities for Tap Payments micro frontends",
|
|
4
|
+
"version": "0.0.243",
|
|
5
|
+
"testVersion": 1,
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "build/index.js",
|
|
8
|
+
"module": "build/index.js",
|
|
9
|
+
"types": "build/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./build/index.d.ts",
|
|
13
|
+
"import": "./build/index.js",
|
|
14
|
+
"require": "./build/index.js"
|
|
15
|
+
},
|
|
16
|
+
"./constants": {
|
|
17
|
+
"types": "./build/constants/index.d.ts",
|
|
18
|
+
"import": "./build/constants/index.js",
|
|
19
|
+
"require": "./build/constants/index.js"
|
|
20
|
+
},
|
|
21
|
+
"./components": {
|
|
22
|
+
"types": "./build/components/index.d.ts",
|
|
23
|
+
"import": "./build/components/index.js",
|
|
24
|
+
"require": "./build/components/index.js"
|
|
25
|
+
},
|
|
26
|
+
"./components/*": {
|
|
27
|
+
"types": "./build/components/*/index.d.ts",
|
|
28
|
+
"import": "./build/components/*/index.js",
|
|
29
|
+
"require": "./build/components/*/index.js"
|
|
30
|
+
},
|
|
31
|
+
"./hooks": {
|
|
32
|
+
"types": "./build/hooks/index.d.ts",
|
|
33
|
+
"import": "./build/hooks/index.js",
|
|
34
|
+
"require": "./build/hooks/index.js"
|
|
35
|
+
},
|
|
36
|
+
"./utils": {
|
|
37
|
+
"types": "./build/utils/index.d.ts",
|
|
38
|
+
"import": "./build/utils/index.js",
|
|
39
|
+
"require": "./build/utils/index.js"
|
|
40
|
+
},
|
|
41
|
+
"./theme": {
|
|
42
|
+
"types": "./build/theme/index.d.ts",
|
|
43
|
+
"import": "./build/theme/index.js",
|
|
44
|
+
"require": "./build/theme/index.js"
|
|
45
|
+
},
|
|
46
|
+
"./types": {
|
|
47
|
+
"types": "./build/types/index.d.ts",
|
|
48
|
+
"import": "./build/types/index.js",
|
|
49
|
+
"require": "./build/types/index.js"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"license": "MIT",
|
|
53
|
+
"author": {
|
|
54
|
+
"name": "Ahmed Sharkawy",
|
|
55
|
+
"email": "a.elsharkawy@tap.company"
|
|
56
|
+
},
|
|
57
|
+
"files": [
|
|
58
|
+
"build",
|
|
59
|
+
"readme.md"
|
|
60
|
+
],
|
|
61
|
+
"scripts": {
|
|
62
|
+
"ts:build": "rm -rf build && tsc -p tsconfig.npm.json && tsc-alias -p tsconfig.npm.json",
|
|
63
|
+
"push": "npm version patch --no-git-tag-version && npm run ts:build && npm publish --access public",
|
|
64
|
+
"push:test": "node scripts/increment-test-version.cjs && npm run ts:build && npm publish --access public --tag test && node scripts/restore-version.cjs",
|
|
65
|
+
"dev": "vite",
|
|
66
|
+
"build": "tsc -b && vite build ",
|
|
67
|
+
"prettier": "prettier --list-different \"src/**/*.{md,mdx,ts,js,tsx,jsx,json}\"",
|
|
68
|
+
"prettier:fix": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md,css,json}\"",
|
|
69
|
+
"lint": "eslint . --color",
|
|
70
|
+
"lint:fix": "eslint src --fix --color",
|
|
71
|
+
"preview": "vite preview",
|
|
72
|
+
"prepare": "husky"
|
|
73
|
+
},
|
|
74
|
+
"dependencies": {
|
|
75
|
+
"@emotion/react": "^11.11.0",
|
|
76
|
+
"@emotion/styled": "^11.11.0",
|
|
77
|
+
"@hookform/resolvers": "^3.3.1",
|
|
78
|
+
"@mui/material": "^5.12.3",
|
|
79
|
+
"@uiw/react-json-view": "^2.0.0-alpha.16",
|
|
80
|
+
"axios": "^1.4.0",
|
|
81
|
+
"dayjs": "^1.11.8",
|
|
82
|
+
"framer-motion": "10.11.0",
|
|
83
|
+
"i18next": "^22.4.15",
|
|
84
|
+
"memoize-one": "^6.0.0",
|
|
85
|
+
"re-resizable": "^6.9.9",
|
|
86
|
+
"react": "^18.2.0",
|
|
87
|
+
"react-currency-input-field": "^3.6.11",
|
|
88
|
+
"react-dom": "^18.2.0",
|
|
89
|
+
"react-draggable": "^4.4.6",
|
|
90
|
+
"react-dropzone": "^14.2.3",
|
|
91
|
+
"react-hook-form": "^7.45.4",
|
|
92
|
+
"react-hot-toast": "^2.4.1",
|
|
93
|
+
"react-i18next": "^12.2.2",
|
|
94
|
+
"react-multi-date-picker": "^4.1.2",
|
|
95
|
+
"react-router-dom": "^7.7.0",
|
|
96
|
+
"react-virtualized-auto-sizer": "^1.0.20",
|
|
97
|
+
"react-window": "^1.8.9",
|
|
98
|
+
"react-window-infinite-loader": "^1.0.9",
|
|
99
|
+
"react18-input-otp": "^1.1.4",
|
|
100
|
+
"recharts": "^2.15.1"
|
|
101
|
+
},
|
|
102
|
+
"devDependencies": {
|
|
103
|
+
"@eslint/js": "^9.17.0",
|
|
104
|
+
"@testing-library/jest-dom": "^5.16.5",
|
|
105
|
+
"@types/lodash": "^4.17.15",
|
|
106
|
+
"@types/react": "^18.2.6",
|
|
107
|
+
"@types/react-dom": "^18.3.5",
|
|
108
|
+
"@types/react-virtualized-auto-sizer": "^1.0.8",
|
|
109
|
+
"@types/react-window": "^1.8.5",
|
|
110
|
+
"@types/react-window-infinite-loader": "^1.0.6",
|
|
111
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
112
|
+
"eslint": "^9.17.0",
|
|
113
|
+
"eslint-plugin-react-hooks": "^5.0.0",
|
|
114
|
+
"eslint-plugin-react-refresh": "^0.4.16",
|
|
115
|
+
"globals": "^15.14.0",
|
|
116
|
+
"husky": "^8.0.3",
|
|
117
|
+
"lint-staged": "^13.2.2",
|
|
118
|
+
"prettier": "^2.8.8",
|
|
119
|
+
"tsc-alias": "^1.8.16",
|
|
120
|
+
"typescript": "5.0.2",
|
|
121
|
+
"typescript-eslint": "^8.18.2",
|
|
122
|
+
"vite": "6.0.5",
|
|
123
|
+
"vite-tsconfig-paths": "^4.2.0"
|
|
124
|
+
},
|
|
125
|
+
"lint-staged": {
|
|
126
|
+
"src/**/*.{ts,tsx,json,js,jsx}": [
|
|
127
|
+
"yarn run prettier:fix",
|
|
128
|
+
"yarn run lint"
|
|
129
|
+
]
|
|
130
|
+
},
|
|
131
|
+
"publishConfig": {
|
|
132
|
+
"registry": "https://registry.npmjs.org/"
|
|
133
|
+
}
|
|
134
|
+
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
interface SheetViewIDButtonI {
|
|
3
|
-
rowId?: string;
|
|
4
|
-
}
|
|
5
|
-
declare function SheetViewIDButton({ rowId }: SheetViewIDButtonI): import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
declare const _default: import("react").MemoExoticComponent<typeof SheetViewIDButton>;
|
|
7
|
-
export default _default;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { memo, useState } from 'react';
|
|
3
|
-
import Box from '@mui/material/Box';
|
|
4
|
-
import { useTranslation } from 'react-i18next';
|
|
5
|
-
import Tooltip from '../../../Tooltip';
|
|
6
|
-
import { greenCheckIcon } from '../../../../constants/index.js';
|
|
7
|
-
import { copyText } from '../../../../utils/index.js';
|
|
8
|
-
import { RowId, Button } from './style';
|
|
9
|
-
function SheetViewIDButton({ rowId }) {
|
|
10
|
-
const [showCopy, setShowCopy] = useState(false);
|
|
11
|
-
const { t } = useTranslation();
|
|
12
|
-
const handleCopyRowId = () => {
|
|
13
|
-
if (rowId && !showCopy) {
|
|
14
|
-
setShowCopy(true);
|
|
15
|
-
copyText(rowId);
|
|
16
|
-
const timer = setTimeout(() => {
|
|
17
|
-
setShowCopy(false);
|
|
18
|
-
}, 2000);
|
|
19
|
-
return () => {
|
|
20
|
-
clearTimeout(timer);
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
return (_jsx(Tooltip, Object.assign({ title: t('copy') }, { children: _jsxs(Button, Object.assign({ sx: { minWidth: '213px' }, onClick: handleCopyRowId }, { children: [_jsx(RowId, Object.assign({ style: { visibility: showCopy ? 'hidden' : 'visible' } }, { children: rowId })), showCopy && (_jsx(Box, Object.assign({ sx: {
|
|
25
|
-
position: 'absolute',
|
|
26
|
-
top: 0,
|
|
27
|
-
left: 0,
|
|
28
|
-
right: 0,
|
|
29
|
-
bottom: 0,
|
|
30
|
-
display: 'flex',
|
|
31
|
-
alignItems: 'center',
|
|
32
|
-
justifyContent: 'center',
|
|
33
|
-
} }, { children: _jsx(Box, { component: "img", src: greenCheckIcon, alt: "copied", sx: { width: 14, height: 14 } }) })))] })) })));
|
|
34
|
-
}
|
|
35
|
-
export default memo(SheetViewIDButton);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './SheetViewIDButton';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './SheetViewIDButton';
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare const Button: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
3
|
-
export declare const RowId: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { styled } from '@mui/material/styles';
|
|
2
|
-
export const Button = styled('div')(({ theme }) => ({
|
|
3
|
-
position: 'relative',
|
|
4
|
-
display: 'flex',
|
|
5
|
-
alignItems: 'center',
|
|
6
|
-
gap: theme.spacing(1),
|
|
7
|
-
cursor: 'pointer',
|
|
8
|
-
justifyContent: 'center',
|
|
9
|
-
paddingInline: '8px',
|
|
10
|
-
borderRadius: '24px',
|
|
11
|
-
border: `1px solid ${theme.palette.divider}`,
|
|
12
|
-
}));
|
|
13
|
-
export const RowId = styled('div')(({ theme }) => ({
|
|
14
|
-
fontSize: '11px',
|
|
15
|
-
height: '18px',
|
|
16
|
-
display: 'flex',
|
|
17
|
-
alignItems: 'center',
|
|
18
|
-
fontWeight: 400,
|
|
19
|
-
whiteSpace: 'nowrap',
|
|
20
|
-
overflow: 'hidden',
|
|
21
|
-
textOverflow: 'ellipsis',
|
|
22
|
-
}));
|