impaktapps-ui-builder 0.0.409-h → 0.0.409-j

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.
@@ -5911,13 +5911,16 @@ const ComponentSchema = {
5911
5911
  { title: "Text Area", const: "TextArea" },
5912
5912
  { title: "Timer", const: "Timer" },
5913
5913
  { title: "Upload File", const: "UploadFile" },
5914
- { title: "Text Area", const: "TextArea" },
5915
5914
  { title: "Timer", const: "Timer" },
5916
5915
  { title: "Upload File", const: "UploadFile" },
5916
+ { title: "TreeMap", const: "TreeMap" }
5917
+ ]
5918
+ },
5919
+ columnFormat: {
5920
+ oneOf: [
5917
5921
  { title: "Date Column", const: "date" },
5918
5922
  { title: "DateTime Column", const: "dateTime" },
5919
- { title: "Amount Column", const: "amount" },
5920
- { title: "TreeMap", const: "TreeMap" }
5923
+ { title: "Amount Column", const: "amount" }
5921
5924
  ]
5922
5925
  },
5923
5926
  orientation: {
@@ -6311,6 +6314,45 @@ const componentBasicUiSchema = {
6311
6314
  }
6312
6315
  }
6313
6316
  },
6317
+ {
6318
+ type: "Control",
6319
+ scope: "#/properties/parent",
6320
+ options: {
6321
+ widget: "InputField"
6322
+ },
6323
+ config: {
6324
+ layout: {
6325
+ xs: 12,
6326
+ sm: 12,
6327
+ md: 6,
6328
+ lg: 6
6329
+ },
6330
+ main: {
6331
+ label: "parent",
6332
+ options: [],
6333
+ color: "secondary",
6334
+ required: true
6335
+ }
6336
+ }
6337
+ },
6338
+ {
6339
+ type: "Control",
6340
+ scope: "#/properties/columnFormat",
6341
+ options: {
6342
+ widget: "SelectInputField"
6343
+ },
6344
+ config: {
6345
+ layout: {
6346
+ xs: 11,
6347
+ sm: 11,
6348
+ md: 5.5,
6349
+ lg: 5.5
6350
+ },
6351
+ main: {
6352
+ label: "Column Format"
6353
+ }
6354
+ }
6355
+ },
6314
6356
  {
6315
6357
  type: "Control",
6316
6358
  scope: "#/properties/proc",
@@ -6505,6 +6547,45 @@ const CoreSection = {
6505
6547
  }
6506
6548
  }
6507
6549
  },
6550
+ {
6551
+ type: "Control",
6552
+ scope: "#/properties/parent",
6553
+ options: {
6554
+ widget: "InputField"
6555
+ },
6556
+ config: {
6557
+ layout: {
6558
+ xs: 12,
6559
+ sm: 12,
6560
+ md: 6,
6561
+ lg: 6
6562
+ },
6563
+ main: {
6564
+ label: "parent",
6565
+ options: [],
6566
+ color: "secondary",
6567
+ required: true
6568
+ }
6569
+ }
6570
+ },
6571
+ {
6572
+ type: "Control",
6573
+ scope: "#/properties/columnFormat",
6574
+ options: {
6575
+ widget: "SelectInputField"
6576
+ },
6577
+ config: {
6578
+ layout: {
6579
+ xs: 11,
6580
+ sm: 11,
6581
+ md: 5.5,
6582
+ lg: 5.5
6583
+ },
6584
+ main: {
6585
+ label: "Column Format"
6586
+ }
6587
+ }
6588
+ },
6508
6589
  {
6509
6590
  type: "Control",
6510
6591
  scope: "#/properties/proc",
@@ -8770,7 +8851,6 @@ var service = (funcParams) => {
8770
8851
  onCellRenderer: (cellParams) => {
8771
8852
  var _a;
8772
8853
  let finalResponse = {};
8773
- cellParams.spanRef.current.style.color = "yellow";
8774
8854
  const path = ((_a = funcParams.dynamicData) == null ? void 0 : _a.tableButtonPath) || funcParams.dynamicData.path.split(".")[0];
8775
8855
  for (const eventConfig of eventGroups == null ? void 0 : eventGroups.onCellRenderer[path]) {
8776
8856
  executeEventsParameters.store.functionParameters = cellParams;
@@ -11140,23 +11220,7 @@ const buildUiSchema = (config) => {
11140
11220
  sizeMap[e.keyName] = e.value;
11141
11221
  });
11142
11222
  }
11143
- elements.elements = config.elements.map((e, elemInd) => {
11144
- if (e.type && e.type !== "date" && e.type !== "dateTime" && e.type !== "amount") {
11145
- return {
11146
- accessorKey: e.name,
11147
- header: e.label || e.name,
11148
- size: sizeMap[e.name] || 180,
11149
- type: e.type,
11150
- widget: buildUiSchema(e)
11151
- };
11152
- }
11153
- return {
11154
- type: e.type,
11155
- accessorKey: e.name,
11156
- header: e.label || e.name,
11157
- size: sizeMap[e.name] || 180
11158
- };
11159
- });
11223
+ elements.elements = transformConfigToOutput(config, sizeMap);
11160
11224
  } else if (config.type == "Array") {
11161
11225
  elements.options.detail.elements = config.elements.map((e, elemInd) => {
11162
11226
  return buildUiSchema(e);
@@ -11169,5 +11233,48 @@ const buildUiSchema = (config) => {
11169
11233
  }
11170
11234
  return elements;
11171
11235
  };
11236
+ function nodeProvider(element, sizeMap) {
11237
+ if (element.type) {
11238
+ return {
11239
+ accessorKey: element.name,
11240
+ type: element.columnFormat,
11241
+ header: element.label || element.name,
11242
+ size: sizeMap[element.name] || 180,
11243
+ widget: buildUiSchema(element)
11244
+ };
11245
+ }
11246
+ return {
11247
+ accessorKey: element.name,
11248
+ type: element.columnFormat,
11249
+ header: element.label || element.name,
11250
+ size: sizeMap[element.name] || 180
11251
+ };
11252
+ }
11253
+ function buildHierarchy(elements, parentName = null, sizeMap) {
11254
+ const result = [];
11255
+ for (const element of elements) {
11256
+ if ((element == null ? void 0 : element.parent) === parentName) {
11257
+ const children = buildHierarchy(elements, element.name, sizeMap);
11258
+ const node = nodeProvider(element, sizeMap);
11259
+ if (children.length > 0) {
11260
+ node.columns = children;
11261
+ node.type = "group";
11262
+ }
11263
+ result.push(node);
11264
+ }
11265
+ }
11266
+ return result;
11267
+ }
11268
+ function transformConfigToOutput(config, sizeMap) {
11269
+ const output = [];
11270
+ const hierarchy = buildHierarchy(config.elements, config.name, schema);
11271
+ for (const element of config.elements) {
11272
+ const parentExists = config.elements.some((e) => e.name === element.parent);
11273
+ if (!parentExists && element.parent !== config.name) {
11274
+ output.push(nodeProvider(element, sizeMap));
11275
+ }
11276
+ }
11277
+ return [...hierarchy, ...output];
11278
+ }
11172
11279
  export { buildConfig, buildSchema, buildUiSchema, clearFromLocalStorage, pageMaster, Component as pageMasterComponents, event as pageMasterEvents, service as pageService, schema };
11173
11280
  //# sourceMappingURL=impaktapps-ui-builder.es.js.map