{ "version": 3, "sources": ["projects/insight/src/app/state/actions/product-wizard.actions.ts", "projects/insight/src/app/shared/product-wizard/survey/module-selection/models/survey-wizard-question.model.ts", "projects/insight/src/app/state/reducers/product-wizard-helpers.ts", "projects/insight/src/app/state/reducers/survey-wizard.reducer.ts", "projects/insight/src/app/state/actions/followup-wizard.actions.ts"], "sourcesContent": ["import { Action } from '@ngrx/store';\r\nimport { CompanyProductDefinition, Product, WizardContexts, WizardTypes } from 'app/shared/models';\r\nimport { FollowupWizardContext, SurveyWizardContext } from 'app/shared/models/product-wizard.model';\r\n\r\nexport enum Type {\r\n SET_WIZARD_STATE = '[PRODUCT_WIZARD] SET_WIZARD_STATE',\r\n SELECT_PRODUCT_DEFINITION = '[PRODUCT_WIZARD] SELECT_PRODUCT_DEFINITION',\r\n SELECT_PRODUCT_DEFINITION_SUCCESS = '[PRODUCT_WIZARD] SELECT_PRODUCT_DEFINITION_SUCCESS',\r\n SET_PAGE = '[PRODUCT_WIZARD] SET_PAGE',\r\n CREATE_PRODUCT = '[PRODUCT_WIZARD] CREATE_PRODUCT',\r\n DELETE_PRODUCT = '[PRODUCT_WIZARD] DELETE_PRODUCT',\r\n PRODUCT_CREATED = '[PRODUCT_WIZARD] PRODUCT_CREATED',\r\n CREATE_DRAFT = '[PRODUCT_WIZARD] CREATE_DRAFT',\r\n SETUP_DRAFT = '[PRODUCT_WIZARD] SETUP_DRAFT',\r\n SAVE_DRAFT = '[PRODUCT_WIZARD] SAVE_DRAFT',\r\n DRAFT_SAVED = '[PRODUCT_WIZARD] DRAFT_SAVED',\r\n LOAD_DRAFT = '[PRODUCT_WIZARD] LOAD_DRAFT',\r\n SAVE_DRAFT_GO_BACK = '[PRODUCT_WIZARD] SAVE_DRAFT_GO_BACK',\r\n SET_CHANGED = '[SURVEY_WIZARD] SET_CHANGED',\r\n SET_CHANGED_SUCCESS = '[SURVEY_WIZARD] SET_CHANGED_SUCCESS',\r\n CREATE_FROM_SURVEY = '[SURVEY_WIZARD] CREATE_FROM_SURVEY',\r\n CREATE_FROM_SURVEY_SUCCESS = '[SURVEY_WIZARD] CREATE_FROM_SURVEY_SUCCESS'\r\n}\r\n\r\nexport class SetWizardState implements Action {\r\n readonly type = Type.SET_WIZARD_STATE;\r\n constructor(public payload: WizardContexts) { }\r\n}\r\n\r\nexport class SelectProductDefinition implements Action {\r\n readonly type = Type.SELECT_PRODUCT_DEFINITION;\r\n constructor(public payload: CompanyProductDefinition, public wizardType: WizardTypes) { }\r\n}\r\n\r\nexport class SelectProductDefinitionSuccess implements Action {\r\n readonly type = Type.SELECT_PRODUCT_DEFINITION_SUCCESS;\r\n constructor(public payload: CompanyProductDefinition, public wizardType: WizardTypes) { }\r\n}\r\nexport class CreateProduct implements Action {\r\n readonly type = Type.CREATE_PRODUCT;\r\n constructor(public payload: WizardContexts) { }\r\n}\r\n\r\nexport class DeleteProduct implements Action {\r\n readonly type = Type.DELETE_PRODUCT;\r\n constructor(public productId: number, public wizardType: WizardTypes) { }\r\n}\r\n\r\nexport class ProductCreated implements Action {\r\n readonly type = Type.PRODUCT_CREATED;\r\n constructor(public payload: number, public wizardType: WizardTypes) { }\r\n}\r\n\r\nexport class CreateDraft implements Action {\r\n readonly type = Type.CREATE_DRAFT;\r\n constructor(public payload: SurveyWizardContext | FollowupWizardContext) { }\r\n}\r\nexport class SetupDraft implements Action {\r\n readonly type = Type.SETUP_DRAFT;\r\n constructor(public payload: CompanyProductDefinition, public wizardType: WizardTypes) { }\r\n}\r\nexport class SaveDraft implements Action {\r\n readonly type = Type.SAVE_DRAFT;\r\n constructor(public payload: WizardContexts, public showMessage = false) { }\r\n}\r\n\r\nexport class SaveDraftAndCancel implements Action {\r\n readonly type = Type.SAVE_DRAFT_GO_BACK;\r\n constructor(public payload: WizardContexts, public showMessage = false) { }\r\n}\r\n\r\nexport class DraftSaved implements Action {\r\n readonly type = Type.DRAFT_SAVED;\r\n constructor(public payload: { productId: number, currentVersion: string }, public wizardType: WizardTypes, public showMessage = false) { }\r\n}\r\n\r\nexport class LoadDraft implements Action {\r\n readonly type = Type.LOAD_DRAFT;\r\n constructor(public payload: number | Product, public wizardType: WizardTypes, public wasDeactivated = false, public forceStep = -1) { }\r\n}\r\n\r\nexport class SetPage implements Action {\r\n readonly type = Type.SET_PAGE;\r\n constructor(public payload: number, public wizardType: WizardTypes) { }\r\n}\r\n\r\nexport class SetChanged implements Action {\r\n readonly type = Type.SET_CHANGED;\r\n constructor(public payload: { changed: boolean, action?: Action }) { }\r\n}\r\n\r\nexport class SetChangedSuccess implements Action {\r\n readonly type = Type.SET_CHANGED_SUCCESS;\r\n constructor(public payload: { changed: boolean, action?: Action }) { }\r\n}\r\n\r\nexport class CreateFromSurvey implements Action {\r\n readonly type = Type.CREATE_FROM_SURVEY;\r\n constructor(public payload: number) { }\r\n}\r\n\r\nexport class CreateFromSurveySuccess implements Action {\r\n readonly type = Type.CREATE_FROM_SURVEY_SUCCESS;\r\n constructor(public payload: WizardContexts) { }\r\n}\r\n\r\nexport type Actions = SetWizardState |\r\n SelectProductDefinition |\r\n SelectProductDefinitionSuccess |\r\n CreateProduct |\r\n ProductCreated |\r\n CreateDraft |\r\n SetupDraft |\r\n SaveDraft |\r\n DraftSaved |\r\n LoadDraft |\r\n SetPage |\r\n SaveDraftAndCancel |\r\n SetChanged |\r\n SetChangedSuccess |\r\n CreateFromSurvey |\r\n CreateFromSurveySuccess;\r\n", "import { QuestionInfo } from 'app/shared/models';\r\n\r\nexport interface GridQuestionData {\r\n moduleName: string;\r\n moduleId: number;\r\n companyId: number;\r\n questionId: number;\r\n key: string;\r\n text: string[];\r\n indexes: { id: number, key: string, name: string }[];\r\n moduleOrder: number;\r\n excluded: boolean;\r\n questionPriority: number;\r\n pageGroupId: number;\r\n pageGroupKey: string;\r\n pageGroupName: string;\r\n pageGroupIcon: string;\r\n pageGroupIndex: number;\r\n moduleQuestionId?: string;\r\n excludedByUser?: boolean;\r\n hasActiveDuplicates?: boolean;\r\n excludedByRule?: boolean;\r\n excludedByRuleTarget?: boolean;\r\n questionType?: 'B' | 'C';\r\n customAdded?: boolean;\r\n icon?: string;\r\n type?: string;\r\n ruleTargets?: string[];\r\n ruleSources?: string[];\r\n questionText?: string;\r\n questionHelpText?: string;\r\n}\r\nexport interface ValidationData {\r\n children: ValidationData[] | null;\r\n parentId: number | null;\r\n id: number;\r\n key: string;\r\n name: string;\r\n minQuestionCount: number;\r\n maxQuestionCount: number;\r\n indexAvailableQuestionsCount: number;\r\n additionalQuestions: QuestionInfo[];\r\n questionCount: number;\r\n includedQuestions: any[];\r\n required: boolean;\r\n status: string;\r\n statusIcon?: string;\r\n errors?: ValidationError;\r\n}\r\n\r\n\r\nexport enum ValidationError {\r\n None = 'ok',\r\n Warning = 'warning',\r\n Error = 'error',\r\n}\r\n\r\nexport interface GridQuestionDataGroup {\r\n moduleId: number;\r\n pageGroup: number;\r\n questions: GridQuestionData[];\r\n order?: number;\r\n}\r\n", "import { isSurveyWizardContext, WizardContexts, WizardTypes } from 'app/shared/models';\r\nimport { Actions as FollowupWizardActions } from 'app/state/actions/followup-wizard.actions';\r\nimport { Actions as ProductWizardActions, Type as ProductWizardActionType } from 'app/state/actions/product-wizard.actions';\r\nimport { Actions as SurveyWizardActions } from 'app/state/actions/survey-wizard.actions';\r\n\r\nexport function handleProductWizardActions(\r\n state: WizardContexts,\r\n action: SurveyWizardActions | FollowupWizardActions | ProductWizardActions,\r\n wizardType: WizardTypes,\r\n initialState: WizardContexts) {\r\n switch (action.type) {\r\n\r\n case ProductWizardActionType.CREATE_FROM_SURVEY_SUCCESS: {\r\n if (action.payload?.wizardType === wizardType) {\r\n return action.payload != null ? { ...action.payload, saving: false } : { ...initialState };\r\n } else {\r\n return state;\r\n }\r\n }\r\n\r\n case ProductWizardActionType.SET_WIZARD_STATE: {\r\n if (action.payload?.wizardType === wizardType) {\r\n return action.payload != null ? { ...action.payload, saving: false } : { ...initialState };\r\n } else {\r\n return state;\r\n }\r\n }\r\n\r\n case ProductWizardActionType.SELECT_PRODUCT_DEFINITION: {\r\n if (action.wizardType === wizardType) {\r\n if (isSurveyWizardContext(state)) {\r\n return ({ ...initialState });\r\n }\r\n } else {\r\n return state;\r\n }\r\n break;\r\n }\r\n\r\n case ProductWizardActionType.SELECT_PRODUCT_DEFINITION_SUCCESS: {\r\n if (action.wizardType === wizardType) {\r\n return { ...state, productDefinition: { ...action.payload, definitionObject: JSON.parse(action.payload.definition) } };\r\n } else {\r\n return state;\r\n }\r\n }\r\n\r\n case ProductWizardActionType.SAVE_DRAFT: {\r\n return { ...state, pristine: false, saving: true };\r\n }\r\n\r\n case ProductWizardActionType.CREATE_DRAFT: {\r\n return { ...state, saving: true };\r\n }\r\n\r\n case ProductWizardActionType.DRAFT_SAVED: {\r\n if (action.wizardType === wizardType) {\r\n return { ...state, productId: action.payload.productId, currentVersion: action.payload.currentVersion, saving: false };\r\n } else {\r\n return { ...state, saving: false };\r\n }\r\n }\r\n\r\n case ProductWizardActionType.SET_PAGE: {\r\n if (action.wizardType === wizardType) {\r\n return { ...state, activeStep: action.payload };\r\n } else {\r\n return state;\r\n }\r\n }\r\n case ProductWizardActionType.SET_CHANGED_SUCCESS: {\r\n return { ...state, unsaved: action.payload.changed }\r\n }\r\n\r\n default: {\r\n return null;\r\n }\r\n }\r\n}\r\n", "import {\r\n AutoReportMode,\r\n CommunicationContext,\r\n FieldDisplayType,\r\n Module,\r\n ModulePageItem,\r\n Operand,\r\n ReminderEmail,\r\n Rule,\r\n SurveyWizardContext,\r\n WizardTypes\r\n} from 'app/shared/models';\r\nimport { ModuleView } from 'app/shared/product-wizard/survey/module-selection/models';\r\nimport { ValidationError } from 'app/shared/product-wizard/survey/module-selection/models/survey-wizard-question.model';\r\nimport { LayoutType } from 'app/shared/survey-render/models';\r\nimport { Actions as ProductWizardActions } from 'app/state/actions/product-wizard.actions';\r\nimport {\r\n Actions as SurveyWizardActions,\r\n Type as SurveyWizardActionType\r\n} from 'app/state/actions/survey-wizard.actions';\r\nimport { cloneDeep } from 'lodash-es';\r\nimport { handleProductWizardActions } from './product-wizard-helpers';\r\n\r\n\r\nenum RuleConditionOperandSource {\r\n 'Question' = 'Question',\r\n}\r\n\r\nconst OPTIONAL_QUESTIONS_KEY = 'OptionalQuestions';\r\nconst todaysDate = new Date();\r\nexport const initialState: SurveyWizardContext = {\r\n wizardType: WizardTypes.survey,\r\n activeStep: 0,\r\n productDefinition: null,\r\n productId: null,\r\n surveyId: null,\r\n name: null,\r\n wasDeactivated: false,\r\n saving: false,\r\n moduleId: null,\r\n modules: [],\r\n allModules: [],\r\n index: {\r\n indexInfo: [],\r\n indexValidation: [],\r\n indexes: null,\r\n },\r\n participants: {\r\n participantCount: 0,\r\n phoneNumberParticipantCount: 0,\r\n nonPinCodeParticipantCount: 0,\r\n selectedHierarchy: null,\r\n groups: [],\r\n emailParticipantCount: 0,\r\n perspectivesRespondentsCount: null,\r\n perspectivesFocusUsersCount: null\r\n },\r\n communication: {\r\n communicationEnabled: true,\r\n communicationMethod: 'email',\r\n activationEmail: null,\r\n hasPinGroups: false,\r\n pinCodeEmail: null,\r\n autoReport: true,\r\n autoReportMode: AutoReportMode.GroupManagers,\r\n activationSms: null,\r\n pinCodeSms: null,\r\n welcomeSms: null,\r\n previewLanguage: { id: null, code: null },\r\n reportEmail: null\r\n },\r\n schedule: {\r\n reminderEmails: [],\r\n directActivation: true,\r\n startDate: new Date(todaysDate.getFullYear(), todaysDate.getMonth(), todaysDate.getDate()),\r\n endDate: new Date(todaysDate.getFullYear(), todaysDate.getMonth(), todaysDate.getDate() + 14, 23, 59, 0),\r\n reportDate: getNextBusinessDay(new Date(todaysDate.getFullYear(), todaysDate.getMonth(), todaysDate.getDate() + 14, 9, 0, 0)),\r\n schedules: [],\r\n duration: ''\r\n },\r\n currentVersion: null,\r\n unsaved: false,\r\n pristine: true\r\n};\r\n\r\nexport function reducer(state: SurveyWizardContext = initialState, action: SurveyWizardActions | ProductWizardActions) {\r\n\r\n const baseState = handleProductWizardActions(state, action, WizardTypes.survey, initialState);\r\n if (baseState !== null) {\r\n return baseState as SurveyWizardContext;\r\n }\r\n switch (action.type) {\r\n\r\n case SurveyWizardActionType.SET_SELECTED_MODULES_SUCCESS: {\r\n const modules = action.payload;\r\n hideDuplicateQuestions([modules]);\r\n return { ...state, modules: [modules] };\r\n }\r\n\r\n case SurveyWizardActionType.SET_MODULE_ID_SUCCESS: {\r\n const id = +action.payload;\r\n // Keep pristine on initial set of moduleId\r\n const pristine = state.moduleId === null;\r\n\r\n return {\r\n ...state,\r\n moduleId: id,\r\n pristine: pristine\r\n };\r\n }\r\n\r\n case SurveyWizardActionType.UNLOAD_SURVEY_WIZARD: {\r\n return initialState;\r\n }\r\n\r\n case SurveyWizardActionType.SETUP_CONTENT_SUCCESS: {\r\n const allModules = action.payload.flatMap(mcg => mcg.modules);\r\n const modules = state.modules\r\n .filter(m => !!allModules.find(am => am.id === m.id))\r\n .map((m): ModuleView => {\r\n const moduleMatch = allModules.find(a => a.id === m.id);\r\n return {\r\n ...m,\r\n name: moduleMatch?.name ?? m.name,\r\n main: !!moduleMatch?.main\r\n }\r\n })\r\n .filter(m => m.enabled || m.main);\r\n\r\n return { ...state, allModules: allModules, modules: modules };\r\n }\r\n\r\n case SurveyWizardActionType.TOGGLE_MODULE: {\r\n const currentModules: ModuleView[] = cloneDeep(state.modules);\r\n if (currentModules.some(x => x.id === action.payload.id)) {\r\n currentModules.removeEvery(x => x.id === action.payload.id);\r\n } else {\r\n currentModules.push(cloneDeep(action.payload));\r\n }\r\n hideDuplicateQuestions(currentModules);\r\n return { ...state, modules: currentModules };\r\n }\r\n\r\n case SurveyWizardActionType.TOGGLE_EXPAND_MODULE: {\r\n const currentModules: ModuleView[] = cloneDeep(state.modules);\r\n let module = currentModules.find(m => m.id === action.payload);\r\n if (module) {\r\n module.expanded = !module.expanded;\r\n return { ...state, modules: currentModules };\r\n }\r\n const allModules = cloneDeep(state.allModules);\r\n module = allModules.find(m => m.id === action.payload);\r\n module.expanded = !module.expanded;\r\n return { ...state, allModules: allModules };\r\n }\r\n\r\n case SurveyWizardActionType.REFRESH_MODULE_RULES: {\r\n const currentModules: ModuleView[] = cloneDeep(state.modules);\r\n const itemIndex = currentModules.findIndex(m => m.id === action.payload.id);\r\n if (itemIndex > -1) {\r\n const currentRules = action.payload.rules;\r\n currentModules[itemIndex].rules = currentRules;\r\n }\r\n hideDuplicateQuestions(currentModules);\r\n return { ...state, modules: currentModules };\r\n }\r\n\r\n case SurveyWizardActionType.ADD_QUESTIONS_TO_MODULE: {\r\n const currentModules: ModuleView[] = cloneDeep(state.modules);\r\n const module = currentModules.find(m => m.id === action.payload.id);\r\n const pageGroup = module.pageGroups.find(pg => pg.pageGroupId === action.payload.pageGroupId);\r\n let orderIndex = pageGroup?.pages.length ?? 0;\r\n if (module.key === OPTIONAL_QUESTIONS_KEY) {\r\n module.totalQuestions = module.totalQuestions + action.payload.questions.length;\r\n }\r\n for (const question of action.payload.questions) {\r\n const pageGroupIndex = module.pageGroups.findIndex(pg => pg.pageGroupId === action.payload.pageGroupId);\r\n module.pageGroups[pageGroupIndex !== -1 ? pageGroupIndex : 0].pages.push({\r\n pageId: orderIndex,\r\n includedInProgress: true,\r\n order: orderIndex++,\r\n showAbout: true,\r\n showChapterProgress: true,\r\n showNavigation: true,\r\n showPageProgress: true,\r\n key: question.pageType as LayoutType,\r\n pageItems: [{\r\n companyId: question.companyId,\r\n hasRules: false,\r\n key: question.key,\r\n icon: question.icon,\r\n type: question.type,\r\n questionId: question.id,\r\n text: question.text,\r\n order: 0,\r\n customAdded: true,\r\n excluded: false,\r\n excludedByRule: false,\r\n excludedByRuleTarget: false,\r\n excludedByUser: false,\r\n moduleOrder: 0,\r\n displayType: question.displayType as FieldDisplayType[]\r\n }]\r\n });\r\n hideDuplicateQuestions(currentModules);\r\n }\r\n return { ...state, modules: currentModules };\r\n }\r\n\r\n case SurveyWizardActionType.REMOVE_QUESTIONS_FROM_MODULE: {\r\n const currentModules: ModuleView[] = cloneDeep(state.modules);\r\n const module = currentModules.find(m => m.id === action.payload.moduleId);\r\n const pageGroup = module.pageGroups.find(pg => pg.pageGroupId === action.payload.pageGroupId);\r\n\r\n const questionToRemoveIndex = pageGroup.pages\r\n .findIndex(pg => pg.pageItems.some(p => p.questionId === action.payload.questionId && p.customAdded));\r\n\r\n pageGroup.pages.splice(questionToRemoveIndex, 1)\r\n if (module.key === OPTIONAL_QUESTIONS_KEY) {\r\n module.totalQuestions = module.totalQuestions - 1;\r\n }\r\n return { ...state, modules: currentModules };\r\n }\r\n\r\n case SurveyWizardActionType.SORT_MODULES: {\r\n const currentModules = cloneDeep(state.modules);\r\n sortModules(currentModules);\r\n return { ...state, modules: currentModules };\r\n }\r\n\r\n case SurveyWizardActionType.SET_NAME_SUCCESS: {\r\n return { ...state, name: action.payload };\r\n }\r\n\r\n case SurveyWizardActionType.SET_PARTICIPANTS_COUNTS: {\r\n return {\r\n ...state, participants: {\r\n ...state.participants,\r\n participantCount: action.payload.userCount,\r\n phoneNumberParticipantCount: action.payload.usersWithPhone,\r\n nonPinCodeParticipantCount: action.payload.nonPinCodeUserCount,\r\n emailParticipantCount: action.payload.usersWithEmail,\r\n perspectivesRespondentsCount: action.payload.perspectivesRespondentsCount,\r\n perspectivesFocusUsersCount: action.payload.perspectivesFocusUsersCount\r\n }\r\n };\r\n }\r\n\r\n case SurveyWizardActionType.SET_GROUP_SELECTION: {\r\n return { ...state, participants: { ...state.participants, groupSelection: action.payload } };\r\n }\r\n\r\n case SurveyWizardActionType.SET_GROUPS: {\r\n return {\r\n ...state,\r\n participants: {\r\n ...state.participants,\r\n groups: action.payload\r\n },\r\n communication: {\r\n ...state.communication,\r\n hasPinGroups: action.payload.filter(g => g.pin).length > 0\r\n }\r\n };\r\n }\r\n\r\n case SurveyWizardActionType.SET_SELECTED_HIERARCHY: {\r\n return { ...state, participants: { ...state.participants, selectedHierarchy: action.payload } };\r\n }\r\n\r\n case SurveyWizardActionType.SET_COMMUNICATION_METHOD_SUCCESS: {\r\n const _state = {\r\n ...state,\r\n communication: { ...state.communication, communicationMethod: action.payload },\r\n schedule: {\r\n ...state.schedule, reminderEmails: initReminders(state)\r\n }\r\n };\r\n\r\n return _state;\r\n }\r\n\r\n case SurveyWizardActionType.SET_COMMUNICATION_ENABLED: {\r\n return { ...state, communication: { ...state.communication, communicationEnabled: action.payload } };\r\n }\r\n\r\n case SurveyWizardActionType.SET_ACTIVATION_EMAIL: {\r\n return {\r\n ...state,\r\n communication: { ...state.communication, activationEmail: action.payload },\r\n schedule: {\r\n ...state.schedule, reminderEmails: getReminderEmails(state.schedule.startDate, state.schedule.endDate, action.payload.id)\r\n }\r\n };\r\n }\r\n\r\n case SurveyWizardActionType.SET_ACTIVATION_SMS: {\r\n return { ...state, communication: { ...state.communication, activationSms: action.payload } };\r\n }\r\n case SurveyWizardActionType.SET_PIN_CODE_EMAIL: {\r\n return { ...state, communication: { ...state.communication, pinCodeEmail: action.payload } };\r\n }\r\n case SurveyWizardActionType.SET_PIN_CODE_SMS: {\r\n return { ...state, communication: { ...state.communication, pinCodeSms: action.payload } };\r\n }\r\n case SurveyWizardActionType.SET_PINCODE_LANGUAGE: {\r\n return { ...state, communication: { ...state.communication, pincodeLanguage: action.payload } };\r\n }\r\n case SurveyWizardActionType.SET_PREVIEW_LANGUAGE: {\r\n return { ...state, communication: { ...state.communication, previewLanguage: action.payload } };\r\n }\r\n case SurveyWizardActionType.SET_REPORT_EMAIL: {\r\n return { ...state, communication: { ...state.communication, reportEmail: action.payload } };\r\n }\r\n case SurveyWizardActionType.SET_WELCOME_SMS: {\r\n return { ...state, communication: { ...state.communication, welcomeSms: action.payload } };\r\n }\r\n case SurveyWizardActionType.SET_WELCOME_LANGUAGE: {\r\n return { ...state, communication: { ...state.communication, welcomeLanguage: action.payload } };\r\n }\r\n case SurveyWizardActionType.SET_AUTO_REPORT: {\r\n return { ...state, communication: { ...state.communication, autoReport: action.payload } };\r\n }\r\n\r\n case SurveyWizardActionType.INIT_AUTO_REPORT: {\r\n const product = action.payload.context.productDefinition.definitionObject;\r\n const autoReportMode = product.survey.autoReportSettings?.mode ?? AutoReportMode.GroupManagers;\r\n if (state.communication.autoReport !== null) { // already set in draft, don't change\r\n return { ...state, communication: { ...state.communication, autoReportMode: autoReportMode } };\r\n }\r\n const communication = product.steps.find(s => s.stepId === 'communications');\r\n let autoReport = action.payload.autoReportDefaultValue;\r\n if (communication && 'autoReport' in communication.settings) {\r\n autoReport = !!communication.settings.autoReport;\r\n }\r\n\r\n return { ...state, communication: { ...state.communication, autoReport: autoReport, autoReportMode: autoReportMode } };\r\n }\r\n\r\n case SurveyWizardActionType.SET_START_DATE: {\r\n return { ...state, schedule: { ...state.schedule, startDate: action.payload, directActivation: isDirect(action.payload) } };\r\n }\r\n\r\n case SurveyWizardActionType.SET_END_DATE: {\r\n return {\r\n ...state, schedule: {\r\n ...state.schedule, endDate: action.payload,\r\n reportDate: action.payload == null ?\r\n state.schedule.reportDate :\r\n getNextBusinessDay(new Date(action.payload.getFullYear(), action.payload.getMonth(), action.payload.getDate(), 9, 0, 0)),\r\n reminderEmails: action.payload == null ?\r\n [] :\r\n getReminderEmails(state.schedule.startDate, action.payload, state.communication.activationEmail.id)\r\n }\r\n };\r\n }\r\n\r\n case SurveyWizardActionType.SET_SCHEDULE_RECURRING: {\r\n return { ...state, schedule: { ...state.schedule, startDate: action.payload.startDate, endDate: action.payload.endDate, schedules: action.payload.schedules, duration: action.payload.duration } };\r\n }\r\n\r\n case SurveyWizardActionType.SET_REPORT_DATE: {\r\n return { ...state, schedule: { ...state.schedule, reportDate: action.payload } };\r\n }\r\n case SurveyWizardActionType.SET_DIRECT_REPORT: {\r\n return { ...state, schedule: { ...state.schedule, directReport: action.payload } };\r\n }\r\n case SurveyWizardActionType.SET_REMINDER_EMAILS: {\r\n return { ...state, schedule: { ...state.schedule, reminderEmails: [...action.payload] } };\r\n }\r\n\r\n case SurveyWizardActionType.SET_REMINDER_EMAIL: {\r\n const reminderEmails = [...state.schedule.reminderEmails];\r\n reminderEmails[action.payload.index] = action.payload.reminderEmail;\r\n return { ...state, schedule: { ...state.schedule, reminderEmails: reminderEmails } };\r\n }\r\n\r\n case SurveyWizardActionType.SET_START_TIME: {\r\n if (action.payload.direct) {\r\n return { ...state, schedule: { ...state.schedule, directActivation: true } };\r\n } else {\r\n const s = state.schedule.startDate;\r\n return {\r\n ...state, schedule: {\r\n ...state.schedule,\r\n directActivation: false,\r\n startDate: new Date(\r\n s.getFullYear(),\r\n s.getMonth(),\r\n s.getDate(),\r\n action.payload.hour,\r\n action.payload.minute,\r\n 0)\r\n }\r\n };\r\n }\r\n\r\n }\r\n\r\n case SurveyWizardActionType.TOGGLE_QUESTION: {\r\n const modules = cloneDeep(state.modules);\r\n toggleQuestion(modules, action.payload.moduleId, action.payload.questionId, null);\r\n hideDuplicateQuestions(modules);\r\n return { ...state, modules: modules };\r\n }\r\n\r\n case SurveyWizardActionType.SET_INDEXES: {\r\n const indexList = action.payload.filter(i => i.errors === ValidationError.None)\r\n .map(x => x.id);\r\n return { ...state, index: { ...state.index, indexes: indexList, indexValidation: action.payload } };\r\n }\r\n\r\n case SurveyWizardActionType.GET_INDEX_INFO_SUCCESS: {\r\n return { ...state, index: { ...state.index, indexInfo: action.payload } };\r\n }\r\n\r\n case SurveyWizardActionType.SET_SURVEY_ID: {\r\n return { ...state, surveyId: action.payload };\r\n }\r\n default: {\r\n return state;\r\n }\r\n }\r\n}\r\n\r\nexport const getScheduleContext = (state: SurveyWizardContext) => state.schedule;\r\nexport const getCommunicationContext = (state: SurveyWizardContext) => state.communication;\r\nexport const getParticipantContext = (state: SurveyWizardContext) => state.participants;\r\nexport const canAddReminders = (state: CommunicationContext) => state.communicationMethod === 'email';\r\n\r\nfunction toggleQuestion(modules: Module[], moduleId: number, questionId: number, pageItemId?: number) {\r\n let oldExcludedValue = false;\r\n let filteredModules = modules.filter(x => x.id === moduleId);\r\n if (!filteredModules.length) {\r\n filteredModules = modules;\r\n }\r\n\r\n for (const m of filteredModules) {\r\n const targets: number[] = [];\r\n for (const pg of m.pageGroups) {\r\n for (const p of pg.pages) {\r\n // Toggle the question\r\n p.pageItems\r\n .forEach(pi => {\r\n if ((pageItemId == null || pi.pageItemId === pageItemId) && pi.questionId === questionId) {\r\n pi.excluded = !pi.excluded;\r\n pi.excludedByUser = false;\r\n }\r\n // If it is not a duplicate but the item is missing, then it has been hidden by the user\r\n if ((pageItemId == null) && pi.questionId === questionId) {\r\n pi.excludedByUser = !pi.excludedByUser;\r\n }\r\n\r\n // Save old excluded value\r\n if (pi.questionId === questionId) {\r\n if (pi.excluded && pi.excludedByRuleTarget) {\r\n oldExcludedValue = true;\r\n } else {\r\n oldExcludedValue = false;\r\n }\r\n }\r\n\r\n // Warn if question includes a rule and target rules\r\n for (const rule of m.rules) {\r\n const operand = getOperand(rule);\r\n if (pi.questionId === questionId && (operand.source === RuleConditionOperandSource.Question\r\n && operand.sourceId === questionId)) {\r\n pi.excludedByRule = !pi.excludedByRule;\r\n for (const target of rule.targets) {\r\n targets.push(target.targetId);\r\n }\r\n }\r\n }\r\n // Check if question is included in rule targets\r\n for (const targetId of targets) {\r\n if (targetId === pi.questionId) {\r\n // Reset toggle of already excluded questions\r\n if (oldExcludedValue && pi.excluded && pi.excludedByRuleTarget) {\r\n pi.excluded = false;\r\n } else {\r\n pi.excludedByRuleTarget = !pi.excludedByRuleTarget;\r\n }\r\n\r\n if (pi.excluded && pi.excludedByRuleTarget) {\r\n pi.excluded = false;\r\n if (pi.excludedByRule) {\r\n pi.excludedByRule = false;\r\n }\r\n }\r\n\r\n // Recursive check if target also has rule and target\r\n toggleQuestion(modules, moduleId, targetId);\r\n\r\n }\r\n }\r\n });\r\n }\r\n }\r\n }\r\n}\r\n\r\nfunction getOperand(rule: Rule): Operand {\r\n if (rule.condition.conditions.length > 0) {\r\n if (rule.condition.conditions[0].operand1.source === RuleConditionOperandSource.Question) {\r\n return rule.condition.conditions[0].operand1;\r\n }\r\n return rule.condition.conditions[0].operand2;\r\n } else {\r\n if (rule.condition.operand1.source === RuleConditionOperandSource.Question) {\r\n return rule.condition.operand1;\r\n }\r\n return rule.condition.operand2;\r\n }\r\n}\r\nfunction hideDuplicateQuestions(modules: Module[]) {\r\n const resetDuplicatesGroupOnKey: Grouping[] = modules\r\n .reduce((am, cm) => [...am, ...cm.pageGroups\r\n .reduce((apg, cpg) => [...apg, ...cpg.pages\r\n .reduce((ap, cp) => [...ap, ...cp.pageItems.filter(pi => pi.questionId != null && pi.excluded && !pi.excludedByUser)\r\n ], []).map((obj: ModulePageItem): ModulePageItem => ({ ...obj, moduleId: cm.id, questionPriority: cm.questionPriority, moduleOrder: cm.order }))\r\n ], [])\r\n ], [])\r\n .groupBy(q => q.key);\r\n for (const group of resetDuplicatesGroupOnKey) {\r\n for (const question of group.values) {\r\n toggleQuestion(modules, question.moduleId, question.questionId, question.pageItemId);\r\n }\r\n }\r\n\r\n const duplicatesGroupOnKey: Grouping[] = modules\r\n .reduce((am, cm) => [...am, ...cm.pageGroups\r\n .reduce((apg, cpg) => [...apg, ...cpg.pages\r\n .reduce((ap, cp) => [...ap, ...cp.pageItems.filter(pi => pi.questionId != null && !pi.excluded)\r\n ], []).map(obj => ({ ...obj, moduleId: cm.id, questionPriority: cm.questionPriority, moduleOrder: cm.order }))\r\n ], [])\r\n ], [])\r\n .groupBy(q => q.key).filter(q => q.values.length > 1);\r\n\r\n const cmp = (a: number, b: number) => {\r\n if (a > b) { return 1; }\r\n if (a < b) { return -1; }\r\n return 0;\r\n };\r\n\r\n for (const question of duplicatesGroupOnKey) {\r\n // sort on questionPrio first, then by companyId, if it's larger than one it may be considered their own.\r\n // Sort on moduleOrder last as fallback.\r\n const questions = question.values\r\n .sort(\r\n (a, b) =>\r\n cmp(a.questionPriority, b.questionPriority) ||\r\n cmp(b.companyId, a.companyId) ||\r\n (+b.hasRules) - (+a.hasRules) ||\r\n cmp(a.moduleOrder, b.moduleOrder));\r\n\r\n for (const duplicate of questions.slice(1)) {\r\n toggleQuestion(modules, duplicate.moduleId, duplicate.questionId, duplicate.pageItemId);\r\n }\r\n }\r\n}\r\n\r\nfunction initReminders(surveyWizardContext: SurveyWizardContext): ReminderEmail[] {\r\n if (surveyWizardContext.schedule.reminderEmails.length === 0) {\r\n return getReminderEmails(\r\n surveyWizardContext.schedule.startDate,\r\n surveyWizardContext.schedule.endDate,\r\n surveyWizardContext.communication.activationEmail.id);\r\n } else {\r\n const reminders = [...surveyWizardContext.schedule.reminderEmails];\r\n reminders.forEach(reminder => {\r\n reminder = { ...reminder, timeLabel: getTimeLabel(reminder.date) };\r\n });\r\n return reminders;\r\n }\r\n}\r\n\r\nexport function getReminderEmails(\r\n startDate: Date,\r\n endDate: Date,\r\n activationEmailId: number) {\r\n if (endDate == null) { return []; }\r\n\r\n const _endDate = new Date(endDate.getFullYear(), endDate.getMonth(), (endDate.getDate()), 9, 0, 0);\r\n const reminderEmails = [];\r\n const daysDiff = getDaysDiff(startDate, _endDate);\r\n if (!activationEmailId || daysDiff < 4) {\r\n return reminderEmails;\r\n }\r\n let i = 0;\r\n let twoBusinessDaysAgo = _endDate;\r\n while (i < 2) {\r\n twoBusinessDaysAgo = getLastBusinessDay(twoBusinessDaysAgo);\r\n i++;\r\n }\r\n reminderEmails.push({ emailId: activationEmailId, date: twoBusinessDaysAgo, timeLabel: '09:00' });\r\n if (daysDiff > 7) {\r\n let fiveBusinessDaysAgo = _endDate;\r\n i = 0;\r\n while (i < 5) {\r\n fiveBusinessDaysAgo = getLastBusinessDay(fiveBusinessDaysAgo);\r\n i++;\r\n }\r\n reminderEmails.unshift({ emailId: activationEmailId, date: fiveBusinessDaysAgo, timeLabel: '09:00' });\r\n }\r\n return reminderEmails;\r\n}\r\nfunction getLastBusinessDay(d: Date) {\r\n let bd = d.getDay(); // get day from current date which be between 0-6 (0 is Sunday and 6 is Saturday)\r\n if (bd < 2) {\r\n if (bd === 0) {\r\n bd = 2;\r\n } else {\r\n bd = 3;\r\n }\r\n } else {\r\n bd = 1;\r\n }\r\n // variable bd will get the last business day by reducing the calculated lbd from today's date\r\n return new Date(d.getFullYear(), d.getMonth(), (d.getDate() - bd), 9, 0, 0);\r\n}\r\nexport function getNextBusinessDay(d: Date) {\r\n const day = d.getDay();\r\n const add = 1 + (day === 5 && 2) + (day === 6 && 1);\r\n d.setDate(d.getDate() + add);\r\n return d;\r\n}\r\n\r\nexport function getDaysDiff(d1: Date, d2: Date) {\r\n const diffc = d1.getTime() - d2.getTime();\r\n return Math.round(Math.abs(diffc / (1000 * 60 * 60 * 24)));\r\n}\r\n\r\nexport function getSignedDaysDiff(d1: Date, d2: Date) {\r\n const diffc = d1.getTime() - d2.getTime();\r\n return Math.round(diffc / (1000 * 60 * 60 * 24));\r\n}\r\n\r\nexport function getTimeLabel(date: Date): string {\r\n const hours = date.getHours().toString();\r\n const minutes = date.getMinutes().toString();\r\n return (hours.length === 1 ? '0' + hours : hours) + ':' + (minutes.length === 1 ? '0' + minutes : minutes);\r\n}\r\nfunction sortModules(modules: Module[]) {\r\n modules.sort((a, b) => {\r\n const aModuleOrder = +(a.meta?.find(ma => ma.metaId === 16)?.value ?? 9999999);\r\n const bModuleOrder = +(b.meta?.find(mb => mb.metaId === 16)?.value ?? 9999999);\r\n if (aModuleOrder && bModuleOrder) {\r\n if (aModuleOrder > bModuleOrder) {\r\n return 1;\r\n } else if (aModuleOrder < bModuleOrder) {\r\n return -1;\r\n }\r\n }\r\n return 0;\r\n });\r\n}\r\n\r\nfunction secondsDiff(d1, d2) {\r\n return Math.floor((d2 - d1) / 1000);\r\n}\r\nfunction minutesDiff(d1, d2) {\r\n const seconds = secondsDiff(d1, d2);\r\n return Math.floor(seconds / 60);\r\n}\r\nfunction isDirect(date: Date) {\r\n const _minutesDiff = minutesDiff(date.getTime(), todaysDate.getTime());\r\n return _minutesDiff < 30 && _minutesDiff > -30;\r\n}\r\n", "import { Action } from '@ngrx/store';\r\nimport {\r\n CompanyProductDefinition,\r\n FollowupAction,\r\n FollowupGoal,\r\n FollowupNow,\r\n GroupResultInfo,\r\n Module,\r\n Recommendation,\r\n RecommendationCategory,\r\n RecommendationSubCategory,\r\n} from 'app/shared/models';\r\n\r\nexport enum Type {\r\n START_FOLLOWUP = '[FOLLOWUP_WIZARD] START_FOLLOWUP',\r\n SELECT_PRIORITIES = '[FOLLOWUP_WIZARD] SELECT_PRIORITIES',\r\n SELECTED_ACTIONAREA = '[FOLLOWUP_WIZARD] SELECTED_ACTIONAREA',\r\n SELECTED_RECOMMENDATION = '[FOLLOWUP_WIZARD] SELECTED_RECOMMENDATION',\r\n SELECTED_RECOMMENDATION_CATEGORY = '[FOLLOWUP_WIZARD] SELECTED_RECOMMENDATION CATEGORY',\r\n SELECTED_RECOMMENDATION_SUBCATEGORY = '[FOLLOWUP_WIZARD] SELECTED_RECOMMENDATION SUBCATEGORY',\r\n ADD_NOW = '[FOLLOWUP_WIZARD] ADD_NOW',\r\n EDIT_NOW = '[FOLLOWUP_WIZARD] EDIT_NOW',\r\n REMOVE_NOW = '[FOLLOWUP_WIZARD] REMOVE_NOW',\r\n ADD_GOAL = '[FOLLOWUP_WIZARD] ADD_GOAL',\r\n EDIT_GOAL = '[FOLLOWUP_WIZARD] EDIT_GOAL',\r\n REMOVE_GOAL = '[FOLLOWUP_WIZARD] REMOVE_GOAL',\r\n ADD_ACTION = '[FOLLOWUP_WIZARD] ADD_ACTION',\r\n EDIT_ACTION = '[FOLLOWUP_WIZARD] EDIT_ACTION',\r\n REMOVE_ACTION = '[FOLLOWUP_WIZARD] REMOVE_ACTION',\r\n ADD_SUGGESTIONS = '[FOLLOWUP_WIZARD] ADD_SUGGESTIONS',\r\n UNLOAD_FOLLOWUP_WIZARD = '[FOLLOWUP_WIZARD] UNLOAD_FOLLOWUP_WIZARD',\r\n SET_BYPASSGUARD = '[FOLLOWUP_WIZARD] SET_BYPASSGUARD'\r\n}\r\nexport class StartFollowup implements Action {\r\n readonly type = Type.START_FOLLOWUP;\r\n constructor(public payload: CompanyProductDefinition,\r\n public groupResultInfo: GroupResultInfo,\r\n public recommendations: Recommendation[],\r\n public groupId?: number,\r\n public productId?: number) { }\r\n}\r\nexport class SelectPriorities implements Action {\r\n readonly type = Type.SELECT_PRIORITIES;\r\n constructor(public payload: Module) { }\r\n}\r\nexport class SelectedRecommendation implements Action {\r\n readonly type = Type.SELECTED_RECOMMENDATION;\r\n constructor(public payload: Recommendation) { }\r\n}\r\nexport class SelectedRecommendationCategory implements Action {\r\n readonly type = Type.SELECTED_RECOMMENDATION_CATEGORY;\r\n constructor(public payload: RecommendationCategory) { }\r\n}\r\nexport class SelectedRecommendationSubCategory implements Action {\r\n readonly type = Type.SELECTED_RECOMMENDATION_SUBCATEGORY;\r\n constructor(public payload: RecommendationSubCategory) { }\r\n}\r\nexport class SelectedActionArea implements Action {\r\n readonly type = Type.SELECTED_ACTIONAREA;\r\n constructor(public payload: string) { }\r\n}\r\nexport class AddNow implements Action {\r\n readonly type = Type.ADD_NOW;\r\n constructor(public payload: FollowupNow) { }\r\n}\r\n\r\nexport class EditNow implements Action {\r\n readonly type = Type.EDIT_NOW;\r\n constructor(public payload: FollowupNow) { }\r\n}\r\nexport class RemoveNow implements Action {\r\n readonly type = Type.REMOVE_NOW;\r\n constructor(public payload: FollowupNow) { }\r\n}\r\nexport class AddGoal implements Action {\r\n readonly type = Type.ADD_GOAL;\r\n constructor(public payload: FollowupGoal) { }\r\n}\r\nexport class EditGoal implements Action {\r\n readonly type = Type.EDIT_GOAL;\r\n constructor(public payload: FollowupGoal) { }\r\n}\r\nexport class RemoveGoal implements Action {\r\n readonly type = Type.REMOVE_GOAL;\r\n constructor(public payload: FollowupGoal) { }\r\n}\r\nexport class AddAction implements Action {\r\n readonly type = Type.ADD_ACTION;\r\n constructor(public payload: FollowupAction) { }\r\n}\r\nexport class EditAction implements Action {\r\n readonly type = Type.EDIT_ACTION;\r\n constructor(public payload: FollowupAction) { }\r\n}\r\nexport class RemoveAction implements Action {\r\n readonly type = Type.REMOVE_ACTION;\r\n constructor(public payload: FollowupAction) { }\r\n}\r\n\r\nexport class AddSuggestions implements Action {\r\n readonly type = Type.ADD_SUGGESTIONS;\r\n constructor(public payload: string) {}\r\n}\r\n\r\nexport class UnloadFollowupWizard implements Action {\r\n readonly type = Type.UNLOAD_FOLLOWUP_WIZARD;\r\n}\r\n\r\nexport class SetByPassGuard implements Action {\r\n readonly type = Type.SET_BYPASSGUARD;\r\n constructor(public payload: boolean) {}\r\n}\r\n\r\n\r\nexport type Actions =\r\n StartFollowup |\r\n SelectPriorities |\r\n SelectedRecommendation |\r\n SelectedRecommendationCategory |\r\n SelectedRecommendationSubCategory |\r\n SelectedActionArea |\r\n AddNow |\r\n EditNow |\r\n RemoveNow |\r\n AddGoal |\r\n EditGoal |\r\n RemoveGoal |\r\n AddAction |\r\n EditAction |\r\n RemoveAction |\r\n AddSuggestions |\r\n UnloadFollowupWizard |\r\n SetByPassGuard;\r\n"], "mappings": "uJAIA,IAAYA,EAAZ,SAAYA,EAAI,CACdA,OAAAA,EAAA,iBAAA,oCACAA,EAAA,0BAAA,6CACAA,EAAA,kCAAA,qDACAA,EAAA,SAAA,4BACAA,EAAA,eAAA,kCACAA,EAAA,eAAA,kCACAA,EAAA,gBAAA,mCACAA,EAAA,aAAA,gCACAA,EAAA,YAAA,+BACAA,EAAA,WAAA,8BACAA,EAAA,YAAA,+BACAA,EAAA,WAAA,8BACAA,EAAA,mBAAA,sCACAA,EAAA,YAAA,8BACAA,EAAA,oBAAA,sCACAA,EAAA,mBAAA,qCACAA,EAAA,2BAAA,6CAjBUA,CAkBZ,EAlBYA,GAAI,CAAA,CAAA,EAoBHC,EAAP,KAAqB,CAEzBC,YAAmBC,EAAuB,CAAvB,KAAAA,QAAAA,EADV,KAAAC,KAAOJ,EAAKK,gBACyB,GAGnCC,EAAP,KAA8B,CAElCJ,YAAmBC,EAA0CI,EAAuB,CAAjE,KAAAJ,QAAAA,EAA0C,KAAAI,WAAAA,EADpD,KAAAH,KAAOJ,EAAKQ,yBACmE,GAG7EC,E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AAvB,KAAAA,QAAAA,EADV,KAAAC,KAAOC,EAAKmB,aACyB,GAGrCC,GAAP,KAAqB,CAEzBvB,YAAmBC,EAAe,CAAf,KAAAA,QAAAA,EADV,KAAAC,KAAOC,EAAKqB,eACgB,GAOjC,IAAOC,GAAP,KAAqB,CAEzBC,YAAmBC,EAAgB,CAAhB,KAAAA,QAAAA,EADV,KAAAC,KAAOC,EAAKC,eACiB", "names": ["Type", "SetWizardState", "constructor", "payload", "type", "SET_WIZARD_STATE", "SelectProductDefinition", "wizardType", "SELECT_PRODUCT_DEFINITION", "SelectProductDefinitionSuccess", "SELECT_PRODUCT_DEFINITION_SUCCESS", "CreateProduct", "CREATE_PRODUCT", "ProductCreated", "constructor", "payload", "wizardType", "type", "Type", "PRODUCT_CREATED", "CreateDraft", "CREATE_DRAFT", "SetupDraft", "SETUP_DRAFT", "SaveDraft", "showMessage", "SAVE_DRAFT", "DraftSaved", "constructor", "payload", "wizardType", "showMessage", "type", "Type", "DRAFT_SAVED", "LoadDraft", "wasDeactivated", "forceStep", "LOAD_DRAFT", "SetPage", "SET_PAGE", "SetChanged", "SET_CHANGED", "SetChangedSuccess", "SET_CHANGED_SUCCESS", "CreateFromSurvey", "CREATE_FROM_SURVEY", "CreateFromSurveySuccess", "CREATE_FROM_SURVEY_SUCCESS", "ValidationError", "handleProductWizardActions", "state", "action", "wizardType", "initialState", "type", "ProductWizardActionType", "CREATE_FROM_SURVEY_SUCCESS", "payload", "__spreadProps", "__spreadValues", "saving", "SET_WIZARD_STATE", "SELECT_PRODUCT_DEFINITION", "isSurveyWizardContext", "SELECT_PRODUCT_DEFINITION_SUCCESS", "productDefinition", "definitionObject", "JSON", "parse", "definition", "SAVE_DRAFT", "pristine", "CREATE_DRAFT", "DRAFT_SAVED", "productId", "currentVersion", "SET_PAGE", "activeStep", "SET_CHANGED_SUCCESS", "unsaved", "changed", "RuleConditionOperandSource", "OPTIONAL_QUESTIONS_KEY", "todaysDate", "Date", "initialState", "wizardType", "WizardTypes", "survey", "activeStep", "productDefinition", "productId", "surveyId", "name", "wasDeactivated", "saving", "moduleId", "modules", "allModules", "index", "indexInfo", "indexValidation", "indexes", "participants", "participantCount", "phoneNumberParticipantCount", "nonPinCodeParticipantCount", "selectedHierarchy", "groups", "emailParticipantCount", "perspectivesRespondentsCount", "perspectivesFocusUsersCount", "communication", "communicationEnabled", "communicationMethod", "activationEmail", "hasPinGroups", "pinCodeEmail", "autoReport", "autoReportMode", "AutoReportMode", "GroupManagers", "activationSms", "pinCodeSms", "welcomeSms", "previewLanguage", "id", "code", "reportEmail", "schedule", "reminderEmails", "directActivation", "startDate", "getFullYear", "getMonth", "getDate", "endDate", "reportDate", "getNextBusinessDay", "schedules", "duration", "currentVersion", "unsaved", "pristine", "reducer", "state", "action", "baseState", "handleProductWizardActions", "type", "SurveyWizardActionType", "SET_SELECTED_MODULES_SUCCESS", "payload", "hideDuplicateQuestions", "__spreadProps", "__spreadValues", "SET_MODULE_ID_SUCCESS", "UNLOAD_SURVEY_WIZARD", "SETUP_CONTENT_SUCCESS", "flatMap", "mcg", "filter", "m", "find", "am", "map", "moduleMatch", "a", "main", "enabled", "TOGGLE_MODULE", "currentModules", "cloneDeep", "some", "x", "removeEvery", "push", "TOGGLE_EXPAND_MODULE", "module", "expanded", "REFRESH_MODULE_RULES", "itemIndex", "findIndex", "currentRules", "rules", "ADD_QUESTIONS_TO_MODULE", "orderIndex", "pageGroups", "pg", "pageGroupId", "pages", "length", "key", "totalQuestions", "questions", "question", "pageGroupIndex", "pageId", "includedInProgress", "order", "showAbout", "showChapterProgress", "showNavigation", "showPageProgress", "pageType", "pageItems", "companyId", "hasRules", "icon", "questionId", "text", "customAdded", "excluded", "excludedByRule", "excludedByRuleTarget", "excludedByUser", "moduleOrder", "displayType", "REMOVE_QUESTIONS_FROM_MODULE", "pageGroup", "questionToRemoveIndex", "p", "splice", "SORT_MODULES", "sortModules", "SET_NAME_SUCCESS", "SET_PARTICIPANTS_COUNTS", "userCount", "usersWithPhone", "nonPinCodeUserCount", "usersWithEmail", "SET_GROUP_SELECTION", "groupSelection", "SET_GROUPS", "g", "pin", "SET_SELECTED_HIERARCHY", "SET_COMMUNICATION_METHOD_SUCCESS", "initReminders", "SET_COMMUNICATION_ENABLED", "SET_ACTIVATION_EMAIL", "getReminderEmails", "SET_ACTIVATION_SMS", "SET_PIN_CODE_EMAIL", "SET_PIN_CODE_SMS", "SET_PINCODE_LANGUAGE", "pincodeLanguage", "SET_PREVIEW_LANGUAGE", "SET_REPORT_EMAIL", "SET_WELCOME_SMS", "SET_WELCOME_LANGUAGE", "welcomeLanguage", "SET_AUTO_REPORT", "INIT_AUTO_REPORT", "product", "context", "definitionObject", "autoReportSettings", "mode", "steps", "s", "stepId", "autoReportDefaultValue", "settings", "SET_START_DATE", "isDirect", "SET_END_DATE", "SET_SCHEDULE_RECURRING", "SET_REPORT_DATE", "SET_DIRECT_REPORT", "directReport", "SET_REMINDER_EMAILS", "SET_REMINDER_EMAIL", "reminderEmail", "SET_START_TIME", "direct", "hour", "minute", "TOGGLE_QUESTION", "toggleQuestion", "SET_INDEXES", "indexList", "i", "errors", "ValidationError", "None", "GET_INDEX_INFO_SUCCESS", "SET_SURVEY_ID", "getScheduleContext", "getCommunicationContext", "getParticipantContext", "canAddReminders", "pageItemId", "oldExcludedValue", "filteredModules", "targets", "forEach", "pi", "rule", "operand", "getOperand", "source", "Question", "sourceId", "target", "targetId", "condition", "conditions", "operand1", "operand2", "resetDuplicatesGroupOnKey", "reduce", "cm", "apg", "cpg", "ap", "cp", "obj", "questionPriority", "groupBy", "q", "group", "values", "duplicatesGroupOnKey", "cmp", "b", "sort", "duplicate", "slice", "surveyWizardContext", "reminders", "reminder", "timeLabel", "getTimeLabel", "date", "activationEmailId", "_endDate", "daysDiff", "getDaysDiff", "twoBusinessDaysAgo", "getLastBusinessDay", "emailId", "fiveBusinessDaysAgo", "unshift", "d", "bd", "getDay", "day", "add", "setDate", "d1", "d2", "diffc", "getTime", "Math", "round", "abs", "getSignedDaysDiff", "hours", "getHours", "toString", "minutes", "getMinutes", "aModuleOrder", "meta", "ma", "metaId", "value", "bModuleOrder", "mb", "secondsDiff", "floor", "minutesDiff", "seconds", "_minutesDiff", "Type", "StartFollowup", "constructor", "payload", "groupResultInfo", "recommendations", "groupId", "productId", "type", "START_FOLLOWUP", "SelectedRecommendation", "constructor", "payload", "type", "Type", "SELECTED_RECOMMENDATION", "SelectedRecommendationCategory", "SELECTED_RECOMMENDATION_CATEGORY", "SelectedActionArea", "constructor", "payload", "type", "Type", "SELECTED_ACTIONAREA", "AddNow", "ADD_NOW", "EditNow", "EDIT_NOW", "RemoveNow", "REMOVE_NOW", "AddGoal", "ADD_GOAL", "EditGoal", "EDIT_GOAL", "RemoveGoal", "REMOVE_GOAL", "AddAction", "ADD_ACTION", "EditAction", "EDIT_ACTION", "RemoveAction", "REMOVE_ACTION", "AddSuggestions", "ADD_SUGGESTIONS", "SetByPassGuard", "constructor", "payload", "type", "Type", "SET_BYPASSGUARD"] }