@omnia/fx 7.0.459-dev → 7.0.460-dev

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 (21) hide show
  1. package/internal-do-not-import-from-here/ux/commandpalette/commands/admin/TenantSettingsCommand.d.ts +2 -0
  2. package/internal-do-not-import-from-here/ux/commandpalette/commands/admin/index.d.ts +1 -0
  3. package/internal-do-not-import-from-here/ux/commandpalette/commands/content/BaconIpsumCommand.d.ts +2 -0
  4. package/internal-do-not-import-from-here/ux/commandpalette/commands/content/index.d.ts +1 -0
  5. package/internal-do-not-import-from-here/ux/commandpalette/commands/dns/AddDnsCommand.d.ts +2 -0
  6. package/internal-do-not-import-from-here/ux/commandpalette/commands/dns/index.d.ts +1 -0
  7. package/internal-do-not-import-from-here/ux/commandpalette/commands/index.d.ts +5 -1
  8. package/internal-do-not-import-from-here/ux/commandpalette/commands/serve/Models.d.ts +5 -0
  9. package/internal-do-not-import-from-here/ux/commandpalette/commands/serve/ServeCommand.d.ts +2 -0
  10. package/internal-do-not-import-from-here/ux/commandpalette/commands/serve/StopServeAllCommand.d.ts +2 -0
  11. package/internal-do-not-import-from-here/ux/commandpalette/commands/serve/StopServeCommand.d.ts +2 -0
  12. package/internal-do-not-import-from-here/ux/commandpalette/commands/serve/index.d.ts +4 -0
  13. package/internal-do-not-import-from-here/ux/commandpalette/commands/utils/ColorPickerCommand.d.ts +2 -0
  14. package/internal-do-not-import-from-here/ux/commandpalette/commands/utils/CreateGuidCommand.d.ts +2 -0
  15. package/internal-do-not-import-from-here/ux/commandpalette/commands/utils/index.d.ts +2 -0
  16. package/internal-do-not-import-from-here/ux/commandpalette/models/CommandPaletteListPickItem.d.ts +2 -2
  17. package/internal-do-not-import-from-here/ux/commandpalette/stores/CommandStore.d.ts +8 -3
  18. package/internal-do-not-import-from-here/ux/use/UseIndexedDb.d.ts +69 -0
  19. package/internal-do-not-import-from-here/ux/use/index.d.ts +1 -0
  20. package/package.json +2 -2
  21. package/internal-do-not-import-from-here/ux/commandpalette/commands/TestCommands.d.ts +0 -6
@@ -0,0 +1,2 @@
1
+ import { CommandDefinition } from "../../models/CommandDefinition";
2
+ export declare const adminTenantSettingsCommand: CommandDefinition;
@@ -0,0 +1 @@
1
+ export * from "./TenantSettingsCommand";
@@ -0,0 +1,2 @@
1
+ import { CommandDefinition } from "../../models/CommandDefinition";
2
+ export declare const baconIpsumCommand: CommandDefinition;
@@ -0,0 +1 @@
1
+ export * from "./BaconIpsumCommand";
@@ -0,0 +1,2 @@
1
+ import { CommandDefinition } from "../../models/CommandDefinition";
2
+ export declare const addDnsCommand: CommandDefinition;
@@ -0,0 +1 @@
1
+ export * from "./AddDnsCommand";
@@ -1 +1,5 @@
1
- export * from "./TestCommands";
1
+ export * from "./serve";
2
+ export * from "./dns";
3
+ export * from "./content";
4
+ export * from "./utils";
5
+ export * from "./admin";
@@ -0,0 +1,5 @@
1
+ import { GuidValue } from "@omnia/fx-models";
2
+ export interface ServeHistory {
3
+ url: string;
4
+ serviceId: GuidValue;
5
+ }
@@ -0,0 +1,2 @@
1
+ import { CommandDefinition } from "../../models";
2
+ export declare const serveCommand: CommandDefinition;
@@ -0,0 +1,2 @@
1
+ import { CommandDefinition } from "../../models";
2
+ export declare const stopServeAllCommand: CommandDefinition;
@@ -0,0 +1,2 @@
1
+ import { CommandDefinition } from "../../models";
2
+ export declare const stopServeCommand: CommandDefinition;
@@ -0,0 +1,4 @@
1
+ export * from "./ServeCommand";
2
+ export * from "./StopServeAllCommand";
3
+ export * from "./StopServeCommand";
4
+ export * from "./Models";
@@ -0,0 +1,2 @@
1
+ import { CommandDefinition } from "../../models/CommandDefinition";
2
+ export declare const colorPickerCommand: CommandDefinition;
@@ -0,0 +1,2 @@
1
+ import { CommandDefinition } from "../../models/CommandDefinition";
2
+ export declare const createGuidCommand: CommandDefinition;
@@ -0,0 +1,2 @@
1
+ export * from "./ColorPickerCommand";
2
+ export * from "./CreateGuidCommand";
@@ -1,6 +1,6 @@
1
1
  import { IIcon } from "@omnia/fx-models";
2
2
  import { FuzzySearchable } from "./FuzzySearchable";
3
- export interface CommandPaletteListPickItem extends FuzzySearchable {
3
+ export interface CommandPaletteListPickItem<T> extends FuzzySearchable {
4
4
  icon: IIcon;
5
- value?: any;
5
+ value?: T;
6
6
  }
@@ -6,15 +6,19 @@ export declare class CommandStore extends Store implements ICommandStore {
6
6
  private showInputBoxState;
7
7
  private showMessageState;
8
8
  private listPickerState;
9
+ private customComponentState;
10
+ private containerWidthState;
9
11
  constructor();
10
12
  /**
11
13
  * Implementation of getters
12
14
  */
13
15
  getters: {
14
16
  allCommands: (search: string) => CommandDefinition[];
15
- currentListPickItems: (search: string) => CommandPaletteListPickItem[];
17
+ currentListPickItems: (search: string) => CommandPaletteListPickItem<any>[];
16
18
  inputBox: () => CommandPaletteInputBox;
17
19
  message: () => CommandPaletteMessage;
20
+ component: () => unknown;
21
+ width: () => number;
18
22
  };
19
23
  /**
20
24
  * Implementation of mutations
@@ -22,13 +26,14 @@ export declare class CommandStore extends Store implements ICommandStore {
22
26
  mutations: {
23
27
  registerCommand: import("@omnia/fx/stores").StoreMutation<(command: CommandDefinition) => void, (command: CommandDefinition) => import("@omnia/fx-models").IMessageBusSubscriptionHandler>;
24
28
  setInputBoxResult: import("@omnia/fx/stores").StoreMutation<(value: string) => void, (value: string) => import("@omnia/fx-models").IMessageBusSubscriptionHandler>;
25
- setListPickerResult: import("@omnia/fx/stores").StoreMutation<(value: CommandPaletteListPickItem) => void, (value: CommandPaletteListPickItem) => import("@omnia/fx-models").IMessageBusSubscriptionHandler>;
29
+ setListPickerResult: import("@omnia/fx/stores").StoreMutation<(<T>(value: CommandPaletteListPickItem<T>) => void), (value: CommandPaletteListPickItem<unknown>) => import("@omnia/fx-models").IMessageBusSubscriptionHandler>;
26
30
  showMessage: import("@omnia/fx/stores").StoreMutation<(message: CommandPaletteMessage) => void, (message: CommandPaletteMessage) => import("@omnia/fx-models").IMessageBusSubscriptionHandler>;
27
31
  resetState: import("@omnia/fx/stores").StoreMutation<() => void, () => import("@omnia/fx-models").IMessageBusSubscriptionHandler>;
28
32
  };
29
33
  actions: {
30
34
  showInputBox: import("@omnia/fx/stores").StoreAction<unknown, (title: string) => void, (result: CommandPaletteInputBox, title: string) => void, (failureReason: any, title: string) => void, (title: string) => Promise<CommandPaletteInputBox>>;
31
- showListPicker: import("@omnia/fx/stores").StoreAction<unknown, (pickerItems: CommandPaletteListPickItem[]) => void, (result: CommandPaletteListPickItem, pickerItems: CommandPaletteListPickItem[]) => void, (failureReason: any, pickerItems: CommandPaletteListPickItem[]) => void, (pickerItems: Array<CommandPaletteListPickItem>) => Promise<CommandPaletteListPickItem>>;
35
+ showListPicker: import("@omnia/fx/stores").StoreAction<unknown, (pickerItems: CommandPaletteListPickItem<unknown>[]) => void, (result: CommandPaletteListPickItem<unknown>, pickerItems: CommandPaletteListPickItem<unknown>[]) => void, (failureReason: any, pickerItems: CommandPaletteListPickItem<unknown>[]) => void, <T>(pickerItems: CommandPaletteListPickItem<T>[]) => Promise<CommandPaletteListPickItem<T>>>;
36
+ showComponent: import("@omnia/fx/stores").StoreAction<unknown, (component: unknown, widht: number) => void, (result: void, component: unknown, widht: number) => void, (failureReason: any, component: unknown, widht: number) => void, (component: unknown, widht: number) => Promise<void>>;
32
37
  };
33
38
  onActivated(): void;
34
39
  onDisposing(): void;
@@ -0,0 +1,69 @@
1
+ import { Future } from "@omnia/fx-models";
2
+ import { Ref } from "vue";
3
+ /**
4
+ * Async api for working with indexedDB. Remember to await the useIndexedDb since its async
5
+ * @export
6
+ * @param {string} name
7
+ * @param {string} table
8
+ * @return {*} {Future<IndexedDbApi>}
9
+ */
10
+ export declare function useIndexedDb(name: string, table: string): Future<IndexedDbApi>;
11
+ /**
12
+ *
13
+ *
14
+ * @export
15
+ * @interface IndexedDbApi
16
+ */
17
+ export interface IndexedDbApi {
18
+ /**
19
+ * Current database instance
20
+ * @type {(IDBDatabase | null)}
21
+ * @memberof IndexedDbApi
22
+ */
23
+ currentDb: IDBDatabase | null;
24
+ /**
25
+ * Current database name
26
+ * @type {Ref<string>}
27
+ * @memberof IndexedDbApi
28
+ */
29
+ currentDbName: Ref<string>;
30
+ /**
31
+ * Current database version
32
+ * @type {Ref<number>}
33
+ * @memberof IndexedDbApi
34
+ */
35
+ currentDbVersion: Ref<number>;
36
+ /**
37
+ * Gets the data by key from the database
38
+ * @memberof IndexedDbApi
39
+ */
40
+ get: <T>(key: IDBValidKey) => Promise<T>;
41
+ /**
42
+ * Gets all the data from the database
43
+ * @memberof IndexedDbApi
44
+ */
45
+ getAll: <T>() => Promise<Map<IDBValidKey, T>>;
46
+ /**
47
+ * Adds the key to the database if the key exists it will throw exception
48
+ * use upsert for add or update operations
49
+ * @memberof IndexedDbApi
50
+ */
51
+ add: <T>(key: IDBValidKey, data: T) => Promise<unknown>;
52
+ /**
53
+ * Does an add or update depending on if the key exists
54
+ * @memberof IndexedDbApi
55
+ */
56
+ upsert: <T>(key: IDBValidKey, data: T) => Promise<unknown>;
57
+ /**
58
+ * Removes the key from the database
59
+ * @memberof IndexedDbApi
60
+ */
61
+ remove: (key: IDBValidKey) => Promise<unknown>;
62
+ /**
63
+ * Closes the database connection and dispsoses the instance from the cache
64
+ * Note if you have multiple tables opened on the same database it will close all instances
65
+ * this means you have to call useIndexedDb again after this
66
+ * @memberof IndexedDbApi
67
+ */
68
+ close: () => void;
69
+ }
@@ -9,3 +9,4 @@ export * from "./UseValidation";
9
9
  export * from "./UseEventHook";
10
10
  export * from "./UseClone";
11
11
  export * from "./UseKeyboard";
12
+ export * from "./UseIndexedDb";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@omnia/fx",
3
3
  "license": "MIT",
4
- "version": "7.0.459-dev",
4
+ "version": "7.0.460-dev",
5
5
  "description": "Provide Omnia Fx typings and tooling for clientside Omnia development.",
6
6
  "scripts": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1",
@@ -20,7 +20,7 @@
20
20
  ],
21
21
  "author": "Precio Fishbone",
22
22
  "dependencies": {
23
- "@omnia/fx-models": "7.0.459-dev",
23
+ "@omnia/fx-models": "7.0.460-dev",
24
24
  "@microsoft/signalr": "6.0.1",
25
25
  "broadcast-channel": "4.8.0",
26
26
  "dayjs": "1.10.7",
@@ -1,6 +0,0 @@
1
- import { CommandDefinition } from "../models/CommandDefinition";
2
- export declare const serveCommand: CommandDefinition;
3
- export declare const addDnsCommand: CommandDefinition;
4
- export declare const adminTenantSettingsCommand: CommandDefinition;
5
- export declare const createGuidCommand: CommandDefinition;
6
- export declare const baconIpsumCommand: CommandDefinition;