cec-nuxt-lib 0.3.2 → 0.3.4

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/module.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "cec-nuxt-lib",
3
3
  "configKey": "cec-nuxt-lib",
4
- "version": "0.3.2"
4
+ "version": "0.3.4"
5
5
  }
@@ -0,0 +1,680 @@
1
+ <script setup lang="ts">
2
+ import { onMounted } from 'vue';
3
+ import { useState } from '#app';
4
+
5
+ import { createRenderer, text } from '@contensis/canvas-html';
6
+
7
+ import type { Block } from '@contensis/canvas-html';
8
+
9
+ const { sizeString } = useHelpers();
10
+ const baseUrl = useState('baseUrl');
11
+ const getCanvas = (data: Block[]) => renderer({ data });
12
+ const listItems = useState('listItems');
13
+ const questions = useState('questions', () => []);
14
+ let canvasHtml;
15
+
16
+ const props = defineProps({
17
+ canvas: {
18
+ type: Object,
19
+ required: true,
20
+ },
21
+ });
22
+
23
+ const { canvas } = props;
24
+
25
+ const regex =
26
+ /^https:\/\/digital-core\.cheshireeast\.gov\.uk(?!.*(?:&pagePath|&pageTitle|login)).*$/;
27
+
28
+ const abbr = (data) => {
29
+ return `<abbr title="${text(data.entryDescription)}">${text(data.entryTitle)}</abbr>`;
30
+ };
31
+
32
+ const accordionComponent = (props: any) => {
33
+ let id = props.block?.id;
34
+ let html = props.block?.value?.expandAll
35
+ ? `
36
+ <div class="text-end">
37
+ <button
38
+ id="${props.block?.id}"
39
+ class="expand-all btn btn-outline-success"
40
+ type="button"
41
+ >
42
+ Expand all
43
+ </button>
44
+ </div>
45
+ `
46
+ : '';
47
+ html += `
48
+ <p class="sr-only">
49
+ The following checkboxes are used for accordion drop-downs. When
50
+ selected, they show content that was visually hidden
51
+ </p>
52
+ <section class="access-acc-container">
53
+ `;
54
+ let acc = props.block?.value?.accordionSection;
55
+ acc.forEach((e, i) => {
56
+ let accId = `${id}_${i}`;
57
+ html += `
58
+ <input class="${id}"
59
+ id="${accId}"
60
+ type="checkbox"
61
+ />
62
+ <label for="${accId}">${e.title}</label>
63
+ <article>${e.content}</article>
64
+ `;
65
+ });
66
+ html += '</section>';
67
+ return html;
68
+ };
69
+
70
+ const anchor = (data) => {
71
+ return `<${data.tag} id="${data.id}">${data.text}</${data.tag}>`;
72
+ };
73
+
74
+ const carousel = (data, id) => {
75
+ // Create the indicators
76
+ let indicators = data.carouselComponent.reduce((acc, e, i) => {
77
+ return (
78
+ acc +
79
+ `<button type="button" data-bs-target="#${id}-indicators" data-bs-slide-to="${i}" class="${i ? '' : 'active'}" aria-current="${i ? '' : 'true'}" aria-label="Slide ${i}">${i + 1}</button>`
80
+ );
81
+ }, '');
82
+
83
+ // Create the slides
84
+ let slides = data.carouselComponent.reduce((acc, e, i) => {
85
+ return (
86
+ acc +
87
+ `<div class="carousel-item ${i ? '' : 'active'}">
88
+ ${e.link.target ? '<a class="innerLink" href="' + e.link.target + '"><span class="hidden">' + e.link.label + '</span></a>' : ''}
89
+ <img src="${e.image.asset.sys.uri}" class="d-block w-100" alt="${e.image.altText}">
90
+ <div class="carousel-caption d-none d-md-block">
91
+ ${e.content}
92
+ </div>
93
+ </div>`
94
+ );
95
+ }, '');
96
+ // Return the component
97
+ return `
98
+ <div id="${id}-indicators" class="carousel slide">
99
+ <div class="carousel-indicators ">
100
+ ${indicators}
101
+ </div>
102
+ <div class="carousel-inner">
103
+ ${slides}
104
+ </div>
105
+ <button class="carousel-control-prev" type="button" data-bs-target="#${id}-indicators" data-bs-slide="prev">
106
+ <span class="icon-wrapper">
107
+ <span class="carousel-control-prev-icon" aria-hidden="true"></span>
108
+ </span>
109
+ <span class="visually-hidden">Previous</span>
110
+ </button>
111
+ <button class="carousel-control-next" type="button" data-bs-target="#${id}-indicators" data-bs-slide="next">
112
+ <span class="icon-wrapper">
113
+ <span class="carousel-control-next-icon" aria-hidden="true"></span>
114
+ </span>
115
+ <span class="visually-hidden">Next</span>
116
+ </button>
117
+ </div>`;
118
+ };
119
+
120
+ const cecButton = (props: any) => {
121
+ let item = props.block?.value;
122
+ let inner = item.text.length > 20 ? `<small>${item.text}</small>` : item.text;
123
+ let title = item.titleText?.length ? `title="${item.titleText}"` : '';
124
+ return `<a ${title} class="cec-button" href="${item.url}">${inner}</a>`;
125
+ };
126
+
127
+ const centralColumn = (props: any) => {
128
+ let item = props.block?.value;
129
+ if (item.column.length === 1) {
130
+ return `
131
+ <div class="row">
132
+ <div class="col-lg-8 col-md-12 mx-auto mt-3 mb-4">${item.column[0]}</div>
133
+ </div>
134
+ `;
135
+ } else if (item.column.length === 2) {
136
+ return `
137
+ <div class="row">
138
+ <div class="col-12 col-lg-6 mb-lg-4">
139
+ ${item.column[0]}
140
+ </div>
141
+ <div class="col-12 col-lg-6 mb-lg-4">
142
+ ${item.column[1]}
143
+ </div>
144
+ </div>
145
+ `;
146
+ } else {
147
+ return `
148
+ <div class="row pb-3">
149
+ <div class="col-12 col-lg-4 mb-4">
150
+ ${item.column[0]}
151
+ </div>
152
+ <div class="col-12 col-lg-4 mb-4">
153
+ ${item.column[1]}
154
+ </div>
155
+ <div class="col-12 col-lg-4 mb-4">
156
+ ${item.column[2]}
157
+ </div>
158
+ </div>
159
+ `;
160
+ }
161
+ };
162
+
163
+ const container = (data) => {
164
+ if (data.closeContainer) {
165
+ return `</div>${data.singleChoice === 'cec-main-column' ? '</div>' : ''}`;
166
+ }
167
+ if (data.singleChoice === 'full-width') {
168
+ return '<div class="container">';
169
+ }
170
+ return `<div class="container">
171
+ <div class="col-lg-8 cec-main-col-width">
172
+ `;
173
+ };
174
+
175
+ const promotionalFullWidthImageWithOverlay = (props: any) => {
176
+ let item = props.block?.value;
177
+ let overlay;
178
+ if (!item.overlayText) {
179
+ overlay = `
180
+ <div class="cec-cent-promo-txt-wrap top-50 end-0">
181
+ <div
182
+ class="cec-cent-promo-txt text-center bg-tog-for-chil-green col-lg-8 col-md-10 mx-auto my-md-4 mb-md-5 pb-2"
183
+ >
184
+ <img
185
+ class="px-4 mx-auto mt-2"
186
+ alt="${item.overlayImage.altText}"
187
+ src="${baseUrl.value}${item.overlayImage.asset.sys.uri}"
188
+ />
189
+ </div>
190
+ </div>`;
191
+ } else {
192
+ overlay = `
193
+ <div class="position-relative">
194
+ <div class="row g-0">
195
+ <img
196
+ class="img-fluid"
197
+ alt="${item.image.altText}"
198
+ src="${baseUrl.value}${item.image.asset.sys.uri}"
199
+ />
200
+ <div class="cec-cent-promo-txt-wrap top-50 end-0">
201
+ <div class="container-md">
202
+ <div
203
+ class="cec-cent-promo-txt bg-tog-for-chil-green col-lg-8 col-md-12 mx-auto my-md-4 mb-md-5 pb-2"
204
+ >
205
+ <div class="text-white text-center p-4">${item.overlayText}</div>
206
+ </div>
207
+ </div>
208
+ </div>
209
+ </div>
210
+ </div>
211
+ `;
212
+ }
213
+ return `
214
+ <div class="position-relative">
215
+ <div class="row g-0 mb-3">
216
+ <img
217
+ class="img-fluid"
218
+ alt="${item.image.altText}"
219
+ src="${baseUrl.value}${item.image.asset.sys.uri}"
220
+ />
221
+ ${overlay}
222
+ </div>
223
+ </div>
224
+ `;
225
+ };
226
+
227
+ const promotionalContrastRegion = (props: any) => {
228
+ let item = props.block?.value;
229
+ const bgClass = `bg-${item.colour.toLowerCase().replace(/\s/g, '-')}`;
230
+ let textCol = `
231
+ <div class="p-2 ps-lg-4 ms-lg-5 col">
232
+ <div class="cec-pull-column pe-md-5">${item.content}</div>
233
+ </div>`;
234
+ let imageCol = `
235
+ <div class="col">
236
+ <img
237
+ class="img-fluid"
238
+ alt="${item.image.altText}"
239
+ src="${baseUrl.value}${item.image.asset.sys.uri}"
240
+ />
241
+ </div>`;
242
+ return `
243
+ <div
244
+ class="${bgClass} cec-pull-container pe-md-0 d-flex flex-column flex-md-row justify-content-center ps-4 align-items-center py-5 mb-4"
245
+ >
246
+ ${item.alignment === 'left' ? imageCol + textCol : textCol + imageCol}
247
+ </div>
248
+ `;
249
+ };
250
+
251
+ const promotionalFullWidthImageWithSideOverlay = (props: any) => {
252
+ let item = props.block?.value;
253
+ return `
254
+ <div class="position-relative side-overlay-section">
255
+ <div class="row g-0">
256
+ <img
257
+ class="img-fluid"
258
+ alt="${item.image.altText}"
259
+ src="${baseUrl.value}${item.image.asset.sys.uri}"
260
+ />
261
+ <div
262
+ style="position: absolute"
263
+ class="my-side-overlay col-lg-6 bg-cec-green ms-lg-5 mt-lg-5 p-2 top-0"
264
+ >
265
+ <h2 class="text-white promo-heading display-6">${item.heading}</h2>
266
+ <div class="text-white">${item.content}</div>
267
+ </div>
268
+ </div>
269
+ </div>
270
+ `;
271
+ };
272
+
273
+ const centralPromotionalSection = (props: any) => {
274
+ let item = props.block?.value;
275
+ return `
276
+ <div class="row">
277
+ <div class="py-5 bg-cec-central-promo-section">
278
+ <div class="cec-meta-outer px-4">
279
+ <div class="cec-meta-content col-lg-8 col-md-12 px-3 py-4 px-md-5">
280
+ <div>${item.content}</div>
281
+ </div>
282
+ </div>
283
+ </div>
284
+ </div>
285
+ `;
286
+ };
287
+
288
+ const promotionalBannerWithText = (props: any) => {
289
+ let item = props.block?.value;
290
+ let overlay = `
291
+ <div class="cec-cent-promo-txt-wrap col-md-11 top-50 w-100 text-center">
292
+ <h1
293
+ class="mb-0 cec-cent-promo-txt d-md-inline-block px-3 pt-1 pb-3 promo-heading bg-cec-green text-white"
294
+ >
295
+ ${item.text}
296
+ </h1>
297
+ </div>
298
+ `;
299
+ let paras = item.html.replace(/<\/?p>/g, '').split('\n');
300
+ if (paras.length) {
301
+ overlay = `
302
+ <div
303
+ class="cec-cent-promo-txt-wrap col-lg-8 col-md-11 text-center top-50 w-100 "
304
+ >
305
+ <div id="overlay" class="bg-tog-for-chil-green d-md-inline-block py-3 px-4 ">
306
+ <h1
307
+ class="hp-promo-heading text-white d-md-inline-block display-md-5 text-center px-3 pt-1 pb-0"
308
+ style="font-family: myriad-pro, sans-serif"
309
+ >
310
+ ${paras[0]}
311
+ </h1>
312
+ <div class="d-flex justify-content-center mt-2 strapline text-white">
313
+ ${paras[1]}
314
+ </div>
315
+ </div>
316
+ </div>`;
317
+ }
318
+ return `
319
+ <div class="position-relative row g-0 mb-3">
320
+ <img
321
+ alt="${item.bannerImage.altText}"
322
+ src="${baseUrl.value}${item.bannerImage.asset.sys.uri}"
323
+ />
324
+ ${overlay}
325
+ </div>
326
+ `;
327
+ };
328
+
329
+ const processUri = (uri) => {
330
+ return uri.toLowerCase().replace(/%e2/g, '%E2');
331
+ };
332
+
333
+ const genericList = (props: any) => {
334
+ let item = props.block?.value;
335
+ let id = props.block.id;
336
+ return listItems.value[id]
337
+ ? `
338
+ <h2 class="fs-4 mt-3">${item.title}</h2>
339
+ <ul>
340
+ ${listItems.value[id].reduce((acc, e) => {
341
+ return e.sys.dataFormat === 'webpage'
342
+ ? `${acc}
343
+ <li><a href="${processUri(e.sys.uri)}">${e.title}</a></li>
344
+ `
345
+ : `${acc}
346
+ <li>
347
+ <a href="${processUri(e.sys.uri)}"
348
+ >${e.title[0].toUpperCase()}${e.title.slice(1)}
349
+ (${e.sys.contentTypeId.toUpperCase()},
350
+ ${sizeString(e.sys.properties.fileSize)})
351
+ </a>
352
+ </li>
353
+ `;
354
+ }, '')}
355
+ </ul>
356
+ `
357
+ : '';
358
+ };
359
+
360
+ const heroUnit = (props: any) => {
361
+ let item = props.block?.value;
362
+ return `<div class="hero-unit my-4">${item.content}</div>`;
363
+ };
364
+
365
+ const horizontalTable = (props: any) => {
366
+ let data = props.block?.value;
367
+ let rows = data.tableRow.reduce((acc, r) => {
368
+ let cols = r.columns.reduce((acc, c) => {
369
+ return `<td>${c}</td>`;
370
+ }, '');
371
+ return `${acc}<tr><th scope="row">${r.headerCell}</th>${cols}</tr>`;
372
+ }, '');
373
+ return `
374
+ <div class="table-responsive">
375
+ <table class="usr_TableDefault">
376
+ <caption class="hidden">${data.caption}</caption>
377
+ <tbody>
378
+ ${rows}
379
+ </tbody>
380
+ </table>
381
+ </div>
382
+ `;
383
+ };
384
+
385
+ const htmlComponent = (props: any) => {
386
+ let item = props.block?.value;
387
+ return item.html;
388
+ };
389
+
390
+ const imageWithCSS = (props: any) => {
391
+ let data = props.block?.value;
392
+ let classes = data.alignment || '';
393
+ classes += data.otherCss ? ` ${data.otherCss}` : '';
394
+ return `
395
+ <img src="${data.image.asset.sys.uri}" alt="${data.image.altText}" class="${classes}" />
396
+ `;
397
+ };
398
+
399
+ const linkEntry = (data) => {
400
+ return `<a title="${data.title || ''}" href="${data.target}">${data.text}</a>`;
401
+ };
402
+
403
+ const processTime = (str) => {
404
+ let suffix = 'am';
405
+ if (str === '00:00') {
406
+ return 'midnight';
407
+ }
408
+ if (str === '12:00') {
409
+ return 'midday';
410
+ }
411
+ if (!str) {
412
+ return 'Closed';
413
+ }
414
+ let time = str.split(':').reduce((acc, e) => {
415
+ return [...acc, parseInt(e)];
416
+ }, []);
417
+ if (time[0] > 12) {
418
+ suffix = 'pm';
419
+ time[0] -= 12;
420
+ }
421
+ let res = time[0].toString();
422
+ if (time[1]) {
423
+ res = `${res}:${time[1]}${suffix}`;
424
+ } else {
425
+ res += suffix;
426
+ }
427
+ return res;
428
+ };
429
+
430
+ const openingHours = (data) => {
431
+ let body = data.openingHours.reduce((acc, e) => {
432
+ let from = processTime(e.from);
433
+ let to = processTime(e.to);
434
+ let hours = '';
435
+ if (from === 'Closed') {
436
+ hours = 'Closed';
437
+ } else {
438
+ hours = `${from} to ${to}`;
439
+ }
440
+ return (
441
+ acc +
442
+ `<tr>
443
+ <td>${e.dayInformation}</td>
444
+ <td>${hours}</td>
445
+ </tr>`
446
+ );
447
+ }, '');
448
+ return `
449
+ <table class="usrTableDefault">
450
+ <caption class="hidden">
451
+ ${data.entryTitle} opening hours
452
+ </caption>
453
+ <thead>
454
+ <tr>
455
+ <th scope="col">Day</th>
456
+ <th scope="col">Opening times</th>
457
+ </tr>
458
+ </thead>
459
+ <tbody>
460
+ ${body}
461
+ </tbody>
462
+ </table>
463
+ `;
464
+ };
465
+
466
+ const myInlineEntry = (props: any) => {
467
+ let data = props.block?.value;
468
+ let id = props.block?.id;
469
+ switch (props.block?.value.sys.contentTypeId) {
470
+ case 'abbreviation':
471
+ return abbr(data);
472
+ case 'anchor':
473
+ return anchor(data);
474
+ case 'carousel':
475
+ return carousel(data, id);
476
+ case 'container':
477
+ return container(data);
478
+ case 'linkEntry':
479
+ return linkEntry(data);
480
+ case 'openingHours':
481
+ return openingHours(data);
482
+ case 'questions':
483
+ return makeQuestions(data, id);
484
+ default:
485
+ return `<span> ${text(data.entrytitle)} </span>`;
486
+ }
487
+ };
488
+
489
+ const makeQuestions = (data, id) => {
490
+ data.question.forEach((qu, j) => {
491
+ qu.stack = [0];
492
+ qu.buttons = qu.responseForQuestionComponent.reduce((acc, r, i) => {
493
+ return (
494
+ acc +
495
+ `<div class="col w-auto ps-0 pe-3">
496
+ <button
497
+ type="button"
498
+ id="${id}_${j}_${i}"
499
+ class="cec-button question-btns"
500
+ >
501
+ ${r.buttonText}
502
+ </button>
503
+ </div>`
504
+ );
505
+ }, '');
506
+ questions.value.push({ id: id, question: data.question, stack: [0] });
507
+ });
508
+
509
+ let buttons = data.question[0].buttons;
510
+ return `
511
+ <div class="mt-3 questions">
512
+ <h2>Answer the questions:</h2>
513
+ <fieldset class="p-1 mb-3">
514
+ <legend>${data.entryTitle}</legend>
515
+ <div class="ps-2 align-items-end question row g-0">
516
+ <div id="${id}_display">${data.question[0].question}</div>
517
+ <div class="row row-cols-auto btns-div" id="${id}_buttons">
518
+ ${buttons}
519
+ </div>
520
+ </div>
521
+ <button
522
+ type="button"
523
+ class="mt-4 btn btn-light previous"
524
+ id="${id}_prev"
525
+ >
526
+ Previous question
527
+ </button>
528
+ <button
529
+ type="button"
530
+ class="mt-4 btn btn-light reset"
531
+ id="${id}_reset"
532
+ >
533
+ Restart
534
+ </button>
535
+ </fieldset>
536
+ </div>`;
537
+ };
538
+
539
+ const renderer = createRenderer({
540
+ blocks: {
541
+ _inlineEntry: myInlineEntry,
542
+ },
543
+ components: {
544
+ accordionComponent: accordionComponent,
545
+ cecButton: cecButton,
546
+ centralColumn: centralColumn,
547
+ centralPromotionalSection: centralPromotionalSection,
548
+ promotionalFullWidthImageWithOverlay: promotionalFullWidthImageWithOverlay,
549
+ promotionalFullWidthImageWithSideOverlay:
550
+ promotionalFullWidthImageWithSideOverlay,
551
+ genericList: genericList,
552
+ heroUnit: heroUnit,
553
+ horizontalTable: horizontalTable,
554
+ htmlComponent: htmlComponent,
555
+ imageWithCSS: imageWithCSS,
556
+ promotionalBannerWithText: promotionalBannerWithText,
557
+ promotionalContrastRegion: promotionalContrastRegion,
558
+ },
559
+ });
560
+
561
+ // Process the canvas
562
+ canvasHtml = getCanvas(canvas);
563
+ canvasHtml = canvasHtml.replace(
564
+ /<img src="|<caption|<table|<\/table>|<th>/g,
565
+ (match) => {
566
+ switch (match) {
567
+ case '<img src="':
568
+ return `<img src="${baseUrl.value}`;
569
+ case '<caption':
570
+ return "<caption class='hidden'";
571
+ case '<table':
572
+ return "<div class='table-responsive'><table class='usr_TableDefault'";
573
+ case '</table>':
574
+ return '</table></div>';
575
+ case '<th>':
576
+ return '<th scope="col">';
577
+ default:
578
+ return match;
579
+ }
580
+ }
581
+ );
582
+ canvasHtml = canvasHtml.replace(
583
+ /(<a href="mailto:[^"]+">)([^<]+)(<\/a>)/g,
584
+ (_, p1, p2, p3) => {
585
+ return `${p1}${p2.replace(/([.@])/g, '<wbr />$1')}${p3}`;
586
+ }
587
+ );
588
+
589
+ onMounted(() => {
590
+ let forms = Array.from(document.querySelectorAll('a')).filter(
591
+ (a) =>
592
+ regex.test(a.href) &&
593
+ a.href !== 'https://digital-core.cheshireeast.gov.uk/w/webpage/register'
594
+ );
595
+
596
+ forms.forEach((link) => {
597
+ link.href = `${link.href}&pageTitle=${encodeURIComponent(
598
+ title.value
599
+ )}&pagePath=${baseUrl.value}${encodeURIComponent(path.value)}`;
600
+ });
601
+
602
+ const setUpListeners = () => {
603
+ let qBtns = Array.from(document.getElementsByClassName('question-btns'));
604
+ qBtns.forEach((b) => {
605
+ let temp = b.id.split('_');
606
+ let id = temp[0];
607
+ let qInd = parseInt(temp[1]);
608
+ let rInd = parseInt(temp[2]);
609
+ let q = questions.value.find((e) => e.id === id);
610
+ if (q) {
611
+ let content =
612
+ q.question[qInd].responseForQuestionComponent[rInd].display;
613
+ let target = q.question[qInd].responseForQuestionComponent[rInd].id;
614
+ if (!b.onclick) {
615
+ if (content) {
616
+ b.onclick = () => display(id, content);
617
+ } else {
618
+ b.onclick = () => goto(id, target);
619
+ }
620
+ }
621
+ }
622
+ });
623
+ };
624
+
625
+ const goto = (id, index, addToStack = true) => {
626
+ let qTop = questions.value.find((e) => e.id === id);
627
+ if (addToStack) {
628
+ qTop.stack.push(index);
629
+ }
630
+ let q = qTop.question[index];
631
+ document.getElementById(id + '_display').innerHTML = q.question;
632
+ document.getElementById(id + '_buttons').innerHTML = q.buttons;
633
+ setUpListeners();
634
+ };
635
+
636
+ const display = (id, display) => {
637
+ document.getElementById(id + '_display').innerHTML = display;
638
+ document.getElementById(id + '_buttons').innerHTML = '&nbsp;';
639
+ };
640
+
641
+ const prev = (id) => {
642
+ let qTop = questions.value.find((e) => e.id === id);
643
+ let ind = qTop.stack.pop();
644
+ goto(id, ind, !qTop.stack.length);
645
+ };
646
+
647
+ const reset = (id) => {
648
+ let qTop = questions.value.find((e) => e.id === id);
649
+ if (qTop.stack.length) {
650
+ qTop.stack = [];
651
+ goto(id, 0);
652
+ }
653
+ };
654
+
655
+ let resetBtns = Array.from(document.getElementsByClassName('reset'));
656
+ resetBtns.forEach((rb) => {
657
+ let id = rb.id.split('_')[0];
658
+ if (!rb.onclick) {
659
+ rb.onclick = () => reset(id);
660
+ }
661
+ });
662
+
663
+ let prevBtns = Array.from(document.getElementsByClassName('previous'));
664
+ prevBtns.forEach((pb) => {
665
+ let id = pb.id.split('_')[0];
666
+ if (!pb.onclick) {
667
+ pb.onclick = () => prev(id);
668
+ }
669
+ });
670
+
671
+ setUpListeners();
672
+ });
673
+ </script>
674
+
675
+ <template>
676
+ <div v-html="canvasHtml"></div>
677
+ </template>
678
+ <style type="text/css" scoped>
679
+ :deep(fieldset){border:1px solid #000}:deep(legend){float:none;font-size:1.5rem;margin-left:20px;width:auto}:deep(button.carousel-control-prev:focus,button.carousel-control-next:focus){border:4px solid #000!important}:deep(.icon-wrapper){background-color:#000;border-radius:10px;padding-top:.5rem;width:50px}:deep(.carousel-indicators){margin-bottom:.5rem}:deep(.carousel-indicators [data-bs-target].active){color:blue;font-weight:600}:deep(.carousel-indicators [data-bs-target]){background-clip:unset;background-color:#fff;border-radius:10px;cursor:pointer;height:unset;margin-bottom:0;margin-left:3px;margin-right:3px;opacity:.7;text-indent:unset;transition:opacity .6s ease;width:40px}@media (min-width:769px){:deep(#overlay){border-radius:10px!important}}@media (max-width:768px){:deep(#overlay){border-radius:none}}
680
+ </style>
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.3.2",
2
+ "version": "0.3.4",
3
3
  "name": "cec-nuxt-lib",
4
4
  "description": "Nuxt components and assets",
5
5
  "license": "MIT",