@trudb/tru-common-lib 0.0.177 → 0.0.179

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.
Files changed (99) hide show
  1. package/esm2020/lib/components/confirm-dialog/tru-confirm-dialog-module.mjs +19 -0
  2. package/esm2020/lib/components/confirm-dialog/tru-confirm-dialog.mjs +36 -0
  3. package/esm2020/lib/components/desktop/directives/resizable/tru-desktop-resizable-module.mjs +19 -0
  4. package/esm2020/lib/components/desktop/directives/resizable/tru-desktop-resizable.mjs +109 -0
  5. package/esm2020/lib/components/desktop/menubar/tru-desktop-menubar-module.mjs +44 -0
  6. package/esm2020/lib/components/desktop/menubar/tru-desktop-menubar.mjs +29 -0
  7. package/esm2020/lib/components/desktop/services/tru-desktop-service.mjs +136 -0
  8. package/esm2020/lib/components/desktop/statusbar/tru-desktop-statusbar-module.mjs +19 -0
  9. package/esm2020/lib/components/desktop/statusbar/tru-desktop-statusbar.mjs +18 -0
  10. package/esm2020/lib/components/desktop/taskbar/tru-desktop-taskbar-module.mjs +21 -0
  11. package/esm2020/lib/components/desktop/taskbar/tru-desktop-taskbar.mjs +40 -0
  12. package/esm2020/lib/components/desktop/tru-desktop-module.mjs +72 -0
  13. package/esm2020/lib/components/desktop/tru-desktop.mjs +703 -0
  14. package/esm2020/lib/components/desktop/view/tru-desktop-view-module.mjs +19 -0
  15. package/esm2020/lib/components/desktop/view/tru-desktop-view.mjs +25 -0
  16. package/esm2020/lib/components/desktop/viewport/tru-desktop-viewport-module.mjs +20 -0
  17. package/esm2020/lib/components/desktop/viewport/tru-desktop-viewport.mjs +109 -0
  18. package/esm2020/lib/components/desktop/window/tru-desktop-window-module.mjs +58 -0
  19. package/esm2020/lib/components/desktop/window/tru-desktop-window.mjs +449 -0
  20. package/esm2020/lib/components/export-dialog/tru-export-dialog-module.mjs +20 -0
  21. package/esm2020/lib/components/export-dialog/tru-export-dialog.mjs +57 -0
  22. package/esm2020/lib/components/toolbar/button/tru-toolbar-button-module.mjs +32 -0
  23. package/esm2020/lib/components/toolbar/button/tru-toolbar-button.mjs +35 -0
  24. package/esm2020/lib/components/toolbar/context-filter/tru-toolbar-context-filter-module.mjs +40 -0
  25. package/esm2020/lib/components/toolbar/context-filter/tru-toolbar-context-filter.mjs +24 -0
  26. package/esm2020/lib/components/toolbar/dropdown/tru-toolbar-dropdown-module.mjs +32 -0
  27. package/esm2020/lib/components/toolbar/dropdown/tru-toolbar-dropdown.mjs +42 -0
  28. package/esm2020/lib/components/toolbar/menu/menu-button/tru-toolbar-menu-button-module.mjs +19 -0
  29. package/esm2020/lib/components/toolbar/menu/menu-button/tru-toolbar-menu-button.mjs +16 -0
  30. package/esm2020/lib/components/toolbar/menu/menu-item/tru-toolbar-menu-item-module.mjs +19 -0
  31. package/esm2020/lib/components/toolbar/menu/menu-item/tru-toolbar-menu-item.mjs +26 -0
  32. package/esm2020/lib/components/toolbar/menu/tru-toolbar-menu-module.mjs +32 -0
  33. package/esm2020/lib/components/toolbar/menu/tru-toolbar-menu.mjs +33 -0
  34. package/esm2020/lib/components/toolbar/separator/tru-toolbar-separator-module.mjs +19 -0
  35. package/esm2020/lib/components/toolbar/separator/tru-toolbar-separator.mjs +12 -0
  36. package/esm2020/lib/components/toolbar/text/tru-toolbar-text-module.mjs +32 -0
  37. package/esm2020/lib/components/toolbar/text/tru-toolbar-text.mjs +28 -0
  38. package/esm2020/lib/components/toolbar/tru-toolbar-module.mjs +48 -0
  39. package/esm2020/lib/components/toolbar/tru-toolbar.mjs +21 -0
  40. package/esm2020/lib/material.module.mjs +192 -0
  41. package/esm2020/lib/services/tru-app-environment.mjs +75 -0
  42. package/esm2020/lib/services/tru-breeze-context-factory.mjs +71 -0
  43. package/esm2020/lib/services/tru-data-context.mjs +207 -0
  44. package/esm2020/lib/services/tru-entity-accessor.mjs +188 -0
  45. package/esm2020/lib/services/tru-search-group-event-handler.mjs +1 -1
  46. package/esm2020/lib/services/tru-ui-notification.mjs +90 -0
  47. package/esm2020/lib/tru-common-module.mjs +1 -1
  48. package/esm2020/public-api.mjs +12 -1
  49. package/fesm2015/trudb-tru-common-lib.mjs +2993 -65
  50. package/fesm2015/trudb-tru-common-lib.mjs.map +1 -1
  51. package/fesm2020/trudb-tru-common-lib.mjs +2987 -65
  52. package/fesm2020/trudb-tru-common-lib.mjs.map +1 -1
  53. package/lib/components/confirm-dialog/tru-confirm-dialog-module.d.ts +9 -0
  54. package/lib/components/confirm-dialog/tru-confirm-dialog.d.ts +20 -0
  55. package/lib/components/desktop/directives/resizable/tru-desktop-resizable-module.d.ts +9 -0
  56. package/lib/components/desktop/directives/resizable/tru-desktop-resizable.d.ts +32 -0
  57. package/lib/components/desktop/menubar/tru-desktop-menubar-module.d.ts +14 -0
  58. package/lib/components/desktop/menubar/tru-desktop-menubar.d.ts +12 -0
  59. package/lib/components/desktop/services/tru-desktop-service.d.ts +110 -0
  60. package/lib/components/desktop/statusbar/tru-desktop-statusbar-module.d.ts +9 -0
  61. package/lib/components/desktop/statusbar/tru-desktop-statusbar.d.ts +10 -0
  62. package/lib/components/desktop/taskbar/tru-desktop-taskbar-module.d.ts +11 -0
  63. package/lib/components/desktop/taskbar/tru-desktop-taskbar.d.ts +15 -0
  64. package/lib/components/desktop/tru-desktop-module.d.ts +20 -0
  65. package/lib/components/desktop/tru-desktop.d.ts +334 -0
  66. package/lib/components/desktop/view/tru-desktop-view-module.d.ts +9 -0
  67. package/lib/components/desktop/view/tru-desktop-view.d.ts +13 -0
  68. package/lib/components/desktop/viewport/tru-desktop-viewport-module.d.ts +10 -0
  69. package/lib/components/desktop/viewport/tru-desktop-viewport.d.ts +46 -0
  70. package/lib/components/desktop/window/tru-desktop-window-module.d.ts +17 -0
  71. package/lib/components/desktop/window/tru-desktop-window.d.ts +184 -0
  72. package/lib/components/export-dialog/tru-export-dialog-module.d.ts +10 -0
  73. package/lib/components/export-dialog/tru-export-dialog.d.ts +26 -0
  74. package/lib/components/toolbar/button/tru-toolbar-button-module.d.ts +11 -0
  75. package/lib/components/toolbar/button/tru-toolbar-button.d.ts +14 -0
  76. package/lib/components/toolbar/context-filter/tru-toolbar-context-filter-module.d.ts +13 -0
  77. package/lib/components/toolbar/context-filter/tru-toolbar-context-filter.d.ts +11 -0
  78. package/lib/components/toolbar/dropdown/tru-toolbar-dropdown-module.d.ts +11 -0
  79. package/lib/components/toolbar/dropdown/tru-toolbar-dropdown.d.ts +18 -0
  80. package/lib/components/toolbar/menu/menu-button/tru-toolbar-menu-button-module.d.ts +9 -0
  81. package/lib/components/toolbar/menu/menu-button/tru-toolbar-menu-button.d.ts +7 -0
  82. package/lib/components/toolbar/menu/menu-item/tru-toolbar-menu-item-module.d.ts +9 -0
  83. package/lib/components/toolbar/menu/menu-item/tru-toolbar-menu-item.d.ts +8 -0
  84. package/lib/components/toolbar/menu/tru-toolbar-menu-module.d.ts +11 -0
  85. package/lib/components/toolbar/menu/tru-toolbar-menu.d.ts +10 -0
  86. package/lib/components/toolbar/separator/tru-toolbar-separator-module.d.ts +9 -0
  87. package/lib/components/toolbar/separator/tru-toolbar-separator.d.ts +6 -0
  88. package/lib/components/toolbar/text/tru-toolbar-text-module.d.ts +11 -0
  89. package/lib/components/toolbar/text/tru-toolbar-text.d.ts +12 -0
  90. package/lib/components/toolbar/tru-toolbar-module.d.ts +15 -0
  91. package/lib/components/toolbar/tru-toolbar.d.ts +13 -0
  92. package/lib/material.module.d.ts +50 -0
  93. package/lib/services/tru-app-environment.d.ts +48 -0
  94. package/lib/services/tru-breeze-context-factory.d.ts +30 -0
  95. package/lib/services/tru-data-context.d.ts +32 -0
  96. package/lib/services/tru-entity-accessor.d.ts +41 -0
  97. package/lib/services/tru-ui-notification.d.ts +35 -0
  98. package/package.json +1 -1
  99. package/public-api.d.ts +8 -0
@@ -1,11 +1,31 @@
1
- import { EntityAspect, BinaryPredicate, AndOrPredicate, breeze } from 'breeze-client';
1
+ import { EntityAspect, BinaryPredicate, AndOrPredicate, breeze, MetadataStore, DataService, EntityManager, EntityQuery, FetchStrategy, EntityState } from 'breeze-client';
2
2
  import * as i0 from '@angular/core';
3
- import { Directive, Input, Injectable, EventEmitter, NgModule } from '@angular/core';
4
- import { BehaviorSubject, Subject } from 'rxjs';
3
+ import { Directive, Input, Injectable, Component, Inject, NgModule, ViewEncapsulation, HostListener, EventEmitter, Output } from '@angular/core';
4
+ import * as i1 from '@angular/material/dialog';
5
+ import { MAT_DIALOG_DATA } from '@angular/material/dialog';
6
+ import * as i1$1 from '@angular/common';
5
7
  import { CommonModule } from '@angular/common';
8
+ import * as i2 from '@angular/forms';
6
9
  import { FormsModule } from '@angular/forms';
7
- import * as i1 from '@angular/platform-browser';
8
- import * as i2 from '@angular/material/icon';
10
+ import { Subject, BehaviorSubject, defer, from, of } from 'rxjs';
11
+ import * as i3 from '@angular/material/form-field';
12
+ import * as i4 from '@angular/material/select';
13
+ import { MatSelectModule } from '@angular/material/select';
14
+ import * as i5 from '@angular/material/core';
15
+ import { MatOptionModule } from '@angular/material/core';
16
+ import * as i2$1 from '@angular/material/icon';
17
+ import { MatIconModule } from '@angular/material/icon';
18
+ import * as _ from 'underscore';
19
+ import * as i1$3 from '@angular/common/http';
20
+ import { HttpClientModule } from '@angular/common/http';
21
+ import * as i3$1 from '@angular/material/checkbox';
22
+ import { MatCheckboxModule } from '@angular/material/checkbox';
23
+ import * as i1$2 from 'ngx-toastr';
24
+ import * as i1$4 from '@angular/platform-browser';
25
+ import { BrowserModule } from '@angular/platform-browser';
26
+ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
27
+ import { MatButtonModule } from '@angular/material/button';
28
+ import { MatInputModule } from '@angular/material/input';
9
29
 
10
30
  class TruEntityBase {
11
31
  constructor(...args) {
@@ -226,6 +246,2971 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImpor
226
246
  }]
227
247
  }] });
228
248
 
249
+ class TruConfirmDialog {
250
+ constructor(dialogRef, data) {
251
+ this.dialogRef = dialogRef;
252
+ this.data = data;
253
+ this.title = data.title;
254
+ this.message = data.message;
255
+ }
256
+ ngOnInit() {
257
+ }
258
+ onConfirm() {
259
+ this.dialogRef.close(true);
260
+ }
261
+ onDismiss() {
262
+ this.dialogRef.close(false);
263
+ }
264
+ }
265
+ TruConfirmDialog.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruConfirmDialog, deps: [{ token: i1.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
266
+ TruConfirmDialog.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.2", type: TruConfirmDialog, selector: "tru-confirm-dialog", ngImport: i0, template: "<h1 mat-dialog-title>\r\n {{title}}\r\n</h1>\r\n\r\n<div mat-dialog-content>\r\n <p>{{message}}</p>\r\n</div>\r\n\r\n<div mat-dialog-actions>\r\n <button mat-button (click)=\"onDismiss()\">No</button>\r\n <button mat-raised-button color=\"primary\" (click)=\"onConfirm()\">Yes</button>\r\n</div>\r\n", styles: [""] });
267
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruConfirmDialog, decorators: [{
268
+ type: Component,
269
+ args: [{ selector: 'tru-confirm-dialog', template: "<h1 mat-dialog-title>\r\n {{title}}\r\n</h1>\r\n\r\n<div mat-dialog-content>\r\n <p>{{message}}</p>\r\n</div>\r\n\r\n<div mat-dialog-actions>\r\n <button mat-button (click)=\"onDismiss()\">No</button>\r\n <button mat-raised-button color=\"primary\" (click)=\"onConfirm()\">Yes</button>\r\n</div>\r\n" }]
270
+ }], ctorParameters: function () {
271
+ return [{ type: i1.MatDialogRef }, { type: TruConfirmDialog, decorators: [{
272
+ type: Inject,
273
+ args: [MAT_DIALOG_DATA]
274
+ }] }];
275
+ } });
276
+ class TruConfirmDialogConfig {
277
+ constructor(title, message) {
278
+ this.title = title;
279
+ this.message = message;
280
+ }
281
+ }
282
+
283
+ class TruConfirmDialogModule {
284
+ }
285
+ TruConfirmDialogModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruConfirmDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
286
+ TruConfirmDialogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.2", ngImport: i0, type: TruConfirmDialogModule, declarations: [TruConfirmDialog], imports: [CommonModule, FormsModule], exports: [TruConfirmDialog] });
287
+ TruConfirmDialogModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruConfirmDialogModule, imports: [CommonModule, FormsModule] });
288
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruConfirmDialogModule, decorators: [{
289
+ type: NgModule,
290
+ args: [{
291
+ declarations: [TruConfirmDialog],
292
+ imports: [CommonModule, FormsModule],
293
+ exports: [TruConfirmDialog]
294
+ }]
295
+ }] });
296
+
297
+ class TruDesktopService {
298
+ constructor() {
299
+ /**
300
+ * @tru.doc function
301
+ * @name DesktopService.createDesktop
302
+ * @module tru.desktop
303
+ *
304
+ * @description
305
+ * Creates a new desktop instance.
306
+ *
307
+ * @returns {object} Desktop
308
+ */
309
+ this.createDesktop = function () {
310
+ var desktop = new Desktop();
311
+ return desktop;
312
+ };
313
+ }
314
+ }
315
+ TruDesktopService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
316
+ TruDesktopService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopService });
317
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopService, decorators: [{
318
+ type: Injectable
319
+ }] });
320
+ /**
321
+ * @tru.desktop.doc class
322
+ * @name DesktopService.Desktop
323
+ * @module tru.desktop
324
+ *
325
+ * @description Desktop defines a logical desktop. Any non-dom properties and elements needed by the desktop should
326
+ * be defined in this class
327
+ *
328
+ */
329
+ class Desktop {
330
+ constructor() {
331
+ this.options = new DesktopOptions();
332
+ this.windowConfig = new WindowConfig();
333
+ this.viewConfig = new ViewConfig();
334
+ }
335
+ }
336
+ ;
337
+ /**
338
+ * @tru.desktop.doc class
339
+ * @name DesktopService.DesktopOptions
340
+ * @module tru.desktop
341
+ *
342
+ * @description Default DesktopOptions class. DesktopOptions are defined by the application developer and overlaid
343
+ * over this object.
344
+ *
345
+ */
346
+ class DesktopOptions {
347
+ constructor() {
348
+ this.allowDirtyClose = false;
349
+ this.allowInvalidClose = false;
350
+ this.cancelEditingOnNavigation = false;
351
+ this.canCloseFn = undefined;
352
+ this.canNavigateFn = undefined;
353
+ this.displayViewportDimensions = false;
354
+ this.enableAnimation = true;
355
+ this.enableWindowCascading = true;
356
+ this.logoUrl = undefined;
357
+ this.menubarHeight = 32;
358
+ this.menubarConfig = undefined;
359
+ this.showLaunchMenu = false;
360
+ }
361
+ }
362
+ ;
363
+ /**
364
+ * @tru.desktop.doc class
365
+ * @name DesktopService.WindowConfig
366
+ * @module tru.desktop
367
+ *
368
+ * @description
369
+ * Default configuration object for a window. windowConfig properties can be defined by the application developer and overlaid
370
+ * over this object.
371
+ *
372
+ */
373
+ class WindowConfig {
374
+ constructor() {
375
+ this.active = true;
376
+ this.bottom = 'auto';
377
+ this.globals = undefined;
378
+ this.height = '400px';
379
+ this.isDirty = false;
380
+ this.isInvalid = false;
381
+ this.left = 0;
382
+ this.maximized = undefined;
383
+ this.minHeight = '200px';
384
+ this.minimized = false;
385
+ this.minWidth = '200px';
386
+ this.outOfBounds = false;
387
+ this.savedPosition = {};
388
+ this.right = 'auto';
389
+ this.scope = undefined;
390
+ this.title = '';
391
+ this.top = 0;
392
+ this.width = '400px';
393
+ this.views = Array();
394
+ this.zIndex = -1;
395
+ this.context = undefined;
396
+ this.isReadOnly = false;
397
+ this.unsubscribes = [];
398
+ this.wasReadOnly = false;
399
+ this.destroy = () => {
400
+ var _a, _b;
401
+ while (this.unsubscribes.length)
402
+ (_b = (_a = this === null || this === void 0 ? void 0 : this.unsubscribes) === null || _a === void 0 ? void 0 : _a.shift()) === null || _b === void 0 ? void 0 : _b.call();
403
+ this.context = undefined;
404
+ };
405
+ }
406
+ }
407
+ ;
408
+ /**
409
+ * @tru.desktop.doc class
410
+ * @name truDesktopComponent.ViewConfig
411
+ * @module tru.desktop
412
+ *
413
+ * @description
414
+ * Default configuration object for a view. viewConfig properties can be defined by the application developer and overlaid
415
+ * over this object.
416
+ *
417
+ */
418
+ class ViewConfig {
419
+ constructor() {
420
+ this.active = true;
421
+ this.entities = undefined;
422
+ this.entityIndex = 0;
423
+ this.isDirty = false;
424
+ this.isEditing = false;
425
+ this.isInvalid = false;
426
+ this.componentName = undefined;
427
+ this.windowConfig = null;
428
+ }
429
+ }
430
+ ;
431
+
432
+ class TruWindowEventHandler {
433
+ constructor() {
434
+ this.open$ = new Subject();
435
+ this.addView$ = new Subject();
436
+ this.removeForwadViews$ = new Subject();
437
+ }
438
+ onOpen() {
439
+ return this.open$;
440
+ }
441
+ open(windowEvent) {
442
+ this.open$.next(windowEvent);
443
+ }
444
+ onAddView() {
445
+ return this.addView$;
446
+ }
447
+ addView(windowAddViewEvent) {
448
+ this.addView$.next(windowAddViewEvent);
449
+ }
450
+ onRemoveForwardViews() {
451
+ return this.removeForwadViews$;
452
+ }
453
+ removeForwardViews() {
454
+ this.removeForwadViews$.next(null);
455
+ }
456
+ }
457
+ TruWindowEventHandler.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruWindowEventHandler, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
458
+ TruWindowEventHandler.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruWindowEventHandler, providedIn: 'root' });
459
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruWindowEventHandler, decorators: [{
460
+ type: Injectable,
461
+ args: [{
462
+ providedIn: 'root'
463
+ }]
464
+ }] });
465
+
466
+ class TruToolbar {
467
+ constructor() {
468
+ this.config = null;
469
+ }
470
+ ngOnInit() {
471
+ if (this.config != null)
472
+ this.config.forEach(item => {
473
+ });
474
+ }
475
+ }
476
+ TruToolbar.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruToolbar, deps: [], target: i0.ɵɵFactoryTarget.Component });
477
+ TruToolbar.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.2", type: TruToolbar, selector: "tru-toolbar", inputs: { config: "config" }, ngImport: i0, template: "<div class=\"toolbar toolbar-group\">\r\n <ng-content></ng-content>\r\n</div>\r\n", styles: [".toolbar{height:25px}.toolbar .toolbar-btn{height:26px}.toolbar .mat-form-field-infix{padding:0;border-top:0;width:auto}.toolbar .mat-form-field-underline{background-color:red}.toolbar .mat-form-field .mat-form-field-underline,.toolbar .mat-form-field.mat-focused .mat-form-field-underline{display:none}.toolbar-group,.toolbar-group-vertical{position:relative;display:flex;vertical-align:middle;height:25px}.toolbar-group>.toolbar-btn,.toolbar-group-vertical>.toolbar-btn{position:relative;float:left}.toolbar-group>.toolbar-btn:hover,.toolbar-group-vertical>.toolbar-btn:hover,.toolbar-group>.toolbar-btn:focus,.toolbar-group-vertical>.toolbar-btn:focus,.toolbar-group>.toolbar-btn:active,.toolbar-group-vertical>.toolbar-btn:active,.toolbar-group>.toolbar-btn.active,.toolbar-group-vertical>.toolbar-btn.active{z-index:2}.toolbar-group .toolbar-btn+.toolbar-btn,.toolbar-group .toolbar-btn+.toolbar-group,.toolbar-group .toolbar-group+.toolbar-btn,.toolbar-group .toolbar-group+.toolbar-group{margin-left:-1px}.toolbar-group>.toolbar-btn:not(:first-child):not(:last-child){border-radius:0}.toolbar-group>.toolbar-btn:first-child{margin-left:0}.toolbar-group>.toolbar-btn:first-child:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.toolbar-group>.toolbar-btn:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.toolbar-group>.toolbar-btn{padding:1px 5px;font-size:12px;line-height:1;border-radius:0}.toolbar-group .btn_iconOnly{padding:0;margin:0}.toolbar-group .btn_iconOnly i{vertical-align:15%}.toolbar-group div{padding:0;margin:0}.toolbar-group button{padding:0!important}.toolbar-group span,.toolbar-group i{padding:0;margin:0}.toolbar-group button{vertical-align:top}\n"] });
478
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruToolbar, decorators: [{
479
+ type: Component,
480
+ args: [{ selector: 'tru-toolbar', template: "<div class=\"toolbar toolbar-group\">\r\n <ng-content></ng-content>\r\n</div>\r\n", styles: [".toolbar{height:25px}.toolbar .toolbar-btn{height:26px}.toolbar .mat-form-field-infix{padding:0;border-top:0;width:auto}.toolbar .mat-form-field-underline{background-color:red}.toolbar .mat-form-field .mat-form-field-underline,.toolbar .mat-form-field.mat-focused .mat-form-field-underline{display:none}.toolbar-group,.toolbar-group-vertical{position:relative;display:flex;vertical-align:middle;height:25px}.toolbar-group>.toolbar-btn,.toolbar-group-vertical>.toolbar-btn{position:relative;float:left}.toolbar-group>.toolbar-btn:hover,.toolbar-group-vertical>.toolbar-btn:hover,.toolbar-group>.toolbar-btn:focus,.toolbar-group-vertical>.toolbar-btn:focus,.toolbar-group>.toolbar-btn:active,.toolbar-group-vertical>.toolbar-btn:active,.toolbar-group>.toolbar-btn.active,.toolbar-group-vertical>.toolbar-btn.active{z-index:2}.toolbar-group .toolbar-btn+.toolbar-btn,.toolbar-group .toolbar-btn+.toolbar-group,.toolbar-group .toolbar-group+.toolbar-btn,.toolbar-group .toolbar-group+.toolbar-group{margin-left:-1px}.toolbar-group>.toolbar-btn:not(:first-child):not(:last-child){border-radius:0}.toolbar-group>.toolbar-btn:first-child{margin-left:0}.toolbar-group>.toolbar-btn:first-child:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.toolbar-group>.toolbar-btn:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.toolbar-group>.toolbar-btn{padding:1px 5px;font-size:12px;line-height:1;border-radius:0}.toolbar-group .btn_iconOnly{padding:0;margin:0}.toolbar-group .btn_iconOnly i{vertical-align:15%}.toolbar-group div{padding:0;margin:0}.toolbar-group button{padding:0!important}.toolbar-group span,.toolbar-group i{padding:0;margin:0}.toolbar-group button{vertical-align:top}\n"] }]
481
+ }], ctorParameters: function () { return []; }, propDecorators: { config: [{
482
+ type: Input
483
+ }] } });
484
+
485
+ class TruToolbarMenuItem {
486
+ constructor() {
487
+ this.onClick = (event) => {
488
+ var target = event.target;
489
+ var isActive = target.classList.contains('is-active');
490
+ if (isActive) {
491
+ target.classList.remove('is-active');
492
+ }
493
+ else {
494
+ target.classList.add('is-active');
495
+ }
496
+ };
497
+ }
498
+ }
499
+ TruToolbarMenuItem.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarMenuItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
500
+ TruToolbarMenuItem.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.2", type: TruToolbarMenuItem, selector: "tru-toolbar-menu-item", inputs: { config: "config" }, ngImport: i0, template: "<div (click)=\"onClick($event)\">\r\n <p *ngIf=\"config.menuLabel\">{{config.menuLabel}}</p>\r\n <i *ngIf=\"config.menuIcon\" class=\"{{config.menuIcon}} sub-menu-icon\" tabindex=\"-1\"></i>\r\n <div class=\"sub-menu\" *ngIf=\"config.choices\">\r\n <ul class=\"sub-menu-nav\">\r\n <li *ngFor=\"let choice of config.choices\">\r\n <p *ngIf=\"choice.separator && choice.title\" class=\"separator-title\">{{choice.title}}</p>\r\n <hr *ngIf=\"choice.separator\" />\r\n <button *ngIf=\"!choice.separator\" tabindex=\"-1\" (click)=\"choice.fire()\" [disabled]=\"!choice.enabled\">{{choice.label}}</button>\r\n </li>\r\n </ul>\r\n </div>\r\n</div>\r\n", styles: [".menu{padding:0 10px;border-bottom:1px solid #6b6b6b;background:#f7f7f7;height:26px}.menu,.menu a{color:#000}.menu-nav{float:left;height:26px}.menu-nav>*{margin-right:0}.menu-nav>*>a{padding:0 10px;height:20px;line-height:19px;display:block;margin:3px 2px 2px}.menu-nav>*>a:hover{background:#959595}.menu-nav>*:active>a{color:#fff}.menu-nav select::-ms-expand{display:none}.menu-nav{margin:0;list-style:none;padding:0}.menu-nav>*{float:left;position:relative;margin:0 .5em 0 0;line-height:1}.menu-nav>*:last-child{margin-right:0}li.has-sub-menu{padding:0 5px}.has-sub-menu{position:relative;cursor:pointer}.has-sub-menu button{background:transparent;border:none;text-decoration:none;cursor:pointer;display:block;width:100%;text-align:left;outline:none;padding:0 10px!important}.has-sub-menu p{background:transparent;border:none;text-decoration:none;cursor:pointer;display:block;width:100%;text-align:left;outline:none;padding:0 10px!important;line-height:26px;pointer-events:none}.has-sub-menu p.separator-title{padding:0!important;font-size:12px;color:#ababab}.has-sub-menu:hover{background:#959595}\n", "p{margin:0;line-height:26px;pointer-events:none}.sub-menu{display:none;position:absolute;left:-1px;min-width:200px;padding:5px 0;background:#ffffff;border:1px solid #d5d5d5;border-top:none;z-index:99999999}.sub-menu-nav a{display:block;padding:0 20px;line-height:1.5}.sub-menu-nav a:hover{background:#959595;color:#fff}.sub-menu-nav hr{margin:0;color:#dedede}.sub-menu button{background:#fff;border:none;text-decoration:none;cursor:pointer;display:block;padding:0 20px!important;line-height:1.5;width:100%;text-align:left;outline:none}.sub-menu button:hover{background:#959595;color:#fff}.sub-menu button:disabled{background:#fff;color:#000;opacity:.5}.sub-menu-nav>li{position:relative;padding:0 3px}.sub-menu-nav>li:hover>.sub-menu{display:block;top:-6px;left:190px;border:1px solid #d5d5d5}.sub-menu-nav{margin:0;padding:0;list-style:none}.sub-menu-nav>*+*{display:block;margin-top:5px}.sub-menu-icon{font-size:18px;line-height:22px;vertical-align:middle;pointer-events:none}.is-active div.sub-menu{display:block}.sub-menu-nav p.separator-title{padding:0!important;font-size:12px;color:#ababab}.sub-menu-nav hr{margin:0;color:#dedede;border:0;border-top:1px solid #dfdfdf;border-bottom:1px solid #fff}\n"], dependencies: [{ 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"] }] });
501
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarMenuItem, decorators: [{
502
+ type: Component,
503
+ args: [{ selector: 'tru-toolbar-menu-item', template: "<div (click)=\"onClick($event)\">\r\n <p *ngIf=\"config.menuLabel\">{{config.menuLabel}}</p>\r\n <i *ngIf=\"config.menuIcon\" class=\"{{config.menuIcon}} sub-menu-icon\" tabindex=\"-1\"></i>\r\n <div class=\"sub-menu\" *ngIf=\"config.choices\">\r\n <ul class=\"sub-menu-nav\">\r\n <li *ngFor=\"let choice of config.choices\">\r\n <p *ngIf=\"choice.separator && choice.title\" class=\"separator-title\">{{choice.title}}</p>\r\n <hr *ngIf=\"choice.separator\" />\r\n <button *ngIf=\"!choice.separator\" tabindex=\"-1\" (click)=\"choice.fire()\" [disabled]=\"!choice.enabled\">{{choice.label}}</button>\r\n </li>\r\n </ul>\r\n </div>\r\n</div>\r\n", styles: [".menu{padding:0 10px;border-bottom:1px solid #6b6b6b;background:#f7f7f7;height:26px}.menu,.menu a{color:#000}.menu-nav{float:left;height:26px}.menu-nav>*{margin-right:0}.menu-nav>*>a{padding:0 10px;height:20px;line-height:19px;display:block;margin:3px 2px 2px}.menu-nav>*>a:hover{background:#959595}.menu-nav>*:active>a{color:#fff}.menu-nav select::-ms-expand{display:none}.menu-nav{margin:0;list-style:none;padding:0}.menu-nav>*{float:left;position:relative;margin:0 .5em 0 0;line-height:1}.menu-nav>*:last-child{margin-right:0}li.has-sub-menu{padding:0 5px}.has-sub-menu{position:relative;cursor:pointer}.has-sub-menu button{background:transparent;border:none;text-decoration:none;cursor:pointer;display:block;width:100%;text-align:left;outline:none;padding:0 10px!important}.has-sub-menu p{background:transparent;border:none;text-decoration:none;cursor:pointer;display:block;width:100%;text-align:left;outline:none;padding:0 10px!important;line-height:26px;pointer-events:none}.has-sub-menu p.separator-title{padding:0!important;font-size:12px;color:#ababab}.has-sub-menu:hover{background:#959595}\n", "p{margin:0;line-height:26px;pointer-events:none}.sub-menu{display:none;position:absolute;left:-1px;min-width:200px;padding:5px 0;background:#ffffff;border:1px solid #d5d5d5;border-top:none;z-index:99999999}.sub-menu-nav a{display:block;padding:0 20px;line-height:1.5}.sub-menu-nav a:hover{background:#959595;color:#fff}.sub-menu-nav hr{margin:0;color:#dedede}.sub-menu button{background:#fff;border:none;text-decoration:none;cursor:pointer;display:block;padding:0 20px!important;line-height:1.5;width:100%;text-align:left;outline:none}.sub-menu button:hover{background:#959595;color:#fff}.sub-menu button:disabled{background:#fff;color:#000;opacity:.5}.sub-menu-nav>li{position:relative;padding:0 3px}.sub-menu-nav>li:hover>.sub-menu{display:block;top:-6px;left:190px;border:1px solid #d5d5d5}.sub-menu-nav{margin:0;padding:0;list-style:none}.sub-menu-nav>*+*{display:block;margin-top:5px}.sub-menu-icon{font-size:18px;line-height:22px;vertical-align:middle;pointer-events:none}.is-active div.sub-menu{display:block}.sub-menu-nav p.separator-title{padding:0!important;font-size:12px;color:#ababab}.sub-menu-nav hr{margin:0;color:#dedede;border:0;border-top:1px solid #dfdfdf;border-bottom:1px solid #fff}\n"] }]
504
+ }], ctorParameters: function () { return []; }, propDecorators: { config: [{
505
+ type: Input
506
+ }] } });
507
+
508
+ class TruToolbarMenuButton {
509
+ constructor() {
510
+ }
511
+ }
512
+ TruToolbarMenuButton.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarMenuButton, deps: [], target: i0.ɵɵFactoryTarget.Component });
513
+ TruToolbarMenuButton.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.2", type: TruToolbarMenuButton, selector: "tru-toolbar-menu-button", inputs: { config: "config" }, ngImport: i0, template: "<div>\r\n <i *ngIf=\"config.menuIcon\" class=\"{{config.menuIcon}} sub-menu-icon\" tabindex=\"-1\" (click)=\"config.fire()\"></i>\r\n <button tabindex=\"-1\" (click)=\"config.fire()\" [disabled]=\"!config.enabled()\" *ngIf=\"config.hasAccess() && !config.menuIcon\">{{config.label}}</button>\r\n</div>\r\n", styles: [".menu{padding:0 10px;border-bottom:1px solid #6b6b6b;background:#f7f7f7;height:26px}.menu,.menu a{color:#000}.menu-nav{float:left;height:26px}.menu-nav>*{margin-right:0}.menu-nav>*>a{padding:0 10px;height:20px;line-height:19px;display:block;margin:3px 2px 2px}.menu-nav>*>a:hover{background:#959595}.menu-nav>*:active>a{color:#fff}.menu-nav select::-ms-expand{display:none}.menu-nav{margin:0;list-style:none;padding:0}.menu-nav>*{float:left;position:relative;margin:0 .5em 0 0;line-height:1}.menu-nav>*:last-child{margin-right:0}li.has-sub-menu{padding:0 5px}.has-sub-menu{position:relative;cursor:pointer}.has-sub-menu button{background:transparent;border:none;text-decoration:none;cursor:pointer;display:block;width:100%;text-align:left;outline:none;padding:0 10px!important}.has-sub-menu p{background:transparent;border:none;text-decoration:none;cursor:pointer;display:block;width:100%;text-align:left;outline:none;padding:0 10px!important;line-height:26px;pointer-events:none}.has-sub-menu p.separator-title{padding:0!important;font-size:12px;color:#ababab}.has-sub-menu:hover{background:#959595}\n", ".sub-menu-icon{font-size:18px;line-height:22px;vertical-align:middle;pointer-events:none}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], encapsulation: i0.ViewEncapsulation.None });
514
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarMenuButton, decorators: [{
515
+ type: Component,
516
+ args: [{ selector: 'tru-toolbar-menu-button', encapsulation: ViewEncapsulation.None, template: "<div>\r\n <i *ngIf=\"config.menuIcon\" class=\"{{config.menuIcon}} sub-menu-icon\" tabindex=\"-1\" (click)=\"config.fire()\"></i>\r\n <button tabindex=\"-1\" (click)=\"config.fire()\" [disabled]=\"!config.enabled()\" *ngIf=\"config.hasAccess() && !config.menuIcon\">{{config.label}}</button>\r\n</div>\r\n", styles: [".menu{padding:0 10px;border-bottom:1px solid #6b6b6b;background:#f7f7f7;height:26px}.menu,.menu a{color:#000}.menu-nav{float:left;height:26px}.menu-nav>*{margin-right:0}.menu-nav>*>a{padding:0 10px;height:20px;line-height:19px;display:block;margin:3px 2px 2px}.menu-nav>*>a:hover{background:#959595}.menu-nav>*:active>a{color:#fff}.menu-nav select::-ms-expand{display:none}.menu-nav{margin:0;list-style:none;padding:0}.menu-nav>*{float:left;position:relative;margin:0 .5em 0 0;line-height:1}.menu-nav>*:last-child{margin-right:0}li.has-sub-menu{padding:0 5px}.has-sub-menu{position:relative;cursor:pointer}.has-sub-menu button{background:transparent;border:none;text-decoration:none;cursor:pointer;display:block;width:100%;text-align:left;outline:none;padding:0 10px!important}.has-sub-menu p{background:transparent;border:none;text-decoration:none;cursor:pointer;display:block;width:100%;text-align:left;outline:none;padding:0 10px!important;line-height:26px;pointer-events:none}.has-sub-menu p.separator-title{padding:0!important;font-size:12px;color:#ababab}.has-sub-menu:hover{background:#959595}\n", ".sub-menu-icon{font-size:18px;line-height:22px;vertical-align:middle;pointer-events:none}\n"] }]
517
+ }], ctorParameters: function () { return []; }, propDecorators: { config: [{
518
+ type: Input
519
+ }] } });
520
+
521
+ class TruToolbarMenu {
522
+ constructor() {
523
+ this.onDocumentClick = (event) => {
524
+ var activeMenus = document.querySelectorAll('.is-active');
525
+ var target = event.target;
526
+ activeMenus.forEach((activeMenu) => {
527
+ if (activeMenu !== target) {
528
+ activeMenu.classList.remove('is-active');
529
+ }
530
+ });
531
+ };
532
+ }
533
+ ngAfterViewInit() {
534
+ document.addEventListener('click', this.onDocumentClick);
535
+ }
536
+ ngOnDestroy() {
537
+ document.removeEventListener('click', this.onDocumentClick);
538
+ }
539
+ }
540
+ TruToolbarMenu.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarMenu, deps: [], target: i0.ɵɵFactoryTarget.Component });
541
+ TruToolbarMenu.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.2", type: TruToolbarMenu, selector: "tru-toolbar-menu", inputs: { config: "config" }, ngImport: i0, template: "<ul class=\"hList menu-nav\">\r\n <li class=\"has-sub-menu\">\r\n <tru-toolbar-menu-button [config]=\"config\" *ngIf=\"!config.choices\"></tru-toolbar-menu-button>\r\n <tru-toolbar-menu-item [config]=\"config\" *ngIf=\"config.choices && config.choices.length\"></tru-toolbar-menu-item>\r\n </li>\r\n</ul>\r\n", styles: [".menu{padding:0 10px;border-bottom:1px solid #6b6b6b;background:#f7f7f7;height:26px}.menu,.menu a{color:#000}.menu-nav{float:left;height:26px}.menu-nav>*{margin-right:0}.menu-nav>*>a{padding:0 10px;height:20px;line-height:19px;display:block;margin:3px 2px 2px}.menu-nav>*>a:hover{background:#959595}.menu-nav>*:active>a{color:#fff}.menu-nav select::-ms-expand{display:none}.menu-nav{margin:0;list-style:none;padding:0}.menu-nav>*{float:left;position:relative;margin:0 .5em 0 0;line-height:1}.menu-nav>*:last-child{margin-right:0}li.has-sub-menu{padding:0 5px}.has-sub-menu{position:relative;cursor:pointer}.has-sub-menu button{background:transparent;border:none;text-decoration:none;cursor:pointer;display:block;width:100%;text-align:left;outline:none;padding:0 10px!important}.has-sub-menu p{background:transparent;border:none;text-decoration:none;cursor:pointer;display:block;width:100%;text-align:left;outline:none;padding:0 10px!important;line-height:26px;pointer-events:none}.has-sub-menu p.separator-title{padding:0!important;font-size:12px;color:#ababab}.has-sub-menu:hover{background:#959595}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: TruToolbarMenuItem, selector: "tru-toolbar-menu-item", inputs: ["config"] }, { kind: "component", type: TruToolbarMenuButton, selector: "tru-toolbar-menu-button", inputs: ["config"] }] });
542
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarMenu, decorators: [{
543
+ type: Component,
544
+ args: [{ selector: 'tru-toolbar-menu', template: "<ul class=\"hList menu-nav\">\r\n <li class=\"has-sub-menu\">\r\n <tru-toolbar-menu-button [config]=\"config\" *ngIf=\"!config.choices\"></tru-toolbar-menu-button>\r\n <tru-toolbar-menu-item [config]=\"config\" *ngIf=\"config.choices && config.choices.length\"></tru-toolbar-menu-item>\r\n </li>\r\n</ul>\r\n", styles: [".menu{padding:0 10px;border-bottom:1px solid #6b6b6b;background:#f7f7f7;height:26px}.menu,.menu a{color:#000}.menu-nav{float:left;height:26px}.menu-nav>*{margin-right:0}.menu-nav>*>a{padding:0 10px;height:20px;line-height:19px;display:block;margin:3px 2px 2px}.menu-nav>*>a:hover{background:#959595}.menu-nav>*:active>a{color:#fff}.menu-nav select::-ms-expand{display:none}.menu-nav{margin:0;list-style:none;padding:0}.menu-nav>*{float:left;position:relative;margin:0 .5em 0 0;line-height:1}.menu-nav>*:last-child{margin-right:0}li.has-sub-menu{padding:0 5px}.has-sub-menu{position:relative;cursor:pointer}.has-sub-menu button{background:transparent;border:none;text-decoration:none;cursor:pointer;display:block;width:100%;text-align:left;outline:none;padding:0 10px!important}.has-sub-menu p{background:transparent;border:none;text-decoration:none;cursor:pointer;display:block;width:100%;text-align:left;outline:none;padding:0 10px!important;line-height:26px;pointer-events:none}.has-sub-menu p.separator-title{padding:0!important;font-size:12px;color:#ababab}.has-sub-menu:hover{background:#959595}\n"] }]
545
+ }], ctorParameters: function () { return []; }, propDecorators: { config: [{
546
+ type: Input
547
+ }] } });
548
+
549
+ class TruToolbarSeparator {
550
+ constructor() { }
551
+ }
552
+ TruToolbarSeparator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarSeparator, deps: [], target: i0.ɵɵFactoryTarget.Component });
553
+ TruToolbarSeparator.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.2", type: TruToolbarSeparator, selector: "tru-toolbar-separator", ngImport: i0, template: "<div class=\"tru-toolbar-separator\"></div>\r\n", styles: [".tru-toolbar-separator{display:inline-block;border-left:1px solid #999;margin:0 3px;font-size:1.4rem;line-height:1.8rem;text-indent:-99em;vertical-align:-2px;height:15px;margin-top:5px!important}\n"] });
554
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarSeparator, decorators: [{
555
+ type: Component,
556
+ args: [{ selector: 'tru-toolbar-separator', template: "<div class=\"tru-toolbar-separator\"></div>\r\n", styles: [".tru-toolbar-separator{display:inline-block;border-left:1px solid #999;margin:0 3px;font-size:1.4rem;line-height:1.8rem;text-indent:-99em;vertical-align:-2px;height:15px;margin-top:5px!important}\n"] }]
557
+ }], ctorParameters: function () { return []; } });
558
+
559
+ class TruToolbarContextFilter {
560
+ constructor() {
561
+ this.config = null;
562
+ this.filters = []; //this.contextFilterConfig.contextFilters;
563
+ }
564
+ ngOnInit() {
565
+ }
566
+ }
567
+ TruToolbarContextFilter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarContextFilter, deps: [], target: i0.ɵɵFactoryTarget.Component });
568
+ TruToolbarContextFilter.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.2", type: TruToolbarContextFilter, selector: "tru-toolbar-context-filter", inputs: { config: "config" }, ngImport: i0, template: "<mat-form-field *ngIf=\"filters.length\">\r\n <div *ngFor=\"let filter of filters\">\r\n <mat-select [(ngModel)]=\"filter.selectedChoice\"\r\n [compareWith]=\"filter.comparer\"\r\n (selectionChange)=\"filter.onChange(filter.selectedChoice)\"\r\n title=\"{{filter.tooltip}}\">\r\n <mat-option *ngFor=\"let choice of filter.choices; trackBy filter.identify\" [value]=\"choice\">\r\n {{choice.label}}\r\n </mat-option>\r\n </mat-select>\r\n </div>\r\n</mat-form-field>\r\n", styles: [".toolbar{height:25px}.toolbar .toolbar-btn{height:26px}.toolbar .mat-form-field-infix{padding:0;border-top:0;width:auto}.toolbar .mat-form-field-underline{background-color:red}.toolbar .mat-form-field .mat-form-field-underline,.toolbar .mat-form-field.mat-focused .mat-form-field-underline{display:none}.toolbar-group,.toolbar-group-vertical{position:relative;display:flex;vertical-align:middle;height:25px}.toolbar-group>.toolbar-btn,.toolbar-group-vertical>.toolbar-btn{position:relative;float:left}.toolbar-group>.toolbar-btn:hover,.toolbar-group-vertical>.toolbar-btn:hover,.toolbar-group>.toolbar-btn:focus,.toolbar-group-vertical>.toolbar-btn:focus,.toolbar-group>.toolbar-btn:active,.toolbar-group-vertical>.toolbar-btn:active,.toolbar-group>.toolbar-btn.active,.toolbar-group-vertical>.toolbar-btn.active{z-index:2}.toolbar-group .toolbar-btn+.toolbar-btn,.toolbar-group .toolbar-btn+.toolbar-group,.toolbar-group .toolbar-group+.toolbar-btn,.toolbar-group .toolbar-group+.toolbar-group{margin-left:-1px}.toolbar-group>.toolbar-btn:not(:first-child):not(:last-child){border-radius:0}.toolbar-group>.toolbar-btn:first-child{margin-left:0}.toolbar-group>.toolbar-btn:first-child:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.toolbar-group>.toolbar-btn:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.toolbar-group>.toolbar-btn{padding:1px 5px;font-size:12px;line-height:1;border-radius:0}.toolbar-group .btn_iconOnly{padding:0;margin:0}.toolbar-group .btn_iconOnly i{vertical-align:15%}.toolbar-group div{padding:0;margin:0}.toolbar-group button{padding:0!important}.toolbar-group span,.toolbar-group i{padding:0;margin:0}.toolbar-group button{vertical-align:top}\n", ".toolbar mat-select{width:auto;min-width:90px;padding:3px;padding-top:3px!important;font-family:Calibri,Helvetica,Arial,sans-serif!important;background-color:#ebebeb;height:15px;margin-top:2px;margin-left:2px;margin-right:2px}.toolbar .mat-form-field-underline{background-color:red}.toolbar .mat-form-field .mat-form-field-underline,.toolbar .mat-form-field.mat-focused .mat-form-field-underline{display:none}\n"], dependencies: [{ 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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "component", type: i4.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }], encapsulation: i0.ViewEncapsulation.None });
569
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarContextFilter, decorators: [{
570
+ type: Component,
571
+ args: [{ selector: 'tru-toolbar-context-filter', encapsulation: ViewEncapsulation.None, template: "<mat-form-field *ngIf=\"filters.length\">\r\n <div *ngFor=\"let filter of filters\">\r\n <mat-select [(ngModel)]=\"filter.selectedChoice\"\r\n [compareWith]=\"filter.comparer\"\r\n (selectionChange)=\"filter.onChange(filter.selectedChoice)\"\r\n title=\"{{filter.tooltip}}\">\r\n <mat-option *ngFor=\"let choice of filter.choices; trackBy filter.identify\" [value]=\"choice\">\r\n {{choice.label}}\r\n </mat-option>\r\n </mat-select>\r\n </div>\r\n</mat-form-field>\r\n", styles: [".toolbar{height:25px}.toolbar .toolbar-btn{height:26px}.toolbar .mat-form-field-infix{padding:0;border-top:0;width:auto}.toolbar .mat-form-field-underline{background-color:red}.toolbar .mat-form-field .mat-form-field-underline,.toolbar .mat-form-field.mat-focused .mat-form-field-underline{display:none}.toolbar-group,.toolbar-group-vertical{position:relative;display:flex;vertical-align:middle;height:25px}.toolbar-group>.toolbar-btn,.toolbar-group-vertical>.toolbar-btn{position:relative;float:left}.toolbar-group>.toolbar-btn:hover,.toolbar-group-vertical>.toolbar-btn:hover,.toolbar-group>.toolbar-btn:focus,.toolbar-group-vertical>.toolbar-btn:focus,.toolbar-group>.toolbar-btn:active,.toolbar-group-vertical>.toolbar-btn:active,.toolbar-group>.toolbar-btn.active,.toolbar-group-vertical>.toolbar-btn.active{z-index:2}.toolbar-group .toolbar-btn+.toolbar-btn,.toolbar-group .toolbar-btn+.toolbar-group,.toolbar-group .toolbar-group+.toolbar-btn,.toolbar-group .toolbar-group+.toolbar-group{margin-left:-1px}.toolbar-group>.toolbar-btn:not(:first-child):not(:last-child){border-radius:0}.toolbar-group>.toolbar-btn:first-child{margin-left:0}.toolbar-group>.toolbar-btn:first-child:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.toolbar-group>.toolbar-btn:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.toolbar-group>.toolbar-btn{padding:1px 5px;font-size:12px;line-height:1;border-radius:0}.toolbar-group .btn_iconOnly{padding:0;margin:0}.toolbar-group .btn_iconOnly i{vertical-align:15%}.toolbar-group div{padding:0;margin:0}.toolbar-group button{padding:0!important}.toolbar-group span,.toolbar-group i{padding:0;margin:0}.toolbar-group button{vertical-align:top}\n", ".toolbar mat-select{width:auto;min-width:90px;padding:3px;padding-top:3px!important;font-family:Calibri,Helvetica,Arial,sans-serif!important;background-color:#ebebeb;height:15px;margin-top:2px;margin-left:2px;margin-right:2px}.toolbar .mat-form-field-underline{background-color:red}.toolbar .mat-form-field .mat-form-field-underline,.toolbar .mat-form-field.mat-focused .mat-form-field-underline{display:none}\n"] }]
572
+ }], ctorParameters: function () { return []; }, propDecorators: { config: [{
573
+ type: Input
574
+ }] } });
575
+
576
+ class TruDesktopMenubar {
577
+ constructor() {
578
+ this.options = null;
579
+ this.configs = null;
580
+ this.openWindow = (event, windowOverrides) => {
581
+ this.desktopCtrl.openWindow(windowOverrides);
582
+ };
583
+ }
584
+ ngOnInit() {
585
+ this.options = this.desktopCtrl.getOptions();
586
+ this.configs = this.options.menubarConfig;
587
+ }
588
+ }
589
+ TruDesktopMenubar.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopMenubar, deps: [], target: i0.ɵɵFactoryTarget.Component });
590
+ TruDesktopMenubar.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.2", type: TruDesktopMenubar, selector: "tru-desktop-menubar", inputs: { desktopCtrl: "desktopCtrl" }, ngImport: i0, template: "<div class=\"desktop-main-menu\">\r\n <tru-toolbar>\r\n <tru-toolbar-menu *ngFor=\"let config of configs\" [config]=\"config\"></tru-toolbar-menu>\r\n <tru-toolbar-separator></tru-toolbar-separator>\r\n <tru-toolbar-context-filter></tru-toolbar-context-filter>\r\n </tru-toolbar>\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: TruToolbar, selector: "tru-toolbar", inputs: ["config"] }, { kind: "component", type: TruToolbarMenu, selector: "tru-toolbar-menu", inputs: ["config"] }, { kind: "component", type: TruToolbarSeparator, selector: "tru-toolbar-separator" }, { kind: "component", type: TruToolbarContextFilter, selector: "tru-toolbar-context-filter", inputs: ["config"] }], encapsulation: i0.ViewEncapsulation.None });
591
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopMenubar, decorators: [{
592
+ type: Component,
593
+ args: [{ selector: 'tru-desktop-menubar', encapsulation: ViewEncapsulation.None, template: "<div class=\"desktop-main-menu\">\r\n <tru-toolbar>\r\n <tru-toolbar-menu *ngFor=\"let config of configs\" [config]=\"config\"></tru-toolbar-menu>\r\n <tru-toolbar-separator></tru-toolbar-separator>\r\n <tru-toolbar-context-filter></tru-toolbar-context-filter>\r\n </tru-toolbar>\r\n</div>\r\n" }]
594
+ }], ctorParameters: function () { return []; }, propDecorators: { desktopCtrl: [{
595
+ type: Input
596
+ }] } });
597
+
598
+ class TruDesktopTaskbar {
599
+ constructor() {
600
+ this.options = null;
601
+ this.desktopShown = false;
602
+ this.updateWindowState = (wdw) => {
603
+ if (wdw.active)
604
+ this.desktopCtrl.minimize(wdw);
605
+ else if (!wdw.outOfBounds)
606
+ this.desktopCtrl.restore(wdw);
607
+ else if (wdw.outOfBounds)
608
+ this.desktopCtrl.recover(wdw);
609
+ };
610
+ this.hideShowAll = () => {
611
+ this.desktopShown = this.desktopCtrl.hideShowAll();
612
+ };
613
+ this.close = (e, wdw) => {
614
+ this.desktopCtrl.closeWindow(wdw);
615
+ e.stopPropagation();
616
+ e.preventDefault();
617
+ };
618
+ }
619
+ ngOnInit() {
620
+ this.options = this.desktopCtrl.getOptions();
621
+ }
622
+ }
623
+ TruDesktopTaskbar.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopTaskbar, deps: [], target: i0.ɵɵFactoryTarget.Component });
624
+ TruDesktopTaskbar.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.2", type: TruDesktopTaskbar, selector: "tru-desktop-taskbar", inputs: { windows: "windows", desktopCtrl: "desktopCtrl" }, ngImport: i0, template: "<div class=\"desktop-taskbar-container\">\r\n <div class=\"desktop-taskbar-list\">\r\n <ul>\r\n <li class=\"am-fade-and-scale desktop-text\"\r\n *ngFor=\"let window of windows\"\r\n (click)=\"updateWindowState(window)\">\r\n <div class=\"desktop-relative desktop-taskbar-list-item\" [ngClass]=\"{'desktop-active-taskbar-list-item': window.active, 'desktop-minimized-taskbar-list-item': window.minimized, 'desktop-taskbar-list-item-recover': window.outOfBounds}\">\r\n <div class=\"desktop-taskbar-list-item-title\">\r\n <span>{{window.title}}</span>\r\n </div>\r\n <mat-icon [svgIcon]=\"'tru-toolbar-close-icon'\" class=\"desktop-taskbar-list-item-close-icon\" [ngClass]=\"{'desktop-taskbar-list-item-close-minimized': window.minimized}\" (click)=\"close($event, window)\"></mat-icon>\r\n </div>\r\n </li>\r\n </ul>\r\n </div>\r\n <div class=\"desktop-taskbar-hide\">\r\n <div class=\"desktop-taskbar-hide-button\" (click)=\"hideShowAll()\">\r\n\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".desktop-taskbar-container{position:absolute!important;left:0;right:0;bottom:0;height:40px;background:#f8f8f8;border:1px solid #6b6b6b}.desktop-taskbar-launch-menu{position:absolute!important;top:0;left:0;bottom:0;width:50px;background:#f8f8f8;border-right:1px solid #e7e7e7}.desktop-taskbar-launch-button{height:35px;width:43px;background-clip:padding-box;border-radius:6px;border:1px solid #dfdfdf;margin:2px;padding-top:1px;padding-left:5px}.desktop-taskbar-launch-button:active{margin-top:3px;margin-left:3px;outline:0;box-shadow:0 0 10px #0057ff}.desktop-taskbar-list{position:absolute!important;inset:0 16px 0 0;background:#f8f8f8}.desktop-taskbar-list-offset{left:50px}.desktop-taskbar-list ul{padding:3px;margin:0}.desktop-taskbar-list ul>li{display:inline-block;list-style:none;width:165px;height:33px}.desktop-taskbar-list ul>li>div{background-clip:padding-box;border-radius:0;border:1px solid #dfdfdf;line-height:30px;margin-top:1px;margin-left:7px;overflow:hidden}.desktop-taskbar-list ul>li>div:active{top:1px;left:1px}.desktop-taskbar-list li span{position:relative;left:5px;margin-left:5px;text-overflow:ellipsis;font-size:12px;font-weight:700}.desktop-taskbar-list-item-recover{background:maroon!important;color:#fff!important}.desktop-taskbar-list-item-title{width:135px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;cursor:default}.desktop-taskbar-list-item-close{position:absolute;z-index:1;top:11px;right:5px;font-size:9px;color:#333;cursor:pointer}.desktop-taskbar-list-item-close-minimized{color:#bababa}.desktop-taskbar-list-item-close:active{top:10px;right:6px}.desktop-taskbar-list-item-close:hover{color:maroon}.desktop-taskbar-list-item{background-color:#f8f8f8;position:relative}.desktop-taskbar-list-item-close-icon{position:absolute;right:2px;top:5px;height:16px}.desktop-active-taskbar-list-item{outline:0;border:1px solid #6b6b6b!important;box-shadow:inset 0 1px 1px #00000013;color:#333}.desktop-minimized-taskbar-list-item{color:#bababa}.desktop-taskbar-hide{position:absolute!important;top:0;right:0;bottom:0;width:16px;background:#f8f8f8}.desktop-taskbar-hide-button{height:35px;width:12px;background-clip:padding-box;border-radius:0;border:1px solid #dfdfdf;margin:2px}.desktop-taskbar-hide-button:active{margin-top:3px;margin-left:3px;outline:0;box-shadow:0 0 10px #0057ff}\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: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
625
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopTaskbar, decorators: [{
626
+ type: Component,
627
+ args: [{ selector: 'tru-desktop-taskbar', template: "<div class=\"desktop-taskbar-container\">\r\n <div class=\"desktop-taskbar-list\">\r\n <ul>\r\n <li class=\"am-fade-and-scale desktop-text\"\r\n *ngFor=\"let window of windows\"\r\n (click)=\"updateWindowState(window)\">\r\n <div class=\"desktop-relative desktop-taskbar-list-item\" [ngClass]=\"{'desktop-active-taskbar-list-item': window.active, 'desktop-minimized-taskbar-list-item': window.minimized, 'desktop-taskbar-list-item-recover': window.outOfBounds}\">\r\n <div class=\"desktop-taskbar-list-item-title\">\r\n <span>{{window.title}}</span>\r\n </div>\r\n <mat-icon [svgIcon]=\"'tru-toolbar-close-icon'\" class=\"desktop-taskbar-list-item-close-icon\" [ngClass]=\"{'desktop-taskbar-list-item-close-minimized': window.minimized}\" (click)=\"close($event, window)\"></mat-icon>\r\n </div>\r\n </li>\r\n </ul>\r\n </div>\r\n <div class=\"desktop-taskbar-hide\">\r\n <div class=\"desktop-taskbar-hide-button\" (click)=\"hideShowAll()\">\r\n\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".desktop-taskbar-container{position:absolute!important;left:0;right:0;bottom:0;height:40px;background:#f8f8f8;border:1px solid #6b6b6b}.desktop-taskbar-launch-menu{position:absolute!important;top:0;left:0;bottom:0;width:50px;background:#f8f8f8;border-right:1px solid #e7e7e7}.desktop-taskbar-launch-button{height:35px;width:43px;background-clip:padding-box;border-radius:6px;border:1px solid #dfdfdf;margin:2px;padding-top:1px;padding-left:5px}.desktop-taskbar-launch-button:active{margin-top:3px;margin-left:3px;outline:0;box-shadow:0 0 10px #0057ff}.desktop-taskbar-list{position:absolute!important;inset:0 16px 0 0;background:#f8f8f8}.desktop-taskbar-list-offset{left:50px}.desktop-taskbar-list ul{padding:3px;margin:0}.desktop-taskbar-list ul>li{display:inline-block;list-style:none;width:165px;height:33px}.desktop-taskbar-list ul>li>div{background-clip:padding-box;border-radius:0;border:1px solid #dfdfdf;line-height:30px;margin-top:1px;margin-left:7px;overflow:hidden}.desktop-taskbar-list ul>li>div:active{top:1px;left:1px}.desktop-taskbar-list li span{position:relative;left:5px;margin-left:5px;text-overflow:ellipsis;font-size:12px;font-weight:700}.desktop-taskbar-list-item-recover{background:maroon!important;color:#fff!important}.desktop-taskbar-list-item-title{width:135px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;cursor:default}.desktop-taskbar-list-item-close{position:absolute;z-index:1;top:11px;right:5px;font-size:9px;color:#333;cursor:pointer}.desktop-taskbar-list-item-close-minimized{color:#bababa}.desktop-taskbar-list-item-close:active{top:10px;right:6px}.desktop-taskbar-list-item-close:hover{color:maroon}.desktop-taskbar-list-item{background-color:#f8f8f8;position:relative}.desktop-taskbar-list-item-close-icon{position:absolute;right:2px;top:5px;height:16px}.desktop-active-taskbar-list-item{outline:0;border:1px solid #6b6b6b!important;box-shadow:inset 0 1px 1px #00000013;color:#333}.desktop-minimized-taskbar-list-item{color:#bababa}.desktop-taskbar-hide{position:absolute!important;top:0;right:0;bottom:0;width:16px;background:#f8f8f8}.desktop-taskbar-hide-button{height:35px;width:12px;background-clip:padding-box;border-radius:0;border:1px solid #dfdfdf;margin:2px}.desktop-taskbar-hide-button:active{margin-top:3px;margin-left:3px;outline:0;box-shadow:0 0 10px #0057ff}\n"] }]
628
+ }], ctorParameters: function () { return []; }, propDecorators: { windows: [{
629
+ type: Input
630
+ }], desktopCtrl: [{
631
+ type: Input
632
+ }] } });
633
+
634
+ class TruBreezeContextFactory {
635
+ constructor() {
636
+ /**
637
+ * Maximum number of records to return from a query.
638
+ * @return {number}
639
+ */
640
+ this.servicePath = window.location.hostname === 'localhost' ? 'https://localhost:44303/api/TruDB' : '/api/TruDB';
641
+ this.metadataStore = new MetadataStore();
642
+ /**
643
+ * Note: hasServerMetadata is false to prevent the automatic query of the metadata from the server.
644
+ */
645
+ this.breezeDataService = new DataService({
646
+ serviceName: this.servicePath,
647
+ hasServerMetadata: false
648
+ });
649
+ this.setUpMetadata = (metadata) => {
650
+ if (this.metadataStore.isEmpty())
651
+ return this.metadataStore.importMetadata(metadata);
652
+ return this.metadataStore;
653
+ };
654
+ /**
655
+ * Returns a new data context object.
656
+ * @return {object} - Breeze Manager
657
+ */
658
+ this.createContext = (tableName = null) => {
659
+ let entityManager = new EntityManager({
660
+ dataService: this.breezeDataService,
661
+ metadataStore: this.metadataStore
662
+ });
663
+ let breezeContext = new TruBreezeContext(entityManager);
664
+ /**
665
+ * Cache the active user's user record since it is required to be in the cache
666
+ * for some situations such as when create new record and the view displays the
667
+ * created user audit property. If it fails, the next context will try again.
668
+ * Of course, the already existing context(s) won't have the record cached, but
669
+ * it's a rather unlikely situation and it's non-fatal, so just let it fail.
670
+ */
671
+ var activeUserRecordExport;
672
+ if (activeUserRecordExport) {
673
+ entityManager.importEntities(activeUserRecordExport);
674
+ }
675
+ return breezeContext;
676
+ };
677
+ }
678
+ }
679
+ TruBreezeContextFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruBreezeContextFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
680
+ TruBreezeContextFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruBreezeContextFactory, providedIn: 'root' });
681
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruBreezeContextFactory, decorators: [{
682
+ type: Injectable,
683
+ args: [{
684
+ providedIn: 'root',
685
+ }]
686
+ }], ctorParameters: function () { return []; } });
687
+ class TruBreezeContext {
688
+ constructor(manager) {
689
+ this.manager = manager;
690
+ this._entityManager = manager;
691
+ }
692
+ get createQuery() {
693
+ return (x) => { return new EntityQuery(x); };
694
+ }
695
+ ;
696
+ get entityManager() {
697
+ return this._entityManager;
698
+ }
699
+ ;
700
+ }
701
+
702
+ class TruAppEnvironment {
703
+ constructor() {
704
+ this._activeUserRef = new BehaviorSubject(1);
705
+ this._isSaving = new BehaviorSubject(false);
706
+ this._saveComplete = new BehaviorSubject(null);
707
+ this._revertComplete = new BehaviorSubject(null);
708
+ this._deleteComplete = new BehaviorSubject(null);
709
+ this.onSavingChanged$ = this._isSaving.asObservable();
710
+ this.onSaveComplete$ = this._saveComplete.asObservable();
711
+ this.onRevertComplete$ = this._revertComplete.asObservable();
712
+ this.onDeleteComplete$ = this._deleteComplete.asObservable();
713
+ this.saveComplete = (event) => {
714
+ this._saveComplete.next(event);
715
+ };
716
+ this.revertComplete = (event) => {
717
+ this._revertComplete.next(event);
718
+ };
719
+ this.deleteComplete = (event) => {
720
+ this._deleteComplete.next(event);
721
+ };
722
+ this.formatDeleteConfirmationMessage = (tableName, tablePluralLabel, count) => {
723
+ if (count === null)
724
+ return 'Are you sure you want to delete this ' + tableName + '?';
725
+ if (count === 1)
726
+ return 'Are you sure you want to delete 1 ' + tableName + '?';
727
+ return 'Are you sure you want to delete ' + count + ' ' + tablePluralLabel + '?';
728
+ };
729
+ this._maxRecordCount = 0;
730
+ this.msgModifierKeyLabel = this.isMac ? 'Cmd' : 'Ctrl';
731
+ this.msgConfirmExitWithChangesPending = 'You have unsaved changes that will be lost.';
732
+ this.msgDeleteSuccessful = 'Delete succeeded';
733
+ this.msgSaveSuccessful = 'Save succeeded';
734
+ this.msgNoChangesToSave = 'No changes to save';
735
+ this.msgSaveInProgress = 'Save in progress';
736
+ this.msgInvalidData = 'Invalid data';
737
+ this.msgDirtyPreventsReadOnly = 'Save or revert before disabling editing';
738
+ this.msgDirtyPreventsNavigate = 'Save or revert before navigating';
739
+ this.msgDirtyPreventsClose = 'Save or revert before closing window';
740
+ this.msgDirtyPreventsDeleteExistingRecord = 'Save or revert before deleting';
741
+ this.msgNoDeleteAccess = 'Contact administrator about delete access';
742
+ this.msgCannotDeleteNewAndExistingRecords = 'Delete new or existing records - but not both';
743
+ this.msgDeleteReferencingRecordsFirst = 'Delete all referencing records first';
744
+ this.msgNoRecordsSelected = 'No Records selected';
745
+ }
746
+ get activeUserRef() {
747
+ return this._activeUserRef.getValue();
748
+ }
749
+ set activeUserRef(ref) {
750
+ this._activeUserRef.next(ref);
751
+ }
752
+ get isSaving() {
753
+ return this._isSaving.getValue();
754
+ }
755
+ set isSaving(isSaving) {
756
+ this._isSaving.next(isSaving);
757
+ }
758
+ get maxRecordCount() {
759
+ return this._maxRecordCount;
760
+ }
761
+ set maxRecordCount(maxRecordCount) {
762
+ this._maxRecordCount = maxRecordCount;
763
+ }
764
+ get isMac() {
765
+ return navigator.platform.toUpperCase().indexOf('MAC') >= 0;
766
+ }
767
+ }
768
+ TruAppEnvironment.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruAppEnvironment, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
769
+ TruAppEnvironment.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruAppEnvironment });
770
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruAppEnvironment, decorators: [{
771
+ type: Injectable
772
+ }], ctorParameters: function () { return []; } });
773
+
774
+ class TruExportDialog {
775
+ constructor(dialogRef, data) {
776
+ this.dialogRef = dialogRef;
777
+ this.data = data;
778
+ this.options = {
779
+ useGrid: false,
780
+ useNames: false,
781
+ useEmptyTags: false,
782
+ async: false
783
+ };
784
+ this.onFormatForImportChecked = () => {
785
+ if (!this.options.useNames)
786
+ this.options.useEmptyTags = false;
787
+ };
788
+ this.title = data.title;
789
+ }
790
+ onConfirm() {
791
+ this.dialogRef.close(this.options);
792
+ }
793
+ onDismiss() {
794
+ this.dialogRef.close(false);
795
+ }
796
+ handleKeyboardEvent(event) {
797
+ if (event.keyCode == 27) {
798
+ this.dialogRef.close(false);
799
+ }
800
+ if (event.keyCode == 13) {
801
+ event.stopPropagation();
802
+ this.dialogRef.close(this.options);
803
+ }
804
+ }
805
+ ngOnInit() { }
806
+ }
807
+ TruExportDialog.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruExportDialog, deps: [{ token: i1.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
808
+ TruExportDialog.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.2", type: TruExportDialog, selector: "tru-export-dialog", host: { listeners: { "document:keypress": "handleKeyboardEvent($event)" } }, ngImport: i0, template: "<h1 mat-dialog-title>\r\n {{title}}\r\n</h1>\r\n\r\n<div mat-dialog-content>\r\n <table>\r\n <tbody>\r\n <tr>\r\n <td class=\"export-dialog-checkbox-container\" title=\"To support importing the export file: use names instead of labels.\">\r\n <mat-checkbox \r\n [(ngModel)]=\"options.useNames\"\r\n (change)=\"onFormatForImportChecked()\"\r\n [labelPosition]=\"'after'\">\r\n Format for import\r\n </mat-checkbox>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td class=\"export-dialog-checkbox-container\" title=\"Export only the rows in the grid. When unchecked, exports the results of a new search without limiting result count as is a normal search.\">\r\n <mat-checkbox \r\n [(ngModel)]=\"options.useGrid\"\r\n [labelPosition]=\"'after'\">\r\n Export grid rows\r\n </mat-checkbox>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n</div>\r\n\r\n<div mat-dialog-actions>\r\n <button mat-button (click)=\"onDismiss()\">No</button>\r\n <button mat-raised-button color=\"primary\" (click)=\"onConfirm()\">Yes</button>\r\n</div>\r\n", styles: [".mat-dialog-content{overflow:hidden}.export-dialog-checkbox-container{padding-bottom:5px;display:inline-block}\n"], dependencies: [{ kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }] });
809
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruExportDialog, decorators: [{
810
+ type: Component,
811
+ args: [{ selector: 'tru-export-dialog', template: "<h1 mat-dialog-title>\r\n {{title}}\r\n</h1>\r\n\r\n<div mat-dialog-content>\r\n <table>\r\n <tbody>\r\n <tr>\r\n <td class=\"export-dialog-checkbox-container\" title=\"To support importing the export file: use names instead of labels.\">\r\n <mat-checkbox \r\n [(ngModel)]=\"options.useNames\"\r\n (change)=\"onFormatForImportChecked()\"\r\n [labelPosition]=\"'after'\">\r\n Format for import\r\n </mat-checkbox>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td class=\"export-dialog-checkbox-container\" title=\"Export only the rows in the grid. When unchecked, exports the results of a new search without limiting result count as is a normal search.\">\r\n <mat-checkbox \r\n [(ngModel)]=\"options.useGrid\"\r\n [labelPosition]=\"'after'\">\r\n Export grid rows\r\n </mat-checkbox>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n</div>\r\n\r\n<div mat-dialog-actions>\r\n <button mat-button (click)=\"onDismiss()\">No</button>\r\n <button mat-raised-button color=\"primary\" (click)=\"onConfirm()\">Yes</button>\r\n</div>\r\n", styles: [".mat-dialog-content{overflow:hidden}.export-dialog-checkbox-container{padding-bottom:5px;display:inline-block}\n"] }]
812
+ }], ctorParameters: function () {
813
+ return [{ type: i1.MatDialogRef }, { type: TruExportDialog, decorators: [{
814
+ type: Inject,
815
+ args: [MAT_DIALOG_DATA]
816
+ }] }];
817
+ }, propDecorators: { handleKeyboardEvent: [{
818
+ type: HostListener,
819
+ args: ['document:keypress', ['$event']]
820
+ }] } });
821
+ class TruExportDialogConfig {
822
+ constructor(title) {
823
+ this.title = title;
824
+ }
825
+ }
826
+
827
+ class TruUiNotification {
828
+ constructor(toastr, dialog) {
829
+ this.toastr = toastr;
830
+ this.dialog = dialog;
831
+ this.showMessage = (popup, log, prefix, message, detail = null) => {
832
+ popup(message);
833
+ message = prefix + ': ' + message;
834
+ if (detail)
835
+ message += '\r\n' + detail;
836
+ this.log(message);
837
+ };
838
+ /**
839
+ * Shows as toast and logs to server an error message and optional detail information.
840
+ * @param {string} message - Displayed as toast.
841
+ * @param {string} [detail] - Logged to console.
842
+ */
843
+ this.error = (message, detail = null) => {
844
+ this.showMessage((message) => this._toastr.error(message), this.log, 'Error', message, detail);
845
+ };
846
+ /**
847
+ * Same as error() but for info message.
848
+ */
849
+ this.info = (message, detail = null) => {
850
+ this.showMessage((message) => this._toastr.info(message), this.log, 'Info', message, detail);
851
+ };
852
+ /**
853
+ * Same as error() but for success message.
854
+ */
855
+ this.success = (message, detail = null) => {
856
+ this.showMessage((message) => this._toastr.success(message), this.log, 'Success', message, detail);
857
+ };
858
+ /**
859
+ * Same as error() but for warning message.
860
+ */
861
+ this.warning = (message, detail = null) => {
862
+ this.showMessage((message) => this._toastr.warning(message), this.log, 'Warning', message, detail);
863
+ };
864
+ this.log = (message) => {
865
+ var console = window.console;
866
+ !!console && console.log && console.log.apply && console.log.apply(console, [message]);
867
+ };
868
+ this.showErrorDialog = (title, message) => {
869
+ };
870
+ this.showExportDialog = () => {
871
+ return new Promise((resolve, reject) => {
872
+ let dialogConfig = new TruExportDialogConfig('Export');
873
+ let dialogRef = this._dialog.open(TruExportDialog, {
874
+ disableClose: true,
875
+ minWidth: "200px",
876
+ maxWidth: "400px",
877
+ data: dialogConfig
878
+ });
879
+ dialogRef.afterClosed().subscribe(dialogResult => {
880
+ resolve(dialogResult);
881
+ });
882
+ });
883
+ };
884
+ this.confirm = (title, message) => {
885
+ return new Promise((resolve, reject) => {
886
+ let dialogConfig = new TruConfirmDialogConfig(title, message);
887
+ let dialogRef = this._dialog.open(TruConfirmDialog, {
888
+ disableClose: true,
889
+ minWidth: "200px",
890
+ maxWidth: "400px",
891
+ data: dialogConfig
892
+ });
893
+ dialogRef.afterClosed().subscribe(dialogResult => {
894
+ resolve(dialogResult);
895
+ });
896
+ });
897
+ };
898
+ this._toastr = toastr;
899
+ this._dialog = dialog;
900
+ }
901
+ }
902
+ TruUiNotification.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruUiNotification, deps: [{ token: i1$2.ToastrService }, { token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Injectable });
903
+ TruUiNotification.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruUiNotification, providedIn: 'root' });
904
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruUiNotification, decorators: [{
905
+ type: Injectable,
906
+ args: [{
907
+ providedIn: 'root',
908
+ }]
909
+ }], ctorParameters: function () { return [{ type: i1$2.ToastrService }, { type: i1.MatDialog }]; } });
910
+
911
+ class TruEntityAccessor {
912
+ constructor(http, uiNotification) {
913
+ this.http = http;
914
+ this.uiNotification = uiNotification;
915
+ this._maxRecordCount = 0;
916
+ this.getQueryServiceName = (entity) => {
917
+ return 'Query' + entity.name;
918
+ };
919
+ this.warnIfMaxRecords = (entities, entityName) => {
920
+ if (entities.length >= this.maxRecordCount)
921
+ this.uiNotification.warning('[' + entityName + '] has more records available than supported');
922
+ };
923
+ this.formatQueryChoices = (query, entities, pKeyName, hid = null) => {
924
+ if (query && query.orderByClause)
925
+ return _.map(entities, (entity) => { return { value: { $: entity[pKeyName] }, label: hid !== null ? hid : entity.HID }; });
926
+ else
927
+ return _.map(entities, (entity) => { return { value: { $: entity[pKeyName] }, label: hid !== null ? hid : entity.HID }; });
928
+ };
929
+ this.add = (entity, contextFilters = null) => {
930
+ let newEntity = this._entityManager.createEntity(entity.prototype.entityType);
931
+ return newEntity;
932
+ };
933
+ this.search = (entity, setupQuery = null, expands, global) => {
934
+ var query;
935
+ if (expands && expands.length) {
936
+ if (global)
937
+ query = this._breezeContext.createQuery(this.getQueryServiceName(entity)).expand(expands.join(', '));
938
+ else
939
+ query = this._breezeContext.createQuery(this.getQueryServiceName(entity)).expand(expands.join(', ')).top(this._maxRecordCount);
940
+ }
941
+ else {
942
+ if (global)
943
+ query = this._breezeContext.createQuery(this.getQueryServiceName(entity));
944
+ else
945
+ query = this._breezeContext.createQuery(this.getQueryServiceName(entity)).top(this._maxRecordCount);
946
+ }
947
+ if (setupQuery != null)
948
+ query = setupQuery(query);
949
+ return defer(() => from(this._entityManager.executeQuery(query).then((queryData) => {
950
+ if (!global)
951
+ this.warnIfMaxRecords(queryData.results, entity.name);
952
+ return queryData.results;
953
+ })));
954
+ };
955
+ this.searchCacheOnly = (entity, setupQuery = null, expands = null) => {
956
+ var query = this._breezeContext.createQuery(this.getQueryServiceName(entity));
957
+ if (setupQuery)
958
+ query = setupQuery(query);
959
+ return of(this._entityManager.executeQueryLocally(query));
960
+ };
961
+ this.searchCacheOnlySynchronously = (entity, setupQuery = null, expands = null) => {
962
+ var query = this._breezeContext.createQuery(this.getQueryServiceName(entity));
963
+ if (setupQuery)
964
+ query = setupQuery(query);
965
+ return this._entityManager.executeQueryLocally(query);
966
+ };
967
+ this.searchQueryChoices = (entity, setupQuery = null, hid = null, goToServer = false) => {
968
+ var _a;
969
+ const pkeyName = entity.name + 'Ref';
970
+ let query = this._breezeContext.createQuery(this.getQueryServiceName(entity));
971
+ if (setupQuery)
972
+ query = (_a = setupQuery(query)) !== null && _a !== void 0 ? _a : query;
973
+ if (goToServer) {
974
+ return defer(() => from(this._entityManager.executeQuery(query).then((queryData) => {
975
+ return this.formatQueryChoices(query, queryData.results, pkeyName, null);
976
+ })));
977
+ }
978
+ return of(this.formatQueryChoices(query, this._entityManager.executeQueryLocally(query), pkeyName, null));
979
+ };
980
+ this.getByRefCacheOnly = (entity, ref, includeDeleted = false) => {
981
+ if (!includeDeleted)
982
+ includeDeleted = false;
983
+ var queryOptions = this._entityManager.queryOptions.using({
984
+ includeDeleted: includeDeleted,
985
+ fetchStrategy: FetchStrategy.FromLocalCache
986
+ });
987
+ var query = this._breezeContext.createQuery(this.getQueryServiceName(entity)).where(entity.name + 'Ref', '==', ref).using(queryOptions);
988
+ var result = this._entityManager.executeQueryLocally(query)[0];
989
+ if (result)
990
+ return result;
991
+ return null;
992
+ };
993
+ this.export = (entity, gridSpec, setupQuery, entityRefs, options) => {
994
+ options = options || {};
995
+ var args = {
996
+ runAsync: false,
997
+ useNames: false,
998
+ useEmptyTags: false,
999
+ entityRefs: null,
1000
+ entityTypeName: entity.name,
1001
+ gridSpec: gridSpec
1002
+ };
1003
+ if (options.async)
1004
+ args.runAsync = true;
1005
+ if (options.useNames)
1006
+ args.useNames = true;
1007
+ if (options.useEmptyTags)
1008
+ args.useEmptyTags = true;
1009
+ var queryText;
1010
+ if (options.useGrid) {
1011
+ args.entityRefs = entityRefs;
1012
+ }
1013
+ else {
1014
+ var query = this._breezeContext.createQuery('noname');
1015
+ if (setupQuery)
1016
+ query = setupQuery(query);
1017
+ if (query === null) {
1018
+ this.uiNotification.warning('No records selected by query');
1019
+ return;
1020
+ }
1021
+ else {
1022
+ queryText = query._toUri(this._entityManager);
1023
+ queryText = queryText.split('?')[1];
1024
+ }
1025
+ }
1026
+ var argsText = this.formatAsUrlParameters(args);
1027
+ if (queryText)
1028
+ argsText += '&' + queryText;
1029
+ this.uiNotification.info(args.runAsync ? 'Queuing export...' : 'Exporting...');
1030
+ this.downloadFromUrl('ExportEntities', argsText);
1031
+ };
1032
+ this.formatAsUrlParameters = (data) => {
1033
+ var buffer = [];
1034
+ for (var name in data) {
1035
+ if (!data.hasOwnProperty(name)) {
1036
+ continue;
1037
+ }
1038
+ var value = data[name];
1039
+ buffer.push(encodeURIComponent(name) +
1040
+ '=' + encodeURIComponent(value == null ? '' : value));
1041
+ }
1042
+ var source = buffer.join('&')
1043
+ .replace(/%20/g, '+');
1044
+ return (source);
1045
+ };
1046
+ this.downloadFromUrl = (url, data) => {
1047
+ if (data)
1048
+ data = this.formatAsUrlParameters(data);
1049
+ const body = { title: 'download request' };
1050
+ const headers = { 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8' };
1051
+ this.http.post(url, body, { headers }).subscribe((response) => {
1052
+ this.saveDownloadedFile(response);
1053
+ });
1054
+ };
1055
+ this.saveDownloadedFile = (response) => {
1056
+ var headers = response.headers;
1057
+ var contentDisposition = headers('content-disposition');
1058
+ if (!contentDisposition)
1059
+ return; // NOTE: cannot save without header info
1060
+ var filename = this.extractFilenameFromContentDisposition(contentDisposition);
1061
+ var blob = new Blob([response.data], { type: headers('content-type') });
1062
+ var link = document.createElement('a');
1063
+ link.href = URL.createObjectURL(blob);
1064
+ link.setAttribute('download', filename);
1065
+ link.click();
1066
+ link.remove();
1067
+ };
1068
+ this.extractFilenameFromContentDisposition = (text) => {
1069
+ var parts = _.map(text.split(';'), function (part) { return part.trim(); });
1070
+ var prefix = 'filename=';
1071
+ var filenamePart = _.find(parts, function (part) { return part.substring(0, prefix.length) === prefix; });
1072
+ if (!filenamePart)
1073
+ return 'file';
1074
+ var filename = filenamePart.substring(prefix.length);
1075
+ filename = filename.replace(/"/g, '');
1076
+ return filename;
1077
+ };
1078
+ }
1079
+ set context(dataContext) {
1080
+ this._breezeContext = dataContext.breezeContext;
1081
+ this._entityManager = dataContext.entityManager;
1082
+ }
1083
+ set maxRecordCount(maxRecordCount) {
1084
+ this.maxRecordCount = maxRecordCount;
1085
+ }
1086
+ }
1087
+ TruEntityAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruEntityAccessor, deps: [{ token: i1$3.HttpClient }, { token: TruUiNotification }], target: i0.ɵɵFactoryTarget.Injectable });
1088
+ TruEntityAccessor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruEntityAccessor });
1089
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruEntityAccessor, decorators: [{
1090
+ type: Injectable
1091
+ }], ctorParameters: function () { return [{ type: i1$3.HttpClient }, { type: TruUiNotification }]; } });
1092
+
1093
+ class TruDataContext {
1094
+ constructor(breezeContextFactory, appEnvironment, entityAccessor, uiNotification) {
1095
+ this.breezeContextFactory = breezeContextFactory;
1096
+ this.appEnvironment = appEnvironment;
1097
+ this.entityAccessor = entityAccessor;
1098
+ this.uiNotification = uiNotification;
1099
+ this._pendingDeleteEntities = [];
1100
+ this._pendingCascadeDeleteEntities = [];
1101
+ this.getValidationErrors = (entities = null) => {
1102
+ entities = entities || this.entityManager.getChanges();
1103
+ var errorsPerEntity = entities.map((entity) => {
1104
+ var errors = entity.entityAspect.getValidationErrors();
1105
+ errors = errors.map((err) => {
1106
+ return {
1107
+ entity: entity,
1108
+ errorMessage: err.errorMessage,
1109
+ property: err.property
1110
+ };
1111
+ });
1112
+ return errors;
1113
+ });
1114
+ return [].concat.apply([], errorsPerEntity);
1115
+ };
1116
+ this.formatValidationErrors = (entities = null) => {
1117
+ var errors = this.getValidationErrors(entities);
1118
+ return errors.map((e) => {
1119
+ if (e.propertyName) {
1120
+ return e.entity.entityType.defaultResourceName + '.' + e.propertyName + ': ' + e.errorMessage;
1121
+ }
1122
+ var mergeData = JSON.parse(e.entity.Merge_Data);
1123
+ if (mergeData &&
1124
+ mergeData.constructor === Object &&
1125
+ Object.entries(mergeData).length > 0 &&
1126
+ mergeData[e.property.name]) {
1127
+ return mergeData[e.property.name].modifiedBy + ' changed ' + e.property.name + ' to ' + mergeData[e.property.name].value + '. Accept or Decline the change. ';
1128
+ }
1129
+ var propertyName = e.property.name ? e.property.name : '[Unknown Property]';
1130
+ return e.entity.entityType.defaultResourceName + '.' + propertyName + ': has invalid data.';
1131
+ });
1132
+ };
1133
+ this.findCachedCascadeDeleteDescendants = (entity) => {
1134
+ let descendants = [];
1135
+ let type = entity.entityType;
1136
+ let typeName = type.defaultResourceName;
1137
+ let entityChildrenNames = JSON.parse(JSON.stringify('Replace with: ModelNavigationProperties.value'))[typeName];
1138
+ Object.entries(entityChildrenNames)
1139
+ .forEach(([k, v]) => {
1140
+ let property = entity[k];
1141
+ property.forEach((child) => {
1142
+ if (typeof v === 'object' && v.doesCascadeDelete && child.entityAspect.entityState !== EntityState.Added) {
1143
+ throw new Error('Delete of selected item is not possible due to related child that is not setup for cascade delete. Delete children items first.');
1144
+ }
1145
+ descendants = descendants.concat(this.findCachedCascadeDeleteDescendants(child));
1146
+ });
1147
+ descendants = property.concat(descendants);
1148
+ });
1149
+ return descendants;
1150
+ };
1151
+ this.markCachedDescendantsForDelete = (entities) => {
1152
+ var cascadeDeleteDescendantsPerEntity = entities.map((entity) => { return this.findCachedCascadeDeleteDescendants(entity); }, entities);
1153
+ var cascadeDeleteDescendants = cascadeDeleteDescendantsPerEntity.reduce((memo, i) => { return memo.concat(i); });
1154
+ cascadeDeleteDescendants.forEach((entity) => { this.entityManager.detachEntity(entity); });
1155
+ this._pendingDeleteEntities = this._pendingDeleteEntities.concat(entities);
1156
+ let combined = this._pendingCascadeDeleteEntities.concat(cascadeDeleteDescendants);
1157
+ this._pendingCascadeDeleteEntities = combined.filter((n, i) => combined.indexOf(n) === i);
1158
+ };
1159
+ this.markForDelete = (entities) => {
1160
+ if (entities.length > 0) {
1161
+ this.markCachedDescendantsForDelete(entities);
1162
+ entities.forEach((entity) => {
1163
+ entity.entityAspect.setDeleted();
1164
+ //entity._associatedDataCached = false;
1165
+ });
1166
+ }
1167
+ };
1168
+ this.hasChanges = (entityTypes = []) => {
1169
+ if (entityTypes.length)
1170
+ return this._breezeContext.entityManager.getChanges(entityTypes);
1171
+ return this._breezeContext.entityManager.getChanges();
1172
+ };
1173
+ this.entityAccess = () => {
1174
+ return this.entityAccessor;
1175
+ };
1176
+ this.exportCahce = () => {
1177
+ console.log(this._breezeContext.entityManager.exportEntities());
1178
+ };
1179
+ this.save = (entities = null, deleteOperation = false) => {
1180
+ return new Promise((resolve, reject) => {
1181
+ if (this.appEnvironment.isSaving) {
1182
+ this.uiNotification.error(this.appEnvironment.msgSaveInProgress);
1183
+ resolve();
1184
+ return;
1185
+ }
1186
+ var validationErrorMessages = this.formatValidationErrors(entities);
1187
+ if (validationErrorMessages.length > 0) {
1188
+ this.uiNotification.error(this.appEnvironment.msgInvalidData, validationErrorMessages);
1189
+ resolve();
1190
+ return;
1191
+ }
1192
+ if (!this.hasChanges().length) {
1193
+ this.uiNotification.warning(this.appEnvironment.msgNoChangesToSave);
1194
+ resolve();
1195
+ return;
1196
+ }
1197
+ this.appEnvironment.isSaving = true;
1198
+ this.entityManager.saveChanges().then(() => {
1199
+ if (!deleteOperation) {
1200
+ this.uiNotification.success(this.appEnvironment.msgSaveSuccessful);
1201
+ this.appEnvironment.saveComplete({ successful: true });
1202
+ }
1203
+ resolve();
1204
+ }).catch((e) => {
1205
+ this.appEnvironment.saveComplete({ successful: false });
1206
+ reject(e);
1207
+ }).finally(() => {
1208
+ this.appEnvironment.isSaving = false;
1209
+ });
1210
+ });
1211
+ };
1212
+ this.revert = () => {
1213
+ this.uiNotification.confirm('Confirm Action', 'Revert ' + this.hasChanges().length + ' changed record(s)?').then((confirm) => {
1214
+ if (confirm) {
1215
+ this.entityManager.rejectChanges();
1216
+ this.appEnvironment.revertComplete({ successful: true });
1217
+ }
1218
+ });
1219
+ };
1220
+ this.revertWithoutPrompt = () => {
1221
+ this.revert();
1222
+ this.appEnvironment.revertComplete({ successful: true });
1223
+ };
1224
+ this.delete = (entities, confirmMsg, onSuccess = undefined) => {
1225
+ var newEntities = [];
1226
+ var existingEntities = [];
1227
+ entities.forEach(function (e) {
1228
+ if (e.entityAspect.entityState.isAdded())
1229
+ newEntities.push(e);
1230
+ else
1231
+ existingEntities.push(e);
1232
+ });
1233
+ if (newEntities.length && existingEntities.length) {
1234
+ this.uiNotification.warning(this.appEnvironment.msgCannotDeleteNewAndExistingRecords);
1235
+ return;
1236
+ }
1237
+ if (existingEntities.length) {
1238
+ if (this.hasChanges().length) {
1239
+ this.uiNotification.warning(this.appEnvironment.msgDirtyPreventsDeleteExistingRecord);
1240
+ return;
1241
+ }
1242
+ }
1243
+ this.uiNotification.confirm('Confirm Action', confirmMsg).then((confirm) => {
1244
+ if (confirm) {
1245
+ if (newEntities.length) {
1246
+ newEntities.forEach((entity) => {
1247
+ entity.entityAspect.clearValidationErrors();
1248
+ });
1249
+ this.markForDelete(newEntities);
1250
+ if (onSuccess)
1251
+ onSuccess();
1252
+ return;
1253
+ }
1254
+ try {
1255
+ this.markForDelete(existingEntities);
1256
+ }
1257
+ catch (exception) {
1258
+ this.uiNotification.error(exception.message);
1259
+ return;
1260
+ }
1261
+ this.save(null, true).then(() => {
1262
+ var entitiesDeleted = this._pendingDeleteEntities.concat(this._pendingCascadeDeleteEntities);
1263
+ this.appEnvironment.deleteComplete({ successful: true, entities: entitiesDeleted });
1264
+ if (entitiesDeleted.length) {
1265
+ this._pendingCascadeDeleteEntities = [];
1266
+ this._pendingDeleteEntities = [];
1267
+ }
1268
+ this.uiNotification.success(this.appEnvironment.msgDeleteSuccessful);
1269
+ if (onSuccess)
1270
+ onSuccess(true);
1271
+ }).catch((error) => {
1272
+ this.revert();
1273
+ }).finally(() => { });
1274
+ }
1275
+ });
1276
+ };
1277
+ this._breezeContext = this.breezeContextFactory.createContext();
1278
+ this.entityAccessor.context = this;
1279
+ }
1280
+ get breezeContext() {
1281
+ return this._breezeContext;
1282
+ }
1283
+ get entityManager() {
1284
+ return this._breezeContext.entityManager;
1285
+ }
1286
+ }
1287
+ TruDataContext.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDataContext, deps: [{ token: TruBreezeContextFactory }, { token: TruAppEnvironment }, { token: TruEntityAccessor }, { token: TruUiNotification }], target: i0.ɵɵFactoryTarget.Injectable });
1288
+ TruDataContext.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDataContext });
1289
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDataContext, decorators: [{
1290
+ type: Injectable
1291
+ }], ctorParameters: function () { return [{ type: TruBreezeContextFactory }, { type: TruAppEnvironment }, { type: TruEntityAccessor }, { type: TruUiNotification }]; } });
1292
+
1293
+ class TruDesktopResizable {
1294
+ constructor(elementRef) {
1295
+ this.elementRef = elementRef;
1296
+ this.mouseOffsetX = 0;
1297
+ this.mouseOffsetY = 0;
1298
+ this.lastMouseX = 0;
1299
+ this.lastMouseY = 0;
1300
+ this.originalHeight = 0;
1301
+ this.originalWidth = 0;
1302
+ this.mouseDown = (event) => {
1303
+ if (this.maximized)
1304
+ return;
1305
+ event.preventDefault();
1306
+ this.mouseOffsetY = event.clientY;
1307
+ this.mouseOffsetX = event.clientX;
1308
+ this.originalHeight = parseInt(this.window.height, 10);
1309
+ this.originalWidth = parseInt(this.window.width, 10);
1310
+ this.viewport = this.getViewport();
1311
+ document.addEventListener('mousemove', this.mouseMove);
1312
+ document.addEventListener('mouseup', this.mouseUp);
1313
+ };
1314
+ this.mouseMove = (event) => {
1315
+ var mouseY = event.pageY - this.mouseOffsetY;
1316
+ var mouseX = event.pageX - this.mouseOffsetX;
1317
+ var diffY = mouseY - this.lastMouseY;
1318
+ var diffX = mouseX - this.lastMouseX;
1319
+ this.lastMouseY = mouseY;
1320
+ this.lastMouseX = mouseX;
1321
+ this.currentHeight = parseInt(this.window.height, 10);
1322
+ this.currentWidth = parseInt(this.window.width, 10);
1323
+ this.currentTop = parseInt(this.window.top, 10);
1324
+ this.currentLeft = parseInt(this.window.left, 10);
1325
+ this.currentRight = parseInt(this.window.right, 10);
1326
+ this.currentBottom = parseInt(this.window.bottom, 10);
1327
+ this.currentMinHeight = parseInt(this.window.minHeight, 10);
1328
+ this.currentMinWidth = parseInt(this.window.minWidth, 10);
1329
+ if (this.direction.indexOf("w") > -1) {
1330
+ if (this.currentWidth - diffX < this.currentMinWidth)
1331
+ this.mouseOffsetX = this.mouseOffsetX - (diffX - (diffX = this.currentWidth - this.currentMinWidth));
1332
+ //Contain resizing to the west
1333
+ if (this.currentLeft + diffX < 0)
1334
+ this.mouseOffsetX = this.mouseOffsetX - (diffX - (diffX = 0 - this.currentLeft));
1335
+ this.window.left = (this.currentLeft + diffX) + 'px';
1336
+ this.window.width = (this.currentWidth - diffX) + 'px';
1337
+ }
1338
+ if (this.direction.indexOf("n") > -1) {
1339
+ if (this.currentHeight - diffY < this.currentMinHeight)
1340
+ this.mouseOffsetY = this.mouseOffsetY - (diffY - (diffY = this.currentHeight - this.currentMinHeight));
1341
+ //Contain resizing to the north
1342
+ if (this.currentTop + diffY < 0)
1343
+ this.mouseOffsetY = this.mouseOffsetY - (diffY - (diffY = 0 - this.currentTop));
1344
+ this.window.top = (this.currentTop + diffY) + 'px';
1345
+ this.window.height = (this.currentHeight - diffY) + 'px';
1346
+ }
1347
+ if (this.direction.indexOf("e") > -1) {
1348
+ if (this.currentWidth + diffX < this.currentMinWidth)
1349
+ this.mouseOffsetX = this.mouseOffsetX - (diffX - (diffX = this.currentMinWidth - this.currentWidth));
1350
+ //Contain resizing to the east
1351
+ if ((this.currentLeft + this.currentWidth) + diffX > this.viewport.offsetWidth)
1352
+ this.mouseOffsetX = this.mouseOffsetX - (diffX - (diffX = this.viewport.offsetWidth - (this.currentLeft + this.currentWidth)));
1353
+ this.window.width = (this.currentWidth + diffX) + 'px';
1354
+ }
1355
+ if (this.direction.indexOf("s") > -1) {
1356
+ if (this.currentHeight + diffY < this.currentMinHeight)
1357
+ this.mouseOffsetY = this.mouseOffsetY - (diffY - (diffY = this.currentMinHeight - this.currentHeight));
1358
+ //Contain resizing to the south
1359
+ if ((this.currentTop + this.currentHeight) + diffY > this.viewport.offsetHeight)
1360
+ this.mouseOffsetY = this.mouseOffsetY - (diffY - (diffY = this.viewport.offsetHeight - (this.currentTop + this.currentHeight)));
1361
+ this.window.height = (this.currentHeight + diffY) + 'px';
1362
+ }
1363
+ };
1364
+ this.mouseUp = (event) => {
1365
+ this.mouseOffsetX = 0;
1366
+ this.mouseOffsetY = 0;
1367
+ this.lastMouseX = 0;
1368
+ this.lastMouseY = 0;
1369
+ document.removeEventListener('mousemove', this.mouseMove);
1370
+ document.removeEventListener('mouseup', this.mouseUp);
1371
+ };
1372
+ this.getViewport = function () {
1373
+ return document.querySelectorAll('.desktop-viewport-container')[0];
1374
+ };
1375
+ }
1376
+ ngOnInit() {
1377
+ this.elementRef.nativeElement.addEventListener('mousedown', this.mouseDown);
1378
+ }
1379
+ ngOnDestroy() {
1380
+ this.elementRef.nativeElement.removeEventListener('mousedown', this.mouseDown);
1381
+ document.removeEventListener('mousemove', this.mouseMove);
1382
+ document.removeEventListener('mouseup', this.mouseUp);
1383
+ }
1384
+ }
1385
+ TruDesktopResizable.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopResizable, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
1386
+ TruDesktopResizable.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.2", type: TruDesktopResizable, selector: "[tru-desktop-resizable]", inputs: { window: "window", maximized: "maximized", direction: "direction" }, ngImport: i0 });
1387
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopResizable, decorators: [{
1388
+ type: Directive,
1389
+ args: [{
1390
+ selector: '[tru-desktop-resizable]',
1391
+ }]
1392
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { window: [{
1393
+ type: Input
1394
+ }], maximized: [{
1395
+ type: Input
1396
+ }], direction: [{
1397
+ type: Input
1398
+ }] } });
1399
+
1400
+ class TruComponentLookup {
1401
+ constructor() {
1402
+ this.truComponentLookupRegistry = new Map();
1403
+ this.set = (key, type) => {
1404
+ this.truComponentLookupRegistry.set(key, type);
1405
+ };
1406
+ this.get = (key) => {
1407
+ return this.truComponentLookupRegistry.get(key);
1408
+ };
1409
+ this.getBySuffix = (suffix) => {
1410
+ return [...this.truComponentLookupRegistry.values()].filter((v, k) => {
1411
+ v.name.toLowerCase().endsWith(suffix.toLowerCase());
1412
+ });
1413
+ };
1414
+ }
1415
+ }
1416
+ TruComponentLookup.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruComponentLookup, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1417
+ TruComponentLookup.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruComponentLookup, providedIn: 'root' });
1418
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruComponentLookup, decorators: [{
1419
+ type: Injectable,
1420
+ args: [{ providedIn: 'root' }]
1421
+ }] });
1422
+
1423
+ class TruDesktopView {
1424
+ constructor(viewContainerRef, componentFactoryResolver, componentLookup) {
1425
+ this.viewContainerRef = viewContainerRef;
1426
+ this.componentFactoryResolver = componentFactoryResolver;
1427
+ this.componentLookup = componentLookup;
1428
+ }
1429
+ ngOnInit() {
1430
+ var component = this.componentLookup.get(this.view.componentName);
1431
+ const componentFactory = this.componentFactoryResolver.resolveComponentFactory(component);
1432
+ const containerRef = this.viewContainerRef.createComponent(componentFactory, 0, this.viewContainerRef.injector);
1433
+ containerRef.instance.view = this.view;
1434
+ }
1435
+ }
1436
+ TruDesktopView.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopView, deps: [{ token: i0.ViewContainerRef }, { token: i0.ComponentFactoryResolver }, { token: TruComponentLookup }], target: i0.ɵɵFactoryTarget.Component });
1437
+ TruDesktopView.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.2", type: TruDesktopView, selector: "tru-desktop-view", inputs: { view: "view" }, ngImport: i0, template: "<div></div>\r\n", styles: [""] });
1438
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopView, decorators: [{
1439
+ type: Component,
1440
+ args: [{ selector: 'tru-desktop-view', template: "<div></div>\r\n" }]
1441
+ }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.ComponentFactoryResolver }, { type: TruComponentLookup }]; }, propDecorators: { view: [{
1442
+ type: Input
1443
+ }] } });
1444
+
1445
+ class TruDesktopStatusbar {
1446
+ constructor() {
1447
+ this.label = ''; //this.contextFilter.label();
1448
+ }
1449
+ ngOnInit() {
1450
+ }
1451
+ }
1452
+ TruDesktopStatusbar.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopStatusbar, deps: [], target: i0.ɵɵFactoryTarget.Component });
1453
+ TruDesktopStatusbar.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.2", type: TruDesktopStatusbar, selector: "tru-desktop-statusbar", inputs: { desktopCtrl: "desktopCtrl" }, ngImport: i0, template: "<div class=\"desktop-window-statusbar\" data-ng-class=\"{'desktop-window-maximized': window.maximized, 'desktop-window-opacity': !window.active}\">\r\n <div class=\"desktop-window-statusbar-container\">\r\n <div class=\"desktop-window-statusbar-context-filter-container\">\r\n <p class=\"desktop-window-statusbar-context-filter-container-text\">{{label}}</p>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".desktop-window-statusbar{position:absolute!important;left:0;right:0;bottom:0;height:23px;background:#006dcc;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-statusbar-context-filter-container{float:right;color:#fff;font-weight:700;line-height:8px;margin-right:5px}.desktop-window-statusbar-context-filter-container-text{line-height:1.5;cursor:default}\n"] });
1454
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopStatusbar, decorators: [{
1455
+ type: Component,
1456
+ args: [{ selector: 'tru-desktop-statusbar', template: "<div class=\"desktop-window-statusbar\" data-ng-class=\"{'desktop-window-maximized': window.maximized, 'desktop-window-opacity': !window.active}\">\r\n <div class=\"desktop-window-statusbar-container\">\r\n <div class=\"desktop-window-statusbar-context-filter-container\">\r\n <p class=\"desktop-window-statusbar-context-filter-container-text\">{{label}}</p>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".desktop-window-statusbar{position:absolute!important;left:0;right:0;bottom:0;height:23px;background:#006dcc;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-statusbar-context-filter-container{float:right;color:#fff;font-weight:700;line-height:8px;margin-right:5px}.desktop-window-statusbar-context-filter-container-text{line-height:1.5;cursor:default}\n"] }]
1457
+ }], ctorParameters: function () { return []; }, propDecorators: { desktopCtrl: [{
1458
+ type: Input
1459
+ }] } });
1460
+
1461
+ class TruToolbarButton {
1462
+ constructor() {
1463
+ this.config = null;
1464
+ this.icon = '';
1465
+ this.text = '';
1466
+ this.disabled = false;
1467
+ this.tooltip = null;
1468
+ this.onClick = new EventEmitter();
1469
+ }
1470
+ ngOnInit() {
1471
+ }
1472
+ }
1473
+ TruToolbarButton.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarButton, deps: [], target: i0.ɵɵFactoryTarget.Component });
1474
+ TruToolbarButton.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.2", type: TruToolbarButton, selector: "tru-toolbar-button", inputs: { config: "config", icon: "icon", text: "text", disabled: "disabled", tooltip: "tooltip" }, outputs: { onClick: "onClick" }, ngImport: i0, template: "<button type=\"button\" class=\"toolbar-btn toolbar-btn-default\" title=\"{{ tooltip }}\" tabindex=\"-1\" [attr.disabled]=\"disabled ? '' : null\" (click)=\"onClick.emit($event)\">\r\n <span class=\"toolbar-btn-icon\" *ngIf=\"icon\"><mat-icon [svgIcon]=\"icon\"></mat-icon></span>\r\n <span class=\"toolbar-btn-text\" *ngIf=\"text\">{{text}}</span>\r\n</button>\r\n", styles: [".toolbar{height:25px}.toolbar .toolbar-btn{height:26px}.toolbar .mat-form-field-infix{padding:0;border-top:0;width:auto}.toolbar .mat-form-field-underline{background-color:red}.toolbar .mat-form-field .mat-form-field-underline,.toolbar .mat-form-field.mat-focused .mat-form-field-underline{display:none}.toolbar-group,.toolbar-group-vertical{position:relative;display:flex;vertical-align:middle;height:25px}.toolbar-group>.toolbar-btn,.toolbar-group-vertical>.toolbar-btn{position:relative;float:left}.toolbar-group>.toolbar-btn:hover,.toolbar-group-vertical>.toolbar-btn:hover,.toolbar-group>.toolbar-btn:focus,.toolbar-group-vertical>.toolbar-btn:focus,.toolbar-group>.toolbar-btn:active,.toolbar-group-vertical>.toolbar-btn:active,.toolbar-group>.toolbar-btn.active,.toolbar-group-vertical>.toolbar-btn.active{z-index:2}.toolbar-group .toolbar-btn+.toolbar-btn,.toolbar-group .toolbar-btn+.toolbar-group,.toolbar-group .toolbar-group+.toolbar-btn,.toolbar-group .toolbar-group+.toolbar-group{margin-left:-1px}.toolbar-group>.toolbar-btn:not(:first-child):not(:last-child){border-radius:0}.toolbar-group>.toolbar-btn:first-child{margin-left:0}.toolbar-group>.toolbar-btn:first-child:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.toolbar-group>.toolbar-btn:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.toolbar-group>.toolbar-btn{padding:1px 5px;font-size:12px;line-height:1;border-radius:0}.toolbar-group .btn_iconOnly{padding:0;margin:0}.toolbar-group .btn_iconOnly i{vertical-align:15%}.toolbar-group div{padding:0;margin:0}.toolbar-group button{padding:0!important}.toolbar-group span,.toolbar-group i{padding:0;margin:0}.toolbar-group button{vertical-align:top}\n", ".toolbar-btn{margin:0;text-transform:none;font-family:inherit;display:inline-block;padding:6px 12px;font-size:14px;font-weight:400;line-height:1;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;background-image:none;border:1px solid transparent;border-radius:0;-webkit-user-select:none;-o-user-select:none;user-select:none;-webkit-appearance:button}.toolbar-btn.disabled,.toolbar-btn[disabled],fieldset[disabled] .btn{cursor:default;opacity:.3;filter:alpha(opacity=65);box-shadow:none;pointer-events:none}.toolbar-btn.disabled:hover,.toolbar-btn[disabled]:hover,fieldset[disabled] .btn:hover{cursor:default;opacity:.3;filter:alpha(opacity=65);box-shadow:none;background-color:#f8f8f8;border-color:transparent;pointer-events:none}.toolbar-btn:hover,.toolbar-btn:focus{color:#333;text-decoration:none}.toolbar-btn-default{color:#333;background-color:transparent;border-color:transparent}.toolbar-btn-default:hover,.toolbar-btn-default:focus,.toolbar-btn-default:active,.toolbar-btn-default.active{color:#333;background-color:#ebebeb;border-color:transparent}.toolbar-btn-text{padding:5px!important}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], encapsulation: i0.ViewEncapsulation.None });
1475
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarButton, decorators: [{
1476
+ type: Component,
1477
+ args: [{ selector: 'tru-toolbar-button', encapsulation: ViewEncapsulation.None, template: "<button type=\"button\" class=\"toolbar-btn toolbar-btn-default\" title=\"{{ tooltip }}\" tabindex=\"-1\" [attr.disabled]=\"disabled ? '' : null\" (click)=\"onClick.emit($event)\">\r\n <span class=\"toolbar-btn-icon\" *ngIf=\"icon\"><mat-icon [svgIcon]=\"icon\"></mat-icon></span>\r\n <span class=\"toolbar-btn-text\" *ngIf=\"text\">{{text}}</span>\r\n</button>\r\n", styles: [".toolbar{height:25px}.toolbar .toolbar-btn{height:26px}.toolbar .mat-form-field-infix{padding:0;border-top:0;width:auto}.toolbar .mat-form-field-underline{background-color:red}.toolbar .mat-form-field .mat-form-field-underline,.toolbar .mat-form-field.mat-focused .mat-form-field-underline{display:none}.toolbar-group,.toolbar-group-vertical{position:relative;display:flex;vertical-align:middle;height:25px}.toolbar-group>.toolbar-btn,.toolbar-group-vertical>.toolbar-btn{position:relative;float:left}.toolbar-group>.toolbar-btn:hover,.toolbar-group-vertical>.toolbar-btn:hover,.toolbar-group>.toolbar-btn:focus,.toolbar-group-vertical>.toolbar-btn:focus,.toolbar-group>.toolbar-btn:active,.toolbar-group-vertical>.toolbar-btn:active,.toolbar-group>.toolbar-btn.active,.toolbar-group-vertical>.toolbar-btn.active{z-index:2}.toolbar-group .toolbar-btn+.toolbar-btn,.toolbar-group .toolbar-btn+.toolbar-group,.toolbar-group .toolbar-group+.toolbar-btn,.toolbar-group .toolbar-group+.toolbar-group{margin-left:-1px}.toolbar-group>.toolbar-btn:not(:first-child):not(:last-child){border-radius:0}.toolbar-group>.toolbar-btn:first-child{margin-left:0}.toolbar-group>.toolbar-btn:first-child:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.toolbar-group>.toolbar-btn:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.toolbar-group>.toolbar-btn{padding:1px 5px;font-size:12px;line-height:1;border-radius:0}.toolbar-group .btn_iconOnly{padding:0;margin:0}.toolbar-group .btn_iconOnly i{vertical-align:15%}.toolbar-group div{padding:0;margin:0}.toolbar-group button{padding:0!important}.toolbar-group span,.toolbar-group i{padding:0;margin:0}.toolbar-group button{vertical-align:top}\n", ".toolbar-btn{margin:0;text-transform:none;font-family:inherit;display:inline-block;padding:6px 12px;font-size:14px;font-weight:400;line-height:1;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;background-image:none;border:1px solid transparent;border-radius:0;-webkit-user-select:none;-o-user-select:none;user-select:none;-webkit-appearance:button}.toolbar-btn.disabled,.toolbar-btn[disabled],fieldset[disabled] .btn{cursor:default;opacity:.3;filter:alpha(opacity=65);box-shadow:none;pointer-events:none}.toolbar-btn.disabled:hover,.toolbar-btn[disabled]:hover,fieldset[disabled] .btn:hover{cursor:default;opacity:.3;filter:alpha(opacity=65);box-shadow:none;background-color:#f8f8f8;border-color:transparent;pointer-events:none}.toolbar-btn:hover,.toolbar-btn:focus{color:#333;text-decoration:none}.toolbar-btn-default{color:#333;background-color:transparent;border-color:transparent}.toolbar-btn-default:hover,.toolbar-btn-default:focus,.toolbar-btn-default:active,.toolbar-btn-default.active{color:#333;background-color:#ebebeb;border-color:transparent}.toolbar-btn-text{padding:5px!important}\n"] }]
1478
+ }], ctorParameters: function () { return []; }, propDecorators: { config: [{
1479
+ type: Input
1480
+ }], icon: [{
1481
+ type: Input
1482
+ }], text: [{
1483
+ type: Input
1484
+ }], disabled: [{
1485
+ type: Input
1486
+ }], tooltip: [{
1487
+ type: Input
1488
+ }], onClick: [{
1489
+ type: Output
1490
+ }] } });
1491
+
1492
+ class TruDesktopWindow {
1493
+ constructor(dataContext, truWindowEventHandler, elementRef, cd) {
1494
+ this.dataContext = dataContext;
1495
+ this.truWindowEventHandler = truWindowEventHandler;
1496
+ this.elementRef = elementRef;
1497
+ this.cd = cd;
1498
+ this.x = 0;
1499
+ this.y = 0;
1500
+ this.lastX = 0;
1501
+ this.lastY = 0;
1502
+ this.startX = 0;
1503
+ this.startY = 0;
1504
+ this.titleBar = null;
1505
+ this.canCloseFn = undefined;
1506
+ this.cancelEditingOnNavigation = false;
1507
+ this.viewportDimensions = undefined;
1508
+ this.hasChanges = () => {
1509
+ return this.dataContext.hasChanges().length;
1510
+ };
1511
+ this.mouseMove = (event) => {
1512
+ this.viewportDimensions = this.viewportCtrl.getViewportDimensions();
1513
+ if (event.pageX <= 0 ||
1514
+ event.pageX >= this.viewportDimensions.width ||
1515
+ this.window.maximized)
1516
+ return;
1517
+ if (this.titleBar == null)
1518
+ return;
1519
+ //this.elementRef.nativeElement.setAttribute('style', 'opacity: 0.5;');
1520
+ this.x = event.screenX - this.startX;
1521
+ this.y = event.screenY - this.startY;
1522
+ //Top Containment
1523
+ this.y = this.y >= 0 ? this.y : 0;
1524
+ //Bottom Containment
1525
+ this.y = this.y <= this.viewportDimensions.height - this.titleBar.offsetHeight ? this.y : this.viewportDimensions.height - this.titleBar.offsetHeight;
1526
+ //Left Containment
1527
+ this.x = this.x >= -(this.titleBar.offsetWidth + this.titleBar.offsetLeft) ? this.x : -(this.titleBar.offsetWidth + this.titleBar.offsetLeft);
1528
+ //Right Containment
1529
+ this.x = this.x <= this.viewportDimensions.width - this.titleBar.offsetLeft ? this.x : this.viewportDimensions.width - this.titleBar.offsetLeft;
1530
+ this.window.top = this.y + 'px';
1531
+ this.window.left = this.x + 'px';
1532
+ };
1533
+ this.mouseUp = (event) => {
1534
+ if (event.pageY <= this.desktopCtrl.options.viewportTop) {
1535
+ this.desktopCtrl.maximize(this.window);
1536
+ }
1537
+ if (event.pageX <= 0) {
1538
+ this.desktopCtrl.maximizeLeft(this.window);
1539
+ }
1540
+ this.viewportDimensions = this.viewportCtrl.getViewportDimensions();
1541
+ if (event.pageX >= this.viewportDimensions.width - 1) {
1542
+ this.desktopCtrl.maximizeRight(this.window);
1543
+ }
1544
+ //this.elementRef.nativeElement.setAttribute('style', 'opacity: 1.0;');
1545
+ document.removeEventListener('mousemove', this.mouseMove);
1546
+ document.removeEventListener('mouseup', this.mouseUp);
1547
+ };
1548
+ /**
1549
+ * @tru.doc function
1550
+ * @name truDesktopWindowComponent.updateNavigationState
1551
+ * @module tru.desktop.window
1552
+ *
1553
+ * @description
1554
+ * Updates window navigation buttons based location of the active view in the views array.
1555
+ *
1556
+ */
1557
+ this.updateNavigationState = () => {
1558
+ if (this.window.views === undefined)
1559
+ return;
1560
+ var length = this.window.views.length;
1561
+ this.disablePrevious = !!(this.window.views[0].active || length === 1);
1562
+ this.disableNext = !!(this.window.views[length - 1].active || length === 1);
1563
+ };
1564
+ /**
1565
+ * @tru.doc function
1566
+ * @name truDesktopWindowComponent.isWindowInViewport
1567
+ * @module tru.desktop.window
1568
+ *
1569
+ * @description
1570
+ * Determines if the window is within the viewport boundaries.
1571
+ *
1572
+ */
1573
+ this.isWindowInViewport = () => {
1574
+ var windowTop = 0;
1575
+ var windowLeft = 0;
1576
+ if (!this.window.minimized) {
1577
+ windowTop = this.elementRef.nativeElement.offsetTop;
1578
+ windowLeft = this.elementRef.nativeElement.offsetLeft;
1579
+ }
1580
+ else {
1581
+ windowTop = parseInt(this.window.savedPosition.top, 10);
1582
+ windowLeft = parseInt(this.window.savedPosition.left, 10);
1583
+ }
1584
+ if ((windowTop + 10) >= this.viewportCtrl.getViewportDimensions().height ||
1585
+ (windowLeft + 60) >= this.viewportCtrl.getViewportDimensions().width) {
1586
+ this.window.outOfBounds = true;
1587
+ this.window.active = false;
1588
+ this.desktopCtrl.activateForemostWindow();
1589
+ }
1590
+ else {
1591
+ this.window.outOfBounds = false;
1592
+ }
1593
+ };
1594
+ /**
1595
+ * @tru.doc function
1596
+ * @name truDesktopWindowComponent.getWindow
1597
+ * @module tru.desktop.window
1598
+ *
1599
+ * @description
1600
+ * Gets the window object.
1601
+ *
1602
+ * @returns {object} window object.
1603
+ */
1604
+ this.getWindow = () => {
1605
+ return this.window;
1606
+ };
1607
+ /**
1608
+ * @tru.doc function
1609
+ * @name truDesktopWindowComponent.setWindowTitle
1610
+ * @module tru.desktop.window
1611
+ *
1612
+ * @description
1613
+ * Sets the window title.
1614
+ *
1615
+ * @param {string} value to display in the window title bar.
1616
+ */
1617
+ this.setWindowTitle = (value) => {
1618
+ this.window.title = value;
1619
+ };
1620
+ this.getWindowTitle = () => {
1621
+ return this.window.title;
1622
+ };
1623
+ /**
1624
+ * @tru.doc function
1625
+ * @name truDesktopWindowComponent.goToPreviousView
1626
+ * @module tru.desktop.window
1627
+ *
1628
+ * @description
1629
+ * Public method for navigating to the previous view.
1630
+ *
1631
+ */
1632
+ this.goToPreviousView = () => {
1633
+ this.previousView();
1634
+ };
1635
+ /**
1636
+ * @tru.doc function
1637
+ * @name truDesktopWindowComponent.viewIsEditing
1638
+ * @module tru.desktop.window
1639
+ *
1640
+ * @description
1641
+ * Checks whether view is editing.
1642
+ *
1643
+ * @returns {boolean}.
1644
+ */
1645
+ this.viewIsEditing = () => {
1646
+ var isEditing = false;
1647
+ this.window.views.forEach((view) => {
1648
+ if (view.isEditing === true) {
1649
+ isEditing = true;
1650
+ }
1651
+ }, null);
1652
+ return isEditing;
1653
+ };
1654
+ /**
1655
+ * @tru.doc function
1656
+ * @name truDesktopWindowComponent.canNavigate
1657
+ * @module tru.desktop.window
1658
+ *
1659
+ * @description
1660
+ * Checks whether navigation can occur..
1661
+ *
1662
+ * @returns {boolean}.
1663
+ */
1664
+ this.canNavigate = () => {
1665
+ var canNavigate = true;
1666
+ if (this.canNavigateFn !== null) {
1667
+ if (this.viewIsEditing()) {
1668
+ canNavigate = this.canNavigateFn();
1669
+ }
1670
+ }
1671
+ return canNavigate;
1672
+ };
1673
+ /**
1674
+ * @tru.doc function
1675
+ * @name truDesktopWindowComponent.removeForwardViews
1676
+ * @module tru.desktop.window
1677
+ *
1678
+ * @description
1679
+ * Removes all view(s) forward of the active view.
1680
+ *
1681
+ */
1682
+ this.removeForwardViews = () => {
1683
+ var activeView = this.desktopCtrl.getActiveView(this.window);
1684
+ var activeViewIndex = this.window.views.indexOf(activeView);
1685
+ for (var i = this.window.views.length; i > activeViewIndex; i--) {
1686
+ this.window.views.splice(i, 1);
1687
+ }
1688
+ this.updateNavigationState();
1689
+ };
1690
+ /**
1691
+ * @tru.doc function
1692
+ * @name truDesktopWindowComponent.addView
1693
+ * @module tru.desktop.window
1694
+ *
1695
+ * @description
1696
+ * Removes all inactive view(s) following the active view and inserts a new view.
1697
+ *
1698
+ */
1699
+ this.addView = (viewConfigOverlay) => {
1700
+ this.removeForwardViews();
1701
+ var activeView = this.desktopCtrl.getActiveView(this.window);
1702
+ activeView.active = false;
1703
+ var viewConfig = this.desktopCtrl.getDesktop().viewConfig;
1704
+ var viewConfigInstance = Object.assign({}, viewConfig);
1705
+ var extended = Object.assign(viewConfigInstance, viewConfigOverlay);
1706
+ extended.window = this;
1707
+ this.window.views.push(extended);
1708
+ this.updateNavigationState();
1709
+ };
1710
+ /**
1711
+ * @tru.doc function
1712
+ * @name truDesktopWindowComponent.getGlobals
1713
+ * @module tru.desktop.window
1714
+ *
1715
+ * @description
1716
+ * returns the global values.
1717
+ *
1718
+ */
1719
+ this.getGlobals = () => {
1720
+ return this.window.globals;
1721
+ };
1722
+ /**
1723
+ * @tru.doc function
1724
+ * @name truDesktopWindowComponent.firstView
1725
+ * @module tru.desktop.window
1726
+ *
1727
+ * @description
1728
+ *
1729
+ */
1730
+ this.firstView = () => {
1731
+ if (!this.canNavigate() || this.disablePrevious)
1732
+ return;
1733
+ if (this.cancelEditingOnNavigation)
1734
+ this.desktopCtrl.getActiveView(this.window).isEditing = false;
1735
+ let activeView = this.desktopCtrl.getActiveView(this.window);
1736
+ activeView.active = false;
1737
+ this.window.views[0].active = true;
1738
+ this.updateNavigationState();
1739
+ };
1740
+ /**
1741
+ * @tru.doc function
1742
+ * @name truDesktopWindowComponent.firstView
1743
+ * @module tru.desktop.window
1744
+ *
1745
+ * @description
1746
+ *
1747
+ */
1748
+ this.lastView = () => {
1749
+ if (!this.canNavigate() || this.disableNext)
1750
+ return;
1751
+ if (this.cancelEditingOnNavigation)
1752
+ this.desktopCtrl.getActiveView(this.window).isEditing = false;
1753
+ let activeView = this.desktopCtrl.getActiveView(this.window);
1754
+ activeView.active = false;
1755
+ this.window.views[this.window.views.length - 1].active = true;
1756
+ this.updateNavigationState();
1757
+ };
1758
+ this.resizeEventHandler = () => {
1759
+ this.isWindowInViewport();
1760
+ };
1761
+ /**
1762
+ * @tru.doc watch
1763
+ * @module tru.desktop.window
1764
+ *
1765
+ * @description
1766
+ * Monitors the window's minimized state
1767
+ *
1768
+ */
1769
+ //$scope.$watch('window.minimized',
1770
+ // function(value) {
1771
+ // if (value && !$scope.window.maximized) {
1772
+ // $scope.desktopCtrl.savePosition($scope.window);
1773
+ // }
1774
+ //}
1775
+ // );
1776
+ this.disablePrevious = true;
1777
+ this.disableNext = true;
1778
+ this.activate = () => {
1779
+ if (this.window.outOfBounds)
1780
+ return;
1781
+ this.desktopCtrl.clearActive();
1782
+ this.window.active = true;
1783
+ this.window.zIndex = this.desktopCtrl.getNextMaxZIndex();
1784
+ };
1785
+ this.minimize = () => {
1786
+ this.desktopCtrl.minimize(this.window);
1787
+ };
1788
+ this.maximize = () => {
1789
+ if (this.window.maximized) {
1790
+ this.desktopCtrl.restoreSavedPosition(this.window);
1791
+ this.window.maximized = undefined;
1792
+ }
1793
+ else {
1794
+ this.desktopCtrl.savePosition(this.window);
1795
+ this.desktopCtrl.maximize(this.window);
1796
+ }
1797
+ };
1798
+ this.close = () => {
1799
+ this.desktopCtrl.closeWindow(this.window);
1800
+ };
1801
+ this.windowTitleMouseDown = (event) => {
1802
+ if (this.window.maximized)
1803
+ return;
1804
+ event.preventDefault();
1805
+ this.titleBar = event.srcElement || event.target;
1806
+ this.x = this.elementRef.nativeElement.children[0].offsetLeft;
1807
+ this.y = this.elementRef.nativeElement.children[0].offsetTop;
1808
+ this.startX = event.screenX - this.x;
1809
+ this.startY = event.screenY - this.y;
1810
+ this.desktopCtrl.savePosition(this.window);
1811
+ document.addEventListener('mousemove', this.mouseMove);
1812
+ document.addEventListener('mouseup', this.mouseUp);
1813
+ window.addEventListener('resize', this.resizeEventHandler);
1814
+ };
1815
+ this.previousView = () => {
1816
+ if (!this.canNavigate() || this.disablePrevious)
1817
+ return;
1818
+ var activeView = this.desktopCtrl.getActiveView(this.window);
1819
+ var activeViewIndex = this.window.views.indexOf(activeView);
1820
+ if (this.cancelEditingOnNavigation)
1821
+ activeView.isEditing = false;
1822
+ activeView.active = false;
1823
+ this.window.views[activeViewIndex - 1].active = true;
1824
+ this.updateNavigationState();
1825
+ };
1826
+ this.nextView = () => {
1827
+ if (!this.canNavigate() || this.disableNext)
1828
+ return;
1829
+ var activeView = this.desktopCtrl.getActiveView(this.window);
1830
+ var activeViewIndex = this.window.views.indexOf(activeView);
1831
+ if (this.cancelEditingOnNavigation)
1832
+ activeView.isEditing = false;
1833
+ activeView.active = false;
1834
+ this.window.views[activeViewIndex + 1].active = true;
1835
+ this.updateNavigationState();
1836
+ };
1837
+ this.save = () => {
1838
+ this.dataContext.save();
1839
+ };
1840
+ this.revert = () => {
1841
+ this.dataContext.revert();
1842
+ };
1843
+ }
1844
+ ;
1845
+ /**
1846
+ * @tru.doc event
1847
+ * @module tru.desktop.window
1848
+ *
1849
+ * @description
1850
+ *
1851
+ */
1852
+ onKeydown(event) {
1853
+ if (!this.window.active)
1854
+ return;
1855
+ var keySequence = this.desktopCtrl.getKeySequence(event);
1856
+ if (keySequence === 'alt+left') { //Previous View
1857
+ this.previousView();
1858
+ event.preventDefault();
1859
+ }
1860
+ if (keySequence === 'alt+right') { //Next View
1861
+ this.nextView();
1862
+ event.preventDefault();
1863
+ }
1864
+ if (keySequence === 'alt+up') { //First View
1865
+ this.firstView();
1866
+ event.preventDefault();
1867
+ }
1868
+ if (keySequence === 'alt+down') { //Last View
1869
+ this.lastView();
1870
+ event.preventDefault();
1871
+ }
1872
+ if (keySequence === 'alt+l') { //Maximize left
1873
+ if (!this.window.maximized) {
1874
+ this.desktopCtrl.savePosition(this.window);
1875
+ this.desktopCtrl.maximizeLeft(this.window);
1876
+ }
1877
+ else if (this.window.maximized === 'right' || this.window.maximized === 'fill')
1878
+ this.desktopCtrl.maximizeLeft(this.window);
1879
+ else
1880
+ this.desktopCtrl.restoreSavedPosition(this.window);
1881
+ event.preventDefault();
1882
+ }
1883
+ if (keySequence === 'alt+r') { //Maximize right
1884
+ if (!this.window.maximized) {
1885
+ this.desktopCtrl.savePosition(this.window);
1886
+ this.desktopCtrl.maximizeRight(this.window);
1887
+ }
1888
+ else if (this.window.maximized === 'left' || this.window.maximized === 'fill')
1889
+ this.desktopCtrl.maximizeRight(this.window);
1890
+ else
1891
+ this.desktopCtrl.restoreSavedPosition(this.window);
1892
+ event.preventDefault();
1893
+ }
1894
+ }
1895
+ ;
1896
+ ngOnInit() {
1897
+ this.canCloseFn = this.desktopCtrl.getOptions().canCloseFn;
1898
+ this.canNavigateFn = this.desktopCtrl.getOptions().canNavigateFn;
1899
+ this.cancelEditingOnNavigation = this.desktopCtrl.getOptions().cancelEditingOnNavigation;
1900
+ this.updateNavigationState();
1901
+ this.truWindowEventHandler.onAddView().subscribe((windiowAddViewEvent) => {
1902
+ this.addView(windiowAddViewEvent);
1903
+ });
1904
+ }
1905
+ ngAfterViewInit() {
1906
+ this.cd.detectChanges();
1907
+ }
1908
+ ngOnDestroy() {
1909
+ document.removeEventListener('mousemove', this.mouseMove);
1910
+ document.removeEventListener('mouseup', this.mouseUp);
1911
+ window.removeEventListener('resize', this.resizeEventHandler);
1912
+ }
1913
+ }
1914
+ TruDesktopWindow.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopWindow, deps: [{ token: TruDataContext }, { token: TruWindowEventHandler }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
1915
+ TruDesktopWindow.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.2", type: TruDesktopWindow, selector: "tru-desktop-window", inputs: { window: "window", viewportCtrl: "viewportCtrl", desktopCtrl: "desktopCtrl" }, providers: [TruDataContext, TruEntityAccessor, TruWindowEventHandler], 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]=\"'Go Forward One View - [Alt + Right]'\" (click)=\"maximize()\" class=\"maximize\"></tru-toolbar-button>\r\n <tru-toolbar-button *ngIf=\"window.maximized\" [icon]=\"'tru-toolbar-restore-icon'\" [tooltip]=\"'Go Forward One View - [Alt + Right]'\" (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\" [hidden]=\"!view.active\"><ng-template></ng-template></tru-desktop-view>\r\n </div>\r\n </div>\r\n </fieldset>\r\n <tru-desktop-statusbar></tru-desktop-statusbar>\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;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", ".desktop-window-container{position:absolute!important;background-color:#fff;background-clip:padding-box;border-radius:0;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:#ffffff;border-top-left-radius:0;border-top-right-radius:0;border-bottom:1px solid #e7e7e7}.desktop-window-content{position:absolute!important;inset:27px 0 23px;background:#ffffff;overflow:hidden}.desktop-window-busy-overlay{position:absolute!important;inset:27px 0 23px;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;box-shadow:0 5px 10px #0006}.desktop-window-maximized{border-radius: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"] }, { kind: "component", type: TruDesktopStatusbar, selector: "tru-desktop-statusbar", inputs: ["desktopCtrl"] }, { kind: "component", type: TruToolbar, selector: "tru-toolbar", inputs: ["config"] }, { kind: "component", type: TruToolbarButton, selector: "tru-toolbar-button", inputs: ["config", "icon", "text", "disabled", "tooltip"], outputs: ["onClick"] }, { kind: "component", type: TruToolbarSeparator, selector: "tru-toolbar-separator" }] });
1916
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopWindow, decorators: [{
1917
+ type: Component,
1918
+ args: [{ selector: 'tru-desktop-window', providers: [TruDataContext, TruEntityAccessor, TruWindowEventHandler], 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]=\"'Go Forward One View - [Alt + Right]'\" (click)=\"maximize()\" class=\"maximize\"></tru-toolbar-button>\r\n <tru-toolbar-button *ngIf=\"window.maximized\" [icon]=\"'tru-toolbar-restore-icon'\" [tooltip]=\"'Go Forward One View - [Alt + Right]'\" (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\" [hidden]=\"!view.active\"><ng-template></ng-template></tru-desktop-view>\r\n </div>\r\n </div>\r\n </fieldset>\r\n <tru-desktop-statusbar></tru-desktop-statusbar>\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;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", ".desktop-window-container{position:absolute!important;background-color:#fff;background-clip:padding-box;border-radius:0;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:#ffffff;border-top-left-radius:0;border-top-right-radius:0;border-bottom:1px solid #e7e7e7}.desktop-window-content{position:absolute!important;inset:27px 0 23px;background:#ffffff;overflow:hidden}.desktop-window-busy-overlay{position:absolute!important;inset:27px 0 23px;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;box-shadow:0 5px 10px #0006}.desktop-window-maximized{border-radius: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"] }]
1919
+ }], ctorParameters: function () { return [{ type: TruDataContext }, { type: TruWindowEventHandler }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { window: [{
1920
+ type: Input
1921
+ }], viewportCtrl: [{
1922
+ type: Input
1923
+ }], desktopCtrl: [{
1924
+ type: Input
1925
+ }] } });
1926
+
1927
+ class TruDesktopViewport {
1928
+ constructor(elementRef) {
1929
+ this.elementRef = elementRef;
1930
+ this.options = null;
1931
+ this.getViewportDimensions = () => {
1932
+ var viewportContainerElement = this.elementRef.nativeElement.querySelectorAll(".desktop-viewport-container")[0];
1933
+ this.dimensions = {
1934
+ height: viewportContainerElement.clientHeight,
1935
+ width: viewportContainerElement.clientWidth
1936
+ };
1937
+ return this.dimensions;
1938
+ };
1939
+ this.mouseMove = (event) => {
1940
+ this.showFillOutline = event.pageY <= this.options.viewportTop;
1941
+ this.showLeftOutline = event.pageX <= 0;
1942
+ this.showRightOutline = event.pageX >= this.dimensions.width - 1;
1943
+ };
1944
+ this.mouseUp = (event) => {
1945
+ this.showFillOutline = false;
1946
+ this.showLeftOutline = false;
1947
+ this.showRightOutline = false;
1948
+ document.removeEventListener('mousemove', this.mouseMove);
1949
+ document.removeEventListener('mouseup', this.mouseUp);
1950
+ };
1951
+ this.dimensions = { height: null, width: null };
1952
+ this.showFillOutline = false;
1953
+ this.showLeftOutline = false;
1954
+ this.showRightOutline = false;
1955
+ this.displayViewportDimensions = false;
1956
+ this.logoUrl = undefined;
1957
+ this.viewportMouseDown = (event) => {
1958
+ //Ignore resize events.
1959
+ if (event.target.nodeName.toLowerCase() === 'span')
1960
+ return;
1961
+ document.addEventListener('mousemove', this.mouseMove);
1962
+ document.addEventListener('mouseup', this.mouseUp);
1963
+ };
1964
+ }
1965
+ /**
1966
+ * @tru.doc $watch function
1967
+ * @name truDesktopViewportComponent.visibilityWatch
1968
+ * @module tru.desktop.viewport
1969
+ * @function
1970
+ *
1971
+ * @description
1972
+ * Monitors for visibility changes. This method is responsible for updating the viewport
1973
+ * dimensions in situations where the viewport is initially hidden.
1974
+ *
1975
+ */
1976
+ //$watch(function() {
1977
+ // //Emulates jQuery's $(element).is(':visible')
1978
+ // return this.elementRef.nativeElement.offsetWidth > 0 && this.elementRef.nativeElement.offsetHeight > 0;
1979
+ //}, function() {
1980
+ // this.dimensions = {
1981
+ // height: this.elementRef.nativeElement.clientHeight,
1982
+ // width: this.elementRef.nativeElement.clientWidth
1983
+ // };
1984
+ //});
1985
+ /**
1986
+ * @tru.doc window.resize
1987
+ * @name truDesktopViewportComponent.resize
1988
+ * @module tru.desktop.viewport
1989
+ * @function
1990
+ *
1991
+ * @description
1992
+ * This method is responsible for updating the viewport dimensions when the
1993
+ * browser window has been re-sized.
1994
+ *
1995
+ */
1996
+ onResize(event) {
1997
+ var viewportContainerElement = this.elementRef.nativeElement.querySelectorAll(".desktop-viewport-container")[0];
1998
+ this.dimensions = {
1999
+ height: viewportContainerElement.clientHeight,
2000
+ width: viewportContainerElement.clientWidth
2001
+ };
2002
+ }
2003
+ ;
2004
+ //document.querySelectorAll(".desktop-viewport-container")[0].onscroll = function (event) {
2005
+ // event.preventDefault();
2006
+ // document.querySelectorAll(".desktop-viewport-container")[0].scrollTop = 0;
2007
+ //};
2008
+ ngOnInit() {
2009
+ this.options = this.desktopCtrl.getOptions();
2010
+ this.displayViewportDimensions = this.options.displayViewportDimensions;
2011
+ this.logoUrl = this.options.logoUrl;
2012
+ }
2013
+ ngOnDestroy() {
2014
+ document.removeEventListener('mousemove', this.mouseMove);
2015
+ document.removeEventListener('mouseup', this.mouseUp);
2016
+ }
2017
+ }
2018
+ TruDesktopViewport.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopViewport, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
2019
+ TruDesktopViewport.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.2", type: TruDesktopViewport, selector: "tru-desktop-viewport", inputs: { windows: "windows", desktopCtrl: "desktopCtrl" }, host: { listeners: { "window:resize": "onResize($event)" } }, ngImport: i0, template: "<div class=\"desktop-viewport-container\" [ngStyle]=\"{'top': options.viewportTop + 'px' }\" (mousedown)=\"viewportMouseDown($event)\">\r\n <span class=\"desktop-viewport-dimensions desktop-text\" *ngIf=\"displayViewportDimensions\">{{dimensions.height}} x {{dimensions.width}}</span>\r\n <div *ngFor=\"let window of windows\" class=\"am-fade-and-scale\">\r\n <tru-desktop-window [window]=\"window\" [viewportCtrl]=\"this\" [desktopCtrl]=\"this.desktopCtrl\"></tru-desktop-window>\r\n </div>\r\n <div class=\"desktop-viewport-fill-outline\" *ngIf=\"showFillOutline\"></div>\r\n <div class=\"desktop-viewport-left-outline\" *ngIf=\"showLeftOutline\"></div>\r\n <div class=\"desktop-viewport-right-outline\" *ngIf=\"showRightOutline\"></div>\r\n</div>\r\n", styles: [".desktop-viewport-container{position:absolute!important;inset:33px 0 42px;background:white;overflow:hidden}.desktop-viewport-dimensions{position:absolute!important;right:0;bottom:0}.desktop-viewport-fill-outline{position:absolute;inset:0;width:auto;height:auto;border:1px dashed #000000}.desktop-viewport-left-outline{position:absolute;top:0;left:0;bottom:0;width:49.9%;height:auto;border:1px dashed #000000}.desktop-viewport-right-outline{position:absolute;inset:0 0 0 50.1%;width:49.8%;height:auto;border:1px dashed #000000}.desktop-viewport-logo{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);-webkit-transform:translate(-50%,-50%)}\n"], dependencies: [{ 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: "component", type: TruDesktopWindow, selector: "tru-desktop-window", inputs: ["window", "viewportCtrl", "desktopCtrl"] }] });
2020
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopViewport, decorators: [{
2021
+ type: Component,
2022
+ args: [{ selector: 'tru-desktop-viewport', template: "<div class=\"desktop-viewport-container\" [ngStyle]=\"{'top': options.viewportTop + 'px' }\" (mousedown)=\"viewportMouseDown($event)\">\r\n <span class=\"desktop-viewport-dimensions desktop-text\" *ngIf=\"displayViewportDimensions\">{{dimensions.height}} x {{dimensions.width}}</span>\r\n <div *ngFor=\"let window of windows\" class=\"am-fade-and-scale\">\r\n <tru-desktop-window [window]=\"window\" [viewportCtrl]=\"this\" [desktopCtrl]=\"this.desktopCtrl\"></tru-desktop-window>\r\n </div>\r\n <div class=\"desktop-viewport-fill-outline\" *ngIf=\"showFillOutline\"></div>\r\n <div class=\"desktop-viewport-left-outline\" *ngIf=\"showLeftOutline\"></div>\r\n <div class=\"desktop-viewport-right-outline\" *ngIf=\"showRightOutline\"></div>\r\n</div>\r\n", styles: [".desktop-viewport-container{position:absolute!important;inset:33px 0 42px;background:white;overflow:hidden}.desktop-viewport-dimensions{position:absolute!important;right:0;bottom:0}.desktop-viewport-fill-outline{position:absolute;inset:0;width:auto;height:auto;border:1px dashed #000000}.desktop-viewport-left-outline{position:absolute;top:0;left:0;bottom:0;width:49.9%;height:auto;border:1px dashed #000000}.desktop-viewport-right-outline{position:absolute;inset:0 0 0 50.1%;width:49.8%;height:auto;border:1px dashed #000000}.desktop-viewport-logo{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);-webkit-transform:translate(-50%,-50%)}\n"] }]
2023
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { windows: [{
2024
+ type: Input
2025
+ }], desktopCtrl: [{
2026
+ type: Input
2027
+ }], onResize: [{
2028
+ type: HostListener,
2029
+ args: ['window:resize', ['$event']]
2030
+ }] } });
2031
+
2032
+ class TruDesktop {
2033
+ constructor(desktopService, truWindowEventHandler) {
2034
+ this.desktopService = desktopService;
2035
+ this.truWindowEventHandler = truWindowEventHandler;
2036
+ this.minimizeAll = false;
2037
+ this.desktop = this.desktopService.createDesktop();
2038
+ this.minWindowCascadePosition = 40;
2039
+ this.maxWindowCascadePosition = 100;
2040
+ this.lastWindowCascadePosition = { top: this.minWindowCascadePosition, left: this.minWindowCascadePosition };
2041
+ this.shiftPressed = false;
2042
+ this.altPressed = false;
2043
+ this.xPressed = false;
2044
+ this.keyboardMap = ["", "", "", "CANCEL", "", "", "HELP", "", "BACK_SPACE", "TAB", "", "", "CLEAR", "ENTER", "RETURN", "", "SHIFT", "CONTROL", "ALT", "PAUSE", "CAPS_LOCK", "KANA", "EISU", "JUNJA", "FINAL", "HANJA", "", "ESCAPE", "CONVERT", "NONCONVERT", "ACCEPT", "MODECHANGE", "SPACE", "PAGE_UP", "PAGE_DOWN", "END", "HOME", "LEFT", "UP", "RIGHT", "DOWN", "SELECT", "PRINT", "EXECUTE", "PRINTSCREEN", "INSERT", "DELETE", "", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "COLON", "SEMICOLON", "LESS_THAN", "EQUALS", "GREATER_THAN", "QUESTION_MARK", "AT", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "WIN", "", "CONTEXT_MENU", "", "SLEEP", "NUMPAD0", "NUMPAD1", "NUMPAD2", "NUMPAD3", "NUMPAD4", "NUMPAD5", "NUMPAD6", "NUMPAD7", "NUMPAD8", "NUMPAD9", "MULTIPLY", "ADD", "SEPARATOR", "SUBTRACT", "DECIMAL", "DIVIDE", "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12", "F13", "F14", "F15", "F16", "F17", "F18", "F19", "F20", "F21", "F22", "F23", "F24", "", "", "", "", "", "", "", "", "NUM_LOCK", "SCROLL_LOCK", "WIN_OEM_FJ_JISHO", "WIN_OEM_FJ_MASSHOU", "WIN_OEM_FJ_TOUROKU", "WIN_OEM_FJ_LOYA", "WIN_OEM_FJ_ROYA", "", "", "", "", "", "", "", "", "", "CIRCUMFLEX", "EXCLAMATION", "DOUBLE_QUOTE", "HASH", "DOLLAR", "PERCENT", "AMPERSAND", "UNDERSCORE", "OPEN_PAREN", "CLOSE_PAREN", "ASTERISK", "PLUS", "PIPE", "HYPHEN_MINUS", "OPEN_CURLY_BRACKET", "CLOSE_CURLY_BRACKET", "TILDE", "", "", "", "", "VOLUME_MUTE", "VOLUME_DOWN", "VOLUME_UP", "", "", "", "", "COMMA", "", "PERIOD", "SLASH", "BACK_QUOTE", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "OPEN_BRACKET", "BACK_SLASH", "CLOSE_BRACKET", "QUOTE", "", "META", "ALTGR", "", "WIN_ICO_HELP", "WIN_ICO_00", "", "WIN_ICO_CLEAR", "", "", "WIN_OEM_RESET", "WIN_OEM_JUMP", "WIN_OEM_PA1", "WIN_OEM_PA2", "WIN_OEM_PA3", "WIN_OEM_WSCTRL", "WIN_OEM_CUSEL", "WIN_OEM_ATTN", "WIN_OEM_FINISH", "WIN_OEM_COPY", "WIN_OEM_AUTO", "WIN_OEM_ENLW", "WIN_OEM_BACKTAB", "ATTN", "CRSEL", "EXSEL", "EREOF", "PLAY", "ZOOM", "", "PA1", "WIN_OEM_CLEAR", ""];
2045
+ this.logoUrl = null;
2046
+ /**
2047
+ * @tru.doc function
2048
+ * @name truDesktopComponent.getDesktop
2049
+ * @module tru.desktop
2050
+ *
2051
+ * @description
2052
+ * Return an object of desktop.
2053
+ *
2054
+ * @returns {object} desktop.
2055
+ */
2056
+ this.getDesktop = () => {
2057
+ return this.desktop;
2058
+ };
2059
+ /**
2060
+ * @tru.doc function
2061
+ * @name truDesktopComponent.getOptions
2062
+ * @module tru.desktop
2063
+ *
2064
+ * @description
2065
+ * Return an object of desktop options.
2066
+ *
2067
+ * @returns {object} options.
2068
+ */
2069
+ this.getOptions = () => {
2070
+ return this.options;
2071
+ };
2072
+ /**
2073
+ * @tru.doc function
2074
+ * @name truDesktopComponent.getWindows
2075
+ * @module tru.desktop
2076
+ *
2077
+ * @description
2078
+ * Return an array of windows.
2079
+ *
2080
+ * @returns {array} windows.
2081
+ */
2082
+ this.getWindows = () => {
2083
+ return this.windows;
2084
+ };
2085
+ /**
2086
+ * @tru.doc function
2087
+ * @name truDesktopComponent.getNextMaxZIndex
2088
+ * @module tru.desktop
2089
+ *
2090
+ * @description
2091
+ * Iterates through all window objects in the windows array to find the max z-index
2092
+ * and increases the value found by 1.
2093
+ *
2094
+ * @returns {int}
2095
+ */
2096
+ this.getNextMaxZIndex = () => {
2097
+ var max = 0;
2098
+ var tmp;
2099
+ for (var i = this.windows.length - 1; i >= 0; i--) {
2100
+ tmp = this.windows[i].zIndex;
2101
+ if (tmp > max)
2102
+ max = tmp;
2103
+ }
2104
+ return ++max;
2105
+ };
2106
+ /**
2107
+ * @tru.doc function
2108
+ * @name truDesktopComponent.clearActive
2109
+ * @module tru.desktop
2110
+ *
2111
+ * @description
2112
+ * Iterates through all window objects in the windows
2113
+ * and sets the active property to false.
2114
+ *
2115
+ */
2116
+ this.clearActive = () => {
2117
+ this.windows.forEach((window) => {
2118
+ window.active = false;
2119
+ });
2120
+ };
2121
+ /**
2122
+ * @tru.doc function
2123
+ * @name truDesktopComponent.getActiveWindow
2124
+ * @module tru.desktop
2125
+ *
2126
+ * @description
2127
+ * Gets the active window.
2128
+ *
2129
+ * @returns {object} view object.
2130
+ */
2131
+ this.getActiveWindow = () => {
2132
+ var activeWindow = null;
2133
+ this.windows.forEach((wdw) => {
2134
+ if (wdw.active === true) {
2135
+ activeWindow = wdw;
2136
+ }
2137
+ });
2138
+ return activeWindow;
2139
+ };
2140
+ /**
2141
+ * @tru.doc function
2142
+ * @name truDesktopComponent.getActiveView
2143
+ * @module tru.desktop
2144
+ *
2145
+ * @description
2146
+ * Gets the active view.
2147
+ *
2148
+ * @returns {object} view object.
2149
+ */
2150
+ this.getActiveView = (wdw) => {
2151
+ var activeView = null;
2152
+ wdw.views.forEach((view) => {
2153
+ if (view.active === true) {
2154
+ activeView = view;
2155
+ }
2156
+ });
2157
+ return activeView;
2158
+ };
2159
+ /**
2160
+ * @tru.doc function
2161
+ * @name truDesktopComponent.allWindowsAreMinimized
2162
+ * @module tru.desktop
2163
+ *
2164
+ * @description
2165
+ * Iterates through windows to determine if all are minimized.
2166
+ *
2167
+ */
2168
+ this.allWindowsAreMinimized = () => {
2169
+ var allMinimized = true;
2170
+ this.windows.forEach((window) => {
2171
+ if (!window.minimized) {
2172
+ allMinimized = false;
2173
+ }
2174
+ });
2175
+ return allMinimized;
2176
+ };
2177
+ /**
2178
+ * @tru.doc function
2179
+ * @name truDesktopComponent.hideShowAll
2180
+ * @module tru.desktop
2181
+ *
2182
+ * @description
2183
+ * Hides/shows all windows
2184
+ *
2185
+ */
2186
+ this.hideShowAll = () => {
2187
+ this.minimizeAll = this.allWindowsAreMinimized() ? false : !this.minimizeAll;
2188
+ this.windows.forEach((wdw) => {
2189
+ if (wdw.outOfBounds)
2190
+ this.recover(wdw);
2191
+ wdw.active = false;
2192
+ wdw.minimized = this.minimizeAll;
2193
+ });
2194
+ this.activateForemostWindow();
2195
+ return this.minimizeAll;
2196
+ };
2197
+ /**
2198
+ * @tru.doc function
2199
+ * @name truDesktopComponent.findWindowViewDirective
2200
+ * @module tru.desktop
2201
+ *
2202
+ * @description
2203
+ * Looks for previously open window with a view directive
2204
+ *
2205
+ */
2206
+ this.findWindowViewDirective = (windowViewDirective) => {
2207
+ for (let i = 0; i < this.windows.length; i++) {
2208
+ for (let j = 0; j < this.windows[i].views.length; j++) {
2209
+ if (this.windows[i].views[0].viewDirective === windowViewDirective)
2210
+ return this.windows[i];
2211
+ }
2212
+ }
2213
+ return null;
2214
+ };
2215
+ /**
2216
+ * @tru.doc function
2217
+ * @name truDesktopComponent.openWindow
2218
+ * @module tru.desktop
2219
+ *
2220
+ * @description
2221
+ * Displays a new window. All window properties defined by the application developer will be
2222
+ * overlaid here before displaying the window
2223
+ *
2224
+ */
2225
+ this.openWindow = (windowConfigOverlays, singleInstance) => {
2226
+ let activeWindow = this.getActiveWindow();
2227
+ if (activeWindow && activeWindow.isModal) {
2228
+ activeWindow.invalidOperation = true;
2229
+ return;
2230
+ }
2231
+ if (singleInstance) {
2232
+ let window = this.findWindowViewDirective(windowConfigOverlays.views[0].viewDirective);
2233
+ if (window) {
2234
+ this.updateWindowState(window);
2235
+ return;
2236
+ }
2237
+ }
2238
+ if (windowConfigOverlays.isModal) {
2239
+ let heightOffset = (parseInt(windowConfigOverlays.height, 10) / 2) + 30;
2240
+ let widthOffset = (parseInt(windowConfigOverlays.width, 10) / 2);
2241
+ windowConfigOverlays.top = 'calc(50% - ' + heightOffset + 'px )';
2242
+ windowConfigOverlays.left = 'calc(50% - ' + widthOffset + 'px )';
2243
+ }
2244
+ this.clearActive();
2245
+ let configuredWindow = this.configureWindow(windowConfigOverlays);
2246
+ configuredWindow.views = this.configureViews(windowConfigOverlays, configuredWindow);
2247
+ if (!configuredWindow.isModal) {
2248
+ configuredWindow.cascadeWindow = false;
2249
+ this.savePosition(configuredWindow);
2250
+ this.maximize(configuredWindow);
2251
+ this.windows.push(configuredWindow);
2252
+ }
2253
+ else {
2254
+ this.windows.push(configuredWindow);
2255
+ }
2256
+ };
2257
+ /**
2258
+ * @tru.doc function
2259
+ * @name truDesktopComponent.configureWindow
2260
+ * @module tru.desktop
2261
+ *
2262
+ * @description
2263
+ * Creates a new window instance.
2264
+ *
2265
+ */
2266
+ this.configureWindow = (windowConfigOverlays) => {
2267
+ var windowConfigInstance = Object.assign({}, this.desktop.windowConfig);
2268
+ windowConfigInstance.savedPosition = Object.create({ top: 0, left: 0, right: 0, bottom: 0, height: 0, width: 0 });
2269
+ windowConfigInstance.zIndex = this.getNextMaxZIndex();
2270
+ //windowConfigInstance.globals = Object.assign({}, $rootScope.$eval(this.options.globals));
2271
+ return Object.assign(windowConfigInstance, windowConfigOverlays);
2272
+ };
2273
+ /**
2274
+ * @tru.doc function
2275
+ * @name truDesktopComponent.configureViews
2276
+ * @module tru.desktop
2277
+ *
2278
+ * @description
2279
+ * Creates one or more view instances
2280
+ *
2281
+ */
2282
+ this.configureViews = (windowConfigOverlays, configuredWindow) => {
2283
+ let configuredViews = [];
2284
+ windowConfigOverlays.views.forEach((view) => {
2285
+ let viewConfigInstance = Object.assign({}, this.desktop.viewConfig);
2286
+ //viewConfigInstance.globals = this.options.globals;
2287
+ let configuredView = Object.assign(viewConfigInstance, view);
2288
+ configuredView.window = configuredWindow;
2289
+ configuredViews.push(configuredView);
2290
+ });
2291
+ return configuredViews;
2292
+ };
2293
+ /**
2294
+ * @tru.doc function
2295
+ * @name truDesktopComponent.closeWindow
2296
+ * @module tru.desktop
2297
+ *
2298
+ * @description
2299
+ * Remove a window {object} from the windows array.
2300
+ *
2301
+ * @returns {boolean} returns true if window was closed, false if not closed.
2302
+ */
2303
+ this.closeWindow = (wdw) => {
2304
+ if (!this.options.allowDirtyClose && wdw.isDirty) {
2305
+ alert("Unsaved Changes. Save changes before closing window.");
2306
+ return false;
2307
+ }
2308
+ if (!this.options.allowInvalidClose && wdw.isInvalid) {
2309
+ alert("Data is invalid. Correct Invalid data before closing window.");
2310
+ return false;
2311
+ }
2312
+ if (this.options.canCloseFn !== undefined) {
2313
+ if (this.options.canCloseFn(wdw)) {
2314
+ this.windows.splice(this.windows.indexOf(wdw), 1);
2315
+ this.activateForemostWindow();
2316
+ return true;
2317
+ }
2318
+ ;
2319
+ }
2320
+ else {
2321
+ this.windows.splice(this.windows.indexOf(wdw), 1);
2322
+ this.activateForemostWindow();
2323
+ return true;
2324
+ }
2325
+ return false;
2326
+ };
2327
+ /**
2328
+ * @tru.doc function
2329
+ * @name truDesktopComponent.activateForemostWindow
2330
+ * @module tru.desktop
2331
+ *
2332
+ * @description
2333
+ * Set the foremost window to an active state
2334
+ *
2335
+ */
2336
+ this.activateForemostWindow = () => {
2337
+ var foremost = undefined;
2338
+ for (var i = 0; i < this.windows.length; i++) {
2339
+ if ((foremost === undefined || this.windows[i].zIndex > foremost.zIndex) && !this.windows[i].minimized && !this.windows[i].outOfBounds)
2340
+ foremost = this.windows[i];
2341
+ }
2342
+ if (foremost)
2343
+ foremost.active = true;
2344
+ };
2345
+ /**
2346
+ * @tru.doc function
2347
+ * @name truDesktopComponent.activateNextWindow
2348
+ * @module tru.desktop
2349
+ *
2350
+ * @description
2351
+ * Set the next window to an active state
2352
+ *
2353
+ */
2354
+ this.activateNextWindow = (activeWindowLocation) => {
2355
+ if (this.windows.length <= 1)
2356
+ return;
2357
+ var backend = this.windows.slice(activeWindowLocation);
2358
+ var frontend = this.windows.slice(0, activeWindowLocation - 1);
2359
+ var sorted = backend.concat(frontend);
2360
+ var nextWindow = undefined;
2361
+ for (var i = 0; i < sorted.length; i++) {
2362
+ if (!sorted[i].minimized && !sorted[i].outOfBounds && !nextWindow)
2363
+ nextWindow = sorted[i];
2364
+ }
2365
+ if (nextWindow) {
2366
+ this.clearActive();
2367
+ nextWindow.zIndex = this.getNextMaxZIndex();
2368
+ nextWindow.active = true;
2369
+ }
2370
+ };
2371
+ /**
2372
+ * @tru.doc function
2373
+ * @name truDesktopComponent.activatePreviousWindow
2374
+ * @module tru.desktop
2375
+ *
2376
+ * @description
2377
+ * Set the previous window to an active state
2378
+ *
2379
+ */
2380
+ this.activatePreviousWindow = (activeWindowLocation) => {
2381
+ if (this.windows.length <= 1)
2382
+ return;
2383
+ var backend = this.windows.slice(activeWindowLocation);
2384
+ var frontend = this.windows.slice(0, activeWindowLocation - 1);
2385
+ var sorted = backend.concat(frontend);
2386
+ var nextWindow = undefined;
2387
+ for (var i = sorted.length - 1; i >= 0; i--) {
2388
+ if (!sorted[i].minimized && !sorted[i].outOfBounds && !nextWindow)
2389
+ nextWindow = sorted[i];
2390
+ }
2391
+ if (nextWindow) {
2392
+ this.clearActive();
2393
+ nextWindow.zIndex = this.getNextMaxZIndex();
2394
+ nextWindow.active = true;
2395
+ }
2396
+ };
2397
+ /**
2398
+ * @tru.doc function
2399
+ * @name truDesktopComponent.minimize
2400
+ * @module tru.desktop
2401
+ *
2402
+ * @description
2403
+ * Visually removes window from the viewport.
2404
+ *
2405
+ */
2406
+ this.minimize = (window) => {
2407
+ this.savePosition(window);
2408
+ window.active = false;
2409
+ window.minimized = true;
2410
+ this.activateForemostWindow();
2411
+ };
2412
+ /**
2413
+ * @tru.doc function
2414
+ * @name truDesktopComponent.maximize
2415
+ * @module tru.desktop
2416
+ *
2417
+ * @description
2418
+ * Positions window such that it fills the whole viewport.
2419
+ *
2420
+ */
2421
+ this.maximize = (window) => {
2422
+ window.top = 0;
2423
+ window.left = 0;
2424
+ window.right = 0;
2425
+ window.bottom = 0;
2426
+ window.height = 'auto';
2427
+ window.width = '100%';
2428
+ window.maximized = 'fill';
2429
+ };
2430
+ /**
2431
+ * @tru.doc function
2432
+ * @name truDesktopComponent.maximizeLeft
2433
+ * @module tru.desktop
2434
+ *
2435
+ * @description
2436
+ * Positions window such that it fills the left portion viewport.
2437
+ *
2438
+ */
2439
+ this.maximizeLeft = (window) => {
2440
+ window.split = true;
2441
+ window.top = 0;
2442
+ window.left = 0;
2443
+ window.bottom = 0;
2444
+ window.width = '50%';
2445
+ window.height = 'auto';
2446
+ window.maximized = 'left';
2447
+ };
2448
+ /**
2449
+ * @tru.doc function
2450
+ * @name truDesktopComponent.maximizeRight
2451
+ * @module tru.desktop
2452
+ *
2453
+ * @description
2454
+ * Positions window such that it fills the right portion viewport.
2455
+ *
2456
+ */
2457
+ this.maximizeRight = (window) => {
2458
+ window.top = 0;
2459
+ window.left = '50%';
2460
+ window.right = 0;
2461
+ window.bottom = 0;
2462
+ window.width = '50%';
2463
+ window.height = 'auto';
2464
+ window.maximized = 'right';
2465
+ };
2466
+ /**
2467
+ * @tru.doc function
2468
+ * @name truDesktopComponent.recover
2469
+ * @module tru.desktop
2470
+ *
2471
+ * @description
2472
+ * Brings window back into view when it has escaped the viewport.
2473
+ *
2474
+ */
2475
+ this.recover = (window) => {
2476
+ window.active = true;
2477
+ window.outOfBounds = false;
2478
+ window.minimized = false;
2479
+ window.zIndex = this.getNextMaxZIndex();
2480
+ this.cascadeWindow(window);
2481
+ this.clearActive();
2482
+ this.activateForemostWindow();
2483
+ };
2484
+ /**
2485
+ * @tru.doc function
2486
+ * @name truDesktopComponent.restore
2487
+ * @module tru.desktop
2488
+ *
2489
+ * @description
2490
+ *
2491
+ */
2492
+ this.restore = (wdw) => {
2493
+ if (wdw.maximized === 'fill') {
2494
+ this.maximize(wdw);
2495
+ }
2496
+ else if (wdw.maximized === 'left') {
2497
+ this.maximizeLeft(wdw);
2498
+ }
2499
+ else if (wdw.maximized === 'right') {
2500
+ this.maximizeRight(wdw);
2501
+ }
2502
+ this.updateWindowState(wdw);
2503
+ };
2504
+ /**
2505
+ * @tru.doc function
2506
+ * @name truDesktopComponent.bringToFront
2507
+ * @module tru.desktop
2508
+ *
2509
+ * @description
2510
+ *
2511
+ */
2512
+ this.updateWindowState = (wdw) => {
2513
+ if (wdw.outOfBounds) {
2514
+ this.recover(wdw);
2515
+ return;
2516
+ }
2517
+ if (wdw.maximized === 'fill') {
2518
+ this.maximize(wdw);
2519
+ }
2520
+ else if (wdw.maximized === 'left') {
2521
+ this.maximizeLeft(wdw);
2522
+ }
2523
+ else if (wdw.maximized === 'right') {
2524
+ this.maximizeRight(wdw);
2525
+ }
2526
+ this.clearActive();
2527
+ wdw.active = true;
2528
+ wdw.minimized = false;
2529
+ wdw.zIndex = this.getNextMaxZIndex();
2530
+ };
2531
+ /**
2532
+ * @tru.doc function
2533
+ * @name truDesktopComponent.restoreSavedPosition
2534
+ * @module tru.desktop
2535
+ *
2536
+ * @description
2537
+ * Set the windows last know position to the current position.
2538
+ *
2539
+ */
2540
+ this.restoreSavedPosition = (wdw) => {
2541
+ this.clearActive();
2542
+ wdw.top = wdw.savedPosition.top;
2543
+ wdw.left = wdw.savedPosition.left;
2544
+ wdw.right = wdw.savedPosition.right;
2545
+ wdw.bottom = wdw.savedPosition.bottom;
2546
+ wdw.height = wdw.savedPosition.height;
2547
+ wdw.width = wdw.savedPosition.width;
2548
+ wdw.maximized = undefined;
2549
+ wdw.minimized = undefined;
2550
+ wdw.active = true;
2551
+ wdw.minimized = false;
2552
+ wdw.zIndex = this.getNextMaxZIndex();
2553
+ };
2554
+ /**
2555
+ * @tru.doc function
2556
+ * @name truDesktopComponent.savePosition
2557
+ * @module tru.desktop
2558
+ *
2559
+ * @description
2560
+ * Save the windows last know position.
2561
+ *
2562
+ */
2563
+ this.savePosition = (wdw) => {
2564
+ wdw.savedPosition.top = wdw.top;
2565
+ wdw.savedPosition.left = wdw.left;
2566
+ wdw.savedPosition.right = wdw.right;
2567
+ wdw.savedPosition.bottom = wdw.bottom;
2568
+ wdw.savedPosition.height = wdw.height;
2569
+ wdw.savedPosition.width = wdw.width;
2570
+ };
2571
+ /**
2572
+ * @tru.doc function
2573
+ * @name truDesktopComponent.closeWindow
2574
+ * @module tru.desktop
2575
+ *
2576
+ * @description
2577
+ * Moves a window to the next cascade position.
2578
+ *
2579
+ */
2580
+ this.cascadeWindow = (window) => {
2581
+ if (!this.options.enableWindowCascading || window.isModal)
2582
+ return;
2583
+ this.lastWindowCascadePosition.top += 10;
2584
+ this.lastWindowCascadePosition.left += 10;
2585
+ if (this.lastWindowCascadePosition.top > this.maxWindowCascadePosition)
2586
+ this.lastWindowCascadePosition.top = this.minWindowCascadePosition;
2587
+ if (this.lastWindowCascadePosition.left > this.maxWindowCascadePosition)
2588
+ this.lastWindowCascadePosition.left = this.minWindowCascadePosition;
2589
+ window.top = this.lastWindowCascadePosition.top + 'px';
2590
+ window.left = this.lastWindowCascadePosition.left + 'px';
2591
+ };
2592
+ /**
2593
+ * @tru.doc function
2594
+ * @name truDesktopComponent.getKeyCode
2595
+ * @module tru.desktop
2596
+ *
2597
+ * @description
2598
+ *
2599
+ */
2600
+ this.getKeySequence = (event) => {
2601
+ var keys = [];
2602
+ if (event.shiftKey)
2603
+ keys.push('shift');
2604
+ if (event.ctrlKey)
2605
+ keys.push('ctrl');
2606
+ if (event.altKey)
2607
+ keys.push('alt');
2608
+ if (event.metaKey)
2609
+ keys.push('meta');
2610
+ var keyCode = event.keyCode || event.which;
2611
+ if (keyCode)
2612
+ keys.push(this.keyboardMap[keyCode].toLowerCase());
2613
+ return keys.join('+');
2614
+ };
2615
+ /**
2616
+ * @tru.doc event
2617
+ * @module tru.desktop
2618
+ *
2619
+ * @description
2620
+ *
2621
+ */
2622
+ this.onKeyDown = (event) => {
2623
+ var keySequence = this.getKeySequence(event);
2624
+ if (keySequence === 'alt+m') { //Maximize
2625
+ var activeWindow = this.getActiveWindow();
2626
+ if (activeWindow === null)
2627
+ return;
2628
+ if (!activeWindow.maximized) {
2629
+ this.savePosition(activeWindow);
2630
+ this.maximize(activeWindow);
2631
+ }
2632
+ else if (activeWindow.maximized === 'right' || activeWindow.maximized === 'left')
2633
+ this.maximize(activeWindow);
2634
+ else
2635
+ this.restoreSavedPosition(activeWindow);
2636
+ event.preventDefault();
2637
+ }
2638
+ if (keySequence === 'alt+n') { //Minimize
2639
+ var activeWindow = this.getActiveWindow();
2640
+ if (activeWindow === null || activeWindow.minimized)
2641
+ return;
2642
+ this.minimize(activeWindow);
2643
+ event.preventDefault();
2644
+ }
2645
+ if (keySequence === 'alt+w') { //Cycles Forward
2646
+ var index = this.windows.indexOf(this.getActiveWindow());
2647
+ this.activateNextWindow(index + 1);
2648
+ event.preventDefault();
2649
+ }
2650
+ if (keySequence === 'shift+alt+w') { //Cycles Backward
2651
+ var index = this.windows.indexOf(this.getActiveWindow());
2652
+ this.activatePreviousWindow(index + 1);
2653
+ event.preventDefault();
2654
+ }
2655
+ if (keySequence === 'shift+alt+x' && !(this.shiftPressed && this.altPressed && this.xPressed)) { //Close
2656
+ var activeWindow = this.getActiveWindow();
2657
+ if (!activeWindow)
2658
+ return;
2659
+ this.closeWindow(activeWindow);
2660
+ event.preventDefault();
2661
+ }
2662
+ if (keySequence === 'alt+d') { //Toggle Desktop
2663
+ //this.desktopShown = this.hideShowAll();
2664
+ event.preventDefault();
2665
+ }
2666
+ if (event.shiftKey)
2667
+ this.shiftPressed = true;
2668
+ if (event.altKey)
2669
+ this.altPressed = true;
2670
+ if (event.keyCode === 88)
2671
+ this.xPressed = true;
2672
+ };
2673
+ this.onKeyUp = (event) => {
2674
+ if (event.shiftKey)
2675
+ this.shiftPressed = false;
2676
+ if (event.altKey)
2677
+ this.altPressed = false;
2678
+ if (event.keyCode === 88)
2679
+ this.xPressed = false;
2680
+ };
2681
+ /**
2682
+ * @tru.doc function
2683
+ * @name truDesktopComponent.handleSelectAttempt
2684
+ * @module tru.desktop
2685
+ *
2686
+ * @description
2687
+ * Prevents the user from highlight desktop elements.
2688
+ *
2689
+ */
2690
+ this.handleSelectAttempt = (e) => {
2691
+ var nodeName = e.target.nodeName.toLowerCase();
2692
+ if (nodeName === 'input' || nodeName === 'textarea' || nodeName === 'select')
2693
+ return true;
2694
+ if (window.event) {
2695
+ e.preventDefault();
2696
+ }
2697
+ return true;
2698
+ };
2699
+ this.windows = [];
2700
+ }
2701
+ ngOnInit() {
2702
+ this.logoUrl = this.options.logoUrl;
2703
+ this.options = Object.assign(this.desktop.options, this.options);
2704
+ this.options.viewportTop = this.options.menubarConfig !== undefined ? this.options.menubarHeight + 1 : 0;
2705
+ this.truWindowEventHandler.onOpen().subscribe((windiowEvent) => {
2706
+ this.openWindow(windiowEvent, false);
2707
+ });
2708
+ document.onselectstart = this.handleSelectAttempt;
2709
+ window.addEventListener('keydown', this.onKeyDown);
2710
+ window.addEventListener('keyup', this.onKeyUp);
2711
+ }
2712
+ ngOnDestroy() {
2713
+ window.removeEventListener('keydown', this.onKeyDown);
2714
+ window.removeEventListener('keyup', this.onKeyUp);
2715
+ }
2716
+ }
2717
+ TruDesktop.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDesktop, deps: [{ token: TruDesktopService }, { token: TruWindowEventHandler }], target: i0.ɵɵFactoryTarget.Component });
2718
+ TruDesktop.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.2", 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"] }] });
2719
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDesktop, decorators: [{
2720
+ type: Component,
2721
+ 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"] }]
2722
+ }], ctorParameters: function () { return [{ type: TruDesktopService }, { type: TruWindowEventHandler }]; }, propDecorators: { options: [{
2723
+ type: Input
2724
+ }] } });
2725
+
2726
+ class TruToolbarMenuItemModule {
2727
+ }
2728
+ TruToolbarMenuItemModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarMenuItemModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2729
+ TruToolbarMenuItemModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarMenuItemModule, declarations: [TruToolbarMenuItem], imports: [CommonModule, FormsModule], exports: [TruToolbarMenuItem] });
2730
+ TruToolbarMenuItemModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarMenuItemModule, imports: [CommonModule, FormsModule] });
2731
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarMenuItemModule, decorators: [{
2732
+ type: NgModule,
2733
+ args: [{
2734
+ declarations: [TruToolbarMenuItem],
2735
+ imports: [CommonModule, FormsModule],
2736
+ exports: [TruToolbarMenuItem]
2737
+ }]
2738
+ }] });
2739
+
2740
+ class TruToolbarMenuButtonModule {
2741
+ }
2742
+ TruToolbarMenuButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarMenuButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2743
+ TruToolbarMenuButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarMenuButtonModule, declarations: [TruToolbarMenuButton], imports: [CommonModule, FormsModule], exports: [TruToolbarMenuButton] });
2744
+ TruToolbarMenuButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarMenuButtonModule, imports: [CommonModule, FormsModule] });
2745
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarMenuButtonModule, decorators: [{
2746
+ type: NgModule,
2747
+ args: [{
2748
+ declarations: [TruToolbarMenuButton],
2749
+ imports: [CommonModule, FormsModule],
2750
+ exports: [TruToolbarMenuButton]
2751
+ }]
2752
+ }] });
2753
+
2754
+ class TruToolbarMenuModule {
2755
+ }
2756
+ TruToolbarMenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2757
+ TruToolbarMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarMenuModule, declarations: [TruToolbarMenu], imports: [CommonModule,
2758
+ FormsModule,
2759
+ TruToolbarMenuItemModule,
2760
+ TruToolbarMenuButtonModule], exports: [TruToolbarMenu] });
2761
+ TruToolbarMenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarMenuModule, imports: [CommonModule,
2762
+ FormsModule,
2763
+ TruToolbarMenuItemModule,
2764
+ TruToolbarMenuButtonModule] });
2765
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarMenuModule, decorators: [{
2766
+ type: NgModule,
2767
+ args: [{
2768
+ declarations: [TruToolbarMenu],
2769
+ imports: [
2770
+ CommonModule,
2771
+ FormsModule,
2772
+ TruToolbarMenuItemModule,
2773
+ TruToolbarMenuButtonModule
2774
+ ],
2775
+ exports: [TruToolbarMenu]
2776
+ }]
2777
+ }] });
2778
+
2779
+ class TruToolbarButtonModule {
2780
+ }
2781
+ TruToolbarButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2782
+ TruToolbarButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarButtonModule, declarations: [TruToolbarButton], imports: [CommonModule,
2783
+ FormsModule,
2784
+ MatButtonModule,
2785
+ MatIconModule], exports: [TruToolbarButton] });
2786
+ TruToolbarButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarButtonModule, imports: [CommonModule,
2787
+ FormsModule,
2788
+ MatButtonModule,
2789
+ MatIconModule] });
2790
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarButtonModule, decorators: [{
2791
+ type: NgModule,
2792
+ args: [{
2793
+ declarations: [TruToolbarButton],
2794
+ imports: [
2795
+ CommonModule,
2796
+ FormsModule,
2797
+ MatButtonModule,
2798
+ MatIconModule
2799
+ ],
2800
+ exports: [TruToolbarButton]
2801
+ }]
2802
+ }] });
2803
+
2804
+ class TruToolbarDropdown {
2805
+ constructor() {
2806
+ this.config = null;
2807
+ this.options = [];
2808
+ this.selectedOptionChange = new EventEmitter();
2809
+ this.selectionChange = new EventEmitter();
2810
+ this.onSelectionChange = (event) => {
2811
+ this.selectedOptionChange.emit(event.value);
2812
+ this.selectionChange.emit(event.value);
2813
+ };
2814
+ }
2815
+ ngOnInit() {
2816
+ }
2817
+ ngAfterViewInit() {
2818
+ }
2819
+ }
2820
+ TruToolbarDropdown.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarDropdown, deps: [], target: i0.ɵɵFactoryTarget.Component });
2821
+ TruToolbarDropdown.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.2", type: TruToolbarDropdown, selector: "tru-toolbar-dropdown", inputs: { config: "config", options: "options", selectedOption: "selectedOption", disabled: "disabled" }, outputs: { selectedOptionChange: "selectedOptionChange", selectionChange: "selectionChange" }, ngImport: i0, template: "<mat-form-field>\r\n <mat-select [(ngModel)]=\"selectedOption\"\r\n (selectionChange)=\"onSelectionChange($event)\">\r\n <mat-option *ngFor=\"let option of options\" [value]=\"option\">\r\n {{option.label}}\r\n </mat-option>\r\n </mat-select>\r\n</mat-form-field>\r\n\r\n", styles: [".toolbar{height:25px}.toolbar .toolbar-btn{height:26px}.toolbar .mat-form-field-infix{padding:0;border-top:0;width:auto}.toolbar .mat-form-field-underline{background-color:red}.toolbar .mat-form-field .mat-form-field-underline,.toolbar .mat-form-field.mat-focused .mat-form-field-underline{display:none}.toolbar-group,.toolbar-group-vertical{position:relative;display:flex;vertical-align:middle;height:25px}.toolbar-group>.toolbar-btn,.toolbar-group-vertical>.toolbar-btn{position:relative;float:left}.toolbar-group>.toolbar-btn:hover,.toolbar-group-vertical>.toolbar-btn:hover,.toolbar-group>.toolbar-btn:focus,.toolbar-group-vertical>.toolbar-btn:focus,.toolbar-group>.toolbar-btn:active,.toolbar-group-vertical>.toolbar-btn:active,.toolbar-group>.toolbar-btn.active,.toolbar-group-vertical>.toolbar-btn.active{z-index:2}.toolbar-group .toolbar-btn+.toolbar-btn,.toolbar-group .toolbar-btn+.toolbar-group,.toolbar-group .toolbar-group+.toolbar-btn,.toolbar-group .toolbar-group+.toolbar-group{margin-left:-1px}.toolbar-group>.toolbar-btn:not(:first-child):not(:last-child){border-radius:0}.toolbar-group>.toolbar-btn:first-child{margin-left:0}.toolbar-group>.toolbar-btn:first-child:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.toolbar-group>.toolbar-btn:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.toolbar-group>.toolbar-btn{padding:1px 5px;font-size:12px;line-height:1;border-radius:0}.toolbar-group .btn_iconOnly{padding:0;margin:0}.toolbar-group .btn_iconOnly i{vertical-align:15%}.toolbar-group div{padding:0;margin:0}.toolbar-group button{padding:0!important}.toolbar-group span,.toolbar-group i{padding:0;margin:0}.toolbar-group button{vertical-align:top}\n", ".toolbar mat-select{width:auto;min-width:90px;padding:3px;padding-top:3px!important;font-family:Calibri,Helvetica,Arial,sans-serif!important;background-color:#ebebeb;height:15px;margin-top:2px;margin-left:2px;margin-right:2px}.toolbar .mat-form-field-underline{background-color:red}.toolbar .mat-form-field .mat-form-field-underline,.toolbar .mat-form-field.mat-focused .mat-form-field-underline{display:none}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "component", type: i4.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }], encapsulation: i0.ViewEncapsulation.None });
2822
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarDropdown, decorators: [{
2823
+ type: Component,
2824
+ args: [{ selector: 'tru-toolbar-dropdown', encapsulation: ViewEncapsulation.None, template: "<mat-form-field>\r\n <mat-select [(ngModel)]=\"selectedOption\"\r\n (selectionChange)=\"onSelectionChange($event)\">\r\n <mat-option *ngFor=\"let option of options\" [value]=\"option\">\r\n {{option.label}}\r\n </mat-option>\r\n </mat-select>\r\n</mat-form-field>\r\n\r\n", styles: [".toolbar{height:25px}.toolbar .toolbar-btn{height:26px}.toolbar .mat-form-field-infix{padding:0;border-top:0;width:auto}.toolbar .mat-form-field-underline{background-color:red}.toolbar .mat-form-field .mat-form-field-underline,.toolbar .mat-form-field.mat-focused .mat-form-field-underline{display:none}.toolbar-group,.toolbar-group-vertical{position:relative;display:flex;vertical-align:middle;height:25px}.toolbar-group>.toolbar-btn,.toolbar-group-vertical>.toolbar-btn{position:relative;float:left}.toolbar-group>.toolbar-btn:hover,.toolbar-group-vertical>.toolbar-btn:hover,.toolbar-group>.toolbar-btn:focus,.toolbar-group-vertical>.toolbar-btn:focus,.toolbar-group>.toolbar-btn:active,.toolbar-group-vertical>.toolbar-btn:active,.toolbar-group>.toolbar-btn.active,.toolbar-group-vertical>.toolbar-btn.active{z-index:2}.toolbar-group .toolbar-btn+.toolbar-btn,.toolbar-group .toolbar-btn+.toolbar-group,.toolbar-group .toolbar-group+.toolbar-btn,.toolbar-group .toolbar-group+.toolbar-group{margin-left:-1px}.toolbar-group>.toolbar-btn:not(:first-child):not(:last-child){border-radius:0}.toolbar-group>.toolbar-btn:first-child{margin-left:0}.toolbar-group>.toolbar-btn:first-child:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.toolbar-group>.toolbar-btn:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.toolbar-group>.toolbar-btn{padding:1px 5px;font-size:12px;line-height:1;border-radius:0}.toolbar-group .btn_iconOnly{padding:0;margin:0}.toolbar-group .btn_iconOnly i{vertical-align:15%}.toolbar-group div{padding:0;margin:0}.toolbar-group button{padding:0!important}.toolbar-group span,.toolbar-group i{padding:0;margin:0}.toolbar-group button{vertical-align:top}\n", ".toolbar mat-select{width:auto;min-width:90px;padding:3px;padding-top:3px!important;font-family:Calibri,Helvetica,Arial,sans-serif!important;background-color:#ebebeb;height:15px;margin-top:2px;margin-left:2px;margin-right:2px}.toolbar .mat-form-field-underline{background-color:red}.toolbar .mat-form-field .mat-form-field-underline,.toolbar .mat-form-field.mat-focused .mat-form-field-underline{display:none}\n"] }]
2825
+ }], ctorParameters: function () { return []; }, propDecorators: { config: [{
2826
+ type: Input
2827
+ }], options: [{
2828
+ type: Input
2829
+ }], selectedOption: [{
2830
+ type: Input
2831
+ }], selectedOptionChange: [{
2832
+ type: Output
2833
+ }], disabled: [{
2834
+ type: Input
2835
+ }], selectionChange: [{
2836
+ type: Output
2837
+ }] } });
2838
+
2839
+ class TruToolbarDropdownModule {
2840
+ }
2841
+ TruToolbarDropdownModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarDropdownModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2842
+ TruToolbarDropdownModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarDropdownModule, declarations: [TruToolbarDropdown], imports: [CommonModule,
2843
+ FormsModule,
2844
+ MatSelectModule,
2845
+ MatIconModule], exports: [TruToolbarDropdown] });
2846
+ TruToolbarDropdownModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarDropdownModule, imports: [CommonModule,
2847
+ FormsModule,
2848
+ MatSelectModule,
2849
+ MatIconModule] });
2850
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarDropdownModule, decorators: [{
2851
+ type: NgModule,
2852
+ args: [{
2853
+ declarations: [TruToolbarDropdown],
2854
+ imports: [
2855
+ CommonModule,
2856
+ FormsModule,
2857
+ MatSelectModule,
2858
+ MatIconModule
2859
+ ],
2860
+ exports: [TruToolbarDropdown]
2861
+ }]
2862
+ }] });
2863
+
2864
+ class TruToolbarSeparatorModule {
2865
+ }
2866
+ TruToolbarSeparatorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarSeparatorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2867
+ TruToolbarSeparatorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarSeparatorModule, declarations: [TruToolbarSeparator], imports: [CommonModule, FormsModule], exports: [TruToolbarSeparator] });
2868
+ TruToolbarSeparatorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarSeparatorModule, imports: [CommonModule, FormsModule] });
2869
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarSeparatorModule, decorators: [{
2870
+ type: NgModule,
2871
+ args: [{
2872
+ declarations: [TruToolbarSeparator],
2873
+ imports: [CommonModule, FormsModule],
2874
+ exports: [TruToolbarSeparator]
2875
+ }]
2876
+ }] });
2877
+
2878
+ class TruToolbarContextFilterModule {
2879
+ }
2880
+ TruToolbarContextFilterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarContextFilterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2881
+ TruToolbarContextFilterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarContextFilterModule, declarations: [TruToolbarContextFilter], imports: [CommonModule,
2882
+ FormsModule,
2883
+ MatSelectModule,
2884
+ MatOptionModule,
2885
+ MatInputModule,
2886
+ MatIconModule], exports: [TruToolbarContextFilter] });
2887
+ TruToolbarContextFilterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarContextFilterModule, imports: [CommonModule,
2888
+ FormsModule,
2889
+ MatSelectModule,
2890
+ MatOptionModule,
2891
+ MatInputModule,
2892
+ MatIconModule] });
2893
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarContextFilterModule, decorators: [{
2894
+ type: NgModule,
2895
+ args: [{
2896
+ declarations: [TruToolbarContextFilter],
2897
+ imports: [
2898
+ CommonModule,
2899
+ FormsModule,
2900
+ MatSelectModule,
2901
+ MatOptionModule,
2902
+ MatInputModule,
2903
+ MatIconModule
2904
+ ],
2905
+ exports: [TruToolbarContextFilter]
2906
+ }]
2907
+ }] });
2908
+
2909
+ class TruToolbarText {
2910
+ constructor() {
2911
+ this.config = null;
2912
+ this.icon = '';
2913
+ this.text = '';
2914
+ this.tooltip = null;
2915
+ }
2916
+ ngOnInit() {
2917
+ }
2918
+ }
2919
+ TruToolbarText.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarText, deps: [], target: i0.ɵɵFactoryTarget.Component });
2920
+ TruToolbarText.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.2", type: TruToolbarText, selector: "tru-toolbar-text", inputs: { config: "config", icon: "icon", text: "text", tooltip: "tooltip" }, ngImport: i0, template: "<p>\r\n <span class=\"toolbar-text-text\" *ngIf=\"text\">{{text}}</span>\r\n</p>\r\n", styles: [".toolbar{height:25px}.toolbar .toolbar-btn{height:26px}.toolbar .mat-form-field-infix{padding:0;border-top:0;width:auto}.toolbar .mat-form-field-underline{background-color:red}.toolbar .mat-form-field .mat-form-field-underline,.toolbar .mat-form-field.mat-focused .mat-form-field-underline{display:none}.toolbar-group,.toolbar-group-vertical{position:relative;display:flex;vertical-align:middle;height:25px}.toolbar-group>.toolbar-btn,.toolbar-group-vertical>.toolbar-btn{position:relative;float:left}.toolbar-group>.toolbar-btn:hover,.toolbar-group-vertical>.toolbar-btn:hover,.toolbar-group>.toolbar-btn:focus,.toolbar-group-vertical>.toolbar-btn:focus,.toolbar-group>.toolbar-btn:active,.toolbar-group-vertical>.toolbar-btn:active,.toolbar-group>.toolbar-btn.active,.toolbar-group-vertical>.toolbar-btn.active{z-index:2}.toolbar-group .toolbar-btn+.toolbar-btn,.toolbar-group .toolbar-btn+.toolbar-group,.toolbar-group .toolbar-group+.toolbar-btn,.toolbar-group .toolbar-group+.toolbar-group{margin-left:-1px}.toolbar-group>.toolbar-btn:not(:first-child):not(:last-child){border-radius:0}.toolbar-group>.toolbar-btn:first-child{margin-left:0}.toolbar-group>.toolbar-btn:first-child:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.toolbar-group>.toolbar-btn:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.toolbar-group>.toolbar-btn{padding:1px 5px;font-size:12px;line-height:1;border-radius:0}.toolbar-group .btn_iconOnly{padding:0;margin:0}.toolbar-group .btn_iconOnly i{vertical-align:15%}.toolbar-group div{padding:0;margin:0}.toolbar-group button{padding:0!important}.toolbar-group span,.toolbar-group i{padding:0;margin:0}.toolbar-group button{vertical-align:top}\n", ".toolbar-text-text{vertical-align:sub}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], encapsulation: i0.ViewEncapsulation.None });
2921
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarText, decorators: [{
2922
+ type: Component,
2923
+ args: [{ selector: 'tru-toolbar-text', encapsulation: ViewEncapsulation.None, template: "<p>\r\n <span class=\"toolbar-text-text\" *ngIf=\"text\">{{text}}</span>\r\n</p>\r\n", styles: [".toolbar{height:25px}.toolbar .toolbar-btn{height:26px}.toolbar .mat-form-field-infix{padding:0;border-top:0;width:auto}.toolbar .mat-form-field-underline{background-color:red}.toolbar .mat-form-field .mat-form-field-underline,.toolbar .mat-form-field.mat-focused .mat-form-field-underline{display:none}.toolbar-group,.toolbar-group-vertical{position:relative;display:flex;vertical-align:middle;height:25px}.toolbar-group>.toolbar-btn,.toolbar-group-vertical>.toolbar-btn{position:relative;float:left}.toolbar-group>.toolbar-btn:hover,.toolbar-group-vertical>.toolbar-btn:hover,.toolbar-group>.toolbar-btn:focus,.toolbar-group-vertical>.toolbar-btn:focus,.toolbar-group>.toolbar-btn:active,.toolbar-group-vertical>.toolbar-btn:active,.toolbar-group>.toolbar-btn.active,.toolbar-group-vertical>.toolbar-btn.active{z-index:2}.toolbar-group .toolbar-btn+.toolbar-btn,.toolbar-group .toolbar-btn+.toolbar-group,.toolbar-group .toolbar-group+.toolbar-btn,.toolbar-group .toolbar-group+.toolbar-group{margin-left:-1px}.toolbar-group>.toolbar-btn:not(:first-child):not(:last-child){border-radius:0}.toolbar-group>.toolbar-btn:first-child{margin-left:0}.toolbar-group>.toolbar-btn:first-child:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.toolbar-group>.toolbar-btn:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.toolbar-group>.toolbar-btn{padding:1px 5px;font-size:12px;line-height:1;border-radius:0}.toolbar-group .btn_iconOnly{padding:0;margin:0}.toolbar-group .btn_iconOnly i{vertical-align:15%}.toolbar-group div{padding:0;margin:0}.toolbar-group button{padding:0!important}.toolbar-group span,.toolbar-group i{padding:0;margin:0}.toolbar-group button{vertical-align:top}\n", ".toolbar-text-text{vertical-align:sub}\n"] }]
2924
+ }], ctorParameters: function () { return []; }, propDecorators: { config: [{
2925
+ type: Input
2926
+ }], icon: [{
2927
+ type: Input
2928
+ }], text: [{
2929
+ type: Input
2930
+ }], tooltip: [{
2931
+ type: Input
2932
+ }] } });
2933
+
2934
+ class TruToolbarTextModule {
2935
+ }
2936
+ TruToolbarTextModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarTextModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2937
+ TruToolbarTextModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarTextModule, declarations: [TruToolbarText], imports: [CommonModule,
2938
+ FormsModule,
2939
+ MatButtonModule,
2940
+ MatIconModule], exports: [TruToolbarText] });
2941
+ TruToolbarTextModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarTextModule, imports: [CommonModule,
2942
+ FormsModule,
2943
+ MatButtonModule,
2944
+ MatIconModule] });
2945
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarTextModule, decorators: [{
2946
+ type: NgModule,
2947
+ args: [{
2948
+ declarations: [TruToolbarText],
2949
+ imports: [
2950
+ CommonModule,
2951
+ FormsModule,
2952
+ MatButtonModule,
2953
+ MatIconModule
2954
+ ],
2955
+ exports: [TruToolbarText]
2956
+ }]
2957
+ }] });
2958
+
2959
+ class TruToolbarModule {
2960
+ }
2961
+ TruToolbarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2962
+ TruToolbarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarModule, declarations: [TruToolbar], imports: [CommonModule,
2963
+ FormsModule,
2964
+ TruToolbarMenuModule,
2965
+ TruToolbarButtonModule,
2966
+ TruToolbarDropdownModule,
2967
+ TruToolbarSeparatorModule,
2968
+ TruToolbarContextFilterModule,
2969
+ TruToolbarTextModule], exports: [TruToolbar] });
2970
+ TruToolbarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarModule, imports: [CommonModule,
2971
+ FormsModule,
2972
+ TruToolbarMenuModule,
2973
+ TruToolbarButtonModule,
2974
+ TruToolbarDropdownModule,
2975
+ TruToolbarSeparatorModule,
2976
+ TruToolbarContextFilterModule,
2977
+ TruToolbarTextModule] });
2978
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarModule, decorators: [{
2979
+ type: NgModule,
2980
+ args: [{
2981
+ declarations: [TruToolbar],
2982
+ imports: [
2983
+ CommonModule,
2984
+ FormsModule,
2985
+ TruToolbarMenuModule,
2986
+ TruToolbarButtonModule,
2987
+ TruToolbarDropdownModule,
2988
+ TruToolbarSeparatorModule,
2989
+ TruToolbarContextFilterModule,
2990
+ TruToolbarTextModule
2991
+ ],
2992
+ exports: [TruToolbar]
2993
+ }]
2994
+ }] });
2995
+
2996
+ class TruDesktopMenubarModule {
2997
+ }
2998
+ TruDesktopMenubarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopMenubarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2999
+ TruDesktopMenubarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopMenubarModule, declarations: [TruDesktopMenubar], imports: [CommonModule,
3000
+ FormsModule,
3001
+ TruToolbarModule,
3002
+ TruToolbarMenuModule,
3003
+ TruToolbarDropdownModule,
3004
+ TruToolbarSeparatorModule,
3005
+ TruToolbarContextFilterModule], exports: [TruDesktopMenubar] });
3006
+ TruDesktopMenubarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopMenubarModule, imports: [CommonModule,
3007
+ FormsModule,
3008
+ TruToolbarModule,
3009
+ TruToolbarMenuModule,
3010
+ TruToolbarDropdownModule,
3011
+ TruToolbarSeparatorModule,
3012
+ TruToolbarContextFilterModule] });
3013
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopMenubarModule, decorators: [{
3014
+ type: NgModule,
3015
+ args: [{
3016
+ declarations: [TruDesktopMenubar],
3017
+ imports: [
3018
+ CommonModule,
3019
+ FormsModule,
3020
+ TruToolbarModule,
3021
+ TruToolbarMenuModule,
3022
+ TruToolbarDropdownModule,
3023
+ TruToolbarSeparatorModule,
3024
+ TruToolbarContextFilterModule
3025
+ ],
3026
+ exports: [TruDesktopMenubar]
3027
+ }]
3028
+ }] });
3029
+
3030
+ class TruDesktopStatusbarModule {
3031
+ }
3032
+ TruDesktopStatusbarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopStatusbarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3033
+ TruDesktopStatusbarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopStatusbarModule, declarations: [TruDesktopStatusbar], imports: [CommonModule, FormsModule], exports: [TruDesktopStatusbar] });
3034
+ TruDesktopStatusbarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopStatusbarModule, imports: [CommonModule, FormsModule] });
3035
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopStatusbarModule, decorators: [{
3036
+ type: NgModule,
3037
+ args: [{
3038
+ declarations: [TruDesktopStatusbar],
3039
+ imports: [CommonModule, FormsModule],
3040
+ exports: [TruDesktopStatusbar]
3041
+ }]
3042
+ }] });
3043
+
3044
+ class TruDesktopTaskbarModule {
3045
+ }
3046
+ TruDesktopTaskbarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopTaskbarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3047
+ TruDesktopTaskbarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopTaskbarModule, declarations: [TruDesktopTaskbar], imports: [CommonModule, FormsModule, TruToolbarButtonModule, MatIconModule], exports: [TruDesktopTaskbar] });
3048
+ TruDesktopTaskbarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopTaskbarModule, imports: [CommonModule, FormsModule, TruToolbarButtonModule, MatIconModule] });
3049
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopTaskbarModule, decorators: [{
3050
+ type: NgModule,
3051
+ args: [{
3052
+ declarations: [TruDesktopTaskbar],
3053
+ imports: [CommonModule, FormsModule, TruToolbarButtonModule, MatIconModule],
3054
+ exports: [TruDesktopTaskbar]
3055
+ }]
3056
+ }] });
3057
+
3058
+ class TruDesktopResizableModule {
3059
+ }
3060
+ TruDesktopResizableModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopResizableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3061
+ TruDesktopResizableModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopResizableModule, declarations: [TruDesktopResizable], imports: [CommonModule, FormsModule], exports: [TruDesktopResizable] });
3062
+ TruDesktopResizableModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopResizableModule, imports: [CommonModule, FormsModule] });
3063
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopResizableModule, decorators: [{
3064
+ type: NgModule,
3065
+ args: [{
3066
+ declarations: [TruDesktopResizable],
3067
+ imports: [CommonModule, FormsModule],
3068
+ exports: [TruDesktopResizable]
3069
+ }]
3070
+ }] });
3071
+
3072
+ class TruDesktopViewModule {
3073
+ }
3074
+ TruDesktopViewModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopViewModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3075
+ TruDesktopViewModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopViewModule, declarations: [TruDesktopView], imports: [CommonModule, FormsModule], exports: [TruDesktopView] });
3076
+ TruDesktopViewModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopViewModule, imports: [CommonModule, FormsModule] });
3077
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopViewModule, decorators: [{
3078
+ type: NgModule,
3079
+ args: [{
3080
+ declarations: [TruDesktopView],
3081
+ imports: [CommonModule, FormsModule],
3082
+ exports: [TruDesktopView]
3083
+ }]
3084
+ }] });
3085
+
3086
+ class TruDesktopWindowModule {
3087
+ }
3088
+ TruDesktopWindowModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopWindowModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3089
+ TruDesktopWindowModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopWindowModule, declarations: [TruDesktopWindow], imports: [CommonModule,
3090
+ FormsModule,
3091
+ MatButtonModule,
3092
+ MatIconModule,
3093
+ TruDesktopResizableModule,
3094
+ TruDesktopViewModule,
3095
+ TruDesktopStatusbarModule,
3096
+ TruToolbarModule,
3097
+ TruToolbarButtonModule,
3098
+ TruToolbarSeparatorModule], exports: [TruDesktopWindow] });
3099
+ TruDesktopWindowModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopWindowModule, providers: [WindowConfig], imports: [CommonModule,
3100
+ FormsModule,
3101
+ MatButtonModule,
3102
+ MatIconModule,
3103
+ TruDesktopResizableModule,
3104
+ TruDesktopViewModule,
3105
+ TruDesktopStatusbarModule,
3106
+ TruToolbarModule,
3107
+ TruToolbarButtonModule,
3108
+ TruToolbarSeparatorModule] });
3109
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopWindowModule, decorators: [{
3110
+ type: NgModule,
3111
+ args: [{
3112
+ declarations: [TruDesktopWindow],
3113
+ imports: [
3114
+ CommonModule,
3115
+ FormsModule,
3116
+ MatButtonModule,
3117
+ MatIconModule,
3118
+ TruDesktopResizableModule,
3119
+ TruDesktopViewModule,
3120
+ TruDesktopStatusbarModule,
3121
+ TruToolbarModule,
3122
+ TruToolbarButtonModule,
3123
+ TruToolbarSeparatorModule,
3124
+ ],
3125
+ providers: [WindowConfig],
3126
+ exports: [TruDesktopWindow]
3127
+ }]
3128
+ }] });
3129
+
3130
+ class TruDesktopViewportModule {
3131
+ }
3132
+ TruDesktopViewportModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopViewportModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3133
+ TruDesktopViewportModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopViewportModule, declarations: [TruDesktopViewport], imports: [CommonModule, FormsModule, TruDesktopWindowModule], exports: [TruDesktopViewport] });
3134
+ TruDesktopViewportModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopViewportModule, imports: [CommonModule, FormsModule, TruDesktopWindowModule] });
3135
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopViewportModule, decorators: [{
3136
+ type: NgModule,
3137
+ args: [{
3138
+ declarations: [TruDesktopViewport],
3139
+ imports: [CommonModule, FormsModule, TruDesktopWindowModule],
3140
+ exports: [TruDesktopViewport]
3141
+ }]
3142
+ }] });
3143
+
3144
+ class TruDesktopModule {
3145
+ }
3146
+ TruDesktopModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3147
+ TruDesktopModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopModule, declarations: [TruDesktop], imports: [CommonModule,
3148
+ BrowserModule,
3149
+ FormsModule,
3150
+ HttpClientModule,
3151
+ BrowserAnimationsModule,
3152
+ MatButtonModule,
3153
+ MatIconModule,
3154
+ TruDesktopMenubarModule,
3155
+ TruDesktopStatusbarModule,
3156
+ TruDesktopTaskbarModule,
3157
+ TruDesktopViewportModule,
3158
+ TruDesktopWindowModule,
3159
+ TruDesktopViewModule], exports: [TruDesktop] });
3160
+ TruDesktopModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopModule, imports: [CommonModule,
3161
+ BrowserModule,
3162
+ FormsModule,
3163
+ HttpClientModule,
3164
+ BrowserAnimationsModule,
3165
+ MatButtonModule,
3166
+ MatIconModule,
3167
+ TruDesktopMenubarModule,
3168
+ TruDesktopStatusbarModule,
3169
+ TruDesktopTaskbarModule,
3170
+ TruDesktopViewportModule,
3171
+ TruDesktopWindowModule,
3172
+ TruDesktopViewModule] });
3173
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopModule, decorators: [{
3174
+ type: NgModule,
3175
+ args: [{
3176
+ declarations: [
3177
+ TruDesktop
3178
+ ],
3179
+ imports: [
3180
+ CommonModule,
3181
+ BrowserModule,
3182
+ FormsModule,
3183
+ HttpClientModule,
3184
+ BrowserAnimationsModule,
3185
+ MatButtonModule,
3186
+ MatIconModule,
3187
+ TruDesktopMenubarModule,
3188
+ TruDesktopStatusbarModule,
3189
+ TruDesktopTaskbarModule,
3190
+ TruDesktopViewportModule,
3191
+ TruDesktopWindowModule,
3192
+ TruDesktopViewModule,
3193
+ ],
3194
+ exports: [
3195
+ TruDesktop
3196
+ ]
3197
+ }]
3198
+ }] });
3199
+
3200
+ class TruExportDialogModule {
3201
+ }
3202
+ TruExportDialogModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruExportDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3203
+ TruExportDialogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.2", ngImport: i0, type: TruExportDialogModule, declarations: [TruExportDialog], imports: [CommonModule, FormsModule, MatCheckboxModule], exports: [TruExportDialog] });
3204
+ TruExportDialogModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruExportDialogModule, imports: [CommonModule, FormsModule, MatCheckboxModule] });
3205
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruExportDialogModule, decorators: [{
3206
+ type: NgModule,
3207
+ args: [{
3208
+ declarations: [TruExportDialog],
3209
+ imports: [CommonModule, FormsModule, MatCheckboxModule],
3210
+ exports: [TruExportDialog]
3211
+ }]
3212
+ }] });
3213
+
229
3214
  class TruSearchGroupEventHandler {
230
3215
  constructor() {
231
3216
  this.search$ = new EventEmitter();
@@ -264,29 +3249,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImpor
264
3249
  type: Injectable
265
3250
  }] });
266
3251
 
267
- class TruComponentLookup {
268
- constructor() {
269
- this.truComponentLookupRegistry = new Map();
270
- this.set = (key, type) => {
271
- this.truComponentLookupRegistry.set(key, type);
272
- };
273
- this.get = (key) => {
274
- return this.truComponentLookupRegistry.get(key);
275
- };
276
- this.getBySuffix = (suffix) => {
277
- return [...this.truComponentLookupRegistry.values()].filter((v, k) => {
278
- v.name.toLowerCase().endsWith(suffix.toLowerCase());
279
- });
280
- };
281
- }
282
- }
283
- TruComponentLookup.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruComponentLookup, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
284
- TruComponentLookup.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruComponentLookup, providedIn: 'root' });
285
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruComponentLookup, decorators: [{
286
- type: Injectable,
287
- args: [{ providedIn: 'root' }]
288
- }] });
289
-
290
3252
  class TruWindowActionEventHandler {
291
3253
  constructor() {
292
3254
  this.save$ = new Subject();
@@ -311,40 +3273,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImpor
311
3273
  type: Injectable
312
3274
  }] });
313
3275
 
314
- class TruWindowEventHandler {
315
- constructor() {
316
- this.open$ = new Subject();
317
- this.addView$ = new Subject();
318
- this.removeForwadViews$ = new Subject();
319
- }
320
- onOpen() {
321
- return this.open$;
322
- }
323
- open(windowEvent) {
324
- this.open$.next(windowEvent);
325
- }
326
- onAddView() {
327
- return this.addView$;
328
- }
329
- addView(windowAddViewEvent) {
330
- this.addView$.next(windowAddViewEvent);
331
- }
332
- onRemoveForwardViews() {
333
- return this.removeForwadViews$;
334
- }
335
- removeForwardViews() {
336
- this.removeForwadViews$.next(null);
337
- }
338
- }
339
- TruWindowEventHandler.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruWindowEventHandler, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
340
- TruWindowEventHandler.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruWindowEventHandler, providedIn: 'root' });
341
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruWindowEventHandler, decorators: [{
342
- type: Injectable,
343
- args: [{
344
- providedIn: 'root'
345
- }]
346
- }] });
347
-
348
3276
  const EQUAL_ICON = `
349
3277
  <svg style="width:24px;height:24px" viewBox="0 0 24 24"><path fill="currentColor" d="M17,16V14H7V16H17M19,3A2,2 0 0,1 21,5V19A2,2 0 0,1 19,21H5C3.89,21 3,20.1 3,19V5C3,3.89 3.89,3 5,3H19M17,10V8H7V10H17Z" /></svg>
350
3278
  `;
@@ -377,7 +3305,7 @@ class TruSearchIconModule {
377
3305
  iconRegistry.addSvgIconLiteral("contains-operator-icon", sanitizer.bypassSecurityTrustHtml(CONTAINS_ICON));
378
3306
  }
379
3307
  }
380
- TruSearchIconModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruSearchIconModule, deps: [{ token: i1.DomSanitizer }, { token: i2.MatIconRegistry }], target: i0.ɵɵFactoryTarget.NgModule });
3308
+ TruSearchIconModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruSearchIconModule, deps: [{ token: i1$4.DomSanitizer }, { token: i2$1.MatIconRegistry }], target: i0.ɵɵFactoryTarget.NgModule });
381
3309
  TruSearchIconModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.2", ngImport: i0, type: TruSearchIconModule, imports: [CommonModule, FormsModule] });
382
3310
  TruSearchIconModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruSearchIconModule, imports: [CommonModule, FormsModule] });
383
3311
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruSearchIconModule, decorators: [{
@@ -387,7 +3315,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImpor
387
3315
  declarations: [],
388
3316
  exports: []
389
3317
  }]
390
- }], ctorParameters: function () { return [{ type: i1.DomSanitizer }, { type: i2.MatIconRegistry }]; } });
3318
+ }], ctorParameters: function () { return [{ type: i1$4.DomSanitizer }, { type: i2$1.MatIconRegistry }]; } });
391
3319
 
392
3320
  class TruCommonModule {
393
3321
  }
@@ -411,5 +3339,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImpor
411
3339
  * Generated bundle index. Do not edit.
412
3340
  */
413
3341
 
414
- export { TruCommonModule, TruComponentLookup, TruEntityBase, TruPredicate, TruPropertyConfigBase, TruQueryPredicateManager, TruSearchComponentBase, TruSearchComponentConfigBase, TruSearchGroupEventHandler, TruSearchIconModule, TruWindowActionEventHandler, TruWindowAddViewEvent, TruWindowEvent, TruWindowEventHandler };
3342
+ export { TruCommonModule, TruComponentLookup, TruConfirmDialog, TruConfirmDialogConfig, TruConfirmDialogModule, TruDesktop, TruDesktopModule, TruEntityBase, TruExportDialog, TruExportDialogConfig, TruExportDialogModule, TruPredicate, TruPropertyConfigBase, TruQueryPredicateManager, TruSearchComponentBase, TruSearchComponentConfigBase, TruSearchGroupEventHandler, TruSearchIconModule, TruToolbar, TruToolbarModule, TruWindowActionEventHandler, TruWindowAddViewEvent, TruWindowEvent, TruWindowEventHandler };
415
3343
  //# sourceMappingURL=trudb-tru-common-lib.mjs.map