@trudb/tru-common-lib 0.0.134 → 0.0.138

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 (73) hide show
  1. package/esm2020/lib/assets/search/tru-search-icon-module.mjs +50 -0
  2. package/esm2020/lib/classes/event/tru-window-event.mjs +22 -0
  3. package/esm2020/lib/classes/search/tru-search.mjs +44 -0
  4. package/esm2020/lib/components/menu/menu/tru-menu-module.mjs +34 -0
  5. package/esm2020/lib/components/menu/menu/tru-menu.mjs +33 -0
  6. package/esm2020/lib/components/menu/menu-button/tru-menu-button-module.mjs +19 -0
  7. package/esm2020/lib/components/menu/menu-button/tru-menu-button.mjs +16 -0
  8. package/esm2020/lib/components/menu/menu-item/tru-menu-item-module.mjs +19 -0
  9. package/esm2020/lib/components/menu/menu-item/tru-menu-item.mjs +26 -0
  10. package/esm2020/lib/components/menu/sub-menu/tru-sub-menu-module.mjs +26 -0
  11. package/esm2020/lib/components/menu/sub-menu/tru-sub-menu.mjs +54 -0
  12. package/esm2020/lib/components/search/search-group/tru-search-group-module.mjs +19 -0
  13. package/esm2020/lib/components/search/search-group/tru-search-group.mjs +33 -0
  14. package/{esm2015/lib/interfaces/choice.js → esm2020/lib/interfaces/choice.mjs} +0 -0
  15. package/{esm2015/lib/interfaces/search/boolean.js → esm2020/lib/interfaces/search/boolean.mjs} +0 -0
  16. package/{esm2015/lib/interfaces/search/choice.js → esm2020/lib/interfaces/search/choice.mjs} +0 -0
  17. package/{esm2015/lib/interfaces/search/date-time.js → esm2020/lib/interfaces/search/date-time.mjs} +0 -0
  18. package/{esm2015/lib/interfaces/search/number.js → esm2020/lib/interfaces/search/number.mjs} +0 -0
  19. package/{esm2015/lib/interfaces/search/text.js → esm2020/lib/interfaces/search/text.mjs} +0 -0
  20. package/esm2020/lib/services/tru-component-lookup.mjs +20 -0
  21. package/esm2020/lib/services/tru-search-group-event-handler.mjs +41 -0
  22. package/esm2020/lib/services/tru-window-action-event-handler.mjs +27 -0
  23. package/esm2020/lib/services/tru-window-event-handler.mjs +23 -0
  24. package/esm2020/lib/tru-common-module.mjs +35 -0
  25. package/{esm2015/public-api.js → esm2020/public-api.mjs} +0 -0
  26. package/{esm2015/trudb-tru-common-lib.js → esm2020/trudb-tru-common-lib.mjs} +0 -0
  27. package/fesm2015/trudb-tru-common-lib.mjs +490 -0
  28. package/fesm2015/trudb-tru-common-lib.mjs.map +1 -0
  29. package/fesm2020/trudb-tru-common-lib.mjs +490 -0
  30. package/fesm2020/trudb-tru-common-lib.mjs.map +1 -0
  31. package/lib/assets/search/tru-search-icon-module.d.ts +6 -0
  32. package/lib/classes/event/tru-window-event.d.ts +3 -0
  33. package/lib/classes/search/tru-search.d.ts +3 -0
  34. package/lib/components/menu/menu/tru-menu-module.d.ts +9 -0
  35. package/lib/components/menu/menu/tru-menu.d.ts +3 -0
  36. package/lib/components/menu/menu-button/tru-menu-button-module.d.ts +7 -0
  37. package/lib/components/menu/menu-button/tru-menu-button.d.ts +3 -0
  38. package/lib/components/menu/menu-item/tru-menu-item-module.d.ts +7 -0
  39. package/lib/components/menu/menu-item/tru-menu-item.d.ts +3 -0
  40. package/lib/components/menu/sub-menu/tru-sub-menu-module.d.ts +7 -0
  41. package/lib/components/menu/sub-menu/tru-sub-menu.d.ts +3 -0
  42. package/lib/components/search/search-group/tru-search-group-module.d.ts +7 -0
  43. package/lib/components/search/search-group/tru-search-group.d.ts +3 -0
  44. package/lib/services/tru-component-lookup.d.ts +3 -0
  45. package/lib/services/tru-search-group-event-handler.d.ts +5 -2
  46. package/lib/services/tru-window-action-event-handler.d.ts +3 -0
  47. package/lib/services/tru-window-event-handler.d.ts +3 -0
  48. package/lib/tru-common-module.d.ts +8 -0
  49. package/package.json +22 -9
  50. package/trudb-tru-common-lib.d.ts +1 -0
  51. package/bundles/trudb-tru-common-lib.umd.js +0 -496
  52. package/bundles/trudb-tru-common-lib.umd.js.map +0 -1
  53. package/esm2015/lib/assets/search/tru-search-icon-module.js +0 -49
  54. package/esm2015/lib/classes/event/tru-window-event.js +0 -12
  55. package/esm2015/lib/classes/search/tru-search.js +0 -42
  56. package/esm2015/lib/components/menu/menu/tru-menu-module.js +0 -21
  57. package/esm2015/lib/components/menu/menu/tru-menu.js +0 -32
  58. package/esm2015/lib/components/menu/menu-button/tru-menu-button-module.js +0 -14
  59. package/esm2015/lib/components/menu/menu-button/tru-menu-button.js +0 -17
  60. package/esm2015/lib/components/menu/menu-item/tru-menu-item-module.js +0 -14
  61. package/esm2015/lib/components/menu/menu-item/tru-menu-item.js +0 -27
  62. package/esm2015/lib/components/menu/sub-menu/tru-sub-menu-module.js +0 -17
  63. package/esm2015/lib/components/menu/sub-menu/tru-sub-menu.js +0 -52
  64. package/esm2015/lib/components/search/search-group/tru-search-group-module.js +0 -14
  65. package/esm2015/lib/components/search/search-group/tru-search-group.js +0 -36
  66. package/esm2015/lib/services/tru-component-lookup.js +0 -18
  67. package/esm2015/lib/services/tru-search-group-event-handler.js +0 -38
  68. package/esm2015/lib/services/tru-window-action-event-handler.js +0 -24
  69. package/esm2015/lib/services/tru-window-event-handler.js +0 -17
  70. package/esm2015/lib/tru-common-module.js +0 -22
  71. package/fesm2015/trudb-tru-common-lib.js +0 -437
  72. package/fesm2015/trudb-tru-common-lib.js.map +0 -1
  73. package/trudb-tru-common-lib.metadata.json +0 -1
@@ -0,0 +1,27 @@
1
+ import { Injectable } from '@angular/core';
2
+ import { Subject } from 'rxjs';
3
+ import * as i0 from "@angular/core";
4
+ export class TruWindowActionEventHandler {
5
+ constructor() {
6
+ this.save$ = new Subject();
7
+ this.revert$ = new Subject();
8
+ this.onSave = () => {
9
+ return this.save$;
10
+ };
11
+ this.onRevert = () => {
12
+ return this.revert$;
13
+ };
14
+ this.save = () => {
15
+ this.save$.next(null);
16
+ };
17
+ this.revert = () => {
18
+ this.revert$.next(null);
19
+ };
20
+ }
21
+ }
22
+ TruWindowActionEventHandler.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruWindowActionEventHandler, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
23
+ TruWindowActionEventHandler.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruWindowActionEventHandler });
24
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruWindowActionEventHandler, decorators: [{
25
+ type: Injectable
26
+ }] });
27
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJ1LXdpbmRvdy1hY3Rpb24tZXZlbnQtaGFuZGxlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3RydS1jb21tb24tbGliL3NyYy9saWIvc2VydmljZXMvdHJ1LXdpbmRvdy1hY3Rpb24tZXZlbnQtaGFuZGxlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzNDLE9BQU8sRUFBRSxPQUFPLEVBQUUsTUFBTSxNQUFNLENBQUM7O0FBRy9CLE1BQU0sT0FBTywyQkFBMkI7SUFEeEM7UUFHVSxVQUFLLEdBQWtCLElBQUksT0FBTyxFQUFFLENBQUM7UUFDckMsWUFBTyxHQUFrQixJQUFJLE9BQU8sRUFBRSxDQUFDO1FBRS9DLFdBQU0sR0FBRyxHQUFHLEVBQUU7WUFDWixPQUFPLElBQUksQ0FBQyxLQUFLLENBQUM7UUFDcEIsQ0FBQyxDQUFBO1FBRUQsYUFBUSxHQUFHLEdBQUcsRUFBRTtZQUNkLE9BQU8sSUFBSSxDQUFDLE9BQU8sQ0FBQztRQUN0QixDQUFDLENBQUE7UUFFRCxTQUFJLEdBQUcsR0FBRyxFQUFFO1lBQ1YsSUFBSSxDQUFDLEtBQUssQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUM7UUFDeEIsQ0FBQyxDQUFBO1FBRUQsV0FBTSxHQUFHLEdBQUcsRUFBRTtZQUNaLElBQUksQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxDQUFDO1FBQzFCLENBQUMsQ0FBQTtLQUNGOzt3SEFwQlksMkJBQTJCOzRIQUEzQiwyQkFBMkI7MkZBQTNCLDJCQUEyQjtrQkFEdkMsVUFBVSIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEluamVjdGFibGUgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcclxuaW1wb3J0IHsgU3ViamVjdCB9IGZyb20gJ3J4anMnO1xyXG5cclxuQEluamVjdGFibGUoKVxyXG5leHBvcnQgY2xhc3MgVHJ1V2luZG93QWN0aW9uRXZlbnRIYW5kbGVyIHtcclxuXHJcbiAgcHJpdmF0ZSBzYXZlJDogU3ViamVjdDxudWxsPiA9IG5ldyBTdWJqZWN0KCk7XHJcbiAgcHJpdmF0ZSByZXZlcnQkOiBTdWJqZWN0PG51bGw+ID0gbmV3IFN1YmplY3QoKTtcclxuXHJcbiAgb25TYXZlID0gKCkgPT4ge1xyXG4gICAgcmV0dXJuIHRoaXMuc2F2ZSQ7XHJcbiAgfVxyXG5cclxuICBvblJldmVydCA9ICgpID0+IHtcclxuICAgIHJldHVybiB0aGlzLnJldmVydCQ7XHJcbiAgfVxyXG5cclxuICBzYXZlID0gKCkgPT4ge1xyXG4gICAgdGhpcy5zYXZlJC5uZXh0KG51bGwpO1xyXG4gIH1cclxuXHJcbiAgcmV2ZXJ0ID0gKCkgPT4ge1xyXG4gICAgdGhpcy5yZXZlcnQkLm5leHQobnVsbCk7XHJcbiAgfVxyXG59XHJcbiJdfQ==
@@ -0,0 +1,23 @@
1
+ import { Injectable } from '@angular/core';
2
+ import { Subject } from 'rxjs';
3
+ import * as i0 from "@angular/core";
4
+ export class TruWindowEventHandler {
5
+ constructor() {
6
+ this.open$ = new Subject();
7
+ }
8
+ onOpen() {
9
+ return this.open$;
10
+ }
11
+ open(windowEvent) {
12
+ this.open$.next(windowEvent);
13
+ }
14
+ }
15
+ TruWindowEventHandler.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruWindowEventHandler, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
16
+ TruWindowEventHandler.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruWindowEventHandler, providedIn: 'root' });
17
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruWindowEventHandler, decorators: [{
18
+ type: Injectable,
19
+ args: [{
20
+ providedIn: 'root'
21
+ }]
22
+ }] });
23
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJ1LXdpbmRvdy1ldmVudC1oYW5kbGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvdHJ1LWNvbW1vbi1saWIvc3JjL2xpYi9zZXJ2aWNlcy90cnUtd2luZG93LWV2ZW50LWhhbmRsZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUMzQyxPQUFPLEVBQUUsT0FBTyxFQUFFLE1BQU0sTUFBTSxDQUFDOztBQU8vQixNQUFNLE9BQU8scUJBQXFCO0lBSGxDO1FBSVUsVUFBSyxHQUE0QixJQUFJLE9BQU8sRUFBa0IsQ0FBQztLQVN4RTtJQVBDLE1BQU07UUFDSixPQUFPLElBQUksQ0FBQyxLQUFLLENBQUM7SUFDcEIsQ0FBQztJQUVELElBQUksQ0FBQyxXQUEyQjtRQUM5QixJQUFJLENBQUMsS0FBSyxDQUFDLElBQUksQ0FBQyxXQUFXLENBQUMsQ0FBQztJQUMvQixDQUFDOztrSEFUVSxxQkFBcUI7c0hBQXJCLHFCQUFxQixjQUZwQixNQUFNOzJGQUVQLHFCQUFxQjtrQkFIakMsVUFBVTttQkFBQztvQkFDVixVQUFVLEVBQUUsTUFBTTtpQkFDbkIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBJbmplY3RhYmxlIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XHJcbmltcG9ydCB7IFN1YmplY3QgfSBmcm9tICdyeGpzJztcclxuXHJcbmltcG9ydCB7IFRydVdpbmRvd0V2ZW50IH0gZnJvbSAnLi4vY2xhc3Nlcy9ldmVudC90cnUtd2luZG93LWV2ZW50JztcclxuXHJcbkBJbmplY3RhYmxlKHtcclxuICBwcm92aWRlZEluOiAncm9vdCdcclxufSlcclxuZXhwb3J0IGNsYXNzIFRydVdpbmRvd0V2ZW50SGFuZGxlciB7XHJcbiAgcHJpdmF0ZSBvcGVuJDogU3ViamVjdDxUcnVXaW5kb3dFdmVudD4gPSBuZXcgU3ViamVjdDxUcnVXaW5kb3dFdmVudD4oKTtcclxuXHJcbiAgb25PcGVuKCkge1xyXG4gICAgcmV0dXJuIHRoaXMub3BlbiQ7XHJcbiAgfVxyXG5cclxuICBvcGVuKHdpbmRvd0V2ZW50OiBUcnVXaW5kb3dFdmVudCkge1xyXG4gICAgdGhpcy5vcGVuJC5uZXh0KHdpbmRvd0V2ZW50KTtcclxuICB9XHJcbn1cclxuIl19
@@ -0,0 +1,35 @@
1
+ import { NgModule } from '@angular/core';
2
+ import { TruMenuModule } from './components/menu/menu/tru-menu-module';
3
+ import { TruMenuItemModule } from './components/menu/menu-item/tru-menu-item-module';
4
+ import { TruMenuButtonModule } from './components/menu/menu-button/tru-menu-button-module';
5
+ import { TruSearchGroupModule } from './components/search/search-group/tru-search-group-module';
6
+ import * as i0 from "@angular/core";
7
+ export class TruCommonModule {
8
+ }
9
+ TruCommonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruCommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
10
+ TruCommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruCommonModule, imports: [TruMenuModule,
11
+ TruMenuItemModule,
12
+ TruMenuButtonModule,
13
+ TruSearchGroupModule], exports: [TruMenuModule] });
14
+ TruCommonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruCommonModule, imports: [[
15
+ TruMenuModule,
16
+ TruMenuItemModule,
17
+ TruMenuButtonModule,
18
+ TruSearchGroupModule
19
+ ], TruMenuModule] });
20
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruCommonModule, decorators: [{
21
+ type: NgModule,
22
+ args: [{
23
+ declarations: [],
24
+ imports: [
25
+ TruMenuModule,
26
+ TruMenuItemModule,
27
+ TruMenuButtonModule,
28
+ TruSearchGroupModule
29
+ ],
30
+ exports: [
31
+ TruMenuModule
32
+ ]
33
+ }]
34
+ }] });
35
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJ1LWNvbW1vbi1tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy90cnUtY29tbW9uLWxpYi9zcmMvbGliL3RydS1jb21tb24tbW9kdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFFekMsT0FBTyxFQUFFLGFBQWEsRUFBRSxNQUFNLHdDQUF3QyxDQUFDO0FBQ3ZFLE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLGtEQUFrRCxDQUFDO0FBQ3JGLE9BQU8sRUFBRSxtQkFBbUIsRUFBRSxNQUFNLHNEQUFzRCxDQUFDO0FBRTNGLE9BQU8sRUFBRSxvQkFBb0IsRUFBRSxNQUFNLDBEQUEwRCxDQUFDOztBQWdCaEcsTUFBTSxPQUFPLGVBQWU7OzRHQUFmLGVBQWU7NkdBQWYsZUFBZSxZQVR4QixhQUFhO1FBQ2IsaUJBQWlCO1FBQ2pCLG1CQUFtQjtRQUNuQixvQkFBb0IsYUFHcEIsYUFBYTs2R0FHSixlQUFlLFlBVmpCO1lBQ1AsYUFBYTtZQUNiLGlCQUFpQjtZQUNqQixtQkFBbUI7WUFDbkIsb0JBQW9CO1NBQ3JCLEVBRUMsYUFBYTsyRkFHSixlQUFlO2tCQWQzQixRQUFRO21CQUFDO29CQUNSLFlBQVksRUFBRSxFQUViO29CQUNELE9BQU8sRUFBRTt3QkFDUCxhQUFhO3dCQUNiLGlCQUFpQjt3QkFDakIsbUJBQW1CO3dCQUNuQixvQkFBb0I7cUJBQ3JCO29CQUNELE9BQU8sRUFBRTt3QkFDUCxhQUFhO3FCQUNkO2lCQUNGIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgTmdNb2R1bGUgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcclxuXHJcbmltcG9ydCB7IFRydU1lbnVNb2R1bGUgfSBmcm9tICcuL2NvbXBvbmVudHMvbWVudS9tZW51L3RydS1tZW51LW1vZHVsZSc7XHJcbmltcG9ydCB7IFRydU1lbnVJdGVtTW9kdWxlIH0gZnJvbSAnLi9jb21wb25lbnRzL21lbnUvbWVudS1pdGVtL3RydS1tZW51LWl0ZW0tbW9kdWxlJztcclxuaW1wb3J0IHsgVHJ1TWVudUJ1dHRvbk1vZHVsZSB9IGZyb20gJy4vY29tcG9uZW50cy9tZW51L21lbnUtYnV0dG9uL3RydS1tZW51LWJ1dHRvbi1tb2R1bGUnO1xyXG5cclxuaW1wb3J0IHsgVHJ1U2VhcmNoR3JvdXBNb2R1bGUgfSBmcm9tICcuL2NvbXBvbmVudHMvc2VhcmNoL3NlYXJjaC1ncm91cC90cnUtc2VhcmNoLWdyb3VwLW1vZHVsZSc7XHJcblxyXG5ATmdNb2R1bGUoe1xyXG4gIGRlY2xhcmF0aW9uczogW1xyXG5cclxuICBdLFxyXG4gIGltcG9ydHM6IFtcclxuICAgIFRydU1lbnVNb2R1bGUsXHJcbiAgICBUcnVNZW51SXRlbU1vZHVsZSxcclxuICAgIFRydU1lbnVCdXR0b25Nb2R1bGUsXHJcbiAgICBUcnVTZWFyY2hHcm91cE1vZHVsZVxyXG4gIF0sXHJcbiAgZXhwb3J0czogW1xyXG4gICAgVHJ1TWVudU1vZHVsZVxyXG4gIF1cclxufSlcclxuZXhwb3J0IGNsYXNzIFRydUNvbW1vbk1vZHVsZSB7IH1cclxuIl19
@@ -0,0 +1,490 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable, Directive, Input, EventEmitter, Component, NgModule, Output } from '@angular/core';
3
+ import { Subject } from 'rxjs';
4
+ import * as i1 from '@angular/common';
5
+ import { CommonModule } from '@angular/common';
6
+ import { FormsModule } from '@angular/forms';
7
+ import * as i1$1 from '@angular/platform-browser';
8
+ import * as i2 from '@angular/material/icon';
9
+
10
+ class TruWindowEvent {
11
+ constructor() {
12
+ this.title = '';
13
+ this.windowContext = {};
14
+ this.contentBottom = '23px';
15
+ this.statusbarDirective = 'tru-statusbar';
16
+ this.height = '450px';
17
+ this.width = '900px';
18
+ this.views = [{}];
19
+ }
20
+ }
21
+ TruWindowEvent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruWindowEvent, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
22
+ TruWindowEvent.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruWindowEvent, providedIn: 'root' });
23
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruWindowEvent, decorators: [{
24
+ type: Injectable,
25
+ args: [{
26
+ providedIn: 'root'
27
+ }]
28
+ }] });
29
+
30
+ /*
31
+ * The abstract class needs the Angular @Component decorator in order in implement @Input
32
+ */
33
+ class TruSearch {
34
+ constructor() {
35
+ this.operatorLookup = {
36
+ equal: 'eq',
37
+ "not-equal": 'not-eq',
38
+ "greater-than": 'gt',
39
+ "greater-than-or-equal": 'ge',
40
+ "less-than": 'lt',
41
+ "less-than-or-equal": 'le',
42
+ contains: 'contains'
43
+ };
44
+ this.operatorIconLookup = {
45
+ equal: 'equal-operator-icon',
46
+ "not-equal": 'not-equal-operator-icon',
47
+ "greater-than": 'greater-than-operator-icon',
48
+ "greater-than-or-equal": 'greater-than-or-equal-operator-icon',
49
+ "less-than": 'less-than-operator-icon',
50
+ "less-than-or-equal": 'less-than-or-equal-operator-icon',
51
+ contains: 'contains-operator-icon'
52
+ };
53
+ this.operatorIconTitleLookup = {
54
+ equal: 'Equal To',
55
+ "not-equal": 'Not Equal To',
56
+ "greater-than": 'Greater Than',
57
+ "greater-than-or-equal": 'Greater Than Or Equal To',
58
+ "less-than": 'Less Than',
59
+ "less-than-or-equal": 'Less Than Or Equal To',
60
+ contains: 'Contains'
61
+ };
62
+ }
63
+ }
64
+ TruSearch.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruSearch, deps: [], target: i0.ɵɵFactoryTarget.Directive });
65
+ TruSearch.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.3", type: TruSearch, inputs: { config: "config" }, ngImport: i0 });
66
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruSearch, decorators: [{
67
+ type: Directive
68
+ }], propDecorators: { config: [{
69
+ type: Input
70
+ }] } });
71
+
72
+ class TruSearchGroupEventHandler {
73
+ constructor() {
74
+ this.search$ = new EventEmitter();
75
+ this.filter$ = new EventEmitter();
76
+ this.clear$ = new Subject();
77
+ this.default$ = new Subject();
78
+ }
79
+ onSearch() {
80
+ return this.search$;
81
+ }
82
+ onFilter() {
83
+ return this.filter$;
84
+ }
85
+ onClearValues() {
86
+ return this.clear$;
87
+ }
88
+ onSetDefaults() {
89
+ return this.default$;
90
+ }
91
+ search(entityQuery) {
92
+ this.search$.emit(entityQuery);
93
+ }
94
+ filter(entityQuery) {
95
+ this.filter$.emit(entityQuery);
96
+ }
97
+ clearValues() {
98
+ this.clear$.next(null);
99
+ }
100
+ setDefaults() {
101
+ this.default$.next(null);
102
+ }
103
+ }
104
+ TruSearchGroupEventHandler.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruSearchGroupEventHandler, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
105
+ TruSearchGroupEventHandler.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruSearchGroupEventHandler });
106
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruSearchGroupEventHandler, decorators: [{
107
+ type: Injectable
108
+ }] });
109
+
110
+ class TruComponentLookup {
111
+ constructor() {
112
+ this.truComponentLookupRegistry = new Map();
113
+ this.set = (key, type) => {
114
+ this.truComponentLookupRegistry.set(key, type);
115
+ };
116
+ this.get = (key) => {
117
+ return this.truComponentLookupRegistry.get(key);
118
+ };
119
+ }
120
+ }
121
+ TruComponentLookup.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruComponentLookup, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
122
+ TruComponentLookup.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruComponentLookup, providedIn: 'root' });
123
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruComponentLookup, decorators: [{
124
+ type: Injectable,
125
+ args: [{ providedIn: 'root' }]
126
+ }] });
127
+
128
+ class TruWindowActionEventHandler {
129
+ constructor() {
130
+ this.save$ = new Subject();
131
+ this.revert$ = new Subject();
132
+ this.onSave = () => {
133
+ return this.save$;
134
+ };
135
+ this.onRevert = () => {
136
+ return this.revert$;
137
+ };
138
+ this.save = () => {
139
+ this.save$.next(null);
140
+ };
141
+ this.revert = () => {
142
+ this.revert$.next(null);
143
+ };
144
+ }
145
+ }
146
+ TruWindowActionEventHandler.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruWindowActionEventHandler, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
147
+ TruWindowActionEventHandler.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruWindowActionEventHandler });
148
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruWindowActionEventHandler, decorators: [{
149
+ type: Injectable
150
+ }] });
151
+
152
+ class TruWindowEventHandler {
153
+ constructor() {
154
+ this.open$ = new Subject();
155
+ }
156
+ onOpen() {
157
+ return this.open$;
158
+ }
159
+ open(windowEvent) {
160
+ this.open$.next(windowEvent);
161
+ }
162
+ }
163
+ TruWindowEventHandler.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruWindowEventHandler, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
164
+ TruWindowEventHandler.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruWindowEventHandler, providedIn: 'root' });
165
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruWindowEventHandler, decorators: [{
166
+ type: Injectable,
167
+ args: [{
168
+ providedIn: 'root'
169
+ }]
170
+ }] });
171
+
172
+ class TruMenuButton {
173
+ constructor() {
174
+ }
175
+ }
176
+ TruMenuButton.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruMenuButton, deps: [], target: i0.ɵɵFactoryTarget.Component });
177
+ TruMenuButton.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: TruMenuButton, selector: "tru-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: [".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"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
178
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruMenuButton, decorators: [{
179
+ type: Component,
180
+ args: [{ selector: 'tru-menu-button', 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: [".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"] }]
181
+ }], ctorParameters: function () { return []; }, propDecorators: { config: [{
182
+ type: Input
183
+ }] } });
184
+
185
+ class TruMenuItem {
186
+ constructor() {
187
+ this.onClick = (event) => {
188
+ var target = event.target;
189
+ var isActive = target.classList.contains('is-active');
190
+ if (isActive) {
191
+ target.classList.remove('is-active');
192
+ }
193
+ else {
194
+ target.classList.add('is-active');
195
+ }
196
+ };
197
+ }
198
+ }
199
+ TruMenuItem.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruMenuItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
200
+ TruMenuItem.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: TruMenuItem, selector: "tru-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.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: [".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}\n"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
201
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruMenuItem, decorators: [{
202
+ type: Component,
203
+ args: [{ selector: 'tru-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.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: [".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}\n"] }]
204
+ }], ctorParameters: function () { return []; }, propDecorators: { config: [{
205
+ type: Input
206
+ }] } });
207
+
208
+ class TruMenu {
209
+ constructor() {
210
+ this.onDocumentClick = (event) => {
211
+ var activeMenus = document.querySelectorAll('.is-active');
212
+ var target = event.target;
213
+ activeMenus.forEach((activeMenu) => {
214
+ if (activeMenu !== target) {
215
+ activeMenu.classList.remove('is-active');
216
+ }
217
+ });
218
+ };
219
+ }
220
+ ngAfterViewInit() {
221
+ document.addEventListener('click', this.onDocumentClick);
222
+ }
223
+ ngOnDestroy() {
224
+ document.removeEventListener('click', this.onDocumentClick);
225
+ }
226
+ }
227
+ TruMenu.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruMenu, deps: [], target: i0.ɵɵFactoryTarget.Component });
228
+ TruMenu.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: TruMenu, selector: "tru-menu", inputs: { config: "config" }, ngImport: i0, template: "<li class=\"has-sub-menu\">\r\n <tru-menu-button [config]=\"config\" *ngIf=\"!config.choices\"></tru-menu-button>\r\n <tru-menu-item [config]=\"config\" *ngIf=\"config.choices && config.choices.length\"></tru-menu-item>\r\n</li>\r\n", styles: [".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"], components: [{ type: TruMenuButton, selector: "tru-menu-button", inputs: ["config"] }, { type: TruMenuItem, selector: "tru-menu-item", inputs: ["config"] }], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
229
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruMenu, decorators: [{
230
+ type: Component,
231
+ args: [{ selector: 'tru-menu', template: "<li class=\"has-sub-menu\">\r\n <tru-menu-button [config]=\"config\" *ngIf=\"!config.choices\"></tru-menu-button>\r\n <tru-menu-item [config]=\"config\" *ngIf=\"config.choices && config.choices.length\"></tru-menu-item>\r\n</li>\r\n", styles: [".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"] }]
232
+ }], ctorParameters: function () { return []; }, propDecorators: { config: [{
233
+ type: Input
234
+ }] } });
235
+
236
+ class TruMenuItemModule {
237
+ }
238
+ TruMenuItemModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruMenuItemModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
239
+ TruMenuItemModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruMenuItemModule, declarations: [TruMenuItem], imports: [CommonModule, FormsModule], exports: [TruMenuItem] });
240
+ TruMenuItemModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruMenuItemModule, imports: [[CommonModule, FormsModule]] });
241
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruMenuItemModule, decorators: [{
242
+ type: NgModule,
243
+ args: [{
244
+ declarations: [TruMenuItem],
245
+ imports: [CommonModule, FormsModule],
246
+ exports: [TruMenuItem]
247
+ }]
248
+ }] });
249
+
250
+ class TruMenuButtonModule {
251
+ }
252
+ TruMenuButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruMenuButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
253
+ TruMenuButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruMenuButtonModule, declarations: [TruMenuButton], imports: [CommonModule, FormsModule], exports: [TruMenuButton] });
254
+ TruMenuButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruMenuButtonModule, imports: [[CommonModule, FormsModule]] });
255
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruMenuButtonModule, decorators: [{
256
+ type: NgModule,
257
+ args: [{
258
+ declarations: [TruMenuButton],
259
+ imports: [CommonModule, FormsModule],
260
+ exports: [TruMenuButton]
261
+ }]
262
+ }] });
263
+
264
+ class TruMenuModule {
265
+ }
266
+ TruMenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
267
+ TruMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruMenuModule, declarations: [TruMenu], imports: [CommonModule,
268
+ FormsModule,
269
+ TruMenuItemModule,
270
+ TruMenuButtonModule], exports: [TruMenu] });
271
+ TruMenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruMenuModule, imports: [[
272
+ CommonModule,
273
+ FormsModule,
274
+ TruMenuItemModule,
275
+ TruMenuButtonModule
276
+ ]] });
277
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruMenuModule, decorators: [{
278
+ type: NgModule,
279
+ args: [{
280
+ declarations: [TruMenu],
281
+ imports: [
282
+ CommonModule,
283
+ FormsModule,
284
+ TruMenuItemModule,
285
+ TruMenuButtonModule
286
+ ],
287
+ exports: [TruMenu]
288
+ }]
289
+ }] });
290
+
291
+ class TruSubMenu {
292
+ constructor(elementRef) {
293
+ this.elementRef = elementRef;
294
+ this.onClick = (event) => {
295
+ var target = event.target.parentElement.parentElement;
296
+ var isSubMenu = target.classList.contains('has-sub-menu');
297
+ var isActive = target.classList.contains('is-active');
298
+ if (isSubMenu && isActive) {
299
+ target.classList.remove('is-active');
300
+ }
301
+ else if (isSubMenu && !isActive) {
302
+ target.classList.add('is-active');
303
+ }
304
+ var subMenus = this.elementRef.nativeElement.querySelectorAll(".has-sub-menu");
305
+ subMenus.forEach((menu) => {
306
+ if (menu !== target && menu.classList.contains('is-active')) {
307
+ menu.classList.remove('is-active');
308
+ }
309
+ });
310
+ };
311
+ this.onDocumentClick = (event) => {
312
+ var subMenus = document.querySelectorAll('.has-sub-menu');
313
+ var target = event.target.parentElement.parentElement;
314
+ subMenus.forEach((menu) => {
315
+ if (menu !== target && menu.classList.contains('is-active')) {
316
+ menu.classList.remove('is-active');
317
+ }
318
+ });
319
+ };
320
+ }
321
+ ngOnInit() { }
322
+ ngAfterViewInit() {
323
+ var subMenu = this.elementRef.nativeElement.querySelectorAll(".has-sub-menu")[0];
324
+ if (subMenu) {
325
+ this.elementRef.nativeElement.addEventListener('click', this.onClick);
326
+ document.addEventListener('click', this.onDocumentClick);
327
+ }
328
+ }
329
+ ngOnDestroy() {
330
+ this.elementRef.nativeElement.removeEventListener('click', this.onClick);
331
+ document.removeEventListener('click', this.onDocumentClick);
332
+ }
333
+ }
334
+ TruSubMenu.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruSubMenu, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
335
+ TruSubMenu.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.3", type: TruSubMenu, selector: "[tru-sub-menu]", ngImport: i0 });
336
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruSubMenu, decorators: [{
337
+ type: Directive,
338
+ args: [{
339
+ selector: '[tru-sub-menu]',
340
+ }]
341
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });
342
+
343
+ class TruSubMenuModule {
344
+ }
345
+ TruSubMenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruSubMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
346
+ TruSubMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruSubMenuModule, declarations: [TruSubMenu], imports: [CommonModule,
347
+ FormsModule], exports: [TruSubMenu] });
348
+ TruSubMenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruSubMenuModule, imports: [[
349
+ CommonModule,
350
+ FormsModule,
351
+ ]] });
352
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruSubMenuModule, decorators: [{
353
+ type: NgModule,
354
+ args: [{
355
+ declarations: [TruSubMenu],
356
+ imports: [
357
+ CommonModule,
358
+ FormsModule,
359
+ ],
360
+ exports: [TruSubMenu]
361
+ }]
362
+ }] });
363
+
364
+ class TruSearchGroup {
365
+ constructor(searchGroupEventHandler) {
366
+ this.searchGroupEventHandler = searchGroupEventHandler;
367
+ this.search$ = new EventEmitter();
368
+ this.filter$ = new EventEmitter();
369
+ }
370
+ onSearchClicked() {
371
+ this.search$.emit();
372
+ }
373
+ onFilterClicked() {
374
+ this.filter$.emit();
375
+ }
376
+ onClearClicked() {
377
+ this.searchGroupEventHandler.clearValues();
378
+ }
379
+ onDefaultClicked() {
380
+ this.searchGroupEventHandler.setDefaults();
381
+ }
382
+ }
383
+ TruSearchGroup.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruSearchGroup, deps: [{ token: TruSearchGroupEventHandler }], target: i0.ɵɵFactoryTarget.Component });
384
+ TruSearchGroup.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: TruSearchGroup, selector: "tru-search-group", outputs: { search$: "search$", filter$: "filter$" }, ngImport: i0, template: "<div>\r\n <div class=\"button-container\">\r\n <button mat-button color=\"accent\" (click)=\"onSearchClicked()\">Search</button>\r\n <button mat-button color=\"accent\" (click)=\"onFilterClicked()\">Filter Results</button>\r\n <button mat-button color=\"accent\" (click)=\"onClearClicked()\">Clear</button>\r\n <button mat-button color=\"accent\" (click)=\"onDefaultClicked()\">Default</button>\r\n </div>\r\n <ng-content></ng-content>\r\n</div>\r\n", styles: ["button{margin-right:5px}.button-container{margin-bottom:10px}\n"] });
385
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruSearchGroup, decorators: [{
386
+ type: Component,
387
+ args: [{ selector: 'tru-search-group', template: "<div>\r\n <div class=\"button-container\">\r\n <button mat-button color=\"accent\" (click)=\"onSearchClicked()\">Search</button>\r\n <button mat-button color=\"accent\" (click)=\"onFilterClicked()\">Filter Results</button>\r\n <button mat-button color=\"accent\" (click)=\"onClearClicked()\">Clear</button>\r\n <button mat-button color=\"accent\" (click)=\"onDefaultClicked()\">Default</button>\r\n </div>\r\n <ng-content></ng-content>\r\n</div>\r\n", styles: ["button{margin-right:5px}.button-container{margin-bottom:10px}\n"] }]
388
+ }], ctorParameters: function () { return [{ type: TruSearchGroupEventHandler }]; }, propDecorators: { search$: [{
389
+ type: Output
390
+ }], filter$: [{
391
+ type: Output
392
+ }] } });
393
+
394
+ class TruSearchGroupModule {
395
+ }
396
+ TruSearchGroupModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruSearchGroupModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
397
+ TruSearchGroupModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruSearchGroupModule, declarations: [TruSearchGroup], imports: [CommonModule, FormsModule], exports: [TruSearchGroup] });
398
+ TruSearchGroupModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruSearchGroupModule, imports: [[CommonModule, FormsModule]] });
399
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruSearchGroupModule, decorators: [{
400
+ type: NgModule,
401
+ args: [{
402
+ declarations: [TruSearchGroup],
403
+ imports: [CommonModule, FormsModule],
404
+ exports: [TruSearchGroup]
405
+ }]
406
+ }] });
407
+
408
+ const EQUAL_ICON = `
409
+ <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>
410
+ `;
411
+ const NOT_EQUAL_ICON = `
412
+ <svg style="width:24px;height:24px" viewBox="0 0 24 24"><path fill="currentColor" d="M6,15H8V17H6M11,13H18V15H11M11,9H18V11H11M6,7H8V13H6M5,3C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5A2,2 0 0,0 19,3H5Z" /></svg>
413
+ `;
414
+ const GREATER_THAN_ICON = `
415
+ <svg style="width:24px;height:24px" viewBox="0 0 24 24"><path fill="currentColor" d="M10.41,7.41L15,12L10.41,16.6L9,15.18L12.18,12L9,8.82M5,3C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5A2,2 0 0,0 19,3H5Z" /></svg>
416
+ `;
417
+ const GREATER_THAN_OR_EQUAL_ICON = `
418
+ <svg style="width:24px;height:24px" viewBox="0 0 24 24"><path fill="currentColor" d="M13,13H18V15H13M13,9H18V11H13M6.91,7.41L11.5,12L6.91,16.6L5.5,15.18L8.68,12L5.5,8.82M5,3C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5A2,2 0 0,0 19,3H5Z" /></svg>
419
+ `;
420
+ const LESS_THAN_ICON = `
421
+ <svg style="width:24px;height:24px" viewBox="0 0 24 24"><path fill="currentColor" d="M13.59,7.41L9,12L13.59,16.6L15,15.18L11.82,12L15,8.82M19,3C20.11,3 21,3.9 21,5V19A2,2 0 0,1 19,21H5A2,2 0 0,1 3,19V5A2,2 0 0,1 5,3H19Z" /></svg>
422
+ `;
423
+ const LESS_THAN_OR_EQUAL_ICON = `
424
+ <svg style="width:24px;height:24px" viewBox="0 0 24 24"><path fill="currentColor" d="M13,13H18V15H13M13,9H18V11H13M10.09,7.41L11.5,8.82L8.32,12L11.5,15.18L10.09,16.6L5.5,12M5,3C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5A2,2 0 0,0 19,3H5Z" /></svg>
425
+ `;
426
+ const CONTAINS_ICON = `
427
+ <svg style="width:24px;height:24px" viewBox="0 0 24 24"><path fill="currentColor" d="M2,3H8V5H4V19H8V21H2V3M7,17V15H9V17H7M11,17V15H13V17H11M15,17V15H17V17H15M22,3V21H16V19H20V5H16V3H22Z" /></svg>
428
+ `;
429
+ class TruSearchIconModule {
430
+ constructor(sanitizer, iconRegistry) {
431
+ iconRegistry.addSvgIconLiteral("equal-operator-icon", sanitizer.bypassSecurityTrustHtml(EQUAL_ICON));
432
+ iconRegistry.addSvgIconLiteral("not-equal-operator-icon", sanitizer.bypassSecurityTrustHtml(NOT_EQUAL_ICON));
433
+ iconRegistry.addSvgIconLiteral("greater-than-operator-icon", sanitizer.bypassSecurityTrustHtml(GREATER_THAN_ICON));
434
+ iconRegistry.addSvgIconLiteral("greater-than-or-equal-operator-icon", sanitizer.bypassSecurityTrustHtml(GREATER_THAN_OR_EQUAL_ICON));
435
+ iconRegistry.addSvgIconLiteral("less-than-operator-icon", sanitizer.bypassSecurityTrustHtml(LESS_THAN_ICON));
436
+ iconRegistry.addSvgIconLiteral("less-than-or-equal-operator-icon", sanitizer.bypassSecurityTrustHtml(LESS_THAN_OR_EQUAL_ICON));
437
+ iconRegistry.addSvgIconLiteral("contains-operator-icon", sanitizer.bypassSecurityTrustHtml(CONTAINS_ICON));
438
+ }
439
+ }
440
+ TruSearchIconModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruSearchIconModule, deps: [{ token: i1$1.DomSanitizer }, { token: i2.MatIconRegistry }], target: i0.ɵɵFactoryTarget.NgModule });
441
+ TruSearchIconModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruSearchIconModule, imports: [CommonModule, FormsModule] });
442
+ TruSearchIconModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruSearchIconModule, imports: [[CommonModule, FormsModule]] });
443
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruSearchIconModule, decorators: [{
444
+ type: NgModule,
445
+ args: [{
446
+ imports: [CommonModule, FormsModule],
447
+ declarations: [],
448
+ exports: []
449
+ }]
450
+ }], ctorParameters: function () { return [{ type: i1$1.DomSanitizer }, { type: i2.MatIconRegistry }]; } });
451
+
452
+ class TruCommonModule {
453
+ }
454
+ TruCommonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruCommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
455
+ TruCommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruCommonModule, imports: [TruMenuModule,
456
+ TruMenuItemModule,
457
+ TruMenuButtonModule,
458
+ TruSearchGroupModule], exports: [TruMenuModule] });
459
+ TruCommonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruCommonModule, imports: [[
460
+ TruMenuModule,
461
+ TruMenuItemModule,
462
+ TruMenuButtonModule,
463
+ TruSearchGroupModule
464
+ ], TruMenuModule] });
465
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TruCommonModule, decorators: [{
466
+ type: NgModule,
467
+ args: [{
468
+ declarations: [],
469
+ imports: [
470
+ TruMenuModule,
471
+ TruMenuItemModule,
472
+ TruMenuButtonModule,
473
+ TruSearchGroupModule
474
+ ],
475
+ exports: [
476
+ TruMenuModule
477
+ ]
478
+ }]
479
+ }] });
480
+
481
+ /*
482
+ * Public API Surface of tru-common-lib
483
+ */
484
+
485
+ /**
486
+ * Generated bundle index. Do not edit.
487
+ */
488
+
489
+ export { TruCommonModule, TruComponentLookup, TruMenu, TruMenuButton, TruMenuButtonModule, TruMenuItem, TruMenuItemModule, TruMenuModule, TruSearch, TruSearchGroup, TruSearchGroupEventHandler, TruSearchGroupModule, TruSearchIconModule, TruSubMenu, TruSubMenuModule, TruWindowActionEventHandler, TruWindowEvent, TruWindowEventHandler };
490
+ //# sourceMappingURL=trudb-tru-common-lib.mjs.map