@omnia/velcron 8.0.88-vnext → 8.0.90-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.
Files changed (29) hide show
  1. package/index.d.ts +1 -0
  2. package/index.js +1 -0
  3. package/models/VelcronPropertyEditorDefinitions.d.ts +22 -15
  4. package/models/VelcronPropertyEditorDefinitions.js +1 -0
  5. package/package.json +1 -1
  6. package/templatebuilder/editor/VelcronColorSchemaEditor.d.ts +9 -0
  7. package/templatebuilder/editor/VelcronColorSchemaEditor.js +28 -0
  8. package/templatebuilder/editor/VelcronContentEditor.d.ts +14 -0
  9. package/templatebuilder/editor/VelcronContentEditor.js +46 -0
  10. package/templatebuilder/editor/VelcronEditorBuilder.d.ts +13 -0
  11. package/templatebuilder/editor/VelcronEditorBuilder.js +40 -0
  12. package/templatebuilder/editor/VelcronEditorBuilderBase.d.ts +9 -0
  13. package/templatebuilder/editor/VelcronEditorBuilderBase.js +16 -0
  14. package/templatebuilder/editor/VelcronImageEditor.d.ts +11 -0
  15. package/templatebuilder/editor/VelcronImageEditor.js +30 -0
  16. package/templatebuilder/index.d.ts +1 -0
  17. package/templatebuilder/index.js +4 -0
  18. package/templatebuilder/state/VelcronColorSchemaBuilder.d.ts +11 -0
  19. package/templatebuilder/state/VelcronColorSchemaBuilder.js +20 -0
  20. package/templatebuilder/state/VelcronContentStateBuilder.d.ts +17 -0
  21. package/templatebuilder/state/VelcronContentStateBuilder.js +39 -0
  22. package/templatebuilder/state/VelcronImageStateBuilder.d.ts +20 -0
  23. package/templatebuilder/state/VelcronImageStateBuilder.js +43 -0
  24. package/templatebuilder/state/VelcronStateBuilder.d.ts +12 -0
  25. package/templatebuilder/state/VelcronStateBuilder.js +34 -0
  26. package/templatebuilder/state/VelcronStateBuilderBase.d.ts +8 -0
  27. package/templatebuilder/state/VelcronStateBuilderBase.js +15 -0
  28. package/templatebuilder/useVelcronTemplateBuilder.d.ts +6 -0
  29. package/templatebuilder/useVelcronTemplateBuilder.js +13 -0
package/index.d.ts CHANGED
@@ -4,3 +4,4 @@ export * from "./actions";
4
4
  export * from "./stores";
5
5
  export * from "@omnia/velcron/internal-do-not-import-from-here/shared/models";
6
6
  export * from "./rules";
7
+ export * from "./templatebuilder";
package/index.js CHANGED
@@ -7,3 +7,4 @@ tslib_1.__exportStar(require("./actions"), exports);
7
7
  tslib_1.__exportStar(require("./stores"), exports);
8
8
  tslib_1.__exportStar(require("@omnia/velcron/internal-do-not-import-from-here/shared/models"), exports);
9
9
  tslib_1.__exportStar(require("./rules"), exports);
10
+ tslib_1.__exportStar(require("./templatebuilder"), exports);
@@ -2,6 +2,15 @@ import { VelcronImageRatios } 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?: string;
12
+ component?: unknown;
13
+ }
5
14
  export interface BuiltInPropertyEditors {
6
15
  text: unknown;
7
16
  slider: unknown;
@@ -12,17 +21,9 @@ export interface BuiltInPropertyEditors {
12
21
  icon: unknown;
13
22
  image: unknown;
14
23
  typography: unknown;
24
+ "color-schema-type": unknown;
15
25
  }
16
- export interface VelcronPropertyEditor<TSettings = any> {
17
- name?: string;
18
- category?: string;
19
- type: BuiltInPropertyEditorType | string;
20
- settings?: TSettings;
21
- stateMapping?: string;
22
- propertyMapping?: string;
23
- component?: unknown;
24
- }
25
- export type BuiltInPropertyEditorType = "text" | "slider" | "switch" | "alignment" | "color" | "markdown" | "icon" | "image" | "typography";
26
+ export type BuiltInPropertyEditorType = "text" | "slider" | "switch" | "alignment" | "color" | "markdown" | "icon" | "image" | "typography" | "color-schema-type";
26
27
  export declare enum BuiltInPropertyEditorTypes {
27
28
  text = "text",
28
29
  slider = "slider",
@@ -32,7 +33,8 @@ export declare enum BuiltInPropertyEditorTypes {
32
33
  markdown = "markdown",
33
34
  icon = "icon",
34
35
  image = "image",
35
- typography = "typography"
36
+ typography = "typography",
37
+ "color-schema-type" = "color-schema-type"
36
38
  }
37
39
  export interface VelcronSliderPropertyEditorSettings {
38
40
  min: number;
@@ -57,6 +59,9 @@ export interface VelcronAlignmentPropertyEditor extends VelcronPropertyEditor<an
57
59
  export interface VelcronColorPropertyEditor extends VelcronPropertyEditor<any> {
58
60
  type: "color";
59
61
  }
62
+ export interface VelcronColorSchemaPropertyEditor extends VelcronPropertyEditor<any> {
63
+ type: "color-schema-type";
64
+ }
60
65
  export interface VelcronIconPropertyEditor extends VelcronPropertyEditor<any> {
61
66
  type: "icon";
62
67
  }
@@ -67,10 +72,12 @@ export interface VelcronImagePropertyEditor extends VelcronPropertyEditor<any> {
67
72
  type: "image";
68
73
  }
69
74
  export interface VelcronContentState {
70
- caption: string;
71
- main: string;
75
+ content: {
76
+ caption?: string;
77
+ main?: string;
78
+ };
72
79
  }
73
80
  export interface VelcronImageState {
74
- url: string;
75
- ratio: VelcronImageRatios;
81
+ url?: string;
82
+ ratio?: VelcronImageRatios;
76
83
  }
@@ -12,4 +12,5 @@ var BuiltInPropertyEditorTypes;
12
12
  BuiltInPropertyEditorTypes["icon"] = "icon";
13
13
  BuiltInPropertyEditorTypes["image"] = "image";
14
14
  BuiltInPropertyEditorTypes["typography"] = "typography";
15
+ BuiltInPropertyEditorTypes["color-schema-type"] = "color-schema-type";
15
16
  })(BuiltInPropertyEditorTypes = exports.BuiltInPropertyEditorTypes || (exports.BuiltInPropertyEditorTypes = {}));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@omnia/velcron",
3
3
  "license": "MIT",
4
- "version": "8.0.88-vnext",
4
+ "version": "8.0.90-vnext",
5
5
  "description": "Provide Omnia Velcron Stuffs.",
6
6
  "scripts": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -0,0 +1,9 @@
1
+ import { VelcronPropertyEditor } from "@omnia/fx-models";
2
+ import { VelcronEditorBuilder } from "./VelcronEditorBuilder";
3
+ import { VelcronEditorBuilderBase } from "./VelcronEditorBuilderBase";
4
+ export declare class VelcronColorSchemaEditorBuilder extends VelcronEditorBuilderBase {
5
+ private editor;
6
+ constructor(builder: any);
7
+ add(): VelcronEditorBuilder;
8
+ protected internalBuild(): VelcronPropertyEditor<any>[];
9
+ }
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VelcronColorSchemaEditorBuilder = void 0;
4
+ const VelcronEditorBuilderBase_1 = require("./VelcronEditorBuilderBase");
5
+ class VelcronColorSchemaEditorBuilder extends VelcronEditorBuilderBase_1.VelcronEditorBuilderBase {
6
+ constructor(builder) {
7
+ super(builder);
8
+ this.editor = null;
9
+ }
10
+ add() {
11
+ if (!this.editor) {
12
+ this.editor = {
13
+ name: "Color Schema",
14
+ type: "color-schema-type",
15
+ stateMapping: "colorSchemaType"
16
+ };
17
+ }
18
+ return this.builder;
19
+ }
20
+ internalBuild() {
21
+ const result = [];
22
+ if (this.editor) {
23
+ result.push(this.editor);
24
+ }
25
+ return result;
26
+ }
27
+ }
28
+ exports.VelcronColorSchemaEditorBuilder = VelcronColorSchemaEditorBuilder;
@@ -0,0 +1,14 @@
1
+ import { VelcronPropertyEditor } from "@omnia/fx-models";
2
+ import { VelcronEditorBuilderBase } from "./VelcronEditorBuilderBase";
3
+ export declare class VelcronContentEditorBuilder extends VelcronEditorBuilderBase {
4
+ private mainEditor;
5
+ private captionEditor;
6
+ constructor(builder: any);
7
+ main: {
8
+ add: () => VelcronContentEditorBuilder;
9
+ };
10
+ caption: {
11
+ add: () => VelcronContentEditorBuilder;
12
+ };
13
+ protected internalBuild(): VelcronPropertyEditor<any>[];
14
+ }
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VelcronContentEditorBuilder = void 0;
4
+ const VelcronEditorBuilderBase_1 = require("./VelcronEditorBuilderBase");
5
+ class VelcronContentEditorBuilder extends VelcronEditorBuilderBase_1.VelcronEditorBuilderBase {
6
+ constructor(builder) {
7
+ super(builder);
8
+ this.mainEditor = null;
9
+ this.captionEditor = null;
10
+ this.main = {
11
+ add: () => {
12
+ if (!this.mainEditor) {
13
+ this.mainEditor = {
14
+ name: "Body",
15
+ type: "markdown",
16
+ stateMapping: "content.main"
17
+ };
18
+ }
19
+ return this;
20
+ }
21
+ };
22
+ this.caption = {
23
+ add: () => {
24
+ if (!this.captionEditor) {
25
+ this.captionEditor = {
26
+ name: "Caption",
27
+ type: "text",
28
+ stateMapping: "content.caption"
29
+ };
30
+ }
31
+ return this;
32
+ }
33
+ };
34
+ }
35
+ internalBuild() {
36
+ const result = [];
37
+ if (this.mainEditor) {
38
+ result.push(this.mainEditor);
39
+ }
40
+ if (this.captionEditor) {
41
+ result.push(this.captionEditor);
42
+ }
43
+ return result;
44
+ }
45
+ }
46
+ exports.VelcronContentEditorBuilder = VelcronContentEditorBuilder;
@@ -0,0 +1,13 @@
1
+ import { VelcronPropertyEditor } from "@omnia/fx-models";
2
+ import { VelcronContentEditorBuilder } from "./VelcronContentEditor";
3
+ import { VelcronColorSchemaEditorBuilder } from "./VelcronColorSchemaEditor";
4
+ import { VelcronImageEditorBuilder } from "./VelcronImageEditor";
5
+ export declare class VelcronEditorBuilder {
6
+ private contentEditorBuilder;
7
+ private colorSchemaEditorBuilder;
8
+ private imageEditorBuilder;
9
+ content(): VelcronContentEditorBuilder;
10
+ colorSchemaType(): VelcronColorSchemaEditorBuilder;
11
+ image(): VelcronImageEditorBuilder;
12
+ build(): VelcronPropertyEditor<any>[];
13
+ }
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VelcronEditorBuilder = void 0;
4
+ const VelcronContentEditor_1 = require("./VelcronContentEditor");
5
+ const VelcronColorSchemaEditor_1 = require("./VelcronColorSchemaEditor");
6
+ const VelcronImageEditor_1 = require("./VelcronImageEditor");
7
+ class VelcronEditorBuilder {
8
+ content() {
9
+ if (!this.contentEditorBuilder) {
10
+ this.contentEditorBuilder = new VelcronContentEditor_1.VelcronContentEditorBuilder(this);
11
+ }
12
+ return this.contentEditorBuilder;
13
+ }
14
+ colorSchemaType() {
15
+ if (!this.colorSchemaEditorBuilder) {
16
+ this.colorSchemaEditorBuilder = new VelcronColorSchemaEditor_1.VelcronColorSchemaEditorBuilder(this);
17
+ }
18
+ return this.colorSchemaEditorBuilder;
19
+ }
20
+ image() {
21
+ if (!this.imageEditorBuilder) {
22
+ this.imageEditorBuilder = new VelcronImageEditor_1.VelcronImageEditorBuilder(this);
23
+ }
24
+ return this.imageEditorBuilder;
25
+ }
26
+ build() {
27
+ const result = [];
28
+ if (this.colorSchemaEditorBuilder) {
29
+ result.push(...this.colorSchemaEditorBuilder.internalBuild());
30
+ }
31
+ if (this.contentEditorBuilder) {
32
+ result.push(...this.contentEditorBuilder.internalBuild());
33
+ }
34
+ if (this.imageEditorBuilder) {
35
+ result.push(...this.imageEditorBuilder.internalBuild());
36
+ }
37
+ return result;
38
+ }
39
+ }
40
+ exports.VelcronEditorBuilder = VelcronEditorBuilder;
@@ -0,0 +1,9 @@
1
+ import { VelcronPropertyEditor } from "../../models";
2
+ import { VelcronEditorBuilder } from "./VelcronEditorBuilder";
3
+ export declare abstract class VelcronEditorBuilderBase {
4
+ protected builder: VelcronEditorBuilder;
5
+ constructor(builder: VelcronEditorBuilder);
6
+ done(): VelcronEditorBuilder;
7
+ build(): VelcronPropertyEditor<any>[];
8
+ protected abstract internalBuild(): Array<VelcronPropertyEditor>;
9
+ }
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VelcronEditorBuilderBase = void 0;
4
+ class VelcronEditorBuilderBase {
5
+ constructor(builder) {
6
+ this.builder = null;
7
+ this.builder = builder;
8
+ }
9
+ done() {
10
+ return this.builder;
11
+ }
12
+ build() {
13
+ return this.builder.build();
14
+ }
15
+ }
16
+ exports.VelcronEditorBuilderBase = VelcronEditorBuilderBase;
@@ -0,0 +1,11 @@
1
+ import { VelcronPropertyEditor } from "@omnia/fx-models";
2
+ import { VelcronEditorBuilder } from "./VelcronEditorBuilder";
3
+ import { VelcronEditorBuilderBase } from "./VelcronEditorBuilderBase";
4
+ export declare class VelcronImageEditorBuilder extends VelcronEditorBuilderBase {
5
+ private mainEditor;
6
+ constructor(builder: any);
7
+ main: {
8
+ add: () => VelcronEditorBuilder;
9
+ };
10
+ protected internalBuild(): VelcronPropertyEditor<any>[];
11
+ }
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VelcronImageEditorBuilder = void 0;
4
+ const VelcronEditorBuilderBase_1 = require("./VelcronEditorBuilderBase");
5
+ class VelcronImageEditorBuilder extends VelcronEditorBuilderBase_1.VelcronEditorBuilderBase {
6
+ constructor(builder) {
7
+ super(builder);
8
+ this.mainEditor = null;
9
+ this.main = {
10
+ add: () => {
11
+ if (!this.mainEditor) {
12
+ this.mainEditor = {
13
+ name: "Select Main Image",
14
+ type: "image",
15
+ stateMapping: "main-image"
16
+ };
17
+ }
18
+ return this.builder;
19
+ }
20
+ };
21
+ }
22
+ internalBuild() {
23
+ const result = [];
24
+ if (this.mainEditor) {
25
+ result.push(this.mainEditor);
26
+ }
27
+ return result;
28
+ }
29
+ }
30
+ exports.VelcronImageEditorBuilder = VelcronImageEditorBuilder;
@@ -0,0 +1 @@
1
+ export * from "./useVelcronTemplateBuilder";
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./useVelcronTemplateBuilder"), exports);
@@ -0,0 +1,11 @@
1
+ import { ColorSchemaType } from "@omnia/fx-models";
2
+ import { VelcronStateBuilderBase } from "./VelcronStateBuilderBase";
3
+ export declare class VelcronColorSchemaStateBuilder extends VelcronStateBuilderBase {
4
+ private colorSchema;
5
+ constructor(stateBuilder: any);
6
+ add(colorSchema?: ColorSchemaType): VelcronColorSchemaStateBuilder;
7
+ bind: string;
8
+ protected internalBuild(): {
9
+ colorSchemaType: ColorSchemaType;
10
+ };
11
+ }
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VelcronColorSchemaStateBuilder = void 0;
4
+ const VelcronStateBuilderBase_1 = require("./VelcronStateBuilderBase");
5
+ class VelcronColorSchemaStateBuilder extends VelcronStateBuilderBase_1.VelcronStateBuilderBase {
6
+ constructor(stateBuilder) {
7
+ super(stateBuilder);
8
+ this.bind = "${colorSchemaType}";
9
+ }
10
+ add(colorSchema) {
11
+ this.colorSchema = colorSchema;
12
+ return this;
13
+ }
14
+ internalBuild() {
15
+ return {
16
+ colorSchemaType: this.colorSchema
17
+ };
18
+ }
19
+ }
20
+ exports.VelcronColorSchemaStateBuilder = VelcronColorSchemaStateBuilder;
@@ -0,0 +1,17 @@
1
+ import { VelcronStateBuilderBase } from "./VelcronStateBuilderBase";
2
+ export declare class VelcronContentStateBuilder extends VelcronStateBuilderBase {
3
+ private mainContent;
4
+ private captionContent;
5
+ constructor(stateBuilder: any);
6
+ main: {
7
+ add: (value?: string) => VelcronContentStateBuilder;
8
+ bind: string;
9
+ };
10
+ caption: {
11
+ add: (value?: string) => VelcronContentStateBuilder;
12
+ bind: string;
13
+ };
14
+ protected internalBuild(): {
15
+ content: {};
16
+ };
17
+ }
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VelcronContentStateBuilder = void 0;
4
+ const VelcronStateBuilderBase_1 = require("./VelcronStateBuilderBase");
5
+ class VelcronContentStateBuilder extends VelcronStateBuilderBase_1.VelcronStateBuilderBase {
6
+ constructor(stateBuilder) {
7
+ super(stateBuilder);
8
+ this.main = {
9
+ add: (value) => {
10
+ this.mainContent = value;
11
+ return this;
12
+ },
13
+ bind: "$state.content.main"
14
+ };
15
+ this.caption = {
16
+ add: (value) => {
17
+ this.captionContent = value;
18
+ return this;
19
+ },
20
+ bind: "${content.caption}"
21
+ };
22
+ }
23
+ internalBuild() {
24
+ const resultValue = {};
25
+ let hasContent = false;
26
+ if (this.mainContent) {
27
+ resultValue["main"] = this.mainContent;
28
+ hasContent = true;
29
+ }
30
+ if (this.captionContent) {
31
+ resultValue["caption"] = this.captionContent;
32
+ hasContent = true;
33
+ }
34
+ return {
35
+ content: resultValue
36
+ };
37
+ }
38
+ }
39
+ exports.VelcronContentStateBuilder = VelcronContentStateBuilder;
@@ -0,0 +1,20 @@
1
+ import { VelcronImageRatios } from "../../models";
2
+ import { VelcronStateBuilderBase } from "./VelcronStateBuilderBase";
3
+ export declare class VelcronImageStateBuilder extends VelcronStateBuilderBase {
4
+ private mainImageUrl;
5
+ private mainImageRatio;
6
+ constructor(stateBuilder: any);
7
+ main: {
8
+ url: {
9
+ add: (url: string) => VelcronImageStateBuilder;
10
+ bind: string;
11
+ };
12
+ ratio: {
13
+ add: (ratio: VelcronImageRatios) => VelcronImageStateBuilder;
14
+ bind: string;
15
+ };
16
+ };
17
+ protected internalBuild(): {
18
+ "main-image": {};
19
+ };
20
+ }
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VelcronImageStateBuilder = void 0;
4
+ const VelcronStateBuilderBase_1 = require("./VelcronStateBuilderBase");
5
+ class VelcronImageStateBuilder extends VelcronStateBuilderBase_1.VelcronStateBuilderBase {
6
+ constructor(stateBuilder) {
7
+ super(stateBuilder);
8
+ this.main = {
9
+ url: {
10
+ add: (url) => {
11
+ this.mainImageUrl = url;
12
+ return this;
13
+ },
14
+ bind: "${main-image.url}"
15
+ },
16
+ ratio: {
17
+ add: (ratio) => {
18
+ this.mainImageRatio = ratio;
19
+ return this;
20
+ },
21
+ bind: "${main-image.ratio}"
22
+ }
23
+ };
24
+ }
25
+ internalBuild() {
26
+ if (!this.mainImageUrl) {
27
+ return null;
28
+ }
29
+ const resultValue = {};
30
+ if (this.mainImageRatio) {
31
+ resultValue["ratio"] = this.mainImageRatio;
32
+ }
33
+ if (this.mainImageUrl) {
34
+ resultValue["url"] = this.mainImageUrl;
35
+ }
36
+ return {
37
+ "main-image": {
38
+ ...resultValue
39
+ }
40
+ };
41
+ }
42
+ }
43
+ exports.VelcronImageStateBuilder = VelcronImageStateBuilder;
@@ -0,0 +1,12 @@
1
+ import { VelcronColorSchemaStateBuilder } from "./VelcronColorSchemaBuilder";
2
+ import { VelcronContentStateBuilder } from "./VelcronContentStateBuilder";
3
+ import { VelcronImageStateBuilder } from "./VelcronImageStateBuilder";
4
+ export declare class VelcronStateBuilder {
5
+ private contentStateBuilder;
6
+ private imageStateBuilder;
7
+ private colorSchemaStateBuilder;
8
+ content(): VelcronContentStateBuilder;
9
+ image(): VelcronImageStateBuilder;
10
+ colorSchemaType(): VelcronColorSchemaStateBuilder;
11
+ build(): any;
12
+ }
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VelcronStateBuilder = void 0;
4
+ const VelcronColorSchemaBuilder_1 = require("./VelcronColorSchemaBuilder");
5
+ const VelcronContentStateBuilder_1 = require("./VelcronContentStateBuilder");
6
+ const VelcronImageStateBuilder_1 = require("./VelcronImageStateBuilder");
7
+ class VelcronStateBuilder {
8
+ content() {
9
+ if (!this.contentStateBuilder) {
10
+ this.contentStateBuilder = new VelcronContentStateBuilder_1.VelcronContentStateBuilder(this);
11
+ }
12
+ return this.contentStateBuilder;
13
+ }
14
+ image() {
15
+ if (!this.imageStateBuilder) {
16
+ this.imageStateBuilder = new VelcronImageStateBuilder_1.VelcronImageStateBuilder(this);
17
+ }
18
+ return this.imageStateBuilder;
19
+ }
20
+ colorSchemaType() {
21
+ if (!this.colorSchemaStateBuilder) {
22
+ this.colorSchemaStateBuilder = new VelcronColorSchemaBuilder_1.VelcronColorSchemaStateBuilder(this);
23
+ }
24
+ return this.colorSchemaStateBuilder;
25
+ }
26
+ build() {
27
+ return {
28
+ ...this?.contentStateBuilder?.internalBuild(),
29
+ ...this?.imageStateBuilder?.internalBuild(),
30
+ ...this?.colorSchemaStateBuilder?.internalBuild(),
31
+ };
32
+ }
33
+ }
34
+ exports.VelcronStateBuilder = VelcronStateBuilder;
@@ -0,0 +1,8 @@
1
+ import { VelcronStateBuilder } from "./VelcronStateBuilder";
2
+ export declare abstract class VelcronStateBuilderBase {
3
+ protected stateBuilder: VelcronStateBuilder;
4
+ constructor(stateBulder: VelcronStateBuilder);
5
+ done(): VelcronStateBuilder;
6
+ build(): any;
7
+ protected abstract internalBuild(): any;
8
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VelcronStateBuilderBase = void 0;
4
+ class VelcronStateBuilderBase {
5
+ constructor(stateBulder) {
6
+ this.stateBuilder = stateBulder;
7
+ }
8
+ done() {
9
+ return this.stateBuilder;
10
+ }
11
+ build() {
12
+ return this.stateBuilder.build();
13
+ }
14
+ }
15
+ exports.VelcronStateBuilderBase = VelcronStateBuilderBase;
@@ -0,0 +1,6 @@
1
+ import { VelcronEditorBuilder } from "./editor/VelcronEditorBuilder";
2
+ import { VelcronStateBuilder } from "./state/VelcronStateBuilder";
3
+ export declare function useVelcronTemplateBuilder(): {
4
+ state: VelcronStateBuilder;
5
+ editor: VelcronEditorBuilder;
6
+ };
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ // import { VelcronContentState, VelcronImagePropertyEditor, VelcronImageRatios, VelcronImageState, VelcronMarkdownPropertyEditor, VelcronTextPropertyEditor} from "@omnia/fx-models";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.useVelcronTemplateBuilder = void 0;
5
+ const VelcronEditorBuilder_1 = require("./editor/VelcronEditorBuilder");
6
+ const VelcronStateBuilder_1 = require("./state/VelcronStateBuilder");
7
+ function useVelcronTemplateBuilder() {
8
+ return {
9
+ state: new VelcronStateBuilder_1.VelcronStateBuilder(),
10
+ editor: new VelcronEditorBuilder_1.VelcronEditorBuilder()
11
+ };
12
+ }
13
+ exports.useVelcronTemplateBuilder = useVelcronTemplateBuilder;