@fluxhub/fluxhub-lib 1.0.195 → 1.0.197
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 -38
- 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/FHCurrencyFieldComponent.html +60 -2
- package/docs/coverage.html +1 -1
- package/docs/js/search/search_index.js +2 -2
- package/esm2015/lib/auth_guard.js +58 -30
- package/esm2015/lib/controls/fhautocomplete.js +1 -2
- package/esm2015/lib/controls/fhcurrencyfield.js +12 -2
- package/esm2015/lib/controls/fhlist.js +1 -4
- package/esm2015/lib/form_builder/form_builder.js +1 -4
- package/esm2015/lib/services/utility.service.js +1 -2
- package/esm5/lib/auth_guard.js +57 -29
- package/esm5/lib/controls/fhautocomplete.js +1 -2
- package/esm5/lib/controls/fhcurrencyfield.js +15 -2
- package/esm5/lib/controls/fhlist.js +1 -4
- package/esm5/lib/form_builder/form_builder.js +1 -4
- package/esm5/lib/services/utility.service.js +1 -2
- package/fesm2015/fluxhub-fluxhub-lib.js +68 -37
- package/fesm2015/fluxhub-fluxhub-lib.js.map +1 -1
- package/fesm5/fluxhub-fluxhub-lib.js +70 -36
- package/fesm5/fluxhub-fluxhub-lib.js.map +1 -1
- package/fluxhub-fluxhub-lib.metadata.json +1 -1
- package/lib/controls/fhcurrencyfield.d.ts +2 -0
- package/package.json +1 -1
|
@@ -15,6 +15,7 @@ import 'ng2-ckeditor/lib/src/ckeditor.component';
|
|
|
15
15
|
import { __read, __extends } from 'tslib';
|
|
16
16
|
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
|
17
17
|
import NavigatedViewer from 'bpmn-js/lib/NavigatedViewer';
|
|
18
|
+
import { Observable } from 'rxjs';
|
|
18
19
|
import { catchError, map, flatMap } from 'rxjs/operators';
|
|
19
20
|
import { FlexLayoutModule } from '@angular/flex-layout';
|
|
20
21
|
import { MarkdownModule } from 'ngx-markdown';
|
|
@@ -32,11 +33,10 @@ import { TranslateModule } from '@ngx-translate/core';
|
|
|
32
33
|
import { DragulaService, DragulaModule } from 'ng2-dragula';
|
|
33
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';
|
|
34
35
|
import { ActivatedRoute, Router } from '@angular/router';
|
|
35
|
-
import { Injectable, Component, Input,
|
|
36
|
+
import { Injectable, Component, Input, Output, EventEmitter, Directive, forwardRef, ViewChild, Inject, PLATFORM_ID, ElementRef, Pipe, ViewContainerRef, defineInjectable, NgModule, inject, HostListener } from '@angular/core';
|
|
36
37
|
import { Http } from '@angular/http';
|
|
37
38
|
import { SlimLoadingBarService } from 'ng2-slim-loading-bar';
|
|
38
39
|
import { ToastrService } from 'ngx-toastr';
|
|
39
|
-
import { Observable, of } from 'rxjs';
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
42
|
* @fileoverview added by tsickle
|
|
@@ -1314,7 +1314,6 @@ var UtilityService = /** @class */ (function () {
|
|
|
1314
1314
|
*/
|
|
1315
1315
|
function (s, b_check_admin) {
|
|
1316
1316
|
if (b_check_admin === void 0) { b_check_admin = true; }
|
|
1317
|
-
console.log('check role ', this.app_s);
|
|
1318
1317
|
if (this.app_s.user_roles === null)
|
|
1319
1318
|
return false;
|
|
1320
1319
|
if (b_check_admin)
|
|
@@ -2730,15 +2729,12 @@ var FHListComponent = /** @class */ (function () {
|
|
|
2730
2729
|
function () {
|
|
2731
2730
|
/** @type {?} */
|
|
2732
2731
|
var sx = "";
|
|
2733
|
-
for (var j = 0; j < this.myData.length; j++)
|
|
2734
|
-
console.log(this.myData[j].checked);
|
|
2735
2732
|
for (var j = 0; j < this.myData.length; j++)
|
|
2736
2733
|
if (this.myData[j].checked) {
|
|
2737
2734
|
if (sx != '')
|
|
2738
2735
|
sx = sx + ',';
|
|
2739
2736
|
sx = sx + this.myData[j].descrizione_valore;
|
|
2740
2737
|
}
|
|
2741
|
-
console.log('getDescri: ' + sx);
|
|
2742
2738
|
return sx;
|
|
2743
2739
|
};
|
|
2744
2740
|
/**
|
|
@@ -7462,7 +7458,6 @@ var FHAutoCompleteComponent = /** @class */ (function (_super) {
|
|
|
7462
7458
|
this.setByDescri(event.option.value);
|
|
7463
7459
|
this.sItem = event.option.value;
|
|
7464
7460
|
this.ch(event);
|
|
7465
|
-
console.log('selectedSearchItem ', this.sItem);
|
|
7466
7461
|
};
|
|
7467
7462
|
/**
|
|
7468
7463
|
* @param {?} $event
|
|
@@ -9582,6 +9577,7 @@ var FHCurrencyFieldComponent = /** @class */ (function () {
|
|
|
9582
9577
|
this.required = false;
|
|
9583
9578
|
this.enabled = true;
|
|
9584
9579
|
this.hidden = false;
|
|
9580
|
+
this.color = '';
|
|
9585
9581
|
this.m_color = '';
|
|
9586
9582
|
this.label_width = "";
|
|
9587
9583
|
this.change = new EventEmitter();
|
|
@@ -9602,6 +9598,15 @@ var FHCurrencyFieldComponent = /** @class */ (function () {
|
|
|
9602
9598
|
function () {
|
|
9603
9599
|
return this.m_color;
|
|
9604
9600
|
};
|
|
9601
|
+
/**
|
|
9602
|
+
* @return {?}
|
|
9603
|
+
*/
|
|
9604
|
+
FHCurrencyFieldComponent.prototype.getStyle_color = /**
|
|
9605
|
+
* @return {?}
|
|
9606
|
+
*/
|
|
9607
|
+
function () {
|
|
9608
|
+
return this.m_color;
|
|
9609
|
+
};
|
|
9605
9610
|
/**
|
|
9606
9611
|
* @return {?}
|
|
9607
9612
|
*/
|
|
@@ -9766,7 +9771,7 @@ var FHCurrencyFieldComponent = /** @class */ (function () {
|
|
|
9766
9771
|
{ type: Component, args: [{
|
|
9767
9772
|
selector: 'FHCurrencyField',
|
|
9768
9773
|
providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR],
|
|
9769
|
-
template: "\n <mat-form-field [hidden]=\"!enabled || hidden\">\n <input type=\"text\" style=\"text-align:right\" [style.background-color]=\"getStyle()\" #el matInput\n [disabled]=\"!enabled\" placeholder=\"{{label}}\" [(ngModel)]=\"formattedAmount\"\n (blur)=\"transformAmount($event)\"\n (focus)=\"removeCurrencyPipeFormat($event)\" (keyup)=\"chg()\"\n pattern=\"[0-9]+\">\n </mat-form-field>\n <mat-form-field [hidden]=\"enabled || hidden\">\n <input type=\"text\" style=\"text-align:right\" [style.background-color]=\"getStyle()\" #el1 matInput [disabled]=\"true\"\n placeholder=\"{{label}}\" [(ngModel)]=\"formattedAmount\"\n >\n </mat-form-field>\n ",
|
|
9774
|
+
template: "\n <mat-form-field [hidden]=\"!enabled || hidden\">\n <input type=\"text\" style=\"text-align:right\" [style.background-color]=\"getStyle()\" #el matInput\n [disabled]=\"!enabled\" placeholder=\"{{label}}\" [(ngModel)]=\"formattedAmount\"\n (blur)=\"transformAmount($event)\" [style.color]=\"getStyle_color()\"\n (focus)=\"removeCurrencyPipeFormat($event)\" (keyup)=\"chg()\"\n pattern=\"[0-9]+\">\n </mat-form-field>\n <mat-form-field [hidden]=\"enabled || hidden\">\n <input type=\"text\" style=\"text-align:right\" [style.background-color]=\"getStyle()\" #el1 matInput [disabled]=\"true\"\n placeholder=\"{{label}}\" [(ngModel)]=\"formattedAmount\"\n >\n </mat-form-field>\n ",
|
|
9770
9775
|
styles: ["\n\n "]
|
|
9771
9776
|
}] }
|
|
9772
9777
|
];
|
|
@@ -9779,6 +9784,7 @@ var FHCurrencyFieldComponent = /** @class */ (function () {
|
|
|
9779
9784
|
required: [{ type: Input }],
|
|
9780
9785
|
enabled: [{ type: Input }],
|
|
9781
9786
|
hidden: [{ type: Input }],
|
|
9787
|
+
color: [{ type: Input }],
|
|
9782
9788
|
label_width: [{ type: Input }],
|
|
9783
9789
|
change: [{ type: Output }],
|
|
9784
9790
|
value: [{ type: Input }]
|
|
@@ -15593,7 +15599,6 @@ var FormBuilderComponent = /** @class */ (function () {
|
|
|
15593
15599
|
* @return {?}
|
|
15594
15600
|
*/
|
|
15595
15601
|
function (o) {
|
|
15596
|
-
console.log(o);
|
|
15597
15602
|
if (o == 1)
|
|
15598
15603
|
this.items.push({ type: 'text_field', label: 'Label', default_value: '', uiid: this.fhutility.newGuid(), selected: false, required: false });
|
|
15599
15604
|
if (o == 2)
|
|
@@ -15697,14 +15702,12 @@ var FormBuilderComponent = /** @class */ (function () {
|
|
|
15697
15702
|
}
|
|
15698
15703
|
this.dragula
|
|
15699
15704
|
.drag.call(function (value) {
|
|
15700
|
-
console.log("Dragging the " + value[1].innerText + "!");
|
|
15701
15705
|
_this.change.emit();
|
|
15702
15706
|
_this.edit_obj = null;
|
|
15703
15707
|
});
|
|
15704
15708
|
this.dragula
|
|
15705
15709
|
.drop
|
|
15706
15710
|
.call(function (value) {
|
|
15707
|
-
console.log("Dropped the " + value[1].innerText + "!");
|
|
15708
15711
|
_this.change.emit();
|
|
15709
15712
|
_this.edit_obj = null;
|
|
15710
15713
|
});
|
|
@@ -15946,53 +15949,84 @@ var FHGuard = /** @class */ (function () {
|
|
|
15946
15949
|
if (this.auth.checkCredentials()) {
|
|
15947
15950
|
if (this.routingDestination == 'home')
|
|
15948
15951
|
return true;
|
|
15949
|
-
|
|
15950
|
-
|
|
15952
|
+
console.log('canActivate 1');
|
|
15953
|
+
if (this.app_s.user_isadmin != null)
|
|
15954
|
+
if (this.app_s.user_isadmin == "1")
|
|
15951
15955
|
return true;
|
|
15952
15956
|
return new Promise(function (resolve) {
|
|
15957
|
+
console.log('canActivate 2');
|
|
15953
15958
|
if (_this.arr_accessi != null) {
|
|
15959
|
+
console.log('canActivate 3');
|
|
15954
15960
|
for (var i = 0; i < _this.arr_accessi.length; i++) {
|
|
15955
15961
|
if (_this.arr_accessi[i].type == 'M')
|
|
15956
15962
|
if ('[' + _this.arr_accessi[i].url.split('/')[0] + ']' == '[' + _this.routingDestination.split('/')[0] + ']') {
|
|
15957
|
-
console.log(typeof (of(true)));
|
|
15958
|
-
console.log('OBS3 ' + true);
|
|
15959
15963
|
resolve(true);
|
|
15960
15964
|
return;
|
|
15961
15965
|
}
|
|
15962
15966
|
}
|
|
15963
|
-
|
|
15967
|
+
console.log('canActivate 4');
|
|
15968
|
+
_this.toast.error("ACCESS DENIED [0X0003]");
|
|
15964
15969
|
_this.slimLoadingBarService.complete();
|
|
15965
15970
|
resolve(false);
|
|
15966
15971
|
return;
|
|
15967
15972
|
}
|
|
15973
|
+
console.log('canActivate 5');
|
|
15968
15974
|
/** @type {?} */
|
|
15969
15975
|
var p = new QParam();
|
|
15970
|
-
p.sql = "
|
|
15971
|
-
|
|
15972
|
-
p.types = [
|
|
15973
|
-
p.values = [_this.appService.user];
|
|
15976
|
+
p.sql = "SELECT_USER_ACCESS_AUTH";
|
|
15977
|
+
p.values = [];
|
|
15978
|
+
p.types = [];
|
|
15974
15979
|
_this.querys.doQuery(p).subscribe(function (data) {
|
|
15975
|
-
|
|
15976
|
-
|
|
15977
|
-
|
|
15978
|
-
|
|
15979
|
-
|
|
15980
|
-
|
|
15981
|
-
|
|
15982
|
-
|
|
15983
|
-
|
|
15980
|
+
if (data != null)
|
|
15981
|
+
if (data.result_msg == "OK")
|
|
15982
|
+
if (data.result_data.length > 0) {
|
|
15983
|
+
console.log('canActivate 6');
|
|
15984
|
+
_this.appService.user_roles = data.result_data[0].roles;
|
|
15985
|
+
if (_this.appService.user_roles.length > 0)
|
|
15986
|
+
_this.appService.user_roles = _this.appService.user_roles.substr(1);
|
|
15987
|
+
_this.appService.user_isadmin = data.result_data[0].isadmin;
|
|
15988
|
+
_this.appService.user = data.result_data[0].user;
|
|
15989
|
+
if (_this.app_s.user_isadmin != null)
|
|
15990
|
+
if (_this.app_s.user_isadmin == "1")
|
|
15991
|
+
return true;
|
|
15992
|
+
console.log('canActivate 7');
|
|
15993
|
+
/** @type {?} */
|
|
15994
|
+
var p_1 = new QParam();
|
|
15995
|
+
p_1.sql = "SELECT_APPS_USER_ALL";
|
|
15996
|
+
_this.appService.getState().app_enabled = new Array();
|
|
15997
|
+
p_1.types = ['string'];
|
|
15998
|
+
p_1.values = [_this.appService.user];
|
|
15999
|
+
console.log('canActivate 8');
|
|
16000
|
+
_this.querys.doQuery(p_1).subscribe(function (data) {
|
|
16001
|
+
console.log('canActivate 9');
|
|
16002
|
+
_this.arr_accessi = data.result_data;
|
|
16003
|
+
for (var i = 0; i < _this.arr_accessi.length; i++) {
|
|
16004
|
+
console.log('[' + _this.arr_accessi[i].url.split('/')[0] + ']', '-----', '[' + _this.routingDestination.split('/')[0] + ']');
|
|
16005
|
+
if (_this.arr_accessi[i].type == 'M') {
|
|
16006
|
+
if ('[' + _this.arr_accessi[i].url.split('/')[0] + ']' == '[' + _this.routingDestination.split('/')[0] + ']') {
|
|
16007
|
+
resolve(true);
|
|
16008
|
+
return;
|
|
16009
|
+
}
|
|
16010
|
+
}
|
|
16011
|
+
}
|
|
16012
|
+
console.log('canActivate 11');
|
|
16013
|
+
_this.toast.error("ACCESS DENIED [0X0001]");
|
|
16014
|
+
resolve(false);
|
|
16015
|
+
_this.slimLoadingBarService.complete();
|
|
16016
|
+
return;
|
|
16017
|
+
});
|
|
16018
|
+
}
|
|
16019
|
+
else {
|
|
16020
|
+
_this.toast.error("ACCESS DENIED [0X0002]");
|
|
16021
|
+
_this.slimLoadingBarService.complete();
|
|
16022
|
+
return false;
|
|
15984
16023
|
}
|
|
15985
|
-
}
|
|
15986
|
-
}
|
|
15987
|
-
_this.toast.error("ACCESS DENIED");
|
|
15988
|
-
resolve(false);
|
|
15989
|
-
_this.slimLoadingBarService.complete();
|
|
15990
|
-
return;
|
|
15991
16024
|
});
|
|
15992
16025
|
});
|
|
16026
|
+
console.log('canActivate 12');
|
|
15993
16027
|
}
|
|
15994
16028
|
else {
|
|
15995
|
-
this.toast.error("ACCESS DENIED");
|
|
16029
|
+
this.toast.error("ACCESS DENIED [0X0004]");
|
|
15996
16030
|
this.slimLoadingBarService.complete();
|
|
15997
16031
|
return false;
|
|
15998
16032
|
}
|