@omnia/fx-models 8.0.403-dev → 8.0.404-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/Tenant.d.ts +3 -3
- package/internal-do-not-import-from-here/shared/index.d.ts +1 -0
- package/internal-do-not-import-from-here/shared/models/theme/Typography.d.ts +28 -34
- package/internal-do-not-import-from-here/shared/models/theme/Typography.js +5 -14
- package/internal-do-not-import-from-here/shared/stores/DefineStore.d.ts +109 -0
- package/internal-do-not-import-from-here/shared/stores/index.d.ts +1 -0
- package/internal-do-not-import-from-here/shared/utils/index.d.ts +1 -0
- package/package.json +1 -1
package/Tenant.d.ts
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
import { OmniaNamedModel, IOmniaPropertyBag } from "./NamedProperty";
|
2
1
|
import { TenantIdentifier, TypographyFontDefinition } from "@omnia/fx-models/internal-do-not-import-from-here/shared/models";
|
2
|
+
import { ThemeSelection } from "../shared";
|
3
3
|
import { FirstDayOfWeeks, TimeFormats } from "./Enums";
|
4
4
|
import { LanguageSettings } from "./Language";
|
5
5
|
import { MultilingualString } from "./MultilingualString";
|
6
|
-
import {
|
6
|
+
import { IOmniaPropertyBag, OmniaNamedModel } from "./NamedProperty";
|
7
7
|
export interface ITenant extends TenantIdentifier {
|
8
8
|
readonly propertyBag: IOmniaPropertyBag<TenantProperty>;
|
9
9
|
readonly properties: Array<TenantProperty>;
|
@@ -17,7 +17,7 @@ export declare class TenantRegionalSettings extends TenantProperty {
|
|
17
17
|
constructor();
|
18
18
|
dateFormat: string;
|
19
19
|
timeFormat: TimeFormats;
|
20
|
-
|
20
|
+
firstDayOfWeek: FirstDayOfWeeks;
|
21
21
|
}
|
22
22
|
export declare class TenantLanguageSettings extends TenantProperty {
|
23
23
|
languages: Array<LanguageSettings>;
|
@@ -19,20 +19,24 @@ export interface TypographyBlueprint extends ThemeBase {
|
|
19
19
|
baseFontSize?: BaseScaleBreakpoint;
|
20
20
|
scale?: BaseScaleBreakpoint;
|
21
21
|
lineHeightMultiplier?: BaseScaleBreakpoint;
|
22
|
-
styles: {
|
23
|
-
s1: TextStyleDefinition;
|
24
|
-
s2: TextStyleDefinition;
|
25
|
-
s3: TextStyleDefinition;
|
26
|
-
s4: TextStyleDefinition;
|
27
|
-
s5: TextStyleDefinition;
|
28
|
-
s6: TextStyleDefinition;
|
29
|
-
s7: TextStyleDefinition;
|
30
|
-
s8: TextStyleDefinition;
|
31
|
-
s9: TextStyleDefinition;
|
32
|
-
s10: TextStyleDefinition;
|
33
|
-
};
|
34
22
|
};
|
35
23
|
variants?: VariantBlueprints<TextStyleDefinition>;
|
24
|
+
display?: {
|
25
|
+
xl: TextStyleDefinition;
|
26
|
+
l: TextStyleDefinition;
|
27
|
+
m: TextStyleDefinition;
|
28
|
+
s: TextStyleDefinition;
|
29
|
+
xs: TextStyleDefinition;
|
30
|
+
font?: TypographyFontRef;
|
31
|
+
};
|
32
|
+
headline?: {
|
33
|
+
xl: TextStyleDefinition;
|
34
|
+
l: TextStyleDefinition;
|
35
|
+
m: TextStyleDefinition;
|
36
|
+
s: TextStyleDefinition;
|
37
|
+
xs: TextStyleDefinition;
|
38
|
+
font?: TypographyFontRef;
|
39
|
+
};
|
36
40
|
title?: {
|
37
41
|
xl: TextStyleDefinition;
|
38
42
|
l: TextStyleDefinition;
|
@@ -49,15 +53,15 @@ export interface TypographyBlueprint extends ThemeBase {
|
|
49
53
|
xs: TextStyleDefinition;
|
50
54
|
font?: TypographyFontRef;
|
51
55
|
};
|
52
|
-
|
53
|
-
xl
|
54
|
-
l
|
56
|
+
label?: {
|
57
|
+
xl: TextStyleDefinition;
|
58
|
+
l: TextStyleDefinition;
|
55
59
|
m: TextStyleDefinition;
|
56
|
-
s
|
57
|
-
xs
|
60
|
+
s: TextStyleDefinition;
|
61
|
+
xs: TextStyleDefinition;
|
58
62
|
font?: TypographyFontRef;
|
59
63
|
};
|
60
|
-
|
64
|
+
navigation?: {
|
61
65
|
xl?: TextStyleDefinition;
|
62
66
|
l?: TextStyleDefinition;
|
63
67
|
m: TextStyleDefinition;
|
@@ -65,7 +69,7 @@ export interface TypographyBlueprint extends ThemeBase {
|
|
65
69
|
xs?: TextStyleDefinition;
|
66
70
|
font?: TypographyFontRef;
|
67
71
|
};
|
68
|
-
|
72
|
+
button?: {
|
69
73
|
xl?: TextStyleDefinition;
|
70
74
|
l?: TextStyleDefinition;
|
71
75
|
m: TextStyleDefinition;
|
@@ -97,19 +101,19 @@ export interface TypographyFontRef {
|
|
97
101
|
}
|
98
102
|
export type TextStyleType = keyof typeof TextStyleTypes;
|
99
103
|
export declare enum TextStyleTypes {
|
104
|
+
display = "display",
|
105
|
+
headline = "headline",
|
100
106
|
title = "title",
|
101
107
|
text = "text",
|
102
|
-
navigation = "navigation",
|
103
108
|
label = "label",
|
104
|
-
variants = "variants"
|
105
|
-
fills = "fills",
|
106
|
-
typeScale = "typeScale"
|
109
|
+
variants = "variants"
|
107
110
|
}
|
108
111
|
export interface ThemedTextStyleValue {
|
109
112
|
type: TextStyleType;
|
110
113
|
size: TextStyleSize;
|
111
114
|
}
|
112
115
|
export type TextStyleValue = TextStyleDefinition | ThemedTextStyleValue;
|
116
|
+
export type TypographyBreakpoint = "lg" | "md" | "sm";
|
113
117
|
export type TextStyleSize = keyof typeof TextStyleSizes;
|
114
118
|
export declare enum TextStyleSizes {
|
115
119
|
xl = "xl",
|
@@ -124,17 +128,7 @@ export declare enum TextStyleSizes {
|
|
124
128
|
variant5 = "variant5",
|
125
129
|
variant6 = "variant6",
|
126
130
|
variant7 = "variant7",
|
127
|
-
variant8 = "variant8"
|
128
|
-
scale1 = "s1",
|
129
|
-
scale2 = "s2",
|
130
|
-
scale3 = "s3",
|
131
|
-
scale4 = "s4",
|
132
|
-
scale5 = "s5",
|
133
|
-
scale6 = "s6",
|
134
|
-
scale7 = "s7",
|
135
|
-
scale8 = "s8",
|
136
|
-
scale9 = "s9",
|
137
|
-
scale10 = "s10"
|
131
|
+
variant8 = "variant8"
|
138
132
|
}
|
139
133
|
/**this reflect TypographySizes for member check*/
|
140
134
|
export declare const AvailableTextStyleSizes: string[];
|
@@ -3,14 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AvailableTextStyleSizes = exports.TextStyleSizes = exports.TextStyleTypes = void 0;
|
4
4
|
var TextStyleTypes;
|
5
5
|
(function (TextStyleTypes) {
|
6
|
+
TextStyleTypes["display"] = "display";
|
7
|
+
TextStyleTypes["headline"] = "headline";
|
6
8
|
TextStyleTypes["title"] = "title";
|
7
9
|
TextStyleTypes["text"] = "text";
|
8
|
-
TextStyleTypes["navigation"] = "navigation";
|
9
10
|
TextStyleTypes["label"] = "label";
|
11
|
+
//navigation = "navigation",
|
10
12
|
//button = "button",
|
11
13
|
TextStyleTypes["variants"] = "variants";
|
12
|
-
|
13
|
-
TextStyleTypes["typeScale"] = "typeScale";
|
14
|
+
//fills = "fills",
|
14
15
|
})(TextStyleTypes || (exports.TextStyleTypes = TextStyleTypes = {}));
|
15
16
|
var TextStyleSizes;
|
16
17
|
(function (TextStyleSizes) {
|
@@ -27,16 +28,6 @@ var TextStyleSizes;
|
|
27
28
|
TextStyleSizes["variant6"] = "variant6";
|
28
29
|
TextStyleSizes["variant7"] = "variant7";
|
29
30
|
TextStyleSizes["variant8"] = "variant8";
|
30
|
-
TextStyleSizes["scale1"] = "s1";
|
31
|
-
TextStyleSizes["scale2"] = "s2";
|
32
|
-
TextStyleSizes["scale3"] = "s3";
|
33
|
-
TextStyleSizes["scale4"] = "s4";
|
34
|
-
TextStyleSizes["scale5"] = "s5";
|
35
|
-
TextStyleSizes["scale6"] = "s6";
|
36
|
-
TextStyleSizes["scale7"] = "s7";
|
37
|
-
TextStyleSizes["scale8"] = "s8";
|
38
|
-
TextStyleSizes["scale9"] = "s9";
|
39
|
-
TextStyleSizes["scale10"] = "s10";
|
40
31
|
})(TextStyleSizes || (exports.TextStyleSizes = TextStyleSizes = {}));
|
41
32
|
/**this reflect TypographySizes for member check*/
|
42
|
-
exports.AvailableTextStyleSizes = ["xl", "l", "m", "s", "xs", "variant1", "variant2", "variant3", "variant4", "variant5", "variant6", "variant7", "variant8"
|
33
|
+
exports.AvailableTextStyleSizes = ["xl", "l", "m", "s", "xs", "variant1", "variant2", "variant3", "variant4", "variant5", "variant6", "variant7", "variant8"];
|
@@ -0,0 +1,109 @@
|
|
1
|
+
import { guid, IMessageBusSubscriptionHandler, IMessageBusTopicPublishSubscriber, InstanceLifetimes } from "../models";
|
2
|
+
import { MessageBusExposeOnlySubscription } from "../messaging";
|
3
|
+
import { defineFactory, SetupFactoryContext } from "../factory";
|
4
|
+
declare const ShallowReactiveMarker: unique symbol;
|
5
|
+
type WatchStopHandle = () => void;
|
6
|
+
interface WatchHandle extends WatchStopHandle {
|
7
|
+
pause: () => void;
|
8
|
+
resume: () => void;
|
9
|
+
stop: () => void;
|
10
|
+
}
|
11
|
+
type MaybeUndefined<T, I> = I extends true ? T | undefined : T;
|
12
|
+
type WatchSource<T = any> = Ref<T, any> | (() => T);
|
13
|
+
type WatchCallback<V = any, OV = any> = (value: V, oldValue: OV, onCleanup: any) => any;
|
14
|
+
interface WatchEffectOptions {
|
15
|
+
flush?: "pre" | "post" | "sync";
|
16
|
+
}
|
17
|
+
interface WatchOptions<Immediate = boolean> extends WatchEffectOptions {
|
18
|
+
immediate?: Immediate;
|
19
|
+
deep?: boolean | number;
|
20
|
+
once?: boolean;
|
21
|
+
}
|
22
|
+
type ShallowReactive<T> = T & {
|
23
|
+
[ShallowReactiveMarker]?: true;
|
24
|
+
};
|
25
|
+
type Ref<T = any, S = T> = {
|
26
|
+
get value(): T;
|
27
|
+
set value(_: S);
|
28
|
+
};
|
29
|
+
type EffectScope = {
|
30
|
+
run<T>(fn: () => T): T | undefined;
|
31
|
+
stop(fromParent?: boolean): void;
|
32
|
+
};
|
33
|
+
type StoreProvider = {
|
34
|
+
logging: {
|
35
|
+
add(id: guid, name: string, type: any, storeId: guid, storeName: string, object: any): void;
|
36
|
+
remove(id: any): void;
|
37
|
+
};
|
38
|
+
effectScope(detached?: boolean): EffectScope;
|
39
|
+
ref<T = any>(value: T): Ref<T | undefined>;
|
40
|
+
shallowReactive<T extends object>(target: T): ShallowReactive<T>;
|
41
|
+
watch<T, Immediate extends Readonly<boolean> = false>(source: WatchSource<T>, cb: WatchCallback<T, MaybeUndefined<T, Immediate>>, options?: WatchOptions<Immediate>): WatchHandle;
|
42
|
+
};
|
43
|
+
type MutateFn<T> = (value: T | ((prev: T) => T)) => void;
|
44
|
+
export type StoreEvents<TState extends object, TEvents extends Record<string, IMessageBusTopicPublishSubscriber<any>> = {}> = {
|
45
|
+
[K in keyof TState as `onMutated${Capitalize<string & K>}`]: MessageBusExposeOnlySubscription<TState[K]>;
|
46
|
+
} & TEvents;
|
47
|
+
type MapActionOnDispatching<T extends Function> = T extends (...args: infer U) => any ? (...args: U) => void : never;
|
48
|
+
type MapActionOnDispatched<T extends Function> = T extends (...args: infer U) => Promise<infer Y> | infer Y ? (result: Y, ...args: U) => void : never;
|
49
|
+
type MapActionOnFailure<T extends Function> = T extends (...args: infer U) => any ? (failureReason: any, ...args: U) => void : never;
|
50
|
+
export type StoreReturnDefineAction<TAction extends {
|
51
|
+
[key: string]: any;
|
52
|
+
}> = {
|
53
|
+
onDispatching: {
|
54
|
+
[k in keyof TAction]: {
|
55
|
+
subscribe(fn: MapActionOnDispatching<TAction[k]>): IMessageBusSubscriptionHandler;
|
56
|
+
};
|
57
|
+
};
|
58
|
+
onDispatched: {
|
59
|
+
[k in keyof TAction]: {
|
60
|
+
subscribe(fn: MapActionOnDispatched<TAction[k]>): IMessageBusSubscriptionHandler;
|
61
|
+
};
|
62
|
+
};
|
63
|
+
onFailure: {
|
64
|
+
[k in keyof TAction]: {
|
65
|
+
subscribe(fn: MapActionOnFailure<TAction[k]>): IMessageBusSubscriptionHandler;
|
66
|
+
};
|
67
|
+
};
|
68
|
+
} & TAction;
|
69
|
+
export interface SetupStoreContext extends SetupFactoryContext {
|
70
|
+
defineState<TState extends object, TEvents extends Record<string, IMessageBusTopicPublishSubscriber<any>> = Record<string, IMessageBusTopicPublishSubscriber<any>>>(state: TState): {
|
71
|
+
state: TState;
|
72
|
+
events: StoreEvents<TState, TEvents>;
|
73
|
+
mutate: {
|
74
|
+
[K in keyof TState]: MutateFn<TState[K]>;
|
75
|
+
};
|
76
|
+
};
|
77
|
+
defineActions<TActions extends {
|
78
|
+
[key: string]: any;
|
79
|
+
}>(actions: TActions): StoreReturnDefineAction<TActions>;
|
80
|
+
}
|
81
|
+
export interface IReturnSetupStore<TState, TGetters, TActions extends {
|
82
|
+
[key: string]: Function;
|
83
|
+
}, TEvents> {
|
84
|
+
state?: TState;
|
85
|
+
get?: TGetters;
|
86
|
+
actions?: StoreReturnDefineAction<TActions>;
|
87
|
+
events?: TEvents;
|
88
|
+
name?: string;
|
89
|
+
}
|
90
|
+
export declare function defineStore<TState extends object, TGetters extends object, TActions extends {
|
91
|
+
[key: string]: any;
|
92
|
+
}, TEvents extends Record<string, MessageBusExposeOnlySubscription<any>>, InferReturnSetup extends IReturnSetupStore<TState, TGetters, TActions, TEvents>>(name: string, setup: (ctx: SetupStoreContext) => InferReturnSetup, lifetime?: InstanceLifetimes): ReturnType<typeof defineFactory<InferReturnSetup>>;
|
93
|
+
export declare function defineStore<TState extends object, TGetters extends object, TActions extends {
|
94
|
+
[key: string]: any;
|
95
|
+
}, TEvents extends Record<string, MessageBusExposeOnlySubscription<any>>, InferReturnSetup extends IReturnSetupStore<TState, TGetters, TActions, TEvents>, T1>(name: string, setup: (ctx: SetupStoreContext, param1: T1) => InferReturnSetup, lifetime?: InstanceLifetimes): ReturnType<typeof defineFactory<InferReturnSetup, T1>>;
|
96
|
+
export declare function defineStore<TState extends object, TGetters extends object, TActions extends {
|
97
|
+
[key: string]: any;
|
98
|
+
}, TEvents extends Record<string, MessageBusExposeOnlySubscription<any>>, InferReturnSetup extends IReturnSetupStore<TState, TGetters, TActions, TEvents>, T1, T2>(name: string, setup: (ctx: SetupStoreContext, param1: T1, param2: T2) => InferReturnSetup, lifetime?: InstanceLifetimes): ReturnType<typeof defineFactory<InferReturnSetup, T1, T2>>;
|
99
|
+
export declare function defineStore<TState extends object, TGetters extends object, TActions extends {
|
100
|
+
[key: string]: any;
|
101
|
+
}, TEvents extends Record<string, MessageBusExposeOnlySubscription<any>>, InferReturnSetup extends IReturnSetupStore<TState, TGetters, TActions, TEvents>, T1, T2, T3>(name: string, setup: (ctx: SetupStoreContext, param1: T1, param2: T2, param3: T3, lifetime?: InstanceLifetimes) => InferReturnSetup): ReturnType<typeof defineFactory<InferReturnSetup, T1, T2, T3>>;
|
102
|
+
export declare function defineStore<TState extends object, TGetters extends object, TActions extends {
|
103
|
+
[key: string]: any;
|
104
|
+
}, TEvents extends Record<string, MessageBusExposeOnlySubscription<any>>, InferReturnSetup extends IReturnSetupStore<TState, TGetters, TActions, TEvents>, T1, T2, T3, T4>(name: string, setup: (ctx: SetupStoreContext, param1: T1, param2: T2, param3: T3, param4: T4, lifetime?: InstanceLifetimes) => InferReturnSetup): ReturnType<typeof defineFactory<InferReturnSetup, T1, T2, T3, T4>>;
|
105
|
+
export declare function defineStore<TState extends object, TGetters extends object, TActions extends {
|
106
|
+
[key: string]: any;
|
107
|
+
}, TEvents extends Record<string, MessageBusExposeOnlySubscription<any>>, InferReturnSetup extends IReturnSetupStore<TState, TGetters, TActions, TEvents>, T1, T2, T3, T4, T5>(name: string, setup: (ctx: SetupStoreContext, param1: T1, param2: T2, param3: T3, param4: T4, param5: T5) => InferReturnSetup, lifetime?: InstanceLifetimes): ReturnType<typeof defineFactory<InferReturnSetup, T1, T2, T3, T4, T5>>;
|
108
|
+
export declare function registerStoreProvider(provider: StoreProvider): void;
|
109
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from "./DefineStore";
|