@tap-payments/auth-jsconnect 1.1.1-test → 1.1.2-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.
@@ -242,5 +242,6 @@
242
242
  "password_success_title": "Your password is set",
243
243
  "bank": "bank",
244
244
  "reset_password_success_title": "لقد ارسلنا رسالة بريدية إليك",
245
- "reset_password_success_description": "تحقق من بريدك الإلكتروني لإعادة تعيين كلمة المرور الخاصة بك."
245
+ "reset_password_success_description": "تحقق من بريدك الإلكتروني لإعادة تعيين كلمة المرور الخاصة بك.",
246
+ "license_name_label": "اسم الرخصة"
246
247
  }
@@ -262,5 +262,6 @@
262
262
  "account_details": "Your account details",
263
263
  "bank": "bank",
264
264
  "reset_password_success_title": "We sent you an email",
265
- "reset_password_success_description": "Check your email to reset your password."
265
+ "reset_password_success_description": "Check your email to reset your password.",
266
+ "license_name_label": "License Name"
266
267
  }
@@ -26,6 +26,7 @@ import Collapse from '../../../../components/Collapse';
26
26
  import OperationStartDate from './OperationStartDate';
27
27
  import { businessSelector, clearError, updateActivitiesInfo } from '../../../app/business/businessStore';
28
28
  import { ActivitiesValidationSchema } from './validation';
29
+ import LicenseName from './LicenseName';
29
30
  var FormStyled = styled(Form)(function () { return ({
30
31
  display: 'flex',
31
32
  flexDirection: 'column'
@@ -72,6 +73,6 @@ var Activities = function () {
72
73
  anchorEl ? setAnchorEl(false) : setAnchorEl(true);
73
74
  };
74
75
  var disabled = !methods.formState.isValid || !!error;
75
- return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsxs(Collapse, __assign({ in: !collapse }, { children: [_jsx(ActivitiesList, { onListOpen: function () { return handleMenuClick(); }, onListClose: function () { return handleMenuClick(); } }), _jsx(Collapse, __assign({ in: !anchorEl }, { children: _jsx(SalesChannels, {}) }))] })), _jsx(Collapse, __assign({ in: !anchorEl }, { children: _jsx(OperationStartDate, { onDateClicked: handleCollapseOpenClose }) })), _jsx(Collapse, __assign({ in: !collapse && !anchorEl }, { children: _jsx(Button, __assign({ disableBack: true, onBackClicked: function () { return onBack(); }, isAr: isAr, disabled: disabled, loading: loading, error: t(error || '') }, { children: t('next') })) }))] })) })) }));
76
+ return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(Collapse, __assign({ in: !collapse && !anchorEl }, { children: _jsx(LicenseName, {}) })), _jsxs(Collapse, __assign({ in: !collapse }, { children: [_jsx(ActivitiesList, { onListOpen: function () { return handleMenuClick(); }, onListClose: function () { return handleMenuClick(); } }), _jsx(Collapse, __assign({ in: !anchorEl }, { children: _jsx(SalesChannels, {}) }))] })), _jsx(Collapse, __assign({ in: !anchorEl }, { children: _jsx(OperationStartDate, { onDateClicked: handleCollapseOpenClose }) })), _jsx(Collapse, __assign({ in: !collapse && !anchorEl }, { children: _jsx(Button, __assign({ disableBack: true, onBackClicked: function () { return onBack(); }, isAr: isAr, disabled: disabled, loading: loading, error: t(error || '') }, { children: t('next') })) }))] })) })) }));
76
77
  };
77
78
  export default Activities;
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ interface LicenseNameProps {
3
+ }
4
+ declare const _default: React.MemoExoticComponent<({}: LicenseNameProps) => JSX.Element>;
5
+ export default _default;
@@ -0,0 +1,30 @@
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 } from "react/jsx-runtime";
13
+ import * as React from 'react';
14
+ import { useTranslation } from 'react-i18next';
15
+ import { ScreenContainer } from '../../../shared/Containers';
16
+ import Input from '../../../shared/Input';
17
+ import Collapse from '../../../../components/Collapse';
18
+ import { useAppSelector, useLanguage } from '../../../../hooks';
19
+ import { businessSelector } from '../../../app/business/businessStore';
20
+ import CheckIcon from '../../../shared/CheckIcon';
21
+ var LicenseName = function (_a) {
22
+ var _b, _c, _d;
23
+ var t = useTranslation().t;
24
+ var isAr = useLanguage().isAr;
25
+ var data = useAppSelector(businessSelector).data;
26
+ var entity = (((_b = data.verify) === null || _b === void 0 ? void 0 : _b.responseBody) || {}).entity;
27
+ var name = isAr ? (_c = entity === null || entity === void 0 ? void 0 : entity.legal_name) === null || _c === void 0 ? void 0 : _c.ar : (_d = entity === null || entity === void 0 ? void 0 : entity.legal_name) === null || _d === void 0 ? void 0 : _d.en;
28
+ return (_jsx(Collapse, __assign({ in: !!name }, { children: _jsx(ScreenContainer, { children: _jsx(Input, { label: t('license_name_label'), readOnly: true, value: name, sx: { '& .MuiInputBase-input': { cursor: 'auto' } }, endAdornment: _jsx(CheckIcon, {}) }) }) })));
29
+ };
30
+ export default React.memo(LicenseName);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tap-payments/auth-jsconnect",
3
- "version": "1.1.1-test",
3
+ "version": "1.1.2-test",
4
4
  "description": "connect library, auth",
5
5
  "private": false,
6
6
  "main": "build/index.js",