@tap-payments/os-micro-frontend-shared 0.1.104-test.3 → 0.1.105

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +12 -12
  3. package/build/components/AmountStatusChip/AmountStatusChip.js +2 -3
  4. package/build/components/AmountStatusChip/style.d.ts +0 -1
  5. package/build/components/AmountStatusChip/style.js +0 -14
  6. package/build/components/AuthenticationTypeChip/AuthenticationTypeChip.d.ts +9 -0
  7. package/build/components/AuthenticationTypeChip/AuthenticationTypeChip.js +21 -0
  8. package/build/components/AuthenticationTypeChip/constants.d.ts +16 -0
  9. package/build/components/AuthenticationTypeChip/constants.js +13 -0
  10. package/build/components/AuthenticationTypeChip/index.d.ts +3 -0
  11. package/build/components/AuthenticationTypeChip/index.js +2 -0
  12. package/build/components/StatusChip/StatusChip.d.ts +1 -1
  13. package/build/components/StatusChip/StatusChip.js +4 -4
  14. package/build/components/StatusChip/style.d.ts +2 -0
  15. package/build/components/StatusChip/style.js +13 -4
  16. package/build/components/StatusChip/type.d.ts +2 -0
  17. package/build/components/StatusChipWithCopy/StatusChipWithCopy.d.ts +2 -1
  18. package/build/components/StatusChipWithCopy/StatusChipWithCopy.js +2 -2
  19. package/build/components/TableCells/CustomCells/ActionCell/constant.d.ts +0 -1
  20. package/build/components/TableCells/CustomCells/ActionCell/constant.js +1 -2
  21. package/build/components/TableCells/CustomCells/ActionCell/hooks/useActionCell.d.ts +1 -1
  22. package/build/components/TableCells/CustomCells/ActionCell/style.d.ts +1 -1
  23. package/build/components/VirtualTables/components/TableRow.js +2 -1
  24. package/build/components/index.d.ts +1 -0
  25. package/build/components/index.js +1 -0
  26. package/build/constants/chips/index.d.ts +1 -0
  27. package/build/constants/chips/index.js +1 -0
  28. package/build/{components/StatusChip/constants.d.ts → constants/chips/statusChips.d.ts} +1 -1
  29. package/build/{components/StatusChip/constants.js → constants/chips/statusChips.js} +1 -1
  30. package/build/constants/index.d.ts +1 -0
  31. package/build/constants/index.js +1 -0
  32. package/build/constants/table/cell/authenticationsTableCellWidth.d.ts +1 -1
  33. package/build/constants/table/cell/authenticationsTableCellWidth.js +1 -1
  34. package/build/constants/table/cell/chargeTableCellWidth.d.ts +1 -1
  35. package/build/constants/table/cell/chargeTableCellWidth.js +1 -1
  36. package/build/utils/table.d.ts +1 -3
  37. package/build/utils/table.js +1 -7
  38. package/package.json +139 -139
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
+ ```
@@ -11,10 +11,9 @@ 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 { memo } from 'react';
14
- import CurrencyIcon from '../CurrencyIcon';
15
- import { AmountLabel, CurrencyIconContainer, StyledAmountStatusChip } from './style';
14
+ import { AmountLabel, StyledAmountStatusChip } from './style';
16
15
  function AmountStatusChip(_a) {
17
16
  var { amount, currency } = _a, rest = __rest(_a, ["amount", "currency"]);
18
- return (_jsxs(StyledAmountStatusChip, Object.assign({ expandDirection: "left" }, rest, { children: [currency && (_jsx(AmountLabel, { children: _jsx(CurrencyIconContainer, { children: _jsx(CurrencyIcon, { currency: currency, fontSize: 10 }) }) })), amount] })));
17
+ return (_jsxs(StyledAmountStatusChip, Object.assign({ expandDirection: "left" }, rest, { children: [currency && _jsx(AmountLabel, { children: currency }), amount] })));
19
18
  }
20
19
  export default memo(AmountStatusChip);
@@ -1,4 +1,3 @@
1
1
  /// <reference types="react" />
2
2
  export declare const StyledAmountStatusChip: import("@emotion/styled").StyledComponent<import("../StatusChipWithCopy").StatusChipWithCopyProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
3
3
  export declare const AmountLabel: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
4
- export declare const CurrencyIconContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
@@ -6,22 +6,8 @@ export const StyledAmountStatusChip = styled(StatusChipWithCopy)(() => ({
6
6
  display: 'flex',
7
7
  alignItems: 'center',
8
8
  justifyContent: 'center',
9
- transition: 'none !important',
10
- animation: 'none !important',
11
- transform: 'none !important',
12
- '& *': {
13
- transition: 'none !important',
14
- animation: 'none !important',
15
- transform: 'none !important',
16
- },
17
9
  }));
18
10
  export const AmountLabel = styled('span')(() => ({
19
- marginRight: '2px',
20
- display: 'flex',
21
- alignItems: 'center',
22
- }));
23
- export const CurrencyIconContainer = styled('span')(() => ({
24
- marginInline: '1.5px',
25
11
  display: 'flex',
26
12
  alignItems: 'center',
27
13
  }));
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { StatusChipWithCopyProps } from '../StatusChipWithCopy';
3
+ import { chipAuthenticationTypes } from './constants';
4
+ export interface AuthenticationTypeChipProps extends StatusChipWithCopyProps {
5
+ title: keyof typeof chipAuthenticationTypes;
6
+ }
7
+ declare function AuthenticationTypeChip({ title, ref, ...rest }: AuthenticationTypeChipProps): import("react/jsx-runtime").JSX.Element;
8
+ declare const _default: import("react").MemoExoticComponent<typeof AuthenticationTypeChip>;
9
+ export default _default;
@@ -0,0 +1,21 @@
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 StatusChipWithCopy from '../StatusChipWithCopy';
15
+ import { chipAuthenticationTypes } from './constants';
16
+ function AuthenticationTypeChip(_a) {
17
+ var { title, ref } = _a, rest = __rest(_a, ["title", "ref"]);
18
+ const { text, styles } = chipAuthenticationTypes[title];
19
+ return (_jsx(StatusChipWithCopy, Object.assign({ chipStyles: styles, ref: ref }, rest, { children: text })));
20
+ }
21
+ export default memo(AuthenticationTypeChip);
@@ -0,0 +1,16 @@
1
+ export declare const chipAuthenticationTypes: {
2
+ '3DS': {
3
+ text: string;
4
+ };
5
+ 'Non-3DS': {
6
+ text: string;
7
+ styles: {
8
+ bgColor: string;
9
+ borderColor: string;
10
+ textColor: string;
11
+ };
12
+ };
13
+ 'Device Biometric': {
14
+ text: string;
15
+ };
16
+ };
@@ -0,0 +1,13 @@
1
+ import { emptyStatusChipColors } from '../../constants/index.js';
2
+ export const chipAuthenticationTypes = {
3
+ '3DS': {
4
+ text: '3DS',
5
+ },
6
+ 'Non-3DS': {
7
+ text: 'Non 3DS',
8
+ styles: Object.assign({}, emptyStatusChipColors),
9
+ },
10
+ 'Device Biometric': {
11
+ text: 'Biometric',
12
+ },
13
+ };
@@ -0,0 +1,3 @@
1
+ import AuthenticationTypeChip from './AuthenticationTypeChip';
2
+ export { type AuthenticationTypeChipProps } from './AuthenticationTypeChip';
3
+ export default AuthenticationTypeChip;
@@ -0,0 +1,2 @@
1
+ import AuthenticationTypeChip from './AuthenticationTypeChip';
2
+ export default AuthenticationTypeChip;
@@ -1,3 +1,3 @@
1
1
  import { ChipProps } from './type';
2
- declare const StatusChip: ({ children, unknownText, copyText, expandDirection, ...props }: ChipProps) => import("react/jsx-runtime").JSX.Element;
2
+ declare const StatusChip: ({ children, unknownText, copyText, expandDirection, chipStyles, ...props }: ChipProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export default StatusChip;
@@ -15,15 +15,15 @@ import { useTranslation } from 'react-i18next';
15
15
  import { AnimatePresence, motion } from 'framer-motion';
16
16
  import { copyText as copyTextHandler } from '../../utils/index.js';
17
17
  import { copyIcon, greenCheckIcon } from '../../constants/index.js';
18
- import { unknownGeographyColors } from './constants';
19
18
  import { ChipStyled, Wrapper, CopyWrapper } from './style';
19
+ import { emptyStatusChipColors } from '../../constants/index.js';
20
20
  const StatusChip = (_a) => {
21
- var { children, unknownText, copyText, expandDirection = 'right' } = _a, props = __rest(_a, ["children", "unknownText", "copyText", "expandDirection"]);
21
+ var { children, unknownText, copyText, expandDirection = 'right', chipStyles } = _a, props = __rest(_a, ["children", "unknownText", "copyText", "expandDirection", "chipStyles"]);
22
22
  const [showCopy, setShowCopy] = useState(false);
23
23
  const { t } = useTranslation();
24
24
  const isSelected = props.isSelected;
25
25
  if (!children) {
26
- return (_jsx(ChipStyled, Object.assign({}, unknownGeographyColors, props, { isSelected: false, sx: (theme) => ({ borderColor: theme.palette.divider }) }, { children: unknownText ? t(unknownText) : t('unknown') })));
26
+ return (_jsx(ChipStyled, Object.assign({}, emptyStatusChipColors, props, { isSelected: false, sx: (theme) => ({ borderColor: theme.palette.divider }) }, { children: unknownText ? t(unknownText) : t('unknown') })));
27
27
  }
28
28
  const handleCopy = (e) => {
29
29
  e.stopPropagation();
@@ -41,7 +41,7 @@ const StatusChip = (_a) => {
41
41
  const isCopyActive = isSelected && copyText;
42
42
  return (_jsxs(motion.div, Object.assign({ style: { position: 'relative' }, animate: { zIndex: isSelected ? 3 : 0 } }, { children: [_jsx(ChipStyled, Object.assign({}, props, { sx: { visibility: 'hidden', pointerEvents: 'none' } }, { children: _jsx(Wrapper, { children: children }) })), _jsx(motion.div, Object.assign({ style: { position: 'absolute', top: 0, zIndex: isSelected ? 3 : 0 }, animate: {
43
43
  left: isCopyActive && expandDirection === 'left' ? -12 : 0,
44
- }, transition: { delay: isSelected ? 0 : 0.2, duration: 0.2 } }, { children: _jsx(ChipStyled, Object.assign({}, props, { isSelected: isSelected }, { children: _jsxs(motion.div, Object.assign({ layout: "size", style: { display: 'flex', gap: '4px' }, animate: {
44
+ }, transition: { delay: isSelected ? 0 : 0.2, duration: 0.2 } }, { children: _jsx(ChipStyled, Object.assign({}, props, { isSelected: isSelected }, chipStyles, { children: _jsxs(motion.div, Object.assign({ layout: "size", style: { display: 'flex', gap: '4px' }, animate: {
45
45
  paddingRight: isCopyActive ? 12 : 0,
46
46
  }, transition: { delay: isSelected ? 0 : 0.2, duration: 0.2 } }, { children: [_jsx(Wrapper, { children: children }), _jsx(AnimatePresence, { children: isCopyActive && (_jsx(CopyWrapper, { children: _jsx(motion.img, { initial: { opacity: 0, x: -5 }, animate: { opacity: 1, x: 0 }, exit: { opacity: 0, x: -2 }, transition: { delay: 0.2, duration: 0.1 }, onClick: handleCopy, src: showCopy ? greenCheckIcon : copyIcon, style: {
47
47
  height: 12,
@@ -12,6 +12,8 @@ export declare const ChipStyled: import("@emotion/styled").StyledComponent<impor
12
12
  isSelected?: boolean | undefined;
13
13
  copyText?: string | undefined;
14
14
  expandDirection?: "left" | "right" | undefined;
15
+ chipStyles?: object | undefined;
16
+ disableAnimation?: boolean | undefined;
15
17
  } & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
16
18
  ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
17
19
  }, keyof import("@mui/material/OverridableComponent").CommonProps | keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & {
@@ -1,10 +1,19 @@
1
1
  import Box from '@mui/material/Box';
2
2
  import { styled } from '@mui/material/styles';
3
3
  export const ChipStyled = styled(Box, {
4
- shouldForwardProp: (prop) => !['textColor', 'bgColor', 'borderColor', 'disabled', 'padding', 'maxWidth', 'isSelected'].includes(prop),
5
- })(({ theme, isSelected, textColor = theme.palette.text.primary, bgColor = '#EFF1F2', borderColor = '#EFF1F2', disabled = false, padding, maxWidth, }) => {
6
- return Object.assign({ display: 'flex', alignItems: 'center', gap: '4px', height: '18px', padding: padding || '0px 9.5px', borderRadius: '30px', border: `1px solid ${borderColor}`, backgroundColor: bgColor, color: textColor, cursor: disabled ? 'not-allowed' : 'pointer', opacity: disabled ? 0.5 : 1, whiteSpace: 'nowrap', fontSize: '11px', minWidth: '67px', maxWidth: maxWidth || 'none', width: 'fit-content', overflow: 'hidden', textOverflow: maxWidth ? 'ellipsis' : 'unset', boxSizing: 'border-box', borderColor: theme.palette.common.white }, (isSelected && {
7
- boxShadow: 'rgb(242, 242, 242) 7px 0px 8px 2px',
4
+ shouldForwardProp: (prop) => !['textColor', 'bgColor', 'borderColor', 'disabled', 'padding', 'maxWidth', 'isSelected', 'disableAnimation'].includes(prop),
5
+ })(({ theme, isSelected, textColor = theme.palette.text.primary, bgColor = '#EFF1F2', borderColor = '#EFF1F2', disabled = false, padding, maxWidth, disableAnimation, }) => {
6
+ return Object.assign(Object.assign({ display: 'flex', justifyContent: 'center', alignItems: 'center', gap: '4px', height: '18px', padding: padding || '0px 9.5px', borderRadius: '30px', border: `1px solid ${borderColor}`, backgroundColor: bgColor, color: textColor, cursor: disabled ? 'not-allowed' : 'pointer', opacity: disabled ? 0.5 : 1, whiteSpace: 'nowrap', fontSize: '11px', minWidth: '67px', maxWidth: maxWidth || 'none', width: 'fit-content', overflow: 'hidden', textOverflow: maxWidth ? 'ellipsis' : 'unset', boxSizing: 'border-box' }, (isSelected && {
7
+ boxShadow: 'white 7px 0px 8px 2px',
8
+ })), (disableAnimation && {
9
+ transition: 'none !important',
10
+ animation: 'none !important',
11
+ transform: 'none !important',
12
+ '& *': {
13
+ transition: 'none !important',
14
+ animation: 'none !important',
15
+ transform: 'none !important',
16
+ },
8
17
  }));
9
18
  });
10
19
  export const Wrapper = styled(Box)(() => ({
@@ -11,4 +11,6 @@ export type ChipProps = PropsWithChildren<{
11
11
  isSelected?: boolean;
12
12
  copyText?: string;
13
13
  expandDirection?: 'left' | 'right';
14
+ chipStyles?: object;
15
+ disableAnimation?: boolean;
14
16
  } & BoxProps>;
@@ -5,7 +5,8 @@ export interface StatusChipWithCopyProps extends StatusChipProps {
5
5
  copyText?: string;
6
6
  chipIndex: number;
7
7
  selectionProps: SelectionProps;
8
+ chipStyles?: object;
8
9
  }
9
- declare function StatusChipWithCopy({ children, copyText, chipIndex, selectionProps: { onClick, rowIndex, colIndex, selectedId }, ...reset }: StatusChipWithCopyProps): import("react/jsx-runtime").JSX.Element;
10
+ declare function StatusChipWithCopy({ children, copyText, chipIndex, selectionProps: { onClick, rowIndex, colIndex, selectedId }, ...rest }: StatusChipWithCopyProps): import("react/jsx-runtime").JSX.Element;
10
11
  declare const _default: import("react").MemoExoticComponent<typeof StatusChipWithCopy>;
11
12
  export default _default;
@@ -14,9 +14,9 @@ import { memo, useMemo } from 'react';
14
14
  import StatusChip from '../StatusChip';
15
15
  import { checkIsSelected } from './utils';
16
16
  function StatusChipWithCopy(_a) {
17
- var { children, copyText, chipIndex, selectionProps: { onClick, rowIndex, colIndex, selectedId } } = _a, reset = __rest(_a, ["children", "copyText", "chipIndex", "selectionProps"]);
17
+ var { children, copyText, chipIndex, selectionProps: { onClick, rowIndex, colIndex, selectedId } } = _a, rest = __rest(_a, ["children", "copyText", "chipIndex", "selectionProps"]);
18
18
  const isSelected = useMemo(() => checkIsSelected({ rowIndex, colIndex, selectedId, chipIndex }), [rowIndex, colIndex, selectedId, chipIndex]);
19
- return (_jsx(StatusChip, Object.assign({}, reset, { copyText: copyText, onClick: (e) => {
19
+ return (_jsx(StatusChip, Object.assign({}, rest, { copyText: copyText, onClick: (e) => {
20
20
  onClick === null || onClick === void 0 ? void 0 : onClick(e, chipIndex);
21
21
  }, isSelected: isSelected }, { children: children })));
22
22
  }
@@ -28,5 +28,4 @@ export declare const actionIcons: {
28
28
  users: string;
29
29
  brand: string;
30
30
  clipboard: string;
31
- viewApi: string;
32
31
  };
@@ -1,5 +1,5 @@
1
1
  import { BadgeVariants } from '../../../CountBadge';
2
- import { flagIcon, clockIcon, disputeIcon, redFlagIcon, cancelledIcon, closedFlagIcon, orangeFlagIcon, refundInitiatedIcon, viewInvoiceIcon, reverseActionIcon, voidedIcon, capturedDropdownIcon, destinationReversedTableIcon, brandPlaceholderIcon, usersIcon, clipboardIcon, jsonBlackIcon, } from '../../../../constants/index.js';
2
+ import { flagIcon, clockIcon, disputeIcon, redFlagIcon, cancelledIcon, closedFlagIcon, orangeFlagIcon, refundInitiatedIcon, viewInvoiceIcon, reverseActionIcon, voidedIcon, capturedDropdownIcon, destinationReversedTableIcon, brandPlaceholderIcon, usersIcon, clipboardIcon, } from '../../../../constants/index.js';
3
3
  export const flags = {
4
4
  GRAY: { icon: closedFlagIcon, color: '#CFCFCF' },
5
5
  ORANGE: { icon: orangeFlagIcon, color: '#FFD503' },
@@ -24,5 +24,4 @@ export const actionIcons = {
24
24
  users: usersIcon,
25
25
  brand: brandPlaceholderIcon,
26
26
  clipboard: clipboardIcon,
27
- viewApi: jsonBlackIcon
28
27
  };
@@ -13,7 +13,7 @@ export declare function useActionCell({ actions, isDropdownShown, onCloseDropdow
13
13
  label: string;
14
14
  onClick: (e: React.MouseEvent<HTMLLIElement, MouseEvent>) => void;
15
15
  onRightClick?: ((e: React.MouseEvent<HTMLLIElement, MouseEvent>) => void) | undefined;
16
- icon: "brand" | "users" | "cancel" | "reverse" | "refund" | "destination" | "capture" | "flag" | "dispute" | "void" | "clock" | "invoice" | "clipboard" | "viewApi";
16
+ icon: "brand" | "users" | "cancel" | "reverse" | "refund" | "destination" | "capture" | "flag" | "dispute" | "void" | "clock" | "invoice" | "clipboard";
17
17
  isLoading?: boolean | undefined;
18
18
  isError?: boolean | undefined;
19
19
  isSuccess?: boolean | undefined;
@@ -283,5 +283,5 @@ export declare const ActionIcon: import("@emotion/styled").StyledComponent<{
283
283
  fetchPriority?: "auto" | "high" | "low" | undefined;
284
284
  srcSet?: string | undefined;
285
285
  } & import("framer-motion").MotionProps & import("react").RefAttributes<HTMLImageElement> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
286
- icon?: "brand" | "users" | "cancel" | "reverse" | "refund" | "destination" | "capture" | "flag" | "dispute" | "void" | "clock" | "invoice" | "clipboard" | "viewApi" | undefined;
286
+ icon?: "brand" | "users" | "cancel" | "reverse" | "refund" | "destination" | "capture" | "flag" | "dispute" | "void" | "clock" | "invoice" | "clipboard" | undefined;
287
287
  }, {}, {}>;
@@ -53,9 +53,10 @@ function TableRow({ row, columns, index, rowProps, isSheetView, selectedCell = n
53
53
  isPinnedEnd: column.pinned === 'end',
54
54
  })
55
55
  : {};
56
+ const isIndexColumn = column.pinned === 'start' && effectiveFirst;
56
57
  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: effectiveFirst, isLast: effectiveLast, onClick: (event) => {
57
58
  onCellClick === null || onCellClick === void 0 ? void 0 : onCellClick(index, colIndex, event, column.pinned);
58
- }, sx: Object.assign(Object.assign(Object.assign({ width: column.width, minWidth: column.width, textAlign: column.align, justifyContent: column.align === 'right' ? 'flex-end' : 'flex-start', cursor: onCellClick ? 'pointer' : 'default' }, selectionStyles), rowSelectionBorderStyles), column.cellStyle), isSheetView: isSheetView, isSelected: isCellSelected }, { children: isSheetView ? (_jsx(Box, Object.assign({ sx: { position: 'relative', zIndex: 1 } }, { children: renderCell(column, index, colIndex) }))) : (_jsx(_Fragment, { children: renderCell(column, index, colIndex) })) }), `${column.id}-${colIndex}`));
59
+ }, sx: Object.assign(Object.assign(Object.assign({ width: column.width, minWidth: column.width, textAlign: column.align, justifyContent: isIndexColumn ? 'center' : column.align === 'right' ? 'flex-end' : 'flex-start', cursor: onCellClick ? 'pointer' : 'default' }, selectionStyles), rowSelectionBorderStyles), column.cellStyle), isSheetView: isSheetView, isSelected: isCellSelected }, { children: isSheetView ? (_jsx(Box, Object.assign({ sx: { position: 'relative', zIndex: 1 } }, { children: renderCell(column, index, colIndex) }))) : (_jsx(_Fragment, { children: renderCell(column, index, colIndex) })) }), `${column.id}-${colIndex}`));
59
60
  }) })), [columns, row, index, selectedCell, selectedColumn, selectedRow, onCellClick, isLastRow, selectedChip, isSheetView]);
60
61
  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));
61
62
  }
@@ -106,4 +106,5 @@ export { default as ColorPicker } from './ColorPicker';
106
106
  export { default as WindowBackdrop } from './WindowBackdrop';
107
107
  export { default as LazyImage } from './LazyImage';
108
108
  export { default as AmountStatusChip, type AmountStatusChipProps } from './AmountStatusChip';
109
+ export { default as AuthenticationTypeChip, type AuthenticationTypeChipProps } from './AuthenticationTypeChip';
109
110
  export * from './LazyImage';
@@ -106,4 +106,5 @@ export { default as ColorPicker } from './ColorPicker';
106
106
  export { default as WindowBackdrop } from './WindowBackdrop';
107
107
  export { default as LazyImage } from './LazyImage';
108
108
  export { default as AmountStatusChip } from './AmountStatusChip';
109
+ export { default as AuthenticationTypeChip } from './AuthenticationTypeChip';
109
110
  export * from './LazyImage';
@@ -0,0 +1 @@
1
+ export * from './statusChips';
@@ -0,0 +1 @@
1
+ export * from './statusChips';
@@ -1,4 +1,4 @@
1
- export declare const unknownGeographyColors: {
1
+ export declare const emptyStatusChipColors: {
2
2
  bgColor: string;
3
3
  borderColor: string;
4
4
  textColor: string;
@@ -1,4 +1,4 @@
1
- export const unknownGeographyColors = {
1
+ export const emptyStatusChipColors = {
2
2
  bgColor: 'white',
3
3
  borderColor: '#F2F2F2',
4
4
  textColor: '#20232B33',
@@ -12,3 +12,4 @@ export * from './table';
12
12
  export * from './toggleOptions';
13
13
  export * from './payment';
14
14
  export * from './segment';
15
+ export * from './chips';
@@ -12,3 +12,4 @@ export * from './table';
12
12
  export * from './toggleOptions';
13
13
  export * from './payment';
14
14
  export * from './segment';
15
+ export * from './chips';
@@ -37,7 +37,7 @@ export declare const authenticationsTableCellWidth: {
37
37
  readonly payment_agreement: {
38
38
  readonly default: "50px";
39
39
  readonly text: "250px";
40
- readonly sheet: "250px";
40
+ readonly sheet: "165px";
41
41
  };
42
42
  readonly amount: {
43
43
  readonly default: "195px";
@@ -37,7 +37,7 @@ export const authenticationsTableCellWidth = {
37
37
  payment_agreement: {
38
38
  default: '50px',
39
39
  text: '250px',
40
- sheet: '250px',
40
+ sheet: '165px',
41
41
  },
42
42
  amount: {
43
43
  default: '195px',
@@ -52,7 +52,7 @@ export declare const chargeTableCellWidth: {
52
52
  readonly payment_agreement: {
53
53
  readonly default: "50px";
54
54
  readonly text: "150px";
55
- readonly sheet: "230px";
55
+ readonly sheet: "165px";
56
56
  };
57
57
  readonly payment_initiated: {
58
58
  readonly default: "150px";
@@ -52,7 +52,7 @@ export const chargeTableCellWidth = {
52
52
  payment_agreement: {
53
53
  default: '50px',
54
54
  text: '150px',
55
- sheet: '230px',
55
+ sheet: '165px',
56
56
  },
57
57
  payment_initiated: {
58
58
  default: '150px',
@@ -6,6 +6,4 @@ export declare const getColumnWidthPercentage: (widthInPx: number, options?: {
6
6
  export declare const getCellWidth: ({ table, cellID, tableMode }: TableCellWidthProps) => string;
7
7
  export declare const calculateMaxAllowedRows: (isLoaded: boolean, isLoading: boolean) => number;
8
8
  export declare const isHeightNotFullyFilledByRows: (totalRows: number) => boolean;
9
- export declare const isTableDefaultMode: (tableMode: TableMode) => boolean;
10
- export declare const isTableSheetMode: (tableMode: TableMode) => boolean;
11
- export declare const isTableTextMode: (tableMode: TableMode) => boolean;
9
+ export declare const isTableDefaultMode: (tableMode?: TableMode) => boolean;
@@ -73,12 +73,6 @@ export const isHeightNotFullyFilledByRows = (totalRows) => {
73
73
  const allowedRows = maxRowsThatFit();
74
74
  return totalRows < allowedRows + 1;
75
75
  };
76
- export const isTableDefaultMode = (tableMode) => {
76
+ export const isTableDefaultMode = (tableMode = 'default') => {
77
77
  return tableMode === 'default';
78
78
  };
79
- export const isTableSheetMode = (tableMode) => {
80
- return tableMode === 'sheet';
81
- };
82
- export const isTableTextMode = (tableMode) => {
83
- return tableMode === 'text';
84
- };
package/package.json CHANGED
@@ -1,139 +1,139 @@
1
- {
2
- "name": "@tap-payments/os-micro-frontend-shared",
3
- "description": "Shared components and utilities for Tap Payments micro frontends",
4
- "version": "0.1.104-test.3",
5
- "testVersion": 3,
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:local": "yarn ts:build && yalc publish --push",
64
- "push": "npm run ts:build && npm publish --access public",
65
- "push:test": "node scripts/increment-test-version.cjs && npm run ts:build && npm publish --access public --tag test && node scripts/restore-version.cjs",
66
- "dev": "vite",
67
- "build": "tsc -b && vite build ",
68
- "prettier": "prettier --list-different \"src/**/*.{md,mdx,ts,js,tsx,jsx,json}\"",
69
- "prettier:fix": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md,css,json}\"",
70
- "lint": "eslint . --color",
71
- "lint:fix": "eslint src --fix --color",
72
- "preview": "vite preview",
73
- "prepare": "husky"
74
- },
75
- "dependencies": {
76
- "@emotion/react": "^11.11.0",
77
- "@emotion/styled": "^11.11.0",
78
- "@hookform/resolvers": "^3.3.1",
79
- "@mui/material": "^5.12.3",
80
- "@uiw/react-json-view": "^2.0.0-alpha.16",
81
- "axios": "^1.4.0",
82
- "color": "^5.0.0",
83
- "dayjs": "^1.11.8",
84
- "framer-motion": "10.11.0",
85
- "i18next": "^22.4.15",
86
- "memoize-one": "^6.0.0",
87
- "re-resizable": "^6.9.9",
88
- "react": "^18.2.0",
89
- "react-colorful": "^5.6.1",
90
- "react-currency-input-field": "^3.6.11",
91
- "react-dom": "^18.2.0",
92
- "react-draggable": "^4.4.6",
93
- "react-dropzone": "^14.2.3",
94
- "react-hook-form": "^7.45.4",
95
- "react-hot-toast": "^2.4.1",
96
- "react-i18next": "^12.2.2",
97
- "react-lazy-load-image-component": "^1.6.3",
98
- "react-multi-date-picker": "^4.1.2",
99
- "react-router-dom": "^7.7.0",
100
- "react-virtualized-auto-sizer": "^1.0.20",
101
- "react-window": "^1.8.9",
102
- "react-window-infinite-loader": "^1.0.9",
103
- "react18-input-otp": "^1.1.4",
104
- "recharts": "^2.15.1"
105
- },
106
- "devDependencies": {
107
- "@eslint/js": "^9.17.0",
108
- "@testing-library/jest-dom": "^5.16.5",
109
- "@types/lodash": "^4.17.15",
110
- "@types/react": "^18.2.6",
111
- "@types/react-dom": "^18.3.5",
112
- "@types/react-lazy-load-image-component": "^1.6.4",
113
- "@types/react-virtualized-auto-sizer": "^1.0.8",
114
- "@types/react-window": "^1.8.5",
115
- "@types/react-window-infinite-loader": "^1.0.6",
116
- "@vitejs/plugin-react": "^4.3.4",
117
- "eslint": "^9.17.0",
118
- "eslint-plugin-react-hooks": "^5.0.0",
119
- "eslint-plugin-react-refresh": "^0.4.16",
120
- "globals": "^15.14.0",
121
- "husky": "^8.0.3",
122
- "lint-staged": "^13.2.2",
123
- "prettier": "^2.8.8",
124
- "tsc-alias": "^1.8.16",
125
- "typescript": "5.0.2",
126
- "typescript-eslint": "^8.18.2",
127
- "vite": "6.0.5",
128
- "vite-tsconfig-paths": "^4.2.0"
129
- },
130
- "lint-staged": {
131
- "src/**/*.{ts,tsx,json,js,jsx}": [
132
- "yarn run prettier:fix",
133
- "yarn run lint"
134
- ]
135
- },
136
- "publishConfig": {
137
- "registry": "https://registry.npmjs.org/"
138
- }
139
- }
1
+ {
2
+ "name": "@tap-payments/os-micro-frontend-shared",
3
+ "description": "Shared components and utilities for Tap Payments micro frontends",
4
+ "version": "0.1.105",
5
+ "testVersion": 8,
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:local": "yarn ts:build && yalc publish --push",
64
+ "push": "npm run ts:build && npm publish --access public",
65
+ "push:test": "node scripts/increment-test-version.cjs && npm run ts:build && npm publish --access public --tag test && node scripts/restore-version.cjs",
66
+ "dev": "vite",
67
+ "build": "tsc -b && vite build ",
68
+ "prettier": "prettier --list-different \"src/**/*.{md,mdx,ts,js,tsx,jsx,json}\"",
69
+ "prettier:fix": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md,css,json}\"",
70
+ "lint": "eslint . --color",
71
+ "lint:fix": "eslint src --fix --color",
72
+ "preview": "vite preview",
73
+ "prepare": "husky"
74
+ },
75
+ "dependencies": {
76
+ "@emotion/react": "^11.11.0",
77
+ "@emotion/styled": "^11.11.0",
78
+ "@hookform/resolvers": "^3.3.1",
79
+ "@mui/material": "^5.12.3",
80
+ "@uiw/react-json-view": "^2.0.0-alpha.16",
81
+ "axios": "^1.4.0",
82
+ "color": "^5.0.0",
83
+ "dayjs": "^1.11.8",
84
+ "framer-motion": "10.11.0",
85
+ "i18next": "^22.4.15",
86
+ "memoize-one": "^6.0.0",
87
+ "re-resizable": "^6.9.9",
88
+ "react": "^18.2.0",
89
+ "react-colorful": "^5.6.1",
90
+ "react-currency-input-field": "^3.6.11",
91
+ "react-dom": "^18.2.0",
92
+ "react-draggable": "^4.4.6",
93
+ "react-dropzone": "^14.2.3",
94
+ "react-hook-form": "^7.45.4",
95
+ "react-hot-toast": "^2.4.1",
96
+ "react-i18next": "^12.2.2",
97
+ "react-lazy-load-image-component": "^1.6.3",
98
+ "react-multi-date-picker": "^4.1.2",
99
+ "react-router-dom": "^7.7.0",
100
+ "react-virtualized-auto-sizer": "^1.0.20",
101
+ "react-window": "^1.8.9",
102
+ "react-window-infinite-loader": "^1.0.9",
103
+ "react18-input-otp": "^1.1.4",
104
+ "recharts": "^2.15.1"
105
+ },
106
+ "devDependencies": {
107
+ "@eslint/js": "^9.17.0",
108
+ "@testing-library/jest-dom": "^5.16.5",
109
+ "@types/lodash": "^4.17.15",
110
+ "@types/react": "^18.2.6",
111
+ "@types/react-dom": "^18.3.5",
112
+ "@types/react-lazy-load-image-component": "^1.6.4",
113
+ "@types/react-virtualized-auto-sizer": "^1.0.8",
114
+ "@types/react-window": "^1.8.5",
115
+ "@types/react-window-infinite-loader": "^1.0.6",
116
+ "@vitejs/plugin-react": "^4.3.4",
117
+ "eslint": "^9.17.0",
118
+ "eslint-plugin-react-hooks": "^5.0.0",
119
+ "eslint-plugin-react-refresh": "^0.4.16",
120
+ "globals": "^15.14.0",
121
+ "husky": "^8.0.3",
122
+ "lint-staged": "^13.2.2",
123
+ "prettier": "^2.8.8",
124
+ "tsc-alias": "^1.8.16",
125
+ "typescript": "5.0.2",
126
+ "typescript-eslint": "^8.18.2",
127
+ "vite": "6.0.5",
128
+ "vite-tsconfig-paths": "^4.2.0"
129
+ },
130
+ "lint-staged": {
131
+ "src/**/*.{ts,tsx,json,js,jsx}": [
132
+ "yarn run prettier:fix",
133
+ "yarn run lint"
134
+ ]
135
+ },
136
+ "publishConfig": {
137
+ "registry": "https://registry.npmjs.org/"
138
+ }
139
+ }