@hhgtech/hhg-components
Version:
Hello Health Group common components
255 lines (247 loc) • 12.7 kB
JavaScript
import { L as LOCALE } from './Locale-dc1237b9.js';
var Gender;
(function (Gender) {
Gender["Boy"] = "boy";
Gender["Girl"] = "girl";
})(Gender || (Gender = {}));
var BabyGrowthChartType;
(function (BabyGrowthChartType) {
BabyGrowthChartType[BabyGrowthChartType["Height"] = 0] = "Height";
BabyGrowthChartType[BabyGrowthChartType["Weight"] = 1] = "Weight";
BabyGrowthChartType[BabyGrowthChartType["Head"] = 2] = "Head";
BabyGrowthChartType[BabyGrowthChartType["BMI"] = 3] = "BMI";
})(BabyGrowthChartType || (BabyGrowthChartType = {}));
var BabyGrowthChartDuration;
(function (BabyGrowthChartDuration) {
BabyGrowthChartDuration[BabyGrowthChartDuration["Weekly"] = 0] = "Weekly";
BabyGrowthChartDuration[BabyGrowthChartDuration["Monthly"] = 1] = "Monthly";
BabyGrowthChartDuration[BabyGrowthChartDuration["Yearly"] = 2] = "Yearly";
})(BabyGrowthChartDuration || (BabyGrowthChartDuration = {}));
var BabyGrowthResultTab;
(function (BabyGrowthResultTab) {
BabyGrowthResultTab[BabyGrowthResultTab["Height"] = 0] = "Height";
BabyGrowthResultTab[BabyGrowthResultTab["Weight"] = 1] = "Weight";
BabyGrowthResultTab[BabyGrowthResultTab["Head"] = 2] = "Head";
BabyGrowthResultTab[BabyGrowthResultTab["BMI"] = 3] = "BMI";
BabyGrowthResultTab[BabyGrowthResultTab["Record"] = 4] = "Record";
})(BabyGrowthResultTab || (BabyGrowthResultTab = {}));
var OnboardingStep;
(function (OnboardingStep) {
OnboardingStep[OnboardingStep["Phone"] = 0] = "Phone";
OnboardingStep[OnboardingStep["OTP"] = 1] = "OTP";
OnboardingStep[OnboardingStep["OTPEmail"] = 2] = "OTPEmail";
OnboardingStep[OnboardingStep["PersonalInfo"] = 3] = "PersonalInfo";
OnboardingStep[OnboardingStep["UpdatePassword"] = 4] = "UpdatePassword";
OnboardingStep[OnboardingStep["Result"] = 5] = "Result";
OnboardingStep[OnboardingStep["DynamicForm"] = 6] = "DynamicForm";
})(OnboardingStep || (OnboardingStep = {}));
/* type in flow */
var NodePosition;
(function (NodePosition) {
NodePosition[NodePosition["HEAD"] = 0] = "HEAD";
NodePosition[NodePosition["TAIL"] = 1] = "TAIL";
NodePosition[NodePosition["MIDDLE"] = 2] = "MIDDLE";
NodePosition[NodePosition["CONNECT"] = 3] = "CONNECT";
NodePosition[NodePosition["SSO"] = 4] = "SSO";
NodePosition[NodePosition["MULTIPLE"] = 5] = "MULTIPLE";
})(NodePosition || (NodePosition = {}));
/* action_type in flow */
var NodeType;
(function (NodeType) {
NodeType[NodeType["UNDEFINED"] = -1] = "UNDEFINED";
NodeType[NodeType["TEXT"] = 0] = "TEXT";
NodeType[NodeType["IMAGE"] = 1] = "IMAGE";
NodeType[NodeType["FORM"] = 2] = "FORM";
NodeType[NodeType["CONDITION"] = 3] = "CONDITION";
NodeType[NodeType["POLL"] = 4] = "POLL";
NodeType[NodeType["FINAL_STANDARD"] = 5] = "FINAL_STANDARD";
NodeType[NodeType["FINAL"] = 6] = "FINAL";
NodeType[NodeType["FINAL_THANK_YOU"] = 7] = "FINAL_THANK_YOU";
NodeType[NodeType["RATING"] = 8] = "RATING";
NodeType[NodeType["REACTION"] = 9] = "REACTION";
NodeType[NodeType["REVIEW"] = 10] = "REVIEW";
NodeType[NodeType["RESULT_POLL"] = 11] = "RESULT_POLL";
NodeType[NodeType["RESULT_RATING"] = 12] = "RESULT_RATING";
NodeType[NodeType["RESULT_REACTION"] = 13] = "RESULT_REACTION";
NodeType[NodeType["OTP"] = 14] = "OTP";
})(NodeType || (NodeType = {}));
const NodeFinalTypes = [
NodeType.FINAL,
NodeType.FINAL_STANDARD,
NodeType.FINAL_THANK_YOU,
];
/* type if nodes.intent */
var NodeIntentType;
(function (NodeIntentType) {
NodeIntentType["BOT_TEXT"] = "bot-text";
NodeIntentType["BOT_IMAGE"] = "bot-image";
NodeIntentType["BOT_BACKGROUND_IMAGE"] = "bot-background-image";
NodeIntentType["BOT_BUTTON"] = "bot-button";
NodeIntentType["BOT_URL"] = "bot-url";
NodeIntentType["BOT_RECALCULATE"] = "bot-recalculate";
NodeIntentType["BOT_BOOKING"] = "bot-booking";
NodeIntentType["BOT_MAIN_TITLE"] = "bot-main-title";
NodeIntentType["BOT_MAIN_IMAGE"] = "bot-main-image";
NodeIntentType["BOT_MAIN_BODY"] = "bot-main-body";
NodeIntentType["BOT_MAIN_BUTTON"] = "bot-main-button";
NodeIntentType["BOT_SUB_TITLE"] = "bot-sub-title";
NodeIntentType["BOT_SUB_BODY"] = "bot-sub-body";
NodeIntentType["BOT_LANDING_PAGE_URL"] = "bot-landing-page-url";
NodeIntentType["BOT_LANDING_PAGE_BUTTON"] = "bot-landing-page-button";
NodeIntentType["BOT_RISK_SCREEN"] = "bot-risk-screen";
NodeIntentType["BOT_RELATED_ARTICLE"] = "bot-related-article";
NodeIntentType["THANK_YOU_IMAGE"] = "thank-you-image";
NodeIntentType["THANK_YOU_TITLE"] = "thank-you-title";
NodeIntentType["THANK_YOU_BODY"] = "thank-you-body";
NodeIntentType["TOTAL_LINE"] = "total-line";
NodeIntentType["BOT_SUBMISSION"] = "bot-submission";
NodeIntentType["BOT_EVENT_SUBMISSION"] = "bot-event-submission";
NodeIntentType["BOT_SUGGESTED_SERVICE"] = "bot-suggested-service";
/** intents fake for sso block */
NodeIntentType["SSO_INTENT"] = "sso-intent";
})(NodeIntentType || (NodeIntentType = {}));
/* type if nodes.action */
var NodeActionType;
(function (NodeActionType) {
NodeActionType["ACTION_CONDITION"] = "action-condition";
NodeActionType["ACTION_INTERNAL"] = "action-internal";
NodeActionType["ACTION_EXTERNAL"] = "action-external";
NodeActionType["ACTION_SSO_REDIRECT"] = "action-sso-redirect";
NodeActionType["ACTION_MULTIPLE_BUTTON"] = "action-multiple-button";
NodeActionType["USER_CHOICE_TEXT"] = "user-choice-text";
NodeActionType["USER_CHOICE_TEXT_BY_INPUT"] = "user-choice-text-by-input";
NodeActionType["USER_CHOICE_NEXT"] = "user-choice-next";
NodeActionType["USER_CHOICE_IMAGE"] = "user-choice-image";
NodeActionType["USER_SUBMIT_TEXT"] = "user-submit-text";
NodeActionType["USER_SUBMIT_NUMBER"] = "user-submit-number";
NodeActionType["USER_SUBMIT_NAME"] = "user-submit-name";
NodeActionType["USER_SUBMIT_PHONE"] = "user-submit-phone";
NodeActionType["USER_SUBMIT_EMAIL"] = "user-submit-email";
NodeActionType["USER_SUBMIT_DROPDOWN"] = "user-submit-dropdown";
NodeActionType["USER_SUBMIT_DATE"] = "user-submit-date";
NodeActionType["USER_SUBMIT_DOB"] = "user-submit-dob";
NodeActionType["USER_SUBMIT_CONFIRM"] = "user-submit-confirm";
NodeActionType["USER_SUBMIT_SEND"] = "user-submit-send";
NodeActionType["USER_SUBMIT_RESEND"] = "user-submit-resend";
NodeActionType["USER_SUBMIT_ADDRESS"] = "user-submit-address";
NodeActionType["USER_SUBMIT_ADDRESS_PROVINCE"] = "user-submit-address-province";
NodeActionType["USER_SUBMIT_ADDRESS_DISTRICT"] = "user-submit-address-district";
NodeActionType["USER_SUBMIT_ADDRESS_COMMUNE"] = "user-submit-address-commune";
NodeActionType["USER_SUBMIT_BMI"] = "user-submit-bmi";
NodeActionType["USER_SUBMIT_BMI_HIDDEN"] = "user-submit-bmi-hidden";
NodeActionType["USER_SUBMIT_TERMS"] = "user-submit-terms";
NodeActionType["USER_SUBMIT_GENDER"] = "user-submit-gender";
NodeActionType["USER_SUBMIT_OTP"] = "user-submit-otp";
NodeActionType["USER_SUBMIT_WHATSAPP"] = "user-submit-whatsapp";
NodeActionType["POLL_CHOICE"] = "poll-choice";
NodeActionType["POLL_CHOICE_TEXT_BY_INPUT"] = "poll-choice-text-by-input";
NodeActionType["POLL_CHOICE_IMAGE"] = "poll-choice-image";
NodeActionType["POLL_BUTTON"] = "poll-button";
NodeActionType["RATING_STAR"] = "rating-star";
NodeActionType["RATING_DESCRIPTION"] = "rating-description";
NodeActionType["RATING_BUTTON"] = "rating-button";
NodeActionType["LIKE_CHOICE"] = "like-choice";
NodeActionType["DISLIKE_CHOICE"] = "dislike-choice";
NodeActionType["REVIEW_CHOICE"] = "review-choice";
NodeActionType["REVIEW_DESCRIPTION"] = "review-description";
NodeActionType["REVIEW_BUTTON"] = "review-button";
NodeActionType["RESULT_BUTTON"] = "result-button";
NodeActionType["POLL_RESULT"] = "poll-result";
NodeActionType["USER_SUBMIT_GOOGLE_API_ADDRESS"] = "user-submit-google-api-address";
})(NodeActionType || (NodeActionType = {}));
const FULL_KEY_ADDRESS = [
NodeActionType.USER_SUBMIT_ADDRESS_PROVINCE,
NodeActionType.USER_SUBMIT_ADDRESS_DISTRICT,
NodeActionType.USER_SUBMIT_ADDRESS_COMMUNE,
NodeActionType.USER_SUBMIT_ADDRESS,
];
var NodeMultipleOptions;
(function (NodeMultipleOptions) {
NodeMultipleOptions[NodeMultipleOptions["UNLIMITED"] = 0] = "UNLIMITED";
NodeMultipleOptions[NodeMultipleOptions["EXACT_NUMBER"] = 1] = "EXACT_NUMBER";
NodeMultipleOptions[NodeMultipleOptions["RANGE"] = 2] = "RANGE";
})(NodeMultipleOptions || (NodeMultipleOptions = {}));
const ELEMENT_CONTROL_INPUT_TYPE = {
[]: 'email',
[]: 'text',
[]: 'text',
[]: 'name',
[]: 'number',
[]: 'address',
[]: 'tel',
[]: 'tel',
[]: 'tel',
[]: 'date',
[]: 'confirm',
[]: 'submit',
[]: 'terms',
[]: 'province',
[]: 'district',
[]: 'commune',
[]: 'bmi',
[]: 'gender',
[]: 'poll',
[]: 'poll',
[]: 'poll',
[]: 'rating',
[]: 'text',
[]: 'like',
[]: 'dislike',
[]: 'review',
[]: 'google-api-address',
[]: 'dob',
};
const SubotType = {
FRU: 'FRU',
survey: 'Survey',
ristScreener: 'risk_screener',
voucherAcuvue: 'ACUVUE',
};
var VideoType;
(function (VideoType) {
VideoType["VIDEO"] = "video";
VideoType["SHORTS"] = "short";
VideoType["PODCAST"] = "podcast";
VideoType["LIVESTREAM"] = "live-stream";
})(VideoType || (VideoType = {}));
var SocialType;
(function (SocialType) {
SocialType["Facebook"] = "facebook";
SocialType["Zalo"] = "zalo";
SocialType["Twitter"] = "twitter";
SocialType["WhatsApp"] = "whatsApp";
SocialType["Line"] = "line";
SocialType["Instagram"] = "instagram";
SocialType["LinkedIn"] = "linkedin";
SocialType["Youtube"] = "youtube";
SocialType["Tiktok"] = "tiktok";
SocialType["Telegram"] = "telegram";
SocialType["Viber"] = "viber";
})(SocialType || (SocialType = {}));
const COMMON_DATE_TRANSLATE_KEY = {
DD: { id: 'common.day', defaultMessage: 'Day' },
MM: { id: 'common.month', defaultMessage: 'Month' },
YYYY: { id: 'common.year', defaultMessage: 'Year' },
};
var index = /*#__PURE__*/Object.freeze({
__proto__: null,
get SocialType () { return SocialType; },
COMMON_DATE_TRANSLATE_KEY: COMMON_DATE_TRANSLATE_KEY,
get Gender () { return Gender; },
get BabyGrowthChartType () { return BabyGrowthChartType; },
get BabyGrowthChartDuration () { return BabyGrowthChartDuration; },
get BabyGrowthResultTab () { return BabyGrowthResultTab; },
get LOCALE () { return LOCALE; },
get OnboardingStep () { return OnboardingStep; },
get NodePosition () { return NodePosition; },
get NodeType () { return NodeType; },
NodeFinalTypes: NodeFinalTypes,
get NodeIntentType () { return NodeIntentType; },
get NodeActionType () { return NodeActionType; },
FULL_KEY_ADDRESS: FULL_KEY_ADDRESS,
get NodeMultipleOptions () { return NodeMultipleOptions; },
ELEMENT_CONTROL_INPUT_TYPE: ELEMENT_CONTROL_INPUT_TYPE,
SubotType: SubotType,
get VideoType () { return VideoType; }
});
export { BabyGrowthChartType as B, COMMON_DATE_TRANSLATE_KEY as C, ELEMENT_CONTROL_INPUT_TYPE as E, FULL_KEY_ADDRESS as F, Gender as G, NodeIntentType as N, OnboardingStep as O, SocialType as S, VideoType as V, BabyGrowthChartDuration as a, BabyGrowthResultTab as b, NodePosition as c, NodeType as d, NodeFinalTypes as e, NodeActionType as f, NodeMultipleOptions as g, SubotType as h, index as i };