@tellescope/react-components 1.193.0 → 1.194.0
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/lib/cjs/Forms/inputs.js +10 -7
- package/lib/cjs/Forms/inputs.js.map +1 -1
- package/lib/esm/CMS/components.d.ts +1 -0
- package/lib/esm/CMS/components.d.ts.map +1 -1
- package/lib/esm/Forms/forms.d.ts +3 -3
- package/lib/esm/Forms/inputs.d.ts +1 -1
- package/lib/esm/Forms/inputs.js +10 -7
- package/lib/esm/Forms/inputs.js.map +1 -1
- package/lib/esm/Forms/inputs.native.d.ts +1 -0
- package/lib/esm/Forms/inputs.native.d.ts.map +1 -1
- package/lib/esm/controls.d.ts +2 -2
- package/lib/esm/inputs.d.ts +1 -1
- package/lib/esm/inputs.native.d.ts +1 -0
- package/lib/esm/inputs.native.d.ts.map +1 -1
- package/lib/esm/layout.d.ts +1 -1
- package/lib/esm/state.d.ts +282 -282
- package/lib/esm/theme.native.d.ts +1 -0
- package/lib/esm/theme.native.d.ts.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +9 -9
- package/src/Forms/inputs.tsx +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../src/CMS/components.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAM1C,eAAO,MAAM,UAAU,aAAc,eAAe,uBAoBnD,CAAA"}
|
|
1
|
+
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../src/CMS/components.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAM1C,eAAO,MAAM,UAAU,aAAc,eAAe,uBAoBnD,CAAA"}
|
package/lib/esm/Forms/forms.d.ts
CHANGED
|
@@ -67,7 +67,7 @@ export declare const QuestionForField: ({ form, value, field, file, responses, s
|
|
|
67
67
|
id: string;
|
|
68
68
|
createdAt: Date;
|
|
69
69
|
})[] | undefined;
|
|
70
|
-
} & Pick<TellescopeFormProps, "enduserId" | "
|
|
70
|
+
} & Pick<TellescopeFormProps, "enduserId" | "fields" | "rootResponseId" | "groupId" | "groupInstance" | "responses" | "enduser" | "submit" | "formResponseId" | "goToNextField" | "isPreviousDisabled" | "goToPreviousField" | "handleDatabaseSelect" | "onAddFile" | "onFieldChange" | "customInputs" | "selectedFiles" | "validateField">) => JSX.Element | null;
|
|
71
71
|
export declare const TellescopeSingleQuestionFlow: typeof TellescopeForm;
|
|
72
72
|
export declare const DEFAULT_THANKS_MESSAGE = "Your response was successfully recorded";
|
|
73
73
|
export declare const ThanksMessage: ({ thanksMessage, htmlThanksMessage, showRestartAtEnd, downloadComponent, }: {
|
|
@@ -76,7 +76,7 @@ export declare const ThanksMessage: ({ thanksMessage, htmlThanksMessage, showRes
|
|
|
76
76
|
showRestartAtEnd?: boolean | undefined;
|
|
77
77
|
downloadComponent?: React.ReactNode;
|
|
78
78
|
}) => JSX.Element;
|
|
79
|
-
export declare const SaveDraft: ({ selectedFiles, enduserId, responses, existingResponses, fields, onSuccess, formResponseId, includedFieldIds, formId, style, disabled, getResponsesWithQuestionGroupAnswers, isInternalNote, formTitle, rootResponseId, parentResponseId, }: Styled & Pick<TellescopeFormProps, "enduserId" | "
|
|
79
|
+
export declare const SaveDraft: ({ selectedFiles, enduserId, responses, existingResponses, fields, onSuccess, formResponseId, includedFieldIds, formId, style, disabled, getResponsesWithQuestionGroupAnswers, isInternalNote, formTitle, rootResponseId, parentResponseId, }: Styled & Pick<TellescopeFormProps, "enduserId" | "fields" | "responses" | "onSuccess" | "existingResponses" | "selectedFiles" | "getResponsesWithQuestionGroupAnswers"> & {
|
|
80
80
|
disabled?: boolean | undefined;
|
|
81
81
|
formResponseId?: string | undefined;
|
|
82
82
|
formId: string;
|
|
@@ -86,7 +86,7 @@ export declare const SaveDraft: ({ selectedFiles, enduserId, responses, existing
|
|
|
86
86
|
rootResponseId?: string | undefined;
|
|
87
87
|
parentResponseId?: string | undefined;
|
|
88
88
|
}) => JSX.Element;
|
|
89
|
-
export declare const UpdateResponse: ({ selectedFiles, enduserId, responses, onSuccess, formResponseId, includedFieldIds, formId, style, disabled, getResponsesWithQuestionGroupAnswers, existingResponses, fields, }: Styled & Pick<TellescopeFormProps, "enduserId" | "
|
|
89
|
+
export declare const UpdateResponse: ({ selectedFiles, enduserId, responses, onSuccess, formResponseId, includedFieldIds, formId, style, disabled, getResponsesWithQuestionGroupAnswers, existingResponses, fields, }: Styled & Pick<TellescopeFormProps, "enduserId" | "fields" | "responses" | "onSuccess" | "existingResponses" | "selectedFiles" | "getResponsesWithQuestionGroupAnswers"> & {
|
|
90
90
|
disabled?: boolean | undefined;
|
|
91
91
|
formResponseId?: string | undefined;
|
|
92
92
|
formId: string;
|
|
@@ -20,7 +20,7 @@ export declare const RatingInput: ({ field, value, onChange }: FormInputProps<'r
|
|
|
20
20
|
export declare const RankingInput: ({ field, value, onChange }: FormInputProps<'ranking'>) => JSX.Element;
|
|
21
21
|
export declare const DateInput: ({ field, value, onChange, placement, ...props }: {
|
|
22
22
|
field: FormField;
|
|
23
|
-
placement?: "
|
|
23
|
+
placement?: "top" | "right" | "bottom" | "left" | undefined;
|
|
24
24
|
} & FormInputProps<"date"> & Styled) => JSX.Element;
|
|
25
25
|
export declare const TableInput: ({ field, value, onChange, ...props }: FormInputProps<'Input Table'>) => JSX.Element;
|
|
26
26
|
export declare const AutoFocusTextField: (props: TextFieldProps) => JSX.Element;
|
package/lib/esm/Forms/inputs.js
CHANGED
|
@@ -724,13 +724,16 @@ export var MultipleChoiceInput = function (_a) {
|
|
|
724
724
|
return (_jsxs(Grid, __assign({ container: true, alignItems: "center" }, { children: [radio
|
|
725
725
|
? (_jsxs(FormControl, __assign({ fullWidth: true }, { children: [_jsx(FormLabel, __assign({ id: "radio-group-".concat(field.id, "-label") }, { children: form_display_text_for_language(form, "Select One") })), _jsx(RadioGroup, __assign({ "aria-labelledby": "radio-group-".concat(field.id, "-label"), defaultValue: "female", name: "radio-group-".concat(field.id) }, { children: (choices !== null && choices !== void 0 ? choices : []).map(function (c, i) {
|
|
726
726
|
return _jsx(FormControlLabel, { color: "primary", label: c, sx: multipleChoiceItemSx, style: { marginLeft: '0px' }, checked: !!(value === null || value === void 0 ? void 0 : value.includes(c)) && c !== otherString, control: _jsx(Radio, { onClick: function () { return onChange((value === null || value === void 0 ? void 0 : value.includes(c)) ? [] : [c], field.id); } }) }, i);
|
|
727
|
-
}) }))] }))) : ((choices !== null && choices !== void 0 ? choices : []).map(function (c, i) { return (_jsx(Grid, __assign({ xs: 12, onClick: function () {
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
:
|
|
727
|
+
}) }))] }))) : ((choices !== null && choices !== void 0 ? choices : []).map(function (c, i) { return (_jsx(Grid, __assign({ xs: 12, onClick: function () {
|
|
728
|
+
var _a, _b, _d, _e;
|
|
729
|
+
return onChange(((value === null || value === void 0 ? void 0 : value.includes(c))
|
|
730
|
+
? ((radio || ((_b = (_a = field.options) === null || _a === void 0 ? void 0 : _a.radioChoices) === null || _b === void 0 ? void 0 : _b.includes(c)))
|
|
731
|
+
? []
|
|
732
|
+
: value.filter(function (v) { return v !== c; }))
|
|
733
|
+
: ((radio || ((_e = (_d = field.options) === null || _d === void 0 ? void 0 : _d.radioChoices) === null || _e === void 0 ? void 0 : _e.includes(c)))
|
|
734
|
+
? [c]
|
|
735
|
+
: __spreadArray(__spreadArray([], (value !== null && value !== void 0 ? value : []).filter(function (x) { var _a, _b; return !((_b = (_a = field.options) === null || _a === void 0 ? void 0 : _a.radioChoices) === null || _b === void 0 ? void 0 : _b.includes(x)); }), true), [c], false))), field.id);
|
|
736
|
+
} }, { children: _jsxs(Grid, __assign({ container: true, alignItems: "center", wrap: "nowrap", sx: multipleChoiceItemSx }, { children: [_jsx(Checkbox, { color: "primary", checked: !!(value === null || value === void 0 ? void 0 : value.includes(c)) && c !== otherString, inputProps: { 'aria-label': 'primary checkbox' } }), _jsxs(Typography, __assign({ component: "span" }, { children: [" ", c, " "] }))] })) }), i)); })), other &&
|
|
734
737
|
_jsx(Grid, __assign({ item: true, xs: 12 }, { children: _jsx(TextField // className={classes.textField}
|
|
735
738
|
, { InputProps: { sx: { borderRadius: 2.5 } }, sx: { width: radio ? "calc(100% - 15px)" : '100%' }, size: "small", "aria-label": form_display_text_for_language(form, "Other"), value: otherString, placeholder: form_display_text_for_language(form, "Other"), variant: "outlined",
|
|
736
739
|
// onClick={() => !otherChecked && handleOtherChecked()} // allow click to enable when disabled
|