impaktapps-ui-builder 1.0.47 → 1.0.50-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 +48 -8
- 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/buildPhoneInput.d.ts +1 -0
- package/dist/src/impaktapps-ui-builder/builder/build/uischema/phoneInput.d.ts +20 -0
- package/dist/src/impaktapps-ui-builder/runtime/services/service.d.ts +1 -0
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildConfig.ts +4 -2
- package/src/impaktapps-ui-builder/builder/build/buildFileInput.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildPhoneInput.ts +26 -0
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +3 -2
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +61 -1
- package/src/impaktapps-ui-builder/builder/build/uischema/phoneInput.ts +16 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/selectInputField.ts +1 -1
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +2 -1
- package/src/impaktapps-ui-builder/runtime/services/service.ts +11 -5
|
@@ -6287,7 +6287,8 @@ const ComponentSchema = {
|
|
|
6287
6287
|
{ title: "Upload", const: "UploadFile" },
|
|
6288
6288
|
{ title: "Tree ", const: "TreeMap" },
|
|
6289
6289
|
{ title: "Column Group", const: "ColumnGroup" },
|
|
6290
|
-
{ title: "Thought of the day", const: "Thought" }
|
|
6290
|
+
{ title: "Thought of the day", const: "Thought" },
|
|
6291
|
+
{ title: "Phone Input", const: "PhoneInput" }
|
|
6291
6292
|
]
|
|
6292
6293
|
},
|
|
6293
6294
|
elementType: {
|
|
@@ -7483,7 +7484,7 @@ const cardLayout = {
|
|
|
7483
7484
|
widget: "SelectInputField"
|
|
7484
7485
|
},
|
|
7485
7486
|
config: {
|
|
7486
|
-
layout: { xs: 6, sm: 6, md: 4, lg:
|
|
7487
|
+
layout: { xs: 6, sm: 6, md: 4, lg: 3 },
|
|
7487
7488
|
main: {
|
|
7488
7489
|
label: "Screen Size"
|
|
7489
7490
|
}
|
|
@@ -8272,7 +8273,7 @@ const createLayoutFormat = (config2) => {
|
|
|
8272
8273
|
if (_.isEmpty(config2)) {
|
|
8273
8274
|
return { xs: 12, sm: 6, md: 4, lg: 3 };
|
|
8274
8275
|
}
|
|
8275
|
-
let data = {
|
|
8276
|
+
let data = {};
|
|
8276
8277
|
config2.map((e) => {
|
|
8277
8278
|
data[e.key || "xs"] = +e.value || 5.5;
|
|
8278
8279
|
});
|
|
@@ -10290,6 +10291,7 @@ var service = (funcParams) => {
|
|
|
10290
10291
|
eventGroups = {};
|
|
10291
10292
|
pageData = await funcParams.pageDataProvider();
|
|
10292
10293
|
const config2 = pageData == null ? void 0 : pageData.config;
|
|
10294
|
+
funcParams == null ? void 0 : funcParams.setExternaldata();
|
|
10293
10295
|
const uiSchema = pageData == null ? void 0 : pageData.uiSchema;
|
|
10294
10296
|
const event2 = new CustomEvent("pageNameChanged", {
|
|
10295
10297
|
detail: { pageName: config2.label }
|
|
@@ -10402,7 +10404,9 @@ var service = (funcParams) => {
|
|
|
10402
10404
|
}
|
|
10403
10405
|
);
|
|
10404
10406
|
const schema2 = (_m = pageData == null ? void 0 : pageData.schema) != null ? _m : { type: "object", properties: {} };
|
|
10405
|
-
|
|
10407
|
+
const newEventGroups = extractEvents(config2);
|
|
10408
|
+
console.log("newEventGroups", newEventGroups, eventGroups);
|
|
10409
|
+
eventGroups = newEventGroups;
|
|
10406
10410
|
executeEventsParameters = {
|
|
10407
10411
|
config: {},
|
|
10408
10412
|
componentName: "",
|
|
@@ -10412,7 +10416,7 @@ var service = (funcParams) => {
|
|
|
10412
10416
|
service: funcParams.service,
|
|
10413
10417
|
functionsProvider: funcParams.functionsProvider,
|
|
10414
10418
|
serviceHolder: this,
|
|
10415
|
-
eventGroups,
|
|
10419
|
+
eventGroups: newEventGroups,
|
|
10416
10420
|
formDataHolder
|
|
10417
10421
|
};
|
|
10418
10422
|
await executeRefreshHandler({
|
|
@@ -10423,7 +10427,7 @@ var service = (funcParams) => {
|
|
|
10423
10427
|
userValue: funcParams.userValue,
|
|
10424
10428
|
service: funcParams.service,
|
|
10425
10429
|
serviceHolder: this,
|
|
10426
|
-
eventGroups,
|
|
10430
|
+
eventGroups: newEventGroups,
|
|
10427
10431
|
formDataHolder: {}
|
|
10428
10432
|
});
|
|
10429
10433
|
funcParams.store.setSchema(
|
|
@@ -11071,7 +11075,7 @@ var SelectInputField = {
|
|
|
11071
11075
|
widget: "SelectInputField"
|
|
11072
11076
|
},
|
|
11073
11077
|
config: {
|
|
11074
|
-
layout: { xs: 12, sm: 6, md: 4, lg:
|
|
11078
|
+
layout: { xs: 12, sm: 6, md: 4, lg: 3 },
|
|
11075
11079
|
main: {
|
|
11076
11080
|
label: "",
|
|
11077
11081
|
type: "text",
|
|
@@ -12000,7 +12004,7 @@ const FileInput = {
|
|
|
12000
12004
|
widget: "FileInputField"
|
|
12001
12005
|
},
|
|
12002
12006
|
config: {
|
|
12003
|
-
layout: { xs: 6, sm: 6, md: 4, lg:
|
|
12007
|
+
layout: { xs: 6, sm: 6, md: 4, lg: 3 },
|
|
12004
12008
|
main: {
|
|
12005
12009
|
required: false,
|
|
12006
12010
|
onUpload: "onFileUpload",
|
|
@@ -12268,6 +12272,39 @@ const buildThoughtOfTheDay = (config2, componentScope2) => {
|
|
|
12268
12272
|
}
|
|
12269
12273
|
return thought;
|
|
12270
12274
|
};
|
|
12275
|
+
const PhoneInput = {
|
|
12276
|
+
scope: "#/properties/testPhone",
|
|
12277
|
+
type: "Control",
|
|
12278
|
+
options: {
|
|
12279
|
+
widget: "PhoneInput"
|
|
12280
|
+
},
|
|
12281
|
+
config: {
|
|
12282
|
+
layout: { xs: 6, sm: 6, md: 4, lg: 3 },
|
|
12283
|
+
main: {
|
|
12284
|
+
defaultCountry: "in",
|
|
12285
|
+
label: "Phone"
|
|
12286
|
+
}
|
|
12287
|
+
}
|
|
12288
|
+
};
|
|
12289
|
+
const buildPhoneInputField = (config2, componentScope2) => {
|
|
12290
|
+
const phonInputField = _.cloneDeep(PhoneInput);
|
|
12291
|
+
phonInputField.config.main.label = config2.label;
|
|
12292
|
+
if (config2.style) {
|
|
12293
|
+
phonInputField.config.style = JSON.parse(config2.style);
|
|
12294
|
+
}
|
|
12295
|
+
if (config2.InputFormatingAndMasking) {
|
|
12296
|
+
phonInputField.config.main.formatStrArray = config2.InputFormatingAndMasking.map((e) => e.formatElement);
|
|
12297
|
+
}
|
|
12298
|
+
if (config2.placeholder) {
|
|
12299
|
+
phonInputField.config.main.placeholder = config2.placeholder;
|
|
12300
|
+
}
|
|
12301
|
+
if (config2.layout) {
|
|
12302
|
+
phonInputField.config.layout = createLayoutFormat(config2.layout);
|
|
12303
|
+
}
|
|
12304
|
+
phonInputField.config.main.errorMessage = `${config2.name} is empty or invalid`;
|
|
12305
|
+
phonInputField.scope = componentScope2;
|
|
12306
|
+
return phonInputField;
|
|
12307
|
+
};
|
|
12271
12308
|
let schema = {
|
|
12272
12309
|
type: "object",
|
|
12273
12310
|
properties: {},
|
|
@@ -12522,6 +12559,9 @@ const buildUiSchema = (config2, store2) => {
|
|
|
12522
12559
|
case "Thought":
|
|
12523
12560
|
elements = buildThoughtOfTheDay(config2, componentScope2);
|
|
12524
12561
|
break;
|
|
12562
|
+
case "PhoneInput":
|
|
12563
|
+
elements = buildPhoneInputField(config2, componentScope2);
|
|
12564
|
+
break;
|
|
12525
12565
|
default:
|
|
12526
12566
|
schema = {
|
|
12527
12567
|
type: "object",
|