@trudb/tru-common-lib 0.0.197 → 0.0.199

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,30 @@ 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
+ constructor(table, label, ref) {
448
+ this.table = table;
449
+ this.label = label;
450
+ this.ref = ref;
451
+ }
452
+ }
453
+
430
454
  class TruFormulaEval {
431
455
  static isString(s) {
432
456
  return typeof s === 'string';
@@ -4330,6 +4354,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImpor
4330
4354
  }]
4331
4355
  }] });
4332
4356
 
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
+
4333
4382
  class TruPredicateMap {
4334
4383
  constructor() { }
4335
4384
  }
@@ -4700,5 +4749,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImpor
4700
4749
  * Generated bundle index. Do not edit.
4701
4750
  */
4702
4751
 
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 };
4752
+ 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
4753
  //# sourceMappingURL=trudb-tru-common-lib.mjs.map