@tap-payments/auth-jsconnect 1.0.10 → 1.0.14

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 (148) hide show
  1. package/build/@types/app.d.ts +5 -0
  2. package/build/assets/locales/ar.json +190 -72
  3. package/build/assets/locales/en.json +207 -75
  4. package/build/components/AnimationFlow/Dialog.js +12 -1
  5. package/build/components/DatePicker/DatePicker.d.ts +3 -1
  6. package/build/components/DatePicker/DatePicker.js +8 -5
  7. package/build/components/Loader/Loader.js +2 -2
  8. package/build/components/Radio/Radio.d.ts +5 -0
  9. package/build/components/Radio/Radio.js +31 -0
  10. package/build/components/Radio/index.d.ts +3 -0
  11. package/build/components/Radio/index.js +2 -0
  12. package/build/components/RadioGroup/RadioGroup.d.ts +5 -0
  13. package/build/components/RadioGroup/RadioGroup.js +41 -0
  14. package/build/components/RadioGroup/index.d.ts +3 -0
  15. package/build/components/RadioGroup/index.js +2 -0
  16. package/build/components/RadioLabel/RadioLabel.d.ts +7 -0
  17. package/build/components/RadioLabel/RadioLabel.js +34 -0
  18. package/build/components/RadioLabel/index.d.ts +3 -0
  19. package/build/components/RadioLabel/index.js +2 -0
  20. package/build/constants/app.js +19 -7
  21. package/build/constants/dummy.d.ts +5 -0
  22. package/build/constants/dummy.js +8 -0
  23. package/build/features/bank/Bank.js +1 -1
  24. package/build/features/bank/screens/BankDetails/BankName.js +1 -1
  25. package/build/features/bank/screens/BankDetails/Beneficiary.js +3 -3
  26. package/build/features/bank/screens/BankDetails/IBAN.js +3 -3
  27. package/build/features/bank/screens/BankDetails/validation.js +8 -3
  28. package/build/features/bank/screens/Success/Success.d.ts +5 -0
  29. package/build/features/bank/screens/Success/Success.js +14 -0
  30. package/build/features/bank/screens/Success/index.d.ts +3 -0
  31. package/build/features/bank/screens/Success/index.js +2 -0
  32. package/build/features/business/Business.js +1 -1
  33. package/build/features/business/screens/Activities/Activities.js +14 -40
  34. package/build/features/business/screens/Activities/ActivitiesList.js +1 -1
  35. package/build/features/business/screens/Activities/OperationStartDate.d.ts +6 -0
  36. package/build/features/business/screens/Activities/OperationStartDate.js +31 -0
  37. package/build/features/business/screens/Activities/SalesChannels.js +3 -10
  38. package/build/features/business/screens/Activities/validation.d.ts +3 -0
  39. package/build/features/business/screens/Activities/validation.js +3 -2
  40. package/build/features/business/screens/BusinessType/BusinessType.js +2 -2
  41. package/build/features/business/screens/BusinessType/CRNumber.js +1 -1
  42. package/build/features/business/screens/BusinessType/CompanyLicense.js +1 -1
  43. package/build/features/business/screens/BusinessType/FLNumber.js +1 -1
  44. package/build/features/business/screens/BusinessType/FreelanceLicense.js +1 -1
  45. package/build/features/business/screens/BusinessType/SelectType.js +1 -1
  46. package/build/features/business/screens/Confirm/Confirm.js +1 -1
  47. package/build/features/business/screens/Customers/CustomerLocations.js +1 -1
  48. package/build/features/business/screens/Customers/Customers.js +5 -41
  49. package/build/features/business/screens/Customers/ExpectedCustomers.js +4 -10
  50. package/build/features/business/screens/Customers/ExpectedSalesRange.js +5 -6
  51. package/build/features/business/screens/Customers/RefundPolicy.d.ts +0 -8
  52. package/build/features/business/screens/Customers/RefundPolicy.js +2 -10
  53. package/build/features/business/screens/Customers/TransactionPolicy.js +3 -2
  54. package/build/features/business/screens/Customers/validation.d.ts +6 -6
  55. package/build/features/business/screens/Customers/validation.js +10 -5
  56. package/build/features/business/screens/IDBOD/DOB.d.ts +2 -1
  57. package/build/features/business/screens/IDBOD/DOB.js +4 -1
  58. package/build/features/business/screens/IDBOD/ID.js +7 -48
  59. package/build/features/business/screens/IDBOD/IDBOD.js +9 -41
  60. package/build/features/business/screens/IDBOD/validation.js +6 -2
  61. package/build/features/business/screens/OTP/OTP.js +18 -58
  62. package/build/features/business/screens/OTP/OTPInput.js +8 -21
  63. package/build/features/business/screens/Success/Success.js +1 -2
  64. package/build/features/business/screens/VerifyNumber/OTPInput.d.ts +1 -2
  65. package/build/features/business/screens/VerifyNumber/OTPInput.js +12 -42
  66. package/build/features/business/screens/VerifyNumber/VerifyNumber.js +20 -66
  67. package/build/features/connect/Connect.js +1 -1
  68. package/build/features/connect/screens/Individual/Email.js +7 -1
  69. package/build/features/connect/screens/Individual/Individual.js +0 -28
  70. package/build/features/connect/screens/Individual/Name.js +9 -3
  71. package/build/features/connect/screens/Individual/validation.js +5 -2
  72. package/build/features/connect/screens/MID/BusinessCountry.js +4 -4
  73. package/build/features/connect/screens/MID/IDNumber.js +9 -6
  74. package/build/features/connect/screens/MID/MID.js +2 -2
  75. package/build/features/connect/screens/MID/MobileNumber.js +13 -15
  76. package/build/features/connect/screens/MID/validation.d.ts +1 -1
  77. package/build/features/connect/screens/MID/validation.js +11 -5
  78. package/build/features/connect/screens/Merchant/BrandName.js +5 -3
  79. package/build/features/connect/screens/Merchant/SocialMedia.js +6 -1
  80. package/build/features/connect/screens/Merchant/TAC.js +2 -2
  81. package/build/features/connect/screens/Merchant/validation.d.ts +9 -9
  82. package/build/features/connect/screens/Merchant/validation.js +42 -11
  83. package/build/features/connect/screens/OTP/OTP.js +4 -3
  84. package/build/features/connect/screens/OTP/OTPInput.js +1 -1
  85. package/build/features/connect/screens/OTP/validation.js +1 -1
  86. package/build/features/connect/screens/Password/PasswordInput.js +2 -1
  87. package/build/features/connect/screens/Password/validation.js +1 -1
  88. package/build/features/connect/screens/ThankYou/ThankYou.js +1 -2
  89. package/build/features/featuresScreens.d.ts +1 -1
  90. package/build/features/featuresScreens.js +32 -7
  91. package/build/features/owner/Owner.js +1 -1
  92. package/build/features/owner/screens/AdditionalOwnerInfo/AdditionalOwnerInfo.d.ts +8 -0
  93. package/build/features/owner/screens/AdditionalOwnerInfo/AdditionalOwnerInfo.js +77 -0
  94. package/build/features/owner/screens/AdditionalOwnerInfo/EmployerLocation.d.ts +10 -0
  95. package/build/features/owner/screens/AdditionalOwnerInfo/EmployerLocation.js +80 -0
  96. package/build/features/owner/screens/AdditionalOwnerInfo/EmployerName.d.ts +6 -0
  97. package/build/features/owner/screens/AdditionalOwnerInfo/EmployerName.js +40 -0
  98. package/build/features/owner/screens/AdditionalOwnerInfo/InfluencerSwitch.d.ts +6 -0
  99. package/build/features/owner/screens/AdditionalOwnerInfo/InfluencerSwitch.js +45 -0
  100. package/build/features/owner/screens/AdditionalOwnerInfo/MonthlyIncome.d.ts +6 -0
  101. package/build/features/owner/screens/AdditionalOwnerInfo/MonthlyIncome.js +35 -0
  102. package/build/features/owner/screens/AdditionalOwnerInfo/PEPSwitch.d.ts +6 -0
  103. package/build/features/owner/screens/AdditionalOwnerInfo/PEPSwitch.js +45 -0
  104. package/build/features/owner/screens/AdditionalOwnerInfo/SourceOfIncome.d.ts +9 -0
  105. package/build/features/owner/screens/AdditionalOwnerInfo/SourceOfIncome.js +85 -0
  106. package/build/features/owner/screens/AdditionalOwnerInfo/index.d.ts +3 -0
  107. package/build/features/owner/screens/AdditionalOwnerInfo/index.js +2 -0
  108. package/build/features/owner/screens/AdditionalOwnerInfo/validation.d.ts +25 -0
  109. package/build/features/owner/screens/AdditionalOwnerInfo/validation.js +35 -0
  110. package/build/features/owner/screens/ShowOwnerInfo/ShowOwnerInfo.js +2 -2
  111. package/build/features/owner/screens/Success/Success.d.ts +5 -0
  112. package/build/features/owner/screens/Success/Success.js +14 -0
  113. package/build/features/owner/screens/Success/index.d.ts +3 -0
  114. package/build/features/owner/screens/Success/index.js +2 -0
  115. package/build/features/password/Password.js +3 -3
  116. package/build/features/password/screens/CreatePassword/ConfirmPassword.js +2 -1
  117. package/build/features/password/screens/CreatePassword/Password.js +2 -1
  118. package/build/features/password/screens/CreatePassword/validation.js +3 -3
  119. package/build/features/password/screens/Success/Success.d.ts +5 -0
  120. package/build/features/password/screens/Success/Success.js +14 -0
  121. package/build/features/password/screens/Success/index.d.ts +3 -0
  122. package/build/features/password/screens/Success/index.js +2 -0
  123. package/build/features/shared/Button/Button.js +7 -1
  124. package/build/features/shared/ExpandIcon/ExpandIcon.js +1 -1
  125. package/build/features/shared/Input/Input.d.ts +0 -1
  126. package/build/features/shared/Input/Input.js +2 -5
  127. package/build/features/shared/Mandatory/Mandatory.d.ts +2 -0
  128. package/build/features/shared/Mandatory/Mandatory.js +20 -0
  129. package/build/features/shared/Mandatory/index.d.ts +2 -0
  130. package/build/features/shared/Mandatory/index.js +2 -0
  131. package/build/features/shared/OTP/OTP.js +2 -2
  132. package/build/features/shared/SuccessScreen/SuccessScreen.js +1 -1
  133. package/build/features/tax/screens/Success/Success.d.ts +5 -0
  134. package/build/features/tax/screens/Success/Success.js +14 -0
  135. package/build/features/tax/screens/Success/index.d.ts +3 -0
  136. package/build/features/tax/screens/Success/index.js +2 -0
  137. package/build/features/tax/screens/TaxDetails/VATId.js +3 -4
  138. package/build/features/tax/screens/TaxDetails/validation.js +1 -1
  139. package/build/index.css +105 -3
  140. package/build/theme/typography.js +2 -2
  141. package/build/utils/string.js +2 -2
  142. package/build/utils/validation.d.ts +2 -0
  143. package/build/utils/validation.js +6 -0
  144. package/package.json +1 -1
  145. package/build/features/business/screens/OTP/OTPTimer.d.ts +0 -5
  146. package/build/features/business/screens/OTP/OTPTimer.js +0 -20
  147. package/build/features/business/screens/VerifyNumber/OTPTimer.d.ts +0 -5
  148. package/build/features/business/screens/VerifyNumber/OTPTimer.js +0 -20
@@ -15,7 +15,7 @@ import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
15
15
  var ExpandIcon = styled(ExpandMoreIcon, { shouldForwardProp: function (prop) { return prop !== 'anchorEl'; } })(function (_a) {
16
16
  var _b;
17
17
  var theme = _a.theme, anchorEl = _a.anchorEl;
18
- return (__assign(__assign({}, theme.typography.h6), (_b = { display: 'flex', transform: !!anchorEl ? 'rotate(180deg)' : '' }, _b[theme.transitions.create(['transform'])] = {
18
+ return (__assign(__assign({}, theme.typography.h6), (_b = { display: 'flex', cursor: 'pointer', transform: !!anchorEl ? 'rotate(180deg)' : '' }, _b[theme.transitions.create(['transform'])] = {
19
19
  duration: theme.transitions.duration.standard
20
20
  }, _b)));
21
21
  });
@@ -13,7 +13,6 @@ export declare const InputLabelStyled: import("@emotion/styled").StyledComponent
13
13
  } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof React.HTMLAttributes<HTMLSpanElement>> & {
14
14
  ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
15
15
  }, keyof import("@mui/material/OverridableComponent").CommonProps | ("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" | "right" | "bottom" | "left" | "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>, {}, {}>;
16
- export declare const MandatoryStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
17
16
  export declare const InputStyled: import("@emotion/styled").StyledComponent<Pick<InputProps, "type" | "className" | "style" | "classes" | "color" | "margin" | "translate" | "slot" | "title" | "ref" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "sx" | "size" | "disabled" | "error" | "name" | "components" | "componentsProps" | "value" | "autoFocus" | "fullWidth" | "required" | "rows" | "inputProps" | "inputRef" | "readOnly" | "autoComplete" | "disableInjectingGlobalStyles" | "endAdornment" | "inputComponent" | "multiline" | "renderSuffix" | "maxRows" | "minRows" | "startAdornment" | "disableUnderline" | "onEnterPressed" | "warningMessage"> & {
18
17
  placeholder?: string | undefined;
19
18
  hide?: boolean | undefined;
@@ -25,14 +25,11 @@ import { styled, alpha } from '@mui/material/styles';
25
25
  import Text from '../../../components/Text';
26
26
  import Box from '@mui/material/Box';
27
27
  import Input from '../../../components/Input';
28
+ import Mandatory from '../Mandatory';
28
29
  export var InputLabelStyled = styled(Text)(function (_a) {
29
30
  var theme = _a.theme;
30
31
  return (__assign(__assign({ color: alpha(theme.palette.text.primary, 0.6), fontWeight: theme.typography.fontWeightMedium }, theme.typography.caption), { lineHeight: theme.spacing(2.5) }));
31
32
  });
32
- export var MandatoryStyled = styled('span')(function (_a) {
33
- var theme = _a.theme;
34
- return (__assign(__assign({ color: alpha(theme.palette.error.light, 0.4) }, theme.typography.h6), { fontWeight: theme.typography.fontWeightLight, verticalAlign: 'sub' }));
35
- });
36
33
  export var InputStyled = styled(Input)(function (_a) {
37
34
  var theme = _a.theme, readOnly = _a.readOnly;
38
35
  return (__assign({ direction: theme.direction, '&.MuiInputBase-adornedEnd': {
@@ -55,5 +52,5 @@ var LabelContainerStyled = styled(Box)(function (_a) {
55
52
  });
56
53
  export default function CustomInput(_a) {
57
54
  var label = _a.label, required = _a.required, props = __rest(_a, ["label", "required"]);
58
- return (_jsxs(_Fragment, { children: [label && (_jsxs(LabelContainerStyled, { children: [_jsx(InputLabelStyled, { children: label }), required && _jsx(MandatoryStyled, { children: "*" })] })), _jsx(InputStyled, __assign({}, props))] }));
55
+ return (_jsxs(_Fragment, { children: [label && (_jsxs(LabelContainerStyled, { children: [_jsx(InputLabelStyled, { children: label }), required && _jsx(Mandatory, {})] })), _jsx(InputStyled, __assign({}, props))] }));
59
56
  }
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export default function Mandatory(): JSX.Element;
@@ -0,0 +1,20 @@
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 { styled, alpha } from '@mui/material/styles';
14
+ var SpanStyled = styled('span')(function (_a) {
15
+ var theme = _a.theme;
16
+ return (__assign(__assign({}, theme.typography.h6), { fontWeight: theme.typography.fontWeightLight, color: alpha(theme.palette.error.light, 0.4), lineHeight: theme.spacing(2.5), verticalAlign: 'sub' }));
17
+ });
18
+ export default function Mandatory() {
19
+ return _jsx(SpanStyled, { children: "*" });
20
+ }
@@ -0,0 +1,2 @@
1
+ import Mandatory from './Mandatory';
2
+ export default Mandatory;
@@ -0,0 +1,2 @@
1
+ import Mandatory from './Mandatory';
2
+ export default Mandatory;
@@ -31,11 +31,11 @@ var OTPStyled = styled(OTPField)(function (_a) {
31
31
  var _b;
32
32
  var theme = _a.theme, parentWidth = _a.parentWidth;
33
33
  var isSmall = parentWidth < 300;
34
- var inputWidth = isSmall ? Math.ceil(parentWidth / 6) - 16 : Math.ceil(parentWidth / 6) - 24;
34
+ var inputWidth = isSmall ? Math.ceil(parentWidth / 6) - 12 : Math.ceil(parentWidth / 6) - 20;
35
35
  return {
36
36
  marginInlineStart: 0,
37
37
  input: (_b = {
38
- width: "42px !important"
38
+ width: "45.5px !important"
39
39
  },
40
40
  _b[theme.breakpoints.down('sm')] = {
41
41
  marginInlineStart: isSmall ? theme.spacing(1) : theme.spacing(2),
@@ -49,6 +49,6 @@ var TitleStyled = styled(Text)(function (_a) {
49
49
  });
50
50
  var ThankYou = function (_a) {
51
51
  var onSuccess = _a.onSuccess, title = _a.title;
52
- return (_jsxs(Container, __assign({ sx: { alignItems: 'center' } }, { children: [title && (_jsx(TextContainerStyled, { children: _jsxs(TitleStyled, { children: [title, " "] }) })), _jsx(ButtonStyled, __assign({ onClick: onSuccess }, { children: _jsx("img", { src: ICONS_NAMES.SUCCESS, alt: 'success Icon' }) }))] })));
52
+ return (_jsxs(Container, { children: [title && (_jsx(TextContainerStyled, { children: _jsxs(TitleStyled, { children: [title, " "] }) })), _jsx(Container, __assign({ sx: { alignItems: 'center' } }, { children: _jsx(ButtonStyled, __assign({ onClick: onSuccess }, { children: _jsx("img", { src: ICONS_NAMES.SUCCESS, alt: 'success Icon' }) })) }))] }));
53
53
  };
54
54
  export default React.memo(ThankYou);
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ export interface SuccessProps {
3
+ }
4
+ declare const _default: React.MemoExoticComponent<({}: SuccessProps) => JSX.Element>;
5
+ export default _default;
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from 'react';
3
+ import { useTranslation } from 'react-i18next';
4
+ import SuccessScreen from '../../../shared/SuccessScreen';
5
+ var Success = function (_a) {
6
+ var t = useTranslation().t;
7
+ var onSuccess = function () {
8
+ console.log('success');
9
+ alert('Account created successfully, please check your email');
10
+ alert("It's a fake message, plz wait us to integrate with the backend. <A.Sharkawy>");
11
+ };
12
+ return _jsx(SuccessScreen, { title: t('ide_successfully_updated_message'), onSuccess: onSuccess });
13
+ };
14
+ export default React.memo(Success);
@@ -0,0 +1,3 @@
1
+ import Success, { SuccessProps } from './Success';
2
+ export type { SuccessProps };
3
+ export default Success;
@@ -0,0 +1,2 @@
1
+ import Success from './Success';
2
+ export default Success;
@@ -6,22 +6,21 @@ import { useController, useFormContext } from 'react-hook-form';
6
6
  import { VAT_ID_LENGTH } from '../../../../constants';
7
7
  import ClearIcon from '../../../shared/ClearIcon';
8
8
  import CheckIcon from '../../../shared/CheckIcon';
9
- import { removeAllOtherThanCharsAndNumber } from '../../../../utils';
9
+ import { removeAllCharsFromNumber } from '../../../../utils';
10
10
  var VATId = function () {
11
11
  var _a;
12
12
  var t = useTranslation().t;
13
13
  var control = useFormContext().control;
14
14
  var vatControl = useController({ name: 'vatId', control: control });
15
15
  var handleOnChange = function (vat) {
16
- var value = removeAllOtherThanCharsAndNumber(vat);
16
+ var value = removeAllCharsFromNumber(vat);
17
17
  vatControl.field.onChange(value);
18
18
  };
19
19
  var vatValue = vatControl.field.value;
20
20
  var vatError = (_a = vatControl.fieldState.error) === null || _a === void 0 ? void 0 : _a.message;
21
- var hasError = !!vatError;
22
21
  var clearValue = function () {
23
22
  vatControl.field.onChange('');
24
23
  };
25
- return (_jsx(FeatureContainer, { children: _jsx(Input, { label: t('vat_id_label'), inputProps: { maxLength: VAT_ID_LENGTH }, value: vatValue, onChange: function (event) { return handleOnChange(event.target.value); }, placeholder: '00000000000', warningType: 'alert', warningMessage: vatError, required: true, endAdornment: !hasError && vatValue ? _jsx(CheckIcon, {}) : vatValue && _jsx(ClearIcon, { onClick: clearValue }) }) }));
24
+ return (_jsx(FeatureContainer, { children: _jsx(Input, { label: t('vat_id'), inputProps: { maxLength: VAT_ID_LENGTH }, value: vatValue, onChange: function (event) { return handleOnChange(event.target.value); }, placeholder: '00000000000', warningType: 'alert', warningMessage: vatError && t(vatError), required: true, endAdornment: !vatError && vatValue ? _jsx(CheckIcon, {}) : vatValue && _jsx(ClearIcon, { onClick: clearValue }) }) }));
26
25
  };
27
26
  export default VATId;
@@ -1,4 +1,4 @@
1
1
  import * as yup from 'yup';
2
2
  export var Validation = yup.object().shape({
3
- vatId: yup.string().min(9).max(15).required('VAT ID is required')
3
+ vatId: yup.string().min(9, 'alert_vat').max(15, 'alert_vat').required('alert_vat')
4
4
  });
package/build/index.css CHANGED
@@ -1,8 +1,14 @@
1
1
  @import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap');
2
2
  @import url('https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap');
3
3
  @import url('https://fonts.googleapis.com/icon?family=Material+Icons');
4
+ @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300&display=swap');
5
+ @import url('https://fonts.googleapis.com/css?family=Tajawal&display=swap');
6
+
7
+ /* http://meyerweb.com/eric/tools/css/reset/
8
+ v2.0 | 20110126
9
+ License: none (public domain)
10
+ */
4
11
 
5
- /* reset all html elements */
6
12
  html,
7
13
  body,
8
14
  div,
@@ -10,7 +16,6 @@ span,
10
16
  applet,
11
17
  object,
12
18
  iframe,
13
- form,
14
19
  h1,
15
20
  h2,
16
21
  h3,
@@ -27,7 +32,104 @@ address,
27
32
  big,
28
33
  cite,
29
34
  code,
30
- body {
35
+ del,
36
+ dfn,
37
+ em,
38
+ img,
39
+ ins,
40
+ kbd,
41
+ q,
42
+ s,
43
+ samp,
44
+ small,
45
+ strike,
46
+ strong,
47
+ sub,
48
+ sup,
49
+ tt,
50
+ var,
51
+ b,
52
+ u,
53
+ i,
54
+ center,
55
+ dl,
56
+ dt,
57
+ dd,
58
+ ol,
59
+ ul,
60
+ li,
61
+ fieldset,
62
+ form,
63
+ label,
64
+ legend,
65
+ table,
66
+ caption,
67
+ tbody,
68
+ tfoot,
69
+ thead,
70
+ tr,
71
+ th,
72
+ td,
73
+ article,
74
+ aside,
75
+ canvas,
76
+ details,
77
+ embed,
78
+ figure,
79
+ figcaption,
80
+ footer,
81
+ header,
82
+ hgroup,
83
+ menu,
84
+ nav,
85
+ output,
86
+ ruby,
87
+ section,
88
+ summary,
89
+ time,
90
+ mark,
91
+ audio,
92
+ video {
31
93
  margin: 0;
32
94
  padding: 0;
95
+ border: 0;
96
+ font-size: 100%;
97
+ font: inherit;
98
+ vertical-align: baseline;
99
+ }
100
+ /* HTML5 display-role reset for older browsers */
101
+ article,
102
+ aside,
103
+ details,
104
+ figcaption,
105
+ figure,
106
+ footer,
107
+ header,
108
+ hgroup,
109
+ menu,
110
+ nav,
111
+ section {
112
+ display: block;
113
+ }
114
+ body {
115
+ line-height: 1;
116
+ }
117
+ ol,
118
+ ul {
119
+ list-style: none;
120
+ }
121
+ blockquote,
122
+ q {
123
+ quotes: none;
124
+ }
125
+ blockquote:before,
126
+ blockquote:after,
127
+ q:before,
128
+ q:after {
129
+ content: '';
130
+ content: none;
131
+ }
132
+ table {
133
+ border-collapse: collapse;
134
+ border-spacing: 0;
33
135
  }
@@ -1,13 +1,13 @@
1
1
  export var typography = {
2
2
  htmlFontSize: 16,
3
- fontFamily: '"Lato", "Roboto", "Tajawal"',
3
+ fontFamily: '"Lato", "Tajawal", "Roboto"',
4
4
  fontSize: 14,
5
5
  fontWeightLight: 300,
6
6
  fontWeightRegular: 400,
7
7
  fontWeightMedium: 500,
8
8
  fontWeightBold: 700,
9
9
  allVariants: {
10
- fontFamily: '"Lato", "Roboto", "Tajawal"',
10
+ fontFamily: '"Lato", "Tajawal", "Roboto"',
11
11
  fontSize: '0.875rem',
12
12
  lineHeight: 'normal',
13
13
  fontStyle: 'normal',
@@ -1,8 +1,8 @@
1
1
  export var string = '';
2
2
  export var maskPhone = function (str) {
3
3
  if (str === void 0) { str = ''; }
4
- var first = str.substring(0, 5);
5
- var lastTwo = str.substring(11, str.length);
4
+ var first = str.substring(0, 1);
5
+ var lastTwo = str.substring(str.length - 2, str.length);
6
6
  return first + '••••' + lastTwo;
7
7
  };
8
8
  export var maskID = function (str) {
@@ -1,9 +1,11 @@
1
1
  export declare const isNumber: (value: string) => boolean;
2
2
  export declare const removeAllCharsFromNumber: (str: string) => string;
3
+ export declare const removeOnlyNumbers: (str: string) => string;
3
4
  export declare const removeAllOtherThanAlphabet: (str: string) => string;
4
5
  export declare const removeAllNumberFromChars: (str: string) => string;
5
6
  export declare const keepEmailCharacters: (str: string) => string;
6
7
  export declare const removeAllOtherThanCharsAndNumber: (str: string) => string;
8
+ export declare const removeAllOtherThanCharsNumbersAndSpace: (str: string) => string;
7
9
  export declare function PasswordMatchLength(password: string): boolean;
8
10
  export declare function isPasswordHasUpperLetter(password: string): boolean;
9
11
  export declare function isPasswordHasLowerLetter(password: string): boolean;
@@ -4,6 +4,9 @@ export var isNumber = function (value) {
4
4
  export var removeAllCharsFromNumber = function (str) {
5
5
  return str.replace(/[^0-9]/g, '');
6
6
  };
7
+ export var removeOnlyNumbers = function (str) {
8
+ return str.replace(/[^\D]/g, '');
9
+ };
7
10
  export var removeAllOtherThanAlphabet = function (str) {
8
11
  return str.replace(/[^[A-Za-z]/g, '');
9
12
  };
@@ -16,6 +19,9 @@ export var keepEmailCharacters = function (str) {
16
19
  export var removeAllOtherThanCharsAndNumber = function (str) {
17
20
  return str.replace(/[^A-Za-z0-9]/g, '');
18
21
  };
22
+ export var removeAllOtherThanCharsNumbersAndSpace = function (str) {
23
+ return str.replace(/[^A-Za-z0-9 ]/g, '');
24
+ };
19
25
  export function PasswordMatchLength(password) {
20
26
  return password.length > 7;
21
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tap-payments/auth-jsconnect",
3
- "version": "1.0.10",
3
+ "version": "1.0.14",
4
4
  "description": "connect library, auth",
5
5
  "private": false,
6
6
  "main": "build/index.js",
@@ -1,5 +0,0 @@
1
- import * as React from 'react';
2
- export interface TimerProps {
3
- }
4
- declare const _default: React.MemoExoticComponent<({}: TimerProps) => JSX.Element>;
5
- export default _default;
@@ -1,20 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import * as React from 'react';
3
- import Box from '@mui/material/Box/Box';
4
- import { styled } from '@mui/material/styles';
5
- import { useTranslation } from 'react-i18next';
6
- import OTPTimer from '../../../../components/OTPTimer';
7
- import { DEFAULT_TIMER_VALUE } from '../../../../constants';
8
- var BoxStyled = styled(Box)(function (_a) {
9
- var theme = _a.theme;
10
- return ({
11
- display: 'flex',
12
- flexDirection: 'column',
13
- padding: theme.spacing(2.5, 0, 6.5, 0)
14
- });
15
- });
16
- var Timer = function (_a) {
17
- var t = useTranslation().t;
18
- return (_jsx(BoxStyled, { children: _jsx(OTPTimer, { timeEndLabel: t('resend_otp'), timeInSeconds: DEFAULT_TIMER_VALUE, onResetClick: function () { } }) }));
19
- };
20
- export default React.memo(Timer);
@@ -1,5 +0,0 @@
1
- import * as React from 'react';
2
- export interface TimerProps {
3
- }
4
- declare const _default: React.MemoExoticComponent<({}: TimerProps) => JSX.Element>;
5
- export default _default;
@@ -1,20 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import * as React from 'react';
3
- import Box from '@mui/material/Box/Box';
4
- import { styled } from '@mui/material/styles';
5
- import { useTranslation } from 'react-i18next';
6
- import OTPTimer from '../../../../components/OTPTimer';
7
- import { DEFAULT_TIMER_VALUE } from '../../../../constants';
8
- var BoxStyled = styled(Box)(function (_a) {
9
- var theme = _a.theme;
10
- return ({
11
- display: 'flex',
12
- flexDirection: 'column',
13
- padding: theme.spacing(2.5, 0, 3.75, 0)
14
- });
15
- });
16
- var Timer = function (_a) {
17
- var t = useTranslation().t;
18
- return (_jsx(BoxStyled, { children: _jsx(OTPTimer, { timeEndLabel: t('resend_otp'), timeInSeconds: DEFAULT_TIMER_VALUE, onResetClick: function () { } }) }));
19
- };
20
- export default React.memo(Timer);