@omnia/fx-models 8.0.52-vnext → 8.0.53-vnext

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.
@@ -36,10 +36,10 @@ export interface BlockTitleSettings {
36
36
  bgColor: string;
37
37
  textColor: string;
38
38
  textAlign: TextAlignment;
39
- paddingRight: number;
40
- paddingLeft: number;
41
- paddingTop: number;
42
- paddingBottom: number;
39
+ paddingRight: number | any;
40
+ paddingLeft: number | any;
41
+ paddingTop: number | any;
42
+ paddingBottom: number | any;
43
43
  fontSize: number;
44
44
  separatorSize: number;
45
45
  separatorColor: string;
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 } 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, BlueprintTypes, HorizontalAlignments, SpacingType } from ".";
2
2
  import { MessageBusTopicMediator } from "../";
3
3
  import { TargetingFilterProperty } from "../sp";
4
4
  import { ShapeDividerSettings } from "./ShapeDividerSettingsModel";
@@ -122,13 +122,13 @@ export interface SectionSettings extends LayoutItemSettings {
122
122
  alignment: HorizontalAlignments;
123
123
  width: string;
124
124
  minHeight: string;
125
- spacingBlock: number;
126
- spacingColumn: number;
125
+ spacingBlock: number | SpacingType;
126
+ spacingColumn: number | SpacingType;
127
127
  minWidthBlock: string;
128
- marginSectionLeft: number;
129
- marginSectionRight: number;
130
- marginSectionTop: number;
131
- marginSectionBottom: number;
128
+ marginSectionLeft: number | SpacingType;
129
+ marginSectionRight: number | SpacingType;
130
+ marginSectionTop: number | SpacingType;
131
+ marginSectionBottom: number | SpacingType;
132
132
  targetingFilterProperties: TargetingFilterProperty;
133
133
  titleSettings: BlockTitleSettings;
134
134
  sectionTitle: string | MultilingualString;
@@ -237,10 +237,10 @@ export interface HeaderItemSettings {
237
237
  anchorName?: string;
238
238
  }
239
239
  export interface SpacingItemSettings {
240
- paddingRight: number;
241
- paddingLeft: number;
242
- paddingTop: number;
243
- paddingBottom: number;
240
+ paddingRight: number | SpacingType;
241
+ paddingLeft: number | SpacingType;
242
+ paddingTop: number | SpacingType;
243
+ paddingBottom: number | SpacingType;
244
244
  minHeight: string;
245
245
  }
246
246
  export interface StyleItemSettings {
@@ -1,5 +1,5 @@
1
1
  import { Guid } from "../Guid";
2
- import { SpacingSettings } from "./SpacingSetting";
2
+ import { SpacingDefinition, SpacingSettings } from "./SpacingSetting";
3
3
  import { ColorSchemaType, ColorSchemaTypes } from "./ThemeDefinitionV2";
4
4
  import { TypographyDefinition } from "./TypographyDefinition";
5
5
  export interface BoxDimensions extends SpacingSettings {
@@ -13,21 +13,22 @@ export interface BluePrintDefinitions {
13
13
  variant2: BlueprintDefinition;
14
14
  variant3: BlueprintDefinition;
15
15
  }
16
- export type WebBlueprintDefintionType = "button" | "block" | "typography" | "searchbox";
16
+ export type WebBlueprintDefintionType = "button" | "block" | "typography" | "searchbox" | "layout-spacing";
17
17
  export declare enum WebBlueprintDefintionTypes {
18
18
  button = "button",
19
19
  block = "block",
20
20
  typography = "typography",
21
- searchbox = "searchbox"
21
+ searchbox = "searchbox",
22
+ layoutspacing = "layout-spacing"
22
23
  }
23
- export type VelcronBlueprintDefintionType = "button" | "typography";
24
+ export type VelcronBlueprintDefintionType = "button" | "typography" | "inner-spacing";
24
25
  export declare enum VelcronBlueprintDefintionTypes {
25
26
  button = "button",
26
- block = "block",
27
- typography = "typography"
27
+ typography = "typography",
28
+ innerspacing = "inner-spacing"
28
29
  }
29
30
  export interface BlueprintItemDefinition {
30
- type: any;
31
+ type: VelcronBlueprintDefintionType | WebBlueprintDefintionType;
31
32
  }
32
33
  export interface BlockBlueprint extends BlueprintItemDefinition {
33
34
  type: "block";
@@ -42,6 +43,10 @@ export interface BlockBlueprint extends BlueprintItemDefinition {
42
43
  border: BoxBorder;
43
44
  };
44
45
  }
46
+ export interface SpacingBlueprint {
47
+ type: "layout-spacing" | "inner-spacing";
48
+ definition: SpacingDefinition;
49
+ }
45
50
  export interface TypographyBlueprint extends BlueprintItemDefinition {
46
51
  type: "typography";
47
52
  definition: TypographyDefinition;
@@ -7,10 +7,11 @@ var WebBlueprintDefintionTypes;
7
7
  WebBlueprintDefintionTypes["block"] = "block";
8
8
  WebBlueprintDefintionTypes["typography"] = "typography";
9
9
  WebBlueprintDefintionTypes["searchbox"] = "searchbox";
10
+ WebBlueprintDefintionTypes["layoutspacing"] = "layout-spacing";
10
11
  })(WebBlueprintDefintionTypes = exports.WebBlueprintDefintionTypes || (exports.WebBlueprintDefintionTypes = {}));
11
12
  var VelcronBlueprintDefintionTypes;
12
13
  (function (VelcronBlueprintDefintionTypes) {
13
14
  VelcronBlueprintDefintionTypes["button"] = "button";
14
- VelcronBlueprintDefintionTypes["block"] = "block";
15
15
  VelcronBlueprintDefintionTypes["typography"] = "typography";
16
+ VelcronBlueprintDefintionTypes["innerspacing"] = "inner-spacing";
16
17
  })(VelcronBlueprintDefintionTypes = exports.VelcronBlueprintDefintionTypes || (exports.VelcronBlueprintDefintionTypes = {}));
@@ -1,6 +1,23 @@
1
+ import { Guid } from "@omnia/fx-models";
1
2
  export interface SpacingSettings {
2
- top: number;
3
- right: number;
4
- bottom: number;
5
- left: number;
3
+ top: number | SpacingType;
4
+ right: number | SpacingType;
5
+ bottom: number | SpacingType;
6
+ left: number | SpacingType;
7
+ }
8
+ export interface SpacingDefinition {
9
+ id: Guid;
10
+ xs: number;
11
+ s: number;
12
+ m: number;
13
+ l: number;
14
+ xl: number;
15
+ }
16
+ export type SpacingType = "xs" | "s" | "m" | "l" | "xl";
17
+ export declare enum SpacingTypes {
18
+ xs = "xs",
19
+ s = "s",
20
+ m = "m",
21
+ l = "l",
22
+ xl = "xl"
6
23
  }
@@ -1,2 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SpacingTypes = void 0;
4
+ var SpacingTypes;
5
+ (function (SpacingTypes) {
6
+ SpacingTypes["xs"] = "xs";
7
+ SpacingTypes["s"] = "s";
8
+ SpacingTypes["m"] = "m";
9
+ SpacingTypes["l"] = "l";
10
+ SpacingTypes["xl"] = "xl";
11
+ })(SpacingTypes = exports.SpacingTypes || (exports.SpacingTypes = {}));
@@ -1,7 +1,7 @@
1
1
  import { ThemeDefinitionInstance } from "@omnia/fx/ux";
2
2
  import { BlueprintType, BlueprintTypes, ColorDefinition, ColorSchemaType, ColorSchemaTypes, ColorType, ColorTypes } from "./ThemeDefinitionV2";
3
3
  import { TypographyType, TypographyTypeDefinition, TypographyTypes } from "./TypographyDefinition";
4
- export declare const useThemeMethods: (getThemeDefinition: () => ThemeDefinitionInstance) => {
4
+ export declare function useThemeMethods(getThemeDefinition: () => ThemeDefinitionInstance): {
5
5
  colorSchema: (colorSchemaType: ColorSchemaTypes | ColorSchemaType) => import("./ThemeDefinitionV2").ColorSchema;
6
6
  blueprint: (blueprintType: BlueprintTypes | BlueprintType) => import("./BlueprintDefinition").BlueprintDefinition;
7
7
  typography: (blueprintType: BlueprintTypes | BlueprintType, typographyType: TypographyTypes | TypographyType) => TypographyTypeDefinition;
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.useThemeMethods = void 0;
4
4
  const ThemeDefinitionV2_1 = require("./ThemeDefinitionV2");
5
5
  const TypographyDefinition_1 = require("./TypographyDefinition");
6
- const useThemeMethods = (getThemeDefinition) => {
7
- const colorSchema = (colorSchemaType) => {
6
+ function useThemeMethods(getThemeDefinition) {
7
+ function colorSchema(colorSchemaType) {
8
8
  if (colorSchemaType === ThemeDefinitionV2_1.ColorSchemaTypes.primary) {
9
9
  return getThemeDefinition().colors.primary;
10
10
  }
@@ -30,8 +30,8 @@ const useThemeMethods = (getThemeDefinition) => {
30
30
  return getThemeDefinition().colors.error;
31
31
  }
32
32
  return getThemeDefinition().colors.background;
33
- };
34
- const blueprint = (blueprintType) => {
33
+ }
34
+ function blueprint(blueprintType) {
35
35
  if (blueprintType === ThemeDefinitionV2_1.BlueprintTypes.default) {
36
36
  return getThemeDefinition().blueprints.default;
37
37
  }
@@ -45,8 +45,8 @@ const useThemeMethods = (getThemeDefinition) => {
45
45
  return getThemeDefinition().blueprints.variant3;
46
46
  }
47
47
  return getThemeDefinition().blueprints.default;
48
- };
49
- const typography = (blueprintType, typographyType) => {
48
+ }
49
+ function typography(blueprintType, typographyType) {
50
50
  const typographyBlueprint = getThemeDefinition().blueprints[blueprintType].definitions.find(d => d.type === "typography");
51
51
  if (typographyType === TypographyDefinition_1.TypographyTypes.h1) {
52
52
  return typographyBlueprint.definition.h1;
@@ -67,8 +67,8 @@ const useThemeMethods = (getThemeDefinition) => {
67
67
  return typographyBlueprint.definition.text;
68
68
  }
69
69
  return typographyBlueprint.definition.text;
70
- };
71
- const color = (colorSchemaType, colorType) => {
70
+ }
71
+ function color(colorSchemaType, colorType) {
72
72
  const mappedColorSchema = colorSchema(colorSchemaType);
73
73
  if (colorType === ThemeDefinitionV2_1.ColorTypes.base) {
74
74
  return mappedColorSchema.base.color;
@@ -83,8 +83,8 @@ const useThemeMethods = (getThemeDefinition) => {
83
83
  return mappedColorSchema.onContainer.color;
84
84
  }
85
85
  return colorType;
86
- };
87
- const colorDefinition = (colorSchemaType, colorType) => {
86
+ }
87
+ function colorDefinition(colorSchemaType, colorType) {
88
88
  const mappedColorSchema = colorSchema(colorSchemaType);
89
89
  if (colorType === ThemeDefinitionV2_1.ColorTypes.base) {
90
90
  return mappedColorSchema.base;
@@ -99,8 +99,8 @@ const useThemeMethods = (getThemeDefinition) => {
99
99
  return mappedColorSchema.onContainer;
100
100
  }
101
101
  return mappedColorSchema.base;
102
- };
103
- const complementaryColorType = (colorType) => {
102
+ }
103
+ function complementaryColorType(colorType) {
104
104
  if (colorType === ThemeDefinitionV2_1.ColorTypes.base) {
105
105
  return ThemeDefinitionV2_1.ColorTypes.onBase;
106
106
  }
@@ -114,15 +114,15 @@ const useThemeMethods = (getThemeDefinition) => {
114
114
  return ThemeDefinitionV2_1.ColorTypes.container;
115
115
  }
116
116
  return colorType;
117
- };
118
- const complementaryColor = (colorSchemaType, colorType) => {
117
+ }
118
+ function complementaryColor(colorSchemaType, colorType) {
119
119
  const matchingColorType = complementaryColorType(colorType);
120
120
  return color(colorSchemaType, matchingColorType);
121
- };
122
- const complementaryColorDefinition = (colorSchemaType, colorType) => {
121
+ }
122
+ function complementaryColorDefinition(colorSchemaType, colorType) {
123
123
  const matchingColorType = complementaryColorType(colorType);
124
124
  return colorDefinition(colorSchemaType, matchingColorType);
125
- };
125
+ }
126
126
  return {
127
127
  colorSchema,
128
128
  blueprint,
@@ -133,5 +133,5 @@ const useThemeMethods = (getThemeDefinition) => {
133
133
  complementaryColor,
134
134
  complementaryColorDefinition,
135
135
  };
136
- };
136
+ }
137
137
  exports.useThemeMethods = useThemeMethods;
@@ -6,9 +6,17 @@ export type Position = Tblock | Tinline | "center" | "center center" | `${Tblock
6
6
  export declare const SizeTypeDefinitions: readonly ["default", "x-small", "small", "large", "x-large"];
7
7
  export type SizeTypes = typeof SizeTypeDefinitions[number];
8
8
  export declare const SizeTypesName = "SizeTypes";
9
+ /**Slider */
10
+ export declare const DirectionDefinitions: readonly ["horizontal", "vertical"];
11
+ export type DirectionTypes = typeof DirectionDefinitions[number];
12
+ export declare const DirectionTypesName = "DirectionTypes";
13
+ export declare const SliderVariantDefinitions: readonly ["default", "prominent"];
14
+ export type SliderVariants = typeof SliderVariantDefinitions[number];
15
+ export declare const SliderVariantsName = "SliderVariants";
9
16
  /**Progress */
10
17
  export declare const ProgressTypeDefinitions: readonly ["linear", "circular"];
11
18
  export type ProgressTypes = typeof ProgressTypeDefinitions[number];
19
+ export declare const ProgressTypesName = "ProgressTypes";
12
20
  /**AppBar */
13
21
  export declare const AppBarTypeDefinitions: readonly ["default", "app"];
14
22
  export type AppBarTypes = typeof AppBarTypeDefinitions[number];
@@ -1,13 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ScrollOffsetTypeDefinitions = exports.SelectTypesName = exports.SelectTypeDefinitions = exports.VerticalAlignmentsName = exports.VerticalAlignmentDefinitions = exports.HorizontalAlignmentsName = exports.HorizontalAlignmentDefinitions = exports.PanelDirectionsName = exports.PanelDirectionDefinitions = exports.PanelVariantsName = exports.PanelVariantDefinitions = exports.DividerTypesName = exports.DividerTypeDefinitions = exports.NavigationDrawerVariantsName = exports.NavigationDrawerVariantDefinitions = exports.NavigationDrawerLocationsName = exports.NavigationDrawerLocationDefinitions = exports.MenuLocationsName = exports.MenuLocationDefinitions = exports.ListLineTypesName = exports.ListLineTypeDefinitions = exports.ListTypesName = exports.ListTypeDefinitions = exports.ListItemVariantsName = exports.ListItemVariantDefinitions = exports.RatioTypesName = exports.RatioTypeDefinitions = exports.IconSizesName = exports.IconSizeDefinitions = exports.IconPresetsName = exports.IconPresetDefinitions = exports.PanelTypesName = exports.PanelTypeDefinitions = exports.DialogTypesName = exports.DialogTypeDefinitions = exports.AlignmentTypesName = exports.AlignmentTypeDefinitions = exports.ColValuesName = exports.ColValueDefinitions = exports.ButtonGroupTypesName = exports.ButtonGroupTypeDefinitions = exports.ButtonVariantsName = exports.ButtonVariantDefinitions = exports.ButtonPresetsName = exports.ButtonPresetDefinitions = exports.AppBarTypesName = exports.AppBarTypeDefinitions = exports.ProgressTypeDefinitions = exports.SizeTypesName = exports.SizeTypeDefinitions = void 0;
4
- exports.ToolbarVariantsName = exports.ToolbarVariationDefinitions = exports.TextBoxTypesName = exports.TextBoxTypeDefinitions = exports.TextBoxVariantTypesName = exports.TextBoxVariantTypeDefinitions = exports.TabVariantsName = exports.TabVariantDefinitions = exports.ScrollOffsetTypesName = void 0;
3
+ exports.HorizontalAlignmentsName = exports.HorizontalAlignmentDefinitions = exports.PanelDirectionsName = exports.PanelDirectionDefinitions = exports.PanelVariantsName = exports.PanelVariantDefinitions = exports.DividerTypesName = exports.DividerTypeDefinitions = exports.NavigationDrawerVariantsName = exports.NavigationDrawerVariantDefinitions = exports.NavigationDrawerLocationsName = exports.NavigationDrawerLocationDefinitions = exports.MenuLocationsName = exports.MenuLocationDefinitions = exports.ListLineTypesName = exports.ListLineTypeDefinitions = exports.ListTypesName = exports.ListTypeDefinitions = exports.ListItemVariantsName = exports.ListItemVariantDefinitions = exports.RatioTypesName = exports.RatioTypeDefinitions = exports.IconSizesName = exports.IconSizeDefinitions = exports.IconPresetsName = exports.IconPresetDefinitions = exports.PanelTypesName = exports.PanelTypeDefinitions = exports.DialogTypesName = exports.DialogTypeDefinitions = exports.AlignmentTypesName = exports.AlignmentTypeDefinitions = exports.ColValuesName = exports.ColValueDefinitions = exports.ButtonGroupTypesName = exports.ButtonGroupTypeDefinitions = exports.ButtonVariantsName = exports.ButtonVariantDefinitions = exports.ButtonPresetsName = exports.ButtonPresetDefinitions = exports.AppBarTypesName = exports.AppBarTypeDefinitions = exports.ProgressTypesName = exports.ProgressTypeDefinitions = exports.SliderVariantsName = exports.SliderVariantDefinitions = exports.DirectionTypesName = exports.DirectionDefinitions = exports.SizeTypesName = exports.SizeTypeDefinitions = void 0;
4
+ exports.ToolbarVariantsName = exports.ToolbarVariationDefinitions = exports.TextBoxTypesName = exports.TextBoxTypeDefinitions = exports.TextBoxVariantTypesName = exports.TextBoxVariantTypeDefinitions = exports.TabVariantsName = exports.TabVariantDefinitions = exports.ScrollOffsetTypesName = exports.ScrollOffsetTypeDefinitions = exports.SelectTypesName = exports.SelectTypeDefinitions = exports.VerticalAlignmentsName = exports.VerticalAlignmentDefinitions = void 0;
5
5
  const block = ["top", "bottom"];
6
6
  const inline = ["start", "end", "left", "right"];
7
7
  exports.SizeTypeDefinitions = ["default", "x-small", "small", "large", "x-large"];
8
8
  exports.SizeTypesName = "SizeTypes";
9
+ /**Slider */
10
+ exports.DirectionDefinitions = ["horizontal", "vertical"];
11
+ exports.DirectionTypesName = "DirectionTypes";
12
+ exports.SliderVariantDefinitions = ["default", "prominent"];
13
+ exports.SliderVariantsName = "SliderVariants";
9
14
  /**Progress */
10
15
  exports.ProgressTypeDefinitions = ["linear", "circular"];
16
+ exports.ProgressTypesName = "ProgressTypes";
11
17
  /**AppBar */
12
18
  exports.AppBarTypeDefinitions = ["default", "app"];
13
19
  exports.AppBarTypesName = "AppBarTypes";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@omnia/fx-models",
3
3
  "license": "MIT",
4
- "version": "8.0.52-vnext",
4
+ "version": "8.0.53-vnext",
5
5
  "description": "Provide Omnia Fx Models Stuffs.",
6
6
  "scripts": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1"