@trudb/tru-common-lib 0.1.205 → 0.1.206
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.
|
@@ -5289,6 +5289,135 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImpor
|
|
|
5289
5289
|
type: Injectable
|
|
5290
5290
|
}], ctorParameters: () => [{ type: TruDataContext }, { type: TruTextManager }, { type: TruDesktopManager }, { type: TruWindowEventHandler }, { type: TruUiNotification }, { type: TruModelTypeLookup }, { type: TruGlobalDataContext }, { type: TruUser }] });
|
|
5291
5291
|
|
|
5292
|
+
class TruReportManager {
|
|
5293
|
+
dataContext;
|
|
5294
|
+
actionInvoke;
|
|
5295
|
+
modelTypeLookup;
|
|
5296
|
+
appEnvironment;
|
|
5297
|
+
user;
|
|
5298
|
+
constructor(dataContext, actionInvoke, modelTypeLookup, appEnvironment, user) {
|
|
5299
|
+
this.dataContext = dataContext;
|
|
5300
|
+
this.actionInvoke = actionInvoke;
|
|
5301
|
+
this.modelTypeLookup = modelTypeLookup;
|
|
5302
|
+
this.appEnvironment = appEnvironment;
|
|
5303
|
+
this.user = user;
|
|
5304
|
+
}
|
|
5305
|
+
setupMenuImpl(report, menu, getActionRefs, enabled) {
|
|
5306
|
+
var reportRef = report.Ref;
|
|
5307
|
+
var mimeRef = report.ReportMimeTypeStdMimeTypeRef;
|
|
5308
|
+
menu[0].choices.push({
|
|
5309
|
+
hasAccess: function () {
|
|
5310
|
+
return true;
|
|
5311
|
+
},
|
|
5312
|
+
label: report.ReportName,
|
|
5313
|
+
enabled: function () {
|
|
5314
|
+
return enabled();
|
|
5315
|
+
},
|
|
5316
|
+
reportRef: reportRef,
|
|
5317
|
+
mimeRef: mimeRef,
|
|
5318
|
+
fire: function () {
|
|
5319
|
+
this.actionInvoke.processCustomReport(this.reportRef, getActionRefs(), this.mimeRef);
|
|
5320
|
+
}
|
|
5321
|
+
});
|
|
5322
|
+
}
|
|
5323
|
+
get(url, method, callback, params = null) {
|
|
5324
|
+
let obj = new XMLHttpRequest();
|
|
5325
|
+
try {
|
|
5326
|
+
obj = new XMLHttpRequest();
|
|
5327
|
+
}
|
|
5328
|
+
catch (e) {
|
|
5329
|
+
alert("Your browser does not support Ajax.");
|
|
5330
|
+
}
|
|
5331
|
+
obj.onreadystatechange = function () {
|
|
5332
|
+
if (obj.readyState == 4) {
|
|
5333
|
+
callback(obj);
|
|
5334
|
+
}
|
|
5335
|
+
};
|
|
5336
|
+
obj.open(method, url, true);
|
|
5337
|
+
obj.send(params);
|
|
5338
|
+
return obj;
|
|
5339
|
+
}
|
|
5340
|
+
setupMenu(report, menu, getActionRefs, enabled) {
|
|
5341
|
+
return new Observable(obs => {
|
|
5342
|
+
this.dataContext.entityAccess().search(this.modelTypeLookup.getType('TruDbCloudFile'), (query) => {
|
|
5343
|
+
var predicate = new breeze.Predicate('TruDbCloudFileRef', breeze.FilterQueryOp.Equals, report.ReportTruDbCloudFileRef);
|
|
5344
|
+
return query.where(predicate);
|
|
5345
|
+
}, null, false).subscribe((cloudFiles) => {
|
|
5346
|
+
if (cloudFiles.length) {
|
|
5347
|
+
//there is a cloud file associated with this report
|
|
5348
|
+
if (cloudFiles[0].Filename.endsWith(".mrt")) {
|
|
5349
|
+
//this is a stimulsoft report, check if license file exists
|
|
5350
|
+
this.dataContext.entityAccess().search(this.modelTypeLookup.getType('TruDbConfig'), (query) => {
|
|
5351
|
+
var predicate = new breeze.Predicate('Key', breeze.FilterQueryOp.Equals, 'StimulsoftLicensePath');
|
|
5352
|
+
return query.where(predicate);
|
|
5353
|
+
}, null, false).subscribe((config) => {
|
|
5354
|
+
if (!config.length || !config[0].Value) {
|
|
5355
|
+
//do nothing, no menu option will be pushed into the dom since
|
|
5356
|
+
//we couldn't find the required license path info in the config
|
|
5357
|
+
obs.next(menu);
|
|
5358
|
+
obs.complete();
|
|
5359
|
+
}
|
|
5360
|
+
else {
|
|
5361
|
+
//var path = config[0].Value.replace("~", "");
|
|
5362
|
+
//this.get(path, 'get', (data: any) => {
|
|
5363
|
+
// if (data.length) {
|
|
5364
|
+
// }
|
|
5365
|
+
//});
|
|
5366
|
+
this.setupMenuImpl(report, menu, getActionRefs, enabled);
|
|
5367
|
+
obs.next(menu);
|
|
5368
|
+
obs.complete();
|
|
5369
|
+
}
|
|
5370
|
+
});
|
|
5371
|
+
}
|
|
5372
|
+
else {
|
|
5373
|
+
//there is a cloud file associated with this report, but it isn't an mrt report push menu option
|
|
5374
|
+
//since this a different type of report (word, excel)
|
|
5375
|
+
this.setupMenuImpl(report, menu, getActionRefs, enabled);
|
|
5376
|
+
obs.next(menu);
|
|
5377
|
+
obs.complete();
|
|
5378
|
+
}
|
|
5379
|
+
}
|
|
5380
|
+
else {
|
|
5381
|
+
//no cloud file, so no need to check for license, push menu option
|
|
5382
|
+
//since this could be a non mrt report (word, excel)
|
|
5383
|
+
this.setupMenuImpl(report, menu, getActionRefs, enabled);
|
|
5384
|
+
obs.next(menu);
|
|
5385
|
+
obs.complete();
|
|
5386
|
+
}
|
|
5387
|
+
});
|
|
5388
|
+
});
|
|
5389
|
+
}
|
|
5390
|
+
queryReports = (tableName, menu, getActionRefs, enabled) => {
|
|
5391
|
+
return new Observable(obs => {
|
|
5392
|
+
this.appEnvironment.globalDataContext?.entityAccess().searchCacheOnly(this.modelTypeLookup.getType('TruDbReport'), (query) => {
|
|
5393
|
+
var predicate = new breeze.Predicate('OwnerTruDbUserRef', breeze.FilterQueryOp.Equals, this.user.activeUserRef)
|
|
5394
|
+
.or('OwnerTruDbUserRef', breeze.FilterQueryOp.Equals, null)
|
|
5395
|
+
.or('Public', breeze.FilterQueryOp.Equals, true)
|
|
5396
|
+
.and('TableName', breeze.FilterQueryOp.Equals, tableName);
|
|
5397
|
+
return query.where(predicate);
|
|
5398
|
+
}).subscribe((reports) => {
|
|
5399
|
+
if (reports.length) {
|
|
5400
|
+
let obsList = [];
|
|
5401
|
+
for (var i = 0; i < reports.length; i++) {
|
|
5402
|
+
obsList.push(this.setupMenu(reports[i], menu, getActionRefs, enabled));
|
|
5403
|
+
}
|
|
5404
|
+
forkJoin(obsList).subscribe(response => {
|
|
5405
|
+
obs.next(menu);
|
|
5406
|
+
});
|
|
5407
|
+
}
|
|
5408
|
+
else {
|
|
5409
|
+
obs.next(menu);
|
|
5410
|
+
}
|
|
5411
|
+
});
|
|
5412
|
+
});
|
|
5413
|
+
};
|
|
5414
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: TruReportManager, deps: [{ token: TruDataContext }, { token: TruActionInvoke }, { token: TruModelTypeLookup }, { token: TruAppEnvironment }, { token: TruUser }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5415
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: TruReportManager });
|
|
5416
|
+
}
|
|
5417
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: TruReportManager, decorators: [{
|
|
5418
|
+
type: Injectable
|
|
5419
|
+
}], ctorParameters: () => [{ type: TruDataContext }, { type: TruActionInvoke }, { type: TruModelTypeLookup }, { type: TruAppEnvironment }, { type: TruUser }] });
|
|
5420
|
+
|
|
5292
5421
|
class TruDesktopResizable {
|
|
5293
5422
|
elementRef;
|
|
5294
5423
|
window;
|
|
@@ -5878,11 +6007,11 @@ class TruDesktopWindow {
|
|
|
5878
6007
|
this.subs.forEach(s => s.unsubscribe());
|
|
5879
6008
|
}
|
|
5880
6009
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: TruDesktopWindow, deps: [{ token: TruDataContext }, { token: TruUiNotification }, { token: TruTextManager }, { token: TruWindowEventHandler }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
5881
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.5", type: TruDesktopWindow, selector: "tru-desktop-window", inputs: { window: "window", viewportCtrl: "viewportCtrl", desktopCtrl: "desktopCtrl" }, providers: [TruDataContext, TruEntityAccessor, TruWindowEventHandler, TruActionInvoke], ngImport: i0, template: "<div class=\"desktop-window-container\"\r\n [ngClass]=\"{'desktop-window-active': window.active, 'desktop-window-maximized': window.maximized}\"\r\n [ngStyle]=\"{'z-index': window.zIndex, 'top': window.top, 'left': window.left, 'right': window.right, 'bottom': window.bottom, 'height': window.height, 'width': window.width, 'min-height': window.minHeight, 'minWidth': window.minWidth}\"\r\n [style.offsetLeft.px]=\"x\"\r\n [style.offsetTop.px]=\"y\"\r\n (mousedown)=\"activate()\"\r\n [hidden]=\"window.minimized\">\r\n <div class=\"desktop-window-header\" [ngClass]=\"{'desktop-window-maximized': window.maximized, 'desktop-window-opacity': !window.active}\">\r\n <div class=\"toolbar-window-navigation\">\r\n <tru-toolbar>\r\n <tru-toolbar-button [icon]=\"'tru-toolbar-previous-icon'\" [tooltip]=\"'Go Back One View - [Alt + Left]'\" (click)=\"previousView()\"></tru-toolbar-button>\r\n <tru-toolbar-button [icon]=\"'tru-toolbar-next-icon'\" [tooltip]=\"'Go Forward One View - [Alt + Right]'\" (click)=\"nextView()\"></tru-toolbar-button>\r\n <tru-toolbar-button [icon]=\"'tru-toolbar-save-icon'\" class=\"desktop-window-save-icon\" [ngClass]=\"{'desktop-window-save-icon-has-changes': hasChanges()}\" [tooltip]=\"'Save - [Ctrl + S]'\" (click)=\"save()\"></tru-toolbar-button>\r\n <tru-toolbar-button [icon]=\"'tru-toolbar-revert-icon'\" class=\"desktop-window-revert-icon\" [ngClass]=\"{'desktop-window-revert-icon-has-changes': hasChanges()}\" [tooltip]=\"'Revert - [Ctrl + Shift + R]'\" (click)=\"revert()\"></tru-toolbar-button>\r\n <tru-toolbar-separator></tru-toolbar-separator>\r\n </tru-toolbar>\r\n </div>\r\n <div class=\"desktop-window-title\" (dblclick)=\"maximize()\" (mousedown)=\"windowTitleMouseDown($event)\">\r\n <div class=\"desktop-click-through\">\r\n <div class=\"desktop-text\">{{window.title}}</div>\r\n </div>\r\n </div>\r\n <div class=\"desktop-window-action\">\r\n <tru-toolbar>\r\n <tru-toolbar-button [icon]=\"'tru-toolbar-minimize-icon'\" [tooltip]=\"'Minimize - [Alt + N]'\" (click)=\"minimize()\"></tru-toolbar-button>\r\n <tru-toolbar-button *ngIf=\"!window.maximized\" [icon]=\"'tru-toolbar-maximize-icon'\" [tooltip]=\"'Maximize Window - [Alt + M]'\" (click)=\"maximize()\" class=\"maximize\"></tru-toolbar-button>\r\n <tru-toolbar-button *ngIf=\"window.maximized\" [icon]=\"'tru-toolbar-restore-icon'\" [tooltip]=\"'Restore Window - [Alt + M]'\" (click)=\"maximize()\" class=\"maximize\"></tru-toolbar-button>\r\n <tru-toolbar-button [icon]=\"'tru-toolbar-close-icon'\" [tooltip]=\"'Close Window - [Alt + SHIFT + X]'\" (click)=\"close()\"></tru-toolbar-button>\r\n </tru-toolbar>\r\n </div>\r\n </div>\r\n <fieldset ng-disabled=\"!window.active\" class=\"desktop-window-fieldset\" [ngClass]=\"{'desktop-window-opacity': !window.active}\">\r\n <div class=\"desktop-window-content\">\r\n <div *ngFor=\"let view of window.views\">\r\n <tru-desktop-view [view]=\"view\" [active]=\"view.active\" [hidden]=\"!view.active\"><ng-template></ng-template></tru-desktop-view>\r\n </div>\r\n </div>\r\n </fieldset>\r\n <span class=\"desktop-window-resizable-handle desktop-window-resizable-nw\" tru-desktop-resizable [window]=\"window\" *ngIf=\"!window.maximized\" [direction]=\"'nw'\"></span>\r\n <span class=\"desktop-window-resizable-handle desktop-window-resizable-ne\" tru-desktop-resizable [window]=\"window\" *ngIf=\"!window.maximized\" [direction]=\"'ne'\"></span>\r\n <span class=\"desktop-window-resizable-handle desktop-window-resizable-sw\" tru-desktop-resizable [window]=\"window\" *ngIf=\"!window.maximized\" [direction]=\"'sw'\"></span>\r\n <span class=\"desktop-window-resizable-handle desktop-window-resizable-se\" tru-desktop-resizable [window]=\"window\" *ngIf=\"!window.maximized\" [direction]=\"'se'\"></span>\r\n <span class=\"desktop-window-resizable-handle desktop-window-resizable-n\" tru-desktop-resizable [window]=\"window\" *ngIf=\"!window.maximized\" [direction]=\"'n'\"></span>\r\n <span class=\"desktop-window-resizable-handle desktop-window-resizable-s\" tru-desktop-resizable [window]=\"window\" *ngIf=\"!window.maximized\" [direction]=\"'s'\"></span>\r\n <span class=\"desktop-window-resizable-handle desktop-window-resizable-w\" tru-desktop-resizable [window]=\"window\" *ngIf=\"!window.maximized\" [direction]=\"'w'\"></span>\r\n <span class=\"desktop-window-resizable-handle desktop-window-resizable-e\" tru-desktop-resizable [window]=\"window\" *ngIf=\"!window.maximized\" [direction]=\"'e'\"></span>\r\n</div>\r\n", styles: ["body{-webkit-user-select:none;-moz-user-select:-moz-none;-ms-user-select:none;user-select:none}input,textarea{-moz-user-select:text}.desktop-text{-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);font-size:14px;line-height:1;color:#333}.desktop-wrapper{position:absolute!important;inset:0;background:#fff;overflow:hidden}.desktop-relative{position:relative}.desktop-display-none{display:none}.desktop-click-through{pointer-events:none}.desktop-menubar-container{position:absolute!important;top:0;left:0;right:0;height:26px;background:#f8f8f8;border-bottom:1px solid #e7e7e7;padding-left:5px}\n", ".desktop-window-container{position:absolute!important;background-color:#fff;background-clip:padding-box;border-radius:0;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px #0003;border:1px solid #e7e7e7}.desktop-window-header{position:absolute!important;top:0;left:0;right:0;height:27px;background:#fff;border-top-left-radius:0;border-top-right-radius:0;border-bottom:1px solid #e7e7e7}.desktop-window-content{position:absolute!important;inset:27px 0 0;background:#fff;overflow:hidden}.desktop-window-busy-overlay{position:absolute!important;inset:27px 0 0;background:#fff;overflow:hidden;z-index:1000;background-repeat:no-repeat;background-position:center center}.desktop-window-fieldset{padding:0;margin:0;border:0}.desktop-window-statusbar{position:absolute!important;left:0;right:0;bottom:0;height:23px;background:#fff;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top:1px solid #e7e7e7}.desktop-window-statusbar-container{position:absolute;top:1px;left:2px;right:0}.desktop-window-navigation{position:absolute!important;top:0;left:0;bottom:0;width:105px;background:transparent}.desktop-window-navigation-button-group{position:absolute!important;left:0;padding:0;margin:0}.desktop-window-navigation-button-group button{margin-left:0!important}.desktop-window-navigation-button-group-split{position:absolute!important;top:2px;right:6px}.desktop-window-title{position:absolute!important;inset:0 80px 0 110px;height:27px;background:transparent;cursor:inherit;outline:0;margin-top:2px}.desktop-window-title-hidden-nav{left:5px!important}.desktop-window-title-hidden-nav-with-buttons{left:55px!important}.desktop-window-title>div{position:absolute!important;top:5px;left:3px;cursor:default}.desktop-window-title>div>div{font-size:14px;font-weight:700}.desktop-window-action{position:absolute!important;top:0;right:0;bottom:0;width:80px;background:transparent}.desktop-window-action-button-group{position:absolute!important;top:2px;right:6px}.desktop-window-action .desktop-window-navigation-button-group{left:unset!important;right:0!important}.desktop-window-opacity{opacity:.5}.desktop-window-close-button:hover{background-color:maroon;color:#fff}.desktop-window-active{border:1px solid #6b6b6b!important;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.4);box-shadow:0 5px 10px #0006}.desktop-window-maximized{border-radius:0;-webkit-box-shadow:0 0 0 rgba(0,0,0,0);box-shadow:0 0 #0000;border-top-color:#f8f8f8!important;border-bottom-color:#f8f8f8!important}.desktop-window-is-dirty{display:block;float:left;height:15px;width:15px;font-size:15px;color:orange;margin-left:3px}.desktop-window-is-invalid{display:block;float:left;height:15px;width:15px;font-size:15px;color:red;margin-left:3px}.desktop-window-resizable-nw{position:absolute!important;overflow:hidden;width:10px;height:10px;left:-5px;top:-5px;z-index:103;cursor:nw-resize;opacity:0}.desktop-window-resizable-ne{position:absolute!important;overflow:hidden;width:10px;height:10px;right:-5px;top:-5px;z-index:103;cursor:ne-resize;opacity:0}.desktop-window-resizable-sw{position:absolute!important;overflow:hidden;width:10px;height:10px;left:-5px;bottom:-5px;z-index:103;cursor:sw-resize;opacity:0}.desktop-window-resizable-se{position:absolute!important;overflow:hidden;width:10px;height:10px;right:-5px;bottom:-5px;z-index:103;cursor:se-resize;opacity:0}.desktop-window-resizable-n{position:absolute!important;top:0;left:10px;right:10px;overflow:hidden;height:5px;z-index:102;cursor:s-resize;opacity:0;margin-top:-5px}.desktop-window-resizable-s{position:absolute!important;left:10px;right:10px;bottom:0;overflow:hidden;height:5px;z-index:102;cursor:s-resize;opacity:0;margin-bottom:-5px}.desktop-window-resizable-w{position:absolute!important;top:10px;left:0;bottom:10px;overflow:hidden;width:5px;z-index:102;cursor:w-resize;opacity:0;margin-left:-5px}.desktop-window-resizable-e{position:absolute!important;top:10px;right:0;bottom:10px;overflow:hidden;width:5px;z-index:102;cursor:e-resize;opacity:0;margin-right:-5px}div.desktop-window-resizable-handle{display:none!important;visibility:hidden!important}.desktop-window-save-icon,.desktop-window-revert-icon{opacity:.5}.desktop-window-save-icon-has-changes,.desktop-window-revert-icon-has-changes{opacity:1}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: TruDesktopResizable, selector: "[tru-desktop-resizable]", inputs: ["window", "maximized", "direction"] }, { kind: "component", type: TruDesktopView, selector: "tru-desktop-view", inputs: ["view", "active"] }, { kind: "component", type: TruToolbar, selector: "tru-toolbar", inputs: ["config"] }, { kind: "component", type: TruToolbarButton, selector: "tru-toolbar-button", inputs: ["config", "icon", "text", "disabled", "tooltip", "type"], outputs: ["onClick", "onKeydown"] }, { kind: "component", type: TruToolbarSeparator, selector: "tru-toolbar-separator" }] });
|
|
6010
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.5", type: TruDesktopWindow, selector: "tru-desktop-window", inputs: { window: "window", viewportCtrl: "viewportCtrl", desktopCtrl: "desktopCtrl" }, providers: [TruDataContext, TruEntityAccessor, TruWindowEventHandler, TruReportManager, TruActionInvoke], ngImport: i0, template: "<div class=\"desktop-window-container\"\r\n [ngClass]=\"{'desktop-window-active': window.active, 'desktop-window-maximized': window.maximized}\"\r\n [ngStyle]=\"{'z-index': window.zIndex, 'top': window.top, 'left': window.left, 'right': window.right, 'bottom': window.bottom, 'height': window.height, 'width': window.width, 'min-height': window.minHeight, 'minWidth': window.minWidth}\"\r\n [style.offsetLeft.px]=\"x\"\r\n [style.offsetTop.px]=\"y\"\r\n (mousedown)=\"activate()\"\r\n [hidden]=\"window.minimized\">\r\n <div class=\"desktop-window-header\" [ngClass]=\"{'desktop-window-maximized': window.maximized, 'desktop-window-opacity': !window.active}\">\r\n <div class=\"toolbar-window-navigation\">\r\n <tru-toolbar>\r\n <tru-toolbar-button [icon]=\"'tru-toolbar-previous-icon'\" [tooltip]=\"'Go Back One View - [Alt + Left]'\" (click)=\"previousView()\"></tru-toolbar-button>\r\n <tru-toolbar-button [icon]=\"'tru-toolbar-next-icon'\" [tooltip]=\"'Go Forward One View - [Alt + Right]'\" (click)=\"nextView()\"></tru-toolbar-button>\r\n <tru-toolbar-button [icon]=\"'tru-toolbar-save-icon'\" class=\"desktop-window-save-icon\" [ngClass]=\"{'desktop-window-save-icon-has-changes': hasChanges()}\" [tooltip]=\"'Save - [Ctrl + S]'\" (click)=\"save()\"></tru-toolbar-button>\r\n <tru-toolbar-button [icon]=\"'tru-toolbar-revert-icon'\" class=\"desktop-window-revert-icon\" [ngClass]=\"{'desktop-window-revert-icon-has-changes': hasChanges()}\" [tooltip]=\"'Revert - [Ctrl + Shift + R]'\" (click)=\"revert()\"></tru-toolbar-button>\r\n <tru-toolbar-separator></tru-toolbar-separator>\r\n </tru-toolbar>\r\n </div>\r\n <div class=\"desktop-window-title\" (dblclick)=\"maximize()\" (mousedown)=\"windowTitleMouseDown($event)\">\r\n <div class=\"desktop-click-through\">\r\n <div class=\"desktop-text\">{{window.title}}</div>\r\n </div>\r\n </div>\r\n <div class=\"desktop-window-action\">\r\n <tru-toolbar>\r\n <tru-toolbar-button [icon]=\"'tru-toolbar-minimize-icon'\" [tooltip]=\"'Minimize - [Alt + N]'\" (click)=\"minimize()\"></tru-toolbar-button>\r\n <tru-toolbar-button *ngIf=\"!window.maximized\" [icon]=\"'tru-toolbar-maximize-icon'\" [tooltip]=\"'Maximize Window - [Alt + M]'\" (click)=\"maximize()\" class=\"maximize\"></tru-toolbar-button>\r\n <tru-toolbar-button *ngIf=\"window.maximized\" [icon]=\"'tru-toolbar-restore-icon'\" [tooltip]=\"'Restore Window - [Alt + M]'\" (click)=\"maximize()\" class=\"maximize\"></tru-toolbar-button>\r\n <tru-toolbar-button [icon]=\"'tru-toolbar-close-icon'\" [tooltip]=\"'Close Window - [Alt + SHIFT + X]'\" (click)=\"close()\"></tru-toolbar-button>\r\n </tru-toolbar>\r\n </div>\r\n </div>\r\n <fieldset ng-disabled=\"!window.active\" class=\"desktop-window-fieldset\" [ngClass]=\"{'desktop-window-opacity': !window.active}\">\r\n <div class=\"desktop-window-content\">\r\n <div *ngFor=\"let view of window.views\">\r\n <tru-desktop-view [view]=\"view\" [active]=\"view.active\" [hidden]=\"!view.active\"><ng-template></ng-template></tru-desktop-view>\r\n </div>\r\n </div>\r\n </fieldset>\r\n <span class=\"desktop-window-resizable-handle desktop-window-resizable-nw\" tru-desktop-resizable [window]=\"window\" *ngIf=\"!window.maximized\" [direction]=\"'nw'\"></span>\r\n <span class=\"desktop-window-resizable-handle desktop-window-resizable-ne\" tru-desktop-resizable [window]=\"window\" *ngIf=\"!window.maximized\" [direction]=\"'ne'\"></span>\r\n <span class=\"desktop-window-resizable-handle desktop-window-resizable-sw\" tru-desktop-resizable [window]=\"window\" *ngIf=\"!window.maximized\" [direction]=\"'sw'\"></span>\r\n <span class=\"desktop-window-resizable-handle desktop-window-resizable-se\" tru-desktop-resizable [window]=\"window\" *ngIf=\"!window.maximized\" [direction]=\"'se'\"></span>\r\n <span class=\"desktop-window-resizable-handle desktop-window-resizable-n\" tru-desktop-resizable [window]=\"window\" *ngIf=\"!window.maximized\" [direction]=\"'n'\"></span>\r\n <span class=\"desktop-window-resizable-handle desktop-window-resizable-s\" tru-desktop-resizable [window]=\"window\" *ngIf=\"!window.maximized\" [direction]=\"'s'\"></span>\r\n <span class=\"desktop-window-resizable-handle desktop-window-resizable-w\" tru-desktop-resizable [window]=\"window\" *ngIf=\"!window.maximized\" [direction]=\"'w'\"></span>\r\n <span class=\"desktop-window-resizable-handle desktop-window-resizable-e\" tru-desktop-resizable [window]=\"window\" *ngIf=\"!window.maximized\" [direction]=\"'e'\"></span>\r\n</div>\r\n", styles: ["body{-webkit-user-select:none;-moz-user-select:-moz-none;-ms-user-select:none;user-select:none}input,textarea{-moz-user-select:text}.desktop-text{-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);font-size:14px;line-height:1;color:#333}.desktop-wrapper{position:absolute!important;inset:0;background:#fff;overflow:hidden}.desktop-relative{position:relative}.desktop-display-none{display:none}.desktop-click-through{pointer-events:none}.desktop-menubar-container{position:absolute!important;top:0;left:0;right:0;height:26px;background:#f8f8f8;border-bottom:1px solid #e7e7e7;padding-left:5px}\n", ".desktop-window-container{position:absolute!important;background-color:#fff;background-clip:padding-box;border-radius:0;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px #0003;border:1px solid #e7e7e7}.desktop-window-header{position:absolute!important;top:0;left:0;right:0;height:27px;background:#fff;border-top-left-radius:0;border-top-right-radius:0;border-bottom:1px solid #e7e7e7}.desktop-window-content{position:absolute!important;inset:27px 0 0;background:#fff;overflow:hidden}.desktop-window-busy-overlay{position:absolute!important;inset:27px 0 0;background:#fff;overflow:hidden;z-index:1000;background-repeat:no-repeat;background-position:center center}.desktop-window-fieldset{padding:0;margin:0;border:0}.desktop-window-statusbar{position:absolute!important;left:0;right:0;bottom:0;height:23px;background:#fff;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top:1px solid #e7e7e7}.desktop-window-statusbar-container{position:absolute;top:1px;left:2px;right:0}.desktop-window-navigation{position:absolute!important;top:0;left:0;bottom:0;width:105px;background:transparent}.desktop-window-navigation-button-group{position:absolute!important;left:0;padding:0;margin:0}.desktop-window-navigation-button-group button{margin-left:0!important}.desktop-window-navigation-button-group-split{position:absolute!important;top:2px;right:6px}.desktop-window-title{position:absolute!important;inset:0 80px 0 110px;height:27px;background:transparent;cursor:inherit;outline:0;margin-top:2px}.desktop-window-title-hidden-nav{left:5px!important}.desktop-window-title-hidden-nav-with-buttons{left:55px!important}.desktop-window-title>div{position:absolute!important;top:5px;left:3px;cursor:default}.desktop-window-title>div>div{font-size:14px;font-weight:700}.desktop-window-action{position:absolute!important;top:0;right:0;bottom:0;width:80px;background:transparent}.desktop-window-action-button-group{position:absolute!important;top:2px;right:6px}.desktop-window-action .desktop-window-navigation-button-group{left:unset!important;right:0!important}.desktop-window-opacity{opacity:.5}.desktop-window-close-button:hover{background-color:maroon;color:#fff}.desktop-window-active{border:1px solid #6b6b6b!important;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.4);box-shadow:0 5px 10px #0006}.desktop-window-maximized{border-radius:0;-webkit-box-shadow:0 0 0 rgba(0,0,0,0);box-shadow:0 0 #0000;border-top-color:#f8f8f8!important;border-bottom-color:#f8f8f8!important}.desktop-window-is-dirty{display:block;float:left;height:15px;width:15px;font-size:15px;color:orange;margin-left:3px}.desktop-window-is-invalid{display:block;float:left;height:15px;width:15px;font-size:15px;color:red;margin-left:3px}.desktop-window-resizable-nw{position:absolute!important;overflow:hidden;width:10px;height:10px;left:-5px;top:-5px;z-index:103;cursor:nw-resize;opacity:0}.desktop-window-resizable-ne{position:absolute!important;overflow:hidden;width:10px;height:10px;right:-5px;top:-5px;z-index:103;cursor:ne-resize;opacity:0}.desktop-window-resizable-sw{position:absolute!important;overflow:hidden;width:10px;height:10px;left:-5px;bottom:-5px;z-index:103;cursor:sw-resize;opacity:0}.desktop-window-resizable-se{position:absolute!important;overflow:hidden;width:10px;height:10px;right:-5px;bottom:-5px;z-index:103;cursor:se-resize;opacity:0}.desktop-window-resizable-n{position:absolute!important;top:0;left:10px;right:10px;overflow:hidden;height:5px;z-index:102;cursor:s-resize;opacity:0;margin-top:-5px}.desktop-window-resizable-s{position:absolute!important;left:10px;right:10px;bottom:0;overflow:hidden;height:5px;z-index:102;cursor:s-resize;opacity:0;margin-bottom:-5px}.desktop-window-resizable-w{position:absolute!important;top:10px;left:0;bottom:10px;overflow:hidden;width:5px;z-index:102;cursor:w-resize;opacity:0;margin-left:-5px}.desktop-window-resizable-e{position:absolute!important;top:10px;right:0;bottom:10px;overflow:hidden;width:5px;z-index:102;cursor:e-resize;opacity:0;margin-right:-5px}div.desktop-window-resizable-handle{display:none!important;visibility:hidden!important}.desktop-window-save-icon,.desktop-window-revert-icon{opacity:.5}.desktop-window-save-icon-has-changes,.desktop-window-revert-icon-has-changes{opacity:1}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: TruDesktopResizable, selector: "[tru-desktop-resizable]", inputs: ["window", "maximized", "direction"] }, { kind: "component", type: TruDesktopView, selector: "tru-desktop-view", inputs: ["view", "active"] }, { kind: "component", type: TruToolbar, selector: "tru-toolbar", inputs: ["config"] }, { kind: "component", type: TruToolbarButton, selector: "tru-toolbar-button", inputs: ["config", "icon", "text", "disabled", "tooltip", "type"], outputs: ["onClick", "onKeydown"] }, { kind: "component", type: TruToolbarSeparator, selector: "tru-toolbar-separator" }] });
|
|
5882
6011
|
}
|
|
5883
6012
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: TruDesktopWindow, decorators: [{
|
|
5884
6013
|
type: Component,
|
|
5885
|
-
args: [{ selector: 'tru-desktop-window', providers: [TruDataContext, TruEntityAccessor, TruWindowEventHandler, TruActionInvoke], template: "<div class=\"desktop-window-container\"\r\n [ngClass]=\"{'desktop-window-active': window.active, 'desktop-window-maximized': window.maximized}\"\r\n [ngStyle]=\"{'z-index': window.zIndex, 'top': window.top, 'left': window.left, 'right': window.right, 'bottom': window.bottom, 'height': window.height, 'width': window.width, 'min-height': window.minHeight, 'minWidth': window.minWidth}\"\r\n [style.offsetLeft.px]=\"x\"\r\n [style.offsetTop.px]=\"y\"\r\n (mousedown)=\"activate()\"\r\n [hidden]=\"window.minimized\">\r\n <div class=\"desktop-window-header\" [ngClass]=\"{'desktop-window-maximized': window.maximized, 'desktop-window-opacity': !window.active}\">\r\n <div class=\"toolbar-window-navigation\">\r\n <tru-toolbar>\r\n <tru-toolbar-button [icon]=\"'tru-toolbar-previous-icon'\" [tooltip]=\"'Go Back One View - [Alt + Left]'\" (click)=\"previousView()\"></tru-toolbar-button>\r\n <tru-toolbar-button [icon]=\"'tru-toolbar-next-icon'\" [tooltip]=\"'Go Forward One View - [Alt + Right]'\" (click)=\"nextView()\"></tru-toolbar-button>\r\n <tru-toolbar-button [icon]=\"'tru-toolbar-save-icon'\" class=\"desktop-window-save-icon\" [ngClass]=\"{'desktop-window-save-icon-has-changes': hasChanges()}\" [tooltip]=\"'Save - [Ctrl + S]'\" (click)=\"save()\"></tru-toolbar-button>\r\n <tru-toolbar-button [icon]=\"'tru-toolbar-revert-icon'\" class=\"desktop-window-revert-icon\" [ngClass]=\"{'desktop-window-revert-icon-has-changes': hasChanges()}\" [tooltip]=\"'Revert - [Ctrl + Shift + R]'\" (click)=\"revert()\"></tru-toolbar-button>\r\n <tru-toolbar-separator></tru-toolbar-separator>\r\n </tru-toolbar>\r\n </div>\r\n <div class=\"desktop-window-title\" (dblclick)=\"maximize()\" (mousedown)=\"windowTitleMouseDown($event)\">\r\n <div class=\"desktop-click-through\">\r\n <div class=\"desktop-text\">{{window.title}}</div>\r\n </div>\r\n </div>\r\n <div class=\"desktop-window-action\">\r\n <tru-toolbar>\r\n <tru-toolbar-button [icon]=\"'tru-toolbar-minimize-icon'\" [tooltip]=\"'Minimize - [Alt + N]'\" (click)=\"minimize()\"></tru-toolbar-button>\r\n <tru-toolbar-button *ngIf=\"!window.maximized\" [icon]=\"'tru-toolbar-maximize-icon'\" [tooltip]=\"'Maximize Window - [Alt + M]'\" (click)=\"maximize()\" class=\"maximize\"></tru-toolbar-button>\r\n <tru-toolbar-button *ngIf=\"window.maximized\" [icon]=\"'tru-toolbar-restore-icon'\" [tooltip]=\"'Restore Window - [Alt + M]'\" (click)=\"maximize()\" class=\"maximize\"></tru-toolbar-button>\r\n <tru-toolbar-button [icon]=\"'tru-toolbar-close-icon'\" [tooltip]=\"'Close Window - [Alt + SHIFT + X]'\" (click)=\"close()\"></tru-toolbar-button>\r\n </tru-toolbar>\r\n </div>\r\n </div>\r\n <fieldset ng-disabled=\"!window.active\" class=\"desktop-window-fieldset\" [ngClass]=\"{'desktop-window-opacity': !window.active}\">\r\n <div class=\"desktop-window-content\">\r\n <div *ngFor=\"let view of window.views\">\r\n <tru-desktop-view [view]=\"view\" [active]=\"view.active\" [hidden]=\"!view.active\"><ng-template></ng-template></tru-desktop-view>\r\n </div>\r\n </div>\r\n </fieldset>\r\n <span class=\"desktop-window-resizable-handle desktop-window-resizable-nw\" tru-desktop-resizable [window]=\"window\" *ngIf=\"!window.maximized\" [direction]=\"'nw'\"></span>\r\n <span class=\"desktop-window-resizable-handle desktop-window-resizable-ne\" tru-desktop-resizable [window]=\"window\" *ngIf=\"!window.maximized\" [direction]=\"'ne'\"></span>\r\n <span class=\"desktop-window-resizable-handle desktop-window-resizable-sw\" tru-desktop-resizable [window]=\"window\" *ngIf=\"!window.maximized\" [direction]=\"'sw'\"></span>\r\n <span class=\"desktop-window-resizable-handle desktop-window-resizable-se\" tru-desktop-resizable [window]=\"window\" *ngIf=\"!window.maximized\" [direction]=\"'se'\"></span>\r\n <span class=\"desktop-window-resizable-handle desktop-window-resizable-n\" tru-desktop-resizable [window]=\"window\" *ngIf=\"!window.maximized\" [direction]=\"'n'\"></span>\r\n <span class=\"desktop-window-resizable-handle desktop-window-resizable-s\" tru-desktop-resizable [window]=\"window\" *ngIf=\"!window.maximized\" [direction]=\"'s'\"></span>\r\n <span class=\"desktop-window-resizable-handle desktop-window-resizable-w\" tru-desktop-resizable [window]=\"window\" *ngIf=\"!window.maximized\" [direction]=\"'w'\"></span>\r\n <span class=\"desktop-window-resizable-handle desktop-window-resizable-e\" tru-desktop-resizable [window]=\"window\" *ngIf=\"!window.maximized\" [direction]=\"'e'\"></span>\r\n</div>\r\n", styles: ["body{-webkit-user-select:none;-moz-user-select:-moz-none;-ms-user-select:none;user-select:none}input,textarea{-moz-user-select:text}.desktop-text{-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);font-size:14px;line-height:1;color:#333}.desktop-wrapper{position:absolute!important;inset:0;background:#fff;overflow:hidden}.desktop-relative{position:relative}.desktop-display-none{display:none}.desktop-click-through{pointer-events:none}.desktop-menubar-container{position:absolute!important;top:0;left:0;right:0;height:26px;background:#f8f8f8;border-bottom:1px solid #e7e7e7;padding-left:5px}\n", ".desktop-window-container{position:absolute!important;background-color:#fff;background-clip:padding-box;border-radius:0;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px #0003;border:1px solid #e7e7e7}.desktop-window-header{position:absolute!important;top:0;left:0;right:0;height:27px;background:#fff;border-top-left-radius:0;border-top-right-radius:0;border-bottom:1px solid #e7e7e7}.desktop-window-content{position:absolute!important;inset:27px 0 0;background:#fff;overflow:hidden}.desktop-window-busy-overlay{position:absolute!important;inset:27px 0 0;background:#fff;overflow:hidden;z-index:1000;background-repeat:no-repeat;background-position:center center}.desktop-window-fieldset{padding:0;margin:0;border:0}.desktop-window-statusbar{position:absolute!important;left:0;right:0;bottom:0;height:23px;background:#fff;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top:1px solid #e7e7e7}.desktop-window-statusbar-container{position:absolute;top:1px;left:2px;right:0}.desktop-window-navigation{position:absolute!important;top:0;left:0;bottom:0;width:105px;background:transparent}.desktop-window-navigation-button-group{position:absolute!important;left:0;padding:0;margin:0}.desktop-window-navigation-button-group button{margin-left:0!important}.desktop-window-navigation-button-group-split{position:absolute!important;top:2px;right:6px}.desktop-window-title{position:absolute!important;inset:0 80px 0 110px;height:27px;background:transparent;cursor:inherit;outline:0;margin-top:2px}.desktop-window-title-hidden-nav{left:5px!important}.desktop-window-title-hidden-nav-with-buttons{left:55px!important}.desktop-window-title>div{position:absolute!important;top:5px;left:3px;cursor:default}.desktop-window-title>div>div{font-size:14px;font-weight:700}.desktop-window-action{position:absolute!important;top:0;right:0;bottom:0;width:80px;background:transparent}.desktop-window-action-button-group{position:absolute!important;top:2px;right:6px}.desktop-window-action .desktop-window-navigation-button-group{left:unset!important;right:0!important}.desktop-window-opacity{opacity:.5}.desktop-window-close-button:hover{background-color:maroon;color:#fff}.desktop-window-active{border:1px solid #6b6b6b!important;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.4);box-shadow:0 5px 10px #0006}.desktop-window-maximized{border-radius:0;-webkit-box-shadow:0 0 0 rgba(0,0,0,0);box-shadow:0 0 #0000;border-top-color:#f8f8f8!important;border-bottom-color:#f8f8f8!important}.desktop-window-is-dirty{display:block;float:left;height:15px;width:15px;font-size:15px;color:orange;margin-left:3px}.desktop-window-is-invalid{display:block;float:left;height:15px;width:15px;font-size:15px;color:red;margin-left:3px}.desktop-window-resizable-nw{position:absolute!important;overflow:hidden;width:10px;height:10px;left:-5px;top:-5px;z-index:103;cursor:nw-resize;opacity:0}.desktop-window-resizable-ne{position:absolute!important;overflow:hidden;width:10px;height:10px;right:-5px;top:-5px;z-index:103;cursor:ne-resize;opacity:0}.desktop-window-resizable-sw{position:absolute!important;overflow:hidden;width:10px;height:10px;left:-5px;bottom:-5px;z-index:103;cursor:sw-resize;opacity:0}.desktop-window-resizable-se{position:absolute!important;overflow:hidden;width:10px;height:10px;right:-5px;bottom:-5px;z-index:103;cursor:se-resize;opacity:0}.desktop-window-resizable-n{position:absolute!important;top:0;left:10px;right:10px;overflow:hidden;height:5px;z-index:102;cursor:s-resize;opacity:0;margin-top:-5px}.desktop-window-resizable-s{position:absolute!important;left:10px;right:10px;bottom:0;overflow:hidden;height:5px;z-index:102;cursor:s-resize;opacity:0;margin-bottom:-5px}.desktop-window-resizable-w{position:absolute!important;top:10px;left:0;bottom:10px;overflow:hidden;width:5px;z-index:102;cursor:w-resize;opacity:0;margin-left:-5px}.desktop-window-resizable-e{position:absolute!important;top:10px;right:0;bottom:10px;overflow:hidden;width:5px;z-index:102;cursor:e-resize;opacity:0;margin-right:-5px}div.desktop-window-resizable-handle{display:none!important;visibility:hidden!important}.desktop-window-save-icon,.desktop-window-revert-icon{opacity:.5}.desktop-window-save-icon-has-changes,.desktop-window-revert-icon-has-changes{opacity:1}\n"] }]
|
|
6014
|
+
args: [{ selector: 'tru-desktop-window', providers: [TruDataContext, TruEntityAccessor, TruWindowEventHandler, TruReportManager, TruActionInvoke], template: "<div class=\"desktop-window-container\"\r\n [ngClass]=\"{'desktop-window-active': window.active, 'desktop-window-maximized': window.maximized}\"\r\n [ngStyle]=\"{'z-index': window.zIndex, 'top': window.top, 'left': window.left, 'right': window.right, 'bottom': window.bottom, 'height': window.height, 'width': window.width, 'min-height': window.minHeight, 'minWidth': window.minWidth}\"\r\n [style.offsetLeft.px]=\"x\"\r\n [style.offsetTop.px]=\"y\"\r\n (mousedown)=\"activate()\"\r\n [hidden]=\"window.minimized\">\r\n <div class=\"desktop-window-header\" [ngClass]=\"{'desktop-window-maximized': window.maximized, 'desktop-window-opacity': !window.active}\">\r\n <div class=\"toolbar-window-navigation\">\r\n <tru-toolbar>\r\n <tru-toolbar-button [icon]=\"'tru-toolbar-previous-icon'\" [tooltip]=\"'Go Back One View - [Alt + Left]'\" (click)=\"previousView()\"></tru-toolbar-button>\r\n <tru-toolbar-button [icon]=\"'tru-toolbar-next-icon'\" [tooltip]=\"'Go Forward One View - [Alt + Right]'\" (click)=\"nextView()\"></tru-toolbar-button>\r\n <tru-toolbar-button [icon]=\"'tru-toolbar-save-icon'\" class=\"desktop-window-save-icon\" [ngClass]=\"{'desktop-window-save-icon-has-changes': hasChanges()}\" [tooltip]=\"'Save - [Ctrl + S]'\" (click)=\"save()\"></tru-toolbar-button>\r\n <tru-toolbar-button [icon]=\"'tru-toolbar-revert-icon'\" class=\"desktop-window-revert-icon\" [ngClass]=\"{'desktop-window-revert-icon-has-changes': hasChanges()}\" [tooltip]=\"'Revert - [Ctrl + Shift + R]'\" (click)=\"revert()\"></tru-toolbar-button>\r\n <tru-toolbar-separator></tru-toolbar-separator>\r\n </tru-toolbar>\r\n </div>\r\n <div class=\"desktop-window-title\" (dblclick)=\"maximize()\" (mousedown)=\"windowTitleMouseDown($event)\">\r\n <div class=\"desktop-click-through\">\r\n <div class=\"desktop-text\">{{window.title}}</div>\r\n </div>\r\n </div>\r\n <div class=\"desktop-window-action\">\r\n <tru-toolbar>\r\n <tru-toolbar-button [icon]=\"'tru-toolbar-minimize-icon'\" [tooltip]=\"'Minimize - [Alt + N]'\" (click)=\"minimize()\"></tru-toolbar-button>\r\n <tru-toolbar-button *ngIf=\"!window.maximized\" [icon]=\"'tru-toolbar-maximize-icon'\" [tooltip]=\"'Maximize Window - [Alt + M]'\" (click)=\"maximize()\" class=\"maximize\"></tru-toolbar-button>\r\n <tru-toolbar-button *ngIf=\"window.maximized\" [icon]=\"'tru-toolbar-restore-icon'\" [tooltip]=\"'Restore Window - [Alt + M]'\" (click)=\"maximize()\" class=\"maximize\"></tru-toolbar-button>\r\n <tru-toolbar-button [icon]=\"'tru-toolbar-close-icon'\" [tooltip]=\"'Close Window - [Alt + SHIFT + X]'\" (click)=\"close()\"></tru-toolbar-button>\r\n </tru-toolbar>\r\n </div>\r\n </div>\r\n <fieldset ng-disabled=\"!window.active\" class=\"desktop-window-fieldset\" [ngClass]=\"{'desktop-window-opacity': !window.active}\">\r\n <div class=\"desktop-window-content\">\r\n <div *ngFor=\"let view of window.views\">\r\n <tru-desktop-view [view]=\"view\" [active]=\"view.active\" [hidden]=\"!view.active\"><ng-template></ng-template></tru-desktop-view>\r\n </div>\r\n </div>\r\n </fieldset>\r\n <span class=\"desktop-window-resizable-handle desktop-window-resizable-nw\" tru-desktop-resizable [window]=\"window\" *ngIf=\"!window.maximized\" [direction]=\"'nw'\"></span>\r\n <span class=\"desktop-window-resizable-handle desktop-window-resizable-ne\" tru-desktop-resizable [window]=\"window\" *ngIf=\"!window.maximized\" [direction]=\"'ne'\"></span>\r\n <span class=\"desktop-window-resizable-handle desktop-window-resizable-sw\" tru-desktop-resizable [window]=\"window\" *ngIf=\"!window.maximized\" [direction]=\"'sw'\"></span>\r\n <span class=\"desktop-window-resizable-handle desktop-window-resizable-se\" tru-desktop-resizable [window]=\"window\" *ngIf=\"!window.maximized\" [direction]=\"'se'\"></span>\r\n <span class=\"desktop-window-resizable-handle desktop-window-resizable-n\" tru-desktop-resizable [window]=\"window\" *ngIf=\"!window.maximized\" [direction]=\"'n'\"></span>\r\n <span class=\"desktop-window-resizable-handle desktop-window-resizable-s\" tru-desktop-resizable [window]=\"window\" *ngIf=\"!window.maximized\" [direction]=\"'s'\"></span>\r\n <span class=\"desktop-window-resizable-handle desktop-window-resizable-w\" tru-desktop-resizable [window]=\"window\" *ngIf=\"!window.maximized\" [direction]=\"'w'\"></span>\r\n <span class=\"desktop-window-resizable-handle desktop-window-resizable-e\" tru-desktop-resizable [window]=\"window\" *ngIf=\"!window.maximized\" [direction]=\"'e'\"></span>\r\n</div>\r\n", styles: ["body{-webkit-user-select:none;-moz-user-select:-moz-none;-ms-user-select:none;user-select:none}input,textarea{-moz-user-select:text}.desktop-text{-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);font-size:14px;line-height:1;color:#333}.desktop-wrapper{position:absolute!important;inset:0;background:#fff;overflow:hidden}.desktop-relative{position:relative}.desktop-display-none{display:none}.desktop-click-through{pointer-events:none}.desktop-menubar-container{position:absolute!important;top:0;left:0;right:0;height:26px;background:#f8f8f8;border-bottom:1px solid #e7e7e7;padding-left:5px}\n", ".desktop-window-container{position:absolute!important;background-color:#fff;background-clip:padding-box;border-radius:0;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px #0003;border:1px solid #e7e7e7}.desktop-window-header{position:absolute!important;top:0;left:0;right:0;height:27px;background:#fff;border-top-left-radius:0;border-top-right-radius:0;border-bottom:1px solid #e7e7e7}.desktop-window-content{position:absolute!important;inset:27px 0 0;background:#fff;overflow:hidden}.desktop-window-busy-overlay{position:absolute!important;inset:27px 0 0;background:#fff;overflow:hidden;z-index:1000;background-repeat:no-repeat;background-position:center center}.desktop-window-fieldset{padding:0;margin:0;border:0}.desktop-window-statusbar{position:absolute!important;left:0;right:0;bottom:0;height:23px;background:#fff;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top:1px solid #e7e7e7}.desktop-window-statusbar-container{position:absolute;top:1px;left:2px;right:0}.desktop-window-navigation{position:absolute!important;top:0;left:0;bottom:0;width:105px;background:transparent}.desktop-window-navigation-button-group{position:absolute!important;left:0;padding:0;margin:0}.desktop-window-navigation-button-group button{margin-left:0!important}.desktop-window-navigation-button-group-split{position:absolute!important;top:2px;right:6px}.desktop-window-title{position:absolute!important;inset:0 80px 0 110px;height:27px;background:transparent;cursor:inherit;outline:0;margin-top:2px}.desktop-window-title-hidden-nav{left:5px!important}.desktop-window-title-hidden-nav-with-buttons{left:55px!important}.desktop-window-title>div{position:absolute!important;top:5px;left:3px;cursor:default}.desktop-window-title>div>div{font-size:14px;font-weight:700}.desktop-window-action{position:absolute!important;top:0;right:0;bottom:0;width:80px;background:transparent}.desktop-window-action-button-group{position:absolute!important;top:2px;right:6px}.desktop-window-action .desktop-window-navigation-button-group{left:unset!important;right:0!important}.desktop-window-opacity{opacity:.5}.desktop-window-close-button:hover{background-color:maroon;color:#fff}.desktop-window-active{border:1px solid #6b6b6b!important;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.4);box-shadow:0 5px 10px #0006}.desktop-window-maximized{border-radius:0;-webkit-box-shadow:0 0 0 rgba(0,0,0,0);box-shadow:0 0 #0000;border-top-color:#f8f8f8!important;border-bottom-color:#f8f8f8!important}.desktop-window-is-dirty{display:block;float:left;height:15px;width:15px;font-size:15px;color:orange;margin-left:3px}.desktop-window-is-invalid{display:block;float:left;height:15px;width:15px;font-size:15px;color:red;margin-left:3px}.desktop-window-resizable-nw{position:absolute!important;overflow:hidden;width:10px;height:10px;left:-5px;top:-5px;z-index:103;cursor:nw-resize;opacity:0}.desktop-window-resizable-ne{position:absolute!important;overflow:hidden;width:10px;height:10px;right:-5px;top:-5px;z-index:103;cursor:ne-resize;opacity:0}.desktop-window-resizable-sw{position:absolute!important;overflow:hidden;width:10px;height:10px;left:-5px;bottom:-5px;z-index:103;cursor:sw-resize;opacity:0}.desktop-window-resizable-se{position:absolute!important;overflow:hidden;width:10px;height:10px;right:-5px;bottom:-5px;z-index:103;cursor:se-resize;opacity:0}.desktop-window-resizable-n{position:absolute!important;top:0;left:10px;right:10px;overflow:hidden;height:5px;z-index:102;cursor:s-resize;opacity:0;margin-top:-5px}.desktop-window-resizable-s{position:absolute!important;left:10px;right:10px;bottom:0;overflow:hidden;height:5px;z-index:102;cursor:s-resize;opacity:0;margin-bottom:-5px}.desktop-window-resizable-w{position:absolute!important;top:10px;left:0;bottom:10px;overflow:hidden;width:5px;z-index:102;cursor:w-resize;opacity:0;margin-left:-5px}.desktop-window-resizable-e{position:absolute!important;top:10px;right:0;bottom:10px;overflow:hidden;width:5px;z-index:102;cursor:e-resize;opacity:0;margin-right:-5px}div.desktop-window-resizable-handle{display:none!important;visibility:hidden!important}.desktop-window-save-icon,.desktop-window-revert-icon{opacity:.5}.desktop-window-save-icon-has-changes,.desktop-window-revert-icon-has-changes{opacity:1}\n"] }]
|
|
5886
6015
|
}], ctorParameters: () => [{ type: TruDataContext }, { type: TruUiNotification }, { type: TruTextManager }, { type: TruWindowEventHandler }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }], propDecorators: { window: [{
|
|
5887
6016
|
type: Input
|
|
5888
6017
|
}], viewportCtrl: [{
|
|
@@ -8108,138 +8237,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImpor
|
|
|
8108
8237
|
type: Injectable
|
|
8109
8238
|
}], ctorParameters: () => [] });
|
|
8110
8239
|
|
|
8111
|
-
class TruReportManager {
|
|
8112
|
-
dataContext;
|
|
8113
|
-
actionInvoke;
|
|
8114
|
-
modelTypeLookup;
|
|
8115
|
-
appEnvironment;
|
|
8116
|
-
user;
|
|
8117
|
-
constructor(dataContext, actionInvoke, modelTypeLookup, appEnvironment, user) {
|
|
8118
|
-
this.dataContext = dataContext;
|
|
8119
|
-
this.actionInvoke = actionInvoke;
|
|
8120
|
-
this.modelTypeLookup = modelTypeLookup;
|
|
8121
|
-
this.appEnvironment = appEnvironment;
|
|
8122
|
-
this.user = user;
|
|
8123
|
-
}
|
|
8124
|
-
setupMenuImpl(report, menu, getActionRefs, enabled) {
|
|
8125
|
-
var reportRef = report.Ref;
|
|
8126
|
-
var mimeRef = report.ReportMimeTypeStdMimeTypeRef;
|
|
8127
|
-
menu[0].choices.push({
|
|
8128
|
-
hasAccess: function () {
|
|
8129
|
-
return true;
|
|
8130
|
-
},
|
|
8131
|
-
label: report.ReportName,
|
|
8132
|
-
enabled: function () {
|
|
8133
|
-
return enabled();
|
|
8134
|
-
},
|
|
8135
|
-
reportRef: reportRef,
|
|
8136
|
-
mimeRef: mimeRef,
|
|
8137
|
-
fire: function () {
|
|
8138
|
-
this.actionInvoke.processCustomReport(this.reportRef, getActionRefs(), this.mimeRef);
|
|
8139
|
-
}
|
|
8140
|
-
});
|
|
8141
|
-
}
|
|
8142
|
-
get(url, method, callback, params = null) {
|
|
8143
|
-
let obj = new XMLHttpRequest();
|
|
8144
|
-
try {
|
|
8145
|
-
obj = new XMLHttpRequest();
|
|
8146
|
-
}
|
|
8147
|
-
catch (e) {
|
|
8148
|
-
alert("Your browser does not support Ajax.");
|
|
8149
|
-
}
|
|
8150
|
-
obj.onreadystatechange = function () {
|
|
8151
|
-
if (obj.readyState == 4) {
|
|
8152
|
-
callback(obj);
|
|
8153
|
-
}
|
|
8154
|
-
};
|
|
8155
|
-
obj.open(method, url, true);
|
|
8156
|
-
obj.send(params);
|
|
8157
|
-
return obj;
|
|
8158
|
-
}
|
|
8159
|
-
setupMenu(report, menu, getActionRefs, enabled) {
|
|
8160
|
-
return new Observable(obs => {
|
|
8161
|
-
this.dataContext.entityAccess().search(this.modelTypeLookup.getType('TruDbCloudFile'), (query) => {
|
|
8162
|
-
var predicate = new breeze.Predicate('TruDbCloudFileRef', breeze.FilterQueryOp.Equals, report.ReportTruDbCloudFileRef);
|
|
8163
|
-
return query.where(predicate);
|
|
8164
|
-
}, null, false).subscribe((cloudFiles) => {
|
|
8165
|
-
if (cloudFiles.length) {
|
|
8166
|
-
//there is a cloud file associated with this report
|
|
8167
|
-
if (cloudFiles[0].Filename.endsWith(".mrt")) {
|
|
8168
|
-
//this is a stimulsoft report, check if license file exists
|
|
8169
|
-
this.dataContext.entityAccess().search(this.modelTypeLookup.getType('TruDbConfig'), (query) => {
|
|
8170
|
-
var predicate = new breeze.Predicate('Key', breeze.FilterQueryOp.Equals, 'StimulsoftLicensePath');
|
|
8171
|
-
return query.where(predicate);
|
|
8172
|
-
}, null, false).subscribe((config) => {
|
|
8173
|
-
if (!config.length || !config[0].Value) {
|
|
8174
|
-
//do nothing, no menu option will be pushed into the dom since
|
|
8175
|
-
//we couldn't find the required license path info in the config
|
|
8176
|
-
obs.next(menu);
|
|
8177
|
-
obs.complete();
|
|
8178
|
-
}
|
|
8179
|
-
else {
|
|
8180
|
-
//var path = config[0].Value.replace("~", "");
|
|
8181
|
-
//this.get(path, 'get', (data: any) => {
|
|
8182
|
-
// if (data.length) {
|
|
8183
|
-
// }
|
|
8184
|
-
//});
|
|
8185
|
-
this.setupMenuImpl(report, menu, getActionRefs, enabled);
|
|
8186
|
-
obs.next(menu);
|
|
8187
|
-
obs.complete();
|
|
8188
|
-
}
|
|
8189
|
-
});
|
|
8190
|
-
}
|
|
8191
|
-
else {
|
|
8192
|
-
//there is a cloud file associated with this report, but it isn't an mrt report push menu option
|
|
8193
|
-
//since this a different type of report (word, excel)
|
|
8194
|
-
this.setupMenuImpl(report, menu, getActionRefs, enabled);
|
|
8195
|
-
obs.next(menu);
|
|
8196
|
-
obs.complete();
|
|
8197
|
-
}
|
|
8198
|
-
}
|
|
8199
|
-
else {
|
|
8200
|
-
//no cloud file, so no need to check for license, push menu option
|
|
8201
|
-
//since this could be a non mrt report (word, excel)
|
|
8202
|
-
this.setupMenuImpl(report, menu, getActionRefs, enabled);
|
|
8203
|
-
obs.next(menu);
|
|
8204
|
-
obs.complete();
|
|
8205
|
-
}
|
|
8206
|
-
});
|
|
8207
|
-
});
|
|
8208
|
-
}
|
|
8209
|
-
queryReports = (tableName, menu, getActionRefs, enabled) => {
|
|
8210
|
-
return new Observable(obs => {
|
|
8211
|
-
this.appEnvironment.globalDataContext?.entityAccess().searchCacheOnly(this.modelTypeLookup.getType('TruDbReport'), (query) => {
|
|
8212
|
-
var predicate = new breeze.Predicate('OwnerTruDbUserRef', breeze.FilterQueryOp.Equals, this.user.activeUserRef)
|
|
8213
|
-
.or('OwnerTruDbUserRef', breeze.FilterQueryOp.Equals, null)
|
|
8214
|
-
.or('Public', breeze.FilterQueryOp.Equals, true)
|
|
8215
|
-
.and('TableName', breeze.FilterQueryOp.Equals, tableName);
|
|
8216
|
-
return query.where(predicate);
|
|
8217
|
-
}).subscribe((reports) => {
|
|
8218
|
-
if (reports.length) {
|
|
8219
|
-
let obsList = [];
|
|
8220
|
-
for (var i = 0; i < reports.length; i++) {
|
|
8221
|
-
obsList.push(this.setupMenu(reports[i], menu, getActionRefs, enabled));
|
|
8222
|
-
}
|
|
8223
|
-
forkJoin(obsList).subscribe(response => {
|
|
8224
|
-
obs.next(menu);
|
|
8225
|
-
});
|
|
8226
|
-
}
|
|
8227
|
-
else {
|
|
8228
|
-
obs.next(menu);
|
|
8229
|
-
}
|
|
8230
|
-
});
|
|
8231
|
-
});
|
|
8232
|
-
};
|
|
8233
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: TruReportManager, deps: [{ token: TruDataContext }, { token: TruActionInvoke }, { token: TruModelTypeLookup }, { token: TruAppEnvironment }, { token: TruUser }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
8234
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: TruReportManager, providedIn: 'root' });
|
|
8235
|
-
}
|
|
8236
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: TruReportManager, decorators: [{
|
|
8237
|
-
type: Injectable,
|
|
8238
|
-
args: [{
|
|
8239
|
-
providedIn: 'root',
|
|
8240
|
-
}]
|
|
8241
|
-
}], ctorParameters: () => [{ type: TruDataContext }, { type: TruActionInvoke }, { type: TruModelTypeLookup }, { type: TruAppEnvironment }, { type: TruUser }] });
|
|
8242
|
-
|
|
8243
8240
|
class TruSort {
|
|
8244
8241
|
constructor() { }
|
|
8245
8242
|
/**
|