@gem-sdk/components 2.0.0-dev.654 → 2.0.0-dev.655
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/cjs/countdown-timer/components/hooks/useCountDownTimer.js +3 -2
- package/dist/cjs/countdown-timer/setting/configs/settings.js +6 -0
- package/dist/esm/countdown-timer/components/hooks/useCountDownTimer.js +3 -2
- package/dist/esm/countdown-timer/setting/configs/settings.js +6 -0
- package/package.json +1 -1
|
@@ -11,7 +11,8 @@ var React = require('react');
|
|
|
11
11
|
const useCountDownTimer = (setting, builderProps)=>{
|
|
12
12
|
const ref = React.useRef(null);
|
|
13
13
|
const { trigger } = core.useInteraction();
|
|
14
|
-
const { timerDaily, timerEverygreen, dateStandard, behaviour,
|
|
14
|
+
const { timerDaily, timerEverygreen, dateStandard, behaviour, redirectUrl, timeZone, enableDay, enableHour, enableMinute, enableSecond, enableWeek, autoHideWhenTimeout } = setting ?? {};
|
|
15
|
+
const loopAfterFinish = behaviour === 'evergreen' && autoHideWhenTimeout === false ? setting?.loopAfterFinish : false;
|
|
15
16
|
const timeLeft = useTimeLeft.default({
|
|
16
17
|
timerDaily: timerDaily,
|
|
17
18
|
timerEverygreen: timerEverygreen,
|
|
@@ -47,7 +48,7 @@ const useCountDownTimer = (setting, builderProps)=>{
|
|
|
47
48
|
element,
|
|
48
49
|
data: Number(key)
|
|
49
50
|
});
|
|
50
|
-
if (!
|
|
51
|
+
if (!loopAfterFinish) {
|
|
51
52
|
gpInteractionCounter.delete(key);
|
|
52
53
|
element.setAttribute('gp-interaction-counter', JSON.stringify(Object.fromEntries(gpInteractionCounter)));
|
|
53
54
|
}
|
|
@@ -396,6 +396,9 @@ const CountdownSettings = [
|
|
|
396
396
|
bold: true
|
|
397
397
|
}
|
|
398
398
|
},
|
|
399
|
+
hiddenSetting: {
|
|
400
|
+
textAlign: true
|
|
401
|
+
},
|
|
399
402
|
ignoreReRender: true
|
|
400
403
|
},
|
|
401
404
|
{
|
|
@@ -421,6 +424,9 @@ const CountdownSettings = [
|
|
|
421
424
|
color: 'text-1'
|
|
422
425
|
}
|
|
423
426
|
},
|
|
427
|
+
hiddenSetting: {
|
|
428
|
+
textAlign: true
|
|
429
|
+
},
|
|
424
430
|
ignoreReRender: true
|
|
425
431
|
},
|
|
426
432
|
{
|
|
@@ -7,7 +7,8 @@ import { useRef } from 'react';
|
|
|
7
7
|
const useCountDownTimer = (setting, builderProps)=>{
|
|
8
8
|
const ref = useRef(null);
|
|
9
9
|
const { trigger } = useInteraction();
|
|
10
|
-
const { timerDaily, timerEverygreen, dateStandard, behaviour,
|
|
10
|
+
const { timerDaily, timerEverygreen, dateStandard, behaviour, redirectUrl, timeZone, enableDay, enableHour, enableMinute, enableSecond, enableWeek, autoHideWhenTimeout } = setting ?? {};
|
|
11
|
+
const loopAfterFinish = behaviour === 'evergreen' && autoHideWhenTimeout === false ? setting?.loopAfterFinish : false;
|
|
11
12
|
const timeLeft = useTimeLeft({
|
|
12
13
|
timerDaily: timerDaily,
|
|
13
14
|
timerEverygreen: timerEverygreen,
|
|
@@ -43,7 +44,7 @@ const useCountDownTimer = (setting, builderProps)=>{
|
|
|
43
44
|
element,
|
|
44
45
|
data: Number(key)
|
|
45
46
|
});
|
|
46
|
-
if (!
|
|
47
|
+
if (!loopAfterFinish) {
|
|
47
48
|
gpInteractionCounter.delete(key);
|
|
48
49
|
element.setAttribute('gp-interaction-counter', JSON.stringify(Object.fromEntries(gpInteractionCounter)));
|
|
49
50
|
}
|
|
@@ -394,6 +394,9 @@ const CountdownSettings = [
|
|
|
394
394
|
bold: true
|
|
395
395
|
}
|
|
396
396
|
},
|
|
397
|
+
hiddenSetting: {
|
|
398
|
+
textAlign: true
|
|
399
|
+
},
|
|
397
400
|
ignoreReRender: true
|
|
398
401
|
},
|
|
399
402
|
{
|
|
@@ -419,6 +422,9 @@ const CountdownSettings = [
|
|
|
419
422
|
color: 'text-1'
|
|
420
423
|
}
|
|
421
424
|
},
|
|
425
|
+
hiddenSetting: {
|
|
426
|
+
textAlign: true
|
|
427
|
+
},
|
|
422
428
|
ignoreReRender: true
|
|
423
429
|
},
|
|
424
430
|
{
|