ui-soxo-bootstrap-core 2.4.25-dev.11 → 2.4.25-dev.13

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.
@@ -16,25 +16,6 @@ import { useState, useEffect, useRef } from 'react';
16
16
  * @returns {(seconds: number) => void} API.start - Start timer with seconds.
17
17
  * @returns {(expirytime: string) => void} API.startFromExpiry - Start timer using expiry string (e.g. "2025-09-04T12:13:09.000Z").
18
18
  *
19
- * @example
20
- * const { remaining, expired, formatted, start, startFromExpiry } = useOtpTimer();
21
- *
22
- * // Start with 30 seconds
23
- * useEffect(() => {
24
- * start(30);
25
- * }, []);
26
- *
27
- * // OR start from backend expiry timestamp
28
- * useEffect(() => {
29
- * startFromExpiry("2025-09-04T12:13:09.000Z");
30
- * }, []);
31
- *
32
- * return (
33
- * <div>
34
- * <p>Time left: {formatted}</p>
35
- * {expired && <p>OTP expired!</p>}
36
- * </div>
37
- * );
38
19
  */
39
20
 
40
21
  // helper to format time
@@ -121,9 +121,11 @@ function LoginPhone({ history, appSettings }) {
121
121
  .then((result) => {
122
122
  setLoading(false);
123
123
 
124
- const { user, access_token, refresh_token } = result;
124
+ const { user, access_token, refresh_token, insider_token } = result;
125
125
  if (access_token) localStorage.access_token = access_token;
126
126
 
127
+ if (insider_token) localStorage.insider_token = insider_token;
128
+
127
129
  if (result.success) {
128
130
  //two_factor_authentication variable is present then proceed Two factor authentication
129
131
  if (result.data && result.data.two_factor_authentication) {
@@ -516,28 +518,28 @@ function LoginPhone({ history, appSettings }) {
516
518
  return user.username;
517
519
  };
518
520
 
519
- const { globalCustomerHeader = () => {} } = appSettings;
521
+ const { globalCustomerHeader = () => { } } = appSettings;
520
522
 
521
523
  const themeName = process.env.REACT_APP_THEME; // e.g., 'purple'
522
524
  const isPurple = themeName === 'purple';
523
525
 
524
526
  const sectionStyle = isPurple
525
527
  ? {
526
- width: '100%',
527
- height: '100vh',
528
- backgroundImage: `${state.theme.colors.loginPageBackground}`,
529
- backgroundPosition: 'center bottom, center',
530
- backgroundRepeat: 'no-repeat, no-repeat',
531
- backgroundSize: 'cover, cover',
532
- }
528
+ width: '100%',
529
+ height: '100vh',
530
+ backgroundImage: `${state.theme.colors.loginPageBackground}`,
531
+ backgroundPosition: 'center bottom, center',
532
+ backgroundRepeat: 'no-repeat, no-repeat',
533
+ backgroundSize: 'cover, cover',
534
+ }
533
535
  : {
534
- width: '100%',
535
- height: '100vh',
536
- backgroundImage: `url(${backgroundImage}), ${state.theme.colors.loginPageBackground}`,
537
- backgroundPosition: 'center bottom, center',
538
- backgroundRepeat: 'no-repeat, no-repeat',
539
- backgroundSize: 'cover, cover',
540
- };
536
+ width: '100%',
537
+ height: '100vh',
538
+ backgroundImage: `url(${backgroundImage}), ${state.theme.colors.loginPageBackground}`,
539
+ backgroundPosition: 'center bottom, center',
540
+ backgroundRepeat: 'no-repeat, no-repeat',
541
+ backgroundSize: 'cover, cover',
542
+ };
541
543
 
542
544
  return (
543
545
  <section className="full-page" style={sectionStyle}>
@@ -610,10 +612,10 @@ function LoginPhone({ history, appSettings }) {
610
612
  <Text type="primary">Select Preferred OTP Verification Method</Text>
611
613
  <div className="otp-method-group">
612
614
  <Radio checked={communicationMode === 'email'} onChange={() => setCommunicationMode('email')}>
613
- Email <MailOutlined style={{ marginLeft: 6 }} />
615
+ Email <MailOutlined className="otp-icon" style={{ marginLeft: 6 }} />
614
616
  </Radio>
615
617
  <Radio checked={communicationMode === 'mobile'} onChange={() => setCommunicationMode('mobile')}>
616
- SMS <MessageOutlined style={{ marginLeft: 6 }} />
618
+ SMS <MessageOutlined className="otp-icon" style={{ marginLeft: 6 }} />
617
619
  </Radio>
618
620
  </div>
619
621
  {modeError && <p className="otp-mode-error">Please select a communication mode.</p>}
@@ -352,10 +352,14 @@ body {
352
352
  gap: 30px;
353
353
  font-size: 12px;
354
354
  }
355
+ .otp-icon {
356
+ position: relative;
357
+ top: 2px;
358
+ }
355
359
 
356
360
  .ant-radio-wrapper {
357
361
  display: flex;
358
- align-items: center;
362
+ // align-items: center;
359
363
  gap: 6px;
360
364
 
361
365
  svg {
@@ -231,7 +231,7 @@ const MenuAdd = ({ model, callback, edit, history, formContent, match, additiona
231
231
  {/* Route Ends */}
232
232
 
233
233
  {/* Switch */}
234
- <Form.Item name="is_visible" label="Visible" valuePropName="checked" rules={[{ required: true, message: 'Visibility is required' }]}>
234
+ <Form.Item name="is_visible" label="Visible" valuePropName="checked" required>
235
235
  <Switch />
236
236
  </Form.Item>
237
237
 
@@ -244,7 +244,7 @@ const MenuAdd = ({ model, callback, edit, history, formContent, match, additiona
244
244
  {/* Step Ends */}
245
245
 
246
246
  {/* Icon Name*/}
247
- <Form.Item name="icon_name" label="Icon Name" rules={[{ required: true, message: 'Icon name is required' }]}>
247
+ <Form.Item name="icon_name" label="Icon Name" required>
248
248
  <Input placeholder="Enter icon name" />
249
249
  </Form.Item>
250
250
  {/* Icon Name Ends */}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ui-soxo-bootstrap-core",
3
- "version": "2.4.25-dev.11",
3
+ "version": "2.4.25-dev.13",
4
4
  "description": "All the Core Components for you to start",
5
5
  "keywords": [
6
6
  "all in one"