@omnia/velcron 8.0.162-dev → 8.0.163-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/internal-do-not-import-from-here/shared/models/velcron/VelcronDefinition.d.ts +3 -2
- package/models/VelcronDefinitions.d.ts +4 -4
- package/models/VelcronPropertyEditorDefinitions.d.ts +16 -212
- package/models/VelcronPropertyEditorDefinitions.js +0 -87
- package/models/VelcronState.d.ts +201 -0
- package/models/VelcronState.js +91 -0
- package/models/index.d.ts +1 -0
- package/models/index.js +1 -0
- package/package.json +1 -1
- package/parser/VelcronData.d.ts +6 -6
- package/parser/VelcronData.js +16 -13
- package/rules/IsEditMode.js +1 -1
- package/templatebuilder/{editor/VelcronEditorBuilder2.d.ts → VelcronEditorBuilder.d.ts} +10 -10
- package/templatebuilder/{editor/VelcronEditorBuilder2.js → VelcronEditorBuilder.js} +3 -3
- package/templatebuilder/{editor → old/editor}/VelcronColorSchemaEditor.d.ts +2 -2
- package/templatebuilder/{editor → old/editor}/VelcronContentEditor.d.ts +2 -2
- package/templatebuilder/{editor → old/editor}/VelcronEditorBuilder.d.ts +2 -2
- package/templatebuilder/{editor → old/editor}/VelcronEditorBuilderBase.d.ts +3 -3
- package/templatebuilder/{editor → old/editor}/VelcronImageEditor.d.ts +2 -2
- package/templatebuilder/{editor → old/editor}/VelcronPropertyMappingEditorBuilder.d.ts +2 -2
- package/templatebuilder/useVelcronEditorBuilder.d.ts +2 -2
- package/templatebuilder/useVelcronEditorBuilder.js +2 -2
- package/templatebuilder/useVelcronTemplateBuilder.d.ts +3 -3
- package/templatebuilder/useVelcronTemplateBuilder.js +5 -5
- /package/templatebuilder/{editor → old/editor}/VelcronColorSchemaEditor.js +0 -0
- /package/templatebuilder/{editor → old/editor}/VelcronContentEditor.js +0 -0
- /package/templatebuilder/{editor → old/editor}/VelcronEditorBuilder.js +0 -0
- /package/templatebuilder/{editor → old/editor}/VelcronEditorBuilderBase.js +0 -0
- /package/templatebuilder/{editor → old/editor}/VelcronImageEditor.js +0 -0
- /package/templatebuilder/{editor → old/editor}/VelcronPropertyMappingEditorBuilder.js +0 -0
- /package/templatebuilder/{state → old/state}/VelcronBlockHeaderStateBuilder.d.ts +0 -0
- /package/templatebuilder/{state → old/state}/VelcronBlockHeaderStateBuilder.js +0 -0
- /package/templatebuilder/{state → old/state}/VelcronColorSchemaBuilder.d.ts +0 -0
- /package/templatebuilder/{state → old/state}/VelcronColorSchemaBuilder.js +0 -0
- /package/templatebuilder/{state → old/state}/VelcronContentStateBuilder.d.ts +0 -0
- /package/templatebuilder/{state → old/state}/VelcronContentStateBuilder.js +0 -0
- /package/templatebuilder/{state → old/state}/VelcronImageStateBuilder.d.ts +0 -0
- /package/templatebuilder/{state → old/state}/VelcronImageStateBuilder.js +0 -0
- /package/templatebuilder/{state → old/state}/VelcronPropertyMappingStateBuilder.d.ts +0 -0
- /package/templatebuilder/{state → old/state}/VelcronPropertyMappingStateBuilder.js +0 -0
- /package/templatebuilder/{state → old/state}/VelcronStateBuilder.d.ts +0 -0
- /package/templatebuilder/{state → old/state}/VelcronStateBuilder.js +0 -0
- /package/templatebuilder/{state → old/state}/VelcronStateBuilderBase.d.ts +0 -0
- /package/templatebuilder/{state → old/state}/VelcronStateBuilderBase.js +0 -0
- /package/templatebuilder/{state → old/state}/VelcronTextContentBuilder.d.ts +0 -0
- /package/templatebuilder/{state → old/state}/VelcronTextContentBuilder.js +0 -0
|
@@ -61,10 +61,11 @@ export interface VelcronComponentDefinition extends VelcronDefinition {
|
|
|
61
61
|
}
|
|
62
62
|
export type VelcronCustomComponentDefinition = VelcronComponentDefinition;
|
|
63
63
|
export type BuiltInPropertyEditorType = "text" | "slider" | "switch" | "alignment" | "color" | "markdown" | "icon" | "image" | "typography" | "spacing" | "color-schema-type" | "container" | "reference";
|
|
64
|
-
export interface
|
|
64
|
+
export interface VelcronEditor<TSettings = any> {
|
|
65
65
|
name?: string;
|
|
66
66
|
icon?: IFontAwesomeIcon;
|
|
67
67
|
category?: string;
|
|
68
|
+
locations?: ("inline" | "pane" | "menu")[];
|
|
68
69
|
type: BuiltInPropertyEditorType | string;
|
|
69
70
|
settings?: TSettings;
|
|
70
71
|
stateMapping?: string;
|
|
@@ -82,7 +83,7 @@ export interface VelcronAppDefinition<TState extends DynamicState = DynamicState
|
|
|
82
83
|
[name: string]: Array<string>;
|
|
83
84
|
};
|
|
84
85
|
components?: Array<VelcronCustomComponentDefinition>;
|
|
85
|
-
editors?: Array<
|
|
86
|
+
editors?: Array<VelcronEditor>;
|
|
86
87
|
state?: TState;
|
|
87
88
|
computed?: {
|
|
88
89
|
[name: string]: Array<string>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { VelcronOnUpdatedEvent, VelcronOnClosedEvent, VelcronOnCloseRequestedEvent, VelcronOnPressEvent, VelcronSpacing, VelcronStyling, VelcronCustomComponentDefinition, VelcronAppDefinition, VelcronRendererResolverReference, EventHook, Future, TextBlueprint, VelcronBindableProp, ContainerBlueprint, BackgroundDefinition,
|
|
1
|
+
import { VelcronOnUpdatedEvent, VelcronOnClosedEvent, VelcronOnCloseRequestedEvent, VelcronOnPressEvent, VelcronSpacing, VelcronStyling, VelcronCustomComponentDefinition, VelcronAppDefinition, VelcronRendererResolverReference, EventHook, Future, TextBlueprint, VelcronBindableProp, ContainerBlueprint, BackgroundDefinition, VelcronEditor } from "@omnia/velcron/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, useVelcronThemingStore } from "..";
|
|
@@ -295,9 +295,9 @@ export interface VelcronSlidePanelDefinition extends VelcronDefinition {
|
|
|
295
295
|
style?: VelcronCardStyling;
|
|
296
296
|
events?: VelcronOnPressEvent;
|
|
297
297
|
}
|
|
298
|
-
export interface
|
|
298
|
+
export interface VelcronEditorRendererDefinition extends VelcronDefinition {
|
|
299
299
|
type: "editor";
|
|
300
|
-
editor:
|
|
300
|
+
editor: VelcronEditor;
|
|
301
301
|
value: VelcronBindableProp<string>;
|
|
302
302
|
events?: VelcronOnUpdatedEvent;
|
|
303
303
|
}
|
|
@@ -326,7 +326,7 @@ export interface VelcronSlotDefinition extends VelcronDefinition {
|
|
|
326
326
|
}
|
|
327
327
|
export interface VelcronReferenceDefinition extends VelcronDefinition {
|
|
328
328
|
type: "reference";
|
|
329
|
-
to: VelcronRendererResolverReference
|
|
329
|
+
to: VelcronBindableProp<VelcronRendererResolverReference>;
|
|
330
330
|
state: string;
|
|
331
331
|
}
|
|
332
332
|
export interface VelcronPropertyDefinition extends VelcronDefinitionWithEditMode {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { BuiltInPropertyEditorType,
|
|
2
|
-
import { VelcronImageRatios } from "./VelcronDefinitions";
|
|
1
|
+
import { BuiltInPropertyEditorType, TypographyType, VelcronEditor } from "@omnia/velcron/internal-do-not-import-from-here/shared/models";
|
|
3
2
|
export interface ResolvedPropertyEditor {
|
|
4
|
-
editor:
|
|
3
|
+
editor: VelcronEditor;
|
|
5
4
|
}
|
|
6
5
|
export type BuiltInPropertyEditorMap = {
|
|
7
6
|
[key in BuiltInPropertyEditorType]: unknown;
|
|
@@ -24,240 +23,45 @@ export interface VelcronTextEditorSettings {
|
|
|
24
23
|
type: TypographyType;
|
|
25
24
|
placeholder: string;
|
|
26
25
|
}
|
|
27
|
-
export interface VelcronSliderPropertyEditor extends
|
|
26
|
+
export interface VelcronSliderPropertyEditor extends VelcronEditor<VelcronSliderPropertyEditorSettings> {
|
|
28
27
|
type: "slider";
|
|
29
28
|
}
|
|
30
|
-
export interface VelcronTextPropertyEditor extends
|
|
29
|
+
export interface VelcronTextPropertyEditor extends VelcronEditor<VelcronTextEditorSettings> {
|
|
31
30
|
type: "text";
|
|
32
31
|
}
|
|
33
|
-
export interface VelcronEnterprisePropertyEditor extends
|
|
32
|
+
export interface VelcronEnterprisePropertyEditor extends VelcronEditor<any> {
|
|
34
33
|
type: "enterprise-property";
|
|
35
34
|
}
|
|
36
|
-
export interface VelcronTypographyPropertyEditor extends
|
|
35
|
+
export interface VelcronTypographyPropertyEditor extends VelcronEditor<VelcronTypographyEditorSettings> {
|
|
37
36
|
type: "typography";
|
|
38
37
|
}
|
|
39
|
-
export interface VelcronContainerPropertyEditor extends
|
|
38
|
+
export interface VelcronContainerPropertyEditor extends VelcronEditor<any> {
|
|
40
39
|
type: "container";
|
|
41
40
|
}
|
|
42
|
-
export interface VelcronSwitchPropertyEditor extends
|
|
41
|
+
export interface VelcronSwitchPropertyEditor extends VelcronEditor<any> {
|
|
43
42
|
type: "switch";
|
|
44
43
|
}
|
|
45
|
-
export interface VelcronAlignmentPropertyEditor extends
|
|
44
|
+
export interface VelcronAlignmentPropertyEditor extends VelcronEditor<any> {
|
|
46
45
|
type: "alignment";
|
|
47
46
|
}
|
|
48
|
-
export interface VelcronColorPropertyEditor extends
|
|
47
|
+
export interface VelcronColorPropertyEditor extends VelcronEditor<any> {
|
|
49
48
|
type: "color";
|
|
50
49
|
}
|
|
51
|
-
export interface VelcronColorSchemaPropertyEditor extends
|
|
50
|
+
export interface VelcronColorSchemaPropertyEditor extends VelcronEditor<any> {
|
|
52
51
|
type: "color-schema-type";
|
|
53
52
|
}
|
|
54
|
-
export interface VelcronIconPropertyEditor extends
|
|
53
|
+
export interface VelcronIconPropertyEditor extends VelcronEditor<any> {
|
|
55
54
|
type: "icon";
|
|
56
55
|
}
|
|
57
|
-
export interface VelcronMarkdownPropertyEditor extends
|
|
56
|
+
export interface VelcronMarkdownPropertyEditor extends VelcronEditor<VelcronMarkdownEditorSettings> {
|
|
58
57
|
type: "markdown";
|
|
59
58
|
}
|
|
60
|
-
export interface VelcronImagePropertyEditor extends
|
|
59
|
+
export interface VelcronImagePropertyEditor extends VelcronEditor<any> {
|
|
61
60
|
type: "image";
|
|
62
61
|
}
|
|
63
|
-
export interface VelcronSpacingPropertyEditor extends
|
|
62
|
+
export interface VelcronSpacingPropertyEditor extends VelcronEditor<VelcronSpacingEditorSettings> {
|
|
64
63
|
type: "spacing";
|
|
65
64
|
}
|
|
66
|
-
export interface VelcronReferencePropertyEditor extends
|
|
65
|
+
export interface VelcronReferencePropertyEditor extends VelcronEditor<any> {
|
|
67
66
|
type: "reference";
|
|
68
67
|
}
|
|
69
|
-
export interface VelcronState {
|
|
70
|
-
images?: VelcronImagesState;
|
|
71
|
-
styling?: VelcronStylingState;
|
|
72
|
-
colorSchemas?: VelcronColorSchemasState;
|
|
73
|
-
content?: VelcronContentState;
|
|
74
|
-
header?: VelcronHeaderState;
|
|
75
|
-
properties?: VelcronPropertiesState;
|
|
76
|
-
spacing?: VelcronSpacingState;
|
|
77
|
-
}
|
|
78
|
-
export interface VelcronSpacingState {
|
|
79
|
-
chrome?: VelcronSpacing;
|
|
80
|
-
}
|
|
81
|
-
export interface VelcronHeaderState {
|
|
82
|
-
title?: VelcronTextState;
|
|
83
|
-
icon?: string;
|
|
84
|
-
}
|
|
85
|
-
export interface VelcronTextState {
|
|
86
|
-
text?: string;
|
|
87
|
-
placeholder?: string;
|
|
88
|
-
typography?: VelcronTypographyState;
|
|
89
|
-
}
|
|
90
|
-
export interface VelcronTypographyState {
|
|
91
|
-
type?: TypographyType;
|
|
92
|
-
size?: TypographySize;
|
|
93
|
-
toned?: boolean;
|
|
94
|
-
}
|
|
95
|
-
export interface VelcronContentState {
|
|
96
|
-
caption?: VelcronTextState;
|
|
97
|
-
main?: VelcronTextState;
|
|
98
|
-
title?: VelcronTextState;
|
|
99
|
-
summary?: VelcronTextState;
|
|
100
|
-
}
|
|
101
|
-
export interface VelcronPropertiesState {
|
|
102
|
-
user: any;
|
|
103
|
-
mappings: Array<any>;
|
|
104
|
-
}
|
|
105
|
-
export interface VelcronImagesState {
|
|
106
|
-
main?: VelcronImageState;
|
|
107
|
-
alt1?: VelcronImageState;
|
|
108
|
-
alt2?: VelcronImageState;
|
|
109
|
-
}
|
|
110
|
-
export interface VelcronImageState {
|
|
111
|
-
url?: string;
|
|
112
|
-
ratio?: VelcronImageRatios;
|
|
113
|
-
caption?: VelcronTextState;
|
|
114
|
-
width?: number;
|
|
115
|
-
height?: number;
|
|
116
|
-
}
|
|
117
|
-
export interface VelcronStylingState {
|
|
118
|
-
}
|
|
119
|
-
export interface VelcronColorSchemasState {
|
|
120
|
-
main: string;
|
|
121
|
-
}
|
|
122
|
-
export declare const VelcronImagesStateBinding: {
|
|
123
|
-
main: {
|
|
124
|
-
editor: string;
|
|
125
|
-
url: string;
|
|
126
|
-
ratio: string;
|
|
127
|
-
caption: string;
|
|
128
|
-
width: string;
|
|
129
|
-
height: string;
|
|
130
|
-
};
|
|
131
|
-
alt1: {
|
|
132
|
-
editor: string;
|
|
133
|
-
url: string;
|
|
134
|
-
ratio: string;
|
|
135
|
-
caption: string;
|
|
136
|
-
width: string;
|
|
137
|
-
height: string;
|
|
138
|
-
};
|
|
139
|
-
alt2: {
|
|
140
|
-
editor: string;
|
|
141
|
-
url: string;
|
|
142
|
-
ratio: string;
|
|
143
|
-
caption: string;
|
|
144
|
-
width: string;
|
|
145
|
-
height: string;
|
|
146
|
-
};
|
|
147
|
-
};
|
|
148
|
-
export declare const VelcronHeaderStateBinding: {
|
|
149
|
-
title: {
|
|
150
|
-
text: string;
|
|
151
|
-
placeholder: string;
|
|
152
|
-
blueprint: import("@omnia/velcron/internal-do-not-import-from-here/shared/models").VelcronBindableProp<TextBlueprint>;
|
|
153
|
-
};
|
|
154
|
-
icon: string;
|
|
155
|
-
};
|
|
156
|
-
export declare const VelcronContentStateBinding: {
|
|
157
|
-
title: {
|
|
158
|
-
text: string;
|
|
159
|
-
placeholder: string;
|
|
160
|
-
blueprint: import("@omnia/velcron/internal-do-not-import-from-here/shared/models").VelcronBindableProp<TextBlueprint>;
|
|
161
|
-
};
|
|
162
|
-
main: {
|
|
163
|
-
text: string;
|
|
164
|
-
placeholder: string;
|
|
165
|
-
blueprint: import("@omnia/velcron/internal-do-not-import-from-here/shared/models").VelcronBindableProp<TextBlueprint>;
|
|
166
|
-
};
|
|
167
|
-
caption: {
|
|
168
|
-
text: string;
|
|
169
|
-
placeholder: string;
|
|
170
|
-
blueprint: import("@omnia/velcron/internal-do-not-import-from-here/shared/models").VelcronBindableProp<TextBlueprint>;
|
|
171
|
-
};
|
|
172
|
-
summary: {
|
|
173
|
-
text: string;
|
|
174
|
-
placeholder: string;
|
|
175
|
-
blueprint: import("@omnia/velcron/internal-do-not-import-from-here/shared/models").VelcronBindableProp<TextBlueprint>;
|
|
176
|
-
};
|
|
177
|
-
};
|
|
178
|
-
export declare const VelcronColorSchemasStateBinding: {
|
|
179
|
-
main: {
|
|
180
|
-
type: string;
|
|
181
|
-
filled: string;
|
|
182
|
-
};
|
|
183
|
-
};
|
|
184
|
-
export declare const VelcronSpacingStateBinding: {
|
|
185
|
-
chrome: {
|
|
186
|
-
top: string;
|
|
187
|
-
right: string;
|
|
188
|
-
bottom: string;
|
|
189
|
-
left: string;
|
|
190
|
-
};
|
|
191
|
-
};
|
|
192
|
-
export declare const VelcronStateBinding: {
|
|
193
|
-
colorSchemas: {
|
|
194
|
-
main: {
|
|
195
|
-
type: string;
|
|
196
|
-
filled: string;
|
|
197
|
-
};
|
|
198
|
-
};
|
|
199
|
-
images: {
|
|
200
|
-
main: {
|
|
201
|
-
editor: string;
|
|
202
|
-
url: string;
|
|
203
|
-
ratio: string;
|
|
204
|
-
caption: string;
|
|
205
|
-
width: string;
|
|
206
|
-
height: string;
|
|
207
|
-
};
|
|
208
|
-
alt1: {
|
|
209
|
-
editor: string;
|
|
210
|
-
url: string;
|
|
211
|
-
ratio: string;
|
|
212
|
-
caption: string;
|
|
213
|
-
width: string;
|
|
214
|
-
height: string;
|
|
215
|
-
};
|
|
216
|
-
alt2: {
|
|
217
|
-
editor: string;
|
|
218
|
-
url: string;
|
|
219
|
-
ratio: string;
|
|
220
|
-
caption: string;
|
|
221
|
-
width: string;
|
|
222
|
-
height: string;
|
|
223
|
-
};
|
|
224
|
-
};
|
|
225
|
-
content: {
|
|
226
|
-
title: {
|
|
227
|
-
text: string;
|
|
228
|
-
placeholder: string;
|
|
229
|
-
blueprint: import("@omnia/velcron/internal-do-not-import-from-here/shared/models").VelcronBindableProp<TextBlueprint>;
|
|
230
|
-
};
|
|
231
|
-
main: {
|
|
232
|
-
text: string;
|
|
233
|
-
placeholder: string;
|
|
234
|
-
blueprint: import("@omnia/velcron/internal-do-not-import-from-here/shared/models").VelcronBindableProp<TextBlueprint>;
|
|
235
|
-
};
|
|
236
|
-
caption: {
|
|
237
|
-
text: string;
|
|
238
|
-
placeholder: string;
|
|
239
|
-
blueprint: import("@omnia/velcron/internal-do-not-import-from-here/shared/models").VelcronBindableProp<TextBlueprint>;
|
|
240
|
-
};
|
|
241
|
-
summary: {
|
|
242
|
-
text: string;
|
|
243
|
-
placeholder: string;
|
|
244
|
-
blueprint: import("@omnia/velcron/internal-do-not-import-from-here/shared/models").VelcronBindableProp<TextBlueprint>;
|
|
245
|
-
};
|
|
246
|
-
};
|
|
247
|
-
header: {
|
|
248
|
-
title: {
|
|
249
|
-
text: string;
|
|
250
|
-
placeholder: string;
|
|
251
|
-
blueprint: import("@omnia/velcron/internal-do-not-import-from-here/shared/models").VelcronBindableProp<TextBlueprint>;
|
|
252
|
-
};
|
|
253
|
-
icon: string;
|
|
254
|
-
};
|
|
255
|
-
spacing: {
|
|
256
|
-
chrome: {
|
|
257
|
-
top: string;
|
|
258
|
-
right: string;
|
|
259
|
-
bottom: string;
|
|
260
|
-
left: string;
|
|
261
|
-
};
|
|
262
|
-
};
|
|
263
|
-
};
|
|
@@ -1,89 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.VelcronStateBinding = exports.VelcronSpacingStateBinding = exports.VelcronColorSchemasStateBinding = exports.VelcronContentStateBinding = exports.VelcronHeaderStateBinding = exports.VelcronImagesStateBinding = void 0;
|
|
4
|
-
const models_1 = require("@omnia/velcron/internal-do-not-import-from-here/shared/models");
|
|
5
|
-
exports.VelcronImagesStateBinding = {
|
|
6
|
-
main: {
|
|
7
|
-
editor: "{{images.main.url}}",
|
|
8
|
-
url: "{{images.main.url}}",
|
|
9
|
-
ratio: "{{images.main.ratio}}",
|
|
10
|
-
caption: "{{images.main.caption}}",
|
|
11
|
-
width: "{{images.main.width}}",
|
|
12
|
-
height: "{{images.main.height}}",
|
|
13
|
-
},
|
|
14
|
-
alt1: {
|
|
15
|
-
editor: "{{images.alt1.url}}",
|
|
16
|
-
url: "{{images.alt1.url}}",
|
|
17
|
-
ratio: "{{images.alt1.ratio}}",
|
|
18
|
-
caption: "{{images.alt1.caption}}",
|
|
19
|
-
width: "{{images.alt1.width}}",
|
|
20
|
-
height: "{{images.alt1.height}}",
|
|
21
|
-
},
|
|
22
|
-
alt2: {
|
|
23
|
-
editor: "{{images.alt2.url}}",
|
|
24
|
-
url: "{{images.alt2.url}}",
|
|
25
|
-
ratio: "{{images.alt2.ratio}}",
|
|
26
|
-
caption: "{{images.alt2.caption}}",
|
|
27
|
-
width: "{{images.alt2.width}}",
|
|
28
|
-
height: "{{images.alt2.height}}",
|
|
29
|
-
},
|
|
30
|
-
};
|
|
31
|
-
exports.VelcronHeaderStateBinding = {
|
|
32
|
-
title: {
|
|
33
|
-
text: (0, models_1.velcronBind)("header.title.text"),
|
|
34
|
-
placeholder: (0, models_1.velcronBind)("header.title.placeholder"),
|
|
35
|
-
blueprint: (0, models_1.velcronBind)("content.title.blueprint")
|
|
36
|
-
},
|
|
37
|
-
icon: (0, models_1.velcronBind)("header.icon")
|
|
38
|
-
};
|
|
39
|
-
exports.VelcronContentStateBinding = {
|
|
40
|
-
title: {
|
|
41
|
-
text: (0, models_1.velcronBind)("content.title.text"),
|
|
42
|
-
placeholder: (0, models_1.velcronBind)("content.title.placeholder"),
|
|
43
|
-
blueprint: (0, models_1.velcronBind)("content.title.blueprint")
|
|
44
|
-
},
|
|
45
|
-
main: {
|
|
46
|
-
text: (0, models_1.velcronBind)("content.main.text"),
|
|
47
|
-
placeholder: (0, models_1.velcronBind)("content.main.placeholder"),
|
|
48
|
-
blueprint: (0, models_1.velcronBind)("content.main.blueprint")
|
|
49
|
-
},
|
|
50
|
-
caption: {
|
|
51
|
-
text: (0, models_1.velcronBind)("content.caption.text"),
|
|
52
|
-
placeholder: (0, models_1.velcronBind)("content.caption.placeholder"),
|
|
53
|
-
blueprint: (0, models_1.velcronBind)("content.caption.blueprint")
|
|
54
|
-
},
|
|
55
|
-
summary: {
|
|
56
|
-
text: (0, models_1.velcronBind)("content.summary.text"),
|
|
57
|
-
placeholder: (0, models_1.velcronBind)("content.summary.placeholder"),
|
|
58
|
-
blueprint: (0, models_1.velcronBind)("content.summary.blueprint")
|
|
59
|
-
},
|
|
60
|
-
};
|
|
61
|
-
exports.VelcronColorSchemasStateBinding = {
|
|
62
|
-
main: {
|
|
63
|
-
type: (0, models_1.velcronBind)("colorSchemas.main.type"),
|
|
64
|
-
filled: (0, models_1.velcronBind)("colorSchemas.main.filled")
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
exports.VelcronSpacingStateBinding = {
|
|
68
|
-
chrome: {
|
|
69
|
-
"top": "{{spacing.chrome.top}}",
|
|
70
|
-
"right": "{{spacing.chrome.right}}",
|
|
71
|
-
"bottom": "{{spacing.chrome.bottom}}",
|
|
72
|
-
"left": "{{spacing.chrome.left}}",
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
// export interface VelcronSpacingState {
|
|
76
|
-
// chrome?: VelcronDimensionState
|
|
77
|
-
// }
|
|
78
|
-
// export interface VelcronDimensionState {
|
|
79
|
-
// margin?: VelcronSpacing;
|
|
80
|
-
// padding?: VelcronSpacing;
|
|
81
|
-
// }
|
|
82
|
-
exports.VelcronStateBinding = {
|
|
83
|
-
colorSchemas: exports.VelcronColorSchemasStateBinding,
|
|
84
|
-
images: exports.VelcronImagesStateBinding,
|
|
85
|
-
content: exports.VelcronContentStateBinding,
|
|
86
|
-
header: exports.VelcronHeaderStateBinding,
|
|
87
|
-
spacing: exports.VelcronSpacingStateBinding
|
|
88
|
-
//properties?:VelcronPropertiesState,
|
|
89
|
-
};
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import { TextBlueprint, TypographySize, TypographyType, VelcronSpacing } from "@omnia/velcron/internal-do-not-import-from-here/shared/models";
|
|
2
|
+
import { VelcronImageRatios } from "./VelcronDefinitions";
|
|
3
|
+
export interface VelcronState {
|
|
4
|
+
images?: VelcronImagesState;
|
|
5
|
+
styling?: VelcronStylingState;
|
|
6
|
+
colorSchemas?: VelcronColorSchemasState;
|
|
7
|
+
content?: VelcronContentState;
|
|
8
|
+
header?: VelcronHeaderState;
|
|
9
|
+
properties?: VelcronPropertiesState;
|
|
10
|
+
spacing?: VelcronSpacingState;
|
|
11
|
+
}
|
|
12
|
+
export interface VelcronSpacingState {
|
|
13
|
+
container?: VelcronSpacing;
|
|
14
|
+
}
|
|
15
|
+
export interface VelcronHeaderState {
|
|
16
|
+
title?: VelcronTextState;
|
|
17
|
+
icon?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface VelcronTextState {
|
|
20
|
+
text?: string;
|
|
21
|
+
placeholder?: string;
|
|
22
|
+
typography?: VelcronTypographyState;
|
|
23
|
+
}
|
|
24
|
+
export interface VelcronTypographyState {
|
|
25
|
+
type?: TypographyType;
|
|
26
|
+
size?: TypographySize;
|
|
27
|
+
toned?: boolean;
|
|
28
|
+
}
|
|
29
|
+
export interface VelcronContentState {
|
|
30
|
+
caption?: VelcronTextState;
|
|
31
|
+
main?: VelcronTextState;
|
|
32
|
+
title?: VelcronTextState;
|
|
33
|
+
summary?: VelcronTextState;
|
|
34
|
+
}
|
|
35
|
+
export interface VelcronPropertiesState {
|
|
36
|
+
user: any;
|
|
37
|
+
mappings: Array<any>;
|
|
38
|
+
}
|
|
39
|
+
export interface VelcronImagesState {
|
|
40
|
+
main?: VelcronImageState;
|
|
41
|
+
alt1?: VelcronImageState;
|
|
42
|
+
alt2?: VelcronImageState;
|
|
43
|
+
}
|
|
44
|
+
export interface VelcronImageState {
|
|
45
|
+
url?: string;
|
|
46
|
+
ratio?: VelcronImageRatios;
|
|
47
|
+
caption?: VelcronTextState;
|
|
48
|
+
width?: number;
|
|
49
|
+
height?: number;
|
|
50
|
+
}
|
|
51
|
+
export interface VelcronStylingState {
|
|
52
|
+
}
|
|
53
|
+
export interface VelcronColorSchemasState {
|
|
54
|
+
main: string;
|
|
55
|
+
}
|
|
56
|
+
export declare const VelcronImagesStateBinding: {
|
|
57
|
+
main: {
|
|
58
|
+
editor: string;
|
|
59
|
+
url: string;
|
|
60
|
+
ratio: string;
|
|
61
|
+
caption: string;
|
|
62
|
+
width: string;
|
|
63
|
+
height: string;
|
|
64
|
+
};
|
|
65
|
+
alt1: {
|
|
66
|
+
editor: string;
|
|
67
|
+
url: string;
|
|
68
|
+
ratio: string;
|
|
69
|
+
caption: string;
|
|
70
|
+
width: string;
|
|
71
|
+
height: string;
|
|
72
|
+
};
|
|
73
|
+
alt2: {
|
|
74
|
+
editor: string;
|
|
75
|
+
url: string;
|
|
76
|
+
ratio: string;
|
|
77
|
+
caption: string;
|
|
78
|
+
width: string;
|
|
79
|
+
height: string;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
export declare const VelcronHeaderStateBinding: {
|
|
83
|
+
title: {
|
|
84
|
+
text: string;
|
|
85
|
+
placeholder: string;
|
|
86
|
+
blueprint: import("@omnia/velcron/internal-do-not-import-from-here/shared/models").VelcronBindableProp<TextBlueprint>;
|
|
87
|
+
};
|
|
88
|
+
icon: string;
|
|
89
|
+
};
|
|
90
|
+
export declare const VelcronContentStateBinding: {
|
|
91
|
+
title: {
|
|
92
|
+
text: string;
|
|
93
|
+
placeholder: string;
|
|
94
|
+
blueprint: import("@omnia/velcron/internal-do-not-import-from-here/shared/models").VelcronBindableProp<TextBlueprint>;
|
|
95
|
+
};
|
|
96
|
+
main: {
|
|
97
|
+
text: string;
|
|
98
|
+
placeholder: string;
|
|
99
|
+
blueprint: import("@omnia/velcron/internal-do-not-import-from-here/shared/models").VelcronBindableProp<TextBlueprint>;
|
|
100
|
+
};
|
|
101
|
+
caption: {
|
|
102
|
+
text: string;
|
|
103
|
+
placeholder: string;
|
|
104
|
+
blueprint: import("@omnia/velcron/internal-do-not-import-from-here/shared/models").VelcronBindableProp<TextBlueprint>;
|
|
105
|
+
};
|
|
106
|
+
summary: {
|
|
107
|
+
text: string;
|
|
108
|
+
placeholder: string;
|
|
109
|
+
blueprint: import("@omnia/velcron/internal-do-not-import-from-here/shared/models").VelcronBindableProp<TextBlueprint>;
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
export declare const VelcronColorSchemasStateBinding: {
|
|
113
|
+
main: {
|
|
114
|
+
value: string;
|
|
115
|
+
type: string;
|
|
116
|
+
filled: string;
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
export declare const VelcronSpacingStateBinding: {
|
|
120
|
+
container: {
|
|
121
|
+
value: string;
|
|
122
|
+
top: string;
|
|
123
|
+
right: string;
|
|
124
|
+
bottom: string;
|
|
125
|
+
left: string;
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
export declare const VelcronStateBinding: {
|
|
129
|
+
colorSchemas: {
|
|
130
|
+
main: {
|
|
131
|
+
value: string;
|
|
132
|
+
type: string;
|
|
133
|
+
filled: string;
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
images: {
|
|
137
|
+
main: {
|
|
138
|
+
editor: string;
|
|
139
|
+
url: string;
|
|
140
|
+
ratio: string;
|
|
141
|
+
caption: string;
|
|
142
|
+
width: string;
|
|
143
|
+
height: string;
|
|
144
|
+
};
|
|
145
|
+
alt1: {
|
|
146
|
+
editor: string;
|
|
147
|
+
url: string;
|
|
148
|
+
ratio: string;
|
|
149
|
+
caption: string;
|
|
150
|
+
width: string;
|
|
151
|
+
height: string;
|
|
152
|
+
};
|
|
153
|
+
alt2: {
|
|
154
|
+
editor: string;
|
|
155
|
+
url: string;
|
|
156
|
+
ratio: string;
|
|
157
|
+
caption: string;
|
|
158
|
+
width: string;
|
|
159
|
+
height: string;
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
content: {
|
|
163
|
+
title: {
|
|
164
|
+
text: string;
|
|
165
|
+
placeholder: string;
|
|
166
|
+
blueprint: import("@omnia/velcron/internal-do-not-import-from-here/shared/models").VelcronBindableProp<TextBlueprint>;
|
|
167
|
+
};
|
|
168
|
+
main: {
|
|
169
|
+
text: string;
|
|
170
|
+
placeholder: string;
|
|
171
|
+
blueprint: import("@omnia/velcron/internal-do-not-import-from-here/shared/models").VelcronBindableProp<TextBlueprint>;
|
|
172
|
+
};
|
|
173
|
+
caption: {
|
|
174
|
+
text: string;
|
|
175
|
+
placeholder: string;
|
|
176
|
+
blueprint: import("@omnia/velcron/internal-do-not-import-from-here/shared/models").VelcronBindableProp<TextBlueprint>;
|
|
177
|
+
};
|
|
178
|
+
summary: {
|
|
179
|
+
text: string;
|
|
180
|
+
placeholder: string;
|
|
181
|
+
blueprint: import("@omnia/velcron/internal-do-not-import-from-here/shared/models").VelcronBindableProp<TextBlueprint>;
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
header: {
|
|
185
|
+
title: {
|
|
186
|
+
text: string;
|
|
187
|
+
placeholder: string;
|
|
188
|
+
blueprint: import("@omnia/velcron/internal-do-not-import-from-here/shared/models").VelcronBindableProp<TextBlueprint>;
|
|
189
|
+
};
|
|
190
|
+
icon: string;
|
|
191
|
+
};
|
|
192
|
+
spacing: {
|
|
193
|
+
container: {
|
|
194
|
+
value: string;
|
|
195
|
+
top: string;
|
|
196
|
+
right: string;
|
|
197
|
+
bottom: string;
|
|
198
|
+
left: string;
|
|
199
|
+
};
|
|
200
|
+
};
|
|
201
|
+
};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VelcronStateBinding = exports.VelcronSpacingStateBinding = exports.VelcronColorSchemasStateBinding = exports.VelcronContentStateBinding = exports.VelcronHeaderStateBinding = exports.VelcronImagesStateBinding = void 0;
|
|
4
|
+
const models_1 = require("@omnia/velcron/internal-do-not-import-from-here/shared/models");
|
|
5
|
+
exports.VelcronImagesStateBinding = {
|
|
6
|
+
main: {
|
|
7
|
+
editor: "{{images.main.url}}",
|
|
8
|
+
url: "{{images.main.url}}",
|
|
9
|
+
ratio: "{{images.main.ratio}}",
|
|
10
|
+
caption: "{{images.main.caption}}",
|
|
11
|
+
width: "{{images.main.width}}",
|
|
12
|
+
height: "{{images.main.height}}",
|
|
13
|
+
},
|
|
14
|
+
alt1: {
|
|
15
|
+
editor: "{{images.alt1.url}}",
|
|
16
|
+
url: "{{images.alt1.url}}",
|
|
17
|
+
ratio: "{{images.alt1.ratio}}",
|
|
18
|
+
caption: "{{images.alt1.caption}}",
|
|
19
|
+
width: "{{images.alt1.width}}",
|
|
20
|
+
height: "{{images.alt1.height}}",
|
|
21
|
+
},
|
|
22
|
+
alt2: {
|
|
23
|
+
editor: "{{images.alt2.url}}",
|
|
24
|
+
url: "{{images.alt2.url}}",
|
|
25
|
+
ratio: "{{images.alt2.ratio}}",
|
|
26
|
+
caption: "{{images.alt2.caption}}",
|
|
27
|
+
width: "{{images.alt2.width}}",
|
|
28
|
+
height: "{{images.alt2.height}}",
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
exports.VelcronHeaderStateBinding = {
|
|
32
|
+
title: {
|
|
33
|
+
text: (0, models_1.velcronBind)("header.title.text"),
|
|
34
|
+
placeholder: (0, models_1.velcronBind)("header.title.placeholder"),
|
|
35
|
+
blueprint: (0, models_1.velcronBind)("content.title.blueprint")
|
|
36
|
+
},
|
|
37
|
+
icon: (0, models_1.velcronBind)("header.icon")
|
|
38
|
+
};
|
|
39
|
+
exports.VelcronContentStateBinding = {
|
|
40
|
+
title: {
|
|
41
|
+
text: (0, models_1.velcronBind)("content.title.text"),
|
|
42
|
+
placeholder: (0, models_1.velcronBind)("content.title.placeholder"),
|
|
43
|
+
blueprint: (0, models_1.velcronBind)("content.title.blueprint")
|
|
44
|
+
},
|
|
45
|
+
main: {
|
|
46
|
+
text: (0, models_1.velcronBind)("content.main.text"),
|
|
47
|
+
placeholder: (0, models_1.velcronBind)("content.main.placeholder"),
|
|
48
|
+
blueprint: (0, models_1.velcronBind)("content.main.blueprint")
|
|
49
|
+
},
|
|
50
|
+
caption: {
|
|
51
|
+
text: (0, models_1.velcronBind)("content.caption.text"),
|
|
52
|
+
placeholder: (0, models_1.velcronBind)("content.caption.placeholder"),
|
|
53
|
+
blueprint: (0, models_1.velcronBind)("content.caption.blueprint")
|
|
54
|
+
},
|
|
55
|
+
summary: {
|
|
56
|
+
text: (0, models_1.velcronBind)("content.summary.text"),
|
|
57
|
+
placeholder: (0, models_1.velcronBind)("content.summary.placeholder"),
|
|
58
|
+
blueprint: (0, models_1.velcronBind)("content.summary.blueprint")
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
exports.VelcronColorSchemasStateBinding = {
|
|
62
|
+
main: {
|
|
63
|
+
value: (0, models_1.velcronBind)("colorSchemas.main"),
|
|
64
|
+
type: (0, models_1.velcronBind)("colorSchemas.main.type"),
|
|
65
|
+
filled: (0, models_1.velcronBind)("colorSchemas.main.filled")
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
exports.VelcronSpacingStateBinding = {
|
|
69
|
+
container: {
|
|
70
|
+
value: (0, models_1.velcronBind)("spacing.chrome"),
|
|
71
|
+
top: (0, models_1.velcronBind)("{{spacing.chrome.top}}"),
|
|
72
|
+
right: (0, models_1.velcronBind)("{{spacing.chrome.right}}"),
|
|
73
|
+
bottom: (0, models_1.velcronBind)("{{spacing.chrome.bottom}}"),
|
|
74
|
+
left: (0, models_1.velcronBind)("{{spacing.chrome.left}}"),
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
// export interface VelcronSpacingState {
|
|
78
|
+
// chrome?: VelcronDimensionState
|
|
79
|
+
// }
|
|
80
|
+
// export interface VelcronDimensionState {
|
|
81
|
+
// margin?: VelcronSpacing;
|
|
82
|
+
// padding?: VelcronSpacing;
|
|
83
|
+
// }
|
|
84
|
+
exports.VelcronStateBinding = {
|
|
85
|
+
colorSchemas: exports.VelcronColorSchemasStateBinding,
|
|
86
|
+
images: exports.VelcronImagesStateBinding,
|
|
87
|
+
content: exports.VelcronContentStateBinding,
|
|
88
|
+
header: exports.VelcronHeaderStateBinding,
|
|
89
|
+
spacing: exports.VelcronSpacingStateBinding
|
|
90
|
+
//properties?:VelcronPropertiesState,
|
|
91
|
+
};
|
package/models/index.d.ts
CHANGED
package/models/index.js
CHANGED
|
@@ -8,3 +8,4 @@ tslib_1.__exportStar(require("./Enums"), exports);
|
|
|
8
8
|
tslib_1.__exportStar(require("./VelcronUnitProvider"), exports);
|
|
9
9
|
tslib_1.__exportStar(require("./VelcronPropertyEditorDefinitions"), exports);
|
|
10
10
|
tslib_1.__exportStar(require("./ActionHooks"), exports);
|
|
11
|
+
tslib_1.__exportStar(require("./VelcronState"), exports);
|
package/package.json
CHANGED
package/parser/VelcronData.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ export interface ParseResult<T> {
|
|
|
5
5
|
value: T;
|
|
6
6
|
}
|
|
7
7
|
export declare class VelcronData {
|
|
8
|
-
static dataBind<T = string>(renderContext: VelcronRenderContext,
|
|
9
|
-
static
|
|
8
|
+
static dataBind<T = string>(renderContext: VelcronRenderContext, bindTo: VelcronBindableProp<any>): T;
|
|
9
|
+
static isBindable<T = string>(bindable: VelcronBindableProp<T>): boolean;
|
|
10
10
|
static getBindPath(text: string): string;
|
|
11
11
|
static addCtxToVariableNames(template: string, skipIfNameStartsWith?: string, skipIfNameMatches?: Array<string>, overridePrefixWhenNameMatches?: {
|
|
12
12
|
[name: string]: string;
|
|
@@ -20,12 +20,12 @@ export declare class VelcronData {
|
|
|
20
20
|
static evaluateArray(template: string, renderContext: VelcronRenderContext): Array<any> | null;
|
|
21
21
|
static evaluateBoolean(template: string | Boolean, renderContext: VelcronRenderContext): boolean | null;
|
|
22
22
|
static tryParseBoolean(bool: any): ParseResult<boolean | null>;
|
|
23
|
-
static isString(text: any):
|
|
24
|
-
static isBoolean(value: any): boolean;
|
|
25
|
-
static isNumber(value: any):
|
|
23
|
+
static isString(text: any): text is string;
|
|
24
|
+
static isBoolean(value: any): value is boolean;
|
|
25
|
+
static isNumber(value: any): value is number;
|
|
26
26
|
static isUndefined(value: any): boolean;
|
|
27
27
|
static isArray(obj: any): obj is ExtendArray;
|
|
28
|
-
static isObject(value: any):
|
|
28
|
+
static isObject(value: any): value is object;
|
|
29
29
|
static extendObject(obj: any): any;
|
|
30
30
|
static propertyPathExists(obj: object, path: string): boolean;
|
|
31
31
|
static getOrSetObjectByPath<T>(object: Object, path: string, value?: any): T | null;
|
package/parser/VelcronData.js
CHANGED
|
@@ -6,35 +6,38 @@ const VelcronConstants_1 = require("./VelcronConstants");
|
|
|
6
6
|
const VelcronLogger_1 = require("./VelcronLogger");
|
|
7
7
|
const TextValue_1 = require("./TextValue");
|
|
8
8
|
class VelcronData {
|
|
9
|
-
static dataBind(renderContext,
|
|
10
|
-
if (!VelcronData.isString(
|
|
11
|
-
return
|
|
9
|
+
static dataBind(renderContext, bindTo) {
|
|
10
|
+
if (!VelcronData.isString(bindTo)) {
|
|
11
|
+
return bindTo;
|
|
12
12
|
}
|
|
13
13
|
//Bound to one state property and supports 2 way data binding > $bind: $state.title
|
|
14
|
-
if (
|
|
15
|
-
|
|
16
|
-
return VelcronData.getOrSet(renderContext,
|
|
14
|
+
if (bindTo.startsWith(VelcronConstants_1.VelcronConstants.state.bindToken)) {
|
|
15
|
+
bindTo = bindTo.substring(VelcronConstants_1.VelcronConstants.state.bindToken.length).trim();
|
|
16
|
+
return VelcronData.getOrSet(renderContext, bindTo);
|
|
17
17
|
}
|
|
18
18
|
//Built-in context tokens
|
|
19
|
-
if (
|
|
19
|
+
if (bindTo === VelcronConstants_1.VelcronConstants.context.editModeToken) {
|
|
20
20
|
return renderContext.$editmode;
|
|
21
21
|
}
|
|
22
|
-
else if (
|
|
22
|
+
else if (bindTo === VelcronConstants_1.VelcronConstants.context.activeToken) {
|
|
23
23
|
return renderContext.$active;
|
|
24
24
|
}
|
|
25
25
|
//String interpolation > {{ $state.title }} and {{ $state.description }}
|
|
26
|
-
const tokens = this.getTokens(
|
|
26
|
+
const tokens = this.getTokens(bindTo, false);
|
|
27
27
|
tokens.forEach((token) => {
|
|
28
28
|
let data = this.getOrSet(renderContext, token.replace(/\s*{{\s*|\s*}}\s*/g, ""));
|
|
29
29
|
if (data instanceof TextValue_1.TextValue) {
|
|
30
30
|
data = data.value;
|
|
31
31
|
}
|
|
32
|
-
|
|
32
|
+
bindTo = bindTo.replace(token, data);
|
|
33
33
|
});
|
|
34
|
-
return
|
|
34
|
+
return bindTo;
|
|
35
35
|
}
|
|
36
|
-
static
|
|
37
|
-
|
|
36
|
+
static isBindable(bindable) {
|
|
37
|
+
if (!VelcronData.isString(bindable)) {
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
return bindable?.startsWith(VelcronConstants_1.VelcronConstants.state.bindToken);
|
|
38
41
|
}
|
|
39
42
|
static getBindPath(text) {
|
|
40
43
|
return text?.substring(VelcronConstants_1.VelcronConstants.state.bindToken.length).trim();
|
package/rules/IsEditMode.js
CHANGED
|
@@ -22,7 +22,7 @@ const parser_1 = require("../parser");
|
|
|
22
22
|
*/
|
|
23
23
|
function isEditMode(definition, bindableProp, renderContext) {
|
|
24
24
|
//A bind property must exist for the definition to be editable
|
|
25
|
-
if (parser_1.VelcronData.
|
|
25
|
+
if (parser_1.VelcronData.isBindable(definition[bindableProp]) === false) {
|
|
26
26
|
return false;
|
|
27
27
|
}
|
|
28
28
|
let result = false;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { TypographyType,
|
|
2
|
-
export declare class
|
|
1
|
+
import { TypographyType, VelcronEditor, VelcronTypographyEditorSettings } from "@omnia/fx-models";
|
|
2
|
+
export declare class VelcronEditorBuilder {
|
|
3
3
|
private editors;
|
|
4
4
|
private formatStateMapping;
|
|
5
5
|
add(): {
|
|
6
|
-
spacingEditor: (name: string, stateMapping: string, individualSelection?: boolean) =>
|
|
7
|
-
imageEditor: (name: string, stateMapping: string) =>
|
|
8
|
-
colorSchemaEditor: (name: string, stateMapping: string) =>
|
|
9
|
-
markdownEditor: (name: string, stateMapping: string, placeholder?: string) =>
|
|
10
|
-
textEditor: (name: string, stateMapping: string, typographyType: TypographyType, placeholder?: string) =>
|
|
11
|
-
blockHeaderEditor: () =>
|
|
12
|
-
typographyEditor: (stateMapping: string, settings: VelcronTypographyEditorSettings) =>
|
|
6
|
+
spacingEditor: (name: string, stateMapping: string, individualSelection?: boolean) => VelcronEditorBuilder;
|
|
7
|
+
imageEditor: (name: string, stateMapping: string) => VelcronEditorBuilder;
|
|
8
|
+
colorSchemaEditor: (name: string, stateMapping: string) => VelcronEditorBuilder;
|
|
9
|
+
markdownEditor: (name: string, stateMapping: string, placeholder?: string) => VelcronEditorBuilder;
|
|
10
|
+
textEditor: (name: string, stateMapping: string, typographyType: TypographyType, placeholder?: string) => VelcronEditorBuilder;
|
|
11
|
+
blockHeaderEditor: () => VelcronEditorBuilder;
|
|
12
|
+
typographyEditor: (stateMapping: string, settings: VelcronTypographyEditorSettings) => VelcronEditorBuilder;
|
|
13
13
|
};
|
|
14
|
-
build():
|
|
14
|
+
build(): VelcronEditor<any>[];
|
|
15
15
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
class
|
|
3
|
+
exports.VelcronEditorBuilder = void 0;
|
|
4
|
+
class VelcronEditorBuilder {
|
|
5
5
|
constructor() {
|
|
6
6
|
this.editors = [];
|
|
7
7
|
}
|
|
@@ -102,4 +102,4 @@ class VelcronEditorBuilder2 {
|
|
|
102
102
|
// return result;
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
|
-
exports.
|
|
105
|
+
exports.VelcronEditorBuilder = VelcronEditorBuilder;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { VelcronEditor } from "@omnia/fx-models";
|
|
2
2
|
import { VelcronEditorBuilder } from "./VelcronEditorBuilder";
|
|
3
3
|
import { VelcronEditorBuilderBase } from "./VelcronEditorBuilderBase";
|
|
4
4
|
export declare class VelcronColorSchemaEditorBuilder extends VelcronEditorBuilderBase {
|
|
5
5
|
private editor;
|
|
6
6
|
constructor(builder: any);
|
|
7
7
|
add(): VelcronEditorBuilder;
|
|
8
|
-
protected internalBuild():
|
|
8
|
+
protected internalBuild(): VelcronEditor<any>[];
|
|
9
9
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { VelcronEditor } from "@omnia/fx-models";
|
|
2
2
|
import { VelcronEditorBuilderBase } from "./VelcronEditorBuilderBase";
|
|
3
3
|
export declare class VelcronContentEditorBuilder extends VelcronEditorBuilderBase {
|
|
4
4
|
private mainEditor;
|
|
@@ -34,5 +34,5 @@ export declare class VelcronContentEditorBuilder extends VelcronEditorBuilderBas
|
|
|
34
34
|
addPropertyMappingEditor: (title?: string) => VelcronContentEditorBuilder;
|
|
35
35
|
addTypographyEditor: (title?: string, type?: "text" | "title") => VelcronContentEditorBuilder;
|
|
36
36
|
};
|
|
37
|
-
protected internalBuild():
|
|
37
|
+
protected internalBuild(): VelcronEditor<any>[];
|
|
38
38
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { VelcronEditor } from "@omnia/fx-models";
|
|
2
2
|
import { VelcronContentEditorBuilder } from "./VelcronContentEditor";
|
|
3
3
|
import { VelcronColorSchemaEditorBuilder } from "./VelcronColorSchemaEditor";
|
|
4
4
|
import { VelcronImageEditorBuilder } from "./VelcronImageEditor";
|
|
@@ -12,5 +12,5 @@ export declare class VelcronEditorBuilder {
|
|
|
12
12
|
colorSchemaType(): VelcronColorSchemaEditorBuilder;
|
|
13
13
|
image(): VelcronImageEditorBuilder;
|
|
14
14
|
properties(): VelcronPropertyMappingEditorBuilder;
|
|
15
|
-
build():
|
|
15
|
+
build(): VelcronEditor<any>[];
|
|
16
16
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { VelcronEditor } from "@omnia/fx-models";
|
|
2
2
|
import { VelcronEditorBuilder } from "./VelcronEditorBuilder";
|
|
3
3
|
export declare abstract class VelcronEditorBuilderBase {
|
|
4
4
|
protected builder: VelcronEditorBuilder;
|
|
5
5
|
constructor(builder: VelcronEditorBuilder);
|
|
6
6
|
done(): VelcronEditorBuilder;
|
|
7
|
-
build():
|
|
8
|
-
protected abstract internalBuild(): Array<
|
|
7
|
+
build(): VelcronEditor<any>[];
|
|
8
|
+
protected abstract internalBuild(): Array<VelcronEditor>;
|
|
9
9
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { VelcronEditor } from "@omnia/fx-models";
|
|
2
2
|
import { VelcronEditorBuilder } from "./VelcronEditorBuilder";
|
|
3
3
|
import { VelcronEditorBuilderBase } from "./VelcronEditorBuilderBase";
|
|
4
4
|
export declare class VelcronImageEditorBuilder extends VelcronEditorBuilderBase {
|
|
@@ -7,5 +7,5 @@ export declare class VelcronImageEditorBuilder extends VelcronEditorBuilderBase
|
|
|
7
7
|
main: {
|
|
8
8
|
add: () => VelcronEditorBuilder;
|
|
9
9
|
};
|
|
10
|
-
protected internalBuild():
|
|
10
|
+
protected internalBuild(): VelcronEditor<any>[];
|
|
11
11
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { VelcronEditor } from "@omnia/fx-models";
|
|
2
2
|
import { VelcronEditorBuilder } from "./VelcronEditorBuilder";
|
|
3
3
|
import { VelcronEditorBuilderBase } from "./VelcronEditorBuilderBase";
|
|
4
4
|
export declare class VelcronPropertyMappingEditorBuilder extends VelcronEditorBuilderBase {
|
|
5
5
|
private editor;
|
|
6
6
|
constructor(builder: any);
|
|
7
7
|
add(): VelcronEditorBuilder;
|
|
8
|
-
protected internalBuild():
|
|
8
|
+
protected internalBuild(): VelcronEditor<any>[];
|
|
9
9
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function useVelcronEditorBuilder():
|
|
1
|
+
import { VelcronEditorBuilder } from "./VelcronEditorBuilder";
|
|
2
|
+
export declare function useVelcronEditorBuilder(): VelcronEditorBuilder;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
// import { VelcronContentState, VelcronImagePropertyEditor, VelcronImageRatios, VelcronImageState, VelcronMarkdownPropertyEditor, VelcronTextPropertyEditor} from "@omnia/fx-models";
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.useVelcronEditorBuilder = void 0;
|
|
5
|
-
const
|
|
5
|
+
const VelcronEditorBuilder_1 = require("./VelcronEditorBuilder");
|
|
6
6
|
function useVelcronEditorBuilder() {
|
|
7
|
-
return new
|
|
7
|
+
return new VelcronEditorBuilder_1.VelcronEditorBuilder();
|
|
8
8
|
}
|
|
9
9
|
exports.useVelcronEditorBuilder = useVelcronEditorBuilder;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { VelcronEditorBuilder } from "./editor/VelcronEditorBuilder";
|
|
2
|
-
import { VelcronStateBuilder } from "./state/VelcronStateBuilder";
|
|
3
|
-
export declare function
|
|
1
|
+
import { VelcronEditorBuilder } from "./old/editor/VelcronEditorBuilder";
|
|
2
|
+
import { VelcronStateBuilder } from "./old/state/VelcronStateBuilder";
|
|
3
|
+
export declare function useOldVelcronTemplateBuilder(): {
|
|
4
4
|
state: VelcronStateBuilder;
|
|
5
5
|
editor: VelcronEditorBuilder;
|
|
6
6
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// import { VelcronContentState, VelcronImagePropertyEditor, VelcronImageRatios, VelcronImageState, VelcronMarkdownPropertyEditor, VelcronTextPropertyEditor} from "@omnia/fx-models";
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
5
|
-
const VelcronEditorBuilder_1 = require("./editor/VelcronEditorBuilder");
|
|
6
|
-
const VelcronStateBuilder_1 = require("./state/VelcronStateBuilder");
|
|
7
|
-
function
|
|
4
|
+
exports.useOldVelcronTemplateBuilder = void 0;
|
|
5
|
+
const VelcronEditorBuilder_1 = require("./old/editor/VelcronEditorBuilder");
|
|
6
|
+
const VelcronStateBuilder_1 = require("./old/state/VelcronStateBuilder");
|
|
7
|
+
function useOldVelcronTemplateBuilder() {
|
|
8
8
|
return {
|
|
9
9
|
state: new VelcronStateBuilder_1.VelcronStateBuilder(),
|
|
10
10
|
editor: new VelcronEditorBuilder_1.VelcronEditorBuilder()
|
|
11
11
|
};
|
|
12
12
|
}
|
|
13
|
-
exports.
|
|
13
|
+
exports.useOldVelcronTemplateBuilder = useOldVelcronTemplateBuilder;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|