@omnia/velcron 8.0.83-vnext → 8.0.84-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,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.VelcronRenderers = void 0;
|
|
4
|
-
const VelcronLogger_1 = require("./VelcronLogger");
|
|
5
4
|
const VelcronData_1 = require("./VelcronData");
|
|
6
5
|
const __1 = require("..");
|
|
7
6
|
class VelcronRenderers {
|
|
@@ -33,7 +32,7 @@ class VelcronRenderers {
|
|
|
33
32
|
customComponentDefinition = renderContext.components?.find(p => p.type.toLowerCase() === definition.type.toLowerCase());
|
|
34
33
|
}
|
|
35
34
|
if (customComponentDefinition) {
|
|
36
|
-
if (!this.components["
|
|
35
|
+
if (!this.components[__1.VelcronConstants.components["custom-component"]]) {
|
|
37
36
|
throw "Cant find the custom component renderer";
|
|
38
37
|
}
|
|
39
38
|
//Make a new instance of the custom component
|
|
@@ -43,7 +42,7 @@ class VelcronRenderers {
|
|
|
43
42
|
//comes from the current instance and override the ones from the original to make style overide work as we want
|
|
44
43
|
customComponentInstance.style = definition.style;
|
|
45
44
|
result = {
|
|
46
|
-
component: this.components["
|
|
45
|
+
component: this.components[__1.VelcronConstants.components["custom-component"]],
|
|
47
46
|
definition: customComponentInstance,
|
|
48
47
|
customComponent: true
|
|
49
48
|
};
|
|
@@ -74,7 +73,9 @@ class VelcronRenderers {
|
|
|
74
73
|
computed: currentRenderCtx.computed,
|
|
75
74
|
colors: currentRenderCtx.colors,
|
|
76
75
|
editMode: currentRenderCtx.editMode,
|
|
77
|
-
blueprints: currentRenderCtx.blueprints,
|
|
76
|
+
//blueprints: currentRenderCtx.blueprints,
|
|
77
|
+
disposers: currentRenderCtx.disposers,
|
|
78
|
+
properties: currentRenderCtx.properties,
|
|
78
79
|
};
|
|
79
80
|
if (VelcronRenderers.definitionContainsCustomColorSchema(definition)) {
|
|
80
81
|
const colorSchemaStore = (0, __1.useVelcronColorSchemaStore)(definition.key.toString());
|
|
@@ -95,26 +96,25 @@ class VelcronRenderers {
|
|
|
95
96
|
//Fetch the custom component definition
|
|
96
97
|
const customDef = rendererInfo.definition;
|
|
97
98
|
if (customDef.properties) {
|
|
98
|
-
// customDef.properties.forEach((prop) => {
|
|
99
99
|
Object.keys(customDef.properties).forEach((propName) => {
|
|
100
100
|
const prop = customDef.properties ? customDef.properties[propName] : null;
|
|
101
|
-
if (!prop || (prop.required && !definition.hasOwnProperty(propName))) {
|
|
102
|
-
|
|
103
|
-
}
|
|
101
|
+
// if (!prop || (prop.required && !definition.hasOwnProperty(propName))) {
|
|
102
|
+
// VelcronLogger.logCustomComponentError(`Component of type ${customDef.type} requires property ${propName} but its missing`);
|
|
103
|
+
// }
|
|
104
104
|
result.properties = result.properties || {};
|
|
105
|
-
if (definition.hasOwnProperty(propName)) {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
}
|
|
115
|
-
else if (prop.hasOwnProperty("defaultValue")) {
|
|
116
|
-
|
|
117
|
-
}
|
|
105
|
+
// if (definition.hasOwnProperty(propName)) {
|
|
106
|
+
// if (VelcronData.isString(definition[propName])) {
|
|
107
|
+
// //Properties can be databound so if its a string we try do databind
|
|
108
|
+
// //this is true for other values such as number / string also
|
|
109
|
+
// result.properties[propName] = VelcronData.dataBind(result, definition[propName]);
|
|
110
|
+
// }
|
|
111
|
+
// else {
|
|
112
|
+
// result.properties[propName] = definition[propName];
|
|
113
|
+
// }
|
|
114
|
+
// }
|
|
115
|
+
// else if (prop.hasOwnProperty("defaultValue")) {
|
|
116
|
+
// result.properties[propName] = prop.defaultValue;
|
|
117
|
+
// }
|
|
118
118
|
});
|
|
119
119
|
}
|
|
120
120
|
}
|
|
@@ -122,5 +122,5 @@ class VelcronRenderers {
|
|
|
122
122
|
return result;
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
|
-
VelcronRenderers.components = {};
|
|
126
125
|
exports.VelcronRenderers = VelcronRenderers;
|
|
126
|
+
VelcronRenderers.components = {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { VelcronBorder, VelcronColorStyling,
|
|
1
|
+
import { VelcronBorder, VelcronColorStyling, VelcronDimensions, VelcronRenderContext } from "../models";
|
|
2
2
|
import { VelcronUnitProvider } from "../models/VelcronUnitProvider";
|
|
3
|
+
import { VelcronDefinition } from "..";
|
|
3
4
|
export declare class VelcronStyles {
|
|
4
5
|
static styleProvider: (baseStyles: object, definition: VelcronDefinition, renderCtx: VelcronRenderContext) => any;
|
|
5
6
|
static unitProvider: VelcronUnitProvider;
|
package/parser/VelcronStyles.js
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.VelcronStyles = void 0;
|
|
4
4
|
const VelcronData_1 = require("./VelcronData");
|
|
5
|
-
const models_1 = require("../models");
|
|
6
5
|
const VelcronConstants_1 = require("./VelcronConstants");
|
|
7
6
|
const __1 = require("..");
|
|
8
7
|
class VelcronStyles {
|
|
@@ -25,6 +24,7 @@ class VelcronStyles {
|
|
|
25
24
|
}
|
|
26
25
|
if (colorValue) {
|
|
27
26
|
styleBase["backgroundColor"] = color.toned ? colorValue.colorToned : colorValue.color;
|
|
27
|
+
//styleBase["backgroundColor"] = colorValue.colorToned;
|
|
28
28
|
}
|
|
29
29
|
//styleBase["backgroundColor"] = renderCtx.colors.get.base.color;
|
|
30
30
|
}
|
|
@@ -58,22 +58,29 @@ class VelcronStyles {
|
|
|
58
58
|
if (!borderSettings) {
|
|
59
59
|
return;
|
|
60
60
|
}
|
|
61
|
+
let borderColor = borderSettings.toned ?
|
|
62
|
+
renderCtx.colors.get[borderSettings.colorType]?.colorToned
|
|
63
|
+
: renderCtx.colors.get[borderSettings.colorType]?.color;
|
|
64
|
+
if (borderSettings.opacity) {
|
|
65
|
+
borderColor = renderCtx.colors.get.base.dark ? `rgba(255,255,255,${borderSettings.opacity})` : `rgba(0,0,0,${borderSettings.opacity})`;
|
|
66
|
+
}
|
|
61
67
|
if (borderSettings.top || borderSettings.top === 0) {
|
|
62
68
|
styleBase["borderTopStyle"] = "solid";
|
|
63
|
-
styleBase["borderTopColor"] =
|
|
69
|
+
styleBase["borderTopColor"] = borderColor;
|
|
64
70
|
}
|
|
65
71
|
if (borderSettings.right || borderSettings.right === 0) {
|
|
66
72
|
styleBase["borderRightStyle"] = "solid";
|
|
67
|
-
styleBase["borderRightColor"] =
|
|
73
|
+
styleBase["borderRightColor"] = borderColor;
|
|
68
74
|
}
|
|
69
75
|
if (borderSettings.bottom || borderSettings.bottom === 0) {
|
|
70
76
|
styleBase["borderBottomStyle"] = "solid";
|
|
71
|
-
styleBase["borderBottomColor"] =
|
|
77
|
+
styleBase["borderBottomColor"] = borderColor;
|
|
72
78
|
}
|
|
73
79
|
if (borderSettings.left || borderSettings.left === 0) {
|
|
74
80
|
styleBase["borderLeftStyle"] = "solid";
|
|
75
|
-
styleBase["borderLeftColor"] =
|
|
81
|
+
styleBase["borderLeftColor"] = borderColor;
|
|
76
82
|
}
|
|
83
|
+
styleBase["borderWidth"] = borderSettings.width ? this.unitProvider.formatDimension(borderSettings.width) : 1;
|
|
77
84
|
}
|
|
78
85
|
static create(definition, renderCtx) {
|
|
79
86
|
if (!definition) {
|
|
@@ -81,15 +88,15 @@ class VelcronStyles {
|
|
|
81
88
|
}
|
|
82
89
|
const styleBase = { ...definition.style };
|
|
83
90
|
/**Generic styling */
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
+
if (definition.margin) {
|
|
92
|
+
const spacing = renderCtx.theming.get.spacing();
|
|
93
|
+
styleBase["marginTop"] = this.unitProvider.formatDimension((0, __1.getSpacingValueFromBlueprint)(VelcronData_1.VelcronData.dataBind(renderCtx, definition.margin.top), spacing));
|
|
94
|
+
styleBase["marginRight"] = this.unitProvider.formatDimension((0, __1.getSpacingValueFromBlueprint)(VelcronData_1.VelcronData.dataBind(renderCtx, definition.margin.right), spacing));
|
|
95
|
+
styleBase["marginBottom"] = this.unitProvider.formatDimension((0, __1.getSpacingValueFromBlueprint)(VelcronData_1.VelcronData.dataBind(renderCtx, definition.margin.bottom), spacing));
|
|
96
|
+
styleBase["marginLeft"] = this.unitProvider.formatDimension((0, __1.getSpacingValueFromBlueprint)(VelcronData_1.VelcronData.dataBind(renderCtx, definition.margin.left), spacing));
|
|
97
|
+
}
|
|
91
98
|
if (definition.padding) {
|
|
92
|
-
const spacing = renderCtx.
|
|
99
|
+
const spacing = renderCtx.theming.get.spacing();
|
|
93
100
|
// const padding:VelcronSpacing = definition.padding instanceof Object ? definition.padding :
|
|
94
101
|
// VelcronData.getOrSetObjectByPathUsingRenderContext(renderCtx, definition.padding);
|
|
95
102
|
//const padding = VelcronData.dataBind(renderCtx, definition.padding) as any as VelcronDimensions;
|
|
@@ -98,7 +105,7 @@ class VelcronStyles {
|
|
|
98
105
|
styleBase["paddingBottom"] = this.unitProvider.formatDimension((0, __1.getSpacingValueFromBlueprint)(VelcronData_1.VelcronData.dataBind(renderCtx, definition.padding.bottom), spacing));
|
|
99
106
|
styleBase["paddingLeft"] = this.unitProvider.formatDimension((0, __1.getSpacingValueFromBlueprint)(VelcronData_1.VelcronData.dataBind(renderCtx, definition.padding.left), spacing));
|
|
100
107
|
}
|
|
101
|
-
if (definition.type === VelcronConstants_1.VelcronConstants.components.
|
|
108
|
+
if (definition.type === VelcronConstants_1.VelcronConstants.components.velcron) {
|
|
102
109
|
//styleBase["backgroundColor"] = renderCtx.colors.get.base.color;
|
|
103
110
|
}
|
|
104
111
|
if (definition.type === VelcronConstants_1.VelcronConstants.components.image) {
|
|
@@ -137,79 +144,181 @@ class VelcronStyles {
|
|
|
137
144
|
else {
|
|
138
145
|
styleBase["color"] = textDefinition.toned ? renderCtx.colors.get.onBase.colorToned : renderCtx.colors.get.onBase.color;
|
|
139
146
|
}
|
|
147
|
+
if (textDefinition.noWrap) {
|
|
148
|
+
styleBase["textWrap"] = "nowrap";
|
|
149
|
+
}
|
|
140
150
|
}
|
|
141
|
-
else if (definition.type === VelcronConstants_1.VelcronConstants.components.
|
|
142
|
-
const
|
|
143
|
-
styleBase["
|
|
144
|
-
|
|
145
|
-
|
|
151
|
+
else if (definition.type === VelcronConstants_1.VelcronConstants.components.flex) {
|
|
152
|
+
const flexDefinition = definition;
|
|
153
|
+
// styleBase["position"] = "absolute";
|
|
154
|
+
styleBase["width"] = "100%";
|
|
155
|
+
styleBase["boxSizing"] = "border-box";
|
|
156
|
+
this.insertBackgroundColor(styleBase, flexDefinition, renderCtx);
|
|
157
|
+
}
|
|
158
|
+
else if (definition.type === VelcronConstants_1.VelcronConstants.components.row) {
|
|
159
|
+
const flexDefinition = definition;
|
|
160
|
+
let alignX = null;
|
|
161
|
+
let alignY = null;
|
|
162
|
+
const gapX = flexDefinition.gapX ? flexDefinition.gapX : flexDefinition.gapY;
|
|
163
|
+
const gapY = flexDefinition.gapY ? flexDefinition.gapY : flexDefinition.gapX;
|
|
164
|
+
const width = VelcronData_1.VelcronData.dataBind(renderCtx, flexDefinition.width);
|
|
165
|
+
const minWidth = VelcronData_1.VelcronData.dataBind(renderCtx, flexDefinition.minWidth);
|
|
166
|
+
const height = VelcronData_1.VelcronData.dataBind(renderCtx, flexDefinition.height);
|
|
167
|
+
const minHeight = VelcronData_1.VelcronData.dataBind(renderCtx, flexDefinition.minHeight);
|
|
168
|
+
if (flexDefinition.absolute) {
|
|
169
|
+
const spacing = renderCtx.theming.get.spacing();
|
|
146
170
|
styleBase["position"] = "absolute";
|
|
147
171
|
/**Use margin to position the element since flex does not support absolute positioning */
|
|
148
|
-
styleBase["marginTop"] = this.unitProvider.formatDimension((0, __1.getSpacingValueFromBlueprint)(VelcronData_1.VelcronData.dataBind(renderCtx,
|
|
149
|
-
styleBase["marginRight"] = this.unitProvider.formatDimension((0, __1.getSpacingValueFromBlueprint)(VelcronData_1.VelcronData.dataBind(renderCtx,
|
|
150
|
-
styleBase["marginBottom"] = this.unitProvider.formatDimension((0, __1.getSpacingValueFromBlueprint)(VelcronData_1.VelcronData.dataBind(renderCtx,
|
|
151
|
-
styleBase["marginLeft"] = this.unitProvider.formatDimension((0, __1.getSpacingValueFromBlueprint)(VelcronData_1.VelcronData.dataBind(renderCtx,
|
|
172
|
+
styleBase["marginTop"] = this.unitProvider.formatDimension((0, __1.getSpacingValueFromBlueprint)(VelcronData_1.VelcronData.dataBind(renderCtx, flexDefinition.absolute.top), spacing));
|
|
173
|
+
styleBase["marginRight"] = this.unitProvider.formatDimension((0, __1.getSpacingValueFromBlueprint)(VelcronData_1.VelcronData.dataBind(renderCtx, flexDefinition.absolute.right), spacing));
|
|
174
|
+
styleBase["marginBottom"] = this.unitProvider.formatDimension((0, __1.getSpacingValueFromBlueprint)(VelcronData_1.VelcronData.dataBind(renderCtx, flexDefinition.absolute.bottom), spacing));
|
|
175
|
+
styleBase["marginLeft"] = this.unitProvider.formatDimension((0, __1.getSpacingValueFromBlueprint)(VelcronData_1.VelcronData.dataBind(renderCtx, flexDefinition.absolute.left), spacing));
|
|
152
176
|
}
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
styleBase["flexDirection"] = direction === "column" ? "column"
|
|
157
|
-
: direction === "column-reverse" ? "column-reverse"
|
|
158
|
-
: direction === "row-reverse" ? "row-reverse"
|
|
159
|
-
: "row";
|
|
160
|
-
if (flexViewDefinition.width) {
|
|
161
|
-
const width = VelcronData_1.VelcronData.dataBind(renderCtx, flexViewDefinition.width);
|
|
162
|
-
if (!direction || direction === "" || direction === "row" || direction === "row-reverse") {
|
|
163
|
-
styleBase["flexBasis"] = this.unitProvider.formatDimension(width);
|
|
164
|
-
styleBase["maxWidth"] = this.unitProvider.formatDimension(width);
|
|
177
|
+
if (flexDefinition.alignX) {
|
|
178
|
+
if (flexDefinition.alignX === "right") {
|
|
179
|
+
alignX = "flex-end";
|
|
165
180
|
}
|
|
166
|
-
else {
|
|
167
|
-
|
|
181
|
+
else if (flexDefinition.alignX === "center") {
|
|
182
|
+
alignX = "center";
|
|
168
183
|
}
|
|
169
|
-
//styleBase["width"] = this.unitProvider.formatDimension(flexViewDefinition.width);
|
|
170
184
|
}
|
|
171
|
-
if (
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
}
|
|
175
|
-
if (flexViewDefinition.height) {
|
|
176
|
-
const height = VelcronData_1.VelcronData.dataBind(renderCtx, flexViewDefinition.height);
|
|
177
|
-
if (direction === "column" || direction === "column-reverse") {
|
|
178
|
-
styleBase["maxHeight"] = this.unitProvider.formatDimension(height);
|
|
179
|
-
styleBase["flexBasis"] = this.unitProvider.formatDimension(height);
|
|
180
|
-
}
|
|
181
|
-
else {
|
|
182
|
-
styleBase["height"] = this.unitProvider.formatDimension(height);
|
|
185
|
+
if (flexDefinition.alignY) {
|
|
186
|
+
if (flexDefinition.alignY === "center") {
|
|
187
|
+
alignY = "center";
|
|
183
188
|
}
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
if (flexViewDefinition.minHeight) {
|
|
187
|
-
const minHeight = VelcronData_1.VelcronData.dataBind(renderCtx, flexViewDefinition.minHeight);
|
|
188
|
-
styleBase["minHeight"] = this.unitProvider.formatDimension(minHeight);
|
|
189
|
-
}
|
|
190
|
-
if (flexViewDefinition.horizontalAlignment) {
|
|
191
|
-
const propertyName = direction === "column" || direction === "column-reverse" ? "alignItems" : "justifyContent";
|
|
192
|
-
if (flexViewDefinition.horizontalAlignment === models_1.VelcronHorizontalAlignments.right) {
|
|
193
|
-
styleBase[propertyName] = "flex-end";
|
|
189
|
+
else if (flexDefinition.alignY === "bottom") {
|
|
190
|
+
alignY = "flex-end";
|
|
194
191
|
}
|
|
195
|
-
else
|
|
196
|
-
|
|
192
|
+
else {
|
|
193
|
+
alignY = "stretch";
|
|
197
194
|
}
|
|
198
195
|
}
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
196
|
+
styleBase["overflow"] = flexDefinition.hideOverflow ? "hidden" : null;
|
|
197
|
+
styleBase["flexDirection"] = flexDefinition.direction;
|
|
198
|
+
styleBase["display"] = "flex";
|
|
199
|
+
styleBase["flex"] = "1 1 auto";
|
|
200
|
+
styleBase["flexWrap"] = flexDefinition.wrap ? "wrap" : null;
|
|
201
|
+
styleBase["justifyContent"] = alignX;
|
|
202
|
+
styleBase["alignItems"] = alignY;
|
|
203
|
+
styleBase["rowGap"] = gapY;
|
|
204
|
+
styleBase["columnGap"] = gapX;
|
|
205
|
+
styleBase["flexBasis"] = flexDefinition.height ? this.unitProvider.formatDimension(height) : undefined;
|
|
206
|
+
styleBase["width"] = this.unitProvider.formatDimension(width);
|
|
207
|
+
styleBase["maxWidth"] = this.unitProvider.formatDimension(width);
|
|
208
|
+
styleBase["minWidth"] = this.unitProvider.formatDimension(minWidth);
|
|
209
|
+
styleBase["height"] = this.unitProvider.formatDimension(height);
|
|
210
|
+
styleBase["minHeight"] = this.unitProvider.formatDimension(minHeight);
|
|
211
|
+
this.insertBackgroundColor(styleBase, flexDefinition, renderCtx);
|
|
212
|
+
}
|
|
213
|
+
else if (definition.type === VelcronConstants_1.VelcronConstants.components.column) {
|
|
214
|
+
const flexDefinition = definition;
|
|
215
|
+
let yAlignment = null;
|
|
216
|
+
const width = VelcronData_1.VelcronData.dataBind(renderCtx, flexDefinition.width);
|
|
217
|
+
const minWidth = VelcronData_1.VelcronData.dataBind(renderCtx, flexDefinition.minWidth);
|
|
218
|
+
if (flexDefinition.alignY) {
|
|
219
|
+
if (flexDefinition.alignY === "center") {
|
|
220
|
+
yAlignment = "center";
|
|
203
221
|
}
|
|
204
|
-
else if (
|
|
205
|
-
|
|
222
|
+
else if (flexDefinition.alignY === "bottom") {
|
|
223
|
+
yAlignment = "end";
|
|
206
224
|
}
|
|
207
225
|
}
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
226
|
+
styleBase["flexBasis"] = flexDefinition.width ? this.unitProvider.formatDimension(width) : 0;
|
|
227
|
+
styleBase["flexGrow"] = flexDefinition.grow || flexDefinition.grow === 0 ? flexDefinition.grow : 1;
|
|
228
|
+
styleBase["maxWidth"] = flexDefinition.width ? this.unitProvider.formatDimension(width) : "100%";
|
|
229
|
+
styleBase["alignSelf"] = yAlignment;
|
|
230
|
+
styleBase["minWidth"] = this.unitProvider.formatDimension(minWidth);
|
|
231
|
+
this.insertBackgroundColor(styleBase, flexDefinition, renderCtx);
|
|
212
232
|
}
|
|
233
|
+
// const flexViewDefinition = definition as VelcronFlexDefinition;
|
|
234
|
+
// // let calculatedMaxHeight = maxHeight;
|
|
235
|
+
// // let calculatedHeight = height;
|
|
236
|
+
// styleBase["overflow"] = "hidden";
|
|
237
|
+
// if(flexViewDefinition.absolute){
|
|
238
|
+
// const spacing = renderCtx.blueprints.get.spacing.inner;
|
|
239
|
+
// styleBase["position"] = "absolute";
|
|
240
|
+
// /**Use margin to position the element since flex does not support absolute positioning */
|
|
241
|
+
// styleBase["marginTop"] = this.unitProvider.formatDimension(getSpacingValueFromBlueprint(VelcronData.dataBind(renderCtx,flexViewDefinition.absolute.top),spacing)) as any;
|
|
242
|
+
// styleBase["marginRight"] = this.unitProvider.formatDimension(getSpacingValueFromBlueprint(VelcronData.dataBind(renderCtx,flexViewDefinition.absolute.right),spacing)) as any;
|
|
243
|
+
// styleBase["marginBottom"] = this.unitProvider.formatDimension(getSpacingValueFromBlueprint(VelcronData.dataBind(renderCtx,flexViewDefinition.absolute.bottom),spacing)) as any;
|
|
244
|
+
// styleBase["marginLeft"] = this.unitProvider.formatDimension(getSpacingValueFromBlueprint(VelcronData.dataBind(renderCtx,flexViewDefinition.absolute.left),spacing)) as any;
|
|
245
|
+
// }
|
|
246
|
+
// const flexGrow = flexViewDefinition.grow === "default"?
|
|
247
|
+
// undefined :
|
|
248
|
+
// flexViewDefinition.grow || flexViewDefinition.grow === 0 ?
|
|
249
|
+
// flexViewDefinition.grow :
|
|
250
|
+
// 1;
|
|
251
|
+
// styleBase["flex"] = flexGrow;
|
|
252
|
+
// const direction = VelcronData.dataBind(renderCtx, flexViewDefinition.direction);
|
|
253
|
+
// //styleBase["flex"] = flexGrow; /**testing */
|
|
254
|
+
// styleBase["flexDirection"] = direction === "column" ? "column"
|
|
255
|
+
// : direction === "column-reverse" ? "column-reverse"
|
|
256
|
+
// : direction === "row-reverse" ? "row-reverse"
|
|
257
|
+
// : "row";
|
|
258
|
+
// if (flexViewDefinition.width) {
|
|
259
|
+
// const width = VelcronData.dataBind(renderCtx,flexViewDefinition.width);
|
|
260
|
+
// const maxWidth = VelcronData.dataBind(renderCtx,flexViewDefinition.maxWidth);
|
|
261
|
+
// if(!direction || direction==="" || direction === "row" || direction === "row-reverse"){
|
|
262
|
+
// styleBase["flexBasis"] = this.unitProvider.formatDimension(width);
|
|
263
|
+
// styleBase["maxWidth"] = maxWidth?this.unitProvider.formatDimension(maxWidth) : this.unitProvider.formatDimension(width);
|
|
264
|
+
// styleBase["width"] = this.unitProvider.formatDimension(width);
|
|
265
|
+
// }
|
|
266
|
+
// else{
|
|
267
|
+
// styleBase["width"] = this.unitProvider.formatDimension(width);
|
|
268
|
+
// if(!flexGrow){
|
|
269
|
+
// styleBase["maxWidth"] = maxWidth?this.unitProvider.formatDimension(maxWidth) : this.unitProvider.formatDimension(width);
|
|
270
|
+
// }
|
|
271
|
+
// }
|
|
272
|
+
// //styleBase["width"] = this.unitProvider.formatDimension(flexViewDefinition.width);
|
|
273
|
+
// }
|
|
274
|
+
// if(flexViewDefinition.minWidth){
|
|
275
|
+
// const minWidth = VelcronData.dataBind(renderCtx,flexViewDefinition.minWidth);
|
|
276
|
+
// styleBase["minWidth"] = this.unitProvider.formatDimension(minWidth);
|
|
277
|
+
// }
|
|
278
|
+
// if (flexViewDefinition.height) {
|
|
279
|
+
// const height = VelcronData.dataBind(renderCtx,flexViewDefinition.height);
|
|
280
|
+
// const maxHeight = VelcronData.dataBind(renderCtx,flexViewDefinition.maxHeight);
|
|
281
|
+
// if(direction === "column" || direction === "column-reverse"){
|
|
282
|
+
// styleBase["flexBasis"] = this.unitProvider.formatDimension(height);
|
|
283
|
+
// styleBase["maxHeight"] = maxHeight?this.unitProvider.formatDimension(maxHeight) : this.unitProvider.formatDimension(height);
|
|
284
|
+
// styleBase["height"] = this.unitProvider.formatDimension(height); /**Test since flex basis doesn't seem to bite on column direction */
|
|
285
|
+
// }
|
|
286
|
+
// else{
|
|
287
|
+
// styleBase["height"] = this.unitProvider.formatDimension(height);
|
|
288
|
+
// if(!flexGrow){
|
|
289
|
+
// styleBase["maxHeight"] = maxHeight?this.unitProvider.formatDimension(maxHeight) : this.unitProvider.formatDimension(height);
|
|
290
|
+
// }
|
|
291
|
+
// }
|
|
292
|
+
// //direction === "column" || direction === "column-reverse"
|
|
293
|
+
// }
|
|
294
|
+
// if(flexViewDefinition.minHeight){
|
|
295
|
+
// const minHeight = VelcronData.dataBind(renderCtx,flexViewDefinition.minHeight);
|
|
296
|
+
// styleBase["minHeight"] = this.unitProvider.formatDimension(minHeight);
|
|
297
|
+
// }
|
|
298
|
+
// if (flexViewDefinition.hAlign) {
|
|
299
|
+
// const propertyName = direction === "column" || direction === "column-reverse" ? "alignItems" : "justifyContent";
|
|
300
|
+
// if (flexViewDefinition.hAlign === VelcronHorizontalAlignments.right) {
|
|
301
|
+
// styleBase[propertyName] = "flex-end";
|
|
302
|
+
// }
|
|
303
|
+
// else if (flexViewDefinition.hAlign === VelcronHorizontalAlignments.center) {
|
|
304
|
+
// styleBase[propertyName] = "center";
|
|
305
|
+
// }
|
|
306
|
+
// }
|
|
307
|
+
// const propertyName = direction === "column" || direction === "column-reverse" ? "justifyContent" : "alignItems";
|
|
308
|
+
// if (flexViewDefinition.vAlign) {
|
|
309
|
+
// if (flexViewDefinition.vAlign === VelcronVerticalAlignments.center
|
|
310
|
+
// ) {
|
|
311
|
+
// styleBase[propertyName] = "center";
|
|
312
|
+
// }
|
|
313
|
+
// else if (flexViewDefinition.vAlign === VelcronVerticalAlignments.bottom) {
|
|
314
|
+
// styleBase[propertyName] = "flex-end";
|
|
315
|
+
// }
|
|
316
|
+
// }
|
|
317
|
+
// else {
|
|
318
|
+
// styleBase[propertyName] = "flex-start";
|
|
319
|
+
// }
|
|
320
|
+
// this.insertBackgroundColor(styleBase, flexViewDefinition, renderCtx);
|
|
321
|
+
//}
|
|
213
322
|
/**
|
|
214
323
|
*
|
|
215
324
|
* Generic styles for all components
|
package/parser/index.d.ts
CHANGED
package/parser/index.js
CHANGED
|
@@ -8,3 +8,4 @@ tslib_1.__exportStar(require("./VelcronStyles"), exports);
|
|
|
8
8
|
tslib_1.__exportStar(require("./VelcronLogger"), exports);
|
|
9
9
|
tslib_1.__exportStar(require("./VelcronRenderers"), exports);
|
|
10
10
|
tslib_1.__exportStar(require("./TextValue"), exports);
|
|
11
|
+
tslib_1.__exportStar(require("./VelcronPropertyEditors"), exports);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare class ReactivitySystem {
|
|
2
|
-
static makeReactive: (obj: any) =>
|
|
2
|
+
static makeReactive: (obj: any) => any;
|
|
3
3
|
static hasReactivityProvider: boolean;
|
|
4
|
-
static registerProvider(fn: (obj: any) =>
|
|
4
|
+
static registerProvider(fn: (obj: any) => any): void;
|
|
5
5
|
}
|
|
@@ -7,6 +7,6 @@ class ReactivitySystem {
|
|
|
7
7
|
ReactivitySystem.hasReactivityProvider = true;
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
|
+
exports.ReactivitySystem = ReactivitySystem;
|
|
10
11
|
ReactivitySystem.makeReactive = null;
|
|
11
12
|
ReactivitySystem.hasReactivityProvider = false;
|
|
12
|
-
exports.ReactivitySystem = ReactivitySystem;
|
|
@@ -8,20 +8,21 @@ export declare const useVelcronColorSchemaStore: (newStateWithName?: string) =>
|
|
|
8
8
|
onContainer: ColorDefinition;
|
|
9
9
|
isContainer: boolean;
|
|
10
10
|
name: string;
|
|
11
|
-
colorSchemaType:
|
|
11
|
+
colorSchemaType: "info" | "error" | "primary" | "secondary" | "accent1" | "accent2" | "accent3" | "neutral" | "background" | ColorSchemaTypes;
|
|
12
12
|
themeStore: {
|
|
13
13
|
state: {
|
|
14
14
|
currentTheme: import("@omnia/fx-models").ThemeDefinitionV2;
|
|
15
15
|
};
|
|
16
16
|
get: {
|
|
17
|
-
|
|
18
|
-
colorSchema: (colorSchemaType:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
componentBlueprints: (blueprintType: import("@omnia/fx-models").VelcronBlueprintDefintionTypes) => import("@omnia/fx-models").ComponentBlueprint;
|
|
18
|
+
colorSchema: (colorSchemaType: "info" | "error" | "primary" | "secondary" | "accent1" | "accent2" | "accent3" | "neutral" | "background" | ColorSchemaTypes) => ColorSchema;
|
|
19
|
+
spacing: () => import("@omnia/fx-models").SpacingDefinition;
|
|
20
|
+
typography: (typographyType: "title" | "text" | "navigation" | import("@omnia/fx-models").TypographyTypes, size: "xs" | "s" | "m" | "l" | "xl" | import("@omnia/fx-models").TypographySizes) => any;
|
|
21
|
+
color: (colorSchemaType: "info" | "error" | "primary" | "secondary" | "accent1" | "accent2" | "accent3" | "neutral" | "background" | ColorSchemaTypes, colorType: import("@omnia/fx-models").ColorTypes | "base" | "onBase" | "container" | "onContainer") => string;
|
|
22
|
+
colorDefinition: (colorSchemaType: "info" | "error" | "primary" | "secondary" | "accent1" | "accent2" | "accent3" | "neutral" | "background" | ColorSchemaTypes, colorType: import("@omnia/fx-models").ColorTypes | "base" | "onBase" | "container" | "onContainer") => ColorDefinition;
|
|
23
|
+
complementaryColorType: (colorType: import("@omnia/fx-models").ColorTypes | "base" | "onBase" | "container" | "onContainer") => import("@omnia/fx-models").ColorTypes;
|
|
24
|
+
complementaryColor: (colorSchemaType: "info" | "error" | "primary" | "secondary" | "accent1" | "accent2" | "accent3" | "neutral" | "background" | ColorSchemaTypes, colorType: import("@omnia/fx-models").ColorTypes | "base" | "onBase" | "container" | "onContainer") => string;
|
|
25
|
+
complementaryColorDefinition: (colorSchemaType: "info" | "error" | "primary" | "secondary" | "accent1" | "accent2" | "accent3" | "neutral" | "background" | ColorSchemaTypes, colorType: import("@omnia/fx-models").ColorTypes | "base" | "onBase" | "container" | "onContainer") => ColorDefinition;
|
|
25
26
|
currentTheme: () => import("@omnia/fx-models").ThemeDefinitionV2;
|
|
26
27
|
};
|
|
27
28
|
actions: {
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ColorSchemaType, ColorSchemaTypes, ColorType, ColorTypes, ComponentBlueprint, SpacingDefinition, ThemeDefinitionV2, TypographySize, TypographySizes, TypographyType, TypographyTypes, VelcronBlueprintDefintionTypes } from "..";
|
|
2
2
|
export declare const useVelcronThemingStore: (newStateWithName?: string) => {
|
|
3
3
|
state: {
|
|
4
4
|
currentTheme: ThemeDefinitionV2;
|
|
5
5
|
};
|
|
6
6
|
get: {
|
|
7
|
-
|
|
7
|
+
componentBlueprints: (blueprintType: VelcronBlueprintDefintionTypes) => ComponentBlueprint;
|
|
8
8
|
colorSchema: (colorSchemaType: ColorSchemaTypes | ColorSchemaType) => import("..").ColorSchema;
|
|
9
|
-
|
|
9
|
+
spacing: () => SpacingDefinition;
|
|
10
|
+
typography: (typographyType: TypographyTypes | TypographyType, size: TypographySizes | TypographySize) => any;
|
|
10
11
|
color: (colorSchemaType: ColorSchemaTypes | ColorSchemaType, colorType: ColorTypes | ColorType) => string;
|
|
11
12
|
colorDefinition: (colorSchemaType: ColorSchemaTypes | ColorSchemaType, colorType: ColorTypes | ColorType) => import("..").ColorDefinition;
|
|
12
13
|
complementaryColorType: (colorType: ColorTypes | ColorType) => ColorTypes;
|
package/stores/VelcronTheming.js
CHANGED
|
@@ -13,14 +13,26 @@ exports.useVelcronThemingStore = (0, _1.defineVelcronStore)("VelcronTheming", {
|
|
|
13
13
|
},
|
|
14
14
|
getters(state) {
|
|
15
15
|
return {
|
|
16
|
-
|
|
17
|
-
return (0, __1.useThemeMethods)(() => state.currentTheme).
|
|
16
|
+
componentBlueprints: (blueprintType) => {
|
|
17
|
+
return (0, __1.useThemeMethods)(() => state.currentTheme).bluePrintbyType("component");
|
|
18
18
|
},
|
|
19
19
|
colorSchema: (colorSchemaType) => {
|
|
20
20
|
return (0, __1.useThemeMethods)(() => state.currentTheme).colorSchema(colorSchemaType);
|
|
21
21
|
},
|
|
22
|
+
spacing: () => {
|
|
23
|
+
return (0, __1.useThemeMethods)(() => state.currentTheme).bluePrintbyType("spacing").default.inner;
|
|
24
|
+
},
|
|
22
25
|
typography: (typographyType, size) => {
|
|
23
|
-
|
|
26
|
+
const typography = (0, __1.useThemeMethods)(() => state.currentTheme).bluePrintbyType("typography").default;
|
|
27
|
+
if (typographyType === __1.TypographyTypes.text) {
|
|
28
|
+
return typography.text[size];
|
|
29
|
+
}
|
|
30
|
+
else if (typographyType === __1.TypographyTypes.title) {
|
|
31
|
+
return typography.title[size];
|
|
32
|
+
}
|
|
33
|
+
else if (typographyType === __1.TypographyTypes.navigation) {
|
|
34
|
+
return typography.navigation[size];
|
|
35
|
+
}
|
|
24
36
|
},
|
|
25
37
|
color: (colorSchemaType, colorType) => {
|
|
26
38
|
return (0, __1.useThemeMethods)(() => state.currentTheme).color(colorSchemaType, colorType);
|
package/stores/index.d.ts
CHANGED
package/stores/index.js
CHANGED
|
@@ -5,4 +5,4 @@ tslib_1.__exportStar(require("./VelcronStore"), exports);
|
|
|
5
5
|
tslib_1.__exportStar(require("./VelcronTheming"), exports);
|
|
6
6
|
tslib_1.__exportStar(require("./ReactivitySystem"), exports);
|
|
7
7
|
tslib_1.__exportStar(require("./VelcronColorSchema"), exports);
|
|
8
|
-
|
|
8
|
+
//export * from "./VelcronBlueprint";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { VelcronPropertyEditor } from "@omnia/fx-models";
|
|
2
|
+
import { VelcronEditorBuilder } from "./VelcronEditorBuilder";
|
|
3
|
+
import { VelcronEditorBuilderBase } from "./VelcronEditorBuilderBase";
|
|
4
|
+
export declare class VelcronColorSchemaEditorBuilder extends VelcronEditorBuilderBase {
|
|
5
|
+
private editor;
|
|
6
|
+
constructor(builder: any);
|
|
7
|
+
add(): VelcronEditorBuilder;
|
|
8
|
+
protected internalBuild(): VelcronPropertyEditor<any>[];
|
|
9
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VelcronColorSchemaEditorBuilder = void 0;
|
|
4
|
+
const VelcronEditorBuilderBase_1 = require("./VelcronEditorBuilderBase");
|
|
5
|
+
class VelcronColorSchemaEditorBuilder extends VelcronEditorBuilderBase_1.VelcronEditorBuilderBase {
|
|
6
|
+
constructor(builder) {
|
|
7
|
+
super(builder);
|
|
8
|
+
this.editor = null;
|
|
9
|
+
}
|
|
10
|
+
add() {
|
|
11
|
+
if (!this.editor) {
|
|
12
|
+
this.editor = {
|
|
13
|
+
name: "Color Schema",
|
|
14
|
+
type: "color-schema-type",
|
|
15
|
+
stateMapping: "colorSchemaType"
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
return this.builder;
|
|
19
|
+
}
|
|
20
|
+
internalBuild() {
|
|
21
|
+
const result = [];
|
|
22
|
+
if (this.editor) {
|
|
23
|
+
result.push(this.editor);
|
|
24
|
+
}
|
|
25
|
+
return result;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.VelcronColorSchemaEditorBuilder = VelcronColorSchemaEditorBuilder;
|