@tap-payments/os-micro-frontend-shared 0.0.246-test.2 → 0.0.246-test.2-test.3-test.4
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/SourceChips/AuthenticationChip/AuthenticationChip.d.ts +7 -0
- package/build/components/SourceChips/AuthenticationChip/AuthenticationChip.js +29 -0
- package/build/components/SourceChips/AuthenticationChip/constants.d.ts +28 -0
- package/build/components/SourceChips/AuthenticationChip/constants.js +23 -0
- package/build/components/SourceChips/AuthenticationChip/index.d.ts +3 -0
- package/build/components/SourceChips/AuthenticationChip/index.js +2 -0
- package/build/components/SourceChips/GeographyChip/GeographyChip.d.ts +7 -0
- package/build/components/SourceChips/GeographyChip/GeographyChip.js +22 -0
- package/build/components/SourceChips/GeographyChip/constants.d.ts +16 -0
- package/build/components/SourceChips/GeographyChip/constants.js +11 -0
- package/build/components/SourceChips/GeographyChip/index.d.ts +2 -0
- package/build/components/SourceChips/GeographyChip/index.js +2 -0
- package/build/components/SourceChips/PaymentAgreementChip/PaymentAgreementChip.d.ts +7 -0
- package/build/components/SourceChips/PaymentAgreementChip/PaymentAgreementChip.js +21 -0
- package/build/components/SourceChips/PaymentAgreementChip/constants.d.ts +17 -0
- package/build/components/SourceChips/PaymentAgreementChip/constants.js +14 -0
- package/build/components/SourceChips/PaymentAgreementChip/index.d.ts +3 -0
- package/build/components/SourceChips/PaymentAgreementChip/index.js +2 -0
- package/build/components/SourceChips/index.d.ts +3 -0
- package/build/components/SourceChips/index.js +3 -0
- package/build/components/StatusChip/StatusChip.d.ts +1 -2
- package/build/components/StatusChip/StatusChip.js +10 -5
- package/build/components/StatusChip/constants.d.ts +5 -0
- package/build/components/StatusChip/constants.js +5 -0
- package/build/components/StatusChip/style.d.ts +1 -0
- package/build/components/StatusChip/type.d.ts +1 -0
- package/build/components/StatusGroupChips/style.d.ts +12 -1
- package/build/components/StatusIcons/GeographyIcon/GeographyIcon.d.ts +1 -1
- package/build/components/StatusIcons/index.d.ts +0 -1
- package/build/components/StatusIcons/index.js +0 -1
- package/build/components/Toolbar/style.d.ts +4 -4
- package/build/components/ToolbarIcon/MaximizeIcon/MaximizeIcon.d.ts +1 -1
- package/build/components/index.d.ts +1 -0
- package/build/components/index.js +1 -0
- package/build/types/user.d.ts +1 -0
- package/package.json +2 -2
- package/build/components/AppWindowWrapper/headers/AppWindowHeader/AppWindowHeader.d.ts +0 -5
- package/build/components/AppWindowWrapper/headers/AppWindowHeader/AppWindowHeader.js +0 -23
- package/build/components/AppWindowWrapper/headers/AppWindowHeader/AppWindowHeaderBase.d.ts +0 -5
- package/build/components/AppWindowWrapper/headers/AppWindowHeader/AppWindowHeaderBase.js +0 -20
- package/build/components/AppWindowWrapper/headers/AppWindowHeader/index.d.ts +0 -3
- package/build/components/AppWindowWrapper/headers/AppWindowHeader/index.js +0 -3
- package/build/components/AppWindowWrapper/headers/AppWindowHeader/type.d.ts +0 -32
- package/build/components/AppWindowWrapper/headers/AppWindowHeader/type.js +0 -1
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
|
+
```
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { StatusChipProps } from '../../StatusChip';
|
|
2
|
+
export type AuthenticationChipType = 'issuer' | 'scheme' | 'device' | 'app' | 'wallet' | 'biometric';
|
|
3
|
+
interface AuthenticationChipProps extends Omit<StatusChipProps, 'children'> {
|
|
4
|
+
authenticationType?: AuthenticationChipType;
|
|
5
|
+
}
|
|
6
|
+
declare const AuthenticationChip: ({ authenticationType, unknownText, ...props }: AuthenticationChipProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default AuthenticationChip;
|
|
@@ -0,0 +1,29 @@
|
|
|
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 StatusChip from '../../StatusChip';
|
|
14
|
+
import { authenticationColors } from './constants';
|
|
15
|
+
const authenticationTypeMap = {
|
|
16
|
+
issuer: 'Issuer',
|
|
17
|
+
scheme: 'Scheme',
|
|
18
|
+
device: 'Device',
|
|
19
|
+
app: 'App',
|
|
20
|
+
wallet: 'Wallet',
|
|
21
|
+
biometric: 'Biometric',
|
|
22
|
+
};
|
|
23
|
+
const AuthenticationChip = (_a) => {
|
|
24
|
+
var { authenticationType, unknownText = 'noAuth' } = _a, props = __rest(_a, ["authenticationType", "unknownText"]);
|
|
25
|
+
const statusText = authenticationType && authenticationTypeMap[authenticationType];
|
|
26
|
+
const chipColors = authenticationType && authenticationColors[authenticationType];
|
|
27
|
+
return (_jsx(StatusChip, Object.assign({}, chipColors, { unknownText: unknownText }, props, { children: statusText })));
|
|
28
|
+
};
|
|
29
|
+
export default AuthenticationChip;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface AuthenticationColors {
|
|
2
|
+
bgColor: string;
|
|
3
|
+
borderColor?: string;
|
|
4
|
+
textColor?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const authenticationColors: {
|
|
7
|
+
issuer: {
|
|
8
|
+
bgColor: string;
|
|
9
|
+
textColor: string;
|
|
10
|
+
};
|
|
11
|
+
scheme: {
|
|
12
|
+
bgColor: string;
|
|
13
|
+
textColor: string;
|
|
14
|
+
};
|
|
15
|
+
app: {
|
|
16
|
+
bgColor: string;
|
|
17
|
+
textColor: string;
|
|
18
|
+
};
|
|
19
|
+
wallet: {
|
|
20
|
+
bgColor: string;
|
|
21
|
+
textColor: string;
|
|
22
|
+
};
|
|
23
|
+
device: {};
|
|
24
|
+
biometric: {
|
|
25
|
+
bgColor: string;
|
|
26
|
+
textColor: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export const authenticationColors = {
|
|
2
|
+
issuer: {
|
|
3
|
+
bgColor: '#1F88D033',
|
|
4
|
+
textColor: '#1F88D0',
|
|
5
|
+
},
|
|
6
|
+
scheme: {
|
|
7
|
+
bgColor: '#5E30EB33',
|
|
8
|
+
textColor: '#5E30EB',
|
|
9
|
+
},
|
|
10
|
+
app: {
|
|
11
|
+
bgColor: '#AF2D6F33',
|
|
12
|
+
textColor: '#AF2D6F',
|
|
13
|
+
},
|
|
14
|
+
wallet: {
|
|
15
|
+
bgColor: '#18AA3333',
|
|
16
|
+
textColor: '#18AA33',
|
|
17
|
+
},
|
|
18
|
+
device: {},
|
|
19
|
+
biometric: {
|
|
20
|
+
bgColor: '#F0820033',
|
|
21
|
+
textColor: '#F08200',
|
|
22
|
+
},
|
|
23
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { StatusChipProps } from '../../StatusChip';
|
|
2
|
+
import { GeographyVariant } from '../../../types/index.js';
|
|
3
|
+
interface GeographyChipProps extends Omit<StatusChipProps, 'children'> {
|
|
4
|
+
geographyVariant?: GeographyVariant;
|
|
5
|
+
}
|
|
6
|
+
declare const GeographyChip: ({ geographyVariant, ...props }: GeographyChipProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default GeographyChip;
|
|
@@ -0,0 +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
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import StatusChip from '../../StatusChip';
|
|
14
|
+
import { geographyMap } from '../../../utils/index.js';
|
|
15
|
+
import { geographyColors } from './constants';
|
|
16
|
+
const GeographyChip = (_a) => {
|
|
17
|
+
var { geographyVariant } = _a, props = __rest(_a, ["geographyVariant"]);
|
|
18
|
+
const statusText = geographyVariant && geographyMap[geographyVariant];
|
|
19
|
+
const chipColors = geographyVariant && geographyColors[geographyVariant];
|
|
20
|
+
return (_jsx(StatusChip, Object.assign({}, chipColors, props, { children: statusText })));
|
|
21
|
+
};
|
|
22
|
+
export default GeographyChip;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { StatusChipProps } from '../../StatusChip';
|
|
2
|
+
export type PaymentAgreementType = 'ORDER' | 'SAVED_CARD';
|
|
3
|
+
interface PaymentAgreementChipProps extends Omit<StatusChipProps, 'children'> {
|
|
4
|
+
agreementType?: PaymentAgreementType;
|
|
5
|
+
}
|
|
6
|
+
declare const PaymentAgreementChip: ({ agreementType, unknownText, ...props }: PaymentAgreementChipProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default PaymentAgreementChip;
|
|
@@ -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 StatusChip from '../../StatusChip';
|
|
14
|
+
import { agreementTypeMap, paymentAgreementColors } from './constants';
|
|
15
|
+
const PaymentAgreementChip = (_a) => {
|
|
16
|
+
var { agreementType, unknownText = 'noAgreement' } = _a, props = __rest(_a, ["agreementType", "unknownText"]);
|
|
17
|
+
const statusText = agreementType && agreementTypeMap[agreementType];
|
|
18
|
+
const chipColors = agreementType && paymentAgreementColors[agreementType];
|
|
19
|
+
return (_jsx(StatusChip, Object.assign({}, chipColors, { unknownText: unknownText }, props, { children: statusText })));
|
|
20
|
+
};
|
|
21
|
+
export default PaymentAgreementChip;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { PaymentAgreementType } from './PaymentAgreementChip';
|
|
2
|
+
export interface PaymentAgreementColors {
|
|
3
|
+
bgColor: string;
|
|
4
|
+
borderColor?: string;
|
|
5
|
+
textColor?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const paymentAgreementColors: {
|
|
8
|
+
ORDER: {
|
|
9
|
+
bgColor: string;
|
|
10
|
+
textColor: string;
|
|
11
|
+
};
|
|
12
|
+
SAVED_CARD: {
|
|
13
|
+
bgColor: string;
|
|
14
|
+
textColor: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export declare const agreementTypeMap: Record<PaymentAgreementType, string>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export const paymentAgreementColors = {
|
|
2
|
+
ORDER: {
|
|
3
|
+
bgColor: '#5E30EB33',
|
|
4
|
+
textColor: '#5E30EB',
|
|
5
|
+
},
|
|
6
|
+
SAVED_CARD: {
|
|
7
|
+
bgColor: '#76BB4033',
|
|
8
|
+
textColor: '#76BB40',
|
|
9
|
+
},
|
|
10
|
+
};
|
|
11
|
+
export const agreementTypeMap = {
|
|
12
|
+
ORDER: 'Order',
|
|
13
|
+
SAVED_CARD: 'Saved card',
|
|
14
|
+
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ChipProps } from './type';
|
|
3
|
-
declare const StatusChip:
|
|
2
|
+
declare const StatusChip: ({ children, unknownText, ...props }: ChipProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
3
|
export default StatusChip;
|
|
@@ -10,10 +10,15 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
import {
|
|
13
|
+
import { useTranslation } from 'react-i18next';
|
|
14
|
+
import { unknownGeographyColors } from './constants';
|
|
14
15
|
import { ChipStyled } from './style';
|
|
15
|
-
const StatusChip =
|
|
16
|
-
var { children } = _a, props = __rest(_a, ["children"]);
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
const StatusChip = (_a) => {
|
|
17
|
+
var { children, unknownText } = _a, props = __rest(_a, ["children", "unknownText"]);
|
|
18
|
+
const { t } = useTranslation();
|
|
19
|
+
if (!children) {
|
|
20
|
+
return (_jsx(ChipStyled, Object.assign({}, unknownGeographyColors, props, { children: unknownText ? t(unknownText) : t('unknown') })));
|
|
21
|
+
}
|
|
22
|
+
return _jsx(ChipStyled, Object.assign({}, props, { children: children }));
|
|
23
|
+
};
|
|
19
24
|
export default StatusChip;
|
|
@@ -7,6 +7,7 @@ export declare const ChipStyled: import("@emotion/styled").StyledComponent<impor
|
|
|
7
7
|
borderColor?: string | undefined;
|
|
8
8
|
disabled?: boolean | undefined;
|
|
9
9
|
padding?: string | undefined;
|
|
10
|
+
unknownText?: string | undefined;
|
|
10
11
|
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
11
12
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
12
13
|
}, keyof import("@mui/material/OverridableComponent").CommonProps | keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & {
|
|
@@ -2,4 +2,15 @@
|
|
|
2
2
|
export declare const StyledContainer: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
3
3
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
4
4
|
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
5
|
-
export declare const StyledStatusChip: import("@emotion/styled").StyledComponent<
|
|
5
|
+
export declare const StyledStatusChip: import("@emotion/styled").StyledComponent<{
|
|
6
|
+
textColor?: string | undefined;
|
|
7
|
+
bgColor?: string | undefined;
|
|
8
|
+
borderColor?: string | undefined;
|
|
9
|
+
disabled?: boolean | undefined;
|
|
10
|
+
padding?: string | undefined;
|
|
11
|
+
unknownText?: string | undefined;
|
|
12
|
+
} & import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
13
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
14
|
+
}, keyof import("@mui/material/OverridableComponent").CommonProps | keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & {
|
|
15
|
+
children?: import("react").ReactNode;
|
|
16
|
+
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const GeographyIcon: ({ geographyVariant, countryCode, isTextShown, }: {
|
|
2
|
-
geographyVariant?: "
|
|
2
|
+
geographyVariant?: "G" | "L" | "R" | undefined;
|
|
3
3
|
countryCode?: string | undefined;
|
|
4
4
|
isTextShown?: boolean | undefined;
|
|
5
5
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export { default as AgreementIcon, type AgreementIconProps } from './AgreementIcon';
|
|
2
2
|
export { default as AuthIcons, type AuthIconsProps, AuthSourceAnimation } from './AuthIcons';
|
|
3
|
-
export { default as AuthorizationAutoIcons, VoidAutoIcon } from './AuthorizationAutoIcons';
|
|
4
3
|
export { AuthorizedIcon } from './AuthorizedIcon';
|
|
5
4
|
export { ChargeStatusIcon } from './ChargeStatusIcon';
|
|
6
5
|
export { CustomerInitiatedIcon } from './CustomerInitiated';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export { default as AgreementIcon } from './AgreementIcon';
|
|
2
2
|
export { default as AuthIcons, AuthSourceAnimation } from './AuthIcons';
|
|
3
|
-
export { default as AuthorizationAutoIcons, VoidAutoIcon } from './AuthorizationAutoIcons';
|
|
4
3
|
export { AuthorizedIcon } from './AuthorizedIcon';
|
|
5
4
|
export { ChargeStatusIcon } from './ChargeStatusIcon';
|
|
6
5
|
export { CustomerInitiatedIcon } from './CustomerInitiated';
|
|
@@ -9,8 +9,8 @@ export declare const StyledBox: import("@emotion/styled").StyledComponent<import
|
|
|
9
9
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
10
10
|
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
11
11
|
export declare const StyledHeaderWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
12
|
-
sandboxMode
|
|
13
|
-
maximized
|
|
12
|
+
sandboxMode: boolean;
|
|
13
|
+
maximized: boolean;
|
|
14
14
|
isDragging?: boolean | undefined;
|
|
15
15
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
16
16
|
export declare const ToolbarStyled: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
@@ -20,7 +20,7 @@ export declare const ToolbarStyled: import("@emotion/styled").StyledComponent<im
|
|
|
20
20
|
isHovered?: boolean | undefined;
|
|
21
21
|
}, {}, {}>;
|
|
22
22
|
export declare const StyledHeaderWrapperStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
23
|
-
sandboxMode
|
|
24
|
-
maximized
|
|
23
|
+
sandboxMode: boolean;
|
|
24
|
+
maximized: boolean;
|
|
25
25
|
isDragging?: boolean | undefined;
|
|
26
26
|
} & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, {}, {}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BoxProps } from '@mui/material/Box';
|
|
2
2
|
interface MaximizeIconProps extends BoxProps {
|
|
3
|
-
isMaximized
|
|
3
|
+
isMaximized: boolean;
|
|
4
4
|
}
|
|
5
5
|
export declare function MaximizeIcon({ isMaximized, ...props }: MaximizeIconProps): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export {};
|
package/build/types/user.d.ts
CHANGED
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.0.246-test.2",
|
|
5
|
-
"testVersion":
|
|
4
|
+
"version": "0.0.246-test.2-test.3-test.4",
|
|
5
|
+
"testVersion": 4,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "build/index.js",
|
|
8
8
|
"module": "build/index.js",
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { AppWindowHeaderProps } from './type';
|
|
3
|
-
declare function AppWindowHeader({ isMaximized, id, isToolbarAnimationDisabled, title, leftActions, onClose, onMaximize }: AppWindowHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
declare const _default: import("react").MemoExoticComponent<typeof AppWindowHeader>;
|
|
5
|
-
export default _default;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { memo } from 'react';
|
|
3
|
-
import { motion } from 'framer-motion';
|
|
4
|
-
import { useMouseState } from '../../../../hooks/index.js';
|
|
5
|
-
import { animationDuration } from '../../AppWindow/constant';
|
|
6
|
-
import AppWindowHeaderBase from './AppWindowHeaderBase';
|
|
7
|
-
import { CloseIcon, MaximizeIcon } from '../../../ToolbarIcon';
|
|
8
|
-
function AppWindowHeader({ isMaximized, id, isToolbarAnimationDisabled, title, leftActions, onClose, onMaximize }) {
|
|
9
|
-
const { isHovered, onMouseEnter, onMouseLeave } = useMouseState();
|
|
10
|
-
return (_jsx(motion.div, Object.assign({ style: Object.assign({}, (isMaximized && {
|
|
11
|
-
height: 0,
|
|
12
|
-
zIndex: 1000,
|
|
13
|
-
position: 'relative',
|
|
14
|
-
})), animate: Object.assign(Object.assign({}, (isMaximized && {
|
|
15
|
-
width: '100vw',
|
|
16
|
-
})), (!isMaximized && {
|
|
17
|
-
transform: 'translateX(0px)',
|
|
18
|
-
width: '100%',
|
|
19
|
-
})), transition: Object.assign({ duration: animationDuration }, (isToolbarAnimationDisabled && {
|
|
20
|
-
duration: 0,
|
|
21
|
-
})) }, { children: _jsx(AppWindowHeaderBase, { title: title, maximized: isMaximized, id: id || 'draggable-dialog-title', isHovered: isHovered, onMouseHover: onMouseEnter, onMouseLeave: onMouseLeave, leftActions: leftActions || (_jsxs(_Fragment, { children: [_jsx(CloseIcon, { onClick: onClose }), _jsx(MaximizeIcon, { isMaximized: isMaximized, onClick: () => onMaximize === null || onMaximize === void 0 ? void 0 : onMaximize(!isMaximized) })] })) }) })));
|
|
22
|
-
}
|
|
23
|
-
export default memo(AppWindowHeader);
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { AppWindowHeaderBaseProps } from './type';
|
|
3
|
-
declare function AppWindowHeaderBase({ title, maximized, id, isHovered, onMouseHover, onMouseLeave, leftActions, sandboxMode, titleIconSrc, ...rootProps }: AppWindowHeaderBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
declare const _default: import("react").MemoExoticComponent<typeof AppWindowHeaderBase>;
|
|
5
|
-
export default _default;
|
|
@@ -1,20 +0,0 @@
|
|
|
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 Toolbar from '../../../Toolbar';
|
|
15
|
-
import { StyledHeaderWrapperStyled } from '../../../Toolbar/style';
|
|
16
|
-
function AppWindowHeaderBase(_a) {
|
|
17
|
-
var { title, maximized = false, id, isHovered = false, onMouseHover, onMouseLeave, leftActions, sandboxMode = false, titleIconSrc } = _a, rootProps = __rest(_a, ["title", "maximized", "id", "isHovered", "onMouseHover", "onMouseLeave", "leftActions", "sandboxMode", "titleIconSrc"]);
|
|
18
|
-
return (_jsx(StyledHeaderWrapperStyled, Object.assign({ id: id, "data-testid": "UserTitleBar", maximized: maximized || false, sandboxMode: sandboxMode }, rootProps, { children: _jsx(Toolbar, { onMouseEnter: onMouseHover, onMouseLeave: onMouseLeave, isMaximized: maximized, isHovered: isHovered, title: title || '', icon: titleIconSrc, leftActions: leftActions }) })));
|
|
19
|
-
}
|
|
20
|
-
export default memo(AppWindowHeaderBase);
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { StyledHeaderWrapperStyled, ToolbarProps } from '../../../Toolbar';
|
|
2
|
-
import { Dispatch, ReactNode, SetStateAction, SyntheticEvent } from 'react';
|
|
3
|
-
export interface AccountHeaderProps {
|
|
4
|
-
isSidebarExpanded: boolean;
|
|
5
|
-
setIsSidebarExpanded: (value: boolean) => void;
|
|
6
|
-
isToolbarAnimationDisabled?: boolean;
|
|
7
|
-
setIsToolbarAnimationDisabled?: (value: boolean) => void;
|
|
8
|
-
isMaximized?: boolean;
|
|
9
|
-
setIsMaximized?: Dispatch<SetStateAction<boolean>>;
|
|
10
|
-
onClose?: () => void;
|
|
11
|
-
title?: string;
|
|
12
|
-
showSectionsButton?: boolean;
|
|
13
|
-
}
|
|
14
|
-
export type AppWindowHeaderBaseProps = React.ComponentProps<typeof StyledHeaderWrapperStyled> & {
|
|
15
|
-
title?: string;
|
|
16
|
-
maximized?: boolean;
|
|
17
|
-
id?: string;
|
|
18
|
-
isHovered?: boolean;
|
|
19
|
-
onMouseHover?: (e: SyntheticEvent) => void;
|
|
20
|
-
onMouseLeave?: (e: SyntheticEvent) => void;
|
|
21
|
-
leftActions?: ToolbarProps['leftActions'];
|
|
22
|
-
titleIconSrc?: ToolbarProps['icon'];
|
|
23
|
-
};
|
|
24
|
-
export type AppWindowHeaderProps = {
|
|
25
|
-
id?: string;
|
|
26
|
-
isToolbarAnimationDisabled?: boolean;
|
|
27
|
-
isMaximized?: boolean;
|
|
28
|
-
title?: string;
|
|
29
|
-
leftActions?: ReactNode;
|
|
30
|
-
onClose?: () => void;
|
|
31
|
-
onMaximize?: (isMaximized: boolean) => void;
|
|
32
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|