impaktapps-ui-builder 0.0.101-alpha.267 → 0.0.101-alpha.269

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: {
@@ -12258,6 +12259,39 @@ const buildThoughtOfTheDay = (config2, componentScope2) => {
12258
12259
  }
12259
12260
  return thought;
12260
12261
  };
12262
+ const PhoneInput = {
12263
+ scope: "#/properties/testPhone",
12264
+ type: "Control",
12265
+ options: {
12266
+ widget: "PhoneInput"
12267
+ },
12268
+ config: {
12269
+ layout: { xs: 6, sm: 6, md: 4, lg: 3 },
12270
+ main: {
12271
+ defaultCountry: "in",
12272
+ label: "Phone"
12273
+ }
12274
+ }
12275
+ };
12276
+ const buildPhoneInputField = (config2, componentScope2) => {
12277
+ const phonInputField = _.cloneDeep(PhoneInput);
12278
+ phonInputField.config.main.label = config2.label;
12279
+ if (config2.style) {
12280
+ phonInputField.config.style = JSON.parse(config2.style);
12281
+ }
12282
+ if (config2.InputFormatingAndMasking) {
12283
+ phonInputField.config.main.formatStrArray = config2.InputFormatingAndMasking.map((e) => e.formatElement);
12284
+ }
12285
+ if (config2.placeholder) {
12286
+ phonInputField.config.main.placeholder = config2.placeholder;
12287
+ }
12288
+ if (config2.layout) {
12289
+ phonInputField.config.layout = createLayoutFormat(config2.layout);
12290
+ }
12291
+ phonInputField.config.main.errorMessage = `${config2.name} is empty or invalid`;
12292
+ phonInputField.scope = componentScope2;
12293
+ return phonInputField;
12294
+ };
12261
12295
  let schema = {
12262
12296
  type: "object",
12263
12297
  properties: {},
@@ -12512,6 +12546,9 @@ const buildUiSchema = (config2, store2) => {
12512
12546
  case "Thought":
12513
12547
  elements = buildThoughtOfTheDay(config2, componentScope2);
12514
12548
  break;
12549
+ case "PhoneInput":
12550
+ elements = buildPhoneInputField(config2, componentScope2);
12551
+ break;
12515
12552
  default:
12516
12553
  schema = {
12517
12554
  type: "object",