@omnia/velcron 8.0.102-vnext → 8.0.103-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/Array.js +9 -2
- package/actions/Clone.d.ts +2 -0
- package/actions/Clone.js +11 -0
- package/actions/Http.js +23 -6
- package/actions/index.d.ts +1 -0
- package/actions/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/ChromeDefinition.d.ts +25 -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/ComponentDefinitions.d.ts +88 -0
- package/internal-do-not-import-from-here/shared/models/theming/ComponentDefinitions.js +12 -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 +22 -13
- package/internal-do-not-import-from-here/shared/models/theming/ThemeDefinitionV2.js +8 -10
- package/internal-do-not-import-from-here/shared/models/theming/TypographyDefinition.d.ts +5 -0
- package/internal-do-not-import-from-here/shared/models/theming/TypographyDefinition.js +2 -2
- 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 -30
- package/internal-do-not-import-from-here/shared/models/theming/index.d.ts +2 -2
- package/internal-do-not-import-from-here/shared/models/theming/index.js +3 -2
- 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.js +7 -7
- package/models/VelcronDefinitions.d.ts +76 -86
- package/models/VelcronDefinitions.js +1 -1
- package/models/VelcronPropertyEditorDefinitions.d.ts +229 -16
- package/models/VelcronPropertyEditorDefinitions.js +114 -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 +7 -1
- package/parser/VelcronActions.js +20 -3
- package/parser/VelcronConstants.d.ts +6 -1
- package/parser/VelcronConstants.js +7 -2
- package/parser/VelcronData.d.ts +3 -2
- package/parser/VelcronData.js +13 -12
- package/parser/VelcronPropertyEditors.js +1 -1
- package/parser/VelcronRenderers.d.ts +2 -1
- package/parser/VelcronRenderers.js +18 -19
- package/parser/VelcronStyles.d.ts +2 -1
- package/parser/VelcronStyles.js +168 -65
- package/stores/ReactivitySystem.d.ts +2 -2
- package/stores/ReactivitySystem.js +1 -1
- package/stores/VelcronColorSchema.d.ts +9 -8
- 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/VelcronEditorBuilder2.d.ts +15 -0
- package/templatebuilder/editor/VelcronEditorBuilder2.js +106 -0
- package/templatebuilder/editor/VelcronEditorBuilderBase.d.ts +1 -1
- package/templatebuilder/index.d.ts +1 -0
- package/templatebuilder/index.js +1 -0
- package/templatebuilder/state/VelcronBlockHeaderStateBuilder.d.ts +0 -0
- package/templatebuilder/state/VelcronBlockHeaderStateBuilder.js +38 -0
- package/templatebuilder/useVelcronEditorBuilder.d.ts +2 -0
- package/templatebuilder/useVelcronEditorBuilder.js +9 -0
- package/internal-do-not-import-from-here/shared/models/Bring.d.ts +0 -23
- package/internal-do-not-import-from-here/shared/models/theming/BlueprintDefinition.d.ts +0 -63
- package/internal-do-not-import-from-here/shared/models/theming/BlueprintDefinition.js +0 -18
- package/internal-do-not-import-from-here/shared/models/theming/OmniaThemes.d.ts +0 -5
- package/internal-do-not-import-from-here/shared/models/theming/OmniaThemes.js +0 -18
- 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
|
@@ -6,7 +6,7 @@ var TypographyTypes;
|
|
|
6
6
|
TypographyTypes["title"] = "title";
|
|
7
7
|
TypographyTypes["text"] = "text";
|
|
8
8
|
TypographyTypes["navigation"] = "navigation";
|
|
9
|
-
})(TypographyTypes
|
|
9
|
+
})(TypographyTypes || (exports.TypographyTypes = TypographyTypes = {}));
|
|
10
10
|
var TypographySizes;
|
|
11
11
|
(function (TypographySizes) {
|
|
12
12
|
TypographySizes["xl"] = "xl";
|
|
@@ -14,4 +14,4 @@ var TypographySizes;
|
|
|
14
14
|
TypographySizes["m"] = "m";
|
|
15
15
|
TypographySizes["s"] = "s";
|
|
16
16
|
TypographySizes["xs"] = "xs";
|
|
17
|
-
})(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 "./ComponentDefinitions";
|
|
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,33 +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
|
-
}
|
|
63
38
|
function color(colorSchemaType, colorType) {
|
|
64
39
|
const mappedColorSchema = colorSchema(colorSchemaType);
|
|
65
40
|
if (colorType === ThemeDefinitionV2_1.ColorTypes.base) {
|
|
@@ -117,8 +92,7 @@ function useThemeMethods(getThemeDefinition) {
|
|
|
117
92
|
}
|
|
118
93
|
return {
|
|
119
94
|
colorSchema,
|
|
120
|
-
|
|
121
|
-
typography,
|
|
95
|
+
bluePrintbyType,
|
|
122
96
|
color,
|
|
123
97
|
colorDefinition,
|
|
124
98
|
complementaryColorType,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export * from "./ThemeDefinitionV2";
|
|
2
2
|
export * from "./TypographyDefinition";
|
|
3
|
-
export * from "./OmniaThemes";
|
|
4
3
|
export * from "./UseThemeMethods";
|
|
5
|
-
export * from "./
|
|
4
|
+
export * from "./ComponentDefinitions";
|
|
6
5
|
export * from "./SpacingSetting";
|
|
7
6
|
export * from "./SharedBlueprintMethods";
|
|
8
7
|
export * from "./SharedColorMethods";
|
|
8
|
+
export * from "./ChromeDefinition";
|
|
@@ -3,9 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
tslib_1.__exportStar(require("./ThemeDefinitionV2"), exports);
|
|
5
5
|
tslib_1.__exportStar(require("./TypographyDefinition"), exports);
|
|
6
|
-
|
|
6
|
+
//export * from "./OmniaThemes";
|
|
7
7
|
tslib_1.__exportStar(require("./UseThemeMethods"), exports);
|
|
8
|
-
tslib_1.__exportStar(require("./
|
|
8
|
+
tslib_1.__exportStar(require("./ComponentDefinitions"), 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.js
CHANGED
|
@@ -10,37 +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
25
|
var VelcronViewDirections;
|
|
26
26
|
(function (VelcronViewDirections) {
|
|
27
27
|
VelcronViewDirections["row"] = "row";
|
|
28
28
|
VelcronViewDirections["column"] = "column";
|
|
29
29
|
VelcronViewDirections["rowReverse"] = "row-reverse";
|
|
30
30
|
VelcronViewDirections["columnRevers"] = "column-reverse";
|
|
31
|
-
})(VelcronViewDirections
|
|
31
|
+
})(VelcronViewDirections || (exports.VelcronViewDirections = VelcronViewDirections = {}));
|
|
32
32
|
var VelcronHorizontalAlignments;
|
|
33
33
|
(function (VelcronHorizontalAlignments) {
|
|
34
34
|
VelcronHorizontalAlignments["left"] = "left";
|
|
35
35
|
VelcronHorizontalAlignments["center"] = "center";
|
|
36
36
|
VelcronHorizontalAlignments["right"] = "right";
|
|
37
|
-
})(VelcronHorizontalAlignments
|
|
37
|
+
})(VelcronHorizontalAlignments || (exports.VelcronHorizontalAlignments = VelcronHorizontalAlignments = {}));
|
|
38
38
|
var VelcronVerticalAlignments;
|
|
39
39
|
(function (VelcronVerticalAlignments) {
|
|
40
40
|
VelcronVerticalAlignments["top"] = "top";
|
|
41
41
|
VelcronVerticalAlignments["center"] = "center";
|
|
42
42
|
VelcronVerticalAlignments["bottom"] = "bottom";
|
|
43
|
-
})(VelcronVerticalAlignments
|
|
43
|
+
})(VelcronVerticalAlignments || (exports.VelcronVerticalAlignments = VelcronVerticalAlignments = {}));
|
|
44
44
|
var VelcronDataTypes;
|
|
45
45
|
(function (VelcronDataTypes) {
|
|
46
46
|
//Unknown = null
|
|
@@ -52,4 +52,4 @@ var VelcronDataTypes;
|
|
|
52
52
|
VelcronDataTypes["array"] = "array";
|
|
53
53
|
VelcronDataTypes["componentArray"] = "componentArray";
|
|
54
54
|
VelcronDataTypes["bind"] = "bind";
|
|
55
|
-
})(VelcronDataTypes
|
|
55
|
+
})(VelcronDataTypes || (exports.VelcronDataTypes = VelcronDataTypes = {}));
|
|
@@ -1,20 +1,23 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { VelcronOnUpdatedEvent, VelcronOnClosedEvent, VelcronOnCloseRequestedEvent, VelcronOnPressEvent, VelcronSpacing, VelcronStyling, VelcronCustomComponentDefinition, VelcronAppDefinition } from "@omnia/velcron/internal-do-not-import-from-here/shared/models";
|
|
2
2
|
import { VelcroncomponentArrayType, VelcronPrimitiveType } from "./VelcronTypes";
|
|
3
3
|
import { AssignOperators, VelcronHorizontalAlignments, VelcronIconTypes, VelcronActionTypes, VelcronVerticalAlignments } from "./Enums";
|
|
4
|
-
import {
|
|
4
|
+
import { ActivityRendererReference, DynamicState, VelcronDefinition, useVelcronThemingStore } from "..";
|
|
5
5
|
import { GuidValue, PropertyConfiguration, PropertyValue, PropertyDefinition, PropertySetupBase } from "@omnia/fx/models";
|
|
6
6
|
import { useVelcronColorSchemaStore } from "../stores/VelcronColorSchema";
|
|
7
|
-
import { useVelcronBlueprintStore } from "../stores/VelcronBlueprint";
|
|
8
7
|
export interface ResolvedComponentRenderer {
|
|
9
8
|
component: unknown;
|
|
10
9
|
definition: VelcronDefinition;
|
|
11
10
|
customComponent?: boolean;
|
|
12
11
|
}
|
|
13
12
|
export interface BuiltInComponentRenderers {
|
|
14
|
-
"
|
|
13
|
+
"velcron": unknown;
|
|
14
|
+
"flex": unknown;
|
|
15
|
+
"row": unknown;
|
|
16
|
+
"column": unknown;
|
|
15
17
|
"card": unknown;
|
|
16
18
|
"text": unknown;
|
|
17
19
|
"image": unknown;
|
|
20
|
+
"video": unknown;
|
|
18
21
|
"button": unknown;
|
|
19
22
|
"text-input": unknown;
|
|
20
23
|
"progress-circle": unknown;
|
|
@@ -26,12 +29,14 @@ export interface BuiltInComponentRenderers {
|
|
|
26
29
|
"markdown": unknown;
|
|
27
30
|
"slot": unknown;
|
|
28
31
|
"property": unknown;
|
|
32
|
+
"checkbox": unknown;
|
|
33
|
+
"reference": unknown;
|
|
34
|
+
"radio": unknown;
|
|
29
35
|
}
|
|
30
36
|
export interface ColorSchemaReference {
|
|
31
37
|
name: string;
|
|
32
38
|
schema: string;
|
|
33
39
|
}
|
|
34
|
-
export type DynamicState = object;
|
|
35
40
|
export interface OnItemRenderedHookResult {
|
|
36
41
|
cssClass: string;
|
|
37
42
|
containerRenderer?: VelcronContainerRenderer;
|
|
@@ -42,7 +47,6 @@ export interface VelcronRenderContext {
|
|
|
42
47
|
currentContext: DynamicState;
|
|
43
48
|
theming?: ReturnType<typeof useVelcronThemingStore>;
|
|
44
49
|
colors?: ReturnType<typeof useVelcronColorSchemaStore>;
|
|
45
|
-
blueprints?: ReturnType<typeof useVelcronBlueprintStore>;
|
|
46
50
|
actions?: {
|
|
47
51
|
[name: string]: Array<string>;
|
|
48
52
|
};
|
|
@@ -70,6 +74,7 @@ export interface VelcronRenderContextHooks {
|
|
|
70
74
|
onItemSelected?: ((item: VelcronDefinition) => void);
|
|
71
75
|
onItemRendered?: ((item: VelcronDefinition) => OnItemRenderedHookResult);
|
|
72
76
|
onItemCreatedProps?: ((item: VelcronDefinition) => object);
|
|
77
|
+
onLoadReference?: ((reference: ActivityRendererReference) => Promise<VelcronDefinition>);
|
|
73
78
|
}
|
|
74
79
|
export interface VelcronContainerRenderer {
|
|
75
80
|
definition: VelcronDefinition;
|
|
@@ -94,39 +99,11 @@ export interface VelcronActionWithCondition extends VelcronActionWithAutoAwait {
|
|
|
94
99
|
trueAction: VelcronAction;
|
|
95
100
|
falseAction: VelcronAction;
|
|
96
101
|
}
|
|
97
|
-
/**
|
|
98
|
-
* Velcron definition base
|
|
99
|
-
*/
|
|
100
|
-
export interface VelcronDefinitionBase {
|
|
101
|
-
/**
|
|
102
|
-
* The component type
|
|
103
|
-
*/
|
|
104
|
-
type: string;
|
|
105
|
-
/**
|
|
106
|
-
* Custom friendly name of the definition
|
|
107
|
-
*/
|
|
108
|
-
name?: string;
|
|
109
|
-
/**
|
|
110
|
-
* Used for render cache if not specified we auto set it.
|
|
111
|
-
*/
|
|
112
|
-
key?: string;
|
|
113
|
-
}
|
|
114
|
-
export interface VelcronDefinition extends VelcronDefinitionBase, VelcronDimensionStyling {
|
|
115
|
-
body?: Array<VelcronDefinition>;
|
|
116
|
-
style?: VelcronStyling;
|
|
117
|
-
foreach?: string;
|
|
118
|
-
if?: string;
|
|
119
|
-
events?: VelcronEvent;
|
|
120
|
-
}
|
|
121
102
|
export type VelcronBindableProp<TPropType = string> = TPropType | string;
|
|
122
103
|
export interface VelcronDefinitionWithEditMode extends VelcronDefinition {
|
|
123
104
|
edit?: VelcronBindableProp<boolean>;
|
|
124
105
|
bind?: VelcronBindableProp;
|
|
125
106
|
}
|
|
126
|
-
interface VelcronDimensionStyling {
|
|
127
|
-
margin?: VelcronSpacing;
|
|
128
|
-
padding?: VelcronSpacing;
|
|
129
|
-
}
|
|
130
107
|
export interface VelcronColorStyling {
|
|
131
108
|
colorSchemaType?: string;
|
|
132
109
|
colorType?: string;
|
|
@@ -136,75 +113,54 @@ export interface VelcronColorStyling {
|
|
|
136
113
|
}
|
|
137
114
|
export interface VelcronTextStyling {
|
|
138
115
|
text: string;
|
|
116
|
+
placeholder?: string;
|
|
139
117
|
typography?: string;
|
|
140
118
|
size?: string;
|
|
141
119
|
}
|
|
142
|
-
export interface VelcronStyling {
|
|
143
|
-
margin?: number;
|
|
144
|
-
marginTop?: number;
|
|
145
|
-
marginRight?: number;
|
|
146
|
-
marginBottom?: number;
|
|
147
|
-
marginLeft?: number;
|
|
148
|
-
padding?: number;
|
|
149
|
-
paddingTop?: number;
|
|
150
|
-
paddingRight?: number;
|
|
151
|
-
paddingBottom?: number;
|
|
152
|
-
paddingLeft?: number;
|
|
153
|
-
height?: number | string;
|
|
154
|
-
width?: number | string;
|
|
155
|
-
}
|
|
156
120
|
export interface VelcronCardStyling extends VelcronStyling {
|
|
157
121
|
elevation: number;
|
|
158
122
|
}
|
|
159
|
-
export interface VelcronSpacing {
|
|
160
|
-
top?: number | string;
|
|
161
|
-
right?: number | string;
|
|
162
|
-
bottom?: number | string;
|
|
163
|
-
left?: number | string;
|
|
164
|
-
}
|
|
165
123
|
export interface VelcronIcon {
|
|
166
124
|
type: VelcronIconTypes;
|
|
167
125
|
name: string;
|
|
168
126
|
}
|
|
169
|
-
export interface
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
name?: string;
|
|
173
|
-
body?: Array<VelcronDefinition>;
|
|
174
|
-
events?: VelcronOnLoadEvent & VelcronOnEditModeEvent;
|
|
175
|
-
actions?: {
|
|
176
|
-
[name: string]: Array<string>;
|
|
177
|
-
};
|
|
178
|
-
components?: Array<VelcronCustomComponentDefinition>;
|
|
179
|
-
propEditors?: Array<VelcronPropertyEditor>;
|
|
180
|
-
state?: TState;
|
|
181
|
-
computed?: {
|
|
182
|
-
[name: string]: Array<string>;
|
|
183
|
-
};
|
|
184
|
-
}
|
|
185
|
-
export interface VelcronComponentDefinition extends VelcronDefinition {
|
|
186
|
-
type: string;
|
|
187
|
-
events?: any;
|
|
188
|
-
properties?: [];
|
|
189
|
-
icon?: any;
|
|
127
|
+
export interface VelcronRenderProp {
|
|
128
|
+
required?: boolean;
|
|
129
|
+
defaultValue?: any;
|
|
190
130
|
}
|
|
191
131
|
/*** Built-in Components *********************************************************************/
|
|
192
|
-
export interface
|
|
193
|
-
type: "
|
|
132
|
+
export interface VelcronFlexDefinition extends VelcronDefinition, VelcronColorStyling {
|
|
133
|
+
type: "flex";
|
|
194
134
|
events?: VelcronOnPressEvent;
|
|
195
|
-
direction?: VelcronBindableProp<"row" | "column" | "row-reverse" | "column-reverse">;
|
|
196
|
-
columnStyle?: object;
|
|
197
|
-
hAlign?: VelcronHorizontalAlignments;
|
|
198
|
-
vAlign?: VelcronVerticalAlignments;
|
|
199
|
-
grow?: number;
|
|
200
|
-
absolute?: VelcronSpacing;
|
|
201
135
|
border?: VelcronBorder;
|
|
202
136
|
borderRadius?: VelcronDimensions;
|
|
137
|
+
}
|
|
138
|
+
export interface VelcronFlexRowDefinition extends VelcronDefinition, VelcronColorStyling {
|
|
139
|
+
type: "row";
|
|
140
|
+
events?: VelcronOnPressEvent;
|
|
141
|
+
direction?: VelcronBindableProp<"row" | "row-reverse">;
|
|
142
|
+
absolute?: VelcronSpacing;
|
|
143
|
+
hideOverflow?: boolean;
|
|
144
|
+
wrap?: boolean;
|
|
145
|
+
gapX?: number | string;
|
|
146
|
+
gapY?: number | string;
|
|
147
|
+
alignX?: VelcronHorizontalAlignments;
|
|
148
|
+
alignY?: VelcronVerticalAlignments;
|
|
149
|
+
grow?: number | "default";
|
|
203
150
|
width?: number | string;
|
|
204
151
|
minWidth?: number | string;
|
|
205
152
|
height?: number | string;
|
|
206
153
|
minHeight?: number | string;
|
|
207
154
|
}
|
|
155
|
+
export interface VelcronFlexColumnDefinition extends VelcronDefinition, VelcronColorStyling {
|
|
156
|
+
type: "column";
|
|
157
|
+
events?: VelcronOnPressEvent;
|
|
158
|
+
grow?: number;
|
|
159
|
+
alignY?: VelcronVerticalAlignments;
|
|
160
|
+
absolute?: VelcronSpacing;
|
|
161
|
+
width?: number | string;
|
|
162
|
+
minWidth?: number | string;
|
|
163
|
+
}
|
|
208
164
|
export interface VelcronCardDefinition extends VelcronDefinition, VelcronColorStyling {
|
|
209
165
|
type: "card";
|
|
210
166
|
style?: VelcronCardStyling;
|
|
@@ -224,18 +180,30 @@ export declare enum VelcronImageRatios {
|
|
|
224
180
|
}
|
|
225
181
|
export interface VelcronImageDefinition extends VelcronDefinition {
|
|
226
182
|
type: "image";
|
|
227
|
-
|
|
183
|
+
url?: VelcronBindableProp<string>;
|
|
184
|
+
bind?: VelcronBindableProp<string>;
|
|
228
185
|
ratio?: VelcronImageRatios | string;
|
|
186
|
+
width?: number | string;
|
|
187
|
+
height?: number | string;
|
|
229
188
|
cover?: VelcronBindableProp<boolean>;
|
|
230
189
|
borderRadius?: VelcronDimensions;
|
|
231
190
|
events?: VelcronOnPressEvent;
|
|
232
191
|
}
|
|
192
|
+
export interface VelcronVideoDefinition extends VelcronDefinition {
|
|
193
|
+
type: "video";
|
|
194
|
+
url?: VelcronBindableProp<string>;
|
|
195
|
+
bind?: VelcronBindableProp<string>;
|
|
196
|
+
aspectRatio?: VelcronBindableProp<"16:9" | "4:3" | "1:1">;
|
|
197
|
+
autoplay?: VelcronBindableProp<boolean>;
|
|
198
|
+
muted?: VelcronBindableProp<boolean>;
|
|
199
|
+
}
|
|
233
200
|
export interface VelcronButtonDefinition extends VelcronDefinition {
|
|
234
201
|
type: "button";
|
|
235
202
|
text: string;
|
|
236
203
|
icon?: VelcronIcon;
|
|
237
204
|
disabled?: boolean;
|
|
238
205
|
events?: VelcronOnPressEvent;
|
|
206
|
+
size?: string;
|
|
239
207
|
}
|
|
240
208
|
export interface VelcronTextInputDefinition extends VelcronDefinition {
|
|
241
209
|
type: "text-input";
|
|
@@ -278,6 +246,7 @@ export interface VelcronBorder extends VelcronDimensions {
|
|
|
278
246
|
colorType?: string;
|
|
279
247
|
toned?: boolean;
|
|
280
248
|
opacity?: number;
|
|
249
|
+
width?: number;
|
|
281
250
|
}
|
|
282
251
|
export interface VelcronChipDefinition extends VelcronDefinition {
|
|
283
252
|
type: "chip";
|
|
@@ -290,18 +259,39 @@ export interface VelcronSlotDefinition extends VelcronDefinition {
|
|
|
290
259
|
type: "slot";
|
|
291
260
|
bind: VelcronBindableProp<string>;
|
|
292
261
|
}
|
|
262
|
+
export interface VelcronReferencefinition extends VelcronDefinition {
|
|
263
|
+
type: "reference";
|
|
264
|
+
to: ActivityRendererReference;
|
|
265
|
+
}
|
|
293
266
|
export interface VelcronPropertyDefinition extends VelcronDefinition {
|
|
294
267
|
type: "property";
|
|
295
268
|
bind: VelcronBindableProp<string>;
|
|
296
269
|
}
|
|
270
|
+
export interface VelcronCheckboxDefinition extends VelcronDefinition {
|
|
271
|
+
type: "checkbox";
|
|
272
|
+
label: VelcronBindableProp<string>;
|
|
273
|
+
value: string;
|
|
274
|
+
bind: VelcronBindableProp<string>;
|
|
275
|
+
disabled: VelcronBindableProp<boolean>;
|
|
276
|
+
events: VelcronOnUpdatedEvent;
|
|
277
|
+
}
|
|
278
|
+
export interface VelcronRadioDefinition extends VelcronDefinition {
|
|
279
|
+
type: "radio";
|
|
280
|
+
label: VelcronBindableProp<string>;
|
|
281
|
+
value: string;
|
|
282
|
+
bind: VelcronBindableProp<string>;
|
|
283
|
+
disabled: VelcronBindableProp<boolean>;
|
|
284
|
+
events: VelcronOnUpdatedEvent;
|
|
285
|
+
}
|
|
297
286
|
export interface VelcronPropertyDefinitionValue {
|
|
298
287
|
definitionId: GuidValue;
|
|
299
288
|
value: PropertyValue;
|
|
300
289
|
configuration: PropertyConfiguration<PropertyDefinition<any, any, any, PropertySetupBase>>;
|
|
301
290
|
}
|
|
302
|
-
export type VelcronCustomComponentDefinition = VelcronComponentDefinition;
|
|
303
291
|
export type VelcronRenderProps<TDefinition> = {
|
|
304
292
|
definition: TDefinition;
|
|
305
293
|
renderContext: VelcronRenderContext;
|
|
306
294
|
};
|
|
307
|
-
export {
|
|
295
|
+
export type VelcronAppRendererProps = VelcronRenderProps<VelcronAppDefinition> & {
|
|
296
|
+
rootApp: boolean;
|
|
297
|
+
};
|
|
@@ -5,4 +5,4 @@ var VelcronImageRatios;
|
|
|
5
5
|
(function (VelcronImageRatios) {
|
|
6
6
|
VelcronImageRatios["square"] = "square";
|
|
7
7
|
VelcronImageRatios["landscape"] = "landscape";
|
|
8
|
-
})(VelcronImageRatios
|
|
8
|
+
})(VelcronImageRatios || (exports.VelcronImageRatios = VelcronImageRatios = {}));
|