@trudb/tru-common-lib 0.0.623 → 0.0.625
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/esm2020/lib/components/confirm-dialog/tru-confirm-dialog.mjs +2 -2
- package/esm2020/lib/components/data-grid/overlays/tru-data-grid-loading-overlay/tru-data-grid-loading-overlay.mjs +3 -3
- package/esm2020/lib/components/data-grid/overlays/tru-data-grid-no-rows-overlay/tru-data-grid-no-rows-overlay.mjs +3 -3
- package/esm2020/lib/components/desktop/tru-desktop.mjs +26 -10
- package/fesm2015/trudb-tru-common-lib.mjs +24 -9
- package/fesm2015/trudb-tru-common-lib.mjs.map +1 -1
- package/fesm2020/trudb-tru-common-lib.mjs +24 -9
- package/fesm2020/trudb-tru-common-lib.mjs.map +1 -1
- package/lib/components/desktop/tru-desktop.d.ts +3 -1
- package/package.json +1 -1
|
@@ -453,10 +453,10 @@ class TruConfirmDialog {
|
|
|
453
453
|
}
|
|
454
454
|
}
|
|
455
455
|
TruConfirmDialog.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: TruConfirmDialog, deps: [{ token: i1.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
456
|
-
TruConfirmDialog.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: TruConfirmDialog, selector: "tru-confirm-dialog", ngImport: i0, template: "<div mat-dialog-title class=\"mat-dialog-title\">\r\n {{title}}\r\n</div>\r\n\r\n<div mat-dialog-content class=\"mat-dialog-content\">\r\n <p>{{message}}</p>\r\n</div>\r\n\r\n<div mat-dialog-actions class=\"mat-dialog-actions\">\r\n <button *ngIf=\"displayDismissButton\" mat-raised-button (click)=\"onDismiss()\">{{dismissButtonName}}</button>\r\n <button *ngIf=\"displayConfirmButton\" mat-raised-button color=\"primary\" (click)=\"onConfirm()\">{{confirmButtonName}}</button>\r\n</div>\r\n", styles: ["::ng-deep .mat-mdc-dialog-surface{padding:20px}.mat-mdc-dialog-title:before{content:unset!important;height:unset!important;padding:20px 0 10px!important}.mdc-dialog__content{padding:20px 0 15px!important}.mat-mdc-dialog-content p{margin-bottom:0;font-size:14px;color:#545454}.mat-mdc-dialog-actions{padding:0!important}.mat-mdc-dialog-actions button{margin-right:10px}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }] });
|
|
456
|
+
TruConfirmDialog.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: TruConfirmDialog, selector: "tru-confirm-dialog", ngImport: i0, template: "<div mat-dialog-title class=\"mat-dialog-title\">\r\n {{title}}\r\n</div>\r\n\r\n<div mat-dialog-content class=\"mat-dialog-content\">\r\n <p>{{message}}</p>\r\n</div>\r\n\r\n<div mat-dialog-actions class=\"mat-dialog-actions\">\r\n <button *ngIf=\"displayDismissButton\" mat-raised-button (click)=\"onDismiss()\">{{dismissButtonName}}</button>\r\n <button *ngIf=\"displayConfirmButton\" mat-raised-button color=\"primary\" (click)=\"onConfirm()\">{{confirmButtonName}}</button>\r\n</div>\r\n", styles: ["::ng-deep .mat-mdc-dialog-surface{padding:20px}.mat-mdc-dialog-title:before{content:unset!important;height:unset!important;padding:20px 0 10px!important}.mdc-dialog__title{padding:20px 0 10px!important}.mdc-dialog__content{padding:20px 0 15px!important}.mat-mdc-dialog-content p{margin-bottom:0;font-size:14px;color:#545454}.mat-mdc-dialog-actions{padding:0!important}.mat-mdc-dialog-actions button{margin-right:10px}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }] });
|
|
457
457
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: TruConfirmDialog, decorators: [{
|
|
458
458
|
type: Component,
|
|
459
|
-
args: [{ selector: 'tru-confirm-dialog', template: "<div mat-dialog-title class=\"mat-dialog-title\">\r\n {{title}}\r\n</div>\r\n\r\n<div mat-dialog-content class=\"mat-dialog-content\">\r\n <p>{{message}}</p>\r\n</div>\r\n\r\n<div mat-dialog-actions class=\"mat-dialog-actions\">\r\n <button *ngIf=\"displayDismissButton\" mat-raised-button (click)=\"onDismiss()\">{{dismissButtonName}}</button>\r\n <button *ngIf=\"displayConfirmButton\" mat-raised-button color=\"primary\" (click)=\"onConfirm()\">{{confirmButtonName}}</button>\r\n</div>\r\n", styles: ["::ng-deep .mat-mdc-dialog-surface{padding:20px}.mat-mdc-dialog-title:before{content:unset!important;height:unset!important;padding:20px 0 10px!important}.mdc-dialog__content{padding:20px 0 15px!important}.mat-mdc-dialog-content p{margin-bottom:0;font-size:14px;color:#545454}.mat-mdc-dialog-actions{padding:0!important}.mat-mdc-dialog-actions button{margin-right:10px}\n"] }]
|
|
459
|
+
args: [{ selector: 'tru-confirm-dialog', template: "<div mat-dialog-title class=\"mat-dialog-title\">\r\n {{title}}\r\n</div>\r\n\r\n<div mat-dialog-content class=\"mat-dialog-content\">\r\n <p>{{message}}</p>\r\n</div>\r\n\r\n<div mat-dialog-actions class=\"mat-dialog-actions\">\r\n <button *ngIf=\"displayDismissButton\" mat-raised-button (click)=\"onDismiss()\">{{dismissButtonName}}</button>\r\n <button *ngIf=\"displayConfirmButton\" mat-raised-button color=\"primary\" (click)=\"onConfirm()\">{{confirmButtonName}}</button>\r\n</div>\r\n", styles: ["::ng-deep .mat-mdc-dialog-surface{padding:20px}.mat-mdc-dialog-title:before{content:unset!important;height:unset!important;padding:20px 0 10px!important}.mdc-dialog__title{padding:20px 0 10px!important}.mdc-dialog__content{padding:20px 0 15px!important}.mat-mdc-dialog-content p{margin-bottom:0;font-size:14px;color:#545454}.mat-mdc-dialog-actions{padding:0!important}.mat-mdc-dialog-actions button{margin-right:10px}\n"] }]
|
|
460
460
|
}], ctorParameters: function () { return [{ type: i1.MatDialogRef }, { type: TruConfirmDialog, decorators: [{
|
|
461
461
|
type: Inject,
|
|
462
462
|
args: [MAT_DIALOG_DATA]
|
|
@@ -2230,7 +2230,7 @@ class TruDataGridLoadingOverlay {
|
|
|
2230
2230
|
}
|
|
2231
2231
|
TruDataGridLoadingOverlay.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: TruDataGridLoadingOverlay, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2232
2232
|
TruDataGridLoadingOverlay.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: TruDataGridLoadingOverlay, isStandalone: true, selector: "tru-data-grid-loading-overlay", ngImport: i0, template: `
|
|
2233
|
-
<div class="ag-overlay-loading-center" style="height:50px;width:
|
|
2233
|
+
<div class="ag-overlay-loading-center" style="height:50px;width:275px;">
|
|
2234
2234
|
<div style="display:inline-block;margin-right:15px;vertical-align:middle;line-height:38px;">
|
|
2235
2235
|
<mat-spinner [diameter]="30"></mat-spinner>
|
|
2236
2236
|
</div>
|
|
@@ -2246,7 +2246,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImpor
|
|
|
2246
2246
|
selector: 'tru-data-grid-loading-overlay',
|
|
2247
2247
|
imports: [MaterialModule],
|
|
2248
2248
|
template: `
|
|
2249
|
-
<div class="ag-overlay-loading-center" style="height:50px;width:
|
|
2249
|
+
<div class="ag-overlay-loading-center" style="height:50px;width:275px;">
|
|
2250
2250
|
<div style="display:inline-block;margin-right:15px;vertical-align:middle;line-height:38px;">
|
|
2251
2251
|
<mat-spinner [diameter]="30"></mat-spinner>
|
|
2252
2252
|
</div>
|
|
@@ -2265,7 +2265,7 @@ class TruDataGridNoRowsOverlay {
|
|
|
2265
2265
|
}
|
|
2266
2266
|
TruDataGridNoRowsOverlay.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: TruDataGridNoRowsOverlay, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2267
2267
|
TruDataGridNoRowsOverlay.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: TruDataGridNoRowsOverlay, isStandalone: true, selector: "tru-data-grid-no-rows-overlay", ngImport: i0, template: `
|
|
2268
|
-
<div class="ag-overlay-loading-center" style="height:50px;width:
|
|
2268
|
+
<div class="ag-overlay-loading-center" style="height:50px;width:275px;">
|
|
2269
2269
|
<span style="font-size:12px;font-weight:bold;line-height:38px;">{{ params.noRowsMessageFunc() }}</span>
|
|
2270
2270
|
</div>`, isInline: true, dependencies: [{ kind: "ngmodule", type: MaterialModule }] });
|
|
2271
2271
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: TruDataGridNoRowsOverlay, decorators: [{
|
|
@@ -2275,7 +2275,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImpor
|
|
|
2275
2275
|
selector: 'tru-data-grid-no-rows-overlay',
|
|
2276
2276
|
imports: [MaterialModule],
|
|
2277
2277
|
template: `
|
|
2278
|
-
<div class="ag-overlay-loading-center" style="height:50px;width:
|
|
2278
|
+
<div class="ag-overlay-loading-center" style="height:50px;width:275px;">
|
|
2279
2279
|
<span style="font-size:12px;font-weight:bold;line-height:38px;">{{ params.noRowsMessageFunc() }}</span>
|
|
2280
2280
|
</div>`
|
|
2281
2281
|
}]
|
|
@@ -4506,8 +4506,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImpor
|
|
|
4506
4506
|
}] } });
|
|
4507
4507
|
|
|
4508
4508
|
class TruDesktop {
|
|
4509
|
-
constructor(desktopService, truWindowEventHandler) {
|
|
4509
|
+
constructor(desktopService, textManager, truWindowEventHandler) {
|
|
4510
4510
|
this.desktopService = desktopService;
|
|
4511
|
+
this.textManager = textManager;
|
|
4511
4512
|
this.truWindowEventHandler = truWindowEventHandler;
|
|
4512
4513
|
this.minimizeAll = false;
|
|
4513
4514
|
this.desktop = this.desktopService.createDesktop();
|
|
@@ -5191,18 +5192,32 @@ class TruDesktop {
|
|
|
5191
5192
|
document.onselectstart = this.handleSelectAttempt;
|
|
5192
5193
|
window.addEventListener('keydown', this.onKeyDown);
|
|
5193
5194
|
window.addEventListener('keyup', this.onKeyUp);
|
|
5195
|
+
window.onbeforeunload = (e) => {
|
|
5196
|
+
let hasChanges = this.windows.filter((w) => { return w.hasChanges() ? true : false; });
|
|
5197
|
+
if (hasChanges.length) {
|
|
5198
|
+
e = e || window.event;
|
|
5199
|
+
var msg = this.textManager.msgConfirmExitWithChangesPending;
|
|
5200
|
+
// For IE and Firefox
|
|
5201
|
+
if (e) {
|
|
5202
|
+
e.returnValue = msg;
|
|
5203
|
+
}
|
|
5204
|
+
// For Safari / chrome
|
|
5205
|
+
return msg;
|
|
5206
|
+
}
|
|
5207
|
+
return false;
|
|
5208
|
+
};
|
|
5194
5209
|
}
|
|
5195
5210
|
ngOnDestroy() {
|
|
5196
5211
|
window.removeEventListener('keydown', this.onKeyDown);
|
|
5197
5212
|
window.removeEventListener('keyup', this.onKeyUp);
|
|
5198
5213
|
}
|
|
5199
5214
|
}
|
|
5200
|
-
TruDesktop.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: TruDesktop, deps: [{ token: TruDesktopService }, { token: TruWindowEventHandler }], target: i0.ɵɵFactoryTarget.Component });
|
|
5215
|
+
TruDesktop.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: TruDesktop, deps: [{ token: TruDesktopService }, { token: TruTextManager }, { token: TruWindowEventHandler }], target: i0.ɵɵFactoryTarget.Component });
|
|
5201
5216
|
TruDesktop.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.1", type: TruDesktop, selector: "tru-desktop", inputs: { options: "options" }, providers: [TruDesktopService], ngImport: i0, template: "<div class=\"desktop-wrapper\">\r\n\r\n <div class=\"desktop-menubar-container\" [ngStyle]=\"{'height': options.menubarHeight + 'px'}\">\r\n <tru-desktop-menubar [desktopCtrl]=\"this\"></tru-desktop-menubar>\r\n </div>\r\n\r\n <tru-desktop-viewport [windows]=\"windows\" [desktopCtrl]=\"this\"></tru-desktop-viewport>\r\n\r\n <tru-desktop-taskbar [windows]=\"windows\" [desktopCtrl]=\"this\"></tru-desktop-taskbar>\r\n\r\n <img class=\"desktop-viewport-logo\" data-ng-show=\"logoUrl\" alt=\"\">\r\n</div>\r\n", styles: ["body{-webkit-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:#ffffff;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"], dependencies: [{ kind: "directive", type: i1$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: TruDesktopMenubar, selector: "tru-desktop-menubar", inputs: ["desktopCtrl"] }, { kind: "component", type: TruDesktopTaskbar, selector: "tru-desktop-taskbar", inputs: ["windows", "desktopCtrl"] }, { kind: "component", type: TruDesktopViewport, selector: "tru-desktop-viewport", inputs: ["windows", "desktopCtrl"] }] });
|
|
5202
5217
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: TruDesktop, decorators: [{
|
|
5203
5218
|
type: Component,
|
|
5204
5219
|
args: [{ selector: 'tru-desktop', providers: [TruDesktopService], template: "<div class=\"desktop-wrapper\">\r\n\r\n <div class=\"desktop-menubar-container\" [ngStyle]=\"{'height': options.menubarHeight + 'px'}\">\r\n <tru-desktop-menubar [desktopCtrl]=\"this\"></tru-desktop-menubar>\r\n </div>\r\n\r\n <tru-desktop-viewport [windows]=\"windows\" [desktopCtrl]=\"this\"></tru-desktop-viewport>\r\n\r\n <tru-desktop-taskbar [windows]=\"windows\" [desktopCtrl]=\"this\"></tru-desktop-taskbar>\r\n\r\n <img class=\"desktop-viewport-logo\" data-ng-show=\"logoUrl\" alt=\"\">\r\n</div>\r\n", styles: ["body{-webkit-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:#ffffff;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"] }]
|
|
5205
|
-
}], ctorParameters: function () { return [{ type: TruDesktopService }, { type: TruWindowEventHandler }]; }, propDecorators: { options: [{
|
|
5220
|
+
}], ctorParameters: function () { return [{ type: TruDesktopService }, { type: TruTextManager }, { type: TruWindowEventHandler }]; }, propDecorators: { options: [{
|
|
5206
5221
|
type: Input
|
|
5207
5222
|
}] } });
|
|
5208
5223
|
|