@trudb/tru-common-lib 0.0.176 → 0.0.179

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 (101) hide show
  1. package/esm2020/lib/base-classes/tru-search-component-base.mjs +1 -1
  2. package/esm2020/lib/components/confirm-dialog/tru-confirm-dialog-module.mjs +19 -0
  3. package/esm2020/lib/components/confirm-dialog/tru-confirm-dialog.mjs +36 -0
  4. package/esm2020/lib/components/desktop/directives/resizable/tru-desktop-resizable-module.mjs +19 -0
  5. package/esm2020/lib/components/desktop/directives/resizable/tru-desktop-resizable.mjs +109 -0
  6. package/esm2020/lib/components/desktop/menubar/tru-desktop-menubar-module.mjs +44 -0
  7. package/esm2020/lib/components/desktop/menubar/tru-desktop-menubar.mjs +29 -0
  8. package/esm2020/lib/components/desktop/services/tru-desktop-service.mjs +136 -0
  9. package/esm2020/lib/components/desktop/statusbar/tru-desktop-statusbar-module.mjs +19 -0
  10. package/esm2020/lib/components/desktop/statusbar/tru-desktop-statusbar.mjs +18 -0
  11. package/esm2020/lib/components/desktop/taskbar/tru-desktop-taskbar-module.mjs +21 -0
  12. package/esm2020/lib/components/desktop/taskbar/tru-desktop-taskbar.mjs +40 -0
  13. package/esm2020/lib/components/desktop/tru-desktop-module.mjs +72 -0
  14. package/esm2020/lib/components/desktop/tru-desktop.mjs +703 -0
  15. package/esm2020/lib/components/desktop/view/tru-desktop-view-module.mjs +19 -0
  16. package/esm2020/lib/components/desktop/view/tru-desktop-view.mjs +25 -0
  17. package/esm2020/lib/components/desktop/viewport/tru-desktop-viewport-module.mjs +20 -0
  18. package/esm2020/lib/components/desktop/viewport/tru-desktop-viewport.mjs +109 -0
  19. package/esm2020/lib/components/desktop/window/tru-desktop-window-module.mjs +58 -0
  20. package/esm2020/lib/components/desktop/window/tru-desktop-window.mjs +449 -0
  21. package/esm2020/lib/components/export-dialog/tru-export-dialog-module.mjs +20 -0
  22. package/esm2020/lib/components/export-dialog/tru-export-dialog.mjs +57 -0
  23. package/esm2020/lib/components/toolbar/button/tru-toolbar-button-module.mjs +32 -0
  24. package/esm2020/lib/components/toolbar/button/tru-toolbar-button.mjs +35 -0
  25. package/esm2020/lib/components/toolbar/context-filter/tru-toolbar-context-filter-module.mjs +40 -0
  26. package/esm2020/lib/components/toolbar/context-filter/tru-toolbar-context-filter.mjs +24 -0
  27. package/esm2020/lib/components/toolbar/dropdown/tru-toolbar-dropdown-module.mjs +32 -0
  28. package/esm2020/lib/components/toolbar/dropdown/tru-toolbar-dropdown.mjs +42 -0
  29. package/esm2020/lib/components/toolbar/menu/menu-button/tru-toolbar-menu-button-module.mjs +19 -0
  30. package/esm2020/lib/components/toolbar/menu/menu-button/tru-toolbar-menu-button.mjs +16 -0
  31. package/esm2020/lib/components/toolbar/menu/menu-item/tru-toolbar-menu-item-module.mjs +19 -0
  32. package/esm2020/lib/components/toolbar/menu/menu-item/tru-toolbar-menu-item.mjs +26 -0
  33. package/esm2020/lib/components/toolbar/menu/tru-toolbar-menu-module.mjs +32 -0
  34. package/esm2020/lib/components/toolbar/menu/tru-toolbar-menu.mjs +33 -0
  35. package/esm2020/lib/components/toolbar/separator/tru-toolbar-separator-module.mjs +19 -0
  36. package/esm2020/lib/components/toolbar/separator/tru-toolbar-separator.mjs +12 -0
  37. package/esm2020/lib/components/toolbar/text/tru-toolbar-text-module.mjs +32 -0
  38. package/esm2020/lib/components/toolbar/text/tru-toolbar-text.mjs +28 -0
  39. package/esm2020/lib/components/toolbar/tru-toolbar-module.mjs +48 -0
  40. package/esm2020/lib/components/toolbar/tru-toolbar.mjs +21 -0
  41. package/esm2020/lib/material.module.mjs +192 -0
  42. package/esm2020/lib/services/tru-app-environment.mjs +75 -0
  43. package/esm2020/lib/services/tru-breeze-context-factory.mjs +71 -0
  44. package/esm2020/lib/services/tru-data-context.mjs +207 -0
  45. package/esm2020/lib/services/tru-entity-accessor.mjs +188 -0
  46. package/esm2020/lib/services/tru-search-group-event-handler.mjs +1 -1
  47. package/esm2020/lib/services/tru-ui-notification.mjs +90 -0
  48. package/esm2020/lib/tru-common-module.mjs +1 -1
  49. package/esm2020/public-api.mjs +12 -1
  50. package/fesm2015/trudb-tru-common-lib.mjs +2993 -65
  51. package/fesm2015/trudb-tru-common-lib.mjs.map +1 -1
  52. package/fesm2020/trudb-tru-common-lib.mjs +2987 -65
  53. package/fesm2020/trudb-tru-common-lib.mjs.map +1 -1
  54. package/lib/base-classes/tru-search-component-base.d.ts +1 -1
  55. package/lib/components/confirm-dialog/tru-confirm-dialog-module.d.ts +9 -0
  56. package/lib/components/confirm-dialog/tru-confirm-dialog.d.ts +20 -0
  57. package/lib/components/desktop/directives/resizable/tru-desktop-resizable-module.d.ts +9 -0
  58. package/lib/components/desktop/directives/resizable/tru-desktop-resizable.d.ts +32 -0
  59. package/lib/components/desktop/menubar/tru-desktop-menubar-module.d.ts +14 -0
  60. package/lib/components/desktop/menubar/tru-desktop-menubar.d.ts +12 -0
  61. package/lib/components/desktop/services/tru-desktop-service.d.ts +110 -0
  62. package/lib/components/desktop/statusbar/tru-desktop-statusbar-module.d.ts +9 -0
  63. package/lib/components/desktop/statusbar/tru-desktop-statusbar.d.ts +10 -0
  64. package/lib/components/desktop/taskbar/tru-desktop-taskbar-module.d.ts +11 -0
  65. package/lib/components/desktop/taskbar/tru-desktop-taskbar.d.ts +15 -0
  66. package/lib/components/desktop/tru-desktop-module.d.ts +20 -0
  67. package/lib/components/desktop/tru-desktop.d.ts +334 -0
  68. package/lib/components/desktop/view/tru-desktop-view-module.d.ts +9 -0
  69. package/lib/components/desktop/view/tru-desktop-view.d.ts +13 -0
  70. package/lib/components/desktop/viewport/tru-desktop-viewport-module.d.ts +10 -0
  71. package/lib/components/desktop/viewport/tru-desktop-viewport.d.ts +46 -0
  72. package/lib/components/desktop/window/tru-desktop-window-module.d.ts +17 -0
  73. package/lib/components/desktop/window/tru-desktop-window.d.ts +184 -0
  74. package/lib/components/export-dialog/tru-export-dialog-module.d.ts +10 -0
  75. package/lib/components/export-dialog/tru-export-dialog.d.ts +26 -0
  76. package/lib/components/toolbar/button/tru-toolbar-button-module.d.ts +11 -0
  77. package/lib/components/toolbar/button/tru-toolbar-button.d.ts +14 -0
  78. package/lib/components/toolbar/context-filter/tru-toolbar-context-filter-module.d.ts +13 -0
  79. package/lib/components/toolbar/context-filter/tru-toolbar-context-filter.d.ts +11 -0
  80. package/lib/components/toolbar/dropdown/tru-toolbar-dropdown-module.d.ts +11 -0
  81. package/lib/components/toolbar/dropdown/tru-toolbar-dropdown.d.ts +18 -0
  82. package/lib/components/toolbar/menu/menu-button/tru-toolbar-menu-button-module.d.ts +9 -0
  83. package/lib/components/toolbar/menu/menu-button/tru-toolbar-menu-button.d.ts +7 -0
  84. package/lib/components/toolbar/menu/menu-item/tru-toolbar-menu-item-module.d.ts +9 -0
  85. package/lib/components/toolbar/menu/menu-item/tru-toolbar-menu-item.d.ts +8 -0
  86. package/lib/components/toolbar/menu/tru-toolbar-menu-module.d.ts +11 -0
  87. package/lib/components/toolbar/menu/tru-toolbar-menu.d.ts +10 -0
  88. package/lib/components/toolbar/separator/tru-toolbar-separator-module.d.ts +9 -0
  89. package/lib/components/toolbar/separator/tru-toolbar-separator.d.ts +6 -0
  90. package/lib/components/toolbar/text/tru-toolbar-text-module.d.ts +11 -0
  91. package/lib/components/toolbar/text/tru-toolbar-text.d.ts +12 -0
  92. package/lib/components/toolbar/tru-toolbar-module.d.ts +15 -0
  93. package/lib/components/toolbar/tru-toolbar.d.ts +13 -0
  94. package/lib/material.module.d.ts +50 -0
  95. package/lib/services/tru-app-environment.d.ts +48 -0
  96. package/lib/services/tru-breeze-context-factory.d.ts +30 -0
  97. package/lib/services/tru-data-context.d.ts +32 -0
  98. package/lib/services/tru-entity-accessor.d.ts +41 -0
  99. package/lib/services/tru-ui-notification.d.ts +35 -0
  100. package/package.json +1 -1
  101. package/public-api.d.ts +8 -0
@@ -0,0 +1,32 @@
1
+ import { Entity, EntityType } from "breeze-client";
2
+ import { TruBreezeContextFactory, TruBreezeContext } from './tru-breeze-context-factory';
3
+ import { TruEntityAccessor } from './tru-entity-accessor';
4
+ import { TruUiNotification } from './tru-ui-notification';
5
+ import { TruAppEnvironment } from './tru-app-environment';
6
+ import * as i0 from "@angular/core";
7
+ export declare class TruDataContext {
8
+ private breezeContextFactory;
9
+ private appEnvironment;
10
+ private entityAccessor;
11
+ private uiNotification;
12
+ private _breezeContext;
13
+ private _pendingDeleteEntities;
14
+ private _pendingCascadeDeleteEntities;
15
+ constructor(breezeContextFactory: TruBreezeContextFactory, appEnvironment: TruAppEnvironment, entityAccessor: TruEntityAccessor, uiNotification: TruUiNotification);
16
+ private getValidationErrors;
17
+ private formatValidationErrors;
18
+ private findCachedCascadeDeleteDescendants;
19
+ private markCachedDescendantsForDelete;
20
+ private markForDelete;
21
+ get breezeContext(): TruBreezeContext;
22
+ get entityManager(): import("breeze-client").EntityManager;
23
+ hasChanges: (entityTypes?: Array<EntityType>) => Entity[];
24
+ entityAccess: () => TruEntityAccessor;
25
+ exportCahce: () => void;
26
+ save: (entities?: Array<Entity> | null, deleteOperation?: boolean) => Promise<void>;
27
+ revert: () => void;
28
+ revertWithoutPrompt: () => void;
29
+ delete: (entities: Array<Entity>, confirmMsg: string, onSuccess?: Function | undefined) => void;
30
+ static ɵfac: i0.ɵɵFactoryDeclaration<TruDataContext, never>;
31
+ static ɵprov: i0.ɵɵInjectableDeclaration<TruDataContext>;
32
+ }
@@ -0,0 +1,41 @@
1
+ import { Entity } from "breeze-client";
2
+ import { TruEntityBase } from '../base-classes/tru-entity-base';
3
+ import { TruUiNotification } from "./tru-ui-notification";
4
+ import { TruDataContext } from "./tru-data-context";
5
+ import { HttpClient } from "@angular/common/http";
6
+ import { Observable } from 'rxjs';
7
+ import * as i0 from "@angular/core";
8
+ export declare class TruEntityAccessor {
9
+ private http;
10
+ private uiNotification;
11
+ private _breezeContext;
12
+ private _entityManager;
13
+ private _maxRecordCount;
14
+ constructor(http: HttpClient, uiNotification: TruUiNotification);
15
+ private getQueryServiceName;
16
+ private warnIfMaxRecords;
17
+ private formatQueryChoices;
18
+ set context(dataContext: TruDataContext);
19
+ set maxRecordCount(maxRecordCount: number);
20
+ add: (entity: typeof TruEntityBase, contextFilters?: any) => Entity;
21
+ search: (entity: typeof TruEntityBase, setupQuery: any | null, expands: [
22
+ ] | null, global: boolean) => Observable<Entity[]>;
23
+ searchCacheOnly: (entity: typeof TruEntityBase, setupQuery?: any | null, expands?: [
24
+ ] | null) => Observable<Entity[]>;
25
+ searchCacheOnlySynchronously: (entity: typeof TruEntityBase, setupQuery?: any | null, expands?: [
26
+ ] | null) => Array<any>;
27
+ searchQueryChoices: (entity: typeof TruEntityBase, setupQuery?: any | null, hid?: string | null, goToServer?: boolean) => Observable<{
28
+ label: string;
29
+ value: {
30
+ $: number;
31
+ };
32
+ }[]>;
33
+ getByRefCacheOnly: (entity: typeof TruEntityBase, ref: number | null | undefined, includeDeleted?: boolean) => any;
34
+ export: (entity: typeof TruEntityBase, gridSpec: string, setupQuery: any | null, entityRefs: string | null, options: any) => void;
35
+ private formatAsUrlParameters;
36
+ private downloadFromUrl;
37
+ private saveDownloadedFile;
38
+ private extractFilenameFromContentDisposition;
39
+ static ɵfac: i0.ɵɵFactoryDeclaration<TruEntityAccessor, never>;
40
+ static ɵprov: i0.ɵɵInjectableDeclaration<TruEntityAccessor>;
41
+ }
@@ -0,0 +1,35 @@
1
+ import { MatDialog } from '@angular/material/dialog';
2
+ import { ToastrService } from 'ngx-toastr';
3
+ import * as i0 from "@angular/core";
4
+ export declare class TruUiNotification {
5
+ private toastr;
6
+ private dialog;
7
+ private _toastr;
8
+ private _dialog;
9
+ constructor(toastr: ToastrService, dialog: MatDialog);
10
+ showMessage: (popup: any, log: (message: string) => void, prefix: string, message: string, detail?: Array<string> | null) => void;
11
+ /**
12
+ * Shows as toast and logs to server an error message and optional detail information.
13
+ * @param {string} message - Displayed as toast.
14
+ * @param {string} [detail] - Logged to console.
15
+ */
16
+ error: (message: string, detail?: Array<string> | null) => void;
17
+ /**
18
+ * Same as error() but for info message.
19
+ */
20
+ info: (message: string, detail?: Array<string> | null) => void;
21
+ /**
22
+ * Same as error() but for success message.
23
+ */
24
+ success: (message: string, detail?: Array<string> | null) => void;
25
+ /**
26
+ * Same as error() but for warning message.
27
+ */
28
+ warning: (message: string, detail?: Array<string> | null) => void;
29
+ log: (message: string) => void;
30
+ showErrorDialog: (title: string, message: string) => void;
31
+ showExportDialog: () => Promise<boolean>;
32
+ confirm: (title: string, message: string) => Promise<boolean>;
33
+ static ɵfac: i0.ɵɵFactoryDeclaration<TruUiNotification, never>;
34
+ static ɵprov: i0.ɵɵInjectableDeclaration<TruUiNotification>;
35
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trudb/tru-common-lib",
3
- "version": "0.0.176",
3
+ "version": "0.0.179",
4
4
  "type": "module",
5
5
  "peerDependencies": {},
6
6
  "dependencies": {
package/public-api.d.ts CHANGED
@@ -6,6 +6,14 @@ export * from "./lib/classes/tru-predicate";
6
6
  export * from "./lib/classes/tru-query-predicate-manager";
7
7
  export * from "./lib/classes/tru-window-event";
8
8
  export * from "./lib/classes/tru-window-add-view-event";
9
+ export * from "./lib/components/confirm-dialog/tru-confirm-dialog";
10
+ export * from "./lib/components/confirm-dialog/tru-confirm-dialog-module";
11
+ export * from "./lib/components/desktop/tru-desktop";
12
+ export * from "./lib/components/desktop/tru-desktop-module";
13
+ export * from "./lib/components/export-dialog/tru-export-dialog";
14
+ export * from "./lib/components/export-dialog/tru-export-dialog-module";
15
+ export * from "./lib/components/toolbar/tru-toolbar";
16
+ export * from "./lib/components/toolbar/tru-toolbar-module";
9
17
  export * from './lib/services/tru-search-group-event-handler';
10
18
  export * from './lib/services/tru-component-lookup';
11
19
  export * from './lib/services/tru-window-action-event-handler';