@tap-payments/auth-jsconnect 1.0.4 → 1.0.5

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 (156) hide show
  1. package/build/@types/app.d.ts +16 -0
  2. package/build/@types/app.js +6 -1
  3. package/build/@types/theme.d.ts +12 -3
  4. package/build/@types/theme.js +15 -1
  5. package/build/app/rootReducer.d.ts +1 -1
  6. package/build/app/rootReducer.js +1 -1
  7. package/build/app/settings.d.ts +7 -2
  8. package/build/app/settings.js +21 -6
  9. package/build/app/store.d.ts +2 -2
  10. package/build/assets/locales/ar.json +22 -3
  11. package/build/assets/locales/en.json +20 -1
  12. package/build/components/AnimationFlow/BottomSheet.d.ts +3 -2
  13. package/build/components/AnimationFlow/BottomSheet.js +30 -3
  14. package/build/components/AnimationFlow/Dialog.d.ts +3 -2
  15. package/build/components/AnimationFlow/Dialog.js +32 -9
  16. package/build/components/Button/Button.d.ts +7 -3
  17. package/build/components/Button/Button.js +20 -2
  18. package/build/components/Collapse/Collapse.d.ts +5 -0
  19. package/build/components/Collapse/Collapse.js +28 -0
  20. package/build/components/Collapse/index.d.ts +3 -0
  21. package/build/components/Collapse/index.js +2 -0
  22. package/build/components/DatePicker/DatePicker.js +3 -3
  23. package/build/components/Input/Input.d.ts +4 -1
  24. package/build/components/Input/Input.js +7 -5
  25. package/build/components/Loader/Loader.d.ts +10 -8
  26. package/build/components/Loader/Loader.js +14 -35
  27. package/build/components/OTPTimer/OTPTimer.d.ts +2 -1
  28. package/build/components/OTPTimer/OTPTimer.js +4 -5
  29. package/build/components/Providers/ThemeProvider.js +6 -9
  30. package/build/components/SimpleList/SimpleList.d.ts +10 -2
  31. package/build/components/SimpleList/SimpleList.js +53 -21
  32. package/build/components/Slide/Slide.d.ts +6 -0
  33. package/build/components/Slide/Slide.js +30 -0
  34. package/build/components/Slide/index.d.ts +3 -0
  35. package/build/components/Slide/index.js +2 -0
  36. package/build/components/SocialMediaGroup/SocialMediaGroup.d.ts +14 -0
  37. package/build/components/SocialMediaGroup/SocialMediaGroup.js +86 -0
  38. package/build/components/SocialMediaGroup/index.d.ts +3 -0
  39. package/build/components/SocialMediaGroup/index.js +2 -0
  40. package/build/components/ToggleButton/ToggleButton.d.ts +5 -0
  41. package/build/components/ToggleButton/ToggleButton.js +44 -0
  42. package/build/components/ToggleButton/index.d.ts +3 -0
  43. package/build/components/ToggleButton/index.js +2 -0
  44. package/build/components/ToggleButtonGroup/ToggleButtonGroup.d.ts +5 -0
  45. package/build/components/ToggleButtonGroup/ToggleButtonGroup.js +37 -0
  46. package/build/components/ToggleButtonGroup/index.d.ts +3 -0
  47. package/build/components/ToggleButtonGroup/index.js +2 -0
  48. package/build/components/Tooltip/Tooltip.d.ts +10 -0
  49. package/build/components/Tooltip/Tooltip.js +44 -0
  50. package/build/components/Tooltip/index.d.ts +3 -0
  51. package/build/components/Tooltip/index.js +2 -0
  52. package/build/components/Warning/Warning.d.ts +2 -1
  53. package/build/components/Warning/Warning.js +2 -1
  54. package/build/constants/app.d.ts +5 -4
  55. package/build/constants/app.js +35 -4
  56. package/build/constants/assets.d.ts +7 -0
  57. package/build/constants/assets.js +8 -1
  58. package/build/constants/index.d.ts +1 -0
  59. package/build/constants/index.js +1 -0
  60. package/build/constants/validation.d.ts +2 -0
  61. package/build/constants/validation.js +2 -0
  62. package/build/features/app/{midStore.d.ts → business/midStore.d.ts} +2 -2
  63. package/build/features/app/{midStore.js → business/midStore.js} +0 -0
  64. package/build/features/app/connect/midStore.d.ts +10 -0
  65. package/build/features/app/connect/midStore.js +18 -0
  66. package/build/features/business/index.d.ts +0 -0
  67. package/build/features/business/index.js +1 -0
  68. package/build/features/business/screens/IDBOD/DOB.d.ts +5 -0
  69. package/build/features/business/screens/IDBOD/DOB.js +44 -0
  70. package/build/features/business/screens/IDBOD/ID.d.ts +5 -0
  71. package/build/features/business/screens/IDBOD/ID.js +68 -0
  72. package/build/features/business/screens/IDBOD/IDBOD.d.ts +5 -0
  73. package/build/features/business/screens/IDBOD/IDBOD.js +86 -0
  74. package/build/features/business/screens/IDBOD/index.d.ts +3 -0
  75. package/build/features/business/screens/IDBOD/index.js +2 -0
  76. package/build/features/business/screens/IDBOD/validation.d.ts +11 -0
  77. package/build/features/business/screens/IDBOD/validation.js +5 -0
  78. package/build/features/connect/Connect.js +28 -18
  79. package/build/features/connect/Footer.d.ts +4 -0
  80. package/build/features/connect/Footer.js +16 -0
  81. package/build/features/connect/screens/Individual/Email.d.ts +5 -0
  82. package/build/features/connect/screens/Individual/Email.js +56 -0
  83. package/build/features/connect/screens/Individual/Individual.d.ts +5 -0
  84. package/build/features/connect/screens/Individual/Individual.js +86 -0
  85. package/build/features/connect/screens/Individual/Name.d.ts +5 -0
  86. package/build/features/connect/screens/Individual/Name.js +58 -0
  87. package/build/features/connect/screens/Individual/index.d.ts +3 -0
  88. package/build/features/connect/screens/Individual/index.js +2 -0
  89. package/build/features/connect/screens/Individual/validation.d.ts +11 -0
  90. package/build/features/connect/screens/Individual/validation.js +5 -0
  91. package/build/features/connect/screens/MID/BusinessCountry.d.ts +2 -6
  92. package/build/features/connect/screens/MID/BusinessCountry.js +16 -40
  93. package/build/features/connect/screens/MID/IDNumber.d.ts +0 -4
  94. package/build/features/connect/screens/MID/IDNumber.js +13 -10
  95. package/build/features/connect/screens/MID/MID.js +73 -19
  96. package/build/features/connect/screens/MID/MIDTitle.js +2 -2
  97. package/build/features/connect/screens/MID/MobileNumber.d.ts +2 -7
  98. package/build/features/connect/screens/MID/MobileNumber.js +23 -48
  99. package/build/features/connect/screens/MID/validation.d.ts +18 -0
  100. package/build/features/connect/screens/MID/validation.js +8 -0
  101. package/build/features/connect/screens/Merchant/BrandName.d.ts +5 -0
  102. package/build/features/connect/screens/Merchant/BrandName.js +99 -0
  103. package/build/features/connect/screens/Merchant/Merchant.d.ts +5 -0
  104. package/build/features/connect/screens/Merchant/Merchant.js +94 -0
  105. package/build/features/connect/screens/Merchant/SocialMedia.d.ts +5 -0
  106. package/build/features/connect/screens/Merchant/SocialMedia.js +87 -0
  107. package/build/features/connect/screens/Merchant/TAC.d.ts +5 -0
  108. package/build/features/connect/screens/Merchant/TAC.js +88 -0
  109. package/build/features/connect/screens/Merchant/index.d.ts +3 -0
  110. package/build/features/connect/screens/Merchant/index.js +2 -0
  111. package/build/features/connect/screens/Merchant/validation.d.ts +50 -0
  112. package/build/features/connect/screens/Merchant/validation.js +23 -0
  113. package/build/features/connect/screens/OTP/OTP.d.ts +6 -2
  114. package/build/features/connect/screens/OTP/OTP.js +64 -25
  115. package/build/features/connect/screens/OTP/OTPInput.d.ts +5 -0
  116. package/build/features/connect/screens/OTP/OTPInput.js +51 -0
  117. package/build/features/connect/screens/OTP/OTPTimer.d.ts +5 -0
  118. package/build/features/connect/screens/OTP/OTPTimer.js +35 -0
  119. package/build/features/connect/screens/OTP/validation.d.ts +8 -0
  120. package/build/features/connect/screens/OTP/validation.js +4 -0
  121. package/build/features/connect/screens/Password/Password.d.ts +5 -0
  122. package/build/features/connect/screens/Password/Password.js +86 -0
  123. package/build/features/connect/screens/Password/PasswordInput.d.ts +5 -0
  124. package/build/features/connect/screens/Password/PasswordInput.js +73 -0
  125. package/build/features/connect/screens/Password/index.d.ts +3 -0
  126. package/build/features/connect/screens/Password/index.js +2 -0
  127. package/build/features/connect/screens/Password/validation.d.ts +8 -0
  128. package/build/features/connect/screens/Password/validation.js +4 -0
  129. package/build/features/connect/screens/ThankYou/ThankYou.d.ts +5 -0
  130. package/build/features/connect/screens/ThankYou/ThankYou.js +76 -0
  131. package/build/features/connect/screens/ThankYou/index.d.ts +3 -0
  132. package/build/features/connect/screens/ThankYou/index.js +2 -0
  133. package/build/features/featuresScreens.d.ts +2 -0
  134. package/build/features/featuresScreens.js +28 -0
  135. package/build/hooks/index.d.ts +4 -0
  136. package/build/hooks/index.js +4 -0
  137. package/build/hooks/useAppDispatch.d.ts +4 -0
  138. package/build/hooks/useAppDispatch.js +2 -0
  139. package/build/hooks/useAppSelector.d.ts +3 -0
  140. package/build/hooks/useAppSelector.js +2 -0
  141. package/build/hooks/useAppTheme.js +3 -2
  142. package/build/hooks/useEventListener.d.ts +5 -0
  143. package/build/hooks/useEventListener.js +20 -0
  144. package/build/hooks/useLanguage.d.ts +4 -0
  145. package/build/hooks/useLanguage.js +8 -0
  146. package/build/index.css +5 -0
  147. package/build/theme/palette.js +1 -0
  148. package/build/theme/theme.d.ts +1 -1
  149. package/build/theme/theme.js +0 -1
  150. package/build/utils/string.d.ts +1 -1
  151. package/build/utils/string.js +1 -3
  152. package/build/utils/validation.d.ts +4 -0
  153. package/build/utils/validation.js +12 -0
  154. package/package.json +120 -116
  155. package/build/app/hooks.d.ts +0 -7
  156. package/build/app/hooks.js +0 -3
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export interface CountryCode {
2
3
  created: number;
3
4
  updated: number;
@@ -24,3 +25,18 @@ export interface CountryCode {
24
25
  digits: number;
25
26
  supported_by_tap: boolean;
26
27
  }
28
+ export interface ScreenStepNavigation {
29
+ name: string;
30
+ next: string;
31
+ prev: string;
32
+ order: number;
33
+ }
34
+ export interface FeatureScreenStep {
35
+ element: React.LazyExoticComponent<any>;
36
+ name: string;
37
+ }
38
+ export declare enum SocialMediaTypes {
39
+ WEB = "website",
40
+ INSTAGRAM = "instagram",
41
+ TWITTER = "twitter"
42
+ }
@@ -1 +1,6 @@
1
- export {};
1
+ export var SocialMediaTypes;
2
+ (function (SocialMediaTypes) {
3
+ SocialMediaTypes["WEB"] = "website";
4
+ SocialMediaTypes["INSTAGRAM"] = "instagram";
5
+ SocialMediaTypes["TWITTER"] = "twitter";
6
+ })(SocialMediaTypes || (SocialMediaTypes = {}));
@@ -1,5 +1,14 @@
1
1
  import { Theme } from '@mui/material/styles';
2
- export declare type ThemeMode = 'dark' | 'light';
3
- export declare type LanguageMode = 'en' | 'ar';
4
- export declare type DirectionMode = 'ltr' | 'rtl';
2
+ export declare enum ThemeMode {
3
+ DARK = "dark",
4
+ LIGHT = "light"
5
+ }
6
+ export declare enum LanguageMode {
7
+ AR = "ar",
8
+ EN = "en"
9
+ }
10
+ export declare enum DirectionMode {
11
+ RTL = "rtl",
12
+ LTR = "ltr"
13
+ }
5
14
  export declare type ThemContext = Partial<Theme> | ((outerTheme: Theme) => Theme);
@@ -1 +1,15 @@
1
- export {};
1
+ export var ThemeMode;
2
+ (function (ThemeMode) {
3
+ ThemeMode["DARK"] = "dark";
4
+ ThemeMode["LIGHT"] = "light";
5
+ })(ThemeMode || (ThemeMode = {}));
6
+ export var LanguageMode;
7
+ (function (LanguageMode) {
8
+ LanguageMode["AR"] = "ar";
9
+ LanguageMode["EN"] = "en";
10
+ })(LanguageMode || (LanguageMode = {}));
11
+ export var DirectionMode;
12
+ (function (DirectionMode) {
13
+ DirectionMode["RTL"] = "rtl";
14
+ DirectionMode["LTR"] = "ltr";
15
+ })(DirectionMode || (DirectionMode = {}));
@@ -1,5 +1,5 @@
1
1
  declare const rootReducer: {
2
2
  settings: import("redux").Reducer<import("./settings").SettingsState, import("redux").AnyAction>;
3
- mid: import("redux").Reducer<import("../features/app/midStore").MIDState, import("redux").AnyAction>;
3
+ mid: import("redux").Reducer<import("../features/app/connect/midStore").MIDState, import("redux").AnyAction>;
4
4
  };
5
5
  export default rootReducer;
@@ -1,5 +1,5 @@
1
1
  import settings from './settings';
2
- import mid from '../features/app/midStore';
2
+ import mid from '../features/app/connect/midStore';
3
3
  var rootReducer = {
4
4
  settings: settings,
5
5
  mid: mid
@@ -1,16 +1,21 @@
1
1
  import { RootState } from './store';
2
- import { ActionState, LanguageMode, SharedState, ThemeMode } from '../@types';
2
+ import { ActionState, LanguageMode, SharedState, ThemeMode, ScreenStepNavigation } from '../@types';
3
3
  export interface SettingsData {
4
4
  skin: ThemeMode;
5
5
  language: LanguageMode;
6
+ activeScreen: ScreenStepNavigation;
7
+ featureScreensNavigation: Array<ScreenStepNavigation>;
6
8
  }
7
9
  export interface SettingsState extends SharedState<SettingsData> {
8
10
  }
9
11
  export declare const settingsSlice: import("@reduxjs/toolkit").Slice<SettingsState, {
10
12
  handleSkin: (state: SettingsState, action: ActionState<ThemeMode>) => void;
11
13
  handleLanguage: (state: SettingsState, action: ActionState<LanguageMode>) => void;
14
+ handleNextScreenStep: (state: SettingsState, action: ActionState<ScreenStepNavigation>) => void;
15
+ handlePrevScreenStep: (state: SettingsState, action: ActionState<ScreenStepNavigation>) => void;
16
+ handleActiveFlowScreens: (state: SettingsState, action: ActionState<Array<ScreenStepNavigation>>) => void;
12
17
  }, "settings">;
13
- export declare const handleSkin: import("@reduxjs/toolkit").ActionCreatorWithPayload<ThemeMode, string>, handleLanguage: import("@reduxjs/toolkit").ActionCreatorWithPayload<LanguageMode, string>;
18
+ export declare const handleSkin: import("@reduxjs/toolkit").ActionCreatorWithPayload<ThemeMode, string>, handleLanguage: import("@reduxjs/toolkit").ActionCreatorWithPayload<LanguageMode, string>, handleActiveFlowScreens: import("@reduxjs/toolkit").ActionCreatorWithPayload<ScreenStepNavigation[], string>, handleNextScreenStep: import("@reduxjs/toolkit").ActionCreatorWithPayload<ScreenStepNavigation, string>, handlePrevScreenStep: import("@reduxjs/toolkit").ActionCreatorWithPayload<ScreenStepNavigation, string>;
14
19
  declare const _default: import("redux").Reducer<SettingsState, import("redux").AnyAction>;
15
20
  export default _default;
16
21
  export declare const settingsSelector: (state: RootState) => SettingsState;
@@ -1,13 +1,15 @@
1
1
  var _a;
2
2
  import { createSlice } from '@reduxjs/toolkit';
3
3
  import { getStoredData, storeData } from '../utils/storage';
4
- import { LOCAL_STORAGE_KEYS } from '../constants';
4
+ import { LOCAL_STORAGE_KEYS, CONNECT_SCREENS_NAVIGATION } from '../constants';
5
5
  var initialState = {
6
6
  error: null,
7
7
  loading: false,
8
8
  data: {
9
9
  skin: getStoredData(LOCAL_STORAGE_KEYS.themeMode) || 'light',
10
- language: getStoredData(LOCAL_STORAGE_KEYS.languageMode) || 'en'
10
+ language: getStoredData(LOCAL_STORAGE_KEYS.languageMode) || 'en',
11
+ activeScreen: CONNECT_SCREENS_NAVIGATION[0],
12
+ featureScreensNavigation: CONNECT_SCREENS_NAVIGATION
11
13
  }
12
14
  };
13
15
  export var settingsSlice = createSlice({
@@ -21,12 +23,25 @@ export var settingsSlice = createSlice({
21
23
  handleLanguage: function (state, action) {
22
24
  state.data.language = action.payload;
23
25
  storeData(LOCAL_STORAGE_KEYS.languageMode, action.payload);
26
+ },
27
+ handleNextScreenStep: function (state, action) {
28
+ var next = state.data.featureScreensNavigation.find(function (item) { return item.name === action.payload.next; });
29
+ if (!next)
30
+ return alert('Next screen step not found');
31
+ state.data.activeScreen = next;
32
+ },
33
+ handlePrevScreenStep: function (state, action) {
34
+ var prev = state.data.featureScreensNavigation.find(function (item) { return item.name === action.payload.prev; });
35
+ if (!prev)
36
+ return alert('Prev screen step not found');
37
+ state.data.activeScreen = prev;
38
+ },
39
+ handleActiveFlowScreens: function (state, action) {
40
+ state.data.featureScreensNavigation = action.payload;
24
41
  }
25
42
  },
26
- extraReducers: function (builder) {
27
- console.log(builder);
28
- }
43
+ extraReducers: function () { }
29
44
  });
30
- export var handleSkin = (_a = settingsSlice.actions, _a.handleSkin), handleLanguage = _a.handleLanguage;
45
+ export var handleSkin = (_a = settingsSlice.actions, _a.handleSkin), handleLanguage = _a.handleLanguage, handleActiveFlowScreens = _a.handleActiveFlowScreens, handleNextScreenStep = _a.handleNextScreenStep, handlePrevScreenStep = _a.handlePrevScreenStep;
31
46
  export default settingsSlice.reducer;
32
47
  export var settingsSelector = function (state) { return state.settings; };
@@ -1,10 +1,10 @@
1
1
  import { ThunkAction, Action } from '@reduxjs/toolkit';
2
2
  export declare const store: import("@reduxjs/toolkit").EnhancedStore<{
3
3
  settings: import("./settings").SettingsState;
4
- mid: import("../features/app/midStore").MIDState;
4
+ mid: import("../features/app/connect/midStore").MIDState;
5
5
  }, import("redux").AnyAction, import("@reduxjs/toolkit").MiddlewareArray<[import("redux-thunk").ThunkMiddleware<{
6
6
  settings: import("./settings").SettingsState;
7
- mid: import("../features/app/midStore").MIDState;
7
+ mid: import("../features/app/connect/midStore").MIDState;
8
8
  }, import("redux").AnyAction, undefined>]>>;
9
9
  export declare type AppDispatch = typeof store.dispatch;
10
10
  export declare type RootState = ReturnType<typeof store.getState>;
@@ -4,12 +4,31 @@
4
4
  "follow_us": "Follow us",
5
5
  "business_country_label": "Business Country",
6
6
  "business_country_placeholder": "Select Business Country",
7
- "id_number_label": "ID number",
7
+ "id_number_label": "رقم الهوية",
8
8
  "switch_to_mobile": "Switch to mobile number",
9
9
  "mobile_id_title": "Welcome to Tap Payments",
10
10
  "mobile_id_description": "Help us to get your information to start collecting online payments",
11
11
  "mobile_number_label": "Mobile number",
12
12
  "switch_to_id": "Switch to ID number",
13
- "date_of_birth": "Date of Birth",
14
- "ide_opt_sent_title": "تم إرسال رقم التحقق إلى "
13
+ "date_of_birth": "تاريخ الميلاد",
14
+ "ide_opt_sent_title": "تم إرسال رقم التحقق إلى ",
15
+ "signup_merchant_name_label": "الاسم بالكامل",
16
+ "signup_enter_email": "البريد الإلكتروني",
17
+ "signin_email_placeholder": "بريدك الالكتروني",
18
+ "brand_name_label": "Brand Name",
19
+ "brand_name_description": "Please enter brand name for your business. The brand name will appear for your customers. (Note - brand names might be taken sometime, therefore please provide a brand name that is legally registered under your business",
20
+ "brand_name_placeholder": "Brand Name",
21
+ "resend_otp": "إعادة إرسال الرمز",
22
+ "website_placeholder": "www.business.com",
23
+ "twitter_placeholder": "business",
24
+ "instagram_placeholder": "business",
25
+ "next": "التالي",
26
+ "email_not_valid": "الرجاء إدخال بريد إلكتروني صحيح",
27
+ "name_not_valid": "الرجاء إدخال اسم صحيح",
28
+ "read_agree_terms_and_conditions_message": "I have read and agreed to the",
29
+ "terms_and_conditions_link_title": " terms and conditions",
30
+ "thankyou_message": "شكرا لاختيارك تاب للمدفوعات الالكترونية. سوف يتم التواصل معكم في أقرب وقت.",
31
+ "password_label": "Password",
32
+ "password_placeholder": "Your Password",
33
+ "password_is_required": "Password is required"
15
34
  }
@@ -11,5 +11,24 @@
11
11
  "mobile_number_label": "Mobile number",
12
12
  "switch_to_id": "Switch to ID number",
13
13
  "date_of_birth": "Date of Birth",
14
- "ide_opt_sent_title": "OTP has been sent to "
14
+ "ide_opt_sent_title": "OTP has been sent to ",
15
+ "signup_merchant_name_label": "Full Name",
16
+ "signup_enter_email": "Enter Email",
17
+ "signin_email_placeholder": "Your E-mail",
18
+ "brand_name_label": "Brand Name",
19
+ "brand_name_description": "Please enter brand name for your business. The brand name will appear for your customers. (Note - brand names might be taken sometime, therefore please provide a brand name that is legally registered under your business",
20
+ "brand_name_placeholder": "Brand Name",
21
+ "resend_otp": "Resend OTP",
22
+ "website_placeholder": "www.business.com",
23
+ "twitter_placeholder": "business",
24
+ "instagram_placeholder": "business",
25
+ "next": "Next",
26
+ "email_not_valid": "Please enter a valid email",
27
+ "name_not_valid": "Please enter a valid name",
28
+ "read_agree_terms_and_conditions_message": "I have read and agreed to the",
29
+ "terms_and_conditions_link_title": " terms and conditions",
30
+ "thankyou_message": "Thank you for your interest in Tap. we will contact you shortly.",
31
+ "password_label": "Password",
32
+ "password_placeholder": "Your Password",
33
+ "password_is_required": "Password is required"
15
34
  }
@@ -1,8 +1,9 @@
1
1
  import * as React from 'react';
2
+ import { BottomSheetProps as MainBottomSheetProps } from 'react-spring-bottom-sheet';
2
3
  import 'react-spring-bottom-sheet/dist/style.css';
3
- interface BottomSheetProps {
4
+ export interface BottomSheetProps extends MainBottomSheetProps {
4
5
  children: React.ReactNode;
5
6
  open: boolean;
6
7
  }
7
- declare const _default: React.MemoExoticComponent<({ open, children }: BottomSheetProps) => JSX.Element>;
8
+ declare const _default: React.MemoExoticComponent<({ open, children, ...rest }: BottomSheetProps) => JSX.Element>;
8
9
  export default _default;
@@ -9,6 +9,17 @@ var __assign = (this && this.__assign) || function () {
9
9
  };
10
10
  return __assign.apply(this, arguments);
11
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
+ };
12
23
  import { jsx as _jsx } from "react/jsx-runtime";
13
24
  import * as React from 'react';
14
25
  import { BottomSheet } from 'react-spring-bottom-sheet';
@@ -19,14 +30,30 @@ var BottomSheetStyled = styled(BottomSheet)(function (_a) {
19
30
  return ({
20
31
  '[data-rsbs-header]:before': {
21
32
  width: '80px'
33
+ },
34
+ '[data-rsbs-overlay]': {
35
+ backgroundColor: theme.palette.background.paper
36
+ },
37
+ '[data-rsbs-scroll]': {
38
+ '&::-webkit-scrollbar': {
39
+ width: '0px'
40
+ },
41
+ '&::-webkit-scrollbar-track': {
42
+ boxShadow: 'inset 0 0 6px rgba(0,0,0,0.00)',
43
+ webkitBoxShadow: 'inset 0 0 6px rgba(0,0,0,0.00)'
44
+ },
45
+ '&::-webkit-scrollbar-thumb': {
46
+ backgroundColor: 'rgba(0,0,0,.1)',
47
+ outline: '1px solid slategrey'
48
+ }
22
49
  }
23
50
  });
24
51
  });
25
52
  var BottomSheetComponent = function (_a) {
26
- var open = _a.open, children = _a.children;
53
+ var open = _a.open, children = _a.children, rest = __rest(_a, ["open", "children"]);
27
54
  return (_jsx(BottomSheetStyled, __assign({ open: open, snapPoints: function (_a) {
28
55
  var maxHeight = _a.maxHeight;
29
- return [maxHeight / 6, maxHeight * 0.9];
30
- } }, { children: children })));
56
+ return [maxHeight / 3, maxHeight * 0.9];
57
+ } }, rest, { children: children })));
31
58
  };
32
59
  export default React.memo(BottomSheetComponent);
@@ -1,9 +1,10 @@
1
1
  import * as React from 'react';
2
- export interface DialogProps {
2
+ import { DialogProps as MUIDialogProps } from '@mui/material/Dialog';
3
+ export interface DialogProps extends MUIDialogProps {
3
4
  open: boolean;
4
5
  children: React.ReactNode;
5
6
  footer?: React.ReactNode;
6
7
  transitionDuration?: number;
7
8
  }
8
- declare const _default: React.MemoExoticComponent<({ open, children, footer, transitionDuration }: DialogProps) => JSX.Element>;
9
+ declare const _default: React.MemoExoticComponent<({ open, children, footer, transitionDuration, ...rest }: DialogProps) => JSX.Element>;
9
10
  export default _default;
@@ -9,16 +9,27 @@ var __assign = (this && this.__assign) || function () {
9
9
  };
10
10
  return __assign.apply(this, arguments);
11
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
+ };
12
23
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
24
  import * as React from 'react';
14
- import { useTranslation } from 'react-i18next';
15
25
  import MuiDialog from '@mui/material/Dialog';
16
26
  import DialogContent from '@mui/material/DialogContent';
17
- import Slide from '@mui/material/Slide';
18
27
  import Paper from '@mui/material/Paper';
19
28
  import Box from '@mui/material/Box';
20
29
  import { styled } from '@mui/material/styles';
21
- import { ICONS_NAMES, LANGUAGE_MODE } from '../../constants';
30
+ import { ICONS_NAMES } from '../../constants';
31
+ import { useLanguage } from '../../hooks';
32
+ import Slide from '../Slide';
22
33
  import LogoBadge from '../LogoBadge';
23
34
  import Icon from '../Icon';
24
35
  var Transition = React.forwardRef(function Transition(props, ref) {
@@ -30,7 +41,9 @@ var PaperStyled = styled(Paper)(function (_a) {
30
41
  boxShadow: theme.shadows[1],
31
42
  borderRadius: theme.spacing(1.5),
32
43
  backgroundColor: theme.palette.background.paper,
33
- color: theme.palette.text.primary
44
+ color: theme.palette.text.primary,
45
+ margin: "".concat(theme.spacing(5, 4, 4, 5), " !important"),
46
+ maxHeight: "calc(100vh - ".concat(theme.spacing(10), ") !important")
34
47
  });
35
48
  });
36
49
  var DialogContentStyled = styled(DialogContent)(function (_a) {
@@ -39,11 +52,22 @@ var DialogContentStyled = styled(DialogContent)(function (_a) {
39
52
  return (_b = {
40
53
  padding: theme.spacing(0),
41
54
  width: theme.spacing(46.875),
42
- minHeight: theme.spacing(58.75)
55
+ height: '100%'
43
56
  },
44
57
  _b[theme.breakpoints.down('sm')] = {
45
58
  width: '100%'
46
59
  },
60
+ _b['&::-webkit-scrollbar'] = {
61
+ width: '0px'
62
+ },
63
+ _b['&::-webkit-scrollbar-track'] = {
64
+ boxShadow: 'inset 0 0 6px rgba(0,0,0,0.00)',
65
+ webkitBoxShadow: 'inset 0 0 6px rgba(0,0,0,0.00)'
66
+ },
67
+ _b['&::-webkit-scrollbar-thumb'] = {
68
+ backgroundColor: 'rgba(0,0,0,.1)',
69
+ outline: '1px solid slategrey'
70
+ },
47
71
  _b);
48
72
  });
49
73
  var LogoIconBoxStyled = styled(Box)(function (_a) {
@@ -70,15 +94,14 @@ var LogoIconStyled = styled(Icon)(function (_a) {
70
94
  });
71
95
  });
72
96
  var Dialog = function (_a) {
73
- var open = _a.open, children = _a.children, footer = _a.footer, transitionDuration = _a.transitionDuration;
74
- var i18n = useTranslation().i18n;
75
- var isAR = i18n.language === LANGUAGE_MODE.AR;
97
+ var open = _a.open, children = _a.children, footer = _a.footer, transitionDuration = _a.transitionDuration, rest = __rest(_a, ["open", "children", "footer", "transitionDuration"]);
98
+ var isAr = useLanguage().isAr;
76
99
  return (_jsxs(MuiDialog, __assign({ PaperProps: {
77
100
  elevation: 0
78
101
  }, sx: {
79
102
  '& .MuiDialog-paper': {
80
103
  overflowY: 'visible'
81
104
  }
82
- }, PaperComponent: PaperStyled, open: open, TransitionComponent: Transition, transitionDuration: transitionDuration || 500, keepMounted: true, "aria-describedby": 'dialog-slide-description' }, { children: [_jsxs(DialogContentStyled, { children: [_jsx(LogoBadge, { src: ICONS_NAMES.LOGO_ICON }), _jsx(LogoIconBoxStyled, { children: _jsx(LogoIconStyled, { src: isAR ? ICONS_NAMES.TAP_AR : ICONS_NAMES.TAP_EN, alt: 'tap logo' }) }), children] }), footer] })));
105
+ }, PaperComponent: PaperStyled, open: open, TransitionComponent: Transition, transitionDuration: transitionDuration || 500, keepMounted: true, "aria-describedby": 'dialog-slide-description' }, rest, { children: [_jsxs(DialogContentStyled, { children: [_jsx(LogoBadge, { src: ICONS_NAMES.LOGO_ICON }), _jsx(LogoIconBoxStyled, { children: _jsx(LogoIconStyled, { src: isAr ? ICONS_NAMES.TAP_AR : ICONS_NAMES.TAP_EN, alt: 'tap logo' }) }), children] }), footer] })));
83
106
  };
84
107
  export default React.memo(Dialog);
@@ -1,5 +1,9 @@
1
1
  import * as React from 'react';
2
- import { ButtonProps } from '@mui/material/Button';
3
- export type { ButtonProps };
4
- declare const _default: React.MemoExoticComponent<({ children, ...rest }: ButtonProps<"button", {}>) => JSX.Element>;
2
+ import { ButtonProps as MUIButtonProps } from '@mui/material/Button';
3
+ export interface ButtonProps extends MUIButtonProps {
4
+ }
5
+ declare const _default: React.MemoExoticComponent<{
6
+ ({ children, startIcon, endIcon, ...rest }: ButtonProps): JSX.Element;
7
+ defaultProps: {};
8
+ }>;
5
9
  export default _default;
@@ -29,16 +29,34 @@ var ButtonStyled = styled(Button)(function (_a) {
29
29
  return ({
30
30
  color: theme.palette.common.white,
31
31
  backgroundColor: theme.palette.primary.main,
32
+ minHeight: theme.spacing(5.5),
33
+ maxHeight: theme.spacing(5.5),
34
+ borderRadius: theme.spacing(4.1),
35
+ fontWeight: 'bold',
36
+ lineHeight: 1.7,
37
+ display: 'flex',
38
+ justifyContent: 'space-between',
32
39
  '&:hover': {
33
40
  backgroundColor: theme.palette.primary.main
34
41
  },
35
42
  '&:active': {
36
43
  backgroundColor: theme.palette.primary.main
44
+ },
45
+ ':disabled': {
46
+ backgroundColor: theme.palette.secondary.main,
47
+ color: theme.palette.common.white
48
+ },
49
+ '& .MuiButton-endIcon': {
50
+ margin: theme.spacing(0)
51
+ },
52
+ '& .MuiButton-startIcon': {
53
+ margin: theme.spacing(0)
37
54
  }
38
55
  });
39
56
  });
40
57
  var ButtonComponent = function (_a) {
41
- var children = _a.children, rest = __rest(_a, ["children"]);
42
- return _jsx(ButtonStyled, __assign({}, rest, { children: children }));
58
+ var children = _a.children, startIcon = _a.startIcon, endIcon = _a.endIcon, rest = __rest(_a, ["children", "startIcon", "endIcon"]);
59
+ return (_jsx(ButtonStyled, __assign({ startIcon: startIcon || _jsx("span", {}), endIcon: endIcon || _jsx("span", {}), disableFocusRipple: true, disableElevation: true, disableRipple: true, disableTouchRipple: true, fullWidth: true }, rest, { children: children })));
43
60
  };
61
+ ButtonComponent.defaultProps = {};
44
62
  export default React.memo(ButtonComponent);
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import { CollapseProps as MUICollapseProps } from '@mui/material/Collapse';
3
+ export interface CollapseProps extends MUICollapseProps {
4
+ }
5
+ export default function Collapse({ children, ...rest }: CollapseProps): JSX.Element;
@@ -0,0 +1,28 @@
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 MUICollapse from '@mui/material/Collapse';
25
+ export default function Collapse(_a) {
26
+ var children = _a.children, rest = __rest(_a, ["children"]);
27
+ return (_jsx(MUICollapse, __assign({ unmountOnExit: true, timeout: 500 }, rest, { children: children })));
28
+ }
@@ -0,0 +1,3 @@
1
+ import Collapse, { CollapseProps } from './Collapse';
2
+ export type { CollapseProps };
3
+ export default Collapse;
@@ -0,0 +1,2 @@
1
+ import Collapse from './Collapse';
2
+ export default Collapse;
@@ -27,7 +27,7 @@ import 'react-calendar/dist/Calendar.css';
27
27
  import Box from '@mui/material/Box';
28
28
  import { styled } from '@mui/material/styles';
29
29
  import Divider from '@mui/material/Divider';
30
- import Collapse from '@mui/material/Collapse';
30
+ import Collapse from '../Collapse';
31
31
  import CalendarTodayOutlined from '@mui/icons-material/CalendarTodayOutlined';
32
32
  import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
33
33
  import ExpandLessIcon from '@mui/icons-material/ExpandLess';
@@ -85,7 +85,7 @@ var DatePicker = function (_a) {
85
85
  var defaultMax = new Date();
86
86
  var defaultMin = new Date('1900-01-01');
87
87
  var toggleCalender = function (event) {
88
- var elementId = 'connect-collapse-template';
88
+ var elementId = 'animation-flow-template-content';
89
89
  if (anchor) {
90
90
  setTimeout(function () { return scrollDown(elementId); }, 500);
91
91
  return setAnchor(null);
@@ -104,6 +104,6 @@ var DatePicker = function (_a) {
104
104
  return (_jsxs(Container, __assign({ disabled: disabled, id: 'container-calendar' }, { children: [_jsx(InputFieldStyled, { endAdornment: _jsx(ArrowIcon, __assign({ disabled: disabled }, { children: disabled ? '' : arrowIcon })), value: date ? formattedDate(date) : '', placeholder: 'YYYY-MM-DD', onClick: function (e) {
105
105
  if (!disabled)
106
106
  toggleCalender(e);
107
- }, startAdornment: calenderIcon, disabled: !disabled, readOnly: readOnly, dir: dir }), _jsxs(Collapse, __assign({ in: !!anchor, unmountOnExit: true, timeout: { enter: 500, exit: 500 } }, { children: [_jsx(Calendar, __assign({}, rest, { value: date, calendarType: 'Hebrew', onChange: handleOnDateChange, locale: rest.locale, maxDate: rest.maxDate || defaultMax, minDate: rest.minDate || defaultMin })), _jsx(Divider, {})] }))] })));
107
+ }, startAdornment: calenderIcon, disabled: !disabled, readOnly: readOnly, dir: dir }), _jsxs(Collapse, __assign({ in: !!anchor }, { children: [_jsx(Calendar, __assign({}, rest, { value: date, calendarType: 'Hebrew', onChange: handleOnDateChange, locale: rest.locale, maxDate: rest.maxDate || defaultMax, minDate: rest.minDate || defaultMin })), _jsx(Divider, {})] }))] })));
108
108
  };
109
109
  export default memo(DatePicker);
@@ -5,12 +5,15 @@ export interface InputFieldProps extends InputProps {
5
5
  hide?: boolean;
6
6
  startAdornment?: React.ReactNode;
7
7
  endAdornment?: React.ReactNode;
8
+ warningType?: 'alert' | 'error';
9
+ warningMessage?: string;
8
10
  }
9
11
  declare const _default: React.MemoExoticComponent<{
10
- ({ onEnterPressed, hide, endAdornment, startAdornment, ...rest }: InputFieldProps): JSX.Element;
12
+ ({ onEnterPressed, hide, endAdornment, startAdornment, warningType, warningMessage, ...rest }: InputFieldProps): JSX.Element;
11
13
  defaultProps: {
12
14
  hide: boolean;
13
15
  placeholder: string;
16
+ warningType: string;
14
17
  };
15
18
  }>;
16
19
  export default _default;
@@ -20,10 +20,11 @@ var __rest = (this && this.__rest) || function (s, e) {
20
20
  }
21
21
  return t;
22
22
  };
23
- import { jsx as _jsx } from "react/jsx-runtime";
23
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
24
24
  import { memo } from 'react';
25
25
  import Input from '@mui/material/Input';
26
- import Collapse from '@mui/material/Collapse';
26
+ import Collapse from '../Collapse';
27
+ import Warning from '../Warning';
27
28
  import { alpha, styled } from '@mui/material/styles';
28
29
  var InputStyled = styled(Input)(function (_a) {
29
30
  var theme = _a.theme;
@@ -63,7 +64,7 @@ var InputStyled = styled(Input)(function (_a) {
63
64
  });
64
65
  });
65
66
  var InputField = function (_a) {
66
- var onEnterPressed = _a.onEnterPressed, hide = _a.hide, endAdornment = _a.endAdornment, startAdornment = _a.startAdornment, rest = __rest(_a, ["onEnterPressed", "hide", "endAdornment", "startAdornment"]);
67
+ var onEnterPressed = _a.onEnterPressed, hide = _a.hide, endAdornment = _a.endAdornment, startAdornment = _a.startAdornment, warningType = _a.warningType, warningMessage = _a.warningMessage, rest = __rest(_a, ["onEnterPressed", "hide", "endAdornment", "startAdornment", "warningType", "warningMessage"]);
67
68
  var onKeyPress = function (e) {
68
69
  var _a;
69
70
  if (e.key === 'Enter')
@@ -72,10 +73,11 @@ var InputField = function (_a) {
72
73
  };
73
74
  if (!rest.defaultValue)
74
75
  delete rest.defaultValue;
75
- return (_jsx(Collapse, __assign({ in: !hide }, { children: _jsx(InputStyled, __assign({ onKeyPress: onKeyPress, endAdornment: endAdornment, startAdornment: startAdornment }, rest)) })));
76
+ return (_jsxs(Collapse, __assign({ in: !hide }, { children: [_jsx(InputStyled, __assign({ onKeyPress: onKeyPress, endAdornment: endAdornment, startAdornment: startAdornment }, rest)), _jsx(Collapse, __assign({ in: !!warningMessage, timeout: 400 }, { children: _jsx(Warning, __assign({ warningType: warningType }, { children: warningMessage })) }))] })));
76
77
  };
77
78
  InputField.defaultProps = {
78
79
  hide: false,
79
- placeholder: '500000000'
80
+ placeholder: '500000000',
81
+ warningType: 'error'
80
82
  };
81
83
  export default memo(InputField);
@@ -3,19 +3,21 @@ export interface LoaderProps {
3
3
  outerColor?: string;
4
4
  innerColor?: string;
5
5
  duration?: number;
6
- runAnimation?: boolean;
6
+ toggleAnimation?: boolean;
7
7
  size?: number;
8
8
  style?: React.CSSProperties;
9
- svgStyle?: React.CSSProperties;
9
+ className?: string;
10
10
  }
11
- declare const _default: React.MemoExoticComponent<{
12
- ({ outerColor, innerColor, duration, runAnimation, style, svgStyle, size }: LoaderProps): JSX.Element;
13
- defaultProps: {
11
+ declare function Loader(props: LoaderProps): JSX.Element;
12
+ declare namespace Loader {
13
+ var defaultProps: {
14
14
  outerColor: string;
15
15
  innerColor: string;
16
- runAnimation: boolean;
17
- size: number;
18
16
  duration: number;
17
+ toggleAnimation: boolean;
18
+ size: number;
19
+ style: null;
19
20
  };
20
- }>;
21
+ }
22
+ declare const _default: React.MemoExoticComponent<typeof Loader>;
21
23
  export default _default;