@trudb/tru-common-lib 0.0.199 → 0.0.205

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.
@@ -431,7 +431,6 @@ class TruContextFilter {
431
431
  constructor() {
432
432
  this.tooltip = undefined;
433
433
  this.choices = [];
434
- this.selectedChoice = undefined;
435
434
  this.identify = (index, choice) => {
436
435
  return choice.ref;
437
436
  };
@@ -2035,21 +2034,49 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImpor
2035
2034
  }]
2036
2035
  }] });
2037
2036
 
2038
- class TruToolbarContextFilter {
2037
+ class TruContextFilters {
2039
2038
  constructor() {
2040
2039
  this.filters = [];
2040
+ this.selectedContextFilterChoices = [];
2041
+ this.valueFor = (tableName) => {
2042
+ let choice = this.selectedContextFilterChoices.find(f => f.table === tableName);
2043
+ if (!choice)
2044
+ throw new Error('ContextFilterChoice not found. Possible invalid configuration.');
2045
+ return choice.ref;
2046
+ };
2047
+ this.label = () => {
2048
+ let label = '';
2049
+ this.selectedContextFilterChoices.forEach((filter) => {
2050
+ label += filter.table + ': ' + filter.label + ' ';
2051
+ });
2052
+ return label;
2053
+ };
2054
+ }
2055
+ }
2056
+ TruContextFilters.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruContextFilters, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2057
+ TruContextFilters.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruContextFilters, providedIn: 'root' });
2058
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruContextFilters, decorators: [{
2059
+ type: Injectable,
2060
+ args: [{
2061
+ providedIn: 'root',
2062
+ }]
2063
+ }], ctorParameters: function () { return []; } });
2064
+
2065
+ class TruToolbarContextFilter {
2066
+ constructor(truContextFilters) {
2067
+ this.truContextFilters = truContextFilters;
2068
+ this.filters = [];
2069
+ this.filters = this.truContextFilters.filters;
2041
2070
  }
2042
2071
  ngOnInit() {
2043
2072
  }
2044
2073
  }
2045
- TruToolbarContextFilter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarContextFilter, deps: [], target: i0.ɵɵFactoryTarget.Component });
2046
- TruToolbarContextFilter.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.2", type: TruToolbarContextFilter, selector: "tru-toolbar-context-filter", inputs: { filters: "filters" }, 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$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$3.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$1.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 });
2074
+ TruToolbarContextFilter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarContextFilter, deps: [{ token: TruContextFilters }], target: i0.ɵɵFactoryTarget.Component });
2075
+ TruToolbarContextFilter.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.2", type: TruToolbarContextFilter, selector: "tru-toolbar-context-filter", 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$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$3.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$1.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 });
2047
2076
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarContextFilter, decorators: [{
2048
2077
  type: Component,
2049
2078
  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"] }]
2050
- }], ctorParameters: function () { return []; }, propDecorators: { filters: [{
2051
- type: Input
2052
- }] } });
2079
+ }], ctorParameters: function () { return [{ type: TruContextFilters }]; } });
2053
2080
 
2054
2081
  class TruToolbarContextFilterModule {
2055
2082
  }
@@ -2415,10 +2442,10 @@ class TruDesktopMenubar {
2415
2442
  }
2416
2443
  }
2417
2444
  TruDesktopMenubar.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopMenubar, deps: [], target: i0.ɵɵFactoryTarget.Component });
2418
- 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 *ngIf=\"filters.length\"></tru-toolbar-separator>\r\n <tru-toolbar-context-filter [filters]=\"filters\"></tru-toolbar-context-filter>\r\n </tru-toolbar>\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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: ["filters"] }], encapsulation: i0.ViewEncapsulation.None });
2445
+ 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 *ngIf=\"filters.length\"></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$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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" }], encapsulation: i0.ViewEncapsulation.None });
2419
2446
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruDesktopMenubar, decorators: [{
2420
2447
  type: Component,
2421
- 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 *ngIf=\"filters.length\"></tru-toolbar-separator>\r\n <tru-toolbar-context-filter [filters]=\"filters\"></tru-toolbar-context-filter>\r\n </tru-toolbar>\r\n</div>\r\n" }]
2448
+ 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 *ngIf=\"filters.length\"></tru-toolbar-separator>\r\n <tru-toolbar-context-filter></tru-toolbar-context-filter>\r\n </tru-toolbar>\r\n</div>\r\n" }]
2422
2449
  }], ctorParameters: function () { return []; }, propDecorators: { desktopCtrl: [{
2423
2450
  type: Input
2424
2451
  }] } });
@@ -4354,31 +4381,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImpor
4354
4381
  }]
4355
4382
  }] });
4356
4383
 
4357
- class TruContextFilters {
4358
- constructor() {
4359
- this.filters = [];
4360
- this.selectedContextFilterChoices = [];
4361
- this.valueFor = (tableName) => {
4362
- let choice = this.selectedContextFilterChoices.find(f => f.table === tableName);
4363
- if (!choice)
4364
- throw new Error('ContextFilterChoice not found. Possible invalid configuration.');
4365
- return choice.ref;
4366
- };
4367
- this.label = () => {
4368
- let label = '';
4369
- this.selectedContextFilterChoices.forEach((filter) => {
4370
- label += filter.table + ': ' + filter.label + ' ';
4371
- });
4372
- return label;
4373
- };
4374
- }
4375
- }
4376
- TruContextFilters.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruContextFilters, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4377
- TruContextFilters.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruContextFilters });
4378
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruContextFilters, decorators: [{
4379
- type: Injectable
4380
- }], ctorParameters: function () { return []; } });
4381
-
4382
4384
  class TruPredicateMap {
4383
4385
  constructor() { }
4384
4386
  }