@fluxhub/fluxhub-lib 9.0.41 → 9.0.43
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 +232 -244
- package/bundles/fluxhub-fluxhub-lib.umd.js.map +1 -1
- package/bundles/fluxhub-fluxhub-lib.umd.min.js +2 -2
- package/bundles/fluxhub-fluxhub-lib.umd.min.js.map +1 -1
- package/esm2015/lib/controls/fhgrid.js +2 -10
- package/esm2015/lib/controls/grid_editors/checkbox-editor.component.js +4 -9
- package/esm2015/lib/fluxhub-lib.module.js +2 -2
- package/esm5/lib/controls/fhgrid.js +2 -10
- package/esm5/lib/controls/grid_editors/checkbox-editor.component.js +4 -9
- package/esm5/lib/fluxhub-lib.module.js +2 -2
- package/fesm2015/fluxhub-fluxhub-lib.js +220 -232
- package/fesm2015/fluxhub-fluxhub-lib.js.map +1 -1
- package/fesm5/fluxhub-fluxhub-lib.js +232 -244
- package/fesm5/fluxhub-fluxhub-lib.js.map +1 -1
- package/fluxhub-fluxhub-lib.metadata.json +1 -1
- package/lib/controls/app_manager/fhrolemanager.d.ts +16 -0
- package/lib/controls/app_manager/fhtablevaluesmanager.d.ts +16 -0
- package/lib/controls/app_manager/win_manage_roles.d.ts +27 -0
- package/lib/controls/app_manager/win_manage_values.d.ts +27 -0
- package/lib/controls/fhgrid.d.ts +0 -2
- package/lib/controls/grid_editors/approvabuttons.d.ts +13 -0
- package/lib/controls/grid_editors/checkbox-editor.component.d.ts +11 -0
- package/lib/controls/grid_editors/currency.component.d.ts +6 -0
- package/lib/controls/grid_editors/fhcombobox_filter.d.ts +45 -0
- package/lib/controls/grid_editors/numeric-editor.component.d.ts +20 -0
- package/lib/controls/grid_editors/select-editor.component.d.ts +20 -0
- package/lib/controls/grid_editors/textarea-editor.component.d.ts +17 -0
- package/lib/controls/image-viewer/image-viewer-config.model.d.ts +34 -0
- package/lib/controls/image-viewer/image-viewer.component.d.ts +53 -0
- package/lib/controls/image-viewer/save_pipe.d.ts +7 -0
- package/lib/controls/utils/MomentDateAdapter.d.ts +33 -0
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { __decorate, __metadata, __param } from 'tslib';
|
|
2
|
-
import {
|
|
3
|
-
import { SimpleCrypt } from 'ngx-simple-crypt';
|
|
4
|
-
import { AES, enc } from 'crypto-js';
|
|
2
|
+
import { ViewChild, ViewContainerRef, Component, ɵɵdefineInjectable, Injectable, ɵɵinject, Directive, forwardRef, EventEmitter, Input, Output, Inject, ElementRef, HostListener, Pipe, PLATFORM_ID, Optional, NgModule } from '@angular/core';
|
|
5
3
|
import { HttpHeaders, HttpClient } from '@angular/common/http';
|
|
6
4
|
import { ToastrService } from 'ngx-toastr';
|
|
7
5
|
import { map, catchError, flatMap } from 'rxjs/operators';
|
|
8
6
|
import { Observable } from 'rxjs';
|
|
7
|
+
import { SimpleCrypt } from 'ngx-simple-crypt';
|
|
8
|
+
import { AES, enc } from 'crypto-js';
|
|
9
9
|
import { MatDialogRef, MatDialog, MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
|
|
10
10
|
import { NgControl, NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
|
11
11
|
import { FileUploader, FileUploadModule } from 'ng2-file-upload';
|
|
@@ -70,6 +70,37 @@ import { MatSortModule } from '@angular/material/sort';
|
|
|
70
70
|
import { MatTableModule } from '@angular/material/table';
|
|
71
71
|
import { MatBadgeModule } from '@angular/material/badge';
|
|
72
72
|
|
|
73
|
+
let CheckboxEditorComponent = class CheckboxEditorComponent {
|
|
74
|
+
constructor() {
|
|
75
|
+
}
|
|
76
|
+
agInit(params) {
|
|
77
|
+
this.params = params;
|
|
78
|
+
this.value = this.params.value;
|
|
79
|
+
}
|
|
80
|
+
getValue() {
|
|
81
|
+
return this.value;
|
|
82
|
+
}
|
|
83
|
+
ngAfterViewInit() {
|
|
84
|
+
setTimeout(() => {
|
|
85
|
+
this.input.element.nativeElement.focus();
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
__decorate([
|
|
90
|
+
ViewChild('input', { read: ViewContainerRef }),
|
|
91
|
+
__metadata("design:type", Object)
|
|
92
|
+
], CheckboxEditorComponent.prototype, "input", void 0);
|
|
93
|
+
CheckboxEditorComponent = __decorate([
|
|
94
|
+
Component({
|
|
95
|
+
selector: 'checkbox-cell',
|
|
96
|
+
template: `
|
|
97
|
+
<FHCheckBox [(ngModel)]="value">
|
|
98
|
+
</FHCheckBox>
|
|
99
|
+
`
|
|
100
|
+
}),
|
|
101
|
+
__metadata("design:paramtypes", [])
|
|
102
|
+
], CheckboxEditorComponent);
|
|
103
|
+
|
|
73
104
|
/**
|
|
74
105
|
* App service
|
|
75
106
|
*/
|
|
@@ -160,6 +191,192 @@ AppService = __decorate([
|
|
|
160
191
|
})
|
|
161
192
|
], AppService);
|
|
162
193
|
|
|
194
|
+
class QGResult {
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
let OdbcService = class OdbcService {
|
|
198
|
+
constructor(http, app_s, toastr) {
|
|
199
|
+
this.http = http;
|
|
200
|
+
this.app_s = app_s;
|
|
201
|
+
this.toastr = toastr;
|
|
202
|
+
this.url = this.app_s.API_ENDPOINT + this.app_s.ODBC_ENDPOINT; // URL to web API
|
|
203
|
+
}
|
|
204
|
+
doQuery(queryp, displayError = true) {
|
|
205
|
+
this.headers = new HttpHeaders({
|
|
206
|
+
'Content-Type': 'application/json',
|
|
207
|
+
'Authorization': 'Bearer ' + localStorage.getItem(this.app_s.COMPANY_KEY + "token"),
|
|
208
|
+
});
|
|
209
|
+
this.url = this.app_s.API_ENDPOINT + this.app_s.ODBC_ENDPOINT;
|
|
210
|
+
let post_v = JSON.stringify(queryp);
|
|
211
|
+
return this.http.post(this.url, post_v, { headers: this.headers })
|
|
212
|
+
.pipe(map((res) => {
|
|
213
|
+
// Handle errors, display if enabled
|
|
214
|
+
let err;
|
|
215
|
+
if (!res) {
|
|
216
|
+
err = new Error('Empty server response');
|
|
217
|
+
}
|
|
218
|
+
else if (res.result_msg === 'KO') {
|
|
219
|
+
err = new Error(res.msg);
|
|
220
|
+
}
|
|
221
|
+
if (err) {
|
|
222
|
+
console.error(err);
|
|
223
|
+
if (displayError) {
|
|
224
|
+
this.toastr.error(err.message);
|
|
225
|
+
}
|
|
226
|
+
throw new Error(err);
|
|
227
|
+
}
|
|
228
|
+
return res || new QGResult();
|
|
229
|
+
}), catchError((err) => {
|
|
230
|
+
// In a real world app, we might use a remote logging infrastructure
|
|
231
|
+
// We'd also dig deeper into the error to get a better message
|
|
232
|
+
let errMsg = (err.message) ? err.message : err.status ? `${err.status} - ${err.statusText}` : 'Server error';
|
|
233
|
+
console.error(errMsg); // log to console instead
|
|
234
|
+
throw err;
|
|
235
|
+
}));
|
|
236
|
+
}
|
|
237
|
+
};
|
|
238
|
+
OdbcService.ctorParameters = () => [
|
|
239
|
+
{ type: HttpClient },
|
|
240
|
+
{ type: AppService },
|
|
241
|
+
{ type: ToastrService }
|
|
242
|
+
];
|
|
243
|
+
OdbcService.ɵprov = ɵɵdefineInjectable({ factory: function OdbcService_Factory() { return new OdbcService(ɵɵinject(HttpClient), ɵɵinject(AppService), ɵɵinject(ToastrService)); }, token: OdbcService, providedIn: "root" });
|
|
244
|
+
OdbcService = __decorate([
|
|
245
|
+
Injectable({
|
|
246
|
+
providedIn: 'root',
|
|
247
|
+
}),
|
|
248
|
+
__metadata("design:paramtypes", [HttpClient, AppService, ToastrService])
|
|
249
|
+
], OdbcService);
|
|
250
|
+
|
|
251
|
+
let FileService = class FileService {
|
|
252
|
+
constructor(http, app_s, toastr) {
|
|
253
|
+
this.http = http;
|
|
254
|
+
this.app_s = app_s;
|
|
255
|
+
this.toastr = toastr;
|
|
256
|
+
this.url = this.app_s.API_ENDPOINT + this.app_s.FILE_ENDPOINT; // URL to web API this.app_s.API_ENDPOINT
|
|
257
|
+
}
|
|
258
|
+
doQuery(queryp, displayError = true) {
|
|
259
|
+
this.headers = new HttpHeaders({
|
|
260
|
+
'Content-Type': 'application/json',
|
|
261
|
+
'Authorization': 'Bearer ' + localStorage.getItem(this.app_s.COMPANY_KEY + "token"),
|
|
262
|
+
});
|
|
263
|
+
this.url = this.app_s.API_ENDPOINT + this.app_s.FILE_ENDPOINT;
|
|
264
|
+
// console.log('FileService url: '+ this.url);
|
|
265
|
+
let post_v = JSON.stringify(queryp);
|
|
266
|
+
// console.log(post_v);
|
|
267
|
+
return this.http.post(this.url, post_v, {
|
|
268
|
+
headers: this.headers
|
|
269
|
+
}).pipe(map((res) => {
|
|
270
|
+
// Handle errors, display if enabled
|
|
271
|
+
let r = res;
|
|
272
|
+
let err;
|
|
273
|
+
if (!res) {
|
|
274
|
+
err = new Error('Empty server response');
|
|
275
|
+
}
|
|
276
|
+
else if (r.result_msg === 'KO') {
|
|
277
|
+
err = new Error(r.msg);
|
|
278
|
+
}
|
|
279
|
+
if (err) {
|
|
280
|
+
console.error(err);
|
|
281
|
+
if (displayError) {
|
|
282
|
+
this.toastr.error(err.message);
|
|
283
|
+
}
|
|
284
|
+
throw new Error(err);
|
|
285
|
+
}
|
|
286
|
+
return res || new QGResult();
|
|
287
|
+
}), catchError((err) => {
|
|
288
|
+
// In a real world app, we might use a remote logging infrastructure
|
|
289
|
+
// We'd also dig deeper into the error to get a better message
|
|
290
|
+
let errMsg = (err.message) ? err.message : err.status ? `${err.status} - ${err.statusText}` : 'Server error';
|
|
291
|
+
console.error(errMsg); // log to console instead
|
|
292
|
+
throw err;
|
|
293
|
+
}));
|
|
294
|
+
}
|
|
295
|
+
};
|
|
296
|
+
FileService.ctorParameters = () => [
|
|
297
|
+
{ type: HttpClient },
|
|
298
|
+
{ type: AppService },
|
|
299
|
+
{ type: ToastrService }
|
|
300
|
+
];
|
|
301
|
+
FileService.ɵprov = ɵɵdefineInjectable({ factory: function FileService_Factory() { return new FileService(ɵɵinject(HttpClient), ɵɵinject(AppService), ɵɵinject(ToastrService)); }, token: FileService, providedIn: "root" });
|
|
302
|
+
FileService = __decorate([
|
|
303
|
+
Injectable({
|
|
304
|
+
providedIn: 'root',
|
|
305
|
+
}),
|
|
306
|
+
__metadata("design:paramtypes", [HttpClient, AppService, ToastrService])
|
|
307
|
+
], FileService);
|
|
308
|
+
|
|
309
|
+
let AppMakerService = class AppMakerService {
|
|
310
|
+
constructor(http, app_s, toastr) {
|
|
311
|
+
this.http = http;
|
|
312
|
+
this.app_s = app_s;
|
|
313
|
+
this.toastr = toastr;
|
|
314
|
+
this.url = this.app_s.API_ENDPOINT + this.app_s.APPMAKER_ENDPOINT; // URL to web API
|
|
315
|
+
}
|
|
316
|
+
doQuery(queryp, displayError = true) {
|
|
317
|
+
this.url = this.app_s.API_ENDPOINT + this.app_s.APPMAKER_ENDPOINT;
|
|
318
|
+
this.headers = new HttpHeaders({
|
|
319
|
+
'Content-Type': 'application/json',
|
|
320
|
+
'Authorization': 'Bearer ' + localStorage.getItem(this.app_s.COMPANY_KEY + "token"),
|
|
321
|
+
});
|
|
322
|
+
// console.log('AppMakerService url: '+ this.url);
|
|
323
|
+
let post_v = JSON.stringify(queryp);
|
|
324
|
+
// console.log(post_v);
|
|
325
|
+
return this.http.post(this.url, post_v)
|
|
326
|
+
.pipe(map((res) => {
|
|
327
|
+
// Handle errors, display if enabled
|
|
328
|
+
let r = res;
|
|
329
|
+
let err;
|
|
330
|
+
if (!res) {
|
|
331
|
+
err = new Error('Empty server response');
|
|
332
|
+
}
|
|
333
|
+
else if (r.result_msg === 'KO') {
|
|
334
|
+
err = new Error(r.msg);
|
|
335
|
+
}
|
|
336
|
+
if (err) {
|
|
337
|
+
console.error(err);
|
|
338
|
+
if (displayError) {
|
|
339
|
+
this.toastr.error(err.message);
|
|
340
|
+
}
|
|
341
|
+
throw new Error(err);
|
|
342
|
+
}
|
|
343
|
+
return r || new QGResult();
|
|
344
|
+
}), catchError((err) => {
|
|
345
|
+
// In a real world app, we might use a remote logging infrastructure
|
|
346
|
+
// We'd also dig deeper into the error to get a better message
|
|
347
|
+
let errMsg = (err.message) ? err.message : err.status ? `${err.status} - ${err.statusText}` : 'Server error';
|
|
348
|
+
console.error(errMsg); // log to console instead
|
|
349
|
+
throw err;
|
|
350
|
+
}));
|
|
351
|
+
}
|
|
352
|
+
extractData(res) {
|
|
353
|
+
//console.log(res);
|
|
354
|
+
let body = res.json();
|
|
355
|
+
// console.log(body);
|
|
356
|
+
return body || {};
|
|
357
|
+
}
|
|
358
|
+
handleError(error) {
|
|
359
|
+
// In a real world app, we might use a remote logging infrastructure
|
|
360
|
+
// We'd also dig deeper into the error to get a better message
|
|
361
|
+
let errMsg = (error.message) ? error.message :
|
|
362
|
+
error.status ? `${error.status} - ${error.statusText}` : 'Server error';
|
|
363
|
+
console.error(errMsg); // log to console instead
|
|
364
|
+
return Observable.throw(errMsg);
|
|
365
|
+
}
|
|
366
|
+
};
|
|
367
|
+
AppMakerService.ctorParameters = () => [
|
|
368
|
+
{ type: HttpClient },
|
|
369
|
+
{ type: AppService },
|
|
370
|
+
{ type: ToastrService }
|
|
371
|
+
];
|
|
372
|
+
AppMakerService.ɵprov = ɵɵdefineInjectable({ factory: function AppMakerService_Factory() { return new AppMakerService(ɵɵinject(HttpClient), ɵɵinject(AppService), ɵɵinject(ToastrService)); }, token: AppMakerService, providedIn: "root" });
|
|
373
|
+
AppMakerService = __decorate([
|
|
374
|
+
Injectable({
|
|
375
|
+
providedIn: 'root',
|
|
376
|
+
}),
|
|
377
|
+
__metadata("design:paramtypes", [HttpClient, AppService, ToastrService])
|
|
378
|
+
], AppMakerService);
|
|
379
|
+
|
|
163
380
|
var UtilityService_1;
|
|
164
381
|
let UtilityService = UtilityService_1 = class UtilityService {
|
|
165
382
|
constructor(app_s) {
|
|
@@ -683,227 +900,6 @@ UtilityService = UtilityService_1 = __decorate([
|
|
|
683
900
|
__metadata("design:paramtypes", [AppService])
|
|
684
901
|
], UtilityService);
|
|
685
902
|
|
|
686
|
-
let CheckboxEditorComponent = class CheckboxEditorComponent {
|
|
687
|
-
constructor(uti_s) {
|
|
688
|
-
this.uti_s = uti_s;
|
|
689
|
-
}
|
|
690
|
-
agInit(params) {
|
|
691
|
-
this.params = params;
|
|
692
|
-
this.value = this.params.value;
|
|
693
|
-
}
|
|
694
|
-
getValue() {
|
|
695
|
-
return this.value;
|
|
696
|
-
}
|
|
697
|
-
ngAfterViewInit() {
|
|
698
|
-
setTimeout(() => {
|
|
699
|
-
this.input.element.nativeElement.focus();
|
|
700
|
-
});
|
|
701
|
-
}
|
|
702
|
-
};
|
|
703
|
-
CheckboxEditorComponent.ctorParameters = () => [
|
|
704
|
-
{ type: UtilityService }
|
|
705
|
-
];
|
|
706
|
-
__decorate([
|
|
707
|
-
ViewChild('input', { read: ViewContainerRef }),
|
|
708
|
-
__metadata("design:type", Object)
|
|
709
|
-
], CheckboxEditorComponent.prototype, "input", void 0);
|
|
710
|
-
CheckboxEditorComponent = __decorate([
|
|
711
|
-
Component({
|
|
712
|
-
selector: 'checkbox-cell',
|
|
713
|
-
template: `
|
|
714
|
-
<FHCheckBox [(ngModel)]="value" label="Altra Normativa">
|
|
715
|
-
</FHCheckBox>
|
|
716
|
-
`
|
|
717
|
-
}),
|
|
718
|
-
__metadata("design:paramtypes", [UtilityService])
|
|
719
|
-
], CheckboxEditorComponent);
|
|
720
|
-
|
|
721
|
-
class QGResult {
|
|
722
|
-
}
|
|
723
|
-
|
|
724
|
-
let OdbcService = class OdbcService {
|
|
725
|
-
constructor(http, app_s, toastr) {
|
|
726
|
-
this.http = http;
|
|
727
|
-
this.app_s = app_s;
|
|
728
|
-
this.toastr = toastr;
|
|
729
|
-
this.url = this.app_s.API_ENDPOINT + this.app_s.ODBC_ENDPOINT; // URL to web API
|
|
730
|
-
}
|
|
731
|
-
doQuery(queryp, displayError = true) {
|
|
732
|
-
this.headers = new HttpHeaders({
|
|
733
|
-
'Content-Type': 'application/json',
|
|
734
|
-
'Authorization': 'Bearer ' + localStorage.getItem(this.app_s.COMPANY_KEY + "token"),
|
|
735
|
-
});
|
|
736
|
-
this.url = this.app_s.API_ENDPOINT + this.app_s.ODBC_ENDPOINT;
|
|
737
|
-
let post_v = JSON.stringify(queryp);
|
|
738
|
-
return this.http.post(this.url, post_v, { headers: this.headers })
|
|
739
|
-
.pipe(map((res) => {
|
|
740
|
-
// Handle errors, display if enabled
|
|
741
|
-
let err;
|
|
742
|
-
if (!res) {
|
|
743
|
-
err = new Error('Empty server response');
|
|
744
|
-
}
|
|
745
|
-
else if (res.result_msg === 'KO') {
|
|
746
|
-
err = new Error(res.msg);
|
|
747
|
-
}
|
|
748
|
-
if (err) {
|
|
749
|
-
console.error(err);
|
|
750
|
-
if (displayError) {
|
|
751
|
-
this.toastr.error(err.message);
|
|
752
|
-
}
|
|
753
|
-
throw new Error(err);
|
|
754
|
-
}
|
|
755
|
-
return res || new QGResult();
|
|
756
|
-
}), catchError((err) => {
|
|
757
|
-
// In a real world app, we might use a remote logging infrastructure
|
|
758
|
-
// We'd also dig deeper into the error to get a better message
|
|
759
|
-
let errMsg = (err.message) ? err.message : err.status ? `${err.status} - ${err.statusText}` : 'Server error';
|
|
760
|
-
console.error(errMsg); // log to console instead
|
|
761
|
-
throw err;
|
|
762
|
-
}));
|
|
763
|
-
}
|
|
764
|
-
};
|
|
765
|
-
OdbcService.ctorParameters = () => [
|
|
766
|
-
{ type: HttpClient },
|
|
767
|
-
{ type: AppService },
|
|
768
|
-
{ type: ToastrService }
|
|
769
|
-
];
|
|
770
|
-
OdbcService.ɵprov = ɵɵdefineInjectable({ factory: function OdbcService_Factory() { return new OdbcService(ɵɵinject(HttpClient), ɵɵinject(AppService), ɵɵinject(ToastrService)); }, token: OdbcService, providedIn: "root" });
|
|
771
|
-
OdbcService = __decorate([
|
|
772
|
-
Injectable({
|
|
773
|
-
providedIn: 'root',
|
|
774
|
-
}),
|
|
775
|
-
__metadata("design:paramtypes", [HttpClient, AppService, ToastrService])
|
|
776
|
-
], OdbcService);
|
|
777
|
-
|
|
778
|
-
let FileService = class FileService {
|
|
779
|
-
constructor(http, app_s, toastr) {
|
|
780
|
-
this.http = http;
|
|
781
|
-
this.app_s = app_s;
|
|
782
|
-
this.toastr = toastr;
|
|
783
|
-
this.url = this.app_s.API_ENDPOINT + this.app_s.FILE_ENDPOINT; // URL to web API this.app_s.API_ENDPOINT
|
|
784
|
-
}
|
|
785
|
-
doQuery(queryp, displayError = true) {
|
|
786
|
-
this.headers = new HttpHeaders({
|
|
787
|
-
'Content-Type': 'application/json',
|
|
788
|
-
'Authorization': 'Bearer ' + localStorage.getItem(this.app_s.COMPANY_KEY + "token"),
|
|
789
|
-
});
|
|
790
|
-
this.url = this.app_s.API_ENDPOINT + this.app_s.FILE_ENDPOINT;
|
|
791
|
-
// console.log('FileService url: '+ this.url);
|
|
792
|
-
let post_v = JSON.stringify(queryp);
|
|
793
|
-
// console.log(post_v);
|
|
794
|
-
return this.http.post(this.url, post_v, {
|
|
795
|
-
headers: this.headers
|
|
796
|
-
}).pipe(map((res) => {
|
|
797
|
-
// Handle errors, display if enabled
|
|
798
|
-
let r = res;
|
|
799
|
-
let err;
|
|
800
|
-
if (!res) {
|
|
801
|
-
err = new Error('Empty server response');
|
|
802
|
-
}
|
|
803
|
-
else if (r.result_msg === 'KO') {
|
|
804
|
-
err = new Error(r.msg);
|
|
805
|
-
}
|
|
806
|
-
if (err) {
|
|
807
|
-
console.error(err);
|
|
808
|
-
if (displayError) {
|
|
809
|
-
this.toastr.error(err.message);
|
|
810
|
-
}
|
|
811
|
-
throw new Error(err);
|
|
812
|
-
}
|
|
813
|
-
return res || new QGResult();
|
|
814
|
-
}), catchError((err) => {
|
|
815
|
-
// In a real world app, we might use a remote logging infrastructure
|
|
816
|
-
// We'd also dig deeper into the error to get a better message
|
|
817
|
-
let errMsg = (err.message) ? err.message : err.status ? `${err.status} - ${err.statusText}` : 'Server error';
|
|
818
|
-
console.error(errMsg); // log to console instead
|
|
819
|
-
throw err;
|
|
820
|
-
}));
|
|
821
|
-
}
|
|
822
|
-
};
|
|
823
|
-
FileService.ctorParameters = () => [
|
|
824
|
-
{ type: HttpClient },
|
|
825
|
-
{ type: AppService },
|
|
826
|
-
{ type: ToastrService }
|
|
827
|
-
];
|
|
828
|
-
FileService.ɵprov = ɵɵdefineInjectable({ factory: function FileService_Factory() { return new FileService(ɵɵinject(HttpClient), ɵɵinject(AppService), ɵɵinject(ToastrService)); }, token: FileService, providedIn: "root" });
|
|
829
|
-
FileService = __decorate([
|
|
830
|
-
Injectable({
|
|
831
|
-
providedIn: 'root',
|
|
832
|
-
}),
|
|
833
|
-
__metadata("design:paramtypes", [HttpClient, AppService, ToastrService])
|
|
834
|
-
], FileService);
|
|
835
|
-
|
|
836
|
-
let AppMakerService = class AppMakerService {
|
|
837
|
-
constructor(http, app_s, toastr) {
|
|
838
|
-
this.http = http;
|
|
839
|
-
this.app_s = app_s;
|
|
840
|
-
this.toastr = toastr;
|
|
841
|
-
this.url = this.app_s.API_ENDPOINT + this.app_s.APPMAKER_ENDPOINT; // URL to web API
|
|
842
|
-
}
|
|
843
|
-
doQuery(queryp, displayError = true) {
|
|
844
|
-
this.url = this.app_s.API_ENDPOINT + this.app_s.APPMAKER_ENDPOINT;
|
|
845
|
-
this.headers = new HttpHeaders({
|
|
846
|
-
'Content-Type': 'application/json',
|
|
847
|
-
'Authorization': 'Bearer ' + localStorage.getItem(this.app_s.COMPANY_KEY + "token"),
|
|
848
|
-
});
|
|
849
|
-
// console.log('AppMakerService url: '+ this.url);
|
|
850
|
-
let post_v = JSON.stringify(queryp);
|
|
851
|
-
// console.log(post_v);
|
|
852
|
-
return this.http.post(this.url, post_v)
|
|
853
|
-
.pipe(map((res) => {
|
|
854
|
-
// Handle errors, display if enabled
|
|
855
|
-
let r = res;
|
|
856
|
-
let err;
|
|
857
|
-
if (!res) {
|
|
858
|
-
err = new Error('Empty server response');
|
|
859
|
-
}
|
|
860
|
-
else if (r.result_msg === 'KO') {
|
|
861
|
-
err = new Error(r.msg);
|
|
862
|
-
}
|
|
863
|
-
if (err) {
|
|
864
|
-
console.error(err);
|
|
865
|
-
if (displayError) {
|
|
866
|
-
this.toastr.error(err.message);
|
|
867
|
-
}
|
|
868
|
-
throw new Error(err);
|
|
869
|
-
}
|
|
870
|
-
return r || new QGResult();
|
|
871
|
-
}), catchError((err) => {
|
|
872
|
-
// In a real world app, we might use a remote logging infrastructure
|
|
873
|
-
// We'd also dig deeper into the error to get a better message
|
|
874
|
-
let errMsg = (err.message) ? err.message : err.status ? `${err.status} - ${err.statusText}` : 'Server error';
|
|
875
|
-
console.error(errMsg); // log to console instead
|
|
876
|
-
throw err;
|
|
877
|
-
}));
|
|
878
|
-
}
|
|
879
|
-
extractData(res) {
|
|
880
|
-
//console.log(res);
|
|
881
|
-
let body = res.json();
|
|
882
|
-
// console.log(body);
|
|
883
|
-
return body || {};
|
|
884
|
-
}
|
|
885
|
-
handleError(error) {
|
|
886
|
-
// In a real world app, we might use a remote logging infrastructure
|
|
887
|
-
// We'd also dig deeper into the error to get a better message
|
|
888
|
-
let errMsg = (error.message) ? error.message :
|
|
889
|
-
error.status ? `${error.status} - ${error.statusText}` : 'Server error';
|
|
890
|
-
console.error(errMsg); // log to console instead
|
|
891
|
-
return Observable.throw(errMsg);
|
|
892
|
-
}
|
|
893
|
-
};
|
|
894
|
-
AppMakerService.ctorParameters = () => [
|
|
895
|
-
{ type: HttpClient },
|
|
896
|
-
{ type: AppService },
|
|
897
|
-
{ type: ToastrService }
|
|
898
|
-
];
|
|
899
|
-
AppMakerService.ɵprov = ɵɵdefineInjectable({ factory: function AppMakerService_Factory() { return new AppMakerService(ɵɵinject(HttpClient), ɵɵinject(AppService), ɵɵinject(ToastrService)); }, token: AppMakerService, providedIn: "root" });
|
|
900
|
-
AppMakerService = __decorate([
|
|
901
|
-
Injectable({
|
|
902
|
-
providedIn: 'root',
|
|
903
|
-
}),
|
|
904
|
-
__metadata("design:paramtypes", [HttpClient, AppService, ToastrService])
|
|
905
|
-
], AppMakerService);
|
|
906
|
-
|
|
907
903
|
let NumericEditorComponent = class NumericEditorComponent {
|
|
908
904
|
constructor(uti_s) {
|
|
909
905
|
this.uti_s = uti_s;
|
|
@@ -7056,14 +7052,6 @@ __decorate([
|
|
|
7056
7052
|
__metadata("design:paramtypes", [Object]),
|
|
7057
7053
|
__metadata("design:returntype", void 0)
|
|
7058
7054
|
], FHGridComponent.prototype, "onResize", null);
|
|
7059
|
-
__decorate([
|
|
7060
|
-
ViewChild('testom', { read: ViewContainerRef }),
|
|
7061
|
-
__metadata("design:type", Object)
|
|
7062
|
-
], FHGridComponent.prototype, "testom", void 0);
|
|
7063
|
-
__decorate([
|
|
7064
|
-
ViewChild('myModalNormal', { read: ViewContainerRef }),
|
|
7065
|
-
__metadata("design:type", Object)
|
|
7066
|
-
], FHGridComponent.prototype, "myModalNormal", void 0);
|
|
7067
7055
|
FHGridComponent = __decorate([
|
|
7068
7056
|
Component({
|
|
7069
7057
|
selector: 'FHGrid',
|