@tap-payments/os-micro-frontend-shared 0.1.31-test.10 → 0.1.31-test.11
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.
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { StatusChipProps } from '../StatusChip';
|
|
3
3
|
import { ChipSelection } from '../../types/index.js';
|
|
4
|
-
export interface StatusChipWithCopyProps extends
|
|
4
|
+
export interface StatusChipWithCopyProps extends StatusChipProps {
|
|
5
5
|
copyText?: string;
|
|
6
6
|
chipIndex: number;
|
|
7
7
|
chipSelection: ChipSelection;
|
|
8
8
|
}
|
|
9
|
-
declare function StatusChipWithCopy({ children, copyText, chipIndex, chipSelection: { onChipClick, rowIndex, colIndex, selectedChip }, }: StatusChipWithCopyProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function StatusChipWithCopy({ children, copyText, chipIndex, chipSelection: { onChipClick, rowIndex, colIndex, selectedChip }, ...reset }: StatusChipWithCopyProps): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
declare const _default: import("react").MemoExoticComponent<typeof StatusChipWithCopy>;
|
|
11
11
|
export default _default;
|
|
@@ -1,11 +1,22 @@
|
|
|
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
|
+
};
|
|
1
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
13
|
import { memo, useMemo } from 'react';
|
|
3
14
|
import StatusChip from '../StatusChip';
|
|
4
15
|
import { checkIsChipSelected } from './utils';
|
|
5
|
-
function StatusChipWithCopy(
|
|
16
|
+
function StatusChipWithCopy(_a) {
|
|
17
|
+
var { children, copyText, chipIndex, chipSelection: { onChipClick, rowIndex, colIndex, selectedChip } } = _a, reset = __rest(_a, ["children", "copyText", "chipIndex", "chipSelection"]);
|
|
6
18
|
const isSelected = useMemo(() => checkIsChipSelected({ rowIndex, colIndex, selectedChip, chipIndex }), [rowIndex, colIndex, selectedChip, chipIndex]);
|
|
7
|
-
return (_jsx(StatusChip, Object.assign({ copyText: copyText, onClick: (e) => {
|
|
8
|
-
console.log('click', onChipClick);
|
|
19
|
+
return (_jsx(StatusChip, Object.assign({}, reset, { copyText: copyText, onClick: (e) => {
|
|
9
20
|
onChipClick === null || onChipClick === void 0 ? void 0 : onChipClick(e, chipIndex);
|
|
10
21
|
}, isSelected: isSelected }, { children: children })));
|
|
11
22
|
}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tap-payments/os-micro-frontend-shared",
|
|
3
3
|
"description": "Shared components and utilities for Tap Payments micro frontends",
|
|
4
|
-
"version": "0.1.31-test.
|
|
5
|
-
"testVersion":
|
|
4
|
+
"version": "0.1.31-test.11",
|
|
5
|
+
"testVersion": 11,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "build/index.js",
|
|
8
8
|
"module": "build/index.js",
|