@tellescope/react-components 1.252.2 → 1.253.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/CMS/components.d.ts +0 -1
- package/lib/cjs/CMS/components.d.ts.map +1 -1
- package/lib/cjs/Forms/forms.d.ts +3 -3
- package/lib/cjs/Forms/forms.v2.d.ts +3 -3
- package/lib/cjs/Forms/inputs.d.ts +2 -2
- package/lib/cjs/Forms/inputs.d.ts.map +1 -1
- package/lib/cjs/Forms/inputs.js +28 -103
- package/lib/cjs/Forms/inputs.js.map +1 -1
- package/lib/cjs/Forms/inputs.native.d.ts +0 -1
- package/lib/cjs/Forms/inputs.native.d.ts.map +1 -1
- package/lib/cjs/TwilioVideo/TwilioControls.d.ts.map +1 -1
- package/lib/cjs/TwilioVideo/TwilioControls.js +60 -43
- package/lib/cjs/TwilioVideo/TwilioControls.js.map +1 -1
- package/lib/cjs/TwilioVideo/TwilioParticipant.d.ts.map +1 -1
- package/lib/cjs/TwilioVideo/TwilioParticipant.js +33 -18
- package/lib/cjs/TwilioVideo/TwilioParticipant.js.map +1 -1
- package/lib/cjs/TwilioVideo/TwilioVideoContext.d.ts +4 -1
- package/lib/cjs/TwilioVideo/TwilioVideoContext.d.ts.map +1 -1
- package/lib/cjs/TwilioVideo/TwilioVideoContext.js +45 -9
- package/lib/cjs/TwilioVideo/TwilioVideoContext.js.map +1 -1
- package/lib/cjs/TwilioVideo/hooks.d.ts +1 -1
- package/lib/cjs/TwilioVideo/index.d.ts +1 -1
- package/lib/cjs/TwilioVideo/index.d.ts.map +1 -1
- package/lib/cjs/TwilioVideo/index.js +2 -1
- package/lib/cjs/TwilioVideo/index.js.map +1 -1
- package/lib/cjs/controls.d.ts +2 -2
- package/lib/cjs/inputs.d.ts +1 -1
- package/lib/cjs/inputs.native.d.ts +0 -1
- package/lib/cjs/inputs.native.d.ts.map +1 -1
- package/lib/cjs/state.d.ts +330 -330
- package/lib/cjs/theme.native.d.ts +0 -1
- package/lib/cjs/theme.native.d.ts.map +1 -1
- package/lib/esm/Forms/inputs.d.ts.map +1 -1
- package/lib/esm/Forms/inputs.js +28 -103
- package/lib/esm/Forms/inputs.js.map +1 -1
- package/lib/esm/TwilioVideo/TwilioControls.d.ts.map +1 -1
- package/lib/esm/TwilioVideo/TwilioControls.js +62 -45
- package/lib/esm/TwilioVideo/TwilioControls.js.map +1 -1
- package/lib/esm/TwilioVideo/TwilioParticipant.d.ts.map +1 -1
- package/lib/esm/TwilioVideo/TwilioParticipant.js +33 -18
- package/lib/esm/TwilioVideo/TwilioParticipant.js.map +1 -1
- package/lib/esm/TwilioVideo/TwilioVideoContext.d.ts +4 -1
- package/lib/esm/TwilioVideo/TwilioVideoContext.d.ts.map +1 -1
- package/lib/esm/TwilioVideo/TwilioVideoContext.js +45 -9
- package/lib/esm/TwilioVideo/TwilioVideoContext.js.map +1 -1
- package/lib/esm/TwilioVideo/index.d.ts +1 -1
- package/lib/esm/TwilioVideo/index.d.ts.map +1 -1
- package/lib/esm/TwilioVideo/index.js +1 -1
- package/lib/esm/TwilioVideo/index.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +9 -9
- package/src/Forms/inputs.tsx +22 -101
- package/src/TwilioVideo/TwilioControls.tsx +53 -3
- package/src/TwilioVideo/TwilioParticipant.tsx +27 -16
- package/src/TwilioVideo/TwilioVideoContext.tsx +39 -3
- package/src/TwilioVideo/index.ts +1 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../src/CMS/components.tsx"],"names":[],"mappings":"
|
|
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/cjs/Forms/forms.d.ts
CHANGED
|
@@ -74,7 +74,7 @@ export declare const QuestionForField: ({ form, value, field, file, responses, s
|
|
|
74
74
|
createdAt: Date;
|
|
75
75
|
})[] | undefined;
|
|
76
76
|
AddToDatabase?: React.JSXElementConstructor<AddToDatabaseProps> | undefined;
|
|
77
|
-
} & Pick<TellescopeFormProps, "enduserId" | "fields" | "rootResponseId" | "groupId" | "groupInstance" | "responses" | "
|
|
77
|
+
} & Pick<TellescopeFormProps, "enduserId" | "enduser" | "fields" | "rootResponseId" | "groupId" | "groupInstance" | "responses" | "submit" | "formResponseId" | "selectedFiles" | "goToPreviousField" | "goToNextField" | "isPreviousDisabled" | "lastNavigationDirectionRef" | "handleDatabaseSelect" | "onAddFile" | "onFieldChange" | "customInputs" | "validateField">) => JSX.Element | null;
|
|
78
78
|
export declare const TellescopeSingleQuestionFlow: typeof TellescopeForm;
|
|
79
79
|
export declare const DEFAULT_THANKS_MESSAGE = "Your response was successfully recorded";
|
|
80
80
|
export declare const ThanksMessage: ({ thanksMessage, htmlThanksMessage, showRestartAtEnd, downloadComponent, }: {
|
|
@@ -83,7 +83,7 @@ export declare const ThanksMessage: ({ thanksMessage, htmlThanksMessage, showRes
|
|
|
83
83
|
showRestartAtEnd?: boolean | undefined;
|
|
84
84
|
downloadComponent?: React.ReactNode;
|
|
85
85
|
}) => JSX.Element;
|
|
86
|
-
export declare const SaveDraft: ({ selectedFiles, enduserId, responses, existingResponses, fields, onSuccess, formResponseId, includedFieldIds, formId, style, disabled, getResponsesWithQuestionGroupAnswers, isInternalNote, formTitle, rootResponseId, parentResponseId, }: Styled & Pick<TellescopeFormProps, "enduserId" | "
|
|
86
|
+
export declare const SaveDraft: ({ selectedFiles, enduserId, responses, existingResponses, fields, onSuccess, formResponseId, includedFieldIds, formId, style, disabled, getResponsesWithQuestionGroupAnswers, isInternalNote, formTitle, rootResponseId, parentResponseId, }: Styled & Pick<TellescopeFormProps, "enduserId" | "onSuccess" | "fields" | "responses" | "existingResponses" | "selectedFiles" | "getResponsesWithQuestionGroupAnswers"> & {
|
|
87
87
|
disabled?: boolean | undefined;
|
|
88
88
|
formResponseId?: string | undefined;
|
|
89
89
|
formId: string;
|
|
@@ -93,7 +93,7 @@ export declare const SaveDraft: ({ selectedFiles, enduserId, responses, existing
|
|
|
93
93
|
rootResponseId?: string | undefined;
|
|
94
94
|
parentResponseId?: string | undefined;
|
|
95
95
|
}) => JSX.Element;
|
|
96
|
-
export declare const UpdateResponse: ({ selectedFiles, enduserId, responses, onSuccess, formResponseId, includedFieldIds, formId, style, disabled, getResponsesWithQuestionGroupAnswers, existingResponses, fields, }: Styled & Pick<TellescopeFormProps, "enduserId" | "
|
|
96
|
+
export declare const UpdateResponse: ({ selectedFiles, enduserId, responses, onSuccess, formResponseId, includedFieldIds, formId, style, disabled, getResponsesWithQuestionGroupAnswers, existingResponses, fields, }: Styled & Pick<TellescopeFormProps, "enduserId" | "onSuccess" | "fields" | "responses" | "existingResponses" | "selectedFiles" | "getResponsesWithQuestionGroupAnswers"> & {
|
|
97
97
|
disabled?: boolean | undefined;
|
|
98
98
|
formResponseId?: string | undefined;
|
|
99
99
|
formId: string;
|
|
@@ -74,7 +74,7 @@ export declare const QuestionForField: ({ form, value, field, file, responses, s
|
|
|
74
74
|
createdAt: Date;
|
|
75
75
|
})[] | undefined;
|
|
76
76
|
AddToDatabase?: React.JSXElementConstructor<import("./inputs").AddToDatabaseProps> | undefined;
|
|
77
|
-
} & Pick<TellescopeFormProps, "enduserId" | "fields" | "rootResponseId" | "groupId" | "groupInstance" | "responses" | "
|
|
77
|
+
} & Pick<TellescopeFormProps, "enduserId" | "enduser" | "fields" | "rootResponseId" | "groupId" | "groupInstance" | "responses" | "submit" | "formResponseId" | "selectedFiles" | "goToPreviousField" | "goToNextField" | "isPreviousDisabled" | "lastNavigationDirectionRef" | "handleDatabaseSelect" | "onAddFile" | "onFieldChange" | "customInputs" | "validateField">) => JSX.Element | null;
|
|
78
78
|
export declare const TellescopeSingleQuestionFlowV2: typeof TellescopeFormV2;
|
|
79
79
|
export declare const DEFAULT_THANKS_MESSAGE = "Your response was successfully recorded";
|
|
80
80
|
export declare const ThanksMessage: ({ thanksMessage, htmlThanksMessage, showRestartAtEnd, downloadComponent, }: {
|
|
@@ -83,7 +83,7 @@ export declare const ThanksMessage: ({ thanksMessage, htmlThanksMessage, showRes
|
|
|
83
83
|
showRestartAtEnd?: boolean | undefined;
|
|
84
84
|
downloadComponent?: React.ReactNode;
|
|
85
85
|
}) => JSX.Element;
|
|
86
|
-
export declare const SaveDraft: ({ selectedFiles, enduserId, responses, existingResponses, fields, onSuccess, formResponseId, includedFieldIds, formId, style, disabled, getResponsesWithQuestionGroupAnswers, isInternalNote, formTitle, rootResponseId, parentResponseId, }: Styled & Pick<TellescopeFormProps, "enduserId" | "
|
|
86
|
+
export declare const SaveDraft: ({ selectedFiles, enduserId, responses, existingResponses, fields, onSuccess, formResponseId, includedFieldIds, formId, style, disabled, getResponsesWithQuestionGroupAnswers, isInternalNote, formTitle, rootResponseId, parentResponseId, }: Styled & Pick<TellescopeFormProps, "enduserId" | "onSuccess" | "fields" | "responses" | "existingResponses" | "selectedFiles" | "getResponsesWithQuestionGroupAnswers"> & {
|
|
87
87
|
disabled?: boolean | undefined;
|
|
88
88
|
formResponseId?: string | undefined;
|
|
89
89
|
formId: string;
|
|
@@ -93,7 +93,7 @@ export declare const SaveDraft: ({ selectedFiles, enduserId, responses, existing
|
|
|
93
93
|
rootResponseId?: string | undefined;
|
|
94
94
|
parentResponseId?: string | undefined;
|
|
95
95
|
}) => JSX.Element;
|
|
96
|
-
export declare const UpdateResponse: ({ selectedFiles, enduserId, responses, onSuccess, formResponseId, includedFieldIds, formId, style, disabled, getResponsesWithQuestionGroupAnswers, existingResponses, fields, }: Styled & Pick<TellescopeFormProps, "enduserId" | "
|
|
96
|
+
export declare const UpdateResponse: ({ selectedFiles, enduserId, responses, onSuccess, formResponseId, includedFieldIds, formId, style, disabled, getResponsesWithQuestionGroupAnswers, existingResponses, fields, }: Styled & Pick<TellescopeFormProps, "enduserId" | "onSuccess" | "fields" | "responses" | "existingResponses" | "selectedFiles" | "getResponsesWithQuestionGroupAnswers"> & {
|
|
97
97
|
disabled?: boolean | undefined;
|
|
98
98
|
formResponseId?: string | undefined;
|
|
99
99
|
formId: string;
|
|
@@ -25,7 +25,7 @@ export declare const DateInput: ({ field, value, onChange, placement, ...props }
|
|
|
25
25
|
placement?: "left" | "right" | "bottom" | "top" | undefined;
|
|
26
26
|
} & FormInputProps<"date"> & Styled) => JSX.Element;
|
|
27
27
|
export declare const TableInput: ({ field, value, onChange, form, ...props }: FormInputProps<'Input Table'>) => JSX.Element;
|
|
28
|
-
export declare const AutoFocusTextField: (props: (import("@mui/material").
|
|
28
|
+
export declare const AutoFocusTextField: (props: (import("@mui/material").OutlinedTextFieldProps | import("@mui/material").FilledTextFieldProps | import("@mui/material").StandardTextFieldProps) & {
|
|
29
29
|
inputProps?: {
|
|
30
30
|
sx: SxProps;
|
|
31
31
|
} | undefined;
|
|
@@ -51,7 +51,7 @@ export declare const CandidEligibilityInput: ({ field, value, onChange, response
|
|
|
51
51
|
sx: SxProps;
|
|
52
52
|
} | undefined;
|
|
53
53
|
}) => JSX.Element;
|
|
54
|
-
export declare const PharmacySearchInput: ({ field, value: rawValue, onChange, responses, enduser, form, ...props }: Omit<FormInputProps<"string">, "
|
|
54
|
+
export declare const PharmacySearchInput: ({ field, value: rawValue, onChange, responses, enduser, form, ...props }: Omit<FormInputProps<"string">, "onChange" | "value"> & {
|
|
55
55
|
value: Pharmacy | undefined;
|
|
56
56
|
onChange: (v: Pharmacy | undefined, fieldId: string) => void;
|
|
57
57
|
}) => JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inputs.d.ts","sourceRoot":"","sources":["../../../src/Forms/inputs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwE,MAAM,OAAO,CAAA;AAE5F,OAAO,EAAuN,OAAO,EAAa,cAAc,EAAc,MAAM,eAAe,C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CAAC,gBAmPrM,CAAA;AAED,eAAO,MAAM,WAAW,+CAA0D,eAAe,QAAQ,CAAC,gBAezG,CAAA;AAED,eAAO,MAAM,2CAA2C,QAAS,MAAM,WAetE,CAAA;AAED,eAAO,MAAM,aAAa,uIAAkJ,eAAe,UAAU,CAAC,uBA0GrM,CAAA;AAED,eAAO,MAAM,gBAAgB,wHAAyH,eAAe,OAAO,CAAC,gBAuD5K,CAAA;AAED,eAAO,MAAM,WAAW,iGAAkG,eAAe,OAAO,CAAC,gBA8ChJ,CAAA;AAMD,eAAO,MAAM,cAAc,iGAAkG,eAAe,WAAW,CAAC,gBAqHvJ,CAAA;AAGD,eAAO,MAAM,eAAe,iGAAkG,eAAe,YAAY,CAAC,gBAsDzJ,CAAA;AAED,eAAO,MAAM,aAAa,+BAAgC,eAAe,WAAW,CAAC,gBAEpF,CAAA;AAED,eAAO,MAAM,eAAe;mBACX,MAAM,QAAQ,CAAC,MAAM,cAAc,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;iBAoGxE,CAAA"}
|
package/lib/cjs/Forms/inputs.js
CHANGED
|
@@ -893,19 +893,10 @@ var CandidEligibilityInput = function (_a) {
|
|
|
893
893
|
var field = _a.field, value = _a.value, onChange = _a.onChange, responses = _a.responses, enduser = _a.enduser, inputProps = _a.inputProps, enduserId = _a.enduserId, form = _a.form, props = __rest(_a, ["field", "value", "onChange", "responses", "enduser", "inputProps", "enduserId", "form"]);
|
|
894
894
|
var session = (0, __1.useResolvedSession)();
|
|
895
895
|
var _e = (0, react_2.useState)(false), loading = _e[0], setLoading = _e[1];
|
|
896
|
-
var _f = (0, react_2.useState)(
|
|
897
|
-
var _g = (0, react_2.useState)(), error = _g[0], setError = _g[1];
|
|
896
|
+
var _f = (0, react_2.useState)(), error = _f[0], setError = _f[1];
|
|
898
897
|
var isEnduserSession = session.type === 'enduser';
|
|
899
|
-
var pollTimeoutRef = (0, react_2.useRef)();
|
|
900
|
-
// Clean up polling timeout on unmount
|
|
901
|
-
(0, react_2.useEffect)(function () {
|
|
902
|
-
return function () {
|
|
903
|
-
if (pollTimeoutRef.current)
|
|
904
|
-
clearTimeout(pollTimeoutRef.current);
|
|
905
|
-
};
|
|
906
|
-
}, []);
|
|
907
898
|
// Extract payerId from Insurance question response
|
|
908
|
-
var
|
|
899
|
+
var _g = (0, react_2.useMemo)(function () {
|
|
909
900
|
var _a, _b, _d, _e;
|
|
910
901
|
var insuranceResponse = responses === null || responses === void 0 ? void 0 : responses.find(function (r) { var _a, _b, _d; return ((_a = r.answer) === null || _a === void 0 ? void 0 : _a.type) === 'Insurance' && ((_d = (_b = r.answer) === null || _b === void 0 ? void 0 : _b.value) === null || _d === void 0 ? void 0 : _d.payerId); });
|
|
911
902
|
if (((_a = insuranceResponse === null || insuranceResponse === void 0 ? void 0 : insuranceResponse.answer) === null || _a === void 0 ? void 0 : _a.type) === 'Insurance') {
|
|
@@ -916,9 +907,9 @@ var CandidEligibilityInput = function (_a) {
|
|
|
916
907
|
];
|
|
917
908
|
}
|
|
918
909
|
return [];
|
|
919
|
-
}, [responses]), payerId =
|
|
910
|
+
}, [responses]), payerId = _g[0], memberId = _g[1], payerName = _g[2];
|
|
920
911
|
var checkEligibility = (0, react_2.useCallback)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
921
|
-
var data,
|
|
912
|
+
var data, err_6;
|
|
922
913
|
var _a, _b;
|
|
923
914
|
return __generator(this, function (_d) {
|
|
924
915
|
switch (_d.label) {
|
|
@@ -942,82 +933,19 @@ var CandidEligibilityInput = function (_a) {
|
|
|
942
933
|
})];
|
|
943
934
|
case 2:
|
|
944
935
|
data = (_d.sent()).data;
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
}
|
|
951
|
-
// If already completed, update answer immediately
|
|
952
|
-
if (initialStatus === 'COMPLETED' || initialStatus === 'FAILED' || initialStatus === 'UNKNOWN') {
|
|
953
|
-
onChange({
|
|
954
|
-
payerId: payerId,
|
|
955
|
-
status: initialStatus,
|
|
956
|
-
coverageId: coverageId_1,
|
|
957
|
-
}, field.id);
|
|
958
|
-
setLoading(false);
|
|
959
|
-
return [2 /*return*/];
|
|
960
|
-
}
|
|
961
|
-
// Step 2: Poll for results
|
|
936
|
+
onChange({
|
|
937
|
+
payerId: payerId,
|
|
938
|
+
status: data === null || data === void 0 ? void 0 : data.status,
|
|
939
|
+
benefits: data === null || data === void 0 ? void 0 : data.benefits,
|
|
940
|
+
planMetadata: data === null || data === void 0 ? void 0 : data.planMetadata,
|
|
941
|
+
}, field.id);
|
|
962
942
|
setLoading(false);
|
|
963
|
-
setPolling(true);
|
|
964
|
-
maxAttempts_1 = 60 // 2 minutes at 2s intervals
|
|
965
|
-
;
|
|
966
|
-
attempts_1 = 0;
|
|
967
|
-
pollForResult_1 = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
968
|
-
var pollData, status_2, err_7;
|
|
969
|
-
return __generator(this, function (_a) {
|
|
970
|
-
switch (_a.label) {
|
|
971
|
-
case 0:
|
|
972
|
-
if (attempts_1 >= maxAttempts_1) {
|
|
973
|
-
setError('Eligibility check timed out. Please try again.');
|
|
974
|
-
setPolling(false);
|
|
975
|
-
return [2 /*return*/];
|
|
976
|
-
}
|
|
977
|
-
attempts_1++;
|
|
978
|
-
_a.label = 1;
|
|
979
|
-
case 1:
|
|
980
|
-
_a.trys.push([1, 3, , 4]);
|
|
981
|
-
return [4 /*yield*/, session.api.integrations.proxy_read({
|
|
982
|
-
id: coverageId_1,
|
|
983
|
-
integration: constants_1.CANDID_TITLE,
|
|
984
|
-
type: 'candid-eligibility-poll',
|
|
985
|
-
query: JSON.stringify({ checkId: checkId_1 }),
|
|
986
|
-
})];
|
|
987
|
-
case 2:
|
|
988
|
-
pollData = (_a.sent()).data;
|
|
989
|
-
status_2 = pollData === null || pollData === void 0 ? void 0 : pollData.status;
|
|
990
|
-
// Terminal statuses: COMPLETED, FAILED, or UNKNOWN (Candid returns UNKNOWN when eligibility cannot be determined)
|
|
991
|
-
if (status_2 === 'COMPLETED' || status_2 === 'FAILED' || status_2 === 'UNKNOWN') {
|
|
992
|
-
onChange({
|
|
993
|
-
payerId: payerId,
|
|
994
|
-
status: status_2,
|
|
995
|
-
coverageId: coverageId_1,
|
|
996
|
-
benefits: pollData === null || pollData === void 0 ? void 0 : pollData.benefits,
|
|
997
|
-
}, field.id);
|
|
998
|
-
setPolling(false);
|
|
999
|
-
return [2 /*return*/];
|
|
1000
|
-
}
|
|
1001
|
-
// Still pending, poll again
|
|
1002
|
-
pollTimeoutRef.current = setTimeout(pollForResult_1, 2000);
|
|
1003
|
-
return [3 /*break*/, 4];
|
|
1004
|
-
case 3:
|
|
1005
|
-
err_7 = _a.sent();
|
|
1006
|
-
setError((err_7 === null || err_7 === void 0 ? void 0 : err_7.message) || 'Failed to check eligibility status');
|
|
1007
|
-
setPolling(false);
|
|
1008
|
-
return [3 /*break*/, 4];
|
|
1009
|
-
case 4: return [2 /*return*/];
|
|
1010
|
-
}
|
|
1011
|
-
});
|
|
1012
|
-
}); };
|
|
1013
|
-
pollForResult_1();
|
|
1014
943
|
return [3 /*break*/, 4];
|
|
1015
944
|
case 3:
|
|
1016
945
|
err_6 = _d.sent();
|
|
1017
946
|
setError((err_6 === null || err_6 === void 0 ? void 0 : err_6.message) || 'Failed to check eligibility');
|
|
1018
947
|
console.error('Candid eligibility check failed:', err_6);
|
|
1019
948
|
setLoading(false);
|
|
1020
|
-
setPolling(false);
|
|
1021
949
|
return [3 /*break*/, 4];
|
|
1022
950
|
case 4: return [2 /*return*/];
|
|
1023
951
|
}
|
|
@@ -1042,23 +970,20 @@ var CandidEligibilityInput = function (_a) {
|
|
|
1042
970
|
backgroundColor: '#ffebee',
|
|
1043
971
|
border: '2px solid #f44336'
|
|
1044
972
|
} }, { children: (0, jsx_runtime_1.jsxs)(material_1.Grid, __assign({ container: true, spacing: 2, direction: "column", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, __assign({ variant: "h2", style: { color: '#f44336' } }, { children: "!" })) })), (0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, __assign({ variant: "h6", align: "center", color: "error" }, { children: "Unable to Check Eligibility" })) })), (0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, __assign({ variant: "body2", align: "center", style: { color: '#d32f2f' } }, { children: error })) }))] })) })) })) }))); }, [error]);
|
|
1045
|
-
var checkingEligibilityComponent = (0, react_2.useMemo)(function () { return ((0, jsx_runtime_1.jsxs)(material_1.Grid, __assign({ container: true, spacing: 2, direction: "column", alignItems: "center", style: { padding: '20px 0' } }, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true }, { children: (0, jsx_runtime_1.jsx)(material_1.CircularProgress, { size: 40 }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, __assign({ variant: "body1" }, { children:
|
|
973
|
+
var checkingEligibilityComponent = (0, react_2.useMemo)(function () { return ((0, jsx_runtime_1.jsxs)(material_1.Grid, __assign({ container: true, spacing: 2, direction: "column", alignItems: "center", style: { padding: '20px 0' } }, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true }, { children: (0, jsx_runtime_1.jsx)(material_1.CircularProgress, { size: 40 }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, __assign({ variant: "body1" }, { children: "Checking eligibility..." })) })), (0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, __assign({ variant: "body2", color: "textSecondary" }, { children: "This may take a few moments" })) }))] }))); }, []);
|
|
1046
974
|
var resultsComponent = (0, react_2.useMemo)(function () {
|
|
1047
|
-
var
|
|
1048
|
-
var isFailed = (value === null || value === void 0 ? void 0 : value.status) === 'FAILED';
|
|
975
|
+
var isActive = (value === null || value === void 0 ? void 0 : value.status) === 'ACTIVE';
|
|
1049
976
|
return ((0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ container: true, spacing: 2, direction: "column" }, { children: (0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Paper, __assign({ style: {
|
|
1050
977
|
padding: 16,
|
|
1051
|
-
backgroundColor:
|
|
1052
|
-
border: "2px solid ".concat(
|
|
1053
|
-
} }, { children: (0, jsx_runtime_1.jsxs)(material_1.Grid, __assign({ container: true, spacing: 2, direction: "column", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true }, { children:
|
|
978
|
+
backgroundColor: isActive ? '#e8f5e9' : '#fff8e1',
|
|
979
|
+
border: "2px solid ".concat(isActive ? '#4caf50' : '#ffa000')
|
|
980
|
+
} }, { children: (0, jsx_runtime_1.jsxs)(material_1.Grid, __assign({ container: true, spacing: 2, direction: "column", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true }, { children: isActive ? ((0, jsx_runtime_1.jsx)(icons_material_1.CheckCircleOutline, { style: { fontSize: 48, color: '#4caf50' } })) : ((0, jsx_runtime_1.jsx)(material_1.Typography, __assign({ variant: "h2", style: { color: '#ffa000' } }, { children: "!" }))) })), (0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, __assign({ variant: "h6", align: "center" }, { children: isActive
|
|
1054
981
|
? "".concat(payerName || 'Insurance', " eligibility verified")
|
|
1055
|
-
:
|
|
1056
|
-
? 'Eligibility check failed'
|
|
1057
|
-
: 'Eligibility Status: ' + (0, utilities_1.first_letter_capitalized)(((value === null || value === void 0 ? void 0 : value.status) || 'Unknown').toLowerCase()) })) }))] })) })) })) })));
|
|
982
|
+
: 'Eligibility Status: ' + (0, utilities_1.first_letter_capitalized)(((value === null || value === void 0 ? void 0 : value.status) || 'Unknown').toLowerCase()) })) }))] })) })) })) })));
|
|
1058
983
|
}, [value, payerName]);
|
|
1059
|
-
// Loading
|
|
984
|
+
// Loading state for enduser sessions
|
|
1060
985
|
if (isEnduserSession) {
|
|
1061
|
-
if (loading
|
|
986
|
+
if (loading) {
|
|
1062
987
|
return checkingEligibilityComponent;
|
|
1063
988
|
}
|
|
1064
989
|
if (error) {
|
|
@@ -1070,7 +995,7 @@ var CandidEligibilityInput = function (_a) {
|
|
|
1070
995
|
return errorComponent;
|
|
1071
996
|
}
|
|
1072
997
|
// User/admin interface (non-enduser sessions)
|
|
1073
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Grid, __assign({ container: true, spacing: 2, direction: "column" }, { children: [(0, jsx_runtime_1.jsxs)(material_1.Grid, __assign({ item: true }, { children: [(0, jsx_runtime_1.jsxs)(material_1.Typography, __assign({ variant: "body2", color: "textSecondary" }, { children: ["Service Code: ", ((_b = field.options) === null || _b === void 0 ? void 0 : _b.candidServiceCode) || 'Not configured'] })), (0, jsx_runtime_1.jsxs)(material_1.Typography, __assign({ variant: "body2", color: "textSecondary" }, { children: ["Provider NPI: ", ((_d = field.options) === null || _d === void 0 ? void 0 : _d.candidNPI) || 'Not configured'] })), payerId && (0, jsx_runtime_1.jsxs)(material_1.Typography, __assign({ variant: "body2", color: "textSecondary" }, { children: ["Payer ID: ", payerId] })), memberId && (0, jsx_runtime_1.jsxs)(material_1.Typography, __assign({ variant: "body2", color: "textSecondary" }, { children: ["Member ID: ", memberId] }))] })), error && ((0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, __assign({ variant: "body2", color: "error" }, { children: error })) }))),
|
|
998
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Grid, __assign({ container: true, spacing: 2, direction: "column" }, { children: [(0, jsx_runtime_1.jsxs)(material_1.Grid, __assign({ item: true }, { children: [(0, jsx_runtime_1.jsxs)(material_1.Typography, __assign({ variant: "body2", color: "textSecondary" }, { children: ["Service Code: ", ((_b = field.options) === null || _b === void 0 ? void 0 : _b.candidServiceCode) || 'Not configured'] })), (0, jsx_runtime_1.jsxs)(material_1.Typography, __assign({ variant: "body2", color: "textSecondary" }, { children: ["Provider NPI: ", ((_d = field.options) === null || _d === void 0 ? void 0 : _d.candidNPI) || 'Not configured'] })), payerId && (0, jsx_runtime_1.jsxs)(material_1.Typography, __assign({ variant: "body2", color: "textSecondary" }, { children: ["Payer ID: ", payerId] })), memberId && (0, jsx_runtime_1.jsxs)(material_1.Typography, __assign({ variant: "body2", color: "textSecondary" }, { children: ["Member ID: ", memberId] }))] })), error && ((0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, __assign({ variant: "body2", color: "error" }, { children: error })) }))), (0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true, container: true, spacing: 2 }, { children: (0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true }, { children: (0, jsx_runtime_1.jsx)(__1.LoadingButton, { variant: "outlined", onClick: checkEligibility, submitText: (0, __1.form_display_text_for_language)(form, "Check Eligibility"), submittingText: (0, __1.form_display_text_for_language)(form, "Checking..."), submitting: loading, disabled: loading }) })) })), value && ((0, jsx_runtime_1.jsxs)(material_1.Grid, __assign({ item: true }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, __assign({ variant: "caption", color: "textSecondary" }, { children: "Current Answer:" })), (0, jsx_runtime_1.jsx)("pre", __assign({ style: { fontSize: 11, whiteSpace: 'pre-wrap', wordBreak: 'break-word' } }, { children: JSON.stringify(value, null, 2) }))] })))] })));
|
|
1074
999
|
};
|
|
1075
1000
|
exports.CandidEligibilityInput = CandidEligibilityInput;
|
|
1076
1001
|
var PharmacySearchInput = function (_a) {
|
|
@@ -1097,7 +1022,7 @@ var PharmacySearchInput = function (_a) {
|
|
|
1097
1022
|
var _f = (0, react_2.useState)([]), pharmacies = _f[0], setPharmacies = _f[1];
|
|
1098
1023
|
var _g = (0, react_2.useState)(false), hasSearched = _g[0], setHasSearched = _g[1];
|
|
1099
1024
|
var searchPharmacies = (0, react_2.useCallback)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
1100
|
-
var data,
|
|
1025
|
+
var data, err_7;
|
|
1101
1026
|
return __generator(this, function (_a) {
|
|
1102
1027
|
switch (_a.label) {
|
|
1103
1028
|
case 0:
|
|
@@ -1124,8 +1049,8 @@ var PharmacySearchInput = function (_a) {
|
|
|
1124
1049
|
}
|
|
1125
1050
|
return [3 /*break*/, 5];
|
|
1126
1051
|
case 3:
|
|
1127
|
-
|
|
1128
|
-
setError((
|
|
1052
|
+
err_7 = _a.sent();
|
|
1053
|
+
setError((err_7 === null || err_7 === void 0 ? void 0 : err_7.message) || (0, __1.form_display_text_for_language)(form, 'Failed to search pharmacies'));
|
|
1129
1054
|
setPharmacies([]);
|
|
1130
1055
|
return [3 /*break*/, 5];
|
|
1131
1056
|
case 4:
|
|
@@ -2636,7 +2561,7 @@ var AppointmentBookingInput = function (_a) {
|
|
|
2636
2561
|
var _s = (0, react_2.useState)(false), confirming = _s[0], setConfirming = _s[1];
|
|
2637
2562
|
var bookingPageId = (_b = field === null || field === void 0 ? void 0 : field.options) === null || _b === void 0 ? void 0 : _b.bookingPageId;
|
|
2638
2563
|
var downloadICS = (0, react_2.useCallback)(function (event) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2639
|
-
var _a,
|
|
2564
|
+
var _a, err_8;
|
|
2640
2565
|
return __generator(this, function (_b) {
|
|
2641
2566
|
switch (_b.label) {
|
|
2642
2567
|
case 0:
|
|
@@ -2648,8 +2573,8 @@ var AppointmentBookingInput = function (_a) {
|
|
|
2648
2573
|
{ name: "event.ics", dataIsURL: true, type: 'text/calendar' }]);
|
|
2649
2574
|
return [3 /*break*/, 3];
|
|
2650
2575
|
case 2:
|
|
2651
|
-
|
|
2652
|
-
console.error(
|
|
2576
|
+
err_8 = _b.sent();
|
|
2577
|
+
console.error(err_8);
|
|
2653
2578
|
return [3 /*break*/, 3];
|
|
2654
2579
|
case 3: return [2 /*return*/];
|
|
2655
2580
|
}
|
|
@@ -3178,7 +3103,7 @@ var ChargeebeeInput = function (_a) {
|
|
|
3178
3103
|
onChange({ url: url }, field.id);
|
|
3179
3104
|
}, [loadCount, url]);
|
|
3180
3105
|
var handleVerify = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
3181
|
-
var hasPaymentMethod,
|
|
3106
|
+
var hasPaymentMethod, err_9;
|
|
3182
3107
|
var _a;
|
|
3183
3108
|
return __generator(this, function (_b) {
|
|
3184
3109
|
switch (_b.label) {
|
|
@@ -3199,8 +3124,8 @@ var ChargeebeeInput = function (_a) {
|
|
|
3199
3124
|
}
|
|
3200
3125
|
return [3 /*break*/, 5];
|
|
3201
3126
|
case 3:
|
|
3202
|
-
|
|
3203
|
-
setError((_a =
|
|
3127
|
+
err_9 = _b.sent();
|
|
3128
|
+
setError((_a = err_9 === null || err_9 === void 0 ? void 0 : err_9.message) !== null && _a !== void 0 ? _a : 'Failed to verify payment method');
|
|
3204
3129
|
return [3 /*break*/, 5];
|
|
3205
3130
|
case 4:
|
|
3206
3131
|
setVerifying(false);
|