rivia 0.0.93 → 0.0.95
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.js +223 -184
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -280,6 +280,21 @@ async function fetchWithTimeout(topTitle = "Get Started", subtitle, completion =
|
|
|
280
280
|
if (!user_var)
|
|
281
281
|
return;
|
|
282
282
|
let i = 0;
|
|
283
|
+
const translateStyle = cssConfig.launcherProgressBar ? 'style="transform: translateY(10px);"' : "";
|
|
284
|
+
const iconHTML1 = cssConfig.launcherShowIcon ? `<svg class="launcher-icon" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
285
|
+
<path d="M8 10.167L12.123 6.043C13.248 4.919 13.811 4.356 14.431 3.903C15.7049 2.97403 17.1822 2.36274 18.74 2.12C19.499 2 20.293 2 21.885 2C21.968 2 22 2.038 22 2.115C22 3.705 22 4.501 21.881 5.26C21.638 6.81791 21.0263 8.29523 20.097 9.569C19.644 10.189 19.081 10.752 17.957 11.877L13.833 16" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
286
|
+
<path d="M10.341 8.098C8.638 8.098 6.498 7.738 4.904 8.398C3.737 8.88 2.878 10 2 10.878L5.306 12.296C6.182 12.671 5.646 13.776 5.501 14.502C5.34 15.31 5.349 15.34 5.931 15.922L8.078 18.068C8.66 18.651 8.69 18.66 9.498 18.498C10.223 18.353 11.329 17.818 11.704 18.694L13.121 22C13.999 21.122 15.119 20.263 15.602 19.096C16.262 17.502 15.902 15.362 15.902 13.659" stroke="white" stroke-width="1.5" stroke-linejoin="round"/>
|
|
287
|
+
<path d="M12 20L11 21M4 12L3 13" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
288
|
+
<path d="M15 4.08008C16.2 4.26008 17.46 4.74008 18.161 5.46008C19.058 6.25208 19.68 7.32008 19.92 9.00008" stroke="white" stroke-width="1.5" stroke-linecap="square"/>
|
|
289
|
+
<path d="M17.94 6.05957L16.5 7.49957" stroke="white" stroke-width="1.5" stroke-linecap="round"/>
|
|
290
|
+
</svg>` : "";
|
|
291
|
+
const iconHTML = cssConfig.launcherShowIcon ? `<svg class="launcher-icon" width="24" height="24" ${translateStyle} viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
292
|
+
<path d="M8 10.167L12.123 6.043C13.248 4.919 13.811 4.356 14.431 3.903C15.7049 2.97403 17.1822 2.36274 18.74 2.12C19.499 2 20.293 2 21.885 2C21.968 2 22 2.038 22 2.115C22 3.705 22 4.501 21.881 5.26C21.638 6.81791 21.0263 8.29523 20.097 9.569C19.644 10.189 19.081 10.752 17.957 11.877L13.833 16" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
293
|
+
<path d="M10.341 8.098C8.638 8.098 6.498 7.738 4.904 8.398C3.737 8.88 2.878 10 2 10.878L5.306 12.296C6.182 12.671 5.646 13.776 5.501 14.502C5.34 15.31 5.349 15.34 5.931 15.922L8.078 18.068C8.66 18.651 8.69 18.66 9.498 18.498C10.223 18.353 11.329 17.818 11.704 18.694L13.121 22C13.999 21.122 15.119 20.263 15.602 19.096C16.262 17.502 15.902 15.362 15.902 13.659" stroke="white" stroke-width="1.5" stroke-linejoin="round"/>
|
|
294
|
+
<path d="M12 20L11 21M4 12L3 13" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
295
|
+
<path d="M15 4.08008C16.2 4.26008 17.46 4.74008 18.161 5.46008C19.058 6.25208 19.68 7.32008 19.92 9.00008" stroke="white" stroke-width="1.5" stroke-linecap="square"/>
|
|
296
|
+
<path d="M17.94 6.05957L16.5 7.49957" stroke="white" stroke-width="1.5" stroke-linecap="round"/>
|
|
297
|
+
</svg>` : "";
|
|
283
298
|
const stepsHTML = items.map((it) => {
|
|
284
299
|
return `
|
|
285
300
|
<div id="${it.id}" class="onboard-step">
|
|
@@ -289,227 +304,259 @@ async function fetchWithTimeout(topTitle = "Get Started", subtitle, completion =
|
|
|
289
304
|
|
|
290
305
|
<div class="onboard-text">
|
|
291
306
|
<strong class="onboard-title">${it.title}</strong><br />
|
|
292
|
-
<
|
|
307
|
+
<div class="onboard-desc">${it.description || ""}</div>
|
|
293
308
|
</div>
|
|
294
309
|
</div>
|
|
295
|
-
${i++ < items.length - 1 ? '<hr class="onboard-divider" />' : ""}
|
|
296
310
|
`;
|
|
297
311
|
}).join("");
|
|
298
312
|
const labelHTML = `
|
|
299
313
|
<div id="checklistRoot" class="checklist-root">
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
314
|
+
|
|
315
|
+
<button id="checklistCloseBtn" class="checklist-close">×</button>
|
|
316
|
+
|
|
317
|
+
<div class="checklist-header">
|
|
318
|
+
|
|
319
|
+
<h3 class="checklist-title">
|
|
320
|
+
${iconHTML1} ${topTitle}</h3>
|
|
321
|
+
|
|
322
|
+
<p class="checklist-subtitle">${subtitle}</p>
|
|
323
|
+
|
|
324
|
+
<div class="checklist-progress">
|
|
325
|
+
|
|
326
|
+
<div id="progressContainer"
|
|
327
|
+
style="display: flex !important; gap: 4px !important; width: 300px !important; height: 10px !important;">
|
|
328
|
+
</div>
|
|
329
|
+
|
|
330
|
+
<span id="progressFraction"
|
|
331
|
+
style="margin-left: 0px !important; font-size: 13px !important; color: ${cssConfig.textColor} !important; min-width: 20px !important; text-align: right !important;">
|
|
332
|
+
0/0
|
|
333
|
+
</span>
|
|
334
|
+
|
|
335
|
+
</div>
|
|
336
|
+
|
|
337
|
+
</div>
|
|
338
|
+
|
|
339
|
+
<div class="checklist-body">
|
|
309
340
|
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
${stepsHTML}
|
|
316
|
-
<div style="text-align: right; margin-top: 10px; cursor: pointer; color: black; font-size: 12px;" id="dismissChecklist">Dismiss this checklist</div>
|
|
317
|
-
</div>
|
|
341
|
+
${stepsHTML}
|
|
342
|
+
|
|
343
|
+
<div id="dismissChecklist"
|
|
344
|
+
style="text-align: right !important; margin-top: 10px !important; cursor: pointer !important; font-style: italic !important; color: black !important; font-size: 12px !important;padding-right: 16px !important;">
|
|
345
|
+
Dismiss this checklist
|
|
318
346
|
</div>
|
|
347
|
+
|
|
348
|
+
</div>
|
|
349
|
+
|
|
350
|
+
</div>
|
|
319
351
|
`;
|
|
320
352
|
function injectChecklistBaseCSS() {
|
|
321
353
|
if (document.getElementById("rivia-checklist-css")) return;
|
|
322
354
|
const style2 = document.createElement("style");
|
|
323
355
|
style2.id = "rivia-checklist-css";
|
|
324
|
-
style2.textContent = custom_css ||
|
|
356
|
+
style2.textContent = custom_css || `
|
|
325
357
|
.checklist-root {
|
|
326
|
-
max-width: 500px;
|
|
327
|
-
margin: auto;
|
|
328
|
-
position: relative;
|
|
329
|
-
font-family: var(--font-family);
|
|
330
|
-
font-size: var(--font-size);
|
|
331
|
-
color: var(--text-color);
|
|
358
|
+
max-width: 500px !important;
|
|
359
|
+
margin: auto !important;
|
|
360
|
+
position: relative !important;
|
|
361
|
+
font-family: var(--font-family) !important;
|
|
362
|
+
font-size: var(--font-size) !important;
|
|
363
|
+
color: var(--text-color) !important;
|
|
364
|
+
}
|
|
365
|
+
.onboard-step:hover {
|
|
366
|
+
background: #f3f3f3 !important;
|
|
332
367
|
}
|
|
333
368
|
|
|
334
369
|
.checklist-title {
|
|
335
|
-
max-width: 500px;
|
|
336
|
-
margin: auto;
|
|
337
|
-
position: relative;
|
|
338
|
-
font-family: var(--font-family);
|
|
339
|
-
font-size: var(--font-size);
|
|
340
|
-
color: var(--text-color);
|
|
370
|
+
max-width: 500px !important;
|
|
371
|
+
margin: auto !important;
|
|
372
|
+
position: relative !important;
|
|
373
|
+
font-family: var(--font-family) !important;
|
|
374
|
+
font-size: var(--font-size) !important;
|
|
375
|
+
color: var(--text-color) !important;
|
|
376
|
+
white-space: nowrap !important;
|
|
377
|
+
}
|
|
378
|
+
.checklist-title svg {
|
|
379
|
+
display: inline-block !important;
|
|
380
|
+
vertical-align: middle !important;
|
|
381
|
+
flex-shrink: 0 !important;
|
|
341
382
|
}
|
|
342
383
|
/* Close button */
|
|
343
384
|
.checklist-close {
|
|
344
|
-
position: absolute;
|
|
345
|
-
top: 8px;
|
|
346
|
-
right: 12px;
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
385
|
+
position: absolute !important;
|
|
386
|
+
top: 8px !important;
|
|
387
|
+
right: 12px !important;
|
|
388
|
+
z-index: 10001 !important;
|
|
389
|
+
pointer-events: auto !important;
|
|
390
|
+
background: transparent !important;
|
|
391
|
+
border: none !important;
|
|
392
|
+
font-size: 28px !important;
|
|
393
|
+
color: var(--text-color) !important;
|
|
352
394
|
}
|
|
353
395
|
|
|
354
396
|
/* Header */
|
|
355
397
|
.checklist-header {
|
|
356
|
-
background: var(--header-bg);
|
|
357
|
-
padding: 16px;
|
|
358
|
-
border-radius: 8px 8px 0 0;
|
|
398
|
+
background: var(--header-bg) !important;
|
|
399
|
+
padding: 16px !important;
|
|
400
|
+
border-radius: 8px 8px 0 0 !important;
|
|
401
|
+
white-space: nowrap !important;
|
|
359
402
|
}
|
|
360
403
|
|
|
361
404
|
.checklist-subtitle {
|
|
362
|
-
margin-top: 8px;
|
|
363
|
-
color: var(--subtitle-color);
|
|
405
|
+
margin-top: 8px !important;
|
|
406
|
+
color: var(--subtitle-color) !important;
|
|
364
407
|
}
|
|
365
408
|
|
|
366
409
|
/* Progress */
|
|
367
410
|
.checklist-progress {
|
|
368
|
-
display: flex;
|
|
369
|
-
align-items: center;
|
|
370
|
-
justify-content: space-between;
|
|
411
|
+
display: flex !important;
|
|
412
|
+
align-items: center !important;
|
|
413
|
+
justify-content: space-between !important;
|
|
371
414
|
}
|
|
372
415
|
|
|
373
416
|
.progress-fraction {
|
|
374
|
-
font-size: 13px;
|
|
417
|
+
font-size: 13px !important;
|
|
375
418
|
}
|
|
376
419
|
|
|
377
420
|
/* Body */
|
|
378
421
|
.checklist-body {
|
|
379
|
-
height:
|
|
380
|
-
width:400px;
|
|
381
|
-
padding:
|
|
382
|
-
background: var(--lower-bg);
|
|
383
|
-
max-height: 420px;
|
|
384
|
-
overflow: auto;
|
|
385
|
-
border-radius: 0 0 8px 8px;
|
|
422
|
+
height: auto !important;
|
|
423
|
+
width: 400px !important;
|
|
424
|
+
padding: 0 !important;
|
|
425
|
+
background: var(--lower-bg) !important;
|
|
426
|
+
max-height: 420px !important;
|
|
427
|
+
overflow: auto !important;
|
|
428
|
+
border-radius: 0 0 8px 8px !important;
|
|
386
429
|
}
|
|
387
430
|
|
|
388
431
|
/* Steps */
|
|
389
432
|
.onboard-step {
|
|
390
|
-
position: relative;
|
|
391
|
-
display: flex;
|
|
392
|
-
align-items: flex-start;
|
|
393
|
-
cursor: pointer;
|
|
394
|
-
padding:
|
|
395
|
-
border-radius: 6px;
|
|
396
|
-
background: var(--step-bg);
|
|
397
|
-
margin-bottom: 2px;
|
|
433
|
+
position: relative !important;
|
|
434
|
+
display: flex !important;
|
|
435
|
+
align-items: flex-start !important;
|
|
436
|
+
cursor: pointer !important;
|
|
437
|
+
padding: 5px !important;
|
|
438
|
+
border-radius: 6px !important;
|
|
439
|
+
background: var(--step-bg) !important;
|
|
440
|
+
margin-bottom: 2px !important;
|
|
441
|
+
width: 100% !important;
|
|
442
|
+
margin: 0 !important; /* remove outer gaps */
|
|
443
|
+
border-radius: 0 !important; /* optional: full flat row look */
|
|
444
|
+
padding: 12px 16px !important;
|
|
398
445
|
}
|
|
399
446
|
|
|
400
447
|
.start-select {
|
|
401
|
-
position: absolute;
|
|
402
|
-
top: 0;
|
|
403
|
-
left: -18px;
|
|
404
|
-
width: 10px;
|
|
405
|
-
height: 120
|
|
406
|
-
background: rgba(247,143,7,0.9);
|
|
407
|
-
border-radius: 4px 0 0 4px;
|
|
408
|
-
display: none;
|
|
448
|
+
position: absolute !important;
|
|
449
|
+
top: 0 !important;
|
|
450
|
+
left: -18px !important;
|
|
451
|
+
width: 10px !important;
|
|
452
|
+
height: 120% !important;
|
|
453
|
+
background: rgba(247,143,7,0.9) !important;
|
|
454
|
+
border-radius: 4px 0 0 4px !important;
|
|
455
|
+
display: none !important;
|
|
409
456
|
}
|
|
410
457
|
|
|
411
458
|
.onboard-circle {
|
|
412
|
-
width: 16px;
|
|
413
|
-
height: 16px;
|
|
414
|
-
min-width: 16px;
|
|
415
|
-
min-height: 16px;
|
|
416
|
-
border-radius: 50
|
|
417
|
-
border: 2px solid var(--checkbox-color, #f78f07);
|
|
418
|
-
background: transparent;
|
|
419
|
-
margin-right: 10px;
|
|
420
|
-
|
|
421
|
-
|
|
459
|
+
width: 16px !important;
|
|
460
|
+
height: 16px !important;
|
|
461
|
+
min-width: 16px !important;
|
|
462
|
+
min-height: 16px !important;
|
|
463
|
+
border-radius: 50% !important;
|
|
464
|
+
border: 2px solid var(--checkbox-color, #f78f07) !important;
|
|
465
|
+
background: transparent !important;
|
|
466
|
+
margin-right: 10px !important;
|
|
467
|
+
align-self: center !important;
|
|
468
|
+
box-sizing: border-box !important;
|
|
469
|
+
display: block !important;
|
|
422
470
|
}
|
|
423
471
|
|
|
424
472
|
.onboard-title {
|
|
425
|
-
color: var(--heading-color);
|
|
473
|
+
color: var(--heading-color) !important;
|
|
426
474
|
}
|
|
427
475
|
|
|
428
476
|
.onboard-desc {
|
|
429
|
-
color: var(--body-color);
|
|
477
|
+
color: var(--body-color) !important;
|
|
430
478
|
}
|
|
431
479
|
|
|
432
480
|
.onboard-divider {
|
|
433
|
-
border: none;
|
|
434
|
-
border-top: 1px solid #9d9d9d;
|
|
481
|
+
border: none !important;
|
|
482
|
+
border-top: 1px solid #9d9d9d !important;
|
|
435
483
|
}
|
|
436
484
|
|
|
437
485
|
.rivia-launcher {
|
|
438
|
-
position: fixed;
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
border-radius: 20px;
|
|
486
|
+
position: fixed !important;
|
|
487
|
+
z-index: 9999 !important;
|
|
488
|
+
cursor: pointer !important;
|
|
489
|
+
border: none !important;
|
|
490
|
+
box-shadow: 0 2px 8px rgba(19, 20, 19, 0.2) !important;
|
|
491
|
+
background: var(--launcher-bg) !important;
|
|
492
|
+
color: var(--launcher-text) !important;
|
|
493
|
+
font-weight: bold !important;
|
|
494
|
+
border-radius: 20px !important;
|
|
448
495
|
}
|
|
449
496
|
|
|
450
497
|
.rivia-launcher .launcher-root {
|
|
451
|
-
display: flex;
|
|
452
|
-
align-items: center;
|
|
453
|
-
width: 100
|
|
454
|
-
height: 100
|
|
498
|
+
display: flex !important;
|
|
499
|
+
align-items: center !important;
|
|
500
|
+
width: 100% !important;
|
|
501
|
+
height: 100% !important;
|
|
455
502
|
}
|
|
456
503
|
|
|
457
504
|
.rivia-launcher .launcher-left {
|
|
458
|
-
flex: 1;
|
|
459
|
-
display: flex;
|
|
460
|
-
flex-direction: column;
|
|
505
|
+
flex: 1 !important;
|
|
506
|
+
display: flex !important;
|
|
507
|
+
flex-direction: column !important;
|
|
461
508
|
}
|
|
462
509
|
|
|
463
510
|
.rivia-launcher .launcher-title {
|
|
464
|
-
transform: translateY(-20%);
|
|
465
|
-
position: relative;
|
|
466
|
-
margin: 0;
|
|
467
|
-
line-height: 1;
|
|
468
|
-
text-align: center;
|
|
469
|
-
padding-left: 28px;
|
|
511
|
+
transform: translateY(-20%) !important;
|
|
512
|
+
position: relative !important;
|
|
513
|
+
margin: 0 !important;
|
|
514
|
+
line-height: 1 !important;
|
|
515
|
+
text-align: center !important;
|
|
516
|
+
padding-left: 28px !important;
|
|
470
517
|
}
|
|
471
518
|
|
|
472
519
|
.rivia-launcher .launcher-icon {
|
|
473
|
-
position: absolute;
|
|
474
|
-
left: 10px;
|
|
475
|
-
|
|
520
|
+
position: absolute !important;
|
|
521
|
+
left: 10px !important;
|
|
476
522
|
}
|
|
477
523
|
|
|
478
|
-
.rivia-launcher .launcher-text {
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
524
|
+
.rivia-launcher .launcher-text {
|
|
525
|
+
font-size: var(--font-size) !important;
|
|
526
|
+
display: block !important;
|
|
527
|
+
width: 100% !important;
|
|
528
|
+
padding-left: 5% !important;
|
|
529
|
+
text-align: center !important;
|
|
530
|
+
pointer-events: none !important;
|
|
484
531
|
}
|
|
485
532
|
|
|
486
533
|
.rivia-launcher .launcher-progress-wrap {
|
|
487
|
-
margin-top: 4px;
|
|
488
|
-
padding-left: 32px;
|
|
534
|
+
margin-top: 4px !important;
|
|
535
|
+
padding-left: 32px !important;
|
|
489
536
|
}
|
|
490
537
|
|
|
491
538
|
/* Text adjustment when progress bar is hidden */
|
|
492
539
|
.rivia-launcher.no-progress .launcher-text {
|
|
493
|
-
transform: translateY(50%);
|
|
540
|
+
transform: translateY(50%) !important;
|
|
494
541
|
}
|
|
495
542
|
|
|
496
543
|
.rivia-launcher .launcher-progress {
|
|
497
|
-
display: flex;
|
|
498
|
-
gap: 4px;
|
|
499
|
-
width: 100
|
|
500
|
-
padding: 5px;
|
|
501
|
-
height: 6px;
|
|
502
|
-
box-sizing: border-box;
|
|
544
|
+
display: flex !important;
|
|
545
|
+
gap: 4px !important;
|
|
546
|
+
width: 100% !important;
|
|
547
|
+
padding: 5px !important;
|
|
548
|
+
height: 6px !important;
|
|
549
|
+
box-sizing: border-box !important;
|
|
503
550
|
}
|
|
504
551
|
|
|
505
552
|
.rivia-launcher .launcher-right {
|
|
506
|
-
flex-shrink: 0;
|
|
507
|
-
padding-right: 8px;
|
|
553
|
+
flex-shrink: 0 !important;
|
|
554
|
+
padding-right: 8px !important;
|
|
508
555
|
}
|
|
509
556
|
|
|
510
557
|
.rivia-launcher .launcher-fraction {
|
|
511
|
-
font-size: 13px;
|
|
512
|
-
white-space: nowrap;
|
|
558
|
+
font-size: 13px !important;
|
|
559
|
+
white-space: nowrap !important;
|
|
513
560
|
}`;
|
|
514
561
|
document.head.appendChild(style2);
|
|
515
562
|
console.log("inside injectChecklistBaseCSS");
|
|
@@ -520,37 +567,40 @@ transform: translateY(-20%);
|
|
|
520
567
|
label.id = "route-label";
|
|
521
568
|
label.innerHTML = labelHTML;
|
|
522
569
|
}
|
|
523
|
-
const closeElement = label.querySelector(`#checklistCloseBtn`);
|
|
524
|
-
closeElement.addEventListener("click", (e) => {
|
|
525
|
-
e.stopPropagation();
|
|
526
|
-
label.style.opacity = "0";
|
|
527
|
-
label.style.pointerEvents = "none";
|
|
528
|
-
sessionStorage.setItem("onboardingVisible", "false");
|
|
529
|
-
closeBtn.style.display = "none";
|
|
530
|
-
showBtn.style.display = "block";
|
|
531
|
-
});
|
|
532
570
|
const dismissElement = label.querySelector(`#dismissChecklist`);
|
|
533
571
|
dismissElement.addEventListener("click", (e) => {
|
|
534
572
|
label.style.display = "none";
|
|
535
573
|
e.stopPropagation();
|
|
536
574
|
const confirmDiv = document.createElement("div");
|
|
537
575
|
confirmDiv.innerHTML = `
|
|
538
|
-
<div style="position: fixed; top: 0; left: 0; width: 100
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
576
|
+
<div style="position: fixed !important; top: 0 !important; left: 0 !important; width: 100% !important; height: 100% !important; background: rgba(0,0,0,0.5) !important; z-index: 10000 !important; display: flex !important; align-items: flex-end !important; justify-content: flex-start !important;">
|
|
577
|
+
|
|
578
|
+
<div style="background: white !important; width: 250px !important; border-radius: 10px !important; text-align: center !important; margin: 20px !important;">
|
|
579
|
+
|
|
580
|
+
<p style="padding: 15px !important;">Are you sure you want to dismiss this checklist?</p>
|
|
581
|
+
<hr class="confirmHR1293" id="confirmHR947" style="
|
|
582
|
+
all: unset !important;
|
|
583
|
+
display: block !important;
|
|
584
|
+
box-sizing: border-box !important;
|
|
585
|
+
border-top: 2px solid #f33f27 !important;
|
|
586
|
+
margin: 0 10px !important;
|
|
587
|
+
height: 0 !important;">
|
|
588
|
+
<button id="confirmYes"
|
|
589
|
+
style="margin: 10px !important; padding: 4px 8px !important; color: #f33f27ff !important; border: none !important; cursor: pointer !important;">
|
|
590
|
+
Yes
|
|
591
|
+
</button>
|
|
592
|
+
|
|
593
|
+
<span
|
|
594
|
+
style="border-left: 2px solid #f33f27ff !important; color: #eda600ff !important; height: 52px !important; margin: 0 10px !important; display: inline-block !important; vertical-align: top !important;">
|
|
595
|
+
</span>
|
|
596
|
+
|
|
597
|
+
<button id="confirmNo"
|
|
598
|
+
style="margin: 10px !important; padding: 4px 8px !important; color: #f33f27ff !important; border: none !important; cursor: pointer !important;">
|
|
599
|
+
No
|
|
600
|
+
</button>
|
|
552
601
|
</div>
|
|
553
|
-
|
|
602
|
+
</div>
|
|
603
|
+
`;
|
|
554
604
|
document.body.appendChild(confirmDiv);
|
|
555
605
|
const yesBtn = confirmDiv.querySelector("#confirmYes");
|
|
556
606
|
const noBtn = confirmDiv.querySelector("#confirmNo");
|
|
@@ -561,9 +611,13 @@ transform: translateY(-20%);
|
|
|
561
611
|
showBtn.style.display = "none";
|
|
562
612
|
sessionStorage.setItem(`dismissedChecklist${checklist_id}`, "true");
|
|
563
613
|
document.body.removeChild(confirmDiv);
|
|
614
|
+
if (document.body.contains(confirmDiv))
|
|
615
|
+
document.body.removeChild(confirmDiv);
|
|
564
616
|
});
|
|
565
617
|
noBtn.addEventListener("click", () => {
|
|
566
618
|
document.body.removeChild(confirmDiv);
|
|
619
|
+
if (document.body.contains(confirmDiv))
|
|
620
|
+
document.body.removeChild(confirmDiv);
|
|
567
621
|
showBtn.style.display = "block";
|
|
568
622
|
});
|
|
569
623
|
});
|
|
@@ -657,15 +711,7 @@ transform: translateY(-20%);
|
|
|
657
711
|
}
|
|
658
712
|
showBtn.id = "show-tooltip-btn";
|
|
659
713
|
showBtn.className = "rivia-launcher";
|
|
660
|
-
const translateStyle = cssConfig.launcherProgressBar ? 'style="transform: translateY(10px);"' : "";
|
|
661
714
|
const isRight = cssConfig.launcherPosition === "right";
|
|
662
|
-
const iconHTML = cssConfig.launcherShowIcon ? `<svg class="launcher-icon" width="24" height="24" ${translateStyle} viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
663
|
-
<path d="M8 10.167L12.123 6.043C13.248 4.919 13.811 4.356 14.431 3.903C15.7049 2.97403 17.1822 2.36274 18.74 2.12C19.499 2 20.293 2 21.885 2C21.968 2 22 2.038 22 2.115C22 3.705 22 4.501 21.881 5.26C21.638 6.81791 21.0263 8.29523 20.097 9.569C19.644 10.189 19.081 10.752 17.957 11.877L13.833 16" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
664
|
-
<path d="M10.341 8.098C8.638 8.098 6.498 7.738 4.904 8.398C3.737 8.88 2.878 10 2 10.878L5.306 12.296C6.182 12.671 5.646 13.776 5.501 14.502C5.34 15.31 5.349 15.34 5.931 15.922L8.078 18.068C8.66 18.651 8.69 18.66 9.498 18.498C10.223 18.353 11.329 17.818 11.704 18.694L13.121 22C13.999 21.122 15.119 20.263 15.602 19.096C16.262 17.502 15.902 15.362 15.902 13.659" stroke="white" stroke-width="1.5" stroke-linejoin="round"/>
|
|
665
|
-
<path d="M12 20L11 21M4 12L3 13" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
666
|
-
<path d="M15 4.08008C16.2 4.26008 17.46 4.74008 18.161 5.46008C19.058 6.25208 19.68 7.32008 19.92 9.00008" stroke="white" stroke-width="1.5" stroke-linecap="square"/>
|
|
667
|
-
<path d="M17.94 6.05957L16.5 7.49957" stroke="white" stroke-width="1.5" stroke-linecap="round"/>
|
|
668
|
-
</svg>` : "";
|
|
669
715
|
const textTranslateStyle = !cssConfig.launcherProgressBar ? " translateY(50%);" : "";
|
|
670
716
|
if (!cssConfig.launcherProgressBar) {
|
|
671
717
|
showBtn.classList.add("no-progress");
|
|
@@ -690,17 +736,6 @@ transform: translateY(-20%);
|
|
|
690
736
|
</div>
|
|
691
737
|
</div>
|
|
692
738
|
`;
|
|
693
|
-
function injectLauncherCSS() {
|
|
694
|
-
if (document.getElementById("rivia-launcher-css")) return;
|
|
695
|
-
const style2 = document.createElement("style");
|
|
696
|
-
style2.id = "rivia-launcher-css";
|
|
697
|
-
style2.textContent = `
|
|
698
|
-
/* Root */ .checklist-root { max-width: 500px; margin: auto; position: relative; font-family: var(--font-family); font-size: var(--font-size); color: var(--text-color); } /* Close button */ .checklist-close { position: absolute; top: 8px; right: 12px; background: transparent; border: none; font-size: 28px; cursor: pointer; color: var(--text-color); } /* Header */ .checklist-header { background: var(--header-bg); padding: 16px; border-radius: 8px 8px 0 0; } .checklist-subtitle { margin-top: 8px; color: var(--subtitle-color); } /* Progress */ .checklist-progress { display: flex; align-items: center; justify-content: space-between; } .progress-fraction { font-size: 13px; } /* Body */ .checklist-body { padding: 16px; background: var(--lower-bg); max-height: 340px; overflow: auto; border-radius: 0 0 8px 8px; } /* Steps */ .onboard-step { position: relative; display: flex; align-items: flex-start; cursor: pointer; padding: 8px; border-radius: 6px; background: var(--step-bg); margin-bottom: 16px; } .start-select { position: absolute; top: 0; left: -18px; width: 10px; height: 120%; background: rgba(247,143,7,0.9); border-radius: 4px 0 0 4px; display: none; } .onboard-circle { width: 16px; height: 16px; min-width: 16px; min-height: 16px; border-radius: 50%; border: 2px solid var(--checkbox-color, #f78f07); /* hardcoded for test */ background: transparent; margin-right: 10px; box-sizing: border-box; display: block; } .onboard-title { color: var(--heading-color); } .onboard-desc { color: var(--body-color); } .onboard-divider { border: none; border-top: 1px solid #9d9d9d; } .rivia-launcher { position: fixed; display: block; z-index: 9999; cursor: pointer; border: none; box-shadow: 0 2px 8px rgba(19, 20, 19, 0.2); background: var(--launcher-bg); color: var(--launcher-text); font-weight: bold; } .rivia-launcher .launcher-root { display: flex; align-items: center; width: 100%; height: 100%; } .rivia-launcher .launcher-left { flex: 1; display: flex; flex-direction: column; } .rivia-launcher .launcher-title { position: relative; margin: 0; line-height: 1; text-align: center; padding-left: 28px; } .rivia-launcher .launcher-icon { position: absolute; left: 10px; transform: translateY(50%); }
|
|
699
|
-
.rivia-launcher .launcher-text {font-size:var(--font-size); display: block; width: 100%; padding-left: 5%; text-align: center; pointer-events: none; }
|
|
700
|
-
.rivia-launcher .launcher-progress-wrap { margin-top: 4px; padding-left: 32px; } /* Text adjustment when progress bar is hidden */ .rivia-launcher.no-progress .launcher-text { transform: translateY(50%);font-size:var(--font-size); } .rivia-launcher .launcher-progress { display:flex; gap:4px; width:100%; padding:5px; height:3px; box-sizing:border-box; } .rivia-launcher .launcher-right { flex-shrink: 0; padding-right: 8px; } .rivia-launcher .launcher-fraction { font-size: 13px; white-space: nowrap; } /* Customer CSS */ .rivia-launcher { border-radius: 20px; } .rivia-launcher .launcher-progress { height: 6px; }
|
|
701
|
-
`;
|
|
702
|
-
document.head.appendChild(style2);
|
|
703
|
-
}
|
|
704
739
|
function applyChecklistTheme(root, cssConfig2) {
|
|
705
740
|
root.style.setProperty("--font-family", cssConfig2.fontFamily);
|
|
706
741
|
root.style.setProperty("--font-size", cssConfig2.fontSize);
|
|
@@ -776,6 +811,17 @@ transform: translateY(-20%);
|
|
|
776
811
|
closeBtn.style.left = `${Math.max(8, rect.left + rect.width / 2 - 170)}px`;
|
|
777
812
|
closeBtn.style.top = `${rect.bottom + 10}px`;
|
|
778
813
|
}
|
|
814
|
+
const closeElement = label.querySelector(`#checklistCloseBtn`);
|
|
815
|
+
console.log("closeElement", closeElement);
|
|
816
|
+
closeElement.addEventListener("click", (e) => {
|
|
817
|
+
console.log("close button clicked");
|
|
818
|
+
e.stopPropagation();
|
|
819
|
+
label.style.opacity = "0";
|
|
820
|
+
label.style.pointerEvents = "none";
|
|
821
|
+
sessionStorage.setItem("onboardingVisible", "false");
|
|
822
|
+
showBtn.style.display = "block";
|
|
823
|
+
});
|
|
824
|
+
closeBtn.onclick = () => console.log("CLICKED");
|
|
779
825
|
let check = 0;
|
|
780
826
|
console.log("before");
|
|
781
827
|
const STORAGE_KEY = "onboardingVisited";
|
|
@@ -984,7 +1030,7 @@ transform: translateY(-20%);
|
|
|
984
1030
|
const circle = stepElement.querySelector(".onboard-circle");
|
|
985
1031
|
if (circle) {
|
|
986
1032
|
circle.innerHTML = `
|
|
987
|
-
<div style="background-color: green; border-radius: 50%; width:
|
|
1033
|
+
<div style="background-color: green; border-radius: 50%; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center;">
|
|
988
1034
|
<svg width="16" height="16" viewBox="0 0 512 512" fill="white" xmlns="http://www.w3.org/2000/svg">
|
|
989
1035
|
<path d="M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206
|
|
990
1036
|
0-36.204l36.203-36.204c9.997-9.998 26.207-9.998
|
|
@@ -1053,7 +1099,7 @@ transform: translateY(-20%);
|
|
|
1053
1099
|
const circle = stepElement.querySelector(".onboard-circle");
|
|
1054
1100
|
if (circle) {
|
|
1055
1101
|
circle.innerHTML = `
|
|
1056
|
-
<div style="background-color: green; border-radius: 50%; width:
|
|
1102
|
+
<div style="background-color: green; border-radius: 50%; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center;position:relative;top: -3px;left: -4px;">
|
|
1057
1103
|
<svg width="16" height="16" viewBox="0 0 512 512" fill="white" xmlns="http://www.w3.org/2000/svg">
|
|
1058
1104
|
<path d="M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206
|
|
1059
1105
|
0-36.204l36.203-36.204c9.997-9.998 26.207-9.998
|
|
@@ -1213,19 +1259,12 @@ transform: translateY(-20%);
|
|
|
1213
1259
|
label.style.pointerEvents = "auto";
|
|
1214
1260
|
closeBtn.style.display = "flex";
|
|
1215
1261
|
showBtn.style.display = "none";
|
|
1262
|
+
console.log("after click:", showBtn.style.display);
|
|
1216
1263
|
sessionStorage.setItem("onboardingVisible", "true");
|
|
1217
|
-
positionCloseBtn();
|
|
1218
1264
|
requestAnimationFrame(() => {
|
|
1219
1265
|
label.style.opacity = "1";
|
|
1220
1266
|
});
|
|
1221
1267
|
});
|
|
1222
|
-
closeBtn.addEventListener("click", (ev) => {
|
|
1223
|
-
ev.stopPropagation();
|
|
1224
|
-
label.style.opacity = "0";
|
|
1225
|
-
label.style.pointerEvents = "none";
|
|
1226
|
-
closeBtn.style.display = "none";
|
|
1227
|
-
showBtn.style.display = "block";
|
|
1228
|
-
});
|
|
1229
1268
|
label.addEventListener(
|
|
1230
1269
|
"mouseenter",
|
|
1231
1270
|
() => label.style.transform = "scale(1.02)"
|