@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
@@ -1,2 +1,2 @@
1
- import { SpacingBlueprint } from "./BlueprintDefinition";
2
- export declare function getSpacingValueFromBlueprint(spacingValue: any, blueprint: SpacingBlueprint): number;
1
+ import { SpacingDefinition } from "./SpacingSetting";
2
+ export declare function getSpacingValueFromBlueprint(spacingValue: any, definition: SpacingDefinition): number;
@@ -1,32 +1,33 @@
1
1
  "use strict";
2
+ // import { SpacingDefinition, SpacingTypes } from "@omnia/fx-models";
2
3
  Object.defineProperty(exports, "__esModule", { value: true });
3
4
  exports.getSpacingValueFromBlueprint = void 0;
4
5
  const SpacingSetting_1 = require("./SpacingSetting");
5
- function getSpacingValueFromBlueprint(spacingValue, blueprint) {
6
+ function getSpacingValueFromBlueprint(spacingValue, definition) {
6
7
  if (!spacingValue) {
7
8
  return 0;
8
9
  }
9
10
  let negative = false;
10
11
  let result = spacingValue;
11
- if (isNaN(spacingValue) && blueprint?.definition) {
12
+ if (isNaN(spacingValue) && definition) {
12
13
  if (spacingValue.startsWith("-")) {
13
14
  negative = true;
14
15
  }
15
16
  spacingValue = spacingValue.replace("-", "");
16
17
  if (spacingValue === SpacingSetting_1.SpacingTypes.xs) {
17
- result = blueprint.definition.xs;
18
+ result = definition.xs;
18
19
  }
19
20
  else if (spacingValue === SpacingSetting_1.SpacingTypes.s) {
20
- result = blueprint.definition.s;
21
+ result = definition.s;
21
22
  }
22
23
  else if (spacingValue === SpacingSetting_1.SpacingTypes.m) {
23
- result = blueprint.definition.m;
24
+ result = definition.m;
24
25
  }
25
26
  else if (spacingValue === SpacingSetting_1.SpacingTypes.l) {
26
- result = blueprint.definition.l;
27
+ result = definition.l;
27
28
  }
28
29
  else if (spacingValue === SpacingSetting_1.SpacingTypes.xl) {
29
- result = blueprint.definition.xl;
30
+ result = definition.xl;
30
31
  }
31
32
  else {
32
33
  result = 0;
@@ -1,11 +1,12 @@
1
1
  import { Guid } from "../Guid";
2
2
  export interface SpacingSettings {
3
- top: number | SpacingType;
4
- right: number | SpacingType;
5
- bottom: number | SpacingType;
6
- left: number | SpacingType;
3
+ top?: number | SpacingType;
4
+ right?: number | SpacingType;
5
+ bottom?: number | SpacingType;
6
+ left?: number | SpacingType;
7
7
  }
8
8
  export interface SpacingDefinition {
9
+ name: string;
9
10
  id: Guid;
10
11
  xs: number;
11
12
  s: number;
@@ -8,4 +8,4 @@ var SpacingTypes;
8
8
  SpacingTypes["m"] = "m";
9
9
  SpacingTypes["l"] = "l";
10
10
  SpacingTypes["xl"] = "xl";
11
- })(SpacingTypes = exports.SpacingTypes || (exports.SpacingTypes = {}));
11
+ })(SpacingTypes || (exports.SpacingTypes = SpacingTypes = {}));
@@ -1,5 +1,5 @@
1
1
  import { Guid } from "../Guid";
2
- import { BluePrintDefinitions } from "./BlueprintDefinition";
2
+ import { BlueprintDefinition } from "./BlueprintDefinition";
3
3
  export interface ColorTypeResult<resultType> {
4
4
  base: resultType;
5
5
  baseTone: resultType;
@@ -39,18 +39,14 @@ export interface ColorSchemas {
39
39
  error: ColorSchema;
40
40
  info: ColorSchema;
41
41
  }
42
- export interface ColorGroup {
43
- dark: ColorSchema;
44
- light: ColorSchema;
45
- }
46
42
  export interface ThemeDefinitionV2 {
47
43
  id: Guid;
48
44
  name: string;
49
45
  dark: boolean;
50
46
  colors: ColorSchemas;
51
- blueprints: BluePrintDefinitions;
47
+ blueprints: BlueprintDefinition[];
52
48
  }
53
- export type ColorSchemaType = "primary" | "secondary" | "accent1" | "accent2" | "accent3" | "neutral" | "background" | "error" | "info";
49
+ export type ColorSchemaType = keyof typeof ColorSchemaTypes;
54
50
  export declare enum ColorSchemaTypes {
55
51
  primary = "primary",
56
52
  secondary = "secondary",
@@ -62,14 +58,7 @@ export declare enum ColorSchemaTypes {
62
58
  error = "error",
63
59
  info = "info"
64
60
  }
65
- export type BlueprintType = "default" | "variant1" | "variant2" | "variant3";
66
- export declare enum BlueprintTypes {
67
- default = "default",
68
- variant1 = "variant1",
69
- variant2 = "variant2",
70
- variant3 = "variant3"
71
- }
72
- export type ColorType = "base" | "onBase" | "container" | "onContainer";
61
+ export type ColorType = keyof typeof ColorTypes;
73
62
  export declare enum ColorTypes {
74
63
  base = "base",
75
64
  onBase = "onBase",
@@ -80,3 +69,23 @@ export interface ColorGradient {
80
69
  color: string;
81
70
  stop?: number;
82
71
  }
72
+ export interface ThemedColorValue {
73
+ colorType: ColorType;
74
+ toned?: boolean;
75
+ colorSchemaType?: ColorSchemaType;
76
+ }
77
+ export type ColorValue = string | ThemedColorValue;
78
+ export declare enum RadialGradientShapes {
79
+ circle = 0,
80
+ ellipse = 1
81
+ }
82
+ export interface BackgroundColorValue {
83
+ colors: Array<ColorValue>;
84
+ }
85
+ export interface LinearGradientBackgroundColorValue extends BackgroundColorValue {
86
+ degrees: number;
87
+ }
88
+ export interface RadialGradientBackgroundColorValue extends BackgroundColorValue {
89
+ shape: RadialGradientShapes;
90
+ position?: number;
91
+ }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ColorTypes = exports.BlueprintTypes = exports.ColorSchemaTypes = void 0;
3
+ exports.RadialGradientShapes = exports.ColorTypes = exports.ColorSchemaTypes = void 0;
4
4
  var ColorSchemaTypes;
5
5
  (function (ColorSchemaTypes) {
6
6
  ColorSchemaTypes["primary"] = "primary";
@@ -12,18 +12,16 @@ var ColorSchemaTypes;
12
12
  ColorSchemaTypes["background"] = "background";
13
13
  ColorSchemaTypes["error"] = "error";
14
14
  ColorSchemaTypes["info"] = "info";
15
- })(ColorSchemaTypes = exports.ColorSchemaTypes || (exports.ColorSchemaTypes = {}));
16
- var BlueprintTypes;
17
- (function (BlueprintTypes) {
18
- BlueprintTypes["default"] = "default";
19
- BlueprintTypes["variant1"] = "variant1";
20
- BlueprintTypes["variant2"] = "variant2";
21
- BlueprintTypes["variant3"] = "variant3";
22
- })(BlueprintTypes = exports.BlueprintTypes || (exports.BlueprintTypes = {}));
15
+ })(ColorSchemaTypes || (exports.ColorSchemaTypes = ColorSchemaTypes = {}));
23
16
  var ColorTypes;
24
17
  (function (ColorTypes) {
25
18
  ColorTypes["base"] = "base";
26
19
  ColorTypes["onBase"] = "onBase";
27
20
  ColorTypes["container"] = "container";
28
21
  ColorTypes["onContainer"] = "onContainer";
29
- })(ColorTypes = exports.ColorTypes || (exports.ColorTypes = {}));
22
+ })(ColorTypes || (exports.ColorTypes = ColorTypes = {}));
23
+ var RadialGradientShapes;
24
+ (function (RadialGradientShapes) {
25
+ RadialGradientShapes[RadialGradientShapes["circle"] = 0] = "circle";
26
+ RadialGradientShapes[RadialGradientShapes["ellipse"] = 1] = "ellipse";
27
+ })(RadialGradientShapes || (exports.RadialGradientShapes = RadialGradientShapes = {}));
@@ -1,6 +1,11 @@
1
1
  import { Guid } from "../Guid";
2
2
  export interface TypographyDefinition {
3
3
  id: Guid;
4
+ name: string;
5
+ font?: {
6
+ family: string;
7
+ cdn?: string;
8
+ };
4
9
  title: {
5
10
  xl: TypographyTypeDefinition;
6
11
  l: TypographyTypeDefinition;
@@ -33,14 +38,13 @@ export interface TypographyTypeBreakPoint {
33
38
  size: number;
34
39
  lineHeight: number;
35
40
  }
36
- export type TypographyType = "title" | "text" | "navigation" | "link";
41
+ export type TypographyType = keyof typeof TypographyTypes;
37
42
  export declare enum TypographyTypes {
38
43
  title = "title",
39
44
  text = "text",
40
- navigation = "navigation",
41
- link = "link"
45
+ navigation = "navigation"
42
46
  }
43
- export type TypographySize = "xl" | "l" | "m" | "s" | "xs";
47
+ export type TypographySize = keyof typeof TypographySizes;
44
48
  export declare enum TypographySizes {
45
49
  xl = "xl",
46
50
  l = "l",
@@ -6,8 +6,7 @@ var TypographyTypes;
6
6
  TypographyTypes["title"] = "title";
7
7
  TypographyTypes["text"] = "text";
8
8
  TypographyTypes["navigation"] = "navigation";
9
- TypographyTypes["link"] = "link";
10
- })(TypographyTypes = exports.TypographyTypes || (exports.TypographyTypes = {}));
9
+ })(TypographyTypes || (exports.TypographyTypes = TypographyTypes = {}));
11
10
  var TypographySizes;
12
11
  (function (TypographySizes) {
13
12
  TypographySizes["xl"] = "xl";
@@ -15,4 +14,4 @@ var TypographySizes;
15
14
  TypographySizes["m"] = "m";
16
15
  TypographySizes["s"] = "s";
17
16
  TypographySizes["xs"] = "xs";
18
- })(TypographySizes = exports.TypographySizes || (exports.TypographySizes = {}));
17
+ })(TypographySizes || (exports.TypographySizes = TypographySizes = {}));
@@ -1,10 +1,8 @@
1
- import { BlueprintType, BlueprintTypes, ColorDefinition, ColorSchema, ColorSchemaType, ColorSchemaTypes, ColorType, ColorTypes } from "./ThemeDefinitionV2";
2
- import { TypographySize, TypographySizes, TypographyType, TypographyTypeDefinition, TypographyTypes } from "./TypographyDefinition";
3
- import { BlueprintDefinition } from "./BlueprintDefinition";
1
+ import { ColorDefinition, ColorSchema, ColorSchemaType, ColorSchemaTypes, ColorType, ColorTypes } from "./ThemeDefinitionV2";
2
+ import { BlueprintDefinition, BlueprintType } from "./BlueprintDefinition";
4
3
  export declare function useThemeMethods(getThemeDefinition: () => any): {
5
4
  colorSchema: (colorSchemaType: ColorSchemaTypes | ColorSchemaType) => ColorSchema;
6
- blueprint: (blueprintType: BlueprintTypes | BlueprintType) => BlueprintDefinition;
7
- typography: (blueprintType: BlueprintTypes | BlueprintType, typographyType: TypographyTypes | TypographyType, size: TypographySize | TypographySizes) => TypographyTypeDefinition;
5
+ bluePrintbyType: <TType extends BlueprintDefinition>(type: BlueprintType) => TType;
8
6
  color: (colorSchemaType: ColorSchemaTypes | ColorSchemaType, colorType: ColorTypes | ColorType) => string;
9
7
  colorDefinition: (colorSchemaType: ColorSchemaTypes | ColorSchemaType, colorType: ColorTypes | ColorType) => ColorDefinition;
10
8
  complementaryColorType: (colorType: ColorTypes | ColorType) => ColorTypes;
@@ -3,9 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.useThemeMethods = void 0;
4
4
  //import { ThemeDefinitionInstance } from "@omnia/fx/ux";
5
5
  const ThemeDefinitionV2_1 = require("./ThemeDefinitionV2");
6
- const TypographyDefinition_1 = require("./TypographyDefinition");
7
6
  // temp change ThemeDefinitionInstance to any because fx/shared can't reference higher level fx/ux
8
7
  function useThemeMethods(getThemeDefinition) {
8
+ function bluePrintbyType(type) {
9
+ return getThemeDefinition().blueprints.find(x => x.type === type);
10
+ }
9
11
  function colorSchema(colorSchemaType) {
10
12
  if (colorSchemaType === ThemeDefinitionV2_1.ColorSchemaTypes.primary) {
11
13
  return getThemeDefinition().colors.primary;
@@ -33,36 +35,6 @@ function useThemeMethods(getThemeDefinition) {
33
35
  }
34
36
  return getThemeDefinition().colors.background;
35
37
  }
36
- function blueprint(blueprintType) {
37
- if (blueprintType === ThemeDefinitionV2_1.BlueprintTypes.default) {
38
- return getThemeDefinition().blueprints.default;
39
- }
40
- else if (blueprintType === ThemeDefinitionV2_1.BlueprintTypes.variant1) {
41
- return getThemeDefinition().blueprints.variant1;
42
- }
43
- else if (blueprintType === ThemeDefinitionV2_1.BlueprintTypes.variant2) {
44
- return getThemeDefinition().blueprints.variant2;
45
- }
46
- else if (blueprintType === ThemeDefinitionV2_1.BlueprintTypes.variant3) {
47
- return getThemeDefinition().blueprints.variant3;
48
- }
49
- return getThemeDefinition().blueprints.default;
50
- }
51
- function typography(blueprintType, typographyType, size) {
52
- const typographyBlueprint = getThemeDefinition().blueprints[blueprintType].definitions.find(d => d.type === "typography");
53
- if (typographyType === TypographyDefinition_1.TypographyTypes.text) {
54
- return typographyBlueprint.definition.text[size];
55
- }
56
- else if (typographyType === TypographyDefinition_1.TypographyTypes.title) {
57
- return typographyBlueprint.definition.title[size];
58
- }
59
- else if (typographyType === TypographyDefinition_1.TypographyTypes.navigation) {
60
- return typographyBlueprint.definition[size];
61
- }
62
- else if (typographyType === TypographyDefinition_1.TypographyTypes.link) {
63
- return typographyBlueprint.definition.link[TypographyDefinition_1.TypographySizes.m];
64
- }
65
- }
66
38
  function color(colorSchemaType, colorType) {
67
39
  const mappedColorSchema = colorSchema(colorSchemaType);
68
40
  if (colorType === ThemeDefinitionV2_1.ColorTypes.base) {
@@ -120,8 +92,7 @@ function useThemeMethods(getThemeDefinition) {
120
92
  }
121
93
  return {
122
94
  colorSchema,
123
- blueprint,
124
- typography,
95
+ bluePrintbyType,
125
96
  color,
126
97
  colorDefinition,
127
98
  complementaryColorType,
@@ -1,8 +1,8 @@
1
1
  export * from "./ThemeDefinitionV2";
2
2
  export * from "./TypographyDefinition";
3
- export * from "./OmniaThemes";
4
3
  export * from "./UseThemeMethods";
5
4
  export * from "./BlueprintDefinition";
6
5
  export * from "./SpacingSetting";
7
6
  export * from "./SharedBlueprintMethods";
8
7
  export * from "./SharedColorMethods";
8
+ export * from "./ChromeDefinition";
@@ -3,9 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./ThemeDefinitionV2"), exports);
5
5
  tslib_1.__exportStar(require("./TypographyDefinition"), exports);
6
- tslib_1.__exportStar(require("./OmniaThemes"), exports);
6
+ //export * from "./OmniaThemes";
7
7
  tslib_1.__exportStar(require("./UseThemeMethods"), exports);
8
8
  tslib_1.__exportStar(require("./BlueprintDefinition"), exports);
9
9
  tslib_1.__exportStar(require("./SpacingSetting"), exports);
10
10
  tslib_1.__exportStar(require("./SharedBlueprintMethods"), exports);
11
11
  tslib_1.__exportStar(require("./SharedColorMethods"), exports);
12
+ tslib_1.__exportStar(require("./ChromeDefinition"), exports);
@@ -0,0 +1,87 @@
1
+ import { DynamicState } from "../DynamicState";
2
+ import { VelcronEvent, VelcronOnEditModeEvent, VelcronOnLoadEvent } from "./VelcronEvents";
3
+ /**
4
+ * Velcron definition base
5
+ */
6
+ export interface VelcronDefinitionBase {
7
+ /**
8
+ * The component type
9
+ */
10
+ type: string;
11
+ /**
12
+ * Custom friendly name of the definition
13
+ */
14
+ name?: string;
15
+ /**
16
+ * Used for render cache if not specified we auto set it.
17
+ */
18
+ key?: string;
19
+ }
20
+ export interface VelcronDefinition extends VelcronDefinitionBase, VelcronDimensionStyling {
21
+ body?: Array<VelcronDefinition>;
22
+ style?: VelcronStyling;
23
+ foreach?: string;
24
+ if?: string;
25
+ events?: VelcronEvent;
26
+ }
27
+ export interface VelcronSpacing {
28
+ top?: number | string;
29
+ right?: number | string;
30
+ bottom?: number | string;
31
+ left?: number | string;
32
+ }
33
+ interface VelcronDimensionStyling {
34
+ margin?: VelcronSpacing;
35
+ padding?: VelcronSpacing;
36
+ }
37
+ export interface VelcronStyling {
38
+ margin?: number;
39
+ marginTop?: number;
40
+ marginRight?: number;
41
+ marginBottom?: number;
42
+ marginLeft?: number;
43
+ padding?: number;
44
+ paddingTop?: number;
45
+ paddingRight?: number;
46
+ paddingBottom?: number;
47
+ paddingLeft?: number;
48
+ height?: number | string;
49
+ width?: number | string;
50
+ }
51
+ export interface VelcronComponentDefinition extends VelcronDefinition {
52
+ type: string;
53
+ events?: any;
54
+ properties?: {
55
+ [name: string]: any;
56
+ };
57
+ icon?: any;
58
+ }
59
+ export type VelcronCustomComponentDefinition = VelcronComponentDefinition;
60
+ export type BuiltInPropertyEditorType = "text" | "slider" | "switch" | "alignment" | "color" | "markdown" | "icon" | "image" | "typography" | "color-schema-type" | "spacing";
61
+ export interface VelcronPropertyEditor<TSettings = any> {
62
+ name?: string;
63
+ category?: string;
64
+ type: BuiltInPropertyEditorType | string;
65
+ settings?: TSettings;
66
+ stateMapping?: string;
67
+ propertyMapping?: boolean;
68
+ multiple?: boolean;
69
+ component?: unknown;
70
+ }
71
+ export interface VelcronAppDefinition<TState extends DynamicState = DynamicState> extends VelcronDefinitionBase {
72
+ type: "velcron";
73
+ version?: string;
74
+ name?: string;
75
+ body?: Array<VelcronDefinition>;
76
+ events?: VelcronOnLoadEvent & VelcronOnEditModeEvent;
77
+ actions?: {
78
+ [name: string]: Array<string>;
79
+ };
80
+ components?: Array<VelcronCustomComponentDefinition>;
81
+ propEditors?: Array<VelcronPropertyEditor>;
82
+ state?: TState;
83
+ computed?: {
84
+ [name: string]: Array<string>;
85
+ };
86
+ }
87
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export * from "./VelcronDefinition";
2
+ export * from "./VelcronEvents";
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./VelcronDefinition"), exports);
5
+ tslib_1.__exportStar(require("./VelcronEvents"), exports);
@@ -0,0 +1,12 @@
1
+ export interface VelcronActionHooks<TBefore = any, TAfter = any> {
2
+ beforeHandler?: (args: TBefore) => TBefore;
3
+ afterHandler?: (args: TBefore) => TAfter;
4
+ }
5
+ export interface HttpGetBeforeActionHookArgs {
6
+ url: string;
7
+ requestInit: RequestInit;
8
+ }
9
+ export interface HttpGetAfterActionHookArgs {
10
+ json: string;
11
+ response: Response;
12
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/models/Enums.d.ts CHANGED
@@ -16,6 +16,12 @@ export declare enum VelcronActionTypes {
16
16
  export declare enum VelcronIconTypes {
17
17
  fontAwesome = "fa"
18
18
  }
19
+ export declare enum VelcronViewDirections {
20
+ row = "row",
21
+ column = "column",
22
+ rowReverse = "row-reverse",
23
+ columnRevers = "column-reverse"
24
+ }
19
25
  export declare enum VelcronHorizontalAlignments {
20
26
  left = "left",
21
27
  center = "center",
package/models/Enums.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.VelcronDataTypes = exports.VelcronVerticalAlignments = exports.VelcronHorizontalAlignments = exports.VelcronIconTypes = exports.VelcronActionTypes = exports.AssignOperators = void 0;
3
+ exports.VelcronDataTypes = exports.VelcronVerticalAlignments = exports.VelcronHorizontalAlignments = exports.VelcronViewDirections = exports.VelcronIconTypes = exports.VelcronActionTypes = exports.AssignOperators = void 0;
4
4
  var AssignOperators;
5
5
  (function (AssignOperators) {
6
6
  AssignOperators["equals"] = "=";
@@ -10,30 +10,37 @@ var AssignOperators;
10
10
  AssignOperators["plusPlus"] = "++";
11
11
  AssignOperators["minusMinus"] = "--";
12
12
  AssignOperators["equalsExclamation"] = "=!";
13
- })(AssignOperators = exports.AssignOperators || (exports.AssignOperators = {}));
13
+ })(AssignOperators || (exports.AssignOperators = AssignOperators = {}));
14
14
  var VelcronActionTypes;
15
15
  (function (VelcronActionTypes) {
16
16
  VelcronActionTypes[VelcronActionTypes["getOrSetValue"] = 0] = "getOrSetValue";
17
17
  VelcronActionTypes[VelcronActionTypes["promise"] = 1] = "promise";
18
18
  VelcronActionTypes[VelcronActionTypes["condition"] = 2] = "condition";
19
19
  VelcronActionTypes[VelcronActionTypes["returnsValue"] = 3] = "returnsValue";
20
- })(VelcronActionTypes = exports.VelcronActionTypes || (exports.VelcronActionTypes = {}));
20
+ })(VelcronActionTypes || (exports.VelcronActionTypes = VelcronActionTypes = {}));
21
21
  var VelcronIconTypes;
22
22
  (function (VelcronIconTypes) {
23
23
  VelcronIconTypes["fontAwesome"] = "fa";
24
- })(VelcronIconTypes = exports.VelcronIconTypes || (exports.VelcronIconTypes = {}));
24
+ })(VelcronIconTypes || (exports.VelcronIconTypes = VelcronIconTypes = {}));
25
+ var VelcronViewDirections;
26
+ (function (VelcronViewDirections) {
27
+ VelcronViewDirections["row"] = "row";
28
+ VelcronViewDirections["column"] = "column";
29
+ VelcronViewDirections["rowReverse"] = "row-reverse";
30
+ VelcronViewDirections["columnRevers"] = "column-reverse";
31
+ })(VelcronViewDirections || (exports.VelcronViewDirections = VelcronViewDirections = {}));
25
32
  var VelcronHorizontalAlignments;
26
33
  (function (VelcronHorizontalAlignments) {
27
34
  VelcronHorizontalAlignments["left"] = "left";
28
35
  VelcronHorizontalAlignments["center"] = "center";
29
36
  VelcronHorizontalAlignments["right"] = "right";
30
- })(VelcronHorizontalAlignments = exports.VelcronHorizontalAlignments || (exports.VelcronHorizontalAlignments = {}));
37
+ })(VelcronHorizontalAlignments || (exports.VelcronHorizontalAlignments = VelcronHorizontalAlignments = {}));
31
38
  var VelcronVerticalAlignments;
32
39
  (function (VelcronVerticalAlignments) {
33
40
  VelcronVerticalAlignments["top"] = "top";
34
41
  VelcronVerticalAlignments["center"] = "center";
35
42
  VelcronVerticalAlignments["bottom"] = "bottom";
36
- })(VelcronVerticalAlignments = exports.VelcronVerticalAlignments || (exports.VelcronVerticalAlignments = {}));
43
+ })(VelcronVerticalAlignments || (exports.VelcronVerticalAlignments = VelcronVerticalAlignments = {}));
37
44
  var VelcronDataTypes;
38
45
  (function (VelcronDataTypes) {
39
46
  //Unknown = null
@@ -45,4 +52,4 @@ var VelcronDataTypes;
45
52
  VelcronDataTypes["array"] = "array";
46
53
  VelcronDataTypes["componentArray"] = "componentArray";
47
54
  VelcronDataTypes["bind"] = "bind";
48
- })(VelcronDataTypes = exports.VelcronDataTypes || (exports.VelcronDataTypes = {}));
55
+ })(VelcronDataTypes || (exports.VelcronDataTypes = VelcronDataTypes = {}));