@apexcura/ui-components 0.0.11-Beta100 → 0.0.11-Beta102

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/index.d.mts CHANGED
@@ -24,6 +24,8 @@ type ElementType = {
24
24
  thead?: any[];
25
25
  tbody?: any[];
26
26
  variable_data?: any[];
27
+ optionType?: string;
28
+ selectedClassName?: string;
27
29
  };
28
30
 
29
31
  interface ElementExecuterProps$3 extends ElementType {
package/dist/index.d.ts CHANGED
@@ -24,6 +24,8 @@ type ElementType = {
24
24
  thead?: any[];
25
25
  tbody?: any[];
26
26
  variable_data?: any[];
27
+ optionType?: string;
28
+ selectedClassName?: string;
27
29
  };
28
30
 
29
31
  interface ElementExecuterProps$3 extends ElementType {
package/dist/index.js CHANGED
@@ -189,6 +189,10 @@ var import_react6 = __toESM(require("react"));
189
189
  var import_antd6 = require("antd");
190
190
  var RadioElement = (props) => {
191
191
  const [isDisabled, setIsDisabled] = (0, import_react6.useState)(props.disabled);
192
+ let optionType;
193
+ if (props.optionType === "button") {
194
+ optionType = props.optionType;
195
+ }
192
196
  const handleChange = (e) => {
193
197
  if (props.onChange) {
194
198
  const selectedVal = e.target.value;
@@ -202,7 +206,9 @@ var RadioElement = (props) => {
202
206
  {
203
207
  options: props.options,
204
208
  onChange: handleChange,
205
- disabled: isDisabled
209
+ disabled: isDisabled,
210
+ optionType,
211
+ className: props.classNames
206
212
  }
207
213
  );
208
214
  };
@@ -445,9 +451,9 @@ var AddMoreTable = (props) => {
445
451
  return null;
446
452
  const { element: type, label } = element;
447
453
  if (type === "single-select") {
448
- return /* @__PURE__ */ import_react13.default.createElement(SingleSelectElement, { onChange: (value2) => console.log(label, value2) });
454
+ return /* @__PURE__ */ import_react13.default.createElement(SingleSelectElement, { onChange: (value2) => console.log(label, value2), optionType: "" });
449
455
  } else if (type === "textarea") {
450
- return /* @__PURE__ */ import_react13.default.createElement(TextareaElement, { onChange: (value2) => console.log(label, value2) });
456
+ return /* @__PURE__ */ import_react13.default.createElement(TextareaElement, { onChange: (value2) => console.log(label, value2), optionType: "" });
451
457
  } else {
452
458
  return null;
453
459
  }
@@ -455,7 +461,11 @@ var AddMoreTable = (props) => {
455
461
  const dataSource = rows.map((eachRow, rowIndex) => {
456
462
  const rowData = {
457
463
  key: eachRow.id,
458
- "#": rowIndex + 1
464
+ "#": rowIndex + 1,
465
+ "Medicine": renderInputElement({
466
+ element: eachRow.element,
467
+ label: eachRow.label
468
+ })
459
469
  };
460
470
  rowData["Medicine"] = renderInputElement(eachRow.variable_data[0].Medicine);
461
471
  eachRow.variable_data.map((variable, subIndex) => {
package/dist/index.mjs CHANGED
@@ -142,6 +142,10 @@ import React6, { useState as useState2 } from "react";
142
142
  import { Radio } from "antd";
143
143
  var RadioElement = (props) => {
144
144
  const [isDisabled, setIsDisabled] = useState2(props.disabled);
145
+ let optionType;
146
+ if (props.optionType === "button") {
147
+ optionType = props.optionType;
148
+ }
145
149
  const handleChange = (e) => {
146
150
  if (props.onChange) {
147
151
  const selectedVal = e.target.value;
@@ -155,7 +159,9 @@ var RadioElement = (props) => {
155
159
  {
156
160
  options: props.options,
157
161
  onChange: handleChange,
158
- disabled: isDisabled
162
+ disabled: isDisabled,
163
+ optionType,
164
+ className: props.classNames
159
165
  }
160
166
  );
161
167
  };
@@ -398,9 +404,9 @@ var AddMoreTable = (props) => {
398
404
  return null;
399
405
  const { element: type, label } = element;
400
406
  if (type === "single-select") {
401
- return /* @__PURE__ */ React12.createElement(SingleSelectElement, { onChange: (value2) => console.log(label, value2) });
407
+ return /* @__PURE__ */ React12.createElement(SingleSelectElement, { onChange: (value2) => console.log(label, value2), optionType: "" });
402
408
  } else if (type === "textarea") {
403
- return /* @__PURE__ */ React12.createElement(TextareaElement, { onChange: (value2) => console.log(label, value2) });
409
+ return /* @__PURE__ */ React12.createElement(TextareaElement, { onChange: (value2) => console.log(label, value2), optionType: "" });
404
410
  } else {
405
411
  return null;
406
412
  }
@@ -408,7 +414,11 @@ var AddMoreTable = (props) => {
408
414
  const dataSource = rows.map((eachRow, rowIndex) => {
409
415
  const rowData = {
410
416
  key: eachRow.id,
411
- "#": rowIndex + 1
417
+ "#": rowIndex + 1,
418
+ "Medicine": renderInputElement({
419
+ element: eachRow.element,
420
+ label: eachRow.label
421
+ })
412
422
  };
413
423
  rowData["Medicine"] = renderInputElement(eachRow.variable_data[0].Medicine);
414
424
  eachRow.variable_data.map((variable, subIndex) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apexcura/ui-components",
3
- "version": "0.0.11-Beta100",
3
+ "version": "0.0.11-Beta102",
4
4
  "description": "Apex cura React components library",
5
5
  "keywords": [
6
6
  "apex cura",