aw-front-helpers 2.5.31 → 2.5.33

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.
@@ -39,7 +39,7 @@ class bootstraperMaps {
39
39
  loader.load().then(() => {
40
40
  this._initialized = true;
41
41
  this._loading = false;
42
- this._resolve()
42
+ setTimeout(() => this._resolve(), 300);
43
43
  }).catch(console.error);
44
44
  }
45
45
  return this._promise;
@@ -30,7 +30,7 @@ class bootstraperYoutube {
30
30
  firstScriptTag = document.getElementsByTagName('script')[0];
31
31
  tag.src = 'https://www.youtube.com/iframe_api';
32
32
  firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
33
- this._resolve();
33
+ setTimeout(() => this._resolve(), 400);
34
34
  this._initialized = true;
35
35
  }
36
36
 
@@ -9,31 +9,31 @@ const defaultOptions = {
9
9
  classIsError: 'is-error',
10
10
  animateToFirstError: false,
11
11
  i18n: {
12
- required: window.Translator
12
+ required: window.Translator?.trans
13
13
  ? window.Translator.trans('form_errors.pattern')
14
14
  : 'Ce champs est obligatoire',
15
- same: window.Translator
15
+ same: window.Translator?.trans
16
16
  ? window.Translator.trans('form_errors.same')
17
17
  : 'Les champs ne correspondent pas.',
18
- email: window.Translator
18
+ email: window.Translator?.trans
19
19
  ? window.Translator.trans('form_errors.email')
20
20
  : 'Merci de renseigner un email valide.',
21
- empty: window.Translator
21
+ empty: window.Translator?.trans
22
22
  ? window.Translator.trans('form_errors.empty')
23
23
  : 'Ce champs est obligatoire.',
24
- checkbox: window.Translator
24
+ checkbox: window.Translator?.trans
25
25
  ? window.Translator.trans('form_errors.checkbox')
26
26
  : 'Veuillez accepter les conditions.',
27
- radio: window.Translator
27
+ radio: window.Translator?.trans
28
28
  ? window.Translator.trans('form_errors.radio')
29
29
  : 'Veuillez sélectionner au moins un choix.',
30
- minLength: window.Translator
30
+ minLength: window.Translator?.trans
31
31
  ? window.Translator.trans('form_errors.min_length')
32
32
  : 'Ce champ doit contenir au minimum %length% caractères',
33
- maxLength: window.Translator
33
+ maxLength: window.Translator?.trans
34
34
  ? window.Translator.trans('form_errors.max_length')
35
35
  : 'Ce champ doit contenir au maximum %length% caractères',
36
- pattern: window.Translator
36
+ pattern: window.Translator?.trans
37
37
  ? window.Translator.trans('form_errors.pattern')
38
38
  : 'La donnée saisie ne respecte pas les règles énoncées.',
39
39
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aw-front-helpers",
3
- "version": "2.5.31",
3
+ "version": "2.5.33",
4
4
  "description": "Assets helpers for projects",
5
5
  "author": "Yoann Le Poupon",
6
6
  "license": "ISC",