aotrautils 0.0.159 → 0.0.160

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.
@@ -1,6 +1,6 @@
1
1
 
2
2
 
3
- /*utils COMMONS library associated with aotra version : «1.0.0.000 (17/07/2022-14:02:07)»*/
3
+ /*utils COMMONS library associated with aotra version : «1.0.0.000 (17/07/2022-14:14:39)»*/
4
4
  /*-----------------------------------------------------------------------------*/
5
5
 
6
6
 
@@ -4828,7 +4828,7 @@ AOTRAUTILS_LIB_IS_LOADED=true;
4828
4828
 
4829
4829
 
4830
4830
 
4831
- /*utils CLIENT library associated with aotra version : «1.0.0.000 (17/07/2022-14:02:07)»*/
4831
+ /*utils CLIENT library associated with aotra version : «1.0.0.000 (17/07/2022-14:14:39)»*/
4832
4832
  /*-----------------------------------------------------------------------------*/
4833
4833
  /* ## Utility global methods in a browser (htmljs) client environment.
4834
4834
  *
@@ -5253,7 +5253,7 @@ function bringElementSelectedToPosition(elementSlct, x, y,/* OPTIONAL */delay,/*
5253
5253
  function getSelectedText(textComponent){
5254
5254
 
5255
5255
  var selectedText="";
5256
- if (textComponent.tagName.toLowerCase() == "textarea"){
5256
+ if (textComponent.tagName.toLowerCase()=="textarea"){
5257
5257
 
5258
5258
  // IE version
5259
5259
  if (document.selection != undefined){
@@ -5280,7 +5280,7 @@ function getSelectedText(textComponent){
5280
5280
 
5281
5281
  } else if (typeof document.selection != "undefined"){
5282
5282
  // IE version
5283
- if (document.selection.type == "Text"){
5283
+ if (document.selection.type=="Text"){
5284
5284
  selectedText=document.selection.createRange().htmlText;
5285
5285
  }
5286
5286
  }
@@ -5792,7 +5792,7 @@ function getTextWordsExtract(textStrParam, wordsNumber,/* OPTIONAL */wordPositio
5792
5792
  var s=split[j];
5793
5793
  if (s.length<1)
5794
5794
  continue;
5795
- if (s.length == 1 && new RegExp("[^\\wàâäéèêëìîïòôöùûüç]", "igm").test(s))
5795
+ if (s.length==1 && new RegExp("[^\\wàâäéèêëìîïòôöùûüç]", "igm").test(s))
5796
5796
  continue;
5797
5797
  split2.push(s);
5798
5798
  }
@@ -6211,7 +6211,7 @@ function getCookie(cookieName){
6211
6211
  if (cookieStart != -1){
6212
6212
  cookieStart=cookieStart + cookieName.length + 1;
6213
6213
  let cookieEnd=document.cookie.indexOf(";", cookieStart);
6214
- if (cookieEnd == -1){
6214
+ if (cookieEnd==-1){
6215
6215
  cookieEnd=document.cookie.length;
6216
6216
  }
6217
6217
  return unescape(document.cookie.substring(cookieStart, cookieEnd));
@@ -6268,7 +6268,7 @@ function validateFilesExtensions(self, acceptedFilesTypesString){
6268
6268
  if (!empty(acceptedFilesTypes)){
6269
6269
  acceptedFilesExtensionsRegExpStr+="(";
6270
6270
  for(var i=0; i<acceptedFilesTypes.length; i++){
6271
- acceptedFilesExtensionsRegExpStr+=(acceptedFilesExtensionsRegExpStr == "(" ? "" : "|") + "\." + (acceptedFilesTypes[i].split(PATH_SEPARATOR)[1]);
6271
+ acceptedFilesExtensionsRegExpStr+=(acceptedFilesExtensionsRegExpStr=="(" ? "" : "|") + "\." + (acceptedFilesTypes[i].split(PATH_SEPARATOR)[1]);
6272
6272
  }
6273
6273
  acceptedFilesExtensionsRegExpStr+=")";
6274
6274
  }
@@ -6451,7 +6451,7 @@ function htmlColorCodeToDecimalArray(hexColorCodeParam){
6451
6451
 
6452
6452
  /*private*/function componentToHex(c){
6453
6453
  var hex=c.toString(16);
6454
- return hex.length == 1 ? "0" + hex : hex;
6454
+ return hex.length==1 ? "0" + hex : hex;
6455
6455
  }
6456
6456
  /*public*/function rgb2Hex(r, g, b){
6457
6457
  return "#" + componentToHex(r) + componentToHex(g) + componentToHex(b);
@@ -7858,14 +7858,14 @@ function filterPoints(allPoints ,ctx/*DBG*/){
7858
7858
  if(!isArray(mediaHandler.video)){
7859
7859
  mediaHandler.video.srcObject=stream;
7860
7860
  // NO : DOES NOT WORK (CREATES A BLANK IMAGE !) mediaHandler.video.muted=true;
7861
- // STUPID WORKAROUND : Because apparently, if volume == 0 or video is muted, then the image data is all black !!!
7861
+ // STUPID WORKAROUND : Because apparently, if volume==0 or video is muted, then the image data is all black !!!
7862
7862
  mediaHandler.video.volume=0.0000000000001;
7863
7863
  // mediaHandler.video.autoplay=true;
7864
7864
  }else{
7865
7865
  foreach(mediaHandler.video,(v)=>{
7866
7866
  v.srcObject=stream;
7867
7867
  // NO : DOES NOT WORK (CREATES A BLANK IMAGE !) v.muted=true;
7868
- // STUPID WORKAROUND : Because apparently, if volume == 0 or video is muted, then the image data is all black !!!
7868
+ // STUPID WORKAROUND : Because apparently, if volume==0 or video is muted, then the image data is all black !!!
7869
7869
  v.volume=0.0000000000001;
7870
7870
  // v.autoplay=true;
7871
7871
  });
@@ -9373,7 +9373,7 @@ function arrayFromString(strParam,compressResult=true,precisionFraction=null,isS
9373
9373
  //var webcamHandler=new Object();
9374
9374
  //
9375
9375
  //var videoTag=document.getElementById(videoTagId);
9376
- //if (videoTag == null){
9376
+ //if (videoTag==null){
9377
9377
  // var backgroundContainerDiv=document.getElementById(AOTRA_SCREEN_DIV_ID) ? document.getElementById(AOTRA_SCREEN_DIV_ID) : document.body;
9378
9378
  //
9379
9379
  // videoTag=document.createElement("video");
@@ -11249,8 +11249,8 @@ function getPointsFromSVGDString(str){
11249
11249
  case "M": case "L": case "l":
11250
11250
  let arr = paths[i].split(/\s/g).filter(function(v) { return v.length > 0 });
11251
11251
  for(let t = 0, AL=arr.length ; t<AL ; t+=2) {
11252
- x = (keys[i] == "l" ? x : 0) + parseFloat(arr[t]);
11253
- y = (keys[i] == "l" ? y : 0) + parseFloat(arr[t+1]);
11252
+ x = (keys[i]=="l" ? x : 0) + parseFloat(arr[t]);
11253
+ y = (keys[i]=="l" ? y : 0) + parseFloat(arr[t+1]);
11254
11254
  points.push({x:x,y:y});
11255
11255
  }
11256
11256
  break;
@@ -11678,7 +11678,7 @@ createFusrodaClient=function(doOnClientReady, doOnDataReception, urlParam=null,
11678
11678
 
11679
11679
 
11680
11680
 
11681
- /*utils GEOMETRY library associated with aotra version : «1.0.0.000 (17/07/2022-14:02:07)»*/
11681
+ /*utils GEOMETRY library associated with aotra version : «1.0.0.000 (17/07/2022-14:14:39)»*/
11682
11682
  /*-----------------------------------------------------------------------------*/
11683
11683
 
11684
11684
 
@@ -12884,7 +12884,7 @@ function rayVsUnitSphereClosestPoint(p, r) {
12884
12884
  // MUST REMAIN AT THE END OF THIS LIBRARY FILE !
12885
12885
 
12886
12886
  AOTRAUTILS_GEOMETRY_LIB_IS_LOADED=true;
12887
- /*utils SERVER library associated with aotra version : «1.0.0.000 (17/07/2022-14:02:07)»*/
12887
+ /*utils SERVER library associated with aotra version : «1.0.0.000 (17/07/2022-14:14:39)»*/
12888
12888
  /*-----------------------------------------------------------------------------*/
12889
12889
 
12890
12890
 
@@ -13863,7 +13863,7 @@ launchNodeHTTPServer=function(port, doOnConnect=null, doOnFinalizeServer=null, /
13863
13863
  const urlFile="." + url;
13864
13864
 
13865
13865
  let filePath=urlFile.indexOf("?")!==-1?urlFile.split("?")[0]:urlFile;
13866
- if(filePath == "./") filePath="./index.html";
13866
+ if(filePath=="./") filePath="./index.html";
13867
13867
 
13868
13868
  let extname=path.extname(filePath);
13869
13869
  let contentType="text/html";
@@ -13871,7 +13871,7 @@ launchNodeHTTPServer=function(port, doOnConnect=null, doOnFinalizeServer=null, /
13871
13871
 
13872
13872
  fs.readFile(filePath, function(error, fileContent){
13873
13873
  if(error){
13874
- if(error.code == "ENOENT"){
13874
+ if(error.code=="ENOENT"){
13875
13875
  // TRACE
13876
13876
  console.log("ERROR 404 file not found :"+filePath);
13877
13877
 
aotrautils/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aotrautils",
3
- "version": "0.0.159",
3
+ "version": "0.0.160",
4
4
  "main": "aotrautils.build.js",
5
5
  "description": "A library for vanilla javascript utils (client-side) used in aotra javascript CMS",
6
6
  "author": "Jeremie Ratomposon <info@alqemia.com> (https://alqemia.com)",