@trudb/tru-common-lib 0.1.396 → 0.1.409

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.
@@ -9,4 +9,5 @@ export declare class TruTableConfigBase {
9
9
  canAdd: boolean;
10
10
  canDelete: boolean;
11
11
  isAssociatedWithMenuItem: boolean;
12
+ openOnStart: boolean;
12
13
  }
@@ -0,0 +1,6 @@
1
+ export declare abstract class TruWindowOpenOnStartSetting {
2
+ abstract name: string;
3
+ abstract label: string;
4
+ abstract checked: boolean;
5
+ abstract modified: boolean;
6
+ }
@@ -1,12 +1,14 @@
1
1
  import { OnInit } from '@angular/core';
2
2
  import { TruModelTableLookup } from '../../../../services/tru-model-table-lookup';
3
- import { TruChoice } from '../../../../classes/tru-choice';
3
+ import { TruUserPreferenceManager } from '../../../../services/tru-user-preference-manager';
4
+ import { TruWindowOpenOnStartSetting } from '../classes/tru-window-open-on-start-setting';
4
5
  import * as i0 from "@angular/core";
5
6
  export declare class TruAppWindowOpenOnStartupSetting implements OnInit {
7
+ private userPreferenceManager;
6
8
  private modelTableLookup;
7
- tableChoices: Array<TruChoice>;
9
+ settings: Array<TruWindowOpenOnStartSetting>;
8
10
  displayedColumns: string[];
9
- constructor(modelTableLookup: TruModelTableLookup);
11
+ constructor(userPreferenceManager: TruUserPreferenceManager, modelTableLookup: TruModelTableLookup);
10
12
  onRowClicked: (row: any) => void;
11
13
  ngOnInit(): void;
12
14
  static ɵfac: i0.ɵɵFactoryDeclaration<TruAppWindowOpenOnStartupSetting, never>;
@@ -1,10 +1,6 @@
1
- import { OnInit } from '@angular/core';
2
1
  import * as i0 from "@angular/core";
3
- export declare class TruAppWindowSettings implements OnInit {
4
- title: string;
5
- message: string;
2
+ export declare class TruAppWindowSettings {
6
3
  constructor();
7
- ngOnInit(): void;
8
4
  static ɵfac: i0.ɵɵFactoryDeclaration<TruAppWindowSettings, never>;
9
5
  static ɵcmp: i0.ɵɵComponentDeclaration<TruAppWindowSettings, "tru-app-window-settings", never, {}, {}, never, never, false, never>;
10
6
  }
@@ -0,0 +1,39 @@
1
+ import { TruAppEnvironment } from './tru-app-environment';
2
+ import { TruModelTypeLookup } from './tru-model-type-lookup';
3
+ import { TruUser } from './tru-user';
4
+ import * as i0 from "@angular/core";
5
+ export declare class TruUserPreferenceManager {
6
+ private modelTypeLookup;
7
+ private appEnvironment;
8
+ private user;
9
+ private globalDataContext;
10
+ constructor(modelTypeLookup: TruModelTypeLookup, appEnvironment: TruAppEnvironment, user: TruUser);
11
+ private setupQuery;
12
+ /**
13
+ * Queries for a preference for the current user. On success, completes
14
+ * promise with the value or undefined if none.
15
+ * @param {string} name - preference name
16
+ * @returns {promise}
17
+ */
18
+ get: (name: string) => any;
19
+ /**
20
+ * Queries for all preferences for the current user. On success, completes
21
+ * promise with an object loaded with the values indexed by name.
22
+ * @returns {promise}
23
+ */
24
+ getAll: () => Promise<void>;
25
+ /**
26
+ * Saves the value of a preference. On success, completes promise with no value.
27
+ * @param {string} name - preference name
28
+ * @param {string} value - value text
29
+ * @returns {promise}
30
+ */
31
+ set: (name: string, value: string) => Promise<void>;
32
+ /**
33
+ * Deletes a preference.
34
+ * @param {string} name - preference name
35
+ */
36
+ eliminate: (name: string) => Promise<void>;
37
+ static ɵfac: i0.ɵɵFactoryDeclaration<TruUserPreferenceManager, never>;
38
+ static ɵprov: i0.ɵɵInjectableDeclaration<TruUserPreferenceManager>;
39
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trudb/tru-common-lib",
3
- "version": "0.1.396",
3
+ "version": "0.1.409",
4
4
  "type": "module",
5
5
  "module": "fesm2022/trudb-tru-common-lib.mjs",
6
6
  "typings": "index.d.ts",