@omnia/velcron 8.0.91-vnext → 8.0.92-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.
Files changed (156) hide show
  1. package/actions/Alert.js +1 -1
  2. package/actions/Array.js +9 -2
  3. package/actions/Clone.d.ts +2 -0
  4. package/actions/Clone.js +11 -0
  5. package/actions/Date.d.ts +3 -0
  6. package/actions/Date.js +29 -0
  7. package/actions/Http.js +23 -6
  8. package/actions/IActionHandler.d.ts +1 -0
  9. package/actions/Timer.d.ts +4 -0
  10. package/actions/Timer.js +80 -0
  11. package/actions/index.d.ts +3 -0
  12. package/actions/index.js +3 -0
  13. package/internal-do-not-import-from-here/shared/models/Broadcasting.js +1 -1
  14. package/internal-do-not-import-from-here/shared/models/DynamicState.d.ts +1 -0
  15. package/internal-do-not-import-from-here/shared/models/Equals.js +33 -3
  16. package/internal-do-not-import-from-here/shared/models/Future.d.ts +17 -1
  17. package/internal-do-not-import-from-here/shared/models/Future.js +26 -5
  18. package/internal-do-not-import-from-here/shared/models/Guid.d.ts +1 -0
  19. package/internal-do-not-import-from-here/shared/models/Guid.js +13 -6
  20. package/internal-do-not-import-from-here/shared/models/HttpCommon.d.ts +27 -0
  21. package/internal-do-not-import-from-here/shared/models/OmniaSharedBootstrapData.d.ts +7 -1
  22. package/internal-do-not-import-from-here/shared/models/Realtime.d.ts +1 -13
  23. package/internal-do-not-import-from-here/shared/models/Realtime.js +1 -22
  24. package/internal-do-not-import-from-here/shared/models/StronglyTypedId.d.ts +3 -0
  25. package/internal-do-not-import-from-here/shared/models/StronglyTypedId.js +2 -0
  26. package/internal-do-not-import-from-here/shared/models/Tokens.d.ts +1 -0
  27. package/internal-do-not-import-from-here/shared/models/WorkerProxyFuncs.d.ts +7 -1
  28. package/internal-do-not-import-from-here/shared/models/WorkerProxyFuncs.js +5 -1
  29. package/internal-do-not-import-from-here/shared/models/Workers.js +1 -1
  30. package/internal-do-not-import-from-here/shared/models/hub/ExternalIdentityId.d.ts +2 -0
  31. package/internal-do-not-import-from-here/shared/models/hub/ExternalIdentityId.js +2 -0
  32. package/internal-do-not-import-from-here/shared/models/hub/TempSocialReactions.d.ts +13 -0
  33. package/internal-do-not-import-from-here/shared/models/hub/TempSocialReactions.js +20 -0
  34. package/internal-do-not-import-from-here/shared/models/hub/activities/Activity.d.ts +67 -0
  35. package/internal-do-not-import-from-here/shared/models/hub/activities/Activity.js +7 -0
  36. package/internal-do-not-import-from-here/shared/models/hub/activities/ActivityChannel.d.ts +7 -0
  37. package/internal-do-not-import-from-here/shared/models/hub/activities/ActivityChannel.js +5 -0
  38. package/internal-do-not-import-from-here/shared/models/hub/activities/ActivityDefinition.d.ts +14 -0
  39. package/internal-do-not-import-from-here/shared/models/hub/activities/ActivityDefinition.js +15 -0
  40. package/internal-do-not-import-from-here/shared/models/hub/activities/ActivityFeed.d.ts +30 -0
  41. package/internal-do-not-import-from-here/shared/models/hub/activities/ActivityFeed.js +2 -0
  42. package/internal-do-not-import-from-here/shared/models/hub/activities/ActivityRenderer.d.ts +15 -0
  43. package/internal-do-not-import-from-here/shared/models/hub/activities/ActivityRenderer.js +5 -0
  44. package/internal-do-not-import-from-here/shared/models/hub/activities/ActivityRendererLoadingReferences.d.ts +8 -0
  45. package/internal-do-not-import-from-here/shared/models/hub/activities/ActivityRendererLoadingReferences.js +2 -0
  46. package/internal-do-not-import-from-here/shared/models/hub/activities/ActivitySender.d.ts +15 -0
  47. package/internal-do-not-import-from-here/shared/models/hub/activities/ActivitySender.js +5 -0
  48. package/internal-do-not-import-from-here/shared/models/hub/activities/IdentityActivity.d.ts +40 -0
  49. package/internal-do-not-import-from-here/shared/models/hub/activities/IdentityActivity.js +39 -0
  50. package/internal-do-not-import-from-here/shared/models/hub/activities/index.d.ts +8 -0
  51. package/internal-do-not-import-from-here/shared/models/hub/activities/index.js +11 -0
  52. package/internal-do-not-import-from-here/shared/models/hub/fileupload/FileOwnerId.d.ts +3 -0
  53. package/internal-do-not-import-from-here/shared/models/hub/fileupload/FileOwnerId.js +5 -0
  54. package/internal-do-not-import-from-here/shared/models/hub/fileupload/TemporaryFileId.d.ts +4 -0
  55. package/internal-do-not-import-from-here/shared/models/hub/fileupload/TemporaryFileId.js +5 -0
  56. package/internal-do-not-import-from-here/shared/models/hub/fileupload/index.d.ts +2 -0
  57. package/internal-do-not-import-from-here/shared/models/hub/fileupload/index.js +5 -0
  58. package/internal-do-not-import-from-here/shared/models/hub/index.d.ts +5 -0
  59. package/internal-do-not-import-from-here/shared/models/hub/index.js +8 -0
  60. package/internal-do-not-import-from-here/shared/models/hub/social/HubComment.d.ts +10 -0
  61. package/internal-do-not-import-from-here/shared/models/hub/social/HubComment.js +2 -0
  62. package/internal-do-not-import-from-here/shared/models/hub/social/HubReaction.d.ts +5 -0
  63. package/internal-do-not-import-from-here/shared/models/hub/social/HubReaction.js +2 -0
  64. package/internal-do-not-import-from-here/shared/models/hub/social/index.d.ts +2 -0
  65. package/internal-do-not-import-from-here/shared/models/hub/social/index.js +5 -0
  66. package/internal-do-not-import-from-here/shared/models/index.d.ts +5 -1
  67. package/internal-do-not-import-from-here/shared/models/index.js +5 -1
  68. package/internal-do-not-import-from-here/shared/models/theming/BlueprintDefinition.d.ts +44 -46
  69. package/internal-do-not-import-from-here/shared/models/theming/BlueprintDefinition.js +7 -13
  70. package/internal-do-not-import-from-here/shared/models/theming/ChromeDefinition.d.ts +25 -0
  71. package/internal-do-not-import-from-here/shared/models/theming/ChromeDefinition.js +2 -0
  72. package/internal-do-not-import-from-here/shared/models/theming/SharedBlueprintMethods.d.ts +2 -2
  73. package/internal-do-not-import-from-here/shared/models/theming/SharedBlueprintMethods.js +8 -7
  74. package/internal-do-not-import-from-here/shared/models/theming/SpacingSetting.d.ts +5 -4
  75. package/internal-do-not-import-from-here/shared/models/theming/SpacingSetting.js +1 -1
  76. package/internal-do-not-import-from-here/shared/models/theming/ThemeDefinitionV2.d.ts +24 -15
  77. package/internal-do-not-import-from-here/shared/models/theming/ThemeDefinitionV2.js +8 -10
  78. package/internal-do-not-import-from-here/shared/models/theming/TypographyDefinition.d.ts +8 -4
  79. package/internal-do-not-import-from-here/shared/models/theming/TypographyDefinition.js +2 -3
  80. package/internal-do-not-import-from-here/shared/models/theming/UseThemeMethods.d.ts +3 -5
  81. package/internal-do-not-import-from-here/shared/models/theming/UseThemeMethods.js +4 -33
  82. package/internal-do-not-import-from-here/shared/models/theming/index.d.ts +1 -1
  83. package/internal-do-not-import-from-here/shared/models/theming/index.js +2 -1
  84. package/internal-do-not-import-from-here/shared/models/velcron/VelcronDefinition.d.ts +87 -0
  85. package/internal-do-not-import-from-here/shared/models/velcron/VelcronDefinition.js +2 -0
  86. package/internal-do-not-import-from-here/shared/models/velcron/VelcronEvents.js +2 -0
  87. package/internal-do-not-import-from-here/shared/models/velcron/index.d.ts +2 -0
  88. package/internal-do-not-import-from-here/shared/models/velcron/index.js +5 -0
  89. package/models/ActionHooks.d.ts +12 -0
  90. package/models/ActionHooks.js +2 -0
  91. package/models/Enums.d.ts +6 -0
  92. package/models/Enums.js +14 -7
  93. package/models/VelcronDefinitions.d.ts +95 -91
  94. package/models/VelcronDefinitions.js +1 -1
  95. package/models/VelcronPropertyEditorDefinitions.d.ts +268 -18
  96. package/models/VelcronPropertyEditorDefinitions.js +114 -2
  97. package/models/VelcronTypes.d.ts +1 -1
  98. package/models/ViewModelAndContext.d.ts +1 -1
  99. package/models/index.d.ts +1 -1
  100. package/models/index.js +1 -1
  101. package/package.json +1 -1
  102. package/parser/VelcronActions.d.ts +8 -2
  103. package/parser/VelcronActions.js +23 -3
  104. package/parser/VelcronConstants.d.ts +15 -5
  105. package/parser/VelcronConstants.js +15 -5
  106. package/parser/VelcronData.d.ts +3 -2
  107. package/parser/VelcronData.js +21 -13
  108. package/parser/VelcronPropertyEditors.js +1 -1
  109. package/parser/VelcronRenderers.d.ts +2 -1
  110. package/parser/VelcronRenderers.js +22 -21
  111. package/parser/VelcronStyles.d.ts +2 -1
  112. package/parser/VelcronStyles.js +181 -72
  113. package/stores/ReactivitySystem.d.ts +2 -2
  114. package/stores/ReactivitySystem.js +1 -1
  115. package/stores/VelcronColorSchema.d.ts +10 -9
  116. package/stores/VelcronTheming.d.ts +4 -3
  117. package/stores/VelcronTheming.js +15 -3
  118. package/stores/index.d.ts +0 -1
  119. package/stores/index.js +1 -1
  120. package/templatebuilder/editor/VelcronContentEditor.d.ts +26 -2
  121. package/templatebuilder/editor/VelcronContentEditor.js +164 -4
  122. package/templatebuilder/editor/VelcronEditorBuilder.d.ts +3 -0
  123. package/templatebuilder/editor/VelcronEditorBuilder.js +10 -0
  124. package/templatebuilder/editor/VelcronEditorBuilder2.d.ts +15 -0
  125. package/templatebuilder/editor/VelcronEditorBuilder2.js +106 -0
  126. package/templatebuilder/editor/VelcronEditorBuilderBase.d.ts +1 -1
  127. package/templatebuilder/editor/VelcronPropertyMappingEditorBuilder.d.ts +9 -0
  128. package/templatebuilder/editor/VelcronPropertyMappingEditorBuilder.js +30 -0
  129. package/templatebuilder/index.d.ts +1 -0
  130. package/templatebuilder/index.js +1 -0
  131. package/templatebuilder/state/VelcronBlockHeaderStateBuilder.d.ts +0 -0
  132. package/templatebuilder/state/VelcronBlockHeaderStateBuilder.js +38 -0
  133. package/templatebuilder/state/VelcronColorSchemaBuilder.d.ts +10 -5
  134. package/templatebuilder/state/VelcronColorSchemaBuilder.js +18 -6
  135. package/templatebuilder/state/VelcronContentStateBuilder.d.ts +7 -13
  136. package/templatebuilder/state/VelcronContentStateBuilder.js +26 -18
  137. package/templatebuilder/state/VelcronImageStateBuilder.d.ts +2 -4
  138. package/templatebuilder/state/VelcronImageStateBuilder.js +10 -4
  139. package/templatebuilder/state/VelcronPropertyMappingStateBuilder.d.ts +12 -0
  140. package/templatebuilder/state/VelcronPropertyMappingStateBuilder.js +35 -0
  141. package/templatebuilder/state/VelcronStateBuilder.d.ts +5 -1
  142. package/templatebuilder/state/VelcronStateBuilder.js +8 -0
  143. package/templatebuilder/state/VelcronStateBuilderBase.d.ts +7 -3
  144. package/templatebuilder/state/VelcronStateBuilderBase.js +8 -4
  145. package/templatebuilder/state/VelcronTextContentBuilder.d.ts +32 -0
  146. package/templatebuilder/state/VelcronTextContentBuilder.js +110 -0
  147. package/templatebuilder/useVelcronEditorBuilder.d.ts +2 -0
  148. package/templatebuilder/useVelcronEditorBuilder.js +9 -0
  149. package/internal-do-not-import-from-here/shared/models/Bring.d.ts +0 -23
  150. package/internal-do-not-import-from-here/shared/models/theming/OmniaThemes.d.ts +0 -5
  151. package/internal-do-not-import-from-here/shared/models/theming/OmniaThemes.js +0 -18
  152. package/stores/VelcronBlueprint.d.ts +0 -39
  153. package/stores/VelcronBlueprint.js +0 -55
  154. /package/internal-do-not-import-from-here/shared/models/{Bring.js → DynamicState.js} +0 -0
  155. /package/{models/VelcronEvents.js → internal-do-not-import-from-here/shared/models/HttpCommon.js} +0 -0
  156. /package/{models → internal-do-not-import-from-here/shared/models/velcron}/VelcronEvents.d.ts +0 -0
@@ -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"] = renderCtx.colors.get[borderSettings.color];
69
+ styleBase["borderTopColor"] = borderColor;
64
70
  }
65
71
  if (borderSettings.right || borderSettings.right === 0) {
66
72
  styleBase["borderRightStyle"] = "solid";
67
- styleBase["borderRightColor"] = renderCtx.colors.get[borderSettings.color];
73
+ styleBase["borderRightColor"] = borderColor;
68
74
  }
69
75
  if (borderSettings.bottom || borderSettings.bottom === 0) {
70
76
  styleBase["borderBottomStyle"] = "solid";
71
- styleBase["borderBottomColor"] = renderCtx.colors.get[borderSettings.color];
77
+ styleBase["borderBottomColor"] = borderColor;
72
78
  }
73
79
  if (borderSettings.left || borderSettings.left === 0) {
74
80
  styleBase["borderLeftStyle"] = "solid";
75
- styleBase["borderLeftColor"] = renderCtx.colors.get[borderSettings.color];
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
- // if(definition.styling?.margin){
85
- // const spacing = renderCtx.blueprints.get.spacing.inner;
86
- // styleBase["marginTop"] = this.unitProvider.formatDimension(getSpacingValueFromBlueprint(definition.styling.margin.top,spacing)) as any;
87
- // styleBase["marginRight"] = this.unitProvider.formatDimension(getSpacingValueFromBlueprint(definition.styling.margin.right,spacing)) as any;
88
- // styleBase["marginBottom"] = this.unitProvider.formatDimension(getSpacingValueFromBlueprint(definition.styling.margin.bottom,spacing)) as any;
89
- // styleBase["marginLeft"] = this.unitProvider.formatDimension(getSpacingValueFromBlueprint(definition.styling.margin.left,spacing)) as any;
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.blueprints.get.spacing.inner;
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.appDefinition) {
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.view) {
142
- const flexViewDefinition = definition;
143
- styleBase["overflow"] = "hidden";
144
- if (flexViewDefinition.absolute) {
145
- const spacing = renderCtx.blueprints.get.spacing.inner;
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, flexViewDefinition.absolute.top), spacing));
149
- styleBase["marginRight"] = this.unitProvider.formatDimension((0, __1.getSpacingValueFromBlueprint)(VelcronData_1.VelcronData.dataBind(renderCtx, flexViewDefinition.absolute.right), spacing));
150
- styleBase["marginBottom"] = this.unitProvider.formatDimension((0, __1.getSpacingValueFromBlueprint)(VelcronData_1.VelcronData.dataBind(renderCtx, flexViewDefinition.absolute.bottom), spacing));
151
- styleBase["marginLeft"] = this.unitProvider.formatDimension((0, __1.getSpacingValueFromBlueprint)(VelcronData_1.VelcronData.dataBind(renderCtx, flexViewDefinition.absolute.left), spacing));
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
- const flexGrow = flexViewDefinition.grow || flexViewDefinition.grow === 0 ? flexViewDefinition.grow : 1;
154
- const direction = VelcronData_1.VelcronData.dataBind(renderCtx, flexViewDefinition.direction);
155
- styleBase["flex"] = flexGrow;
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
- styleBase["width"] = this.unitProvider.formatDimension(width);
181
+ else if (flexDefinition.alignX === "center") {
182
+ alignX = "center";
168
183
  }
169
- //styleBase["width"] = this.unitProvider.formatDimension(flexViewDefinition.width);
170
184
  }
171
- if (flexViewDefinition.minWidth) {
172
- const minWidth = VelcronData_1.VelcronData.dataBind(renderCtx, flexViewDefinition.minWidth);
173
- styleBase["minWidth"] = this.unitProvider.formatDimension(minWidth);
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
- //direction === "column" || direction === "column-reverse"
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 if (flexViewDefinition.horizontalAlignment === models_1.VelcronHorizontalAlignments.center) {
196
- styleBase[propertyName] = "center";
192
+ else {
193
+ alignY = "stretch";
197
194
  }
198
195
  }
199
- const propertyName = direction === "column" || direction === "column-reverse" ? "justifyContent" : "alignItems";
200
- if (flexViewDefinition.verticalAlignment) {
201
- if (flexViewDefinition.verticalAlignment === models_1.VelcronVerticalAlignments.center) {
202
- styleBase[propertyName] = "center";
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 (flexViewDefinition.verticalAlignment === models_1.VelcronVerticalAlignments.bottom) {
205
- styleBase[propertyName] = "flex-end";
222
+ else if (flexDefinition.alignY === "bottom") {
223
+ yAlignment = "end";
206
224
  }
207
225
  }
208
- else {
209
- styleBase[propertyName] = "flex-start";
210
- }
211
- this.insertBackgroundColor(styleBase, flexViewDefinition, renderCtx);
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
@@ -1,5 +1,5 @@
1
1
  export declare class ReactivitySystem {
2
- static makeReactive: (obj: any) => unknown;
2
+ static makeReactive: (obj: any) => any;
3
3
  static hasReactivityProvider: boolean;
4
- static registerProvider(fn: (obj: any) => unknown): void;
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: ColorSchemaTypes | 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
- blueprint: (blueprintType: import("@omnia/fx-models").BlueprintType | import("@omnia/fx-models").BlueprintTypes) => import("@omnia/fx-models").BlueprintDefinition;
18
- colorSchema: (colorSchemaType: ColorSchemaTypes | ColorSchemaType) => ColorSchema;
19
- typography: (typographyType: import("@omnia/fx-models").TypographyType | import("@omnia/fx-models").TypographyTypes, size: import("@omnia/fx-models").TypographySize | import("@omnia/fx-models").TypographySizes) => import("@omnia/fx-models").TypographyTypeDefinition;
20
- color: (colorSchemaType: ColorSchemaTypes | ColorSchemaType, colorType: import("@omnia/fx-models").ColorType | import("@omnia/fx-models").ColorTypes) => string;
21
- colorDefinition: (colorSchemaType: ColorSchemaTypes | ColorSchemaType, colorType: import("@omnia/fx-models").ColorType | import("@omnia/fx-models").ColorTypes) => ColorDefinition;
22
- complementaryColorType: (colorType: import("@omnia/fx-models").ColorType | import("@omnia/fx-models").ColorTypes) => import("@omnia/fx-models").ColorTypes;
23
- complementaryColor: (colorSchemaType: ColorSchemaTypes | ColorSchemaType, colorType: import("@omnia/fx-models").ColorType | import("@omnia/fx-models").ColorTypes) => string;
24
- complementaryColorDefinition: (colorSchemaType: ColorSchemaTypes | ColorSchemaType, colorType: import("@omnia/fx-models").ColorType | import("@omnia/fx-models").ColorTypes) => ColorDefinition;
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;
23
+ complementaryColorType: (colorType: "base" | "onBase" | "container" | "onContainer" | import("@omnia/fx-models").ColorTypes) => import("@omnia/fx-models").ColorTypes;
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 { BlueprintType, BlueprintTypes, ColorSchemaType, ColorSchemaTypes, ColorType, ColorTypes, ThemeDefinitionV2, TypographySize, TypographySizes, TypographyType, TypographyTypes } from "..";
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
- blueprint: (blueprintType: BlueprintTypes | BlueprintType) => import("..").BlueprintDefinition;
7
+ componentBlueprints: (blueprintType: VelcronBlueprintDefintionTypes) => ComponentBlueprint;
8
8
  colorSchema: (colorSchemaType: ColorSchemaTypes | ColorSchemaType) => import("..").ColorSchema;
9
- typography: (typographyType: TypographyTypes | TypographyType, size: TypographySizes | TypographySize) => import("..").TypographyTypeDefinition;
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;
@@ -13,14 +13,26 @@ exports.useVelcronThemingStore = (0, _1.defineVelcronStore)("VelcronTheming", {
13
13
  },
14
14
  getters(state) {
15
15
  return {
16
- blueprint: (blueprintType) => {
17
- return (0, __1.useThemeMethods)(() => state.currentTheme).blueprint(blueprintType);
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
- return (0, __1.useThemeMethods)(() => state.currentTheme).typography(__1.BlueprintTypes.default, typographyType, size);
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
@@ -2,4 +2,3 @@ export * from "./VelcronStore";
2
2
  export * from "./VelcronTheming";
3
3
  export * from "./ReactivitySystem";
4
4
  export * from "./VelcronColorSchema";
5
- export * from "./VelcronBlueprint";
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
- tslib_1.__exportStar(require("./VelcronBlueprint"), exports);
8
+ //export * from "./VelcronBlueprint";
@@ -2,13 +2,37 @@ import { VelcronPropertyEditor } from "@omnia/fx-models";
2
2
  import { VelcronEditorBuilderBase } from "./VelcronEditorBuilderBase";
3
3
  export declare class VelcronContentEditorBuilder extends VelcronEditorBuilderBase {
4
4
  private mainEditor;
5
+ private mainPropertyEditor;
6
+ private mainTypographyEditor;
5
7
  private captionEditor;
8
+ private captionTypographyEditor;
9
+ private captionPropertyEditor;
10
+ private titleEditor;
11
+ private titlePropertyEditor;
12
+ private titleTypographyEditor;
13
+ private summaryEditor;
14
+ private summaryPropertyEditor;
15
+ private summaryTypographyEditor;
6
16
  constructor(builder: any);
7
17
  main: {
8
- add: () => VelcronContentEditorBuilder;
18
+ addContentEditor: () => VelcronContentEditorBuilder;
19
+ addPropertyMappingEditor: (title?: string) => VelcronContentEditorBuilder;
20
+ addTypographyEditor: (title?: string, type?: "text" | "title") => VelcronContentEditorBuilder;
9
21
  };
10
22
  caption: {
11
- add: () => VelcronContentEditorBuilder;
23
+ addContentEditor: () => VelcronContentEditorBuilder;
24
+ addPropertyMappingEditor: (title?: string) => VelcronContentEditorBuilder;
25
+ addTypographyEditor: (title?: string, type?: "text" | "title") => VelcronContentEditorBuilder;
26
+ };
27
+ title: {
28
+ addContentEditor: () => VelcronContentEditorBuilder;
29
+ addPropertyMappingEditor: (title?: string) => VelcronContentEditorBuilder;
30
+ addTypographyEditor: (title?: string, type?: "text" | "title") => VelcronContentEditorBuilder;
31
+ };
32
+ summary: {
33
+ addContentEditor: () => VelcronContentEditorBuilder;
34
+ addPropertyMappingEditor: (title?: string) => VelcronContentEditorBuilder;
35
+ addTypographyEditor: (title?: string, type?: "text" | "title") => VelcronContentEditorBuilder;
12
36
  };
13
37
  protected internalBuild(): VelcronPropertyEditor<any>[];
14
38
  }