@tap-payments/connect-v2 0.0.4-test → 0.0.5-test

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/build/App.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import * as React from 'react';
3
- import { ConnectMode, ConnectScope, DialogTransition, ThemeMode } from '@types';
3
+ import { ConnectMode, ConnectScope, DialogTransition, ThemeMode } from './types';
4
4
  import { ConnectElement } from './connect';
5
5
  function App() {
6
6
  const [open, setOpen] = React.useState(true);
@@ -1,4 +1,4 @@
1
1
  import * as React from 'react';
2
- import { ConnectProps } from '@types';
2
+ import { ConnectProps } from '../types';
3
3
  declare const _default: React.MemoExoticComponent<(props: ConnectProps) => import("react/jsx-runtime").JSX.Element>;
4
4
  export default _default;
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import * as React from 'react';
3
3
  import ConnectIFrame from './ConnectIFrame';
4
- import ConnectContextProvider from '@context';
5
- import { useEventListener, useConfig } from '@hooks';
4
+ import ConnectContextProvider from '../context';
5
+ import { useEventListener, useConfig } from '../hooks';
6
6
  const Connect = () => {
7
7
  const { connectLink } = useConfig();
8
8
  useEventListener();
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- import Loader from '@src/components/loader';
3
- import { useConnectContext } from '@context';
4
- import { CONNECT_IFRAME_ID } from '@constants';
2
+ import Loader from '../components/loader';
3
+ import { useConnectContext } from '../context';
4
+ import { CONNECT_IFRAME_ID } from '../constants';
5
5
  const ConnectIFrame = ({ src }) => {
6
6
  const { loading } = useConnectContext();
7
7
  return (_jsxs(_Fragment, { children: [loading && _jsx(Loader, { toggleAnimation: true }), src && (_jsx("iframe", { id: CONNECT_IFRAME_ID, title: "connect", src: src, style: {
@@ -1,4 +1,4 @@
1
- import { ConnectProps } from '@types';
1
+ import { ConnectProps } from '../types';
2
2
  declare const renderConnectElement: (elementId: string, config: ConnectProps) => {
3
3
  unmount: () => void;
4
4
  };
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { createRoot } from 'react-dom/client';
3
3
  import ConnectElement from './Connect';
4
- import { findOrCreateElementAndInject } from '@utils';
4
+ import { findOrCreateElementAndInject } from '../utils';
5
5
  const renderConnectElement = (elementId, config) => {
6
6
  const element = findOrCreateElementAndInject(elementId);
7
7
  const root = createRoot(element);
@@ -1,5 +1,5 @@
1
1
  import React, { ReactNode } from 'react';
2
- import { ConnectProps } from '@types';
2
+ import { ConnectProps } from '../types';
3
3
  type ConnectContextProps = ConnectProps & {
4
4
  onLoaded: () => void;
5
5
  loading: boolean;
@@ -1,8 +1,8 @@
1
1
  import * as React from 'react';
2
2
  import { WebErrorHandler } from '@tap-payments/web-error-handing';
3
- import { ConnectMode, SearchParams } from '@types';
4
- import { useConnectContext } from '@context';
5
- import { CONNECT_CONFIG_URL, CONNECT_ORIGIN } from '@constants';
3
+ import { ConnectMode, SearchParams } from '../types';
4
+ import { useConnectContext } from '../context';
5
+ import { CONNECT_CONFIG_URL, CONNECT_ORIGIN } from '../constants';
6
6
  const useConfig = () => {
7
7
  const [connectLink, setConnectLink] = React.useState('');
8
8
  const { onError, onLoadingHandler, ...config } = useConnectContext();
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
- import { ConnectEvents } from '@types';
3
- import { CONNECT_ORIGIN } from '@constants';
4
- import { useConnectContext } from '@context';
2
+ import { ConnectEvents } from '../types';
3
+ import { CONNECT_ORIGIN } from '../constants';
4
+ import { useConnectContext } from '../context';
5
5
  const useEventListener = () => {
6
6
  const { onSuccess, onClose, onError, onReady, onLoaded } = useConnectContext();
7
7
  const handleEvent = React.useCallback(async (message) => {
@@ -1,4 +1,4 @@
1
- import { ConnectEvents } from '@types';
1
+ import { ConnectEvents } from '../types';
2
2
  declare const usePostEvents: () => {
3
3
  send: <T>(event: ConnectEvents, data: T) => void;
4
4
  };
@@ -1,4 +1,4 @@
1
- import { CONNECT_IFRAME_ID } from '@constants';
1
+ import { CONNECT_IFRAME_ID } from '../constants';
2
2
  const usePostEvents = () => {
3
3
  const send = (event, data) => {
4
4
  const iframeEl = document.getElementById(CONNECT_IFRAME_ID);
package/build/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ConnectProps, ConnectMode, ThemeMode, LanguageMode, AppInfo, ConnectScope, PaymentProvider, DialogTransition, DialogEdgeFormat, SDKNotification, PASSWORD_OPERATION_TYPE } from '@types';
1
+ import { ConnectProps, ConnectMode, ThemeMode, LanguageMode, AppInfo, ConnectScope, PaymentProvider, DialogTransition, DialogEdgeFormat, SDKNotification, PASSWORD_OPERATION_TYPE } from './types';
2
2
  import { ConnectElement, renderConnectElement } from './connect';
3
3
  export type { ConnectProps, ConnectMode, ThemeMode, LanguageMode, AppInfo, ConnectScope, PaymentProvider, DialogTransition, DialogEdgeFormat, SDKNotification, PASSWORD_OPERATION_TYPE, };
4
4
  export { ConnectElement, renderConnectElement };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tap-payments/connect-v2",
3
3
  "private": false,
4
- "version": "0.0.4-test",
4
+ "version": "0.0.5-test",
5
5
  "type": "module",
6
6
  "main": "build/index.js",
7
7
  "module": "build/index.js",
@@ -13,7 +13,7 @@
13
13
  "clean": "rm -rf build*",
14
14
  "dev": "vite",
15
15
  "tsc:alias": "tsc-alias -p tsconfig.app.json",
16
- "build": "yarn clean && tsc -b && vite build",
16
+ "build": "yarn clean && tsc -b && yarn tsc:alias && vite build",
17
17
  "lint": "eslint .",
18
18
  "lint:fix": "eslint . --fix",
19
19
  "preview": "vite preview",