@trudb/tru-common-lib 0.1.209 → 0.1.210

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.
@@ -1,7 +1,11 @@
1
1
  import { Injectable } from '@angular/core';
2
+ import { TruReportView } from '../components/report-view/tru-report-view';
2
3
  import * as i0 from "@angular/core";
3
4
  export class TruComponentLookup {
4
5
  truComponentLookupRegistry = new Map();
6
+ constructor() {
7
+ this.set('TruReportView', TruReportView);
8
+ }
5
9
  set = (key, type) => {
6
10
  this.truComponentLookupRegistry.set(key, type);
7
11
  };
@@ -19,5 +23,5 @@ export class TruComponentLookup {
19
23
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: TruComponentLookup, decorators: [{
20
24
  type: Injectable,
21
25
  args: [{ providedIn: 'root' }]
22
- }] });
23
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJ1LWNvbXBvbmVudC1sb29rdXAuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy90cnUtY29tbW9uLWxpYi9zcmMvbGliL3NlcnZpY2VzL3RydS1jb21wb25lbnQtbG9va3VwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7O0FBRzNDLE1BQU0sT0FBTyxrQkFBa0I7SUFDckIsMEJBQTBCLEdBQXFCLElBQUksR0FBRyxFQUFFLENBQUM7SUFFakUsR0FBRyxHQUFHLENBQUMsR0FBVyxFQUFFLElBQVMsRUFBUSxFQUFFO1FBQ3JDLElBQUksQ0FBQywwQkFBMEIsQ0FBQyxHQUFHLENBQUMsR0FBRyxFQUFFLElBQUksQ0FBQyxDQUFDO0lBQ2pELENBQUMsQ0FBQTtJQUVELEdBQUcsR0FBRyxDQUFDLEdBQVcsRU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N0cmluZywgYW55PiA9IG5ldyBNYXAoKTtcclxuXHJcbiAgY29uc3RydWN0b3IoKSB7XHJcbiAgICB0aGlzLnNldCgnVHJ1UmVwb3J0VmlldycsIFRydVJlcG9ydFZpZXcpO1xyXG4gIH1cclxuXHJcbiAgc2V0ID0gKGtleTogc3RyaW5nLCB0eXBlOiBhbnkpOiB2b2lkID0+IHtcclxuICAgIHRoaXMudHJ1Q29tcG9uZW50TG9va3VwUmVnaXN0cnkuc2V0KGtleSwgdHlwZSk7XHJcbiAgfVxyXG5cclxuICBnZXQgPSAoa2V5OiBzdHJpbmcpOiBhbnkgPT4ge1xyXG4gICAgcmV0dXJuIHRoaXMudHJ1Q29tcG9uZW50TG9va3VwUmVnaXN0cnkuZ2V0KGtleSk7XHJcbiAgfVxyXG5cclxuICBnZXRCeVN1ZmZpeCA9IChzdWZmaXg6IHN0cmluZyk6IEFycmF5PGFueT4gPT4ge1xyXG4gICAgcmV0dXJuIFsuLi50aGlzLnRydUNvbXBvbmVudExvb2t1cFJlZ2lzdHJ5LnZhbHVlcygpXS5maWx0ZXIoXHJcbiAgICAgICh2OiBhbnksIGs6IGFueSkgPT4ge1xyXG4gICAgICAgIHYubmFtZS50b0xvd2VyQ2FzZSgpLmVuZHNXaXRoKHN1ZmZpeC50b0xvd2VyQ2FzZSgpKVxyXG4gICAgICB9XHJcbiAgICApO1xyXG4gIH1cclxufVxyXG4iXX0=
@@ -4971,8 +4971,89 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImpor
4971
4971
  }]
4972
4972
  }] });
4973
4973
 
4974
+ class TruReportView extends TruSearchViewBase {
4975
+ user;
4976
+ view = {};
4977
+ iframe;
4978
+ isBusy = true;
4979
+ subs = [];
4980
+ constructor(desktopManager, truWindowEventHandler, user) {
4981
+ super(desktopManager, truWindowEventHandler);
4982
+ this.user = user;
4983
+ truWindowEventHandler.setWindowTitle('Report');
4984
+ }
4985
+ onLoad(iframe) {
4986
+ var form = iframe.contentWindow?.document.querySelectorAll('form')[0];
4987
+ if (form) {
4988
+ var action = form.getAttribute('action');
4989
+ form.setAttribute('action', '');
4990
+ }
4991
+ setTimeout(() => {
4992
+ this.isBusy = false;
4993
+ }, 0);
4994
+ }
4995
+ ngOnInit() {
4996
+ //$http({
4997
+ // method: 'POST',
4998
+ // url: ),
4999
+ // data: textMan.formatAsUrlParameters({ refs: scope.view.parameters }),
5000
+ // headers: {
5001
+ // 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
5002
+ // }
5003
+ //}).then(function (result) {
5004
+ // var iframeDoc = iframe.contentWindow.document;
5005
+ // iframeDoc.open('text/html', 'replace');
5006
+ // iframeDoc.write(result.data);
5007
+ // iframeDoc.close();
5008
+ //}, function (data, status, headers, config) {
5009
+ // uiNotification.error('Report Error', data);
5010
+ //});
5011
+ //let xhr = new XMLHttpRequest();
5012
+ //xhr.onreadystatechange = () => {
5013
+ // if (xhr.readyState == XMLHttpRequest.DONE) {
5014
+ // if (xhr.status == 200) {
5015
+ // }
5016
+ // else {
5017
+ // console.log(xhr.responseType);
5018
+ // }
5019
+ // }
5020
+ //};
5021
+ //xhr.open('POST', $sce.trustAsResourceUrl(view.reportUrl);
5022
+ //xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
5023
+ //xhr.responseType = 'arraybuffer';
5024
+ //xhr.send(JSON.stringify({
5025
+ // userRef: this.user.activeUserRef,
5026
+ // runAsync: args.runAsync,
5027
+ // useNames: args.useNames,
5028
+ // useEmptyTags: args.useEmptyTags,
5029
+ // entityRefs: args.entityRefs,
5030
+ // entityTypeName: args.entityTypeName,
5031
+ // gridSpec: args.gridSpec,
5032
+ // query: queryText
5033
+ //}))
5034
+ }
5035
+ ngOnDestroy() {
5036
+ this.subs.forEach(s => s.unsubscribe());
5037
+ this.releaseWindowTitle();
5038
+ }
5039
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: TruReportView, deps: [{ token: TruDesktopManager }, { token: TruWindowEventHandler }, { token: TruUser }], target: i0.ɵɵFactoryTarget.Component });
5040
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.5", type: TruReportView, selector: "tru-report-view", inputs: { view: "view" }, viewQueries: [{ propertyName: "iframe", first: true, predicate: ["iframe"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div>\r\n <div class=\"view-busy-overlay\" *ngIf=\"isBusy\"></div>\r\n <iframe (load)=\"onLoad(iframe)\" class=\"report-view-frame\"></iframe>\r\n</div>\r\n", styles: [".report-view-frame{position:absolute;inset:0;border-style:none;height:100%;width:100%}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
5041
+ }
5042
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: TruReportView, decorators: [{
5043
+ type: Component,
5044
+ args: [{ selector: 'tru-report-view', template: "<div>\r\n <div class=\"view-busy-overlay\" *ngIf=\"isBusy\"></div>\r\n <iframe (load)=\"onLoad(iframe)\" class=\"report-view-frame\"></iframe>\r\n</div>\r\n", styles: [".report-view-frame{position:absolute;inset:0;border-style:none;height:100%;width:100%}\n"] }]
5045
+ }], ctorParameters: () => [{ type: TruDesktopManager }, { type: TruWindowEventHandler }, { type: TruUser }], propDecorators: { view: [{
5046
+ type: Input
5047
+ }], iframe: [{
5048
+ type: ViewChild,
5049
+ args: ['iframe', { static: false }]
5050
+ }] } });
5051
+
4974
5052
  class TruComponentLookup {
4975
5053
  truComponentLookupRegistry = new Map();
5054
+ constructor() {
5055
+ this.set('TruReportView', TruReportView);
5056
+ }
4976
5057
  set = (key, type) => {
4977
5058
  this.truComponentLookupRegistry.set(key, type);
4978
5059
  };
@@ -4990,7 +5071,7 @@ class TruComponentLookup {
4990
5071
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: TruComponentLookup, decorators: [{
4991
5072
  type: Injectable,
4992
5073
  args: [{ providedIn: 'root' }]
4993
- }] });
5074
+ }], ctorParameters: () => [] });
4994
5075
 
4995
5076
  var components = null;
4996
5077
  class TruDataGridModule {
@@ -7454,84 +7535,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImpor
7454
7535
  }]
7455
7536
  }] });
7456
7537
 
7457
- class TruReportView extends TruSearchViewBase {
7458
- user;
7459
- view = {};
7460
- iframe;
7461
- isBusy = true;
7462
- subs = [];
7463
- constructor(desktopManager, truWindowEventHandler, user) {
7464
- super(desktopManager, truWindowEventHandler);
7465
- this.user = user;
7466
- truWindowEventHandler.setWindowTitle('Report');
7467
- }
7468
- onLoad(iframe) {
7469
- var form = iframe.contentWindow?.document.querySelectorAll('form')[0];
7470
- if (form) {
7471
- var action = form.getAttribute('action');
7472
- form.setAttribute('action', '');
7473
- }
7474
- setTimeout(() => {
7475
- this.isBusy = false;
7476
- }, 0);
7477
- }
7478
- ngOnInit() {
7479
- //$http({
7480
- // method: 'POST',
7481
- // url: ),
7482
- // data: textMan.formatAsUrlParameters({ refs: scope.view.parameters }),
7483
- // headers: {
7484
- // 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
7485
- // }
7486
- //}).then(function (result) {
7487
- // var iframeDoc = iframe.contentWindow.document;
7488
- // iframeDoc.open('text/html', 'replace');
7489
- // iframeDoc.write(result.data);
7490
- // iframeDoc.close();
7491
- //}, function (data, status, headers, config) {
7492
- // uiNotification.error('Report Error', data);
7493
- //});
7494
- //let xhr = new XMLHttpRequest();
7495
- //xhr.onreadystatechange = () => {
7496
- // if (xhr.readyState == XMLHttpRequest.DONE) {
7497
- // if (xhr.status == 200) {
7498
- // }
7499
- // else {
7500
- // console.log(xhr.responseType);
7501
- // }
7502
- // }
7503
- //};
7504
- //xhr.open('POST', $sce.trustAsResourceUrl(view.reportUrl);
7505
- //xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
7506
- //xhr.responseType = 'arraybuffer';
7507
- //xhr.send(JSON.stringify({
7508
- // userRef: this.user.activeUserRef,
7509
- // runAsync: args.runAsync,
7510
- // useNames: args.useNames,
7511
- // useEmptyTags: args.useEmptyTags,
7512
- // entityRefs: args.entityRefs,
7513
- // entityTypeName: args.entityTypeName,
7514
- // gridSpec: args.gridSpec,
7515
- // query: queryText
7516
- //}))
7517
- }
7518
- ngOnDestroy() {
7519
- this.subs.forEach(s => s.unsubscribe());
7520
- this.releaseWindowTitle();
7521
- }
7522
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: TruReportView, deps: [{ token: TruDesktopManager }, { token: TruWindowEventHandler }, { token: TruUser }], target: i0.ɵɵFactoryTarget.Component });
7523
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.5", type: TruReportView, selector: "tru-report-view", inputs: { view: "view" }, viewQueries: [{ propertyName: "iframe", first: true, predicate: ["iframe"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div>\r\n <div class=\"view-busy-overlay\" *ngIf=\"isBusy\"></div>\r\n <iframe (load)=\"onLoad(iframe)\" class=\"report-view-frame\"></iframe>\r\n</div>\r\n", styles: [".report-view-frame{position:absolute;inset:0;border-style:none;height:100%;width:100%}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
7524
- }
7525
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: TruReportView, decorators: [{
7526
- type: Component,
7527
- args: [{ selector: 'tru-report-view', template: "<div>\r\n <div class=\"view-busy-overlay\" *ngIf=\"isBusy\"></div>\r\n <iframe (load)=\"onLoad(iframe)\" class=\"report-view-frame\"></iframe>\r\n</div>\r\n", styles: [".report-view-frame{position:absolute;inset:0;border-style:none;height:100%;width:100%}\n"] }]
7528
- }], ctorParameters: () => [{ type: TruDesktopManager }, { type: TruWindowEventHandler }, { type: TruUser }], propDecorators: { view: [{
7529
- type: Input
7530
- }], iframe: [{
7531
- type: ViewChild,
7532
- args: ['iframe', { static: false }]
7533
- }] } });
7534
-
7535
7538
  class TruReportViewModule {
7536
7539
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: TruReportViewModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
7537
7540
  static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.5", ngImport: i0, type: TruReportViewModule, declarations: [TruReportView], imports: [CommonModule,