@iamproperty/components 2.9.0 → 3.1.0

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.
Files changed (89) hide show
  1. package/README.md +9 -130
  2. package/assets/css/core.min.css +1 -1
  3. package/assets/css/core.min.css.map +1 -1
  4. package/assets/css/style.min.css +1 -1
  5. package/assets/css/style.min.css.map +1 -1
  6. package/assets/favicons/manifest.json +32 -0
  7. package/assets/js/main.js +57 -0
  8. package/assets/js/modules/chart.js +18 -17
  9. package/assets/js/modules/file-upload.js +48 -0
  10. package/assets/js/modules/form.js +27 -18
  11. package/assets/js/modules/nav.js +9 -8
  12. package/assets/js/modules/orderablelist.js +122 -0
  13. package/assets/js/modules/table.js +24 -24
  14. package/assets/js/scripts.bundle.js +63 -52
  15. package/assets/js/scripts.bundle.js.map +1 -1
  16. package/assets/js/scripts.bundle.min.js +2 -2
  17. package/assets/js/scripts.bundle.min.js.map +1 -1
  18. package/assets/sass/_functions/utilities.scss +3 -110
  19. package/assets/sass/_functions/variables.scss +3 -2
  20. package/assets/sass/_tests/colours.spec.scss +45 -0
  21. package/assets/sass/_tests/func.spec.scss +233 -0
  22. package/assets/sass/_tests/mixins.spec.scss +194 -0
  23. package/assets/sass/_tests/sass.spec.js +9 -0
  24. package/assets/sass/_tests/typography.spec.scss +36 -0
  25. package/assets/sass/components/alert.scss +1 -1
  26. package/assets/sass/components/cardDeck.scss +1 -1
  27. package/assets/sass/components/carousel.scss +5 -5
  28. package/assets/sass/components/charts.scss +1 -1
  29. package/assets/sass/components/nav.scss +47 -2
  30. package/assets/sass/components/stepper.scss +3 -3
  31. package/assets/sass/elements/buttons.scss +46 -4
  32. package/assets/sass/elements/card.scss +112 -0
  33. package/assets/sass/elements/container.scss +13 -2
  34. package/assets/sass/elements/forms.scss +68 -0
  35. package/assets/sass/elements/links.scss +2 -1
  36. package/assets/sass/elements/lists.scss +48 -1
  37. package/assets/sass/elements/panel.scss +3 -3
  38. package/assets/sass/elements/tables.scss +1 -1
  39. package/assets/sass/elements/tooltips.scss +1 -1
  40. package/assets/sass/foundations/icons.scss +8 -0
  41. package/assets/sass/foundations/root.scss +23 -4
  42. package/assets/ts/main.js +57 -0
  43. package/assets/ts/main.js.map +1 -0
  44. package/assets/ts/main.ts +10 -10
  45. package/assets/ts/modules/accordion.js +33 -0
  46. package/assets/ts/modules/accordion.js.map +1 -0
  47. package/dist/components.es.js +2518 -0
  48. package/dist/components.umd.js +56 -3784
  49. package/dist/style.css +1 -0
  50. package/package.json +87 -87
  51. package/src/components/Accordion/Accordion.screenshot.vue +57 -0
  52. package/src/components/Accordion/Accordion.spec.js +63 -0
  53. package/src/components/Accordion/Accordion.vue +1 -1
  54. package/src/components/Accordion/AccordionItem.vue +1 -1
  55. package/src/components/Accordion/__screenshots__/win32/laptop/Accordion.png +0 -0
  56. package/src/components/Accordion/__screenshots__/win32/mobile/Accordion.png +0 -0
  57. package/src/components/Accordion/__screenshots__/win32/tablet/Accordion.png +0 -0
  58. package/src/components/Alert/Alert.spec.js +49 -0
  59. package/src/components/Alert/Alert.vue +3 -3
  60. package/src/components/Banner/Banner.spec.js +28 -0
  61. package/src/components/CardDeck/CardDeck.spec.js +99 -0
  62. package/src/components/CardDeck/CardDeck.vue +1 -1
  63. package/src/components/Carousel/Carousel.spec.js +45 -0
  64. package/src/components/Chart/Chart.spec.js +201 -0
  65. package/src/components/Chart/Chart.vue +3 -3
  66. package/src/components/Header/Header.spec.js +33 -0
  67. package/src/components/Modal/Modal.spec.js +22 -0
  68. package/src/components/Nav/Nav.spec.js +35 -0
  69. package/src/components/Nav/Nav.vue +5 -2
  70. package/src/components/Stepper/Stepper.spec.js +99 -0
  71. package/src/components/Tabs/Tab.vue +6 -0
  72. package/src/components/Tabs/Tabs.vue +15 -13
  73. package/src/components/Testimonial/Testimonial.spec.js +57 -0
  74. package/src/components/Timeline/Timeline.spec.js +17 -0
  75. package/src/elements/Card/Card.vue +11 -2
  76. package/src/elements/Input/Input.vue +14 -10
  77. package/src/elements/Table/Table.spec.js +90 -0
  78. package/src/elements/Table/Table.vue +8 -5
  79. package/src/foundations/Icon/Icon.spec.js +24 -0
  80. package/src/foundations/Logo/Logo.spec.js +56 -0
  81. package/src/vue-shim.d.ts +6 -0
  82. package/dist/components.common.js +0 -3773
  83. package/dist/components.common.js.map +0 -1
  84. package/dist/components.css +0 -2
  85. package/dist/components.css.map +0 -1
  86. package/dist/components.umd.js.map +0 -1
  87. package/dist/components.umd.min.js +0 -2
  88. package/dist/components.umd.min.js.map +0 -1
  89. package/dist/demo.html +0 -1
@@ -0,0 +1,122 @@
1
+ function orderlist(list) {
2
+ const randID = 'list_'+Math.random().toString(36).substr(2, 9);
3
+ const listItems = list.querySelectorAll('li');
4
+ const listCount = listItems.length;
5
+ let draggedRow;
6
+
7
+ list.setAttribute('role','list');
8
+ list.setAttribute('tabindex',0);
9
+ list.setAttribute('aria-label','Use the key tab to buttons to move between list items, once you have selected a list item you can move it up and down using the arrow keys.');
10
+
11
+ list.querySelectorAll('li').forEach((item, index) => {
12
+
13
+ // Make draggable
14
+ item.setAttribute('id',randID+'_row_'+(index+1));
15
+ item.setAttribute('data-order',index+1);
16
+ item.setAttribute('draggable','true');
17
+ item.addEventListener("dragstart", setDraggedRow);
18
+ item.setAttribute('tabindex',0);
19
+ item.setAttribute('role','listitem');
20
+ item.setAttribute('aria-label',`${item.innerText}: ${index+1} of ${listCount} moveable items`);
21
+ });
22
+
23
+ function setDraggedRow(e) {
24
+ e.dataTransfer.setData("text/plain", e.target.id);
25
+ draggedRow = e.target;
26
+ e.target.classList.add('li--dragging');
27
+ }
28
+
29
+ function resetItems(){
30
+
31
+ // Re label the rows
32
+ Array.from(list.querySelectorAll('li')).forEach((item, index) => {
33
+ item.classList.remove('li--dragging')
34
+ item.classList.remove('li--dropable')
35
+ item.setAttribute('data-order',index+1);
36
+ item.setAttribute('aria-label',`${item.innerText}: ${index+1} of ${listCount} moveable items`);
37
+ });
38
+ }
39
+
40
+ list.addEventListener("dragover", function( e ) {
41
+ // prevent default to allow drop
42
+ e.preventDefault();
43
+ }, false);
44
+
45
+ list.addEventListener("dragenter", function( e ) {
46
+ // prevent default to allow drop
47
+ e.preventDefault();
48
+ e.dataTransfer.dropEffect = "move";
49
+
50
+ for (var target = e.target; target && target != this; target = target.parentNode) {
51
+ if (target.matches('li')) {
52
+
53
+ target.classList.add('li--dropable')
54
+ }
55
+ }
56
+ }, false);
57
+
58
+ list.addEventListener("dragleave", function( e ) {
59
+ // prevent default to allow drop
60
+ e.preventDefault();
61
+ for (var target = e.target; target && target != this; target = target.parentNode) {
62
+ if (target.matches('li')) {
63
+
64
+ target.classList.remove('li--dropable')
65
+ }
66
+ }
67
+ }, false);
68
+
69
+ list.addEventListener("drop", function(e) {
70
+
71
+ e.preventDefault();
72
+
73
+ for (var target = e.target; target && target != this; target = target.parentNode) {
74
+ if (target.matches('li')) {
75
+
76
+ if(target.parentNode != null && draggedRow.parentNode != null && target != draggedRow){
77
+
78
+ draggedRow.parentNode.removeChild( draggedRow );
79
+
80
+ if(draggedRow.getAttribute('data-order') > target.getAttribute('data-order'))
81
+ target.parentNode.insertBefore(draggedRow, target);
82
+ else
83
+ target.parentNode.insertBefore(draggedRow, target.nextElementSibling);
84
+
85
+ resetItems();
86
+
87
+
88
+ //tableElement.dispatchEvent(reorderedEvent);
89
+ }
90
+ break;
91
+ }
92
+ }
93
+ }, false);
94
+
95
+ list.addEventListener("keydown", function( e ) {
96
+
97
+ let item = e.target;
98
+
99
+ if(e.keyCode == 38){
100
+ e.preventDefault();
101
+
102
+ if (item.previousElementSibling)
103
+ item.parentNode.insertBefore(item, item.previousElementSibling);
104
+
105
+ item.focus();
106
+ }
107
+ else if(e.keyCode == 40){
108
+ e.preventDefault();
109
+
110
+ if (item.nextElementSibling)
111
+ item.parentNode.insertBefore(item.nextElementSibling, item);
112
+
113
+ item.focus();
114
+ }
115
+
116
+ resetItems();
117
+
118
+ }, false);
119
+
120
+ }
121
+
122
+ export default orderlist;
@@ -22,7 +22,7 @@ function table(tableElement) {
22
22
  // Create an array from the table rows, the index created is then used to sort the array
23
23
  let tableArr = [];
24
24
  Array.from(tbody.querySelectorAll('tr')).forEach((tableRow, index) => {
25
-
25
+
26
26
  let rowIndex = tableRow.querySelector('td[data-label="'+sortBy+'"], th[data-label="'+sortBy+'"]').textContent;
27
27
 
28
28
  if(isNumeric(rowIndex))
@@ -56,7 +56,7 @@ function table(tableElement) {
56
56
  // Declare event handlers
57
57
  tableElement.addEventListener('click', function(e){
58
58
  for (var target = e.target; target && target != this; target = target.parentNode) {
59
- if (target.matches('[data-sortable]')) {
59
+ if (target.matches('[data-sortable]')) {
60
60
 
61
61
  // Get current sort order
62
62
  let sort = target.getAttribute('aria-sort') == "ascending" ? "descending" : "ascending";
@@ -77,7 +77,7 @@ function table(tableElement) {
77
77
  sortTable(target.textContent, sort);
78
78
 
79
79
  Array.from(tableElement.querySelectorAll('tr[draggable]')).forEach((tableRow, index) => {
80
-
80
+
81
81
  tableRow.removeAttribute('draggable');
82
82
  });
83
83
  break;
@@ -286,7 +286,7 @@ function table(tableElement) {
286
286
  tableElement.addEventListener('change', function(e){
287
287
  for (var target = e.target; target && target != this; target = target.parentNode) {
288
288
  if (target.matches('.table__pagination input[type="number"]')) {
289
-
289
+
290
290
  paginateRows(target.value,page);
291
291
  createPaginationButttons(randID,tableElement,target.value,page,totalRows);
292
292
  tableElement.setAttribute('data-show',target.value)
@@ -296,8 +296,8 @@ function table(tableElement) {
296
296
 
297
297
  tableElement.addEventListener('click', function(e){
298
298
  for (var target = e.target; target && target != this; target = target.parentNode) {
299
- if (target.matches('.page-item:not(.active):not(.disabled) .page-link')) {
300
-
299
+ if (target.matches('.page-item:not(.active):not(.disabled) .page-link')) {
300
+
301
301
  paginateRows(tableElement.getAttribute('data-show'),target.getAttribute('data-page'));
302
302
  createPaginationButttons(randID,tableElement,tableElement.getAttribute('data-show'),target.getAttribute('data-page'),totalRows);
303
303
  }
@@ -307,7 +307,7 @@ function table(tableElement) {
307
307
  tableElement.addEventListener('change', function(e){
308
308
  for (var target = e.target; target && target != this; target = target.parentNode) {
309
309
  if (target.matches('.table__pagination select')) {
310
-
310
+
311
311
  paginateRows(tableElement.getAttribute('data-show'),target.value);
312
312
  createPaginationButttons(randID,tableElement,tableElement.getAttribute('data-show'),target.value,totalRows);
313
313
  }
@@ -347,7 +347,7 @@ function table(tableElement) {
347
347
  });
348
348
  }
349
349
 
350
- if(tableElement.getAttribute('data-reorder')){
350
+ if(tableElement.getAttribute('data-reorder') && tableElement.getAttribute('data-reorder') != "false"){
351
351
 
352
352
  // Add column heading
353
353
  const orderHeading = document.createElement('th');
@@ -361,22 +361,22 @@ function table(tableElement) {
361
361
  // Reset order button
362
362
  tableElement.addEventListener('click', function(e){
363
363
  for (var target = e.target; target && target != this; target = target.parentNode) {
364
- if (target.matches('.table-order-reset')) {
365
-
364
+ if (target.matches('.table-order-reset')) {
365
+
366
366
  // unset sort attributes
367
367
  Array.from(tableElement.querySelectorAll('[data-sortable]')).forEach((col, index) => {
368
368
  col.setAttribute('aria-sort','none');
369
369
  });
370
-
370
+
371
371
  // Save the sort options on the table element so that it can be re-sorted later
372
372
  tableElement.removeAttribute('data-sort');
373
373
  tableElement.removeAttribute('data-sortBy');
374
-
374
+
375
375
  // Sort the table
376
376
  sortTable('Order', 'ascending');
377
-
377
+
378
378
  Array.from(tableElement.querySelectorAll('tbody tr')).forEach((tableRow, index) => {
379
-
379
+
380
380
  tableRow.setAttribute('draggable','true');
381
381
  });
382
382
 
@@ -385,7 +385,7 @@ function table(tableElement) {
385
385
  }
386
386
  }, false);
387
387
 
388
-
388
+
389
389
  document.addEventListener("dragover", function( e ) {
390
390
  // prevent default to allow drop
391
391
  e.preventDefault();
@@ -397,7 +397,7 @@ function table(tableElement) {
397
397
  e.dataTransfer.dropEffect = "move";
398
398
 
399
399
  for (var target = e.target; target && target != this; target = target.parentNode) {
400
- if (target.matches('[data-reorder] tbody tr')) {
400
+ if (target.matches('[data-reorder] tbody tr')) {
401
401
 
402
402
  target.classList.add('tr--dropable')
403
403
  }
@@ -408,7 +408,7 @@ function table(tableElement) {
408
408
  // prevent default to allow drop
409
409
  e.preventDefault();
410
410
  for (var target = e.target; target && target != this; target = target.parentNode) {
411
- if (target.matches('[data-reorder] tbody tr')) {
411
+ if (target.matches('[data-reorder] tbody tr')) {
412
412
 
413
413
  target.classList.remove('tr--dropable')
414
414
  }
@@ -420,8 +420,8 @@ function table(tableElement) {
420
420
  e.preventDefault();
421
421
 
422
422
  for (var target = e.target; target && target != this; target = target.parentNode) {
423
- if (target.matches('[data-reorder] tbody tr')) {
424
-
423
+ if (target.matches('[data-reorder] tbody tr')) {
424
+
425
425
  if(target.parentNode != null && draggedRow.parentNode != null && target != draggedRow){
426
426
 
427
427
  draggedRow.parentNode.removeChild( draggedRow );
@@ -432,7 +432,7 @@ function table(tableElement) {
432
432
  target.parentNode.insertBefore(draggedRow, target.nextElementSibling);
433
433
 
434
434
  // Re label the rows
435
- Array.from(tbody.querySelectorAll('tr')).forEach((tableRowOrder, index) => {
435
+ Array.from(tbody.querySelectorAll('tr')).forEach((tableRowOrder, index) => {
436
436
  tableRowOrder.classList.remove('tr--dragging')
437
437
  tableRowOrder.classList.remove('tr--dropable')
438
438
  tableRowOrder.querySelector('th').innerHTML = index + 1;
@@ -450,7 +450,7 @@ function table(tableElement) {
450
450
  // #endregion Reorderable
451
451
 
452
452
  // Watch for the filterable event and re-sort the tbody
453
- tableElement.addEventListener('filtered', function (e) {
453
+ tableElement.addEventListener('filtered', function (e) {
454
454
 
455
455
  if(tableElement.getAttribute('data-sortBy') && tableElement.getAttribute('data-sort'))
456
456
  sortTable(tableElement.getAttribute('data-sortBy'), tableElement.getAttribute('data-sort'));
@@ -478,7 +478,7 @@ function table(tableElement) {
478
478
  }
479
479
  }, false);
480
480
 
481
- tableElement.addEventListener('sorted', function (e) {
481
+ tableElement.addEventListener('sorted', function (e) {
482
482
 
483
483
  if(tableElement.getAttribute('data-reorder')){
484
484
 
@@ -486,7 +486,7 @@ function table(tableElement) {
486
486
  }
487
487
  }, false);
488
488
 
489
- tableElement.addEventListener('populated', function (e) {
489
+ tableElement.addEventListener('populated', function (e) {
490
490
 
491
491
  var tableFilter = tableElement.querySelector('.table__filters')
492
492
  tableFilter.remove();
@@ -582,4 +582,4 @@ ${strOptions}
582
582
  }
583
583
  }
584
584
 
585
- export default table
585
+ export default table
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Bootstrap v3.0.0
2
+ * Bootstrap v3.1.0
3
3
  * Copyright 2011-2022 [object Object]
4
4
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
5
5
  */
@@ -102,13 +102,16 @@
102
102
  if (window.matchMedia('(min-width: 62em)').matches) detail.removeAttribute('open');
103
103
  }, false);
104
104
  });
105
- var observer = new IntersectionObserver(_ref => {
106
- var [e] = _ref;
107
- return e.target.classList.toggle("is-stuck", e.intersectionRatio < 1);
108
- }, {
109
- threshold: [1]
110
- });
111
- observer.observe(element);
105
+
106
+ if ('IntersectionObserver' in window) {
107
+ var observer = new IntersectionObserver(_ref => {
108
+ var [e] = _ref;
109
+ return e.target.classList.toggle("is-stuck", e.intersectionRatio < 1);
110
+ }, {
111
+ threshold: [1]
112
+ });
113
+ observer.observe(element);
114
+ }
112
115
  };
113
116
 
114
117
  function table(tableElement) {
@@ -373,7 +376,7 @@
373
376
  });
374
377
  };
375
378
 
376
- if (tableElement.getAttribute('data-reorder')) {
379
+ if (tableElement.getAttribute('data-reorder') && tableElement.getAttribute('data-reorder') != "false") {
377
380
  // Add column heading
378
381
  var orderHeading = document.createElement('th');
379
382
  orderHeading.innerHTML = 'Order';
@@ -529,36 +532,40 @@
529
532
  }
530
533
  };
531
534
 
532
- function accordion(accordionElement) {
533
- // Fetch all the details element.
534
- if (!accordionElement.classList.contains('accordion--keep-open')) {
535
- var details_1 = accordionElement.querySelectorAll(":scope > details");
536
- // Add the onclick listeners.
537
- details_1.forEach(function (targetDetail) {
538
- targetDetail.addEventListener("click", function () {
539
- // Close all the details that are not targetDetail.
540
- details_1.forEach(function (detail) {
541
- if (detail !== targetDetail) {
542
- detail.removeAttribute("open");
543
- }
544
- });
545
- });
546
- });
547
- }
548
- if (window.location.hash && document.querySelector(window.location.hash + ':not([open]) summary')) {
549
- var detail = document.querySelector(window.location.hash + ' summary');
550
- if (detail instanceof HTMLElement) {
551
- detail.click();
552
- }
553
- }
554
- window.addEventListener('hashchange', function () {
555
- if (window.location.hash && document.querySelector(window.location.hash + ' summary')) {
556
- var detail = document.querySelector(window.location.hash + ' summary');
557
- if (detail instanceof HTMLElement) {
558
- detail.click();
559
- }
560
- }
561
- });
535
+ function accordion(accordionElement) {
536
+ // Fetch all the details element.
537
+ if (!accordionElement.classList.contains('accordion--keep-open')) {
538
+ var details = accordionElement.querySelectorAll(":scope > details"); // Add the onclick listeners.
539
+
540
+ details.forEach(targetDetail => {
541
+ targetDetail.addEventListener("click", () => {
542
+ // Close all the details that are not targetDetail.
543
+ details.forEach(detail => {
544
+ if (detail !== targetDetail) {
545
+ detail.removeAttribute("open");
546
+ }
547
+ });
548
+ });
549
+ });
550
+ }
551
+
552
+ if (window.location.hash && document.querySelector(window.location.hash + ':not([open]) summary')) {
553
+ var detail = document.querySelector(window.location.hash + ' summary');
554
+
555
+ if (detail instanceof HTMLElement) {
556
+ detail.click();
557
+ }
558
+ }
559
+
560
+ window.addEventListener('hashchange', function () {
561
+ if (window.location.hash && document.querySelector(window.location.hash + ' summary')) {
562
+ var _detail = document.querySelector(window.location.hash + ' summary');
563
+
564
+ if (_detail instanceof HTMLElement) {
565
+ _detail.click();
566
+ }
567
+ }
568
+ });
562
569
  }
563
570
 
564
571
  function testimonial(testimonialElement) {
@@ -710,9 +717,13 @@
710
717
 
711
718
  function inputRedirect(inputWrapper) {
712
719
  inputWrapper.addEventListener('change', function (e) {
713
- var url = inputWrapper.getAttribute('data-redirect');
714
- var desiredValue = inputWrapper.getAttribute('data-value-if');
715
- if (inputWrapper.value == desiredValue) document.location.href = url;
720
+ if (inputWrapper.matches('[data-value-if]')) {
721
+ var url = inputWrapper.getAttribute('data-redirect');
722
+ var desiredValue = inputWrapper.getAttribute('data-value-if');
723
+ if (inputWrapper.value == desiredValue) document.location.href = url;
724
+ } else {
725
+ if (typeof inputWrapper.value != "undefined") document.location.href = inputWrapper.value;
726
+ }
716
727
  }, false);
717
728
  } //
718
729
 
@@ -748,7 +759,7 @@
748
759
  Array.from(formElement.querySelectorAll('[data-input-range]')).forEach((arrayElement, index) => {
749
760
  inputRange(arrayElement);
750
761
  });
751
- Array.from(formElement.querySelectorAll('[data-redirect][data-value-if]')).forEach((arrayElement, index) => {
762
+ Array.from(formElement.querySelectorAll('[data-redirect]')).forEach((arrayElement, index) => {
752
763
  inputRedirect(arrayElement);
753
764
  });
754
765
  Array.from(formElement.querySelectorAll('.multiple-file-uploads')).forEach((arrayElement, index) => {
@@ -985,7 +996,7 @@
985
996
  window.onhashchange = locationHashChanged;
986
997
  };
987
998
 
988
- // Modules
999
+ // @ts-nocheck
989
1000
  // Attach classes to dom elements
990
1001
  document.addEventListener("DOMContentLoaded", function () {
991
1002
  addBodyClasses(document.body);
@@ -993,35 +1004,35 @@
993
1004
  checkElements(document.body);
994
1005
  console.log('test.js');
995
1006
  // ANav
996
- Array.from(document.querySelectorAll('.nav')).forEach(function (arrayElement, index) {
1007
+ Array.from(document.querySelectorAll('.nav')).forEach(function (arrayElement) {
997
1008
  navbar(arrayElement);
998
1009
  });
999
1010
  // Advanced tables
1000
- Array.from(document.querySelectorAll('.table__wrapper')).forEach(function (arrayElement, index) {
1011
+ Array.from(document.querySelectorAll('.table__wrapper')).forEach(function (arrayElement) {
1001
1012
  table(arrayElement);
1002
1013
  });
1003
1014
  // Accordions
1004
- Array.from(document.querySelectorAll('.accordion')).forEach(function (arrayElement, index) {
1015
+ Array.from(document.querySelectorAll('.accordion')).forEach(function (arrayElement) {
1005
1016
  accordion(arrayElement);
1006
1017
  });
1007
1018
  // Testimonial
1008
- Array.from(document.querySelectorAll('.testimonial')).forEach(function (arrayElement, index) {
1019
+ Array.from(document.querySelectorAll('.testimonial')).forEach(function (arrayElement) {
1009
1020
  testimonial(arrayElement);
1010
1021
  });
1011
1022
  // Carousel
1012
- Array.from(document.querySelectorAll('.carousel')).forEach(function (arrayElement, index) {
1023
+ Array.from(document.querySelectorAll('.carousel')).forEach(function (arrayElement) {
1013
1024
  carousel(arrayElement);
1014
1025
  });
1015
1026
  // Form
1016
- Array.from(document.querySelectorAll('form')).forEach(function (arrayElement, index) {
1027
+ Array.from(document.querySelectorAll('form')).forEach(function (arrayElement) {
1017
1028
  form(arrayElement);
1018
1029
  });
1019
1030
  // Modal
1020
- Array.from(document.querySelectorAll('.modal')).forEach(function (arrayElement, index) {
1031
+ Array.from(document.querySelectorAll('.modal')).forEach(function (arrayElement) {
1021
1032
  modal(arrayElement);
1022
1033
  });
1023
1034
  // YouTube videos
1024
- Array.from(document.querySelectorAll('.youtube-embed')).forEach(function (arrayElement, index) {
1035
+ Array.from(document.querySelectorAll('.youtube-embed')).forEach(function (arrayElement) {
1025
1036
  new youtubeVideo(arrayElement);
1026
1037
  });
1027
1038
  window.addEventListener('hashchange', function () {