@omnia/fx-models 8.0.303-dev → 8.0.305-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.
@@ -1,4 +1,4 @@
1
- import { guid, ThemeSelection } from "@omnia/fx-models/internal-do-not-import-from-here/shared/models";
1
+ import { guid } from "@omnia/fx-models/internal-do-not-import-from-here/shared/models";
2
2
  import { IOmniaPropertyBag, OmniaNamedModel } from "../NamedProperty";
3
3
  import { EmailPropertyDefinition, EmailPropertyValue, ImagePropertyDefinition, LanguagePropertyDefinition, PhoneNumberPropertyValue, PropertyValueBinding, TextPropertyDefinition } from "../properties";
4
4
  import { IResolvedIdentity, Identity } from "./Identity";
@@ -102,6 +102,6 @@ export interface ResetAccountRequest {
102
102
  }
103
103
  export declare class UserThemeManager extends UserPropertyBagModel {
104
104
  constructor();
105
- selected: ThemeSelection;
105
+ selectedAdminThemeId: guid;
106
106
  }
107
107
  export {};
@@ -81,8 +81,8 @@ export interface ComponentBlueprints extends ThemeBase {
81
81
  headers?: HeaderBlueprints;
82
82
  }
83
83
  export interface SpacingBlueprint {
84
- l: SpacingDefinition;
85
- s: SpacingDefinition;
84
+ l?: SpacingDefinition;
85
+ s?: SpacingDefinition;
86
86
  }
87
87
  export type WebBlueprintItemDefintionType = "button" | "searchbox" | "text" | "icon" | "tab";
88
88
  export declare enum WebBlueprintItemDefintionTypes {
@@ -5,18 +5,6 @@ exports.getSpacingValueFromBlueprint = getSpacingValueFromBlueprint;
5
5
  const Spacing_1 = require("./Spacing");
6
6
  const useSpacingScaling_1 = require("./useSpacingScaling");
7
7
  const spacingScaling = (0, useSpacingScaling_1.useSpacingScaling)();
8
- function getValueWithoutScale(value) {
9
- if (!value) {
10
- return value;
11
- }
12
- if (typeof value === "number") {
13
- return value;
14
- }
15
- if (value.indexOf(":") === -1) {
16
- return value;
17
- }
18
- return value.split(":")[1];
19
- }
20
8
  function getSpacingValueFromBlueprint(spacingValue, blueprint, scale) {
21
9
  if (!spacingValue) {
22
10
  return 0;
@@ -27,8 +15,8 @@ function getSpacingValueFromBlueprint(spacingValue, blueprint, scale) {
27
15
  const definition = scale === "l" ? blueprint.l : blueprint.s;
28
16
  let negative = false;
29
17
  let result = spacingValue;
30
- if (isNaN(spacingValue) && definition) {
31
- let strippedValue = getValueWithoutScale(spacingValue);
18
+ if (isNaN(spacingValue)) {
19
+ let strippedValue = spacingScaling.get.valueWithoutScale(spacingValue);
32
20
  if (strippedValue.startsWith("-")) {
33
21
  negative = true;
34
22
  }
@@ -7,12 +7,12 @@ export type Spacing = {
7
7
  };
8
8
  export type SpacingScale = "l" | "s";
9
9
  export interface SpacingDefinition {
10
- name: string;
11
- xs: number;
12
- s: number;
13
- m: number;
14
- l: number;
15
- xl: number;
10
+ name?: string;
11
+ xs?: number;
12
+ s?: number;
13
+ m?: number;
14
+ l?: number;
15
+ xl?: number;
16
16
  }
17
17
  export type SpacingValue = "xs" | "s" | "m" | "l" | "xl" | "l:xs" | "l:s" | "l:m" | "l:l" | "l:xl" | "s:xs" | "s:s" | "s:m" | "s:l" | "s:xl" | number;
18
18
  export declare enum SpacingTypes {
@@ -25,11 +25,15 @@ export interface ColorStyles {
25
25
  export interface ColorSchemas extends ColorSchemasReference {
26
26
  primary: ColorSchema;
27
27
  secondary: ColorSchema;
28
- accent1: ColorSchema;
29
- accent2: ColorSchema;
30
- accent3: ColorSchema;
31
- accent4: ColorSchema;
32
- accent5: ColorSchema;
28
+ accent1?: ColorSchema;
29
+ accent2?: ColorSchema;
30
+ accent3?: ColorSchema;
31
+ accent4?: ColorSchema;
32
+ accent5?: ColorSchema;
33
+ accent6?: ColorSchema;
34
+ accent7?: ColorSchema;
35
+ accent8?: ColorSchema;
36
+ accent9?: ColorSchema;
33
37
  neutral: ColorSchema;
34
38
  background: ColorSchema;
35
39
  error: ColorSchema;
@@ -42,17 +46,22 @@ export interface BlueprintsReference {
42
46
  id: guid;
43
47
  }
44
48
  export interface ColorSchemasReference {
45
- primary: BlueprintsReference;
46
- secondary: BlueprintsReference;
47
- accent1: BlueprintsReference;
48
- accent2: BlueprintsReference;
49
- accent3: BlueprintsReference;
50
- neutral: BlueprintsReference;
51
- background: BlueprintsReference;
52
- error: BlueprintsReference;
53
- info: BlueprintsReference;
54
- warning: BlueprintsReference;
55
- notification: BlueprintsReference;
49
+ primary?: BlueprintsReference;
50
+ secondary?: BlueprintsReference;
51
+ accent1?: BlueprintsReference;
52
+ accent2?: BlueprintsReference;
53
+ accent3?: BlueprintsReference;
54
+ accent4?: BlueprintsReference;
55
+ accent5?: BlueprintsReference;
56
+ accent6?: BlueprintsReference;
57
+ accent7?: BlueprintsReference;
58
+ accent8?: BlueprintsReference;
59
+ neutral?: BlueprintsReference;
60
+ background?: BlueprintsReference;
61
+ error?: BlueprintsReference;
62
+ info?: BlueprintsReference;
63
+ warning?: BlueprintsReference;
64
+ notification?: BlueprintsReference;
56
65
  }
57
66
  export interface ThemeDefinitionReference {
58
67
  id: guid;
@@ -97,6 +106,10 @@ export declare enum ColorSchemaTypes {
97
106
  accent3 = "accent3",
98
107
  accent4 = "accent4",
99
108
  accent5 = "accent5",
109
+ accent6 = "accent6",
110
+ accent7 = "accent7",
111
+ accent8 = "accent8",
112
+ accent9 = "accent9",
100
113
  neutral = "neutral",
101
114
  warning = "warning",
102
115
  notification = "notification",
@@ -239,11 +252,15 @@ export declare function ThemeDefinitionId(id: guid): ThemeDefinitionId;
239
252
  export interface ColorSchemasReferenceId {
240
253
  primaryId: ColorSchemaId;
241
254
  secondaryId: ColorSchemaId;
242
- accent1Id: ColorSchemaId;
243
- accent2Id: ColorSchemaId;
244
- accent3Id: ColorSchemaId;
245
- accent4Id: ColorSchemaId;
246
- accent5Id: ColorSchemaId;
255
+ accent1Id?: ColorSchemaId;
256
+ accent2Id?: ColorSchemaId;
257
+ accent3Id?: ColorSchemaId;
258
+ accent4Id?: ColorSchemaId;
259
+ accent5Id?: ColorSchemaId;
260
+ accent6Id?: ColorSchemaId;
261
+ accent7Id?: ColorSchemaId;
262
+ accent8Id?: ColorSchemaId;
263
+ accent9Id?: ColorSchemaId;
247
264
  neutralId: ColorSchemaId;
248
265
  backgroundId: ColorSchemaId;
249
266
  errorId: ColorSchemaId;
@@ -12,6 +12,10 @@ var ColorSchemaTypes;
12
12
  ColorSchemaTypes["accent3"] = "accent3";
13
13
  ColorSchemaTypes["accent4"] = "accent4";
14
14
  ColorSchemaTypes["accent5"] = "accent5";
15
+ ColorSchemaTypes["accent6"] = "accent6";
16
+ ColorSchemaTypes["accent7"] = "accent7";
17
+ ColorSchemaTypes["accent8"] = "accent8";
18
+ ColorSchemaTypes["accent9"] = "accent9";
15
19
  ColorSchemaTypes["neutral"] = "neutral";
16
20
  ColorSchemaTypes["warning"] = "warning";
17
21
  ColorSchemaTypes["notification"] = "notification";
@@ -1,6 +1,6 @@
1
1
  import { SetupFactoryContext } from "../factory";
2
2
  import { http } from "../http";
3
- interface SetupServiceContext extends SetupFactoryContext {
3
+ export interface SetupServiceContext extends SetupFactoryContext {
4
4
  http: typeof http;
5
5
  }
6
6
  type ReturnServiceSetup = {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@omnia/fx-models",
3
3
  "license": "MIT",
4
- "version": "8.0.303-dev",
4
+ "version": "8.0.305-dev",
5
5
  "description": "Provide Omnia Fx Models Stuffs.",
6
6
  "scripts": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1"