@tap-payments/os-micro-frontend-shared 0.0.74-pin-icon-v12 → 0.0.74

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 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
+ ```
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useCallback, useEffect, useMemo, useState } from 'react';
2
+ import { Fragment, useCallback, useEffect, useMemo, useState } from 'react';
3
3
  import Box from '@mui/material/Box';
4
4
  import Collapse from '@mui/material/Collapse';
5
5
  import lodashValues from 'lodash/values';
@@ -38,15 +38,10 @@ function Inputs({ onCloseDropdown, filter: { options = [], onConfirm, data, isOn
38
38
  const isAnyInputWithValue = Object.entries(values).some(([inputKey, val]) => { var _a; return Boolean(val) && (((_a = getFilterByApiKey(inputKey)) === null || _a === void 0 ? void 0 : _a.filterGroup) !== filterGroup || !filterGroup); });
39
39
  return isOnlyOneFilter && !inputWithValue && isAnyInputWithValue;
40
40
  }, [options, values, isOnlyOneFilter]);
41
- return (_jsxs(Wrapper, Object.assign({ component: "article", "data-testid": "ColumnFilterInputs" }, { children: [_jsx(Text, Object.assign({ component: "header", "data-testid": "ColumnFilterInputs_title" }, { children: t('filterBy') })), _jsx(InputsWrapper, Object.assign({ "data-testid": "ColumnFilterInputs_inputs", component: "main" }, { children: options.map(({ placeholder, apiKey, isDisabled, filterGroup, render }) => {
42
- if (render) {
43
- return render();
44
- }
45
- return (_jsx(InputStyled, { className: "input", "data-testid": "ColumnFilterInputs_InputStyled", name: apiKey, placeholder: placeholder, onChange: (e) => {
41
+ return (_jsxs(Wrapper, Object.assign({ component: "article", "data-testid": "ColumnFilterInputs" }, { children: [_jsx(Text, Object.assign({ component: "header", "data-testid": "ColumnFilterInputs_title" }, { children: t('filterBy') })), _jsx(InputsWrapper, Object.assign({ "data-testid": "ColumnFilterInputs_inputs", component: "main" }, { children: options.map(({ placeholder, apiKey, isDisabled, filterGroup, render }) => (_jsx(Fragment, { children: render ? (render()) : (_jsx(InputStyled, { className: "input", "data-testid": "ColumnFilterInputs_InputStyled", name: apiKey, placeholder: placeholder, onChange: (e) => {
46
42
  setValues(Object.assign(Object.assign({}, values), { [apiKey]: e.target.value }));
47
43
  }, disabled: isDisabled || isInputDisabled(apiKey, filterGroup), value: getInputValue(apiKey), inputProps: { autoComplete: 'off', 'data-testid': 'ColumnFilterInputs_input' }, endAdornment: _jsx(Box, { component: "img", "data-testid": "ColumnFilterInputs_icon", "data-icon": isInputHasValue(apiKey) ? 'close' : 'search', src: isInputHasValue(apiKey) ? grayCloseIcon : searchIcon, alt: "search", className: "icon", sx: { cursor: isInputHasValue(apiKey) ? 'pointer' : 'default' }, onClick: () => {
48
44
  onClickResetInput(apiKey);
49
- } }) }, apiKey));
50
- }) })), _jsx(Collapse, Object.assign({ in: showClearButton, component: "section", "data-testid": "ColumnFilterInputs_Collapse" }, { children: _jsx(ClearWrapper, Object.assign({ "data-testid": "ColumnFilterInputs_ClearWrapper" }, { children: _jsx(ClearButton, Object.assign({ type: "button", onClick: onClickClear, "data-testid": "ColumnFilterInputs_ClearButton" }, { children: t('clear') })) })) })), _jsxs(Footer, Object.assign({ component: "footer", "data-testid": "ColumnFilterInputs_footer" }, { children: [_jsx(CancelButton, Object.assign({ type: "button", onClick: onClickCancel, "data-testid": "ColumnFilterInputs_CancelButton" }, { children: t('cancel') })), _jsx(OkayButton, Object.assign({ type: "button", onClick: onClickOkay, "data-testid": "ColumnFilterInputs_OkayButton" }, { children: t('okay') }))] }))] })));
45
+ } }) })) }, apiKey))) })), _jsx(Collapse, Object.assign({ in: showClearButton, component: "section", "data-testid": "ColumnFilterInputs_Collapse" }, { children: _jsx(ClearWrapper, Object.assign({ "data-testid": "ColumnFilterInputs_ClearWrapper" }, { children: _jsx(ClearButton, Object.assign({ type: "button", onClick: onClickClear, "data-testid": "ColumnFilterInputs_ClearButton" }, { children: t('clear') })) })) })), _jsxs(Footer, Object.assign({ component: "footer", "data-testid": "ColumnFilterInputs_footer" }, { children: [_jsx(CancelButton, Object.assign({ type: "button", onClick: onClickCancel, "data-testid": "ColumnFilterInputs_CancelButton" }, { children: t('cancel') })), _jsx(OkayButton, Object.assign({ type: "button", onClick: onClickOkay, "data-testid": "ColumnFilterInputs_OkayButton" }, { children: t('okay') }))] }))] })));
51
46
  }
52
47
  export default Inputs;
@@ -6,5 +6,5 @@ export declare const LastRowContent: React.MemoExoticComponent<({ isLoadingRow }
6
6
  export declare const StyledItemWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
7
7
  showShadowHighlight?: boolean | undefined;
8
8
  }, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
9
- declare function ListItemWrapper({ index, style, data: { renderedScrollTopRef, rows, rowProps, columns, isLoading, scrollToIndex, limit, totalCount, newLoadedRowsEndIndex, isError, areAllRowsLoaded, isSheetView, isPinned, ...restData }, }: Readonly<ListChildComponentProps>): import("react/jsx-runtime").JSX.Element;
9
+ declare function ListItemWrapper({ index, style, data: { renderedScrollTopRef, rows, rowProps, columns, isLoading, scrollToIndex, limit, totalCount, newLoadedRowsEndIndex, isError, areAllRowsLoaded, isSheetView, ...restData }, }: Readonly<ListChildComponentProps>): import("react/jsx-runtime").JSX.Element;
10
10
  export default ListItemWrapper;
@@ -14,7 +14,7 @@ import React from 'react';
14
14
  import { Box } from '@mui/material';
15
15
  import { styled } from '@mui/material/styles';
16
16
  import { useTranslation } from 'react-i18next';
17
- import { blueCircleLoaderIcon, tableBackgroundLoader, TABLE_ROW_HEIGHT } from '../../../../constants/index.js';
17
+ import { blueCircleLoaderIcon, tableBackgroundLoader, TABLE_ROW_HEIGHT, SHEET_VIEW_TABLE_ROW_HEIGHT } from '../../../../constants/index.js';
18
18
  import { ActionIcon } from '../../style';
19
19
  import { RowErrorState } from '../RowErrorState';
20
20
  import { StyledParagraph } from '../TableLastItem';
@@ -44,8 +44,7 @@ export const StyledItemWrapper = styled('div', {
44
44
  height: '100%',
45
45
  }));
46
46
  function ListItemWrapper(_a) {
47
- var _b;
48
- var { index, style } = _a, _c = _a.data, { renderedScrollTopRef, rows, rowProps, columns, isLoading, scrollToIndex, limit, totalCount, newLoadedRowsEndIndex, isError, areAllRowsLoaded, isSheetView, isPinned = false } = _c, restData = __rest(_c, ["renderedScrollTopRef", "rows", "rowProps", "columns", "isLoading", "scrollToIndex", "limit", "totalCount", "newLoadedRowsEndIndex", "isError", "areAllRowsLoaded", "isSheetView", "isPinned"]);
47
+ var { index, style } = _a, _b = _a.data, { renderedScrollTopRef, rows, rowProps, columns, isLoading, scrollToIndex, limit, totalCount, newLoadedRowsEndIndex, isError, areAllRowsLoaded, isSheetView } = _b, restData = __rest(_b, ["renderedScrollTopRef", "rows", "rowProps", "columns", "isLoading", "scrollToIndex", "limit", "totalCount", "newLoadedRowsEndIndex", "isError", "areAllRowsLoaded", "isSheetView"]);
49
48
  const lastItemIndex = rows.length - 1;
50
49
  const row = rows[index];
51
50
  const isLoadingRow = isLoading && index === lastItemIndex + 1;
@@ -55,12 +54,9 @@ function ListItemWrapper(_a) {
55
54
  const memoizedListItemComponent = React.useMemo(() => {
56
55
  const lastRowContent = _jsx(LastRowContent, { isLoadingRow: isLoadingRow });
57
56
  const isLastRow = isLoadingRow || (areAllRowsLoaded && index === lastItemIndex + 1);
58
- if (isPinned && isLastRow) {
59
- return _jsx(Box, { sx: { height: TABLE_ROW_HEIGHT, backgroundColor: '#F6F8FACC' } });
60
- }
61
57
  if (isLastRow) {
62
58
  return (_jsx(Box, Object.assign({ sx: {
63
- height: TABLE_ROW_HEIGHT,
59
+ height: isSheetView ? SHEET_VIEW_TABLE_ROW_HEIGHT : TABLE_ROW_HEIGHT,
64
60
  display: 'flex',
65
61
  justifyContent: 'center',
66
62
  alignItems: 'center',
@@ -75,6 +71,6 @@ function ListItemWrapper(_a) {
75
71
  }
76
72
  return _jsx(TableRow, { index: index, row: row, columns: columns, rowProps: memoizedRowProps, isSheetView: isSheetView }, `row-${index}`);
77
73
  }, [restData, index, row, columns, memoizedRowProps, isSheetView]);
78
- return (_jsx("div", Object.assign({ "data-testid": "ListItemWrapper", style: Object.assign(Object.assign({}, style), { top: Number(style.top) - ((_b = renderedScrollTopRef === null || renderedScrollTopRef === void 0 ? void 0 : renderedScrollTopRef.current) !== null && _b !== void 0 ? _b : 0), willChange: 'top' }) }, { children: _jsx(StyledItemWrapper, Object.assign({ "data-testid": "ListItemWrapper_StyledItemWrapper" }, { children: memoizedListItemComponent })) })));
74
+ return (_jsx("div", Object.assign({ "data-testid": "ListItemWrapper", style: Object.assign(Object.assign({}, style), { top: Number(style.top) - renderedScrollTopRef.current, willChange: 'top' }) }, { children: _jsx(StyledItemWrapper, Object.assign({ "data-testid": "ListItemWrapper_StyledItemWrapper" }, { children: memoizedListItemComponent })) })));
79
75
  }
80
76
  export default ListItemWrapper;
@@ -1,8 +1,9 @@
1
1
  import React from 'react';
2
2
  import { VariableSizeList, VariableSizeListProps } from 'react-window';
3
- declare const VirtualScrollList: React.ForwardRefExoticComponent<VariableSizeListProps<any> & {
3
+ type ExtendedVariableSizeListProps = VariableSizeListProps & {
4
4
  setBackdropVisibility: (isVisible: boolean) => void;
5
- scrollToIndex?: number | undefined;
6
- listRef?: React.RefObject<VariableSizeList<any>> | undefined;
7
- } & React.RefAttributes<VariableSizeList<any>>>;
5
+ scrollToIndex?: number;
6
+ listRef?: React.RefObject<VariableSizeList>;
7
+ };
8
+ declare function VirtualScrollList({ itemData, children, setBackdropVisibility, scrollToIndex, listRef: externalListRef, ...restProps }: ExtendedVariableSizeListProps): import("react/jsx-runtime").JSX.Element;
8
9
  export default VirtualScrollList;
@@ -16,7 +16,7 @@ import VirtualScrollInner from './VirtualScrollInner';
16
16
  import VirtualScrollOuter from './VirtualScrollOuter';
17
17
  import useScrollBackShadow from '../../hooks/useScrollBackShadow';
18
18
  import { VirtualScrollOuterProvider } from '../../context';
19
- const VirtualScrollList = React.forwardRef((_a, ref) => {
19
+ function VirtualScrollList(_a) {
20
20
  var { itemData, children, setBackdropVisibility, scrollToIndex, listRef: externalListRef } = _a, restProps = __rest(_a, ["itemData", "children", "setBackdropVisibility", "scrollToIndex", "listRef"]);
21
21
  const { handleBackDropVisibility, clearBackdropVisibility, clearTimer } = useScrollBackShadow({
22
22
  setBackdropVisibility,
@@ -25,7 +25,7 @@ const VirtualScrollList = React.forwardRef((_a, ref) => {
25
25
  const scrollTopRef = useRef(undefined);
26
26
  const scrollLocked = useRef(false);
27
27
  const internalListRef = useRef(null);
28
- const listRef = ref || externalListRef || internalListRef;
28
+ const listRef = externalListRef || internalListRef;
29
29
  const scrollTo = useCallback(() => {
30
30
  var _a, _b;
31
31
  clearTimer();
@@ -58,5 +58,5 @@ const VirtualScrollList = React.forwardRef((_a, ref) => {
58
58
  scrollLocked.current = scrollTo();
59
59
  }, [scrollTo]);
60
60
  return (_jsx(VirtualScrollOuterProvider, Object.assign({ value: handleScroll }, { children: _jsx(VariableSizeList, Object.assign({ ref: listRef, "data-testid": "VirtualScrollList", itemData: itemDataInternal, outerElementType: VirtualScrollOuter, innerElementType: VirtualScrollInner, onScroll: handleOnScroll }, restProps, { children: children })) })));
61
- });
61
+ }
62
62
  export default VirtualScrollList;
@@ -27,7 +27,7 @@ export declare const StyledVirtualList: import("@emotion/styled").StyledComponen
27
27
  setBackdropVisibility: (isVisible: boolean) => void;
28
28
  scrollToIndex?: number | undefined;
29
29
  listRef?: import("react").RefObject<import("react-window").VariableSizeList<any>> | undefined;
30
- } & import("react").RefAttributes<import("react-window").VariableSizeList<any>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & StyledVirtualListProps, {}, {}>;
30
+ } & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & StyledVirtualListProps, {}, {}>;
31
31
  export declare const StyledTableRow: import("@emotion/styled").StyledComponent<import("@mui/material").TableRowOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, "ref"> & {
32
32
  ref?: ((instance: HTMLTableRowElement | null) => void) | import("react").RefObject<HTMLTableRowElement> | null | undefined;
33
33
  }, "className" | "style" | "classes" | "children" | "sx" | "hover" | "selected"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
@@ -32,9 +32,6 @@ export const StyledCell = styled(TableCell, {
32
32
  shouldForwardProp: (prop) => !['isLast', 'isFirst', 'isSheetView'].includes(prop),
33
33
  })(({ theme, isLast, isFirst, isSheetView }) => (Object.assign({ paddingBlock: '0', paddingInline: '0.3875rem !important', paddingLeft: isFirst ? '0 !important' : '0.3875rem !important', paddingRight: isLast ? '0 !important' : '0.3875rem !important', color: theme.palette.grey[700], fontSize: theme.typography.caption.fontSize, height: '100%', fontWeight: theme.typography.fontWeightRegular, whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', display: 'flex', alignItems: 'center' }, (isSheetView && {
34
34
  borderRight: isLast ? 'none' : `1px solid ${theme.palette.divider}`,
35
- paddingInline: '0.375rem !important',
36
- paddingLeft: '0.375rem !important',
37
- paddingRight: '0.375rem !important',
38
35
  }))));
39
36
  export const StyledVirtualList = styled(VirtualScrollList, {
40
37
  shouldForwardProp: (prop) => !['areTotalRowsNotFillingHeight', 'isSheetView'].includes(prop),
@@ -12,7 +12,6 @@ export { default as Dialog, DialogToolbar } from './Dialog';
12
12
  export { default as Tooltip } from './Tooltip';
13
13
  export * from './RFH';
14
14
  export { default as VirtualTable, TableRowLoading, TableHeader, TableLastItem, TableLoading, TableLoadingWithCard, TableNoData, TableNoDataWithCard, LastRowContent, ListItemWrapperWithCard, RowErrorState, StyledItemWrapper, TableRow, TableRowLoadingWithCard, TableRowWithCard, VirtualScrollInner, VirtualScrollList, VirtualScrollOuter, VirtualTableWithCard, Inputs, List, ColumnFilter, StyledCell, } from './VirtualTable';
15
- export { default as SheetViewVirtualTable } from './VirtualTable/SheetViewVirtualTable';
16
15
  export { default as Widget, ListItem, WidgetHeader, WidgetList } from './Widget';
17
16
  export { default as TapLogo } from './TapLogo';
18
17
  export { default as StatusButton, ChevronIcon, type ChevronIconProps, type StatusButtonIcon, type StatusButtonProps } from './StatusButton';
@@ -12,7 +12,6 @@ export { default as Dialog, DialogToolbar } from './Dialog';
12
12
  export { default as Tooltip } from './Tooltip';
13
13
  export * from './RFH';
14
14
  export { default as VirtualTable, TableRowLoading, TableHeader, TableLastItem, TableLoading, TableLoadingWithCard, TableNoData, TableNoDataWithCard, LastRowContent, ListItemWrapperWithCard, RowErrorState, StyledItemWrapper, TableRow, TableRowLoadingWithCard, TableRowWithCard, VirtualScrollInner, VirtualScrollList, VirtualScrollOuter, VirtualTableWithCard, Inputs, List, ColumnFilter, StyledCell, } from './VirtualTable';
15
- export { default as SheetViewVirtualTable } from './VirtualTable/SheetViewVirtualTable';
16
15
  export { default as Widget, ListItem, WidgetHeader, WidgetList } from './Widget';
17
16
  export { default as TapLogo } from './TapLogo';
18
17
  export { default as StatusButton, ChevronIcon } from './StatusButton';
@@ -186,7 +186,6 @@ export declare const dueDateBlackIcon: string;
186
186
  export declare const dueDateGrayIcon: string;
187
187
  export declare const timerBlueIcon: string;
188
188
  export declare const expiredIcon: string;
189
- export declare const remindedIcon: string;
190
189
  export declare const remindedRedIcon: string;
191
190
  export declare const chevronWhiteIcon: string;
192
191
  export declare const chevronGrayIcon: string;
@@ -327,8 +326,6 @@ export declare const authenticationBiometricIcon: string;
327
326
  export declare const authenticationDeviceIcon: string;
328
327
  export declare const authenticationIssuerIcon: string;
329
328
  export declare const authenticationSchemeIcon: string;
330
- export declare const pinIcon: string;
331
- export declare const unpinIcon: string;
332
329
  export declare const switcherIcon: string;
333
330
  export declare const tokenSavedStatusIcon: string;
334
331
  export declare const tokenTransactedStatusIcon: string;
@@ -484,3 +481,4 @@ export declare const bankNoteIcon: string;
484
481
  export declare const terminalDeviceFrame: string;
485
482
  export declare const blackBrushIcon: string;
486
483
  export declare const mutedOutlinedCheckIcon: string;
484
+ export declare const outlinedPlatformIcon: string;