@trudb/tru-common-lib 0.0.182 → 0.0.184

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 (96) hide show
  1. package/esm2020/lib/base-classes/tru-table-config-base.mjs +12 -0
  2. package/esm2020/lib/classes/tru-formula-eval.mjs +156 -0
  3. package/esm2020/lib/classes/tru-property-config-cloud-file.mjs +5 -0
  4. package/esm2020/lib/classes/tru-property-config-decimal.mjs +11 -0
  5. package/esm2020/lib/classes/tru-property-config-foreign-key.mjs +10 -0
  6. package/esm2020/lib/classes/tru-property-config-integer.mjs +9 -0
  7. package/esm2020/lib/classes/tru-property-config-password.mjs +8 -0
  8. package/esm2020/lib/classes/tru-property-config-percentage.mjs +9 -0
  9. package/esm2020/lib/classes/tru-property-config-scientific.mjs +9 -0
  10. package/esm2020/lib/classes/tru-property-config-text-choices.mjs +8 -0
  11. package/esm2020/lib/classes/tru-property-config-text.mjs +10 -0
  12. package/esm2020/lib/classes/tru-property-config-usa-address.mjs +8 -0
  13. package/esm2020/lib/classes/tru-property-config-zip-code.mjs +8 -0
  14. package/esm2020/lib/components/data-grid/classes/tru-data-grid-config.mjs +2 -0
  15. package/esm2020/lib/components/data-grid/enums/tru-data-grid-types.mjs +7 -0
  16. package/esm2020/lib/components/data-grid/tru-data-grid-module.mjs +67 -0
  17. package/esm2020/lib/components/data-grid/tru-data-grid.mjs +253 -0
  18. package/esm2020/lib/components/desktop/services/tru-window-action-event-handler.mjs +27 -0
  19. package/esm2020/lib/components/desktop/services/tru-window-add-view-event-args.mjs +22 -0
  20. package/esm2020/lib/components/desktop/services/tru-window-event-args.mjs +25 -0
  21. package/esm2020/lib/components/desktop/services/tru-window-event-handler.mjs +37 -0
  22. package/esm2020/lib/components/desktop/tru-desktop.mjs +2 -2
  23. package/esm2020/lib/components/desktop/window/tru-desktop-window.mjs +3 -3
  24. package/esm2020/lib/components/layout/column/tru-column-module.mjs +19 -0
  25. package/esm2020/lib/components/layout/column/tru-column.mjs +12 -0
  26. package/esm2020/lib/components/layout/form/tru-form-module.mjs +19 -0
  27. package/esm2020/lib/components/layout/form/tru-form.mjs +27 -0
  28. package/esm2020/lib/components/layout/group-box/tru-group-box-module.mjs +19 -0
  29. package/esm2020/lib/components/layout/group-box/tru-group-box.mjs +12 -0
  30. package/esm2020/lib/components/layout/row/tru-row-module.mjs +19 -0
  31. package/esm2020/lib/components/layout/row/tru-row.mjs +12 -0
  32. package/esm2020/lib/components/toolbar/classes/tru-toolbar-dropdown-option.mjs +2 -0
  33. package/esm2020/lib/components/toolbar/dropdown/tru-toolbar-dropdown.mjs +1 -1
  34. package/esm2020/lib/components/toolbar/tru-toolbar.mjs +1 -1
  35. package/esm2020/lib/directives/search-panel-position-manager/tru-search-panel-position-manager-module.mjs +19 -0
  36. package/esm2020/lib/directives/search-panel-position-manager/tru-search-panel-position-manager.mjs +151 -0
  37. package/esm2020/lib/event-handlers/tru-search-group-event-handler.mjs +41 -0
  38. package/esm2020/lib/event-handlers/tru-search-view-event-handler.mjs +20 -0
  39. package/esm2020/lib/services/tru-breeze-context-factory.mjs +7 -5
  40. package/esm2020/lib/services/tru-breeze-metadata-provider.mjs +22 -0
  41. package/esm2020/lib/services/tru-entity-accessor.mjs +8 -5
  42. package/esm2020/lib/services/tru-sort.mjs +114 -0
  43. package/esm2020/public-api.mjs +69 -34
  44. package/fesm2015/trudb-tru-common-lib.mjs +2814 -1835
  45. package/fesm2015/trudb-tru-common-lib.mjs.map +1 -1
  46. package/fesm2020/trudb-tru-common-lib.mjs +2815 -1838
  47. package/fesm2020/trudb-tru-common-lib.mjs.map +1 -1
  48. package/lib/base-classes/tru-table-config-base.d.ts +10 -0
  49. package/lib/classes/tru-formula-eval.d.ts +31 -0
  50. package/lib/classes/tru-property-config-cloud-file.d.ts +4 -0
  51. package/lib/classes/tru-property-config-decimal.d.ts +8 -0
  52. package/lib/classes/tru-property-config-foreign-key.d.ts +7 -0
  53. package/lib/classes/tru-property-config-integer.d.ts +6 -0
  54. package/lib/classes/tru-property-config-password.d.ts +5 -0
  55. package/lib/classes/tru-property-config-percentage.d.ts +6 -0
  56. package/lib/classes/tru-property-config-scientific.d.ts +6 -0
  57. package/lib/classes/tru-property-config-text-choices.d.ts +5 -0
  58. package/lib/classes/tru-property-config-text.d.ts +7 -0
  59. package/lib/classes/tru-property-config-usa-address.d.ts +5 -0
  60. package/lib/classes/tru-property-config-zip-code.d.ts +5 -0
  61. package/lib/components/data-grid/classes/tru-data-grid-config.d.ts +7 -0
  62. package/lib/components/data-grid/enums/tru-data-grid-types.d.ts +5 -0
  63. package/lib/components/data-grid/tru-data-grid-module.d.ts +15 -0
  64. package/lib/components/data-grid/tru-data-grid.d.ts +55 -0
  65. package/lib/{services → components/desktop/services}/tru-window-action-event-handler.d.ts +0 -0
  66. package/lib/{classes/tru-window-add-view-event.d.ts → components/desktop/services/tru-window-add-view-event-args.d.ts} +3 -3
  67. package/lib/{classes/tru-window-event.d.ts → components/desktop/services/tru-window-event-args.d.ts} +3 -3
  68. package/lib/{services → components/desktop/services}/tru-window-event-handler.d.ts +6 -6
  69. package/lib/components/desktop/tru-desktop.d.ts +1 -1
  70. package/lib/components/desktop/window/tru-desktop-window.d.ts +1 -1
  71. package/lib/components/layout/column/tru-column-module.d.ts +9 -0
  72. package/lib/components/layout/column/tru-column.d.ts +6 -0
  73. package/lib/components/layout/form/tru-form-module.d.ts +9 -0
  74. package/lib/components/layout/form/tru-form.d.ts +10 -0
  75. package/lib/components/layout/group-box/tru-group-box-module.d.ts +9 -0
  76. package/lib/components/layout/group-box/tru-group-box.d.ts +6 -0
  77. package/lib/components/layout/row/tru-row-module.d.ts +9 -0
  78. package/lib/components/layout/row/tru-row.d.ts +6 -0
  79. package/lib/components/toolbar/classes/tru-toolbar-dropdown-option.d.ts +4 -0
  80. package/lib/components/toolbar/dropdown/tru-toolbar-dropdown.d.ts +1 -1
  81. package/lib/components/toolbar/tru-toolbar.d.ts +0 -4
  82. package/lib/directives/search-panel-position-manager/tru-search-panel-position-manager-module.d.ts +9 -0
  83. package/lib/directives/search-panel-position-manager/tru-search-panel-position-manager.d.ts +40 -0
  84. package/lib/{services → event-handlers}/tru-search-group-event-handler.d.ts +0 -0
  85. package/lib/event-handlers/tru-search-view-event-handler.d.ts +8 -0
  86. package/lib/services/tru-breeze-context-factory.d.ts +4 -2
  87. package/lib/services/tru-breeze-metadata-provider.d.ts +9 -0
  88. package/lib/services/tru-entity-accessor.d.ts +3 -1
  89. package/lib/services/tru-sort.d.ts +56 -0
  90. package/package.json +1 -1
  91. package/public-api.d.ts +62 -33
  92. package/esm2020/lib/classes/tru-window-add-view-event.mjs +0 -22
  93. package/esm2020/lib/classes/tru-window-event.mjs +0 -25
  94. package/esm2020/lib/services/tru-search-group-event-handler.mjs +0 -41
  95. package/esm2020/lib/services/tru-window-action-event-handler.mjs +0 -27
  96. package/esm2020/lib/services/tru-window-event-handler.mjs +0 -37
@@ -0,0 +1,10 @@
1
+ export declare class TruTableConfigBase {
2
+ constructor();
3
+ Label: string | undefined;
4
+ PluralLabel: string | undefined;
5
+ PluralName: string | undefined;
6
+ CanDisplay: boolean;
7
+ CanEdit: boolean;
8
+ CanAdd: boolean;
9
+ CanDelete: boolean;
10
+ }
@@ -0,0 +1,31 @@
1
+ export declare class FormulaEval {
2
+ static isString(s: any): boolean;
3
+ static isDate(v: any): boolean;
4
+ static toValue(value: any): any;
5
+ static toString(value: any): any;
6
+ static toDouble(value: any): number;
7
+ static toInteger(value: any): number;
8
+ static toBoolean(value: any): number | boolean;
9
+ static toDate(value: any): any;
10
+ statictoDateTime(value: any): any;
11
+ /**
12
+ * Exposed for testing.
13
+ */
14
+ static _calculate(f: any, left: any, right: any): any;
15
+ static _calculateDate(left: any, right: any, add: any): number | Date | null;
16
+ static add(left: any, right: any): any;
17
+ static subtract(left: any, right: any): any;
18
+ static multiply(left: any, right: any): any;
19
+ static divide(left: any, right: any): any;
20
+ static power(left: any, right: any): any;
21
+ static concatenate(left: any, right: any): any;
22
+ static equal(left: any, right: any): boolean;
23
+ static notEqual(left: any, right: any): boolean;
24
+ static compareResultForMismatchedParams: any;
25
+ static lessThan(left: any, right: any): boolean;
26
+ static greaterThan(left: any, right: any): any;
27
+ static lessThanOrEqual(left: any, right: any): boolean;
28
+ static greaterThanOrEqual(left: any, right: any): any;
29
+ static negate(operand: any): number;
30
+ static percent(operand: any): number;
31
+ }
@@ -0,0 +1,4 @@
1
+ import { TruPropertyConfigForeignKey } from './tru-property-config-foreign-key';
2
+ export declare class TruPropertyConfigCloudFile extends TruPropertyConfigForeignKey {
3
+ constructor();
4
+ }
@@ -0,0 +1,8 @@
1
+ import { TruPropertyConfigBase } from '../base-classes/tru-property-config-base';
2
+ export declare class TruPropertyConfigDecimal extends TruPropertyConfigBase {
3
+ constructor();
4
+ DecimalPlaces: number | undefined;
5
+ TotalDigits: number | undefined;
6
+ MinimumValue: number | undefined;
7
+ MaximumValue: number | undefined;
8
+ }
@@ -0,0 +1,7 @@
1
+ import { TruPropertyConfigBase } from '../base-classes/tru-property-config-base';
2
+ export declare class TruPropertyConfigForeignKey extends TruPropertyConfigBase {
3
+ constructor();
4
+ Table: string | undefined;
5
+ ForeignTableName: string | undefined;
6
+ ChoicesQuery: string | undefined;
7
+ }
@@ -0,0 +1,6 @@
1
+ import { TruPropertyConfigBase } from '../base-classes/tru-property-config-base';
2
+ export declare class TruPropertyConfigInteger extends TruPropertyConfigBase {
3
+ constructor();
4
+ MinimumValue: number | undefined;
5
+ MaximumValue: number | undefined;
6
+ }
@@ -0,0 +1,5 @@
1
+ import { TruPropertyConfigText } from './tru-property-config-text';
2
+ export declare class TruPropertyConfigPassword extends TruPropertyConfigText {
3
+ constructor();
4
+ EncryptionType: string | undefined;
5
+ }
@@ -0,0 +1,6 @@
1
+ import { TruPropertyConfigBase } from '../base-classes/tru-property-config-base';
2
+ export declare class TruPropertyConfigPercentage extends TruPropertyConfigBase {
3
+ constructor();
4
+ MinimumValue: number | undefined;
5
+ MaximumValue: number | undefined;
6
+ }
@@ -0,0 +1,6 @@
1
+ import { TruPropertyConfigBase } from '../base-classes/tru-property-config-base';
2
+ export declare class TruPropertyConfigScientific extends TruPropertyConfigBase {
3
+ constructor();
4
+ MinimumValue: number | undefined;
5
+ MaximumValue: number | undefined;
6
+ }
@@ -0,0 +1,5 @@
1
+ import { TruPropertyConfigText } from './tru-property-config-text';
2
+ export declare class TruPropertyConfigTextChoices extends TruPropertyConfigText {
3
+ constructor();
4
+ Choices: any;
5
+ }
@@ -0,0 +1,7 @@
1
+ import { TruPropertyConfigBase } from '../base-classes/tru-property-config-base';
2
+ export declare class TruPropertyConfigText extends TruPropertyConfigBase {
3
+ constructor();
4
+ MaxLength: number | undefined;
5
+ MinLength: number | undefined;
6
+ Unbounded: boolean | undefined;
7
+ }
@@ -0,0 +1,5 @@
1
+ import { TruPropertyConfigBase } from '../base-classes/tru-property-config-base';
2
+ export declare class TruPropertyConfigUsaAddress extends TruPropertyConfigBase {
3
+ constructor();
4
+ RequireZipPlusFour: boolean | undefined;
5
+ }
@@ -0,0 +1,5 @@
1
+ import { TruPropertyConfigBase } from '../base-classes/tru-property-config-base';
2
+ export declare class TruPropertyConfigZipCode extends TruPropertyConfigBase {
3
+ constructor();
4
+ RequireZipPlusFour: boolean | undefined;
5
+ }
@@ -0,0 +1,7 @@
1
+ export interface ITruDataGridConfig {
2
+ tableName: string;
3
+ tablePluralName: string;
4
+ tablePluralLabel: string;
5
+ resultConfigs: Array<any>;
6
+ rowHeaderDoubleClicked: (data: any) => {};
7
+ }
@@ -0,0 +1,5 @@
1
+ export declare enum TruDataGridTypes {
2
+ Search = 0,
3
+ Detail = 1,
4
+ DetailManyToMany = 2
5
+ }
@@ -0,0 +1,15 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./tru-data-grid";
3
+ import * as i2 from "@angular/common";
4
+ import * as i3 from "@angular/forms";
5
+ import * as i4 from "@angular/material/icon";
6
+ import * as i5 from "ag-grid-angular";
7
+ import * as i6 from "../toolbar/tru-toolbar-module";
8
+ import * as i7 from "../toolbar/button/tru-toolbar-button-module";
9
+ import * as i8 from "../toolbar/dropdown/tru-toolbar-dropdown-module";
10
+ import * as i9 from "../toolbar/separator/tru-toolbar-separator-module";
11
+ export declare class TruDataGridModule {
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<TruDataGridModule, never>;
13
+ static ɵmod: i0.ɵɵNgModuleDeclaration<TruDataGridModule, [typeof i1.TruDataGrid], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i4.MatIconModule, typeof i5.AgGridModule, typeof i6.TruToolbarModule, typeof i7.TruToolbarButtonModule, typeof i8.TruToolbarDropdownModule, typeof i9.TruToolbarSeparatorModule], [typeof i1.TruDataGrid]>;
14
+ static ɵinj: i0.ɵɵInjectorDeclaration<TruDataGridModule>;
15
+ }
@@ -0,0 +1,55 @@
1
+ import { OnInit, OnChanges, AfterViewInit, SimpleChanges } from '@angular/core';
2
+ import { TruAppEnvironment } from '../../services/tru-app-environment';
3
+ import { TruSearchViewEventHandler } from '../../event-handlers/tru-search-view-event-handler';
4
+ import { TruDataContext } from '../../services/tru-data-context';
5
+ import { TruUiNotification } from '../../services/tru-ui-notification';
6
+ import { ITruDataGridConfig } from './classes/tru-data-grid-config';
7
+ import { TruDataGridTypes } from './enums/tru-data-grid-types';
8
+ import { ITruToolbarDropdownOption } from '../toolbar/classes/tru-toolbar-dropdown-option';
9
+ import * as i0 from "@angular/core";
10
+ export declare class TruDataGrid implements OnInit, OnChanges, AfterViewInit {
11
+ private dataContext;
12
+ private appEnvironment;
13
+ private searchViewEventHandler;
14
+ private uiNotification;
15
+ config: ITruDataGridConfig;
16
+ entity: any;
17
+ TruDataGridTypes: typeof TruDataGridTypes;
18
+ columnDefs: any;
19
+ rowData: any;
20
+ resultConfigs: Array<any>;
21
+ selectedResultConfig: any;
22
+ unassociatedChoices: Array<any>;
23
+ selectedUnassociatedChoice: any;
24
+ loadingTemplate: string;
25
+ noRowsTemplate: string;
26
+ gridType: TruDataGridTypes;
27
+ unsavedEntities: Array<any>;
28
+ loadedEntities: Array<any>;
29
+ latestSetupQuery: any;
30
+ gridOptions: any;
31
+ constructor(dataContext: TruDataContext, appEnvironment: TruAppEnvironment, searchViewEventHandler: TruSearchViewEventHandler, uiNotification: TruUiNotification);
32
+ private enhanceRowDataForEntity;
33
+ private setNoRowsTemplate;
34
+ private subscribeTo;
35
+ private loadGridData;
36
+ private loadManyToManyGridData;
37
+ private exportData;
38
+ onRowDataChanged: (data: any) => void;
39
+ onCellDoubleClicked: (gridConfig: any) => void;
40
+ onSearch: (setupQuery: any) => void;
41
+ onResultConfigChanged: (option: ITruToolbarDropdownOption | null) => void;
42
+ onUnassociatedChoiceChanged: (option: ITruToolbarDropdownOption | null) => void;
43
+ canAdd: () => boolean;
44
+ onAdd: () => void;
45
+ onDelete: () => void;
46
+ onKeep: () => void;
47
+ onRemove: () => void;
48
+ onSetDefaultResultView: () => void;
49
+ onExport: () => void;
50
+ ngOnInit(): void;
51
+ ngOnChanges(changes: SimpleChanges): void;
52
+ ngAfterViewInit(): void;
53
+ static ɵfac: i0.ɵɵFactoryDeclaration<TruDataGrid, never>;
54
+ static ɵcmp: i0.ɵɵComponentDeclaration<TruDataGrid, "tru-data-grid", never, { "config": "config"; "entity": "entity"; }, {}, never, never, false, never>;
55
+ }
@@ -1,5 +1,5 @@
1
1
  import * as i0 from "@angular/core";
2
- export declare class TruWindowAddViewEvent {
2
+ export declare class TruWindowAddViewEventArgs {
3
3
  active: boolean | null;
4
4
  entities: any | null;
5
5
  entityIndex: number;
@@ -7,6 +7,6 @@ export declare class TruWindowAddViewEvent {
7
7
  isEditing: boolean;
8
8
  isInvalid: boolean;
9
9
  componentName: string;
10
- static ɵfac: i0.ɵɵFactoryDeclaration<TruWindowAddViewEvent, never>;
11
- static ɵprov: i0.ɵɵInjectableDeclaration<TruWindowAddViewEvent>;
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<TruWindowAddViewEventArgs, never>;
11
+ static ɵprov: i0.ɵɵInjectableDeclaration<TruWindowAddViewEventArgs>;
12
12
  }
@@ -1,5 +1,5 @@
1
1
  import * as i0 from "@angular/core";
2
- export declare class TruWindowEvent {
2
+ export declare class TruWindowEventArgs {
3
3
  title: string;
4
4
  tableName: string;
5
5
  tablePluralName: string;
@@ -10,6 +10,6 @@ export declare class TruWindowEvent {
10
10
  height: string;
11
11
  width: string;
12
12
  views: Array<object>;
13
- static ɵfac: i0.ɵɵFactoryDeclaration<TruWindowEvent, never>;
14
- static ɵprov: i0.ɵɵInjectableDeclaration<TruWindowEvent>;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<TruWindowEventArgs, never>;
14
+ static ɵprov: i0.ɵɵInjectableDeclaration<TruWindowEventArgs>;
15
15
  }
@@ -1,15 +1,15 @@
1
- import { TruWindowAddViewEvent } from '../classes/tru-window-add-view-event';
1
+ import { TruWindowAddViewEventArgs } from './tru-window-add-view-event-args';
2
2
  import { Subject } from 'rxjs';
3
- import { TruWindowEvent } from '../classes/tru-window-event';
3
+ import { TruWindowEventArgs } from './tru-window-event-args';
4
4
  import * as i0 from "@angular/core";
5
5
  export declare class TruWindowEventHandler {
6
6
  private open$;
7
7
  private addView$;
8
8
  private removeForwadViews$;
9
- onOpen(): Subject<TruWindowEvent>;
10
- open(windowEvent: TruWindowEvent): void;
11
- onAddView(): Subject<TruWindowAddViewEvent>;
12
- addView(windowAddViewEvent: TruWindowAddViewEvent): void;
9
+ onOpen(): Subject<TruWindowEventArgs>;
10
+ open(windowEvent: TruWindowEventArgs): void;
11
+ onAddView(): Subject<TruWindowAddViewEventArgs>;
12
+ addView(windowAddViewEvent: TruWindowAddViewEventArgs): void;
13
13
  onRemoveForwardViews(): Subject<null>;
14
14
  removeForwardViews(): void;
15
15
  static ɵfac: i0.ɵɵFactoryDeclaration<TruWindowEventHandler, never>;
@@ -1,5 +1,5 @@
1
1
  import { OnInit } from '@angular/core';
2
- import { TruWindowEventHandler } from '../../services/tru-window-event-handler';
2
+ import { TruWindowEventHandler } from './services/tru-window-event-handler';
3
3
  import { TruDesktopService } from './services/tru-desktop-service';
4
4
  import * as i0 from "@angular/core";
5
5
  export declare class TruDesktop implements OnInit {
@@ -1,6 +1,6 @@
1
1
  import { OnInit, AfterViewInit, ElementRef, ChangeDetectorRef } from '@angular/core';
2
2
  import { TruDataContext } from '../../../services/tru-data-context';
3
- import { TruWindowEventHandler } from '../../../services/tru-window-event-handler';
3
+ import { TruWindowEventHandler } from '../services/tru-window-event-handler';
4
4
  import * as i0 from "@angular/core";
5
5
  export declare class TruDesktopWindow implements OnInit, AfterViewInit {
6
6
  private dataContext;
@@ -0,0 +1,9 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./tru-column";
3
+ import * as i2 from "@angular/common";
4
+ import * as i3 from "@angular/forms";
5
+ export declare class TruColumnModule {
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<TruColumnModule, never>;
7
+ static ɵmod: i0.ɵɵNgModuleDeclaration<TruColumnModule, [typeof i1.TruColumn], [typeof i2.CommonModule, typeof i3.FormsModule], [typeof i1.TruColumn]>;
8
+ static ɵinj: i0.ɵɵInjectorDeclaration<TruColumnModule>;
9
+ }
@@ -0,0 +1,6 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class TruColumn {
3
+ constructor();
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<TruColumn, never>;
5
+ static ɵcmp: i0.ɵɵComponentDeclaration<TruColumn, "tru-column", never, {}, {}, never, ["*"], false, never>;
6
+ }
@@ -0,0 +1,9 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./tru-form";
3
+ import * as i2 from "@angular/common";
4
+ import * as i3 from "@angular/forms";
5
+ export declare class TruFormModule {
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<TruFormModule, never>;
7
+ static ɵmod: i0.ɵɵNgModuleDeclaration<TruFormModule, [typeof i1.TruForm], [typeof i2.CommonModule, typeof i3.FormsModule], [typeof i1.TruForm]>;
8
+ static ɵinj: i0.ɵɵInjectorDeclaration<TruFormModule>;
9
+ }
@@ -0,0 +1,10 @@
1
+ import { AfterViewInit, ElementRef } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class TruForm implements AfterViewInit {
4
+ private element;
5
+ constructor(element: ElementRef);
6
+ ngAfterViewInit(): void;
7
+ private updateLayout;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<TruForm, never>;
9
+ static ɵcmp: i0.ɵɵComponentDeclaration<TruForm, "tru-form", never, {}, {}, never, ["*"], false, never>;
10
+ }
@@ -0,0 +1,9 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./tru-group-box";
3
+ import * as i2 from "@angular/common";
4
+ import * as i3 from "@angular/forms";
5
+ export declare class TruGroupBoxModule {
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<TruGroupBoxModule, never>;
7
+ static ɵmod: i0.ɵɵNgModuleDeclaration<TruGroupBoxModule, [typeof i1.TruGroupBox], [typeof i2.CommonModule, typeof i3.FormsModule], [typeof i1.TruGroupBox]>;
8
+ static ɵinj: i0.ɵɵInjectorDeclaration<TruGroupBoxModule>;
9
+ }
@@ -0,0 +1,6 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class TruGroupBox {
3
+ constructor();
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<TruGroupBox, never>;
5
+ static ɵcmp: i0.ɵɵComponentDeclaration<TruGroupBox, "tru-group-box", never, {}, {}, never, ["*"], false, never>;
6
+ }
@@ -0,0 +1,9 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./tru-row";
3
+ import * as i2 from "@angular/common";
4
+ import * as i3 from "@angular/forms";
5
+ export declare class TruRowModule {
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<TruRowModule, never>;
7
+ static ɵmod: i0.ɵɵNgModuleDeclaration<TruRowModule, [typeof i1.TruRow], [typeof i2.CommonModule, typeof i3.FormsModule], [typeof i1.TruRow]>;
8
+ static ɵinj: i0.ɵɵInjectorDeclaration<TruRowModule>;
9
+ }
@@ -0,0 +1,6 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class TruRow {
3
+ constructor();
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<TruRow, never>;
5
+ static ɵcmp: i0.ɵɵComponentDeclaration<TruRow, "tru-row", never, {}, {}, never, ["*"], false, never>;
6
+ }
@@ -0,0 +1,4 @@
1
+ export interface ITruToolbarDropdownOption {
2
+ label: string;
3
+ value: any;
4
+ }
@@ -1,6 +1,6 @@
1
1
  import { AfterViewInit, EventEmitter, OnInit } from '@angular/core';
2
2
  import { MatSelectChange } from '@angular/material/select';
3
- import { ITruToolbarDropdownOption } from '../tru-toolbar';
3
+ import { ITruToolbarDropdownOption } from '../classes/tru-toolbar-dropdown-option';
4
4
  import * as i0 from "@angular/core";
5
5
  export declare class TruToolbarDropdown implements OnInit, AfterViewInit {
6
6
  config: [] | null;
@@ -1,9 +1,5 @@
1
1
  import { OnInit } from '@angular/core';
2
2
  import * as i0 from "@angular/core";
3
- export interface ITruToolbarDropdownOption {
4
- label: string;
5
- value: any;
6
- }
7
3
  export declare class TruToolbar implements OnInit {
8
4
  config: [] | null;
9
5
  constructor();
@@ -0,0 +1,9 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./tru-search-panel-position-manager";
3
+ import * as i2 from "@angular/common";
4
+ import * as i3 from "@angular/forms";
5
+ export declare class TruSearchPanelPositionManagerModule {
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<TruSearchPanelPositionManagerModule, never>;
7
+ static ɵmod: i0.ɵɵNgModuleDeclaration<TruSearchPanelPositionManagerModule, [typeof i1.TruSearchPanelPositionManager], [typeof i2.CommonModule, typeof i3.FormsModule], [typeof i1.TruSearchPanelPositionManager]>;
8
+ static ɵinj: i0.ɵɵInjectorDeclaration<TruSearchPanelPositionManagerModule>;
9
+ }
@@ -0,0 +1,40 @@
1
+ import { ElementRef, Renderer2 } from "@angular/core";
2
+ import * as i0 from "@angular/core";
3
+ export declare class TruSearchPanelPositionManager {
4
+ private el;
5
+ private renderer;
6
+ config: any;
7
+ private searchViewPortal;
8
+ private tab;
9
+ private dropZones;
10
+ private dragHandles;
11
+ private currentWidth;
12
+ private currentMinWidth;
13
+ private mouseOffsetX;
14
+ private lastMouseX;
15
+ private dragHandle;
16
+ private listeners;
17
+ private mousemoveListener;
18
+ private mouseupListener;
19
+ constructor(el: ElementRef, renderer: Renderer2);
20
+ ngAfterViewInit(): void;
21
+ private addTabEventListeners;
22
+ private addDropzoneEventListeners;
23
+ private addDragHandleEventListeners;
24
+ private addPointerEvents;
25
+ private removePointerEvents;
26
+ private addMouseoverDropzoneStyles;
27
+ private removeMouseoverDropzoneStyles;
28
+ private dragStart;
29
+ private dragEnd;
30
+ private dragOver;
31
+ private dragLeave;
32
+ private drop;
33
+ private mousedown;
34
+ private mouseMove;
35
+ private mouseUp;
36
+ private updateSide;
37
+ ngOnDestroy(): void;
38
+ static ɵfac: i0.ɵɵFactoryDeclaration<TruSearchPanelPositionManager, never>;
39
+ static ɵdir: i0.ɵɵDirectiveDeclaration<TruSearchPanelPositionManager, "[truSearchPanelPositionManager]", never, { "config": "config"; }, {}, never, never, false, never>;
40
+ }
@@ -0,0 +1,8 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class TruSearchViewEventHandler {
3
+ private search$;
4
+ search(query: any): void;
5
+ onSearch(): import("rxjs").Observable<any>;
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<TruSearchViewEventHandler, never>;
7
+ static ɵprov: i0.ɵɵInjectableDeclaration<TruSearchViewEventHandler>;
8
+ }
@@ -1,18 +1,20 @@
1
1
  import { EntityManager, EntityQuery, MetadataStore } from 'breeze-client';
2
+ import { TruBreezeMetadataProvider } from './tru-breeze-metadata-provider';
2
3
  import * as i0 from "@angular/core";
3
4
  export declare class TruBreezeContextFactory {
5
+ private breezeMetadataProvider;
4
6
  /**
5
7
  * Maximum number of records to return from a query.
6
8
  * @return {number}
7
9
  */
8
10
  private servicePath;
9
11
  private metadataStore;
10
- constructor();
12
+ constructor(breezeMetadataProvider: TruBreezeMetadataProvider);
11
13
  /**
12
14
  * Note: hasServerMetadata is false to prevent the automatic query of the metadata from the server.
13
15
  */
14
16
  private breezeDataService;
15
- setUpMetadata: (metadata: any) => MetadataStore;
17
+ setUpMetadata: (metadata: object) => MetadataStore;
16
18
  /**
17
19
  * Returns a new data context object.
18
20
  * @return {object} - Breeze Manager
@@ -0,0 +1,9 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class TruBreezeMetadataProvider {
3
+ private _metadata;
4
+ constructor();
5
+ get metadata(): object;
6
+ set metadata(json: object);
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<TruBreezeMetadataProvider, never>;
8
+ static ɵprov: i0.ɵɵInjectableDeclaration<TruBreezeMetadataProvider>;
9
+ }
@@ -4,14 +4,16 @@ import { TruUiNotification } from "./tru-ui-notification";
4
4
  import { TruDataContext } from "./tru-data-context";
5
5
  import { HttpClient } from "@angular/common/http";
6
6
  import { Observable } from 'rxjs';
7
+ import { TruAppEnvironment } from "./tru-app-environment";
7
8
  import * as i0 from "@angular/core";
8
9
  export declare class TruEntityAccessor {
9
10
  private http;
11
+ private appEnvironment;
10
12
  private uiNotification;
11
13
  private _breezeContext;
12
14
  private _entityManager;
13
15
  private _maxRecordCount;
14
- constructor(http: HttpClient, uiNotification: TruUiNotification);
16
+ constructor(http: HttpClient, appEnvironment: TruAppEnvironment, uiNotification: TruUiNotification);
15
17
  private getQueryServiceName;
16
18
  private warnIfMaxRecords;
17
19
  private formatQueryChoices;
@@ -0,0 +1,56 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class TruSort {
3
+ constructor();
4
+ /**
5
+ * @callback differenceCallback
6
+ * @param {*} valueA - any value except for undefined or null
7
+ * @param {*} valueB - any value except for undefined or null
8
+ * @return {number} - <0 for a sorts before b, 0 for a sorts same as b, >0 for a sorts after b.
9
+ */
10
+ /**
11
+ * A generalized comparison algorithm for use with a sort function. Ensures that null
12
+ * sorts before non-null. Delegates to difference() for both non-null values.
13
+ * @param {*} valueA - any value except for undefined
14
+ * @param {*} valueB - any value except for undefined
15
+ * @param {differenceCallback} difference - same result meaning as for this function.
16
+ * @return {number} - <0 for a sorts before b, 0 for a sorts same as b, >0 for a sorts after b.
17
+ */
18
+ numCompare: (valueA: any, valueB: any, difference: any) => any;
19
+ compare: (valueA: any, valueB: any, difference: any, inverted?: boolean) => any;
20
+ /**
21
+ * Sort comparison for unnamed, number field control config objects.
22
+ * @param {object} a,b - control config
23
+ * @returns {number}
24
+ */
25
+ numberCompare: (a: any, b: any) => any;
26
+ /**
27
+ * Alphabetical sort comparison for unnamed, string field control config objects.
28
+ * @param {object} a,b - control config
29
+ * @returns {number}
30
+ */
31
+ textCompare: (a: any, b: any) => any;
32
+ dateCompare: (a: any, b: any) => any;
33
+ /**
34
+ * @callback filterCallback
35
+ * @param {object} a,b - Control config
36
+ * @returns {string}
37
+ */
38
+ /**
39
+ * Alphabetical sort comparison for strings. Both input values are control config
40
+ * objects and passed to a filter function to obtain a value for comparison.
41
+ * @param {object} a,b - control config
42
+ * @param {filterCallback} filter - filter function
43
+ * @returns {number}
44
+ */
45
+ filteredTextCompare: (a: any, b: any, filter: any) => any;
46
+ /**
47
+ * Alphabetical sort comparison for strings. Both input values are control config
48
+ * objects and passed to a filter function to obtain a value for comparison.
49
+ * @param {object} entity - a breeze $entity
50
+ * @param {array} pathSegments - a list of strings that make up a navigation path
51
+ * @returns {value}
52
+ */
53
+ getValueFromSortPath: (entity: any, pathSegments: any) => any;
54
+ static ɵfac: i0.ɵɵFactoryDeclaration<TruSort, never>;
55
+ static ɵprov: i0.ɵɵInjectableDeclaration<TruSort>;
56
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trudb/tru-common-lib",
3
- "version": "0.0.182",
3
+ "version": "0.0.184",
4
4
  "type": "module",
5
5
  "peerDependencies": {},
6
6
  "dependencies": {