impaktapps-ui-builder 1.0.71 → 1.0.72-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 +45 -2
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +8 -8
- 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 +35 -0
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +3 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +7 -0
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +1 -0
- package/src/impaktapps-ui-builder/builder/services/component.ts +2 -1
- package/src/impaktapps-ui-builder/runtime/services/service.ts +1 -1
|
@@ -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" },
|
|
@@ -7898,6 +7899,13 @@ const buildPropertiesSection = function(type) {
|
|
|
7898
7899
|
getTextArea("thought", "Today's thought", false)
|
|
7899
7900
|
];
|
|
7900
7901
|
break;
|
|
7902
|
+
case "Image":
|
|
7903
|
+
uiSchema.elements = [
|
|
7904
|
+
getInputField("imageUrl", "Image URL"),
|
|
7905
|
+
getInputField("height", "Image Height"),
|
|
7906
|
+
emptyBox$1("imageEmpty", { xs: 0, sm: 0, md: 4, lg: 6 })
|
|
7907
|
+
];
|
|
7908
|
+
break;
|
|
7901
7909
|
}
|
|
7902
7910
|
return uiSchema;
|
|
7903
7911
|
};
|
|
@@ -8401,7 +8409,8 @@ const sectionLabels = {
|
|
|
8401
8409
|
ColumnGroup: ["Core", "Components"],
|
|
8402
8410
|
Thought: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
8403
8411
|
Date: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
8404
|
-
DateTime: ["Core", "Properties", "Events", "Style", "Validation"]
|
|
8412
|
+
DateTime: ["Core", "Properties", "Events", "Style", "Validation"],
|
|
8413
|
+
Image: ["Core", "Properties", "Style"]
|
|
8405
8414
|
};
|
|
8406
8415
|
function refreshPage(type, store2) {
|
|
8407
8416
|
var _a, _b;
|
|
@@ -10248,7 +10257,9 @@ var service = (funcParams) => {
|
|
|
10248
10257
|
setPage: async function() {
|
|
10249
10258
|
var _a, _b, _c;
|
|
10250
10259
|
funcParams.store.setAdditionalErrors([]);
|
|
10251
|
-
funcParams.store.setFormdata((
|
|
10260
|
+
funcParams.store.setFormdata(() => {
|
|
10261
|
+
return (funcParams == null ? void 0 : funcParams.initFormData()) || {};
|
|
10262
|
+
});
|
|
10252
10263
|
funcParams.store.setSchema({ type: "object", properties: {} });
|
|
10253
10264
|
funcParams.store.newData = {};
|
|
10254
10265
|
eventGroups = {};
|
|
@@ -12182,6 +12193,35 @@ const buildHorizontalLayout = (config2, componentScope2) => {
|
|
|
12182
12193
|
}
|
|
12183
12194
|
return horizontal;
|
|
12184
12195
|
};
|
|
12196
|
+
const imageUiSchema = {
|
|
12197
|
+
type: "Control",
|
|
12198
|
+
scope: "#/properties/Logo",
|
|
12199
|
+
options: {
|
|
12200
|
+
widget: "Image"
|
|
12201
|
+
},
|
|
12202
|
+
config: {
|
|
12203
|
+
layout: 3,
|
|
12204
|
+
main: {
|
|
12205
|
+
url: ""
|
|
12206
|
+
},
|
|
12207
|
+
style: {}
|
|
12208
|
+
}
|
|
12209
|
+
};
|
|
12210
|
+
const buildImage = (config2, componentScope2) => {
|
|
12211
|
+
const image = _.cloneDeep(imageUiSchema);
|
|
12212
|
+
image.scope = componentScope2;
|
|
12213
|
+
image.config.main.url = config2.imageUrl;
|
|
12214
|
+
if (config2.layout) {
|
|
12215
|
+
image.config.layout = createLayoutFormat(config2.layout);
|
|
12216
|
+
}
|
|
12217
|
+
if (config2.style) {
|
|
12218
|
+
image.config.style = JSON.parse(config2.style);
|
|
12219
|
+
}
|
|
12220
|
+
if (config2.height) {
|
|
12221
|
+
image.config.style.imageStyle = { ...image.config.style.imageStyle, height: config2.height };
|
|
12222
|
+
}
|
|
12223
|
+
return image;
|
|
12224
|
+
};
|
|
12185
12225
|
let schema = {
|
|
12186
12226
|
type: "object",
|
|
12187
12227
|
properties: {},
|
|
@@ -12439,6 +12479,9 @@ const buildUiSchema = (config2, store2) => {
|
|
|
12439
12479
|
case "Thought":
|
|
12440
12480
|
elements = buildThoughtOfTheDay(config2, componentScope2);
|
|
12441
12481
|
break;
|
|
12482
|
+
case "Image":
|
|
12483
|
+
elements = buildImage(config2, componentScope2);
|
|
12484
|
+
break;
|
|
12442
12485
|
default:
|
|
12443
12486
|
schema = {
|
|
12444
12487
|
type: "object",
|