@omnia/fx-models 8.0.135-dev → 8.0.136-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.
- package/internal-do-not-import-from-here/shared/events/CreateEventHook.d.ts +5 -0
- package/internal-do-not-import-from-here/shared/events/index.d.ts +1 -0
- package/internal-do-not-import-from-here/shared/index.d.ts +1 -0
- package/internal-do-not-import-from-here/shared/models/EventHook.d.ts +10 -0
- package/internal-do-not-import-from-here/shared/models/EventHook.js +2 -0
- package/internal-do-not-import-from-here/shared/models/hub/activities/ActorActivity.d.ts +8 -0
- package/internal-do-not-import-from-here/shared/models/index.d.ts +1 -0
- package/internal-do-not-import-from-here/shared/models/index.js +1 -0
- package/internal-do-not-import-from-here/shared/models/theming/ThemeDefinitionV2.d.ts +6 -0
- package/internal-do-not-import-from-here/shared/models/velcron/VelcronDefinition.d.ts +2 -2
- package/internal-do-not-import-from-here/shared/models/velcron/VelcronEvents.d.ts +2 -2
- package/internal-do-not-import-from-here/shared/services/DefineService.d.ts +2 -1
- package/internal-do-not-import-from-here/shared/services/ThemingService.d.ts +41 -4
- package/internal-do-not-import-from-here/shared/services/tmpUseIndexDb.d.ts +1 -0
- package/internal-do-not-import-from-here/velcron/core/models/VelcronDefinitions.d.ts +5 -2
- package/oxide/OxideTypeDefinitions.d.ts +1 -1
- package/oxide/OxideTypeDefinitions.js +1 -1
- package/package.json +1 -1
- package/ux/ThemingApi.d.ts +1 -7
@@ -0,0 +1 @@
|
|
1
|
+
export * from "./CreateEventHook";
|
@@ -0,0 +1,10 @@
|
|
1
|
+
export type EventHookOn<T = any> = (fn: (param: T) => void) => {
|
2
|
+
off: () => void;
|
3
|
+
};
|
4
|
+
export type EventHookOff<T = any> = (fn: (param: T) => void) => void;
|
5
|
+
export type EventHookTrigger<T = any> = (param: T) => void;
|
6
|
+
export interface EventHook<T = any> {
|
7
|
+
on: EventHookOn<T>;
|
8
|
+
off: EventHookOff<T>;
|
9
|
+
trigger: EventHookTrigger<T>;
|
10
|
+
}
|
@@ -14,6 +14,14 @@ export declare enum ActorActivityCategory {
|
|
14
14
|
snoozed = 3,
|
15
15
|
bookmarked = 4
|
16
16
|
}
|
17
|
+
export interface ActivitySettings {
|
18
|
+
category: ActorActivityCategory;
|
19
|
+
social: ActivitySocialSettings;
|
20
|
+
}
|
21
|
+
export interface ActivitySocialSettings {
|
22
|
+
comments: boolean;
|
23
|
+
reactions: boolean;
|
24
|
+
}
|
17
25
|
export interface ActorActivityBase {
|
18
26
|
activityId: ActivityId;
|
19
27
|
status: ActorActivityStatus;
|
@@ -23,3 +23,4 @@ tslib_1.__exportStar(require("./hub"), exports);
|
|
23
23
|
tslib_1.__exportStar(require("./velcron"), exports);
|
24
24
|
tslib_1.__exportStar(require("./DependencyInjection"), exports);
|
25
25
|
tslib_1.__exportStar(require("./Messaging"), exports);
|
26
|
+
tslib_1.__exportStar(require("./EventHook"), exports);
|
@@ -71,6 +71,12 @@ export interface ThemeDefinitionV2 extends ThemeDefinitionReference {
|
|
71
71
|
spacing: SpacingBlueprints;
|
72
72
|
components: ComponentBlueprints;
|
73
73
|
}
|
74
|
+
export interface ITemplateRegistration<TTemplateType = any> {
|
75
|
+
id: Guid;
|
76
|
+
template: TTemplateType;
|
77
|
+
hidden?: boolean;
|
78
|
+
custom?: boolean;
|
79
|
+
}
|
74
80
|
export type ColorSchemaType = keyof typeof ColorSchemaTypes;
|
75
81
|
export declare enum ColorSchemaTypes {
|
76
82
|
primary = "primary",
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { DynamicState } from "../DynamicState";
|
2
|
-
import { VelcronEvent, VelcronOnEditModeEvent, VelcronOnLoadEvent,
|
2
|
+
import { VelcronEvent, VelcronOnEditModeEvent, VelcronOnLoadEvent, VelcronOnSavingEvent } from "./VelcronEvents";
|
3
3
|
/**
|
4
4
|
* Velcron definition base
|
5
5
|
*/
|
@@ -73,7 +73,7 @@ export interface VelcronAppDefinition<TState extends DynamicState = DynamicState
|
|
73
73
|
version?: string;
|
74
74
|
name?: string;
|
75
75
|
body?: Array<VelcronDefinition>;
|
76
|
-
events?: VelcronOnLoadEvent & VelcronOnEditModeEvent &
|
76
|
+
events?: VelcronOnLoadEvent & VelcronOnEditModeEvent & VelcronOnSavingEvent;
|
77
77
|
actions?: {
|
78
78
|
[name: string]: Array<string>;
|
79
79
|
};
|
@@ -4,8 +4,8 @@ export type VelcronOnPressEvent = {
|
|
4
4
|
export type VelcronOnLoadEvent = {
|
5
5
|
onLoaded?: Array<string>;
|
6
6
|
};
|
7
|
-
export type
|
8
|
-
|
7
|
+
export type VelcronOnSavingEvent = {
|
8
|
+
onSaving?: Array<string>;
|
9
9
|
};
|
10
10
|
export type VelcronOnEditModeEvent = {
|
11
11
|
onEditMode?: Array<string>;
|
@@ -1,9 +1,10 @@
|
|
1
1
|
import { SetupFactoryContext } from "../factory";
|
2
2
|
import { http } from "../http";
|
3
|
+
import { InstanceLifetimes } from "../models";
|
3
4
|
interface SetupServiceContext extends SetupFactoryContext {
|
4
5
|
http: typeof http;
|
5
6
|
}
|
6
7
|
export declare function defineService<TActions extends {
|
7
8
|
[key: string]: Function;
|
8
|
-
}, TArgs extends any[]>(setup: (ctx: SetupServiceContext) => TActions): () => TActions;
|
9
|
+
}, TArgs extends any[]>(setup: (ctx: SetupServiceContext) => TActions, lifeTime?: InstanceLifetimes): () => TActions;
|
9
10
|
export {};
|
@@ -1,8 +1,45 @@
|
|
1
|
-
import { ButtonBlueprint, Guid, ITemplateRegistration } from "
|
1
|
+
import { ButtonBlueprint, ChromeBlueprint, ColorSchema, ComponentBlueprints, Guid, ITemplateRegistration, SpacingBlueprints, TabsBlueprint, ThemeDefinitionV2, TypographyBlueprints } from "../models";
|
2
2
|
export declare const useThemingService: () => {
|
3
|
-
|
4
|
-
upsert: (
|
5
|
-
delete: (id: Guid) => Promise<
|
3
|
+
buttons: () => {
|
4
|
+
upsert: (item: ITemplateRegistration<ButtonBlueprint>) => Promise<unknown>;
|
5
|
+
delete: (id: Guid) => Promise<unknown>;
|
6
6
|
getAll: () => Promise<ITemplateRegistration<ButtonBlueprint>[]>;
|
7
7
|
};
|
8
|
+
chrome: () => {
|
9
|
+
upsert: (item: ITemplateRegistration<ChromeBlueprint>) => Promise<unknown>;
|
10
|
+
delete: (id: Guid) => Promise<unknown>;
|
11
|
+
getAll: () => Promise<ITemplateRegistration<ChromeBlueprint>[]>;
|
12
|
+
};
|
13
|
+
colorSchema: () => {
|
14
|
+
upsert: (item: ITemplateRegistration<ColorSchema>) => Promise<unknown>;
|
15
|
+
delete: (id: Guid) => Promise<unknown>;
|
16
|
+
getAll: () => Promise<ITemplateRegistration<ColorSchema>[]>;
|
17
|
+
};
|
18
|
+
components: () => {
|
19
|
+
upsert: (item: ITemplateRegistration<ComponentBlueprints>) => Promise<unknown>;
|
20
|
+
delete: (id: Guid) => Promise<unknown>;
|
21
|
+
getAll: () => Promise<ITemplateRegistration<ComponentBlueprints>[]>;
|
22
|
+
};
|
23
|
+
spacings: () => {
|
24
|
+
upsert: (item: ITemplateRegistration<SpacingBlueprints>) => Promise<unknown>;
|
25
|
+
delete: (id: Guid) => Promise<unknown>;
|
26
|
+
getAll: () => Promise<ITemplateRegistration<SpacingBlueprints>[]>;
|
27
|
+
};
|
28
|
+
tabs: () => {
|
29
|
+
upsert: (item: ITemplateRegistration<TabsBlueprint>) => Promise<unknown>;
|
30
|
+
delete: (id: Guid) => Promise<unknown>;
|
31
|
+
getAll: () => Promise<ITemplateRegistration<TabsBlueprint>[]>;
|
32
|
+
};
|
33
|
+
themes: () => {
|
34
|
+
upsert: (item: ITemplateRegistration<ThemeDefinitionV2>) => Promise<unknown>;
|
35
|
+
delete: (id: Guid) => Promise<unknown>;
|
36
|
+
getAll: () => Promise<ITemplateRegistration<ThemeDefinitionV2>[]>;
|
37
|
+
saveTheme: (key: string, theme: ThemeDefinitionV2) => void;
|
38
|
+
loadTheme: (key: string) => ThemeDefinitionV2;
|
39
|
+
};
|
40
|
+
typography: () => {
|
41
|
+
upsert: (item: ITemplateRegistration<TypographyBlueprints>) => Promise<unknown>;
|
42
|
+
delete: (id: Guid) => Promise<unknown>;
|
43
|
+
getAll: () => Promise<ITemplateRegistration<TypographyBlueprints>[]>;
|
44
|
+
};
|
8
45
|
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { VelcronOnUpdatedEvent, VelcronOnClosedEvent, VelcronOnCloseRequestedEvent, VelcronOnPressEvent, VelcronSpacing, VelcronStyling, VelcronCustomComponentDefinition, VelcronAppDefinition, VelcronRendererResolverReference } from "internal/fx/shared/models";
|
1
|
+
import { VelcronOnUpdatedEvent, VelcronOnClosedEvent, VelcronOnCloseRequestedEvent, VelcronOnPressEvent, VelcronSpacing, VelcronStyling, VelcronCustomComponentDefinition, VelcronAppDefinition, VelcronRendererResolverReference, EventHook, Future } from "internal/fx/shared/models";
|
2
2
|
import { VelcroncomponentArrayType, VelcronPrimitiveType } from "./VelcronTypes";
|
3
3
|
import { AssignOperators, VelcronHorizontalAlignments, VelcronIconTypes, VelcronActionTypes, VelcronVerticalAlignments } from "./Enums";
|
4
4
|
import { DynamicState, VelcronDefinition, useVelcronThemingStore } from "..";
|
@@ -61,7 +61,7 @@ export interface VelcronRenderContext {
|
|
61
61
|
};
|
62
62
|
parent?: VelcronRenderContext;
|
63
63
|
hooks?: VelcronRenderContextHooks;
|
64
|
-
eventHandlers?:
|
64
|
+
eventHandlers?: VelcronRenderContextEventHandlersInstance;
|
65
65
|
editMode?: boolean;
|
66
66
|
disposers: Array<() => void>;
|
67
67
|
}
|
@@ -71,6 +71,9 @@ export interface VelcronRenderContextEventHandlers {
|
|
71
71
|
};
|
72
72
|
emitting?: <T>(emitter: (i: T) => T) => T;
|
73
73
|
}
|
74
|
+
export interface VelcronRenderContextEventHandlersInstance extends VelcronRenderContextEventHandlers {
|
75
|
+
emitOnSaved: EventHook<Future<void>>;
|
76
|
+
}
|
74
77
|
export interface VelcronRenderContextHooks {
|
75
78
|
dialogVisibilityChanged?: ((visible: boolean) => void);
|
76
79
|
onItemSelected?: ((item: VelcronDefinition) => void);
|
@@ -41,7 +41,7 @@ export declare const OAlertTypesName = "OAlertTypes";
|
|
41
41
|
export declare const OButtonPresetDefinitions: readonly ["create", "remove", "delete", "ok", "cancel", "save", "close", "settings", "icon-add", "icon-comment", "icon-delete", "icon-edit", "icon-drag-handle", "icon-copy", "icon-code", "icon-close", "icon-back", "icon-more", "icon-navigate", "icon-settings", "load-more", "retry", "remove", "approve", "copy-to-clipboard", "details", "next", "previous", "select", "view-more", "send-request"];
|
42
42
|
export type OOxideButtonPresets = typeof OButtonPresetDefinitions[number];
|
43
43
|
export declare const OButtonPresetsName = "OOxideButtonPresets";
|
44
|
-
export declare const OButtonVariantDefinitions: readonly ["
|
44
|
+
export declare const OButtonVariantDefinitions: readonly ["prominent", "default", "toolbar", "opacity", "dial", "slim", "menu"];
|
45
45
|
export type OButtonVariants = typeof OButtonVariantDefinitions[number];
|
46
46
|
export declare const OButtonVariantsName = "OButtonVariants";
|
47
47
|
/**Button Group */
|
@@ -31,7 +31,7 @@ exports.OAlertTypesName = "OAlertTypes";
|
|
31
31
|
/**Button */
|
32
32
|
exports.OButtonPresetDefinitions = ["create", "remove", "delete", "ok", "cancel", "save", "close", "settings", "icon-add", "icon-comment", "icon-delete", "icon-edit", "icon-drag-handle", "icon-copy", "icon-code", "icon-close", "icon-back", "icon-more", "icon-navigate", "icon-settings", "load-more", "retry", "remove", "approve", "copy-to-clipboard", "details", "next", "previous", "select", "view-more", "send-request"];
|
33
33
|
exports.OButtonPresetsName = "OOxideButtonPresets";
|
34
|
-
exports.OButtonVariantDefinitions = ["
|
34
|
+
exports.OButtonVariantDefinitions = ["prominent", "default", "toolbar", "opacity", "dial", "slim", "menu"];
|
35
35
|
exports.OButtonVariantsName = "OButtonVariants";
|
36
36
|
/**Button Group */
|
37
37
|
exports.OButtonGroupTypeDefinitions = ["default", "dial", "settings"];
|
package/package.json
CHANGED
package/ux/ThemingApi.d.ts
CHANGED
@@ -1,11 +1,5 @@
|
|
1
|
-
import { BorderStylingDefinition, ButtonBlueprint, ChromeBlueprint, ChromeBlueprints, ColorSchema, ComponentBlueprints, FillDefinition,
|
1
|
+
import { BorderStylingDefinition, ButtonBlueprint, ChromeBlueprint, ChromeBlueprints, ColorSchema, ComponentBlueprints, FillDefinition, ITemplateRegistration, SpacingBlueprints, SpacingDefinition, TabsBlueprint, ThemeDefinitionV2, TypographyBlueprints } from "@omnia/fx-models";
|
2
2
|
import { ApiPath } from "../Extends";
|
3
|
-
export interface ITemplateRegistration<TTemplateType = any> {
|
4
|
-
id: Guid;
|
5
|
-
template: TTemplateType;
|
6
|
-
hidden?: boolean;
|
7
|
-
custom?: boolean;
|
8
|
-
}
|
9
3
|
export interface IThemeRegistrationApiHandler {
|
10
4
|
getAllThemeRegistrations(): ITemplateRegistration<ThemeDefinitionV2>[];
|
11
5
|
registerTheme(definitions: ITemplateRegistration<ThemeDefinitionV2> | ITemplateRegistration<ThemeDefinitionV2>[]): any;
|