oneticket-sdk-vi 1.0.2 → 1.0.4

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.
package/README.md ADDED
@@ -0,0 +1,2 @@
1
+ # OneTicket-sdk-
2
+ OneTicket-sdk
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export { default as MetroApp } from "./App";
2
+ import { ColorPalette } from "./src/theme/types";
2
3
  export type SdkConfig = {
3
4
  sdkKey: string;
4
5
  environment: 'preprod' | 'production';
@@ -7,6 +8,8 @@ export type SdkConfig = {
7
8
  phoneNumber: number;
8
9
  email?: string;
9
10
  };
11
+ colorPalette?: ColorPalette;
12
+ logo?: string;
10
13
  };
11
14
  export declare const initializeSdk: (config: SdkConfig) => void;
12
15
  export declare const getSdkConfig: () => SdkConfig;
@@ -15,8 +15,11 @@ const RefreshIcon_1 = __importDefault(require("../../../assets/icons/RefreshIcon
15
15
  const Avatar_1 = require("../Avatar/Avatar");
16
16
  const ThemeProvider_1 = require("../../../theme/ThemeProvider");
17
17
  const react_native_size_matters_1 = require("react-native-size-matters");
18
+ const index_1 = require("../../../../index");
19
+ const react_native_svg_1 = require("react-native-svg");
18
20
  const Header = ({ title, showBackButton = true, showHomeButton = true, showChooseCity = false, chatHeader = false, onBackPress, onRefresh, isRefetching, rightComponent, leftComponent, }) => {
19
21
  const { theme } = (0, ThemeProvider_1.useTheme)();
22
+ const config = (0, index_1.getSdkConfig)();
20
23
  const { navigate, goBack } = (0, native_1.useNavigation)();
21
24
  const { data: currectCity, isLoading: currectCityLoading } = (0, hooks_1.useFetchCurrectCity)({});
22
25
  const handleGoBack = () => {
@@ -39,19 +42,26 @@ const Header = ({ title, showBackButton = true, showHomeButton = true, showChoos
39
42
  shadowOpacity: 0.1,
40
43
  shadowRadius: 4,
41
44
  elevation: 4,
45
+ },
46
+ row: {
42
47
  flexDirection: 'row',
43
- justifyContent: chatHeader ? 'flex-start' : 'space-between',
44
48
  alignItems: 'center',
45
49
  },
46
- chatHeaderContainer: {
50
+ section: {
47
51
  flex: 1,
48
52
  flexDirection: 'row',
49
- justifyContent: 'space-between',
50
53
  alignItems: 'center',
51
54
  },
52
- leftContainer: {
53
- flexDirection: 'row',
55
+ leftSection: {
56
+ justifyContent: 'flex-start',
57
+ },
58
+ rightSection: {
59
+ justifyContent: 'flex-end',
60
+ },
61
+ centerSection: {
62
+ flexShrink: 1,
54
63
  alignItems: 'center',
64
+ justifyContent: 'center',
55
65
  },
56
66
  avatarContainer: {
57
67
  flexDirection: 'row',
@@ -84,8 +94,6 @@ const Header = ({ title, showBackButton = true, showHomeButton = true, showChoos
84
94
  borderRadius: (0, react_native_size_matters_1.ms)(20),
85
95
  paddingHorizontal: (0, react_native_size_matters_1.ms)(12),
86
96
  paddingVertical: (0, react_native_size_matters_1.mvs)(6),
87
- marginLeft: (0, react_native_size_matters_1.ms)(-40),
88
- marginRight: (0, react_native_size_matters_1.ms)(-8)
89
97
  },
90
98
  pressedCityButton: {
91
99
  backgroundColor: theme.colors.surfaceVariant,
@@ -99,9 +107,14 @@ const Header = ({ title, showBackButton = true, showHomeButton = true, showChoos
99
107
  width: (0, react_native_size_matters_1.ms)(40),
100
108
  height: (0, react_native_size_matters_1.mvs)(40),
101
109
  },
110
+ logo: {
111
+ width: (0, react_native_size_matters_1.ms)(30),
112
+ height: (0, react_native_size_matters_1.ms)(30),
113
+ marginRight: (0, react_native_size_matters_1.ms)(8),
114
+ },
102
115
  });
103
- return (react_1.default.createElement(react_native_1.View, { style: styles.container }, chatHeader ? (react_1.default.createElement(react_native_1.View, { style: styles.chatHeaderContainer },
104
- react_1.default.createElement(react_native_1.View, { style: styles.leftContainer },
116
+ return (react_1.default.createElement(react_native_1.View, { style: styles.container }, chatHeader ? (react_1.default.createElement(react_native_1.View, { style: [styles.row, { justifyContent: 'space-between' }] },
117
+ react_1.default.createElement(react_native_1.View, { style: styles.row },
105
118
  react_1.default.createElement(react_native_1.Pressable, { onPress: handleGoBack, style: ({ pressed }) => [
106
119
  styles.button,
107
120
  pressed && styles.pressedButton
@@ -115,20 +128,22 @@ const Header = ({ title, showBackButton = true, showHomeButton = true, showChoos
115
128
  react_1.default.createElement(react_native_1.Pressable, { onPress: onRefresh, disabled: isRefetching, style: ({ pressed }) => [
116
129
  styles.button,
117
130
  pressed && styles.pressedButton
118
- ] }, isRefetching ? (react_1.default.createElement(react_native_1.ActivityIndicator, { size: "small", color: theme.colors.primary[500] })) : (react_1.default.createElement(RefreshIcon_1.default, { size: (0, react_native_size_matters_1.ms)(23), color: theme.colors.text }))))) : (react_1.default.createElement(react_1.default.Fragment, null,
119
- leftComponent ? (react_1.default.createElement(react_native_1.View, null, leftComponent)) : showBackButton ? (react_1.default.createElement(react_native_1.Pressable, { onPress: handleGoBack, style: ({ pressed }) => [
120
- styles.button,
121
- pressed && styles.pressedButton
122
- ] },
123
- react_1.default.createElement(BackIcon_1.default, { size: (0, react_native_size_matters_1.ms)(24), color: theme.colors.text }))) : (react_1.default.createElement(react_native_1.View, { style: styles.emptySpace })),
124
- title ? (react_1.default.createElement(react_native_1.Text, { style: styles.title }, title)) : (react_1.default.createElement(react_native_1.View, { style: { width: (0, react_native_size_matters_1.ms)(32) } })),
125
- rightComponent ? (react_1.default.createElement(react_native_1.View, null, rightComponent)) : showHomeButton ? (react_1.default.createElement(react_native_1.Pressable, { onPress: () => navigate(MetroWithTabsStack_1.MetroWithTabsScreens.SelectStations, {}), style: ({ pressed }) => [
131
+ ] }, isRefetching ? (react_1.default.createElement(react_native_1.ActivityIndicator, { size: "small", color: theme.colors.primary[500] })) : (react_1.default.createElement(RefreshIcon_1.default, { size: (0, react_native_size_matters_1.ms)(23), color: theme.colors.text }))))) : (react_1.default.createElement(react_native_1.View, { style: styles.row },
132
+ react_1.default.createElement(react_native_1.View, { style: [styles.section, styles.leftSection] },
133
+ showBackButton && (react_1.default.createElement(react_native_1.Pressable, { onPress: handleGoBack, style: ({ pressed }) => [
134
+ styles.button,
135
+ pressed && styles.pressedButton
136
+ ] },
137
+ react_1.default.createElement(BackIcon_1.default, { size: (0, react_native_size_matters_1.ms)(24), color: theme.colors.text }))),
138
+ config.logo && config.logo.endsWith('.svg') ? (react_1.default.createElement(react_native_svg_1.SvgUri, { width: 30, height: 30, uri: config.logo })) : config.logo ? (react_1.default.createElement(react_native_1.Image, { source: { uri: config.logo }, style: styles.logo, resizeMode: "contain" })) : null),
139
+ react_1.default.createElement(react_native_1.View, { style: styles.centerSection }, title && react_1.default.createElement(react_native_1.Text, { style: styles.title }, title)),
140
+ react_1.default.createElement(react_native_1.View, { style: [styles.section, styles.rightSection] }, rightComponent ? (react_1.default.createElement(react_native_1.View, null, rightComponent)) : showHomeButton ? (react_1.default.createElement(react_native_1.Pressable, { onPress: () => navigate(MetroWithTabsStack_1.MetroWithTabsScreens.SelectStations, {}), style: ({ pressed }) => [
126
141
  styles.button,
127
142
  pressed && styles.pressedButton
128
143
  ] },
129
144
  react_1.default.createElement(HomeIcon_1.default, { size: (0, react_native_size_matters_1.ms)(28), color: theme.colors.text }))) : showChooseCity ? (react_1.default.createElement(react_native_1.Pressable, { style: ({ pressed }) => [
130
145
  styles.cityButton,
131
146
  pressed && styles.pressedCityButton
132
- ], onPress: () => navigate(MetroStack_1.MetroScreens.MetroSelection) }, currectCityLoading ? (react_1.default.createElement(react_native_1.ActivityIndicator, { size: "small", color: theme.colors.primary[500] })) : (react_1.default.createElement(react_native_1.Text, { style: styles.cityButtonText }, (currectCity === null || currectCity === void 0 ? void 0 : currectCity.currectCity) || 'Choose City')))) : (react_1.default.createElement(react_native_1.View, { style: styles.emptySpace }))))));
147
+ ], onPress: () => navigate(MetroStack_1.MetroScreens.MetroSelection) }, currectCityLoading ? (react_1.default.createElement(react_native_1.ActivityIndicator, { size: "small", color: theme.colors.primary[500] })) : (react_1.default.createElement(react_native_1.Text, { style: styles.cityButtonText }, (currectCity === null || currectCity === void 0 ? void 0 : currectCity.currectCity) || 'Choose City')))) : (react_1.default.createElement(react_native_1.View, { style: styles.emptySpace })))))));
133
148
  };
134
149
  exports.default = Header;
@@ -1,4 +1,6 @@
1
- export declare const basePath: any;
1
+ export declare const preProdBasePath = "https://demo-products.sequelstring.com/dmrc-buyer-dashboard";
2
+ export declare const prodBasePath = "https://oneticket-prod-dashboard.sequelstring.com";
3
+ export declare const basePath: string;
2
4
  export declare const signUpOtpSendApiPath: string;
3
5
  export declare const registerUserApiPath: string;
4
6
  export declare const loginOtpSendApiPath: string;
@@ -1,9 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getAppVersionApiPath = exports.hardCancelMetroTicketApiPath = exports.softCancelMetroTicketApiPath = exports.closeIssueApiPath = exports.sendMessageApiPath = exports.getChatApiPath = exports.getMetroIssueDetailsApiPath = exports.getAllMetroIssuesApiPath = exports.raiseMetroTicketIssueApiPath = exports.isQrActiveApiPath = exports.getMetroTicketStatusApiPath = exports.errorPaymentApiPath = exports.verifyPaymentApiPath = exports.createPaymentApiPath = exports.getRecentTransactionsApiPath = exports.getAllTransactionsApiPath = exports.confirmMetroTicketApiPath = exports.initMetroTicketV2ApiPath = exports.getMetroFaresApiPath = exports.findNearestStationApiPath = exports.getMetroStationsApiPath = exports.getMetroProvidersApiPath = exports.requestMetroProvidersApiPath = exports.currectCityApiPath = exports.selectCityApiPath = exports.allCityLinesApiPath = exports.allCitiesApiPath = exports.endSessionApiPath = exports.startSessionApiPath = exports.updateUserApiPath = exports.sdkLoginApiPath = exports.deleteUserApiPath = exports.logoutApiPath = exports.loggedInUserApiPath = exports.loginUserApiPath = exports.loginOtpSendApiPath = exports.registerUserApiPath = exports.signUpOtpSendApiPath = exports.basePath = void 0;
3
+ exports.getAppVersionApiPath = exports.hardCancelMetroTicketApiPath = exports.softCancelMetroTicketApiPath = exports.closeIssueApiPath = exports.sendMessageApiPath = exports.getChatApiPath = exports.getMetroIssueDetailsApiPath = exports.getAllMetroIssuesApiPath = exports.raiseMetroTicketIssueApiPath = exports.isQrActiveApiPath = exports.getMetroTicketStatusApiPath = exports.errorPaymentApiPath = exports.verifyPaymentApiPath = exports.createPaymentApiPath = exports.getRecentTransactionsApiPath = exports.getAllTransactionsApiPath = exports.confirmMetroTicketApiPath = exports.initMetroTicketV2ApiPath = exports.getMetroFaresApiPath = exports.findNearestStationApiPath = exports.getMetroStationsApiPath = exports.getMetroProvidersApiPath = exports.requestMetroProvidersApiPath = exports.currectCityApiPath = exports.selectCityApiPath = exports.allCityLinesApiPath = exports.allCitiesApiPath = exports.endSessionApiPath = exports.startSessionApiPath = exports.updateUserApiPath = exports.sdkLoginApiPath = exports.deleteUserApiPath = exports.logoutApiPath = exports.loggedInUserApiPath = exports.loginUserApiPath = exports.loginOtpSendApiPath = exports.registerUserApiPath = exports.signUpOtpSendApiPath = exports.basePath = exports.prodBasePath = exports.preProdBasePath = void 0;
4
+ const index_1 = require("../../index");
4
5
  // const basePath = `http://localhost:5001`;
5
- exports.basePath = `https://demo-products.sequelstring.com/dmrc-buyer-dashboard`;
6
- // export const basePath = `https://oneticket-prod-dashboard.sequelstring.com`;
6
+ exports.preProdBasePath = `https://demo-products.sequelstring.com/dmrc-buyer-dashboard`;
7
+ exports.prodBasePath = `https://oneticket-prod-dashboard.sequelstring.com`;
8
+ exports.basePath = (0, index_1.getSdkConfig)().environment === 'production' ? exports.prodBasePath : exports.preProdBasePath;
7
9
  // AUTH
8
10
  exports.signUpOtpSendApiPath = `${exports.basePath}/auth/otpToRegisterUser`;
9
11
  exports.registerUserApiPath = `${exports.basePath}/auth/registerUser`;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.colorPalettes = exports.darkColors = exports.lightColors = void 0;
4
+ const index_1 = require("../../index");
4
5
  // Base colors
5
6
  const baseColors = {
6
7
  white: '#FFFFFF',
@@ -123,7 +124,7 @@ const semanticColors = {
123
124
  exports.lightColors = Object.assign(Object.assign(Object.assign(Object.assign({}, baseColors), {
124
125
  // Color palettes
125
126
  // primary: tealPalette,
126
- primary: customBluePalette, rose: rosePalette, blue: bluePalette, emerald: emeraldPalette, amber: amberPalette, gray: grayPalette, coolGray: coolGrayPalette }), semanticColors), {
127
+ primary: (0, index_1.getSdkConfig)().colorPalette || customBluePalette, rose: rosePalette, blue: bluePalette, emerald: emeraldPalette, amber: amberPalette, gray: grayPalette, coolGray: coolGrayPalette }), semanticColors), {
127
128
  // Background colors
128
129
  background: baseColors.white, surface: baseColors.white, surfaceVariant: grayPalette[100],
129
130
  // Text colors
package/index.ts CHANGED
@@ -1,4 +1,5 @@
1
- export {default as MetroApp} from "./App";
1
+ export { default as MetroApp } from "./App";
2
+ import { ColorPalette } from "./src/theme/types";
2
3
 
3
4
  export type SdkConfig = {
4
5
  sdkKey: string;
@@ -8,6 +9,8 @@ export type SdkConfig = {
8
9
  phoneNumber: number;
9
10
  email?: string;
10
11
  };
12
+ colorPalette?: ColorPalette;
13
+ logo?: string;
11
14
  };
12
15
  let sdkConfig: SdkConfig | null = null;
13
16
  export const initializeSdk = (config: SdkConfig) => {
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oneticket-sdk-vi",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -5,7 +5,8 @@ import {
5
5
  Pressable,
6
6
  StyleSheet,
7
7
  ActivityIndicator,
8
- Platform
8
+ Platform,
9
+ Image
9
10
  } from 'react-native';
10
11
  import BackIcon from '../../../assets/icons/BackIcon';
11
12
  import { useNavigation } from '@react-navigation/native';
@@ -17,6 +18,8 @@ import RefreshIcon from '../../../assets/icons/RefreshIcon';
17
18
  import { Avatar } from '../Avatar/Avatar';
18
19
  import { useTheme } from '../../../theme/ThemeProvider';
19
20
  import { ms, mvs } from 'react-native-size-matters';
21
+ import { getSdkConfig } from '../../../../index';
22
+ import { SvgUri } from 'react-native-svg';
20
23
 
21
24
  interface HeaderProps {
22
25
  title?: string;
@@ -44,6 +47,7 @@ const Header: React.FC<HeaderProps> = ({
44
47
  leftComponent,
45
48
  }) => {
46
49
  const { theme } = useTheme();
50
+ const config = getSdkConfig();
47
51
  const { navigate, goBack } = useNavigation<MetroStackNavigationProp & MetroWithTabsStackNavigationProp>();
48
52
  const { data: currectCity, isLoading: currectCityLoading } = useFetchCurrectCity({});
49
53
 
@@ -67,19 +71,26 @@ const Header: React.FC<HeaderProps> = ({
67
71
  shadowOpacity: 0.1,
68
72
  shadowRadius: 4,
69
73
  elevation: 4,
74
+ },
75
+ row: {
70
76
  flexDirection: 'row',
71
- justifyContent: chatHeader ? 'flex-start' : 'space-between',
72
77
  alignItems: 'center',
73
78
  },
74
- chatHeaderContainer: {
79
+ section: {
75
80
  flex: 1,
76
81
  flexDirection: 'row',
77
- justifyContent: 'space-between',
78
82
  alignItems: 'center',
79
83
  },
80
- leftContainer: {
81
- flexDirection: 'row',
84
+ leftSection: {
85
+ justifyContent: 'flex-start',
86
+ },
87
+ rightSection: {
88
+ justifyContent: 'flex-end',
89
+ },
90
+ centerSection: {
91
+ flexShrink: 1,
82
92
  alignItems: 'center',
93
+ justifyContent: 'center',
83
94
  },
84
95
  avatarContainer: {
85
96
  flexDirection: 'row',
@@ -112,8 +123,6 @@ const Header: React.FC<HeaderProps> = ({
112
123
  borderRadius: ms(20),
113
124
  paddingHorizontal: ms(12),
114
125
  paddingVertical: mvs(6),
115
- marginLeft: ms(-40),
116
- marginRight: ms(-8)
117
126
  },
118
127
  pressedCityButton: {
119
128
  backgroundColor: theme.colors.surfaceVariant,
@@ -127,14 +136,18 @@ const Header: React.FC<HeaderProps> = ({
127
136
  width: ms(40),
128
137
  height: mvs(40),
129
138
  },
139
+ logo: {
140
+ width: ms(30),
141
+ height: ms(30),
142
+ marginRight: ms(8),
143
+ },
130
144
  });
131
145
 
132
146
  return (
133
147
  <View style={styles.container}>
134
- {/* Chat Header Style */}
135
148
  {chatHeader ? (
136
- <View style={styles.chatHeaderContainer}>
137
- <View style={styles.leftContainer}>
149
+ <View style={[styles.row, { justifyContent: 'space-between' }]}>
150
+ <View style={styles.row}>
138
151
  <Pressable
139
152
  onPress={handleGoBack}
140
153
  style={({ pressed }) => [
@@ -172,67 +185,70 @@ const Header: React.FC<HeaderProps> = ({
172
185
  </Pressable>
173
186
  </View>
174
187
  ) : (
175
- <>
176
- {/* Left Component or Back Button */}
177
- {leftComponent ? (
178
- <View>{leftComponent}</View>
179
- ) : showBackButton ? (
180
- <Pressable
181
- onPress={handleGoBack}
182
- style={({ pressed }) => [
183
- styles.button,
184
- pressed && styles.pressedButton
185
- ]}
186
- >
187
- <BackIcon size={ms(24)} color={theme.colors.text} />
188
- </Pressable>
189
- ) : (
190
- <View style={styles.emptySpace} />
191
- )}
188
+ <View style={styles.row}>
189
+ {/* Left section */}
190
+ <View style={[styles.section, styles.leftSection]}>
191
+ {showBackButton && (
192
+ <Pressable
193
+ onPress={handleGoBack}
194
+ style={({ pressed }) => [
195
+ styles.button,
196
+ pressed && styles.pressedButton
197
+ ]}
198
+ >
199
+ <BackIcon size={ms(24)} color={theme.colors.text} />
200
+ </Pressable>
201
+ )}
202
+ {config.logo && config.logo.endsWith('.svg') ? (
203
+ <SvgUri width={30} height={30} uri={config.logo} />
204
+ ) : config.logo ? (
205
+ <Image source={{ uri: config.logo }} style={styles.logo} resizeMode="contain" />
206
+ ) : null}
207
+ </View>
192
208
 
193
- {/* Title */}
194
- {title ? (
195
- <Text style={styles.title}>{title}</Text>
196
- ) : (
197
- <View style={{ width: ms(32) }} />
198
- )}
209
+ {/* Title section */}
210
+ <View style={styles.centerSection}>
211
+ {title && <Text style={styles.title}>{title}</Text>}
212
+ </View>
199
213
 
200
- {/* Right Component or Default Options */}
201
- {rightComponent ? (
202
- <View>{rightComponent}</View>
203
- ) : showHomeButton ? (
204
- <Pressable
205
- onPress={() => navigate(MetroWithTabsScreens.SelectStations, {})}
206
- style={({ pressed }) => [
207
- styles.button,
208
- pressed && styles.pressedButton
209
- ]}
210
- >
211
- <HomeIcon size={ms(28)} color={theme.colors.text} />
212
- </Pressable>
213
- ) : showChooseCity ? (
214
- <Pressable
215
- style={({ pressed }) => [
216
- styles.cityButton,
217
- pressed && styles.pressedCityButton
218
- ]}
219
- onPress={() => navigate(MetroScreens.MetroSelection)}
220
- >
221
- {currectCityLoading ? (
222
- <ActivityIndicator size="small" color={theme.colors.primary[500]} />
223
- ) : (
224
- <Text style={styles.cityButtonText}>
225
- {currectCity?.currectCity || 'Choose City'}
226
- </Text>
227
- )}
228
- </Pressable>
229
- ) : (
230
- <View style={styles.emptySpace} />
231
- )}
232
- </>
214
+ {/* Right section */}
215
+ <View style={[styles.section, styles.rightSection]}>
216
+ {rightComponent ? (
217
+ <View>{rightComponent}</View>
218
+ ) : showHomeButton ? (
219
+ <Pressable
220
+ onPress={() => navigate(MetroWithTabsScreens.SelectStations, {})}
221
+ style={({ pressed }) => [
222
+ styles.button,
223
+ pressed && styles.pressedButton
224
+ ]}
225
+ >
226
+ <HomeIcon size={ms(28)} color={theme.colors.text} />
227
+ </Pressable>
228
+ ) : showChooseCity ? (
229
+ <Pressable
230
+ style={({ pressed }) => [
231
+ styles.cityButton,
232
+ pressed && styles.pressedCityButton
233
+ ]}
234
+ onPress={() => navigate(MetroScreens.MetroSelection)}
235
+ >
236
+ {currectCityLoading ? (
237
+ <ActivityIndicator size="small" color={theme.colors.primary[500]} />
238
+ ) : (
239
+ <Text style={styles.cityButtonText}>
240
+ {currectCity?.currectCity || 'Choose City'}
241
+ </Text>
242
+ )}
243
+ </Pressable>
244
+ ) : (
245
+ <View style={styles.emptySpace} />
246
+ )}
247
+ </View>
248
+ </View>
233
249
  )}
234
250
  </View>
235
251
  );
236
252
  };
237
253
 
238
- export default Header;
254
+ export default Header;
@@ -1,6 +1,10 @@
1
+ import { getSdkConfig } from "../../index";
2
+
1
3
  // const basePath = `http://localhost:5001`;
2
- export const basePath: any = `https://demo-products.sequelstring.com/dmrc-buyer-dashboard`;
3
- // export const basePath = `https://oneticket-prod-dashboard.sequelstring.com`;
4
+ export const preProdBasePath = `https://demo-products.sequelstring.com/dmrc-buyer-dashboard`;
5
+ export const prodBasePath = `https://oneticket-prod-dashboard.sequelstring.com`;
6
+
7
+ export const basePath = getSdkConfig().environment === 'production' ? prodBasePath : preProdBasePath;
4
8
 
5
9
  // AUTH
6
10
  export const signUpOtpSendApiPath = `${basePath}/auth/otpToRegisterUser`;
@@ -1,3 +1,4 @@
1
+ import { getSdkConfig } from '../../index';
1
2
  import { ColorPalette, ThemeColors } from './types';
2
3
 
3
4
  // Base colors
@@ -135,7 +136,7 @@ export const lightColors: ThemeColors = {
135
136
 
136
137
  // Color palettes
137
138
  // primary: tealPalette,
138
- primary: customBluePalette,
139
+ primary: getSdkConfig().colorPalette || customBluePalette,
139
140
  rose: rosePalette,
140
141
  blue: bluePalette,
141
142
  emerald: emeraldPalette,