@fluxhub/fluxhub-lib 1.0.197 → 1.0.199
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 +72 -42
- 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/components/FHAutoCompleteComponent.html +2 -2
- package/esm2015/lib/auth_guard.js +70 -42
- package/esm2015/lib/controls/fhautocomplete.js +4 -2
- package/esm2015/lib/wkf_engine/win_log.js +2 -2
- package/esm5/lib/auth_guard.js +70 -42
- package/esm5/lib/controls/fhautocomplete.js +4 -2
- package/esm5/lib/wkf_engine/win_log.js +1 -1
- package/fesm2015/fluxhub-fluxhub-lib.js +74 -44
- package/fesm2015/fluxhub-fluxhub-lib.js.map +1 -1
- package/fesm5/fluxhub-fluxhub-lib.js +73 -43
- package/fesm5/fluxhub-fluxhub-lib.js.map +1 -1
- package/fluxhub-fluxhub-lib.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -33,7 +33,7 @@ import { TranslateModule } from '@ngx-translate/core';
|
|
|
33
33
|
import { DragulaService, DragulaModule } from 'ng2-dragula';
|
|
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, Input, Output, EventEmitter,
|
|
36
|
+
import { Injectable, Component, Input, Output, EventEmitter, forwardRef, Directive, ViewChild, Inject, PLATFORM_ID, ElementRef, Pipe, ViewContainerRef, defineInjectable, inject, NgModule, HostListener } 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';
|
|
@@ -7455,6 +7455,7 @@ var FHAutoCompleteComponent = /** @class */ (function (_super) {
|
|
|
7455
7455
|
* @return {?}
|
|
7456
7456
|
*/
|
|
7457
7457
|
function (event) {
|
|
7458
|
+
console.log('selectedSearchItem ', event);
|
|
7458
7459
|
this.setByDescri(event.option.value);
|
|
7459
7460
|
this.sItem = event.option.value;
|
|
7460
7461
|
this.ch(event);
|
|
@@ -7468,6 +7469,7 @@ var FHAutoCompleteComponent = /** @class */ (function (_super) {
|
|
|
7468
7469
|
* @return {?}
|
|
7469
7470
|
*/
|
|
7470
7471
|
function ($event) {
|
|
7472
|
+
console.log('ch ', $event);
|
|
7471
7473
|
/** @type {?} */
|
|
7472
7474
|
var value = this.getValue();
|
|
7473
7475
|
this
|
|
@@ -7838,7 +7840,7 @@ var FHAutoCompleteComponent = /** @class */ (function (_super) {
|
|
|
7838
7840
|
FHAutoCompleteComponent.decorators = [
|
|
7839
7841
|
{ type: Component, args: [{
|
|
7840
7842
|
selector: 'FHAutoComplete',
|
|
7841
|
-
template: "\n <mat-form-field class=\"field_style\" [hidden]=\"!enabled || hidden\">\n <input matInput\n class=\"field_style\" [disabled]=\"!enabled || hidden\" [matAutocomplete]=\"auto\" [placeholder]=\"label\" [required]=\"required\"\n (keyup)=\"onChange($event)\" [(ngModel)]=\"sItem\" (focus)=\"fi_search()\" (focusout)=\"fo_search()\"\n (
|
|
7843
|
+
template: "\n <mat-form-field class=\"field_style\" [hidden]=\"!enabled || hidden\">\n <input matInput\n class=\"field_style\" [disabled]=\"!enabled || hidden\" [matAutocomplete]=\"auto\" [placeholder]=\"label\" [required]=\"required\"\n (keyup)=\"onChange($event)\" [(ngModel)]=\"sItem\" (focus)=\"fi_search()\" (focusout)=\"fo_search()\"\n (ngModelChange)=\"ch($event)\" #searchp>\n </mat-form-field>\n <mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)=\"selectedSearchItem($event)\">\n <mat-option *ngFor=\"let objx of searchItemsFiltered\" class=\"search_home\" [value]=\"objx.descrizione_valore\">\n {{ objx.descrizione_valore }}\n </mat-option>\n </mat-autocomplete>\n\n\n <div class=\"ui negative message\" *ngIf=\"errorMsg != ''\">\n <i class=\"close icon\"></i>\n <div class=\"header\">\n {{errorMsg}}\n </div>\n </div>\n <mat-form-field [hidden]=\"enabled || hidden\">\n <input type=\"text\" #el1 matInput [disabled]=\"true\" placeholder=\"{{label}}\" [(ngModel)]=\"sItem\"\n >\n </mat-form-field>\n ",
|
|
7842
7844
|
providers: [
|
|
7843
7845
|
{ provide: NG_VALUE_ACCESSOR, useExisting: FHAutoCompleteComponent, multi: true },
|
|
7844
7846
|
],
|
|
@@ -15976,52 +15978,80 @@ var FHGuard = /** @class */ (function () {
|
|
|
15976
15978
|
p.sql = "SELECT_USER_ACCESS_AUTH";
|
|
15977
15979
|
p.values = [];
|
|
15978
15980
|
p.types = [];
|
|
15979
|
-
_this.
|
|
15980
|
-
|
|
15981
|
-
if (data
|
|
15982
|
-
if (data.
|
|
15983
|
-
|
|
15984
|
-
|
|
15985
|
-
|
|
15986
|
-
_this.appService.user_roles
|
|
15987
|
-
|
|
15988
|
-
|
|
15989
|
-
|
|
15990
|
-
if (_this.app_s.user_isadmin
|
|
15991
|
-
|
|
15992
|
-
|
|
15993
|
-
|
|
15994
|
-
|
|
15995
|
-
|
|
15996
|
-
|
|
15997
|
-
|
|
15998
|
-
|
|
15999
|
-
|
|
16000
|
-
|
|
16001
|
-
|
|
16002
|
-
|
|
16003
|
-
|
|
16004
|
-
|
|
16005
|
-
|
|
16006
|
-
|
|
16007
|
-
|
|
16008
|
-
|
|
15981
|
+
if (_this.appService.user == null) {
|
|
15982
|
+
_this.querys.doQuery(p).subscribe(function (data) {
|
|
15983
|
+
if (data != null)
|
|
15984
|
+
if (data.result_msg == "OK")
|
|
15985
|
+
if (data.result_data.length > 0) {
|
|
15986
|
+
console.log('canActivate 6');
|
|
15987
|
+
_this.appService.user_roles = data.result_data[0].roles;
|
|
15988
|
+
if (_this.appService.user_roles.length > 0)
|
|
15989
|
+
_this.appService.user_roles = _this.appService.user_roles.substr(1);
|
|
15990
|
+
_this.appService.user_isadmin = data.result_data[0].isadmin;
|
|
15991
|
+
_this.appService.user = data.result_data[0].username;
|
|
15992
|
+
if (_this.app_s.user_isadmin != null)
|
|
15993
|
+
if (_this.app_s.user_isadmin == "1")
|
|
15994
|
+
return true;
|
|
15995
|
+
/** @type {?} */
|
|
15996
|
+
var p_1 = new QParam();
|
|
15997
|
+
p_1.sql = "SELECT_APPS_USER_ALL";
|
|
15998
|
+
_this.appService.getState().app_enabled = new Array();
|
|
15999
|
+
p_1.types = ['string'];
|
|
16000
|
+
p_1.values = [_this.appService.user];
|
|
16001
|
+
console.log('canActivate 8');
|
|
16002
|
+
_this.querys.doQuery(p_1).subscribe(function (data) {
|
|
16003
|
+
console.log('canActivate 9');
|
|
16004
|
+
_this.arr_accessi = data.result_data;
|
|
16005
|
+
for (var i = 0; i < _this.arr_accessi.length; i++) {
|
|
16006
|
+
console.log('[' + _this.arr_accessi[i].url.split('/')[0] + ']', '-----', '[' + _this.routingDestination.split('/')[0] + ']');
|
|
16007
|
+
if (_this.arr_accessi[i].type == 'M') {
|
|
16008
|
+
if ('[' + _this.arr_accessi[i].url.split('/')[0] + ']' == '[' + _this.routingDestination.split('/')[0] + ']') {
|
|
16009
|
+
resolve(true);
|
|
16010
|
+
return;
|
|
16011
|
+
}
|
|
16009
16012
|
}
|
|
16010
16013
|
}
|
|
16011
|
-
|
|
16012
|
-
|
|
16013
|
-
|
|
16014
|
-
|
|
16014
|
+
console.log('canActivate 11');
|
|
16015
|
+
_this.toast.error("ACCESS DENIED [0X0001]");
|
|
16016
|
+
resolve(false);
|
|
16017
|
+
_this.slimLoadingBarService.complete();
|
|
16018
|
+
return;
|
|
16019
|
+
});
|
|
16020
|
+
}
|
|
16021
|
+
else {
|
|
16022
|
+
_this.toast.error("ACCESS DENIED [0X0002]");
|
|
16015
16023
|
_this.slimLoadingBarService.complete();
|
|
16024
|
+
return false;
|
|
16025
|
+
}
|
|
16026
|
+
});
|
|
16027
|
+
}
|
|
16028
|
+
else {
|
|
16029
|
+
/** @type {?} */
|
|
16030
|
+
var p_2 = new QParam();
|
|
16031
|
+
p_2.sql = "SELECT_APPS_USER_ALL";
|
|
16032
|
+
_this.appService.getState().app_enabled = new Array();
|
|
16033
|
+
p_2.types = ['string'];
|
|
16034
|
+
p_2.values = [_this.appService.user];
|
|
16035
|
+
console.log('canActivate 8');
|
|
16036
|
+
_this.querys.doQuery(p_2).subscribe(function (data) {
|
|
16037
|
+
console.log('canActivate 9');
|
|
16038
|
+
_this.arr_accessi = data.result_data;
|
|
16039
|
+
for (var i = 0; i < _this.arr_accessi.length; i++) {
|
|
16040
|
+
console.log('[' + _this.arr_accessi[i].url.split('/')[0] + ']', '-----', '[' + _this.routingDestination.split('/')[0] + ']');
|
|
16041
|
+
if (_this.arr_accessi[i].type == 'M') {
|
|
16042
|
+
if ('[' + _this.arr_accessi[i].url.split('/')[0] + ']' == '[' + _this.routingDestination.split('/')[0] + ']') {
|
|
16043
|
+
resolve(true);
|
|
16016
16044
|
return;
|
|
16017
|
-
}
|
|
16018
|
-
}
|
|
16019
|
-
else {
|
|
16020
|
-
_this.toast.error("ACCESS DENIED [0X0002]");
|
|
16021
|
-
_this.slimLoadingBarService.complete();
|
|
16022
|
-
return false;
|
|
16045
|
+
}
|
|
16023
16046
|
}
|
|
16024
|
-
|
|
16047
|
+
}
|
|
16048
|
+
console.log('canActivate 11');
|
|
16049
|
+
_this.toast.error("ACCESS DENIED [0X0001]");
|
|
16050
|
+
resolve(false);
|
|
16051
|
+
_this.slimLoadingBarService.complete();
|
|
16052
|
+
return;
|
|
16053
|
+
});
|
|
16054
|
+
}
|
|
16025
16055
|
});
|
|
16026
16056
|
console.log('canActivate 12');
|
|
16027
16057
|
}
|