@ilo-org/twig 0.2.23 → 0.2.24

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.
@@ -1,9 +1,9 @@
1
1
 
2
- > @ilo-org/twig@0.2.23 build:lib /home/runner/work/designsystem/designsystem/packages/twig
2
+ > @ilo-org/twig@0.2.24 build:lib /home/runner/work/designsystem/designsystem/packages/twig
3
3
  > node importprefix.js && node importsvgs.js && pnpm output
4
4
 
5
5
  theme prefix added
6
6
 
7
- > @ilo-org/twig@0.2.23 output /home/runner/work/designsystem/designsystem/packages/twig
7
+ > @ilo-org/twig@0.2.24 output /home/runner/work/designsystem/designsystem/packages/twig
8
8
  > node outputtwigs.js
9
9
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @ilo-org/twig
2
2
 
3
+ ## 0.2.24
4
+
5
+ ### Patch Changes
6
+
7
+ - 55e5c479e: Add a check to only run the accordion function once in Drupal.
8
+
3
9
  ## 0.2.23
4
10
 
5
11
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ilo-org/twig",
3
- "version": "0.2.23",
3
+ "version": "0.2.24",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Twig components for the ILO's Design System",
6
6
  "main": "",
@@ -5,9 +5,12 @@ Drupal.behaviors.accordion = {
5
5
  Array.prototype.forEach.call(
6
6
  document.querySelectorAll(`[data-loadcomponent="Accordion"]`),
7
7
  (element) => {
8
- // eslint-disable-next-line no-console
9
- console.log("loading Accordion component....");
10
- new Accordion(element);
8
+ if(!element.dataset.jsProcessed) {
9
+ // eslint-disable-next-line no-console
10
+ console.log("loading Accordion component....");
11
+ new Accordion(element);
12
+ element.dataset.jsProcessed = true;
13
+ }
11
14
  }
12
15
  );
13
16
  },