impaktapps-ui-builder 1.0.1-alpha.3 → 1.0.1-alpha.4

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: {
@@ -12249,6 +12250,39 @@ const buildThoughtOfTheDay = (config2, componentScope2) => {
12249
12250
  }
12250
12251
  return thought;
12251
12252
  };
12253
+ const PhoneInput = {
12254
+ scope: "#/properties/testPhone",
12255
+ type: "Control",
12256
+ options: {
12257
+ widget: "PhoneInput"
12258
+ },
12259
+ config: {
12260
+ layout: { xs: 6, sm: 6, md: 4, lg: 3 },
12261
+ main: {
12262
+ defaultCountry: "in",
12263
+ label: "Phone"
12264
+ }
12265
+ }
12266
+ };
12267
+ const buildPhoneInputField = (config2, componentScope2) => {
12268
+ const phonInputField = _.cloneDeep(PhoneInput);
12269
+ phonInputField.config.main.label = config2.label;
12270
+ if (config2.style) {
12271
+ phonInputField.config.style = JSON.parse(config2.style);
12272
+ }
12273
+ if (config2.InputFormatingAndMasking) {
12274
+ phonInputField.config.main.formatStrArray = config2.InputFormatingAndMasking.map((e) => e.formatElement);
12275
+ }
12276
+ if (config2.placeholder) {
12277
+ phonInputField.config.main.placeholder = config2.placeholder;
12278
+ }
12279
+ if (config2.layout) {
12280
+ phonInputField.config.layout = createLayoutFormat(config2.layout);
12281
+ }
12282
+ phonInputField.config.main.errorMessage = `${config2.name} is empty or invalid`;
12283
+ phonInputField.scope = componentScope2;
12284
+ return phonInputField;
12285
+ };
12252
12286
  let schema = {
12253
12287
  type: "object",
12254
12288
  properties: {},
@@ -12503,6 +12537,9 @@ const buildUiSchema = (config2, store2) => {
12503
12537
  case "Thought":
12504
12538
  elements = buildThoughtOfTheDay(config2, componentScope2);
12505
12539
  break;
12540
+ case "PhoneInput":
12541
+ elements = buildPhoneInputField(config2, componentScope2);
12542
+ break;
12506
12543
  default:
12507
12544
  schema = {
12508
12545
  type: "object",
@@ -12573,7 +12610,7 @@ const buildUiSchema = (config2, store2) => {
12573
12610
  }
12574
12611
  });
12575
12612
  elements.elements = rowElements;
12576
- elements.config.action = tableActionElement;
12613
+ elements.config.actions = tableActionElement;
12577
12614
  elements.config.main.headerIcons.elements = tableHeaderElements;
12578
12615
  } else if (config2.type == "Array") {
12579
12616
  elements.options.detail.elements = config2.elements.map((e, elemInd) => {