@agilant/toga-blox 1.0.318-beta.13 → 1.0.318-beta.15
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/components/AdvancedSelect/AdvancedSelect.js +1 -1
- package/dist/components/AdvancedSelect/AdvancedSelect.module.css +19 -18
- package/dist/components/BaseAddress/BaseAddress.module.css +1 -2
- package/dist/components/BaseDetailField/BaseDetailField.js +2 -2
- package/dist/components/BaseDetailField/BaseDetailField.module.css +2 -3
- package/dist/components/BaseDetailField/renderBaseDetailFieldLabel.d.ts +1 -1
- package/dist/components/BaseDetailField/renderBaseDetailFieldLabel.js +4 -2
- package/dist/components/BaseDetailField/types.d.ts +1 -0
- package/dist/components/BaseInput/BaseCheckbox.d.ts +1 -0
- package/dist/components/BaseInput/BaseCheckbox.js +2 -37
- package/dist/components/BaseInput/BaseInput.js +9 -14
- package/dist/components/BaseInput/BaseInput.module.css +307 -342
- package/dist/components/BaseInput/BaseInput.types.d.ts +1 -0
- package/dist/components/BaseInput/BaseRadio.d.ts +1 -0
- package/dist/components/BaseInput/BaseRadio.js +2 -2
- package/dist/components/BaseInput/BaseTextInput.d.ts +1 -0
- package/dist/components/BaseInput/BaseTextInput.js +21 -8
- package/dist/components/BaseInput/BaseTextareaInput.d.ts +1 -0
- package/dist/components/BaseInput/BaseTextareaInput.js +2 -2
- package/dist/components/BaseInput/BaseToggle.d.ts +1 -0
- package/dist/components/BaseInput/BaseToggle.js +2 -2
- package/dist/components/BaseInput/DisabledSelect.js +1 -5
- package/dist/components/BaseToolTip/BaseToolTip.module.css +5 -2
- package/dist/components/BaseTotals/BaseTotals.js +6 -2
- package/dist/components/BaseTotals/BaseTotals.module.css +17 -2
- package/dist/components/BaseTotals/types.d.ts +4 -1
- package/dist/components/EnvironmentBadge/EnvironmentBadge.css +55 -0
- package/dist/components/EnvironmentBadge/EnvironmentBadge.d.ts +4 -0
- package/dist/components/EnvironmentBadge/EnvironmentBadge.js +19 -0
- package/dist/components/EnvironmentBadge/index.d.ts +1 -0
- package/dist/components/EnvironmentBadge/index.js +1 -0
- package/dist/components/Table/components/cellTypes/CopyableCell.d.ts +2 -1
- package/dist/components/Table/components/cellTypes/CopyableCell.js +4 -3
- package/dist/components/Table/components/cellTypes/ImageCell.d.ts +4 -0
- package/dist/components/Table/components/cellTypes/ImageCell.js +4 -0
- package/dist/components/Table/hooks/index.d.ts +1 -0
- package/dist/components/Table/hooks/index.js +1 -0
- package/dist/components/Table/hooks/useAssignTableFieldLabels.d.ts +16 -0
- package/dist/components/Table/hooks/useAssignTableFieldLabels.js +39 -0
- package/dist/components/Table/index.d.ts +1 -0
- package/dist/components/Table/index.js +1 -0
- package/dist/components/Table/themeConfig/toga.module.css +39 -0
- package/dist/components/Table/utils/buildTanstackColumns.js +26 -6
- package/dist/components/Table/utils/resolveCellType.d.ts +1 -1
- package/dist/components/Table/utils/resolveCellType.js +13 -9
- package/dist/components/TableRecordModal/TableRecordModal.d.ts +2 -1
- package/dist/components/TableRecordModal/TableRecordModal.js +2 -2
- package/dist/components/TableRecordModal/tableRecordModal.module.css +105 -115
- package/dist/components/ToggleButton/ToggleButton.js +2 -2
- package/dist/components/ToggleButton/ToggleButton.module.css +15 -7
- package/dist/components/ToggleButton/ToggleButton.types.d.ts +1 -0
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +1 -1
- package/dist/main.css +1 -3
- package/dist/reactQuery/queryHelpers.js +8 -4
- package/dist/templates/AddNotes/AddNotes.module.css +5 -1
- package/dist/templates/PrimaryTable/PrimaryTable.js +1 -1
- package/dist/utils/getEndpointFromEnvironment.d.ts +18 -0
- package/dist/utils/getEndpointFromEnvironment.js +46 -0
- package/package.json +1 -1
- package/dist/components/BaseInput/BaseCheckBox.module.css +0 -48
- package/dist/components/ModalTag/ModalTag.d.ts +0 -4
- package/dist/components/ModalTag/ModalTag.js +0 -9
- package/dist/components/ModalTag/ModalTag.module.css +0 -22
- package/dist/components/ModalTag/index.d.ts +0 -3
- package/dist/components/ModalTag/index.js +0 -2
- package/dist/components/ModalTag/types.d.ts +0 -7
- package/dist/components/ModalTag/types.js +0 -1
|
@@ -239,7 +239,7 @@ function AdvancedSelect(props) {
|
|
|
239
239
|
}, onFocus: openMenu, onKeyDown: onKeyDown })] }), _jsxs("div", { className: classes.indicators, children: [hasAnyValue && (_jsx("button", { type: "button", className: classes.indicatorBtn, disabled: disabled, onClick: (e) => {
|
|
240
240
|
e.stopPropagation();
|
|
241
241
|
clearAll();
|
|
242
|
-
}, "aria-label": "Clear", children: getFontAwesomeIcon("xmark", "regular") })), _jsx("button", { type: "button", className: classes.indicatorBtn, disabled: disabled, onClick: (e) => {
|
|
242
|
+
}, "aria-label": "Clear", children: _jsx("span", { className: classes.clearSingleInput, children: getFontAwesomeIcon("xmark", "regular") }) })), _jsx("button", { type: "button", className: classes.indicatorBtn, disabled: disabled, onClick: (e) => {
|
|
243
243
|
e.stopPropagation();
|
|
244
244
|
if (open)
|
|
245
245
|
closeMenu();
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
|
|
28
28
|
&.multi {
|
|
29
29
|
min-height: var(--advancedSelect-row-min-height);
|
|
30
|
+
padding: var(--advancedSelect-row-padding);
|
|
30
31
|
}
|
|
31
32
|
|
|
32
33
|
&:hover {
|
|
@@ -161,7 +162,7 @@
|
|
|
161
162
|
|
|
162
163
|
.input::placeholder {
|
|
163
164
|
color: var(--baseInput-placeholder-text-default);
|
|
164
|
-
font-size: var(--baseInput-font-size-
|
|
165
|
+
font-size: var(--baseInput-font-size-default, 0.875rem);
|
|
165
166
|
}
|
|
166
167
|
|
|
167
168
|
.chip {
|
|
@@ -172,8 +173,12 @@
|
|
|
172
173
|
border-radius: var(--baseInputMultiSelect-border-radius, 0.25rem);
|
|
173
174
|
background: var(--baseInputMultiSelect-bg-default);
|
|
174
175
|
color: var(--baseInputMultiSelect-text-default);
|
|
175
|
-
font-size: var(--baseInput-font-size-
|
|
176
|
+
font-size: var(--baseInput-font-size-default, 0.875rem);
|
|
176
177
|
line-height: 1.2;
|
|
178
|
+
|
|
179
|
+
&:hover {
|
|
180
|
+
background: var(--baseInputMultiSelect-bg-hover);
|
|
181
|
+
}
|
|
177
182
|
}
|
|
178
183
|
|
|
179
184
|
.chipRemove {
|
|
@@ -182,18 +187,9 @@
|
|
|
182
187
|
justify-content: center;
|
|
183
188
|
background: transparent;
|
|
184
189
|
border: none;
|
|
185
|
-
padding:
|
|
190
|
+
padding: 1px;
|
|
186
191
|
cursor: pointer;
|
|
187
192
|
color: inherit;
|
|
188
|
-
opacity: 0.7;
|
|
189
|
-
|
|
190
|
-
svg {
|
|
191
|
-
color: #FFF;
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
.chipRemove:hover {
|
|
196
|
-
opacity: 1;
|
|
197
193
|
}
|
|
198
194
|
|
|
199
195
|
.indicators {
|
|
@@ -210,16 +206,20 @@
|
|
|
210
206
|
background: transparent;
|
|
211
207
|
border: none;
|
|
212
208
|
cursor: pointer;
|
|
213
|
-
color: var(--baseInput-dropdownIndicator-default);
|
|
209
|
+
color: var(--baseInput-dropdownIndicator-text-default);
|
|
214
210
|
line-height: 1;
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
color:
|
|
211
|
+
|
|
212
|
+
&:hover {
|
|
213
|
+
color: var(--baseInput-dropdownIndicator-text-focusAndHover);
|
|
218
214
|
}
|
|
219
215
|
}
|
|
220
216
|
|
|
221
|
-
.
|
|
222
|
-
color: var(--baseInput-
|
|
217
|
+
.clearSingleInput {
|
|
218
|
+
color: var(--baseInput-clearIndicator-text-default);
|
|
219
|
+
|
|
220
|
+
&:hover {
|
|
221
|
+
color: var(--baseInput-clearIndicator-text-hover);
|
|
222
|
+
}
|
|
223
223
|
}
|
|
224
224
|
|
|
225
225
|
.indicatorBtn:disabled {
|
|
@@ -298,6 +298,7 @@
|
|
|
298
298
|
border-radius: var(--baseInputOptionCheckbox-border-radius);
|
|
299
299
|
border: var(--baseInputOptionCheckbox-border);
|
|
300
300
|
padding: var(--baseInputOptionCheckbox-padding);
|
|
301
|
+
flex-shrink: 0;
|
|
301
302
|
cursor: pointer;
|
|
302
303
|
}
|
|
303
304
|
|
|
@@ -5,10 +5,10 @@ import renderBaseDetailFieldLabel from "./renderBaseDetailFieldLabel.js";
|
|
|
5
5
|
import styles from "./BaseDetailField.module.css";
|
|
6
6
|
const IconWrapper = ({ icon, weight, }) => (_jsx("div", { className: styles.icon, children: getFontAwesomeIcon(icon, weight ?? "regular") }));
|
|
7
7
|
const ValueImage = ({ src, alt }) => (_jsx("div", { className: styles.valueImage, children: _jsx("img", { src: src, alt: alt || "" }) }));
|
|
8
|
-
const BaseDetailField = ({ dataItem, field, allFields, allData, iconStyle = "solid", isDisabled, dataTestId, currencyCharacter, labelSuffixValue, showSecondValue, }) => {
|
|
8
|
+
const BaseDetailField = ({ dataItem, field, allFields, allData, iconStyle = "solid", isDisabled, dataTestId, currencyCharacter, labelSuffixValue, showSecondValue, dtLabelClassName }) => {
|
|
9
9
|
if (!field)
|
|
10
10
|
return null;
|
|
11
11
|
const { uuid, hasBottomBorder, hasTopBorder, hideLabel, hasValueLeftIconOne, valueIconOneWeight, hasValueLeftIconTwo, valueIconTwoWeight, hasValueImage, valueImageAlt, hasValueRightIcon, valueType, colSpan, } = field;
|
|
12
|
-
return (_jsx("div", { className: styles.container, style: { "--field-col-span": colSpan ?? 1 }, "data-testid": dataTestId ?? "base-detail-field", "data-disabled": isDisabled || undefined, "data-has-bottom-border": hasBottomBorder || undefined, "data-has-top-border": hasTopBorder || undefined, children: _jsxs("dl", { className: styles.inner, children: [_jsx("dt", { className: hideLabel ? styles.labelHidden : styles.label, children: renderBaseDetailFieldLabel(field, labelSuffixValue) }), _jsxs("dd", { className: styles.value, children: [hasValueLeftIconOne && (_jsx(IconWrapper, { icon: hasValueLeftIconOne, weight: valueIconOneWeight })), hasValueLeftIconTwo && (_jsx(IconWrapper, { icon: hasValueLeftIconTwo, weight: valueIconTwoWeight })), hasValueImage && dataItem !== "—" && (_jsx(ValueImage, { src: hasValueImage, alt: valueImageAlt })), renderBaseDetailFieldValue(field, dataItem, isDisabled, allFields, allData, currencyCharacter, showSecondValue), hasValueRightIcon && (_jsx(IconWrapper, { icon: hasValueRightIcon, weight: iconStyle }))] })] }) }, uuid));
|
|
12
|
+
return (_jsx("div", { className: styles.container, style: { "--field-col-span": colSpan ?? 1 }, "data-testid": dataTestId ?? "base-detail-field", "data-disabled": isDisabled || undefined, "data-has-bottom-border": hasBottomBorder || undefined, "data-has-top-border": hasTopBorder || undefined, children: _jsxs("dl", { className: styles.inner, children: [_jsx("dt", { className: hideLabel ? styles.labelHidden : styles.label, children: renderBaseDetailFieldLabel(field, labelSuffixValue, dtLabelClassName) }), _jsxs("dd", { className: styles.value, children: [hasValueLeftIconOne && (_jsx(IconWrapper, { icon: hasValueLeftIconOne, weight: valueIconOneWeight })), hasValueLeftIconTwo && (_jsx(IconWrapper, { icon: hasValueLeftIconTwo, weight: valueIconTwoWeight })), hasValueImage && dataItem !== "—" && (_jsx(ValueImage, { src: hasValueImage, alt: valueImageAlt })), renderBaseDetailFieldValue(field, dataItem, isDisabled, allFields, allData, currencyCharacter, showSecondValue), hasValueRightIcon && (_jsx(IconWrapper, { icon: hasValueRightIcon, weight: iconStyle }))] })] }) }, uuid));
|
|
13
13
|
};
|
|
14
14
|
export default BaseDetailField;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
.inner {
|
|
9
9
|
display: flex;
|
|
10
|
-
gap:
|
|
10
|
+
gap: var(--field-label-gap, 2px);
|
|
11
11
|
width: 100%;
|
|
12
12
|
flex-wrap: wrap;
|
|
13
13
|
flex-direction: var(--field-flex-direction, row);
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
white-space: var(--field-label-white-space, nowrap);
|
|
30
30
|
color: var(--field-label-color, inherit);
|
|
31
31
|
font-size: var(--field-label-font-size, 0.875rem);
|
|
32
|
-
font-family: var(--field-label-fontFamily-default, inherit)
|
|
32
|
+
font-family: var(--field-label-fontFamily-default, inherit);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
.labelHidden {
|
|
@@ -126,7 +126,6 @@
|
|
|
126
126
|
pointer-events: none;
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
|
|
130
129
|
.labelWithBadge {
|
|
131
130
|
display: flex;
|
|
132
131
|
align-items: center;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { FieldConfig } from "../DetailSection/types.js";
|
|
2
|
-
declare const renderBaseDetailFieldLabel: (field: FieldConfig, labelSuffixValue?: string) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const renderBaseDetailFieldLabel: (field: FieldConfig, labelSuffixValue?: string, dtLabelClassName?: string) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default renderBaseDetailFieldLabel;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
// renderBaseDetailFieldLabel.tsx
|
|
3
|
+
import clsx from "clsx";
|
|
2
4
|
import { BaseToolTip } from "../index.js";
|
|
3
5
|
// import { renderBadge } from "../../utils/index.js";
|
|
4
6
|
import styles from "./BaseDetailField.module.css";
|
|
5
|
-
const renderBaseDetailFieldLabel = (field, labelSuffixValue) => {
|
|
7
|
+
const renderBaseDetailFieldLabel = (field, labelSuffixValue, dtLabelClassName) => {
|
|
6
8
|
const { label, labelSuffix, labelTooltip } = field || {};
|
|
7
9
|
const labelHasBadge = labelSuffix?.type === "badge" && labelSuffixValue;
|
|
8
10
|
if (!label)
|
|
9
11
|
return null;
|
|
10
|
-
return (_jsxs(_Fragment, { children: [_jsx("div", { className: labelHasBadge ? styles.labelWithBadge : styles.label, children: label }), labelTooltip && (_jsx(BaseToolTip, { message: labelTooltip, icon: "circleInfo", toolTipPlacement: "right" }))] }));
|
|
12
|
+
return (_jsxs(_Fragment, { children: [_jsx("div", { className: clsx(labelHasBadge ? styles.labelWithBadge : styles.label, dtLabelClassName), children: label }), labelTooltip && (_jsx(BaseToolTip, { message: labelTooltip, icon: "circleInfo", toolTipPlacement: "right" }))] }));
|
|
11
13
|
};
|
|
12
14
|
export default renderBaseDetailFieldLabel;
|
|
@@ -1,46 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// import React from "react";
|
|
3
2
|
import { Controller } from "react-hook-form";
|
|
4
3
|
import styles from "./BaseInput.module.css";
|
|
5
4
|
import clsx from "clsx";
|
|
6
5
|
const BaseCheckbox = (props) => {
|
|
7
|
-
const { control, valueKey, defaultValue, } = props;
|
|
8
|
-
return (_jsx(Controller, { name: valueKey, control: control, defaultValue: defaultValue, render: ({ field }) => (_jsxs("div", { className: styles.checkboxWrapper, children: [_jsx("input", { type: "checkbox", className: clsx(styles.checkbox), id: valueKey, checked: field.value, onChange: (e) => {
|
|
6
|
+
const { control, valueKey, defaultValue, isDisabled, } = props;
|
|
7
|
+
return (_jsx(Controller, { name: valueKey, control: control, defaultValue: defaultValue, render: ({ field }) => (_jsxs("div", { className: styles.checkboxWrapper, children: [_jsx("input", { type: "checkbox", className: clsx(styles.checkbox), disabled: isDisabled, id: valueKey, checked: field.value, onChange: (e) => {
|
|
9
8
|
field.onChange(e.target.checked);
|
|
10
9
|
} }), _jsx("span", { className: styles.checkboxIconWrapper, children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-3.5 w-3.5", viewBox: "0 0 20 20", fill: "currentColor", stroke: "currentColor", strokeWidth: "1", children: _jsx("path", { fillRule: "evenodd", d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z", clipRule: "evenodd" }) }) })] })) }));
|
|
11
10
|
};
|
|
12
|
-
// v2
|
|
13
|
-
// interface CheckboxProps {
|
|
14
|
-
// control: any;
|
|
15
|
-
// defaultValue: boolean;
|
|
16
|
-
// valueKey: string;
|
|
17
|
-
// className?: string;
|
|
18
|
-
// }
|
|
19
|
-
// const BaseCheckbox = ({
|
|
20
|
-
// control,
|
|
21
|
-
// defaultValue,
|
|
22
|
-
// valueKey,
|
|
23
|
-
// className,
|
|
24
|
-
// ...props
|
|
25
|
-
// }: CheckboxProps) => {
|
|
26
|
-
// return (
|
|
27
|
-
// <Controller
|
|
28
|
-
// name={valueKey}
|
|
29
|
-
// control={control}
|
|
30
|
-
// defaultValue={defaultValue}
|
|
31
|
-
// render={({ field }) => (
|
|
32
|
-
// <div className={clsx(styles.checkbox, className)}>
|
|
33
|
-
// <input
|
|
34
|
-
// id={valueKey}
|
|
35
|
-
// name={valueKey}
|
|
36
|
-
// checked={field.value ?? false}
|
|
37
|
-
// type="checkbox"
|
|
38
|
-
// className={clsx(styles.box, className)}
|
|
39
|
-
// onChange={(e) => field.onChange(e.target.checked)}
|
|
40
|
-
// {...props}
|
|
41
|
-
// />
|
|
42
|
-
// </div>
|
|
43
|
-
// )} />
|
|
44
|
-
// );
|
|
45
|
-
// };
|
|
46
11
|
export default BaseCheckbox;
|
|
@@ -10,14 +10,9 @@ import BaseRadioInput from "./BaseRadio.js";
|
|
|
10
10
|
import clsx from "clsx";
|
|
11
11
|
import styles from "./BaseInput.module.css";
|
|
12
12
|
import BaseTextInput from "./BaseTextInput.js";
|
|
13
|
-
const BaseInput = ({ dataItem, field, uuid, dynamicDefaultValue, isArrayValue, onBlur,
|
|
13
|
+
const BaseInput = ({ dataItem, field, uuid, dynamicDefaultValue, isArrayValue, onBlur, valueKey, requireUuidField, afterInputTextClasses, afterInputText, disabledSelectText = "Not Editable", colSpan, toggleTextPosition = "right", toggleAdditionalClasses, toggleHasDivider = false, toggleActiveLabel = "Yes", toggleInactiveLabel = "No", disabled }) => {
|
|
14
14
|
const input = field;
|
|
15
|
-
const {
|
|
16
|
-
const handleInputChange = (inputValue) => {
|
|
17
|
-
if (onSearchChange) {
|
|
18
|
-
onSearchChange(inputValue);
|
|
19
|
-
}
|
|
20
|
-
};
|
|
15
|
+
const { control, watch, getValues, formState: { errors, dirtyFields }, } = useFormContext();
|
|
21
16
|
const getDefaultValue = (dynamicDefaultValue, valueKey) => {
|
|
22
17
|
const value = dynamicDefaultValue ?? getValues(valueKey);
|
|
23
18
|
if (value === undefined || value === null) {
|
|
@@ -61,20 +56,20 @@ const BaseInput = ({ dataItem, field, uuid, dynamicDefaultValue, isArrayValue, o
|
|
|
61
56
|
return (_jsxs("div", { className: clsx(styles.inputAndLabelWrapper, colSpan && getColSpanClass(colSpan)), children: [_jsxs("label", { htmlFor: input.valueKey, className: clsx(styles.label), children: [input.inputLabel, input.isRequired && input.showRequiredIndicator && (_jsx("span", { className: styles.requiredAsterisk, children: "*" }))] }), (() => {
|
|
62
57
|
switch (input.inputType) {
|
|
63
58
|
case "text":
|
|
64
|
-
return (_jsx(BaseTextInput, { uuid: input.uuid, defaultValue: getDefaultValue(dynamicDefaultValue, input.valueKey), control: control, onBlur: onBlur, inputHasLeftIcon: input.inputHasLeftIcon, isRequired: input.isRequired, showRequiredIndicator: input.showRequiredIndicator, valueType: input.valueType, valueKey: input.valueKey, requireUuidField: input.requireUuidField, hasTypeCheck: input.hasTypeCheck, placeholder: input.placeholder, errorMessage: errorMessage, isFieldDirty: isFieldDirty, isFieldError: isFieldError }));
|
|
59
|
+
return (_jsx(BaseTextInput, { uuid: input.uuid, defaultValue: getDefaultValue(dynamicDefaultValue, input.valueKey), control: control, onBlur: onBlur, inputHasLeftIcon: input.inputHasLeftIcon, isRequired: input.isRequired, showRequiredIndicator: input.showRequiredIndicator, valueType: input.valueType, valueKey: input.valueKey, requireUuidField: input.requireUuidField, hasTypeCheck: input.hasTypeCheck, placeholder: input.placeholder, errorMessage: errorMessage, isFieldDirty: isFieldDirty, isFieldError: isFieldError, isDisabled: disabled }));
|
|
65
60
|
case "toggle":
|
|
66
61
|
return (_jsx(BaseToggle, { control: control, valueKey: input.valueKey, defaultValue: dataItem
|
|
67
62
|
? dataItem[input.valueKey]
|
|
68
|
-
: "", toggleTextPosition: toggleTextPosition, toggleAdditionalClasses: toggleAdditionalClasses, toggleHasDivider: toggleHasDivider, toggleActiveLabel: toggleActiveLabel, toggleInactiveLabel: toggleInactiveLabel }));
|
|
63
|
+
: "", toggleTextPosition: toggleTextPosition, toggleAdditionalClasses: toggleAdditionalClasses, toggleHasDivider: toggleHasDivider, toggleActiveLabel: toggleActiveLabel, toggleInactiveLabel: toggleInactiveLabel, isDisabled: disabled }));
|
|
69
64
|
case "textArea":
|
|
70
|
-
return (_jsx(BaseTextareaInput, { watch: watch, control: control, defaultValue: getDefaultValue(dynamicDefaultValue, input.valueKey), valueKey: input.valueKey, errorMessage: errorMessage, isFieldDirty: isFieldDirty, isFieldError: isFieldError, placeholder: input.placeholder, characterLimit: input.characterLimit }));
|
|
65
|
+
return (_jsx(BaseTextareaInput, { watch: watch, control: control, defaultValue: getDefaultValue(dynamicDefaultValue, input.valueKey), valueKey: input.valueKey, errorMessage: errorMessage, isFieldDirty: isFieldDirty, isFieldError: isFieldError, placeholder: input.placeholder, characterLimit: input.characterLimit, isDisabled: disabled }));
|
|
71
66
|
case "disabledSelect":
|
|
72
67
|
return (_jsx(DisabledSelect, { disabledSelectText: disabledSelectText, labelTextClasses: styles.label }));
|
|
73
68
|
case "checkbox":
|
|
74
|
-
return (_jsx(BaseCheckbox, { control: control, valueKey: input.valueKey, defaultValue: getDefaultValue(dynamicDefaultValue, input.valueKey) }));
|
|
69
|
+
return (_jsx(BaseCheckbox, { control: control, valueKey: input.valueKey, defaultValue: getDefaultValue(dynamicDefaultValue, input.valueKey), isDisabled: disabled }));
|
|
75
70
|
case "advancedSelect":
|
|
76
71
|
case "advancedMultiSelect":
|
|
77
|
-
return (_jsx(Controller, { control: control, name: input.valueKey, render: ({ field: rhfField }) => (_jsx(AdvancedSelect, { isFieldDirty: isFieldDirty, isFieldError: isFieldError, mode: input.inputType ===
|
|
72
|
+
return (_jsx(Controller, { control: control, name: input.valueKey, render: ({ field: rhfField }) => (_jsx(AdvancedSelect, { isFieldDirty: isFieldDirty, isFieldError: isFieldError, disabled: disabled, mode: input.inputType ===
|
|
78
73
|
"advancedMultiSelect"
|
|
79
74
|
? "multi"
|
|
80
75
|
: "single", data: input.data ??
|
|
@@ -87,11 +82,11 @@ const BaseInput = ({ dataItem, field, uuid, dynamicDefaultValue, isArrayValue, o
|
|
|
87
82
|
i?.label ??
|
|
88
83
|
String(i)), hasMorePages: input.hasMorePages, isFetchingMore: input.isFetchingMore, fetchMoreData: input.fetchMoreData, findSpecificValue: input.findSpecificValue, placeholder: input.placeholder, valueKey: input.valueKey })) }));
|
|
89
84
|
case "radio":
|
|
90
|
-
return (_jsx(BaseRadioInput, { control: control, valueKey: input.valueKey, defaultValue: getDefaultValue(dynamicDefaultValue, input.valueKey), options: input.options }));
|
|
85
|
+
return (_jsx(BaseRadioInput, { control: control, valueKey: input.valueKey, defaultValue: getDefaultValue(dynamicDefaultValue, input.valueKey), options: input.options, isDisabled: disabled }));
|
|
91
86
|
default:
|
|
92
87
|
return null;
|
|
93
88
|
}
|
|
94
|
-
})(), input.afterInputText && (_jsx("div", { className:
|
|
89
|
+
})(), input.afterInputText && (_jsx("div", { className: styles.afterInputText, children: _jsx("p", { className: `${afterInputTextClasses}`, children: afterInputText }) }))] }, input.uuid));
|
|
95
90
|
};
|
|
96
91
|
return input && _jsx(_Fragment, { children: getInput(input) });
|
|
97
92
|
};
|