@awell-health/ui-library 0.1.52 → 0.1.54
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
CHANGED
|
@@ -37693,6 +37693,17 @@ Check the top-level render call using <` + t + ">.");
|
|
|
37693
37693
|
}
|
|
37694
37694
|
return [];
|
|
37695
37695
|
};
|
|
37696
|
+
var getDirtyFieldValues = function (formMethods) {
|
|
37697
|
+
var dirtyFields = formMethods.formState.dirtyFields,getValues = formMethods.getValues;
|
|
37698
|
+
var allValues = getValues();
|
|
37699
|
+
var dirtyValues = Object.keys(dirtyFields).reduce(function (acc, key) {
|
|
37700
|
+
if (dirtyFields[key]) {
|
|
37701
|
+
acc[key] = allValues[key];
|
|
37702
|
+
}
|
|
37703
|
+
return acc;
|
|
37704
|
+
}, {});
|
|
37705
|
+
return dirtyValues;
|
|
37706
|
+
};
|
|
37696
37707
|
|
|
37697
37708
|
var useTraditionalForm = function (_a) {
|
|
37698
37709
|
var questions = _a.questions,evaluateDisplayConditions = _a.evaluateDisplayConditions,onSubmit = _a.onSubmit,errorLabels = _a.errorLabels,storedAnswers = _a.storedAnswers,_b = _a.autosaveAnswers,autosaveAnswers = _b === void 0 ? true : _b,onAnswersChange = _a.onAnswersChange;
|
|
@@ -37716,7 +37727,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
37716
37727
|
return __generator(this, function (_a) {
|
|
37717
37728
|
switch (_a.label) {
|
|
37718
37729
|
case 0:
|
|
37719
|
-
formValuesInput = convertToAwellInput(formMethods
|
|
37730
|
+
formValuesInput = convertToAwellInput(getDirtyFieldValues(formMethods));
|
|
37720
37731
|
return [4, evaluateDisplayConditions(formValuesInput)];
|
|
37721
37732
|
case 1:
|
|
37722
37733
|
evaluationResults = _a.sent();
|
|
@@ -37812,7 +37823,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
37812
37823
|
switch (_a.label) {
|
|
37813
37824
|
case 0:
|
|
37814
37825
|
setIsEvaluatingQuestionVisibility(true);
|
|
37815
|
-
formValuesInput = convertToAwellInput(formMethods
|
|
37826
|
+
formValuesInput = convertToAwellInput(getDirtyFieldValues(formMethods));
|
|
37816
37827
|
return [4, evaluateDisplayConditions(formValuesInput)];
|
|
37817
37828
|
case 1:
|
|
37818
37829
|
evaluationResults = _a.sent();
|
|
@@ -51778,10 +51789,12 @@ Check the top-level render call using <` + t + ">.");
|
|
|
51778
51789
|
exports.HeadingSecondary = HeadingSecondary;
|
|
51779
51790
|
exports.HeadingTertiary = HeadingTertiary;
|
|
51780
51791
|
exports.HorizontalSpinner = HorizontalSpinner;
|
|
51792
|
+
exports.HostedPageFooter = HostedPageFooter;
|
|
51781
51793
|
exports.HostedPageLayout = HostedPageLayout;
|
|
51782
51794
|
exports.InlineText = InlineText;
|
|
51783
51795
|
exports.InnerText = InnerText;
|
|
51784
51796
|
exports.InputField = InputField;
|
|
51797
|
+
exports.LoadActivityPlaceholder = LoadActivityPlaceholder;
|
|
51785
51798
|
exports.Logo = Logo;
|
|
51786
51799
|
exports.LongTextField = LongTextField;
|
|
51787
51800
|
exports.Message = Message;
|
|
@@ -25,4 +25,5 @@ export declare const getErrorsForQuestion: (currentQuestion: QuestionWithVisibil
|
|
|
25
25
|
isValid: boolean;
|
|
26
26
|
errorType?: NumberValidationErrorType;
|
|
27
27
|
}) => Array<FormError>;
|
|
28
|
+
export declare const getDirtyFieldValues: (formMethods: UseFormReturn) => Record<string, AnswerValue>;
|
|
28
29
|
export {};
|
|
@@ -5,6 +5,4 @@ export { WizardForm } from './activities/wizardForm';
|
|
|
5
5
|
export { CalDotcomActivity } from './activities/scheduling';
|
|
6
6
|
export { CloudinaryUpload } from './activities/cloudinary';
|
|
7
7
|
export { CloudinarySingleFileUpload } from './activities/cloudinary';
|
|
8
|
-
export { HostedPageLayout } from './layouts/HostedPageLayout';
|
|
9
|
-
export { CloseButton } from './layouts/HostedPageLayout';
|
|
10
|
-
export { LoadActivityPlaceholder } from './layouts/HostedPageLayout/LoadActivityPlaceholder';
|
|
8
|
+
export { HostedPageLayout, CloseButton, HostedPageFooter, LoadActivityPlaceholder, } from './layouts/HostedPageLayout';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { Button, CheckboxButton, DatePicker, Description, InputField, QuestionLabel, Logo, LongTextField, RadioButton, RangeInput, RichTextViewer, HeadingMain, HeadingSecondary, HeadingTertiary, SubHeading, Heading5, Heading6, Text, InlineText, ExternalLink, InnerText, CircularSpinner, HorizontalSpinner, ThemeProvider, useTheme, ScrollIndicator, Modal, CalDotComScheduling, type CalDotComBookingSuccessfulFunction, ProgressIndicator, TypingCaret, WithTypingCaret, Select, } from './atoms';
|
|
2
2
|
export { MultipleChoiceQuestion, Navbar, Question, SingleChoiceQuestion, AttachmentList, } from './molecules';
|
|
3
|
-
export { Checklist, ConversationalForm, TraditionalForm, WizardForm, Message, HostedPageLayout, CloseButton, CloudinaryUpload, CloudinarySingleFileUpload, } from './hostedPages';
|
|
3
|
+
export { Checklist, ConversationalForm, TraditionalForm, WizardForm, Message, HostedPageLayout, CloseButton, CloudinaryUpload, CloudinarySingleFileUpload, HostedPageFooter, LoadActivityPlaceholder, } from './hostedPages';
|
|
4
4
|
export { useClickOutsideNotifier, useScrollHint, useConversationalForm, useTraditionalForm, } from './hooks';
|
|
5
5
|
export * from './types';
|