@creative-web-solution/front-library 6.2.12 → 6.2.14

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/CHANGELOG.md CHANGED
@@ -1,6 +1,16 @@
1
1
  # CHANGELOG
2
2
 
3
3
 
4
+ ## 6.2.14
5
+
6
+ * Remove Modernizr
7
+
8
+
9
+ ## 6.2.13
10
+
11
+ * Autocomplete: Add method ajax call option
12
+
13
+
4
14
  ## 6.2.12
5
15
 
6
16
  * Fix import name
package/DOM/matrix.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { prop } from '@creative-web-solution/front-library/DOM/Styles';
2
+ import { transformPropertyName } from '../Tools/PrefixedProperties';
2
3
 
3
4
  /**
4
5
  * @typedef {Object} matrix_Object
@@ -47,11 +48,7 @@ import { prop } from '@creative-web-solution/front-library/DOM/Styles';
47
48
  export function getMatrix( $elem ) {
48
49
  let matrixString, c, matrix;
49
50
 
50
- if ( !Modernizr || Modernizr.prefixed ) {
51
- throw 'Missing dependency: Modernizr.prefixed';
52
- }
53
-
54
- matrixString = prop( $elem, Modernizr.prefixed( 'transform' ) );
51
+ matrixString = prop( $elem, transformPropertyName );
55
52
  c = matrixString.split( /\s*[(),]\s*/ ).slice( 1, -1 );
56
53
 
57
54
  if ( c.length === 6 ) {
@@ -20,6 +20,7 @@ import { position } from '@creative-web-solution/front-library/DOM/position';
20
20
  * @param {Number} [userOptions.minchar=3]
21
21
  * @param {} [userOptions.source]
22
22
  * @param {String} userOptions.url
23
+ * @param {String} [userOptions.method=GET]
23
24
  * @param {String} [userOptions.cssPositionning=false] - Use CSS or Javascript for the position of the layer
24
25
  * @param {boolean} [userOptions.updateOnSelect=true] - Update or not the text field with the selected value
25
26
  * @param {Callback} [userOptions.onSelect] - ({ item, query, resultsList }) => {}
@@ -57,6 +58,7 @@ export function Autocomplete(userOptions = {}) {
57
58
  "minchar": 3,
58
59
  "source": null,
59
60
  "url": "",
61
+ "method": "GET",
60
62
  "updateOnSelect": true,
61
63
  "onSelect": null,
62
64
  "cssPositionning": false,
@@ -496,6 +498,7 @@ export function Autocomplete(userOptions = {}) {
496
498
  myHeaders.append( 'X-Requested-With', 'XMLHttpRequest' );
497
499
 
498
500
  fetch( newUrl, {
501
+ "method": options.method,
499
502
  "signal": requestAbortController.signal,
500
503
  "headers": myHeaders
501
504
  } )
@@ -6,6 +6,7 @@ import { prop } from '@creative-web-solution/front-library/DOM
6
6
  import { aClass, rClass, tClass } from '@creative-web-solution/front-library/DOM/Class';
7
7
  import { on, off } from '@creative-web-solution/front-library/Events/EventsManager';
8
8
 
9
+ const IS_TOUCH_DEVICE = !window.matchMedia('(hover:hover)').matches;
9
10
 
10
11
  /**
11
12
  * DragSlider
@@ -306,8 +307,8 @@ export function DragSlider( $slider, options ) {
306
307
  return false;
307
308
  }
308
309
 
309
- return !Modernizr.touchdevice ||
310
- Modernizr.touchdevice && Math.abs( deltaMove.deltaY ) < Math.abs( deltaMove.deltaX );
310
+ return !IS_TOUCH_DEVICE ||
311
+ IS_TOUCH_DEVICE && Math.abs( deltaMove.deltaY ) < Math.abs( deltaMove.deltaX );
311
312
  }
312
313
  } );
313
314
 
package/Modules/Popin.js CHANGED
@@ -9,8 +9,7 @@ import { template } from '@creative-web-solution/front-library/Modules/template'
9
9
 
10
10
  let $body = document.body;
11
11
 
12
- const CLICK_EVENT_NAME =
13
- window.Modernizr && window.Modernizr.touchdevice ? 'touchend' : 'click';
12
+ const CLICK_EVENT_NAME = window.matchMedia('(hover:hover)').matches ? 'click' : 'touchend';
14
13
 
15
14
  const FOCUSABLE_ELEMENTS = 'a, button, input, select, textarea';
16
15
 
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Front Library
2
2
 
3
- @version: 6.2.12
3
+ @version: 6.2.14
4
4
 
5
5
 
6
6
  ## Use
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@creative-web-solution/front-library",
3
3
  "title": "Frontend library",
4
4
  "description": "Frontend functions and modules",
5
- "version": "6.2.12",
5
+ "version": "6.2.14",
6
6
  "homepage": "https://github.com/creative-web-solution/front-library",
7
7
  "author": "Creative Web Solution <contact@cws-studio.com> (https://www.cws-studio.com)",
8
8
  "keywords": [],