cec-nuxt-lib 0.6.4 → 0.6.5
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
|
@@ -377,6 +377,10 @@ const makeAddressItem = (prop, text) => {
|
|
|
377
377
|
return `<p class="mb-0" itemprop="${prop}">${text}</p>`;
|
|
378
378
|
};
|
|
379
379
|
|
|
380
|
+
cont formatId = (str) => {
|
|
381
|
+
return str.replace('?', '').replace(/\W/g, '-');
|
|
382
|
+
}
|
|
383
|
+
|
|
380
384
|
const makeQuestions = (data, id) => {
|
|
381
385
|
data.question.forEach((qu, j) => {
|
|
382
386
|
qu.stack = [0];
|
|
@@ -387,7 +391,7 @@ const makeQuestions = (data, id) => {
|
|
|
387
391
|
`<div class="col w-auto ps-0 pe-3">
|
|
388
392
|
<button
|
|
389
393
|
type="button"
|
|
390
|
-
id="${data.title}_${qu.question
|
|
394
|
+
id="${formatId(data.title)}_${formatId(qu.question)}_${formatId(r.buttonText)}_${id}_${j}_${i}"
|
|
391
395
|
class="cec-button question-btns"
|
|
392
396
|
>
|
|
393
397
|
${r.buttonText}
|
|
@@ -400,7 +404,7 @@ const makeQuestions = (data, id) => {
|
|
|
400
404
|
(acc, r) => {
|
|
401
405
|
return `${acc}<option value="${r.buttonText}">${r.buttonText}</option>`;
|
|
402
406
|
},
|
|
403
|
-
`<select class="question-select" name="${id}_${j}" id="${data.title
|
|
407
|
+
`<select class="question-select" name="${id}_${j}" id="${formatId(data.title)}_${formatId(qu.question)}_select_${id}_${j}"><option value="" disabled selected hidden>Choose an option</option>`
|
|
404
408
|
);
|
|
405
409
|
qu.select += '</select>';
|
|
406
410
|
}
|
package/package.json
CHANGED