@apexcura/ui-components 0.0.12-Beta29 → 0.0.12-Beta30
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.js +9 -5
- package/dist/index.mjs +12 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -137,7 +137,6 @@ var TextareaElement = (props) => {
|
|
|
137
137
|
disabled: props.disabled,
|
|
138
138
|
id: props.name,
|
|
139
139
|
status: props.status,
|
|
140
|
-
style: props.styles,
|
|
141
140
|
className: props.classNames,
|
|
142
141
|
variant: props.variant,
|
|
143
142
|
name: props.name,
|
|
@@ -193,6 +192,9 @@ var RadioElement = (props) => {
|
|
|
193
192
|
if (props.optionType === "button") {
|
|
194
193
|
optionType = props.optionType;
|
|
195
194
|
}
|
|
195
|
+
(0, import_react6.useEffect)(() => {
|
|
196
|
+
setIsDisabled(props.disabled);
|
|
197
|
+
}, [props.disabled]);
|
|
196
198
|
const handleChange = (e) => {
|
|
197
199
|
const selectedVal = e.target.value;
|
|
198
200
|
const selectedOptions = [{ id: selectedVal, value: selectedVal }];
|
|
@@ -209,16 +211,18 @@ var RadioElement = (props) => {
|
|
|
209
211
|
import_antd6.Radio.Group,
|
|
210
212
|
{
|
|
211
213
|
onChange: handleChange,
|
|
212
|
-
disabled: isDisabled,
|
|
213
214
|
optionType,
|
|
214
|
-
className: props.className ? props.className : ""
|
|
215
|
+
className: props.className ? props.className : "",
|
|
216
|
+
value: selectedValue
|
|
215
217
|
},
|
|
216
218
|
props.options && props.options.map((option) => /* @__PURE__ */ import_react6.default.createElement(
|
|
217
219
|
import_antd6.Radio,
|
|
218
220
|
{
|
|
219
221
|
key: option.value,
|
|
220
222
|
value: option.value,
|
|
221
|
-
|
|
223
|
+
disabled: isDisabled && selectedValue !== option.value,
|
|
224
|
+
className: getButtonStyle(option),
|
|
225
|
+
style: { pointerEvents: isDisabled && selectedValue !== option.value ? "none" : "auto" }
|
|
222
226
|
},
|
|
223
227
|
option.label
|
|
224
228
|
))
|
|
@@ -387,7 +391,7 @@ var ButtonElement = (props) => {
|
|
|
387
391
|
const handleClick = typeof props.action === "string" ? () => {
|
|
388
392
|
console.log("Performing action:", props.action);
|
|
389
393
|
} : props.action;
|
|
390
|
-
return /* @__PURE__ */ import_react12.default.createElement(import_antd10.Flex, null, /* @__PURE__ */ import_react12.default.createElement(import_antd10.Button, { onClick: handleClick, className: props.className }, props.
|
|
394
|
+
return /* @__PURE__ */ import_react12.default.createElement(import_antd10.Flex, null, /* @__PURE__ */ import_react12.default.createElement(import_antd10.Button, { onClick: handleClick, className: props.className }, props.label));
|
|
391
395
|
};
|
|
392
396
|
|
|
393
397
|
// src/Components/AddMoreTable.tsx
|
package/dist/index.mjs
CHANGED
|
@@ -90,7 +90,6 @@ var TextareaElement = (props) => {
|
|
|
90
90
|
disabled: props.disabled,
|
|
91
91
|
id: props.name,
|
|
92
92
|
status: props.status,
|
|
93
|
-
style: props.styles,
|
|
94
93
|
className: props.classNames,
|
|
95
94
|
variant: props.variant,
|
|
96
95
|
name: props.name,
|
|
@@ -137,7 +136,7 @@ var SelectElement = (props) => {
|
|
|
137
136
|
};
|
|
138
137
|
|
|
139
138
|
// src/Components/RadioElement.tsx
|
|
140
|
-
import React6, { useState as useState2 } from "react";
|
|
139
|
+
import React6, { useState as useState2, useEffect } from "react";
|
|
141
140
|
import { Radio } from "antd";
|
|
142
141
|
var RadioElement = (props) => {
|
|
143
142
|
const [isDisabled, setIsDisabled] = useState2(props.disabled);
|
|
@@ -146,6 +145,9 @@ var RadioElement = (props) => {
|
|
|
146
145
|
if (props.optionType === "button") {
|
|
147
146
|
optionType = props.optionType;
|
|
148
147
|
}
|
|
148
|
+
useEffect(() => {
|
|
149
|
+
setIsDisabled(props.disabled);
|
|
150
|
+
}, [props.disabled]);
|
|
149
151
|
const handleChange = (e) => {
|
|
150
152
|
const selectedVal = e.target.value;
|
|
151
153
|
const selectedOptions = [{ id: selectedVal, value: selectedVal }];
|
|
@@ -162,16 +164,18 @@ var RadioElement = (props) => {
|
|
|
162
164
|
Radio.Group,
|
|
163
165
|
{
|
|
164
166
|
onChange: handleChange,
|
|
165
|
-
disabled: isDisabled,
|
|
166
167
|
optionType,
|
|
167
|
-
className: props.className ? props.className : ""
|
|
168
|
+
className: props.className ? props.className : "",
|
|
169
|
+
value: selectedValue
|
|
168
170
|
},
|
|
169
171
|
props.options && props.options.map((option) => /* @__PURE__ */ React6.createElement(
|
|
170
172
|
Radio,
|
|
171
173
|
{
|
|
172
174
|
key: option.value,
|
|
173
175
|
value: option.value,
|
|
174
|
-
|
|
176
|
+
disabled: isDisabled && selectedValue !== option.value,
|
|
177
|
+
className: getButtonStyle(option),
|
|
178
|
+
style: { pointerEvents: isDisabled && selectedValue !== option.value ? "none" : "auto" }
|
|
175
179
|
},
|
|
176
180
|
option.label
|
|
177
181
|
))
|
|
@@ -340,11 +344,11 @@ var ButtonElement = (props) => {
|
|
|
340
344
|
const handleClick = typeof props.action === "string" ? () => {
|
|
341
345
|
console.log("Performing action:", props.action);
|
|
342
346
|
} : props.action;
|
|
343
|
-
return /* @__PURE__ */ React11.createElement(Flex2, null, /* @__PURE__ */ React11.createElement(Button2, { onClick: handleClick, className: props.className }, props.
|
|
347
|
+
return /* @__PURE__ */ React11.createElement(Flex2, null, /* @__PURE__ */ React11.createElement(Button2, { onClick: handleClick, className: props.className }, props.label));
|
|
344
348
|
};
|
|
345
349
|
|
|
346
350
|
// src/Components/AddMoreTable.tsx
|
|
347
|
-
import React12, { useEffect, useState as useState4 } from "react";
|
|
351
|
+
import React12, { useEffect as useEffect2, useState as useState4 } from "react";
|
|
348
352
|
import { Table, Button as Button3 } from "antd";
|
|
349
353
|
import { PlusOutlined, DeleteOutlined } from "@ant-design/icons";
|
|
350
354
|
var AddMoreTable = (props) => {
|
|
@@ -413,7 +417,7 @@ var AddMoreTable = (props) => {
|
|
|
413
417
|
});
|
|
414
418
|
});
|
|
415
419
|
};
|
|
416
|
-
|
|
420
|
+
useEffect2(() => {
|
|
417
421
|
console.log(rows);
|
|
418
422
|
}, [rows]);
|
|
419
423
|
const renderInputElement = (element, value) => {
|