form-aurora-stefanini 0.1.26 → 0.1.27
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/bundles/form-aurora-stefanini.umd.js +7 -134
- package/bundles/form-aurora-stefanini.umd.js.map +1 -1
- package/bundles/form-aurora-stefanini.umd.min.js +2 -2
- package/bundles/form-aurora-stefanini.umd.min.js.map +1 -1
- package/esm2015/lib/services/data.service.js +8 -19
- package/esm5/lib/services/data.service.js +8 -19
- package/fesm2015/form-aurora-stefanini.js +7 -133
- package/fesm2015/form-aurora-stefanini.js.map +1 -1
- package/fesm5/form-aurora-stefanini.js +7 -134
- package/fesm5/form-aurora-stefanini.js.map +1 -1
- package/package.json +1 -1
@@ -275,149 +275,22 @@
|
|
275
275
|
}
|
276
276
|
};
|
277
277
|
|
278
|
-
var Offusqued = /** @class */ (function () {
|
279
|
-
function Offusqued() {
|
280
|
-
this.dataMap = new Map();
|
281
|
-
this.dataMap.set('A', '2,');
|
282
|
-
this.dataMap.set('J', '29,');
|
283
|
-
this.dataMap.set('S', '67,');
|
284
|
-
this.dataMap.set('B', '3,');
|
285
|
-
this.dataMap.set('K', '31,');
|
286
|
-
this.dataMap.set('T', '71,');
|
287
|
-
this.dataMap.set('C', '5,');
|
288
|
-
this.dataMap.set('L', '37,');
|
289
|
-
this.dataMap.set('U', '73,');
|
290
|
-
this.dataMap.set('D', '7,');
|
291
|
-
this.dataMap.set('M', '41,');
|
292
|
-
this.dataMap.set('V', '79,');
|
293
|
-
this.dataMap.set('E', '11,');
|
294
|
-
this.dataMap.set('N', '43,');
|
295
|
-
this.dataMap.set('W', '83,');
|
296
|
-
this.dataMap.set('F', '13,');
|
297
|
-
this.dataMap.set('O', '47,');
|
298
|
-
this.dataMap.set('X', '89,');
|
299
|
-
this.dataMap.set('G', '17,');
|
300
|
-
this.dataMap.set('P', '53,');
|
301
|
-
this.dataMap.set('Y', '97,');
|
302
|
-
this.dataMap.set('H', '19,');
|
303
|
-
this.dataMap.set('Q', '59,');
|
304
|
-
this.dataMap.set('Z', '101,');
|
305
|
-
this.dataMap.set('I', '23,');
|
306
|
-
this.dataMap.set('R', '61,');
|
307
|
-
this.dataMap.set('a', '103,');
|
308
|
-
this.dataMap.set('j', '151,');
|
309
|
-
this.dataMap.set('s', '157,');
|
310
|
-
this.dataMap.set('b', '107,');
|
311
|
-
this.dataMap.set('k', '163,');
|
312
|
-
this.dataMap.set('t', '167,');
|
313
|
-
this.dataMap.set('c', '109,');
|
314
|
-
this.dataMap.set('l', '173,');
|
315
|
-
this.dataMap.set('u', '179,');
|
316
|
-
this.dataMap.set('d', '113,');
|
317
|
-
this.dataMap.set('m', '181,');
|
318
|
-
this.dataMap.set('v', '191,');
|
319
|
-
this.dataMap.set('e', '127,');
|
320
|
-
this.dataMap.set('n', '193,');
|
321
|
-
this.dataMap.set('w', '227,');
|
322
|
-
this.dataMap.set('f', '132,');
|
323
|
-
this.dataMap.set('o', '197,');
|
324
|
-
this.dataMap.set('x', '229,');
|
325
|
-
this.dataMap.set('g', '137,');
|
326
|
-
this.dataMap.set('p', '199,');
|
327
|
-
this.dataMap.set('y', '233,');
|
328
|
-
this.dataMap.set('h', '139,');
|
329
|
-
this.dataMap.set('q', '211,');
|
330
|
-
this.dataMap.set('z', '239,');
|
331
|
-
this.dataMap.set('i', '149,');
|
332
|
-
this.dataMap.set('r', '223,');
|
333
|
-
this.dataMap.set('0', 'Z,');
|
334
|
-
this.dataMap.set('1', 'Y,');
|
335
|
-
this.dataMap.set('2', 'X,');
|
336
|
-
this.dataMap.set('3', 'W,');
|
337
|
-
this.dataMap.set('4', 'V,');
|
338
|
-
this.dataMap.set('5', 'U,');
|
339
|
-
this.dataMap.set('6', 'T,');
|
340
|
-
this.dataMap.set('7', 'S,');
|
341
|
-
this.dataMap.set('8', 'R,');
|
342
|
-
this.dataMap.set('9', 'Q,');
|
343
|
-
this.dataMap.set(',', '&');
|
344
|
-
this.dataMap.set('{', '1000,');
|
345
|
-
this.dataMap.set('}', '0000,');
|
346
|
-
}
|
347
|
-
Offusqued.prototype.ofusquedData = function (data) {
|
348
|
-
var responce = '';
|
349
|
-
var ofusquedData = data.toString().split('');
|
350
|
-
// tslint:disable-next-line:prefer-for-of
|
351
|
-
for (var i = 0; i < ofusquedData.length; i++) {
|
352
|
-
var letter = ofusquedData[i].toString();
|
353
|
-
if (this.dataMap.has(letter)) {
|
354
|
-
responce += this.dataMap.get(letter).toString();
|
355
|
-
}
|
356
|
-
else {
|
357
|
-
responce += letter + ',';
|
358
|
-
}
|
359
|
-
}
|
360
|
-
return responce;
|
361
|
-
};
|
362
|
-
Offusqued.prototype.decodeOfusquedData = function (data) {
|
363
|
-
var respoce = '';
|
364
|
-
var arrayData = data.split(',');
|
365
|
-
// tslint:disable-next-line:prefer-for-of
|
366
|
-
for (var i = 0; i < arrayData.length; i++) {
|
367
|
-
respoce += this.readValueInMap(arrayData[i]);
|
368
|
-
}
|
369
|
-
// @ts-ignore
|
370
|
-
return respoce.replaceAll('&', ',').replaceAll(',1000', '{');
|
371
|
-
};
|
372
|
-
Offusqued.prototype.readValueInMap = function (data) {
|
373
|
-
var respoce = '';
|
374
|
-
var status = true;
|
375
|
-
this.dataMap.forEach(function (value, key) {
|
376
|
-
if (data + ',' === value) {
|
377
|
-
respoce = key;
|
378
|
-
status = false;
|
379
|
-
}
|
380
|
-
});
|
381
|
-
if (status) {
|
382
|
-
respoce = data;
|
383
|
-
}
|
384
|
-
return respoce;
|
385
|
-
};
|
386
|
-
Offusqued.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function Offusqued_Factory() { return new Offusqued(); }, token: Offusqued, providedIn: "root" });
|
387
|
-
Offusqued = __decorate([
|
388
|
-
core.Injectable({
|
389
|
-
providedIn: 'root',
|
390
|
-
})
|
391
|
-
], Offusqued);
|
392
|
-
return Offusqued;
|
393
|
-
}());
|
394
|
-
|
395
278
|
var CommonDataService = /** @class */ (function () {
|
396
279
|
function CommonDataService() {
|
397
280
|
}
|
398
281
|
CommonDataService_1 = CommonDataService;
|
399
282
|
CommonDataService.prototype.getData = function () {
|
400
|
-
|
401
|
-
|
402
|
-
if (localStorage.getItem('data') != null) {
|
403
|
-
if (localStorage.getItem('data').length < 10) {
|
404
|
-
data = new Map(JSON.parse(localStorage.getItem('data')));
|
405
|
-
}
|
406
|
-
else {
|
407
|
-
var info = localStorage.getItem('data');
|
408
|
-
info = offusqued.decodeOfusquedData(info);
|
409
|
-
console.log(JSON.stringify(info));
|
410
|
-
data = new Map(JSON.parse(info));
|
411
|
-
}
|
283
|
+
if ((localStorage.getItem('data') != null) && (localStorage.getItem('data').length > 10)) {
|
284
|
+
var data = new Map(JSON.parse(localStorage.getItem("data")));
|
412
285
|
return data;
|
413
286
|
}
|
287
|
+
else {
|
288
|
+
/** Error get cookie */
|
289
|
+
}
|
414
290
|
};
|
415
291
|
CommonDataService.prototype.setData = function (data) {
|
416
|
-
|
417
|
-
|
418
|
-
var offusqued = new Offusqued();
|
419
|
-
var info = localStorage.getItem('data').toString();
|
420
|
-
localStorage.setItem('data', offusqued.ofusquedData(info));
|
292
|
+
if (data.length > 10) {
|
293
|
+
localStorage.setItem('data', JSON.stringify(Array.from(data.entries())));
|
421
294
|
}
|
422
295
|
};
|
423
296
|
CommonDataService.prototype.initData = function () {
|