@omnia/velcron 8.0.114-vnext → 8.0.116-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/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/Equals.js +5 -6
- package/internal-do-not-import-from-here/shared/models/Future.d.ts +13 -0
- package/internal-do-not-import-from-here/shared/models/Future.js +19 -0
- 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 +2 -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/Tokens.d.ts +1 -0
- package/internal-do-not-import-from-here/shared/models/WorkerProxyFuncs.d.ts +2 -2
- 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/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 +45 -7
- package/internal-do-not-import-from-here/shared/models/hub/activities/Activity.js +4 -6
- package/internal-do-not-import-from-here/shared/models/hub/activities/ActivityChannel.d.ts +3 -2
- package/internal-do-not-import-from-here/shared/models/hub/activities/ActivityChannel.js +2 -3
- 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 +9 -3
- package/internal-do-not-import-from-here/shared/models/hub/activities/ActivityRenderer.js +2 -3
- 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 +5 -1
- package/internal-do-not-import-from-here/shared/models/hub/activities/ActivitySender.js +2 -3
- package/internal-do-not-import-from-here/shared/models/hub/activities/IdentityActivity.d.ts +25 -3
- package/internal-do-not-import-from-here/shared/models/hub/activities/IdentityActivity.js +11 -3
- package/internal-do-not-import-from-here/shared/models/hub/activities/index.d.ts +3 -1
- package/internal-do-not-import-from-here/shared/models/hub/activities/index.js +3 -1
- 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 +4 -0
- package/internal-do-not-import-from-here/shared/models/hub/index.js +4 -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 +3 -1
- package/internal-do-not-import-from-here/shared/models/index.js +3 -1
- package/internal-do-not-import-from-here/shared/models/theming/ChromeDefinition.d.ts +16 -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 +93 -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 +11 -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 +38 -15
- 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 +10 -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/Enums.js +7 -7
- package/models/VelcronDefinitions.d.ts +71 -87
- 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 +0 -1
- package/models/index.js +0 -1
- package/package.json +1 -1
- package/parser/VelcronActions.js +3 -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 +6 -6
- package/parser/VelcronPropertyEditors.js +1 -1
- package/parser/VelcronRenderers.d.ts +2 -2
- package/parser/VelcronRenderers.js +2 -2
- package/parser/VelcronStyles.d.ts +2 -1
- package/parser/VelcronStyles.js +168 -65
- 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 -24
- package/internal-do-not-import-from-here/shared/models/hub/activities/FeedResult.d.ts +0 -9
- 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 → HttpCommon.js} +0 -0
- /package/internal-do-not-import-from-here/shared/models/{hub/activities/FeedResult.js → StronglyTypedId.js} +0 -0
- /package/{models/VelcronEvents.js → internal-do-not-import-from-here/shared/models/hub/ExternalIdentityId.js} +0 -0
- /package/{models → internal-do-not-import-from-here/shared/models/velcron}/VelcronEvents.d.ts +0 -0
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
|
}
|
|
@@ -80,6 +80,7 @@ class VelcronStyles {
|
|
|
80
80
|
styleBase["borderLeftStyle"] = "solid";
|
|
81
81
|
styleBase["borderLeftColor"] = borderColor;
|
|
82
82
|
}
|
|
83
|
+
styleBase["borderWidth"] = borderSettings.width ? this.unitProvider.formatDimension(borderSettings.width) : 1;
|
|
83
84
|
}
|
|
84
85
|
static create(definition, renderCtx) {
|
|
85
86
|
if (!definition) {
|
|
@@ -88,14 +89,14 @@ class VelcronStyles {
|
|
|
88
89
|
const styleBase = { ...definition.style };
|
|
89
90
|
/**Generic styling */
|
|
90
91
|
if (definition.margin) {
|
|
91
|
-
const spacing = renderCtx.
|
|
92
|
-
styleBase["marginTop"] = this.unitProvider.formatDimension((0, __1.getSpacingValueFromBlueprint)(definition.margin.top, spacing));
|
|
93
|
-
styleBase["marginRight"] = this.unitProvider.formatDimension((0, __1.getSpacingValueFromBlueprint)(definition.margin.right, spacing));
|
|
94
|
-
styleBase["marginBottom"] = this.unitProvider.formatDimension((0, __1.getSpacingValueFromBlueprint)(definition.margin.bottom, spacing));
|
|
95
|
-
styleBase["marginLeft"] = this.unitProvider.formatDimension((0, __1.getSpacingValueFromBlueprint)(definition.margin.left, spacing));
|
|
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));
|
|
96
97
|
}
|
|
97
98
|
if (definition.padding) {
|
|
98
|
-
const spacing = renderCtx.
|
|
99
|
+
const spacing = renderCtx.theming.get.spacing();
|
|
99
100
|
// const padding:VelcronSpacing = definition.padding instanceof Object ? definition.padding :
|
|
100
101
|
// VelcronData.getOrSetObjectByPathUsingRenderContext(renderCtx, definition.padding);
|
|
101
102
|
//const padding = VelcronData.dataBind(renderCtx, definition.padding) as any as VelcronDimensions;
|
|
@@ -143,79 +144,181 @@ class VelcronStyles {
|
|
|
143
144
|
else {
|
|
144
145
|
styleBase["color"] = textDefinition.toned ? renderCtx.colors.get.onBase.colorToned : renderCtx.colors.get.onBase.color;
|
|
145
146
|
}
|
|
147
|
+
if (textDefinition.noWrap) {
|
|
148
|
+
styleBase["textWrap"] = "nowrap";
|
|
149
|
+
}
|
|
150
|
+
}
|
|
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);
|
|
146
157
|
}
|
|
147
|
-
else if (definition.type === VelcronConstants_1.VelcronConstants.components.
|
|
148
|
-
const
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
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();
|
|
152
170
|
styleBase["position"] = "absolute";
|
|
153
171
|
/**Use margin to position the element since flex does not support absolute positioning */
|
|
154
|
-
styleBase["marginTop"] = this.unitProvider.formatDimension((0, __1.getSpacingValueFromBlueprint)(VelcronData_1.VelcronData.dataBind(renderCtx,
|
|
155
|
-
styleBase["marginRight"] = this.unitProvider.formatDimension((0, __1.getSpacingValueFromBlueprint)(VelcronData_1.VelcronData.dataBind(renderCtx,
|
|
156
|
-
styleBase["marginBottom"] = this.unitProvider.formatDimension((0, __1.getSpacingValueFromBlueprint)(VelcronData_1.VelcronData.dataBind(renderCtx,
|
|
157
|
-
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));
|
|
158
176
|
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
styleBase["flexDirection"] = direction === "column" ? "column"
|
|
163
|
-
: direction === "column-reverse" ? "column-reverse"
|
|
164
|
-
: direction === "row-reverse" ? "row-reverse"
|
|
165
|
-
: "row";
|
|
166
|
-
if (flexViewDefinition.width) {
|
|
167
|
-
const width = VelcronData_1.VelcronData.dataBind(renderCtx, flexViewDefinition.width);
|
|
168
|
-
if (!direction || direction === "" || direction === "row" || direction === "row-reverse") {
|
|
169
|
-
styleBase["flexBasis"] = this.unitProvider.formatDimension(width);
|
|
170
|
-
styleBase["maxWidth"] = this.unitProvider.formatDimension(width);
|
|
177
|
+
if (flexDefinition.alignX) {
|
|
178
|
+
if (flexDefinition.alignX === "right") {
|
|
179
|
+
alignX = "flex-end";
|
|
171
180
|
}
|
|
172
|
-
else {
|
|
173
|
-
|
|
181
|
+
else if (flexDefinition.alignX === "center") {
|
|
182
|
+
alignX = "center";
|
|
174
183
|
}
|
|
175
|
-
//styleBase["width"] = this.unitProvider.formatDimension(flexViewDefinition.width);
|
|
176
|
-
}
|
|
177
|
-
if (flexViewDefinition.minWidth) {
|
|
178
|
-
const minWidth = VelcronData_1.VelcronData.dataBind(renderCtx, flexViewDefinition.minWidth);
|
|
179
|
-
styleBase["minWidth"] = this.unitProvider.formatDimension(minWidth);
|
|
180
184
|
}
|
|
181
|
-
if (
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
styleBase["maxHeight"] = this.unitProvider.formatDimension(height);
|
|
185
|
-
styleBase["flexBasis"] = this.unitProvider.formatDimension(height);
|
|
185
|
+
if (flexDefinition.alignY) {
|
|
186
|
+
if (flexDefinition.alignY === "center") {
|
|
187
|
+
alignY = "center";
|
|
186
188
|
}
|
|
187
|
-
else {
|
|
188
|
-
|
|
189
|
-
}
|
|
190
|
-
//direction === "column" || direction === "column-reverse"
|
|
191
|
-
}
|
|
192
|
-
if (flexViewDefinition.minHeight) {
|
|
193
|
-
const minHeight = VelcronData_1.VelcronData.dataBind(renderCtx, flexViewDefinition.minHeight);
|
|
194
|
-
styleBase["minHeight"] = this.unitProvider.formatDimension(minHeight);
|
|
195
|
-
}
|
|
196
|
-
if (flexViewDefinition.hAlign) {
|
|
197
|
-
const propertyName = direction === "column" || direction === "column-reverse" ? "alignItems" : "justifyContent";
|
|
198
|
-
if (flexViewDefinition.hAlign === models_1.VelcronHorizontalAlignments.right) {
|
|
199
|
-
styleBase[propertyName] = "flex-end";
|
|
189
|
+
else if (flexDefinition.alignY === "bottom") {
|
|
190
|
+
alignY = "flex-end";
|
|
200
191
|
}
|
|
201
|
-
else
|
|
202
|
-
|
|
192
|
+
else {
|
|
193
|
+
alignY = "stretch";
|
|
203
194
|
}
|
|
204
195
|
}
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
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";
|
|
209
221
|
}
|
|
210
|
-
else if (
|
|
211
|
-
|
|
222
|
+
else if (flexDefinition.alignY === "bottom") {
|
|
223
|
+
yAlignment = "end";
|
|
212
224
|
}
|
|
213
225
|
}
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
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);
|
|
218
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
|
+
//}
|
|
219
322
|
/**
|
|
220
323
|
*
|
|
221
324
|
* Generic styles for all components
|
|
@@ -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: "info" | "error" |
|
|
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: "info" | "error" |
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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: "base" | "onBase" | "container" | "onContainer" | import("@omnia/fx-models").ColorTypes) => string;
|
|
22
|
+
colorDefinition: (colorSchemaType: "info" | "error" | "primary" | "secondary" | "accent1" | "accent2" | "accent3" | "neutral" | "background" | ColorSchemaTypes, colorType: "base" | "onBase" | "container" | "onContainer" | import("@omnia/fx-models").ColorTypes) => ColorDefinition;
|
|
22
23
|
complementaryColorType: (colorType: "base" | "onBase" | "container" | "onContainer" | import("@omnia/fx-models").ColorTypes) => import("@omnia/fx-models").ColorTypes;
|
|
23
|
-
complementaryColor: (colorSchemaType: "info" | "error" |
|
|
24
|
-
complementaryColorDefinition: (colorSchemaType: "info" | "error" |
|
|
24
|
+
complementaryColor: (colorSchemaType: "info" | "error" | "primary" | "secondary" | "accent1" | "accent2" | "accent3" | "neutral" | "background" | ColorSchemaTypes, colorType: "base" | "onBase" | "container" | "onContainer" | import("@omnia/fx-models").ColorTypes) => string;
|
|
25
|
+
complementaryColorDefinition: (colorSchemaType: "info" | "error" | "primary" | "secondary" | "accent1" | "accent2" | "accent3" | "neutral" | "background" | ColorSchemaTypes, colorType: "base" | "onBase" | "container" | "onContainer" | import("@omnia/fx-models").ColorTypes) => 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,15 @@
|
|
|
1
|
+
import { TypographyType, VelcronPropertyEditor, VelcronTypographyEditorSettings } from "@omnia/fx-models";
|
|
2
|
+
export declare class VelcronEditorBuilder2 {
|
|
3
|
+
private editors;
|
|
4
|
+
private formatStateMapping;
|
|
5
|
+
add(): {
|
|
6
|
+
spacingEditor: (name: string, stateMapping: string, individualSelection?: boolean) => VelcronEditorBuilder2;
|
|
7
|
+
imageEditor: (name: string, stateMapping: string) => VelcronEditorBuilder2;
|
|
8
|
+
colorSchemaEditor: (name: string, stateMapping: string) => VelcronEditorBuilder2;
|
|
9
|
+
markdownEditor: (name: string, stateMapping: string, placeholder?: string) => VelcronEditorBuilder2;
|
|
10
|
+
textEditor: (name: string, stateMapping: string, typographyType: TypographyType, placeholder?: string) => VelcronEditorBuilder2;
|
|
11
|
+
blockHeaderEditor: () => VelcronEditorBuilder2;
|
|
12
|
+
typographyEditor: (stateMapping: string, settings: VelcronTypographyEditorSettings) => VelcronEditorBuilder2;
|
|
13
|
+
};
|
|
14
|
+
build(): VelcronPropertyEditor<any>[];
|
|
15
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VelcronEditorBuilder2 = void 0;
|
|
4
|
+
const fx_models_1 = require("@omnia/fx-models");
|
|
5
|
+
class VelcronEditorBuilder2 {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.editors = [];
|
|
8
|
+
}
|
|
9
|
+
formatStateMapping(stateMapping) {
|
|
10
|
+
return stateMapping.replace("{{", "").replace("}}", "");
|
|
11
|
+
}
|
|
12
|
+
add() {
|
|
13
|
+
return {
|
|
14
|
+
spacingEditor: (name, stateMapping, individualSelection) => {
|
|
15
|
+
this.editors.push({
|
|
16
|
+
name: name,
|
|
17
|
+
type: "spacing",
|
|
18
|
+
stateMapping: this.formatStateMapping(stateMapping),
|
|
19
|
+
settings: {
|
|
20
|
+
individualSelection: individualSelection
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
return this;
|
|
24
|
+
},
|
|
25
|
+
imageEditor: (name, stateMapping) => {
|
|
26
|
+
this.editors.push({
|
|
27
|
+
name: name,
|
|
28
|
+
type: "image",
|
|
29
|
+
stateMapping: this.formatStateMapping(stateMapping),
|
|
30
|
+
});
|
|
31
|
+
return this;
|
|
32
|
+
},
|
|
33
|
+
colorSchemaEditor: (name, stateMapping) => {
|
|
34
|
+
this.editors.push({
|
|
35
|
+
name: name,
|
|
36
|
+
type: "color-schema-type",
|
|
37
|
+
stateMapping: this.formatStateMapping(stateMapping),
|
|
38
|
+
});
|
|
39
|
+
return this;
|
|
40
|
+
},
|
|
41
|
+
markdownEditor: (name, stateMapping, placeholder) => {
|
|
42
|
+
this.editors.push({
|
|
43
|
+
name: name,
|
|
44
|
+
type: "markdown",
|
|
45
|
+
stateMapping: this.formatStateMapping(stateMapping),
|
|
46
|
+
settings: {
|
|
47
|
+
placeholder: placeholder
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
return this;
|
|
51
|
+
},
|
|
52
|
+
textEditor: (name, stateMapping, typographyType, placeholder) => {
|
|
53
|
+
this.editors.push({
|
|
54
|
+
name: name,
|
|
55
|
+
type: "text",
|
|
56
|
+
stateMapping: this.formatStateMapping(stateMapping),
|
|
57
|
+
settings: {
|
|
58
|
+
type: typographyType,
|
|
59
|
+
placeholder: placeholder
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
return this;
|
|
63
|
+
},
|
|
64
|
+
blockHeaderEditor: () => {
|
|
65
|
+
this.editors.push({
|
|
66
|
+
name: "Typography",
|
|
67
|
+
type: "typography",
|
|
68
|
+
stateMapping: fx_models_1.VelcronHeaderStateBinding.title.typography.editor,
|
|
69
|
+
settings: {
|
|
70
|
+
type: "title"
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
return this;
|
|
74
|
+
},
|
|
75
|
+
typographyEditor: (stateMapping, settings) => {
|
|
76
|
+
this.editors.push({
|
|
77
|
+
name: "Typography",
|
|
78
|
+
type: "typography",
|
|
79
|
+
stateMapping: stateMapping,
|
|
80
|
+
settings: settings ? settings : {
|
|
81
|
+
type: "text"
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
return this;
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
build() {
|
|
89
|
+
// const result = [] as Array<VelcronPropertyEditor>;
|
|
90
|
+
// if(this.colorSchemaEditorBuilder){
|
|
91
|
+
// result.push(...this.colorSchemaEditorBuilder.internalBuild());
|
|
92
|
+
// }
|
|
93
|
+
// if(this.contentEditorBuilder){
|
|
94
|
+
// result.push(...this.contentEditorBuilder.internalBuild());
|
|
95
|
+
// }
|
|
96
|
+
// if(this.imageEditorBuilder){
|
|
97
|
+
// result.push(...this.imageEditorBuilder.internalBuild());
|
|
98
|
+
// }
|
|
99
|
+
// if(this.propertyMappingBuilder){
|
|
100
|
+
// result.push(...this.propertyMappingBuilder.internalBuild());
|
|
101
|
+
// }
|
|
102
|
+
return this.editors;
|
|
103
|
+
// return result;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
exports.VelcronEditorBuilder2 = VelcronEditorBuilder2;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { VelcronPropertyEditor } from "
|
|
1
|
+
import { VelcronPropertyEditor } from "@omnia/fx-models";
|
|
2
2
|
import { VelcronEditorBuilder } from "./VelcronEditorBuilder";
|
|
3
3
|
export declare abstract class VelcronEditorBuilderBase {
|
|
4
4
|
protected builder: VelcronEditorBuilder;
|
package/templatebuilder/index.js
CHANGED
|
File without changes
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// import { VelcronStateBuilderBase } from "./VelcronStateBuilderBase";
|
|
2
|
+
// import { VelcronTextContentBuilder } from "./VelcronTextContentBuilder";
|
|
3
|
+
// export class VelcronBlockHeaderStateBuilder extends VelcronStateBuilderBase {
|
|
4
|
+
// title = new VelcronTextContentBuilder<VelcronBlockHeaderStateBuilder>(this,"content.title");
|
|
5
|
+
// constructor(stateBuilder) {
|
|
6
|
+
// super(stateBuilder);
|
|
7
|
+
// }
|
|
8
|
+
// protected internalBuild() {
|
|
9
|
+
// const resultValue = {} as VelcronContentState;
|
|
10
|
+
// let hasContent = false;
|
|
11
|
+
// const mainContent = (this.main as any).internalBuild();
|
|
12
|
+
// const captionContent = (this.caption as any).internalBuild();
|
|
13
|
+
// const titleContent = (this.title as any).internalBuild();
|
|
14
|
+
// const summaryContent = (this.summary as any).internalBuild();
|
|
15
|
+
// if(mainContent){
|
|
16
|
+
// hasContent = true;
|
|
17
|
+
// resultValue.main = mainContent;
|
|
18
|
+
// }
|
|
19
|
+
// if(captionContent){
|
|
20
|
+
// hasContent = true;
|
|
21
|
+
// resultValue.caption = captionContent;
|
|
22
|
+
// }
|
|
23
|
+
// if(titleContent){
|
|
24
|
+
// hasContent = true;
|
|
25
|
+
// resultValue.title = titleContent;
|
|
26
|
+
// }
|
|
27
|
+
// if(summaryContent){
|
|
28
|
+
// hasContent = true;
|
|
29
|
+
// resultValue.summary = summaryContent;
|
|
30
|
+
// }
|
|
31
|
+
// if(!hasContent){
|
|
32
|
+
// return null;
|
|
33
|
+
// }
|
|
34
|
+
// return <VelcronState>{
|
|
35
|
+
// content: resultValue
|
|
36
|
+
// };
|
|
37
|
+
// }
|
|
38
|
+
// }
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// import { VelcronContentState, VelcronImagePropertyEditor, VelcronImageRatios, VelcronImageState, VelcronMarkdownPropertyEditor, VelcronTextPropertyEditor} from "@omnia/fx-models";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.useVelcronEditorBuilder = void 0;
|
|
5
|
+
const VelcronEditorBuilder2_1 = require("./editor/VelcronEditorBuilder2");
|
|
6
|
+
function useVelcronEditorBuilder() {
|
|
7
|
+
return new VelcronEditorBuilder2_1.VelcronEditorBuilder2();
|
|
8
|
+
}
|
|
9
|
+
exports.useVelcronEditorBuilder = useVelcronEditorBuilder;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export type BringMethods = "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS";
|
|
2
|
-
export type BringCacheOptions = "no-cache" | "reload" | "force-cache" | "only-if-cached";
|
|
3
|
-
export type BringCredentials = "include" | "omit" | "same-origin";
|
|
4
|
-
export interface BringInterceptOptions {
|
|
5
|
-
beforeRequest?: (request: BringConfig) => BringConfig;
|
|
6
|
-
afterRequest?: <T>(response: BringResponse<T>, request: BringConfig) => BringResponse<T>;
|
|
7
|
-
}
|
|
8
|
-
export interface BringConfig {
|
|
9
|
-
baseUrl?: string;
|
|
10
|
-
headers?: {
|
|
11
|
-
[key: string]: string;
|
|
12
|
-
};
|
|
13
|
-
cache?: BringCacheOptions;
|
|
14
|
-
interceptors?: BringInterceptOptions;
|
|
15
|
-
abortable?: boolean;
|
|
16
|
-
credentials?: BringCredentials;
|
|
17
|
-
executeOnWorker?: boolean;
|
|
18
|
-
}
|
|
19
|
-
export interface BringResponse<TData> {
|
|
20
|
-
data?: TData;
|
|
21
|
-
status: Number;
|
|
22
|
-
statusText: String;
|
|
23
|
-
ok: Boolean;
|
|
24
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Activity, ActivityId } from "./Activity";
|
|
2
|
-
import { ActivityRenderer } from "./ActivityRenderer";
|
|
3
|
-
import { IdentityActivity } from "./IdentityActivity";
|
|
4
|
-
export interface FeedResult {
|
|
5
|
-
renderers: Array<ActivityRenderer>;
|
|
6
|
-
identityActivities: Array<IdentityActivity>;
|
|
7
|
-
activities: Array<Activity>;
|
|
8
|
-
nextStartingFromId: ActivityId;
|
|
9
|
-
}
|