impaktapps-ui-builder 1.0.46 → 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.
@@ -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: 4 },
7487
+ layout: { xs: 6, sm: 6, md: 4, lg: 3 },
7487
7488
  main: {
7488
7489
  label: "Screen Size"
7489
7490
  }
@@ -8270,19 +8271,9 @@ var buildConfig = (FormData) => {
8270
8271
  };
8271
8272
  const createLayoutFormat = (config2) => {
8272
8273
  if (_.isEmpty(config2)) {
8273
- return {
8274
- xs: 12,
8275
- sm: 12,
8276
- md: 12,
8277
- lg: 12
8278
- };
8274
+ return { xs: 12, sm: 6, md: 4, lg: 3 };
8279
8275
  }
8280
- let data = {
8281
- xs: 12,
8282
- sm: 12,
8283
- md: 6,
8284
- lg: 6
8285
- };
8276
+ let data = {};
8286
8277
  config2.map((e) => {
8287
8278
  data[e.key || "xs"] = +e.value || 5.5;
8288
8279
  });
@@ -10300,6 +10291,7 @@ var service = (funcParams) => {
10300
10291
  eventGroups = {};
10301
10292
  pageData = await funcParams.pageDataProvider();
10302
10293
  const config2 = pageData == null ? void 0 : pageData.config;
10294
+ funcParams == null ? void 0 : funcParams.setExternaldata();
10303
10295
  const uiSchema = pageData == null ? void 0 : pageData.uiSchema;
10304
10296
  const event2 = new CustomEvent("pageNameChanged", {
10305
10297
  detail: { pageName: config2.label }
@@ -10412,7 +10404,9 @@ var service = (funcParams) => {
10412
10404
  }
10413
10405
  );
10414
10406
  const schema2 = (_m = pageData == null ? void 0 : pageData.schema) != null ? _m : { type: "object", properties: {} };
10415
- eventGroups = extractEvents(config2);
10407
+ const newEventGroups = extractEvents(config2);
10408
+ console.log("newEventGroups", newEventGroups, eventGroups);
10409
+ eventGroups = newEventGroups;
10416
10410
  executeEventsParameters = {
10417
10411
  config: {},
10418
10412
  componentName: "",
@@ -10422,7 +10416,7 @@ var service = (funcParams) => {
10422
10416
  service: funcParams.service,
10423
10417
  functionsProvider: funcParams.functionsProvider,
10424
10418
  serviceHolder: this,
10425
- eventGroups,
10419
+ eventGroups: newEventGroups,
10426
10420
  formDataHolder
10427
10421
  };
10428
10422
  await executeRefreshHandler({
@@ -10433,7 +10427,7 @@ var service = (funcParams) => {
10433
10427
  userValue: funcParams.userValue,
10434
10428
  service: funcParams.service,
10435
10429
  serviceHolder: this,
10436
- eventGroups,
10430
+ eventGroups: newEventGroups,
10437
10431
  formDataHolder: {}
10438
10432
  });
10439
10433
  funcParams.store.setSchema(
@@ -11081,7 +11075,7 @@ var SelectInputField = {
11081
11075
  widget: "SelectInputField"
11082
11076
  },
11083
11077
  config: {
11084
- layout: { xs: 12, sm: 6, md: 4, lg: 4 },
11078
+ layout: { xs: 12, sm: 6, md: 4, lg: 3 },
11085
11079
  main: {
11086
11080
  label: "",
11087
11081
  type: "text",
@@ -12010,7 +12004,7 @@ const FileInput = {
12010
12004
  widget: "FileInputField"
12011
12005
  },
12012
12006
  config: {
12013
- layout: { xs: 6, sm: 6, md: 4, lg: 4 },
12007
+ layout: { xs: 6, sm: 6, md: 4, lg: 3 },
12014
12008
  main: {
12015
12009
  required: false,
12016
12010
  onUpload: "onFileUpload",
@@ -12278,6 +12272,39 @@ const buildThoughtOfTheDay = (config2, componentScope2) => {
12278
12272
  }
12279
12273
  return thought;
12280
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
+ };
12281
12308
  let schema = {
12282
12309
  type: "object",
12283
12310
  properties: {},
@@ -12532,6 +12559,9 @@ const buildUiSchema = (config2, store2) => {
12532
12559
  case "Thought":
12533
12560
  elements = buildThoughtOfTheDay(config2, componentScope2);
12534
12561
  break;
12562
+ case "PhoneInput":
12563
+ elements = buildPhoneInputField(config2, componentScope2);
12564
+ break;
12535
12565
  default:
12536
12566
  schema = {
12537
12567
  type: "object",