@tap-payments/auth-jsconnect 1.0.72 → 1.0.77

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 (70) hide show
  1. package/build/@types/app.d.ts +7 -6
  2. package/build/@types/form.d.ts +2 -2
  3. package/build/api/auth.d.ts +7 -0
  4. package/build/api/auth.js +5 -1
  5. package/build/api/data.d.ts +1 -0
  6. package/build/api/data.js +5 -1
  7. package/build/api/entity.d.ts +1 -0
  8. package/build/api/entity.js +5 -1
  9. package/build/api/index.d.ts +9 -2
  10. package/build/api/index.js +3 -1
  11. package/build/api/individual.d.ts +8 -0
  12. package/build/api/individual.js +9 -0
  13. package/build/components/SimpleList/SimpleList.js +2 -2
  14. package/build/constants/api.d.ts +3 -0
  15. package/build/constants/api.js +10 -4
  16. package/build/constants/app.js +18 -6
  17. package/build/constants/assets.js +1 -1
  18. package/build/features/app/bank/bankStore.d.ts +3 -0
  19. package/build/features/app/bank/bankStore.js +45 -9
  20. package/build/features/app/business/businessStore.d.ts +4 -5
  21. package/build/features/app/business/businessStore.js +90 -54
  22. package/build/features/app/connect/connectStore.d.ts +1 -0
  23. package/build/features/app/connect/connectStore.js +19 -10
  24. package/build/features/app/individual/individualStore.d.ts +7 -1
  25. package/build/features/app/individual/individualStore.js +79 -30
  26. package/build/features/app/password/passwordStore.d.ts +4 -0
  27. package/build/features/app/password/passwordStore.js +71 -15
  28. package/build/features/bank/screens/Success/Success.js +4 -1
  29. package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +3 -0
  30. package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +87 -0
  31. package/build/features/bank/screens/SuccessWithFlowButtons/index.d.ts +2 -0
  32. package/build/features/bank/screens/SuccessWithFlowButtons/index.js +2 -0
  33. package/build/features/business/screens/Activities/ActivitiesList.d.ts +1 -1
  34. package/build/features/business/screens/Activities/SalesChannels.js +1 -1
  35. package/build/features/business/screens/Activities/validation.d.ts +24 -24
  36. package/build/features/business/screens/Activities/validation.js +2 -2
  37. package/build/features/business/screens/Customers/CustomerLocations.d.ts +1 -1
  38. package/build/features/business/screens/Customers/CustomerLocations.js +2 -2
  39. package/build/features/business/screens/Customers/ExpectedCustomers.js +2 -2
  40. package/build/features/business/screens/Customers/ExpectedSalesRange.js +30 -12
  41. package/build/features/business/screens/Customers/validation.js +2 -2
  42. package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +20 -12
  43. package/build/features/connect/screens/Individual/MobileNumber.js +11 -2
  44. package/build/features/connect/screens/Merchant/Merchant.js +9 -2
  45. package/build/features/connect/screens/Mobile/MobileNumber.js +11 -2
  46. package/build/features/featuresScreens.js +10 -0
  47. package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +14 -2
  48. package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.d.ts +5 -1
  49. package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +62 -9
  50. package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.d.ts +3 -1
  51. package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +5 -9
  52. package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +3 -6
  53. package/build/features/individual/screens/AdditionalIndividualInfo/validation.js +1 -11
  54. package/build/features/individual/screens/Success/Success.js +4 -1
  55. package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +3 -0
  56. package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +87 -0
  57. package/build/features/individual/screens/SuccessWithFlowButtons/index.d.ts +2 -0
  58. package/build/features/individual/screens/SuccessWithFlowButtons/index.js +2 -0
  59. package/build/features/password/screens/CreatePassword/CreatePassword.js +9 -10
  60. package/build/features/password/screens/Success/Success.js +6 -0
  61. package/build/features/shared/Button/FlowsButtons.d.ts +2 -0
  62. package/build/features/shared/Button/FlowsButtons.js +2 -2
  63. package/build/features/shared/Input/Input.d.ts +1 -1
  64. package/build/features/shared/Search/Search.d.ts +1 -1
  65. package/build/features/shared/Search/Search.js +2 -14
  66. package/build/utils/array.d.ts +1 -0
  67. package/build/utils/array.js +6 -0
  68. package/build/utils/string.d.ts +1 -0
  69. package/build/utils/string.js +7 -0
  70. package/package.json +1 -1
@@ -17,13 +17,14 @@ import { yupResolver } from '@hookform/resolvers/yup';
17
17
  import Box from '@mui/material/Box';
18
18
  import { styled } from '@mui/material/styles';
19
19
  import { useAppDispatch } from '../../../../hooks';
20
- import { handleNextScreenStep } from '../../../../app/settings';
21
20
  import Form from '../../../../components/Form';
22
21
  import { useLanguage } from '../../../../hooks';
23
22
  import ScreenContainer from '../../../shared/Containers/ScreenContainer';
24
23
  import Button from '../../../shared/Button';
25
24
  import { PasswordValidation } from './validation';
26
25
  import Password from './Password';
26
+ import { createPassword, passwordSelector } from '../../../app/password/passwordStore';
27
+ import { useSelector } from 'react-redux';
27
28
  var InputsContainerStyled = styled(Box)(function (_a) {
28
29
  var theme = _a.theme;
29
30
  return ({
@@ -31,20 +32,18 @@ var InputsContainerStyled = styled(Box)(function (_a) {
31
32
  });
32
33
  });
33
34
  var CreatePassword = function (_a) {
35
+ var t = useTranslation().t;
36
+ var isAr = useLanguage().isAr;
37
+ var dispatch = useAppDispatch();
38
+ var _b = useSelector(passwordSelector), data = _b.data, loading = _b.loading, error = _b.error;
34
39
  var methods = useForm({
35
40
  resolver: yupResolver(PasswordValidation),
36
- defaultValues: {
37
- password: '',
38
- confirmPassword: ''
39
- },
41
+ defaultValues: data.passwordData,
40
42
  mode: 'onChange'
41
43
  });
42
- var t = useTranslation().t;
43
- var isAr = useLanguage().isAr;
44
- var dispatch = useAppDispatch();
45
44
  var onSubmit = function (data) {
46
- dispatch(handleNextScreenStep());
45
+ dispatch(createPassword(data));
47
46
  };
48
- return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(Form, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(InputsContainerStyled, { children: _jsx(Password, {}) }), _jsx(Button, __assign({ disableBack: true, isAr: isAr, disabled: !methods.formState.isValid, loading: false }, { children: t('next') }))] })) })) }));
47
+ return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(Form, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(InputsContainerStyled, { children: _jsx(Password, {}) }), _jsx(Button, __assign({ disableBack: true, isAr: isAr, disabled: !methods.formState.isValid, loading: loading, error: t(error || '') }, { children: t('next') }))] })) })) }));
49
48
  };
50
49
  export default React.memo(CreatePassword);
@@ -1,9 +1,15 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import * as React from 'react';
3
3
  import { useTranslation } from 'react-i18next';
4
+ import { useAppDispatch } from '../../../../hooks';
5
+ import { updateLeadSuccess } from '../../../app/password/passwordStore';
4
6
  import SuccessScreen from '../../../shared/SuccessScreen';
5
7
  var Success = function (_a) {
6
8
  var t = useTranslation().t;
9
+ var dispatch = useAppDispatch();
10
+ React.useEffect(function () {
11
+ dispatch(updateLeadSuccess());
12
+ }, []);
7
13
  var onSuccess = function () { };
8
14
  return _jsx(SuccessScreen, { title: t('password_success_title'), onSuccess: onSuccess, successTitle: t('continue') });
9
15
  };
@@ -1,11 +1,13 @@
1
1
  /// <reference types="react" />
2
2
  import { ButtonProps } from '../../../components/Button';
3
+ import { SxProps, Theme } from '@mui/material/styles';
3
4
  export declare type ButtonItemProps = {
4
5
  title: string;
5
6
  href: string;
6
7
  src: string;
7
8
  hoverSrc: string;
8
9
  isCompleted: boolean;
10
+ sx?: SxProps<Theme> | undefined;
9
11
  };
10
12
  export interface EmailProvidersButtonsProps extends ButtonProps {
11
13
  buttons: ButtonItemProps[];
@@ -62,13 +62,13 @@ export default function FlowsButtons(_a) {
62
62
  var buttons = _a.buttons;
63
63
  var _b = React.useState(), index = _b[0], setIndex = _b[1];
64
64
  return (_jsx(ButtonBoxStyled, { children: buttons.map(function (_a, idx) {
65
- var title = _a.title, href = _a.href, src = _a.src, hoverSrc = _a.hoverSrc, isCompleted = _a.isCompleted;
65
+ var title = _a.title, href = _a.href, src = _a.src, hoverSrc = _a.hoverSrc, isCompleted = _a.isCompleted, sx = _a.sx;
66
66
  var isLast = idx === buttons.length - 1;
67
67
  var linkProps = {
68
68
  href: href,
69
69
  target: '_blank'
70
70
  };
71
71
  return (_createElement(Link, __assign({}, (!isCompleted && linkProps), { underline: 'none', key: idx, onMouseEnter: function () { return !isCompleted && setIndex(idx); }, onMouseLeave: function () { return setIndex(undefined); } }),
72
- _jsx(ButtonStyled, __assign({ isCompleted: isCompleted, sx: { mb: isLast ? 0 : 1.8 }, endIcon: isCompleted ? (_jsx(CheckIconStyled, {})) : (_jsx(Image, { sx: { height: 15 }, src: index === idx ? ICONS_NAMES.Arrow_white_right_icon : ICONS_NAMES.Arrow_filled_right_icon })), startIcon: _jsx(Image, { src: index === idx ? hoverSrc : src, alt: title }), type: 'button' }, { children: title }))));
72
+ _jsx(ButtonStyled, __assign({ isCompleted: isCompleted, sx: __assign({ mb: isLast ? 0 : 1.8 }, sx), endIcon: isCompleted ? (_jsx(CheckIconStyled, {})) : (_jsx(Image, { sx: { height: 15 }, src: index === idx ? ICONS_NAMES.Arrow_white_right_icon : ICONS_NAMES.Arrow_filled_right_icon })), startIcon: _jsx(Image, { src: index === idx ? hoverSrc : src, alt: title }), type: 'button' }, { children: title }))));
73
73
  }) }));
74
74
  }
@@ -13,7 +13,7 @@ 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 InputStyled: import("@emotion/styled").StyledComponent<Pick<InputProps, "name" | "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" | "value" | "components" | "componentsProps" | "autoFocus" | "fullWidth" | "required" | "rows" | "inputProps" | "inputRef" | "readOnly" | "autoComplete" | "disableInjectingGlobalStyles" | "endAdornment" | "inputComponent" | "multiline" | "renderSuffix" | "maxRows" | "minRows" | "startAdornment" | "disableUnderline" | "onEnterPressed" | "warningMessage"> & {
16
+ export declare const InputStyled: import("@emotion/styled").StyledComponent<Pick<InputProps, "name" | "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" | "components" | "componentsProps" | "value" | "autoFocus" | "fullWidth" | "required" | "rows" | "inputProps" | "inputRef" | "readOnly" | "autoComplete" | "disableInjectingGlobalStyles" | "endAdornment" | "inputComponent" | "multiline" | "renderSuffix" | "maxRows" | "minRows" | "startAdornment" | "disableUnderline" | "onEnterPressed" | "warningMessage"> & {
17
17
  placeholder?: string | undefined;
18
18
  hide?: boolean | undefined;
19
19
  warningType?: "alert" | "error" | "hint" | undefined;
@@ -3,5 +3,5 @@ interface SearchProps {
3
3
  showSearch?: boolean;
4
4
  onSearchValue?: (value: string) => void;
5
5
  }
6
- declare const Search: ({ onSearchValue, showSearch }: SearchProps) => JSX.Element;
6
+ declare const Search: ({ onSearchValue }: SearchProps) => JSX.Element;
7
7
  export default Search;
@@ -1,25 +1,13 @@
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
1
  import { jsx as _jsx } from "react/jsx-runtime";
13
2
  import * as React from 'react';
14
3
  import { useTranslation } from 'react-i18next';
15
4
  import Input from '../../shared/Input';
16
- import Collapse from '../../../components/Collapse';
17
5
  var Search = function (_a) {
18
- var onSearchValue = _a.onSearchValue, showSearch = _a.showSearch;
6
+ var onSearchValue = _a.onSearchValue;
19
7
  var t = useTranslation().t;
20
8
  var handleOnChange = function (event) {
21
9
  onSearchValue === null || onSearchValue === void 0 ? void 0 : onSearchValue(event.target.value);
22
10
  };
23
- return (_jsx(React.Fragment, { children: _jsx(Collapse, __assign({ in: showSearch }, { children: _jsx(Input, { placeholder: t('search_placeholder'), onChange: handleOnChange }) })) }));
11
+ return (_jsx(React.Fragment, { children: _jsx(Input, { placeholder: t('search_placeholder'), onChange: handleOnChange }) }));
24
12
  };
25
13
  export default Search;
@@ -6,3 +6,4 @@ export declare const removeArrayItem: (items: Array<string>, item: string) => st
6
6
  export declare const splitString: (string: string, splitter?: string) => string[];
7
7
  export declare const isInclude: (items: Array<string | number>, item: any) => boolean;
8
8
  export declare const findItem: (items: Array<string | number>, key: any) => string | number | undefined;
9
+ export declare const isExist: (items: Array<any>, id: string) => any;
@@ -36,3 +36,9 @@ export var isInclude = function (items, item) {
36
36
  export var findItem = function (items, key) {
37
37
  return items.find(function (item) { return item === key; });
38
38
  };
39
+ export var isExist = function (items, id) {
40
+ return items.find(function (_a) {
41
+ var sub = _a.sub;
42
+ return sub === null || sub === void 0 ? void 0 : sub.some(function (item) { return item.id === id; });
43
+ });
44
+ };
@@ -1,6 +1,7 @@
1
1
  import { DeviceInfo } from '../@types';
2
2
  export declare const maskPhone: (str?: string) => string;
3
3
  export declare const maskID: (str: string) => string;
4
+ export declare const showLastFour: (str: string) => string;
4
5
  export declare const getIndividualName: (name: string) => {
5
6
  first: string;
6
7
  middle: string;
@@ -9,6 +9,13 @@ export var maskID = function (str) {
9
9
  var lastTwo = str.substring(str.length - 2, str.length);
10
10
  return ' ••••' + lastTwo;
11
11
  };
12
+ export var showLastFour = function (str) {
13
+ if (str && str.length >= 4) {
14
+ var lastFour = str.substring(str.length - 4, str.length);
15
+ return lastFour;
16
+ }
17
+ return str;
18
+ };
12
19
  export var getIndividualName = function (name) {
13
20
  var _a;
14
21
  var nameArray = (name === null || name === void 0 ? void 0 : name.split(' ')) || [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tap-payments/auth-jsconnect",
3
- "version": "1.0.72",
3
+ "version": "1.0.77",
4
4
  "description": "connect library, auth",
5
5
  "private": false,
6
6
  "main": "build/index.js",