@osimatic/helpers-js 1.0.3 → 1.0.4

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/array.js CHANGED
@@ -81,4 +81,6 @@ function renameKeysByCallback(obj, callback) {
81
81
  }),
82
82
  {}
83
83
  );
84
- }
84
+ }
85
+
86
+ module.exports = { getValuesByKeyInArrayOfArrays, renameKeys, renameKeysByCallback };
package/index.js CHANGED
@@ -1,26 +1,34 @@
1
- const { HTTPRequest, Cookie, UrlAndQueryString } = require('./network.js');
2
- const { IBAN } = require('./bank.js');
3
- const { AudioMedia } = require('./media.js');
4
- const { PersonName, Email, TelephoneNumber } = require('./contact_details.js');
5
- const { CountDown } = require('./count_down.js');
6
- const { DataTable } = require('./data_table.js');
7
- const { DateTime, TimestampUnix, SqlDate, SqlTime, SqlDateTime, InputPeriod } = require('./date_time.js');
8
- const { DetailsSubArray } = require('./details_sub_array.js');
9
- const { Duration } = require('./duration.js');
10
- const { File, CSV, Img } = require('./file.js');
11
- const { FlashMessage } = require('./flash_message.js');
12
- const { FormHelper } = require('./form_helper.js');
13
- const { GoogleMap } = require('./google_maps.js');
14
- const { ImportFromCsv } = require('./import_from_csv.js');
15
- const { JwtToken, JwtSession } = require('./jwt.js');
16
- const { ListBox } = require('./list_box.js');
17
- const { COUNTRIES_LIST, Country, PostalAddress, Location } = require('./location.js');
18
- const { SocialNetwork } = require('./social_network.js');
1
+ //A noter : les réécritures de prototypes définies dans certains fichiers n'ont pas besoin d'être exportés depuis le module en question (exemple Array / Object dans array.js).
2
+ //Il faut uniquement appeler require() (sans récupérer le retour) et ajouter la/les classe(s) concernée(s) dans l'export ci-dessous (l'appel de require() applique l'extension).
3
+
4
+ const { HTTPRequest, Cookie, UrlAndQueryString } = require('./network');
5
+ const { IBAN } = require('./bank');
6
+ const { AudioMedia } = require('./media');
7
+ const { PersonName, Email, TelephoneNumber } = require('./contact_details');
8
+ const { CountDown } = require('./count_down');
9
+ const { DataTable } = require('./data_table');
10
+ const { DateTime, TimestampUnix, SqlDate, SqlTime, SqlDateTime, InputPeriod } = require('./date_time');
11
+ const { DetailsSubArray } = require('./details_sub_array');
12
+ const { Duration } = require('./duration');
13
+ const { File, CSV, Img } = require('./file');
14
+ const { FlashMessage } = require('./flash_message');
15
+ const { FormHelper } = require('./form_helper');
16
+ const { GoogleMap } = require('./google_maps');
17
+ const { ImportFromCsv } = require('./import_from_csv');
18
+ const { JwtToken, JwtSession } = require('./jwt');
19
+ const { ListBox } = require('./list_box');
20
+ const { COUNTRIES_LIST, Country, PostalAddress, Location } = require('./location');
21
+ const { SocialNetwork } = require('./social_network');
22
+ const { getValuesByKeyInArrayOfArrays, renameKeys, renameKeysByCallback } = require('./array');
23
+ const { NumberValue } = require('./number');
24
+ const { selectionnerContenuNode, copierTexte } = require('./string');
25
+ const { addBookmark, sleep, refresh } = require('./util');
26
+ const { chr, ord, trim, empty } = require('./php.min');
19
27
 
20
28
  module.exports = {
21
29
  HTTPRequest, Cookie, UrlAndQueryString, IBAN, AudioMedia, PersonName, Email, TelephoneNumber, CountDown, DataTable,
22
30
  DateTime, TimestampUnix, SqlDate, SqlTime, SqlDateTime, InputPeriod, DetailsSubArray, Duration, File, CSV, Img,
23
- FlashMessage, FormHelper, GoogleMap, ImportFromCsv, JwtToken, JwtSession, ListBox, Country, PostalAddress, Location,
24
- SocialNetwork,
25
- COUNTRIES_LIST
31
+ FlashMessage, FormHelper, GoogleMap, ImportFromCsv, JwtToken, JwtSession, ListBox, COUNTRIES_LIST, Country, PostalAddress,
32
+ Location, SocialNetwork, Array, Object, getValuesByKeyInArrayOfArrays, renameKeys, renameKeysByCallback, Number, NumberValue,
33
+ String, selectionnerContenuNode, copierTexte, addBookmark, sleep, refresh, chr, ord, trim, empty
26
34
  };
package/number.js CHANGED
@@ -88,3 +88,5 @@ Number.prototype.formatAsPercent = function(locale, minimumFractionDigits) {
88
88
  minimumFractionDigits = (typeof minimumFractionDigits != 'undefined'?minimumFractionDigits:0);
89
89
  return new Intl.NumberFormat(locale, {style: 'percent', minimumFractionDigits:minimumFractionDigits}).format(this);
90
90
  };
91
+
92
+ module.exports = { NumberValue };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@osimatic/helpers-js",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
package/paging.js CHANGED
@@ -118,6 +118,8 @@ function activateTab(a) {
118
118
  tabContent.find(a.attr('href')).addClass('active').addClass('show');
119
119
  }
120
120
 
121
+ module.exports = { Pagination, activateTab };
122
+
121
123
  // deprecated
122
124
  function paginationAsList(nbResultatsTotal, nbResultatsParPage, urlPage, nomParamPage) {
123
125
  var currentUrl = urlPage || window.location.href;
package/php.min.js CHANGED
@@ -1,4 +1,6 @@
1
1
  function chr(codePt){if(codePt>65535){codePt-=65536;return String.fromCharCode(55296+(codePt>>10),56320+(codePt&1023))}return String.fromCharCode(codePt)}
2
2
  function ord(string){var str=string+"",code=str.charCodeAt(0);if(55296<=code&&code<=56319){var hi=code;if(str.length===1){return code}var low=str.charCodeAt(1);return((hi-55296)*1024)+(low-56320)+65536}if(56320<=code&&code<=57343){return code}return code}
3
3
  function trim(str){return str.replace(/^\s+/g,"").replace(/\s+$/g,"")}
4
- function empty(mixed_var){var key;if(mixed_var===""||mixed_var===0||mixed_var==="0"||mixed_var===null||mixed_var===false||typeof mixed_var==="undefined"){return true}if(typeof mixed_var=="object"){for(key in mixed_var){return false}return true}return false}
4
+ function empty(mixed_var){var key;if(mixed_var===""||mixed_var===0||mixed_var==="0"||mixed_var===null||mixed_var===false||typeof mixed_var==="undefined"){return true}if(typeof mixed_var=="object"){for(key in mixed_var){return false}return true}return false}
5
+
6
+ module.exports = { chr, ord, trim, empty };
package/string.js CHANGED
@@ -116,3 +116,5 @@ if (!String.format) {
116
116
  return format.replace(/{(\d+)}/g, (match, number) => (typeof args[number] != 'undefined' ? args[number] : match));
117
117
  };
118
118
  }
119
+
120
+ module.exports = { selectionnerContenuNode, copierTexte };
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/util.js CHANGED
@@ -20,4 +20,6 @@ function refresh() {
20
20
  // console.log('Refresh page');
21
21
  // history.go(0);
22
22
  window.location.reload(true);
23
- }
23
+ }
24
+
25
+ module.exports = { addBookmark, sleep, refresh };