@omnia/fx-models 8.0.74-dev → 8.0.75-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 (33) hide show
  1. package/Layout.d.ts +1 -2
  2. package/componentproptypes/ThemeableComponents.d.ts +0 -2
  3. package/internal-do-not-import-from-here/shared/models/OmniaSharedBootstrapData.d.ts +1 -1
  4. package/internal-do-not-import-from-here/shared/models/hub/activities/Activity.d.ts +5 -1
  5. package/internal-do-not-import-from-here/shared/models/hub/activities/ActivityChannel.d.ts +1 -1
  6. package/internal-do-not-import-from-here/shared/models/hub/activities/ActivityDefinition.d.ts +1 -1
  7. package/internal-do-not-import-from-here/shared/models/hub/activities/ActivityRenderer.d.ts +3 -2
  8. package/internal-do-not-import-from-here/shared/models/hub/activities/IdentityActivity.d.ts +3 -1
  9. package/internal-do-not-import-from-here/shared/models/index.d.ts +1 -0
  10. package/internal-do-not-import-from-here/shared/models/index.js +1 -0
  11. package/internal-do-not-import-from-here/shared/models/theming/BlueprintDefinition.d.ts +40 -53
  12. package/internal-do-not-import-from-here/shared/models/theming/BlueprintDefinition.js +6 -12
  13. package/internal-do-not-import-from-here/shared/models/theming/ChromeDefinition.d.ts +6 -1
  14. package/internal-do-not-import-from-here/shared/models/theming/SharedBlueprintMethods.d.ts +2 -2
  15. package/internal-do-not-import-from-here/shared/models/theming/SharedBlueprintMethods.js +8 -7
  16. package/internal-do-not-import-from-here/shared/models/theming/ThemeDefinitionV2.d.ts +2 -9
  17. package/internal-do-not-import-from-here/shared/models/theming/ThemeDefinitionV2.js +1 -8
  18. package/internal-do-not-import-from-here/shared/models/theming/UseThemeMethods.d.ts +3 -5
  19. package/internal-do-not-import-from-here/shared/models/theming/UseThemeMethods.js +4 -30
  20. package/internal-do-not-import-from-here/shared/models/velcron/VelcronDefinition.d.ts +87 -0
  21. package/internal-do-not-import-from-here/shared/models/velcron/VelcronEvents.js +2 -0
  22. package/internal-do-not-import-from-here/shared/models/velcron/index.d.ts +2 -0
  23. package/internal-do-not-import-from-here/shared/models/velcron/index.js +5 -0
  24. package/internal-do-not-import-from-here/velcron/core/models/VelcronDefinitions.d.ts +2 -78
  25. package/internal-do-not-import-from-here/velcron/core/models/VelcronPropertyEditorDefinitions.d.ts +1 -12
  26. package/internal-do-not-import-from-here/velcron/core/models/VelcronPropertyEditorDefinitions.js +1 -0
  27. package/internal-do-not-import-from-here/velcron/core/models/VelcronTypes.d.ts +1 -1
  28. package/internal-do-not-import-from-here/velcron/core/models/ViewModelAndContext.d.ts +1 -1
  29. package/internal-do-not-import-from-here/velcron/core/models/index.d.ts +0 -1
  30. package/internal-do-not-import-from-here/velcron/core/models/index.js +0 -1
  31. package/package.json +1 -1
  32. /package/internal-do-not-import-from-here/{velcron/core/models/VelcronEvents.js → shared/models/velcron/VelcronDefinition.js} +0 -0
  33. /package/internal-do-not-import-from-here/{velcron/core/models → shared/models/velcron}/VelcronEvents.d.ts +0 -0
package/Layout.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { MultilingualString, ThemeDefinition, IIcon, SpacingSettings, IconPickerModel, WebComponentDefinition, OmniaBlock, GuidValue, RadialGradientShapes, BlockTitleSettings, LayoutItemActions, LayoutEditorModes, BlockRenderingModes, TabbedDisplayModes, TabbedIconPositions, LayoutDrawerTabs, ILayoutCanvasDefinitionBuilder, MediaPickerImage, IMessageBusTopicSubscription, MediaPickerStorageProviderContext, OmniaBackendRuntimes, OmniaClientRuntimes, LayoutCanvasModes, ColorSchemaTypes, BlueprintTypes, HorizontalAlignments, SpacingType } from ".";
1
+ import { MultilingualString, ThemeDefinition, IIcon, SpacingSettings, IconPickerModel, WebComponentDefinition, OmniaBlock, GuidValue, RadialGradientShapes, BlockTitleSettings, LayoutItemActions, LayoutEditorModes, BlockRenderingModes, TabbedDisplayModes, TabbedIconPositions, LayoutDrawerTabs, ILayoutCanvasDefinitionBuilder, MediaPickerImage, IMessageBusTopicSubscription, MediaPickerStorageProviderContext, OmniaBackendRuntimes, OmniaClientRuntimes, LayoutCanvasModes, ColorSchemaTypes, HorizontalAlignments, SpacingType } from ".";
2
2
  import { MessageBusTopicMediator } from "../";
3
3
  import { TargetingFilterProperty } from "../sp";
4
4
  import { ShapeDividerSettings } from "./ShapeDividerSettingsModel";
@@ -67,7 +67,6 @@ export interface LayoutItemSettings {
67
67
  css: string;
68
68
  customCssClasses: string;
69
69
  colorSchemaType?: ColorSchemaTypes;
70
- blueprintType?: BlueprintTypes;
71
70
  }
72
71
  export interface LinearGradientBackground extends BackgroundSettings {
73
72
  degrees: number;
@@ -2,6 +2,4 @@ export interface ThemeableComponentProps {
2
2
  colorSchemaType?: any;
3
3
  container?: any;
4
4
  colors?: any;
5
- blueprintType?: any;
6
- blueprint?: any;
7
5
  }
@@ -1,4 +1,4 @@
1
- import { OmniaToken } from ".";
1
+ import { OmniaToken } from "./Tokens";
2
2
  import { Guid, GuidValue } from "./Guid";
3
3
  import { TenantIdentifier } from "./Tenant";
4
4
  export interface OmniaSharedBootstrapData {
@@ -1,7 +1,11 @@
1
- import { DynamicState, GuidValue, IdentityActivityCategory, StronglyTypedId, TemporaryFileId } from "../..";
2
1
  import { ChannelId } from "./ActivityChannel";
3
2
  import { ActivitySenderId } from "./ActivitySender";
4
3
  import { ActivityRenderer, ActivityRendererReference } from "./ActivityRenderer";
4
+ import { StronglyTypedId } from "../../StronglyTypedId";
5
+ import { GuidValue } from "../../Guid";
6
+ import { DynamicState } from "../../DynamicState";
7
+ import { IdentityActivityCategory } from "./IdentityActivity";
8
+ import { TemporaryFileId } from "../fileupload";
5
9
  export type ActivityId = StronglyTypedId<number, "ActivityId">;
6
10
  export declare function ActivityId(id: number): ActivityId;
7
11
  export type ActivityTypeId = StronglyTypedId<GuidValue, "ActivityTypeId">;
@@ -1,4 +1,4 @@
1
- import { StronglyTypedId } from "../..";
1
+ import { StronglyTypedId } from "../../StronglyTypedId";
2
2
  export type ChannelId = StronglyTypedId<number, "ChannelId">;
3
3
  export declare function ChannelId(id: number): ChannelId;
4
4
  export interface ActivityChannel {
@@ -1,4 +1,4 @@
1
- import { DynamicState } from "../..";
1
+ import { DynamicState } from "../../DynamicState";
2
2
  import { ActivityTypeId } from "./Activity";
3
3
  import { ActivityRenderer, ActivityRendererReference } from "./ActivityRenderer";
4
4
  export declare abstract class FeedActivityDefinition<TFeedItemState> implements ActivityDefinition<TFeedItemState> {
@@ -1,5 +1,6 @@
1
- import { VelcronAppDefinition } from "@omnia/fx-models";
2
- import { GuidValue, StronglyTypedId } from "../..";
1
+ import { GuidValue } from "../../Guid";
2
+ import { StronglyTypedId } from "../../StronglyTypedId";
3
+ import { VelcronAppDefinition } from "../../velcron";
3
4
  export type ActivityRendererId = StronglyTypedId<string, "ActivityRendererId">;
4
5
  export declare function ActivityRendererId(id: GuidValue): ActivityRendererId;
5
6
  export interface ActivityRendererReference {
@@ -1,5 +1,7 @@
1
- import { ActivitySender, ActivitySenderId, ChannelId, DynamicState } from "../..";
1
+ import { DynamicState } from "../../DynamicState";
2
2
  import { Activity, ActivityId } from "./Activity";
3
+ import { ChannelId } from "./ActivityChannel";
4
+ import { ActivitySender, ActivitySenderId } from "./ActivitySender";
3
5
  export declare enum IdentityActivityStatus {
4
6
  new = 0,
5
7
  read = 1,
@@ -16,3 +16,4 @@ export * from "./DynamicState";
16
16
  export * from "./StronglyTypedId";
17
17
  export * from "./theming";
18
18
  export * from "./hub";
19
+ export * from "./velcron";
@@ -20,3 +20,4 @@ tslib_1.__exportStar(require("./DynamicState"), exports);
20
20
  tslib_1.__exportStar(require("./StronglyTypedId"), exports);
21
21
  tslib_1.__exportStar(require("./theming"), exports);
22
22
  tslib_1.__exportStar(require("./hub"), exports);
23
+ tslib_1.__exportStar(require("./velcron"), exports);
@@ -1,69 +1,56 @@
1
- import { VelcronAppDefinition } from "@omnia/fx-models";
2
- import { Guid, GuidValue } from "../Guid";
1
+ import { ChromeDefinition } from "./ChromeDefinition";
3
2
  import { SpacingDefinition, SpacingSettings } from "./SpacingSetting";
4
- import { ColorSchemaType, ColorSchemaTypes, ColorType } from "./ThemeDefinitionV2";
5
3
  import { TypographyDefinition } from "./TypographyDefinition";
6
4
  export interface BoxDimensions extends SpacingSettings {
7
5
  }
8
- export interface BluePrintDefinitions {
9
- default: BlueprintDefinition;
10
- variant1: BlueprintDefinition;
11
- variant2: BlueprintDefinition;
12
- variant3: BlueprintDefinition;
6
+ export interface ChromeBluePrintDefinitions {
7
+ default: ChromeDefinition;
8
+ variant1: ChromeDefinition;
9
+ variant2: ChromeDefinition;
10
+ variant3: ChromeDefinition;
13
11
  }
14
- export type WebBlueprintDefintionType = "button" | "block" | "typography" | "searchbox" | "layout-spacing" | "inner-spacing";
15
- export declare enum WebBlueprintDefintionTypes {
16
- button = "button",
17
- block = "block",
18
- typography = "typography",
19
- searchbox = "searchbox",
20
- layoutspacing = "layout-spacing",
21
- innerspacing = "inner-spacing"
12
+ export type BlueprintType = "chrome" | "typography" | "spacing" | "component";
13
+ export interface BlueprintDefinition {
14
+ type: BlueprintType;
15
+ name: string;
22
16
  }
23
- export type VelcronBlueprintDefintionType = "button" | "typography" | "inner-spacing";
24
- export declare enum VelcronBlueprintDefintionTypes {
25
- button = "button",
26
- typography = "typography",
27
- innerspacing = "inner-spacing"
17
+ export interface ChromeBlueprint extends BlueprintDefinition {
18
+ type: "chrome";
19
+ default: ChromeDefinition;
20
+ variant1: ChromeDefinition;
28
21
  }
29
- export interface BlueprintItemDefinition {
30
- type: VelcronBlueprintDefintionType | WebBlueprintDefintionType;
22
+ export interface TypographyBlueprint extends BlueprintDefinition {
23
+ type: "typography";
24
+ default: TypographyDefinition;
25
+ variant1?: TypographyDefinition;
31
26
  }
32
- export interface BlockBlueprint extends BlueprintItemDefinition {
33
- type: "block";
34
- header: {
35
- definitionId: GuidValue;
36
- definition?: VelcronAppDefinition;
37
- };
38
- colors: {
39
- colorSchemaType?: ColorSchemaTypes | ColorSchemaType;
40
- };
41
- styles: {
42
- spacing?: SpacingSettings;
43
- elevation?: number;
44
- borderRadius?: BoxDimensions;
45
- border?: BoxDimensions;
46
- borderColor?: {
47
- colorType: ColorType;
48
- toned?: boolean;
49
- };
50
- };
27
+ export interface SpacingBlueprint extends BlueprintDefinition {
28
+ type: "spacing";
29
+ default: SpacingItemBluePrintDefinition;
51
30
  }
52
- export interface SpacingBlueprint {
53
- type: "layout-spacing" | "inner-spacing";
54
- definition: SpacingDefinition;
31
+ export interface ComponentBlueprint extends BlueprintDefinition {
32
+ type: "component";
33
+ default: BlueprintItemDefinition[];
55
34
  }
56
- export interface TypographyBlueprint extends BlueprintItemDefinition {
57
- type: "typography";
58
- definition: TypographyDefinition;
35
+ export interface SpacingItemBluePrintDefinition {
36
+ layout: SpacingDefinition;
37
+ inner: SpacingDefinition;
38
+ }
39
+ export type SpacingBlueprintTypes = "inner" | "layout";
40
+ export type WebBlueprintItemDefintionType = "button" | "searchbox";
41
+ export declare enum WebBlueprintItemDefintionTypes {
42
+ button = "button",
43
+ searchbox = "searchbox"
44
+ }
45
+ export type VelcronBlueprintDefintionType = "button";
46
+ export declare enum VelcronBlueprintDefintionTypes {
47
+ button = "button"
48
+ }
49
+ export interface BlueprintItemDefinition {
50
+ type: VelcronBlueprintDefintionType | WebBlueprintItemDefintionType;
59
51
  }
60
52
  export interface SearchBoxBlueprint extends BlueprintItemDefinition {
61
53
  type: "searchbox";
62
54
  borderRadius?: BoxDimensions;
63
55
  variant?: "outlined" | "solo" | "regular" | "plain" | "underlined";
64
56
  }
65
- export interface BlueprintDefinition {
66
- id: Guid;
67
- name: string;
68
- definitions: Array<BlueprintItemDefinition>;
69
- }
@@ -1,18 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.VelcronBlueprintDefintionTypes = exports.WebBlueprintDefintionTypes = void 0;
4
- var WebBlueprintDefintionTypes;
5
- (function (WebBlueprintDefintionTypes) {
6
- WebBlueprintDefintionTypes["button"] = "button";
7
- WebBlueprintDefintionTypes["block"] = "block";
8
- WebBlueprintDefintionTypes["typography"] = "typography";
9
- WebBlueprintDefintionTypes["searchbox"] = "searchbox";
10
- WebBlueprintDefintionTypes["layoutspacing"] = "layout-spacing";
11
- WebBlueprintDefintionTypes["innerspacing"] = "inner-spacing";
12
- })(WebBlueprintDefintionTypes || (exports.WebBlueprintDefintionTypes = WebBlueprintDefintionTypes = {}));
3
+ exports.VelcronBlueprintDefintionTypes = exports.WebBlueprintItemDefintionTypes = void 0;
4
+ var WebBlueprintItemDefintionTypes;
5
+ (function (WebBlueprintItemDefintionTypes) {
6
+ WebBlueprintItemDefintionTypes["button"] = "button";
7
+ WebBlueprintItemDefintionTypes["searchbox"] = "searchbox";
8
+ })(WebBlueprintItemDefintionTypes || (exports.WebBlueprintItemDefintionTypes = WebBlueprintItemDefintionTypes = {}));
13
9
  var VelcronBlueprintDefintionTypes;
14
10
  (function (VelcronBlueprintDefintionTypes) {
15
11
  VelcronBlueprintDefintionTypes["button"] = "button";
16
- VelcronBlueprintDefintionTypes["typography"] = "typography";
17
- VelcronBlueprintDefintionTypes["innerspacing"] = "inner-spacing";
18
12
  })(VelcronBlueprintDefintionTypes || (exports.VelcronBlueprintDefintionTypes = VelcronBlueprintDefintionTypes = {}));
@@ -1,4 +1,8 @@
1
- import { BoxDimensions, ColorSchemaType, ColorSchemaTypes, ColorType, GuidValue, SpacingSettings, VelcronAppDefinition } from "@omnia/fx-models";
1
+ import { GuidValue } from "../Guid";
2
+ import { VelcronAppDefinition } from "../velcron";
3
+ import { BoxDimensions } from "./BlueprintDefinition";
4
+ import { SpacingSettings } from "./SpacingSetting";
5
+ import { ColorSchemaType, ColorSchemaTypes, ColorType } from "./ThemeDefinitionV2";
2
6
  export interface ChromeDefinition {
3
7
  id: GuidValue;
4
8
  name: string;
@@ -10,6 +14,7 @@ export interface ChromeDefinition {
10
14
  colorSchemaType?: ColorSchemaTypes | ColorSchemaType;
11
15
  };
12
16
  styles: {
17
+ opacity?: number;
13
18
  spacing?: SpacingSettings;
14
19
  elevation?: number;
15
20
  borderRadius?: BoxDimensions;
@@ -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,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;
@@ -48,7 +48,7 @@ export interface ThemeDefinitionV2 {
48
48
  name: string;
49
49
  dark: boolean;
50
50
  colors: ColorSchemas;
51
- blueprints: BluePrintDefinitions;
51
+ blueprints: BlueprintDefinition[];
52
52
  }
53
53
  export type ColorSchemaType = keyof typeof ColorSchemaTypes;
54
54
  export declare enum ColorSchemaTypes {
@@ -62,13 +62,6 @@ export declare enum ColorSchemaTypes {
62
62
  error = "error",
63
63
  info = "info"
64
64
  }
65
- export type BlueprintType = keyof typeof BlueprintTypes;
66
- export declare enum BlueprintTypes {
67
- default = "default",
68
- variant1 = "variant1",
69
- variant2 = "variant2",
70
- variant3 = "variant3"
71
- }
72
65
  export type ColorType = keyof typeof ColorTypes;
73
66
  export declare enum ColorTypes {
74
67
  base = "base",
@@ -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.ColorTypes = exports.ColorSchemaTypes = void 0;
4
4
  var ColorSchemaTypes;
5
5
  (function (ColorSchemaTypes) {
6
6
  ColorSchemaTypes["primary"] = "primary";
@@ -13,13 +13,6 @@ var ColorSchemaTypes;
13
13
  ColorSchemaTypes["error"] = "error";
14
14
  ColorSchemaTypes["info"] = "info";
15
15
  })(ColorSchemaTypes || (exports.ColorSchemaTypes = 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 = BlueprintTypes = {}));
23
16
  var ColorTypes;
24
17
  (function (ColorTypes) {
25
18
  ColorTypes["base"] = "base";
@@ -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,33 +35,6 @@ function useThemeMethods(getThemeDefinition) {
33
35
  }
34
36
  return getThemeDefinition().colors.background;
35
37
  }
36
- function blueprint(blueprintType) {
37
- if (blueprintType === ThemeDefinitionV2_1.BlueprintTypes.default) {
38
- return getThemeDefinition().blueprints.default;
39
- }
40
- else if (blueprintType === ThemeDefinitionV2_1.BlueprintTypes.variant1) {
41
- return getThemeDefinition().blueprints.variant1;
42
- }
43
- else if (blueprintType === ThemeDefinitionV2_1.BlueprintTypes.variant2) {
44
- return getThemeDefinition().blueprints.variant2;
45
- }
46
- else if (blueprintType === ThemeDefinitionV2_1.BlueprintTypes.variant3) {
47
- return getThemeDefinition().blueprints.variant3;
48
- }
49
- return getThemeDefinition().blueprints.default;
50
- }
51
- function typography(blueprintType, typographyType, size) {
52
- const typographyBlueprint = getThemeDefinition().blueprints[blueprintType].definitions.find(d => d.type === "typography");
53
- if (typographyType === TypographyDefinition_1.TypographyTypes.text) {
54
- return typographyBlueprint.definition.text[size];
55
- }
56
- else if (typographyType === TypographyDefinition_1.TypographyTypes.title) {
57
- return typographyBlueprint.definition.title[size];
58
- }
59
- else if (typographyType === TypographyDefinition_1.TypographyTypes.navigation) {
60
- return typographyBlueprint.definition[size];
61
- }
62
- }
63
38
  function color(colorSchemaType, colorType) {
64
39
  const mappedColorSchema = colorSchema(colorSchemaType);
65
40
  if (colorType === ThemeDefinitionV2_1.ColorTypes.base) {
@@ -117,8 +92,7 @@ function useThemeMethods(getThemeDefinition) {
117
92
  }
118
93
  return {
119
94
  colorSchema,
120
- blueprint,
121
- typography,
95
+ bluePrintbyType,
122
96
  color,
123
97
  colorDefinition,
124
98
  complementaryColorType,
@@ -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
+ 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);
@@ -1,10 +1,9 @@
1
- import { VelcronEvent, VelcronOnUpdatedEvent, VelcronOnClosedEvent, VelcronOnCloseRequestedEvent, VelcronOnEditModeEvent, VelcronOnLoadEvent, VelcronOnPressEvent } from "./VelcronEvents";
1
+ import { VelcronOnUpdatedEvent, VelcronOnClosedEvent, VelcronOnCloseRequestedEvent, VelcronOnPressEvent, VelcronSpacing, VelcronStyling, VelcronCustomComponentDefinition, VelcronAppDefinition } from "internal/fx/shared/models";
2
2
  import { VelcroncomponentArrayType, VelcronPrimitiveType } from "./VelcronTypes";
3
3
  import { AssignOperators, VelcronHorizontalAlignments, VelcronIconTypes, VelcronActionTypes, VelcronVerticalAlignments } from "./Enums";
4
- import { ActivityRendererReference, DynamicState, VelcronPropertyEditor, useVelcronThemingStore } from "..";
4
+ import { ActivityRendererReference, DynamicState, VelcronDefinition, useVelcronThemingStore } from "..";
5
5
  import { GuidValue, PropertyConfiguration, PropertyValue, PropertyDefinition, PropertySetupBase } from "@omnia/fx/models";
6
6
  import { useVelcronColorSchemaStore } from "../stores/VelcronColorSchema";
7
- import { useVelcronBlueprintStore } from "../stores/VelcronBlueprint";
8
7
  export interface ResolvedComponentRenderer {
9
8
  component: unknown;
10
9
  definition: VelcronDefinition;
@@ -48,7 +47,6 @@ export interface VelcronRenderContext {
48
47
  currentContext: DynamicState;
49
48
  theming?: ReturnType<typeof useVelcronThemingStore>;
50
49
  colors?: ReturnType<typeof useVelcronColorSchemaStore>;
51
- blueprints?: ReturnType<typeof useVelcronBlueprintStore>;
52
50
  actions?: {
53
51
  [name: string]: Array<string>;
54
52
  };
@@ -101,39 +99,11 @@ export interface VelcronActionWithCondition extends VelcronActionWithAutoAwait {
101
99
  trueAction: VelcronAction;
102
100
  falseAction: VelcronAction;
103
101
  }
104
- /**
105
- * Velcron definition base
106
- */
107
- export interface VelcronDefinitionBase {
108
- /**
109
- * The component type
110
- */
111
- type: string;
112
- /**
113
- * Custom friendly name of the definition
114
- */
115
- name?: string;
116
- /**
117
- * Used for render cache if not specified we auto set it.
118
- */
119
- key?: string;
120
- }
121
- export interface VelcronDefinition extends VelcronDefinitionBase, VelcronDimensionStyling {
122
- body?: Array<VelcronDefinition>;
123
- style?: VelcronStyling;
124
- foreach?: string;
125
- if?: string;
126
- events?: VelcronEvent;
127
- }
128
102
  export type VelcronBindableProp<TPropType = string> = TPropType | string;
129
103
  export interface VelcronDefinitionWithEditMode extends VelcronDefinition {
130
104
  edit?: VelcronBindableProp<boolean>;
131
105
  bind?: VelcronBindableProp;
132
106
  }
133
- interface VelcronDimensionStyling {
134
- margin?: VelcronSpacing;
135
- padding?: VelcronSpacing;
136
- }
137
107
  export interface VelcronColorStyling {
138
108
  colorSchemaType?: string;
139
109
  colorType?: string;
@@ -147,57 +117,13 @@ export interface VelcronTextStyling {
147
117
  typography?: string;
148
118
  size?: string;
149
119
  }
150
- export interface VelcronStyling {
151
- margin?: number;
152
- marginTop?: number;
153
- marginRight?: number;
154
- marginBottom?: number;
155
- marginLeft?: number;
156
- padding?: number;
157
- paddingTop?: number;
158
- paddingRight?: number;
159
- paddingBottom?: number;
160
- paddingLeft?: number;
161
- height?: number | string;
162
- width?: number | string;
163
- }
164
120
  export interface VelcronCardStyling extends VelcronStyling {
165
121
  elevation: number;
166
122
  }
167
- export interface VelcronSpacing {
168
- top?: number | string;
169
- right?: number | string;
170
- bottom?: number | string;
171
- left?: number | string;
172
- }
173
123
  export interface VelcronIcon {
174
124
  type: VelcronIconTypes;
175
125
  name: string;
176
126
  }
177
- export interface VelcronAppDefinition<TState extends DynamicState = DynamicState> extends VelcronDefinitionBase {
178
- type: "velcron";
179
- version?: string;
180
- name?: string;
181
- body?: Array<VelcronDefinition>;
182
- events?: VelcronOnLoadEvent & VelcronOnEditModeEvent;
183
- actions?: {
184
- [name: string]: Array<string>;
185
- };
186
- components?: Array<VelcronCustomComponentDefinition>;
187
- propEditors?: Array<VelcronPropertyEditor>;
188
- state?: TState;
189
- computed?: {
190
- [name: string]: Array<string>;
191
- };
192
- }
193
- export interface VelcronComponentDefinition extends VelcronDefinition {
194
- type: string;
195
- events?: any;
196
- properties?: {
197
- [name: string]: any;
198
- };
199
- icon?: any;
200
- }
201
127
  export interface VelcronRenderProp {
202
128
  required?: boolean;
203
129
  defaultValue?: any;
@@ -362,7 +288,6 @@ export interface VelcronPropertyDefinitionValue {
362
288
  value: PropertyValue;
363
289
  configuration: PropertyConfiguration<PropertyDefinition<any, any, any, PropertySetupBase>>;
364
290
  }
365
- export type VelcronCustomComponentDefinition = VelcronComponentDefinition;
366
291
  export type VelcronRenderProps<TDefinition> = {
367
292
  definition: TDefinition;
368
293
  renderContext: VelcronRenderContext;
@@ -370,4 +295,3 @@ export type VelcronRenderProps<TDefinition> = {
370
295
  export type VelcronAppRendererProps = VelcronRenderProps<VelcronAppDefinition> & {
371
296
  rootApp: boolean;
372
297
  };
373
- export {};
@@ -1,17 +1,7 @@
1
- import { TypographySize, TypographyType, VelcronImageRatios, VelcronSpacing } from "@omnia/fx-models";
1
+ import { TypographySize, TypographyType, VelcronImageRatios, VelcronPropertyEditor, VelcronSpacing } from "@omnia/fx-models";
2
2
  export interface ResolvedPropertyEditor {
3
3
  editor: VelcronPropertyEditor;
4
4
  }
5
- export interface VelcronPropertyEditor<TSettings = any> {
6
- name?: string;
7
- category?: string;
8
- type: BuiltInPropertyEditorType | string;
9
- settings?: TSettings;
10
- stateMapping?: string;
11
- propertyMapping?: boolean;
12
- multiple?: boolean;
13
- component?: unknown;
14
- }
15
5
  export interface BuiltInPropertyEditors {
16
6
  text: unknown;
17
7
  slider: unknown;
@@ -25,7 +15,6 @@ export interface BuiltInPropertyEditors {
25
15
  spacing: unknown;
26
16
  "color-schema-type": unknown;
27
17
  }
28
- export type BuiltInPropertyEditorType = "text" | "slider" | "switch" | "alignment" | "color" | "markdown" | "icon" | "image" | "typography" | "color-schema-type" | "spacing";
29
18
  export declare enum BuiltInPropertyEditorTypes {
30
19
  text = "text",
31
20
  slider = "slider",
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VelcronStateBinding = exports.VelcronSpacingStateBinding = exports.VelcronColorSchemasStateBinding = exports.VelcronContentStateBinding = exports.VelcronHeaderStateBinding = exports.VelcronImagesStateBinding = exports.BuiltInPropertyEditorTypes = void 0;
4
+ // export type BuiltInPropertyEditorType = "text" | "slider" | "switch" | "alignment" | "color" | "markdown" | "icon" | "image" | "typography" | "color-schema-type" | "spacing" ;
4
5
  var BuiltInPropertyEditorTypes;
5
6
  (function (BuiltInPropertyEditorTypes) {
6
7
  BuiltInPropertyEditorTypes["text"] = "text";
@@ -1,4 +1,4 @@
1
- import { VelcronDefinition } from "./VelcronDefinitions";
1
+ import { VelcronDefinition } from "@omnia/fx-models";
2
2
  export type VelcronPrimitiveType = string | number | boolean;
3
3
  export type VelcronArrayType<T> = Array<T>;
4
4
  export type VelcronObjectType<T extends Object> = T;
@@ -1,4 +1,4 @@
1
- import { VelcronAppDefinition } from "./VelcronDefinitions";
1
+ import { VelcronAppDefinition } from "@omnia/fx-models";
2
2
  export interface AppJson {
3
3
  app: VelcronAppDefinition;
4
4
  }
@@ -1,6 +1,5 @@
1
1
  export * from "./VelcronDefinitions";
2
2
  export * from "./ViewModelAndContext";
3
- export * from "./VelcronEvents";
4
3
  export * from "./VelcronTypes";
5
4
  export * from "./Enums";
6
5
  export * from "./VelcronUnitProvider";
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./VelcronDefinitions"), exports);
5
5
  tslib_1.__exportStar(require("./ViewModelAndContext"), exports);
6
- tslib_1.__exportStar(require("./VelcronEvents"), exports);
7
6
  tslib_1.__exportStar(require("./VelcronTypes"), exports);
8
7
  tslib_1.__exportStar(require("./Enums"), exports);
9
8
  tslib_1.__exportStar(require("./VelcronUnitProvider"), exports);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@omnia/fx-models",
3
3
  "license": "MIT",
4
- "version": "8.0.74-dev",
4
+ "version": "8.0.75-dev",
5
5
  "description": "Provide Omnia Fx Models Stuffs.",
6
6
  "scripts": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1"