@creative-web-solution/front-library 6.1.3 → 6.2.9

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 (168) hide show
  1. package/CHANGELOG.md +52 -1
  2. package/DOM/Class.js +1 -1
  3. package/DOM/OuterSize.js +1 -1
  4. package/DOM/matrix.js +1 -1
  5. package/DOM/size.js +1 -1
  6. package/DOM/wrap.js +2 -2
  7. package/Events/EventsManager.js +39 -81
  8. package/Events/HistoryController.js +3 -3
  9. package/Events/ImageLoad.js +1 -1
  10. package/Events/IntersectObserver.js +3 -2
  11. package/Events/KeyboardHandler.js +2 -2
  12. package/Events/MediaQueriesEvents.js +2 -2
  13. package/Events/TouchHover.js +3 -3
  14. package/Events/WindowEvents.js +3 -3
  15. package/Events/gesture.js +2 -2
  16. package/Events/onAnimationEnd.js +37 -33
  17. package/Events/onTransitionEnd.js +38 -29
  18. package/Events/pubSub.js +2 -2
  19. package/Helpers/Cookie.js +1 -1
  20. package/Helpers/TransitionHelpers.js +95 -0
  21. package/Helpers/extend.js +1 -1
  22. package/Helpers/getValue.js +1 -1
  23. package/Helpers/sequential.js +1 -1
  24. package/Helpers/wait.js +1 -1
  25. package/ModernizrAddons/css-var-support.js +3 -0
  26. package/ModernizrAddons/touchdevice.js +1 -1
  27. package/Modules/Accordion.js +12 -6
  28. package/Modules/Autocomplete.js +7 -7
  29. package/Modules/DragSlider.js +583 -0
  30. package/Modules/Notifications.js +8 -8
  31. package/Modules/Popin.js +8 -8
  32. package/Modules/ScrollSnap.js +8 -8
  33. package/Modules/SkinCheckbox.js +2 -2
  34. package/Modules/SkinFile.js +4 -4
  35. package/Modules/SkinRadio.js +3 -3
  36. package/Modules/SkinSelect.js +12 -12
  37. package/Modules/Slider.js +100 -32
  38. package/Modules/Tabs.js +5 -5
  39. package/Modules/Validator/Tools/RadioButton.js +1 -1
  40. package/Modules/Validator/Tools/ValidationState.js +1 -1
  41. package/Modules/Validator/Tools/getQueryFromForm.js +1 -1
  42. package/Modules/Validator/date.js +3 -3
  43. package/Modules/Validator/email.js +3 -3
  44. package/Modules/Validator/equals.js +3 -3
  45. package/Modules/Validator/index.js +6 -6
  46. package/Modules/Validator/max.js +2 -2
  47. package/Modules/Validator/maxlength.js +2 -2
  48. package/Modules/Validator/min.js +2 -2
  49. package/Modules/Validator/minlength.js +2 -2
  50. package/Modules/Validator/multiRequired.js +5 -5
  51. package/Modules/Validator/number.js +3 -3
  52. package/Modules/Validator/pattern.js +2 -2
  53. package/Modules/Validator/recaptcha.js +2 -2
  54. package/Modules/Validator/required.js +4 -4
  55. package/Modules/Validator/serverCheck.js +3 -3
  56. package/Modules/Validator/url.js +3 -3
  57. package/Modules/YouTubePlayer.js +2 -2
  58. package/Modules/globalState.js +1 -1
  59. package/README.md +3 -3
  60. package/Tools/PrefixedProperties.js +54 -0
  61. package/Tools/TouchDeviceSupport.js +1 -0
  62. package/WebGL/GLImageTransition/GLImageTransition.js +4 -4
  63. package/documentation/extra/events.md +2 -2
  64. package/documentation/extra/modernizr.md +1 -0
  65. package/documentation/extra/modules/DragSlider.md +111 -0
  66. package/documentation/extra/modules/YouTubePlayer.md +1 -1
  67. package/documentation/extra/modules/autocomplete.md +1 -1
  68. package/documentation/extra/modules/popin.md +3 -3
  69. package/documentation/extra/modules/slider.md +7 -3
  70. package/documentation/extra/modules/template.md +1 -1
  71. package/documentation/extra/modules/validator.md +13 -13
  72. package/documentation/extra/webgl/GLImageTransition.md +1 -1
  73. package/documentation/jsdocs/dom/global.html +389 -2
  74. package/documentation/jsdocs/dom/index.html +2 -2
  75. package/documentation/jsdocs/dom/quicksearch.html +1 -1
  76. package/documentation/jsdocs/events/common/DeviceOrientation.html +1 -1
  77. package/documentation/jsdocs/events/common/HistoryController.html +1 -1
  78. package/documentation/jsdocs/events/common/IntersectObserver.html +1 -1
  79. package/documentation/jsdocs/events/common/KeyboardHandler.html +1 -1
  80. package/documentation/jsdocs/events/common/MediaQueriesEvents.html +1 -1
  81. package/documentation/jsdocs/events/common/TouchHover.html +1 -1
  82. package/documentation/jsdocs/events/common/WindowEvents.html +1 -1
  83. package/documentation/jsdocs/events/common/classes.list.html +1 -1
  84. package/documentation/jsdocs/events/common/global.html +1 -1
  85. package/documentation/jsdocs/events/common/index.html +1 -1
  86. package/documentation/jsdocs/events/common/namespaces.list.html +1 -1
  87. package/documentation/jsdocs/events/common/pubSub.html +1 -1
  88. package/documentation/jsdocs/events/common/quicksearch.html +1 -1
  89. package/documentation/jsdocs/events/events-manager/global.html +1 -1
  90. package/documentation/jsdocs/events/events-manager/index.html +1 -1
  91. package/documentation/jsdocs/events/events-manager/quicksearch.html +1 -1
  92. package/documentation/jsdocs/events/gesture/global.html +1 -1
  93. package/documentation/jsdocs/events/gesture/index.html +1 -1
  94. package/documentation/jsdocs/events/gesture/quicksearch.html +1 -1
  95. package/documentation/jsdocs/helpers/array/global.html +1 -1
  96. package/documentation/jsdocs/helpers/array/index.html +1 -1
  97. package/documentation/jsdocs/helpers/array/quicksearch.html +1 -1
  98. package/documentation/jsdocs/helpers/colors/global.html +1 -1
  99. package/documentation/jsdocs/helpers/colors/index.html +1 -1
  100. package/documentation/jsdocs/helpers/colors/quicksearch.html +1 -1
  101. package/documentation/jsdocs/helpers/common/Cookie.html +2 -2
  102. package/documentation/jsdocs/helpers/common/UrlParser.html +1 -1
  103. package/documentation/jsdocs/helpers/common/classes.list.html +1 -1
  104. package/documentation/jsdocs/helpers/common/global.html +8 -2
  105. package/documentation/jsdocs/helpers/common/index.html +1 -1
  106. package/documentation/jsdocs/helpers/common/quicksearch.html +1 -1
  107. package/documentation/jsdocs/helpers/types/global.html +1 -1
  108. package/documentation/jsdocs/helpers/types/index.html +1 -1
  109. package/documentation/jsdocs/helpers/types/quicksearch.html +1 -1
  110. package/documentation/jsdocs/modules/accordion/Accordion.html +1 -1
  111. package/documentation/jsdocs/modules/accordion/classes.list.html +1 -1
  112. package/documentation/jsdocs/modules/accordion/index.html +1 -1
  113. package/documentation/jsdocs/modules/accordion/quicksearch.html +1 -1
  114. package/documentation/jsdocs/modules/autocomplete/Autocomplete.html +1 -1
  115. package/documentation/jsdocs/modules/autocomplete/classes.list.html +1 -1
  116. package/documentation/jsdocs/modules/autocomplete/index.html +1 -1
  117. package/documentation/jsdocs/modules/autocomplete/quicksearch.html +1 -1
  118. package/documentation/jsdocs/modules/common/DragSlider.html +946 -0
  119. package/documentation/jsdocs/modules/common/classes.list.html +310 -0
  120. package/documentation/jsdocs/modules/common/global.html +8 -1
  121. package/documentation/jsdocs/modules/common/globalState.html +8 -1
  122. package/documentation/jsdocs/modules/common/index.html +8 -1
  123. package/documentation/jsdocs/modules/common/namespaces.list.html +15 -1
  124. package/documentation/jsdocs/modules/common/quicksearch.html +1 -1
  125. package/documentation/jsdocs/modules/form-skin/SkinCheckbox.html +1 -1
  126. package/documentation/jsdocs/modules/form-skin/SkinFile.html +1 -1
  127. package/documentation/jsdocs/modules/form-skin/SkinRadio.html +1 -1
  128. package/documentation/jsdocs/modules/form-skin/SkinSelect.html +1 -1
  129. package/documentation/jsdocs/modules/form-skin/classes.list.html +1 -1
  130. package/documentation/jsdocs/modules/form-skin/global.html +1 -1
  131. package/documentation/jsdocs/modules/form-skin/index.html +1 -1
  132. package/documentation/jsdocs/modules/form-skin/quicksearch.html +1 -1
  133. package/documentation/jsdocs/modules/media-preloader/MediaPreloader.html +1 -1
  134. package/documentation/jsdocs/modules/media-preloader/classes.list.html +1 -1
  135. package/documentation/jsdocs/modules/media-preloader/index.html +1 -1
  136. package/documentation/jsdocs/modules/media-preloader/quicksearch.html +1 -1
  137. package/documentation/jsdocs/modules/notifications/Notifications.html +1 -1
  138. package/documentation/jsdocs/modules/notifications/classes.list.html +1 -1
  139. package/documentation/jsdocs/modules/notifications/index.html +1 -1
  140. package/documentation/jsdocs/modules/notifications/quicksearch.html +1 -1
  141. package/documentation/jsdocs/modules/popin/Popin.html +1 -1
  142. package/documentation/jsdocs/modules/popin/PopinController.html +1 -1
  143. package/documentation/jsdocs/modules/popin/classes.list.html +1 -1
  144. package/documentation/jsdocs/modules/popin/index.html +1 -1
  145. package/documentation/jsdocs/modules/popin/quicksearch.html +1 -1
  146. package/documentation/jsdocs/modules/scroll-snap/ScrollSnap.html +1 -1
  147. package/documentation/jsdocs/modules/scroll-snap/classes.list.html +1 -1
  148. package/documentation/jsdocs/modules/scroll-snap/index.html +1 -1
  149. package/documentation/jsdocs/modules/scroll-snap/quicksearch.html +1 -1
  150. package/documentation/jsdocs/modules/slider/Slider.html +1 -1
  151. package/documentation/jsdocs/modules/slider/SliderControls.html +159 -2
  152. package/documentation/jsdocs/modules/slider/classes.list.html +1 -1
  153. package/documentation/jsdocs/modules/slider/index.html +1 -1
  154. package/documentation/jsdocs/modules/slider/quicksearch.html +1 -1
  155. package/documentation/jsdocs/modules/tabs/Tabs.html +1 -1
  156. package/documentation/jsdocs/modules/tabs/classes.list.html +1 -1
  157. package/documentation/jsdocs/modules/tabs/index.html +1 -1
  158. package/documentation/jsdocs/modules/tabs/quicksearch.html +1 -1
  159. package/documentation/jsdocs/modules/validator/Validator.html +1 -1
  160. package/documentation/jsdocs/modules/validator/classes.list.html +1 -1
  161. package/documentation/jsdocs/modules/validator/global.html +1 -1
  162. package/documentation/jsdocs/modules/validator/index.html +1 -1
  163. package/documentation/jsdocs/modules/validator/quicksearch.html +1 -1
  164. package/documentation/jsdocs/modules/youtube-player/YouTubePlayer.html +1 -1
  165. package/documentation/jsdocs/modules/youtube-player/classes.list.html +1 -1
  166. package/documentation/jsdocs/modules/youtube-player/index.html +1 -1
  167. package/documentation/jsdocs/modules/youtube-player/quicksearch.html +1 -1
  168. package/package.json +1 -1
@@ -1,15 +1,15 @@
1
- import { fire, on, off } from 'front-library/Events/EventsManager';
2
- import { extend } from 'front-library/Helpers/Extend';
3
- import { isNumber } from 'front-library/Helpers/Type';
4
- import { template } from 'front-library/Modules/template';
5
- import { wrap } from 'front-library/DOM/wrap';
6
- import { strToDOM } from 'front-library/DOM/strToDOM';
7
- import { index } from 'front-library/DOM/index';
8
- import { hClass, aClass } from 'front-library/DOM/Class';
9
- import { rClass } from 'front-library/DOM/Class';
10
- import { position } from 'front-library/DOM/position';
11
- import { height } from 'front-library/DOM/Size';
12
- import { outerHeight } from 'front-library/DOM/OuterSize';
1
+ import { fire, on, off } from '@creative-web-solution/front-library/Events/EventsManager';
2
+ import { extend } from '@creative-web-solution/front-library/Helpers/Extend';
3
+ import { isNumber } from '@creative-web-solution/front-library/Helpers/Type';
4
+ import { template } from '@creative-web-solution/front-library/Modules/template';
5
+ import { wrap } from '@creative-web-solution/front-library/DOM/wrap';
6
+ import { strToDOM } from '@creative-web-solution/front-library/DOM/strToDOM';
7
+ import { index } from '@creative-web-solution/front-library/DOM/index';
8
+ import { hClass, aClass } from '@creative-web-solution/front-library/DOM/Class';
9
+ import { rClass } from '@creative-web-solution/front-library/DOM/Class';
10
+ import { position } from '@creative-web-solution/front-library/DOM/position';
11
+ import { height } from '@creative-web-solution/front-library/DOM/Size';
12
+ import { outerHeight } from '@creative-web-solution/front-library/DOM/OuterSize';
13
13
 
14
14
 
15
15
  const defaultOptions = {
package/Modules/Slider.js CHANGED
@@ -1,12 +1,12 @@
1
- import { on, one, fire } from 'front-library/Events/EventsManager';
2
- import { gesture, gestureOff } from 'front-library/Events/Gesture';
3
- import { KeyboardHandler } from 'front-library/Events/KeyboardHandler';
4
- import { extend } from 'front-library/Helpers/Extend';
5
- import { defer } from 'front-library/Helpers/defer';
6
- import { wait } from 'front-library/Helpers/wait';
7
- import { index } from 'front-library/DOM/index';
8
- import { outerHeight } from 'front-library/DOM/OuterSize';
9
- import { aClass, rClass } from 'front-library/DOM/Class';
1
+ import { on, one, fire } from '@creative-web-solution/front-library/Events/EventsManager';
2
+ import { gesture, gestureOff } from '@creative-web-solution/front-library/Events/Gesture';
3
+ import { KeyboardHandler } from '@creative-web-solution/front-library/Events/KeyboardHandler';
4
+ import { extend } from '@creative-web-solution/front-library/Helpers/Extend';
5
+ import { defer } from '@creative-web-solution/front-library/Helpers/defer';
6
+ import { wait } from '@creative-web-solution/front-library/Helpers/wait';
7
+ import { index } from '@creative-web-solution/front-library/DOM/index';
8
+ import { outerHeight } from '@creative-web-solution/front-library/DOM/OuterSize';
9
+ import { aClass, rClass } from '@creative-web-solution/front-library/DOM/Class';
10
10
 
11
11
 
12
12
  /**
@@ -65,7 +65,12 @@ function Slide( options ) {
65
65
  this.id = $slide.id = getNextSlideId();
66
66
  }
67
67
 
68
- $slide.setAttribute( 'role', 'tabpanel' )
68
+ $slide.setAttribute( 'role', 'tabpanel' );
69
+
70
+
71
+ Object.defineProperty( this, 'currentPageIndex', {
72
+ "get": () => this.currentPage - 1
73
+ } );
69
74
 
70
75
 
71
76
  function toggleElementsFocusability( activate ) {
@@ -254,12 +259,14 @@ function Slide( options ) {
254
259
  "$slide": $slide,
255
260
  "id": this.id,
256
261
  "delay": this.delay,
257
- "index": SELF.index,
258
- "position": SELF.position,
259
- "isFirst": SELF.isFirst,
260
- "isLast": SELF.isLast,
262
+ "index": this.index,
263
+ "position": this.position,
264
+ "isFirst": this.isFirst,
265
+ "isLast": this.isLast,
261
266
  "isVisible": this.isVisible(),
262
- "isActive": this.isActive()
267
+ "isActive": this.isActive(),
268
+ "page": this.currentPage,
269
+ "pageIndex": this.currentPageIndex
263
270
  }
264
271
  };
265
272
  }
@@ -404,7 +411,7 @@ export function Slider( $slider, userOptions = {} ) {
404
411
 
405
412
 
406
413
  /**
407
- * All slides
414
+ * All slides (DOM elements)
408
415
  *
409
416
  * @memberof Slider
410
417
  * @instance
@@ -417,6 +424,20 @@ export function Slider( $slider, userOptions = {} ) {
417
424
  } );
418
425
 
419
426
 
427
+ /**
428
+ * All slides
429
+ *
430
+ * @memberof Slider
431
+ * @instance
432
+ * @member {HTMLElement[]} $slides
433
+ */
434
+ Object.defineProperty( this, 'slides', {
435
+ "get": function() {
436
+ return slidesList.map( slide => slide.getSlideProperties() );
437
+ }
438
+ } );
439
+
440
+
420
441
  /**
421
442
  * Number of slides
422
443
  *
@@ -462,10 +483,13 @@ export function Slider( $slider, userOptions = {} ) {
462
483
  function getNextSlideIndex( index, step = 1 ) {
463
484
  index = index + step;
464
485
 
465
- if ( index >= nbSlides && options.loop ) {
486
+ if ( options.loop && index >= nbSlides ) {
466
487
  index = 0;
467
488
  }
468
- else if ( index >= nbSlides ) {
489
+ else if (
490
+ !options.loop && !options.moveByPage && index > nbSlides - options.slidePerPage ||
491
+ index >= nbSlides
492
+ ) {
469
493
  return -1;
470
494
  }
471
495
 
@@ -1037,6 +1061,23 @@ export function Slider( $slider, userOptions = {} ) {
1037
1061
  };
1038
1062
 
1039
1063
 
1064
+ /**
1065
+ * Get all slides oh a page
1066
+ *
1067
+ * @memberof Slider
1068
+ * @function getSlidesOfPage
1069
+ * @instance
1070
+ *
1071
+ * @param {Number} pageIndex
1072
+ *
1073
+ * @returns {Slide[]}
1074
+ */
1075
+ this.getSlidesOfPage = pageIndex => {
1076
+ return slidesList.filter( slide => slide.currentPageIndex === pageIndex )
1077
+ .map( slide => slide.getSlideProperties() );
1078
+ };
1079
+
1080
+
1040
1081
  /**
1041
1082
  * Get a slide in function of an index
1042
1083
  *
@@ -1049,15 +1090,15 @@ export function Slider( $slider, userOptions = {} ) {
1049
1090
  * @returns {Slide}
1050
1091
  */
1051
1092
  this.getSlide = index => {
1052
- return slidesList[ index ];
1093
+ return slidesList[ index ] ? slidesList[ index ].getSlideProperties() : undefined;
1053
1094
  };
1054
1095
 
1055
1096
 
1056
1097
  /**
1057
1098
  * Get the nbth slide after the index
1058
1099
  *
1059
- * @memberof getTheNthChildAfter
1060
- * @function getSlide
1100
+ * @memberof Slider
1101
+ * @function getTheNthChildAfter
1061
1102
  * @instance
1062
1103
  *
1063
1104
  * @param {Number} index - target index
@@ -1073,8 +1114,8 @@ export function Slider( $slider, userOptions = {} ) {
1073
1114
  /**
1074
1115
  * Get the nbth slide before the index
1075
1116
  *
1076
- * @memberof getTheNthChildBefore
1077
- * @function getSlide
1117
+ * @memberof Slider
1118
+ * @function getTheNthChildBefore
1078
1119
  * @instance
1079
1120
  *
1080
1121
  * @param {Number} index - target index
@@ -1169,7 +1210,8 @@ export function Slider( $slider, userOptions = {} ) {
1169
1210
  * "paginationItems": '.item',
1170
1211
  * "autoslide": 10, // in second
1171
1212
  * "swipe": false,
1172
- * "enableKeyboard": true
1213
+ * "enableKeyboard": true,
1214
+ * "gestureOptions": Object
1173
1215
  * }
1174
1216
  * );
1175
1217
  */
@@ -1179,7 +1221,8 @@ export function SliderControls( slider, options ) {
1179
1221
  keyboardNextButton,
1180
1222
  $bullets,
1181
1223
  paginationKeyboardControls,
1182
- inSlideKeyboardControls;
1224
+ inSlideKeyboardControls,
1225
+ isAutoslideEnabled;
1183
1226
 
1184
1227
  const SELF = this;
1185
1228
 
@@ -1314,6 +1357,33 @@ export function SliderControls( slider, options ) {
1314
1357
  };
1315
1358
 
1316
1359
 
1360
+ /**
1361
+ * Start the autoslide
1362
+ *
1363
+ * @memberof SliderControls
1364
+ * @function startAutoslide
1365
+ * @instance
1366
+ */
1367
+ this.startAutoslide = () => {
1368
+ if ( options.autoslide ) {
1369
+ isAutoslideEnabled = true;
1370
+ autoslideLoop();
1371
+ }
1372
+ };
1373
+
1374
+
1375
+ /**
1376
+ * Stop the autoslide
1377
+ *
1378
+ * @memberof SliderControls
1379
+ * @function startAutoslide
1380
+ * @instance
1381
+ */
1382
+ this.stopAutoslide = () => {
1383
+ stopAutoslide();
1384
+ };
1385
+
1386
+
1317
1387
  function onPrev( e, $target ) {
1318
1388
  e.preventDefault();
1319
1389
 
@@ -1337,13 +1407,13 @@ export function SliderControls( slider, options ) {
1337
1407
 
1338
1408
  function stopAutoslide() {
1339
1409
  clearTimeout( autoslideTimeoutId );
1340
- options.autoslide = 0;
1410
+ isAutoslideEnabled = false;
1341
1411
  }
1342
1412
 
1343
1413
 
1344
1414
  function makeAutoslide() {
1345
1415
  slider.next().then( () => {
1346
- if ( options.autoslide ) {
1416
+ if ( isAutoslideEnabled ) {
1347
1417
  autoslideLoop();
1348
1418
  }
1349
1419
  } );
@@ -1537,14 +1607,14 @@ export function SliderControls( slider, options ) {
1537
1607
  "selector": options.paginationItems,
1538
1608
  "onPrevious": () => {
1539
1609
  one( slider, {
1540
- "eventsNAme": "before",
1610
+ "eventsName": "before",
1541
1611
  "callback": updateBulletsFocus
1542
1612
  } );
1543
1613
  slider.previous();
1544
1614
  },
1545
1615
  "onNext": () => {
1546
1616
  one( slider, {
1547
- "eventsNAme": "before",
1617
+ "eventsName": "before",
1548
1618
  "callback": updateBulletsFocus
1549
1619
  } );
1550
1620
  slider.next();
@@ -1576,7 +1646,5 @@ export function SliderControls( slider, options ) {
1576
1646
 
1577
1647
  // ------------------- START AUTOSLIDE
1578
1648
 
1579
- if ( options.autoslide ) {
1580
- autoslideLoop();
1581
- }
1649
+ this.startAutoslide();
1582
1650
  }
package/Modules/Tabs.js CHANGED
@@ -1,8 +1,8 @@
1
- import { aClass, rClass } from 'front-library/DOM/Class';
2
- import { on, off } from 'front-library/Events/EventsManager';
3
- import { extend } from 'front-library/Helpers/Extend';
4
- import { next } from 'front-library/DOM/Traversing';
5
- import { KeyboardHandler } from 'front-library/Events/KeyboardHandler';
1
+ import { aClass, rClass } from '@creative-web-solution/front-library/DOM/Class';
2
+ import { on, off } from '@creative-web-solution/front-library/Events/EventsManager';
3
+ import { extend } from '@creative-web-solution/front-library/Helpers/Extend';
4
+ import { next } from '@creative-web-solution/front-library/DOM/Traversing';
5
+ import { KeyboardHandler } from '@creative-web-solution/front-library/Events/KeyboardHandler';
6
6
 
7
7
  const STATUS_ON = 'STATUS_ON';
8
8
  const STATUS_OFF = 'STATUS_OFF';
@@ -1,4 +1,4 @@
1
- import { extend } from 'front-library/Helpers/Extend';
1
+ import { extend } from '@creative-web-solution/front-library/Helpers/Extend';
2
2
 
3
3
  /**
4
4
  * Get all radio with the same name
@@ -1,4 +1,4 @@
1
- import { defer } from 'front-library/Helpers/defer';
1
+ import { defer } from '@creative-web-solution/front-library/Helpers/defer';
2
2
 
3
3
  /**
4
4
  * @typedef {Object} Validator_State
@@ -1,4 +1,4 @@
1
- import { getValue } from 'front-library/Helpers/getValue';
1
+ import { getValue } from '@creative-web-solution/front-library/Helpers/getValue';
2
2
 
3
3
  /**
4
4
  * Create a query with the fields of a form.
@@ -1,6 +1,6 @@
1
- import { standardValidation } from 'front-library/Modules/Validator/Tools/ValidationState';
2
- import isDate from 'front-library/Modules/Validator/Tools/isDate';
3
- import { addValidator } from 'front-library/Modules/Validator';
1
+ import { standardValidation } from '@creative-web-solution/front-library/Modules/Validator/Tools/ValidationState';
2
+ import isDate from '@creative-web-solution/front-library/Modules/Validator/Tools/isDate';
3
+ import { addValidator } from '@creative-web-solution/front-library/Modules/Validator';
4
4
 
5
5
  /**
6
6
  * Date validation
@@ -1,6 +1,6 @@
1
- import { standardValidation } from 'front-library/Modules/Validator/Tools/ValidationState';
2
- import isEmail from 'front-library/Modules/Validator/Tools/isEmail';
3
- import { addValidator } from 'front-library/Modules/Validator';
1
+ import { standardValidation } from '@creative-web-solution/front-library/Modules/Validator/Tools/ValidationState';
2
+ import isEmail from '@creative-web-solution/front-library/Modules/Validator/Tools/isEmail';
3
+ import { addValidator } from '@creative-web-solution/front-library/Modules/Validator';
4
4
 
5
5
  /**
6
6
  * Email validation
@@ -1,6 +1,6 @@
1
- import { getValue } from 'front-library/Helpers/getValue';
2
- import { standardValidation } from 'front-library/Modules/Validator/Tools/ValidationState';
3
- import { addValidator } from 'front-library/Modules/Validator';
1
+ import { getValue } from '@creative-web-solution/front-library/Helpers/getValue';
2
+ import { standardValidation } from '@creative-web-solution/front-library/Modules/Validator/Tools/ValidationState';
3
+ import { addValidator } from '@creative-web-solution/front-library/Modules/Validator';
4
4
 
5
5
 
6
6
  /**
@@ -1,9 +1,9 @@
1
- import { getValue } from 'front-library/Helpers/getValue';
2
- import { extend } from 'front-library/Helpers/Extend';
3
- import { defer } from 'front-library/Helpers/defer';
4
- import { unique } from 'front-library/Helpers/unique';
5
- import { on, off } from 'front-library/Events/EventsManager';
6
- import { getRadioList } from 'front-library/Modules/Validator/Tools/RadioButton';
1
+ import { getValue } from '@creative-web-solution/front-library/Helpers/getValue';
2
+ import { extend } from '@creative-web-solution/front-library/Helpers/Extend';
3
+ import { defer } from '@creative-web-solution/front-library/Helpers/defer';
4
+ import { unique } from '@creative-web-solution/front-library/Helpers/unique';
5
+ import { on, off } from '@creative-web-solution/front-library/Events/EventsManager';
6
+ import { getRadioList } from '@creative-web-solution/front-library/Modules/Validator/Tools/RadioButton';
7
7
 
8
8
 
9
9
  const defaultOptions = {
@@ -1,5 +1,5 @@
1
- import { standardValidation } from 'front-library/Modules/Validator/Tools/ValidationState';
2
- import { addValidator } from 'front-library/Modules/Validator';
1
+ import { standardValidation } from '@creative-web-solution/front-library/Modules/Validator/Tools/ValidationState';
2
+ import { addValidator } from '@creative-web-solution/front-library/Modules/Validator';
3
3
 
4
4
  /**
5
5
  * Max range validation
@@ -1,5 +1,5 @@
1
- import { standardValidation } from 'front-library/Modules/Validator/Tools/ValidationState';
2
- import { addValidator } from 'front-library/Modules/Validator';
1
+ import { standardValidation } from '@creative-web-solution/front-library/Modules/Validator/Tools/ValidationState';
2
+ import { addValidator } from '@creative-web-solution/front-library/Modules/Validator';
3
3
 
4
4
  /**
5
5
  * Max length validation
@@ -1,5 +1,5 @@
1
- import { standardValidation } from 'front-library/Modules/Validator/Tools/ValidationState';
2
- import { addValidator } from 'front-library/Modules/Validator';
1
+ import { standardValidation } from '@creative-web-solution/front-library/Modules/Validator/Tools/ValidationState';
2
+ import { addValidator } from '@creative-web-solution/front-library/Modules/Validator';
3
3
 
4
4
  /**
5
5
  * Min range validation
@@ -1,5 +1,5 @@
1
- import { standardValidation } from 'front-library/Modules/Validator/Tools/ValidationState';
2
- import { addValidator } from 'front-library/Modules/Validator';
1
+ import { standardValidation } from '@creative-web-solution/front-library/Modules/Validator/Tools/ValidationState';
2
+ import { addValidator } from '@creative-web-solution/front-library/Modules/Validator';
3
3
 
4
4
  /**
5
5
  * Min length validation
@@ -1,8 +1,8 @@
1
- import { getValue } from 'front-library/Helpers/getValue';
2
- import { standardValidation } from 'front-library/Modules/Validator/Tools/ValidationState';
3
- import isEmpty from 'front-library/Modules/Validator/Tools/isEmpty';
4
- import { addValidator } from 'front-library/Modules/Validator';
5
- import { isRadioListChecked } from 'front-library/Modules/Validator/Tools/RadioButton';
1
+ import { getValue } from '@creative-web-solution/front-library/Helpers/getValue';
2
+ import { standardValidation } from '@creative-web-solution/front-library/Modules/Validator/Tools/ValidationState';
3
+ import isEmpty from '@creative-web-solution/front-library/Modules/Validator/Tools/isEmpty';
4
+ import { addValidator } from '@creative-web-solution/front-library/Modules/Validator';
5
+ import { isRadioListChecked } from '@creative-web-solution/front-library/Modules/Validator/Tools/RadioButton';
6
6
 
7
7
 
8
8
  /**
@@ -1,6 +1,6 @@
1
- import { standardValidation } from 'front-library/Modules/Validator/Tools/ValidationState';
2
- import isNumber from 'front-library/Modules/Validator/Tools/isNumber';
3
- import { addValidator } from 'front-library/Modules/Validator';
1
+ import { standardValidation } from '@creative-web-solution/front-library/Modules/Validator/Tools/ValidationState';
2
+ import isNumber from '@creative-web-solution/front-library/Modules/Validator/Tools/isNumber';
3
+ import { addValidator } from '@creative-web-solution/front-library/Modules/Validator';
4
4
 
5
5
  /**
6
6
  * Number validation
@@ -1,5 +1,5 @@
1
- import { standardValidation } from 'front-library/Modules/Validator/Tools/ValidationState';
2
- import { addValidator } from 'front-library/Modules/Validator';
1
+ import { standardValidation } from '@creative-web-solution/front-library/Modules/Validator/Tools/ValidationState';
2
+ import { addValidator } from '@creative-web-solution/front-library/Modules/Validator';
3
3
 
4
4
  /**
5
5
  * Email validation
@@ -1,5 +1,5 @@
1
- import { standardValidation } from 'front-library/Modules/Validator/Tools/ValidationState';
2
- import { addValidator } from 'front-library/Modules/Validator';
1
+ import { standardValidation } from '@creative-web-solution/front-library/Modules/Validator/Tools/ValidationState';
2
+ import { addValidator } from '@creative-web-solution/front-library/Modules/Validator';
3
3
 
4
4
  addValidator( 'recaptcha', '.js--recaptcha', true, ( $input, value, isLiveValidation ) => {
5
5
  return standardValidation(
@@ -1,7 +1,7 @@
1
- import { standardValidation } from 'front-library/Modules/Validator/Tools/ValidationState';
2
- import isEmpty from 'front-library/Modules/Validator/Tools/isEmpty';
3
- import { addValidator } from 'front-library/Modules/Validator';
4
- import { isRadioListChecked } from 'front-library/Modules/Validator/Tools/RadioButton';
1
+ import { standardValidation } from '@creative-web-solution/front-library/Modules/Validator/Tools/ValidationState';
2
+ import isEmpty from '@creative-web-solution/front-library/Modules/Validator/Tools/isEmpty';
3
+ import { addValidator } from '@creative-web-solution/front-library/Modules/Validator';
4
+ import { isRadioListChecked } from '@creative-web-solution/front-library/Modules/Validator/Tools/RadioButton';
5
5
 
6
6
  /**
7
7
  * Required validation
@@ -1,6 +1,6 @@
1
- import { defer } from 'front-library/Helpers/defer';
2
- import { createState } from 'front-library/Modules/Validator/Tools/ValidationState';
3
- import { addValidator } from 'front-library/Modules/Validator';
1
+ import { defer } from '@creative-web-solution/front-library/Helpers/defer';
2
+ import { createState } from '@creative-web-solution/front-library/Modules/Validator/Tools/ValidationState';
3
+ import { addValidator } from '@creative-web-solution/front-library/Modules/Validator';
4
4
 
5
5
  /**
6
6
  * Server validation
@@ -1,6 +1,6 @@
1
- import { standardValidation } from 'front-library/Modules/Validator/Tools/ValidationState';
2
- import isUrl from 'front-library/Modules/Validator/Tools/isUrl';
3
- import { addValidator } from 'front-library/Modules/Validator';
1
+ import { standardValidation } from '@creative-web-solution/front-library/Modules/Validator/Tools/ValidationState';
2
+ import isUrl from '@creative-web-solution/front-library/Modules/Validator/Tools/isUrl';
3
+ import { addValidator } from '@creative-web-solution/front-library/Modules/Validator';
4
4
 
5
5
  /**
6
6
  * URL validation
@@ -1,5 +1,5 @@
1
- import { extend } from 'front-library/Helpers/Extend';
2
- import { defer } from 'front-library/Helpers/defer';
1
+ import { extend } from '@creative-web-solution/front-library/Helpers/Extend';
2
+ import { defer } from '@creative-web-solution/front-library/Helpers/defer';
3
3
 
4
4
 
5
5
  let ytAPILoadingPromise;
@@ -1,4 +1,4 @@
1
- import { slice } from 'front-library/Helpers/slice';
1
+ import { slice } from '@creative-web-solution/front-library/Helpers/slice';
2
2
 
3
3
  /**
4
4
  * @typedef {Function} GlobalState_callback
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Front Library
2
2
 
3
- @version: 6.1.3
3
+ @version: 6.2.9
4
4
 
5
5
 
6
6
  ## Use
@@ -8,7 +8,7 @@
8
8
  Just import features as usual:
9
9
 
10
10
  ```js
11
- import { extend } from 'front-library/Helpers/Extend';
11
+ import { extend } from '@creative-web-solution/front-library/Helpers/Extend';
12
12
  ```
13
13
 
14
14
 
@@ -19,6 +19,6 @@ They are made to be concatenated at the end of the Modernizr file.
19
19
  ```js
20
20
  [
21
21
  "modernizr.js",
22
- "node_modules/front-library/ModernizrAddons/mobile.js"
22
+ "node_modules/@creative-web-solution/front-library/ModernizrAddons/mobile.js"
23
23
  ]
24
24
  ```
@@ -0,0 +1,54 @@
1
+
2
+
3
+ function testPrefix( list, element = 'div' ) {
4
+
5
+ const $ELEMENT = document.createElement( element );
6
+
7
+ for ( const key of Object.keys( list ) ) {
8
+ if ( key in $ELEMENT.style ) {
9
+ return list[ key ];
10
+ }
11
+ }
12
+
13
+ return '';
14
+ }
15
+
16
+
17
+ export const animationendEventName = ( function() {
18
+ return testPrefix( {
19
+ "animation": "animationend",
20
+ "OAnimation": "oAnimationEnd",
21
+ "MozAnimation": "animationend",
22
+ "WebkitAnimation": "webkitAnimationEnd"
23
+ } );
24
+ } )();
25
+
26
+
27
+ export const transitionendEventName = ( function() {
28
+ return testPrefix( {
29
+ "transition": "transitionend",
30
+ "OTransition": "oTransitionEnd",
31
+ "MozTransition": "transitionend",
32
+ "WebkitTransition": "webkitTransitionEnd"
33
+ } );
34
+ } )();
35
+
36
+
37
+ export const transformPropertyName = ( function() {
38
+ return testPrefix( {
39
+ "transform": "transform",
40
+ "WebkitTransform": "WebkitTransform",
41
+ "OTransform": "OTransform",
42
+ "MozTransform": "MozTransform"
43
+ } );
44
+ } )();
45
+
46
+
47
+ export const transitionPropertyName = ( function() {
48
+ return testPrefix( {
49
+ "transition": "transition",
50
+ "WebkitTransition": "WebkitTransition",
51
+ "OTransition": "OTransition",
52
+ "MozTransition": "MozTransition"
53
+ } );
54
+ } )();
@@ -0,0 +1 @@
1
+ export const isTouchDevice = window.matchMedia( '(hover: none)' ).matches;
@@ -1,7 +1,7 @@
1
- import { aClass } from 'front-library/DOM/Class';
2
- import { append } from 'front-library/DOM/Manipulation';
3
- import { createMat4, orthoMat4, scaleMat4 } from 'front-library/WebGL/Tools/matrix';
4
- import { defer } from 'front-library/Helpers/defer';
1
+ import { aClass } from '@creative-web-solution/front-library/DOM/Class';
2
+ import { append } from '@creative-web-solution/front-library/DOM/Manipulation';
3
+ import { createMat4, orthoMat4, scaleMat4 } from '@creative-web-solution/front-library/WebGL/Tools/matrix';
4
+ import { defer } from '@creative-web-solution/front-library/Helpers/defer';
5
5
 
6
6
 
7
7
  const VERTEX_SHADER_SOURCE = `
@@ -5,7 +5,7 @@ Callbacks are bound on 'keydown' events
5
5
 
6
6
 
7
7
  ```
8
- import { KeyboardHandler } from 'front-library/Events/KeyboardHandler'
8
+ import { KeyboardHandler } from '@creative-web-solution/front-library/Events/KeyboardHandler'
9
9
 
10
10
  let keyboardControls = new KeyboardHandler(
11
11
  $domElement,
@@ -85,7 +85,7 @@ You have access to:
85
85
  ## Gestures
86
86
 
87
87
  ```
88
- import { gesture, gestureOff } from 'front-library/Events/Gesture'
88
+ import { gesture, gestureOff } from '@creative-web-solution/front-library/Events/Gesture'
89
89
 
90
90
  let gestureHanlder = gesture( $element, 'handlerName', options );
91
91
 
@@ -9,3 +9,4 @@
9
9
  * Modernizr.touchpad
10
10
  * Modernizr.winos
11
11
  * Modernizr.winphone
12
+ * Modernizr.cssvars