indigitall-capacitor-plugin 2.7.0 → 2.9.0
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/IndigitallCapacitorPlugin.podspec +1 -1
- package/android/build.gradle +1 -1
- package/android/src/main/AndroidManifest.xml +2 -2
- package/android/src/main/java/com/indigitall/capacitor/implementations/InboxCp.java +2 -1
- package/android/src/main/java/com/indigitall/capacitor/implementations/IndigitallCp.java +4 -0
- package/android/src/main/java/com/indigitall/capacitor/inapp/CpInAppIndigitall.java +3 -3
- package/dist/esm/InApp.js +210 -117
- package/dist/esm/InApp.js.map +1 -1
- package/dist/esm/Push.js +1 -1
- package/dist/esm/Push.js.map +1 -1
- package/dist/esm/definitions/inboxDefinitions.d.ts +1 -1
- package/dist/esm/definitions/inboxDefinitions.js.map +1 -1
- package/dist/esm/params/inboxParams.d.ts +1 -1
- package/dist/esm/params/inboxParams.js.map +1 -1
- package/dist/esm/params/pushParams.d.ts +1 -0
- package/dist/esm/params/pushParams.js.map +1 -1
- package/dist/plugin.cjs.js +211 -118
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +211 -118
- package/dist/plugin.js.map +1 -1
- package/ios/Plugin/implementations/IndigitallCp.swift +1 -0
- package/package.json +1 -1
|
@@ -13,6 +13,6 @@ Pod::Spec.new do |s|
|
|
|
13
13
|
s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
|
|
14
14
|
s.ios.deployment_target = '12.0'
|
|
15
15
|
s.dependency 'Capacitor'
|
|
16
|
-
s.dependency 'indigitall-ios', '~> 6.
|
|
16
|
+
s.dependency 'indigitall-ios', '~> 6.9.0'
|
|
17
17
|
s.swift_version = '5.1'
|
|
18
18
|
end
|
package/android/build.gradle
CHANGED
|
@@ -57,7 +57,7 @@ dependencies {
|
|
|
57
57
|
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
|
|
58
58
|
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
|
|
59
59
|
implementation("androidx.cardview:cardview:1.0.0")
|
|
60
|
-
implementation('com.indigitall:android:5.
|
|
60
|
+
implementation('com.indigitall:android:5.12.+'){
|
|
61
61
|
exclude group: "com.indigitall", module: "android-hms"
|
|
62
62
|
}
|
|
63
63
|
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
</intent-filter>
|
|
24
24
|
</receiver>
|
|
25
25
|
<activity
|
|
26
|
-
android:name=".models.CpIndigitallHiddenActivity"
|
|
26
|
+
android:name="com.indigitall.capacitor.models.CpIndigitallHiddenActivity"
|
|
27
27
|
android:label="@string/app_name_sdk"
|
|
28
28
|
android:screenOrientation="portrait"
|
|
29
29
|
android:configChanges="orientation|keyboardHidden"
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
android:excludeFromRecents="true">
|
|
32
32
|
</activity>
|
|
33
33
|
|
|
34
|
-
<service android:name=".services.IndigitallFirebaseMessagingService"
|
|
34
|
+
<service android:name="com.indigitall.capacitor.services.IndigitallFirebaseMessagingService"
|
|
35
35
|
android:exported="false">
|
|
36
36
|
<intent-filter>
|
|
37
37
|
<action android:name="com.google.firebase.MESSAGING_EVENT" />
|
|
@@ -49,7 +49,7 @@ public class InboxCp implements InboxAuthListener {
|
|
|
49
49
|
|
|
50
50
|
String status = null;
|
|
51
51
|
JSONArray jsonArraySendingIdList = null;
|
|
52
|
-
ArrayList<Integer> sendingIdList =
|
|
52
|
+
ArrayList<Integer> sendingIdList = null;
|
|
53
53
|
try {
|
|
54
54
|
if (params.length() > 0) {
|
|
55
55
|
if (params.has(JSON_SENDING_ID_LIST)) jsonArraySendingIdList = params.getJSONArray(JSON_SENDING_ID_LIST);
|
|
@@ -58,6 +58,7 @@ public class InboxCp implements InboxAuthListener {
|
|
|
58
58
|
|
|
59
59
|
JSONArray jArray = (JSONArray)jsonArraySendingIdList;
|
|
60
60
|
if (jArray != null) {
|
|
61
|
+
sendingIdList = new ArrayList<>();
|
|
61
62
|
for (int i=0;i<jArray.length();i++){
|
|
62
63
|
sendingIdList.add(jArray.getInt(i));
|
|
63
64
|
}
|
|
@@ -90,6 +90,7 @@ public class IndigitallCp {
|
|
|
90
90
|
final String JSON_SET_ALWAYS_LAUNCH_ON_INIT = "alwaysLaunchOnInit";
|
|
91
91
|
final String JSON_SET_AUTO_REQUEST_PUSH_PERMISSION = "autoRequestPushPermission";
|
|
92
92
|
final String JSON_AVOID_CYPHER = "avoidCypher";
|
|
93
|
+
final String JSON_PUSH_DISABLED_SERVICE = "disabledPushService";
|
|
93
94
|
|
|
94
95
|
String appKey = null,
|
|
95
96
|
senderId = null,
|
|
@@ -101,6 +102,7 @@ public class IndigitallCp {
|
|
|
101
102
|
alwaysLaunchOnInit = false,
|
|
102
103
|
autoRequestPushPermission = true,
|
|
103
104
|
wifiFilterEnabled = false,
|
|
105
|
+
disabledPushService = false,
|
|
104
106
|
avoidCypher = false;
|
|
105
107
|
try {
|
|
106
108
|
if (params.length() > 0) {
|
|
@@ -115,6 +117,7 @@ public class IndigitallCp {
|
|
|
115
117
|
if (params.has(JSON_SET_ALWAYS_LAUNCH_ON_INIT)) alwaysLaunchOnInit = params.getBoolean(JSON_SET_ALWAYS_LAUNCH_ON_INIT);
|
|
116
118
|
if (params.has(JSON_SET_AUTO_REQUEST_PUSH_PERMISSION)) autoRequestPushPermission = params.getBoolean(JSON_SET_AUTO_REQUEST_PUSH_PERMISSION);
|
|
117
119
|
if (params.has(JSON_AVOID_CYPHER)) avoidCypher = params.getBoolean(JSON_AVOID_CYPHER);
|
|
120
|
+
if (params.has(JSON_PUSH_DISABLED_SERVICE)) disabledPushService = params.getBoolean(JSON_PUSH_DISABLED_SERVICE);
|
|
118
121
|
}
|
|
119
122
|
} catch(JSONException ex) {
|
|
120
123
|
ex.printStackTrace();
|
|
@@ -146,6 +149,7 @@ public class IndigitallCp {
|
|
|
146
149
|
.setUrlInboxApi(urlInboxApi)
|
|
147
150
|
.setAlwaysLaunchOnInit(alwaysLaunchOnInit)
|
|
148
151
|
.setAutoRequestPushPermission(autoRequestPushPermission)
|
|
152
|
+
.setPushServiceDisabled(disabledPushService)
|
|
149
153
|
.setAvoidCypher(avoidCypher)
|
|
150
154
|
.build();
|
|
151
155
|
Indigitall.INSTANCE.init(context,config, callback);
|
|
@@ -191,9 +191,9 @@ public class CpInAppIndigitall {
|
|
|
191
191
|
hole.addJavascriptInterface(new WebCpInAppInterface(context, inApp, popupWindow, show), INDIGITALL_INTERFACE);
|
|
192
192
|
hole.loadDataWithBaseURL(
|
|
193
193
|
null,
|
|
194
|
-
htmlFinal + InAppConstants.
|
|
195
|
-
InAppConstants.
|
|
196
|
-
InAppConstants.
|
|
194
|
+
htmlFinal + InAppConstants.Companion.getSCRIPT(),
|
|
195
|
+
InAppConstants.Companion.getMIME_TYPE_INFO(),
|
|
196
|
+
InAppConstants.Companion.getUTF8(),
|
|
197
197
|
null
|
|
198
198
|
);
|
|
199
199
|
}catch (Exception ex) {
|
package/dist/esm/InApp.js
CHANGED
|
@@ -340,9 +340,17 @@ async function drawInApp(inApp, viewId, onShowTimeFinished, didClicked, didFormS
|
|
|
340
340
|
}
|
|
341
341
|
function editingFormHtml(html, viewId) {
|
|
342
342
|
const htmlWithoutOnClick = html.replace('InAppIndigitall.onClick', `inAppIndigitallOnClick_${viewId}`);
|
|
343
|
-
const htmlWithoutOnSubmit = htmlWithoutOnClick.replace('InAppIndigitall.submit',
|
|
343
|
+
const htmlWithoutOnSubmit = htmlWithoutOnClick.replace('InAppIndigitall.submit', `inAppIndigitallSubmit_${viewId}`);
|
|
344
344
|
const htmlEditMethodNames = htmlWithoutOnSubmit
|
|
345
345
|
.replace('plusSlides', `plusSlides_${viewId}`)
|
|
346
|
+
.replace('indCOImages', `indCOImages_${viewId}`)
|
|
347
|
+
.replace('ind_carouselOverlapLeftView', `ind_carouselOverlapLeftView_${viewId}`)
|
|
348
|
+
.replace('ind_carouselOverlapLRightView', `ind_carouselOverlapLRightView_${viewId}`)
|
|
349
|
+
.replace('ind_carouselOverlapLMainView', `ind_carouselOverlapLMainView_${viewId}`)
|
|
350
|
+
.replace('ind_carouselOverlapContainer', `ind_carouselOverlapContainer_${viewId}`)
|
|
351
|
+
.replace('setImagesCarouselOverLap', `setImagesCarouselOverLap_${viewId}`)
|
|
352
|
+
.replace('shiftRight', `shiftRight_${viewId}`)
|
|
353
|
+
.replace('shiftLeft', `shiftLeft_${viewId}`)
|
|
346
354
|
.replace('currentSlide', `currentSlide_${viewId}`)
|
|
347
355
|
.replace('setNewInterval', `setNewInterval_${viewId}`)
|
|
348
356
|
.replace('newSlide', `newSlide_${viewId}`)
|
|
@@ -351,121 +359,206 @@ function editingFormHtml(html, viewId) {
|
|
|
351
359
|
}
|
|
352
360
|
function getInAppScript(viewId, viewIdEdited, inAppModel) {
|
|
353
361
|
return `
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
362
|
+
var slideIndex_${viewIdEdited} = 1;
|
|
363
|
+
var delta_${viewIdEdited} = 6;
|
|
364
|
+
var startMove_${viewIdEdited} = null;
|
|
365
|
+
var startMoveY_${viewIdEdited} = null;
|
|
366
|
+
var diffX_${viewIdEdited};
|
|
367
|
+
var diffY_${viewIdEdited};
|
|
368
|
+
var timeSlide_${viewIdEdited} = 10000;
|
|
369
|
+
|
|
370
|
+
var slider_${viewIdEdited} = document.getElementById("${viewId}").querySelector('.ind_slider-container-actions');
|
|
371
|
+
var sliderTotal_${viewIdEdited} = document.getElementById("${viewId}").getElementsByClassName("ind_slideshow-item").length ? document.getElementById("${viewId}").getElementsByClassName("ind_slideshow-item").length : document.getElementById("${viewId}").getElementsByClassName("ind_slideshow-carousel-item").length;
|
|
372
|
+
|
|
373
|
+
let ind_carouselOverlap_${viewIdEdited} = document.getElementById("ind_carouselOverlapContainer_${viewIdEdited}");
|
|
374
|
+
|
|
375
|
+
var imageList_${viewIdEdited} = document.getElementById("${viewId}").getElementsByClassName("indCOImages_${viewIdEdited}");
|
|
376
|
+
if (imageList_${viewIdEdited}) {
|
|
377
|
+
setImagesCarouselOverLap_${viewIdEdited}();
|
|
378
|
+
let docIframeHeight_${viewIdEdited} = document.getElementById("${viewId}").clientHeight;
|
|
379
|
+
|
|
380
|
+
if (document.getElementById("ind_carouselOverlapLeftView_${viewIdEdited}")) document.getElementById("ind_carouselOverlapLeftView_${viewIdEdited}").style.height = (docIframeHeight_${viewIdEdited}-20)+"px";
|
|
381
|
+
if (document.getElementById("ind_carouselOverlapLRightView_${viewIdEdited}")) document.getElementById("ind_carouselOverlapLRightView_${viewIdEdited}").style.height = (docIframeHeight_${viewIdEdited}-20)+"px";
|
|
382
|
+
if (document.getElementById("ind_carouselOverlapLMainView_${viewIdEdited}")) document.getElementById("ind_carouselOverlapLMainView_${viewIdEdited}").style.height = document.getElementById("${viewId}").style.height;
|
|
383
|
+
if (document.getElementById("ind_carouselOverlapLMainView_${viewIdEdited}")) document.getElementById("ind_carouselOverlapLMainView_${viewIdEdited}").style.width = document.getElementById("${viewId}").style.width;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
function setImagesCarouselOverLap_${viewIdEdited}() {
|
|
387
|
+
let slides = document.getElementById("${viewId}").getElementsByClassName("ind_slideshow-carousel-item");
|
|
388
|
+
for (i = 0; i < slides.length; i++) {
|
|
389
|
+
slides[i].style.backgroundImage = "url('"+imageList_${viewIdEdited}[i].src+"')";
|
|
390
|
+
slides[i].style.backgroundSize = "cover";
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
if (slides[1]) slides[1].onclick = imageList_${viewIdEdited}[1].onclick;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
function shiftRight_${viewIdEdited}() {
|
|
397
|
+
let newArr = new Array(imageList_${viewIdEdited}.length);
|
|
398
|
+
for (var i = 0; i < imageList_${viewIdEdited}.length; i++) {
|
|
399
|
+
if (i == 0) {
|
|
400
|
+
newArr[i] = imageList_${viewIdEdited}[imageList_${viewIdEdited}.length-1];
|
|
401
|
+
} else {
|
|
402
|
+
newArr[i] = imageList_${viewIdEdited}[i-1];
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
imageList_${viewIdEdited} = newArr;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
function shiftLeft_${viewIdEdited}() {
|
|
409
|
+
let newArr = new Array(imageList_${viewIdEdited}.length);
|
|
410
|
+
for (var i = 0; i < imageList_${viewIdEdited}.length; i++) {
|
|
411
|
+
if (i+1 == imageList_${viewIdEdited}.length) {
|
|
412
|
+
newArr[i] = imageList_${viewIdEdited}[0];
|
|
413
|
+
} else {
|
|
414
|
+
newArr[i] = imageList_${viewIdEdited}[i+1];
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
imageList_${viewIdEdited} = newArr;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
var interval_${viewIdEdited} = setInterval(() => {
|
|
421
|
+
newSlide_${viewIdEdited}();
|
|
422
|
+
}, timeSlide_${viewIdEdited});
|
|
423
|
+
|
|
424
|
+
if (slider_${viewIdEdited} && !ind_carouselOverlap_${viewIdEdited}) {
|
|
425
|
+
slider_${viewIdEdited}.addEventListener('touchstart', handleStart_${viewIdEdited}, false);
|
|
426
|
+
slider_${viewIdEdited}.addEventListener('touchend', handleEnd_${viewIdEdited}, false);
|
|
427
|
+
slider_${viewIdEdited}.addEventListener('mousedown', mouseStart_${viewIdEdited});
|
|
428
|
+
slider_${viewIdEdited}.addEventListener('mouseup', mouseEnd_${viewIdEdited});
|
|
429
|
+
} else if (ind_carouselOverlap_${viewIdEdited} && ind_carouselOverlapLMainView_${viewIdEdited}) {
|
|
430
|
+
ind_carouselOverlapLMainView_${viewIdEdited}.addEventListener('touchstart', handleStart_${viewIdEdited}, false);
|
|
431
|
+
ind_carouselOverlapLMainView_${viewIdEdited}.addEventListener('touchend', handleEnd_${viewIdEdited}, false);
|
|
432
|
+
ind_carouselOverlapLMainView_${viewIdEdited}.addEventListener('mousedown', mouseStart_${viewIdEdited});
|
|
433
|
+
ind_carouselOverlapLMainView_${viewIdEdited}.addEventListener('mouseup', mouseEnd_${viewIdEdited});
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
showSlides_${viewIdEdited}(slideIndex_${viewIdEdited});
|
|
437
|
+
|
|
438
|
+
function mouseStart_${viewIdEdited}(evt) {
|
|
439
|
+
evt.preventDefault();
|
|
440
|
+
startMove_${viewIdEdited} = evt.clientX;
|
|
441
|
+
startMoveY_${viewIdEdited} = evt.clientY;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
function mouseEnd_${viewIdEdited}(evt) {
|
|
445
|
+
evt.preventDefault();
|
|
446
|
+
var endMove = evt.clientX;
|
|
447
|
+
var endMoveY = evt.clientY;
|
|
448
|
+
setEndMove_${viewIdEdited}(endMove, endMoveY);
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
function handleStart_${viewIdEdited}(evt) {
|
|
452
|
+
evt.preventDefault();
|
|
453
|
+
startMove_${viewIdEdited} = evt.touches[0].clientX;
|
|
454
|
+
startMoveY_${viewIdEdited} = evt.touches[0].clientY;
|
|
455
|
+
}
|
|
456
|
+
function handleEnd_${viewIdEdited}(evt) {
|
|
457
|
+
evt.preventDefault();
|
|
458
|
+
var endMove = evt.changedTouches[0].pageX;
|
|
459
|
+
var endMoveY = evt.changedTouches[0].pageY;
|
|
460
|
+
setEndMove_${viewIdEdited}(endMove, endMoveY);
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
function setEndMove_${viewIdEdited}(endMove, endMoveY) {
|
|
464
|
+
let slides = document.getElementById("${viewId}").getElementsByClassName("ind_slideshow-carousel-item");
|
|
465
|
+
diffX_${viewIdEdited} = Math.abs(endMove - startMove_${viewIdEdited});
|
|
466
|
+
diffY_${viewIdEdited} = Math.abs(endMoveY - startMoveY_${viewIdEdited});
|
|
467
|
+
if (!ind_carouselOverlap_${viewIdEdited} && diffX_${viewIdEdited} < delta_${viewIdEdited} && diffY_${viewIdEdited} < delta_${viewIdEdited}) {
|
|
468
|
+
slides[slideIndex-1].children[0].click();
|
|
469
|
+
} else if (ind_carouselOverlap_${viewIdEdited} && diffX_${viewIdEdited} < delta_${viewIdEdited} && diffY_${viewIdEdited} < delta_${viewIdEdited}) {
|
|
470
|
+
if (ind_carouselOverlapLMainView_${viewIdEdited}) ind_carouselOverlapLMainView_${viewIdEdited}.click();
|
|
471
|
+
} else {
|
|
472
|
+
if (startMove_${viewIdEdited} != null) {
|
|
473
|
+
if (startMove_${viewIdEdited} > endMove) {
|
|
474
|
+
if (ind_carouselOverlap_${viewIdEdited}) {
|
|
475
|
+
slideIndex_${viewIdEdited} = -1;
|
|
476
|
+
} else {
|
|
477
|
+
slideIndex_${viewIdEdited}++;
|
|
478
|
+
if (slideIndex_${viewIdEdited} > sliderTotal_${viewIdEdited}) {
|
|
479
|
+
slideIndex_${viewIdEdited} = 1;
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
} else {
|
|
483
|
+
if (ind_carouselOverlap_${viewIdEdited}) {
|
|
484
|
+
if (startMove_${viewIdEdited} == endMove) {
|
|
485
|
+
slideIndex_${viewIdEdited} = 0;
|
|
486
|
+
} else {
|
|
487
|
+
slideIndex_${viewIdEdited} = 1;
|
|
488
|
+
}
|
|
489
|
+
} else {
|
|
490
|
+
if (slideIndex_${viewIdEdited} == 0) {
|
|
491
|
+
slideIndex_${viewIdEdited} = sliderTotal_${viewIdEdited};
|
|
492
|
+
} else {
|
|
493
|
+
slideIndex_${viewIdEdited}--;
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
showSlides_${viewIdEdited}(slideIndex_${viewIdEdited});
|
|
498
|
+
setNewInterval_${viewIdEdited}();
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
function plusSlides_${viewIdEdited}(n) {
|
|
504
|
+
if (ind_carouselOverlap_${viewIdEdited}) {
|
|
505
|
+
showSlides_${viewIdEdited}(n == 1 ? -1: 1);
|
|
506
|
+
} else {
|
|
507
|
+
showSlides_${viewIdEdited}(slideIndex_${viewIdEdited} += n);
|
|
508
|
+
}
|
|
509
|
+
setNewInterval_${viewIdEdited}();
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
function currentSlide_${viewIdEdited}(n) {
|
|
513
|
+
showSlides_${viewIdEdited}(slideIndex_${viewIdEdited} = n);
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
function setNewInterval_${viewIdEdited}() {
|
|
517
|
+
clearInterval(interval_${viewIdEdited});
|
|
518
|
+
interval_${viewIdEdited} = setInterval(() => {
|
|
519
|
+
newSlide_${viewIdEdited}();
|
|
520
|
+
}, timeSlide_${viewIdEdited});
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
function newSlide_${viewIdEdited}(){
|
|
524
|
+
slideIndex_${viewIdEdited}++;
|
|
525
|
+
if (slideIndex_${viewIdEdited} > sliderTotal_${viewIdEdited}) {
|
|
526
|
+
slideIndex_${viewIdEdited} = 1;
|
|
527
|
+
}
|
|
528
|
+
showSlides_${viewIdEdited}(slideIndex_${viewIdEdited});
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
function showSlides_${viewIdEdited}(n) {
|
|
532
|
+
let view = document.getElementById("${viewId}") ? document.getElementById("${viewId}") : document;
|
|
533
|
+
if (view) {
|
|
534
|
+
if (ind_carouselOverlap_${viewIdEdited}) {
|
|
535
|
+
let slides = document.getElementsByClassName("ind_slideshow-carousel-item");
|
|
536
|
+
if (n < 0) {
|
|
537
|
+
shiftLeft_${viewIdEdited}();
|
|
538
|
+
} else if (n > 0) {
|
|
539
|
+
shiftRight_${viewIdEdited}();
|
|
540
|
+
}
|
|
541
|
+
setImagesCarouselOverLap_${viewIdEdited}();
|
|
542
|
+
} else {
|
|
543
|
+
let slides = view.getElementsByClassName("ind_slideshow-item");
|
|
544
|
+
let i;
|
|
545
|
+
let dots = view.getElementsByClassName("ind_dot");
|
|
546
|
+
if (n > slides.length) {slideIndex_${viewIdEdited} = 1;}
|
|
547
|
+
if (n < 1) {slideIndex_${viewIdEdited} = slides.length;}
|
|
548
|
+
for (i = 0; i < slides.length; i++) {
|
|
549
|
+
slides[i].style.display = "none";
|
|
550
|
+
}
|
|
551
|
+
for (i = 0; i < dots.length; i++) {
|
|
552
|
+
dots[i].className = dots[i].className.replace(" active", "");
|
|
553
|
+
}
|
|
554
|
+
if (slides[slideIndex_${viewIdEdited}-1]) {
|
|
555
|
+
slides[slideIndex_${viewIdEdited}-1].style.display = "block";
|
|
556
|
+
}
|
|
557
|
+
if (dots[slideIndex_${viewIdEdited}-1]) dots[slideIndex_${viewIdEdited}-1].className += " active";
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
|
|
469
562
|
|
|
470
563
|
|
|
471
564
|
function inAppIndigitallOnClick_${viewIdEdited}(action) {
|
|
@@ -478,7 +571,7 @@ function getInAppScript(viewId, viewIdEdited, inAppModel) {
|
|
|
478
571
|
}
|
|
479
572
|
}
|
|
480
573
|
|
|
481
|
-
function
|
|
574
|
+
function inAppIndigitallSubmit_${viewIdEdited}(formOptions) {
|
|
482
575
|
const jsonForm = {}
|
|
483
576
|
const jsonCustomer = {}
|
|
484
577
|
const form = document.querySelector('[id="'+formOptions.formId+'"]');
|