@fluxhub/fluxhub-lib 1.0.290 → 1.0.292
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/fluxhub-fluxhub-lib.umd.js +40 -54
- package/bundles/fluxhub-fluxhub-lib.umd.js.map +1 -1
- package/bundles/fluxhub-fluxhub-lib.umd.min.js +1 -1
- package/bundles/fluxhub-fluxhub-lib.umd.min.js.map +1 -1
- package/docs/coverage.html +1 -1
- package/docs/injectables/LocalDBService.html +1 -64
- package/docs/js/search/search_index.js +2 -2
- package/esm2015/lib/services/localstorage.service.js +34 -65
- package/esm2015/lib/wkf_engine/wkfapp.js +2 -2
- package/esm2015/lib/wkf_engine/wkfdatiaggiuntivi.js +7 -4
- package/esm5/lib/services/localstorage.service.js +34 -66
- package/esm5/lib/wkf_engine/wkfapp.js +2 -2
- package/esm5/lib/wkf_engine/wkfdatiaggiuntivi.js +5 -2
- package/fesm2015/fluxhub-fluxhub-lib.js +39 -55
- package/fesm2015/fluxhub-fluxhub-lib.js.map +1 -1
- package/fesm5/fluxhub-fluxhub-lib.js +38 -55
- package/fesm5/fluxhub-fluxhub-lib.js.map +1 -1
- package/fluxhub-fluxhub-lib.metadata.json +1 -1
- package/lib/services/localstorage.service.d.ts +1 -5
- package/package.json +1 -2
|
@@ -26,14 +26,14 @@ import { MyDatePickerModule } from 'mydatepicker';
|
|
|
26
26
|
import { AgmCoreModule } from '@agm/core';
|
|
27
27
|
import 'ag-grid-enterprise';
|
|
28
28
|
import { CdkTableModule } from '@angular/cdk/table';
|
|
29
|
-
import {
|
|
29
|
+
import { NgForage } from 'ngforage';
|
|
30
30
|
import { TranslateModule } from '@ngx-translate/core';
|
|
31
31
|
import { DragulaService, DragulaModule } from 'ng2-dragula';
|
|
32
32
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
33
33
|
import { NgControl, NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
|
34
34
|
import { MatDialogRef, MatDialog, DateAdapter, MAT_DATE_LOCALE, MatAutocompleteModule, MatButtonModule, MatButtonToggleModule, MatPaginatorModule, MatCardModule, MatCheckboxModule, MatChipsModule, MatDatepickerModule, MatGridListModule, MatIconModule, MatInputModule, MatListModule, MatMenuModule, MatProgressBarModule, MatProgressSpinnerModule, MatRadioModule, MatSelectModule, MatSidenavModule, MatSliderModule, MatSortModule, MatSlideToggleModule, MatSnackBarModule, MatTableModule, MatTabsModule, MatToolbarModule, MatTooltipModule, MatFormFieldModule, MatExpansionModule, MatStepperModule, MatDialogModule, MatNativeDateModule } from '@angular/material';
|
|
35
35
|
import { ActivatedRoute, Router } from '@angular/router';
|
|
36
|
-
import { Injectable, Component, Directive,
|
|
36
|
+
import { Injectable, Component, Directive, Pipe, Input, Output, EventEmitter, forwardRef, ViewChild, Inject, PLATFORM_ID, ElementRef, Optional, HostListener, ViewContainerRef, defineInjectable, inject, NgModule } from '@angular/core';
|
|
37
37
|
import { Http } from '@angular/http';
|
|
38
38
|
import { SlimLoadingBarService } from 'ng2-slim-loading-bar';
|
|
39
39
|
import { ToastrService } from 'ngx-toastr';
|
|
@@ -5656,7 +5656,7 @@ class wkfapp {
|
|
|
5656
5656
|
if (this.livs[i].idp != null)
|
|
5657
5657
|
if (this.user_idp != null)
|
|
5658
5658
|
if ((this.livs[i].idp.toUpperCase() == this.user_idp.toUpperCase() || this.livs[i].gruppo_parallelo == "*ALLUSERS"))
|
|
5659
|
-
if (this.livs[i].livello
|
|
5659
|
+
if (this.livs[i].livello <= 10 && this.livs[i].notifica == 0) {
|
|
5660
5660
|
this.is_Ins = true;
|
|
5661
5661
|
if (this.livs[i].gruppo_parallelo == "*ALLUSERS") {
|
|
5662
5662
|
this.livs[i].gruppo_parallelo = "";
|
|
@@ -12649,18 +12649,12 @@ FSResult.decorators = [
|
|
|
12649
12649
|
*/
|
|
12650
12650
|
class LocalDBService {
|
|
12651
12651
|
/**
|
|
12652
|
-
* @param {?} ngf
|
|
12653
|
-
* @param {?} cache
|
|
12654
12652
|
* @param {?} uti
|
|
12655
12653
|
* @param {?} app
|
|
12656
12654
|
*/
|
|
12657
|
-
constructor(
|
|
12658
|
-
this.ngf = ngf;
|
|
12659
|
-
this.cache = cache;
|
|
12655
|
+
constructor(uti, app) {
|
|
12660
12656
|
this.uti = uti;
|
|
12661
12657
|
this.app = app;
|
|
12662
|
-
this.ngf.name = 'Fluxhub_' + this.app.COMPANY_KEY;
|
|
12663
|
-
this.ngf.driver = [Driver.INDEXED_DB, Driver.LOCAL_STORAGE];
|
|
12664
12658
|
}
|
|
12665
12659
|
/**
|
|
12666
12660
|
* @template T
|
|
@@ -12670,38 +12664,37 @@ class LocalDBService {
|
|
|
12670
12664
|
* @return {?}
|
|
12671
12665
|
*/
|
|
12672
12666
|
read(key, crypt = true, json_format = true) {
|
|
12673
|
-
return
|
|
12674
|
-
|
|
12675
|
-
* @param {?} r
|
|
12667
|
+
return new Promise((/**
|
|
12668
|
+
* @param {?} resolve
|
|
12676
12669
|
* @return {?}
|
|
12677
12670
|
*/
|
|
12678
|
-
(
|
|
12679
|
-
if (
|
|
12680
|
-
|
|
12671
|
+
(resolve) => {
|
|
12672
|
+
if (localStorage.getItem(key) == null) {
|
|
12673
|
+
resolve(null);
|
|
12674
|
+
return;
|
|
12681
12675
|
}
|
|
12682
12676
|
if (crypt) {
|
|
12683
|
-
if (json_format)
|
|
12684
|
-
|
|
12685
|
-
|
|
12686
|
-
|
|
12677
|
+
if (json_format) {
|
|
12678
|
+
resolve(JSON.parse(this.uti.decrypt_v2(localStorage.getItem(key))));
|
|
12679
|
+
return;
|
|
12680
|
+
}
|
|
12681
|
+
else {
|
|
12682
|
+
resolve(this.uti.decrypt_v2(localStorage.getItem(key)));
|
|
12683
|
+
return;
|
|
12684
|
+
}
|
|
12687
12685
|
}
|
|
12688
12686
|
else {
|
|
12689
|
-
if (json_format)
|
|
12690
|
-
|
|
12691
|
-
|
|
12692
|
-
|
|
12687
|
+
if (json_format) {
|
|
12688
|
+
resolve(JSON.parse('' + localStorage.getItem(key)));
|
|
12689
|
+
return;
|
|
12690
|
+
}
|
|
12691
|
+
else {
|
|
12692
|
+
resolve((localStorage.getItem(key)));
|
|
12693
|
+
return;
|
|
12694
|
+
}
|
|
12693
12695
|
}
|
|
12694
|
-
|
|
12695
|
-
|
|
12696
|
-
/**
|
|
12697
|
-
* @return {?}
|
|
12698
|
-
*/
|
|
12699
|
-
list_keys() {
|
|
12700
|
-
this.ngf.keys().then((/**
|
|
12701
|
-
* @param {?} arr
|
|
12702
|
-
* @return {?}
|
|
12703
|
-
*/
|
|
12704
|
-
(arr) => {
|
|
12696
|
+
resolve(null);
|
|
12697
|
+
return;
|
|
12705
12698
|
}));
|
|
12706
12699
|
}
|
|
12707
12700
|
/**
|
|
@@ -12714,25 +12707,15 @@ class LocalDBService {
|
|
|
12714
12707
|
write(k, obj, crypt = true, json_format = true) {
|
|
12715
12708
|
if (crypt) {
|
|
12716
12709
|
if (json_format)
|
|
12717
|
-
|
|
12718
|
-
* @param {?} dt
|
|
12719
|
-
* @return {?}
|
|
12720
|
-
*/
|
|
12721
|
-
(dt) => {
|
|
12722
|
-
}));
|
|
12710
|
+
localStorage.setItem(k, this.uti.encrypt_v2((JSON.stringify(obj))));
|
|
12723
12711
|
else
|
|
12724
|
-
|
|
12725
|
-
* @param {?} dt
|
|
12726
|
-
* @return {?}
|
|
12727
|
-
*/
|
|
12728
|
-
(dt) => {
|
|
12729
|
-
}));
|
|
12712
|
+
localStorage.setItem(k, this.uti.encrypt_v2((obj)));
|
|
12730
12713
|
}
|
|
12731
12714
|
else {
|
|
12732
12715
|
if (json_format)
|
|
12733
|
-
|
|
12716
|
+
localStorage.setItem(k, (JSON.stringify(obj)));
|
|
12734
12717
|
else
|
|
12735
|
-
|
|
12718
|
+
localStorage.setItem(k, (obj));
|
|
12736
12719
|
}
|
|
12737
12720
|
}
|
|
12738
12721
|
/**
|
|
@@ -12740,7 +12723,7 @@ class LocalDBService {
|
|
|
12740
12723
|
* @return {?}
|
|
12741
12724
|
*/
|
|
12742
12725
|
delete(k) {
|
|
12743
|
-
|
|
12726
|
+
localStorage.removeItem(k);
|
|
12744
12727
|
}
|
|
12745
12728
|
}
|
|
12746
12729
|
LocalDBService.decorators = [
|
|
@@ -12750,12 +12733,10 @@ LocalDBService.decorators = [
|
|
|
12750
12733
|
];
|
|
12751
12734
|
/** @nocollapse */
|
|
12752
12735
|
LocalDBService.ctorParameters = () => [
|
|
12753
|
-
{ type: NgForage },
|
|
12754
|
-
{ type: NgForageCache },
|
|
12755
12736
|
{ type: UtilityService },
|
|
12756
12737
|
{ type: AppService }
|
|
12757
12738
|
];
|
|
12758
|
-
/** @nocollapse */ LocalDBService.ngInjectableDef = defineInjectable({ factory: function LocalDBService_Factory() { return new LocalDBService(inject(
|
|
12739
|
+
/** @nocollapse */ LocalDBService.ngInjectableDef = defineInjectable({ factory: function LocalDBService_Factory() { return new LocalDBService(inject(UtilityService), inject(AppService)); }, token: LocalDBService, providedIn: "root" });
|
|
12759
12740
|
|
|
12760
12741
|
/**
|
|
12761
12742
|
* @fileoverview added by tsickle
|
|
@@ -14437,9 +14418,9 @@ class dati_aggiuntivi {
|
|
|
14437
14418
|
console.log('liv: ' + liv);
|
|
14438
14419
|
for (let i = 0; i < this.livs.length; i++)
|
|
14439
14420
|
if (liv == 0 || (liv < this.livs[i].livello && cliv > this.livs[i].livello)) {
|
|
14440
|
-
console.log('calcolo next ', this.nlevel);
|
|
14441
14421
|
this.nlevel = this.livs[i];
|
|
14442
14422
|
cliv = this.livs[i].livello;
|
|
14423
|
+
console.log('calcolo next ', this.nlevel);
|
|
14443
14424
|
}
|
|
14444
14425
|
liv = this.wkf_rule(cliv);
|
|
14445
14426
|
/** @type {?} */
|
|
@@ -14487,15 +14468,18 @@ class dati_aggiuntivi {
|
|
|
14487
14468
|
return;
|
|
14488
14469
|
}
|
|
14489
14470
|
/** @type {?} */
|
|
14490
|
-
|
|
14471
|
+
let arrAutori = new Array();
|
|
14491
14472
|
if (this.clevel.gruppo_parallelo == "") {
|
|
14473
|
+
console.log('senza gp ', this.clevel.gruppo_parallelo + " " + this.nlevel.livello);
|
|
14492
14474
|
for (var i = 0; i < this.livs.length; i++)
|
|
14493
14475
|
if (this.livs[i].livello == this.nlevel.livello && this.livs[i].notifica == 0)
|
|
14494
14476
|
arrAutori.push(this.livs[i]);
|
|
14477
|
+
console.log('arrAutori ', arrAutori);
|
|
14495
14478
|
}
|
|
14496
14479
|
else {
|
|
14497
14480
|
/** @type {?} */
|
|
14498
14481
|
var b_canale = false;
|
|
14482
|
+
console.log('con gp ', this.clevel.gruppo_parallelo);
|
|
14499
14483
|
for (var i = 0; i < this.livs.length; i++)
|
|
14500
14484
|
if (this.livs[i].livello == this.nlevel.livello && this.livs[i].gruppo_parallelo != "")
|
|
14501
14485
|
b_canale = true;
|