tabexseriescomponents 0.0.695 → 0.0.697

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/dist/index.cjs.js CHANGED
@@ -18256,6 +18256,7 @@ var CardsSection = function CardsSection(props) {
18256
18256
  cardobj.productendpointurl = arrayItem.productinfo.productendpointurl;
18257
18257
  cardobj.hassale = arrayItem.productinfo.hassale;
18258
18258
  cardobj.productid = arrayItem.productinfo.productid;
18259
+ cardobj.vendorid = arrayItem.productinfo.vendorproviderid;
18259
18260
  cardobj.hasvariants = arrayItem.productinfo.hasvariants;
18260
18261
  cardobj.description_en = arrayItem.productinfo.description_en;
18261
18262
  cardobj.description_ar = arrayItem.productinfo.description_ar;
@@ -70017,7 +70018,8 @@ var Productcard_with_zoominonhover = function Productcard_with_zoominonhover(pro
70017
70018
  functype: 'add',
70018
70019
  productid: item.productid,
70019
70020
  variantid: '',
70020
- quantity: item.quantity
70021
+ quantity: item.quantity,
70022
+ vendorid: item.vendorid
70021
70023
  };
70022
70024
  var runfunc = false;
70023
70025
  if (addtocardpayloadobj.productid.length != 0 && addtocardpayloadobj.quantity > 0) {
package/dist/index.esm.js CHANGED
@@ -18207,6 +18207,7 @@ var CardsSection = function CardsSection(props) {
18207
18207
  cardobj.productendpointurl = arrayItem.productinfo.productendpointurl;
18208
18208
  cardobj.hassale = arrayItem.productinfo.hassale;
18209
18209
  cardobj.productid = arrayItem.productinfo.productid;
18210
+ cardobj.vendorid = arrayItem.productinfo.vendorproviderid;
18210
18211
  cardobj.hasvariants = arrayItem.productinfo.hasvariants;
18211
18212
  cardobj.description_en = arrayItem.productinfo.description_en;
18212
18213
  cardobj.description_ar = arrayItem.productinfo.description_ar;
@@ -69968,7 +69969,8 @@ var Productcard_with_zoominonhover = function Productcard_with_zoominonhover(pro
69968
69969
  functype: 'add',
69969
69970
  productid: item.productid,
69970
69971
  variantid: '',
69971
- quantity: item.quantity
69972
+ quantity: item.quantity,
69973
+ vendorid: item.vendorid
69972
69974
  };
69973
69975
  var runfunc = false;
69974
69976
  if (addtocardpayloadobj.productid.length != 0 && addtocardpayloadobj.quantity > 0) {
package/dist/index.umd.js CHANGED
@@ -18080,6 +18080,7 @@
18080
18080
  cardobj.productendpointurl = arrayItem.productinfo.productendpointurl;
18081
18081
  cardobj.hassale = arrayItem.productinfo.hassale;
18082
18082
  cardobj.productid = arrayItem.productinfo.productid;
18083
+ cardobj.vendorid = arrayItem.productinfo.vendorproviderid;
18083
18084
  cardobj.hasvariants = arrayItem.productinfo.hasvariants;
18084
18085
  cardobj.description_en = arrayItem.productinfo.description_en;
18085
18086
  cardobj.description_ar = arrayItem.productinfo.description_ar;
@@ -69841,7 +69842,8 @@
69841
69842
  functype: 'add',
69842
69843
  productid: item.productid,
69843
69844
  variantid: '',
69844
- quantity: item.quantity
69845
+ quantity: item.quantity,
69846
+ vendorid: item.vendorid
69845
69847
  };
69846
69848
  var runfunc = false;
69847
69849
  if (addtocardpayloadobj.productid.length != 0 && addtocardpayloadobj.quantity > 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tabexseriescomponents",
3
- "version": "0.0.695",
3
+ "version": "0.0.697",
4
4
  "description": "your description",
5
5
  "main": "dist/index.cjs.js",
6
6
  "scripts": {
@@ -7,31 +7,42 @@ import { GoStar } from '@react-icons/all-files/go/GoStar';
7
7
  import { IoIosStar } from '@react-icons/all-files/io/IoIosStar';
8
8
  import { fontSize, width } from '@mui/system';
9
9
  import { CountdownCircleTimer } from 'react-countdown-circle-timer';
10
- const minuteSeconds = 60;
11
- const hourSeconds = 3600;
12
- const daySeconds = 86400;
10
+ // const minuteSeconds = 60;
11
+ // const hourSeconds = 3600;
12
+ // const daySeconds = 86400;
13
13
 
14
- const timerProps = {
15
- isPlaying: true,
16
- size: 120,
17
- strokeWidth: 6,
18
- };
14
+ // const timerProps = {
15
+ // isPlaying: true,
16
+ // size: 120,
17
+ // strokeWidth: 6,
18
+ // };
19
19
 
20
- const renderTime = (dimension, time) => {
21
- return (
22
- <div className="time-wrapper">
23
- <div className="time">{time}</div>
24
- <div>{dimension}</div>
25
- </div>
26
- );
20
+ const formatTime = (time) => {
21
+ const days = Math.floor(time / (60 * 60 * 24));
22
+ const hours = Math.floor((time % (60 * 60 * 24)) / (60 * 60));
23
+ const minutes = Math.floor((time % (60 * 60)) / 60);
24
+ const seconds = time % 60;
25
+
26
+ return { days, hours, minutes, seconds };
27
27
  };
28
+ // const renderTime = (dimension, time) => {
29
+ // return (
30
+ // <div className="time-wrapper">
31
+ // <div className="time">{time}</div>
32
+ // <div>{dimension}</div>
33
+ // </div>
34
+ // );
35
+ // };
28
36
 
29
- const getTimeSeconds = (time) => (minuteSeconds - time) | 0;
30
- const getTimeMinutes = (time) => ((time % hourSeconds) / minuteSeconds) | 0;
31
- const getTimeHours = (time) => ((time % daySeconds) / hourSeconds) | 0;
32
- const getTimeDays = (time) => (time / daySeconds) | 0;
37
+ // const getTimeSeconds = (time) => (minuteSeconds - time) | 0;
38
+ // const getTimeMinutes = (time) => ((time % hourSeconds) / minuteSeconds) | 0;
39
+ // const getTimeHours = (time) => ((time % daySeconds) / hourSeconds) | 0;
40
+ // const getTimeDays = (time) => (time / daySeconds) | 0;
33
41
 
34
42
  const ServicesectionCenteredcards = (props) => {
43
+ const targetStartDate = new Date('2024-12-16T12:00:00');
44
+ const [remainingTimeInSeconds, setRemainingTimeInSeconds] = useState(0);
45
+
35
46
  const [sectionproperties, setsectionproperties] = useState('');
36
47
  const [cardsarray, setcardsarray] = useState([]);
37
48
  const StatePagePropertiesContext = props.actions.StatePagePropertiesContext;
@@ -43,9 +54,23 @@ const ServicesectionCenteredcards = (props) => {
43
54
  const stratTime = Date.now() / 1000; // use UNIX timestamp in seconds
44
55
  const endTime = stratTime + 243248; // use UNIX timestamp in seconds
45
56
 
46
- const remainingTime = endTime - stratTime;
47
- const days = Math.ceil(remainingTime / daySeconds);
48
- const daysDuration = days * daySeconds;
57
+ // const remainingTime = endTime - stratTime;
58
+ // // const days = Math.ceil(remainingTime / daySeconds);
59
+ // const daysDuration = days * daySeconds;
60
+ useEffect(() => {
61
+ const interval = setInterval(() => {
62
+ const currentTime = new Date();
63
+ const differenceInSeconds = Math.max(Math.floor((targetStartDate - currentTime) / 1000), 0);
64
+ setRemainingTimeInSeconds(differenceInSeconds);
65
+ }, 1000); // Update every second
66
+
67
+ return () => clearInterval(interval); // Cleanup interval on unmount
68
+ }, [targetStartDate]);
69
+
70
+ // Format the remaining time into days, hours, minutes, and seconds
71
+ const { days, hours, minutes, seconds } = formatTime(remainingTimeInSeconds);
72
+ const [maincontainerarrayofobjs, setmaincontainerarrayofobjs] = useState([]);
73
+
49
74
  useEffect(() => {
50
75
  var secpropobj = {};
51
76
  StatePagePropertiesContext.pageobj.sections.forEach(function (sectionitem, sectionindex) {
@@ -67,7 +92,6 @@ const ServicesectionCenteredcards = (props) => {
67
92
  }
68
93
  }
69
94
  }, [sectionproperties]);
70
- const [maincontainerarrayofobjs, setmaincontainerarrayofobjs] = useState([]);
71
95
  useEffect(() => {
72
96
  if (sectionproperties.length != 0 && sectionproperties.maincontainerarrayofobjs != undefined) {
73
97
  var maincontainerarrayofobjsparsed = JSON.parse(sectionproperties.maincontainerarrayofobjs);
@@ -338,16 +362,69 @@ const ServicesectionCenteredcards = (props) => {
338
362
  {/* innersectionbgcolorhover */}
339
363
  {sectionproperties.showcountdown == 'Yes' && (
340
364
  <div class="row m-0 w-100 allcentered">
365
+ {/* <CountdownCircleTimer isPlaying duration={remainingTimeInSeconds} colors="#4e9af1" strokeWidth={8} size={120} initialRemainingTime={remainingTimeInSeconds}>
366
+ {() => (
367
+ <div style={{ fontSize: '20px', textAlign: 'center' }}>
368
+ <div>{days}d</div>
369
+ <div>{hours}h</div>
370
+ <div>{minutes}m</div>
371
+ <div>{seconds}s</div>
372
+ </div>
373
+ )}
374
+ </CountdownCircleTimer> */}
375
+ <div className="col-3 col-sm-6 allcentered mb-md-3">
376
+ <CountdownCircleTimer isPlaying duration={remainingTimeInSeconds} colors="#013c48" strokeWidth={8} size={120} initialRemainingTime={remainingTimeInSeconds}>
377
+ {({ elapsedTime, color }) => (
378
+ <span style={{ color: '#bea04b', fontSize: 23, fontWeight: 600 }} class="allcentered">
379
+ {/* {renderTime('يوم', '18')} */}
380
+ <div className="time-wrapper allcentered flex-column">
381
+ <div className="time">{days}</div>
382
+ <div>يوم</div>
383
+ </div>
384
+ </span>
385
+ )}
386
+ </CountdownCircleTimer>
387
+ </div>
341
388
  <div className="col-3 col-sm-6 allcentered mb-md-3">
342
- <CountdownCircleTimer {...timerProps} colors="#013c48" duration={daysDuration} initialRemainingTime={remainingTime}>
389
+ <CountdownCircleTimer isPlaying duration={remainingTimeInSeconds} colors="#013c48" strokeWidth={8} size={120} initialRemainingTime={remainingTimeInSeconds}>
343
390
  {({ elapsedTime, color }) => (
344
391
  <span style={{ color: '#bea04b', fontSize: 23, fontWeight: 600 }} class="allcentered">
345
- {renderTime('يوم', '18')}
392
+ {/* {renderTime('يوم', '18')} */}
393
+ <div className="time-wrapper allcentered flex-column">
394
+ <div className="time">{hours}</div>
395
+ <div>ساعة</div>
396
+ </div>
346
397
  </span>
347
398
  )}
348
399
  </CountdownCircleTimer>
349
400
  </div>
350
401
  <div className="col-3 col-sm-6 allcentered mb-md-3">
402
+ <CountdownCircleTimer isPlaying duration={remainingTimeInSeconds} colors="#013c48" strokeWidth={8} size={120} initialRemainingTime={remainingTimeInSeconds}>
403
+ {({ elapsedTime, color }) => (
404
+ <span style={{ color: '#bea04b', fontSize: 23, fontWeight: 600 }} class="allcentered">
405
+ {/* {renderTime('يوم', '18')} */}
406
+ <div className="time-wrapper allcentered flex-column">
407
+ <div className="time">{minutes}</div>
408
+ <div>دقيقة</div>
409
+ </div>
410
+ </span>
411
+ )}
412
+ </CountdownCircleTimer>
413
+ </div>
414
+ <div className="col-3 col-sm-6 allcentered mb-md-3">
415
+ <CountdownCircleTimer isPlaying duration={remainingTimeInSeconds} colors="#013c48" strokeWidth={8} size={120} initialRemainingTime={remainingTimeInSeconds}>
416
+ {({ elapsedTime, color }) => (
417
+ <span style={{ color: '#bea04b', fontSize: 23, fontWeight: 600 }} class="allcentered">
418
+ {/* {renderTime('يوم', '18')} */}
419
+ <div className="time-wrapper allcentered flex-column">
420
+ <div className="time">{seconds}</div>
421
+ <div>ثانية</div>
422
+ </div>
423
+ </span>
424
+ )}
425
+ </CountdownCircleTimer>
426
+ </div>
427
+ {/* <div className="col-3 col-sm-6 allcentered mb-md-3">
351
428
  <CountdownCircleTimer
352
429
  {...timerProps}
353
430
  colors="#013c48"
@@ -399,7 +476,7 @@ const ServicesectionCenteredcards = (props) => {
399
476
  </span>
400
477
  )}
401
478
  </CountdownCircleTimer>
402
- </div>
479
+ </div> */}
403
480
  </div>
404
481
  )}
405
482
  {sectionproperties.flippingcards == 'Yes' && sectionproperties.showcountdown != 'Yes' && (