@omnia/fx-models 8.0.299-dev → 8.0.300-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.
package/Layout.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { TitleRendererValue, MultilingualString, LegacyThemeDefinition, IIcon, Spacing, IconPickerModel, WebComponentDefinition, OmniaBlock, guid, RadialGradientShapes, BlockTitleSettings, LayoutItemActions, LayoutEditorModes, BlockRenderingModes, TabbedDisplayModes, TabbedIconPositions, LayoutDrawerTabs, ILayoutCanvasDefinitionBuilder, MediaPickerImage, IMessageBusTopicSubscription, MediaPickerStorageProviderContext, OmniaBackendRuntimes, OmniaClientRuntimes, LayoutCanvasModes, HorizontalAlignments, SpacingValue, ColorValue, VerticalAlignments, ContainerVariant, ContainerBlueprint, ColorSchemaTypes, ColorSchema, ChromeBlueprint, BlueprintVariant, TabsBlueprint } from ".";
1
+ import { TitleRendererValue, MultilingualString, LegacyThemeDefinition, IIcon, Spacing, IconPickerModel, WebComponentDefinition, OmniaBlock, guid, RadialGradientShapes, BlockTitleSettings, LayoutItemActions, LayoutEditorModes, BlockRenderingModes, TabbedDisplayModes, TabbedIconPositions, LayoutDrawerTabs, ILayoutCanvasDefinitionBuilder, MediaPickerImage, IMessageBusTopicSubscription, MediaPickerStorageProviderContext, OmniaBackendRuntimes, OmniaClientRuntimes, LayoutCanvasModes, HorizontalAlignments, SpacingValue, ColorValue, VerticalAlignments, ContainerFillVariant, ContainerFillBlueprint, ColorSchemaTypes, ColorSchema, ChromeBlueprint, BlueprintVariant, TabsBlueprint } from ".";
2
2
  import { MessageBusTopicMediator } from "../";
3
3
  import { TargetingFilterProperty } from "../sp";
4
4
  import { ShapeDividerSettings } from "./ShapeDividerSettingsModel";
@@ -68,7 +68,7 @@ export interface LayoutItemSettings {
68
68
  css: string;
69
69
  customCssClasses: string;
70
70
  colorSchemaType?: ColorSchemaTypes | ColorSchema;
71
- containerVariant?: ContainerVariant | ContainerBlueprint;
71
+ containerVariant?: ContainerFillVariant | ContainerFillBlueprint;
72
72
  chromeType?: ChromeBlueprint | BlueprintVariant;
73
73
  }
74
74
  export interface LinearGradientBackground extends BackgroundSettings {
@@ -1,6 +1,5 @@
1
1
  import { ColorSchemaTypes } from "@omnia/fx-models/internal-do-not-import-from-here/shared/models";
2
2
  export interface ThemeableComponentProps {
3
3
  colorSchemaType?: ColorSchemaTypes;
4
- container?: any;
5
4
  colors?: any;
6
5
  }
@@ -1,4 +1,4 @@
1
- import { guid } from "@omnia/fx-models/internal-do-not-import-from-here/shared/models";
1
+ import { guid, ThemeSelection } 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";
@@ -100,4 +100,8 @@ export interface ResetAccountRequest {
100
100
  sendAuthSetupLinkByEmail: boolean;
101
101
  redirectUrl: string;
102
102
  }
103
+ export declare class UserThemeManager extends UserPropertyBagModel {
104
+ constructor();
105
+ selected: ThemeSelection;
106
+ }
103
107
  export {};
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UserSortColumn = exports.DocumentDirectionSettings = exports.UserAccessibilitySettings = exports.UserPropertyBagModel = exports.ResolvedUserIdentity = exports.UserIdentity = void 0;
3
+ exports.UserThemeManager = exports.UserSortColumn = exports.DocumentDirectionSettings = exports.UserAccessibilitySettings = exports.UserPropertyBagModel = exports.ResolvedUserIdentity = exports.UserIdentity = void 0;
4
4
  const models_1 = require("@omnia/fx-models/internal-do-not-import-from-here/shared/models");
5
5
  const Enums_1 = require("../Enums");
6
6
  const ManifestIds_1 = require("../ManifestIds");
@@ -99,3 +99,9 @@ var UserSortColumn;
99
99
  UserSortColumn[UserSortColumn["ProviderId"] = 4] = "ProviderId";
100
100
  UserSortColumn[UserSortColumn["UserTypeId"] = 5] = "UserTypeId";
101
101
  })(UserSortColumn || (exports.UserSortColumn = UserSortColumn = {}));
102
+ class UserThemeManager extends UserPropertyBagModel {
103
+ constructor() {
104
+ super(ManifestIds_1.OmniaService.Id, "themingManager");
105
+ }
106
+ }
107
+ exports.UserThemeManager = UserThemeManager;
@@ -17,14 +17,14 @@ export interface ChromeBlueprints extends Blueprints, BlueprintsReference {
17
17
  variant2?: ChromeBlueprint;
18
18
  variant3?: ChromeBlueprint;
19
19
  }
20
- export type ContainerVariant = "variant1" | "variant2" | "variant3" | "variant4";
21
- export interface ContainerBlueprints extends Blueprints, BlueprintsReference {
22
- variant1?: ContainerBlueprint;
23
- variant2?: ContainerBlueprint;
24
- variant3?: ContainerBlueprint;
25
- variant4?: ContainerBlueprint;
26
- }
27
- export interface ContainerBlueprint extends Blueprints, BlueprintsReference {
20
+ export type ContainerFillVariant = "variant1" | "variant2" | "variant3" | "variant4";
21
+ export interface ContainerFillBlueprints extends Blueprints, BlueprintsReference {
22
+ variant1?: ContainerFillBlueprint;
23
+ variant2?: ContainerFillBlueprint;
24
+ variant3?: ContainerFillBlueprint;
25
+ variant4?: ContainerFillBlueprint;
26
+ }
27
+ export interface ContainerFillBlueprint extends Blueprints, BlueprintsReference {
28
28
  name?: string;
29
29
  background?: BackgroundDefinition;
30
30
  }
@@ -55,7 +55,7 @@ export interface ComponentBlueprints extends ThemeBase {
55
55
  blocks?: ChromeBlueprints;
56
56
  icons?: IconBlueprints;
57
57
  chips?: ChipBlueprint;
58
- containers?: ContainerBlueprints;
58
+ fills?: ContainerFillBlueprints;
59
59
  }
60
60
  export interface SpacingBlueprint {
61
61
  l: SpacingDefinition;
@@ -10,10 +10,6 @@ export interface ColorTypeResult<resultType> {
10
10
  baseTone: resultType;
11
11
  onBase: resultType;
12
12
  onBaseTone: resultType;
13
- container: resultType;
14
- containerTone: resultType;
15
- onContainer: resultType;
16
- onContainerTone: resultType;
17
13
  colorType: (colorType: string) => resultType;
18
14
  }
19
15
  export interface ColorDefinition {
@@ -113,9 +109,7 @@ export declare enum ColorSchemaTypes {
113
109
  export type ColorType = keyof typeof ColorTypes;
114
110
  export declare enum ColorTypes {
115
111
  base = "base",
116
- onBase = "onBase",
117
- container = "container",
118
- onContainer = "onContainer"
112
+ onBase = "onBase"
119
113
  }
120
114
  export interface ThemedColorValue {
121
115
  colorType: ColorType;
@@ -149,7 +143,7 @@ export interface FillDefinition {
149
143
  colors: Array<ColorValue | ColorGradientValue>;
150
144
  acrylic?: boolean;
151
145
  }
152
- export type FillVariant = "variant1" | "variant2" | "variant3";
146
+ export type FillVariant = "variant1" | "variant2" | "variant3" | "variant4";
153
147
  export type FillDefinitionValue = FillVariant | FillDefinition | ColorValue;
154
148
  export interface LinearGradientFillDefinition extends FillDefinition {
155
149
  degrees: number;
@@ -268,6 +262,4 @@ export interface ThemeDefinition extends ThemeBase {
268
262
  export interface ColorSchema extends ThemeBase {
269
263
  base: ColorDefinition;
270
264
  onBase: ColorDefinition;
271
- container: ColorDefinition;
272
- onContainer: ColorDefinition;
273
265
  }
@@ -25,8 +25,6 @@ var ColorTypes;
25
25
  (function (ColorTypes) {
26
26
  ColorTypes["base"] = "base";
27
27
  ColorTypes["onBase"] = "onBase";
28
- ColorTypes["container"] = "container";
29
- ColorTypes["onContainer"] = "onContainer";
30
28
  })(ColorTypes || (exports.ColorTypes = ColorTypes = {}));
31
29
  var RadialGradientShapes;
32
30
  (function (RadialGradientShapes) {
@@ -1,11 +1,8 @@
1
- import { ContainerBlueprint, ContainerVariant } from "./Blueprints";
1
+ import { ContainerFillBlueprint, ContainerFillVariant } from "./Blueprints";
2
2
  import { ColorDefinition, ColorSchema, ColorSchemaType, ColorSchemaTypes, ColorType, ColorTypes } from "./ThemeDefinition";
3
3
  export declare function useThemeMethods(getThemeDefinition: () => any): {
4
- containerBlueprint: (type: ContainerVariant | ContainerBlueprint | string) => any;
4
+ containerBlueprint: (type: ContainerFillVariant | ContainerFillBlueprint | string) => any;
5
5
  colorSchema: (colorSchemaType: ColorSchemaTypes | ColorSchemaType) => ColorSchema;
6
6
  color: (colorSchemaType: ColorSchemaTypes | ColorSchemaType, colorType: ColorTypes | ColorType) => string;
7
7
  colorDefinition: (colorSchemaType: ColorSchemaTypes | ColorSchemaType, colorType: ColorTypes | ColorType) => ColorDefinition;
8
- complementaryColorType: (colorType: ColorTypes | ColorType) => ColorTypes;
9
- complementaryColor: (colorSchemaType: ColorSchemaTypes | ColorSchemaType, colorType: ColorTypes | ColorType) => string;
10
- complementaryColorDefinition: (colorSchemaType: ColorSchemaTypes | ColorSchemaType, colorType: ColorTypes | ColorType) => ColorDefinition;
11
8
  };
@@ -66,12 +66,6 @@ function useThemeMethods(getThemeDefinition) {
66
66
  else if (colorType === ThemeDefinition_1.ColorTypes.onBase) {
67
67
  return mappedColorSchema.onBase.color;
68
68
  }
69
- else if (colorType === ThemeDefinition_1.ColorTypes.container) {
70
- return mappedColorSchema.container.color;
71
- }
72
- else if (colorType === ThemeDefinition_1.ColorTypes.onContainer) {
73
- return mappedColorSchema.onContainer.color;
74
- }
75
69
  return colorType;
76
70
  }
77
71
  function colorDefinition(colorSchemaType, colorType) {
@@ -82,44 +76,12 @@ function useThemeMethods(getThemeDefinition) {
82
76
  else if (colorType === ThemeDefinition_1.ColorTypes.onBase) {
83
77
  return mappedColorSchema.onBase;
84
78
  }
85
- else if (colorType === ThemeDefinition_1.ColorTypes.container) {
86
- return mappedColorSchema.container;
87
- }
88
- else if (colorType === ThemeDefinition_1.ColorTypes.onContainer) {
89
- return mappedColorSchema.onContainer;
90
- }
91
79
  return mappedColorSchema.base;
92
80
  }
93
- function complementaryColorType(colorType) {
94
- if (colorType === ThemeDefinition_1.ColorTypes.base) {
95
- return ThemeDefinition_1.ColorTypes.onBase;
96
- }
97
- else if (colorType === ThemeDefinition_1.ColorTypes.onBase) {
98
- return ThemeDefinition_1.ColorTypes.base;
99
- }
100
- else if (colorType === ThemeDefinition_1.ColorTypes.container) {
101
- return ThemeDefinition_1.ColorTypes.onContainer;
102
- }
103
- else if (colorType === ThemeDefinition_1.ColorTypes.onContainer) {
104
- return ThemeDefinition_1.ColorTypes.container;
105
- }
106
- return colorType;
107
- }
108
- function complementaryColor(colorSchemaType, colorType) {
109
- const matchingColorType = complementaryColorType(colorType);
110
- return color(colorSchemaType, matchingColorType);
111
- }
112
- function complementaryColorDefinition(colorSchemaType, colorType) {
113
- const matchingColorType = complementaryColorType(colorType);
114
- return colorDefinition(colorSchemaType, matchingColorType);
115
- }
116
81
  return {
117
82
  containerBlueprint,
118
83
  colorSchema,
119
84
  color,
120
85
  colorDefinition,
121
- complementaryColorType,
122
- complementaryColor,
123
- complementaryColorDefinition,
124
86
  };
125
87
  }
@@ -1,4 +1,4 @@
1
- import { ContainerBlueprint, ContainerVariant, IFontAwesomeIcon, VelcronColorStyling, VelcronOverflowValues } from "@omnia/fx-models";
1
+ import { ContainerFillBlueprint, ContainerFillVariant, IFontAwesomeIcon, VelcronColorStyling, VelcronOverflowValues } from "@omnia/fx-models";
2
2
  import { DynamicState } from "../DynamicState";
3
3
  import { VelcronEvent, VelcronOnActiveEvent, VelcronOnEditModeEvent, VelcronOnLoadEvent, VelcronOnPersistingStateEvent, VelcronOnSavingEvent } from "./VelcronEvents";
4
4
  import { AnimationOptionsWithOverrides, VariantDefinition, Variants } from "motion";
@@ -88,7 +88,7 @@ export interface VelcronAppDefinition<TState extends DynamicState = DynamicState
88
88
  version?: string;
89
89
  name?: string;
90
90
  lazy?: VelcronLazyApp;
91
- blueprint?: ContainerBlueprint | ContainerVariant;
91
+ blueprint?: ContainerFillBlueprint | ContainerFillVariant;
92
92
  body?: Array<VelcronDefinition>;
93
93
  events?: VelcronOnLoadEvent & VelcronOnEditModeEvent & VelcronOnSavingEvent & VelcronOnPersistingStateEvent & VelcronOnActiveEvent;
94
94
  actions?: {
@@ -24,6 +24,4 @@ export declare const activityService: () => {
24
24
  getTempFiles: (tempFilesId: TemporaryFileId, startPath: string[]) => Promise<string[]>;
25
25
  takeOwnership: (tempFilesId: TemporaryFileId, subPath: string[]) => Promise<void>;
26
26
  upload: (uniqueguid: TemporaryFileId, files: File[]) => Promise<TemporaryFileId>;
27
- } & {
28
- dispose?: () => void;
29
27
  };
@@ -12,6 +12,4 @@ export declare const activitySubscriptionService: () => {
12
12
  addFollowingSubscription: (actorToFollow: ActorId) => Promise<void>;
13
13
  isFollowingSubscription: (actorToFollow: ActorId) => Promise<boolean>;
14
14
  removeFollowingSubscription: (actorToFollow: ActorId) => Promise<SubscriptionId>;
15
- } & {
16
- dispose?: () => void;
17
15
  };
@@ -1,12 +1,15 @@
1
1
  import { SetupFactoryContext } from "../factory";
2
2
  import { http } from "../http";
3
- import { InstanceLifetimes } from "../models";
4
3
  interface SetupServiceContext extends SetupFactoryContext {
5
4
  http: typeof http;
6
5
  }
7
- export declare function defineService<TActions extends {
6
+ type ReturnServiceSetup = {
8
7
  [key: string]: Function;
9
- }, TArgs extends any[]>(setup: (ctx: SetupServiceContext) => TActions, lifeTime?: InstanceLifetimes): () => TActions & {
10
- dispose?: () => void;
11
8
  };
9
+ export declare function defineService<TReturnSetup extends ReturnServiceSetup>(setup: (ctx: SetupServiceContext) => TReturnSetup): () => TReturnSetup;
10
+ export declare function defineService<TReturnSetup extends ReturnServiceSetup, T1>(setup: (ctx: SetupServiceContext, param1: T1) => TReturnSetup): (param1: T1) => TReturnSetup;
11
+ export declare function defineService<TReturnSetup extends ReturnServiceSetup, T1, T2>(setup: (ctx: SetupServiceContext, param1: T1, param2: T2) => TReturnSetup): (param1: T1, param2: T2) => TReturnSetup;
12
+ export declare function defineService<TReturnSetup extends ReturnServiceSetup, T1, T2, T3>(setup: (ctx: SetupServiceContext, param1: T1, param2: T2, param3: T3) => TReturnSetup): (param1: T1, param2: T2, param3: T3) => TReturnSetup;
13
+ export declare function defineService<TReturnSetup extends ReturnServiceSetup, T1, T2, T3, T4>(setup: (ctx: SetupServiceContext, param1: T1, param2: T2, param3: T3, param4: T4) => TReturnSetup): (param1: T1, param2: T2, param3: T3, param4: T4) => TReturnSetup;
14
+ export declare function defineService<TReturnSetup extends ReturnServiceSetup, T1, T2, T3, T4, T5>(setup: (ctx: SetupServiceContext, param1: T1, param2: T2, param3: T3, param4: T4, param5: T5) => TReturnSetup): (param1: T1, param2: T2, param3: T3, param4: T4, param5: T5) => TReturnSetup;
12
15
  export {};
@@ -5,6 +5,4 @@ export declare const useRealtimeService: () => {
5
5
  send: <TRealtimeChannel extends RealtimeChannel, TRealtimeData extends RealtimeData<TRealtimeChannel, any>>(data: TRealtimeData, value: TRealtimeData["value"]) => void;
6
6
  getUsersInChannel: (channel: RealtimeChannel) => Future<Array<number>>;
7
7
  onMessage: <TRealtimeChannel extends RealtimeChannel, TRealtimeData extends RealtimeData<TRealtimeChannel, any>>(data: TRealtimeData, callback: (value: TRealtimeData["value"]) => void) => void;
8
- } & {
9
- dispose?: () => void;
10
8
  };
@@ -1,4 +1,4 @@
1
- import { VelcronOnUpdatedEvent, VelcronOnClosedEvent, VelcronOnCloseRequestedEvent, VelcronOnPressEvent, VelcronSpacing, VelcronStyling, VelcronCustomComponentDefinition, VelcronAppDefinition, VelcronRendererResolverReference, EventHook, Future, TextBlueprint, VelcronBindableProp, VelcronEditor, ContainerBlueprint, BackgroundDefinition, ContainerVariant, IconBlueprint, ButtonBlueprint } from "@omnia/fx-models/internal-do-not-import-from-here/shared/models";
1
+ import { VelcronOnUpdatedEvent, VelcronOnClosedEvent, VelcronOnCloseRequestedEvent, VelcronOnPressEvent, VelcronSpacing, VelcronStyling, VelcronCustomComponentDefinition, VelcronAppDefinition, VelcronRendererResolverReference, EventHook, Future, TextBlueprint, VelcronBindableProp, VelcronEditor, ContainerFillBlueprint, BackgroundDefinition, ContainerFillVariant, IconBlueprint, ButtonBlueprint } from "@omnia/fx-models/internal-do-not-import-from-here/shared/models";
2
2
  import { VelcronComponentArrayType, VelcronPrimitiveType } from "./VelcronTypes";
3
3
  import { AssignOperators, VelcronHorizontalAlignments, VelcronIconTypes, VelcronActionTypes, VelcronVerticalAlignments } from "./Enums";
4
4
  import { DynamicState, VelcronDefinition, VelcronEffects, useVelcronThemingStore } from "..";
@@ -217,7 +217,7 @@ export interface VelcronFlexRowDefinition extends VelcronDefinition, VelcronColo
217
217
  direction?: VelcronBindableProp<"row" | "row-reverse">;
218
218
  position?: VelcronBindableProp<VelcronPosition>;
219
219
  zIndex?: VelcronBindableProp<number>;
220
- blueprint?: ContainerBlueprint | ContainerVariant;
220
+ blueprint?: ContainerFillBlueprint | ContainerFillVariant;
221
221
  background?: BackgroundDefinition;
222
222
  wrap?: boolean;
223
223
  gapX?: number | string;
@@ -238,7 +238,7 @@ export interface VelcronFlexColumnDefinition extends VelcronDefinition, VelcronC
238
238
  type: "column";
239
239
  events?: VelcronOnPressEvent;
240
240
  grow?: number;
241
- blueprint?: ContainerBlueprint | ContainerVariant;
241
+ blueprint?: ContainerFillBlueprint | ContainerFillVariant;
242
242
  alignY?: VelcronVerticalAlignments;
243
243
  position?: VelcronPosition;
244
244
  absolute?: VelcronSpacing;
@@ -1,4 +1,4 @@
1
- import { BackgroundDefinition, ContainerBlueprint, ContainerVariant, TextBlueprint, TypographySize, TypographyType, VelcronSpacing } from "@omnia/fx-models/internal-do-not-import-from-here/shared/models";
1
+ import { BackgroundDefinition, ContainerFillBlueprint, ContainerFillVariant, TextBlueprint, TypographySize, TypographyType, VelcronSpacing } from "@omnia/fx-models/internal-do-not-import-from-here/shared/models";
2
2
  import { VelcronImageRatios } from "./VelcronDefinitions";
3
3
  export interface VelcronState {
4
4
  states?: {
@@ -16,7 +16,7 @@ export interface VelcronState {
16
16
  alignY?: string;
17
17
  colorSchemaType?: string;
18
18
  spacing?: VelcronSpacing;
19
- blueprint?: ContainerBlueprint | ContainerVariant;
19
+ blueprint?: ContainerFillBlueprint | ContainerFillVariant;
20
20
  background?: BackgroundDefinition;
21
21
  };
22
22
  grid?: VelcronGridState;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@omnia/fx-models",
3
3
  "license": "MIT",
4
- "version": "8.0.299-dev",
4
+ "version": "8.0.300-dev",
5
5
  "description": "Provide Omnia Fx Models Stuffs.",
6
6
  "scripts": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1"