impaktapps-ui-builder 1.0.70-alpha.1 → 1.0.71-alpha.1
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/dist/impaktapps-ui-builder.es.js +30 -0
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +1 -1
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/buildImage.d.ts +1 -0
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildImage.ts +41 -0
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +3 -0
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +1 -0
|
@@ -6234,6 +6234,7 @@ const ComponentSchema = {
|
|
|
6234
6234
|
{ title: "Empty Box", const: "EmptyBox" },
|
|
6235
6235
|
{ title: "File Handler", const: "FileInput" },
|
|
6236
6236
|
{ title: "Graph", const: "Graph" },
|
|
6237
|
+
{ title: "Image", const: "Image" },
|
|
6237
6238
|
{ title: "Input Slider", const: "InputSlider" },
|
|
6238
6239
|
{ title: "Label", const: "Box" },
|
|
6239
6240
|
{ title: "Leaderboard", const: "LeaderBoard" },
|
|
@@ -12182,6 +12183,32 @@ const buildHorizontalLayout = (config2, componentScope2) => {
|
|
|
12182
12183
|
}
|
|
12183
12184
|
return horizontal;
|
|
12184
12185
|
};
|
|
12186
|
+
const imageUiSchema = {
|
|
12187
|
+
type: "Control",
|
|
12188
|
+
scope: "#/properties/Logo",
|
|
12189
|
+
layout: 3,
|
|
12190
|
+
options: {
|
|
12191
|
+
widget: "Image"
|
|
12192
|
+
},
|
|
12193
|
+
config: {
|
|
12194
|
+
main: {
|
|
12195
|
+
url: ""
|
|
12196
|
+
},
|
|
12197
|
+
style: {}
|
|
12198
|
+
}
|
|
12199
|
+
};
|
|
12200
|
+
const buildImage = (config2, componentScope2) => {
|
|
12201
|
+
const image = _.cloneDeep(imageUiSchema);
|
|
12202
|
+
image.scope = componentScope2;
|
|
12203
|
+
image.config.main.url = config2.imageUrl;
|
|
12204
|
+
if (config2.layout) {
|
|
12205
|
+
image.config.layout = createLayoutFormat(config2.layout);
|
|
12206
|
+
}
|
|
12207
|
+
if (config2.style) {
|
|
12208
|
+
image.config.style = JSON.parse(config2.style);
|
|
12209
|
+
}
|
|
12210
|
+
return image;
|
|
12211
|
+
};
|
|
12185
12212
|
let schema = {
|
|
12186
12213
|
type: "object",
|
|
12187
12214
|
properties: {},
|
|
@@ -12439,6 +12466,9 @@ const buildUiSchema = (config2, store2) => {
|
|
|
12439
12466
|
case "Thought":
|
|
12440
12467
|
elements = buildThoughtOfTheDay(config2, componentScope2);
|
|
12441
12468
|
break;
|
|
12469
|
+
case "Image":
|
|
12470
|
+
elements = buildImage(config2, componentScope2);
|
|
12471
|
+
break;
|
|
12442
12472
|
default:
|
|
12443
12473
|
schema = {
|
|
12444
12474
|
type: "object",
|