@omnia/fx-models 8.0.136-dev → 8.0.138-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/Contexts.d.ts +7 -0
- package/internal-do-not-import-from-here/shared/models/theming/Blueprints.d.ts +8 -1
- package/internal-do-not-import-from-here/shared/models/theming/ThemeDefinitionV2.d.ts +5 -4
- package/internal-do-not-import-from-here/shared/models/theming/Typography.d.ts +2 -2
- 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 +4 -0
- package/internal-do-not-import-from-here/shared/services/index.d.ts +0 -1
- package/internal-do-not-import-from-here/velcron/core/models/VelcronDefinitions.d.ts +8 -1
- package/internal-do-not-import-from-here/velcron/core/models/VelcronTypes.d.ts +0 -5
- package/oxide/OxideTypeDefinitions.d.ts +1 -1
- package/oxide/OxideTypeDefinitions.js +1 -1
- package/package.json +1 -1
- package/ux/ThemingApi.d.ts +3 -1
- package/internal-do-not-import-from-here/shared/services/ThemingService.d.ts +0 -45
- package/internal-do-not-import-from-here/shared/services/tmpUseIndexDb.d.ts +0 -1
package/Contexts.d.ts
CHANGED
@@ -83,9 +83,16 @@ export interface ITokenBasedRouteContext<T1 extends TokenBasedRoute, T2 extends
|
|
83
83
|
readonly route: T1;
|
84
84
|
readonly stateData: T2;
|
85
85
|
}
|
86
|
+
export interface JourneyBladeRouter<T extends {
|
87
|
+
[name: string]: string | number | boolean | GuidValue;
|
88
|
+
} = {}> {
|
89
|
+
id: GuidValue;
|
90
|
+
route?: T;
|
91
|
+
}
|
86
92
|
export interface AdminRoute extends TokenBasedRoute {
|
87
93
|
manifestId: GuidValue;
|
88
94
|
relativePath: string;
|
95
|
+
blades?: JourneyBladeRouter[];
|
89
96
|
}
|
90
97
|
export interface BusinessProfileRoute extends TokenBasedRoute {
|
91
98
|
profileId: GuidValue;
|
@@ -39,6 +39,7 @@ export interface ComponentBlueprints extends Blueprints, BlueprintsReference {
|
|
39
39
|
buttons?: ButtonBlueprints;
|
40
40
|
tabs?: TabsBlueprints;
|
41
41
|
blocks?: ChromeBlueprints;
|
42
|
+
icons?: IconBlueprints;
|
42
43
|
}
|
43
44
|
export interface SpacingBlueprint {
|
44
45
|
layout: SpacingDefinition;
|
@@ -55,12 +56,18 @@ export declare enum VelcronBlueprintDefintionTypes {
|
|
55
56
|
button = "button"
|
56
57
|
}
|
57
58
|
export interface Blueprint {
|
58
|
-
type: VelcronBlueprintDefintionType | WebBlueprintItemDefintionType;
|
59
59
|
}
|
60
60
|
export interface SearchBoxBlueprint extends Blueprint {
|
61
61
|
borderRadius?: BoxDimensions;
|
62
62
|
variant?: "outlined" | "solo" | "regular" | "plain" | "underlined";
|
63
63
|
}
|
64
|
+
export interface IconBlueprints extends Blueprints {
|
65
|
+
xs?: IconBlueprint;
|
66
|
+
s?: IconBlueprint;
|
67
|
+
m?: IconBlueprint;
|
68
|
+
l?: IconBlueprint;
|
69
|
+
xl?: IconBlueprint;
|
70
|
+
}
|
64
71
|
export interface ButtonBlueprint extends Blueprint {
|
65
72
|
padding?: Spacing;
|
66
73
|
background?: BackgroundDefinition;
|
@@ -1,5 +1,6 @@
|
|
1
|
-
import {
|
1
|
+
import { GuidValue } from "../Guid";
|
2
2
|
import { BoxDimensions, ComponentBlueprints, SpacingBlueprints, TypographyBlueprints } from "./Blueprints";
|
3
|
+
export type ThemeContextType = "default" | "admin" | "preview" | "color-context";
|
3
4
|
export interface ColorTypeResult<resultType> {
|
4
5
|
base: resultType;
|
5
6
|
baseTone: resultType;
|
@@ -42,7 +43,7 @@ export interface ColorSchemas extends ColorSchemasReference {
|
|
42
43
|
notification: ColorSchema;
|
43
44
|
}
|
44
45
|
export interface BlueprintsReference {
|
45
|
-
id:
|
46
|
+
id: GuidValue;
|
46
47
|
}
|
47
48
|
export interface ColorSchemasReference {
|
48
49
|
primary: BlueprintsReference;
|
@@ -58,7 +59,7 @@ export interface ColorSchemasReference {
|
|
58
59
|
notification: BlueprintsReference;
|
59
60
|
}
|
60
61
|
export interface ThemeDefinitionReference {
|
61
|
-
id:
|
62
|
+
id: GuidValue;
|
62
63
|
name?: string;
|
63
64
|
colors: ColorSchemasReference;
|
64
65
|
typography: BlueprintsReference;
|
@@ -72,7 +73,7 @@ export interface ThemeDefinitionV2 extends ThemeDefinitionReference {
|
|
72
73
|
components: ComponentBlueprints;
|
73
74
|
}
|
74
75
|
export interface ITemplateRegistration<TTemplateType = any> {
|
75
|
-
id:
|
76
|
+
id: GuidValue;
|
76
77
|
template: TTemplateType;
|
77
78
|
hidden?: boolean;
|
78
79
|
custom?: boolean;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { DynamicState } from "../DynamicState";
|
2
|
-
import { VelcronEvent, VelcronOnEditModeEvent, VelcronOnLoadEvent, VelcronOnSavingEvent } from "./VelcronEvents";
|
2
|
+
import { VelcronEvent, VelcronOnEditModeEvent, VelcronOnLoadEvent, VelcronOnPersistingStateEvent, 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 & VelcronOnSavingEvent;
|
76
|
+
events?: VelcronOnLoadEvent & VelcronOnEditModeEvent & VelcronOnSavingEvent & VelcronOnPersistingStateEvent;
|
77
77
|
actions?: {
|
78
78
|
[name: string]: Array<string>;
|
79
79
|
};
|
@@ -7,6 +7,10 @@ export type VelcronOnLoadEvent = {
|
|
7
7
|
export type VelcronOnSavingEvent = {
|
8
8
|
onSaving?: Array<string>;
|
9
9
|
};
|
10
|
+
export type VelcronOnPersistingStateEvent = {
|
11
|
+
onPersistState?: Array<string>;
|
12
|
+
onRestoreState?: Array<string>;
|
13
|
+
};
|
10
14
|
export type VelcronOnEditModeEvent = {
|
11
15
|
onEditMode?: Array<string>;
|
12
16
|
};
|
@@ -72,7 +72,12 @@ export interface VelcronRenderContextEventHandlers {
|
|
72
72
|
emitting?: <T>(emitter: (i: T) => T) => T;
|
73
73
|
}
|
74
74
|
export interface VelcronRenderContextEventHandlersInstance extends VelcronRenderContextEventHandlers {
|
75
|
-
emitOnSaved: EventHook<
|
75
|
+
emitOnSaved: EventHook<void>;
|
76
|
+
emitOnSavedPromises: Array<Future<unknown>>;
|
77
|
+
emitOnPersistState: EventHook<Future<DynamicState>>;
|
78
|
+
emitOnPersistStatePromises: Array<Future<unknown>>;
|
79
|
+
emitOnRestoreState: EventHook<unknown>;
|
80
|
+
emitOnRestoreStatePromises: Array<Future<unknown>>;
|
76
81
|
}
|
77
82
|
export interface VelcronRenderContextHooks {
|
78
83
|
dialogVisibilityChanged?: ((visible: boolean) => void);
|
@@ -87,6 +92,7 @@ export interface VelcronContainerRenderer {
|
|
87
92
|
}
|
88
93
|
export interface VelcronAction extends VelcronRenderContext {
|
89
94
|
type: VelcronActionTypes;
|
95
|
+
rootPromises?: Array<Future<void>>;
|
90
96
|
}
|
91
97
|
export interface VelcronActionGetOrSetValue extends VelcronAction {
|
92
98
|
value?: unknown;
|
@@ -97,6 +103,7 @@ export interface VelcronActionGetOrSetValue extends VelcronAction {
|
|
97
103
|
export interface VelcronActionWithAutoAwait extends VelcronActionGetOrSetValue {
|
98
104
|
nowait: boolean;
|
99
105
|
action: string;
|
106
|
+
promise: Future<unknown>;
|
100
107
|
}
|
101
108
|
export interface VelcronActionWithCondition extends VelcronActionWithAutoAwait {
|
102
109
|
condition: string;
|
@@ -3,8 +3,3 @@ export type VelcronPrimitiveType = string | number | boolean;
|
|
3
3
|
export type VelcronArrayType<T> = Array<T>;
|
4
4
|
export type VelcronObjectType<T extends Object> = T;
|
5
5
|
export type VelcroncomponentArrayType = Array<VelcronDefinition>;
|
6
|
-
export interface DeferredPromise<T> {
|
7
|
-
promise: Promise<T>;
|
8
|
-
resolve: (val: T) => void;
|
9
|
-
reject: () => void;
|
10
|
-
}
|
@@ -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 ["primary", "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 = ["primary", "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,4 +1,4 @@
|
|
1
|
-
import { BorderStylingDefinition, ButtonBlueprint, ChromeBlueprint, ChromeBlueprints, ColorSchema, ComponentBlueprints, FillDefinition, ITemplateRegistration, SpacingBlueprints, SpacingDefinition, TabsBlueprint, ThemeDefinitionV2, TypographyBlueprints } from "@omnia/fx-models";
|
1
|
+
import { BorderStylingDefinition, ButtonBlueprint, ChromeBlueprint, ChromeBlueprints, ColorSchema, ComponentBlueprints, FillDefinition, ITemplateRegistration, IconBlueprints, SpacingBlueprints, SpacingDefinition, TabsBlueprint, ThemeDefinitionV2, TypographyBlueprints } from "@omnia/fx-models";
|
2
2
|
import { ApiPath } from "../Extends";
|
3
3
|
export interface IThemeRegistrationApiHandler {
|
4
4
|
getAllThemeRegistrations(): ITemplateRegistration<ThemeDefinitionV2>[];
|
@@ -17,6 +17,7 @@ export interface IThemeRegistrationApiHandler {
|
|
17
17
|
chromeBlueprints: () => ITemplateRegistration<ChromeBlueprints>[];
|
18
18
|
componentBlueprints: () => ITemplateRegistration<ComponentBlueprints>[];
|
19
19
|
typographyBlueprints: () => ITemplateRegistration<TypographyBlueprints>[];
|
20
|
+
iconBlueprints: () => ITemplateRegistration<IconBlueprints>[];
|
20
21
|
};
|
21
22
|
add: {
|
22
23
|
spacingDefinition: (spacing: ITemplateRegistration<SpacingDefinition> | ITemplateRegistration<SpacingDefinition>[]) => void;
|
@@ -29,6 +30,7 @@ export interface IThemeRegistrationApiHandler {
|
|
29
30
|
chromeBlueprints: (blueprint: ITemplateRegistration<ChromeBlueprints> | ITemplateRegistration<ChromeBlueprints>[]) => void;
|
30
31
|
componentBlueprints: (blueprint: ITemplateRegistration<ComponentBlueprints> | ITemplateRegistration<ComponentBlueprints>[]) => void;
|
31
32
|
typographyBlueprints: (blueprints: ITemplateRegistration<TypographyBlueprints> | ITemplateRegistration<TypographyBlueprints>[]) => void;
|
33
|
+
iconBlueprints: (blueprints: ITemplateRegistration<IconBlueprints> | ITemplateRegistration<IconBlueprints>[]) => void;
|
32
34
|
};
|
33
35
|
};
|
34
36
|
}
|
@@ -1,45 +0,0 @@
|
|
1
|
-
import { ButtonBlueprint, ChromeBlueprint, ColorSchema, ComponentBlueprints, Guid, ITemplateRegistration, SpacingBlueprints, TabsBlueprint, ThemeDefinitionV2, TypographyBlueprints } from "../models";
|
2
|
-
export declare const useThemingService: () => {
|
3
|
-
buttons: () => {
|
4
|
-
upsert: (item: ITemplateRegistration<ButtonBlueprint>) => Promise<unknown>;
|
5
|
-
delete: (id: Guid) => Promise<unknown>;
|
6
|
-
getAll: () => Promise<ITemplateRegistration<ButtonBlueprint>[]>;
|
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
|
-
};
|
45
|
-
};
|
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|