@omnia/fx-models 8.0.265-dev → 8.0.266-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/Constants.d.ts CHANGED
@@ -19,6 +19,7 @@ export declare const Constants: {
19
19
  flow: {
20
20
  plugins: {
21
21
  text: guid;
22
+ element: guid;
22
23
  bold: guid;
23
24
  italic: guid;
24
25
  color: guid;
@@ -26,6 +27,8 @@ export declare const Constants: {
26
27
  velcron: guid;
27
28
  source: guid;
28
29
  testdata: guid;
30
+ keyboardEvents: guid;
31
+ editorEvents: guid;
29
32
  };
30
33
  };
31
34
  filterEngine: {
package/Constants.js CHANGED
@@ -24,6 +24,7 @@ exports.Constants = {
24
24
  flow: {
25
25
  plugins: {
26
26
  text: (0, models_1.guid)("a9edb1ed-9e97-4c1b-a3ec-9f66d1a97ff9"),
27
+ element: (0, models_1.guid)("32d51673-2a5a-4159-83c4-2c7960da8856"),
27
28
  bold: (0, models_1.guid)("678ed68f-db27-444a-bc06-f86f8e6c86dc"),
28
29
  italic: (0, models_1.guid)("4d6a3d2b-41c1-484a-ad4d-fe566c8be86e"),
29
30
  color: (0, models_1.guid)("5b6dd221-0d30-4405-95c3-ca637f69d8ca"),
@@ -31,6 +32,8 @@ exports.Constants = {
31
32
  velcron: (0, models_1.guid)("7c254dea-a4fc-486c-9189-618663e657a2"),
32
33
  source: (0, models_1.guid)("9a0e6adc-5102-4628-ab10-e97391a77668"),
33
34
  testdata: (0, models_1.guid)("ff9021ea-9a0f-424a-8c38-ae56849013cc"),
35
+ keyboardEvents: (0, models_1.guid)("97fd7ca7-2c64-473e-b327-5225aeabe54f"),
36
+ editorEvents: (0, models_1.guid)("6ad1cfa0-7ca1-430e-b381-f3a9a62dad51"),
34
37
  }
35
38
  },
36
39
  filterEngine: {
@@ -1,12 +1,11 @@
1
- import { PermissionInputSettings, RolePermissionSetting, guid } from "@omnia/fx-models";
2
- import { IPermissionInputApi } from "../ux";
1
+ import { PermissionInputSettings, guid } from "@omnia/fx-models";
3
2
  export interface ScopedPermissionRegistraion {
4
3
  title: string;
5
4
  permissionInputSettings: PermissionInputSettings | any;
6
5
  serviceId?: guid;
7
- onValueUpdate?: (rolePermisssionSetting: Array<RolePermissionSetting>) => Promise<void>;
8
6
  type?: TypePermission;
9
- elementToRender?: (api: IPermissionInputApi) => JSX.Element;
7
+ onSave?: () => Promise<boolean>;
8
+ elementToRender?: () => JSX.Element;
10
9
  }
11
10
  export declare enum TypePermission {
12
11
  ProfileAdmin = 0,
@@ -4,5 +4,6 @@ export interface FlowEditorPluginRegistration {
4
4
  text: string;
5
5
  altText?: string;
6
6
  hidden?: boolean;
7
+ mandatory?: boolean;
7
8
  plugin: (settings: any) => any;
8
9
  }
@@ -4,7 +4,7 @@ import { TypographyFontDefinition, TypographyValue } from "./Typography";
4
4
  export interface BoxDimensions extends Spacing {
5
5
  }
6
6
  import { TypographyBlueprint } from "./Typography";
7
- import { guid, VelcronAppDefinition, VelcronRendererReference } from "@omnia/fx-models";
7
+ import { guid, VelcronAppDefinition, VelcronRendererResolverReference } from "@omnia/fx-models";
8
8
  export interface Blueprints {
9
9
  name?: string;
10
10
  }
@@ -94,7 +94,7 @@ export interface ButtonBlueprint extends Blueprint {
94
94
  alterCase?: boolean;
95
95
  text?: TextBlueprint;
96
96
  icon?: IconBlueprint;
97
- viewTemplate?: VelcronRendererReference;
97
+ viewTemplate?: VelcronRendererResolverReference;
98
98
  }
99
99
  export interface ButtonBlueprints extends Blueprints {
100
100
  text: {
@@ -1,12 +1,17 @@
1
+ import { DynamicState } from "../DynamicState";
1
2
  import { guid } from "../Guid";
2
3
  import { Id } from "../Id";
3
4
  import { VelcronAppDefinition } from "./VelcronDefinition";
4
5
  export type VelcronRendererId = Id<guid, "VelcronRendererId">;
5
6
  export declare function VelcronRendererId(id: guid): VelcronRendererId;
7
+ export type VelcronResolverId = Id<guid, "VelcronResolverId">;
8
+ export declare function VelcronResolverId(id: guid): VelcronResolverId;
9
+ export declare const storageBasedVelcronResolverId: VelcronResolverId;
6
10
  export interface VelcronRendererResolverReference {
7
11
  id: VelcronRendererId;
8
- resolver: string;
12
+ resolver: VelcronResolverId;
9
13
  version: string;
14
+ state?: DynamicState;
10
15
  }
11
16
  export interface VelcronRendererReference {
12
17
  id: VelcronRendererId;
@@ -1,4 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.storageBasedVelcronResolverId = void 0;
3
4
  exports.VelcronRendererId = VelcronRendererId;
5
+ exports.VelcronResolverId = VelcronResolverId;
6
+ const Guid_1 = require("../Guid");
4
7
  function VelcronRendererId(id) { return id; }
8
+ function VelcronResolverId(id) { return id; }
9
+ exports.storageBasedVelcronResolverId = VelcronResolverId((0, Guid_1.guid)("11111111-1111-0000-1111-111111111111"));
@@ -27,7 +27,7 @@ export interface BuiltInComponentRenderers {
27
27
  "dialog": unknown;
28
28
  "icon": unknown;
29
29
  "chip": unknown;
30
- "markdown": unknown;
30
+ "flow": unknown;
31
31
  "slot": unknown;
32
32
  "property": unknown;
33
33
  "checkbox": unknown;
@@ -277,8 +277,8 @@ export interface VelcronIconDefinition extends VelcronDefinition, VelcronColorSt
277
277
  events?: VelcronOnPressEvent;
278
278
  blueprint?: VelcronBindableProp<IconBlueprint>;
279
279
  }
280
- export interface VelcronMarkdownDefinition extends VelcronDefinition, VelcronColorStyling, VelcronTextStyling {
281
- type: "markdown";
280
+ export interface VelcronFlowDefinition extends VelcronDefinition, VelcronColorStyling, VelcronTextStyling {
281
+ type: "flow";
282
282
  value?: VelcronBindableProp<string>;
283
283
  placeholder?: VelcronBindableProp<string>;
284
284
  events?: VelcronOnUpdatedEvent;
@@ -13,7 +13,7 @@ export interface VelcronSliderPropertyEditorSettings {
13
13
  export interface VelcronTypographyEditorSettings {
14
14
  type: "title" | "text";
15
15
  }
16
- export interface VelcronMarkdownEditorSettings {
16
+ export interface VelcronFlowEditorSettings {
17
17
  placeholder: string;
18
18
  }
19
19
  export interface VelcronSpacingEditorSettings {
@@ -78,8 +78,8 @@ export interface VelcronColorSchemaPropertyEditor extends VelcronEditor<any> {
78
78
  export interface VelcronIconPropertyEditor extends VelcronEditor<any> {
79
79
  type: "icon";
80
80
  }
81
- export interface VelcronMarkdownPropertyEditor extends VelcronEditor<VelcronMarkdownEditorSettings> {
82
- type: "markdown";
81
+ export interface VelcronFlowPropertyEditor extends VelcronEditor<VelcronFlowEditorSettings> {
82
+ type: "flow";
83
83
  }
84
84
  export interface VelcronImagePropertyEditor extends VelcronEditor<any> {
85
85
  type: "image";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@omnia/fx-models",
3
3
  "license": "MIT",
4
- "version": "8.0.265-dev",
4
+ "version": "8.0.266-dev",
5
5
  "description": "Provide Omnia Fx Models Stuffs.",
6
6
  "scripts": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -1,18 +1,32 @@
1
- import { VelcronDefinitionCategoryRegistration, VelcronDefinitionRegistration, VelcronDefinitionRendererTypeRegistration } from "@omnia/fx-models";
2
- import { ApiPath } from "../Extends";
3
- export interface IVelcronDefinitionRegistrationHandler {
4
- getAll: () => Array<VelcronDefinitionRegistration>;
5
- register: (definitions: VelcronDefinitionRegistration | VelcronDefinitionRegistration[]) => void;
1
+ import { guid, VelcronDefinitionCategoryRegistration, VelcronDefinitionRegistration, VelcronDefinitionRendererTypeRegistration, VelcronAppDefinition, DynamicState, VelcronResolverId } from "@omnia/fx-models";
2
+ import { ApiPath, IExtendApiManifestWithConfiguration } from "../Extends";
3
+ export type VelcronTemplateRegistration<TState extends DynamicState> = {
4
+ id: guid;
5
+ definition: VelcronAppDefinition<TState>;
6
+ category?: guid;
7
+ typeMappingId?: guid;
8
+ };
9
+ export interface IVelcronCategoriesRegistrationHandler {
6
10
  registerRendererType: (rendererType: VelcronDefinitionRendererTypeRegistration | VelcronDefinitionRendererTypeRegistration[]) => void;
7
11
  getAllRendererTypes: () => Array<VelcronDefinitionRendererTypeRegistration>;
8
12
  registerCategory: (category: VelcronDefinitionCategoryRegistration | VelcronDefinitionCategoryRegistration[]) => void;
9
13
  getAllCategories: () => Array<VelcronDefinitionCategoryRegistration>;
10
14
  }
15
+ export interface IVelcronDefinitionRegistrationHandler {
16
+ register(definitions: VelcronDefinitionRegistration | VelcronDefinitionRegistration[]): void;
17
+ getByResolver(resolverId: VelcronResolverId): Promise<Array<VelcronDefinitionRegistration>>;
18
+ getAll(): Promise<Array<VelcronDefinitionRegistration>>;
19
+ }
11
20
  export interface IVelcronDefinitionRegistration {
12
- registration: Promise<IVelcronDefinitionRegistrationHandler>;
21
+ registrations: Promise<IVelcronCategoriesRegistrationHandler>;
13
22
  }
14
23
  export interface IVelcronRegistrationApi {
15
- definitions: IVelcronDefinitionRegistration;
24
+ categories: {
25
+ registrations: Promise<IVelcronCategoriesRegistrationHandler>;
26
+ };
27
+ definitions: {
28
+ registrations: Promise<IVelcronDefinitionRegistrationHandler>;
29
+ };
16
30
  }
17
31
  declare module "./UxApi" {
18
32
  interface IOmniaUxApi {
@@ -20,8 +34,11 @@ declare module "./UxApi" {
20
34
  }
21
35
  interface IOmniaUxExtendApiManifest {
22
36
  velcron: {
37
+ categories: {
38
+ registrations: ApiPath;
39
+ };
23
40
  definitions: {
24
- registration: ApiPath;
41
+ registrations: IExtendApiManifestWithConfiguration<guid>;
25
42
  };
26
43
  };
27
44
  }
@@ -1,12 +1,14 @@
1
1
  import { DynamicState, guid, VelcronAppDefinition } from "..";
2
2
  export type VelcronDefitinionRegistrationsTypes = "content" | "card" | "header" | "general" | "property" | "block-header" | "social" | "spacing";
3
+ export type VelcronDefinitionRegistrationWithoutApp = Omit<VelcronDefinitionRegistration, "definition">;
3
4
  export interface VelcronDefinitionRegistration<TDefinitionState extends DynamicState = DynamicState> {
4
5
  id: guid;
5
6
  definition: VelcronAppDefinition<TDefinitionState>;
6
7
  title: string;
7
- categories?: Array<guid>;
8
- rendererTypes?: Array<guid>;
8
+ categories: Array<guid>;
9
+ rendererTypes: Array<guid>;
9
10
  builtIn?: boolean;
11
+ reference?: boolean;
10
12
  }
11
13
  export interface VelcronDefinitionRendererTypeRegistration {
12
14
  id: guid;