@omnia/velcron 8.0.82-vnext → 8.0.83-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/actions/Alert.js +1 -1
- package/actions/Array.js +9 -2
- package/actions/Clone.d.ts +2 -0
- package/actions/Clone.js +11 -0
- package/actions/Date.d.ts +3 -0
- package/actions/Date.js +29 -0
- package/actions/Http.js +23 -6
- package/actions/IActionHandler.d.ts +1 -0
- package/actions/Timer.d.ts +4 -0
- package/actions/Timer.js +80 -0
- package/actions/index.d.ts +3 -0
- package/actions/index.js +3 -0
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/internal-do-not-import-from-here/shared/models/Broadcasting.js +1 -1
- package/internal-do-not-import-from-here/shared/models/DynamicState.d.ts +1 -0
- package/internal-do-not-import-from-here/shared/models/Equals.js +33 -3
- package/internal-do-not-import-from-here/shared/models/Future.d.ts +17 -1
- package/internal-do-not-import-from-here/shared/models/Future.js +26 -5
- package/internal-do-not-import-from-here/shared/models/Guid.d.ts +1 -0
- package/internal-do-not-import-from-here/shared/models/Guid.js +13 -6
- package/internal-do-not-import-from-here/shared/models/HttpCommon.d.ts +27 -0
- package/internal-do-not-import-from-here/shared/models/OmniaSharedBootstrapData.d.ts +7 -1
- package/internal-do-not-import-from-here/shared/models/Realtime.d.ts +1 -13
- package/internal-do-not-import-from-here/shared/models/Realtime.js +1 -22
- package/internal-do-not-import-from-here/shared/models/StronglyTypedId.d.ts +3 -0
- package/internal-do-not-import-from-here/shared/models/StronglyTypedId.js +2 -0
- package/internal-do-not-import-from-here/shared/models/Tokens.d.ts +1 -0
- package/internal-do-not-import-from-here/shared/models/WorkerProxyFuncs.d.ts +7 -1
- package/internal-do-not-import-from-here/shared/models/WorkerProxyFuncs.js +5 -1
- package/internal-do-not-import-from-here/shared/models/Workers.js +1 -1
- package/internal-do-not-import-from-here/shared/models/hub/ExternalIdentityId.d.ts +2 -0
- package/internal-do-not-import-from-here/shared/models/hub/ExternalIdentityId.js +2 -0
- package/internal-do-not-import-from-here/shared/models/hub/TempSocialReactions.d.ts +13 -0
- package/internal-do-not-import-from-here/shared/models/hub/TempSocialReactions.js +20 -0
- package/internal-do-not-import-from-here/shared/models/hub/activities/Activity.d.ts +67 -0
- package/internal-do-not-import-from-here/shared/models/hub/activities/Activity.js +7 -0
- package/internal-do-not-import-from-here/shared/models/hub/activities/ActivityChannel.d.ts +7 -0
- package/internal-do-not-import-from-here/shared/models/hub/activities/ActivityChannel.js +5 -0
- package/internal-do-not-import-from-here/shared/models/hub/activities/ActivityDefinition.d.ts +14 -0
- package/internal-do-not-import-from-here/shared/models/hub/activities/ActivityDefinition.js +15 -0
- package/internal-do-not-import-from-here/shared/models/hub/activities/ActivityFeed.d.ts +30 -0
- package/internal-do-not-import-from-here/shared/models/hub/activities/ActivityFeed.js +2 -0
- package/internal-do-not-import-from-here/shared/models/hub/activities/ActivityRenderer.d.ts +15 -0
- package/internal-do-not-import-from-here/shared/models/hub/activities/ActivityRenderer.js +5 -0
- package/internal-do-not-import-from-here/shared/models/hub/activities/ActivityRendererLoadingReferences.d.ts +8 -0
- package/internal-do-not-import-from-here/shared/models/hub/activities/ActivityRendererLoadingReferences.js +2 -0
- package/internal-do-not-import-from-here/shared/models/hub/activities/ActivitySender.d.ts +15 -0
- package/internal-do-not-import-from-here/shared/models/hub/activities/ActivitySender.js +5 -0
- package/internal-do-not-import-from-here/shared/models/hub/activities/IdentityActivity.d.ts +40 -0
- package/internal-do-not-import-from-here/shared/models/hub/activities/IdentityActivity.js +39 -0
- package/internal-do-not-import-from-here/shared/models/hub/activities/index.d.ts +8 -0
- package/internal-do-not-import-from-here/shared/models/hub/activities/index.js +11 -0
- package/internal-do-not-import-from-here/shared/models/hub/fileupload/FileOwnerId.d.ts +3 -0
- package/internal-do-not-import-from-here/shared/models/hub/fileupload/FileOwnerId.js +5 -0
- package/internal-do-not-import-from-here/shared/models/hub/fileupload/TemporaryFileId.d.ts +4 -0
- package/internal-do-not-import-from-here/shared/models/hub/fileupload/TemporaryFileId.js +5 -0
- package/internal-do-not-import-from-here/shared/models/hub/fileupload/index.d.ts +2 -0
- package/internal-do-not-import-from-here/shared/models/hub/fileupload/index.js +5 -0
- package/internal-do-not-import-from-here/shared/models/hub/index.d.ts +5 -0
- package/internal-do-not-import-from-here/shared/models/hub/index.js +8 -0
- package/internal-do-not-import-from-here/shared/models/hub/social/HubComment.d.ts +10 -0
- package/internal-do-not-import-from-here/shared/models/hub/social/HubComment.js +2 -0
- package/internal-do-not-import-from-here/shared/models/hub/social/HubReaction.d.ts +5 -0
- package/internal-do-not-import-from-here/shared/models/hub/social/HubReaction.js +2 -0
- package/internal-do-not-import-from-here/shared/models/hub/social/index.d.ts +2 -0
- package/internal-do-not-import-from-here/shared/models/hub/social/index.js +5 -0
- package/internal-do-not-import-from-here/shared/models/index.d.ts +5 -1
- package/internal-do-not-import-from-here/shared/models/index.js +5 -1
- package/internal-do-not-import-from-here/shared/models/theming/BlueprintDefinition.d.ts +44 -46
- package/internal-do-not-import-from-here/shared/models/theming/BlueprintDefinition.js +7 -13
- package/internal-do-not-import-from-here/shared/models/theming/ChromeDefinition.d.ts +31 -0
- package/internal-do-not-import-from-here/shared/models/theming/ChromeDefinition.js +2 -0
- package/internal-do-not-import-from-here/shared/models/theming/SharedBlueprintMethods.d.ts +2 -2
- package/internal-do-not-import-from-here/shared/models/theming/SharedBlueprintMethods.js +8 -7
- package/internal-do-not-import-from-here/shared/models/theming/SpacingSetting.d.ts +5 -4
- package/internal-do-not-import-from-here/shared/models/theming/SpacingSetting.js +1 -1
- package/internal-do-not-import-from-here/shared/models/theming/ThemeDefinitionV2.d.ts +4 -11
- package/internal-do-not-import-from-here/shared/models/theming/ThemeDefinitionV2.js +3 -10
- package/internal-do-not-import-from-here/shared/models/theming/TypographyDefinition.d.ts +8 -4
- package/internal-do-not-import-from-here/shared/models/theming/TypographyDefinition.js +2 -3
- package/internal-do-not-import-from-here/shared/models/theming/UseThemeMethods.d.ts +3 -5
- package/internal-do-not-import-from-here/shared/models/theming/UseThemeMethods.js +4 -33
- package/internal-do-not-import-from-here/shared/models/theming/index.d.ts +1 -0
- package/internal-do-not-import-from-here/shared/models/theming/index.js +1 -0
- package/internal-do-not-import-from-here/shared/models/velcron/VelcronDefinition.d.ts +87 -0
- package/internal-do-not-import-from-here/shared/models/velcron/VelcronDefinition.js +2 -0
- package/internal-do-not-import-from-here/shared/models/velcron/VelcronEvents.js +2 -0
- package/internal-do-not-import-from-here/shared/models/velcron/index.d.ts +2 -0
- package/internal-do-not-import-from-here/shared/models/velcron/index.js +5 -0
- package/models/ActionHooks.d.ts +12 -0
- package/models/ActionHooks.js +2 -0
- package/models/Enums.d.ts +6 -0
- package/models/Enums.js +14 -7
- package/models/VelcronDefinitions.d.ts +101 -91
- package/models/VelcronDefinitions.js +2 -2
- package/models/VelcronPropertyEditorDefinitions.d.ts +293 -17
- package/models/VelcronPropertyEditorDefinitions.js +116 -2
- package/models/VelcronTypes.d.ts +1 -1
- package/models/ViewModelAndContext.d.ts +1 -1
- package/models/index.d.ts +1 -1
- package/models/index.js +1 -1
- package/package.json +1 -1
- package/parser/VelcronActions.d.ts +8 -2
- package/parser/VelcronActions.js +24 -4
- package/parser/VelcronConstants.d.ts +17 -5
- package/parser/VelcronConstants.js +19 -7
- package/parser/VelcronData.d.ts +4 -3
- package/parser/VelcronData.js +58 -54
- package/parser/VelcronPropertyEditors.d.ts +9 -0
- package/parser/VelcronPropertyEditors.js +40 -0
- package/parser/VelcronRenderers.d.ts +2 -1
- package/parser/VelcronRenderers.js +22 -22
- package/parser/VelcronStyles.d.ts +2 -1
- package/parser/VelcronStyles.js +181 -72
- package/parser/index.d.ts +1 -0
- package/parser/index.js +1 -0
- package/stores/ReactivitySystem.d.ts +2 -2
- package/stores/ReactivitySystem.js +1 -1
- package/stores/VelcronColorSchema.d.ts +10 -9
- package/stores/VelcronTheming.d.ts +4 -3
- package/stores/VelcronTheming.js +15 -3
- package/stores/index.d.ts +0 -1
- package/stores/index.js +1 -1
- package/templatebuilder/editor/VelcronColorSchemaEditor.d.ts +9 -0
- package/templatebuilder/editor/VelcronColorSchemaEditor.js +28 -0
- package/templatebuilder/editor/VelcronContentEditor.d.ts +38 -0
- package/templatebuilder/editor/VelcronContentEditor.js +206 -0
- package/templatebuilder/editor/VelcronEditorBuilder.d.ts +16 -0
- package/templatebuilder/editor/VelcronEditorBuilder.js +50 -0
- package/templatebuilder/editor/VelcronEditorBuilder2.d.ts +15 -0
- package/templatebuilder/editor/VelcronEditorBuilder2.js +106 -0
- package/templatebuilder/editor/VelcronEditorBuilderBase.d.ts +9 -0
- package/templatebuilder/editor/VelcronEditorBuilderBase.js +16 -0
- package/templatebuilder/editor/VelcronImageEditor.d.ts +11 -0
- package/templatebuilder/editor/VelcronImageEditor.js +30 -0
- package/templatebuilder/editor/VelcronPropertyMappingEditorBuilder.d.ts +9 -0
- package/templatebuilder/editor/VelcronPropertyMappingEditorBuilder.js +30 -0
- package/templatebuilder/index.d.ts +2 -0
- package/templatebuilder/index.js +5 -0
- package/templatebuilder/state/VelcronBlockHeaderStateBuilder.d.ts +0 -0
- package/templatebuilder/state/VelcronBlockHeaderStateBuilder.js +38 -0
- package/templatebuilder/state/VelcronColorSchemaBuilder.d.ts +16 -0
- package/templatebuilder/state/VelcronColorSchemaBuilder.js +32 -0
- package/templatebuilder/state/VelcronContentStateBuilder.d.ts +11 -0
- package/templatebuilder/state/VelcronContentStateBuilder.js +47 -0
- package/templatebuilder/state/VelcronImageStateBuilder.d.ts +18 -0
- package/templatebuilder/state/VelcronImageStateBuilder.js +49 -0
- package/templatebuilder/state/VelcronPropertyMappingStateBuilder.d.ts +12 -0
- package/templatebuilder/state/VelcronPropertyMappingStateBuilder.js +35 -0
- package/templatebuilder/state/VelcronStateBuilder.d.ts +16 -0
- package/templatebuilder/state/VelcronStateBuilder.js +42 -0
- package/templatebuilder/state/VelcronStateBuilderBase.d.ts +12 -0
- package/templatebuilder/state/VelcronStateBuilderBase.js +19 -0
- package/templatebuilder/state/VelcronTextContentBuilder.d.ts +32 -0
- package/templatebuilder/state/VelcronTextContentBuilder.js +110 -0
- package/templatebuilder/useVelcronEditorBuilder.d.ts +2 -0
- package/templatebuilder/useVelcronEditorBuilder.js +9 -0
- package/templatebuilder/useVelcronTemplateBuilder.d.ts +6 -0
- package/templatebuilder/useVelcronTemplateBuilder.js +13 -0
- package/internal-do-not-import-from-here/shared/models/Bring.d.ts +0 -23
- package/stores/VelcronBlueprint.d.ts +0 -39
- package/stores/VelcronBlueprint.js +0 -55
- /package/internal-do-not-import-from-here/shared/models/{Bring.js → DynamicState.js} +0 -0
- /package/{models/VelcronEvents.js → internal-do-not-import-from-here/shared/models/HttpCommon.js} +0 -0
- /package/{models → internal-do-not-import-from-here/shared/models/velcron}/VelcronEvents.d.ts +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function getSpacingValueFromBlueprint(spacingValue: any,
|
|
1
|
+
import { SpacingDefinition } from "./SpacingSetting";
|
|
2
|
+
export declare function getSpacingValueFromBlueprint(spacingValue: any, definition: SpacingDefinition): number;
|
|
@@ -1,32 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
// import { SpacingDefinition, SpacingTypes } from "@omnia/fx-models";
|
|
2
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
4
|
exports.getSpacingValueFromBlueprint = void 0;
|
|
4
5
|
const SpacingSetting_1 = require("./SpacingSetting");
|
|
5
|
-
function getSpacingValueFromBlueprint(spacingValue,
|
|
6
|
+
function getSpacingValueFromBlueprint(spacingValue, definition) {
|
|
6
7
|
if (!spacingValue) {
|
|
7
8
|
return 0;
|
|
8
9
|
}
|
|
9
10
|
let negative = false;
|
|
10
11
|
let result = spacingValue;
|
|
11
|
-
if (isNaN(spacingValue) &&
|
|
12
|
+
if (isNaN(spacingValue) && definition) {
|
|
12
13
|
if (spacingValue.startsWith("-")) {
|
|
13
14
|
negative = true;
|
|
14
15
|
}
|
|
15
16
|
spacingValue = spacingValue.replace("-", "");
|
|
16
17
|
if (spacingValue === SpacingSetting_1.SpacingTypes.xs) {
|
|
17
|
-
result =
|
|
18
|
+
result = definition.xs;
|
|
18
19
|
}
|
|
19
20
|
else if (spacingValue === SpacingSetting_1.SpacingTypes.s) {
|
|
20
|
-
result =
|
|
21
|
+
result = definition.s;
|
|
21
22
|
}
|
|
22
23
|
else if (spacingValue === SpacingSetting_1.SpacingTypes.m) {
|
|
23
|
-
result =
|
|
24
|
+
result = definition.m;
|
|
24
25
|
}
|
|
25
26
|
else if (spacingValue === SpacingSetting_1.SpacingTypes.l) {
|
|
26
|
-
result =
|
|
27
|
+
result = definition.l;
|
|
27
28
|
}
|
|
28
29
|
else if (spacingValue === SpacingSetting_1.SpacingTypes.xl) {
|
|
29
|
-
result =
|
|
30
|
+
result = definition.xl;
|
|
30
31
|
}
|
|
31
32
|
else {
|
|
32
33
|
result = 0;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { Guid } from "../Guid";
|
|
2
2
|
export interface SpacingSettings {
|
|
3
|
-
top
|
|
4
|
-
right
|
|
5
|
-
bottom
|
|
6
|
-
left
|
|
3
|
+
top?: number | SpacingType;
|
|
4
|
+
right?: number | SpacingType;
|
|
5
|
+
bottom?: number | SpacingType;
|
|
6
|
+
left?: number | SpacingType;
|
|
7
7
|
}
|
|
8
8
|
export interface SpacingDefinition {
|
|
9
|
+
name: string;
|
|
9
10
|
id: Guid;
|
|
10
11
|
xs: number;
|
|
11
12
|
s: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Guid } from "../Guid";
|
|
2
|
-
import {
|
|
2
|
+
import { BlueprintDefinition } from "./BlueprintDefinition";
|
|
3
3
|
export interface ColorTypeResult<resultType> {
|
|
4
4
|
base: resultType;
|
|
5
5
|
baseTone: resultType;
|
|
@@ -48,9 +48,9 @@ export interface ThemeDefinitionV2 {
|
|
|
48
48
|
name: string;
|
|
49
49
|
dark: boolean;
|
|
50
50
|
colors: ColorSchemas;
|
|
51
|
-
blueprints:
|
|
51
|
+
blueprints: BlueprintDefinition[];
|
|
52
52
|
}
|
|
53
|
-
export type ColorSchemaType =
|
|
53
|
+
export type ColorSchemaType = keyof typeof ColorSchemaTypes;
|
|
54
54
|
export declare enum ColorSchemaTypes {
|
|
55
55
|
primary = "primary",
|
|
56
56
|
secondary = "secondary",
|
|
@@ -62,14 +62,7 @@ export declare enum ColorSchemaTypes {
|
|
|
62
62
|
error = "error",
|
|
63
63
|
info = "info"
|
|
64
64
|
}
|
|
65
|
-
export type
|
|
66
|
-
export declare enum BlueprintTypes {
|
|
67
|
-
default = "default",
|
|
68
|
-
variant1 = "variant1",
|
|
69
|
-
variant2 = "variant2",
|
|
70
|
-
variant3 = "variant3"
|
|
71
|
-
}
|
|
72
|
-
export type ColorType = "base" | "onBase" | "container" | "onContainer";
|
|
65
|
+
export type ColorType = keyof typeof ColorTypes;
|
|
73
66
|
export declare enum ColorTypes {
|
|
74
67
|
base = "base",
|
|
75
68
|
onBase = "onBase",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ColorTypes = exports.
|
|
3
|
+
exports.ColorTypes = exports.ColorSchemaTypes = void 0;
|
|
4
4
|
var ColorSchemaTypes;
|
|
5
5
|
(function (ColorSchemaTypes) {
|
|
6
6
|
ColorSchemaTypes["primary"] = "primary";
|
|
@@ -12,18 +12,11 @@ var ColorSchemaTypes;
|
|
|
12
12
|
ColorSchemaTypes["background"] = "background";
|
|
13
13
|
ColorSchemaTypes["error"] = "error";
|
|
14
14
|
ColorSchemaTypes["info"] = "info";
|
|
15
|
-
})(ColorSchemaTypes
|
|
16
|
-
var BlueprintTypes;
|
|
17
|
-
(function (BlueprintTypes) {
|
|
18
|
-
BlueprintTypes["default"] = "default";
|
|
19
|
-
BlueprintTypes["variant1"] = "variant1";
|
|
20
|
-
BlueprintTypes["variant2"] = "variant2";
|
|
21
|
-
BlueprintTypes["variant3"] = "variant3";
|
|
22
|
-
})(BlueprintTypes = exports.BlueprintTypes || (exports.BlueprintTypes = {}));
|
|
15
|
+
})(ColorSchemaTypes || (exports.ColorSchemaTypes = ColorSchemaTypes = {}));
|
|
23
16
|
var ColorTypes;
|
|
24
17
|
(function (ColorTypes) {
|
|
25
18
|
ColorTypes["base"] = "base";
|
|
26
19
|
ColorTypes["onBase"] = "onBase";
|
|
27
20
|
ColorTypes["container"] = "container";
|
|
28
21
|
ColorTypes["onContainer"] = "onContainer";
|
|
29
|
-
})(ColorTypes
|
|
22
|
+
})(ColorTypes || (exports.ColorTypes = ColorTypes = {}));
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { Guid } from "../Guid";
|
|
2
2
|
export interface TypographyDefinition {
|
|
3
3
|
id: Guid;
|
|
4
|
+
name: string;
|
|
5
|
+
font?: {
|
|
6
|
+
family: string;
|
|
7
|
+
cdn?: string;
|
|
8
|
+
};
|
|
4
9
|
title: {
|
|
5
10
|
xl: TypographyTypeDefinition;
|
|
6
11
|
l: TypographyTypeDefinition;
|
|
@@ -33,14 +38,13 @@ export interface TypographyTypeBreakPoint {
|
|
|
33
38
|
size: number;
|
|
34
39
|
lineHeight: number;
|
|
35
40
|
}
|
|
36
|
-
export type TypographyType =
|
|
41
|
+
export type TypographyType = keyof typeof TypographyTypes;
|
|
37
42
|
export declare enum TypographyTypes {
|
|
38
43
|
title = "title",
|
|
39
44
|
text = "text",
|
|
40
|
-
navigation = "navigation"
|
|
41
|
-
link = "link"
|
|
45
|
+
navigation = "navigation"
|
|
42
46
|
}
|
|
43
|
-
export type TypographySize =
|
|
47
|
+
export type TypographySize = keyof typeof TypographySizes;
|
|
44
48
|
export declare enum TypographySizes {
|
|
45
49
|
xl = "xl",
|
|
46
50
|
l = "l",
|
|
@@ -6,8 +6,7 @@ var TypographyTypes;
|
|
|
6
6
|
TypographyTypes["title"] = "title";
|
|
7
7
|
TypographyTypes["text"] = "text";
|
|
8
8
|
TypographyTypes["navigation"] = "navigation";
|
|
9
|
-
|
|
10
|
-
})(TypographyTypes = exports.TypographyTypes || (exports.TypographyTypes = {}));
|
|
9
|
+
})(TypographyTypes || (exports.TypographyTypes = TypographyTypes = {}));
|
|
11
10
|
var TypographySizes;
|
|
12
11
|
(function (TypographySizes) {
|
|
13
12
|
TypographySizes["xl"] = "xl";
|
|
@@ -15,4 +14,4 @@ var TypographySizes;
|
|
|
15
14
|
TypographySizes["m"] = "m";
|
|
16
15
|
TypographySizes["s"] = "s";
|
|
17
16
|
TypographySizes["xs"] = "xs";
|
|
18
|
-
})(TypographySizes
|
|
17
|
+
})(TypographySizes || (exports.TypographySizes = TypographySizes = {}));
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { BlueprintDefinition } from "./BlueprintDefinition";
|
|
1
|
+
import { ColorDefinition, ColorSchema, ColorSchemaType, ColorSchemaTypes, ColorType, ColorTypes } from "./ThemeDefinitionV2";
|
|
2
|
+
import { BlueprintDefinition, BlueprintType } from "./BlueprintDefinition";
|
|
4
3
|
export declare function useThemeMethods(getThemeDefinition: () => any): {
|
|
5
4
|
colorSchema: (colorSchemaType: ColorSchemaTypes | ColorSchemaType) => ColorSchema;
|
|
6
|
-
|
|
7
|
-
typography: (blueprintType: BlueprintTypes | BlueprintType, typographyType: TypographyTypes | TypographyType, size: TypographySize | TypographySizes) => TypographyTypeDefinition;
|
|
5
|
+
bluePrintbyType: <TType extends BlueprintDefinition>(type: BlueprintType) => TType;
|
|
8
6
|
color: (colorSchemaType: ColorSchemaTypes | ColorSchemaType, colorType: ColorTypes | ColorType) => string;
|
|
9
7
|
colorDefinition: (colorSchemaType: ColorSchemaTypes | ColorSchemaType, colorType: ColorTypes | ColorType) => ColorDefinition;
|
|
10
8
|
complementaryColorType: (colorType: ColorTypes | ColorType) => ColorTypes;
|
|
@@ -3,9 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.useThemeMethods = void 0;
|
|
4
4
|
//import { ThemeDefinitionInstance } from "@omnia/fx/ux";
|
|
5
5
|
const ThemeDefinitionV2_1 = require("./ThemeDefinitionV2");
|
|
6
|
-
const TypographyDefinition_1 = require("./TypographyDefinition");
|
|
7
6
|
// temp change ThemeDefinitionInstance to any because fx/shared can't reference higher level fx/ux
|
|
8
7
|
function useThemeMethods(getThemeDefinition) {
|
|
8
|
+
function bluePrintbyType(type) {
|
|
9
|
+
return getThemeDefinition().blueprints.find(x => x.type === type);
|
|
10
|
+
}
|
|
9
11
|
function colorSchema(colorSchemaType) {
|
|
10
12
|
if (colorSchemaType === ThemeDefinitionV2_1.ColorSchemaTypes.primary) {
|
|
11
13
|
return getThemeDefinition().colors.primary;
|
|
@@ -33,36 +35,6 @@ function useThemeMethods(getThemeDefinition) {
|
|
|
33
35
|
}
|
|
34
36
|
return getThemeDefinition().colors.background;
|
|
35
37
|
}
|
|
36
|
-
function blueprint(blueprintType) {
|
|
37
|
-
if (blueprintType === ThemeDefinitionV2_1.BlueprintTypes.default) {
|
|
38
|
-
return getThemeDefinition().blueprints.default;
|
|
39
|
-
}
|
|
40
|
-
else if (blueprintType === ThemeDefinitionV2_1.BlueprintTypes.variant1) {
|
|
41
|
-
return getThemeDefinition().blueprints.variant1;
|
|
42
|
-
}
|
|
43
|
-
else if (blueprintType === ThemeDefinitionV2_1.BlueprintTypes.variant2) {
|
|
44
|
-
return getThemeDefinition().blueprints.variant2;
|
|
45
|
-
}
|
|
46
|
-
else if (blueprintType === ThemeDefinitionV2_1.BlueprintTypes.variant3) {
|
|
47
|
-
return getThemeDefinition().blueprints.variant3;
|
|
48
|
-
}
|
|
49
|
-
return getThemeDefinition().blueprints.default;
|
|
50
|
-
}
|
|
51
|
-
function typography(blueprintType, typographyType, size) {
|
|
52
|
-
const typographyBlueprint = getThemeDefinition().blueprints[blueprintType].definitions.find(d => d.type === "typography");
|
|
53
|
-
if (typographyType === TypographyDefinition_1.TypographyTypes.text) {
|
|
54
|
-
return typographyBlueprint.definition.text[size];
|
|
55
|
-
}
|
|
56
|
-
else if (typographyType === TypographyDefinition_1.TypographyTypes.title) {
|
|
57
|
-
return typographyBlueprint.definition.title[size];
|
|
58
|
-
}
|
|
59
|
-
else if (typographyType === TypographyDefinition_1.TypographyTypes.navigation) {
|
|
60
|
-
return typographyBlueprint.definition[size];
|
|
61
|
-
}
|
|
62
|
-
else if (typographyType === TypographyDefinition_1.TypographyTypes.link) {
|
|
63
|
-
return typographyBlueprint.definition.link[TypographyDefinition_1.TypographySizes.m];
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
38
|
function color(colorSchemaType, colorType) {
|
|
67
39
|
const mappedColorSchema = colorSchema(colorSchemaType);
|
|
68
40
|
if (colorType === ThemeDefinitionV2_1.ColorTypes.base) {
|
|
@@ -120,8 +92,7 @@ function useThemeMethods(getThemeDefinition) {
|
|
|
120
92
|
}
|
|
121
93
|
return {
|
|
122
94
|
colorSchema,
|
|
123
|
-
|
|
124
|
-
typography,
|
|
95
|
+
bluePrintbyType,
|
|
125
96
|
color,
|
|
126
97
|
colorDefinition,
|
|
127
98
|
complementaryColorType,
|
|
@@ -9,3 +9,4 @@ tslib_1.__exportStar(require("./BlueprintDefinition"), exports);
|
|
|
9
9
|
tslib_1.__exportStar(require("./SpacingSetting"), exports);
|
|
10
10
|
tslib_1.__exportStar(require("./SharedBlueprintMethods"), exports);
|
|
11
11
|
tslib_1.__exportStar(require("./SharedColorMethods"), exports);
|
|
12
|
+
tslib_1.__exportStar(require("./ChromeDefinition"), exports);
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { DynamicState } from "../DynamicState";
|
|
2
|
+
import { VelcronEvent, VelcronOnEditModeEvent, VelcronOnLoadEvent } from "./VelcronEvents";
|
|
3
|
+
/**
|
|
4
|
+
* Velcron definition base
|
|
5
|
+
*/
|
|
6
|
+
export interface VelcronDefinitionBase {
|
|
7
|
+
/**
|
|
8
|
+
* The component type
|
|
9
|
+
*/
|
|
10
|
+
type: string;
|
|
11
|
+
/**
|
|
12
|
+
* Custom friendly name of the definition
|
|
13
|
+
*/
|
|
14
|
+
name?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Used for render cache if not specified we auto set it.
|
|
17
|
+
*/
|
|
18
|
+
key?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface VelcronDefinition extends VelcronDefinitionBase, VelcronDimensionStyling {
|
|
21
|
+
body?: Array<VelcronDefinition>;
|
|
22
|
+
style?: VelcronStyling;
|
|
23
|
+
foreach?: string;
|
|
24
|
+
if?: string;
|
|
25
|
+
events?: VelcronEvent;
|
|
26
|
+
}
|
|
27
|
+
export interface VelcronSpacing {
|
|
28
|
+
top?: number | string;
|
|
29
|
+
right?: number | string;
|
|
30
|
+
bottom?: number | string;
|
|
31
|
+
left?: number | string;
|
|
32
|
+
}
|
|
33
|
+
interface VelcronDimensionStyling {
|
|
34
|
+
margin?: VelcronSpacing;
|
|
35
|
+
padding?: VelcronSpacing;
|
|
36
|
+
}
|
|
37
|
+
export interface VelcronStyling {
|
|
38
|
+
margin?: number;
|
|
39
|
+
marginTop?: number;
|
|
40
|
+
marginRight?: number;
|
|
41
|
+
marginBottom?: number;
|
|
42
|
+
marginLeft?: number;
|
|
43
|
+
padding?: number;
|
|
44
|
+
paddingTop?: number;
|
|
45
|
+
paddingRight?: number;
|
|
46
|
+
paddingBottom?: number;
|
|
47
|
+
paddingLeft?: number;
|
|
48
|
+
height?: number | string;
|
|
49
|
+
width?: number | string;
|
|
50
|
+
}
|
|
51
|
+
export interface VelcronComponentDefinition extends VelcronDefinition {
|
|
52
|
+
type: string;
|
|
53
|
+
events?: any;
|
|
54
|
+
properties?: {
|
|
55
|
+
[name: string]: any;
|
|
56
|
+
};
|
|
57
|
+
icon?: any;
|
|
58
|
+
}
|
|
59
|
+
export type VelcronCustomComponentDefinition = VelcronComponentDefinition;
|
|
60
|
+
export type BuiltInPropertyEditorType = "text" | "slider" | "switch" | "alignment" | "color" | "markdown" | "icon" | "image" | "typography" | "color-schema-type" | "spacing";
|
|
61
|
+
export interface VelcronPropertyEditor<TSettings = any> {
|
|
62
|
+
name?: string;
|
|
63
|
+
category?: string;
|
|
64
|
+
type: BuiltInPropertyEditorType | string;
|
|
65
|
+
settings?: TSettings;
|
|
66
|
+
stateMapping?: string;
|
|
67
|
+
propertyMapping?: boolean;
|
|
68
|
+
multiple?: boolean;
|
|
69
|
+
component?: unknown;
|
|
70
|
+
}
|
|
71
|
+
export interface VelcronAppDefinition<TState extends DynamicState = DynamicState> extends VelcronDefinitionBase {
|
|
72
|
+
type: "velcron";
|
|
73
|
+
version?: string;
|
|
74
|
+
name?: string;
|
|
75
|
+
body?: Array<VelcronDefinition>;
|
|
76
|
+
events?: VelcronOnLoadEvent & VelcronOnEditModeEvent;
|
|
77
|
+
actions?: {
|
|
78
|
+
[name: string]: Array<string>;
|
|
79
|
+
};
|
|
80
|
+
components?: Array<VelcronCustomComponentDefinition>;
|
|
81
|
+
propEditors?: Array<VelcronPropertyEditor>;
|
|
82
|
+
state?: TState;
|
|
83
|
+
computed?: {
|
|
84
|
+
[name: string]: Array<string>;
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface VelcronActionHooks<TBefore = any, TAfter = any> {
|
|
2
|
+
beforeHandler?: (args: TBefore) => TBefore;
|
|
3
|
+
afterHandler?: (args: TBefore) => TAfter;
|
|
4
|
+
}
|
|
5
|
+
export interface HttpGetBeforeActionHookArgs {
|
|
6
|
+
url: string;
|
|
7
|
+
requestInit: RequestInit;
|
|
8
|
+
}
|
|
9
|
+
export interface HttpGetAfterActionHookArgs {
|
|
10
|
+
json: string;
|
|
11
|
+
response: Response;
|
|
12
|
+
}
|
package/models/Enums.d.ts
CHANGED
|
@@ -16,6 +16,12 @@ export declare enum VelcronActionTypes {
|
|
|
16
16
|
export declare enum VelcronIconTypes {
|
|
17
17
|
fontAwesome = "fa"
|
|
18
18
|
}
|
|
19
|
+
export declare enum VelcronViewDirections {
|
|
20
|
+
row = "row",
|
|
21
|
+
column = "column",
|
|
22
|
+
rowReverse = "row-reverse",
|
|
23
|
+
columnRevers = "column-reverse"
|
|
24
|
+
}
|
|
19
25
|
export declare enum VelcronHorizontalAlignments {
|
|
20
26
|
left = "left",
|
|
21
27
|
center = "center",
|
package/models/Enums.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.VelcronDataTypes = exports.VelcronVerticalAlignments = exports.VelcronHorizontalAlignments = exports.VelcronIconTypes = exports.VelcronActionTypes = exports.AssignOperators = void 0;
|
|
3
|
+
exports.VelcronDataTypes = exports.VelcronVerticalAlignments = exports.VelcronHorizontalAlignments = exports.VelcronViewDirections = exports.VelcronIconTypes = exports.VelcronActionTypes = exports.AssignOperators = void 0;
|
|
4
4
|
var AssignOperators;
|
|
5
5
|
(function (AssignOperators) {
|
|
6
6
|
AssignOperators["equals"] = "=";
|
|
@@ -10,30 +10,37 @@ var AssignOperators;
|
|
|
10
10
|
AssignOperators["plusPlus"] = "++";
|
|
11
11
|
AssignOperators["minusMinus"] = "--";
|
|
12
12
|
AssignOperators["equalsExclamation"] = "=!";
|
|
13
|
-
})(AssignOperators
|
|
13
|
+
})(AssignOperators || (exports.AssignOperators = AssignOperators = {}));
|
|
14
14
|
var VelcronActionTypes;
|
|
15
15
|
(function (VelcronActionTypes) {
|
|
16
16
|
VelcronActionTypes[VelcronActionTypes["getOrSetValue"] = 0] = "getOrSetValue";
|
|
17
17
|
VelcronActionTypes[VelcronActionTypes["promise"] = 1] = "promise";
|
|
18
18
|
VelcronActionTypes[VelcronActionTypes["condition"] = 2] = "condition";
|
|
19
19
|
VelcronActionTypes[VelcronActionTypes["returnsValue"] = 3] = "returnsValue";
|
|
20
|
-
})(VelcronActionTypes
|
|
20
|
+
})(VelcronActionTypes || (exports.VelcronActionTypes = VelcronActionTypes = {}));
|
|
21
21
|
var VelcronIconTypes;
|
|
22
22
|
(function (VelcronIconTypes) {
|
|
23
23
|
VelcronIconTypes["fontAwesome"] = "fa";
|
|
24
|
-
})(VelcronIconTypes
|
|
24
|
+
})(VelcronIconTypes || (exports.VelcronIconTypes = VelcronIconTypes = {}));
|
|
25
|
+
var VelcronViewDirections;
|
|
26
|
+
(function (VelcronViewDirections) {
|
|
27
|
+
VelcronViewDirections["row"] = "row";
|
|
28
|
+
VelcronViewDirections["column"] = "column";
|
|
29
|
+
VelcronViewDirections["rowReverse"] = "row-reverse";
|
|
30
|
+
VelcronViewDirections["columnRevers"] = "column-reverse";
|
|
31
|
+
})(VelcronViewDirections || (exports.VelcronViewDirections = VelcronViewDirections = {}));
|
|
25
32
|
var VelcronHorizontalAlignments;
|
|
26
33
|
(function (VelcronHorizontalAlignments) {
|
|
27
34
|
VelcronHorizontalAlignments["left"] = "left";
|
|
28
35
|
VelcronHorizontalAlignments["center"] = "center";
|
|
29
36
|
VelcronHorizontalAlignments["right"] = "right";
|
|
30
|
-
})(VelcronHorizontalAlignments
|
|
37
|
+
})(VelcronHorizontalAlignments || (exports.VelcronHorizontalAlignments = VelcronHorizontalAlignments = {}));
|
|
31
38
|
var VelcronVerticalAlignments;
|
|
32
39
|
(function (VelcronVerticalAlignments) {
|
|
33
40
|
VelcronVerticalAlignments["top"] = "top";
|
|
34
41
|
VelcronVerticalAlignments["center"] = "center";
|
|
35
42
|
VelcronVerticalAlignments["bottom"] = "bottom";
|
|
36
|
-
})(VelcronVerticalAlignments
|
|
43
|
+
})(VelcronVerticalAlignments || (exports.VelcronVerticalAlignments = VelcronVerticalAlignments = {}));
|
|
37
44
|
var VelcronDataTypes;
|
|
38
45
|
(function (VelcronDataTypes) {
|
|
39
46
|
//Unknown = null
|
|
@@ -45,4 +52,4 @@ var VelcronDataTypes;
|
|
|
45
52
|
VelcronDataTypes["array"] = "array";
|
|
46
53
|
VelcronDataTypes["componentArray"] = "componentArray";
|
|
47
54
|
VelcronDataTypes["bind"] = "bind";
|
|
48
|
-
})(VelcronDataTypes
|
|
55
|
+
})(VelcronDataTypes || (exports.VelcronDataTypes = VelcronDataTypes = {}));
|