@trudb/tru-common-lib 0.0.196 → 0.0.198

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.
@@ -427,6 +427,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImpor
427
427
  type: Injectable
428
428
  }] });
429
429
 
430
+ class TruContextFilter {
431
+ constructor() {
432
+ this.tooltip = undefined;
433
+ this.choices = [];
434
+ this.selectedChoice = undefined;
435
+ this.identify = (index, choice) => {
436
+ return choice.ref;
437
+ };
438
+ this.comparer = (o1, o2) => {
439
+ return o1 && o2 ? o1.label === o2.label : o2 === o2;
440
+ };
441
+ this.onChange = (choice) => {
442
+ };
443
+ }
444
+ }
445
+
446
+ class TruContextFilterChoice {
447
+ }
448
+
430
449
  class TruFormulaEval {
431
450
  static isString(s) {
432
451
  return typeof s === 'string';
@@ -2019,10 +2038,10 @@ class TruToolbarContextFilter {
2019
2038
  }
2020
2039
  }
2021
2040
  TruToolbarContextFilter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarContextFilter, deps: [], target: i0.ɵɵFactoryTarget.Component });
2022
- 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 });
2041
+ 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 });
2023
2042
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruToolbarContextFilter, decorators: [{
2024
2043
  type: Component,
2025
- 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"] }]
2044
+ 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"] }]
2026
2045
  }], ctorParameters: function () { return []; }, propDecorators: { filters: [{
2027
2046
  type: Input
2028
2047
  }] } });
@@ -4330,6 +4349,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImpor
4330
4349
  }]
4331
4350
  }] });
4332
4351
 
4352
+ class TruContextFilters {
4353
+ constructor() {
4354
+ this.filters = [];
4355
+ this.selectedContextFilterChoices = [];
4356
+ this.valueFor = (tableName) => {
4357
+ let choice = this.selectedContextFilterChoices.find(f => f.table === tableName);
4358
+ if (!choice)
4359
+ throw new Error('ContextFilterChoice not found. Possible invalid configuration.');
4360
+ return choice.ref;
4361
+ };
4362
+ this.label = () => {
4363
+ let label = '';
4364
+ this.selectedContextFilterChoices.forEach((filter) => {
4365
+ label += filter.table + ': ' + filter.label + ' ';
4366
+ });
4367
+ return label;
4368
+ };
4369
+ }
4370
+ }
4371
+ TruContextFilters.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruContextFilters, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4372
+ TruContextFilters.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruContextFilters });
4373
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: TruContextFilters, decorators: [{
4374
+ type: Injectable
4375
+ }], ctorParameters: function () { return []; } });
4376
+
4333
4377
  class TruPredicateMap {
4334
4378
  constructor() { }
4335
4379
  }
@@ -4700,5 +4744,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImpor
4700
4744
  * Generated bundle index. Do not edit.
4701
4745
  */
4702
4746
 
4703
- export { DetailViewModule, TruAppEnvironment, TruBreezeContext, TruBreezeContextFactory, TruBreezeMetadataProvider, TruColumn, TruColumnModule, TruCommonModule, TruComponentConfigBase, TruComponentLookup, TruConfirmDialog, TruConfirmDialogConfig, TruConfirmDialogModule, TruControlComponentConfigBase, TruDataContext, TruDataGrid, TruDataGridModule, TruDataGridTypes, TruDesktop, TruDesktopManager, TruDesktopModule, TruDetailViewBase, TruEntityAccessor, TruEntityBase, TruExportDialog, TruExportDialogConfig, TruExportDialogModule, TruForm, TruFormModule, TruFormulaEval, TruGroupBox, TruGroupBoxModule, TruPredicate, TruPredicateMap, TruPropertyConfigBase, TruPropertyConfigCloudFile, TruPropertyConfigDecimal, TruPropertyConfigForeignKey, TruPropertyConfigInteger, TruPropertyConfigPassword, TruPropertyConfigPercentage, TruPropertyConfigScientific, TruPropertyConfigText, TruPropertyConfigTextChoices, TruPropertyConfigUsaAddress, TruPropertyConfigZipCode, TruQueryPredicateManager, TruRow, TruRowModule, TruSearchComponentBase, TruSearchComponentConfigBase, TruSearchConfigBase, TruSearchIconModule, TruSearchPanelPositionManager, TruSearchPanelPositionManagerModule, TruSearchViewBase, TruSearchViewBaseModule, TruSearchViewControlEventHandler, TruSearchViewEventHandler, TruSort, TruTableConfigBase, TruTextManager, TruToolbar, TruToolbarButton, TruToolbarButtonModule, TruToolbarContextFilter, TruToolbarContextFilterModule, TruToolbarDropdown, TruToolbarDropdownModule, TruToolbarMenu, TruToolbarMenuModule, TruToolbarModule, TruToolbarSeparator, TruToolbarSeparatorModule, TruToolbarText, TruToolbarTextModule, TruUiNotification, TruUser, TruWindowActionEventHandler, TruWindowAddViewEventArgs, TruWindowEventArgs, TruWindowEventHandler };
4747
+ export { DetailViewModule, TruAppEnvironment, TruBreezeContext, TruBreezeContextFactory, TruBreezeMetadataProvider, TruColumn, TruColumnModule, TruCommonModule, TruComponentConfigBase, TruComponentLookup, TruConfirmDialog, TruConfirmDialogConfig, TruConfirmDialogModule, TruContextFilter, TruContextFilterChoice, TruContextFilters, TruControlComponentConfigBase, TruDataContext, TruDataGrid, TruDataGridModule, TruDataGridTypes, TruDesktop, TruDesktopManager, TruDesktopModule, TruDetailViewBase, TruEntityAccessor, TruEntityBase, TruExportDialog, TruExportDialogConfig, TruExportDialogModule, TruForm, TruFormModule, TruFormulaEval, TruGroupBox, TruGroupBoxModule, TruPredicate, TruPredicateMap, TruPropertyConfigBase, TruPropertyConfigCloudFile, TruPropertyConfigDecimal, TruPropertyConfigForeignKey, TruPropertyConfigInteger, TruPropertyConfigPassword, TruPropertyConfigPercentage, TruPropertyConfigScientific, TruPropertyConfigText, TruPropertyConfigTextChoices, TruPropertyConfigUsaAddress, TruPropertyConfigZipCode, TruQueryPredicateManager, TruRow, TruRowModule, TruSearchComponentBase, TruSearchComponentConfigBase, TruSearchConfigBase, TruSearchIconModule, TruSearchPanelPositionManager, TruSearchPanelPositionManagerModule, TruSearchViewBase, TruSearchViewBaseModule, TruSearchViewControlEventHandler, TruSearchViewEventHandler, TruSort, TruTableConfigBase, TruTextManager, TruToolbar, TruToolbarButton, TruToolbarButtonModule, TruToolbarContextFilter, TruToolbarContextFilterModule, TruToolbarDropdown, TruToolbarDropdownModule, TruToolbarMenu, TruToolbarMenuModule, TruToolbarModule, TruToolbarSeparator, TruToolbarSeparatorModule, TruToolbarText, TruToolbarTextModule, TruUiNotification, TruUser, TruWindowActionEventHandler, TruWindowAddViewEventArgs, TruWindowEventArgs, TruWindowEventHandler };
4704
4748
  //# sourceMappingURL=trudb-tru-common-lib.mjs.map