aotrautils-srv 0.0.209 → 0.0.212
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 (19/07/2022-03:
|
|
3
|
+
/*utils COMMONS library associated with aotra version : «1.0.0.000 (19/07/2022-03:41:16)»*/
|
|
4
4
|
/*-----------------------------------------------------------------------------*/
|
|
5
5
|
|
|
6
6
|
|
|
@@ -4828,7 +4828,7 @@ AOTRAUTILS_LIB_IS_LOADED=true;
|
|
|
4828
4828
|
|
|
4829
4829
|
|
|
4830
4830
|
|
|
4831
|
-
/*utils SERVER library associated with aotra version : «1.0.0.000 (19/07/2022-03:
|
|
4831
|
+
/*utils SERVER library associated with aotra version : «1.0.0.000 (19/07/2022-03:41:16)»*/
|
|
4832
4832
|
/*-----------------------------------------------------------------------------*/
|
|
4833
4833
|
|
|
4834
4834
|
|
|
@@ -6163,12 +6163,21 @@ class ListManager{
|
|
|
6163
6163
|
lognow("ERROR : Cannot add null item.");
|
|
6164
6164
|
return;
|
|
6165
6165
|
}
|
|
6166
|
-
const numberOfItemsCurrently=
|
|
6166
|
+
const numberOfItemsCurrently=getArraySize(this.itemsInfos);
|
|
6167
|
+
|
|
6168
|
+
// DBG
|
|
6169
|
+
lognow(">>>>>>>>>this.itemsInfos:",this.itemsInfos);
|
|
6170
|
+
lognow(">>>>>>>>>numberOfItemsCurrently:",numberOfItemsCurrently);
|
|
6171
|
+
lognow(">>>>>>>>>Object.keys(arrayOfValues):",Object.keys(this.itemsInfos));
|
|
6172
|
+
|
|
6173
|
+
|
|
6167
6174
|
if(this.maxItemsNumber<=numberOfItemsCurrently){
|
|
6168
6175
|
// TRACE
|
|
6169
6176
|
lognow("ERROR : Cannot add item with id «"+id+"», list already full.");
|
|
6170
6177
|
return;
|
|
6171
6178
|
}
|
|
6179
|
+
|
|
6180
|
+
|
|
6172
6181
|
if(numberOfItemsCurrently==0 && this.mode==="startAtConnexion"){
|
|
6173
6182
|
this.startSession();
|
|
6174
6183
|
}
|
|
@@ -6196,11 +6205,11 @@ class ListManager{
|
|
|
6196
6205
|
isClientActive(clientId){
|
|
6197
6206
|
|
|
6198
6207
|
// DBG
|
|
6199
|
-
lognow(" this.isSessionActive()"
|
|
6208
|
+
lognow(" this.isSessionActive()"+this.isSessionActive());
|
|
6200
6209
|
|
|
6201
6210
|
if(!this.isSessionActive()) return false;
|
|
6202
6211
|
const clientPosition=this.getItemPosition(clientId);
|
|
6203
|
-
const result=(clientPosition-1/*Because client position starts at 1 !*/<=this.maxItemsNumber);
|
|
6212
|
+
const result=((clientPosition-1)/*Because client position starts at 1 !*/<=this.maxItemsNumber);
|
|
6204
6213
|
return result;
|
|
6205
6214
|
}
|
|
6206
6215
|
|
|
@@ -6227,10 +6236,14 @@ class ListManager{
|
|
|
6227
6236
|
|
|
6228
6237
|
let id=null;
|
|
6229
6238
|
foreach(this.itemsInfos,(itemInfos,key)=>{
|
|
6230
|
-
if(itemInfos.item===item
|
|
6239
|
+
if(itemInfos.item===item
|
|
6240
|
+
// DEBUG ONLY :
|
|
6241
|
+
|| (itemInfos.item.id && item.id && itemInfos.item.id===item.id)
|
|
6242
|
+
){
|
|
6231
6243
|
id=key;
|
|
6232
6244
|
return "break";
|
|
6233
6245
|
}
|
|
6246
|
+
|
|
6234
6247
|
});
|
|
6235
6248
|
|
|
6236
6249
|
if(!id){
|
aotrautils-srv/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aotrautils-srv",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.212",
|
|
4
4
|
"main": "aotrautils-srv.build.js",
|
|
5
5
|
"description": "A library for vanilla javascript utils (server-side) used in aotra javascript CMS",
|
|
6
6
|
"author": "Jeremie Ratomposon <info@alqemia.com> (https://alqemia.com)",
|