@tap-payments/auth-jsconnect 2.10.9-development → 2.10.9

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 (179) hide show
  1. package/README.md +2 -2
  2. package/build/@types/app.d.ts +2 -2
  3. package/build/@types/app.js +0 -1
  4. package/build/@types/form.d.ts +4 -2
  5. package/build/@types/index.d.ts +0 -1
  6. package/build/@types/index.js +0 -1
  7. package/build/api/auth.d.ts +1 -9
  8. package/build/api/axios.d.ts +1 -1
  9. package/build/api/entity.d.ts +3 -0
  10. package/build/api/index.d.ts +1 -7
  11. package/build/api/index.js +1 -3
  12. package/build/api/lead.d.ts +1 -0
  13. package/build/app/rootReducer.d.ts +0 -1
  14. package/build/app/rootReducer.js +1 -3
  15. package/build/app/settings.js +1 -2
  16. package/build/app/store.d.ts +0 -2
  17. package/build/assets/currencies/AEDSymbol.js +1 -1
  18. package/build/assets/currencies/SARSymbol.js +1 -1
  19. package/build/assets/locales/ar.json +13 -5
  20. package/build/assets/locales/en.json +14 -5
  21. package/build/components/OTPTimer/OTPTimer.d.ts +1 -2
  22. package/build/components/OTPTimer/OTPTimer.js +4 -4
  23. package/build/components/Tooltip/Tooltip.js +1 -1
  24. package/build/constants/api.d.ts +2 -0
  25. package/build/constants/api.js +4 -0
  26. package/build/constants/app.d.ts +12 -12
  27. package/build/constants/app.js +8 -119
  28. package/build/constants/assets.d.ts +4 -6
  29. package/build/constants/assets.js +118 -114
  30. package/build/constants/dummy.js +27 -20
  31. package/build/constants/flows.d.ts +0 -15
  32. package/build/constants/flows.js +0 -15
  33. package/build/constants/validation.d.ts +1 -1
  34. package/build/constants/validation.js +1 -1
  35. package/build/features/app/business/businessStore.js +15 -10
  36. package/build/features/app/connect/connectStore.d.ts +6 -5
  37. package/build/features/app/connect/connectStore.js +23 -10
  38. package/build/features/app/connectExpress/connectExpressStore.d.ts +6 -5
  39. package/build/features/app/connectExpress/connectExpressStore.js +43 -14
  40. package/build/features/app/individual/individualStore.js +5 -3
  41. package/build/features/auth/Auth.d.ts +1 -1
  42. package/build/features/auth/screens/AuthenticationList/EntityList.js +2 -2
  43. package/build/features/brand/screens/BrandActivities/RefundPolicy.d.ts +1 -1
  44. package/build/features/business/screens/BusinessType/BusinessType.js +13 -2
  45. package/build/features/business/screens/BusinessType/EntityLicenseList.js +11 -5
  46. package/build/features/business/screens/BusinessType/LicenseList.js +15 -7
  47. package/build/features/business/screens/BusinessType/UnifiedNumber.d.ts +35 -0
  48. package/build/features/business/screens/BusinessType/UnifiedNumber.js +84 -0
  49. package/build/features/business/screens/BusinessType/validation.d.ts +6 -3
  50. package/build/features/business/screens/BusinessType/validation.js +31 -10
  51. package/build/features/business/screens/Customers/RefundPolicy.d.ts +1 -1
  52. package/build/features/connectExpress/screens/AuthenticationList/EntityList.js +2 -2
  53. package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +1 -0
  54. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.js +23 -7
  55. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.js +2 -2
  56. package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.js +1 -1
  57. package/build/features/connectExpress/screens/CollectBusinessInfo/UnifiedNumber.d.ts +36 -0
  58. package/build/features/connectExpress/screens/CollectBusinessInfo/UnifiedNumber.js +81 -0
  59. package/build/features/connectExpress/screens/CollectBusinessInfo/validation.d.ts +6 -3
  60. package/build/features/connectExpress/screens/CollectBusinessInfo/validation.js +57 -21
  61. package/build/features/entity/screens/EntityName/EntityName.js +16 -15
  62. package/build/features/entity/screens/EntityName/UnifiedNumber.js +2 -2
  63. package/build/features/entity/screens/EntityName/validation.d.ts +50 -48
  64. package/build/features/entity/screens/EntityName/validation.js +100 -85
  65. package/build/features/featuresScreens.d.ts +0 -1
  66. package/build/features/featuresScreens.js +0 -67
  67. package/build/features/shared/Button/Button.js +1 -1
  68. package/build/features/shared/Button/FlowsButtons.js +1 -1
  69. package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +2 -2
  70. package/build/features/shared/SuccessScreen/SuccessScreen.d.ts +1 -3
  71. package/build/features/shared/SuccessScreen/SuccessScreen.js +2 -2
  72. package/build/hooks/useAppConfig.js +1 -1
  73. package/build/hooks/useAppDispatch.d.ts +0 -1
  74. package/build/index.d.ts +2 -3
  75. package/build/index.js +2 -4
  76. package/build/theme/palette.js +0 -12
  77. package/build/theme/typography.js +0 -4
  78. package/build/utils/common.d.ts +1 -1
  79. package/build/utils/common.js +14 -8
  80. package/build/utils/error.d.ts +1 -0
  81. package/build/utils/error.js +3 -0
  82. package/build/utils/string.d.ts +3 -2
  83. package/build/utils/string.js +5 -5
  84. package/build/utils/validation.js +1 -1
  85. package/package.json +3 -3
  86. package/build/@types/terminal.d.ts +0 -116
  87. package/build/@types/terminal.js +0 -1
  88. package/build/api/terminal.d.ts +0 -28
  89. package/build/api/terminal.js +0 -45
  90. package/build/components/DeviceCard/DeviceCard.d.ts +0 -18
  91. package/build/components/DeviceCard/DeviceCard.js +0 -103
  92. package/build/components/DeviceCard/index.d.ts +0 -3
  93. package/build/components/DeviceCard/index.js +0 -2
  94. package/build/features/app/terminal/terminalStore.d.ts +0 -109
  95. package/build/features/app/terminal/terminalStore.js +0 -673
  96. package/build/features/shared/PushNotification/PushNotification.d.ts +0 -11
  97. package/build/features/shared/PushNotification/PushNotification.js +0 -34
  98. package/build/features/shared/PushNotification/index.d.ts +0 -2
  99. package/build/features/shared/PushNotification/index.js +0 -2
  100. package/build/features/terminal/Terminal.d.ts +0 -14
  101. package/build/features/terminal/Terminal.js +0 -95
  102. package/build/features/terminal/index.d.ts +0 -1
  103. package/build/features/terminal/index.js +0 -1
  104. package/build/features/terminal/screens/LinkNewTerminal/LinkNewTerminal.d.ts +0 -3
  105. package/build/features/terminal/screens/LinkNewTerminal/LinkNewTerminal.js +0 -68
  106. package/build/features/terminal/screens/LinkNewTerminal/index.d.ts +0 -2
  107. package/build/features/terminal/screens/LinkNewTerminal/index.js +0 -2
  108. package/build/features/terminal/screens/LinkNewTerminal/styles.d.ts +0 -10
  109. package/build/features/terminal/screens/LinkNewTerminal/styles.js +0 -28
  110. package/build/features/terminal/screens/LinkedSuccess/LinkedSuccess.d.ts +0 -3
  111. package/build/features/terminal/screens/LinkedSuccess/LinkedSuccess.js +0 -51
  112. package/build/features/terminal/screens/LinkedSuccess/index.d.ts +0 -2
  113. package/build/features/terminal/screens/LinkedSuccess/index.js +0 -2
  114. package/build/features/terminal/screens/LinkedTerminalInfo/LinkedTerminalInfo.d.ts +0 -3
  115. package/build/features/terminal/screens/LinkedTerminalInfo/LinkedTerminalInfo.js +0 -50
  116. package/build/features/terminal/screens/LinkedTerminalInfo/index.d.ts +0 -2
  117. package/build/features/terminal/screens/LinkedTerminalInfo/index.js +0 -2
  118. package/build/features/terminal/screens/Loading/Loading.d.ts +0 -4
  119. package/build/features/terminal/screens/Loading/Loading.js +0 -10
  120. package/build/features/terminal/screens/Loading/index.d.ts +0 -2
  121. package/build/features/terminal/screens/Loading/index.js +0 -2
  122. package/build/features/terminal/screens/NoTerminalDeviceLinked/NoTerminalDeviceLinked.d.ts +0 -3
  123. package/build/features/terminal/screens/NoTerminalDeviceLinked/NoTerminalDeviceLinked.js +0 -56
  124. package/build/features/terminal/screens/NoTerminalDeviceLinked/index.d.ts +0 -2
  125. package/build/features/terminal/screens/NoTerminalDeviceLinked/index.js +0 -2
  126. package/build/features/terminal/screens/NoTerminalDeviceLinked/styles.d.ts +0 -36
  127. package/build/features/terminal/screens/NoTerminalDeviceLinked/styles.js +0 -34
  128. package/build/features/terminal/screens/OperatorError/OperatorError.d.ts +0 -5
  129. package/build/features/terminal/screens/OperatorError/OperatorError.js +0 -9
  130. package/build/features/terminal/screens/OperatorError/index.d.ts +0 -2
  131. package/build/features/terminal/screens/OperatorError/index.js +0 -2
  132. package/build/features/terminal/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +0 -3
  133. package/build/features/terminal/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +0 -21
  134. package/build/features/terminal/screens/ResetPasswordSuccess/index.d.ts +0 -2
  135. package/build/features/terminal/screens/ResetPasswordSuccess/index.js +0 -2
  136. package/build/features/terminal/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +0 -3
  137. package/build/features/terminal/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +0 -31
  138. package/build/features/terminal/screens/SuccessWithFlowButtons/index.d.ts +0 -2
  139. package/build/features/terminal/screens/SuccessWithFlowButtons/index.js +0 -2
  140. package/build/features/terminal/screens/TerminalDeviceList/DeviceList.d.ts +0 -9
  141. package/build/features/terminal/screens/TerminalDeviceList/DeviceList.js +0 -20
  142. package/build/features/terminal/screens/TerminalDeviceList/TerminalDeviceList.d.ts +0 -3
  143. package/build/features/terminal/screens/TerminalDeviceList/TerminalDeviceList.js +0 -144
  144. package/build/features/terminal/screens/TerminalDeviceList/index.d.ts +0 -2
  145. package/build/features/terminal/screens/TerminalDeviceList/index.js +0 -2
  146. package/build/features/terminal/screens/TerminalDeviceList/styles.d.ts +0 -9
  147. package/build/features/terminal/screens/TerminalDeviceList/styles.js +0 -13
  148. package/build/features/terminal/screens/TerminalListPage/TerminalListPage.d.ts +0 -3
  149. package/build/features/terminal/screens/TerminalListPage/TerminalListPage.js +0 -42
  150. package/build/features/terminal/screens/TerminalListPage/index.d.ts +0 -2
  151. package/build/features/terminal/screens/TerminalListPage/index.js +0 -2
  152. package/build/features/terminal/screens/UnlinkedSuccess/UnlinkedSuccess.d.ts +0 -3
  153. package/build/features/terminal/screens/UnlinkedSuccess/UnlinkedSuccess.js +0 -53
  154. package/build/features/terminal/screens/UnlinkedSuccess/index.d.ts +0 -2
  155. package/build/features/terminal/screens/UnlinkedSuccess/index.js +0 -2
  156. package/build/features/terminal/screens/UnlinkedTerminalInfo/UnlinkedTerminalInfo.d.ts +0 -3
  157. package/build/features/terminal/screens/UnlinkedTerminalInfo/UnlinkedTerminalInfo.js +0 -98
  158. package/build/features/terminal/screens/UnlinkedTerminalInfo/index.d.ts +0 -2
  159. package/build/features/terminal/screens/UnlinkedTerminalInfo/index.js +0 -2
  160. package/build/features/terminal/screens/UnlinkedTerminalInfo/styles.d.ts +0 -26
  161. package/build/features/terminal/screens/UnlinkedTerminalInfo/styles.js +0 -30
  162. package/build/features/terminal/screens/Verify/OTPInput.d.ts +0 -7
  163. package/build/features/terminal/screens/Verify/OTPInput.js +0 -51
  164. package/build/features/terminal/screens/Verify/Verify.d.ts +0 -5
  165. package/build/features/terminal/screens/Verify/Verify.js +0 -85
  166. package/build/features/terminal/screens/Verify/index.d.ts +0 -2
  167. package/build/features/terminal/screens/Verify/index.js +0 -2
  168. package/build/features/terminal/screens/Verify/validation.d.ts +0 -8
  169. package/build/features/terminal/screens/Verify/validation.js +0 -4
  170. package/build/features/terminal/screens/shared/Header.d.ts +0 -10
  171. package/build/features/terminal/screens/shared/Header.js +0 -30
  172. package/build/features/terminal/screens/shared/TerminalList.d.ts +0 -11
  173. package/build/features/terminal/screens/shared/TerminalList.js +0 -25
  174. package/build/features/terminal/screens/shared/index.d.ts +0 -5
  175. package/build/features/terminal/screens/shared/index.js +0 -5
  176. package/build/features/terminal/screens/shared/styles.d.ts +0 -196
  177. package/build/features/terminal/screens/shared/styles.js +0 -155
  178. package/build/features/terminal/screens/shared/utils.d.ts +0 -7
  179. package/build/features/terminal/screens/shared/utils.js +0 -24
@@ -1,11 +0,0 @@
1
- import * as React from 'react';
2
- export interface PushNotificationProps {
3
- success: boolean;
4
- failed?: boolean;
5
- expiryInSeconds: number;
6
- onFinish?: () => void;
7
- children: React.ReactNode;
8
- error: string;
9
- }
10
- declare const _default: React.MemoExoticComponent<({ success, failed, expiryInSeconds, onFinish, children, error }: PushNotificationProps) => JSX.Element>;
11
- export default _default;
@@ -1,34 +0,0 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
- import * as React from 'react';
14
- import { useTranslation } from 'react-i18next';
15
- import { useCountDown, useCountUp } from '../../../hooks';
16
- import Warning from '../../../components/Warning';
17
- import { ScreenContainer } from '../../shared/Containers';
18
- var PushNotification = function (_a) {
19
- var success = _a.success, failed = _a.failed, expiryInSeconds = _a.expiryInSeconds, onFinish = _a.onFinish, children = _a.children, error = _a.error;
20
- var t = useTranslation().t;
21
- var count = useCountUp({ start: 0, end: expiryInSeconds, sleepMS: 1000 }).count;
22
- var errorWaitingTime = 3;
23
- var failedCount = useCountDown({ startTimer: !!failed, start: errorWaitingTime, end: 0, sleepMS: 1000 }).count;
24
- var remainingTime = expiryInSeconds - errorWaitingTime;
25
- var isEnded = failed ? failedCount === 0 : count === expiryInSeconds;
26
- var endPhaseStarted = count >= remainingTime;
27
- React.useEffect(function () {
28
- if (isEnded && onFinish)
29
- onFinish();
30
- }, [isEnded]);
31
- var isErrorPhase = (endPhaseStarted && !success) || failed;
32
- return (_jsxs(ScreenContainer, { children: [children, isErrorPhase && _jsx(Warning, __assign({ sx: { mt: 2 } }, { children: t(error) }))] }));
33
- };
34
- export default React.memo(PushNotification);
@@ -1,2 +0,0 @@
1
- import PushNotification from './PushNotification';
2
- export default PushNotification;
@@ -1,2 +0,0 @@
1
- import PushNotification from './PushNotification';
2
- export default PushNotification;
@@ -1,14 +0,0 @@
1
- /// <reference types="react" />
2
- import { LibConfig } from '../../@types';
3
- export interface TerminalLibProps extends LibConfig {
4
- verifyToken?: string;
5
- configToken?: string;
6
- loaderColor?: string;
7
- }
8
- export interface TerminalLibFullProps extends TerminalLibProps {
9
- unmount?: () => void;
10
- }
11
- export declare function TerminalElement(props: TerminalLibFullProps): JSX.Element;
12
- export declare function renderTerminalLib(config: TerminalLibProps, elementId: string): {
13
- unmount: () => void;
14
- };
@@ -1,95 +0,0 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- var __rest = (this && this.__rest) || function (s, e) {
13
- var t = {};
14
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
- t[p] = s[p];
16
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
- t[p[i]] = s[p[i]];
20
- }
21
- return t;
22
- };
23
- import { jsx as _jsx } from "react/jsx-runtime";
24
- import React, { memo } from 'react';
25
- import { createRoot } from 'react-dom/client';
26
- import { useAppTheme, useAppSelector, useAppConfig, useErrorListener, useStepStartedListener, useVerifyToken, useAppDispatch } from '../../hooks';
27
- import { handleCurrentActiveScreen, settingsSelector } from '../../app/settings';
28
- import { store } from '../../app/store';
29
- import AnimationFlow from '../../components/AnimationFlow';
30
- import { ReduxProvider, ThemeProvider } from '../../components/Providers';
31
- import Collapse from '../../components/Collapse';
32
- import { findOrCreateElementAndInject, initializeGTM, sendPageView } from '../../utils';
33
- import { CONNECT_FLOWS, TERMINAL_SCREENS_NAVIGATION } from '../../constants';
34
- import { FeatureContainer } from '../shared/Containers';
35
- import { terminalSelector, verifyToken as verifyTokenAPI } from '../app/terminal/terminalStore';
36
- import { terminalFeatureScreens } from '../featuresScreens';
37
- import Background from '../shared/Background';
38
- var Terminal = memo(function (_a) {
39
- var _b, _c;
40
- var configToken = _a.configToken, verifyToken = _a.verifyToken, loaderColor = _a.loaderColor, props = __rest(_a, ["configToken", "verifyToken", "loaderColor"]);
41
- var theme = useAppTheme().theme;
42
- var dispatch = useAppDispatch();
43
- var _d = useAppSelector(settingsSelector), data = _d.data, error = _d.error, settingLoading = _d.loading;
44
- var _e = useAppSelector(terminalSelector), customLoading = _e.customLoading, terminalError = _e.error, loading = _e.loading, terminalListLoading = _e.terminalListLoading;
45
- useAppConfig(__assign(__assign({ navigation: TERMINAL_SCREENS_NAVIGATION }, props), { disableSettingFetching: props.mode === 'content' ? false : !!verifyToken || !!configToken }));
46
- useErrorListener(terminalError || error);
47
- useStepStartedListener();
48
- var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open, featureScreensNavigation = data.featureScreensNavigation, merchant = data.merchant, isMaturityExpress = data.isMaturityExpress, appConfig = data.appConfig;
49
- var animationDirection = open ? (_b = appConfig.features) === null || _b === void 0 ? void 0 : _b.dialogStartTransition : (_c = appConfig.features) === null || _c === void 0 ? void 0 : _c.dialogEndTransition;
50
- var verifyTokenAndMoveToNextScreen = function (_a) {
51
- var token = _a.token, isInternally = _a.isInternally;
52
- return function () {
53
- dispatch(verifyTokenAPI({ token: token, isInternally: isInternally }))
54
- .unwrap()
55
- .then(function (_a) {
56
- var nextScreen = _a.nextScreen;
57
- dispatch(handleCurrentActiveScreen(nextScreen));
58
- })
59
- .catch(function () { });
60
- };
61
- };
62
- useVerifyToken({
63
- verify: verifyTokenAndMoveToNextScreen,
64
- loadingScreenName: CONNECT_FLOWS.terminal.loadingData,
65
- navigation: featureScreensNavigation,
66
- open: open,
67
- mode: props.mode,
68
- internalToken: verifyToken,
69
- settingLoading: settingLoading,
70
- operatorErrorScreenName: CONNECT_FLOWS.terminal.operatorError,
71
- isValidOperator: data.isValidOperator
72
- });
73
- React.useEffect(function () {
74
- initializeGTM();
75
- sendPageView({
76
- title: 'Terminal'
77
- });
78
- }, []);
79
- var initialLoading = verifyToken && props.mode !== 'content' ? settingLoading : settingLoading || customLoading;
80
- return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ mode: props.mode, open: open, isTapOrigin: isTapOrigin, loading: initialLoading }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading || terminalListLoading ? 'none' : 'auto', isTapOrigin: isTapOrigin, animationDirection: animationDirection, open: open, error: error, loading: initialLoading, loaderColor: loaderColor, breakpoint: 'sm', screenId: activeScreen.name, merchantInfo: merchant, isMaturityExpress: isMaturityExpress, type: props.mode === 'content' ? 'CONTENT' : undefined, dialogEdgeFormat: data.appConfig.dialogEdgeFormat, features: appConfig.features }, { children: _jsx(FeatureContainer, __assign({ mode: props.mode, isMaturityExpress: isMaturityExpress }, { children: terminalFeatureScreens.map(function (_a, index) {
81
- var Element = _a.element, name = _a.name;
82
- var isActive = activeScreen.name === name;
83
- return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
84
- }) })) })) })) })));
85
- });
86
- export function TerminalElement(props) {
87
- return (_jsx(ReduxProvider, __assign({ store: store }, { children: _jsx(Terminal, __assign({}, props)) })));
88
- }
89
- export function renderTerminalLib(config, elementId) {
90
- var element = findOrCreateElementAndInject(elementId);
91
- var root = createRoot(element);
92
- var unmount = function () { return root.unmount(); };
93
- root.render(_jsx(TerminalElement, __assign({}, config, { unmount: unmount })));
94
- return { unmount: unmount };
95
- }
@@ -1 +0,0 @@
1
- export * from './Terminal';
@@ -1 +0,0 @@
1
- export * from './Terminal';
@@ -1,3 +0,0 @@
1
- import * as React from 'react';
2
- declare const _default: React.MemoExoticComponent<() => JSX.Element>;
3
- export default _default;
@@ -1,68 +0,0 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
13
- import * as React from 'react';
14
- import { useTranslation } from 'react-i18next';
15
- import Box from '@mui/material/Box';
16
- import { handleNextScreenStep, handlePrevScreenStep } from '../../../../app/settings';
17
- import Button from '../../../../components/Button';
18
- import { useAppDispatch, useAppSelector } from '../../../../hooks';
19
- import { CONNECT_FLOWS, TERMINAL_PUSH_NOTIFICATION_DURATION } from '../../../../constants';
20
- import { ScreenContainer } from '../../../shared/Containers';
21
- import PushNotification from '../../../shared/PushNotification';
22
- import { pushNotificationLinkNewTerminal, terminalSelector } from '../../../app/terminal/terminalStore';
23
- import { CodeDescription, QRCodeImage } from './styles';
24
- import { LinkNewTerminalContainer, LinkTerminalText, QRCodeDescription } from '../shared';
25
- var LinkNewTerminal = function () {
26
- var _a, _b, _c, _d;
27
- var t = useTranslation().t;
28
- var dispatch = useAppDispatch();
29
- var data = useAppSelector(terminalSelector).data;
30
- var _e = React.useState(false), isReady = _e[0], setIsReady = _e[1];
31
- var _f = React.useState(false), success = _f[0], setSuccess = _f[1];
32
- var _g = React.useState(false), failed = _g[0], setFailed = _g[1];
33
- var terminalInfo = data.terminalInfo, responseData = data.responseData;
34
- var _h = responseData || {}, terminalData = _h.terminalData, linkNewTerminalData = _h.linkNewTerminalData;
35
- var terminal_devices = (terminalData || {}).terminal_devices;
36
- var qrCode = "data:image/png;base64,".concat((_a = linkNewTerminalData === null || linkNewTerminalData === void 0 ? void 0 : linkNewTerminalData.linking) === null || _a === void 0 ? void 0 : _a.qr);
37
- var code = (_b = linkNewTerminalData === null || linkNewTerminalData === void 0 ? void 0 : linkNewTerminalData.linking) === null || _b === void 0 ? void 0 : _b.code;
38
- var expiry = TERMINAL_PUSH_NOTIFICATION_DURATION;
39
- var deviceName = ((_d = (_c = terminalInfo.selectedTerminalDevice.model) === null || _c === void 0 ? void 0 : _c.name[0]) === null || _d === void 0 ? void 0 : _d.text) || '';
40
- var newTerminal = true;
41
- React.useEffect(function () {
42
- if (linkNewTerminalData && !isReady) {
43
- setIsReady(true);
44
- }
45
- }, [linkNewTerminalData]);
46
- React.useEffect(function () {
47
- if (!isReady)
48
- return;
49
- var promise = dispatch(pushNotificationLinkNewTerminal({ newTerminal: newTerminal, onSuccess: function () { return setSuccess(true); }, onFailure: function () { return setFailed(true); } }));
50
- promise
51
- .unwrap()
52
- .then(function (_a) {
53
- var nextScreen = _a.nextScreen;
54
- if (nextScreen)
55
- dispatch(handleNextScreenStep(nextScreen));
56
- })
57
- .catch(function () { });
58
- return function () {
59
- promise === null || promise === void 0 ? void 0 : promise.abort();
60
- };
61
- }, [isReady]);
62
- var handleOnBack = function () {
63
- var previousScreen = (terminal_devices === null || terminal_devices === void 0 ? void 0 : terminal_devices.length) ? CONNECT_FLOWS.terminal.terminalList : CONNECT_FLOWS.terminal.noTerminalLinked;
64
- dispatch(handlePrevScreenStep(previousScreen));
65
- };
66
- return (_jsxs(ScreenContainer, __assign({ minHeight: 200, justifyContent: 'space-between' }, { children: [_jsx(PushNotification, __assign({ error: t('terminal_request_denied', { device: deviceName }), failed: failed, success: success, expiryInSeconds: expiry }, { children: _jsxs(LinkNewTerminalContainer, { children: [_jsx(LinkTerminalText, { children: t('terminal_link_terminal') }), _jsx(QRCodeDescription, { children: t('terminal_qr_code_description') }), _jsx(QRCodeImage, { src: qrCode }), code && (_jsxs(_Fragment, { children: [_jsx(LinkTerminalText, { children: t('terminal_or_use_code') }), _jsx(CodeDescription, { children: code })] }))] }) })), _jsx(Box, __assign({ sx: { ml: 2.5, mr: 2.5 } }, { children: _jsx(Button, __assign({ sx: { mb: 1.5, mt: 1.5 }, onClick: handleOnBack, variant: 'text' }, { children: t('back') })) }))] })));
67
- };
68
- export default React.memo(LinkNewTerminal);
@@ -1,2 +0,0 @@
1
- import LinkNewTerminal from './LinkNewTerminal';
2
- export default LinkNewTerminal;
@@ -1,2 +0,0 @@
1
- import LinkNewTerminal from './LinkNewTerminal';
2
- export default LinkNewTerminal;
@@ -1,10 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const QRCodeImage: import("@emotion/styled").StyledComponent<import("../../../../components/Icon").IconProps & import("react").RefAttributes<HTMLImageElement> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
3
- export declare const CodeDescription: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
4
- children?: import("react").ReactNode;
5
- component?: import("react").ElementType<any> | undefined;
6
- ref?: import("react").Ref<unknown> | undefined;
7
- sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
8
- } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
9
- ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
10
- }, keyof import("@mui/material/OverridableComponent").CommonProps | ("left" | "right" | "border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "bottom" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform") | "children" | "component" | "ref" | "sx"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
@@ -1,28 +0,0 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- import Box from '@mui/material/Box';
13
- import { styled } from '@mui/material/styles';
14
- import Icon from '../../../../components/Icon';
15
- export var QRCodeImage = styled(Icon)(function (_a) {
16
- var spacing = _a.theme.spacing;
17
- return ({
18
- margin: '0px auto',
19
- width: spacing(21.875),
20
- height: spacing(21.875),
21
- marginTop: spacing(2.5),
22
- marginBottom: spacing(2.5)
23
- });
24
- });
25
- export var CodeDescription = styled(Box)(function (_a) {
26
- var _b = _a.theme, palette = _b.palette, spacing = _b.spacing, typography = _b.typography;
27
- return (__assign(__assign({ backgroundColor: palette.common.white, padding: spacing(1.375, 2), color: palette.components.deviceCard.title }, typography.h4_small), { fontWeight: typography.fontWeightBold, display: 'flex', justifyContent: 'center' }));
28
- });
@@ -1,3 +0,0 @@
1
- import * as React from 'react';
2
- declare const _default: React.MemoExoticComponent<() => JSX.Element>;
3
- export default _default;
@@ -1,51 +0,0 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
- import * as React from 'react';
14
- import { useTranslation } from 'react-i18next';
15
- import Box from '@mui/material/Box';
16
- import { useAppDispatch, useAppSelector, useLanguage } from '../../../../hooks';
17
- import { handleNextScreenStep, handlePrevScreenStep } from '../../../../app/settings';
18
- import { retrieveBoardDetails, retrieveBoardStatus, retrieveTerminalDeviceList, terminalSelector } from '../../../app/terminal/terminalStore';
19
- import SuccessScreen from '../../../shared/SuccessScreen';
20
- import Button from '../../../shared/Button';
21
- import { getTerminalName, SuccessContainerStyled } from '../shared';
22
- import { CONNECT_FLOWS } from '../../../../constants';
23
- var LinkedSuccess = function () {
24
- var t = useTranslation().t;
25
- var isAr = useLanguage().isAr;
26
- var dispatch = useAppDispatch();
27
- var _a = useAppSelector(terminalSelector), error = _a.error, loading = _a.loading, _b = _a.data, selectedTerminal = _b.terminalInfo.selectedTerminal, responseData = _b.responseData;
28
- var _c = responseData || {}, boardData = _c.boardData, authData = _c.authData;
29
- var deviceName = getTerminalName(selectedTerminal);
30
- var handleGoToBoard = function () {
31
- var board_id = (boardData || {}).id;
32
- var _a = (authData === null || authData === void 0 ? void 0 : authData.recipient) || {}, id = _a.id, type = _a.type;
33
- dispatch(retrieveTerminalDeviceList());
34
- dispatch(retrieveBoardStatus({ boardId: board_id }))
35
- .unwrap()
36
- .then(function () {
37
- dispatch(retrieveBoardDetails({ boardId: board_id, individualId: id, individualType: type }))
38
- .unwrap()
39
- .then(function () {
40
- dispatch(handleNextScreenStep(CONNECT_FLOWS.terminal.board));
41
- })
42
- .catch(function () { });
43
- })
44
- .catch(function () { });
45
- };
46
- var handleOnBack = function () {
47
- dispatch(handlePrevScreenStep());
48
- };
49
- return (_jsxs(SuccessContainerStyled, { children: [_jsx(SuccessScreen, { sx: { minHeight: 'unset', ml: 2.5, mr: 2.5 }, title: t('terminal_linked_success', { device: deviceName }), successTitle: t('terminal_go_to_board'), loading: loading, error: error || '' }), _jsx(Box, __assign({ sx: { width: '100%' } }, { children: _jsx(Button, __assign({ loading: loading, disableBack: true, onBackClicked: handleOnBack, onClick: handleGoToBoard, isAr: isAr }, { children: t('terminal_go_to_board') })) }))] }));
50
- };
51
- export default React.memo(LinkedSuccess);
@@ -1,2 +0,0 @@
1
- import LinkedSuccess from './LinkedSuccess';
2
- export default LinkedSuccess;
@@ -1,2 +0,0 @@
1
- import LinkedSuccess from './LinkedSuccess';
2
- export default LinkedSuccess;
@@ -1,3 +0,0 @@
1
- import * as React from 'react';
2
- declare const _default: React.MemoExoticComponent<() => JSX.Element>;
3
- export default _default;
@@ -1,50 +0,0 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
- import * as React from 'react';
14
- import { useTranslation } from 'react-i18next';
15
- import { handleNextScreenStep, handlePrevScreenStep } from '../../../../app/settings';
16
- import { useAppDispatch, useAppSelector, useLanguage } from '../../../../hooks';
17
- import { useTheme } from '@mui/material';
18
- import { CONNECT_FLOWS, ICONS_NAMES } from '../../../../constants';
19
- import DeviceCard from '../../../../components/DeviceCard';
20
- import { ScreenContainer } from '../../../shared/Containers';
21
- import Button from '../../../shared/Button';
22
- import { terminalSelector, unlinkTerminalDevice } from '../../../app/terminal/terminalStore';
23
- import { Container, getId, getIdLabel, getPairedWith, LinkWithText } from '../shared';
24
- var LinkedTerminalInfo = function () {
25
- var _a, _b, _c, _d, _e, _f, _g;
26
- var t = useTranslation().t;
27
- var _h = useTheme(), spacing = _h.spacing, palette = _h.palette;
28
- var dispatch = useAppDispatch();
29
- var isAr = useLanguage().isAr;
30
- var _j = useAppSelector(terminalSelector), selectedTerminalDevice = _j.data.terminalInfo.selectedTerminalDevice, loading = _j.loading;
31
- var model = selectedTerminalDevice.model, linked = selectedTerminalDevice.linked, display_name = selectedTerminalDevice.display_name, terminal = selectedTerminalDevice.terminal, platform = selectedTerminalDevice.platform;
32
- var _k = (model || {}).image_url, image_url = _k === void 0 ? ICONS_NAMES.device_image : _k;
33
- var deviceName = (_b = (_a = terminal === null || terminal === void 0 ? void 0 : terminal.device) === null || _a === void 0 ? void 0 : _a.display_name) !== null && _b !== void 0 ? _b : (_c = terminal === null || terminal === void 0 ? void 0 : terminal.name) === null || _c === void 0 ? void 0 : _c.en;
34
- var deviceImage = (_e = (_d = platform === null || platform === void 0 ? void 0 : platform.brand) === null || _d === void 0 ? void 0 : _d.logo) !== null && _e !== void 0 ? _e : ICONS_NAMES.platform_image;
35
- var deviceId = (_g = (_f = terminal === null || terminal === void 0 ? void 0 : terminal.device) === null || _f === void 0 ? void 0 : _f.id) !== null && _g !== void 0 ? _g : terminal === null || terminal === void 0 ? void 0 : terminal.legacy_id;
36
- var handleOnNext = function () {
37
- dispatch(unlinkTerminalDevice())
38
- .unwrap()
39
- .then(function (_a) {
40
- var nextScreen = _a.nextScreen;
41
- dispatch(handleNextScreenStep(nextScreen));
42
- })
43
- .catch(function () { });
44
- };
45
- var handleOnBack = function () {
46
- dispatch(handlePrevScreenStep(CONNECT_FLOWS.terminal.terminalDeviceList));
47
- };
48
- return (_jsxs(ScreenContainer, __assign({ minHeight: 224, sx: { pl: 2.5, pr: 2.5 }, justifyContent: 'space-between' }, { children: [_jsxs(Container, { children: [_jsx(DeviceCard, { badge: true, image: image_url, name: display_name, deviceId: getId(selectedTerminalDevice), deviceIdLabel: getIdLabel(selectedTerminalDevice), pairedWith: getPairedWith(selectedTerminalDevice), isLinked: linked }), _jsx(LinkWithText, { children: t('terminal_linked_with') }), _jsx(DeviceCard, { sx: { minHeight: spacing(10), borderRadius: spacing(1), background: palette.components.deviceCard.deviceInfoBackground }, image: deviceImage || '', name: deviceName || '', deviceId: deviceId !== null && deviceId !== void 0 ? deviceId : '', isLinked: linked })] }), _jsx(Button, __assign({ sx: { ml: 0, mr: 0 }, loading: loading, onBackClicked: handleOnBack, onClick: handleOnNext, isAr: isAr }, { children: t('terminal_unlink') }))] })));
49
- };
50
- export default React.memo(LinkedTerminalInfo);
@@ -1,2 +0,0 @@
1
- import LinkedTerminalInfo from './LinkedTerminalInfo';
2
- export default LinkedTerminalInfo;
@@ -1,2 +0,0 @@
1
- import LinkedTerminalInfo from './LinkedTerminalInfo';
2
- export default LinkedTerminalInfo;
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- export declare const Loading: () => JSX.Element;
3
- declare const _default: React.MemoExoticComponent<() => JSX.Element>;
4
- export default _default;
@@ -1,10 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { memo } from 'react';
3
- import { useAppSelector } from '../../../../hooks';
4
- import DataLoading from '../../../shared/DataLoading';
5
- import { terminalSelector } from '../../../app/terminal/terminalStore';
6
- export var Loading = function () {
7
- var error = useAppSelector(terminalSelector).error;
8
- return _jsx(DataLoading, { error: error });
9
- };
10
- export default memo(Loading);
@@ -1,2 +0,0 @@
1
- import Loading from './Loading';
2
- export default Loading;
@@ -1,2 +0,0 @@
1
- import Loading from './Loading';
2
- export default Loading;
@@ -1,3 +0,0 @@
1
- import * as React from 'react';
2
- declare const _default: React.MemoExoticComponent<() => JSX.Element>;
3
- export default _default;
@@ -1,56 +0,0 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
- import * as React from 'react';
14
- import { useTranslation } from 'react-i18next';
15
- import { useAppDispatch, useAppSelector, useLanguage } from '../../../../hooks';
16
- import { handleNextScreenStep, handlePrevScreenStep } from '../../../../app/settings';
17
- import { ICONS_NAMES } from '../../../../constants';
18
- import { ScreenContainer } from '../../../shared/Containers';
19
- import { linkNewTerminal, retrieveBoardDetails, retrieveBoardStatus, terminalSelector } from '../../../app/terminal/terminalStore';
20
- import { DescriptionTypography, DeviceImage, NoTerminalDeviceLinkedContainer, TitleTypography } from './styles';
21
- var NoTerminalDeviceLinked = function () {
22
- var t = useTranslation().t;
23
- var isAr = useLanguage().isAr;
24
- var dispatch = useAppDispatch();
25
- var _a = useAppSelector(terminalSelector), loading = _a.loading, data = _a.data;
26
- var _b = data.responseData || {}, boardFlows = _b.boardFlows, authData = _b.authData, boardData = _b.boardData;
27
- var handleOnClickNewTerminalLink = function () {
28
- dispatch(linkNewTerminal())
29
- .unwrap()
30
- .then(function (_a) {
31
- var nextScreen = _a.nextScreen;
32
- dispatch(handleNextScreenStep(nextScreen));
33
- })
34
- .catch(function () { });
35
- };
36
- var handleOnBack = function () {
37
- if ((boardFlows === null || boardFlows === void 0 ? void 0 : boardFlows.length) > 0) {
38
- dispatch(handlePrevScreenStep());
39
- return;
40
- }
41
- var _a = (authData === null || authData === void 0 ? void 0 : authData.recipient) || {}, id = _a.id, type = _a.type;
42
- var board_id = (boardData || {}).id;
43
- dispatch(retrieveBoardStatus({ boardId: board_id }))
44
- .unwrap()
45
- .then(function () {
46
- dispatch(retrieveBoardDetails({ boardId: board_id, individualId: id, individualType: type }))
47
- .unwrap()
48
- .then(function () {
49
- dispatch(handlePrevScreenStep());
50
- });
51
- })
52
- .catch(function () { });
53
- };
54
- return (_jsx(ScreenContainer, __assign({ sx: { ml: 2.5, mr: 2.5 }, minHeight: 280, justifyContent: 'space-between' }, { children: _jsxs(NoTerminalDeviceLinkedContainer, { children: [_jsx(DeviceImage, { src: ICONS_NAMES.terminal_device }), _jsx(TitleTypography, { children: t('terminal_no_terminal_linked') }), _jsx(DescriptionTypography, { children: t('terminal_no_terminal_linked_description') })] }) })));
55
- };
56
- export default React.memo(NoTerminalDeviceLinked);
@@ -1,2 +0,0 @@
1
- import NoTerminalDeviceLinked from './NoTerminalDeviceLinked';
2
- export default NoTerminalDeviceLinked;
@@ -1,2 +0,0 @@
1
- import NoTerminalDeviceLinked from './NoTerminalDeviceLinked';
2
- export default NoTerminalDeviceLinked;
@@ -1,36 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const NoTerminalDeviceLinkedContainer: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
3
- children?: import("react").ReactNode;
4
- component?: import("react").ElementType<any> | undefined;
5
- ref?: import("react").Ref<unknown> | undefined;
6
- sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
7
- } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
8
- ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
9
- }, keyof import("@mui/material/OverridableComponent").CommonProps | ("left" | "right" | "border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "bottom" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform") | "children" | "component" | "ref" | "sx"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
10
- export declare const DeviceImage: import("@emotion/styled").StyledComponent<import("../../../../components/Icon").IconProps & import("react").RefAttributes<HTMLImageElement> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
11
- export declare const TitleTypography: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
12
- align?: "left" | "right" | "inherit" | "center" | "justify" | undefined;
13
- children?: import("react").ReactNode;
14
- classes?: Partial<import("@mui/material/Typography").TypographyClasses> | undefined;
15
- gutterBottom?: boolean | undefined;
16
- noWrap?: boolean | undefined;
17
- paragraph?: boolean | undefined;
18
- sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
19
- variant?: "button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "subtitle1" | "subtitle2" | "body1" | "body2" | "overline" | undefined;
20
- variantMapping?: Partial<Record<"button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "subtitle1" | "subtitle2" | "body1" | "body2" | "overline", string>> | undefined;
21
- } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof import("react").HTMLAttributes<HTMLSpanElement>> & {
22
- ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
23
- }, keyof import("@mui/material/OverridableComponent").CommonProps | ("left" | "right" | "border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "bottom" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform") | "children" | "sx" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
24
- export declare const DescriptionTypography: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
25
- align?: "left" | "right" | "inherit" | "center" | "justify" | undefined;
26
- children?: import("react").ReactNode;
27
- classes?: Partial<import("@mui/material/Typography").TypographyClasses> | undefined;
28
- gutterBottom?: boolean | undefined;
29
- noWrap?: boolean | undefined;
30
- paragraph?: boolean | undefined;
31
- sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
32
- variant?: "button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "subtitle1" | "subtitle2" | "body1" | "body2" | "overline" | undefined;
33
- variantMapping?: Partial<Record<"button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "subtitle1" | "subtitle2" | "body1" | "body2" | "overline", string>> | undefined;
34
- } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof import("react").HTMLAttributes<HTMLSpanElement>> & {
35
- ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
36
- }, keyof import("@mui/material/OverridableComponent").CommonProps | ("left" | "right" | "border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "bottom" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform") | "children" | "sx" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
@@ -1,34 +0,0 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- import { alpha, styled } from '@mui/material/styles';
13
- import Typography from '@mui/material/Typography';
14
- import Icon from '../../../../components/Icon';
15
- import { Container } from '../shared';
16
- export var NoTerminalDeviceLinkedContainer = styled(Container)(function () { return ({
17
- alignItems: 'center'
18
- }); });
19
- export var DeviceImage = styled(Icon)(function (_a) {
20
- var spacing = _a.theme.spacing;
21
- return ({
22
- margin: '0px auto',
23
- width: spacing(8.25),
24
- height: spacing(8.25)
25
- });
26
- });
27
- export var TitleTypography = styled(Typography)(function (_a) {
28
- var _b = _a.theme, palette = _b.palette, typography = _b.typography, spacing = _b.spacing;
29
- return (__assign(__assign({}, typography.body1), { fontWeight: typography.fontWeightBold, color: palette.info.dark, marginTop: spacing(3.25) }));
30
- });
31
- export var DescriptionTypography = styled(Typography)(function (_a) {
32
- var _b = _a.theme, palette = _b.palette, typography = _b.typography, spacing = _b.spacing;
33
- return (__assign(__assign({}, typography.caption), { fontWeight: typography.fontWeightMedium, color: alpha(palette.components.deviceCard.title, 0.5), marginTop: spacing(1) }));
34
- });