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