cec-nuxt-lib 0.4.0 → 0.4.1

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.4.0"
4
+ "version": "0.4.1"
5
5
  }
@@ -704,6 +704,21 @@ canvasHtml = canvasHtml.replace(
704
704
  );
705
705
 
706
706
  onMounted(() => {
707
+ // Expand all buttons
708
+ const expandAll = (btn) => {
709
+ btn.addEventListener('click', (e) => {
710
+ console.log(btn.id);
711
+ const op = btn.innerText;
712
+ btn.innerText = op === 'Expand all' ? 'Close all' : 'Expand all';
713
+ Array.from(document.getElementsByClassName(btn.id)).forEach(
714
+ (e) => (e.checked = op === 'Expand all')
715
+ );
716
+ });
717
+ };
718
+ Array.from(document.getElementsByClassName('expand-all')).forEach((b) => {
719
+ expandAll(b);
720
+ });
721
+
707
722
  let forms = Array.from(document.querySelectorAll('a')).filter(
708
723
  (a) =>
709
724
  regex.test(a.href) &&
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.4.0",
2
+ "version": "0.4.1",
3
3
  "name": "cec-nuxt-lib",
4
4
  "description": "Nuxt components and assets",
5
5
  "license": "MIT",