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CAACyF,IAAK,qBAAuB3D,GAAQ6qB,EAC7D,MAGF,KAGV,ECxJa26B,EAAO,SAAC7jD,GAEnB,QAAmB0B,IAAf1B,EAAMkG,WACyCxE,IAA/C1B,EAAMkG,KAAKlG,EAAMK,oBAAoBtD,MACvC,OAAO,iCAGT,IAAIukD,EAAkBthD,EAAMkG,KAAKlG,EAAMK,oBAAoBtD,MAE3D,GAAoD,KAAhDiD,EAAMK,oBAAoBuhD,kBAE5B,OAAwB,IAApBN,EAASrjD,YACiCyD,IAAxC1B,EAAMK,oBAAoByjD,WAAmE,KAAxC9jD,EAAMK,oBAAoByjD,UAC1E,qBAAG3rC,UAAU,yBAAyBnY,EAAMK,oBAAoByjD,WAElE,KAIP,gBAACX,EAAS,CAACnhD,IAAKhC,EAAMK,oBAAoBtD,KAAO,kBAC/CsD,oBAAqBL,EAAMK,oBAC3ByE,KAAMw8C,EACNM,kBAAkB,GAClBC,mBAAmB,KAKzB,IAAIkC,EAAyBR,EAAYzB,kBAAkBR,EAAUthD,EAAMK,oBAAoBuhD,mBAC/F,OAA2B,IAAvBmC,EAAY9lD,YAC8ByD,IAAxC1B,EAAMK,oBAAoByjD,WAAmE,KAAxC9jD,EAAMK,oBAAoByjD,UAC1E,yBAAI9jD,EAAMK,oBAAoByjD,WAEhC,KAGF,gCAAGC,EAAY3oD,KAAI,SAACoD,EAAOH,GAAU,uBAAC,WAAc,CAAC2D,IAAKhC,EAAMK,oBAAoBtD,KAAO,mBAAqBsB,GAC/G,sBAAI8Z,UAAU,8BAA8B3Z,GAC1C,gBAAC2kD,EAAS,CACR9iD,oBAAqBL,EAAMK,oBAC3ByE,KAAMw8C,EACNM,kBAAmB5hD,EAAMK,oBAAoBuhD,kBAC7CC,mBAAoBrjD,IANY,IAW9C","sources":["webpack://fed-project/./app/assets/ts/reactcomponents/modules/ lazy ^\\.\\/.*$ namespace object","webpack://fed-project/./app/assets/ts/core/formatting/currency/CurrencyFormatter.ts","webpack://fed-project/./app/assets/ts/core/formatting/date/DateFormatter.ts","webpack://fed-project/./app/assets/ts/core/formatting/decimal/DecimalFormatter.ts","webpack://fed-project/./app/assets/ts/core/tokens/Tokenizer.ts","webpack://fed-project/./app/assets/ts/helpers/sessionstorage-helpers.ts","webpack://fed-project/./app/assets/ts/reactcomponents/containers/helpers/FormHelpers.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/utils/MemorySize.ts","webpack://fed-project/./app/assets/ts/reactcomponents/containers/helpers/GespreksRegistratieProcessHandler.ts","webpack://fed-project/./app/assets/ts/reactcomponents/containers/helpers/IntakeProcessHandler.ts","webpack://fed-project/./app/assets/ts/reactcomponents/containers/helpers/PopupProcessHandler.ts","webpack://fed-project/./app/assets/ts/reactcomponents/containers/helpers/ProcesHandlerHelpers.ts","webpack://fed-project/./app/assets/ts/reactcomponents/presentational/ScrollToError.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/presentational/DisplayFormik.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/formcontrols/helpers/ComponentStoreHelpers.ts","webpack://fed-project/./app/assets/ts/reactcomponents/formcontrols/helpers/FormStylingHelpers.ts","webpack://fed-project/./app/assets/ts/reactcomponents/formcontrols/templates/picklist-templates.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/formcontrols/Dropdown.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/formcontrols/DropdownMultiple.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/formcontrols/Input.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/formcontrols/Radiostyled.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/formcontrols/components/poll-result.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/formcontrols/components/poll-results-total.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/formcontrols/Radio.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/formcontrols/Checkbox.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/formcontrols/MaskedInput.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/formcontrols/ReadOnly.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/formcontrols/Hidden.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/formcontrols/LinkField.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/formcontrols/Password.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/formcontrols/Textarea.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/formcontrols/StyledLinkBlocks.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/formcontrols/RichTextEditor.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/formcontrols/FileUpload.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/formcontrols/DatePicker.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/services/appointments/AppointmentPlannerService.ts","webpack://fed-project/./app/assets/ts/reactcomponents/formcontrols/ChooseLocation.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/formcontrols/Button.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/formcontrols/Range.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/formcontrols/Switch.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/formcontrols/EmailAddressList.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/formcontrols/QRCodeScanner.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/formcontrols/ReCaptcha.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/presentational/controls/CheckboxControl.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/formcontrols/CheckboxMultiple.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/formcontrols/DropdownMultiselect.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/presentational/FormControls.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/helpers/FieldVisibilityHelpers.ts","webpack://fed-project/./app/assets/ts/reactcomponents/helpers/ValidationHelpers.ts","webpack://fed-project/./app/assets/ts/reactcomponents/controllers/helpers/FormControllerHelper.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/helpers/SanitizeHtmlHelper.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/controllers/FormController.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/formcontrols/components/label-and-popover.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/formcontrols/helpers/ParameterMappingsHelper.ts","webpack://fed-project/./app/assets/ts/reactcomponents/formcontrols/helpers/AjaxCallHelpers.ts","webpack://fed-project/./app/assets/ts/reactcomponents/formcontrols/helpers/FormConfigHelpers.ts","webpack://fed-project/./app/assets/ts/reactcomponents/formcontrols/helpers/form-control-specifics/index.ts","webpack://fed-project/./app/assets/ts/reactcomponents/formcontrols/helpers/FormControlHelpers.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/helpers/FieldMaskHelpers.ts","webpack://fed-project/./app/assets/ts/reactcomponents/formcontrols/helpers/FormFieldStateHelpers.ts","webpack://fed-project/./app/assets/ts/reactcomponents/formcontrols/helpers/FormLabelHelpers.ts","webpack://fed-project/./app/assets/ts/reactcomponents/formcontrols/helpers/FormikHelpers.ts","webpack://fed-project/./app/assets/ts/reactcomponents/helpers/DefaultValueByConditionHelper.ts","webpack://fed-project/./app/assets/ts/reactcomponents/helpers/FileNameHelpers.ts","webpack://fed-project/./app/assets/ts/reactcomponents/helpers/PropertyHelpers.ts","webpack://fed-project/./app/assets/ts/reactcomponents/kentico/KenticoUtils.ts","webpack://fed-project/./app/assets/ts/reactcomponents/templates/Contributie.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/templates/Tip.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/templates/Alert.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/templates/Summary.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/templates/InternalLink.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/templates/SimpleText.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/templates/PopupConfirm.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/templates/PopupOK.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/templates/RichtTextContent.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/templates/TitleHeadingTwo.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/templates/PetitieTeller.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/templates/CTABlock.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/templates/HorizontalRuler.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/templates/LoginRedirect.tsx","webpack://fed-project/./app/assets/ts/core/formatting/Formatter.ts","webpack://fed-project/./app/assets/ts/reactcomponents/templates/List.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/presentational/controls/DropdownMultipleControl.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/presentational/controls/SwitchControl.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/presentational/pages/helpers/MijnFNVPageContext.ts","webpack://fed-project/./app/assets/ts/reactcomponents/templates/helpers/GridHelpers.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/templates/grid/GridDetailCard.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/templates/grid/GridColumn.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/templates/grid/GridHeaderColumn.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/templates/grid/GridColumnDetails.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/templates/grid/GridGroup.tsx","webpack://fed-project/./app/assets/ts/reactcomponents/templates/Grid.tsx"],"sourcesContent":["var map = {\n\t\"./module\": [\n\t\t90468,\n\t\t468\n\t],\n\t\"./module.ts\": [\n\t\t90468,\n\t\t468\n\t],\n\t\"./overuren\": [\n\t\t93330,\n\t\t330\n\t],\n\t\"./overuren.tsx\": [\n\t\t93330,\n\t\t330\n\t]\n};\nfunction webpackAsyncContext(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\treturn Promise.resolve().then(function() {\n\t\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\t\te.code = 'MODULE_NOT_FOUND';\n\t\t\tthrow e;\n\t\t});\n\t}\n\n\tvar ids = map[req], id = ids[0];\n\treturn __webpack_require__.e(ids[1]).then(function() {\n\t\treturn __webpack_require__(id);\n\t});\n}\nwebpackAsyncContext.keys = function() { return Object.keys(map); };\nwebpackAsyncContext.id = 53633;\nmodule.exports = webpackAsyncContext;","import { IFormatter } from '../interfaces';\r\nimport { DecimalFormatter } from '../decimal';\r\n\r\ninterface ICurrencyFormatOptions {\r\n currency?: string;\r\n decimalSeparator?: string;\r\n stripDecimals?: boolean;\r\n}\r\n\r\nconst defaultOptions: ICurrencyFormatOptions = {\r\n currency: '€',\r\n decimalSeparator: ',',\r\n stripDecimals: false,\r\n};\r\n\r\n/**\r\n * A formatter for currency values.\r\n */\r\nexport class CurrencyFormatter implements IFormatter {\r\n\r\n format(input: string | number, options?: ICurrencyFormatOptions): string {\r\n\r\n const opts = {\r\n ...defaultOptions,\r\n ...options,\r\n };\r\n\r\n const decimalFormatter = new DecimalFormatter();\r\n const formatted = decimalFormatter.format(input, opts);\r\n\r\n if (!opts.currency) {\r\n return formatted;\r\n }\r\n\r\n return `${opts.currency} ${formatted}`;\r\n }\r\n}","import * as Moment from 'moment';\r\nimport { IFormatter } from '../interfaces';\r\n\r\ninterface IDateFormatterOptions {\r\n format?: string;\r\n}\r\n\r\nconst possibleInputFormats = [\r\n 'YYYY-MM-DDTHH:mm:ss',\r\n 'DD-MM-YYYY',\r\n 'YYYY-MM-DDTHH:mm:ssZ',\r\n 'YYYY-MM-DD'\r\n];\r\n\r\nexport class DateFormatter implements IFormatter {\r\n name = 'date';\r\n\r\n format(input: string, options: IDateFormatterOptions = { format: 'DD-MM-YYYY' }): string {\r\n\r\n if (!input) {\r\n return '';\r\n }\r\n\r\n if (input == '0001-01-01T00:00:00') {\r\n return '';\r\n }\r\n\r\n let validDate: Moment.Moment = null;\r\n\r\n // use 'some' to break when found\r\n possibleInputFormats.some(format => {\r\n const checkDate = Moment(input, format, true);\r\n if (checkDate.isValid()) {\r\n validDate = checkDate;\r\n return true;\r\n }\r\n\r\n return false;\r\n });\r\n\r\n if (!validDate) {\r\n return '';\r\n }\r\n\r\n return validDate.format(options.format);\r\n }\r\n}\r\n","import { IFormatter } from '../interfaces';\r\n\r\ninterface IDecimalFormatterOptions {\r\n decimalSeparator?: string;\r\n stripDecimals?: boolean;\r\n}\r\n\r\nconst defaultOptions: IDecimalFormatterOptions = {\r\n decimalSeparator: ',',\r\n stripDecimals: false,\r\n};\r\n\r\nexport class DecimalFormatter implements IFormatter {\r\n format(input: string | number, options?: IDecimalFormatterOptions): string {\r\n \r\n if (input == null) {\r\n return '';\r\n }\r\n\r\n const asNumber = typeof (input) === 'number' ? input : parseFloat(input);\r\n\r\n // Guards\r\n if (isNaN(asNumber) || !isFinite(asNumber)) {\r\n return input.toString();\r\n }\r\n\r\n const opts = {\r\n ...defaultOptions,\r\n ...options,\r\n };\r\n\r\n const decimals = opts.stripDecimals ? 0 : 2;\r\n let result = asNumber.toFixed(decimals);\r\n if (opts.decimalSeparator) {\r\n result = result.replace('.', opts.decimalSeparator);\r\n }\r\n\r\n return result;\r\n }\r\n\r\n}","import { StringUtil } from '../utils';\r\n\r\ninterface IToken {\r\n name: string;\r\n value: TokenValue | (() => TokenValue);\r\n}\r\n\r\ntype TokenValue = string | number;\r\n\r\nconst startSymbol = '{';\r\nconst endSymbol = '}';\r\n\r\n/**\r\n * A class for dealing with string tokens to dynamically insert values.\r\n */\r\nexport class Tokenizer {\r\n \r\n /**\r\n * Replaces the given tokens inside the given string.\r\n * @param template The string template to tokenize.\r\n * @param tokens The tokens to replace. If array of strings, index-based replacement is used. Otherwise the name of the token object is used.\r\n * @param replaceEmptyValues Replace unmatched tokens with an empty string\r\n * \r\n * @example\r\n * // 'A template with replaced tokens.'\r\n * Tokenizer.replaceTokens('A {prop} with replaced {name}.', [{ name: 'prop', value: 'template' }, { name: 'name', value: 'tokens' }]);\r\n * \r\n * @example\r\n * // 'A template with index-based tokens.'\r\n * Tokenizer.replaceTokens('A {0} with {1} tokens.', ['template', 'index-based']);\r\n * \r\n * @returns The template with the resolved tokens.\r\n */\r\n static replaceTokens(template: string, tokens: TokenValue[] | IToken[], replaceEmptyValues: boolean = false): string {\r\n if (!tokens?.length) {\r\n return template;\r\n }\r\n\r\n let tokenizedValue = template;\r\n\r\n const convertIndexToToken = (tokenValue: TokenValue, index: number): IToken => {\r\n return {\r\n name: index.toString(),\r\n value: tokenValue,\r\n };\r\n };\r\n\r\n tokens.forEach((t: TokenValue | IToken, index: number) => {\r\n\r\n let token: IToken = typeof (t) === 'object' ? t : convertIndexToToken(t, index);\r\n\r\n const tokenValue = typeof(token.value) === 'function' ? token.value() : token.value;\r\n\r\n const replace = `\\\\${startSymbol}${token.name}\\\\${endSymbol}`;\r\n\r\n tokenizedValue = tokenizedValue.replace(new RegExp(replace, 'g'), StringUtil.safeValue(tokenValue));\r\n }); \r\n\r\n if (replaceEmptyValues){\r\n // Check if tokenized value has '{}' in it, because of null values and remove the brackets\r\n const regExp = \"\\{([^}]*)\\}\";\r\n if (tokenizedValue.match(regExp)){\r\n tokenizedValue = tokenizedValue.replace(/(\\{.*?\\})/g, '');\r\n }\r\n\r\n // Collapse all double whitespaces that may have been arose by removing empty brackets\r\n tokenizedValue = tokenizedValue.replace(' ', ' ');\r\n }\r\n\r\n return tokenizedValue;\r\n }\r\n}","import { getAllUrlParams, buildQuerystring } from '../jslibs/urlparams';\r\nexport const SESSIONSTORE_QUERYSTRING = 'querystringParameters';\r\n\r\n/**\r\n * @returns useable saved querystring in format 'param1=x¶m2=y'\r\n */\r\nexport const retrieveSavedQuerystring = () : string =>\r\n{\r\n const storage = window.sessionStorage;\r\n return buildQuerystring(JSON.parse(storage.getItem(SESSIONSTORE_QUERYSTRING) ?? '{}'));\r\n};\r\n\r\n/**\r\n * creates or updates saves query string parameters. \r\n * @param url current url with query parameters\r\n * @returns boolean true when succeeds, false when unable to save\r\n */\r\nexport const createUpdateSavedQuerystringParameters = (url: string) : boolean =>\r\n{\r\n const storage = window.sessionStorage;\r\n const newParams = getAllUrlParams(url);\r\n let currentParams = JSON.parse(storage.getItem(SESSIONSTORE_QUERYSTRING) ?? '{}');\r\n \r\n Object.assign(currentParams, newParams);\r\n\r\n try {\r\n storage.setItem(SESSIONSTORE_QUERYSTRING, JSON.stringify(currentParams));\r\n return true;\r\n }\r\n catch {\r\n return false;\r\n }\r\n};","import * as React from 'react';\r\nimport * as Moment from 'moment';\r\nimport { UserService } from '@fnv-core/authentication';\r\nimport { Tokenizer } from '@fnv-core/tokens';\r\nimport { FormState, FormProps, FormControllerContainer } from '../FormContainer';\r\nimport { ProcesHandlerHelpers, ProcesName } from './ProcesHandlerHelpers';\r\nimport { StringHelpers } from '../../helpers/StringHelpers';\r\nimport { FormService, AnimationService } from '../../services';\r\nimport { Step } from '../../models/Step';\r\nimport { memorySizeOf } from '../../utils/MemorySize';\r\nimport { MAX_POSTDATA_SIZE } from '../../constants/Constants';\r\nimport { getAllUrlParams } from '../../../jslibs/urlparams';\r\nimport { IFormFieldDefinition } from '../../interfaces/Fields';\r\nimport { reformatUrlRelativePaths } from '@fnv-core/utils';\r\n\r\nexport class ReactFormHelpers {\r\n\r\n static getFormValuesToStore(component: FormControllerContainer, values: any) {\r\n let formDefinition: Array =\r\n component.props.formDefinitions[(component.state as any).currentForm];\r\n const valuesToStore = {};\r\n\r\n formDefinition.map((formFieldDefinition: any) => {\r\n\r\n if (formFieldDefinition['type'] == 'text') {\r\n if (formFieldDefinition.allowPrefixSpacesInInputOnly === true) {\r\n valuesToStore[formFieldDefinition.name] = (values[\r\n formFieldDefinition.name\r\n ] || \"\").replace(/^\\s+/, '');\r\n }\r\n }\r\n });\r\n\r\n return valuesToStore;\r\n }\r\n\r\n static gotoFormStepNyName(component: FormControllerContainer, formName) {\r\n const stepIndex = component.props.formConfig.formSteps.indexOf(formName);\r\n if (stepIndex < component.props.formConfig.formSteps.length) {\r\n var formName: any = component.props.formConfig.formSteps[stepIndex];\r\n component.props.setActiveStepForm(formName);\r\n\r\n component.setState(\r\n {\r\n stepIndex: stepIndex,\r\n currentForm: formName\r\n },\r\n () => {\r\n component.scrollToForm();\r\n }\r\n );\r\n }\r\n }\r\n\r\n static continuewithGotoNextStep(component: FormControllerContainer, nextStep: number, onlySaveForm?: boolean) {\r\n\r\n if (!!onlySaveForm) {\r\n component.setState({\r\n isSubmitting: false\r\n });\r\n } else {\r\n const formName: any = component.props.formConfig.formSteps[nextStep];\r\n component.props.setActiveStepForm(formName);\r\n component.setState(\r\n {\r\n stepIndex: nextStep,\r\n currentForm: formName,\r\n },\r\n () => {\r\n component.scrollToForm();\r\n }\r\n );\r\n }\r\n }\r\n\r\n static gotoNextFormStep(component: FormControllerContainer, values: any[],\r\n includeCurrentValues?: boolean,\r\n onlySaveForm?: boolean) {\r\n if (!!onlySaveForm) {\r\n component.setState({ isSubmitting: true });\r\n ReactFormHelpers.postToBackendPopup(component, values, true, true).then(() => {\r\n ReactFormHelpers.continuewithGotoNextStep(component, component.state.stepIndex, true);\r\n }).catch(() => {\r\n ReactFormHelpers.continuewithGotoNextStep(component, component.state.stepIndex, true);\r\n });\r\n return;\r\n }\r\n const nextStep = component.state.stepIndex + 1;\r\n if (nextStep < component.props.formConfig.formSteps.length) {\r\n if (!!component.props.formConfig.postOnNextAndPreviousStep) {\r\n ReactFormHelpers.postToBackendPopup(component, values, true, true).then(() => {\r\n ReactFormHelpers.continuewithGotoNextStep(component, nextStep);\r\n }).catch(() => {\r\n ReactFormHelpers.continuewithGotoNextStep(component, nextStep);\r\n });\r\n } else\r\n if (component.props.formConfig.postUrlForFirstStep !== undefined &&\r\n component.props.formConfig.postUrlForFirstStep !== \"\" &&\r\n component.state.stepIndex === 0) {\r\n ReactFormHelpers.postToBackendPopup(component, values, true, true).then(() => {\r\n ReactFormHelpers.continuewithGotoNextStep(component, nextStep);\r\n }).catch(() => {\r\n ReactFormHelpers.continuewithGotoNextStep(component, nextStep);\r\n });\r\n } else {\r\n ReactFormHelpers.continuewithGotoNextStep(component, nextStep);\r\n }\r\n\r\n } else {\r\n component.setState({ isSubmitting: true });\r\n\r\n $(window).off('beforeunload');\r\n\r\n if (component.props.formConfig.actionUrl) {\r\n let queryParameters = [];\r\n for (let key in values) {\r\n let value = values[key];\r\n if (value) {\r\n queryParameters.push(`${key}=${value}`);\r\n }\r\n }\r\n if (typeof component.state.urlParams['broncode']) {\r\n queryParameters.push(`broncode=${component.state.urlParams['broncode']}`);\r\n }\r\n location.href =\r\n component.props.formConfig.actionUrl + '?' + queryParameters.join('&');\r\n } else {\r\n if (component.props.formConfig.popupConfirm === true) {\r\n component.setState({ showPopupConfirm: true });\r\n } else {\r\n component.onPostToBackend(values, !!includeCurrentValues);\r\n }\r\n }\r\n }\r\n }\r\n\r\n static isReadOnly(component: FormControllerContainer) {\r\n return component.props.editMode !== true || component.props.formConfig.readOnly === true;\r\n }\r\n\r\n static getPageSettings(component: FormControllerContainer, formName: string) {\r\n return component.props.formConfig.pageSettings[formName];\r\n }\r\n\r\n static activateFormController(component: FormControllerContainer) {\r\n\r\n component.props.clearFormErrorMessage(component.state.currentForm);\r\n let pathParam = component.context.pathParam || \"\";\r\n if (component.context && component.context.search) {\r\n const urlParams = getAllUrlParams(component.context.search);\r\n if (urlParams[\"additionalId\"]) {\r\n pathParam = urlParams[\"additionalId\"];\r\n }\r\n // dont use location.href for url parameters here, because they\r\n // will be passed on with subsequent requests within mijn-fnv \r\n }\r\n\r\n if (component.props.formConfig.fillViaApi) {\r\n component.props.fillFormViaApi(\r\n component.state.currentForm,\r\n component.props.userId,\r\n component.props.formConfig.fillViaApi,\r\n component.props.formDefinitions,\r\n pathParam,\r\n component.props.formConfig.formSteps,\r\n component.props.formConfig,\r\n component.props.formName\r\n );\r\n } else {\r\n if (component.props.initialData !== undefined) {\r\n component.props.setFormValues(component.state.currentForm, component.props.initialData);\r\n } else {\r\n component.props.setFormValues(component.state.currentForm, {});\r\n }\r\n }\r\n\r\n component.props.clearStep();\r\n component.props.clearExtraStep();\r\n\r\n if (component.props.formConfig.extraDummySteps) {\r\n component.props.formConfig.extraDummySteps.map(step => {\r\n component.props.storeExtraStep(step);\r\n });\r\n }\r\n component.props.formConfig.formSteps.map(step => {\r\n component.props.storeStep(this.getPageSettings(component, step).title || step, step);\r\n });\r\n\r\n if (component.props.formConfig.formSteps.length > 0) {\r\n component.props.setActiveStepForm(component.props.formConfig.startForm);\r\n }\r\n\r\n component.props.clearErrorOnApiError();\r\n component.scrollToForm();\r\n }\r\n\r\n static finishGotoPreviousStep(component: FormControllerContainer, values: any[]) {\r\n let formName: string =\r\n component.props.formConfig.formSteps[component.state.stepIndex - 1];\r\n component.props.setActiveStepForm(formName);\r\n\r\n component.setState(\r\n {\r\n stepIndex: component.state.stepIndex - 1,\r\n currentForm: formName\r\n },\r\n () => {\r\n component.scrollToForm();\r\n }\r\n );\r\n }\r\n\r\n static gotoPreviousStep(component: FormControllerContainer, values: any[]) {\r\n if (component.state.stepIndex > 0) {\r\n\r\n if (!!component.props.formConfig.postOnNextAndPreviousStep) {\r\n component.onStoreValues(values);\r\n ReactFormHelpers.postToBackendPopup(component, values, true, true).then(() => {\r\n ReactFormHelpers.finishGotoPreviousStep(component, values);\r\n }).catch(() => {\r\n ReactFormHelpers.finishGotoPreviousStep(component, values);\r\n });\r\n } else {\r\n ReactFormHelpers.finishGotoPreviousStep(component, values);\r\n }\r\n }\r\n }\r\n\r\n static getBaseFormProperties(component: FormControllerContainer) {\r\n const props = component.props;\r\n const state = component.state as any;\r\n const formproperties = {\r\n editMode: props.editMode !== undefined ? props.editMode : true,\r\n formConfig: props.formConfig,\r\n formDefinitions: state.formDefinitions,\r\n additionalCssClass: props.additionalCssClass,\r\n withLinkToFormPage: props.withLinkToFormPage,\r\n formName: props.formName,\r\n pageType: props.pageType\r\n };\r\n\r\n return formproperties;\r\n }\r\n\r\n static collectDataFromForms(component: React.Component) {\r\n const reactForms = component.props.forms;\r\n const formSteps = component.props.formConfig.formSteps;\r\n\r\n const formData = formSteps.reduce((postData: any, formStep: string) => {\r\n if (reactForms[formStep] !== undefined) {\r\n postData = (Object as any).assign(postData, reactForms[formStep]);\r\n }\r\n return postData;\r\n }, {});\r\n\r\n return formData;\r\n }\r\n\r\n static setFormValues(component: React.Component, data: any) {\r\n component.props.setFormValues(component.state.currentForm, data);\r\n }\r\n\r\n static getFormValues(component: React.Component) {\r\n return component.props.forms[component.state.currentForm] || {};\r\n }\r\n\r\n static getDefaultFormValues(component: React.Component) {\r\n const formDefinition = component.props.formDefinitions[component.state.currentForm];\r\n const defaultFormValues = {};\r\n if (formDefinition !== undefined) {\r\n formDefinition.forEach((field) => {\r\n if (field.defaultValue !== undefined && field.defaultValue !== \"\") {\r\n\r\n const value = StringHelpers.replacePropertiesInString(field.defaultValue, {\r\n CurrentRoleEnvironment: UserService.getCurrentRole()\r\n }, true);\r\n\r\n defaultFormValues[field.name] = value;\r\n }\r\n });\r\n }\r\n return defaultFormValues;\r\n }\r\n\r\n static setInitialFormValues(component: React.Component, data: any) {\r\n component.setState({ initialFormValues: data });\r\n }\r\n\r\n static getInitialFormValues(component: React.Component) {\r\n return component.state.initialFormValues || {};\r\n }\r\n\r\n static addToUrl(component: React.Component) {\r\n const props = component.props as any;\r\n let addToUrl = '';\r\n let addToUrls = [];\r\n let postDataToBackend = (Object as any).assign({}, props.forms);\r\n if (component.state.urlParams['broncode']) {\r\n postDataToBackend['broncode'] = component.state.urlParams['broncode'];\r\n addToUrls.push(`broncode=${component.state.urlParams['broncode']}`);\r\n }\r\n\r\n if (props.formConfig.thanksPageUrlFields) {\r\n addToUrls = [\r\n ...addToUrls,\r\n ...props.formConfig.thanksPageUrlFields.map((fieldItem: any) => {\r\n if (fieldItem.isReturnedBasedOnPostResult === true) {\r\n return;\r\n }\r\n if (fieldItem.urlField) {\r\n return `${fieldItem.urlField}=${props.forms[fieldItem.form][fieldItem.field]}`;\r\n }\r\n return `${fieldItem.field}=${props.forms[fieldItem.form][fieldItem.field]}`;\r\n }).filter((fieldItem) => fieldItem)\r\n ];\r\n }\r\n\r\n if (addToUrls.length) {\r\n addToUrl = '?' + addToUrls.join('&');\r\n }\r\n\r\n return { addToUrl, postDataToBackend };\r\n }\r\n\r\n static addQueryParamsBasedOnPostResult(component: React.Component, data: any) {\r\n const props = component.props as any;\r\n let addToUrls = [];\r\n\r\n if (props.formConfig.thanksPageUrlFields) {\r\n addToUrls = [\r\n ...props.formConfig.thanksPageUrlFields.map((fieldItem: any) => {\r\n if (fieldItem.isReturnedBasedOnPostResult === true) {\r\n return `${fieldItem.field}=${data[fieldItem.field]}`;\r\n }\r\n return;\r\n }).filter((fieldItem) => fieldItem)\r\n ];\r\n }\r\n\r\n return addToUrls.join('&');\r\n }\r\n\r\n static activateForm(component: React.Component) {\r\n const formConfig = component.props.formConfig;\r\n const handleProces = ProcesHandlerHelpers.handleProces;\r\n component.props.clearFormErrorMessage(component.props.formName);\r\n handleProces(formConfig.handlers, ProcesName.Init_done, component, {});\r\n }\r\n\r\n static createFormData(postData: { [key: string]: any }) {\r\n let formData = new FormData();\r\n for (var property in postData) {\r\n if (postData.hasOwnProperty(property)) {\r\n formData.append(property, postData[property]);\r\n }\r\n }\r\n return formData;\r\n }\r\n\r\n /**\r\n * Formats the given values to the format it should be as value.\r\n * @param value The value to format.\r\n * @param formDef The formfield definition to use.\r\n * @returns The value as it should be send to the backend.\r\n */\r\n static getValueForFormDefinition(value, formDef: IFormFieldDefinition) {\r\n let result = value;\r\n\r\n // Date objects\r\n if (formDef.dataType === \"date\") {\r\n let date = Moment(result, \"DD-MM-YYYY\", true);\r\n if (date.isValid()) {\r\n result = date.format(\"YYYY-MM-DD\");\r\n } else {\r\n date = Moment(result, \"YYYY-MM-DDTHH:mm:ss\", true);\r\n if (date.isValid()) {\r\n result = date.format(\"YYYY-MM-DD\");\r\n }\r\n }\r\n }\r\n // Booleans\r\n else if (formDef.type === \"checkbox\" && formDef.dataType === \"boolean\") {\r\n result = (result === true || result == \"true\");\r\n }\r\n // Numbers\r\n else if (!!formDef.isNumeric) {\r\n if (!!formDef.allowDecimals && !!value) {\r\n result = value.replace(/,/, '.');\r\n }\r\n }\r\n // Arrays\r\n else if (formDef.dataType === 'array' && Array.isArray(value)) {\r\n const valueField = formDef.valueField || 'value';\r\n result = value.map(val => {\r\n if (typeof val === 'string') {\r\n return val;\r\n }\r\n return val[valueField] || val.value;\r\n }).join(formDef.separator || ',');\r\n }\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Rewrites the data to post to the format it should be sended.\r\n * @example\r\n * Dropdowns are stored in state as objects with the labels, values etcetera, but only the values should be send to the backend.\r\n * @param postData The postdata to reformat.\r\n * @param formDefinitions The form field definitions.\r\n * @param formSteps The form steps.\r\n * @returns The postdata formatted as it should be send to the backend.\r\n */\r\n static rewriteValueObjectsInPostData(postData: { [key: string]: any }, formDefinitions: { [key: string]: any[] }, formSteps: string[]) {\r\n for (const property in postData) {\r\n if (postData.hasOwnProperty(property)) {\r\n let rewrittenFieldValue = postData[property];\r\n if (rewrittenFieldValue &&\r\n rewrittenFieldValue.value !== undefined) {\r\n\r\n // rewrite dropdown value/label object to value directly\r\n rewrittenFieldValue = rewrittenFieldValue.value;\r\n }\r\n\r\n // rewrite specific types to its correct representation which is needed in the backend\r\n // Use the 'every' method to be able to break out without enumerating unneeded values\r\n formSteps.every(formStepName => {\r\n const formFieldDefinition = formDefinitions[formStepName].find((formFieldDefinition) => formFieldDefinition.name === property);\r\n if (formFieldDefinition) {\r\n rewrittenFieldValue = ReactFormHelpers.getValueForFormDefinition(rewrittenFieldValue, formFieldDefinition);\r\n // Field has been found, return false to break out of the 'every' enumerator\r\n return false;\r\n }\r\n });\r\n\r\n postData[property] = rewrittenFieldValue;\r\n }\r\n }\r\n\r\n return postData;\r\n }\r\n\r\n static hasFileUploadField(formDefinitions, formSteps) {\r\n let result = false;\r\n formSteps.map((formName) => {\r\n formDefinitions[formName].map((formFieldDefinition: any) => {\r\n if (formFieldDefinition.type == \"fileupload\") {\r\n result = true;\r\n }\r\n });\r\n });\r\n return result;\r\n }\r\n\r\n static clearFormIfAllowed(component: React.Component) {\r\n if (component.props.formConfig.clearFormAfterPost) {\r\n try {\r\n component.props.clearFormValues(component.props.formName);\r\n if (component.props.steps) {\r\n component.props.steps.steps.map((step: Step) => {\r\n if (step.formName !== component.props.formName && step.formName !== \"_summary\") {\r\n component.props.clearFormValues(step.formName);\r\n }\r\n });\r\n }\r\n } catch (err) {\r\n // tslint:disable-next-line\r\n console.log(\"error after clear forms\", err);\r\n }\r\n }\r\n }\r\n\r\n static isPostDataToBig(postData) {\r\n return memorySizeOf(postData) > MAX_POSTDATA_SIZE;\r\n }\r\n\r\n static handleActionUrl = (postData) => {\r\n let reactRootElement = document.getElementsByClassName(\"react-container\");\r\n if (reactRootElement.length > 0) {\r\n if (reactRootElement[0].hasAttribute(\"data-action-url\")) {\r\n\r\n const url = reactRootElement[0].getAttribute(\"data-action-url\");\r\n if (url != \"\") {\r\n let queryParameters = \"\";\r\n for (let key in postData) {\r\n let value = postData[key];\r\n if (value != \"\") {\r\n queryParameters += key + \"=\" + value + \"&\";\r\n }\r\n }\r\n let queryParamsSeparator = \"?\";\r\n let urlParams = getAllUrlParams(url);\r\n for (let urlParam in urlParams) {\r\n if (urlParams.hasOwnProperty(urlParam)) {\r\n queryParamsSeparator = \"&\";\r\n }\r\n }\r\n location.href = url + queryParamsSeparator + queryParameters;\r\n return true;\r\n }\r\n\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n static postToBackendPopup(component: React.Component, values: any[], includeCurrentValues: boolean = false, isOnlySaveForm: boolean = false) {\r\n\r\n return new Promise((resolve, reject) => {\r\n\r\n try {\r\n\r\n const props = component.props as any;\r\n\r\n AnimationService.disableAnimationsForForm(component.state.currentForm);\r\n\r\n let handlers = component.props.formConfig.handlers;\r\n if (!handlers) {\r\n handlers = ProcesHandlerHelpers.getProcessesForHander(component.props.formConfig.procesHandlers);\r\n }\r\n const p_preProcess = ProcesName.Put_preprocess;\r\n const p_success = ProcesName.Put_postprocess_Success;\r\n const p_failure = ProcesName.Put_postprocess_Fail;\r\n const handleProces = ProcesHandlerHelpers.handleProces;\r\n\r\n const { addToUrl, postDataToBackend } = this.addToUrl(component);\r\n let doFormMultipartPost = ReactFormHelpers.hasFileUploadField(props.formDefinitions, props.formConfig.formSteps);\r\n if (component.props.formConfig.doFormMultipartPost !== undefined) {\r\n doFormMultipartPost = component.props.formConfig.doFormMultipartPost;\r\n }\r\n let httpMethod: string = 'put';\r\n\r\n if (\r\n component.props.formConfig.postPutMethod !== undefined &&\r\n component.props.formConfig.postPutMethod !== ''\r\n ) {\r\n httpMethod = component.props.formConfig.postPutMethod;\r\n }\r\n\r\n let postData = {};\r\n\r\n // includePayloadInPost\r\n if ((!!component.props.formConfig.includePayloadInPost) && (component as any).getPayload) {\r\n postData = {\r\n ...(component as any).getPayload()\r\n };\r\n }\r\n props.formConfig.formSteps.map(function (form: string) {\r\n if (postDataToBackend[form] !== undefined) {\r\n postData = (Object as any).assign({}, postData, postDataToBackend[form]);\r\n }\r\n });\r\n\r\n if (!!includeCurrentValues && values) {\r\n postData = (Object as any).assign({}, postData, values);\r\n }\r\n\r\n // \"broncode\" een heel specifiek iets van het FNV lid-worden formulier\r\n // het wordt via de url doorgegeven als query parameter\r\n // het is feitelijk een campagne-code en moet doorgegeven worden aan esb/crm.\r\n // op het lid-worden form is het een onzichtbaar veld\r\n // TODO : zoeken naar een generieke oplossing waar niet deze hack voor nodig is\r\n if (component.context.bronCode || (window as any).WordLidBroncode) {\r\n postData[\"BronCode\"] = component.context.bronCode || (window as any).WordLidBroncode || \"\";\r\n }\r\n\r\n if (ReactFormHelpers.handleActionUrl(postData)) {\r\n return;\r\n }\r\n\r\n postData = ReactFormHelpers.rewriteValueObjectsInPostData(postData, props.formDefinitions, props.formConfig.formSteps);\r\n postData[\"Invoeromgeving\"] = UserService.getCurrentRole();\r\n\r\n let postUrl: string = props.formConfig.postUrl;\r\n if (props.formConfig.postUrlForFirstStep !== undefined &&\r\n props.formConfig.postUrlForFirstStep !== \"\") {\r\n if (component.state.stepIndex === 0) {\r\n postUrl = props.formConfig.postUrlForFirstStep;\r\n\r\n if (!!props.formConfig.doFormMultipartPostForFirstStep) {\r\n doFormMultipartPost = true;\r\n }\r\n }\r\n }\r\n\r\n let idForUrl = component.props.userId;\r\n if (component.context.pathParam) {\r\n idForUrl = component.context.pathParam;\r\n }\r\n\r\n const urlParams = getAllUrlParams(component.context.search);\r\n if (urlParams[\"additionalId\"]) {\r\n idForUrl = urlParams[\"additionalId\"];\r\n }\r\n\r\n postUrl = Tokenizer.replaceTokens(postUrl, [idForUrl]);\r\n postUrl = Tokenizer.replaceTokens(postUrl, [{ name: 'formname', value: component.props.formName.toLowerCase() }]);\r\n\r\n if (!!isOnlySaveForm) {\r\n const params = getAllUrlParams(postUrl);\r\n let hasParams = false;\r\n for (let urlParam in params) {\r\n if (params.hasOwnProperty(urlParam)) {\r\n hasParams = true;\r\n }\r\n }\r\n if (hasParams) {\r\n postUrl += \"&saveIncompleteForm=true\";\r\n } else {\r\n postUrl += \"?saveIncompleteForm=true\";\r\n }\r\n }\r\n\r\n let addQueryParameterSeparator = \"?\";\r\n if (postUrl.indexOf(\"?\") >= 0) {\r\n addQueryParameterSeparator = \"&\";\r\n }\r\n if (urlParams[\"KenticoWordLidId\"]) {\r\n postUrl = `${postUrl}${addQueryParameterSeparator}KenticoWordLidId=${urlParams[\"KenticoWordLidId\"]}`;\r\n }\r\n\r\n if (!!(component.props.formConfig as any).replaceUrlVariablesWithFormData) {\r\n postUrl = StringHelpers.replacePropertiesInUrl(postUrl, postData, true);\r\n }\r\n\r\n if (component.props.formConfig.useModuleForFormPost) {\r\n import('../../modules/' + component.props.formConfig.useModuleForFormPost).then(module => {\r\n try {\r\n const postToModule = new module.Module();\r\n postToModule.post(postData, props.formConfig.thanksPageUrl);\r\n } catch (err) {\r\n component.props.storeFormErrorMessage(component.state.currentForm, err);\r\n component.setState({\r\n isSubmitting: false\r\n });\r\n return;\r\n }\r\n });\r\n\r\n return;\r\n }\r\n if (component.props.formConfig.skipPost) {\r\n if (props.formConfig.thanksPageUrl &&\r\n props.formConfig.thanksPageUrl !== \"\") {\r\n ReactFormHelpers.clearFormIfAllowed(component);\r\n location.href = props.formConfig.thanksPageUrl + addToUrl;\r\n return;\r\n }\r\n\r\n (component as any).onPopupOKSubmit(undefined,\r\n StringHelpers.replacePropertiesInUrl(props.formConfig.reactRouteOnSuccess || \"\",\r\n {\r\n ...(component as any).getPayload(),\r\n ...postData\r\n }, true)\r\n );\r\n return;\r\n }\r\n\r\n if (ReactFormHelpers.isPostDataToBig(postData)) {\r\n component.setState({\r\n isShowTooBigDataError: true,\r\n isSubmitting: false\r\n });\r\n return;\r\n }\r\n\r\n handleProces(handlers, p_preProcess, component, postData).then(\r\n _postData => {\r\n postUrl = reformatUrlRelativePaths(postUrl);\r\n let ajaxOptions;\r\n if (doFormMultipartPost) {\r\n ajaxOptions = {\r\n type: httpMethod,\r\n contentType: false,\r\n enctype: 'multipart/form-data',\r\n data: ReactFormHelpers.createFormData(_postData),\r\n processData: false,\r\n url: postUrl\r\n };\r\n } else {\r\n ajaxOptions = {\r\n type: httpMethod,\r\n dataType: 'json',\r\n contentType: 'application/json',\r\n data: JSON.stringify(_postData),\r\n url: postUrl\r\n };\r\n }\r\n\r\n // Url referrer headers might be blocked by firewalls, so send a custom one to use\r\n // to know which page is viewed currently\r\n ajaxOptions.headers = {\r\n 'X-Current-Path': window.location.pathname,\r\n };\r\n\r\n $.ajax(ajaxOptions)\r\n .done(receivedData => {\r\n\r\n if (!!isOnlySaveForm) {\r\n resolve(undefined);\r\n return true;\r\n }\r\n\r\n $(window).off('beforeunload');\r\n handleProces(handlers, p_success, component, receivedData)\r\n /*Process*/.then(data => {\r\n // clearForm depending on formconfig and if the ok-popup needs to be shown...\r\n // clear it after the user pressed ok (otherwise the summary is already cleared)\r\n if (data.isPreventDefault === true) {\r\n ReactFormHelpers.clearFormIfAllowed(component);\r\n resolve(undefined);\r\n return;\r\n }\r\n if (data.isShowPostDataError === true) {\r\n\r\n component.setState({\r\n isSubmitting: false\r\n });\r\n\r\n ReactFormHelpers.clearFormIfAllowed(component);\r\n resolve(undefined);\r\n return;\r\n }\r\n\r\n if (receivedData\r\n && receivedData.RedirectUrl !== undefined\r\n && receivedData.RedirectUrl !== null\r\n && receivedData.RedirectUrl !== \"\") {\r\n if(receivedData.Target === \"_blank\") {\r\n window.open(receivedData.RedirectUrl, receivedData.target);\r\n location.reload();\r\n }\r\n else {\r\n location.href = receivedData.RedirectUrl;\r\n }\r\n resolve(undefined);\r\n return;\r\n }\r\n\r\n if (receivedData && !!receivedData.HasError &&\r\n receivedData.ErrorText !== undefined &&\r\n receivedData.ErrorText !== \"\") {\r\n component.setState({\r\n isSubmitting: false,\r\n isShowPostDataError: true,\r\n popupMessageOnFailure: receivedData.ErrorText\r\n });\r\n resolve(undefined);\r\n return;\r\n }\r\n\r\n if (!!component.props.formConfig.showPollResultsAfterFormSubmit) {\r\n (component as any).onShowPollResults();\r\n return;\r\n }\r\n\r\n if (component.props.formConfig.reactRouteOnFailure === \"\" &&\r\n props.formConfig.thanksPageUrl &&\r\n props.formConfig.thanksPageUrl !== \"\") {\r\n\r\n let queryParams = \"\";\r\n if (typeof receivedData === \"string\") {\r\n try {\r\n const json = JSON.parse(receivedData);\r\n queryParams = this.addQueryParamsBasedOnPostResult(component, json);\r\n if (addToUrl !== \"\") {\r\n if (addToUrl !== \"?\") {\r\n queryParams = \"&\" + queryParams;\r\n }\r\n } else {\r\n queryParams = \"?\" + queryParams;\r\n }\r\n } catch (err) {\r\n // tslint:disable-next-line\r\n console.log(\"postToBackendPopup json parsing error\", receivedData, err);\r\n }\r\n }\r\n ReactFormHelpers.clearFormIfAllowed(component);\r\n location.href = `${props.formConfig.thanksPageUrl}${addToUrl}${queryParams}`;\r\n resolve(undefined);\r\n return;\r\n }\r\n\r\n\r\n if (\r\n props.formConfig.popupOK === undefined ||\r\n props.formConfig.popupOK === true\r\n ) {\r\n // receivedData.VerwerkingsCode == 0 : Visuelecontrole\r\n // receivedData.VerwerkingsCode == 1 : AutomatischVerwerken\r\n if (receivedData.VerwerkingsCode === 0) {\r\n component.setState({ isShowPostOk: true, isShowPostOKWithVisualCheck: true, showThanksMessageAsInPageContent: !!props.formConfig.showThanksMessageAsInPageContent });\r\n } else {\r\n component.setState({ isShowPostOk: true, showThanksMessageAsInPageContent: !!props.formConfig.showThanksMessageAsInPageContent }, () => {\r\n if (!!props.formConfig.showThanksMessageAsInPageContent) {\r\n if ((component as any).thankYouMessageRef &&\r\n (component as any).thankYouMessageRef.current) {\r\n (component as any).thankYouMessageRef.current.scrollIntoView();\r\n }\r\n }\r\n\r\n });\r\n }\r\n resolve(undefined);\r\n return;\r\n }\r\n (component as any).onPopupOKSubmit(undefined,\r\n StringHelpers.replacePropertiesInUrl(props.formConfig.reactRouteOnSuccess || \"\",\r\n {\r\n ...(component as any).getPayload(),\r\n ...postData\r\n })\r\n );\r\n\r\n })\r\n /*Process*/.catch(reason => {\r\n location.href = props.formConfig.errorPageUrl + addToUrl;\r\n reject();\r\n });\r\n })\r\n .fail(error => {\r\n component.setState({\r\n isSubmitting: false\r\n });\r\n\r\n if (!!isOnlySaveForm) {\r\n reject();\r\n return true;\r\n }\r\n\r\n handleProces(handlers, p_failure, component, error)\r\n /*Process*/.then(data => {\r\n if (data && data.isError) {\r\n if (ReactFormHelpers.handleUserError(data, component)) {\r\n reject();\r\n } else {\r\n component.setState({\r\n isShowPostDataError: true\r\n\r\n });\r\n reject();\r\n }\r\n } else\r\n if (component.props.formConfig.reactRouteOnFailure !== undefined &&\r\n component.props.formConfig.reactRouteOnFailure !== \"\") {\r\n component.setState({\r\n isShowPostDataError: true\r\n\r\n });\r\n reject();\r\n } else {\r\n location.href = props.formConfig.errorPageUrl + addToUrl;\r\n reject();\r\n }\r\n })\r\n /*Process*/.catch(reason => {\r\n location.href = props.formConfig.errorPageUrl + addToUrl;\r\n reject();\r\n });\r\n });\r\n }\r\n );\r\n } catch (err) {\r\n // tslint:disable-next-line\r\n console.log(\"exception in postToBackendPopup\", err);\r\n reject();\r\n }\r\n });\r\n }\r\n\r\n static handleUserError(dataError: any, formContainer: any) {\r\n if (dataError && dataError.ErrorText !== undefined) {\r\n try {\r\n let error = JSON.parse(dataError.ErrorText);\r\n if(error.ControlName != null) {\r\n formContainer.setFieldError(error.ControlName, error.ErrorText)\r\n return true;\r\n }\r\n\r\n formContainer.setState({\r\n isShowPostDataError: true,\r\n isSubmitting: false,\r\n isUserError: !!error.IsUserError,\r\n popupMessageOnFailure: error.ErrorText || \"\"\r\n });\r\n return true;\r\n } catch {\r\n // skip\r\n }\r\n return false;\r\n }\r\n }\r\n static hasLidConsentForSpecificFormsOrIgnoreIfIsCurrentUser(component: React.Component): boolean {\r\n const checkForms = [\r\n \"MijnFNVConsulent_Gespreksregistratie\",\r\n \"MijnFNVConsulent_AanvraagReintegratieconsulent\",\r\n \"MijnFNVConsulent_IntakeArbeid\",\r\n \"MijnFNVConsulent_IntakeOntslag\",\r\n \"MijnFNVConsulent_IntakePensioen\",\r\n \"MijnFNVConsulent_IntakeUitkering\",\r\n \"MijnFNV_KeuzeVolgendeStap\",\r\n \"MijnFNV_GespreksregistratieOverzicht\",\r\n \"MijnFNV_DossierOverzicht\",\r\n \"MijnFNV_ContactGegevens\",\r\n \"MijnFNV_Inkomensgegevens\"\r\n ];\r\n\r\n const checkFormsAllowEmptyPathParm = [\r\n \"MijnFNV_DossierOverzicht\",\r\n \"MijnFNV_ContactGegevens\",\r\n \"MijnFNV_Inkomensgegevens\"\r\n ];\r\n\r\n const ignoreClearLidZoekenSubFunctons = [\r\n \"MijnFNV_LidZoeken\",\r\n \"MijnFNV_LidGevonden\"\r\n ];\r\n\r\n const ignorePaths = [\r\n \"Mijn-FNV/Medewerker/Persoon/Persoon-profiel\"\r\n ];\r\n\r\n for (let i = 0; i < ignorePaths.length; i++) {\r\n const entry = ignorePaths[i];\r\n if (component.context !== undefined && component.context.pathname !== undefined) {\r\n if (component.context.pathname.indexOf(entry) > -1) {\r\n return true;\r\n }\r\n }\r\n }\r\n\r\n if (ignoreClearLidZoekenSubFunctons.indexOf((component.props.formName || \"\").split(\"-\")[0]) < 0) {\r\n FormService.setIsInLidZoekenSubFunctions(false);\r\n }\r\n\r\n if (checkForms.indexOf(component.props.formName || \"\") >= 0) {\r\n\r\n if (!component.context.pathParam &&\r\n checkFormsAllowEmptyPathParm.indexOf(component.props.formName || \"\") >= 0) {\r\n FormService.setIsInLidZoekenSubFunctions(true);\r\n return true;\r\n } else\r\n if (component.context.pathParam === UserService.getUserId()) {\r\n FormService.setIsInLidZoekenSubFunctions(true);\r\n return true;\r\n } else\r\n if (component.context.pathParam &&\r\n component.props.lidZoeken &&\r\n component.props.lidZoeken.results) {\r\n const lidGevonden = component.props.lidZoeken.results.filter((lid) => {\r\n return (lid.PersoonsId === component.context.pathParam && lid.LidgaatAkkoord === true);\r\n });\r\n const isLidGevonden = lidGevonden.length > 0;\r\n\r\n FormService.setLidZoekenSubFunctionsForMember({});\r\n if (isLidGevonden) {\r\n FormService.setLidZoekenSubFunctionsForMember({\r\n memberName: lidGevonden[0].Naam,\r\n isMember: lidGevonden[0].IsLid\r\n });\r\n FormService.setIsInLidZoekenSubFunctions(true);\r\n }\r\n\r\n return isLidGevonden;\r\n }\r\n return false;\r\n }\r\n return true;\r\n }\r\n}\r\n","export function memorySizeOf(obj) {\r\n var bytes = 0;\r\n\r\n function sizeOf(obj) {\r\n if(obj !== null && obj !== undefined) {\r\n switch(typeof obj) { \r\n case 'number':\r\n bytes += 8;\r\n break;\r\n case 'string':\r\n bytes += obj.length * 2;\r\n break;\r\n case 'boolean':\r\n bytes += 4;\r\n break;\r\n case 'object': \r\n if (obj.size) {\r\n bytes += obj.size; \r\n } \r\n var objClass = Object.prototype.toString.call(obj).slice(8, -1);\r\n if(objClass === 'Object' || objClass === 'Array') {\r\n for(var key in obj) {\r\n if(!obj.hasOwnProperty(key)) continue;\r\n sizeOf(obj[key]);\r\n }\r\n } else bytes += obj.toString().length * 2;\r\n break;\r\n }\r\n }\r\n return bytes;\r\n }\r\n\r\n return sizeOf(obj);\r\n}","import { ProcesName } from './ProcesHandlerHelpers';\r\nimport { ProcesHandler } from '../../interfaces/FormConfig';\r\nimport { ReactFormHelpers } from './FormHelpers';\r\nimport { FormProps, FormState } from '../FormContainer';\r\nimport { IntakeService } from \"../../services/IntakeService\";\r\n\r\nexport class GespreksRegistratieProcessHandlerHelpers {\r\n static getProcesses(): ProcesHandler[] {\r\n return [\r\n \r\n {\r\n // PUT when done\r\n procesName: ProcesName.Put_postprocess_Success,\r\n execute: (\r\n component: React.Component,\r\n data: any,\r\n onSuccess,\r\n onError\r\n ) => {\r\n const formData = ReactFormHelpers.collectDataFromForms(component as any); \r\n IntakeService.setAnswer(formData[\"Antwoord\"]);\r\n IntakeService.setQuestion(formData[\"Vraag\"]);\r\n onSuccess(data); \r\n }\r\n }\r\n ];\r\n }\r\n}\r\n","import { ProcesName } from './ProcesHandlerHelpers';\r\nimport { ProcesHandler } from '../../interfaces/FormConfig';\r\nimport { FormProps, FormState } from '../FormContainer';\r\nimport { IntakeService } from \"../../services/IntakeService\";\r\n\r\nexport class IntakeProcessHandlerHelpers {\r\n static getProcesses(): ProcesHandler[] {\r\n return [\r\n \r\n {\r\n // PUT when done\r\n procesName: ProcesName.Put_postprocess_Success,\r\n execute: (\r\n component: React.Component,\r\n data: any,\r\n onSuccess,\r\n onError\r\n ) => {\r\n IntakeService.setAnswer(\"\");\r\n IntakeService.setQuestion(\"\");\r\n onSuccess(data); \r\n }\r\n }\r\n ];\r\n }\r\n}\r\n","import { ProcesName } from './ProcesHandlerHelpers';\r\nimport { ProcesHandler } from '../../interfaces/FormConfig';\r\nimport { FormProps, FormState } from '../FormContainer';\r\n\r\nexport class PopupProcessHandlerHelpers {\r\n static getProcesses(): ProcesHandler[] {\r\n return [\r\n \r\n {\r\n procesName: ProcesName.PopupOnOk,\r\n execute: (\r\n component: React.Component,\r\n data: any,\r\n onSuccess,\r\n onError\r\n ) => {\r\n \r\n if (component.props.onPopupOkClick) {\r\n component.props.onPopupOkClick().then(() => {\r\n onSuccess(data); \r\n });\r\n } else {\r\n onSuccess(data); \r\n }\r\n \r\n }\r\n }\r\n ];\r\n }\r\n}\r\n","import { ProcesHandler } from '../../interfaces/FormConfig';\r\nimport { FormState, FormProps } from '../FormContainer';\r\nimport { GespreksRegistratieProcessHandlerHelpers } from './GespreksRegistratieProcessHandler';\r\nimport { IntakeProcessHandlerHelpers } from './IntakeProcessHandler';\r\nimport { PopupProcessHandlerHelpers } from './PopupProcessHandler';\r\n\r\nexport class ProcesName {\r\n // Init\r\n static readonly Init_done = 'Init_done';\r\n\r\n // Get\r\n static readonly Get_preprocess = 'RestGetPreProcess';\r\n static readonly Get_postprocess_Success = 'RestGetPostProcessSuccess';\r\n static readonly Get_postprocess_Fail = 'RestGetPostProcessFail';\r\n\r\n // Put\r\n static readonly Put_preprocess = 'RestPutPreProcess';\r\n static readonly Put_postprocess_Success = 'RestPutPostProcessSuccess';\r\n static readonly Put_postprocess_Fail = 'RestPutPostProcessFail';\r\n\r\n // Popup\r\n static readonly PopupOnOk = 'PopupOnOk';\r\n\r\n // CancelForm\r\n static readonly CancelForm = 'CancelForm';\r\n \r\n}\r\n\r\nexport class ProcesHandlerHelpers {\r\n /**\r\n * Handleprocess will check if we have a given process.\r\n * If not, we can just continue the next satep in the process\r\n * and therefore the promise will be resolved as succesful.\r\n *\r\n * @param procesList\r\n * @param procesName\r\n * @param data\r\n */\r\n static handleProces(\r\n procesList: ProcesHandler[],\r\n procesName: string,\r\n component: React.Component,\r\n data: any\r\n ): Promise {\r\n return new Promise((resolve, reject) => {\r\n const [proces] = (procesList || []).filter(proces => proces.procesName === procesName);\r\n // Is custom proces Found?\r\n if (proces) {\r\n // Execute the proces and pass the result to the resolve / reject method of the promise\r\n proces.execute(component, data, resolve, reject);\r\n } else {\r\n if (procesName == ProcesName.Put_postprocess_Fail) {\r\n // this is the ajax fail handler.. data is a ajax/http response\r\n resolve({isError: true, ErrorText : data.responseText ? data.responseText : \"Er is een fout opgetreden.\"});\r\n } else\r\n if (data && data.status && data.status == 300) { \r\n // this is a normal ajax done handler ... if status is 300 then show generic error message \r\n resolve({HasError: true, ErrorText : \"Er is een fout opgetreden.\"});\r\n } else {\r\n // No action found. Treat as succes! \r\n resolve(data);\r\n }\r\n }\r\n });\r\n }\r\n\r\n static getProcessesForHander(handlers: string[] | string) {\r\n const processes: ProcesHandler[] = [];\r\n const procesHandlers = Array.isArray(handlers) ? handlers : [handlers];\r\n\r\n procesHandlers.forEach(handler => {\r\n if (handler === \"gespreksregistratie\") {\r\n processes.push(...GespreksRegistratieProcessHandlerHelpers.getProcesses());\r\n }\r\n if (handler === \"intake\") {\r\n processes.push(...IntakeProcessHandlerHelpers.getProcesses());\r\n }\r\n if (handler === \"popup\") {\r\n processes.push(...PopupProcessHandlerHelpers.getProcesses());\r\n }\r\n });\r\n \r\n return processes;\r\n }\r\n}\r\n","import * as React from \"react\";\r\nimport * as $ from 'jquery';\r\n\r\nexport interface ScrollToErrorProps { \r\n isValid : any;\r\n isSubmitting : any;\r\n}\r\n\r\nexport default class ScrollToError extends React.Component {\r\n componentDidUpdate(prevProps : any) {\r\n\r\n if (prevProps.isSubmitting && !this.props.isSubmitting && !this.props.isValid) {\r\n if ($(\".is-invalid.form-control,.is-invalid.custom-control-input\").length == 0) {\r\n return;\r\n }\r\n $(\".is-invalid.form-control,.is-invalid.custom-control-input\")[0].scrollIntoView({ behavior: 'smooth', block: 'center' });\r\n }\r\n }\r\n\r\n render() : any {\r\n return null;\r\n }\r\n}","import { FormikProps } from \"formik\";\r\nimport * as React from \"react\";\r\n\r\nexport interface IFormikStateProps extends FormikProps {\r\n}\r\n\r\nexport const DisplayFormikState = (props: IFormikStateProps) =>\r\n
\r\n Injected Formik props (the form's state)\r\n
\r\n touched: {JSON.stringify(props.touched, null, 2)}\r\n
\r\n
\r\n errors: {JSON.stringify(props.errors, null, 2)}\r\n
\r\n
\r\n values: {JSON.stringify(props.values, null, 2)}\r\n
\r\n
\r\n isSubmitting: {JSON.stringify(props.isSubmitting, null, 2)}\r\n
\r\n
;","import { UserService } from '@fnv-core/authentication';\r\nimport { Api } from '@fnv-core/http';\r\nimport { FormControlProps } from '../../interfaces/FormControlProps';\r\nimport { StringHelpers } from '../../helpers/StringHelpers';\r\nimport { DatasourceOptionsService } from '../../services/DatasourceOptionsService';\r\nimport { DatasourceLoaderStateService } from '../../services/DatasourceLoaderStateService';\r\nimport { FormControlHelpers } from './FormControlHelpers';\r\nimport { FormFieldStateHelpers } from './FormFieldStateHelpers';\r\nimport { IFormFieldDefinition } from '../../interfaces/Fields';\r\n\r\nexport interface IOption {\r\n value: string;\r\n label: string;\r\n text?: string;\r\n parent? : string;\r\n data: any;\r\n icon? : string;\r\n}\r\n\r\nexport class ComponentStoreHelpers {\r\n static convertUnicode(input: string) {\r\n if (input !== undefined) {\r\n var index: number = input.indexOf('A\\u008f');\r\n if (index >= 0) {\r\n return input.replace('A\\u008f', 'Ã…');\r\n }\r\n return input;\r\n }\r\n return '';\r\n }\r\n\r\n /**\r\n * Maps the options array for the component to a globally used IOption model.\r\n * \r\n * @returns A mapping function to map the item to the option model.\r\n */\r\n static restDataMapper(component: React.Component): (item: any, index: number) => IOption {\r\n const formFieldDefinition = component.props.formFieldDefinition;\r\n return (option, index): IOption => {\r\n let optionLabel = '';\r\n if (formFieldDefinition.resultMode === 'array') {\r\n let data: any = {};\r\n data[formFieldDefinition.propertyNameInArrayMode] = option;\r\n return {\r\n value: option,\r\n label: option,\r\n text: option,\r\n parent: '',\r\n data: data \r\n };\r\n }\r\n if (option[formFieldDefinition.optionField]) {\r\n optionLabel = this.convertUnicode(option[formFieldDefinition.optionField]);\r\n } else {\r\n optionLabel = this.convertUnicode(StringHelpers.replacePropertiesInString(formFieldDefinition.optionField, \r\n {\r\n ...component.props.formController.getPayload(),\r\n ...component.props.formikBag.values,\r\n ...option\r\n }, true));\r\n } \r\n return {\r\n value: option[formFieldDefinition.valueField],\r\n label: optionLabel,\r\n text: optionLabel,\r\n parent: option.Link ? option.Link : '',\r\n data: option\r\n };\r\n };\r\n }\r\n\r\n static kenticoOptionsMapper(component: React.Component) {\r\n const formFieldDefinition = component.props.formFieldDefinition;\r\n return (option, index): IOption => ({\r\n value: formFieldDefinition.valueoptions[index],\r\n label: option,\r\n text: option,\r\n data: {},\r\n icon: (formFieldDefinition.iconoptions && formFieldDefinition.iconoptions[index]) || \"\"\r\n });\r\n }\r\n\r\n static hasDatasource(component: React.Component): boolean {\r\n return ComponentStoreHelpers.hasFieldDatasource(component.props.formFieldDefinition);\r\n }\r\n\r\n static hasFieldDatasource(formFieldDefinition: IFormFieldDefinition): boolean {\r\n return formFieldDefinition.datasource;\r\n }\r\n\r\n static getValueData(component: React.Component, value: any) : string {\r\n\r\n // Conveniance\r\n const formFieldDefinition = component.props.formFieldDefinition;\r\n \r\n if (!component.state[formFieldDefinition.datasource]) {\r\n return '';\r\n }\r\n\r\n // Checks if the given item is part of the values\r\n // Also takes into accounts multiple values that are joined by a comma\r\n const checkContainsValue = (item) => {\r\n const itemValue = item[formFieldDefinition.valueField];\r\n if (itemValue == null) {\r\n return false;\r\n }\r\n\r\n if (typeof (value) !== 'string') {\r\n return itemValue == value;\r\n }\r\n \r\n const values = value.split(',');\r\n if (!values.length) {\r\n return false;\r\n }\r\n\r\n if (values.length > 1) {\r\n return values.indexOf(itemValue) > -1;\r\n }\r\n\r\n return values[0] == itemValue;\r\n };\r\n\r\n let result = component.state[formFieldDefinition.datasource].filter((item) => {\r\n return checkContainsValue(item);\r\n }).map((item) => item[formFieldDefinition.optionField]);\r\n\r\n if (result.length === 1) {\r\n return result[0];\r\n }\r\n\r\n if (result.length > 1) {\r\n return result;\r\n }\r\n\r\n return '';\r\n }\r\n\r\n static getValueDataForPayload(component: React.Component, value: any) : any {\r\n\r\n // Conveniance\r\n const formFieldDefinition = component.props.formFieldDefinition;\r\n \r\n if (!component.state[formFieldDefinition.datasource]) {\r\n return \"\";\r\n }\r\n\r\n let result = component.state[formFieldDefinition.datasource].filter((item) => {\r\n return item[formFieldDefinition.valueField] == value; \r\n }).map((item) => item);\r\n\r\n if (result.length > 0) {\r\n return result[0];\r\n }\r\n return {};\r\n }\r\n\r\n static getListData(\r\n component: React.Component,\r\n restDataMapper?,\r\n kenticoOptionsMapper?\r\n ): IOption[] {\r\n // If no values given, we fall back to the defaults.\r\n // Due to the dependency to component, we instantiate the defaults like this:\r\n restDataMapper = restDataMapper || this.restDataMapper(component);\r\n kenticoOptionsMapper = kenticoOptionsMapper || this.kenticoOptionsMapper(component);\r\n\r\n // Conveniance\r\n const formFieldDefinition = component.props.formFieldDefinition;\r\n\r\n // Initial value\r\n let dataset = [];\r\n\r\n // Preferably we use the data from an external datasource\r\n // We use the given mapper\r\n if (component.state && component.state[formFieldDefinition.datasource]\r\n\t\t&& component.state[formFieldDefinition.datasource].map !== undefined) {\r\n dataset = component.state[formFieldDefinition.datasource].map(restDataMapper);\r\n } // If not present, we like to use options\r\n else if (formFieldDefinition.options) {\r\n dataset = formFieldDefinition.options.map(kenticoOptionsMapper);\r\n }\r\n // Otherwise, the array is initial / empty\r\n\r\n // execute mapping if method is given\r\n return dataset;\r\n }\r\n\r\n static setFormFieldData(component: React.Component, data) {\r\n component.setState({ [component.props.formFieldDefinition.datasource]: data });\r\n }\r\n\r\n static getFormFieldData(component: React.Component) {\r\n return component.state[component.props.formFieldDefinition.datasource] || {};\r\n }\r\n\r\n static addMontsToDate(date: Date, addMonths? : number) { \r\n let newDate = new Date(date.setMonth(date.getMonth() + addMonths));\r\n let month = '' + (newDate.getMonth() + 1);\r\n let day = '' + newDate.getDate();\r\n let year = newDate.getFullYear();\r\n \r\n if (month.length < 2) {\r\n month = '0' + month;\r\n }\r\n\r\n if (day.length < 2) {\r\n day = '0' + day;\r\n }\r\n \r\n return [year, month, day].join('-');\r\n }\r\n\r\n\r\n\r\n static getCurrentDate(addMonths? : number) {\r\n return this.addMontsToDate(new Date() , addMonths || 0);\r\n }\r\n\r\n static getDataUrl(props: FormControlProps, parameters: string = ''): string {\r\n return props.formConfig.urlMappings[props.formFieldDefinition.datasource] + parameters;\r\n }\r\n\r\n static clearFields = (component: React.Component) => {\r\n FormFieldStateHelpers.clearMarkedFields(component);\r\n const { formFieldDefinition, formController } = {...component.props};\r\n if (!formFieldDefinition.isDependentField) {\r\n return;\r\n }\r\n let clearFields : any = {};\r\n if (!!formFieldDefinition.clearFormStateForFieldsPrefetch && formFieldDefinition.clearFields) {\r\n formFieldDefinition.clearFields.map((field) => {\r\n clearFields[field] = \"\";\r\n });\r\n if (!!formFieldDefinition.clearPayloadForFieldsPrefetch) {\r\n formController.setPayload(clearFields);\r\n }\r\n } \r\n formController.setState({[formFieldDefinition.name]: \"\", ...clearFields});\r\n }\r\n \r\n static getAsyncData(inputValue: string, component: React.Component) {\r\n \r\n return new Promise((resolve, reject) => {\r\n component.setState({ isLoading: true }); \r\n const getData = () => {\r\n if (inputValue.length > 1) {\r\n ComponentStoreHelpers.getData(component, inputValue).then((result) => {\r\n resolve(ComponentStoreHelpers.getListData(component)); \r\n component.setState({ isLoading: false }); \r\n }).catch(() => {\r\n component.setState({ isLoading: false }); \r\n reject();\r\n });\r\n } else {\r\n resolve(ComponentStoreHelpers.getListData(component)); \r\n component.setState({ isLoading: false }); \r\n }\r\n };\r\n\r\n FormFieldStateHelpers.clearMarkedFields(component);\r\n if (component.props.formFieldDefinition.isDependentField) { \r\n let clearFields : any = {};\r\n if (!!component.props.formFieldDefinition.clearFormStateForFieldsPrefetch && component.props.formFieldDefinition.clearFields) {\r\n component.props.formFieldDefinition.clearFields.map((field) => {\r\n clearFields[field] = \"\";\r\n });\r\n if (!!component.props.formFieldDefinition.clearPayloadForFieldsPrefetch) {\r\n component.props.formController.setPayload(clearFields);\r\n }\r\n } \r\n component.props.formController.setState({[component.props.formFieldDefinition.name]: \"\", ...clearFields}, () => {\r\n getData();\r\n });\r\n return;\r\n }\r\n\r\n getData();\r\n });\r\n }\r\n\r\n static getData(component: React.Component, inputValue? : string): Promise {\r\n DatasourceOptionsService.setOptionsForForm(component.props.formFieldDefinition.name, []);\r\n\r\n return new Promise(async (resolve, reject) => {\r\n let returnData = undefined;\r\n const datasource = component.props.formConfig.urlMappings[component.props.formFieldDefinition.datasource];\r\n if (!datasource) {\r\n resolve(returnData);\r\n return;\r\n }\r\n if (datasource && datasource.indexOf(\"datasource:\") === 0) {\r\n const datasourceUrl = datasource.substring(11);\r\n if (datasourceUrl == \"userroles\") {\r\n if ((component as any).unmounted) {\r\n resolve(returnData);\r\n return;\r\n }\r\n DatasourceOptionsService.setOptionsForForm(component.props.formFieldDefinition.name, UserService.getUserRoles());\r\n this.setFormFieldData(component, UserService.getUserRoles());\r\n resolve(returnData);\r\n return;\r\n }\r\n }\r\n\r\n let url = ComponentStoreHelpers.getDataUrl(component.props);\r\n\r\n // parse {} from url and replace with predefined variabels \r\n let regularExpressionForMatchingCurlyBrackets = /{.+?}/g;\r\n const matches = (url || \"\").match(regularExpressionForMatchingCurlyBrackets);\r\n if (matches) {\r\n let data = {\r\n ...component.props.formController.getPayload(),\r\n ...component.props.formikBag.values,\r\n inputvalue : inputValue || \"\"\r\n };\r\n\r\n matches.map((match) => { \r\n const matchValue = match.slice(1, -1);\r\n let value = \"\";\r\n let field = matchValue.toLowerCase();\r\n if (field == \"id\" || field == \"userid\" || field == \"persoonid\") {\r\n value = UserService.getUserId();\r\n } else \r\n if (field == \"bondsid\") {\r\n value = UserService.getBondsId();\r\n } else \r\n if (field == \"consent\") {\r\n value = component.props.formFieldDefinition.optionyes;\r\n } else\r\n if (matchValue.indexOf(\"isodate:\") == 0) {\r\n const fieldName = matchValue.slice(8);\r\n if (data[fieldName]) {\r\n value = StringHelpers.convertNLDateToIso(data[fieldName]);\r\n } \r\n } else\r\n if (field == \"[currentdate]\") {\r\n value = ComponentStoreHelpers.getCurrentDate();\r\n } else \r\n if (field == \"[futuredate:2:month]\" ) {\r\n // TODO : refactor to make it non-static\r\n value = ComponentStoreHelpers.getCurrentDate(2);\r\n }\r\n\r\n if (data[matchValue]) {\r\n value = data[matchValue];\r\n if ((value as any).value) {\r\n value = (value as any).value;\r\n }\r\n }\r\n\r\n url = url.replace(\"{\" + matchValue + \"}\", value);\r\n });\r\n }\r\n\r\n if (url === undefined || typeof url === \"undefined\") {\r\n resolve(returnData);\r\n return;\r\n }\r\n DatasourceLoaderStateService.increaseLoadingCounter();\r\n \r\n let counter = 0; \r\n if ((component as any).state && (component as any).setState) {\r\n counter = FormControlHelpers.getCounter(component as any); // keep track of latest request\r\n }\r\n\r\n const triggerDatasourceRequest = async () => {\r\n try {\r\n const data = await Api.get(url, { cache: true });\r\n \r\n returnData = data;\r\n // if component gets unmounted during retrieving of data, then\r\n // changing react state will trigger an exception in react-dev mode\r\n // to prevent this, we set unmounted to true in componentWillUnmount\r\n //\r\n // this situation can happen because fillViaFormApi and other api calls\r\n // will trigger rerendering and recreating from a higher level (formcontainer)\r\n // and this conflicts with the async process here.\r\n if ((component as any).unmounted) {\r\n DatasourceLoaderStateService.resetLoadingCounter(); \r\n\r\n resolve(returnData);\r\n return;\r\n }\r\n DatasourceLoaderStateService.decreaseLoadingCounter();\r\n\r\n if ((component as any).state && (component as any).setState &&\r\n (component.state as any).dataSourceCounter) {\r\n if (counter < (component.state as any).dataSourceCounter) {\r\n resolve(false);\r\n return;\r\n }\r\n }\r\n\r\n if (data) {\r\n DatasourceOptionsService.setOptionsForForm(component.props.formFieldDefinition.name, data);\r\n this.setFormFieldData(component, data);\r\n }\r\n resolve(returnData);\r\n } catch {\r\n DatasourceLoaderStateService.resetLoadingCounter(); \r\n if ((component as any).unmounted) {\r\n resolve(returnData);\r\n return;\r\n }\r\n\r\n // set empty data when api gives error (dependent dropdowns can trigger a 404 from api on initial mount/view of page)\r\n this.setFormFieldData(component, []);\r\n }\r\n };\r\n\r\n if (!component.props.formFieldDefinition.useAutoDelayWhenTriggeringDatasource) {\r\n return await triggerDatasourceRequest();\r\n } else {\r\n let timeDelay = 50;\r\n if ((component as any).state && (component as any).setState) {\r\n if ((component as any).state.timer !== undefined) {\r\n DatasourceLoaderStateService.resetLoadingCounter();\r\n }\r\n timeDelay = FormControlHelpers.getTimeDelay(component);\r\n }\r\n\r\n let timer = setTimeout(async () => {\r\n return await triggerDatasourceRequest();\r\n }, timeDelay);\r\n \r\n if ((component as any).state && (component as any).setState) {\r\n component.setState({\r\n timer: timer \r\n });\r\n } \r\n } \r\n });\r\n }\r\n}\r\n","import { FormControlProps } from '../../interfaces/FormControlProps';\r\nimport { FormFieldStateHelpers } from './FormFieldStateHelpers';\r\n\r\nexport class FormStylingHelpers {\r\n static getFormGroupStyle(props: FormControlProps) {\r\n let additionalCssClass = '';\r\n if (props.formFieldDefinition.cssClass !== undefined) {\r\n additionalCssClass = props.formFieldDefinition.cssClass;\r\n }\r\n if (props.formFieldDefinition.fieldCssClass !== undefined) {\r\n additionalCssClass += \" \" + props.formFieldDefinition.fieldCssClass;\r\n }\r\n return 'form-group' + props.visibilityClass + ' ' + additionalCssClass;\r\n }\r\n\r\n static getInputStyle(component: React.Component) {\r\n const props = component.props;\r\n const { isTouchedOnlyWhenRequired } = FormFieldStateHelpers.getFieldState(component);\r\n\r\n const hasErrors = FormFieldStateHelpers.hasErrors(component);\r\n\r\n return FormFieldStateHelpers.isTouchedHasErrors(component)\r\n ? 'is-invalid form-control'\r\n : isTouchedOnlyWhenRequired && !hasErrors\r\n ? 'form-control--touched form-control'\r\n : 'form-control';\r\n }\r\n\r\n static getDropdownStyle(component: React.Component) {\r\n const props = component.props;\r\n return FormFieldStateHelpers.isTouchedHasErrors(component)\r\n ? 'form-control is-invalid form-dropdown__container'\r\n : 'form-control form-dropdown__container';\r\n }\r\n\r\n static getCheckboxStyle(component: React.Component) {\r\n const props = component.props;\r\n return FormFieldStateHelpers.isTouchedHasErrors(component)\r\n ? 'is-invalid custom-control-input'\r\n : 'custom-control-input';\r\n }\r\n\r\n static getRadioStyle(component: React.Component) {\r\n return this.getCheckboxStyle(component);\r\n }\r\n}\r\n","import * as React from 'react';\r\n\r\nconst BedrijvenZoekerOption = props => {\r\n const { data } = props;\r\n \r\n if (data && !!data[\"__isNew__\"]) {\r\n return
\r\n
Werkgever niet gevonden?
Klik hier om deze handmatig toe te voegen.
\r\n
;\r\n }\r\n return (\r\n
\r\n
{data?.data?.Bedrijfsnaam ?? \"\"}
\r\n
{data?.data?.CaoNaam}
\r\n
{data?.data?.Straat ?? \"\"} {data?.data?.AddressLine1 ?? \"\"}
\r\n
{data?.data?.PostalCode ?? \"\"} {data?.data?.Plaats ?? \"\"}
\r\n
\r\n );\r\n};\r\n\r\nconst DefaultZoekerOption = props => {\r\n const { data } = props;\r\n \r\n if (data && !!data[\"__isNew__\"]) {\r\n return
\r\n
Create?
\r\n
;\r\n }\r\n\r\n return (\r\n
\r\n
Default template
\r\n
\r\n );\r\n};\r\n\r\nexport const getOptionTemplate = (formFieldDefinition : any) => {\r\n if (formFieldDefinition.PicklistTemplate == \"bedrijvenzoeker\") {\r\n return BedrijvenZoekerOption;\r\n }\r\n return DefaultZoekerOption;\r\n};","import * as React from 'react';\r\n\r\nimport { UserService } from '@fnv-core/authentication';\r\nimport { Slug } from '@fnv-core/utils';\r\nimport { FormControlProps } from '../interfaces/FormControlProps';\r\nimport { FormControlHelpers } from './helpers/FormControlHelpers';\r\nimport { ComponentStoreHelpers } from './helpers/ComponentStoreHelpers';\r\nimport { FormStylingHelpers } from './helpers/FormStylingHelpers';\r\nimport { FormLabelHelpers } from './helpers/FormLabelHelpers';\r\nimport { connect } from 'react-redux';\r\nimport { PropertyHelpers } from '../helpers/PropertyHelpers';\r\nimport { LabelAndPopover } from './components/label-and-popover';\r\nimport { getResourceString } from '../kentico/resource-strings';\r\nimport { getOptionTemplate } from './templates/picklist-templates';\r\n\r\nimport { FormFieldStateHelpers } from './helpers/FormFieldStateHelpers';\r\nimport { AjaxCallHelpers } from './helpers/AjaxCallHelpers';\r\nimport { FormikHelpers } from './helpers/FormikHelpers';\r\n\r\nimport Downshift from 'downshift';\r\n\r\nexport interface DropdownProps extends FormControlProps {\r\n forms: any;\r\n}\r\n\r\ninterface IOption {\r\n value: any;\r\n label: string;\r\n}\r\n// dropdown has shouldComponentUpdate .. so if properties are added, also change shouldComponentUpdate event\r\nexport interface DropdownState {\r\n timer: any;\r\n dataSourceCounter: number;\r\n value : string;\r\n hasFocus: boolean;\r\n isFiltering : boolean;\r\n isLoading : boolean; \r\n} \r\n\r\nconst mapStateToProps = (state: any) => {\r\n return {\r\n forms: state.forms\r\n };\r\n};\r\n\r\nconst styles = {\r\n clearIndicator: () => undefined,\r\n container: () => undefined,\r\n control: () => undefined,\r\n dropdownIndicator: () => undefined,\r\n groupHeading: () => undefined,\r\n indicatorsContainer: () => undefined,\r\n indicatorSeparator: () => undefined,\r\n input: () => undefined,\r\n loadingIndicator: () => undefined,\r\n loadingMessage: () => undefined,\r\n menu: () => undefined,\r\n menuList: () => undefined,\r\n multiValue: () => undefined,\r\n multiValueLabel: () => undefined,\r\n multiValueRemove: () => undefined,\r\n noOptionsMessage: () => undefined,\r\n option: () => undefined,\r\n placeholder: () => undefined,\r\n singleValue: () => undefined,\r\n valueContainer: () => undefined\r\n};\r\n\r\n/**\r\n * NOTE: When adding new features in this component, please consider to pull out all the rendering to presentational/controls/Dropdown\r\n * The DropdownMultiple is already there, and should together with this one split out the rendering of a single dropdown component.\r\n */\r\nclass ContainedDropdown extends React.Component {\r\n private selectRef : any = undefined;\r\n\r\n constructor(props: DropdownProps) {\r\n super(props); \r\n this.selectRef = React.createRef();\r\n if (this.props.formFieldDefinition.datasource) {\r\n this.state = { \r\n dataSourceCounter: 0,\r\n timer: undefined, \r\n [this.props.formFieldDefinition.datasource] : [],\r\n value: (this.props.field.value && this.props.field.value.value) || (this.props.field.value),\r\n hasFocus: false,\r\n isFiltering: false,\r\n isLoading: false\r\n };\r\n } else {\r\n this.state = { \r\n dataSourceCounter: 0,\r\n timer: undefined,\r\n value : (this.props.field.value && this.props.field.value.value) || (this.props.field.value),\r\n hasFocus: false,\r\n isFiltering: false,\r\n isLoading: false\r\n };\r\n }\r\n } \r\n\r\n updateFieldValue = () => {\r\n let options = ComponentStoreHelpers.getListData(this);\r\n const dropdownProperties = {\r\n ...FormControlHelpers.inputProperties(this)\r\n };\r\n let selectedOption = options.filter((item) => {\r\n let valueToCompare = dropdownProperties.value;\r\n if ((dropdownProperties.value as any).value) {\r\n valueToCompare = (dropdownProperties.value as any).value;\r\n } \r\n return item.value == valueToCompare;\r\n });\r\n\r\n if (!!this.props.formFieldDefinition.autoSetUsingDatasource && \r\n !!this.props.formFieldDefinition.resetSelectedValueAfterInit &&\r\n options.length > 0) {\r\n\r\n let data = {}; \r\n Object.keys(options[0].data).map((optionKey) => {\r\n data[optionKey] = \"\";\r\n });\r\n this.props.formController.setPayload(data); \r\n } else\r\n if (!!this.props.formFieldDefinition.autoSetUsingDatasource && \r\n (!dropdownProperties.value) && \r\n options.length > 0) {\r\n dropdownProperties.value = options[0].value;\r\n selectedOption = [options[0]];\r\n if (options[0] && options[0].data) { \r\n this.props.formController.setPayload(options[0].data);\r\n }\r\n }\r\n\r\n if (selectedOption && selectedOption.length == 0) {\r\n \r\n if (this.props.formFieldDefinition.fieldToUseForPreSelect && options.length > 0) {\r\n const value = this.props.formikBag.values[this.props.formFieldDefinition.fieldToUseForPreSelect];\r\n if (value && value.value) {\r\n selectedOption = options.filter((item) => {\r\n let valueToCompare = value;\r\n if ((value as any).parent) {\r\n valueToCompare = (value as any).parent;\r\n } else\r\n if ((value as any).value) {\r\n valueToCompare = (value as any).value;\r\n }\r\n return item.value == valueToCompare;\r\n });\r\n\r\n if (selectedOption && selectedOption.length > 0) {\r\n dropdownProperties.value = value.value;\r\n }\r\n }\r\n } else if (options.length == 1 && this.props.formFieldDefinition.isDependentField) {\r\n selectedOption = options;\r\n dropdownProperties.value = options[0].value;\r\n }\r\n }\r\n\r\n if (selectedOption && selectedOption.length > 0) {\r\n \r\n // needed to force initial value in correct format so that if dropdown is not changed by the user\r\n // that it is correctly shown in the summary\r\n // see also FormContainer refreshId\r\n if (!!this.props.formFieldDefinition.resetSelectedValueAfterInit) {\r\n this.setState({value : undefined}, () => {\r\n this.props.formikBag.setFieldValue(this.props.formFieldDefinition.name, \"\");\r\n this.props.formikBag.setFieldError(this.props.formFieldDefinition.name, '');\r\n });\r\n } else {\r\n let value = dropdownProperties.value;\r\n if ((dropdownProperties.value as any).value) {\r\n value = (dropdownProperties.value as any).value;\r\n } \r\n\r\n this.setState({value : value}, () => {\r\n this.props.formikBag.setFieldValue(this.props.formFieldDefinition.name, {\r\n label: selectedOption[0].label,\r\n text: selectedOption[0].label,\r\n value: value\r\n });\r\n this.props.formikBag.setFieldError(this.props.formFieldDefinition.name, '');\r\n });\r\n }\r\n } else {\r\n \r\n this.setState({value : \"\"} , () => {\r\n this.props.formikBag.setFieldValue(this.props.formFieldDefinition.name, \"\");\r\n });\r\n }\r\n }\r\n\r\n componentDidMount() {\r\n this.initDropdown();\r\n }\r\n\r\n initDropdown = () => {\r\n if (ComponentStoreHelpers.hasDatasource(this)) {\r\n this.setState({\r\n isLoading: true,\r\n }); \r\n ComponentStoreHelpers.getData(this).then((result) => {\r\n if (this.unmounted) {\r\n return;\r\n }\r\n \r\n if(result)\r\n {\r\n this.setFieldValue(this.props.field.value);\r\n }\r\n });\r\n } else {\r\n this.updateFieldValue();\r\n }\r\n }\r\n\r\n unmounted : boolean = false;\r\n\r\n componentWillUnmount() {\r\n this.unmounted = true;\r\n }\r\n\r\n \r\n\r\n private setFieldValue(value) {\r\n let selectedValues: string = value;\r\n\r\n const options = ComponentStoreHelpers.getListData(this);\r\n let foundOptions = options.find(opt => opt.value === value);\r\n if(foundOptions !== undefined\r\n && foundOptions) {\r\n // needed to force initial value in correct format so that if dropdown is not changed by the user\r\n // that it is correctly shown in the summary\r\n // see also FormContainer refreshId\r\n this.props.formikBag.setFieldValue(this.props.formFieldDefinition.name, foundOptions);\r\n }\r\n \r\n this.setState({\r\n value: selectedValues,\r\n isLoading: false,\r\n });\r\n }\r\n\r\n componentDidUpdate(prevProps: any) {\r\n /*\r\n check here component needs to call ComponentStoreHelpers.getData and reinit component\r\n depending if form values changed that are listed in dependentOnField array/string\r\n (check prevProps.formikBag.values vs props.formikBag.values)\r\n */\r\n\r\n let triggerGetDatasource = false;\r\n if (Array.isArray(this.props.formFieldDefinition.dependentOnField)) {\r\n this.props.formFieldDefinition.dependentOnField.map(dependentField => {\r\n let dependentValue = this.props.formikBag.values[dependentField];\r\n if (dependentValue && (dependentValue as any).value) {\r\n dependentValue = (dependentValue as any).value;\r\n }\r\n\r\n if (prevProps && prevProps.formikBag && prevProps.formikBag.values) {\r\n let prevDependentValue = prevProps.formikBag.values[dependentField];\r\n if (prevDependentValue && (prevDependentValue as any).value) {\r\n prevDependentValue = (prevDependentValue as any).value;\r\n }\r\n\r\n if (dependentValue != prevDependentValue) {\r\n triggerGetDatasource = true;\r\n }\r\n } else {\r\n triggerGetDatasource = true;\r\n }\r\n });\r\n\r\n if (triggerGetDatasource) {\r\n this.initDropdown();\r\n }\r\n }\r\n }\r\n\r\n shouldComponentUpdate(nextProps : DropdownProps, nextState : DropdownState) : boolean {\r\n /*\r\n check here component needs to update component\r\n depending if form values changed that are listed in dependentOnField array/string\r\n (check nextProps.formikBag.values vs props.formikBag.values)\r\n */\r\n let triggerGetDatasource = false;\r\n if (Array.isArray(this.props.formFieldDefinition.dependentOnField)) {\r\n this.props.formFieldDefinition.dependentOnField.map(dependentField => {\r\n\r\n if (nextProps && nextProps.formikBag && nextProps.formikBag.values) {\r\n let dependentValue = nextProps.formikBag.values[dependentField];\r\n if (dependentValue && (dependentValue as any).value) {\r\n dependentValue = (dependentValue as any).value;\r\n }\r\n\r\n if (this.props && this.props.formikBag && this.props.formikBag.values) {\r\n let prevDependentValue = this.props.formikBag.values[dependentField];\r\n if (prevDependentValue && (prevDependentValue as any).value) {\r\n prevDependentValue = (prevDependentValue as any).value;\r\n }\r\n\r\n if (dependentValue != prevDependentValue) {\r\n triggerGetDatasource = true;\r\n }\r\n } else {\r\n triggerGetDatasource = true;\r\n }\r\n } else {\r\n triggerGetDatasource = true;\r\n }\r\n \r\n });\r\n }\r\n\r\n let datasourceDiffers = false;\r\n if (this.props.formFieldDefinition.datasource) {\r\n datasourceDiffers = this.state[this.props.formFieldDefinition.datasource] != nextState[this.props.formFieldDefinition.datasource];\r\n }\r\n\r\n let currentError = \"\";\r\n if (this.props.form && this.props.form.errors &&\r\n this.props.form.errors[this.props.formFieldDefinition.name]) {\r\n currentError = this.props.form.errors[this.props.formFieldDefinition.name];\r\n }\r\n let nextError = \"\";\r\n if (nextProps.form && nextProps.form.errors && \r\n nextProps.form.errors[nextProps.formFieldDefinition.name]) {\r\n nextError = nextProps.form.errors[nextProps.formFieldDefinition.name];\r\n }\r\n \r\n let result = datasourceDiffers ||\r\n (this.props.form && JSON.stringify(this.props.form.values) != JSON.stringify(nextProps.form.values)) ||\r\n this.state.value != nextState.value ||\r\n this.state.isFiltering != nextState.isFiltering ||\r\n this.state.isLoading != nextState.isLoading ||\r\n this.state.dataSourceCounter != nextState.dataSourceCounter ||\r\n this.state.hasFocus != nextState.hasFocus ||\r\n triggerGetDatasource || (nextProps.field.value != this.props.field.value) ||\r\n (currentError != nextError) ||\r\n (nextProps.form && nextProps.form.errors && \r\n this.props.form && this.props.form.errors && \r\n nextProps.form.errors[nextProps.formFieldDefinition.name] != this.props.form.errors[this.props.formFieldDefinition.name]) || \r\n (nextProps.formikBag.values[this.props.formFieldDefinition.name] != this.props.formikBag.values[this.props.formFieldDefinition.name]);\r\n return result;\r\n }\r\n\r\n asyncSelectOptions(inputValue) { \r\n ComponentStoreHelpers.getAsyncData(inputValue, this);\r\n }\r\n \r\n onClickWrapperDiv(event) {\r\n // fix because of bug in react-select in combination with openMenuOnClick={false}\r\n // https://github.com/JedWatson/react-select/issues/3923\r\n if (!!this.props.formFieldDefinition.onClickFocusHack && \r\n this.selectRef && this.selectRef.current && this.selectRef.current.select?.select) {\r\n // AsyncSelectable \r\n let input = this.selectRef.current.select.select.inputRef;\r\n if (!input && this.selectRef.current.select?.select?.select) {\r\n // AsyncCreatable\r\n input = this.selectRef.current.select.select.select.inputRef;\r\n }\r\n if (input) {\r\n input.style.opacity = 1;\r\n input.focus();\r\n }\r\n // cursor is at the beginning of text, but al known ways todo this via code, doesn't work here\r\n }\r\n }\r\n\r\n onInputFocus = (event) => {\r\n this.setState({hasFocus : true});\r\n }\r\n \r\n onInputBlur = (event) => {\r\n if (event.persist) {\r\n event.persist();\r\n }\r\n this.setState({hasFocus : false}, () => {\r\n event.target = this;\r\n this.props.field.onBlur(event);\r\n });\r\n }\r\n\r\n hasAsyncData = () => {\r\n return this.props.formFieldDefinition.datasource && ( \r\n this.props.formFieldDefinition.PicklistMode === \"picklist\" ||\r\n this.props.formFieldDefinition.PicklistMode === \"custompicklist\");\r\n }\r\n\r\n onChange = (value) => {\r\n let props = this.props; \r\n let newValue = value;\r\n if (value && value.value) {\r\n if (value.text) {\r\n newValue.label = value.text;\r\n }\r\n } \r\n this.setState({\r\n isLoading: false,\r\n isFiltering: this.props.field.value && newValue.label !== this.props.field.value.label, \r\n value : \"\"} , () => {\r\n\r\n if (value && value.data) { \r\n props.formController.setPayload(value.data);\r\n }\r\n\r\n if (props.formFieldDefinition.isDependentField) { \r\n props.formController.setState({[props.formFieldDefinition.name]: newValue});\r\n }\r\n FormFieldStateHelpers.clearMarkedFields(this);\r\n // Update formik field\r\n props.formikBag.setFieldTouched(props.formFieldDefinition.name, true, false);\r\n // By using .then, we have no need for a setTimeout before validating the value.\r\n props.formikBag.setFieldValue(props.formFieldDefinition.name, {...newValue}, true).then((res) => {\r\n if ((newValue && newValue.value && newValue.value != \"\") || \r\n (newValue && newValue.value === undefined && newValue != \"\")) {\r\n props.formikBag.setFieldError(props.formFieldDefinition.name, \"\"); \r\n }\r\n\r\n FormControlHelpers.handleTriggerFieldDependingOnCondition(this, newValue);\r\n if (!!props.formFieldDefinition.mapPayloadFieldsOnChange) {\r\n FormikHelpers.mapValuesToFields(this, value.data); \r\n } \r\n if (props.formFieldDefinition.triggerDatasource) {\r\n if (FormControlHelpers.isValid(this)) {\r\n // Only get data when input is valid\r\n AjaxCallHelpers.getRelatedData(this as any, value);\r\n }\r\n }\r\n\r\n this.props.formikBag.validateForm(this.props.formikBag.values);\r\n });\r\n }); \r\n }\r\n\r\n hasInputValueChanged = (inputValue) => {\r\n return !this.props.field.value || (this.props.field.value && inputValue !== this.props.field.value.label);\r\n }\r\n\r\n additionalDropDownCssClass = () => {\r\n if (this.props.formFieldDefinition.PicklistMode && this.props.formFieldDefinition.PicklistMode !== \"dropdown\") {\r\n return \"picklist\";\r\n }\r\n return\"\"; \r\n }\r\n\r\n renderSelectItem = (item, index, getItemProps, highlightedIndex, selectedItem) => {\r\n const Option = getOptionTemplate(this.props.formFieldDefinition);\r\n\r\n if (this.props.formFieldDefinition.PicklistMode === \"custompicklist\") {\r\n \r\n return ;\r\n }\r\n\r\n return \r\n {item.label}\r\n ;\r\n }\r\n \r\n render() {\r\n\r\n // Get options from Kentico or external dataset\r\n let options = ComponentStoreHelpers.getListData(this);\r\n let optionsCount = options.length; \r\n\r\n // Add empty first item if required\r\n if (this.props.formFieldDefinition.includeDefaultEmptyOption) {\r\n options = [\r\n {\r\n value: '',\r\n label: this.props.formFieldDefinition.defaultEmptyOption,\r\n text: this.props.formFieldDefinition.defaultEmptyOption,\r\n parent: '',\r\n data: {}\r\n },\r\n ...options\r\n ];\r\n }\r\n let dropdownProperties = {\r\n ...FormControlHelpers.inputProperties(this),\r\n // Overrides: change -> check -> load related data flow\r\n ...FormControlHelpers.onChangeSetValue(this),\r\n // Dropdown specific\r\n options: options,\r\n styles: styles,\r\n noOptionsMessage() {\r\n return getResourceString('Form.Dropdown.NoOptions');\r\n },\r\n noSelectionLabel: getResourceString(\"Form.Dropdown.ChooseOption\") \r\n };\r\n \r\n if ((dropdownProperties.value as any).value === undefined && \r\n dropdownProperties.value !== \"\") {\r\n const selectedOption = options.filter((item) => {\r\n return item.value == dropdownProperties.value;\r\n });\r\n\r\n if (selectedOption && selectedOption.length > 0) {\r\n (dropdownProperties.value as any) = {\r\n value: dropdownProperties.value,\r\n label: selectedOption[0].label,\r\n text: selectedOption[0].text\r\n };\r\n }\r\n } \r\n if (!!this.props.formFieldDefinition.hideWhenNoOptions) {\r\n if (optionsCount == 0) {\r\n return <>;\r\n } \r\n }\r\n\r\n const Option = getOptionTemplate(this.props.formFieldDefinition);\r\n\r\n // use Select component dependent on user-level setting\r\n // .. for screenreader user : use native select\r\n // .. for other users : use Downshift \r\n return (\r\n
\r\n \r\n {UserService.getUseAccessibleDropdown() === true ?
\r\n
: <>\r\n {\r\n if (this.hasAsyncData()) {\r\n if (inputValue.length <= 1) {\r\n this.setState({isFiltering : false}, () => {\r\n stateAndHelpers.closeMenu();\r\n });\r\n \r\n return;\r\n }\r\n if (this.hasInputValueChanged(inputValue)) {\r\n this.asyncSelectOptions(inputValue);\r\n }\r\n } else {\r\n this.setState({isFiltering : this.hasInputValueChanged(inputValue)});\r\n }\r\n }}\r\n\r\n onChange={(value: any) => { \r\n this.onChange(value); \r\n } \r\n }\r\n \r\n onSelect={() => {\r\n this.setState({isFiltering : false});\r\n }}\r\n\r\n itemToString={item => (item ? (item.label || \"\") : '')}\r\n >\r\n {({\r\n getInputProps,\r\n getItemProps,\r\n getLabelProps,\r\n getMenuProps,\r\n isOpen,\r\n inputValue,\r\n highlightedIndex,\r\n selectedItem,\r\n getRootProps,\r\n getToggleButtonProps,\r\n selectItem \r\n }) => (\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n {this.state.isLoading && }\r\n
\r\n
\r\n
\r\n
\r\n \r\n <>{isOpen &&
\r\n
    \r\n <>{options\r\n .filter(item => !this.state.isFiltering || (!inputValue || (item && (item.label || \"\").toLowerCase().indexOf(inputValue.toLowerCase()) >= 0)))\r\n .map((item, index) => {\r\n return this.renderSelectItem(item, index, getItemProps, highlightedIndex, selectedItem);\r\n })\r\n }{this.props.formFieldDefinition.PicklistMode === \"custompicklist\" &&\r\n !!this.props.formFieldDefinition.allowCreateNewOption && \r\n \r\n }\r\n
\r\n
}\r\n
\r\n )}\r\n \r\n }\r\n {!this.state.hasFocus && FormControlHelpers.invalidFeedbackComponent(this)}\r\n \r\n );\r\n }\r\n}\r\n\r\nexport const Dropdown = connect(mapStateToProps)(ContainedDropdown);","import * as React from 'react';\r\n\r\nimport { FormControlProps } from '../interfaces/FormControlProps';\r\nimport { FormControlHelpers } from './helpers/FormControlHelpers';\r\nimport { ComponentStoreHelpers } from './helpers/ComponentStoreHelpers';\r\nimport { FormLabelHelpers } from './helpers/FormLabelHelpers';\r\nimport { getResourceString } from '../kentico/resource-strings';\r\nimport { DropdownMultipleControl } from '../presentational/controls';\r\n\r\nexport interface DropdownMultipleProps extends FormControlProps {\r\n}\r\n\r\ninterface IOption {\r\n value: any;\r\n label: string;\r\n}\r\n\r\n// dropdown has shouldComponentUpdate .. so if properties are added, also change shouldComponentUpdate event\r\nexport interface DropdownMultipleState {\r\n dataSourceCounter?: number;\r\n value: IOption[];\r\n isLoading: boolean; \r\n isInvalid: boolean;\r\n} \r\n\r\nexport class DropdownMultiple extends React.Component {\r\n\r\n private options: IOption[] = [];\r\n\r\n constructor(props: DropdownMultipleProps) {\r\n super(props); \r\n if (props.formFieldDefinition.datasource) {\r\n this.state = {\r\n dataSourceCounter: 0,\r\n [this.props.formFieldDefinition.datasource] : [],\r\n value: [],\r\n isLoading: false,\r\n isInvalid: false,\r\n };\r\n } else {\r\n this.state = {\r\n value: [],\r\n isLoading: false,\r\n isInvalid: false,\r\n };\r\n }\r\n }\r\n\r\n componentDidMount() {\r\n this.initDropdowns();\r\n }\r\n\r\n unmounted: boolean = false;\r\n\r\n componentWillUnmount() {\r\n this.unmounted = true;\r\n }\r\n\r\n private initDropdowns = () => {\r\n if (ComponentStoreHelpers.hasDatasource(this)) {\r\n this.setState({\r\n isLoading: true,\r\n });\r\n ComponentStoreHelpers.getData(this).then((result) => {\r\n if (this.unmounted) {\r\n return;\r\n }\r\n\r\n if (result) {\r\n this.options = result;\r\n this.setFieldValue(this.props.field.value);\r\n }\r\n });\r\n } else {\r\n const properties = {\r\n ...FormControlHelpers.inputProperties(this),\r\n };\r\n\r\n this.setFieldValue(properties.value);\r\n }\r\n }\r\n\r\n private setFieldValue(value) {\r\n \r\n let selectedValues: IOption[] = value;\r\n\r\n if (!Array.isArray(value)) {\r\n const values = !!value ? value.split(',') : [];\r\n const options = ComponentStoreHelpers.getListData(this);\r\n selectedValues = values.map(val => {\r\n return options.find(opt => opt.value === val);\r\n });\r\n // needed to force initial value in correct format so that if dropdown is not changed by the user\r\n // that it is correctly shown in the summary\r\n // see also FormContainer refreshId\r\n this.props.formikBag.setFieldValue(this.props.formFieldDefinition.name, selectedValues);\r\n }\r\n \r\n this.setState({\r\n value: [...selectedValues],\r\n isLoading: false,\r\n });\r\n }\r\n\r\n private onSelectionsChange = (selections: IOption[]) => {\r\n const properties = FormControlHelpers.inputProperties(this);\r\n properties.onChange({\r\n target: {\r\n value: selections,\r\n },\r\n });\r\n this.setState({\r\n value: [...selections],\r\n });\r\n }\r\n\r\n private noSelectionLabel() {\r\n return getResourceString(\"Form.Dropdown.ChooseOption\");\r\n }\r\n\r\n private addMoreLabel() {\r\n return this.props.formFieldDefinition.addMoreLabel || getResourceString('Form.Dropdown.AddMore');\r\n }\r\n\r\n render() {\r\n // Get options from Kentico or external dataset\r\n let options = ComponentStoreHelpers.getListData(this);\r\n\r\n // Add empty first item if required\r\n if (this.props.formFieldDefinition.includeDefaultEmptyOption) {\r\n options = [\r\n {\r\n value: '',\r\n label: this.props.formFieldDefinition.defaultEmptyOption,\r\n text: this.props.formFieldDefinition.defaultEmptyOption,\r\n parent: '',\r\n data: {}\r\n },\r\n ...options\r\n ];\r\n }\r\n\r\n const arrayValue = this.state.value;\r\n const values: string[] = arrayValue.map(av => typeof (av) === 'string' ? av : av?.value);\r\n const selectedOptions = values.map(val => {\r\n return options.find(opt => opt.value === val);\r\n });\r\n\r\n return (\r\n <>\r\n v?.value || null)}\r\n error={this.props.form.errors}\r\n maxItems={this.props.formFieldDefinition.maxItems}\r\n sortItems={this.props.formFieldDefinition.sortItems}\r\n />\r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\n\r\nimport { Slug } from '@fnv-core/utils';\r\nimport { FormControlProps } from '../interfaces/FormControlProps';\r\nimport { FormFieldStateHelpers } from './helpers/FormFieldStateHelpers';\r\nimport { FormStylingHelpers } from './helpers/FormStylingHelpers';\r\nimport { FormLabelHelpers } from './helpers/FormLabelHelpers';\r\nimport { PropertyHelpers } from '../helpers/PropertyHelpers';\r\nimport { FormControlHelpers } from './helpers/FormControlHelpers';\r\nimport ReactHtmlParser from 'react-html-parser';\r\nimport { LabelAndPopover } from './components/label-and-popover';\r\n\r\nexport interface InputState {\r\n dataSourceCounter: number;\r\n timer: any;\r\n isButtonClicked: boolean;\r\n isLoading: boolean;\r\n isErrorLoading : boolean;\r\n hasFocus: boolean;\r\n}\r\n\r\nclass Input extends React.Component {\r\n constructor(props: FormControlProps) {\r\n super(props);\r\n this.state = {\r\n dataSourceCounter: 0,\r\n timer: undefined,\r\n isButtonClicked: false,\r\n isLoading: false,\r\n isErrorLoading : false,\r\n hasFocus: false\r\n };\r\n }\r\n\r\n componentDidMount = () => {\r\n const value = this.props.field.value,\r\n formikBag = this.props.formikBag,\r\n formFieldDefinition = this.props.formFieldDefinition;\r\n \r\n if (value !== '') {\r\n formikBag.setFieldTouched(formFieldDefinition.name, true, true);\r\n }\r\n }\r\n\r\n clickButton = (event) => {\r\n event.preventDefault();\r\n if (this.props.formFieldDefinition.buttonMode == \"post\") { \r\n this.props.formController.submitToContainer(this.props.formikBag.values, true , true);\r\n }\r\n return false;\r\n }\r\n\r\n onInputFocus = (event) => {\r\n this.setState({hasFocus : true});\r\n }\r\n\r\n onInputBlur = (event) => {\r\n if (event.persist) {\r\n event.persist();\r\n }\r\n this.setState({hasFocus : false}, () => {\r\n this.props.field.onBlur(event);\r\n });\r\n }\r\n\r\n render() {\r\n const inputProperties = {\r\n // Input properties has everything needed to deal with manual input\r\n // It will load related data when a datasource is set\r\n ...FormControlHelpers.inputProperties(this)\r\n };\r\n const inputDecorators = this.props.formFieldDefinition.inputcontrolstyle !== undefined ? (this.props.formFieldDefinition.inputcontrolstyle || \"\").toLowerCase().split(\" \") : \"\";\r\n const hasEuro = inputDecorators.indexOf(\"euro\") >= 0;\r\n const hasPercentage = inputDecorators.indexOf(\"percentage\") >= 0;\r\n let hasAppendedIcon = hasPercentage;\r\n let textAppended = \"\";\r\n let textAppendedClass = \"\";\r\n if (hasPercentage) {\r\n textAppended = \"%\";\r\n textAppendedClass = \"input-indicator-indicator\";\r\n } else \r\n if (inputDecorators.indexOf(\"cm\") >= 0) {\r\n textAppended = \"cm\";\r\n textAppendedClass = \"input-indicator-text\";\r\n hasAppendedIcon = true;\r\n } else\r\n if (inputDecorators.indexOf(\"kg\") >= 0) {\r\n textAppended = \"kg\";\r\n textAppendedClass = \"input-indicator-text\";\r\n hasAppendedIcon = true;\r\n } else\r\n if (inputDecorators.indexOf(\"graden\") >= 0) {\r\n textAppended = \"graden\";\r\n textAppendedClass = \"input-indicator-text\";\r\n hasAppendedIcon = true;\r\n } else if (!hasEuro && this.props.formFieldDefinition.inputcontrolstyle !== undefined && \r\n this.props.formFieldDefinition.inputcontrolstyle != \"\") {\r\n textAppended = this.props.formFieldDefinition.inputcontrolstyle;\r\n textAppendedClass = \"input-indicator-text\";\r\n hasAppendedIcon = true;\r\n }\r\n\r\n let imageGroupClass = \"no-gutters\";\r\n if (!!this.props.formFieldDefinition.hasImage) {\r\n imageGroupClass = \"no-gutters d-flex form__section-input--with-image\";\r\n }\r\n return (\r\n <>\r\n
\r\n
\r\n \r\n
\r\n\r\n {!!hasEuro ?\r\n
\r\n
\r\n \r\n
\r\n
: null}\r\n \r\n {!!hasAppendedIcon ?\r\n
\r\n
\r\n {textAppended}\r\n
\r\n
: null}\r\n
\r\n
\r\n \r\n
\r\n
\r\n {!!this.props.formFieldDefinition.hasButton &&
\r\n \r\n
} \r\n
\r\n {!this.state.hasFocus && FormControlHelpers.invalidFeedbackComponent(this)}\r\n {this.props.formFieldDefinition.hasPopover === undefined && \r\n this.props.formFieldDefinition.explanation && \r\n this.props.formFieldDefinition.explanation !== \"\" ? {ReactHtmlParser(this.props.formFieldDefinition.explanation)} : null}\r\n
\r\n {!!this.props.formFieldDefinition.hasImage && \"\"}\r\n
\r\n
\r\n \r\n );\r\n }\r\n}\r\n\r\nexport { Input };\r\n","import * as React from \"react\";\r\nimport { FormControlProps } from \"../interfaces/FormControlProps\";\r\n\r\nimport { Slug } from '@fnv-core/utils';\r\nimport { LabelAndPopover } from './components/label-and-popover';\r\nimport { PropertyHelpers } from '../helpers/PropertyHelpers';\r\nimport { FormLabelHelpers } from \"./helpers/FormLabelHelpers\";\r\nimport { FormFieldStateHelpers } from \"./helpers/FormFieldStateHelpers\";\r\nimport { RadioState } from './Radio';\r\n\r\nclass Radiostyled extends React.Component {\r\n constructor(props: FormControlProps) {\r\n super(props);\r\n this.state = {\r\n dataSourceCounter: 0,\r\n timer: undefined,\r\n hasFocus: false\r\n }; \r\n }\r\n\r\n onInputFocus = (event) => { \r\n this.setState({hasFocus : true});\r\n }\r\n\r\n onInputBlur = (event) => {\r\n if (event.persist) {\r\n event.persist();\r\n }\r\n this.setState({hasFocus : false}, () => {\r\n this.props.field.onBlur(event);\r\n });\r\n }\r\n\r\n render() {\r\n \r\n return
\r\n \r\n {this.props.formFieldDefinition.options.map((option : string, index : number) => {\r\n return
\r\n {\r\n /*if (this.props.formFieldDefinition.clearFields !== undefined) {\r\n this.props.formFieldDefinition.clearFields.map((fieldName : string) => { \r\n this.props.formikBag.setFieldValue(fieldName, \"\");\r\n }); \r\n }\r\n */\r\n FormFieldStateHelpers.clearMarkedFields(this);\r\n\r\n let value : any = event.target.value;\r\n \r\n // workaround voor kentico/api value mismatch\r\n // value kan ook iets anders bevatten dan true/false (bijvoorbeeld Ja/Nee, Man/Vrouw etc)\r\n if (value === \"true\") {\r\n value = true;\r\n }\r\n if (value === \"false\") {\r\n value = false;\r\n }\r\n\r\n this.props.formikBag.setFieldTouched(\r\n this.props.formFieldDefinition.name,\r\n true,\r\n false\r\n );\r\n this.props.formikBag.setFieldValue(this.props.formFieldDefinition.name, value, true).then(() => {\r\n this.props.field.onChange(event);\r\n const error = this.props.formController.validateField(this.props.formFieldDefinition, this.props.formikBag);\r\n this.props.formikBag.setFieldError(this.props.formFieldDefinition.name, error);\r\n\r\n if (this.props.formFieldDefinition.isDependentField) { \r\n this.props.formController.setState({[this.props.formFieldDefinition.name]: this.props.formFieldDefinition.valueoptions[index]});\r\n } \r\n })\r\n }} \r\n \r\n name={this.props.formFieldDefinition.name} \r\n \r\n value={this.props.formFieldDefinition.valueoptions[index]} />\r\n \r\n \r\n
;\r\n })}\r\n
\r\n {!this.state.hasFocus && \r\n this.props.form.touched[this.props.formFieldDefinition.name] && \r\n this.props.form.errors[this.props.formFieldDefinition.name] ?
\r\n {this.props.form.errors[this.props.formFieldDefinition.name]}
: null}\r\n
\r\n
;\r\n }\r\n}\r\n\r\nexport { Radiostyled };","import * as React from 'react';\r\nimport { useState, useRef, useEffect } from 'react';\r\n\r\nexport interface PollResultProps {\r\n label: string;\r\n id: string;\r\n checked: boolean;\r\n pollResults: any;\r\n}\r\n\r\nexport const PollResult = (props : PollResultProps) => {\r\n\r\n const [pollScore, setPollScore] = useState(0);\r\n const pollScoreBackgroundElement = useRef(null);\r\n\r\n useEffect(() => {\r\n if (!props.pollResults || !props.pollResults.Results || !props.label || !props.pollResults.TotalCount) {\r\n return;\r\n }\r\n\r\n const resultForOption = props.pollResults.Results[(props.label || \"\").trim()];\r\n if (!resultForOption) {\r\n return;\r\n }\r\n \r\n const totalCount = props.pollResults.TotalCount;\r\n if (totalCount > 0) {\r\n const percentage = Math.round(resultForOption * 100 / totalCount);\r\n setPollScore(percentage);\r\n }\r\n }, [props.label, props.id, props.pollResults]);\r\n\r\n useEffect(() => {\r\n if (pollScore > 0 && pollScoreBackgroundElement.current) {\r\n setTimeout(() => {\r\n (pollScoreBackgroundElement.current as HTMLElement).style.width = pollScore + \"%\";\r\n }, 10);\r\n }\r\n }, [pollScore]);\r\n\r\n if (!props.pollResults || !props.pollResults.TotalCount) {\r\n return null;\r\n }\r\n\r\n return
\r\n {props.label}\r\n <>{props.checked ? : null}\r\n {pollScore + \"%\"}\r\n
\r\n
;\r\n};","import * as React from 'react';\r\nimport { getResourceString } from '../../kentico/resource-strings';\r\n\r\nexport interface PollResultsTotalProps { \r\n pollResults: any;\r\n}\r\n\r\nexport const PollResultsTotal = (props : PollResultsTotalProps) => {\r\n return props.pollResults &&\r\n

{props.pollResults.TotalCount} {getResourceString(\"Form.PollResults.TotalCount\")}

;\r\n};","import * as React from 'react';\r\nimport { Slug } from '@fnv-core/utils';\r\nimport { FormControlProps } from '../interfaces/FormControlProps';\r\nimport { FormControlHelpers } from './helpers/FormControlHelpers';\r\nimport { ComponentStoreHelpers, IOption } from './helpers/ComponentStoreHelpers';\r\nimport { FormLabelHelpers } from './helpers/FormLabelHelpers';\r\nimport { FormStylingHelpers } from './helpers/FormStylingHelpers';\r\nimport ReactHtmlParser from 'react-html-parser';\r\nimport { LabelAndPopover } from './components/label-and-popover';\r\nimport { PropertyHelpers } from '../helpers/PropertyHelpers';\r\nimport { PollResult } from './components/poll-result';\r\nimport { PollResultsTotal } from './components/poll-results-total';\r\n\r\nexport interface RadioState {\r\n dataSourceCounter: number;\r\n timer: any;\r\n hasFocus: boolean;\r\n}\r\n\r\nclass Radio extends React.Component {\r\n constructor(props: FormControlProps) {\r\n super(props);\r\n this.state = {\r\n dataSourceCounter: 0,\r\n timer: undefined,\r\n hasFocus: false\r\n }; \r\n }\r\n\r\n componentDidMount() {\r\n if (ComponentStoreHelpers.hasDatasource(this)) {\r\n ComponentStoreHelpers.setFormFieldData(this, []);\r\n ComponentStoreHelpers.getData(this);\r\n }\r\n\r\n const value = this.props.field.value,\r\n formikBag = this.props.formikBag,\r\n formFieldDefinition = this.props.formFieldDefinition;\r\n \r\n if (value !== '') {\r\n formikBag.setFieldTouched(formFieldDefinition.name, true, true);\r\n }\r\n }\r\n\r\n unmounted : boolean = false;\r\n componentWillUnmount() {\r\n this.unmounted = true;\r\n }\r\n\r\n getCheckedState = (option : IOption, radioAsImageValue? : string) => {\r\n // checks op true/false ivm verschil hoe vanuit kentico-form (string) en \r\n // api (boolean) data wordt aangeleverd\r\n if (radioAsImageValue && radioAsImageValue == this.props.field.value) {\r\n return true;\r\n } \r\n \r\n let value = this.props.field.value;\r\n if (value && value.value) {\r\n value = value.value;\r\n }\r\n\r\n const result = ((value.toString() || \"\").trim() === (option.value.toString() || \"\").trim()) || \r\n (option.value === \"true\" && !!value) || \r\n (option.value === \"false\" && value === false) ||\r\n (option.value === \"false\" && value === \"\");\r\n\r\n return result;\r\n }\r\n\r\n onInputFocus = (event) => { \r\n this.setState({hasFocus : true});\r\n }\r\n\r\n onInputBlur = (event) => {\r\n if (event.persist) {\r\n event.persist();\r\n }\r\n this.setState({hasFocus : false}, () => {\r\n this.props.field.onBlur(event);\r\n });\r\n }\r\n\r\n clickOuterRadioDiv = (radioButtonId, option : IOption) => {\r\n const radioButtonElement = document.getElementById(radioButtonId);\r\n if (radioButtonElement) {\r\n radioButtonElement.click();\r\n }\r\n }\r\n\r\n showPollResults = () => {\r\n const {isShowPollResults , pollResults} = this.props.formController.props;\r\n\r\n return !!isShowPollResults && pollResults &&\r\n pollResults[this.props.formFieldDefinition.name];\r\n }\r\n\r\n render() {\r\n function getId(component: React.Component, option: IOption) {\r\n return `${component.props.formController.props.formCMSName || \"form\"}-${component.props.formFieldDefinition.name}-${option.value}`;\r\n }\r\n\r\n const fieldProperties = {\r\n ...FormControlHelpers.baseProperties(this),\r\n ...FormControlHelpers.onChangeSetValueViaEvent(this)\r\n };\r\n\r\n const inputDecorators = this.props.formFieldDefinition.inputcontrolstyle !== undefined ? (this.props.formFieldDefinition.inputcontrolstyle || \"\").toLowerCase().split(\" \") : \"\";\r\n const isBlockMode = inputDecorators.indexOf(\"blocks\") >= 0;\r\n\r\n const options = ComponentStoreHelpers.getListData(this);\r\n const disabled = this.props.formFieldDefinition.showAsDisabled || !!this.props.formFieldDefinition.readOnly;\r\n\r\n if (this.props.formFieldDefinition.subtype == \"RadioButtonAsImageControl\") {\r\n return (\r\n
\r\n \r\n
{options.map((option: IOption, index: number) => {\r\n\r\n const splittedKeys = option.value.split('|');\r\n const imageValue = splittedKeys.length > 1 ? splittedKeys[1] : \"\";\r\n\r\n const isIcon = imageValue.indexOf(\"icon-\") == 0;\r\n const text = option.label ? option.label : option.value;\r\n\r\n \r\n return (\r\n \r\n \r\n \r\n
\r\n );\r\n })}\r\n
\r\n {!this.state.hasFocus && FormControlHelpers.invalidFeedbackComponent(this)}\r\n {this.props.formFieldDefinition.explanation &&\r\n
{ReactHtmlParser(this.props.formFieldDefinition.explanation)}
\r\n }\r\n \r\n \r\n );\r\n }\r\n\r\n let additionalCssClass = '';\r\n if (this.props.formFieldDefinition.cssClass !== undefined) {\r\n additionalCssClass = this.props.formFieldDefinition.cssClass;\r\n } \r\n\r\n return (\r\n
\r\n \r\n {options.map((option: IOption, index: number) => {\r\n\r\n if (!!this.props.formController.props.isShowPollResults) {\r\n return ;\r\n }\r\n let correctAnswerClass = \"\";\r\n if (this.props.formFieldDefinition.correctAnswer !== undefined && \r\n this.props.formFieldDefinition.correctAnswer !== false &&\r\n this.props.formFieldDefinition.correctAnswer !== \"\") {\r\n if (option.value === this.props.formFieldDefinition.correctAnswer) {\r\n if (this.getCheckedState(option)) {\r\n correctAnswerClass = \"form-control__radio-button-correct-selected\";\r\n } else {\r\n if ((this.props.field.value.toString() || \"\").trim() != \"\") {\r\n correctAnswerClass = \"form-control__radio-button-correct\";\r\n }\r\n }\r\n } else {\r\n if (this.getCheckedState(option)) {\r\n correctAnswerClass = \"form-control__radio-button-incorrect\";\r\n }\r\n }\r\n }\r\n\r\n return (\r\n this.clickOuterRadioDiv(getId(this, option), option)} \r\n >\r\n \r\n \r\n
\r\n );\r\n })}\r\n {!this.state.hasFocus && FormControlHelpers.invalidFeedbackComponent(this)}\r\n {this.showPollResults() && <>\r\n \r\n }\r\n \r\n );\r\n }\r\n}\r\n\r\nexport { Radio };\r\n","import * as React from 'react';\r\nimport { Slug } from '@fnv-core/utils';\r\nimport { FormControlProps } from '../interfaces/FormControlProps';\r\nimport { FormControlHelpers } from './helpers/FormControlHelpers';\r\nimport { ComponentStoreHelpers } from './helpers/ComponentStoreHelpers';\r\nimport { FormLabelHelpers } from './helpers/FormLabelHelpers';\r\nimport { FormStylingHelpers } from './helpers/FormStylingHelpers';\r\nimport { AjaxCallHelpers } from './helpers/AjaxCallHelpers';\r\nimport ReactHtmlParser from 'react-html-parser';\r\nimport { LabelAndPopover } from './components/label-and-popover';\r\nimport { PropertyHelpers } from '../helpers/PropertyHelpers';\r\nimport { FormFieldStateHelpers } from './helpers/FormFieldStateHelpers';\r\n\r\nexport interface CheckboxState {\r\n dataSourceCounter: number;\r\n timer: any;\r\n label: string;\r\n hasFocus: boolean;\r\n}\r\n\r\nclass Checkbox extends React.Component {\r\n constructor(props: FormControlProps) {\r\n super(props);\r\n \r\n this.state = {\r\n dataSourceCounter: 0,\r\n timer: undefined,\r\n label: undefined,\r\n hasFocus: false\r\n };\r\n\r\n }\r\n\r\n changeValidationError = () => {\r\n if (this.props.formFieldDefinition.validation &&\r\n this.props.formFieldDefinition.validation.required) {\r\n if (this.props.formConfig.algemenevoorwaardenLinkTekst) {\r\n const errorLabel = this.props.formFieldDefinition.validation.required.error.replace('[ALGEMENEVOORWAARDEN]', \r\n this.props.formConfig.algemenevoorwaardenLinkTekst);\r\n this.props.formFieldDefinition.validation.required.error = errorLabel;\r\n } \r\n }\r\n }\r\n\r\n componentDidMount() {\r\n this.changeValidationError();\r\n\r\n if (ComponentStoreHelpers.hasDatasource(this)) {\r\n ComponentStoreHelpers.getData(this).then((data) => \r\n {\r\n if(data && !this.unmounted) {\r\n this.setState({label: (data as any).ShortText});\r\n }\r\n });\r\n }\r\n }\r\n\r\n unmounted : boolean = false;\r\n componentWillUnmount() {\r\n this.unmounted = true;\r\n }\r\n\r\n onInputFocus = (event) => { \r\n this.setState({hasFocus : true});\r\n }\r\n\r\n onInputBlur = (event) => {\r\n if (event.persist) {\r\n event.persist();\r\n }\r\n this.setState({hasFocus : false}, () => {\r\n this.props.field.onBlur(event);\r\n });\r\n }\r\n\r\n render() {\r\n let label: string = this.state.label ? this.state.label : this.props.formFieldDefinition.optionyes;\r\n let linkAlgemeneVoorwaarden = null;\r\n let self = this;\r\n let dontRenderLabelAboveInput = false;\r\n\r\n const fieldProperties = {\r\n ...FormControlHelpers.inputProperties(this),\r\n };\r\n\r\n let isRequired = this.props.formFieldDefinition.validation['required'] !== undefined;\r\n\r\n if (this.props.formFieldDefinition.optionyes.indexOf('[ALGEMENEVOORWAARDEN]') >= 0) {\r\n label = label.replace('[ALGEMENEVOORWAARDEN]', '');\r\n dontRenderLabelAboveInput = true;\r\n linkAlgemeneVoorwaarden = (\r\n <>\r\n \r\n {ReactHtmlParser(this.props.formConfig.algemenevoorwaardenLinkTekst)}\r\n \r\n {isRequired ? \" *\" : \"\"}\r\n \r\n );\r\n } else {\r\n linkAlgemeneVoorwaarden = {isRequired ? \" *\" : \"\"};\r\n }\r\n \r\n return (\r\n
\r\n {((!dontRenderLabelAboveInput && \r\n label !== this.props.formFieldDefinition.label && \r\n this.props.formFieldDefinition.label != '') || \r\n (!!this.props.formFieldDefinition.hasPopover)) ? (\r\n \r\n ) : null}\r\n
\r\n \r\n \r\n {ReactHtmlParser(label)} {linkAlgemeneVoorwaarden}\r\n \r\n
\r\n {!this.state.hasFocus && FormControlHelpers.invalidFeedbackComponent(this)}\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport { Checkbox };\r\n","import * as React from 'react';\r\nimport InputMask from 'react-input-mask';\r\nimport { Slug } from '@fnv-core/utils';\r\nimport { FormControlProps } from '../interfaces/FormControlProps';\r\nimport { FormStylingHelpers } from './helpers/FormStylingHelpers';\r\nimport { FormControlHelpers } from './helpers/FormControlHelpers';\r\nimport { FormLabelHelpers } from './helpers/FormLabelHelpers';\r\nimport { KenticoValidatorUtils } from \"../kentico/KenticoUtils\";\r\nimport { LabelAndPopover } from './components/label-and-popover';\r\nimport { PropertyHelpers } from '../helpers/PropertyHelpers';\r\n\r\nexport interface MaskedInputState {\r\n dataSourceCounter: number;\r\n isLoading: boolean;\r\n isErrorLoading: boolean;\r\n hasFocus: boolean;\r\n}\r\n\r\nclass MaskedInput extends React.Component {\r\n constructor(props: FormControlProps) {\r\n super(props);\r\n\r\n this.state = {\r\n dataSourceCounter: 0,\r\n isLoading: false,\r\n isErrorLoading: false,\r\n hasFocus: false\r\n };\r\n }\r\n\r\n componentDidMount = () => {\r\n const value = this.props.field.value,\r\n formikBag = this.props.formikBag,\r\n formFieldDefinition = this.props.formFieldDefinition;\r\n \r\n if (value !== '') {\r\n formikBag.setFieldTouched(formFieldDefinition.name, true, true);\r\n }\r\n }\r\n\r\n onInputFocus = (event) => { \r\n this.setState({hasFocus : true});\r\n }\r\n\r\n onInputBlur = (event) => {\r\n if (event.persist) {\r\n event.persist();\r\n }\r\n this.setState({hasFocus : false}, () => {\r\n this.props.field.onBlur(event);\r\n });\r\n }\r\n\r\n render() {\r\n let formatChars = {\r\n '9': '[0-9]',\r\n a: '[A-Za-z]',\r\n '*': '[A-Za-z0-9]',\r\n '!': '[0-9_.,!\"/$()-{}%?+]'\r\n };\r\n\r\n let mask = this.props.formFieldDefinition.mask;\r\n const value = this.props.field.value;\r\n\r\n // check optional enableMaskConditions\r\n if (this.props.formFieldDefinition.enableMaskConditions !== undefined) {\r\n if (!this.props.formFieldDefinition.enableMaskConditions.kenticoMacroFunction(\r\n this.props.formController.form.fieldMapper, \r\n value, \r\n KenticoValidatorUtils)) {\r\n mask = \"\";\r\n }\r\n }\r\n\r\n const inputProperties = {\r\n // Input properties has everything needed to deal with manual input\r\n // It will load related data when a datasource is set\r\n ...FormControlHelpers.inputProperties(this),\r\n maskChar: null,\r\n formatChars,\r\n mask: mask,\r\n onFocus: this.onInputFocus,\r\n onBlur: this.onInputBlur,\r\n value: value,\r\n autoComplete: !!this.props.formFieldDefinition.disableAutoComplete ? \"off\" : \r\n this.props.formFieldDefinition.autoCompleteToken !== undefined ? this.props.formFieldDefinition.autoCompleteToken : \"\"\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n {!this.state.hasFocus && FormControlHelpers.invalidFeedbackComponent(this)}\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport { MaskedInput };\r\n","import * as React from \"react\";\r\nimport * as Moment from 'moment';\r\nimport * as $ from 'jquery';\r\nimport ReactHtmlParser from 'react-html-parser';\r\nimport { Slug } from '@fnv-core/utils';\r\nimport { FormControlProps } from \"../interfaces/FormControlProps\";\r\nimport { FormStylingHelpers } from './helpers/FormStylingHelpers';\r\nimport { FormFieldStateHelpers } from './helpers/FormFieldStateHelpers';\r\nimport { ComponentStoreHelpers } from './helpers/ComponentStoreHelpers';\r\nimport { FormControlHelpers } from './helpers/FormControlHelpers';\r\nimport { AjaxCallHelpers } from './helpers/AjaxCallHelpers';\r\n\r\nexport interface ReadonlyState {}\r\n\r\nclass ReadOnly extends React.Component {\r\n constructor(props : FormControlProps) {\r\n super(props);\r\n this.state = {\r\n\r\n }; \r\n }\r\n\r\n componentDidMount() {\r\n if (ComponentStoreHelpers.hasDatasource(this)) {\r\n ComponentStoreHelpers.setFormFieldData(this, []);\r\n ComponentStoreHelpers.getData(this);\r\n }\r\n\r\n if (!!this.props.formFieldDefinition.triggerDatasourceOnShow) {\r\n AjaxCallHelpers.getRelatedData(this as any, (parseFloat(this.props.field.value) || 0).toString());\r\n }\r\n }\r\n\r\n unmounted : boolean = false;\r\n componentWillUnmount() {\r\n this.unmounted = true;\r\n }\r\n\r\n render() {\r\n let result = FormFieldStateHelpers.getFieldState(this);\r\n if (!result.visible) {\r\n return <>;\r\n }\r\n \r\n if (this.props.formFieldDefinition.concatFields) {\r\n\r\n // render readonly form-controls for concatted fields \r\n let formDefinition = this.props.formController.props.formDefinitions[this.props.formController.props.formName];\r\n let concatLabel = FormControlHelpers.replaceBracketFieldsWithValues(this, this.props.formFieldDefinition.label);\r\n\r\n return
\r\n {!!this.props.formFieldDefinition.concatFieldShowLabel\r\n ? \r\n : \"\"} \r\n\r\n
\r\n \r\n {this.props.formFieldDefinition.concatFields.map((fieldName, index) => {\r\n let fieldDefinition;\r\n formDefinition.map((formFieldDefinition) => {\r\n if (formFieldDefinition.name == fieldName) {\r\n fieldDefinition = formFieldDefinition;\r\n }\r\n });\r\n if (fieldDefinition) {\r\n let doShowCharacterWhenEmpty = !!this.props.formFieldDefinition.doShowCharacterWhenEmpty;\r\n if (this.props.formFieldDefinition.showCharacterWhenEmpty && index < this.props.formFieldDefinition.showCharacterWhenEmpty.length) {\r\n doShowCharacterWhenEmpty = this.props.formFieldDefinition.showCharacterWhenEmpty[index];\r\n }\r\n return \r\n \r\n ;\r\n }\r\n return <>;\r\n }) \r\n }\r\n \r\n
\r\n
;\r\n }\r\n let label : string = FormControlHelpers.replaceBracketFieldsWithValues(this, this.props.formFieldDefinition.label);\r\n \r\n let fieldValue: string | number = this.props.field.value || \"\";\r\n let orgFieldValue = fieldValue;\r\n\r\n // workaround to prevent \"true\" or \"false\" being visible in forms\r\n // (happens with read-only checkboxes)\r\n if ((this.props.field.value as unknown) === true || (this.props.field.value as unknown) === \"true\") {\r\n fieldValue = \"Ja\";\r\n }\r\n\r\n if ((this.props.field.value as unknown) === false || (this.props.field.value as unknown) === \"false\" ||\r\n (this.props.formFieldDefinition.type === \"switch\" && (this.props.field.value as unknown) === \"\")) {\r\n fieldValue = \"Nee\";\r\n }\r\n\r\n if (this.props.field.value && this.props.field.value.label !== undefined) {\r\n fieldValue = this.props.field.value.label;\r\n }\r\n\r\n if (this.props.formFieldDefinition.isCalculatedField === true && \r\n this.props.formFieldDefinition.expression !== undefined) {\r\n let services : any = {};\r\n services.Moment = Moment;\r\n fieldValue = this.props.formFieldDefinition.expression(this.props.formikBag.values, services);\r\n }\r\n\r\n if (ComponentStoreHelpers.hasDatasource(this)) {\r\n const orgFieldValue = fieldValue;\r\n fieldValue = ComponentStoreHelpers.getValueData(this, fieldValue);\r\n this.props.formController.setPayload( ComponentStoreHelpers.getValueDataForPayload(this, orgFieldValue));\r\n } else {\r\n if (this.props.formFieldDefinition.options) {\r\n if (this.props.formFieldDefinition.valueoptions.indexOf(\"false\") >= 0) {\r\n if (fieldValue == \"\") {\r\n fieldValue = \"false\";\r\n }\r\n }\r\n\r\n const optionIndex = this.props.formFieldDefinition.valueoptions.indexOf(fieldValue.toString());\r\n if (optionIndex >= 0) {\r\n fieldValue = this.props.formFieldDefinition.options[optionIndex];\r\n }\r\n }\r\n }\r\n \r\n if (this.props.formFieldDefinition.format) {\r\n fieldValue = FormControlHelpers.replaceBracketFieldsWithValues(this, this.props.formFieldDefinition.format); \r\n } \r\n\r\n fieldValue = FormControlHelpers.convertValueToType(fieldValue, this.props.formFieldDefinition); \r\n\r\n if (fieldValue == \"\" && !this.props.formFieldDefinition.onlyRenderValue) {\r\n fieldValue = \"-\";\r\n }\r\n\r\n if (fieldValue == \"\" && this.props.formFieldDefinition.characterWhenEmpty !== \"\") {\r\n fieldValue = this.props.formFieldDefinition.characterWhenEmpty;\r\n }\r\n \r\n label = ReactHtmlParser(label);\r\n \r\n if (typeof fieldValue === 'string') {\r\n fieldValue = ReactHtmlParser(FormControlHelpers.replaceTaggedEmailAddressesWithoutTags(fieldValue));\r\n }\r\n\r\n let isParsedHtmlFieldValue : boolean = false;\r\n let containsHtmlTags: boolean = false;\r\n if (Array.isArray(fieldValue as any)) {\r\n isParsedHtmlFieldValue = true;\r\n let noDataSymbolAdded = false;\r\n fieldValue = (fieldValue as any).map((item) => {\r\n if (typeof item == \"string\") {\r\n if (!noDataSymbolAdded && $.trim(item) == \"\") {\r\n noDataSymbolAdded = true;\r\n return \"-\"; \r\n }\r\n } else {\r\n containsHtmlTags = true;\r\n }\r\n return item;\r\n });\r\n }\r\n\r\n // rendered by other wrapping ReadOnly form-control which creates ReadOnly form-controls by itself (for concatting form fields)\r\n if (!!this.props.formFieldDefinition.onlyRenderValue) {\r\n const content = <>{this.props.formFieldDefinition.prefix || \"\"}{fieldValue !== \"-\" && fieldValue}{fieldValue !== \"\" && fieldValue !== \"-\" && this.props.formFieldDefinition.postfix || \"\"};\r\n if (this.props.formFieldDefinition.cssClass && this.props.formFieldDefinition.cssClass !== \"\") {\r\n if (typeof orgFieldValue === 'string') {\r\n orgFieldValue = Slug.fromString(orgFieldValue);\r\n }\r\n return {content};\r\n }\r\n return <>{content};\r\n }\r\n\r\n // normal handling\r\n return <>\r\n
\r\n \r\n {(this.props.formFieldDefinition.explanation !== undefined && fieldValue !== \"\") || \r\n (this.props.formFieldDefinition.explanation === undefined) ?\r\n
\r\n {fieldValue}\r\n
: null}\r\n
\r\n
\r\n ;\r\n }\r\n}\r\n\r\nexport { ReadOnly };","\r\n\r\nimport * as React from \"react\";\r\nimport * as $ from 'jquery';\r\nimport { FormControlProps } from \"../interfaces/FormControlProps\";\r\nimport { Field } from 'formik';\r\n\r\nclass Hidden extends React.Component {\r\n constructor(props : FormControlProps) {\r\n super(props);\r\n }\r\n\r\n render() {\r\n return \r\n \r\n ;\r\n }\r\n}\r\n\r\nexport { Hidden };","import * as React from 'react';\r\nimport { Tokenizer } from '@fnv-core/tokens';\r\nimport { Slug } from '@fnv-core/utils';\r\nimport { FormControlProps } from '../interfaces/FormControlProps';\r\nimport { FormControlHelpers } from './helpers/FormControlHelpers';\r\nimport { LabelAndPopover } from './components/label-and-popover';\r\nimport { PropertyHelpers } from '../helpers/PropertyHelpers';\r\nimport { FormLabelHelpers } from \"./helpers/FormLabelHelpers\";\r\n\r\nclass LinkField extends React.Component {\r\n constructor(props: FormControlProps) {\r\n super(props);\r\n }\r\n\r\n getLinkElements(field: any) {\r\n let fieldValue: string = field.value != null ? field.value : \"\";\r\n\r\n let format = this.props.formFieldDefinition.defaultValue != \"\" ? this.props.formFieldDefinition.defaultValue : \"{0}\"; \r\n\r\n let formatParts = format.split('|');\r\n\r\n if (fieldValue == '') {\r\n fieldValue = ' ';\r\n }\r\n\r\n let link: string = '';\r\n let linkText: string = '';\r\n if (formatParts.length >= 2) {\r\n link = formatParts[1];\r\n linkText = formatParts[0];\r\n }\r\n if (formatParts.length == 1) {\r\n link = formatParts[0];\r\n linkText = formatParts[0];\r\n }\r\n\r\n link = Tokenizer.replaceTokens(link, [fieldValue]);\r\n linkText = Tokenizer.replaceTokens(linkText, [fieldValue]);\r\n\r\n link = FormControlHelpers.replaceBracketFieldsWithValues(this, link);\r\n linkText = FormControlHelpers.replaceBracketFieldsWithValues(this, linkText);\r\n\r\n return {\r\n link: link,\r\n linkText: linkText\r\n };\r\n }\r\n\r\n render() {\r\n let { link, linkText } = this.getLinkElements(this.props.field);\r\n let additionalCssClass = \"\";\r\n if (this.props.formFieldDefinition.fieldCssClass !== undefined) {\r\n additionalCssClass += \" \" + this.props.formFieldDefinition.fieldCssClass;\r\n }\r\n return (\r\n
\r\n \r\n
\r\n {linkText}\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport { LinkField };\r\n","import * as React from 'react';\r\n\r\nimport { Slug } from '@fnv-core/utils';\r\nimport { FormControlProps } from '../interfaces/FormControlProps';\r\n\r\nimport { FormStylingHelpers } from './helpers/FormStylingHelpers';\r\nimport { FormLabelHelpers } from './helpers/FormLabelHelpers';\r\nimport { PropertyHelpers } from '../helpers/PropertyHelpers';\r\nimport { FormControlHelpers } from './helpers/FormControlHelpers';\r\nimport { InputState } from './Input';\r\nimport { LabelAndPopover } from './components/label-and-popover';\r\n\r\nclass PasswordInput extends React.Component {\r\n constructor(props: FormControlProps) {\r\n super(props);\r\n this.state = {\r\n dataSourceCounter: 0,\r\n timer: undefined,\r\n isLoading: false,\r\n isButtonClicked: false,\r\n isErrorLoading : false,\r\n hasFocus: false\r\n };\r\n }\r\n\r\n render() {\r\n const inputProperties = {\r\n // Input properties has everything needed to deal with manual input\r\n // It will load related data when a datasource is set\r\n ...FormControlHelpers.inputProperties(this)\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n {FormControlHelpers.invalidFeedbackComponent(this)}\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport { PasswordInput };\r\n","import * as React from 'react';\r\n\r\nimport { Slug } from '@fnv-core/utils';\r\n\r\nimport { FormControlProps } from '../interfaces/FormControlProps';\r\n\r\nimport { FormStylingHelpers } from './helpers/FormStylingHelpers';\r\nimport { FormLabelHelpers } from './helpers/FormLabelHelpers';\r\nimport { PropertyHelpers } from '../helpers/PropertyHelpers';\r\nimport { FormControlHelpers } from './helpers/FormControlHelpers';\r\nimport { LabelAndPopover } from './components/label-and-popover';\r\nimport { getResourceString } from '../kentico/resource-strings';\r\nimport { StringHelpers } from '../helpers/StringHelpers';\r\n\r\nexport interface InputState {\r\n dataSourceCounter: number;\r\n timer: any;\r\n rows: number;\r\n minRows: number;\r\n maxRows: number;\r\n isLoading: boolean;\r\n hasFocus: boolean;\r\n}\r\n\r\nexport class Textarea extends React.Component {\r\n constructor(props: FormControlProps) {\r\n super(props);\r\n this.textarea = React.createRef();\r\n }\r\n\r\n state = {\r\n dataSourceCounter: 0,\r\n timer: undefined,\r\n rows: 2,\r\n minRows: 2,\r\n maxRows: 100,\r\n isLoading: false,\r\n hasFocus: false\r\n };\r\n\r\n textarea: any;\r\n\r\n componentDidMount() {\r\n this.calculateTextareaHeight();\r\n }\r\n\r\n calculateTextareaHeight = () => {\r\n if (this.textarea && this.textarea.current) {\r\n const textareaLineHeight = 24;\r\n const { minRows, maxRows } = this.state;\r\n \r\n const previousRows = this.textarea.current.rows;\r\n this.textarea.current.rows = minRows; \r\n \r\n const currentRows = Math.floor(this.textarea.current.scrollHeight / textareaLineHeight);\r\n if (currentRows === previousRows) {\r\n this.textarea.current.rows = currentRows;\r\n }\r\n \r\n if (currentRows >= maxRows) {\r\n this.textarea.current.rows = maxRows;\r\n this.textarea.current.scrollTop = this.textarea.current.scrollHeight;\r\n }\r\n \r\n this.setState({ \r\n rows: currentRows < maxRows ? currentRows : maxRows,\r\n }); \r\n }\r\n }\r\n\r\n handleChange = (event) => {\r\n event.persist();\r\n this.calculateTextareaHeight();\r\n FormControlHelpers.inputProperties(this).onChange(event);\r\n }\r\n\r\n onInputFocus = (event) => { \r\n this.setState({hasFocus : true});\r\n }\r\n\r\n onInputBlur = (event) => {\r\n if (event.persist) {\r\n event.persist();\r\n }\r\n this.setState({hasFocus : false}, () => {\r\n this.props.field.onBlur(event);\r\n });\r\n }\r\n\r\n private getTextAreaValueAndNewLines = () => {\r\n let textAreaValue = this.props.field.value;\r\n let newLines = textAreaValue.match(/(\\r\\n|\\n|\\r)/g);\r\n let addition = newLines !== null ? newLines.length : 0;\r\n return { textAreaValue, addition };\r\n }\r\n \r\n render() {\r\n const inputProperties = {\r\n // Input properties has everything needed to deal with manual input\r\n // It will load related data when a datasource is set\r\n ...FormControlHelpers.inputProperties(this)\r\n };\r\n \r\n const maxLength = PropertyHelpers.getMaxLength(this.props, 500);\r\n \r\n //Some browsers counts new lines as 2, we need to check for new lines in the text area value and add it to the length. \r\n let { textAreaValue, addition } = this.getTextAreaValueAndNewLines();\r\n \r\n const data = {\r\n count: (textAreaValue || \"\").length + addition,\r\n maxchars : maxLength\r\n };\r\n \r\n let textAreaMaxLength = maxLength - addition;\r\n const disabled = !!this.props.formFieldDefinition.readOnly;\r\n const textAreaHint = StringHelpers.replacePropertiesInString(getResourceString(\"Form.Textarea.Hint\"), data, true);\r\n\r\n return (\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n {textAreaHint}\r\n
\r\n {!this.state.hasFocus && FormControlHelpers.invalidFeedbackComponent(this)}\r\n
\r\n
\r\n );\r\n }\r\n}","import * as React from 'react';\r\nimport { Link } from 'react-router-dom';\r\nimport { Tokenizer } from '@fnv-core/tokens';\r\nimport { Slug } from '@fnv-core/utils';\r\nimport { MijnFNVPageContext } from '../presentational/pages/helpers/MijnFNVPageContext';\r\nimport { FormControlProps } from '../interfaces/FormControlProps';\r\nimport { FormControlHelpers } from './helpers/FormControlHelpers';\r\nimport { ComponentStoreHelpers, IOption } from './helpers/ComponentStoreHelpers';\r\nimport { FormLabelHelpers } from './helpers/FormLabelHelpers';\r\nimport { LabelAndPopover } from './components/label-and-popover';\r\nimport { PropertyHelpers } from '../helpers/PropertyHelpers';\r\n\r\nclass StyledLinkBlocks extends React.Component {\r\n constructor(props: FormControlProps) {\r\n super(props); \r\n }\r\n\r\n componentDidMount() {\r\n if (ComponentStoreHelpers.hasDatasource(this)) {\r\n ComponentStoreHelpers.setFormFieldData(this, []);\r\n ComponentStoreHelpers.getData(this);\r\n }\r\n }\r\n\r\n unmounted : boolean = false;\r\n componentWillUnmount() {\r\n this.unmounted = true;\r\n }\r\n\r\n getUrlWithId = (url) => {\r\n return Tokenizer.replaceTokens(url, [this.context.pathParam || '']);\r\n }\r\n\r\n render() {\r\n function getId(component: React.Component, option: IOption) {\r\n return `${component.props.formFieldDefinition.name}-${option.value}`;\r\n }\r\n\r\n const fieldProperties = {\r\n ...FormControlHelpers.baseProperties(this),\r\n ...FormControlHelpers.onChangeSetValueViaEvent(this),\r\n onBlur: this.props.field.onBlur\r\n };\r\n\r\n const options = ComponentStoreHelpers.getListData(this);\r\n\r\n return (\r\n
\r\n \r\n
\r\n {options.map((option: IOption, index: number) => {\r\n return (\r\n \r\n \r\n \r\n {option.label}\r\n \r\n \r\n
\r\n );\r\n })}\r\n
\r\n \r\n );\r\n }\r\n}\r\nStyledLinkBlocks.contextType = MijnFNVPageContext;\r\n\r\nexport { StyledLinkBlocks };\r\n","import * as React from 'react';\r\n\r\nimport { Slug } from '@fnv-core/utils';\r\n\r\nimport { FormControlProps } from '../interfaces/FormControlProps';\r\n\r\nimport { FormStylingHelpers } from './helpers/FormStylingHelpers';\r\nimport { FormLabelHelpers } from './helpers/FormLabelHelpers';\r\nimport { PropertyHelpers } from '../helpers/PropertyHelpers';\r\nimport { FormControlHelpers } from './helpers/FormControlHelpers';\r\nimport { Editor } from '@tinymce/tinymce-react';\r\nimport ReactHtmlParser from 'react-html-parser';\r\n\r\nexport interface RichTextState {\r\n content: string;\r\n}\r\n\r\nexport class RichTextEditor extends React.Component {\r\n constructor(props: FormControlProps) {\r\n super(props);\r\n this.handleEditorChange = this.handleEditorChange.bind(this);\r\n }\r\n\r\n state = {\r\n content: ''\r\n };\r\n\r\n componentDidMount() {\r\n this.setState({content: this.props.field.value});\r\n }\r\n\r\n handleEditorChange(content, editor) {\r\n this.setState({ content }, () => {\r\n this.props.formikBag.setFieldError(this.props.formFieldDefinition.name, '');\r\n this.props.formikBag.setFieldValue(this.props.formFieldDefinition.name, content);\r\n this.props.formikBag.setFieldTouched(\r\n this.props.formFieldDefinition.name,\r\n true,\r\n true\r\n );\r\n });\r\n }\r\n \r\n render() { \r\n const labelProps = {\r\n htmlFor: PropertyHelpers.getFieldID(this.props),\r\n title: FormLabelHelpers.getFieldLabel(this)\r\n };\r\n return (\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n {FormControlHelpers.invalidFeedbackComponent(this)}\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\n","import * as React from 'react';\r\n\r\nimport { Slug } from '@fnv-core/utils';\r\nimport { FormControlProps } from '../interfaces/FormControlProps';\r\nimport { FormStylingHelpers } from './helpers/FormStylingHelpers';\r\nimport { FormLabelHelpers } from './helpers/FormLabelHelpers';\r\nimport { PropertyHelpers } from '../helpers/PropertyHelpers';\r\nimport { FormControlHelpers } from './helpers/FormControlHelpers';\r\nimport ReactHtmlParser from 'react-html-parser';\r\nimport { FileNameHelpers } from '../helpers/FileNameHelpers';\r\nimport { LabelAndPopover } from './components/label-and-popover';\r\n\r\nexport interface FileUploadState {\r\n dataSourceCounter: number;\r\n timer: any;\r\n showPopoverText : boolean;\r\n fileName: string;\r\n hasFocus: boolean;\r\n resetFocus: boolean;\r\n}\r\n\r\nclass FileUpload extends React.Component {\r\n constructor(props: FormControlProps) {\r\n super(props);\r\n this.fileUploadInputRef = React.createRef();\r\n this.state = {\r\n dataSourceCounter: 0,\r\n timer: undefined,\r\n showPopoverText: false,\r\n fileName: \"\",\r\n hasFocus: false,\r\n resetFocus: false\r\n };\r\n }\r\n\r\n fileUploadInputRef = undefined;\r\n unmounted = false;\r\n\r\n componentDidMount() {\r\n \r\n let inputProperties = {\r\n // Input properties has everything needed to deal with manual input\r\n // It will load related data when a datasource is set\r\n ...FormControlHelpers.inputProperties(this)\r\n };\r\n\r\n // restore uploaded file\r\n if (this.props.field.value) { \r\n if (typeof this.props.field.value === \"string\") {\r\n let fileName = this.props.field.value || \"\";\r\n this.setState({fileName : fileName}, () => {\r\n this.props.formikBag.setFieldValue(this.props.formFieldDefinition.name, fileName);\r\n });\r\n } else\r\n if (this.props.field.value && this.props.field.value.name) {\r\n let fileName = this.props.field.value.name || \"\";\r\n this.setState({fileName : fileName}, () => {\r\n this.props.formikBag.setFieldValue(this.props.formFieldDefinition.name, this.props.field.value);\r\n });\r\n }\r\n } else\r\n if (inputProperties.value && (inputProperties.value as any).name) {\r\n this.setState({fileName : (inputProperties.value as any).name}, () => {\r\n this.props.formikBag.setFieldValue(this.props.formFieldDefinition.name, inputProperties.value);\r\n });\r\n } else {\r\n if (this.fileUploadInputRef) { \r\n this.fileUploadInputRef.value = null;\r\n }\r\n this.setState({fileName : \"\"}, () => {\r\n this.props.formikBag.setFieldValue(this.props.formFieldDefinition.name, \"\");\r\n });\r\n }\r\n }\r\n\r\n componentWillUnmount() {\r\n this.unmounted = true;\r\n this.removeFocusEventHandler();\r\n }\r\n\r\n componentDidUpdate() { \r\n let resetFocusHelper : any = {};\r\n if (this.state.resetFocus) {\r\n resetFocusHelper.hasFocus = false;\r\n resetFocusHelper.resetFocus = false;\r\n }\r\n\r\n if (typeof this.props.field.value === \"string\" && this.props.field.value !== this.state.fileName) {\r\n let fileName = this.props.field.value || \"\"; \r\n this.setState({...resetFocusHelper, fileName : fileName});\r\n } else\r\n if (this.props.field.value && this.props.field.value.name && this.props.field.value.name !== this.state.fileName) {\r\n let fileName = this.props.field.value.name || \"\";\r\n this.setState({...resetFocusHelper, fileName : fileName});\r\n } else if (!!this.state.resetFocus) {\r\n this.setState({...resetFocusHelper});\r\n }\r\n }\r\n\r\n showPopoverText = (event) => {\r\n event.preventDefault();\r\n this.setState({showPopoverText: !this.state.showPopoverText});\r\n return false;\r\n }\r\n\r\n removeFile = (event) => {\r\n event.preventDefault();\r\n this.removeFocusEventHandler();\r\n this.setState({fileName: \"\", hasFocus: false, resetFocus: false}, () => {\r\n if (this.fileUploadInputRef) {\r\n this.fileUploadInputRef.value = null;\r\n }\r\n this.props.formikBag.setFieldValue(this.props.formFieldDefinition.name, \"\"); \r\n }); \r\n return false;\r\n }\r\n\r\n onInputFocus = (event) => { \r\n this.setState({hasFocus : true});\r\n }\r\n\r\n onInputClick = (event) => { \r\n this.resetFocusWasRequestedFromBodyFocus = false; \r\n this.setState({hasFocus : true});\r\n document.body.addEventListener(\"focus\" , this.onBodyFocus, true);\r\n } \r\n \r\n timeoutOnBodyFocus : any = undefined;\r\n resetFocusWasRequestedFromBodyFocus: boolean = false;\r\n\r\n onBodyFocus = (event) => {\r\n this.resetFocusWasRequestedFromBodyFocus = true;\r\n\r\n // hacky construct, but we need workaround to catch \"cancel filedialog\", since there's no out of the box browser event for this\r\n // the onFocus on the document.body is set up before the filedialog is opened\r\n // It is also triggered in the onChange of the file input (onChange is not triggered when the filedialog is canceled)\r\n // onFocus on the body is fired before the onChange event fires, so we need a way to circumvent this. \r\n // In the small chance that the timeout is too short, then the user will see an error message flashing that no file is selected.\r\n // This code tries to prevent that as good as it can\r\n this.timeoutOnBodyFocus = setTimeout(() => {\r\n if (!this.unmounted) { \r\n this.resetFocusWasRequestedFromBodyFocus = false;\r\n this.setState({resetFocus : true});\r\n }\r\n }, 750); \r\n\r\n document.body.removeEventListener(\"focus\" , this.onBodyFocus, true);\r\n }\r\n\r\n checkNeedsFocusReset = () => {\r\n if (this.resetFocusWasRequestedFromBodyFocus) {\r\n this.resetFocus();\r\n }\r\n }\r\n\r\n resetFocus = () => {\r\n this.setState({hasFocus : false});\r\n }\r\n\r\n removeFocusEventHandler = () => {\r\n this.resetFocusWasRequestedFromBodyFocus = false;\r\n document.body.removeEventListener(\"focus\" , this.onBodyFocus, true);\r\n if (this.timeoutOnBodyFocus) {\r\n clearTimeout(this.timeoutOnBodyFocus);\r\n this.timeoutOnBodyFocus = undefined;\r\n }\r\n }\r\n\r\n onInputChange = (event) => {\r\n this.checkNeedsFocusReset();\r\n this.removeFocusEventHandler();\r\n if (!event.target.files) {\r\n this.setState({\r\n hasFocus: false\r\n });\r\n return false;\r\n }\r\n this.setState({\r\n fileName: event.currentTarget.files[0].name, \r\n hasFocus: false\r\n });\r\n return true;\r\n }\r\n\r\n render() {\r\n let inputProperties = {\r\n // Input properties has everything needed to deal with manual input\r\n // It will load related data when a datasource is set\r\n ...FormControlHelpers.inputProperties(this)\r\n }; \r\n\r\n // remove value property to prevent errors specific to file-upload dom input element\r\n // (it causes javascript errors when uploading file)\r\n delete inputProperties.value;\r\n\r\n const fileNameExtensionImage = FileNameHelpers.getFileAttachmentImage(this.state.fileName);\r\n const fileNameExtension = FileNameHelpers.getFileNameExtensionUppercase(this.state.fileName);\r\n return (\r\n <>\r\n
\r\n {this.state.fileName === \"\" && }\r\n
\r\n {this.fileUploadInputRef = ref; } }\r\n maxLength={PropertyHelpers.getMaxLength(this.props, 250)}\r\n type=\"file\"\r\n className={FormStylingHelpers.getInputStyle(this)}\r\n onClick={this.onInputClick} \r\n />\r\n
\r\n {fileNameExtensionImage !== \"\" && \r\n {fileNameExtension}\r\n \r\n }\r\n {this.state.fileName}\r\n {this.state.fileName !== \"\" && }\r\n
\r\n
\r\n {this.props.formFieldDefinition.hasPopover === undefined && \r\n this.props.formFieldDefinition.explanation && \r\n this.props.formFieldDefinition.explanation !== \"\" ? {ReactHtmlParser(this.props.formFieldDefinition.explanation)} : null}\r\n
\r\n {!this.state.hasFocus && FormControlHelpers.invalidFeedbackComponent(this)}\r\n
\r\n \r\n );\r\n }\r\n}\r\n\r\nexport { FileUpload };\r\n","import * as React from 'react';\r\nimport DatePicker, { registerLocale } from 'react-datepicker';\r\nimport nl from 'date-fns/esm/locale/nl';\r\nimport * as Moment from 'moment';\r\nimport { DateFormatter } from '@fnv-core/formatting/date';\r\nimport { DateParser } from '@fnv-core/parsing';\r\nimport { isAndroid, isIE11, isIOS, Slug } from '@fnv-core/utils';\r\nimport { FormControlProps } from \"../interfaces/FormControlProps\";\r\nimport { FormFieldStateHelpers } from \"./helpers/FormFieldStateHelpers\";\r\nimport { FormStylingHelpers } from \"./helpers/FormStylingHelpers\";\r\nimport { FormControlHelpers } from \"./helpers/FormControlHelpers\";\r\nimport { FormLabelHelpers } from \"./helpers/FormLabelHelpers\";\r\nimport { InputState } from \"./Input\";\r\nimport { StringHelpers } from \"../helpers/StringHelpers\";\r\nimport { ComponentStoreHelpers } from './helpers/ComponentStoreHelpers';\r\nimport { AjaxCallHelpers } from './helpers/AjaxCallHelpers';\r\nimport { LabelAndPopover } from './components/label-and-popover';\r\nimport { PropertyHelpers } from '../helpers/PropertyHelpers';\r\nimport { DatasourceLoaderStateService } from '../services/DatasourceLoaderStateService';\r\n\r\nregisterLocale(\"nl\", nl);\r\nlet culture : string = (window as any).currentCultureCode || \"\";\r\nlet importCulture = false;\r\nif (culture.indexOf(\"en\") == 0) {\r\n culture = \"en-US\";\r\n importCulture = true;\r\n\r\n} else if (culture.indexOf(\"-\") == 2) {\r\n culture = culture.substr(0, 2);\r\n importCulture = true;\r\n}\r\n\r\nif (importCulture) {\r\n import(\"date-fns/esm/locale\").then(module => {\r\n if (module[culture]) { \r\n registerLocale(culture, module[culture]);\r\n }\r\n });\r\n}\r\n\r\nexport interface MaskedInputState {\r\n dataSourceCounter: number;\r\n timer: any;\r\n includeDates: any[];\r\n showMessageIfNoOptions : string;\r\n isLoading: boolean;\r\n hasFocus: boolean;\r\n}\r\n\r\nexport interface DateTimePickerInputProps {\r\n name?: string;\r\n value?: string;\r\n onChange?: any;\r\n onBlur? : any;\r\n onFocus? : any;\r\n className? : string;\r\n\r\n datetimepicker : any;\r\n field : any;\r\n changeHandlerMode: string;\r\n}\r\n\r\nclass DateTimePickerInput extends React.Component<\r\n DateTimePickerInputProps\r\n> {\r\n constructor(props) {\r\n super(props);\r\n this.input = React.createRef(); \r\n }\r\n\r\n input: any;\r\n\r\n closedDatePickerWhenOnIos = false;\r\n\r\n componentDidMount() {\r\n \r\n // only on android scroll input to the top to prevent datepicker appearing below\r\n // the keyboard (on iOS the native datepicker is used, so this isn't needed)\r\n if (isAndroid()) {\r\n if (this.input && this.input.current) {\r\n this.input.current.scrollIntoView({\r\n behavior: \"smooth\",\r\n block: \"start\",\r\n inline: \"start\"\r\n });\r\n }\r\n }\r\n }\r\n \r\n handleKeyDown = (event) => {\r\n \r\n if (event.key === 'Enter') {\r\n event.preventDefault();\r\n \r\n const proxyEvent = {...event, target: {\r\n ...event.target, \r\n id: this.props.field.name, \r\n name: this.props.field.name,\r\n value: this.props.value\r\n }\r\n };\r\n\r\n if (this.props.changeHandlerMode == \"input\") {\r\n this.props.onChange(this.props.value, proxyEvent);\r\n } else {\r\n this.props.onChange(proxyEvent);\r\n }\r\n\r\n this.props.onBlur(event);\r\n\r\n if (this.props.datetimepicker && this.props.datetimepicker.current) {\r\n this.props.datetimepicker.current.setOpen(false);\r\n }\r\n \r\n this.props.field.onBlur(proxyEvent);\r\n this.input.current.blur();\r\n // fix to fool edge\r\n // todo : rewrite to vanilla JS\r\n $(\"[name=_\" + this.props.name + \"]\").focus();\r\n $(\"[name=_\" + this.props.name + \"]\").blur();\r\n return false;\r\n }\r\n } \r\n\r\n render() {\r\n const iOS = isIOS();\r\n let props = {...this.props};\r\n delete props.changeHandlerMode;\r\n return (\r\n <>\r\n
\r\n \r\n
\r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nclass DatePickerControl extends React.Component<\r\n FormControlProps,\r\n MaskedInputState\r\n> {\r\n constructor(props: FormControlProps) {\r\n super(props);\r\n this.container = React.createRef();\r\n this.datetimepicker = React.createRef();\r\n this.state = {\r\n dataSourceCounter: 0,\r\n includeDates: undefined,\r\n timer: undefined,\r\n showMessageIfNoOptions: \"\",\r\n isLoading: false,\r\n hasFocus: false\r\n };\r\n }\r\n\r\n container: any;\r\n datetimepicker: any;\r\n\r\n initDatepicker = () => {\r\n if (ComponentStoreHelpers.hasDatasource(this)) { \r\n ComponentStoreHelpers.getData(this).then((returnData) => {\r\n if (this.unmounted) {\r\n return;\r\n }\r\n if (returnData) {\r\n let includeDates = [];\r\n (returnData as []).map((dateItem : any, index) => {\r\n includeDates.push(new Date(dateItem.Date));\r\n });\r\n\r\n let showMessageIfNoOptions = \"\";\r\n if (includeDates.length == 0) {\r\n if (this.props.formFieldDefinition.showMessageIfNoOptions && \r\n this.props.formFieldDefinition.showMessageIfNoOptions !== \"\") {\r\n DatasourceLoaderStateService.resetLoadingCounter();\r\n showMessageIfNoOptions = this.props.formFieldDefinition.showMessageIfNoOptions;\r\n }\r\n }\r\n\r\n this.setState({includeDates : includeDates, showMessageIfNoOptions : showMessageIfNoOptions}, () => {\r\n if (!!this.props.formFieldDefinition.autoSetUsingDatasource && \r\n !this.props.field.value) {\r\n if (includeDates.length > 0) { \r\n const nlDate = this.getDateAsNlDate(includeDates[0]);\r\n\r\n FormFieldStateHelpers.updateFormikField((this as unknown as React.Component) , nlDate);\r\n if (this.props.formFieldDefinition.isDependentField) { \r\n //this.props.formikBag.setFieldValue(this.props.formFieldDefinition.name, nlDate);\r\n setTimeout(() => {\r\n this.props.formController.setState({[this.props.formFieldDefinition.name]: nlDate});\r\n }, 10);\r\n } \r\n \r\n }\r\n }\r\n });\r\n } else {\r\n if (this.props.formFieldDefinition.showMessageIfNoOptions && \r\n this.props.formFieldDefinition.showMessageIfNoOptions !== \"\") {\r\n this.setState({showMessageIfNoOptions : this.props.formFieldDefinition.showMessageIfNoOptions});\r\n }\r\n }\r\n });\r\n }\r\n }\r\n\r\n componentDidMount() {\r\n this.initDatepicker();\r\n }\r\n\r\n unmounted : boolean = false;\r\n\r\n componentWillUnmount() {\r\n this.unmounted = true;\r\n }\r\n\r\n componentDidUpdate(prevProps: any) {\r\n let triggerGetDatasource = (this.props.form && JSON.stringify(this.props.form.values) != JSON.stringify(prevProps.form.values));\r\n\r\n if (Array.isArray(this.props.formFieldDefinition.dependentOnField)) {\r\n this.props.formFieldDefinition.dependentOnField.map(dependentField => {\r\n let dependentValue = this.props.formikBag.values[dependentField];\r\n if (dependentValue && (dependentValue as any).value) {\r\n dependentValue = (dependentValue as any).value;\r\n }\r\n\r\n if (prevProps && prevProps.formikBag && prevProps.formikBag.values) {\r\n let prevDependentValue = prevProps.formikBag.values[dependentField];\r\n if (prevDependentValue && (prevDependentValue as any).value) {\r\n prevDependentValue = (prevDependentValue as any).value;\r\n }\r\n\r\n if (dependentValue != prevDependentValue) {\r\n triggerGetDatasource = true;\r\n }\r\n } else {\r\n triggerGetDatasource = true;\r\n }\r\n });\r\n }\r\n\r\n if (triggerGetDatasource) {\r\n this.initDatepicker();\r\n }\r\n }\r\n\r\n shouldComponentUpdate(nextProps: FormControlProps, nextState: MaskedInputState) : boolean {\r\n /*\r\n check here component needs to update component\r\n depending if form values changed that are listed in dependentOnField array/string\r\n (check nextProps.formikBag.values vs props.formikBag.values)\r\n */\r\n let triggerGetDatasource = false;\r\n if (Array.isArray(this.props.formFieldDefinition.dependentOnField)) {\r\n this.props.formFieldDefinition.dependentOnField.map(dependentField => {\r\n\r\n if (nextProps && nextProps.formikBag && nextProps.formikBag.values) {\r\n let dependentValue = nextProps.formikBag.values[dependentField];\r\n if (dependentValue && (dependentValue as any).value) {\r\n dependentValue = (dependentValue as any).value;\r\n }\r\n\r\n if (this.props && this.props.formikBag && this.props.formikBag.values) {\r\n let prevDependentValue = this.props.formikBag.values[dependentField];\r\n if (prevDependentValue && (prevDependentValue as any).value) {\r\n prevDependentValue = (prevDependentValue as any).value;\r\n }\r\n\r\n if (dependentValue != prevDependentValue) {\r\n triggerGetDatasource = true;\r\n }\r\n } else {\r\n triggerGetDatasource = true;\r\n }\r\n } else {\r\n triggerGetDatasource = true;\r\n }\r\n \r\n });\r\n }\r\n\r\n const fieldName: string = this.props.formFieldDefinition.name;\r\n // TODO: can they be different?\r\n const nextFieldName: string = nextProps.formFieldDefinition.name;\r\n\r\n let datasourceDiffers = false;\r\n if (this.props.formFieldDefinition.datasource) {\r\n datasourceDiffers = this.state[this.props.formFieldDefinition.datasource] != nextState[this.props.formFieldDefinition.datasource];\r\n }\r\n\r\n let currentError = \"\";\r\n if (this.props.form && this.props.form.errors &&\r\n this.props.form.errors[fieldName]) {\r\n currentError = this.props.form.errors[fieldName];\r\n }\r\n let nextError = \"\";\r\n if (nextProps.form && nextProps.form.errors && \r\n nextProps.form.errors[nextFieldName]) {\r\n nextError = nextProps.form.errors[nextFieldName];\r\n }\r\n\r\n let currentTouched = false;\r\n if (this.props.form && this.props.form.touched &&\r\n this.props.form.touched[fieldName]) {\r\n currentTouched = this.props.form.touched[fieldName];\r\n }\r\n let nextTouched = false;\r\n if (nextProps.form && nextProps.form.touched && \r\n nextProps.form.touched[nextFieldName]) {\r\n nextTouched = nextProps.form.touched[nextFieldName];\r\n }\r\n\r\n let result = datasourceDiffers ||\r\n (nextState.showMessageIfNoOptions != this.state.showMessageIfNoOptions) ||\r\n (this.props.form && JSON.stringify(this.props.form.values) != JSON.stringify(nextProps.form.values)) ||\r\n this.state.includeDates != nextState.includeDates ||\r\n this.state.hasFocus != nextState.hasFocus ||\r\n this.state.dataSourceCounter != nextState.dataSourceCounter ||\r\n triggerGetDatasource || \r\n (nextProps.field.value != this.props.field.value) ||\r\n (currentError != nextError) ||\r\n (currentTouched != nextTouched) ||\r\n (nextProps.formikBag.values[fieldName] != this.props.formikBag.values[fieldName]);\r\n\r\n return result;\r\n }\r\n\r\n getDateAsJSDate = value => {\r\n if(this.props.formFieldDefinition.dataType === \"date\"){\r\n return new DateParser().parse(value);\r\n }\r\n return value;\r\n }\r\n\r\n getDateAsIsoDate = value => {\r\n if(this.props.formFieldDefinition.dataType === \"date\"){\r\n return new DateFormatter().format(value, {format: 'YYYY-MM-DD'});\r\n }\r\n }\r\n\r\n getDateAsNlDate = value => {\r\n if (this.props.formFieldDefinition.dataType === \"date\") {\r\n value = StringHelpers.convertDateToNL(value);\r\n }\r\n return value;\r\n }\r\n\r\n handleChange = (date, event) => {\r\n\r\n if (date === null || date === undefined) { \r\n return;\r\n }\r\n\r\n if (event && event.persist) {\r\n event.persist();\r\n }\r\n\r\n if (event === null || event === undefined) {\r\n event = {};\r\n }\r\n \r\n const dateToUse = StringHelpers.isString(date) || StringHelpers.isDate(date) ? date : (date.target ? date.target.value : \"\");\r\n const eventToUse = StringHelpers.isString(date) || StringHelpers.isDate(date) ? event : date;\r\n \r\n if (eventToUse.persist) {\r\n eventToUse.persist();\r\n }\r\n\r\n const nlDate = this.getDateAsNlDate(dateToUse);\r\n\r\n FormFieldStateHelpers.updateFormikField(\r\n (this as unknown) as React.Component,\r\n nlDate == \"Invalid date\" ? dateToUse : nlDate\r\n );\r\n\r\n if (this.props.field.onBlur) { \r\n let newEvent : any = {};\r\n\r\n newEvent.target = {};\r\n newEvent.target.id = this.props.field.name;\r\n newEvent.target.name = this.props.field.name;\r\n\r\n this.props.field.onBlur(newEvent);\r\n }\r\n\r\n if (this.props.formFieldDefinition.isDependentField) { \r\n this.props.formController.setState({[this.props.formFieldDefinition.name]: nlDate == \"Invalid date\" ? dateToUse : nlDate});\r\n }\r\n\r\n\r\n if (this.props.formFieldDefinition.triggerDatasource) {\r\n // Known issue: formik setFieldValue is async. By using a time out, we work around this.\r\n setTimeout(() => {\r\n if (FormControlHelpers.isValid(this)) {\r\n // Only get data when input is valid\r\n AjaxCallHelpers.getRelatedData(this as any, nlDate == \"Invalid date\" ? dateToUse : nlDate);\r\n }\r\n }, 1);\r\n }\r\n }\r\n \r\n onInputFocus = (event) => { \r\n this.setState({hasFocus : true});\r\n }\r\n\r\n onInputBlur = (event) => {\r\n if (event.persist) {\r\n event.persist();\r\n }\r\n this.setState({hasFocus : false}, () => {\r\n this.props.field.onBlur(event);\r\n });\r\n }\r\n\r\n render() { \r\n if (this.state.showMessageIfNoOptions !== \"\") {\r\n return <>\r\n \r\n {FormControlHelpers.invalidFeedbackComponent(this)}\r\n ;\r\n }\r\n\r\n return (\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n {!this.state.hasFocus && FormControlHelpers.invalidFeedbackComponent(this)}\r\n
\r\n \r\n );\r\n }\r\n}\r\n\r\nexport { DatePickerControl };\r\n","import { Api } from '@fnv-core/http';\r\nimport {\r\n AppointmentType,\r\n RegionalOfficeModel,\r\n LocationFilter,\r\n} from './interfaces';\r\nimport { IApiOptions } from '@fnv-core/http/interfaces';\r\nimport { addQueryParameters, IQueryParam, StringUtil } from '@fnv-core/utils';\r\nimport _ from 'lodash';\r\n\r\nexport class AppointmentPlannerService {\r\n private static baseApiUrl = '/api';\r\n private static defaultApiOptions: IApiOptions = { cache: true };\r\n\r\n // Returns an array of locations for a given appointmentType\r\n public static async getLocations(locationFilter: LocationFilter) {\r\n let url = `${this.baseApiUrl}/regiokantoor/getalloffices`;\r\n\r\n if (locationFilter.address !== undefined) {\r\n url = `${this.baseApiUrl}/regiokantoor/nearbyregionalofficesbyaddress`;\r\n }\r\n\r\n if (\r\n locationFilter.latitide !== undefined &&\r\n locationFilter.longitude !== undefined\r\n ) {\r\n url = `${this.baseApiUrl}/regiokantoor/nearbyregionaloffices`;\r\n }\r\n\r\n const queryParams: IQueryParam[] = [];\r\n\r\n if (locationFilter.appointmentTypeId) {\r\n queryParams.push({\r\n key: 'appointmentID',\r\n value: locationFilter.appointmentTypeId,\r\n });\r\n }\r\n if (locationFilter.latitide && locationFilter.longitude) {\r\n queryParams.push({ key: 'latitude', value: locationFilter.latitide });\r\n queryParams.push({ key: 'longitude', value: locationFilter.longitude });\r\n }\r\n if (locationFilter.address) {\r\n queryParams.push({ key: 'address', value: locationFilter.address });\r\n }\r\n\r\n url = addQueryParameters(url, queryParams);\r\n\r\n try {\r\n const result = await Api.get(\r\n url,\r\n this.defaultApiOptions\r\n );\r\n\r\n return result;\r\n } catch (ex) {\r\n console.error(ex);\r\n return [];\r\n }\r\n }\r\n\r\n // Returns all known appointment types\r\n public static async getAppointmentTypes() {\r\n return await this.getAllAppointmentTypes();\r\n }\r\n\r\n // Returns a single appointment Type object or undefined when not found\r\n public static async getAppointmentTypeById(typeId: number) {\r\n const result = await this.getAllAppointmentTypes();\r\n\r\n return (\r\n _.find(result, (at) => {\r\n return at.appointmentId === typeId;\r\n }) ?? undefined\r\n );\r\n }\r\n\r\n private static async getAllAppointmentTypes() {\r\n const result = await Api.get(\r\n `${this.baseApiUrl}/afspraakmaken/GetAppointmentTypes`,\r\n this.defaultApiOptions\r\n );\r\n\r\n return result;\r\n }\r\n}\r\n","import * as React from \"react\";\r\n\r\nimport GoogleMapReact from \"google-map-react\";\r\nimport { fitBounds } from \"google-map-react/utils\";\r\nimport { Slug } from \"@fnv-core/utils\";\r\nimport { FormControlProps } from \"../interfaces/FormControlProps\";\r\nimport { FormFieldStateHelpers } from \"./helpers/FormFieldStateHelpers\";\r\nimport { FormStylingHelpers } from \"./helpers/FormStylingHelpers\";\r\nimport { FormLabelHelpers } from \"./helpers/FormLabelHelpers\";\r\nimport { PropertyHelpers } from \"../helpers/PropertyHelpers\";\r\nimport { FormControlHelpers } from \"./helpers/FormControlHelpers\";\r\nimport fetch from \"cross-fetch\";\r\nimport { StringHelpers } from \"../helpers/StringHelpers\";\r\nimport { LabelAndPopover } from \"./components/label-and-popover\";\r\nimport { InputState } from \"./Input\";\r\nimport { AppointmentPlannerService } from \"../services/appointments/AppointmentPlannerService\";\r\nimport {\r\n AppointmentType,\r\n RegionalOfficeModel,\r\n} from \"reactcomponents/services/appointments/interfaces\";\r\nimport _ from \"lodash\";\r\n\r\nexport interface ChooseLocationInputState extends InputState {\r\n dataSourceCounter: number;\r\n timer: any;\r\n showInfowindow: string;\r\n regionalOffices: RegionalOfficeModel[];\r\n appointmentType?: AppointmentType;\r\n center: any;\r\n zoom: number;\r\n hideUI: boolean;\r\n isLoading: boolean;\r\n locationMethod: string;\r\n}\r\n\r\nconst InfoWindow = ({\r\n show,\r\n regionalOfficeId,\r\n regionalOfficeName,\r\n street,\r\n zipcode,\r\n onSelect,\r\n}) => {\r\n const onClick = (event) => {\r\n event.preventDefault();\r\n onSelect(regionalOfficeId);\r\n return false;\r\n };\r\n\r\n return show ? (\r\n
\r\n {regionalOfficeName}\r\n
\r\n {street}\r\n
\r\n {zipcode}\r\n
\r\n \r\n \r\n Kies deze locatie{\" \"}\r\n \r\n \r\n \r\n
\r\n ) : null;\r\n};\r\n\r\nconst MarkerComponent = ({\r\n lat,\r\n lng,\r\n text,\r\n show,\r\n regionalOfficeId,\r\n regionalOfficeName,\r\n street,\r\n zipcode,\r\n onSelect,\r\n}) => (\r\n
\r\n {text}\r\n \r\n
\r\n);\r\n\r\nclass ChooseLocation extends React.Component<\r\n FormControlProps,\r\n ChooseLocationInputState\r\n> {\r\n unmounted: boolean = true;\r\n\r\n constructor(props: FormControlProps) {\r\n super(props);\r\n this.state = {\r\n dataSourceCounter: 0,\r\n timer: undefined,\r\n showInfowindow: \"\",\r\n regionalOffices: [],\r\n appointmentType: undefined,\r\n isLoading: false,\r\n hideUI: true,\r\n center: {\r\n lat: this.props.formFieldDefinition.latitudeMapCenter || 52.1028157,\r\n lng: this.props.formFieldDefinition.longitudeMapCenter || 5.0620636,\r\n },\r\n zoom: 11,\r\n hasFocus: false,\r\n isButtonClicked: false,\r\n isErrorLoading: false,\r\n locationMethod: this.props.formikBag.values[\r\n this.props.formFieldDefinition.LocationMethodField\r\n ]\r\n };\r\n this.googleMap = React.createRef();\r\n }\r\n\r\n googleMap: any;\r\n\r\n onMarkerClick = (key, childProps) => {\r\n this.setState({\r\n showInfowindow: childProps.regionalOfficeId,\r\n center: {\r\n lat: childProps.lat,\r\n lng: childProps.lng,\r\n },\r\n });\r\n }\r\n\r\n onSelectLocation = function (value, event?) {\r\n const filterRegionalOffices: RegionalOfficeModel[] =\r\n this.state.regionalOffices.filter(\r\n (regionalOffice: RegionalOfficeModel, index) => {\r\n return regionalOffice.documentGuid == value;\r\n }\r\n );\r\n\r\n this.props.formController.setPayload({});\r\n if (filterRegionalOffices.length > 0) {\r\n this.props.formController.setPayload(filterRegionalOffices[0]);\r\n }\r\n this.setState({ showInfowindow: \"\" }, () => {\r\n FormFieldStateHelpers.clearMarkedFields(this);\r\n\r\n setTimeout(() => {\r\n FormFieldStateHelpers.updateFormikField(this, value);\r\n\r\n if (this.props.formFieldDefinition.isDependentField) {\r\n this.props.formController.setState({\r\n [this.props.formFieldDefinition.name]: value,\r\n });\r\n }\r\n }, 10);\r\n });\r\n };\r\n\r\n onSelectLocationViaInfoWindow = (value) => {\r\n this.onSelectLocation(value);\r\n }\r\n\r\n googleMapsLoaded: boolean = false;\r\n step1Submitted: boolean = false;\r\n componentDidMount() {\r\n this.unmounted = false;\r\n\r\n let payload = this.props.formController.getPayload();\r\n let forceGetAllLocations = false;\r\n if (\r\n payload &&\r\n payload[\"HasRegionalOfficeLocation\"] !== undefined &&\r\n !payload[\"HasRegionalOfficeLocation\"]\r\n ) {\r\n forceGetAllLocations = true;\r\n }\r\n\r\n if (!this.unmounted) {\r\n if (!forceGetAllLocations) {\r\n this.setState({ hideUI: false });\r\n } else if (\r\n !!this.props.formFieldDefinition.hideGoogleMaps ||\r\n !!forceGetAllLocations ||\r\n this.googleMapsLoaded ||\r\n (window as any).google\r\n ) {\r\n this.getLocation(\r\n this.state.locationMethod\r\n );\r\n }\r\n //load chosen appointmenttype object\r\n const appointmentTypeId = this.props.formikBag.values\r\n ?.afspraaktype as number;\r\n\r\n if (appointmentTypeId) {\r\n AppointmentPlannerService.getAppointmentTypeById(\r\n appointmentTypeId\r\n ).then((x) => {\r\n if (x && !this.unmounted) {\r\n // dirty fix. Is considered an antipattern in react. Needed because it is an async function call\r\n this.setState({ appointmentType: x });\r\n\r\n // change subtitle\r\n const el = document.getElementsByClassName(\"form__step-subtitle\");\r\n if (el !== undefined && el.length > 0) {\r\n el[0].innerHTML = el[0].innerHTML.replace(\r\n \"{AppointmentTypePlaceholder}\",\r\n this.state.appointmentType.description\r\n );\r\n }\r\n\r\n // check if we should skip to step 2 immediately\r\n if (!x.hasRegionalOfficeLocation) {\r\n this.props.formikBag.setFieldValue(this.props.formFieldDefinition.LocationMethodField, \"kaart\");\r\n }\r\n }\r\n });\r\n }\r\n }\r\n }\r\n\r\n componentWillUnmount() {\r\n this.unmounted = true;\r\n }\r\n\r\n onGoogleMapsLoaded = async () => {\r\n this.googleMapsLoaded = true;\r\n this.getLocation(\r\n this.state.locationMethod\r\n );\r\n }\r\n\r\n renderLocations = (regionalOffices: RegionalOfficeModel[]) => {\r\n let center: any = undefined;\r\n let zoom = 11;\r\n\r\n if (!this.props.formFieldDefinition.hideGoogleMaps) {\r\n let hasLatLongLocations = false;\r\n regionalOffices.forEach((p) => {\r\n if (!isNaN(p.latitude) && !isNaN(p.longitude)) {\r\n hasLatLongLocations = true;\r\n }\r\n });\r\n\r\n if (!!hasLatLongLocations) {\r\n let google = (window as any).google;\r\n if (google) {\r\n let bounds = new google.maps.LatLngBounds();\r\n\r\n regionalOffices.forEach((p) => {\r\n if (!isNaN(p.latitude) && !isNaN(p.longitude)) {\r\n bounds.extend(new google.maps.LatLng(p.latitude, p.longitude));\r\n }\r\n });\r\n\r\n const ne = bounds.getNorthEast();\r\n const sw = bounds.getSouthWest();\r\n const nw = { lat: ne.lat(), lng: sw.lng() };\r\n const se = { lat: sw.lat(), lng: ne.lng() };\r\n\r\n let width = 780;\r\n\r\n if (this.googleMap && this.googleMap.current) {\r\n width = this.googleMap.current.clientWidth;\r\n }\r\n\r\n let calcBounds = fitBounds(\r\n {\r\n se: { lat: se.lat, lng: se.lng },\r\n nw: { lat: nw.lat, lng: nw.lng },\r\n },\r\n { width: width, height: 300 }\r\n );\r\n center = calcBounds.center;\r\n zoom = calcBounds.zoom;\r\n }\r\n }\r\n }\r\n\r\n let autoSelect = false;\r\n if (\r\n regionalOffices.length == 1 &&\r\n !isNaN(regionalOffices[0].latitude) &&\r\n !isNaN(regionalOffices[0].longitude) &&\r\n regionalOffices[0].latitude !== 0 &&\r\n regionalOffices[0].longitude !== 0\r\n ) {\r\n center = {\r\n lat: regionalOffices[0].latitude,\r\n lng: regionalOffices[0].longitude,\r\n };\r\n zoom = 11;\r\n } else if (\r\n regionalOffices.length == 1 &&\r\n (isNaN(regionalOffices[0].latitude) ||\r\n isNaN(regionalOffices[0].longitude) ||\r\n regionalOffices[0].latitude == 0 ||\r\n regionalOffices[0].longitude == 0)\r\n ) {\r\n autoSelect = true;\r\n }\r\n\r\n this.setState(\r\n {\r\n regionalOffices: regionalOffices,\r\n center: center,\r\n zoom: zoom,\r\n hideUI: autoSelect,\r\n },\r\n () => {\r\n if (regionalOffices.length == 1 && !!autoSelect) {\r\n this.props.formController.setPayload(regionalOffices[0]);\r\n FormFieldStateHelpers.updateFormikField(\r\n this,\r\n regionalOffices[0].documentGuid\r\n );\r\n } else if (\r\n this.props.field.value !== undefined &&\r\n this.props.field.value != \"\"\r\n ) {\r\n let isRegionalOfficeFound = false;\r\n let regionalOfficeDocumentID = this.props.field.value;\r\n regionalOffices.map((regionalOffice) => {\r\n if (regionalOffice.documentGuid == regionalOfficeDocumentID) {\r\n isRegionalOfficeFound = true;\r\n }\r\n });\r\n if (!isRegionalOfficeFound) {\r\n FormFieldStateHelpers.updateFormikField(this, \"\");\r\n }\r\n }\r\n }\r\n );\r\n }\r\n\r\n fetchLatLongByZipcode = async () => {\r\n let address = \"\";\r\n\r\n let zipcode =\r\n this.props.formikBag.values[this.props.formFieldDefinition.zipcodeField];\r\n //zipcode is enough for geocode to get basic location, therefore houseNumber not required\r\n if (zipcode !== undefined && zipcode !== \"\") {\r\n address = zipcode;\r\n }\r\n if (address === \"\") {\r\n return;\r\n }\r\n\r\n const locations = await AppointmentPlannerService.getLocations({\r\n appointmentTypeId: this.state.appointmentType?.appointmentId,\r\n address,\r\n });\r\n\r\n if (locations) {\r\n this.renderLocations(locations);\r\n }\r\n }\r\n\r\n getLocation = async (locationMethod) => {\r\n let payload = this.props.formController.getPayload();\r\n let forceGetAllLocations = false;\r\n if (!payload[\"hasRegionalOfficeLocation\"]) {\r\n forceGetAllLocations = true;\r\n }\r\n let locations: RegionalOfficeModel[] = [];\r\n\r\n if (locationMethod == \"postcode\") {\r\n this.fetchLatLongByZipcode();\r\n } else if (locationMethod == \"locatie\") {\r\n if (navigator.geolocation) {\r\n navigator.geolocation.getCurrentPosition(async (position) => {\r\n await AppointmentPlannerService.getLocations({\r\n appointmentTypeId: this.state.appointmentType.appointmentId,\r\n latitide: position.coords.latitude,\r\n longitude: position.coords.longitude,\r\n }).then((res) => {\r\n locations = res;\r\n this.renderLocations(locations);\r\n });\r\n });\r\n }\r\n } else if (locationMethod == \"kaart\" || !!forceGetAllLocations) {\r\n locations = await AppointmentPlannerService.getLocations({\r\n appointmentTypeId: this.state.appointmentType.appointmentId,\r\n });\r\n }\r\n\r\n this.renderLocations(locations);\r\n }\r\n\r\n render() {\r\n const locationMethod = this.state.locationMethod;\r\n\r\n if (!!this.state.hideUI) {\r\n return <>;\r\n }\r\n\r\n if (!!this.props.formFieldDefinition.hideGoogleMaps) {\r\n return <>;\r\n }\r\n\r\n if (\r\n this.state.regionalOffices.length == 1 &&\r\n (isNaN(this.state.regionalOffices[0].latitude) ||\r\n isNaN(this.state.regionalOffices[0].longitude) ||\r\n this.state.regionalOffices[0].latitude == 0 ||\r\n this.state.regionalOffices[0].longitude == 0)\r\n ) {\r\n return <>;\r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n {this.state.regionalOffices.map((regionalOffice, index) => {\r\n\r\n return (\r\n \r\n {(locationMethod !== \"kaart\" ||\r\n (locationMethod === \"kaart\" &&\r\n this.props.field.value ==\r\n regionalOffice.documentGuid)) && (\r\n \r\n \r\n \r\n {regionalOffice.officeName},{\" \"}\r\n {regionalOffice.street} {regionalOffice.streetNumber}\r\n {regionalOffice.streetSuffix}\r\n \r\n \r\n )}\r\n \r\n );\r\n })}\r\n \r\n \r\n this.onGoogleMapsLoaded()}\r\n bootstrapURLKeys={{\r\n key: this.props.formFieldDefinition.googleMapsKey || \"\",\r\n language: \"nl\",\r\n region: \"nl\",\r\n }}\r\n defaultCenter={{\r\n lat:\r\n this.props.formFieldDefinition.latitudeMapCenter ||\r\n 52.1028157,\r\n lng:\r\n this.props.formFieldDefinition.longitudeMapCenter ||\r\n 5.0620636,\r\n }}\r\n defaultZoom={11}\r\n center={this.state.center}\r\n zoom={this.state.zoom}\r\n onChildClick={this.onMarkerClick}\r\n >\r\n {this.state.regionalOffices.map((regionalOffice, index) => {\r\n return (\r\n \r\n );\r\n })}\r\n \r\n \r\n {FormControlHelpers.invalidFeedbackComponent(this)}\r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nexport { ChooseLocation };\r\n","import * as React from 'react';\r\nimport * as uuid from 'uuid';\r\nimport { FormControlProps } from '../interfaces/FormControlProps';\r\n\r\nconst uuidV4 = uuid.v4;\r\n\r\n/**\r\n * A component for rendering a button. Can be used to dynamically replace the default submit button.\r\n * \r\n * Current usages:\r\n * - jaaropgave mijn-fnv \r\n * - afsprakenplanner regiokantoor zoeken icm postcode\r\n */\r\nexport class Button extends React.Component {\r\n constructor(props: FormControlProps) {\r\n super(props);\r\n }\r\n\r\n private triggerSubmit() {\r\n this.props.formController.submitToContainer(this.props.formikBag.values, true , true);\r\n }\r\n\r\n private triggerFormChange() {\r\n this.props.formikBag.setFieldValue(this.props.formFieldDefinition.name, uuid);\r\n if (this.props.formFieldDefinition.isDependentField) { \r\n const uuid = uuidV4();\r\n this.props.formController.setState({[this.props.formFieldDefinition.name]: uuid});\r\n }\r\n }\r\n\r\n render() {\r\n const { \r\n buttonMode,\r\n label,\r\n icon,\r\n cssClass\r\n } = this.props.formFieldDefinition;\r\n const { isSubmitting } = this.props;\r\n const onButtonClick = (event) => {\r\n event.preventDefault();\r\n if (!isSubmitting) {\r\n if (buttonMode === 'post') {\r\n this.triggerSubmit();\r\n return false;\r\n } else {\r\n this.triggerFormChange();\r\n }\r\n }\r\n return false;\r\n };\r\n\r\n const hasIcon = icon && icon !== 'no-icon';\r\n const btnClassName = (isSubmitting ? 'btn-disabled ' : '') + cssClass;\r\n\r\n return (\r\n
\r\n \r\n {hasIcon && (\r\n \r\n )}\r\n {label}\r\n \r\n {isSubmitting && buttonMode == \"post\" && (\r\n \r\n )} \r\n
\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\n\r\nimport { Slug } from '@fnv-core/utils';\r\nimport { FormControlProps } from '../interfaces/FormControlProps';\r\nimport { FormStylingHelpers } from './helpers/FormStylingHelpers';\r\nimport { FormLabelHelpers } from './helpers/FormLabelHelpers';\r\nimport { PropertyHelpers } from '../helpers/PropertyHelpers';\r\nimport { FormControlHelpers } from './helpers/FormControlHelpers';\r\nimport ReactHtmlParser from 'react-html-parser';\r\nimport { AjaxCallHelpers } from './helpers/AjaxCallHelpers';\r\nimport { LabelAndPopover } from './components/label-and-popover';\r\n\r\nexport interface RangeState {\r\n dataSourceCounter: number;\r\n timer: any;\r\n showPopoverText : boolean;\r\n}\r\n\r\nclass Range extends React.Component {\r\n constructor(props: FormControlProps) {\r\n super(props);\r\n this.state = {\r\n dataSourceCounter: 0,\r\n timer: undefined,\r\n showPopoverText: false\r\n };\r\n }\r\n\r\n showPopoverText = (event) => {\r\n event.preventDefault();\r\n this.setState({showPopoverText: !this.state.showPopoverText});\r\n return false;\r\n }\r\n\r\n unmounted : boolean = false;\r\n componentDidMount() {\r\n\r\n if (this.unmounted) {\r\n return;\r\n }\r\n \r\n AjaxCallHelpers.getRelatedData(this as any, (parseFloat(this.props.field.value) || 0).toString());\r\n }\r\n\r\n componentWillUnmount() {\r\n this.unmounted = true;\r\n }\r\n\r\n render() {\r\n const inputProperties = {\r\n // Input properties has everything needed to deal with manual input\r\n // It will load related data when a datasource is set\r\n ...FormControlHelpers.inputProperties(this)\r\n }; \r\n\r\n let value = parseFloat(inputProperties.value) || 0;\r\n\r\n let left = \"50%\";\r\n let max = this.props.formFieldDefinition.max || 0;\r\n let min = this.props.formFieldDefinition.min || 0;\r\n if (max > 0) {\r\n left = (value / max * 100) + \"%\";\r\n }\r\n\r\n const showMinValue = min != value;\r\n const showMaxValue = max != value;\r\n\r\n return (\r\n <>\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n {showMinValue && {this.props.formFieldDefinition.min || 0}}\r\n {parseFloat(inputProperties.value) || 0}\r\n {showMaxValue && {this.props.formFieldDefinition.max || 0}}\r\n
\r\n {FormControlHelpers.invalidFeedbackComponent(this)}\r\n
\r\n {this.props.formFieldDefinition.hasPopover === undefined && \r\n this.props.formFieldDefinition.explanation && \r\n this.props.formFieldDefinition.explanation !== \"\" ? {ReactHtmlParser(this.props.formFieldDefinition.explanation)} : null}\r\n
\r\n
\r\n \r\n );\r\n }\r\n}\r\n\r\nexport { Range };\r\n","import * as React from 'react';\r\nimport ReactHtmlParser from 'react-html-parser';\r\nimport { Slug } from '@fnv-core/utils';\r\nimport { FormControlProps } from '../interfaces/FormControlProps';\r\nimport { FormControlHelpers } from './helpers/FormControlHelpers';\r\nimport { ComponentStoreHelpers } from './helpers/ComponentStoreHelpers';\r\nimport { FormLabelHelpers } from './helpers/FormLabelHelpers';\r\nimport { FormStylingHelpers } from './helpers/FormStylingHelpers';\r\nimport { AjaxCallHelpers } from './helpers/AjaxCallHelpers';\r\nimport { LabelAndPopover } from './components/label-and-popover';\r\nimport { PropertyHelpers } from '../helpers/PropertyHelpers';\r\n\r\nexport interface SwitchState {\r\n dataSourceCounter: number;\r\n timer: any;\r\n label: string;\r\n}\r\n\r\nclass Switch extends React.Component {\r\n constructor(props: FormControlProps) {\r\n super(props);\r\n \r\n this.state = {\r\n dataSourceCounter: 0,\r\n timer: undefined,\r\n label: undefined,\r\n };\r\n\r\n }\r\n\r\n changeValidationError = () => {\r\n if (this.props.formFieldDefinition.validation &&\r\n this.props.formFieldDefinition.validation.required) {\r\n if (this.props.formConfig.algemenevoorwaardenLinkTekst) {\r\n const errorLabel = this.props.formFieldDefinition.validation.required.error.replace('[ALGEMENEVOORWAARDEN]', \r\n this.props.formConfig.algemenevoorwaardenLinkTekst);\r\n this.props.formFieldDefinition.validation.required.error = errorLabel;\r\n } \r\n }\r\n }\r\n\r\n componentDidMount() {\r\n this.changeValidationError();\r\n\r\n if (ComponentStoreHelpers.hasDatasource(this)) {\r\n ComponentStoreHelpers.getData(this).then((data) => \r\n {\r\n if(data && !this.unmounted) {\r\n this.setState({label: (data as any).ShortText});\r\n }\r\n });\r\n }\r\n }\r\n\r\n unmounted : boolean = false;\r\n componentWillUnmount() {\r\n this.unmounted = true;\r\n }\r\n\r\n render() {\r\n let label: string = this.state.label ? this.state.label : this.props.formFieldDefinition.optionyes;\r\n let linkAlgemeneVoorwaarden = null;\r\n let self = this;\r\n let dontRenderLabelAboveInput = false;\r\n\r\n const fieldProperties = {\r\n ...FormControlHelpers.inputProperties(this),\r\n // Override\r\n onChange(e) {\r\n // don't call e.preventDefault() here .. it causes bug in lid-worden-form\r\n if (self.props.formFieldDefinition.clearFields !== undefined) {\r\n self.props.formFieldDefinition.clearFields.map((fieldName: string) => {\r\n self.props.formikBag.setFieldValue(fieldName, '');\r\n });\r\n }\r\n self.props.formikBag.setFieldValue(self.props.formFieldDefinition.name, e.target.checked);\r\n self.props.field.onChange(e);\r\n\r\n setTimeout(() => {\r\n if (FormControlHelpers.isValid(self)) {\r\n // Only get data when input is valid\r\n AjaxCallHelpers.getRelatedData(self as any, e.target.value);\r\n }\r\n }, 1);\r\n \r\n return false;\r\n \r\n }\r\n };\r\n\r\n let isRequired = this.props.formFieldDefinition.validation['required'] !== undefined;\r\n\r\n if (this.props.formFieldDefinition.optionyes.indexOf('[ALGEMENEVOORWAARDEN]') >= 0) {\r\n label = label.replace('[ALGEMENEVOORWAARDEN]', '');\r\n dontRenderLabelAboveInput = true;\r\n linkAlgemeneVoorwaarden = (\r\n <>\r\n \r\n {ReactHtmlParser(this.props.formConfig.algemenevoorwaardenLinkTekst)}\r\n \r\n {isRequired ? \" *\" : \"\"}\r\n \r\n );\r\n } else {\r\n linkAlgemeneVoorwaarden = {isRequired ? \" *\" : \"\"};\r\n }\r\n \r\n const disabled = !!this.props.formFieldDefinition.readOnly;\r\n\r\n return (\r\n
\r\n {((!dontRenderLabelAboveInput && \r\n label !== this.props.formFieldDefinition.label && \r\n this.props.formFieldDefinition.label != '') || \r\n (!!this.props.formFieldDefinition.hasPopover)) ? (\r\n \r\n ) : null}\r\n
\r\n \r\n \r\n {ReactHtmlParser(label)} {linkAlgemeneVoorwaarden}\r\n \r\n
\r\n {FormControlHelpers.invalidFeedbackComponent(this)}\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport { Switch };\r\n","import * as React from 'react';\r\nimport ReactHtmlParser from 'react-html-parser';\r\nimport * as Yup from 'yup';\r\n\r\nimport { Slug } from '@fnv-core/utils';\r\nimport { FormControlWithFormsProps } from '../interfaces/FormControlProps';\r\nimport { FormFieldStateHelpers } from './helpers/FormFieldStateHelpers';\r\nimport { FormStylingHelpers } from './helpers/FormStylingHelpers';\r\nimport { FormLabelHelpers } from './helpers/FormLabelHelpers';\r\nimport { PropertyHelpers } from '../helpers/PropertyHelpers';\r\nimport { FormControlHelpers } from './helpers/FormControlHelpers';\r\nimport { LabelAndPopover } from './components/label-and-popover';\r\nimport { IEmailAddressListFieldDefinition } from '../interfaces/Fields';\r\n\r\nexport interface InputState {\r\n dataSourceCounter: number;\r\n timer: any;\r\n emailValue: string;\r\n emailError: string;\r\n showAllEmailAddresses: boolean;\r\n showAllExistingEmailAddresses: boolean;\r\n isLoading: boolean;\r\n}\r\n\r\nexport class EmailAddressList extends React.Component {\r\n constructor(props: FormControlWithFormsProps) {\r\n super(props);\r\n this.state = {\r\n dataSourceCounter: 0,\r\n timer: undefined,\r\n emailValue: \"\",\r\n emailError: \"\",\r\n showAllEmailAddresses: false,\r\n showAllExistingEmailAddresses: false,\r\n isLoading: false\r\n };\r\n }\r\n\r\n private get _emailAddressListFieldDefinition(): IEmailAddressListFieldDefinition {\r\n return this.props.formFieldDefinition as IEmailAddressListFieldDefinition;\r\n }\r\n\r\n onKeyDown = (e) => {\r\n if (e.key === 'Enter') {\r\n this.addEmail(e);\r\n }\r\n }\r\n\r\n onChange = (e) => {\r\n e.preventDefault();\r\n FormFieldStateHelpers.clearMarkedFields(this);\r\n this.setState({emailValue: e.target.value});\r\n return false;\r\n }\r\n onBlur = (e) => {\r\n //\r\n }\r\n onFocus = (e) => {\r\n // No action defined\r\n }\r\n\r\n addEmail = (e) => {\r\n e.preventDefault();\r\n if ((this.state.emailValue || \"\").trim() === \"\") {\r\n this.setState({emailError : \"\"});\r\n return;\r\n }\r\n\r\n let list = this.state.emailValue.split(/[\\s,;]+/);\r\n\r\n // remove < > because copy and pasting from outlook should be possible\r\n // that format is abc \r\n // and to be sure .. also remove all quotes\r\n\r\n list = list.map((email) => {\r\n return (email || \"\").replace(/[<>\"']/g, '');\r\n });\r\n\r\n // validate all email adresses\r\n let validatorPromises : any[] = [];\r\n list.map((email) => {\r\n let schemaValidator = Yup.string().email(this._emailAddressListFieldDefinition.emailError); \r\n validatorPromises.push(schemaValidator.isValid(email));\r\n });\r\n\r\n Promise.all(validatorPromises).then((result : any[]) => {\r\n let hasError = false;\r\n if (result.length > 0) {\r\n hasError = !result[0];\r\n }\r\n result.map((validatorResult) => {\r\n hasError = hasError && !validatorResult;\r\n });\r\n\r\n // if all email addresses are not valid.. then show error\r\n if (!!hasError) {\r\n this.setState({emailError: this._emailAddressListFieldDefinition.emailError});\r\n return;\r\n }\r\n\r\n let emailAdresses: string[] = (this.props.field.value as string || '').split(this._emailAddressListFieldDefinition.emailSeparator);\r\n \r\n emailAdresses = emailAdresses.filter((email) => {\r\n return email && email !== '';\r\n });\r\n\r\n list.map((copyAndPastedEmail, index) => {\r\n\r\n // add only valid email adresses\r\n if (result[index] && copyAndPastedEmail && copyAndPastedEmail !== '') {\r\n const filterEmail = emailAdresses.filter((email, index) => {\r\n return email === copyAndPastedEmail;\r\n });\r\n if (filterEmail.length === 0) {\r\n emailAdresses.push(copyAndPastedEmail);\r\n }\r\n }\r\n });\r\n\r\n this.setState({ emailValue: '', emailError: '' }, () => {\r\n FormFieldStateHelpers.updateFormikField(this as any, emailAdresses.join(this._emailAddressListFieldDefinition.emailSeparator));\r\n });\r\n }).catch(() => {\r\n this.setState({ emailError: this._emailAddressListFieldDefinition.emailError });\r\n });\r\n \r\n return false;\r\n }\r\n\r\n deleteEmailFromList = (emailToDelete, event) => {\r\n event.preventDefault();\r\n let emailAdresses: string[] = (this.props.field.value || '').split(this._emailAddressListFieldDefinition.emailSeparator);\r\n const filterEmail = emailAdresses.filter((email, index) => {\r\n return email !== emailToDelete;\r\n });\r\n FormFieldStateHelpers.updateFormikField(this as any, filterEmail.join(this._emailAddressListFieldDefinition.emailSeparator));\r\n return false;\r\n }\r\n\r\n showAllOtherExistingEmailAddresses = (event) => {\r\n event.preventDefault();\r\n this.setState((state) => {\r\n return {\r\n ...state,\r\n showAllExistingEmailAddresses : !state.showAllExistingEmailAddresses\r\n };\r\n });\r\n return false;\r\n }\r\n\r\n getExistingEmailAddressesList = () => {\r\n const fieldForExistingEmailAddresses = this._emailAddressListFieldDefinition.fieldForExistingEmailAddresses;\r\n if (fieldForExistingEmailAddresses) {\r\n const emailSeparator = this._emailAddressListFieldDefinition.emailSeparator;\r\n let emailAdresses: string[] = (this.props.formikBag.values[fieldForExistingEmailAddresses] as string || '').split(emailSeparator);\r\n\r\n if (!!this._emailAddressListFieldDefinition.isSummary) {\r\n const emailAddressesString = this.props.forms[this._emailAddressListFieldDefinition.form][fieldForExistingEmailAddresses] as string || '';\r\n emailAdresses = emailAddressesString.split(emailSeparator);\r\n }\r\n emailAdresses = emailAdresses.filter(email => email !== \"\");\r\n const emailCount = emailAdresses.length;\r\n\r\n return
\r\n \r\n {emailAdresses.map((email, index) => {\r\n\r\n if (emailCount >= 6 && index >= 4 && !this.state.showAllExistingEmailAddresses) {\r\n return ;\r\n }\r\n return
\r\n \r\n {email} \r\n
;\r\n })}{(emailCount > 5 && !this.state.showAllExistingEmailAddresses) && \r\n {emailCount - 4} anderen} \r\n
;\r\n }\r\n return <>;\r\n }\r\n\r\n showAllOtherEmailAddresses = (event) => {\r\n event.preventDefault();\r\n this.setState((state) => {\r\n return {\r\n ...state,\r\n showAllEmailAddresses : !state.showAllEmailAddresses\r\n };\r\n });\r\n return false;\r\n }\r\n\r\n getEmailList = () => {\r\n const isSummary = this._emailAddressListFieldDefinition.isSummary;\r\n const emailSeparator = this._emailAddressListFieldDefinition.emailSeparator;\r\n\r\n let emailAdresses: string[] = (this.props.field.value || '').split(emailSeparator);\r\n if (!!isSummary) {\r\n emailAdresses = (this.props.forms[this._emailAddressListFieldDefinition.form][this._emailAddressListFieldDefinition.name] as string || '').split(emailSeparator);\r\n }\r\n emailAdresses = emailAdresses.filter(email => !!email);\r\n const emailCount = emailAdresses.length;\r\n\r\n return
{emailAdresses.map((email, index) => { \r\n if (emailCount >= 6 && index >= 4 && !this.state.showAllEmailAddresses) {\r\n return ;\r\n }\r\n return
\r\n \r\n {email}\r\n {!isSummary && }\r\n
;\r\n })}{(emailCount > 5 && !this.state.showAllEmailAddresses) && \r\n {emailCount - 4} anderen}\r\n
;\r\n }\r\n\r\n render() {\r\n const inputProperties = {\r\n // Input properties has everything needed to deal with manual input\r\n // It will load related data when a datasource is set\r\n ...FormControlHelpers.inputProperties(this),\r\n onChange : this.onChange,\r\n onBlur : this.onBlur,\r\n onFocus: this.onFocus,\r\n onKeyDown: this.onKeyDown,\r\n value: this.state.emailValue\r\n };\r\n\r\n return (\r\n <>\r\n
\r\n \r\n
\r\n {!this.props.formFieldDefinition.readOnly && <>\r\n \r\n Toevoegen\r\n }\r\n {!this.props.formFieldDefinition.readOnly && FormControlHelpers.invalidFeedbackComponent(this)}\r\n {!this.props.formFieldDefinition.readOnly && this.state.emailError !== \"\" ?
\r\n {ReactHtmlParser(this.state.emailError)}\r\n
: null}\r\n
\r\n {this.props.formFieldDefinition.hasPopover === undefined && \r\n this.props.formFieldDefinition.explanation && \r\n this.props.formFieldDefinition.explanation !== \"\" ? {ReactHtmlParser(this.props.formFieldDefinition.explanation)} : null}\r\n {this.getEmailList()}\r\n {this.getExistingEmailAddressesList()}\r\n
\r\n
\r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\n\r\nimport { IQrCodeScannerFieldDefinition } from '../interfaces/Fields';\r\nimport { Slug } from \"../../core/utils\";\r\nimport { FormControlProps, FormControlWithFormsProps } from '../interfaces/FormControlProps';\r\nimport { FormFieldStateHelpers } from './helpers/FormFieldStateHelpers';\r\nimport { FormStylingHelpers } from './helpers/FormStylingHelpers';\r\nimport { FormControlHelpers } from './helpers/FormControlHelpers';\r\nimport { StringHelpers } from '../../reactcomponents/helpers/StringHelpers';\r\nimport ReactHtmlParser from 'react-html-parser';\r\nimport { AjaxCallHelpers } from './helpers/AjaxCallHelpers';\r\nimport { InputState } from './Input';\r\n\r\nexport interface QRCodeInputState extends InputState {\r\n dataSourceCounter: number;\r\n timer: any;\r\n isButtonClicked: boolean;\r\n qrCodeComponent: any;\r\n isLoading: boolean;\r\n}\r\n\r\nclass QRCodeScanner extends React.Component {\r\n \r\n private _qrCodeScannerFieldDefinition: IQrCodeScannerFieldDefinition;\r\n constructor(props: FormControlWithFormsProps) {\r\n super(props);\r\n this.state = {\r\n dataSourceCounter: 0,\r\n timer: undefined,\r\n isButtonClicked: false,\r\n qrCodeComponent: undefined,\r\n isLoading: false,\r\n isErrorLoading: false,\r\n hasFocus: false\r\n };\r\n this._qrCodeScannerFieldDefinition = this.props.formFieldDefinition as IQrCodeScannerFieldDefinition;\r\n }\r\n\r\n componentDidMount() {\r\n import('react-qr-reader').then((QRCode) => {\r\n if (!this.unmounted) {\r\n this.setState({ qrCodeComponent: QRCode.default });\r\n }\r\n });\r\n }\r\n\r\n unmounted = false;\r\n componentWillUnmount() {\r\n this.unmounted = true;\r\n }\r\n\r\n componentDidUpdate() {\r\n\r\n if (this.unmounted) {\r\n return;\r\n }\r\n\r\n if (!this.props.field.value || this.props.field.value === \"\" ||\r\n (this.props.forms[this.props.formController.props.formName] || {})[this.props.formFieldDefinition.name] === \"\") {\r\n this.lastScannedCode = \"\";\r\n }\r\n }\r\n\r\n shouldComponentUpdate(nextProps: FormControlWithFormsProps, nextState: QRCodeInputState): boolean {\r\n if (nextProps.field.value != this.props.field.value ||\r\n nextProps.form != this.props.form ||\r\n nextProps.formFieldDefinition != this.props.formFieldDefinition ||\r\n nextProps.formConfig != this.props.form ||\r\n nextProps.formController != this.props.formController ||\r\n nextProps.defaultValue != this.props.defaultValue ||\r\n nextState.qrCodeComponent != this.state.qrCodeComponent ||\r\n nextState.hasFocus != this.state.hasFocus ||\r\n nextProps.forms[nextProps.formController.formName][nextProps.formFieldDefinition.name] !== nextProps.field.value\r\n ) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n lastScannedCode: \"\";\r\n handleQRCodeScan = (data) => {\r\n\r\n if (this.unmounted) {\r\n return;\r\n }\r\n if (data !== undefined && data !== null && data !== \"\") {\r\n\r\n let shouldTriggerSubmit = false;\r\n // should trigger submit is used for the strike registration scanner where the QR-code is a (temporary) membershipnumber, intead of json.\r\n if (data !== this.lastScannedCode\r\n && !this._qrCodeScannerFieldDefinition.isUsedToScanJson) {\r\n shouldTriggerSubmit = true;\r\n }\r\n this.lastScannedCode = data;\r\n\r\n FormFieldStateHelpers.updateFormikField(this as React.Component, data || \"\");\r\n\r\n setTimeout(() => {\r\n if (this.unmounted) {\r\n return;\r\n }\r\n if (this.props.formController.unmounted) {\r\n return;\r\n }\r\n\r\n if (FormControlHelpers.isValid(this)) {\r\n // Only get data when input is valid\r\n\r\n if (this.props.formController.props.onFieldChange) {\r\n this.props.formController.props.onFieldChange(\r\n this.props.formController.props.formName,\r\n this.props.formFieldDefinition.name,\r\n data);\r\n }\r\n \r\n if (this._qrCodeScannerFieldDefinition.isUsedToScanJson) {\r\n let inputAsJsonObject = StringHelpers.TryJsonParse(data);\r\n if (inputAsJsonObject) {\r\n for (var i in inputAsJsonObject) {\r\n this.props.formikBag.setFieldValue(i, inputAsJsonObject[i], true);\r\n }\r\n }\r\n }\r\n\r\n AjaxCallHelpers.getRelatedData(this, data);\r\n if (shouldTriggerSubmit) {\r\n this.props.formikBag.submitForm();\r\n }\r\n }\r\n }, 1);\r\n }\r\n }\r\n\r\n handleQRCodeScanError = (error) => {\r\n // skip validation rule\r\n // tslint:disable-next-line\r\n console.log(\"QRCodeScanner error\", error);\r\n }\r\n\r\n onInputFocus = (event) => {\r\n this.setState({ hasFocus: true });\r\n }\r\n\r\n onInputBlur = (event) => {\r\n if (event.persist) {\r\n event.persist();\r\n }\r\n this.setState({ hasFocus: false }, () => {\r\n this.props.field.onBlur(event);\r\n });\r\n }\r\n\r\n\r\n render() {\r\n const inputProperties = {\r\n // Input properties has everything needed to deal with manual input\r\n // It will load related data when a datasource is set\r\n ...FormControlHelpers.inputProperties(this)\r\n };\r\n\r\n let QRComponent = undefined;\r\n if (this.state.qrCodeComponent) {\r\n QRComponent = this.state.qrCodeComponent;\r\n }\r\n\r\n return (\r\n <>\r\n
\r\n
\r\n {QRComponent && }\r\n {this.props.field.value && this.props.field.value !== \"\" &&\r\n

{this.props.field.value || \"\"}

}\r\n {!this.state.hasFocus && FormControlHelpers.invalidFeedbackComponent(this)}\r\n
\r\n {this.props.formFieldDefinition.hasPopover === undefined &&\r\n this.props.formFieldDefinition.explanation &&\r\n this.props.formFieldDefinition.explanation !== \"\" ? {ReactHtmlParser(this.props.formFieldDefinition.explanation)} : null}\r\n
\r\n
\r\n \r\n );\r\n }\r\n}\r\n\r\nexport { QRCodeScanner };\r\n","import * as React from 'react';\r\nimport ReCAPTCHA from 'react-google-recaptcha';\r\nimport { ProcesName } from '../containers/helpers/ProcesHandlerHelpers';\r\nimport { FormControlProps } from '../interfaces/FormControlProps';\r\n\r\nlet instance = null;\r\n\r\nexport class ReCaptcha extends React.Component {\r\n private reCaptchaRef: any;\r\n\r\n constructor(props: FormControlProps) {\r\n super(props);\r\n this.reCaptchaRef = React.createRef();\r\n }\r\n\r\n componentDidMount() {\r\n if (!this.props.formConfig.handlers) {\r\n this.props.formConfig.handlers = [];\r\n }\r\n\r\n // Set an instance reference outside this component, because it gets destroyed on submitting\r\n instance = this.reCaptchaRef.current;\r\n \r\n this.props.formConfig.handlers.push({\r\n // Execute ReCaptcha validation When submitting form to backend\r\n procesName: ProcesName.Put_preprocess,\r\n execute: (component, data, onSuccess, onError) => {\r\n instance.executeAsync().then(token => {\r\n data[this.props.formFieldDefinition.name] = token;\r\n onSuccess(data);\r\n });\r\n },\r\n });\r\n }\r\n\r\n render() {\r\n return (\r\n <>\r\n
\r\n \r\n
\r\n \r\n );\r\n }\r\n}\r\n","import React, { useState } from 'react';\r\nimport ReactHtmlParser from 'react-html-parser';\r\nimport { v4 as uuidv4 } from 'uuid';\r\n\r\nexport interface ICheckboxControlProps {\r\n /**\r\n * An optional id for the. If none is given, one is generated.\r\n */\r\n id?: string;\r\n /**\r\n * An optional initial state.\r\n */\r\n checked?: boolean;\r\n /**\r\n * The label to show next to the checkbox.\r\n */\r\n label: string;\r\n /**\r\n * Optional classname to apply.\r\n */\r\n className?: string;\r\n /**\r\n * An optional callback function when the checkbox is toggled.\r\n */\r\n onChange?: (value: boolean) => void;\r\n}\r\n\r\n/**\r\n * Component for displaying a checkbox.\r\n */\r\nexport const CheckboxControl = ({ id, checked, label, className, onChange }: ICheckboxControlProps) => {\r\n\r\n const checkboxId = id || uuidv4();\r\n\r\n const onCheckboxChanged = (checked: boolean) => {\r\n onChange?.(checked);\r\n };\r\n\r\n return (\r\n
\r\n onCheckboxChanged(e.target.checked)}\r\n checked={checked}\r\n />\r\n \r\n
\r\n );\r\n};\r\n","import * as React from 'react';\r\nimport { ArrayHelper, Slug } from '@fnv-core/utils';\r\nimport { ICheckboxMultipleFieldDefinition, IOption } from '../interfaces/Fields';\r\nimport { PropertyHelpers } from '../helpers/PropertyHelpers';\r\nimport { FormControlProps } from '../interfaces/FormControlProps';\r\nimport { LabelAndPopover } from './components/label-and-popover';\r\nimport { FormLabelHelpers } from './helpers/FormLabelHelpers';\r\nimport { FormControlHelpers } from './helpers/FormControlHelpers';\r\nimport { CheckboxControl } from '../presentational/controls/CheckboxControl';\r\nimport { ComponentStoreHelpers } from './helpers/ComponentStoreHelpers';\r\n\r\ninterface ICheckboxOption extends IOption {\r\n checked: boolean;\r\n}\r\n\r\nexport interface CheckboxMultipleState {\r\n selectedValues: string[];\r\n dataSourceCounter: number;\r\n timer: any;\r\n}\r\n\r\nexport class CheckboxMultiple extends React.Component {\r\n\r\n private _checkboxFieldDefinition: ICheckboxMultipleFieldDefinition;\r\n\r\n constructor(props: FormControlProps) {\r\n super(props);\r\n\r\n this.state = {\r\n selectedValues: [],\r\n dataSourceCounter: 0,\r\n timer: undefined,\r\n };\r\n this._checkboxFieldDefinition = this.props.formFieldDefinition as ICheckboxMultipleFieldDefinition;\r\n\r\n this.onSelectAllChanged = this.onSelectAllChanged.bind(this);\r\n }\r\n\r\n componentDidMount(): void {\r\n if (ComponentStoreHelpers.hasDatasource(this)) {\r\n ComponentStoreHelpers.setFormFieldData(this, []);\r\n ComponentStoreHelpers.getData(this).then(data => {\r\n if (this.unmounted) {\r\n return;\r\n }\r\n\r\n const options = ComponentStoreHelpers.getListData(this);\r\n const optionValues = options.map(opt => opt.value);\r\n const selectedValues = this.props.field.value ? optionValues.filter(ov => this.props.field.value.some(v => {\r\n if (v.value) {\r\n return v.value === ov;\r\n }\r\n return v === ov;\r\n })) : [];\r\n this.setState({\r\n selectedValues,\r\n });\r\n });\r\n } else {\r\n this.setState({\r\n selectedValues: [],\r\n });\r\n }\r\n }\r\n\r\n unmounted: boolean = false;\r\n componentWillUnmount() {\r\n this.unmounted = true;\r\n }\r\n\r\n private getSelectedItems(selectedValues?: string[]): IOption[] {\r\n const allOptions = ComponentStoreHelpers.getListData(this);\r\n if (!selectedValues) {\r\n return allOptions;\r\n }\r\n\r\n const selectedItems = allOptions.filter(o => selectedValues.indexOf(o.value) > -1);\r\n return selectedItems;\r\n }\r\n\r\n private onChange(option: IOption, checked: boolean) {\r\n const currentSelected = [...this.state.selectedValues];\r\n\r\n const currentIndex = currentSelected.indexOf(option.value);\r\n if (checked) {\r\n // Add if not already in the selected values\r\n if (currentIndex === -1) {\r\n currentSelected.push(option.value);\r\n }\r\n } else {\r\n // Remove if in the selected values\r\n if (currentIndex > -1) {\r\n currentSelected.splice(currentIndex, 1);\r\n }\r\n }\r\n\r\n const selectedItems = this.getSelectedItems(currentSelected);\r\n\r\n const properties = FormControlHelpers.inputProperties(this);\r\n properties.onChange({\r\n target: {\r\n value: selectedItems,\r\n }\r\n });\r\n\r\n this.setState({\r\n selectedValues: currentSelected,\r\n });\r\n\r\n return false;\r\n }\r\n\r\n private onSelectAllChanged(selectAllChecked: boolean) {\r\n const selectedItems = selectAllChecked ? this.getSelectedItems() : [];\r\n\r\n if (selectAllChecked) {\r\n this.setState({\r\n selectedValues: selectedItems.map(i => i.value),\r\n });\r\n } else {\r\n this.setState({\r\n selectedValues: [],\r\n });\r\n }\r\n\r\n const properties = FormControlHelpers.inputProperties(this);\r\n properties.onChange({\r\n target: {\r\n value: selectedItems,\r\n }\r\n });\r\n }\r\n\r\n render() {\r\n \r\n let options: IOption[] = ComponentStoreHelpers.getListData(this);\r\n if (this._checkboxFieldDefinition.sortItems) {\r\n options = ArrayHelper.sortBy(options, 'label');\r\n }\r\n\r\n const displaySelectAll = this._checkboxFieldDefinition.selectAll;\r\n \r\n return(\r\n
\r\n {(this._checkboxFieldDefinition.label || !!this._checkboxFieldDefinition.hasPopover) ? (\r\n \r\n ) : null}\r\n {\r\n displaySelectAll && \r\n
\r\n ' + this._checkboxFieldDefinition.selectAllText || '(De)selecteer alles' + ''}\r\n onChange={(checked) => this.onSelectAllChanged(checked)}\r\n />\r\n
\r\n }\r\n
\r\n {options.map((option, index) => (\r\n -1}\r\n label={option.label}\r\n onChange={(checked: boolean) => this.onChange(option, checked)}\r\n />\r\n ))}\r\n
\r\n {FormControlHelpers.invalidFeedbackComponent(this)}\r\n
\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport ReactSelect from 'react-select';\r\nimport makeAnimated from 'react-select/animated';\r\n\r\nimport { Slug } from '@fnv-core/utils';\r\nimport { FormControlProps } from '../interfaces/FormControlProps';\r\nimport { FormControlHelpers } from './helpers/FormControlHelpers';\r\nimport { ComponentStoreHelpers } from './helpers/ComponentStoreHelpers';\r\nimport { FormLabelHelpers } from './helpers/FormLabelHelpers';\r\nimport { LabelAndPopover } from './components/label-and-popover';\r\n\r\n\r\nexport interface DropdownMultiselectProps extends FormControlProps {\r\n}\r\n\r\ninterface IOption {\r\n value: any;\r\n label: string;\r\n}\r\n\r\nexport interface DropdownMultiselectState {\r\n dataSourceCounter?: number;\r\n value: IOption[];\r\n isLoading: boolean; \r\n isInvalid: boolean;\r\n options: IOption[];\r\n}\r\n\r\nexport class DropdownMultiselect extends React.Component {\r\n private options: IOption[] = [];\r\n\r\n constructor(props: DropdownMultiselectProps) {\r\n super(props); \r\n this.state = {\r\n value: [],\r\n isLoading: false,\r\n isInvalid: false,\r\n options: []\r\n };\r\n }\r\n\r\n componentDidMount() {\r\n this.initDropdowns();\r\n }\r\n\r\n unmounted: boolean = false;\r\n\r\n componentWillUnmount() {\r\n this.unmounted = true;\r\n }\r\n\r\n initDropdowns = () => {\r\n if (ComponentStoreHelpers.hasDatasource(this)) {\r\n this.setState({\r\n isLoading: true,\r\n });\r\n ComponentStoreHelpers.getData(this).then((result) => {\r\n if (this.unmounted) {\r\n return;\r\n }\r\n\r\n if (result) {\r\n this.options = result;\r\n this.setFieldValue(this.props.field.value);\r\n }\r\n });\r\n } else {\r\n const properties = {\r\n ...FormControlHelpers.inputProperties(this),\r\n };\r\n\r\n this.setFieldValue(properties.value);\r\n }\r\n }\r\n\r\n setFieldValue(value) {\r\n let selectedValues: IOption[] = value;\r\n\r\n if (!Array.isArray(value)) {\r\n const values = !!value ? value.split(',') : [];\r\n const options = ComponentStoreHelpers.getListData(this);\r\n selectedValues = values.map(val => {\r\n return options.find(opt => opt.value === val);\r\n });\r\n\r\n this.props.formikBag.setFieldTouched(this.props.formFieldDefinition.name, true, false);\r\n this.props.formikBag.setFieldValue(this.props.formFieldDefinition.name, selectedValues, true).then(() => {\r\n const error = this.props.formController.validateField(this.props.formFieldDefinition, this.props.formikBag);\r\n this.props.formikBag.setFieldError(this.props.formFieldDefinition.name, error);\r\n });\r\n }\r\n \r\n this.setState({\r\n value: [...selectedValues],\r\n isLoading: false,\r\n });\r\n }\r\n\r\n onChange(selection) {\r\n this.setState({value: [...selection]});\r\n this.props.formikBag.setFieldTouched(this.props.formFieldDefinition.name, true, false);\r\n this.props.formikBag.setFieldValue(this.props.formFieldDefinition.name, selection, true).then(() => {\r\n const error = this.props.formController.validateField(this.props.formFieldDefinition, this.props.formikBag);\r\n this.props.formikBag.setFieldError(this.props.formFieldDefinition.name, error);\r\n });\r\n }\r\n\r\n render() {\r\n let options = ComponentStoreHelpers.getListData(this);\r\n const animatedComponents = makeAnimated();\r\n const { formFieldDefinition } = this.props;\r\n\r\n // Add empty first item if required\r\n if (formFieldDefinition.includeDefaultEmptyOption) {\r\n options = [\r\n {\r\n value: '',\r\n label: formFieldDefinition.defaultEmptyOption,\r\n text: formFieldDefinition.defaultEmptyOption,\r\n parent: '',\r\n data: {}\r\n },\r\n ...options\r\n ];\r\n }\r\n\r\n const arrayValue = this.state.value;\r\n const values: string[] = arrayValue.map(av => typeof (av) === 'string' ? av : av?.value);\r\n const selectedOptions = values.map(val => {\r\n return options.find(opt => opt.value === val);\r\n });\r\n\r\n let label = formFieldDefinition.label;\r\n if (formFieldDefinition.maxItems && formFieldDefinition.maxItems > 0) {\r\n label = `${formFieldDefinition.label} (Max. ${formFieldDefinition.maxItems})`;\r\n }\r\n \r\n return (\r\n
\r\n \r\n this.onChange(selection)}\r\n options={options}\r\n isOptionDisabled={() => formFieldDefinition.maxItems > 0 && selectedOptions.length >= formFieldDefinition.maxItems}\r\n value={selectedOptions}\r\n closeMenuOnSelect={false}\r\n classNamePrefix=\"react-select\"\r\n />\r\n {this.props.form.errors &&\r\n

{this.props.form.errors[0]}

\r\n }\r\n
\r\n );\r\n }\r\n}","import { Dropdown } from '../formcontrols/Dropdown'; \r\nimport { DropdownMultiple } from '../formcontrols/DropdownMultiple'; \r\nimport { Input } from '../formcontrols/Input'; \r\nimport { Radiostyled } from '../formcontrols/Radiostyled'; \r\nimport { Radio } from '../formcontrols/Radio'; \r\nimport { Checkbox } from '../formcontrols/Checkbox'; \r\nimport { MaskedInput } from '../formcontrols/MaskedInput'; \r\nimport { ReadOnly } from '../formcontrols/ReadOnly'; \r\nimport { Hidden } from '../formcontrols/Hidden'; \r\nimport { LinkField } from '../formcontrols/LinkField'; \r\nimport { PasswordInput } from '../formcontrols/Password';\r\nimport { Textarea } from '../formcontrols/Textarea';\r\nimport { StyledLinkBlocks } from '../formcontrols/StyledLinkBlocks';\r\nimport { RichTextEditor } from '../formcontrols/RichTextEditor';\r\nimport { FileUpload } from '../formcontrols/FileUpload';\r\nimport { DatePickerControl } from '../formcontrols/DatePicker';\r\nimport { ChooseLocation } from '../formcontrols/ChooseLocation';\r\nimport { Button } from '../formcontrols/Button';\r\nimport { Range } from '../formcontrols/Range';\r\nimport { Switch } from '../formcontrols/Switch';\r\nimport { EmailAddressList } from '../formcontrols/EmailAddressList';\r\nimport { QRCodeScanner } from '../formcontrols/QRCodeScanner';\r\nimport { ReCaptcha } from '../formcontrols/ReCaptcha';\r\nimport { CheckboxMultiple } from '../formcontrols/CheckboxMultiple';\r\nimport { DropdownMultiselect } from '../formcontrols/DropdownMultiselect';\r\n\r\nexport class FormControlsHelper {\r\n static getFormControlComponent(typeName: string) {\r\n const formControlComponentMap: { [key: string]: string } = {\r\n datepicker: 'DatePickerControl',\r\n dropdown: 'Dropdown',\r\n dropdownmultiple: 'DropdownMultiselect',\r\n radio: 'Radio',\r\n checkbox: 'Checkbox',\r\n checkboxMultiple: 'CheckboxMultiple',\r\n maskedtext: 'MaskedInput',\r\n readOnly: 'ReadOnly',\r\n hidden: 'Hidden',\r\n text: 'Input',\r\n link: 'LinkField',\r\n password: 'PasswordInput',\r\n textarea: 'Textarea',\r\n styledlinkblocks: 'StyledLinkBlocks',\r\n richtexteditor: 'RichTextEditor',\r\n fileupload: 'FileUpload',\r\n chooseLocation: 'ChooseLocation',\r\n button: 'Button',\r\n range: 'Range',\r\n emailaddresslist: 'EmailAddressList',\r\n switch: 'Switch',\r\n qrcodescanner: 'QRCodeScanner',\r\n 'radio-styled': 'Radiostyled',\r\n reCaptchaV2Invisible: 'ReCaptcha',\r\n dropdownMultiselect: 'DropdownMultiselect',\r\n };\r\n \r\n return formControlComponentMap[typeName];\r\n }\r\n}\r\n\r\nexport { \r\n ChooseLocation, Dropdown, DropdownMultiple, Input, Radiostyled, \r\n Radio, Checkbox, CheckboxMultiple, MaskedInput, ReadOnly, Hidden, LinkField,\r\n PasswordInput, Textarea, StyledLinkBlocks, RichTextEditor, \r\n FileUpload, DatePickerControl, Button, Range,\r\n EmailAddressList, Switch, QRCodeScanner, ReCaptcha, DropdownMultiselect\r\n};","import { KenticoValidatorUtils } from \"../kentico/KenticoUtils\";\r\n\r\nexport class FieldVisibilityHelpers {\r\n static isFormDefinedInConditionButNotEXistsInFormValues(condition : any, formValues: any) {\r\n return condition.form !== undefined && formValues[condition.form] === undefined;\r\n }\r\n\r\n static isFormDefinedInConditionButFieldDoesntExistInForm(condition : any, formValues: any) {\r\n return condition.form !== undefined && formValues[condition.form] !== undefined && \r\n formValues[condition.form][condition.fieldName] === undefined;\r\n }\r\n\r\n static isArrayConditionAndFieldValueDoesntExist(condition : any, formValues: any) {\r\n return (condition.form !== undefined && formValues[condition.form] !== undefined && \r\n condition.value instanceof Array &&\r\n (typeof formValues[condition.form][condition.fieldName] == \"string\") && \r\n condition.value.indexOf(formValues[condition.form][condition.fieldName]) < 0);\r\n }\r\n\r\n static isFieldValueNotEqualToConditionValue(condition : any, formValues: any) {\r\n return condition.form !== undefined && formValues[condition.form] !== undefined && \r\n !(condition.value instanceof Array) &&\r\n (typeof formValues[condition.form][condition.fieldName] == \"string\") && \r\n condition.value != formValues[condition.form][condition.fieldName];\r\n }\r\n\r\n static isFieldValueEmptyAndNotEmptyCondition(condition : any, formikBag: any) { \r\n return condition.form === undefined && \r\n (formikBag.values[condition.fieldName] === undefined || \r\n (condition.value == \"__NOTEMPTY__\" &&\r\n formikBag.values[condition.fieldName] == \"\")\r\n );\r\n }\r\n\r\n static isFieldObjectValueNotEqualToConditionValue(condition : any, formValues: any) {\r\n return condition.form !== undefined && formValues[condition.form] !== undefined && \r\n formValues[condition.form][condition.fieldName] instanceof Object && \r\n typeof condition.value == \"string\" &&\r\n condition.value != formValues[condition.form][condition.fieldName].value;\r\n }\r\n\r\n static isFormUndefinedOrCurrentFieldValueUndefinedOrEmpty(condition : any, formikBag: any) {\r\n return condition.form === undefined && \r\n (formikBag.values[condition.fieldName] === undefined || \r\n formikBag.values[condition.fieldName] == \"\");\r\n }\r\n\r\n static isArrayCondition(condition : any) {\r\n return condition.form === undefined && condition.value instanceof Array;\r\n }\r\n\r\n static isCurrentFieldValueNotInArrayCondition(condition : any, formikBag : any) {\r\n return (condition.value.indexOf(formikBag.values[condition.fieldName]) < 0);\r\n }\r\n\r\n static isCurrentFieldObjectValueNotEqualToConditionValue(condition : any, formikBag : any) {\r\n return condition.form === undefined && \r\n formikBag.values[condition.fieldName] instanceof Object && \r\n formikBag.values[condition.fieldName].value !== undefined && \r\n typeof condition.value == \"string\" &&\r\n condition.value != \"__NOTEMPTY__\" &&\r\n formikBag.values[condition.fieldName].value != condition.value;\r\n }\r\n\r\n static isCurrentFieldValueOfTypeStringWithSubstringCondition(condition : any, formikBag : any) {\r\n return condition.form === undefined && \r\n typeof formikBag.values[condition.fieldName] == \"string\" && \r\n typeof condition.value == \"string\" &&\r\n typeof condition.substring !== \"undefined\";\r\n }\r\n \r\n static isCurrentFieldValueNotEqualToConditionValue(condition : any, formikBag : any) {\r\n return condition.form === undefined && \r\n typeof formikBag.values[condition.fieldName] == \"string\" &&\r\n condition.value != \"__NOTEMPTY__\" && \r\n typeof condition.value == \"string\" &&\r\n formikBag.values[condition.fieldName] != condition.value;\r\n }\r\n\r\n static isNotEQConditionalConditionAndValuesAreEqual(condition : any, subValue : string) {\r\n return (condition.condition == \"NOTEQ\" &&\r\n condition.value != \"__NOTEMPTY__\" &&\r\n typeof condition.value == \"string\" && \r\n subValue.toLowerCase() == condition.value.toLowerCase());\r\n }\r\n \r\n static isEQConditionAndValuesAreNotEqual(condition : any, subValue : string) {\r\n return condition.condition == \"EQ\" &&\r\n condition.value != \"__NOTEMPTY__\" &&\r\n typeof condition.value == \"string\" &&\r\n subValue.toLowerCase() != condition.value.toLowerCase();\r\n }\r\n\r\n static checkKenticoVisibilityRule(condition: any, formikBag : any, formFieldDefinition : any, fieldsMapper : any) {\r\n\r\n let value = \"\";\r\n\r\n if (formikBag !== undefined && formikBag.values !== undefined && formikBag.values[formFieldDefinition.name] !== undefined) {\r\n if (formikBag.values[formFieldDefinition.name] !== undefined &&\r\n formikBag.values[formFieldDefinition.name] !== null && \r\n formikBag.values[formFieldDefinition.name].value !== undefined) {\r\n value = formikBag.values[formFieldDefinition.name].value || \"\";\r\n } else {\r\n value = formikBag.values[formFieldDefinition.name] || \"\";\r\n }\r\n } \r\n if (value === undefined) {\r\n value == \"\";\r\n }\r\n return condition.kenticoVisibilityFunction(fieldsMapper, value, KenticoValidatorUtils); \r\n }\r\n}\r\n","import * as Yup from 'yup';\r\nimport { KenticoValidatorUtils } from \"../kentico/KenticoUtils\";\r\nimport * as Moment from 'moment';\r\nimport * as Iban from 'iban';\r\nimport { FileNameHelpers } from '../helpers/FileNameHelpers';\r\nimport { getResourceString } from '../kentico/resource-strings';\r\nimport { FormLabelHelpers } from '../formcontrols/helpers/FormLabelHelpers';\r\nimport { StringHelpers } from '../helpers/StringHelpers';\r\n\r\nfunction hasOnlyNumbers(valueString : string) : boolean { \r\n let loop = 0;\r\n while (loop < valueString.length) {\r\n if ( valueString[loop] < '0' || valueString[loop] > '9') {\r\n return false;\r\n }\r\n loop++;\r\n }\r\n\r\n return true;\r\n }\r\n\r\nexport class ValidationHelpers {\r\n\r\n static addKenticoValidator(formFieldDefinition : any, validationSchemaShape: any, fieldDefinitions : any, formikBag : any) {\r\n \r\n if (formFieldDefinition.validation && formFieldDefinition.validation.required === undefined) {\r\n if (formikBag.values[formFieldDefinition.name] === \"\") {\r\n return true;\r\n }\r\n }\r\n\r\n let kenticoRules = formFieldDefinition.validation[\"kenticoRules\"];\r\n kenticoRules.rules.map((rule : any) => {\r\n\r\n validationSchemaShape[formFieldDefinition.name] = Yup.mixed().\r\n test('kenticoValidatie', rule[\"error\"], function (value) {\r\n let valueHelper : any = this;\r\n let fieldsMapper = {};\r\n fieldDefinitions.map((fieldDefinition) => {\r\n if (fieldDefinition.id !== undefined) {\r\n Object.defineProperty(fieldsMapper, fieldDefinition.id, {\r\n get: () => {\r\n return {\r\n Value: formikBag.values[fieldDefinition.name]\r\n };\r\n }\r\n });\r\n }\r\n });\r\n\r\n if (!rule.validationFunction( fieldsMapper,\r\n value, \r\n KenticoValidatorUtils)) {\r\n return false;\r\n }\r\n return true;\r\n \r\n });\r\n });\r\n }\r\n\r\n static addLidNrValidator(formFieldDefinition : any, validationSchemaShape: any, dataType : any) {\r\n validationSchemaShape[formFieldDefinition.name] = Yup.string().typeError(dataType.error)\r\n .transform(function(value, originalvalue) {\r\n if (originalvalue == \"\") {\r\n return value;\r\n }\r\n let left2Numbers = originalvalue.substr(0, 2);\r\n if (hasOnlyNumbers(originalvalue) && (['01', '02', '03', '15', '17', '30'].indexOf(left2Numbers) >= 0)) {\r\n return value;\r\n }\r\n return new Date('');\r\n });\r\n }\r\n\r\n static addNumberValidator(formFieldDefinition : any, validationSchemaShape: any, dataType : any) {\r\n\r\n let schema = Yup.lazy((value) => {\r\n if (value === '') {\r\n return Yup.string();\r\n } \r\n let numberSchema = Yup.number();\r\n\r\n if (!!dataType.allowDecimals) {\r\n numberSchema = numberSchema.transform((_, value) => {\r\n if (value.includes('.')) {\r\n return null;\r\n }\r\n return +value.replace(/,/, '.');\r\n });\r\n }\r\n\r\n if (dataType.min !== undefined && dataType.max !== undefined) { \r\n numberSchema = numberSchema\r\n .min(dataType.min, dataType.minmaxerror)\r\n .max(dataType.max, dataType.minmaxerror)\r\n .typeError(dataType.error);\r\n } else {\r\n numberSchema = numberSchema.typeError(dataType.error);\r\n }\r\n return numberSchema;\r\n });\r\n \r\n validationSchemaShape[formFieldDefinition.name] = schema;\r\n }\r\n\r\n static addMaxAgeCheckValidator(formFieldDefinition : any, validationSchemaShape: any, dataType : any) {\r\n\r\n validationSchemaShape[formFieldDefinition.name] = Yup.mixed().test(\"geboortedatum lid worden formulier\", \"default error\", function (value) {\r\n let date = Moment(value, [\"YYYY-MM-DDTHH-mm-ss\", \"DD-MM-YYYY\"]);\r\n \r\n if (date.isValid()) {\r\n if (typeof dataType.maxage !== \"undefined\") {\r\n var age = Moment().diff(date, 'years');\r\n if (dataType.maxage && dataType.maxage > 0 && age < dataType.maxage &&\r\n dataType.minage && dataType.minage > 0 && age >= dataType.minage) {\r\n return this.createError({ path: \"\", message: dataType.error});\r\n } else\r\n if ((dataType.minage && dataType.minage > 0 && age < dataType.minage) || (date.year() < parseInt(dataType.minyear))) {\r\n return this.createError({ path: \"\", message: dataType.minageerror});\r\n }\r\n \r\n }\r\n return true;\r\n } else {\r\n const isRequired = formFieldDefinition.validation['required'] !== undefined;\r\n if (isRequired && value === \"\") {\r\n return this.createError({ \r\n path: \"\", \r\n message: StringHelpers.formFieldRequiredFieldErrorMessage(FormLabelHelpers.getLabelWithoutAsterisk(formFieldDefinition.label))\r\n });\r\n }\r\n } \r\n });\r\n \r\n }\r\n\r\n static addDateValidator(formFieldDefinition : any, validationSchemaShape: any, dataType : any) {\r\n\r\n let existingSchema;\r\n if (validationSchemaShape[formFieldDefinition.name]) {\r\n existingSchema = validationSchemaShape[formFieldDefinition.name];\r\n }\r\n\r\n validationSchemaShape[formFieldDefinition.name] = Yup.date().typeError(dataType.error)\r\n .transform(function(value, originalvalue) {\r\n\r\n let isRequired = formFieldDefinition.validation['required'] !== undefined;\r\n\r\n if (!isRequired && (originalvalue === \"\" || originalvalue == \"0001-01-01T00:00:00\")) {\r\n // dit is nodig om lege datum velden (die niet verplicht zijn) mogelijk te maken\r\n return new Date();\r\n }\r\n if (this.isType(originalvalue)) return value;\r\n \r\n let date = Moment(originalvalue, [\"YYYY-MM-DDTHH-mm-ss\", \"DD-MM-YYYY\"]);\r\n \r\n if (date.isValid()) {\r\n if (typeof dataType.minage !== \"undefined\") {\r\n var age = Moment().diff(date, 'years');\r\n if (dataType.minage && dataType.minage > 0 && age < dataType.minage) {\r\n return new Date('');\r\n }\r\n }\r\n\r\n if (typeof dataType.minyear !== \"undefined\") {\r\n if (date.year() < parseInt(dataType.minyear)) {\r\n return new Date('');\r\n }\r\n }\r\n\r\n return date.toDate();\r\n }\r\n return new Date('');\r\n }); \r\n }\r\n\r\n static addIbanValidator(formFieldDefinition : any, validationSchemaShape: any, dataType : any) {\r\n validationSchemaShape[formFieldDefinition.name] = Yup.string().typeError(dataType.error)\r\n .transform(function(value, originalvalue) {\r\n if (Iban.isValid(originalvalue)) {\r\n return originalvalue;\r\n }\r\n return new Date(''); // hack to return invalid value\r\n });\r\n }\r\n\r\n static addZipcodeValidator(formFieldDefinition : any, validationSchemaShape: any, dataType : any) {\r\n validationSchemaShape[formFieldDefinition.name] = Yup.string().typeError(dataType.error)\r\n .transform(function(value, originalvalue) {\r\n if (originalvalue == \"\") {\r\n return value;\r\n }\r\n\r\n var regex = /^[1-9][0-9]{3}(?!sa|sd|ss)[a-z]{2}$/i;\r\n\r\n if (regex.test(originalvalue) && originalvalue.length == 6) {\r\n return originalvalue;\r\n }\r\n return new Date(''); // hack to return invalid value\r\n });\r\n }\r\n\r\n static addCheckboxValidator(formFieldDefinition : any, validationSchemaShape: any) {\r\n validationSchemaShape[formFieldDefinition.name] = validationSchemaShape[formFieldDefinition.name].matches(/(true)/, formFieldDefinition.validation[\"required\"].error);\r\n }\r\n\r\n static addFileUploadValidator(formFieldDefinition : any, validationSchemaShape: any) {\r\n validationSchemaShape[formFieldDefinition.name] = Yup.mixed()\r\n .test(\r\n \"fileSize\",\r\n formFieldDefinition.maxUploadSizeKBError || \"File too large\",\r\n value => ((value && value.size <= formFieldDefinition.maxUploadSizeKB * 1024) || \r\n !value || \r\n !formFieldDefinition.maxUploadSizeKB)\r\n )\r\n .test(\r\n \"fileFormat\",\r\n formFieldDefinition.fileFormatsError || StringHelpers.formFieldUnsupportedFormatFieldErrorMessage(FormLabelHelpers.getLabelWithoutAsterisk(formFieldDefinition.label)) || \"Unsupported Format\",\r\n value => {\r\n let fileNameToSplit = \"\";\r\n if (typeof value !== \"string\") {\r\n fileNameToSplit = value.name || \"\";\r\n } else {\r\n fileNameToSplit = value;\r\n }\r\n \r\n const fileExtension = value ? FileNameHelpers.getFileNameExtensionUppercase(fileNameToSplit || \"\") : \"\";\r\n if (value == \"\") {\r\n return true;\r\n }\r\n return (value && ((formFieldDefinition.fileFormats || []).indexOf(fileExtension.toLowerCase()) >= 0) || \r\n (formFieldDefinition.fileFormats || []).length == 0 || \r\n !value\r\n );\r\n }\r\n );\r\n\r\n let isRequired = formFieldDefinition.validation['required'] !== undefined; \r\n if (isRequired) {\r\n validationSchemaShape[formFieldDefinition.name] = validationSchemaShape[formFieldDefinition.name].test(\r\n \"fileRequired\",\r\n StringHelpers.formFieldRequiredFieldErrorMessage(FormLabelHelpers.getLabelWithoutAsterisk(formFieldDefinition.label)),\r\n value => {\r\n if (value === \"\") {\r\n return false;\r\n }\r\n return value ? value.name !== undefined && value.name != \"\" : false;\r\n }\r\n );\r\n }\r\n }\r\n\r\n static addMaxSizeValidator(formFieldDefinition : any, validationSchemaShape: any) {\r\n if (formFieldDefinition.maxSize) {\r\n validationSchemaShape[formFieldDefinition.name] = Yup.string().max(formFieldDefinition.maxSize, getResourceString(\"Form.Error.MaxLength\") || formFieldDefinition.maxSizeError || \"Maximale lengte overschreden\");\r\n }\r\n }\r\n}","import * as $ from 'jquery';\r\nimport * as React from \"react\";\r\nimport ReactHtmlParser from 'react-html-parser';\r\nimport { Link } from \"react-router-dom\";\r\n\r\nexport class FormControllerHelper {\r\n static showOrHideBlockOnSummarySteps(pageWithOnly1Step: boolean, isSummaryStep: boolean) {\r\n if (pageWithOnly1Step !== undefined && \r\n isSummaryStep && \r\n !pageWithOnly1Step) {\r\n $(`.mijn-fnv .mainBlock .mijn-fnv-form__content-block, \r\n .mijn-fnv .mainBlock .content__callout--widget`).addClass(\"hidden\");\r\n } else {\r\n $(`.mijn-fnv .mainBlock .mijn-fnv-form__content-block, \r\n .mijn-fnv .mainBlock .content__callout--widget`).removeClass(\"hidden\");\r\n }\r\n }\r\n\r\n static renderSummaryIntro(summaryIntro) {\r\n const summaryIntroElement = ReactHtmlParser(summaryIntro, {\r\n transform: (node, index) => {\r\n if (node.type === 'tag' && node.name === 'a' && node.attribs && node.attribs[\"data-mijnfnv-link\"]) {\r\n return {node.children.map((nodeChild, childrenIndex) => {\r\n return {nodeChild.data && nodeChild.type == \"text\" ? nodeChild.data : null};\r\n })};\r\n }\r\n }});\r\n\r\n return
{summaryIntroElement}
;\r\n }\r\n\r\n static showOrHideBackLink(isVisible : boolean) {\r\n if (isVisible) {\r\n $(\".link__back-to-mijnfnv\").removeClass(\"hidden\");\r\n } else {\r\n $(\".link__back-to-mijnfnv\").addClass(\"hidden\");\r\n }\r\n } \r\n\r\n static getFieldsMapper(formFieldDefinitions: any, formController : any, formValues: any, formDefinitions : any) {\r\n let fieldsMapper = {}; \r\n \r\n // TODO : code minimaliseren met functies\r\n (formFieldDefinitions || []).map((fieldDefinition) => {\r\n if (fieldDefinition.id !== undefined && !fieldsMapper[fieldDefinition.id]) {\r\n Object.defineProperty(fieldsMapper, fieldDefinition.id, {\r\n get: () => {\r\n if (formController._formikBag && formController._formikBag.values) {\r\n const valueObject = formController._formikBag.values[fieldDefinition.name];\r\n\r\n if (valueObject === undefined) {\r\n return {\r\n Value : \"\"\r\n };\r\n }\r\n\r\n let value : any = \"\";\r\n if (valueObject !== null && valueObject !== undefined) {\r\n if (valueObject.value !== undefined) {\r\n value = valueObject.value || \"\";\r\n } else {\r\n value = valueObject || \"\";\r\n }\r\n }\r\n\r\n // workaround for kentico macro evaluation of booleans via Fields[...].Value\r\n if (value === true) {\r\n value = \"True\";\r\n }\r\n if (value === false) {\r\n value = \"False\";\r\n }\r\n return {\r\n Value: value\r\n };\r\n } else {\r\n return {\r\n Value: \"\"\r\n };\r\n } \r\n }\r\n });\r\n\r\n if(fieldsMapper[fieldDefinition.name] === undefined){\r\n Object.defineProperty(fieldsMapper, fieldDefinition.name, {\r\n get: () => {\r\n // TODO : refactor naar method\r\n if (formController._formikBag && formController._formikBag.values) {\r\n const valueObject : any = formController._formikBag.values[fieldDefinition.name];\r\n \r\n let value : any = \"\";\r\n if (valueObject !== null && valueObject !== undefined) {\r\n if (valueObject.value !== undefined) {\r\n value = valueObject.value || \"\";\r\n } else {\r\n value = valueObject || \"\";\r\n }\r\n }\r\n\r\n // workaround for kentico macro evaluation of booleans via Fields[...].Value\r\n if (value === true || value === \"true\") {\r\n value = \"True\";\r\n }\r\n if (value === false || value === \"false\") {\r\n value = \"False\";\r\n }\r\n\r\n return {\r\n Value: value\r\n };\r\n } else {\r\n return {\r\n Value: \"\"\r\n };\r\n }\r\n }\r\n });\r\n }\r\n }\r\n });\r\n\r\n for (let form in formDefinitions) {\r\n if (formDefinitions.hasOwnProperty(form)) {\r\n\r\n formDefinitions[form].map((fieldDefinition) => {\r\n if (fieldsMapper[fieldDefinition.name] === undefined && \r\n formValues[form] !== undefined &&\r\n formValues[form][fieldDefinition.name] !== undefined) { \r\n \r\n Object.defineProperty(fieldsMapper, fieldDefinition.name, {\r\n get: () => {\r\n // TODO : refactor naar method\r\n const valueObject : any = formValues[form][fieldDefinition.name];\r\n if (valueObject === undefined) {\r\n return {\r\n Value : \"\"\r\n };\r\n }\r\n let value : any = \"\";\r\n if (valueObject !== null && valueObject !== undefined) {\r\n if (valueObject.value !== undefined) {\r\n value = valueObject.value || \"\";\r\n } else {\r\n value = valueObject || \"\";\r\n }\r\n }\r\n\r\n // workaround for kentico macro evaluation of booleans via Fields[...].Value\r\n if (value === true || value === \"true\") {\r\n value = \"True\";\r\n }\r\n if (value === false || value === \"false\") {\r\n value = \"False\";\r\n }\r\n \r\n return {\r\n Value: value\r\n };\r\n }\r\n });\r\n }\r\n });\r\n }\r\n } \r\n\r\n return fieldsMapper;\r\n }\r\n}","import * as React from 'react';\r\nimport * as sanitizeHtml from 'sanitize-html';\r\n\r\nconst defaultOptions = {\r\n allowedTags: [ 'br', 'a' ],\r\n allowedAttributes: {\r\n 'a': [ 'href', 'class', 'target' ]\r\n },\r\n};\r\n\r\nconst sanitize = (html: string, options: sanitizeHtml.IOptions) => ({\r\n __html: sanitizeHtml(\r\n html, \r\n options = {...defaultOptions, ...options}\r\n )\r\n});\r\n\r\nexport const SanitizeHTML = ({ html, options = defaultOptions }) => (\r\n
\r\n);\r\n","import * as React from 'react';\r\nimport { Prompt } from 'react-router';\r\nimport { Link } from \"react-router-dom\";\r\nimport ReactHtmlParser from 'react-html-parser';\r\n\r\nimport { Formik, FormikProps, Form, Field, FieldProps } from 'formik';\r\nimport * as Yup from 'yup';\r\nimport { Debugger } from '@fnv-core/debugging';\r\nimport { Slug } from '@fnv-core/utils';\r\nimport ScrollToError from '../presentational/ScrollToError';\r\nimport { DisplayFormikState } from '../presentational/DisplayFormik';\r\nimport { FormControlsHelper } from \"../presentational/FormControls\";\r\nimport * as FormControls from \"../presentational/FormControls\";\r\nimport { FieldVisibilityHelpers } from \"../helpers/FieldVisibilityHelpers\";\r\nimport { ValidationHelpers } from \"../helpers/ValidationHelpers\";\r\nimport { KenticoValidatorUtils } from \"../kentico/KenticoUtils\";\r\nimport { FormControllerHelper } from './helpers/FormControllerHelper';\r\nimport { FrontendDashboardPageType } from '../constants/Constants';\r\nimport { FormService } from '../services/FormService';\r\nimport { PopoverService } from '../services/PopoverService';\r\nimport { PrintViewService } from '../services/PrintViewService';\r\nimport { StringHelpers } from '../helpers/StringHelpers';\r\nimport { DatasourceOptionsService } from '../services/DatasourceOptionsService';\r\nimport { FormLabelHelpers } from '../formcontrols/helpers/FormLabelHelpers';\r\nimport { MijnFNVPageContext } from '../presentational/pages/helpers/MijnFNVPageContext';\r\n\r\nimport { getAllUrlParams } from '../../jslibs/urlparams';\r\nimport { getResourceString } from '../kentico/resource-strings';\r\nimport { IFormFieldDefinition, IVisibilityCondition } from \"../interfaces/Fields\";\r\nimport { SanitizeHTML } from \"../helpers/SanitizeHtmlHelper\";\r\nimport { IFormConfig } from '../interfaces/FormConfig';\r\n\r\ninterface onSubmitFunction {\r\n (values : any, includeCurrentValues? : boolean, onlySaveForm? : boolean) : void;\r\n}\r\n\r\ninterface gotoPreviousStepFunction {\r\n (values: any) : void;\r\n}\r\n\r\n\r\ninterface onRenderCustomFieldFunction {\r\n (renderCustomField : any, formController: any, formikBag: any) : any;\r\n}\r\n\r\ninterface onRenderFormErrorFunction {\r\n () : any;\r\n}\r\n\r\nexport interface FormProps { \r\n formDefinitions: { [key: string]: IFormFieldDefinition[] }[];\r\n formName : string;\r\n formCMSName : string;\r\n onSubmit : onSubmitFunction;\r\n initialValues : any;\r\n renderCustomField: onRenderCustomFieldFunction;\r\n stepIndex: number;\r\n onGotoPreviousStep : gotoPreviousStepFunction;\r\n formValues : any;\r\n formConfig : IFormConfig;\r\n isSummaryStep : boolean;\r\n isSubmitStep : boolean;\r\n isSubmitting : boolean;\r\n readOnly : boolean;\r\n additionalCssClass: string;\r\n withLinkToFormPage? : boolean;\r\n linkFormPage? : string;\r\n linkText? : string;\r\n pageType: 'dashboard' | 'view' | 'edit';\r\n summaryIntro?: string;\r\n onSuccessPopupMessage?: string;\r\n onSuccessPopupMessageVisualCheck?: string;\r\n pageWithOnly1Step?: boolean;\r\n renderFormError?: onRenderFormErrorFunction;\r\n layoutType: string;\r\n isShowPollResults : boolean;\r\n pollResults: any;\r\n\r\n onSubmitSuccessButton1Link? : string;\r\n onSubmitSuccessButton1LinkText? : string;\r\n\r\n onSubmitSuccessButton2Link? : string;\r\n onSubmitSuccessButton2LinkText? : string;\r\n\r\n isPrintView? : boolean;\r\n wasOnSummaryStep? : boolean;\r\n visitedSteps?: any;\r\n includeCurrentPageAsBackAndSubmitUrl? : boolean;\r\n backTitleForCurrentPageBackLink? : string;\r\n\r\n formContainer? : any;\r\n\r\n onStoreValues? : (values: any) => void;\r\n\r\n steps: any;\r\n\r\n onFieldChange? : (formName: string, fieldName : string, value : any) => void;\r\n\r\n onCancelForm? : () => void;\r\n\r\n onSummaryBackToStepClick : (formName: string, event: any) => void;\r\n}\r\n\r\nexport interface FormControllerState {\r\n isSetEditFieldsToReadonly : boolean;\r\n collapsableState : any;\r\n}\r\n\r\nexport interface IForm {\r\n validationRules: any;\r\n fieldMapper: any;\r\n}\r\n\r\nexport class FormController extends React.Component {\r\n\r\n form: IForm;\r\n state: FormControllerState = {\r\n isSetEditFieldsToReadonly : false,\r\n collapsableState : {}\r\n };\r\n\r\n private _promptLeaveMessage = getResourceString(\"Form.Save.Warning\");\r\n private _formikBag: FormikProps = {} as FormikProps;\r\n\r\n constructor(props: FormProps) {\r\n super(props); \r\n\r\n this.validateField = this.validateField.bind(this);\r\n this.gotoPreviousStep = this.gotoPreviousStep.bind(this);\r\n this.isFieldVisible = this.isFieldVisible.bind(this);\r\n\r\n // TODO : create field yup-validations && fieldMapper\r\n \r\n this.form = {\r\n validationRules : {},\r\n fieldMapper : {}\r\n };\r\n\r\n PrintViewService.setPrintView(props.isPrintView || false);\r\n }\r\n\r\n revalidateForm = () : void => {\r\n\r\n // set all fields touched that have a value\r\n const touchedFields = Object.keys(this._formikBag.values).reduce((acc, field) => {\r\n if (this._formikBag.values[field]) {\r\n acc[field] = true;\r\n }\r\n return acc;\r\n }, {});\r\n \r\n // Set all filled fields as touched\r\n this._formikBag.setTouched(touchedFields, false);\r\n \r\n this._formikBag.validateForm();\r\n };\r\n\r\n componentDidMount() {\r\n \r\n FormService.setFormConfig(this.props.formDefinitions, this.props.formConfig);\r\n\r\n let formDefinition: IFormFieldDefinition[] = this.props.formDefinitions[this.props.formName];\r\n\r\n if (formDefinition) {\r\n formDefinition.map((formFieldDefinition, index) => { \r\n\r\n let fieldType = formFieldDefinition.type; \r\n\r\n if (this.props.readOnly) {\r\n if ((fieldType !== \"custom\") && (fieldType !== \"link\")) {\r\n if (!this.state.isSetEditFieldsToReadonly) {\r\n this.setState({isSetEditFieldsToReadonly : true});\r\n }\r\n }\r\n }\r\n\r\n if (formFieldDefinition.isDependentField) {\r\n this.setState({[formFieldDefinition.name] : \"\"} as any);\r\n }\r\n });\r\n }\r\n \r\n FormService.callFormRelatedDataCallback(\"\", this.props.formName, {});\r\n }\r\n\r\n unmounted : boolean = false;\r\n componentWillUnmount() {\r\n this.unmounted = true;\r\n }\r\n\r\n setPayload = (payload: any) => {\r\n if (this.props.formContainer) {\r\n this.props.formContainer.setPayload(payload);\r\n } \r\n }\r\n\r\n getPayload = () => {\r\n if (this.props.formContainer) {\r\n return this.props.formContainer.getPayload();\r\n } \r\n return {};\r\n }\r\n\r\n hasFormEditableControlsThatWereSetToDisabled(formikBag: FormikProps) {\r\n const formDefinition: IFormFieldDefinition[] = this.props.formDefinitions[this.props.formName];\r\n\r\n // Check if there is a field that is enabled, visible, and of an editable type\r\n const result = formDefinition.some((formFieldDefinition: IFormFieldDefinition) => { \r\n\r\n const fieldType = formFieldDefinition.type;\r\n let isRealReadOnlyField = false; \r\n\r\n if (formFieldDefinition.enabledCondition) {\r\n if (!formFieldDefinition.enabledCondition.kenticoMacroFunction(this.form.fieldMapper, formikBag.values[formFieldDefinition.name] || \"\", KenticoValidatorUtils)) {\r\n if ((fieldType != \"custom\") && (fieldType !== \"link\")) {\r\n isRealReadOnlyField = true; \r\n }\r\n }\r\n }\r\n\r\n let visible = true;\r\n \r\n if (formFieldDefinition.visibilityCondition) {\r\n formFieldDefinition.visibilityCondition.map((condition) => {\r\n if (!this.isFieldVisible(formikBag, condition, formFieldDefinition)) {\r\n visible = false;\r\n } \r\n }); \r\n }\r\n\r\n if (this.props.readOnly && visible && !isRealReadOnlyField) {\r\n if ((fieldType !== \"custom\") && (fieldType !== \"link\") && (fieldType !== \"title\") && (fieldType !== \"submit\")) {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n });\r\n\r\n return result;\r\n }\r\n\r\n hasFormEditableControls(formikBag : any) {\r\n let formDefinition : Array = this.props.formDefinitions[this.props.formName];\r\n let result = formDefinition.some((formFieldDefinition: any, index) => { \r\n\r\n let fieldType = formFieldDefinition.type;\r\n let isFieldEnabled = true; \r\n if (formFieldDefinition.enabledCondition !== undefined) {\r\n if (!formFieldDefinition.enabledCondition.kenticoMacroFunction(this.form.fieldMapper, formikBag.values[formFieldDefinition.name] || \"\", KenticoValidatorUtils)) {\r\n isFieldEnabled = false; \r\n }\r\n }\r\n\r\n if (formFieldDefinition.disabled) {\r\n if (formFieldDefinition.disabled === \"true\") {\r\n isFieldEnabled = false; \r\n }\r\n }\r\n\r\n if ((fieldType === \"custom\") || (fieldType === \"link\")) {\r\n isFieldEnabled = false;\r\n }\r\n\r\n let visible = true;\r\n \r\n if (formFieldDefinition.visibilityCondition !== undefined && formFieldDefinition.visibilityCondition.length > 0) {\r\n formFieldDefinition.visibilityCondition.map((condition : any) => {\r\n if (!this.isFieldVisible(formikBag, condition, formFieldDefinition)) {\r\n visible = false;\r\n } \r\n }); \r\n }\r\n\r\n if (visible && isFieldEnabled) {\r\n if ((fieldType !== \"title\") && (fieldType !== \"submit\")) {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n });\r\n\r\n return result;\r\n }\r\n\r\n hasFormOnlyNonRequiredControls(formikBag : any) {\r\n let formDefinition : Array = this.props.formDefinitions[this.props.formName];\r\n let result = true;\r\n formDefinition.forEach((formFieldDefinition: any, index) => { \r\n\r\n let fieldType = formFieldDefinition.type;\r\n let isFieldEnabled = true; \r\n if (formFieldDefinition.enabledCondition !== undefined) {\r\n if (!formFieldDefinition.enabledCondition.kenticoMacroFunction(this.form.fieldMapper, formikBag.values[formFieldDefinition.name] || \"\", KenticoValidatorUtils)) {\r\n isFieldEnabled = false; \r\n }\r\n }\r\n\r\n if (formFieldDefinition.disabled) {\r\n if (formFieldDefinition.disabled === \"true\") {\r\n isFieldEnabled = false; \r\n }\r\n }\r\n\r\n if ((fieldType === \"custom\") || (fieldType === \"link\")) {\r\n isFieldEnabled = false;\r\n }\r\n\r\n let visible = true;\r\n \r\n if (formFieldDefinition.visibilityCondition !== undefined && formFieldDefinition.visibilityCondition.length > 0) {\r\n formFieldDefinition.visibilityCondition.map((condition : any) => {\r\n if (!this.isFieldVisible(formikBag, condition, formFieldDefinition)) {\r\n visible = false;\r\n } \r\n }); \r\n }\r\n\r\n if (visible && isFieldEnabled) {\r\n if ((fieldType !== \"title\") && (fieldType !== \"submit\")) {\r\n let isRequired = formFieldDefinition.validation['required'] !== undefined;\r\n if (isRequired) {\r\n result = false;\r\n }\r\n }\r\n }\r\n });\r\n\r\n return result;\r\n }\r\n\r\n isFormDirty(formikBag : any) {\r\n let formDefinition : Array = this.props.formDefinitions[this.props.formName];\r\n let result = false;\r\n formDefinition.map((formFieldDefinition: any, index) => { \r\n\r\n let fieldType = formFieldDefinition.type;\r\n let isFieldEnabled = true; \r\n if (formFieldDefinition.enabledCondition !== undefined) {\r\n if (!formFieldDefinition.enabledCondition.kenticoMacroFunction(this.form.fieldMapper, formikBag.values[formFieldDefinition.name] || \"\", KenticoValidatorUtils)) {\r\n isFieldEnabled = false; \r\n }\r\n }\r\n\r\n if (formFieldDefinition.disabled) {\r\n if (formFieldDefinition.disabled === \"true\") {\r\n isFieldEnabled = false; \r\n }\r\n }\r\n\r\n if ((fieldType === \"custom\") || (fieldType === \"link\")) {\r\n isFieldEnabled = false;\r\n }\r\n\r\n let visible = true;\r\n \r\n if (formFieldDefinition.visibilityCondition !== undefined && formFieldDefinition.visibilityCondition.length > 0) {\r\n formFieldDefinition.visibilityCondition.forEach((condition : any) => {\r\n if (!this.isFieldVisible(formikBag, condition, formFieldDefinition)) {\r\n visible = false;\r\n } \r\n }); \r\n }\r\n\r\n if (visible && isFieldEnabled) {\r\n if ((fieldType !== \"title\") && (fieldType !== \"submit\")) {\r\n if (formikBag.values[formFieldDefinition.name] != formikBag.initialValues[formFieldDefinition.name]) {\r\n result = true;\r\n }\r\n }\r\n }\r\n });\r\n\r\n return result;\r\n }\r\n\r\n gotoPreviousStep(event) {\r\n event.preventDefault();\r\n\r\n if (!!this.props.formConfig.storeFormWhenStepBack) {\r\n this.submitToContainer(this._formikBag.values, false);\r\n } else {\r\n if (!this.props.isSubmitting && \r\n !this.props.isSubmitStep && \r\n this.props.formConfig.leavePageProtection) { \r\n if (!confirm(this.props.formConfig.leavePageProtectionMessage || this._promptLeaveMessage)) {\r\n return false;\r\n } \r\n }\r\n }\r\n \r\n this.props.onGotoPreviousStep(this._formikBag.values);\r\n return false;\r\n }\r\n\r\n isFieldVisible(formikBag: FormikProps, condition: IVisibilityCondition, formFieldDefinition: IFormFieldDefinition) : boolean {\r\n\r\n let visible = true;\r\n if (condition.type !== undefined) {\r\n if (condition.type === \"visibility\") {\r\n visible = condition.visible;\r\n } else if (!FieldVisibilityHelpers.checkKenticoVisibilityRule(condition, formikBag, formFieldDefinition, this.form.fieldMapper)) {\r\n visible = false;\r\n }\r\n } else\r\n if (FieldVisibilityHelpers.isFormDefinedInConditionButNotEXistsInFormValues(condition, this.props.formValues) || \r\n FieldVisibilityHelpers.isFormDefinedInConditionButFieldDoesntExistInForm(condition, this.props.formValues) ||\r\n FieldVisibilityHelpers.isArrayConditionAndFieldValueDoesntExist(condition, this.props.formValues) ||\r\n FieldVisibilityHelpers.isFieldValueNotEqualToConditionValue(condition, this.props.formValues) ||\r\n FieldVisibilityHelpers.isFieldObjectValueNotEqualToConditionValue(condition, this.props.formValues) ||\r\n FieldVisibilityHelpers.isFormUndefinedOrCurrentFieldValueUndefinedOrEmpty(condition, formikBag) ||\r\n FieldVisibilityHelpers.isCurrentFieldObjectValueNotEqualToConditionValue(condition, formikBag) ||\r\n FieldVisibilityHelpers.isCurrentFieldValueNotEqualToConditionValue(condition, formikBag) ||\r\n FieldVisibilityHelpers.isFieldValueEmptyAndNotEmptyCondition(condition, formikBag) \r\n ) {\r\n visible = false; \r\n } else if (FieldVisibilityHelpers.isArrayCondition(condition)) {\r\n if (FieldVisibilityHelpers.isCurrentFieldValueNotInArrayCondition(condition, formikBag)) {\r\n visible = false;\r\n }\r\n } else if (FieldVisibilityHelpers.isCurrentFieldValueOfTypeStringWithSubstringCondition(condition, formikBag)) { \r\n const subStringValue = (formikBag.values[condition.fieldName] as string).substring(condition.substring.start, condition.substring.end);\r\n \r\n if (FieldVisibilityHelpers.isNotEQConditionalConditionAndValuesAreEqual(condition, subStringValue)) {\r\n visible = false;\r\n }\r\n\r\n if (FieldVisibilityHelpers.isEQConditionAndValuesAreNotEqual(condition, subStringValue)) {\r\n visible = false;\r\n }\r\n }\r\n\r\n return visible;\r\n }\r\n\r\n createValidationShape(formFieldDefinition : any, validationSchemaShape : any, extraValidationRules? : any) {\r\n \r\n \r\n if (formFieldDefinition.validation !== undefined && formFieldDefinition.validation[\"dataType\"] !== undefined) {\r\n let dataType = formFieldDefinition.validation[\"dataType\"];\r\n\r\n if (dataType.kind == \"lidnr\") {\r\n ValidationHelpers.addLidNrValidator(formFieldDefinition, validationSchemaShape, dataType);\r\n } else\r\n if (dataType.kind == \"number\") {\r\n ValidationHelpers.addNumberValidator(formFieldDefinition, validationSchemaShape, dataType);\r\n } else\r\n if (dataType.kind == \"date\") {\r\n ValidationHelpers.addDateValidator(formFieldDefinition, validationSchemaShape, dataType);\r\n } else\r\n if (dataType.kind == \"iban\") {\r\n ValidationHelpers.addIbanValidator(formFieldDefinition, validationSchemaShape, dataType);\r\n } else\r\n if (dataType.kind == \"postcodenl\") {\r\n\r\n let doZipcodeValidation = true;\r\n if (formFieldDefinition.enableMaskConditions !== undefined) {\r\n if (!formFieldDefinition.enableMaskConditions.kenticoMacroFunction(\r\n this.form.fieldMapper, \r\n \"\", \r\n KenticoValidatorUtils)) {\r\n doZipcodeValidation = false;\r\n }\r\n }\r\n\r\n if (doZipcodeValidation) {\r\n ValidationHelpers.addZipcodeValidator(formFieldDefinition, validationSchemaShape, dataType);\r\n } else {\r\n validationSchemaShape[formFieldDefinition.name] = Yup.string();\r\n }\r\n }\r\n } \r\n else {\r\n validationSchemaShape[formFieldDefinition.name] = Yup.string();\r\n }\r\n\r\n if (formFieldDefinition.type == \"checkbox\" && formFieldDefinition.validation !== undefined && formFieldDefinition.validation[\"required\"] !== undefined) {\r\n ValidationHelpers.addCheckboxValidator(formFieldDefinition, validationSchemaShape);\r\n }\r\n if (formFieldDefinition.type == \"fileupload\") {\r\n ValidationHelpers.addFileUploadValidator(formFieldDefinition, validationSchemaShape);\r\n }\r\n if (formFieldDefinition.type == \"richtexteditor\") {\r\n ValidationHelpers.addMaxSizeValidator(formFieldDefinition, validationSchemaShape);\r\n }\r\n\r\n if (formFieldDefinition.validation !== undefined && formFieldDefinition.validation[\"ageCheck\"] !== undefined) {\r\n ValidationHelpers.addMaxAgeCheckValidator(formFieldDefinition, validationSchemaShape, formFieldDefinition.validation[\"ageCheck\"]);\r\n } \r\n\r\n for (const validationRuleKey in formFieldDefinition.validation) {\r\n if (validationRuleKey !== \"dataType\" && formFieldDefinition.validation.hasOwnProperty(validationRuleKey)) { \r\n if (validationSchemaShape[formFieldDefinition.name] !== undefined && \r\n validationSchemaShape[formFieldDefinition.name][validationRuleKey] !== undefined) {\r\n\r\n validationSchemaShape[formFieldDefinition.name] = \r\n validationSchemaShape[formFieldDefinition.name][validationRuleKey](formFieldDefinition.validation[validationRuleKey].error);\r\n\r\n }\r\n }\r\n }\r\n\r\n if (extraValidationRules) {\r\n for (const validationRuleKey in extraValidationRules) {\r\n if (validationRuleKey !== \"dataType\" && extraValidationRules.hasOwnProperty(validationRuleKey)) { \r\n if (validationSchemaShape[formFieldDefinition.name] !== undefined && \r\n validationSchemaShape[formFieldDefinition.name][validationRuleKey] !== undefined) {\r\n \r\n validationSchemaShape[formFieldDefinition.name] = \r\n validationSchemaShape[formFieldDefinition.name][validationRuleKey](extraValidationRules[validationRuleKey].error);\r\n \r\n }\r\n }\r\n }\r\n }\r\n\r\n return validationSchemaShape;\r\n }\r\n\r\n validateField(formFieldDefinition : any, formikBag : any) {\r\n this._formikBag = formikBag;\r\n\r\n try {\r\n let visible = true;\r\n\r\n if (!!formFieldDefinition.isSummary) {\r\n return;\r\n }\r\n\r\n let extraValidationRules : any = {};\r\n if (formFieldDefinition.visibilityCondition !== undefined && formFieldDefinition.visibilityCondition.length > 0) {\r\n\r\n formFieldDefinition.visibilityCondition.map((condition : any) => {\r\n if (!this.isFieldVisible(formikBag, condition, formFieldDefinition)) {\r\n visible = false;\r\n } \r\n }); \r\n }\r\n\r\n if (visible && !!formFieldDefinition.hideWhenNoOptions) {\r\n visible = DatasourceOptionsService.getOptionsForForm(formFieldDefinition.name).length > 0;\r\n }\r\n\r\n if (visible && !!formFieldDefinition.requiredWhenOptions) {\r\n if (DatasourceOptionsService.getOptionsForForm(formFieldDefinition.name).length > 0) {\r\n extraValidationRules.required = {\r\n error: StringHelpers.formFieldRequiredFieldErrorMessage(FormLabelHelpers.getLabelWithoutAsterisk(formFieldDefinition.label))\r\n };\r\n }\r\n }\r\n\r\n if (visible) {\r\n let validationSchemaShape : any = {};\r\n\r\n validationSchemaShape = this.createValidationShape(formFieldDefinition, validationSchemaShape, extraValidationRules);\r\n\r\n var schema = Yup.object().shape(validationSchemaShape);\r\n \r\n try { \r\n schema.validateSync(formikBag.values); \r\n } catch (error) {\r\n if (error.errors !== undefined && error.errors.length > 0) {\r\n return error.errors[0];\r\n }\r\n }\r\n\r\n if (formFieldDefinition.validation?.post && formikBag.values[formFieldDefinition.name] == formFieldDefinition.validation.post.value) {\r\n return formFieldDefinition.validation.post.error;\r\n }\r\n }\r\n\r\n let fieldType = formFieldDefinition.type;\r\n if (formFieldDefinition.enabledCondition !== undefined) {\r\n if (!formFieldDefinition.enabledCondition.kenticoMacroFunction(this.form.fieldMapper, formikBag.values[formFieldDefinition.name], KenticoValidatorUtils)) {\r\n if ((fieldType != \"custom\") && (fieldType !== \"link\")) {\r\n fieldType = \"readOnly\";\r\n }\r\n }\r\n }\r\n\r\n if (visible && \r\n fieldType !== \"readOnly\" &&\r\n formFieldDefinition.validation !== undefined && \r\n formFieldDefinition.validation[\"kenticoRules\"] !== undefined) {\r\n\r\n let validationSchemaShape : any = {};\r\n\r\n validationSchemaShape = this.createValidationShape(formFieldDefinition, validationSchemaShape); \r\n ValidationHelpers.addKenticoValidator(formFieldDefinition, validationSchemaShape, this.props.formDefinitions[this.props.formName], formikBag);\r\n var schema = Yup.object().shape(validationSchemaShape);\r\n try {\r\n schema.validateSync(formikBag.values); \r\n } catch (error) {\r\n if (error.errors !== undefined && error.errors.length > 0) {\r\n return error.errors[0];\r\n } else \r\n if (error.errors === undefined) {\r\n // tslint:disable-next-line\r\n console.log(\"validateField exception (kentico rule)\", error, formFieldDefinition, formikBag)\r\n }\r\n } \r\n } \r\n \r\n } catch (ex) {\r\n // tslint:disable-next-line\r\n console.log(\"exception in validateField\", ex, formFieldDefinition, formikBag);\r\n }\r\n }\r\n\r\n validateValueSet = (values : any) => {\r\n let isValid : boolean = true;\r\n\r\n let formDefinition = this.props.formDefinitions[this.props.formName];\r\n formDefinition.map((formFieldDefinition : any) => {\r\n if (!!formFieldDefinition.isSummary) {\r\n return;\r\n }\r\n let result = this.validateField(formFieldDefinition, this._formikBag);\r\n if (result && result !== \"\") {\r\n isValid = false;\r\n }\r\n });\r\n\r\n return isValid;\r\n }\r\n\r\n saveForm = (event) => {\r\n if (this.validateValueSet(this._formikBag.values)) {\r\n this.submitToContainer(this._formikBag.values, true, true, true);\r\n }\r\n }\r\n\r\n submitToContainer = (values: any, submit?: boolean, includeCurrentValues? : boolean, onlySaveForm? : boolean) => {\r\n let valuesToStore = {};\r\n \r\n if ((this.props.stepIndex > 0 && !this.props.isSummaryStep) || this.props.stepIndex == 0) {\r\n let formDefinition = this.props.formDefinitions[this.props.formName];\r\n formDefinition.map((formFieldDefinition : any) => {\r\n let visible = true;\r\n const fieldType = formFieldDefinition.type;\r\n if ((fieldType !== \"custom\") && \r\n (fieldType !== \"link\") && \r\n (fieldType !== \"title\") && \r\n (fieldType !== \"submit\")) {\r\n \r\n if (!formFieldDefinition.ignoreVisibilityConditionDuringSubmit &&\r\n !this.props.formConfig.ignoreVisibilityConditionDuringSubmit &&\r\n formFieldDefinition.visibilityCondition !== undefined) {\r\n formFieldDefinition.visibilityCondition.map((condition : any) => {\r\n if (!this.isFieldVisible(this._formikBag, condition, formFieldDefinition)) {\r\n visible = false;\r\n } \r\n });\r\n }\r\n }\r\n\r\n if (visible && values[formFieldDefinition.name] !== undefined) {\r\n valuesToStore[formFieldDefinition.name] = values[formFieldDefinition.name];\r\n }\r\n });\r\n } else {\r\n if((this.props.formConfig as any).addFormControlsToSummary){\r\n ((this.props.formConfig as any).addFormControlsToSummary || []).map((controlName, index) => {\r\n if (values[controlName]) {\r\n valuesToStore[controlName] = values[controlName];\r\n }\r\n });\r\n }\r\n }\r\n\r\n if (submit === undefined || !!submit) {\r\n this.props.onSubmit(valuesToStore, !!includeCurrentValues, !!onlySaveForm);\r\n } else {\r\n if (this.props.onStoreValues) {\r\n this.props.onStoreValues(values);\r\n }\r\n }\r\n }\r\n\r\n hasFormBlockIntelligence = () => {\r\n return !this.props.formConfig.noFormBlockIntelligence && \r\n (this.props.pageType !== \"view\") && \r\n (!this.props.readOnly);\r\n }\r\n\r\n clickAlternateSubmitButton = (event) => {\r\n // TODO : make this optional and force location.href\r\n if (!!this.props.formConfig.shouldExtraButtonFollowLink) {\r\n event.preventDefault();\r\n const onSubmitSuccessButtonLink = this.props.formConfig.onSubmitSuccessButton1Link \r\n ? this.props.formConfig.onSubmitSuccessButton1Link \r\n : this.props.formConfig.onSubmitSuccessButton2Link;\r\n\r\n if (onSubmitSuccessButtonLink.indexOf(\"http\") == 0) {\r\n location.href = onSubmitSuccessButtonLink;\r\n } else {\r\n this.props.formContainer.redirectToUrl(onSubmitSuccessButtonLink);\r\n }\r\n return false;\r\n } else {\r\n this.props.formConfig.reactRouteOnSuccess = this.props.onSubmitSuccessButton1Link \r\n ? this.props.onSubmitSuccessButton1Link \r\n : this.props.onSubmitSuccessButton2Link;\r\n }\r\n }\r\n\r\n renderOptionalExtraButton = (disableSubmitButtonOnValidationError, formikBag) => {\r\n\r\n const onSubmitSuccessButtonLink = this.props.onSubmitSuccessButton1Link || this.props.formConfig.onSubmitSuccessButton1Link || \r\n this.props.onSubmitSuccessButton2Link || this.props.formConfig.onSubmitSuccessButton2Link;\r\n const onSubmitSuccessButtonLinkText = this.props.onSubmitSuccessButton1LinkText || this.props.formConfig.onSubmitSuccessButton1LinkText || \r\n this.props.onSubmitSuccessButton2LinkText || this.props.formConfig.onSubmitSuccessButton2LinkText;\r\n\r\n if (!onSubmitSuccessButtonLink || \r\n !onSubmitSuccessButtonLinkText || \r\n !this.props.isSubmitStep ) {\r\n return <>;\r\n }\r\n\r\n if (this.props.formConfig.summarySendButtonCondition !== undefined) {\r\n return <>;\r\n }\r\n\r\n const submitCssClass = \"\";\r\n const submitLabel = onSubmitSuccessButtonLinkText;\r\n let cssClasses = this.state != null && this.props.isSubmitting ? \r\n (\"btn btn-success btn-form-submit btn-disabled \" + submitCssClass) : \r\n (this.props.isSubmitStep ? (\"btn btn-success btn-form-submit \" + submitCssClass) : (\"btn btn-success \" + submitCssClass));\r\n \r\n const onSubmitSuccessButtonLinkCssClass = this.props.formConfig.onSubmitSuccessButton1LinkCssClass \r\n ? this.props.formConfig.onSubmitSuccessButton1LinkCssClass\r\n : this.props.formConfig.onSubmitSuccessButton2LinkCssClass;\r\n\r\n if (onSubmitSuccessButtonLinkCssClass !== undefined) {\r\n cssClasses = \"btn \" + onSubmitSuccessButtonLinkCssClass;\r\n }\r\n\r\n\r\n return
\r\n
\r\n {this.props.isSubmitting ? : null }\r\n \r\n
\r\n
;\r\n }\r\n\r\n onPrintClick = (e) => {\r\n e.preventDefault();\r\n (window as any).print();\r\n return false;\r\n }\r\n\r\n checkSubmitButtonCondition = () => {\r\n\r\n let result = {\r\n \"link\" : \"\",\r\n \"text\" : \"\",\r\n \"cssClass\": \"\"\r\n };\r\n \r\n if (this.props.isSubmitStep && !this.props.isPrintView && this._formikBag) {\r\n let fieldValue;\r\n for (let form in this.props.formValues) {\r\n if (this.props.formValues.hasOwnProperty(form)) {\r\n\r\n if (this.props.formValues[form] &&\r\n this.props.formValues[form][this.props.formConfig.summarySendButtonCondition.fieldName]) {\r\n fieldValue = this.props.formValues[form][this.props.formConfig.summarySendButtonCondition.fieldName]; \r\n }\r\n }\r\n }\r\n \r\n if (fieldValue.value) {\r\n fieldValue = fieldValue.value;\r\n }\r\n\r\n if (fieldValue !== undefined) { \r\n if (fieldValue == this.props.formConfig.summarySendButtonCondition.value) {\r\n result = {\r\n \"link\" : this.props.formConfig.orgReactRouteOnSuccess,\r\n \"text\" : this.props.formConfig.summarySendButtonCondition.buttonLabelIf,\r\n \"cssClass\" : this.props.formConfig.summarySendButtonCondition.buttonLabelIfClass\r\n };\r\n } \r\n else if(fieldValue == this.props.formConfig.summarySendButtonCondition.value1) {\r\n result = {\r\n \"link\": this.props.onSubmitSuccessButton1Link,\r\n \"text\": this.props.formConfig.summarySendButtonCondition.buttonLabelElseIf,\r\n \"cssClass\": this.props.formConfig.summarySendButtonCondition.buttonLabelElseIfClass\r\n };\r\n } else {\r\n result = {\r\n \"link\" : this.props.onSubmitSuccessButton2Link,\r\n \"text\" : this.props.formConfig.summarySendButtonCondition.buttonLabelElse,\r\n \"cssClass\" : this.props.formConfig.summarySendButtonCondition.buttonLabelElseClass\r\n };\r\n }\r\n } \r\n }\r\n\r\n return result;\r\n }\r\n\r\n // TODO Sjors; WIP, this will be fixed in sprint 153.\r\n getNextPageLink = (url: string) => {\r\n let additionialInfo = \"\"; \r\n let additionalId = \"\";\r\n\r\n if (this.props.backTitleForCurrentPageBackLink !== undefined && \r\n this.props.backTitleForCurrentPageBackLink !== \"\") {\r\n additionialInfo = \"backTitleForCurrentPageBackLink=\" + this.props.backTitleForCurrentPageBackLink;\r\n }\r\n\r\n let urlParams = getAllUrlParams(this.context.search);\r\n \r\n if(urlParams.additionalId){\r\n additionalId = `additionalId=${urlParams.additionalId}`;\r\n url = `${url}/${urlParams.additionalId}`;\r\n }\r\n\r\n if (urlParams.gobackUrl) {\r\n return urlParams.gobackUrl;\r\n }\r\n\r\n if (!!this.props.includeCurrentPageAsBackAndSubmitUrl) { \r\n return url + \"?gobackUrl=\" + location.hash.slice(1) + \r\n (additionialInfo !== \"\" ? `?${additionialInfo}` : \"\") + \r\n `&${additionalId}`;\r\n }\r\n let urlQueryParameter = \"?\";\r\n if (url.indexOf(\"?\") >= 0) {\r\n urlQueryParameter = \"&\";\r\n }\r\n return url + \r\n (additionialInfo !== \"\" ? urlQueryParameter + additionialInfo : \"\") + \r\n (additionalId !== \"\" ? urlQueryParameter + additionalId : \"\");\r\n }\r\n\r\n cancelButtonClick = (event) => {\r\n event.preventDefault();\r\n if (this.props.onCancelForm) {\r\n this.props.onCancelForm();\r\n }\r\n return false;\r\n }\r\n \r\n renderSubmitButton = (disableSubmitButtonOnValidationError, formikBag, submitLabel, submitCssClass) => {\r\n\r\n if (!!this.props.isShowPollResults) {\r\n return null;\r\n }\r\n\r\n let hideSubmitButtons = false;\r\n\r\n let saveFormButton = <>;\r\n if (!!this.props.formConfig.showSaveFormButton && !this.props.isSubmitStep) { \r\n saveFormButton = ;\r\n }\r\n\r\n if (this.props.isSubmitStep && !!this.props.formConfig.hideSubmitButtons) {\r\n //return <>;\r\n hideSubmitButtons = true;\r\n }\r\n \r\n let btnFormSubmitClassName = (this.props.isSubmitStep && (this.props.onSubmitSuccessButton1LinkText || this.props.onSubmitSuccessButton2LinkText) ? \"\" : \"btn-form-submit \");\r\n if (this.props.formConfig.overrideBtnFormSubmitClassName !== undefined) {\r\n btnFormSubmitClassName = this.props.formConfig.overrideBtnFormSubmitClassName;\r\n }\r\n let formButtonsWithExtraButtonBelowIt = \"\";\r\n\r\n if (((this.props.onSubmitSuccessButton1Link && this.props.onSubmitSuccessButton1LinkText) || (this.props.onSubmitSuccessButton2Link && this.props.onSubmitSuccessButton2LinkText)) && this.props.isSubmitStep) {\r\n formButtonsWithExtraButtonBelowIt = \"form__buttons-with-extra-buttonsbelow\";\r\n }\r\n\r\n let printButton = <>;\r\n if (!this.props.isPrintView && \r\n this.props.formConfig.showPrintButton === true &&\r\n this.props.isSummaryStep && this.props.stepIndex > 0) {\r\n printButton =
\r\n Print\r\n
;\r\n }\r\n\r\n const hasFormEditableControls = this.hasFormEditableControls(formikBag);\r\n const hasFormOnlyNonRequiredControls = this.hasFormOnlyNonRequiredControls(formikBag);\r\n let disabledButtonCheck = \r\n (!formikBag.dirty && !this.props.isSubmitStep &&\r\n !this.props.isSummaryStep && hasFormEditableControls && \r\n !hasFormOnlyNonRequiredControls &&\r\n !this.props.wasOnSummaryStep &&\r\n (!this.props.visitedSteps || (this.props.visitedSteps && !this.props.visitedSteps[this.props.formName])) &&\r\n !this.props.formConfig.noDisabledButtonCheckForDirtyState \r\n ) || \r\n (!formikBag.dirty && this.props.isSubmitStep && \r\n (this.props.stepIndex == 0) && hasFormEditableControls &&\r\n !hasFormOnlyNonRequiredControls && \r\n !this.props.wasOnSummaryStep &&\r\n (!this.props.visitedSteps || (this.props.visitedSteps && !this.props.visitedSteps[this.props.formName])) &&\r\n !this.props.formConfig.noDisabledButtonCheckForDirtyState\r\n ); \r\n\r\n const hideButtonIfNoEditableControls = (!hasFormEditableControls && this.props.formConfig.hideButtonIfNoEditableControls) && \r\n (!this.props.isSummaryStep || this.props.stepIndex == 0);\r\n\r\n if (this.props.formConfig.summarySendButtonCondition !== undefined) {\r\n const result = this.checkSubmitButtonCondition();\r\n if (result && result.text != \"\" && result.link != \"\") {\r\n submitLabel = result.text;\r\n submitCssClass = result.cssClass;\r\n this.props.formConfig.reactRouteOnSuccess = result.link;\r\n }\r\n }\r\n\r\n // check if recaptcha control exists, if it exists we want to show the Google policy text\r\n let showRecaptchaText = false;\r\n if (formikBag.values.hasOwnProperty('ReCaptcha')) {\r\n showRecaptchaText = true;\r\n }\r\n\r\n // custom dirty check, currently only used in the mijn-fnv popup , mainly\r\n // to handle the form to specify birthDate and firstName for lite accounts\r\n if (!!this.props.formConfig.submitButtonIsDisabledIfFormIsNotDirty && !this.isFormDirty(formikBag) ) {\r\n disabledButtonCheck = true;\r\n }\r\n return <>\r\n {printButton}\r\n
\r\n {(showRecaptchaText === true) ? this.renderRecaptchaText() : null}\r\n {submitLabel != \"\" && !this.props.readOnly ? \r\n \r\n {this.props.stepIndex > 0 ? : null}\r\n {(this.props.stepIndex == 0 && \r\n this.props.formConfig.backButtonInFirstStep !== undefined) ? {this.props.formConfig.backButtonInFirstStep.label} \r\n \r\n : null}\r\n {hideSubmitButtons ? null :
\r\n {!!this.props.formConfig.showCancelButton ? {this.props.formConfig.cancelButtonTitle} : null}\r\n {this.props.isSubmitting ? : null }\r\n {saveFormButton}\r\n {!hideButtonIfNoEditableControls && }\r\n
}\r\n
\r\n : null}\r\n {this.props.withLinkToFormPage && \r\n this.props.linkFormPage &&\r\n !!this.props.formConfig.hasLinkToFormPage\r\n ? {this.props.linkText}\r\n : null} \r\n {this.props.withLinkToFormPage && \r\n this.props.linkFormPage &&\r\n this.props.pageType === \"view\" && \r\n (this.hasFormEditableControlsThatWereSetToDisabled(formikBag) || this.props.formConfig.explicitNextButton)\r\n ? {this.props.linkText}\r\n : null}\r\n {this.props.withLinkToFormPage && \r\n this.props.linkFormPage &&\r\n this.props.pageType === \"dashboard\"\r\n ? Bekijk alle gegevens\r\n : null}\r\n
\r\n ;\r\n }\r\n\r\n renderRecaptchaText = () => {\r\n // Injecting HTML, because resource string has HTML tags in it, so we need to sanitize it first\r\n return \r\n \r\n ;\r\n }\r\n\r\n onFormBackgroundClick = () => {\r\n PopoverService.closeAllPopovers();\r\n }\r\n\r\n getCurrentStepCaption = () => {\r\n let stepCaption = \"\";\r\n if (this.props.steps) {\r\n this.props.steps.map((step) => {\r\n if (step.formName === this.props.formName) {\r\n stepCaption = step.title;\r\n }\r\n });\r\n }\r\n return stepCaption;\r\n }\r\n\r\n checkShowPrompt = (formikBag) => {\r\n const result = !this.props.isPrintView && \r\n !this.props.readOnly &&\r\n !this.props.isSubmitting &&\r\n !this.props.formContainer.state.isSubmitting &&\r\n !this.props.formContainer.state.isShowPostOk && \r\n (formikBag.dirty || \r\n this.props.wasOnSummaryStep ||\r\n this.props.visitedSteps[this.props.formName] || \r\n (this.props.isSubmitStep && this.props.isSummaryStep));\r\n return result;\r\n }\r\n\r\n onToggleGroupCollapsable = (collapsableGroupTitle, initialCollapsableState, event) => {\r\n event.preventDefault();\r\n if (this.state.collapsableState[collapsableGroupTitle] !== undefined) {\r\n this.setState((state) => {\r\n let newCollapsableState = {...state.collapsableState};\r\n newCollapsableState[collapsableGroupTitle] = !newCollapsableState[collapsableGroupTitle];\r\n return {\r\n ...state,\r\n collapsableState: newCollapsableState\r\n };\r\n });\r\n } else {\r\n this.setState((state) => {\r\n let newCollapsableState = {...state.collapsableState};\r\n newCollapsableState[collapsableGroupTitle] = !initialCollapsableState;\r\n return {\r\n ...state,\r\n collapsableState: newCollapsableState\r\n };\r\n });\r\n }\r\n return false;\r\n }\r\n\r\n createBackToStepLink = (formDefinition : any[], section : string, formikBag : any) => {\r\n let backToFormStepElement = <>;\r\n if (this.props.isSummaryStep &&\r\n formDefinition.length > 0 ) {\r\n formDefinition.map((formFieldDefinition: any, index) => {\r\n let visible = true; \r\n let renderFormElement = false;\r\n\r\n if (formFieldDefinition.section === undefined && section == \"\") {\r\n renderFormElement = true; \r\n } else\r\n if (formFieldDefinition.section !== undefined && section == formFieldDefinition.section) {\r\n renderFormElement = true;\r\n }\r\n if (formFieldDefinition.visibilityCondition !== undefined) {\r\n formFieldDefinition.visibilityCondition.map((condition : any) => {\r\n if (!this.isFieldVisible(formikBag, condition, formFieldDefinition)) {\r\n visible = false;\r\n } \r\n });\r\n }\r\n let fieldType = formFieldDefinition.type;\r\n if (renderFormElement && visible) {\r\n if (fieldType == \"custom\" && formFieldDefinition.customType == 'summary') { \r\n if (\r\n (formFieldDefinition.hideEditLink === undefined ||\r\n (formFieldDefinition.hideEditLink !== undefined && \r\n !formFieldDefinition.hideEditLink))) {\r\n backToFormStepElement = ;\r\n }\r\n }\r\n }\r\n });\r\n return backToFormStepElement;\r\n }\r\n }\r\n\r\n getFieldKey = (formFieldDefinition , formikBag) => {\r\n let fieldKey = formFieldDefinition.name + \"_formfield\";\r\n let dependentValue = \"\"; \r\n if (Array.isArray(formFieldDefinition.dependentOnField)) {\r\n formFieldDefinition.dependentOnField.map(dependentField => {\r\n dependentValue = this.state[dependentField] || formikBag.values[dependentField];\r\n if (dependentValue && (dependentValue as any).value) {\r\n dependentValue = (dependentValue as any).value;\r\n }\r\n // force rerendering when dependent field changes\r\n fieldKey = fieldKey + \"_\" + dependentField + \"_\" + dependentValue;\r\n });\r\n } else\r\n if (formFieldDefinition.dependentOnField) {\r\n dependentValue = this.state[formFieldDefinition.dependentOnField] || formikBag.values[formFieldDefinition.dependentOnField]; \r\n if (dependentValue && (dependentValue as any).value) {\r\n dependentValue = (dependentValue as any).value;\r\n }\r\n // force rerendering when dependent field changes\r\n fieldKey = fieldKey + \"_\" + formFieldDefinition.dependentOnField + \"_\" + dependentValue;\r\n }\r\n return fieldKey;\r\n }\r\n\r\n getAdditionalClassForCustomField = (formFieldDefinition , customType) => {\r\n if (customType === \"tip\") {\r\n if (formFieldDefinition && formFieldDefinition.tipLayout === \"block\") {\r\n return \"form__custom-panel--place-outside-form-area\";\r\n } \r\n }\r\n return \"\";\r\n }\r\n\r\n private renderDebugInformation(formikBag: FormikProps) {\r\n return (\r\n <>\r\n {Debugger.isEnabled() && \r\n \r\n }\r\n \r\n );\r\n }\r\n\r\n render() {\r\n \r\n const urlParams = getAllUrlParams();\r\n\r\n FormService.setIsSummaryView(this.props.stepIndex > 0 && this.props.isSummaryStep);\r\n\r\n let formDefinition: IFormFieldDefinition[] = this.props.formDefinitions[this.props.formName];\r\n\r\n FormControllerHelper.showOrHideBlockOnSummarySteps(this.props.pageWithOnly1Step, this.props.isSummaryStep);\r\n\r\n // formValues should be assigned with formikBag.values\r\n this.form.fieldMapper = FormControllerHelper.getFieldsMapper(\r\n formDefinition, \r\n this,\r\n this.props.formValues,\r\n this.props.formDefinitions\r\n );\r\n\r\n let initialValues = {\r\n ...this.props.initialValues\r\n };\r\n\r\n let self = this;\r\n let submitLabel : string = \"\";\r\n let submitCssClass : string = \"\";\r\n let disableSubmitButtonOnValidationError : boolean = false; \r\n \r\n formDefinition.forEach((formFieldDefinition: IFormFieldDefinition) => {\r\n\r\n if (initialValues[formFieldDefinition.name] == null) {\r\n initialValues[formFieldDefinition.name] = '';\r\n }\r\n\r\n if (formFieldDefinition.type === \"submit\") {\r\n submitLabel = formFieldDefinition.label;\r\n if (formFieldDefinition.cssClass !== undefined) {\r\n submitCssClass = formFieldDefinition.cssClass;\r\n }\r\n\r\n if (formFieldDefinition.disableOnValidationError !== undefined) {\r\n disableSubmitButtonOnValidationError = formFieldDefinition.disableOnValidationError;\r\n }\r\n } \r\n });\r\n\r\n const sections: string[] = [''];\r\n const sectionCssClassNames: string[] = [''];\r\n formDefinition.forEach((formFieldDefinition: IFormFieldDefinition) => {\r\n if (formFieldDefinition.section !== undefined && formFieldDefinition.section != '') {\r\n if (sections.indexOf(formFieldDefinition.section) < 0) {\r\n sections.push(formFieldDefinition.section);\r\n sectionCssClassNames.push(formFieldDefinition.sectionCssClass || formFieldDefinition.section);\r\n }\r\n }\r\n });\r\n\r\n /*\r\n igv debuggen :\r\n toevoegen op veld niveau\r\n \r\n */\r\n\r\n let additionalFormCssClass = \"\";\r\n if (this.props.formConfig.additionalCSSClass !== undefined) {\r\n additionalFormCssClass = \" \" + this.props.formConfig.additionalCSSClass;\r\n }\r\n\r\n if (this.props.additionalCssClass !== undefined) {\r\n additionalFormCssClass = \" \" + this.props.additionalCssClass;\r\n }\r\n \r\n if (this.props.pageType === \"edit\") {\r\n FormControllerHelper.showOrHideBackLink(this.props.stepIndex == 0);\r\n }\r\n\r\n let formGroupCount = 0 ;\r\n formDefinition.map((formFieldDefinition: IFormFieldDefinition) => {\r\n if (formFieldDefinition.type == \"title\") {\r\n formGroupCount++;\r\n }\r\n });\r\n \r\n if (this.props.isSummaryStep && !!this.props.formConfig.summaryValueBelowFields) {\r\n additionalFormCssClass = \" form___summary--values-below-fields\";\r\n }\r\n\r\n return
\r\n {this.props.isSummaryStep && (this.props.summaryIntro || \"\") !== \"\" ? \r\n FormControllerHelper.renderSummaryIntro(this.props.summaryIntro) : null }\r\n {this.props.readOnly ? null :

{this.props.formConfig.requiredFieldTip}

}\r\n {\r\n this.submitToContainer(values);\r\n }}\r\n\r\n children={(formikBag: FormikProps) => {\r\n this._formikBag = formikBag;\r\n let placeFirstTitlePanelInSectionOutside = false;\r\n let formErrorWasRendered = false; \r\n \r\n let formTitleIndex = 0;\r\n\r\n return (
\r\n {(!this.props.isPrintView && this.props.formConfig.leavePageProtection) && }\r\n\r\n {this.renderDebugInformation(formikBag)}\r\n\r\n \r\n\r\n {sections.map((section : string, index : number) => {\r\n let sectionBreakClass = \"\";\r\n let formGroupCssClass = \"\";\r\n let sectionCssClass = sectionCssClassNames[index] || section;\r\n\r\n if (this.props.pageType !== FrontendDashboardPageType && this.hasFormBlockIntelligence()) {\r\n placeFirstTitlePanelInSectionOutside = true;\r\n }\r\n\r\n let collapsableGroup = false;\r\n let initialCollapsableState = false;\r\n let collapsableState = false;\r\n let collapsableTitle = \"\";\r\n\r\n formDefinition.map((formFieldDefinition: any, fieldIndex) => {\r\n if (formFieldDefinition.section !== undefined && section == formFieldDefinition.section) {\r\n if (formFieldDefinition.type == \"title\") { \r\n if (formGroupCssClass == \"\" && formFieldDefinition.groupCssClass) {\r\n formGroupCssClass = formFieldDefinition.groupCssClass;\r\n }\r\n \r\n if (!!formFieldDefinition.collapsable) {\r\n collapsableGroup = true;\r\n initialCollapsableState = !!formFieldDefinition.initialCollapsableState;\r\n collapsableState = initialCollapsableState;\r\n collapsableTitle = formFieldDefinition.label;\r\n if (this.state.collapsableState[collapsableTitle] !== undefined) {\r\n collapsableState = this.state.collapsableState[collapsableTitle];\r\n }\r\n }\r\n\r\n if (formGroupCount > 1) {\r\n if (index < sections.length - 1) {\r\n \r\n if (this.hasFormBlockIntelligence()) {\r\n sectionBreakClass = \"form__section-break\";\r\n }\r\n \r\n if (fieldIndex + 1 < formDefinition.length) {\r\n if (formDefinition[fieldIndex + 1].isAdresBlokField) {\r\n sectionBreakClass = \"\";\r\n }\r\n } \r\n }\r\n }\r\n }\r\n }\r\n });\r\n \r\n let CollapsableElement = <>;\r\n if (!!collapsableGroup) {\r\n formGroupCssClass += \" form__collapsable-section\"; \r\n CollapsableElement = ;\r\n }\r\n let backToFormStepElement = this.createBackToStepLink(formDefinition, section, formikBag);\r\n \r\n let hasElements = false;\r\n let formElements = formDefinition.map((formFieldDefinition: any, index) => {\r\n let visible = true;\r\n let renderFormElement = false;\r\n\r\n if (formFieldDefinition.section === undefined && section == \"\") {\r\n renderFormElement = true; \r\n } else\r\n if (formFieldDefinition.section !== undefined && section == formFieldDefinition.section) {\r\n renderFormElement = true;\r\n } \r\n\r\n if (formFieldDefinition.visibilityCondition !== undefined) {\r\n formFieldDefinition.visibilityCondition.map((condition : any) => {\r\n\r\n if (!this.isFieldVisible(formikBag, condition, formFieldDefinition)) {\r\n visible = false;\r\n } \r\n });\r\n }\r\n\r\n let visibilityClass = \"\";\r\n if (!visible) {\r\n visibilityClass = \" form__form-group-hidden\";\r\n }\r\n \r\n if (renderFormElement && visible) \r\n {\r\n hasElements = true;\r\n let fieldType = formFieldDefinition.type; \r\n \r\n if (fieldType == \"custom\") {\r\n let additionalCssClass = \"\";\r\n if (formFieldDefinition.PlaceInFormArea !== undefined && !!formFieldDefinition.PlaceInFormArea) {\r\n additionalCssClass = \" form__custom-panel--\" + Slug.fromString(formFieldDefinition.customType) + \"--place-in-form-area\";\r\n }\r\n\r\n additionalCssClass += \" \" + this.getAdditionalClassForCustomField(formFieldDefinition, formFieldDefinition.customType);\r\n\r\n let fieldKey = this.getFieldKey(formFieldDefinition, formikBag); \r\n\r\n return
\r\n {self.props.renderCustomField(formFieldDefinition, this, formikBag)}\r\n
;\r\n } else\r\n if (fieldType == \"title\") {\r\n let labelText = FormLabelHelpers.hasValue(formFieldDefinition.label, \"@ismacro\", \"true\")\r\n ? formFieldDefinition.label[\"#text\"]\r\n : formFieldDefinition.label;\r\n\r\n if (labelText != \"\" && labelText.indexOf(\"- hidden\") < 0) { \r\n let placeOutsideClass = \"\";\r\n if (placeFirstTitlePanelInSectionOutside) {\r\n placeOutsideClass = \"form__panel--place-outside\";\r\n placeFirstTitlePanelInSectionOutside = false;\r\n }\r\n const renderFormError = !formErrorWasRendered;\r\n formErrorWasRendered = true;\r\n\r\n const label = StringHelpers.replacePropertiesInString(labelText, {...this.getPayload() , ...formikBag.values}, true);\r\n \r\n formTitleIndex++;\r\n\r\n const hasSubtitle = this.props.formConfig.pageSettings[this.props.formName] && \r\n this.props.formConfig.pageSettings[this.props.formName].subtitle != undefined &&\r\n this.props.formConfig.pageSettings[this.props.formName].subtitle != \"\";\r\n\r\n const hasEmptyLabel = label.trim() == \"\";\r\n \r\n const formPanelClass = `form__panel form__panel-${formFieldDefinition.name} ${placeOutsideClass}\r\n ${hasEmptyLabel && \" form__panel--with-empty-title\"}`;\r\n\r\n const formTitleClass = `form__panel-title ${hasEmptyLabel && \" form__panel-title-empty\"}`;\r\n\r\n return
\r\n {(!!this.props.formConfig.showStepAsTitle || !!this.props.formConfig.addStepAsTitle) && \r\n (formTitleIndex <= 1) && <>\r\n

{ReactHtmlParser(this.getCurrentStepCaption())}

\r\n {hasSubtitle &&\r\n

{this.props.formConfig.pageSettings[this.props.formName].subtitle}

}\r\n }\r\n {backToFormStepElement} \r\n {(!this.props.formConfig.showStepAsTitle || (formTitleIndex > 1)) && !hasEmptyLabel &&\r\n

{label}

} \r\n {renderFormError && this.props.renderFormError !== undefined ? this.props.renderFormError() : null}\r\n
;\r\n }\r\n return null;\r\n } else\r\n if (fieldType == \"label\") {\r\n return
\r\n {formFieldDefinition.label}\r\n
;\r\n } else\r\n if (fieldType != \"submit\") {\r\n\r\n let fieldKey = this.getFieldKey(formFieldDefinition, formikBag);\r\n\r\n return \r\n {({ field, form }: FieldProps) => {\r\n \r\n if (field.value === undefined) {\r\n \r\n // als field.value undefined is.. dan wordt er uncontrolled-input gemaakt.\r\n // en dat willen we niet.\r\n // dit gebeurt bij het switchen tussen forms\r\n\r\n return null;\r\n }\r\n \r\n let fieldType = formFieldDefinition.type;\r\n if (formFieldDefinition.enabledCondition !== undefined) {\r\n if (!formFieldDefinition.enabledCondition.kenticoMacroFunction(this.form.fieldMapper, field.value, KenticoValidatorUtils)) {\r\n if ((fieldType === \"checkbox\" && \r\n (!this.props.formConfig.showCheckboxAsTextWhenDisabled)) || \r\n (fieldType === \"radio\" &&\r\n formFieldDefinition.showRadioButtonInDisabledState !== undefined && \r\n !!formFieldDefinition.showRadioButtonInDisabledState) ||\r\n (fieldType === \"switch\" &&\r\n formFieldDefinition.showSwitchInDisabledState !== undefined && \r\n !!formFieldDefinition.showSwitchInDisabledState) ||\r\n (fieldType === \"textarea\" &&\r\n formFieldDefinition.showTextAreaInDisabledState !== undefined && \r\n !!formFieldDefinition.showTextAreaInDisabledState)\r\n ) {\r\n formFieldDefinition.readOnly = true;\r\n } else\r\n if ((fieldType != \"custom\") && (fieldType !== \"link\")) {\r\n fieldType = \"readOnly\"; \r\n }\r\n } else {\r\n if ((fieldType === \"checkbox\" && \r\n (!this.props.formConfig.showCheckboxAsTextWhenDisabled)) || \r\n (fieldType === \"radio\" &&\r\n formFieldDefinition.showRadioButtonInDisabledState !== undefined && \r\n !!formFieldDefinition.showRadioButtonInDisabledState) ||\r\n (fieldType === \"switch\" &&\r\n formFieldDefinition.showSwitchInDisabledState !== undefined && \r\n !!formFieldDefinition.showSwitchInDisabledState) ||\r\n (fieldType === \"textarea\" &&\r\n formFieldDefinition.showTextAreaInDisabledState !== undefined && \r\n !!formFieldDefinition.showTextAreaInDisabledState) \r\n ) {\r\n formFieldDefinition.readOnly = false;\r\n }\r\n }\r\n }\r\n\r\n if (!!formFieldDefinition.disableWhenFieldHasUrlParam &&\r\n urlParams[formFieldDefinition.name] !== undefined) {\r\n if (urlParams[formFieldDefinition.name] !== \"\") {\r\n fieldType = \"readOnly\";\r\n }\r\n }\r\n\r\n if (formFieldDefinition.enabledOnError &&\r\n formFieldDefinition.enabledOnError === 'true' &&\r\n formikBag.values[\r\n 'error-' + formFieldDefinition.name\r\n ]) {\r\n fieldType = formFieldDefinition.type;\r\n }\r\n\r\n if (this.props.readOnly) {\r\n if (((fieldType === \"checkbox\" && \r\n (!this.props.formConfig.showCheckboxAsTextWhenDisabled)) || \r\n (fieldType === \"radio\" &&\r\n formFieldDefinition.showRadioButtonInDisabledState !== undefined && \r\n !!formFieldDefinition.showRadioButtonInDisabledState)\r\n )) {\r\n formFieldDefinition.readOnly = true;\r\n } else\r\n if ((fieldType !== \"custom\") && (fieldType !== \"link\")) {\r\n fieldType = \"readOnly\"; \r\n }\r\n }\r\n\r\n let formControlComponentName = FormControlsHelper.getFormControlComponent(fieldType);\r\n if (formControlComponentName !== undefined) {\r\n let FormControl : any = FormControls[formControlComponentName];\r\n if (FormControl !== undefined) { \r\n const renderFormControl = () => ;\r\n return <>{renderFormControl()};\r\n }\r\n }\r\n return null; \r\n }\r\n }\r\n ;\r\n }\r\n }\r\n }\r\n );\r\n\r\n if (!hasElements) {\r\n return null;\r\n }\r\n \r\n return \r\n {CollapsableElement} \r\n {!collapsableState &&
{formElements} \r\n
}\r\n
;\r\n })\r\n }\r\n {this.renderSubmitButton(disableSubmitButtonOnValidationError, formikBag, submitLabel, submitCssClass)}\r\n {this.renderOptionalExtraButton(disableSubmitButtonOnValidationError, formikBag)}\r\n );\r\n }\r\n }\r\n />\r\n
;\r\n }\r\n\r\n static contextType = MijnFNVPageContext;\r\n context!: React.ContextType;\r\n}\r\n\r\n","import * as React from 'react';\r\nimport { useState, useCallback, useEffect } from 'react';\r\nimport ReactHtmlParser from 'react-html-parser';\r\nimport { PopoverService } from '../../services/PopoverService';\r\nimport { getResourceString } from '../../kentico/resource-strings';\r\n\r\nexport interface LabelAndPopoverProps {\r\n explanation : string;\r\n hasPopover : boolean;\r\n label : string;\r\n fieldId : string;\r\n className? : string;\r\n containerClassName?: string;\r\n isLoading? : boolean;\r\n}\r\n\r\n\r\nexport const LabelAndPopover = function(props : LabelAndPopoverProps) {\r\n\r\n const [showPopoverText, setShowPopoverText] = useState(false);\r\n\r\n\r\n const closePopoverCallback = useCallback(\r\n (popoverFieldId) => {\r\n setShowPopoverText(false);\r\n },\r\n []\r\n );\r\n \r\n useEffect(() => {\r\n PopoverService.registerPopover(props.fieldId, closePopoverCallback);\r\n return () => {\r\n PopoverService.unRegisterPopover(props.fieldId);\r\n };\r\n });\r\n\r\n const onClickPopoverIcon = (event) => {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n PopoverService.closeAllPopovers(props.fieldId);\r\n setShowPopoverText(!showPopoverText);\r\n return false;\r\n };\r\n \r\n const labelText = ReactHtmlParser(props.label || \"\");\r\n const titleHintText = ReactHtmlParser((props.label || \"\").replace(\" \", \" \"));\r\n const explanation = props.explanation ? ReactHtmlParser(props.explanation.replace(\" \", \"\")) : \"\";\r\n const hasExplanationText = props.explanation && props.explanation.replace(\" \", \"\") !== \"\";\r\n\r\n let labelClassName = \"\";\r\n if (!props.hasPopover || !props.explanation || props.explanation == \"\") {\r\n labelClassName = \"label__without-popover\";\r\n }\r\n return
\r\n {props.label != \"\" && }{!!props.hasPopover && \r\n hasExplanationText && \r\n {!!props.hasPopover && hasExplanationText && showPopoverText && \r\n {explanation}}\r\n }\r\n {!!props.isLoading &&
}\r\n
;\r\n};\r\n","import { FormControlProps } from '../../interfaces/FormControlProps';\r\n\r\nexport class ParameterMappingsHelper {\r\n static hasParameterMappings(component: React.Component) {\r\n const formConfig = component.props.formConfig;\r\n const formFieldDefinition = component.props.formFieldDefinition;\r\n return (\r\n formConfig.parameterMappings !== undefined &&\r\n formConfig.parameterMappings[formFieldDefinition.triggerDatasource || formFieldDefinition.datasource] !== undefined\r\n );\r\n }\r\n\r\n static parameterMappings(\r\n component: React.Component,\r\n doPerItem = (item: any) => item\r\n ) {\r\n if (!this.hasParameterMappings(component)) {\r\n return [];\r\n }\r\n\r\n const formConfig = component.props.formConfig;\r\n const formFieldDefinition = component.props.formFieldDefinition;\r\n\r\n const mappings = formConfig.parameterMappings[formFieldDefinition.triggerDatasource || formFieldDefinition.datasource];\r\n\r\n return mappings.map(doPerItem);\r\n\r\n }\r\n\r\n static parameterMappingsViaDatasource(\r\n formConfig: any,\r\n datasource: string,\r\n doPerItem = (item: any) => item\r\n ) {\r\n if (formConfig.parameterMappings === undefined ||\r\n formConfig.parameterMappings[datasource] === undefined) {\r\n return [];\r\n }\r\n\r\n const mappings = formConfig.parameterMappings[datasource];\r\n\r\n return mappings.map(doPerItem);\r\n\r\n }\r\n}\r\n","import { FormControlProps } from '../../interfaces/FormControlProps';\r\nimport { InputState } from '../Input';\r\nimport { PropertyHelpers } from '../../helpers/PropertyHelpers';\r\nimport { FormConfigHelpers } from './FormConfigHelpers';\r\nimport { ParameterMappingsHelper } from './ParameterMappingsHelper';\r\nimport { MaskedInputState } from '../MaskedInput';\r\nimport { FormikHelpers } from './FormikHelpers';\r\nimport { FormControlHelpers } from './FormControlHelpers';\r\nimport { FormFieldStateHelpers } from './FormFieldStateHelpers';\r\nimport { KenticoValidatorUtils } from \"../../kentico/KenticoUtils\";\r\nimport { FormService } from \"../../services/FormService\";\r\nimport { ReactFormHelpers } from '../../containers/helpers/FormHelpers';\r\nimport { DatasourceLoaderStateService } from '../../services/DatasourceLoaderStateService';\r\n\r\nexport class AjaxCallHelpers {\r\n\r\n // TODO : replace \"any\" in React.Component with \r\n // InputState|MaskedInputState and make \"yarn test\"(jest) work with that\r\n static getRelatedData(\r\n component: React.Component,\r\n input: string = ''\r\n ) {\r\n function isCurrentField(fieldName: string) {\r\n return fieldName === component.props.formFieldDefinition.name;\r\n }\r\n\r\n function areAllValid(parameters: any[]) {\r\n return parameters.reduce((isValid, fieldMapping) => {\r\n if (FormFieldStateHelpers.isTouchedHasErrors(component, fieldMapping.field)){\r\n // tslint:disable-next-line\r\n console.log(fieldMapping.field + ' Is invalid' );\r\n }\r\n let checkValid = true;\r\n if (!!component.props.formFieldDefinition.datasoureRequiresAllFieldsFilled) {\r\n if ((component.props.form.values[fieldMapping.field] || \"\").trim() === \"\") {\r\n checkValid = false;\r\n }\r\n }\r\n return (\r\n checkValid &&\r\n isValid &&\r\n // No errors\r\n !FormFieldStateHelpers.isTouchedHasErrors(component, fieldMapping.field)\r\n );\r\n }, true);\r\n }\r\n if (PropertyHelpers.hasRelatedDataUrl(component.props)) { \r\n\r\n const requiredParameters = ParameterMappingsHelper.parameterMappings(component);\r\n let doRunDatasource : boolean = true;\r\n const parameters = requiredParameters.reduce((result: string[], fieldMapping: any) => {\r\n // Get value\r\n let fieldValue = FormikHelpers.getValue(component, fieldMapping.field);\r\n if (fieldValue && fieldValue.value) {\r\n fieldValue = fieldValue.value;\r\n }\r\n\r\n // check optional datasourceConditions\r\n if (component.props.formFieldDefinition.datasourceConditions !== undefined) {\r\n if (!component.props.formFieldDefinition.datasourceConditions.kenticoMacroFunction(\r\n (component as any).props.formController.form.fieldMapper, \r\n fieldValue, \r\n KenticoValidatorUtils)) {\r\n doRunDatasource = false;\r\n }\r\n }\r\n \r\n \r\n\r\n // Build parameters\r\n if (isCurrentField(fieldMapping.field) && ((input != '') || ((input as any).value))) {\r\n let isFound = false;\r\n component.props.formConfig.formSteps.map((formName) => {\r\n const formDefinitions = component.props.formController.props.formDefinitions;\r\n formDefinitions[formName].map((formDef : any) => {\r\n if (!isFound && formDef.name == fieldMapping.field) {\r\n input = ReactFormHelpers.getValueForFormDefinition(input as any, formDef);\r\n isFound = true;\r\n }\r\n });\r\n });\r\n\r\n if ((input as any).value) {\r\n result.push(`${fieldMapping.mapsTo}=${(input as any).value}&`);\r\n } else {\r\n result.push(`${fieldMapping.mapsTo}=${input}&`);\r\n }\r\n } else if (fieldValue !== '') {\r\n let isFound = false;\r\n component.props.formConfig.formSteps.map((formName) => {\r\n const formDefinitions = component.props.formController.props.formDefinitions;\r\n formDefinitions[formName].map((formDef : any) => {\r\n if (!isFound && formDef.name == fieldMapping.field) {\r\n fieldValue = ReactFormHelpers.getValueForFormDefinition(fieldValue as any, formDef);\r\n isFound = true;\r\n }\r\n });\r\n });\r\n\r\n result.push(`${fieldMapping.mapsTo}=${fieldValue}&`);\r\n }\r\n return result;\r\n }, []);\r\n\r\n if (!doRunDatasource) {\r\n return;\r\n }\r\n\r\n if (requiredParameters.length >= parameters.length && areAllValid(requiredParameters)) {\r\n // Clear destination fields\r\n FormikHelpers.mapEmptyToFields(component);\r\n\r\n // Get time delay and counter\r\n let timeDelay = FormControlHelpers.getTimeDelay(component);\r\n let counter = FormControlHelpers.getCounter(component); // keep track of latest request\r\n\r\n // Execute Ajax call\r\n let timer = setTimeout(() => {\r\n const _parameters = `?${parameters.join('')}`;\r\n if (PropertyHelpers.isActionUrl(component.props)) {\r\n component.props.formConfig.actions[component.props.formConfig.urlMappingsRelatedData[component.props.formFieldDefinition.datasource].substring(7)](\r\n component.props.formikBag.values, \r\n component.props.formikBag);\r\n } else {\r\n DatasourceLoaderStateService.increaseLoadingCounter();\r\n $.ajax({\r\n url: PropertyHelpers.getRelatedDataUrl(component.props, _parameters)\r\n })\r\n .done(data => {\r\n DatasourceLoaderStateService.decreaseLoadingCounter();\r\n\r\n if (component.props.formController.unmounted) {\r\n return;\r\n }\r\n if ((component as any).unmounted !== undefined && !!(component as any).unmounted) {\r\n return;\r\n }\r\n component.setState({ isLoading: false } , () => { \r\n // Needed to prevent unwanted updates based on parallel calls\r\n if (counter < component.state.dataSourceCounter) {\r\n return;\r\n }\r\n if (component.props.formController.unmounted) {\r\n return;\r\n }\r\n if ((component as any).unmounted !== undefined && !!(component as any).unmounted) {\r\n return;\r\n }\r\n FormikHelpers.mapValuesToFields(component, data); \r\n FormService.callFormRelatedDataCallback(component.props.formFieldDefinition.datasource, \r\n component.props.formController.props.formName,\r\n data);\r\n component.props.formController.setPayload(data);\r\n });\r\n })\r\n .fail(() => {\r\n DatasourceLoaderStateService.resetLoadingCounter();\r\n if (component.props.formController.unmounted) {\r\n return;\r\n }\r\n if ((component as any).unmounted !== undefined && !!(component as any).unmounted) {\r\n return;\r\n }\r\n component.setState({ isLoading: false, isErrorLoading : true } , () => { \r\n // true => error\r\n FormikHelpers.mapEmptyToFields(component, true);\r\n });\r\n });\r\n }\r\n }, timeDelay);\r\n\r\n component.setState({ dataSourceCounter: counter, timer: timer, isLoading: true, isErrorLoading: false });\r\n }\r\n }\r\n }\r\n\r\n static setDatasource(component: React.Component) {\r\n FormConfigHelpers.outputMappings(component, (fieldMapping: any) => {\r\n component.props.formikBag.setFieldValue(fieldMapping.mapsTo, '');\r\n component.props.formikBag.setFieldValue('error-' + fieldMapping.mapsTo, false);\r\n });\r\n }\r\n\r\n static triggerDatasource(formikBag: any, formConfig : any, datasource: string) {\r\n \r\n if (formConfig.urlMappingsRelatedData &&\r\n formConfig.urlMappingsRelatedData[datasource]) {\r\n const requiredParameters = ParameterMappingsHelper.parameterMappingsViaDatasource(formConfig, datasource);\r\n const parameters = requiredParameters.reduce((result: string[], fieldMapping: any) => {\r\n // Get value\r\n let fieldValue = formikBag.values[fieldMapping.field];\r\n \r\n if (fieldValue !== '') {\r\n result.push(`${fieldMapping.mapsTo}=${fieldValue}&`);\r\n }\r\n return result;\r\n }, []);\r\n\r\n if (requiredParameters.length == parameters.length) {\r\n const _parameters = `?${parameters.join('&')}`;\r\n $.ajax({\r\n url: formConfig.urlMappingsRelatedData[datasource] + _parameters\r\n })\r\n .done(data => {\r\n formConfig.outputMappings[datasource].map((fieldMapping) => {\r\n formikBag.setFieldValue(\r\n fieldMapping.mapsTo,\r\n data[fieldMapping.field]\r\n );\r\n \r\n if (data[fieldMapping.field] != '') {\r\n formikBag.setFieldValue(\r\n 'error-' + fieldMapping.mapsTo,\r\n false\r\n );\r\n } else {\r\n formikBag.setFieldValue(\r\n 'error-' + fieldMapping.mapsTo,\r\n true\r\n );\r\n }\r\n });\r\n })\r\n .fail(() => {\r\n // true => error\r\n formConfig.outputMappings[datasource].map((fieldMapping) => {\r\n formikBag.setFieldValue(fieldMapping.mapsTo, '');\r\n formikBag.setFieldValue(\r\n 'error-' + fieldMapping.mapsTo,\r\n true\r\n );\r\n });\r\n });\r\n }\r\n }\r\n\r\n }\r\n}\r\n","import { FormControlProps } from '../../interfaces/FormControlProps';\r\nimport { IFormConfig } from '../../interfaces/FormConfig';\r\nimport { FormConfigService } from '../../services/FormConfigService';\r\nimport { getResourceString } from '../../kentico/resource-strings';\r\n\r\nexport class FormConfigHelpers {\r\n\r\n /**\r\n * Initializes a default form configuration\r\n * @param formName The name of the form\r\n * @param formTitle An optional title of the form\r\n * @returns A default instance of FormConfig\r\n */\r\n static getDefaultFormConfig(formName: string, formTitle?: string): IFormConfig {\r\n return {\r\n fillViaApi: `/internal/formandcontentreact/get/${formName}`,\r\n startForm: 'form',\r\n formSteps: ['form'],\r\n formTitle: '',\r\n postUrl: `/internal/formandcontentreact/set/${formName}`,\r\n doFormMultipartPost: true,\r\n ignoreVisibilityConditionDuringSubmit: true,\r\n thanksPageUrl: '',\r\n errorPageUrl: '',\r\n OnSubmitSuccessLinkIncludeUrlGuid: true,\r\n reactRouteOnSuccess: '',\r\n reactRouteOnFailure: '-',\r\n\r\n thanksPageUrlFields: [],\r\n pageSettings: {\r\n form: {\r\n title: formTitle || 'Formulier',\r\n subtitle: ''\r\n }\r\n }\r\n } as IFormConfig;\r\n }\r\n\r\n static hasOutputMappings(component: React.Component) {\r\n const formConfig = component.props.formConfig;\r\n const formFieldDefinition = component.props.formFieldDefinition;\r\n\r\n // Do we have it?\r\n return (\r\n formConfig.outputMappings &&\r\n formConfig.outputMappings[formFieldDefinition.triggerDatasource || formFieldDefinition.datasource] \r\n );\r\n }\r\n\r\n static outputMappings(component: React.Component, doPerItem= (item : any) => item) {\r\n if (!this.hasOutputMappings(component)) {\r\n return [];\r\n }\r\n\r\n const formConfig = component.props.formConfig;\r\n const formFieldDefinition = component.props.formFieldDefinition;\r\n\r\n // Return mappings\r\n const mappings = formConfig.outputMappings[formFieldDefinition.triggerDatasource || formFieldDefinition.datasource];\r\n return mappings.map(doPerItem);\r\n }\r\n\r\n static hasFormSteps(formConfig: IFormConfig): boolean {\r\n const formSteps = formConfig.formSteps;\r\n \r\n // Do we have it?\r\n return (\r\n formSteps &&\r\n formSteps.length > 0\r\n );\r\n }\r\n\r\n static formStepsForEach(formConfig: IFormConfig, doPerStep: (stepName: string) => void) {\r\n if (!this.hasFormSteps(formConfig)) {\r\n return;\r\n }\r\n\r\n formConfig.formSteps.forEach(doPerStep);\r\n }\r\n\r\n static getMergedFormConfig(formConfig : IFormConfig): IFormConfig {\r\n const globalFormConfig = FormConfigService.getFormConfig();\r\n \r\n if (formConfig.formOverrides === undefined) {\r\n (formConfig as any).formOverrides = {};\r\n }\r\n\r\n if (formConfig.requiredFieldTip === undefined) { // empty string is allowed, so do check on undefined\r\n if (globalFormConfig.requiredFieldTip === \"\") {\r\n formConfig.requiredFieldTip = \"\";\r\n } else {\r\n formConfig.requiredFieldTip = getResourceString(\"Form.RequiredFieldsHint\");\r\n }\r\n } else {\r\n if (formConfig.requiredFieldTip === \"\") {\r\n formConfig.requiredFieldTip = \"\";\r\n } else {\r\n formConfig.requiredFieldTip = getResourceString(\"Form.RequiredFieldsHint\");\r\n }\r\n\r\n }\r\n\r\n if (formConfig.autoInsertFormFieldGroup === undefined && \r\n globalFormConfig.autoInsertFormFieldGroup !== undefined) {\r\n formConfig.autoInsertFormFieldGroup = globalFormConfig.autoInsertFormFieldGroup;\r\n }\r\n\r\n for (const formOverride in globalFormConfig.formOverrides) {\r\n if (globalFormConfig.formOverrides.hasOwnProperty(formOverride)) {\r\n if (formConfig.formOverrides[formOverride] !== undefined) {\r\n formConfig.formOverrides[formOverride] = (Object as any).assign({}, \r\n globalFormConfig.formOverrides[formOverride],\r\n formConfig.formOverrides[formOverride]); \r\n } else {\r\n formConfig.formOverrides[formOverride] = globalFormConfig.formOverrides[formOverride];\r\n }\r\n\r\n }\r\n }\r\n \r\n if (formConfig.urlMappings === undefined) {\r\n formConfig.urlMappings = {};\r\n }\r\n\r\n for (const urlMapping in globalFormConfig.urlMappings) {\r\n if (globalFormConfig.urlMappings.hasOwnProperty(urlMapping)) {\r\n if (formConfig.urlMappings[urlMapping] === undefined) {\r\n formConfig.urlMappings[urlMapping] = globalFormConfig.urlMappings[urlMapping];\r\n }\r\n }\r\n }\r\n\r\n if (formConfig.urlMappingsRelatedData === undefined) {\r\n formConfig.urlMappingsRelatedData = {};\r\n }\r\n\r\n for (const urlMappingRelatedData in globalFormConfig.urlMappingsRelatedData) {\r\n if (globalFormConfig.urlMappingsRelatedData.hasOwnProperty(urlMappingRelatedData)) {\r\n if (formConfig.urlMappingsRelatedData[urlMappingRelatedData] === undefined) {\r\n formConfig.urlMappingsRelatedData[urlMappingRelatedData] = \r\n globalFormConfig.urlMappingsRelatedData[urlMappingRelatedData];\r\n }\r\n }\r\n }\r\n\r\n if (formConfig.parameterMappings === undefined) {\r\n formConfig.parameterMappings = {};\r\n }\r\n\r\n for (const parameterMapping in globalFormConfig.parameterMappings) {\r\n if (globalFormConfig.parameterMappings.hasOwnProperty(parameterMapping)) {\r\n if (formConfig.parameterMappings[parameterMapping] !== undefined) {\r\n formConfig.parameterMappings[parameterMapping] = (Object as any).assign({}, \r\n globalFormConfig.parameterMappings[parameterMapping],\r\n formConfig.parameterMappings[parameterMapping]); \r\n } else {\r\n formConfig.parameterMappings[parameterMapping] = \r\n globalFormConfig.parameterMappings[parameterMapping];\r\n }\r\n }\r\n }\r\n\r\n if (formConfig.outputMappings === undefined) {\r\n formConfig.outputMappings = {};\r\n }\r\n\r\n for (const outputMapping in globalFormConfig.outputMappings) {\r\n if (globalFormConfig.outputMappings.hasOwnProperty(outputMapping)) {\r\n if (formConfig.outputMappings[outputMapping] !== undefined) {\r\n formConfig.outputMappings[outputMapping] = (Object as any).assign({}, \r\n globalFormConfig.outputMappings[outputMapping],\r\n formConfig.outputMappings[outputMapping]); \r\n } else {\r\n formConfig.outputMappings[outputMapping] = \r\n globalFormConfig.outputMappings[outputMapping];\r\n }\r\n }\r\n }\r\n\r\n if (formConfig.datasourceConditions === undefined) {\r\n formConfig.datasourceConditions = {};\r\n }\r\n\r\n for (const datasourceCondition in globalFormConfig.datasourceConditions) {\r\n if (globalFormConfig.datasourceConditions.hasOwnProperty(datasourceCondition)) {\r\n if (formConfig.datasourceConditions[datasourceCondition] !== undefined) {\r\n formConfig.datasourceConditions[datasourceCondition] = (Object as any).assign({}, \r\n globalFormConfig.datasourceConditions[datasourceCondition],\r\n formConfig.datasourceConditions[datasourceCondition]); \r\n } else {\r\n formConfig.datasourceConditions[datasourceCondition] = \r\n globalFormConfig.datasourceConditions[datasourceCondition];\r\n }\r\n }\r\n }\r\n\r\n return formConfig;\r\n }\r\n}\r\n","import { StringUtil } from '@fnv-core/utils';\r\nimport { FormControlProps } from '../../../interfaces/FormControlProps';\r\n\r\nexport class FormControlSpecifics {\r\n\r\n // FormControlSpecifics.proces wordt momenteel alleen maar ingeroepen bij input velden (en dus nog niet voor checkboxen, datepicker, dropdown etc)\r\n static proces(currentFormControlComponent : React.Component, value: any) {\r\n if (!currentFormControlComponent) {\r\n return;\r\n }\r\n\r\n if (currentFormControlComponent.props.formFieldDefinition.name === \"Voornaam\") {\r\n\r\n const initials: any = currentFormControlComponent.props.formikBag.values[\"Voorletters\"];\r\n const noInitials: boolean = StringUtil.isNullOrEmpty(initials);\r\n const voornaam: string = StringUtil.safeValue(value);\r\n\r\n if(voornaam !== \"\" && noInitials) {\r\n currentFormControlComponent.props.formikBag.setFieldValue(\"Voorletters\", (voornaam[0] || \"\").toUpperCase());\r\n }\r\n } \r\n }\r\n} ","import * as React from 'react';\r\nimport ReactHtmlParser from 'react-html-parser';\r\nimport { CurrencyFormatter } from '@fnv-core/formatting/currency';\r\nimport { DateFormatter } from '@fnv-core/formatting/date';\r\nimport { DecimalFormatter } from '@fnv-core/formatting/decimal';\r\nimport { Tokenizer } from '@fnv-core/tokens';\r\nimport { FormControlProps } from '../../interfaces/FormControlProps';\r\nimport { IFormFieldDefinition, IOption } from '../../interfaces/Fields';\r\nimport { FormFieldStateHelpers } from './FormFieldStateHelpers';\r\nimport { AjaxCallHelpers } from './AjaxCallHelpers';\r\nimport { InputState } from '../Input';\r\nimport { MaskedInputState } from '../MaskedInput';\r\nimport { FormControlSpecifics } from './form-control-specifics';\r\nimport { FormikHelpers } from './FormikHelpers';\r\n\r\nexport class FormControlHelpers {\r\n static isEmpty(value) {\r\n return value === undefined || value === null || value === '';\r\n }\r\n\r\n /**\r\n * Formats the given value to a friendly formatted representation to display in for example summaries, readonly mode etcetera.\r\n * @param value The value to format.\r\n * @param formFieldDefinition The form field definition to use.\r\n * @returns A friendly formatted representation of the value.\r\n */\r\n static convertValueToType(value: any, formFieldDefinition: IFormFieldDefinition) {\r\n if (!formFieldDefinition.dataType) {\r\n return value;\r\n }\r\n\r\n let displayValue = value;\r\n\r\n // Dates\r\n if (formFieldDefinition.dataType === \"date\") {\r\n displayValue = new DateFormatter().format(value);\r\n }\r\n // Numbers\r\n else if (formFieldDefinition.dataType === \"decimal\") {\r\n displayValue = new DecimalFormatter().format(value);\r\n }\r\n // Currencies\r\n else if (formFieldDefinition.dataType === \"currency\") {\r\n let currencyFormatted = new CurrencyFormatter().format(value, {\r\n // Omit the currency symbol, because a custom template can be provided below\r\n currency: null,\r\n decimalSeparator: formFieldDefinition.currencyFormat ? formFieldDefinition.decimalSeparator : null,\r\n stripDecimals: formFieldDefinition.hasDecimals !== undefined && !formFieldDefinition.hasDecimals,\r\n });\r\n\r\n if (formFieldDefinition.currencyFormat) {\r\n currencyFormatted = Tokenizer.replaceTokens(formFieldDefinition.currencyFormat, [{ name: 'value', value: currencyFormatted }]);\r\n }\r\n\r\n displayValue = currencyFormatted;\r\n }\r\n // Arrays\r\n else if (formFieldDefinition.dataType === 'array' && Array.isArray(value)) {\r\n // Assume as strongly typed\r\n const arrayValue = value as (string | IOption)[];\r\n const joiner = formFieldDefinition.displayMode === 'list'\r\n ? '\\n'\r\n : ', ';\r\n displayValue = arrayValue\r\n .map(v => typeof (v) === 'string' ? v : v.text || v.label)\r\n .join(joiner);\r\n }\r\n\r\n return displayValue;\r\n }\r\n\r\n static baseProperties(component: React.Component) {\r\n const props = component.props;\r\n let payloadFieldValue = \"\";\r\n if (props.formConfig && !!(props.formConfig as any).usePayloadAsDefaultForInput) {\r\n payloadFieldValue = (props.formController && props.formController.getPayload && props.formController.getPayload() || {})[props.formFieldDefinition.name]; \r\n }\r\n let value = FormControlHelpers.convertValueToType(props.field.value || \r\n payloadFieldValue || \"\", \r\n component.props.formFieldDefinition); \r\n return {\r\n ref: props.formFieldDefinition.name,\r\n id: props.formFieldDefinition.name,\r\n value: value,\r\n placeholder: props.formFieldDefinition.placeholder,\r\n name: props.formFieldDefinition.name\r\n };\r\n }\r\n\r\n static handleTriggerFieldDependingOnCondition(component: React.Component, value) {\r\n const props = component.props;\r\n if (props.formFieldDefinition.triggerFieldWithCondition !== undefined) {\r\n if (value === props.formFieldDefinition.triggerFieldWithCondition.value) {\r\n\r\n AjaxCallHelpers.triggerDatasource(component.props.formikBag,\r\n component.props.formConfig,\r\n props.formFieldDefinition.triggerFieldWithCondition.datasource \r\n );\r\n\r\n }\r\n }\r\n }\r\n \r\n static onChangeSetValue(component: React.Component) {\r\n const props = component.props;\r\n return {\r\n onChange: function(value: any) {\r\n let newValue = value;\r\n if (value && value.value) {\r\n if (value.text) {\r\n newValue.label = value.text;\r\n }\r\n }\r\n\r\n if (value && value.data) { \r\n component.props.formController.setPayload(value.data);\r\n }\r\n \r\n if (component.props.formFieldDefinition.isDependentField) { \r\n component.props.formController.setState({[props.formFieldDefinition.name]: newValue});\r\n }\r\n \r\n FormFieldStateHelpers.clearMarkedFields(component);\r\n props.formikBag.setFieldValue(props.formFieldDefinition.name, newValue);\r\n \r\n if ((newValue && newValue.value && newValue.value != \"\") || \r\n (newValue && newValue.value === undefined && newValue != \"\")) {\r\n props.formikBag.setFieldError(props.formFieldDefinition.name, \"\"); \r\n }\r\n\r\n FormControlHelpers.handleTriggerFieldDependingOnCondition(component, newValue);\r\n if (!!props.formFieldDefinition.mapPayloadFieldsOnChange) {\r\n FormikHelpers.mapValuesToFields(component, value.data); \r\n } \r\n if (props.formFieldDefinition.triggerDatasource) {\r\n // Known issue: formik setFieldValue is async. By using a time out, we work around this.\r\n setTimeout(() => {\r\n if (FormControlHelpers.isValid(component)) {\r\n // Only get data when input is valid\r\n AjaxCallHelpers.getRelatedData(component as any, value);\r\n }\r\n }, 1);\r\n }\r\n }\r\n };\r\n }\r\n\r\n static onChangeSetValueViaEvent(component: React.Component) {\r\n const props = component.props;\r\n return {\r\n onChange: function(event: any) {\r\n FormFieldStateHelpers.clearMarkedFields(component);\r\n\r\n let value = event.target.value;\r\n \r\n // workaround voor kentico/api value mismatch\r\n // value kan ook iets anders bevatten dan true/false (bijvoorbeeld Ja/Nee, Man/Vrouw etc)\r\n if (value === \"true\") {\r\n value = true;\r\n }\r\n if (value === \"false\") {\r\n value = false;\r\n }\r\n\r\n props.formikBag.setFieldTouched(props.formFieldDefinition.name, true, false);\r\n props.formikBag.setFieldValue(props.formFieldDefinition.name, value, true).then(() => {\r\n const error = component.props.formController.validateField(component.props.formFieldDefinition, component.props.formikBag);\r\n component.props.formikBag.setFieldError(component.props.formFieldDefinition.name, error);\r\n\r\n FormControlHelpers.handleTriggerFieldDependingOnCondition(component, event.target.value);\r\n\r\n // Known issue: formik setFieldValue is async. By using a time out, we work around this.\r\n if (FormControlHelpers.isValid(component)) {\r\n // Only get data when input is valid\r\n AjaxCallHelpers.getRelatedData(component as any, value);\r\n }\r\n });\r\n \r\n }\r\n };\r\n }\r\n static onRadioButtonChangeSetValueViaEvent(component: React.Component, label: string) {\r\n const props = component.props;\r\n return {\r\n onChange: function(event: any) {\r\n FormFieldStateHelpers.clearMarkedFields(component);\r\n\r\n let value = event.target.value;\r\n \r\n // workaround voor kentico/api value mismatch\r\n // value kan ook iets anders bevatten dan true/false (bijvoorbeeld Ja/Nee, Man/Vrouw etc)\r\n if (value === \"true\") {\r\n value = true;\r\n }\r\n if (value === \"false\") {\r\n value = false;\r\n }\r\n if (component.props.formFieldDefinition.datasource) {\r\n props.formikBag.setFieldValue(props.formFieldDefinition.name, {\r\n label: label,\r\n value: value\r\n });\r\n } else {\r\n props.formikBag.setFieldValue(props.formFieldDefinition.name, value);\r\n }\r\n FormControlHelpers.handleTriggerFieldDependingOnCondition(component, event.target.value);\r\n\r\n // Known issue: formik setFieldValue is async. By using a time out, we work around this.\r\n setTimeout(() => {\r\n if (FormControlHelpers.isValid(component)) {\r\n // Only get data when input is valid\r\n AjaxCallHelpers.getRelatedData(component as any, value);\r\n }\r\n }, 1);\r\n }\r\n };\r\n }\r\n static onChangeSetValueDoAction(\r\n component: React.Component,\r\n handleDatasource = (value: string) => {}\r\n ) {\r\n return {\r\n onChange: function(e) {\r\n FormFieldStateHelpers.clearMarkedFields(component);\r\n FormFieldStateHelpers.updateFormikField(component as any, e.target.value);\r\n handleDatasource(e.target.value);\r\n FormControlHelpers.handleTriggerFieldDependingOnCondition(component, e.target.value);\r\n }\r\n };\r\n }\r\n\r\n static onInputFocusChangeBlur(component: React.Component) {\r\n return {\r\n onChange(event) {\r\n FormFieldStateHelpers.clearMarkedFields(component);\r\n\r\n let value = event.target.value;\r\n\r\n // looking at the way this used to work, Kentico expects true as string instead of boolean.\r\n // To uncheck the checkbox, we check if the event checks or unchecks and then set value accordingly.\r\n if (component.props.formFieldDefinition.type === \"checkbox\") {\r\n value = event.target.checked ? event.target.value : 'false';\r\n }\r\n\r\n if (component.props.formFieldDefinition.type == \"fileupload\") {\r\n \r\n let result = false;\r\n if ((component as any).onInputChange) {\r\n result = (component as any).onInputChange(event);\r\n }\r\n\r\n if (result) {\r\n value = event.currentTarget.files[0];\r\n } else {\r\n return;\r\n }\r\n }\r\n \r\n // Can we update our field?\r\n if (!FormFieldStateHelpers.canUpdateField(component, value)) {\r\n return;\r\n }\r\n\r\n // Update formik field\r\n component.props.formikBag.setFieldTouched(component.props.formFieldDefinition.name, true, false);\r\n // By using .then, we have no need for a setTimeout before validating the value.\r\n component.props.formikBag.setFieldValue(component.props.formFieldDefinition.name, value, true).then((res) => {\r\n const error = component.props.formController.validateField(component.props.formFieldDefinition, component.props.formikBag);\r\n component.props.formikBag.setFieldError(component.props.formFieldDefinition.name, error);\r\n \r\n if (FormControlHelpers.isValid(component)) {\r\n // Only get data when input is valid\r\n\r\n if (component.props.formController.props.onFieldChange) {\r\n component.props.formController.props.onFieldChange(\r\n component.props.formController.props.formName, \r\n component.props.formFieldDefinition.name,\r\n value);\r\n }\r\n\r\n FormControlSpecifics.proces(component, value);\r\n\r\n AjaxCallHelpers.getRelatedData(component as any, value);\r\n }\r\n });\r\n },\r\n onBlur(e) {\r\n component.props.field.onBlur(e);\r\n },\r\n \r\n };\r\n }\r\n static isValid(component: React.Component) {\r\n return !this.isInValid(component);\r\n }\r\n\r\n // Double of isTouched has errors\r\n static isInValid(component: React.Component, fieldName: string = null) {\r\n const props = component.props;\r\n fieldName = fieldName || props.formFieldDefinition.name;\r\n return props.form.touched[fieldName] && props.form.errors[fieldName];\r\n }\r\n static inputProperties(component: React.Component) {\r\n const { readOnly } = FormFieldStateHelpers.getFieldState(component);\r\n return {\r\n ...this.baseProperties(component),\r\n ...this.onInputFocusChangeBlur(component),\r\n readOnly\r\n };\r\n }\r\n static invalidFeedbackComponent(component: React.Component) {\r\n const props = component.props;\r\n return this.isInValid(component) ? (\r\n
\r\n {ReactHtmlParser(props.form.errors[props.formFieldDefinition.name])}\r\n
\r\n ) : null;\r\n }\r\n static getTimeDelay(component: React.Component, timeDelay: number = 1000) {\r\n // Set timer\r\n const timerComponent = component as any;\r\n\r\n if (timerComponent.state.timer) {\r\n clearTimeout(timerComponent.state.timer);\r\n } \r\n\r\n if (component.props.formConfig.datasourceTimer !== undefined) {\r\n timeDelay = component.props.formConfig.datasourceTimer;\r\n }\r\n\r\n return timeDelay;\r\n }\r\n static getCounter(component: React.Component) {\r\n let counter = component.state.dataSourceCounter;\r\n counter++;\r\n \r\n if ((component as any).unmounted !== undefined && !!(component as any).unmounted) {\r\n return;\r\n }\r\n\r\n component.setState({ dataSourceCounter: counter });\r\n\r\n return counter;\r\n }\r\n\r\n static replaceBracketFieldsWithValues = (component: React.Component, targetString : string) => {\r\n var rxp = /{([^}]+)}/g,\r\n curMatch;\r\n let result = targetString;\r\n while( curMatch = rxp.exec( targetString ) ) {\r\n let value = \"\";\r\n if (component.props.formikBag.values[curMatch[1]]) {\r\n value = component.props.formikBag.values[curMatch[1]];\r\n }\r\n result = result.replace(\"{\" + curMatch[1] + \"}\", value);\r\n }\r\n \r\n return result;\r\n }\r\n\r\n static replaceTaggedEmailAddressesWithoutTags = (value : string) => { \r\n let result = (value || \"\").toString();\r\n let regularExpression = /<.+?@.+?>/g;\r\n const matches = result.match(regularExpression);\r\n if (matches) {\r\n matches.map((match) => {\r\n const email = match.slice(1, -1); \r\n result = result.replace(\"<\" + email + \">\", email); \r\n });\r\n }\r\n return result; \r\n } \r\n}\r\n","import { PropertyHelpers } from './PropertyHelpers';\r\nimport { FormControlProps } from '../interfaces/FormControlProps';\r\nimport { InputState } from '../formcontrols/Input';\r\n\r\nexport class FieldMaskHelpers{\r\n static testMaskedValue(component : React.Component, value : string){\r\n var regularExpression = new RegExp(\r\n PropertyHelpers.getMaskCharsExpression(component.props)\r\n );\r\n if (\r\n typeof component.props.formFieldDefinition\r\n .allowPrefixSpacesInInputOnly != \"undefined\" &&\r\n component.props.formFieldDefinition.allowPrefixSpacesInInputOnly ===\r\n true\r\n ) {\r\n value = value.replace(/^\\s+/, \"\");\r\n }\r\n\r\n return {value, passTest : regularExpression.test(value)};\r\n\r\n }\r\n}","import { FormControlProps } from '../../interfaces/FormControlProps';\r\nimport { InputState } from '../Input';\r\nimport { PropertyHelpers } from '../../helpers/PropertyHelpers';\r\nimport { FieldMaskHelpers } from '../../helpers/FieldMaskHelpers';\r\n\r\nexport class FormFieldStateHelpers {\r\n static getFieldState(component: React.Component) {\r\n let isTouchedOnlyWhenRequired: boolean = false;\r\n let visible: boolean = true;\r\n\r\n if (\r\n typeof component.props.formFieldDefinition.validation &&\r\n typeof component.props.formFieldDefinition.validation.required\r\n ) {\r\n isTouchedOnlyWhenRequired =\r\n component.props.form.touched[component.props.formFieldDefinition.name] === true &&\r\n component.props.field.value != null && component.props.field.value != '';\r\n }\r\n\r\n let readOnly: boolean = false;\r\n\r\n if (\r\n typeof component.props.formFieldDefinition.disabled &&\r\n component.props.formFieldDefinition.disabled == 'true'\r\n ) {\r\n if (\r\n component.props.formFieldDefinition.enabledOnError &&\r\n component.props.formFieldDefinition.enabledOnError === 'true' &&\r\n component.props.formikBag.values[\r\n 'error-' + component.props.formFieldDefinition.name\r\n ] &&\r\n component.props.formikBag.values[\r\n 'error-' + component.props.formFieldDefinition.name\r\n ]\r\n ) {\r\n readOnly = false;\r\n } else {\r\n readOnly = true;\r\n }\r\n }\r\n\r\n if (\r\n typeof component.props.formFieldDefinition.visibleOnError &&\r\n component.props.formFieldDefinition.visibleOnError == 'false'\r\n ) {\r\n if ( \r\n component.props.formikBag.values[\r\n 'error-' + (component.props.formFieldDefinition.fieldForErrorCheck || component.props.formFieldDefinition.name)\r\n ]\r\n ) {\r\n visible = false;\r\n }\r\n }\r\n\r\n if (\r\n typeof component.props.formFieldDefinition.visibleOnError &&\r\n component.props.formFieldDefinition.visibleOnError == 'true'\r\n ) {\r\n visible = false;\r\n if ( \r\n component.props.formikBag.values[\r\n 'error-' + (component.props.formFieldDefinition.fieldForErrorCheck || component.props.formFieldDefinition.name)\r\n ]\r\n ) {\r\n visible = true;\r\n }\r\n }\r\n\r\n return { isTouchedOnlyWhenRequired, readOnly, visible };\r\n }\r\n\r\n static hasErrors(component: React.Component) {\r\n const props = component.props;\r\n\r\n return props.form && props.form.errors[props.formFieldDefinition.name];\r\n }\r\n \r\n static hasErrorsByFieldName(component: React.Component,\r\n fieldName: string ) {\r\n const props = component.props;\r\n\r\n return props.form && props.form.errors[fieldName];\r\n }\r\n\r\n static isTouchedHasErrors(\r\n component: React.Component,\r\n fieldName: string = null\r\n ) {\r\n const props = component.props;\r\n // By default we take the props, but on override, we take given field name\r\n fieldName = fieldName || props.formFieldDefinition.name;\r\n return props.form && props.form.touched[fieldName] && props.form.errors[fieldName];\r\n }\r\n\r\n static canUpdateField(component: React.Component, inputValue: string) {\r\n if (PropertyHelpers.maskCharsExpression(component.props)) {\r\n // We have a masked value\r\n const { value, passTest } = FieldMaskHelpers.testMaskedValue(\r\n component as any,\r\n inputValue\r\n );\r\n\r\n // Action\r\n return value == '' || passTest;\r\n }\r\n return true;\r\n }\r\n static clearMarkedFields(component: React.Component) {\r\n if (component.props.formFieldDefinition.clearFields !== undefined) {\r\n component.props.formFieldDefinition.clearFields.map((fieldName: string) => {\r\n component.props.formikBag.setFieldValue(fieldName, '');\r\n component.props.formikBag.setFieldError(fieldName, '');\r\n component.props.formikBag.setFieldTouched(fieldName, false, false);\r\n });\r\n }\r\n }\r\n static updateFormikField(component: React.Component, value: any) {\r\n let newValue = value || '';\r\n\r\n if (!!component.props.formFieldDefinition.alwaysUppercase) {\r\n newValue = newValue.toUpperCase();\r\n }\r\n\r\n component.props.formikBag.setFieldTouched(component.props.formFieldDefinition.name, true, false);\r\n // By using .then, we have no need for a setTimeout before validating the value.\r\n component.props.formikBag.setFieldValue(component.props.formFieldDefinition.name, newValue, true).then((res) => {\r\n const error = component.props.formController.validateField(component.props.formFieldDefinition, component.props.formikBag);\r\n component.props.formikBag.setFieldError(component.props.formFieldDefinition.name, error);\r\n\r\n component.props.formikBag.validateForm(component.props.formikBag.values);\r\n });\r\n }\r\n}\r\n","import { FormControlProps } from '../../interfaces/FormControlProps';\r\nimport { StringHelpers } from '../../helpers/StringHelpers';\r\nimport { DatasourceOptionsService } from '../../services/DatasourceOptionsService';\r\nimport { getResourceString } from '../../kentico/resource-strings';\r\n\r\nexport class FormLabelHelpers {\r\n static getFieldLabel(component: React.Component) {\r\n const props = component.props;\r\n let label = FormLabelHelpers.getLabelWithoutAsterisk(props.formFieldDefinition.checkBoxLabel || props.formFieldDefinition.label);\r\n\r\n if (component.props.formFieldDefinition.dataType === \"date\") {\r\n if (typeof label == \"string\") {\r\n const dateFormatSpecs = \"(\" + (getResourceString(\"Form.Date.InputFormat\") || \"dd-mm-jjjj\") + \")\";\r\n if (label.toLowerCase().indexOf(dateFormatSpecs) < 0) {\r\n label += \" \" + dateFormatSpecs;\r\n }\r\n } \r\n }\r\n \r\n if (typeof label == \"string\") {\r\n label = StringHelpers.replacePropertiesInString(label, component.props.formikBag.values, true);\r\n }\r\n\r\n let isRequired = props.formFieldDefinition.validation['required'] !== undefined;\r\n if (!isRequired && !!component.props.formFieldDefinition.requiredWhenOptions) {\r\n isRequired = DatasourceOptionsService.getOptionsForForm(component.props.formFieldDefinition.name).length > 0;\r\n }\r\n\r\n return `${label}${isRequired ? ' *' : ''}`;\r\n }\r\n\r\n static getLabelWithoutAsterisk(label : string) {\r\n return (label || \"\").replace(/\\*$/, '').replace(/ $/, '');\r\n }\r\n\r\n static hasValue(obj, key, value) {\r\n return obj.hasOwnProperty(key) && obj[key] === value;\r\n }\r\n}\r\n","import { FormControlProps } from '../../interfaces/FormControlProps';\r\nimport { FormConfigHelpers } from './FormConfigHelpers';\r\n\r\nexport class FormikHelpers{\r\n static getValue(component: React.Component, fieldName : string){\r\n let result = undefined; \r\n const formDefinitions = component.props.formController.props.formDefinitions;\r\n const formValues = component.props.formController.props.formValues;\r\n if (formValues) {\r\n let isFound = false;\r\n component.props.formConfig.formSteps.map((formName) => {\r\n if (formName != component.props.formController.props.formName) {\r\n if (!isFound && formValues[formName][fieldName]) {\r\n let value = formValues[formName][fieldName];\r\n if (value && value.value) {\r\n value = value.value;\r\n }\r\n result = value;\r\n isFound = true;\r\n }\r\n } else {\r\n // handle current form\r\n if (formDefinitions[formName]) {\r\n formDefinitions[formName].map((formDef : any) => {\r\n if (!isFound && formDef.name == fieldName) {\r\n // get data from current form values instead of from store\r\n result = component.props.formikBag.values[fieldName];\r\n isFound = true;\r\n }\r\n });\r\n }\r\n }\r\n }); \r\n }\r\n if (result === undefined) { \r\n result = component.props.formikBag.values[fieldName];\r\n }\r\n\r\n return result;\r\n }\r\n static getValid(component: React.Component, fieldName : string){\r\n return component.props.formikBag.values[fieldName];\r\n }\r\n static mapValuesToFields(component: React.Component, data : any){\r\n if (data) {\r\n // Fill fields with data\r\n FormConfigHelpers.outputMappings(component, (fieldMapping: any) => {\r\n component.props.formikBag.setFieldValue(\r\n fieldMapping.mapsTo,\r\n data[fieldMapping.field]\r\n );\r\n\r\n if (data[fieldMapping.field] != '' && data[fieldMapping.field] != null) {\r\n component.props.formikBag.setFieldValue(\r\n 'error-' + fieldMapping.mapsTo,\r\n false\r\n );\r\n } else {\r\n component.props.formikBag.setFieldValue(\r\n fieldMapping.mapsTo,\r\n \"\"\r\n );\r\n \r\n component.props.formikBag.setFieldValue(\r\n 'error-' + fieldMapping.mapsTo,\r\n true\r\n );\r\n }\r\n });\r\n } else {\r\n // Error\r\n FormConfigHelpers.outputMappings(component, (fieldMapping: any) => {\r\n component.props.formikBag.setFieldValue(\r\n 'error-' + fieldMapping.mapsTo,\r\n true\r\n );\r\n });\r\n }\r\n }\r\n static mapEmptyToFields(component: React.Component, fieldError: boolean = false){\r\n FormConfigHelpers.outputMappings(component, (fieldMapping: any) => {\r\n component.props.formikBag.setFieldValue(fieldMapping.mapsTo, '');\r\n component.props.formikBag.setFieldValue(\r\n 'error-' + fieldMapping.mapsTo,\r\n fieldError\r\n );\r\n });\r\n }\r\n}","import * as Moment from \"moment\";\r\nimport { IFormFieldDefinition } from \"../interfaces/Fields\";\r\n\r\nexport class DefaultValueByConditionHelper {\r\n static setInitialValues(component, initialValues) {\r\n let formDefinitions: IFormFieldDefinition[] =\r\n component.props.formDefinitions[component.state.currentForm] || [];\r\n\r\n formDefinitions.forEach((formFieldDefinition) => {\r\n if (!formFieldDefinition.defaultValueByCondition) {\r\n return;\r\n }\r\n\r\n if (formFieldDefinition.defaultValueByCondition.expression !== \"custom\") {\r\n return;\r\n }\r\n\r\n if (formFieldDefinition.defaultValueByCondition.params[0] === \"checkAge\") {\r\n const result = this._ageCheck(formFieldDefinition, component.props.forms);\r\n if (result != null) {\r\n initialValues[formFieldDefinition.name] = result;\r\n }\r\n }\r\n });\r\n\r\n return initialValues;\r\n }\r\n\r\n private static _ageCheck(fieldDefinition: IFormFieldDefinition, forms): string | number | null {\r\n const checkForm = forms[fieldDefinition.defaultValueByCondition.form];\r\n if (!checkForm || !checkForm[fieldDefinition.defaultValueByCondition.control]) {\r\n return null;\r\n }\r\n\r\n let date = Moment(checkForm[fieldDefinition.defaultValueByCondition.control], \"DD-MM-YYYY\");\r\n if (!date.isValid()) {\r\n return null;\r\n }\r\n\r\n const age = Moment().diff(date, \"years\");\r\n if (fieldDefinition.defaultValueByCondition.values) {\r\n const newValue = fieldDefinition.defaultValueByCondition.values.find(val => {\r\n if (val.check === '==' && age == val.checkValue) {\r\n return true;\r\n }\r\n if (val.check === '<' && age < val.checkValue) {\r\n return true;\r\n }\r\n if (val.check === '>' && age > val.checkValue) {\r\n return true;\r\n }\r\n\r\n return false;\r\n });\r\n\r\n if (newValue) {\r\n return newValue.value;\r\n }\r\n } else if (age < fieldDefinition.defaultValueByCondition.params[1]) {\r\n return fieldDefinition.defaultValueByCondition.value;\r\n }\r\n \r\n return fieldDefinition.defaultValueByCondition.elseValue;\r\n }\r\n}\r\n","export class FileNameHelpers {\r\n\r\n static getFileNameToSplit(fileName: any) {\r\n let fileNameToSplit = \"\";\r\n if (typeof fileName !== \"string\") {\r\n fileNameToSplit = fileName.name || \"\";\r\n } else {\r\n fileNameToSplit = fileName;\r\n }\r\n return fileNameToSplit;\r\n }\r\n static getFileNameExtensionUppercase(fileName : string) {\r\n return FileNameHelpers.getFileNameToSplit(fileName).split(\".\").pop().toUpperCase();\r\n }\r\n\r\n static getFileNameWithoutPath(fileName : string) {\r\n return FileNameHelpers.getFileNameToSplit(fileName).split('\\\\').pop().split('/').pop();\r\n }\r\n\r\n static getFileAttachmentImage(fileName) {\r\n \r\n switch (FileNameHelpers.getFileNameToSplit(fileName).split('.').pop().toUpperCase()) {\r\n case \"PDF\":\r\n case \"PPT\":\r\n case \"PPTX\": \r\n return \"/assets/img/layout/bekijkook/bekijkook-rood.svg\";\r\n case \"DOCX\": \r\n case \"DOC\":\r\n case \"JPG\":\r\n return \"/assets/img/layout/bekijkook/bekijkook-blauw.svg\";\r\n case \"XLSX\": \r\n case \"XLS\":\r\n case \"PNG\":\r\n return \"/assets/img/layout/bekijkook/bekijkook-groen.svg\";\r\n case \"ZIP\":\r\n case \"RAR\":\r\n return \"/assets/img/layout/bekijkook/bekijkook-paars.svg\";\r\n case \"MP3\":\r\n case \"MP4\":\r\n case \"WAV\":\r\n case \"MOV\":\r\n return \"/assets/img/layout/bekijkook/bekijkook-grijs.svg\";\r\n default:\r\n return \"\";\r\n }\r\n }\r\n}","import { FormControlProps } from '../interfaces/FormControlProps';\r\n\r\nexport class PropertyHelpers {\r\n static getFieldID(props: FormControlProps) {\r\n return props.formFieldDefinition.name;\r\n }\r\n\r\n static getFieldReference(props: FormControlProps) {\r\n return props.formFieldDefinition.name;\r\n }\r\n\r\n static getMaxLength(props: FormControlProps, defaultLength: number) {\r\n return !!props.formFieldDefinition.maxlength\r\n ? props.formFieldDefinition.maxlength\r\n : defaultLength;\r\n }\r\n\r\n static getName(props: FormControlProps) {\r\n return props.formFieldDefinition.name;\r\n }\r\n\r\n static getValue(props: FormControlProps) {\r\n return props.field.value;\r\n }\r\n \r\n static hasRelatedDataUrl(props: FormControlProps): boolean {\r\n return (\r\n (props.formFieldDefinition.datasource &&\r\n props.formConfig.urlMappingsRelatedData &&\r\n props.formConfig.urlMappingsRelatedData[props.formFieldDefinition.datasource]) ||\r\n\r\n (props.formFieldDefinition.triggerDatasource &&\r\n props.formConfig.urlMappingsRelatedData &&\r\n props.formConfig.urlMappingsRelatedData[props.formFieldDefinition.triggerDatasource])\r\n\r\n );\r\n }\r\n\r\n static getRelatedDataUrl(props: FormControlProps, parameters: string) {\r\n if (props.formFieldDefinition.triggerDatasource) {\r\n return (\r\n props.formConfig.urlMappingsRelatedData[props.formFieldDefinition.triggerDatasource] + parameters\r\n );\r\n }\r\n \r\n if (props.formFieldDefinition.datasource) {\r\n return (\r\n props.formConfig.urlMappingsRelatedData[props.formFieldDefinition.datasource] + parameters\r\n );\r\n }\r\n return \"\";\r\n }\r\n\r\n static isActionUrl(props: FormControlProps) {\r\n return (props.formConfig.urlMappingsRelatedData[props.formFieldDefinition.datasource] !== undefined &&\r\n props.formConfig.urlMappingsRelatedData[props.formFieldDefinition.datasource].toLowerCase().indexOf(\"action:\") === 0) ||\r\n (props.formConfig.urlMappingsRelatedData[props.formFieldDefinition.triggerDatasource] !== undefined &&\r\n props.formConfig.urlMappingsRelatedData[props.formFieldDefinition.triggerDatasource].toLowerCase().indexOf(\"action:\") === 0)\r\n ; \r\n }\r\n\r\n static maskCharsExpression(props: FormControlProps) {\r\n return typeof props.formFieldDefinition.maskCharsExpression !== undefined;\r\n }\r\n\r\n static getMaskCharsExpression(props: FormControlProps) {\r\n return props.formFieldDefinition.maskCharsExpression;\r\n }\r\n}\r\n","import * as Yup from 'yup';\r\nimport * as Moment from 'moment';\r\n\r\nimport { UserService } from '@fnv-core/authentication';\r\nimport { PageTypeService } from '../services/PageTypeService';\r\nimport { FormService } from '../services/FormService';\r\nimport { PrintViewService } from '../services/PrintViewService';\r\nimport { ESBOnlineService } from '../services/ESBOnlineService';\r\n\r\nexport class KenticoValidatorUtils {\r\n static IsEmail(value){\r\n let validationSchemaShape : any = {};\r\n validationSchemaShape[\"email\"] = Yup.string().email(\"invalid e-mail\");\r\n\r\n var schema = Yup.object().shape(validationSchemaShape);\r\n try {\r\n schema.validateSync({[\"email\"]: value}); \r\n } catch (error) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n static hasValue(value) {\r\n return value !== undefined && value !== null && value !== '';\r\n }\r\n\r\n static isReadOnlyView(value) {\r\n return PageTypeService.getPageType() === \"view\" ;\r\n }\r\n\r\n static UserIsKaderlid(value) {\r\n return false;\r\n }\r\n\r\n static IsSummaryView(value) {\r\n return FormService.getIsSummaryView();\r\n }\r\n\r\n static IsAuthenticated() {\r\n return UserService.isAuthenticated();\r\n }\r\n\r\n static IsPrintView(value) {\r\n return PrintViewService.getPrintView();\r\n }\r\n\r\n static IsESBOnline() {\r\n return ESBOnlineService.getESBIsOnline();\r\n }\r\n\r\n static IsAgeYoungerThen16(value) {\r\n if (value === undefined || value == \"\") {\r\n return false;\r\n }\r\n\r\n let birthDate = Moment(value, 'DD-MM-YYYY' , true);\r\n if (birthDate.isValid()) {\r\n var age = Moment().diff(birthDate, 'years');\r\n if (age >= 13 && age < 16) {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n \r\n static GetBooleanPropertyFromPayload(fieldName) {\r\n const payload = FormService.getPayload();\r\n if (!payload) {\r\n return false;\r\n }\r\n return payload[fieldName] === true;\r\n }\r\n\r\n static ContainsValue(items, search) {\r\n if (items.length > 0) {\r\n if (items.some((item) => item.value.toLowerCase().includes(search))) {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n}\r\n","import * as React from \"react\";\r\nimport { useEffect, useState } from \"react\";\r\nimport ReactHtmlParser from 'react-html-parser';\r\nimport { StringHelpers } from '../helpers/StringHelpers';\r\n\r\nexport interface ContributieProps {\r\n formFieldDefinition: any;\r\n forms?: any;\r\n formName?: string;\r\n payload?: any; \r\n}\r\n\r\nexport const Contributie = (props: ContributieProps) => {\r\n const [label , setLabel] = useState(\"\");\r\n const [title, setTitle] = useState(\"\");\r\n const [richTextHtml , setRichTextHtml] = useState(\"\");\r\n const [hasRichText , setHasRichText] = useState(false);\r\n useEffect(() => {\r\n if (props.formFieldDefinition.lidVoordelenRichtText !== undefined && props.formFieldDefinition.lidVoordelenRichtText !== \"\") {\r\n setHasRichText(true);\r\n setRichTextHtml(ReactHtmlParser(props.formFieldDefinition.lidVoordelenRichtText));\r\n }\r\n\r\n let titleHelper = props.formFieldDefinition.title;\r\n let labelHelper = props.formFieldDefinition.label;\r\n\r\n let data = {};\r\n\r\n if (props.formFieldDefinition.form) {\r\n data = {...props.forms[props.formFieldDefinition.form],\r\n ...props.forms[props.formName]};\r\n } else {\r\n data = {...props.forms[props.formName]};\r\n }\r\n\r\n if (!!props.formFieldDefinition.includePayload) {\r\n data = {...data, ...props.payload};\r\n }\r\n\r\n setTitle(StringHelpers.replacePropertiesInString(titleHelper, data, true));\r\n setLabel(StringHelpers.replacePropertiesInString(labelHelper, data, true));\r\n } , [\r\n props.forms,\r\n props.formName,\r\n props.formFieldDefinition,\r\n props.payload\r\n ]);\r\n\r\n if (!props.formFieldDefinition) {\r\n return <>;\r\n } \r\n\r\n return
\r\n
\r\n
\r\n

{title}

\r\n
\r\n
\r\n
{props.formFieldDefinition.beforeText}
\r\n
\r\n {label}\r\n {props.formFieldDefinition.periodText}\r\n
\r\n
{ReactHtmlParser(props.formFieldDefinition.afterText)}
\r\n {props.formFieldDefinition.additionalText &&
{ReactHtmlParser(props.formFieldDefinition.additionalText)}
}\r\n {props.formFieldDefinition.toonLidWordenButton !== undefined && props.formFieldDefinition.toonLidWordenButton === true ? \r\n : null}\r\n {props.formFieldDefinition.hintContributieTarief &&
{ReactHtmlParser(props.formFieldDefinition.hintContributieTarief)}
}\r\n
\r\n
\r\n {props.formFieldDefinition.toonLidVoordelen !== undefined && props.formFieldDefinition.toonLidVoordelen === true ?\r\n
\r\n {hasRichText === true ? <>\r\n
\r\n
{ReactHtmlParser(props.formFieldDefinition.lidVoordelenBeforeText)}
\r\n {richTextHtml} \r\n
\r\n : \r\n <>\r\n

{ReactHtmlParser(props.formFieldDefinition.lidVoordelenTitle)}

\r\n
\r\n
{ReactHtmlParser(props.formFieldDefinition.lidVoordelenBeforeText)}
\r\n
    \r\n {props.formFieldDefinition.lidVoordelen && props.formFieldDefinition.lidVoordelen.map((lidVoordeel : string, index : number) =>\r\n
  • {lidVoordeel}
  • \r\n )} \r\n
\r\n
\r\n \r\n }\r\n
: null}\r\n
;\r\n};","import * as React from \"react\";\r\nimport ReactHtmlParser from 'react-html-parser';\r\n\r\nexport interface TipProps {\r\n formFieldDefinition: any; \r\n}\r\n\r\nexport const Tip = (props: TipProps) => {\r\n\r\n let icon = props.formFieldDefinition.tipIcon || \"idea\";\r\n let label = \"

\" + props.formFieldDefinition.label + \"

\";\r\n let layout = (props.formFieldDefinition.tipLayout || \"\").toLowerCase();\r\n\r\n if (props.formFieldDefinition.tip !== undefined && props.formFieldDefinition.tip !== \"\") {\r\n label = props.formFieldDefinition.tip;\r\n }\r\n\r\n let labelHtml = ReactHtmlParser(label);\r\n if (layout == \"\" || layout == \"callout\") { \r\n return
\r\n
\r\n
\r\n \r\n
\r\n
\r\n {labelHtml}\r\n
\r\n
\r\n
;\r\n } else if (layout == \"block\") { \r\n return
\r\n
\r\n
\r\n \r\n
{labelHtml}
\r\n
\r\n
\r\n
;\r\n } else {\r\n return
\r\n
\r\n \r\n {labelHtml}\r\n
\r\n
;\r\n }\r\n};","import * as React from \"react\";\r\nimport ReactHtmlParser from 'react-html-parser';\r\n\r\nexport interface AlertProps {\r\n formFieldDefinition: any;\r\n}\r\n\r\nexport const Alert = (props: AlertProps) => {\r\n\r\n let alertclass = (props.formFieldDefinition.alertClass || \"\").toLowerCase();\r\n let label = \"

\" + props.formFieldDefinition.label + \"

\";\r\n\r\n if (props.formFieldDefinition.alert !== undefined && props.formFieldDefinition.alert !== \"\") {\r\n label = props.formFieldDefinition.alert;\r\n }\r\n\r\n let labelHtml = ReactHtmlParser(label);\r\n\r\n return
\r\n {labelHtml}\r\n
;\r\n};","import * as React from 'react';\r\nimport ReactHtmlParser from 'react-html-parser';\r\nimport { Slug } from '@fnv-core/utils';\r\nimport { FileNameHelpers } from '../helpers/FileNameHelpers';\r\nimport { FormControlHelpers } from '../formcontrols/helpers/FormControlHelpers';\r\nimport { DatasourceOptionsService } from '../services/DatasourceOptionsService';\r\n\r\nexport interface SummaryProps {\r\n formFieldDefinition?: any; \r\n onClick?: any;\r\n formDefinitions?: any;\r\n forms: any;\r\n formContainer?: any;\r\n}\r\n\r\n/**\r\n * Template component for displaying a summary for a single field.\r\n */\r\nexport const Summary = (props: SummaryProps) => {\r\n return \r\n
\r\n {props.formFieldDefinition.label !== undefined && \r\n props.formFieldDefinition.label !== \"\" ? \r\n
\r\n

{ReactHtmlParser(props.formFieldDefinition.label)}

\r\n
: null }\r\n \r\n
\r\n
\r\n {props.formFieldDefinition.data.map((item : any, indexFieldDef : number) => {\r\n let lastFieldEmpty : boolean = false;\r\n let labelPrinted : boolean = false;\r\n return \r\n
\r\n \r\n {item.fields.map((field : any , indexItem : number) => {\r\n\r\n if (!!field.hideWhenNoOptions) {\r\n if (DatasourceOptionsService.getOptionsForForm(field.name).length == 0) {\r\n return ;\r\n }\r\n }\r\n \r\n let labelHelper = null;\r\n if (!labelPrinted) {\r\n labelHelper =
{ReactHtmlParser(item.label)}
;\r\n labelPrinted = true;\r\n }\r\n \r\n if (field.indexOf(\"text:\") == 0) {\r\n return \r\n {labelHelper}\r\n {field.substr(5)}\r\n ;\r\n } else\r\n if (field == \" \") {\r\n if (lastFieldEmpty) {\r\n return {labelHelper};\r\n } else {\r\n lastFieldEmpty = false;\r\n return \r\n {labelHelper}\r\n  \r\n ;\r\n }\r\n } else\r\n if (field == \"[ENTER]\") {\r\n lastFieldEmpty = false;\r\n return \r\n {labelHelper}\r\n
\r\n
;\r\n } else {\r\n const formFields: string[] = field.split(\".\");\r\n if (formFields.length == 2) {\r\n const formName = formFields[0];\r\n const fieldName = formFields[1];\r\n\r\n if (props.forms[formName] !== undefined && props.forms[formName][fieldName] !== undefined) {\r\n \r\n lastFieldEmpty = false;\r\n\r\n if (item.fieldValueHasLabel === true) {\r\n let text = props.forms[formFields[0]][formFields[1]].label;\r\n if (typeof item.toUpperCase !== undefined && item.toUpperCase === true) {\r\n text = text.toUpperCase();\r\n }\r\n \r\n return \r\n {labelHelper}\r\n {text}\r\n ;\r\n\r\n } else\r\n if (item.viaOption === true) {\r\n let valueViaOption = \"\";\r\n\r\n props.formDefinitions[formName].map((formDef : any) => {\r\n if (formDef.name == fieldName) {\r\n\r\n if (typeof formDef.datasource === \"undefined\" && formDef.valueoptions !== undefined) {\r\n\r\n // conveniance\r\n let rawValueFromForm = props.forms[formName][fieldName];\r\n let value = rawValueFromForm.toString();\r\n if (rawValueFromForm.value) {\r\n value = rawValueFromForm.value.toString();\r\n }\r\n let index = formDef.valueoptions.indexOf(value);\r\n if (index >= 0) {\r\n valueViaOption = formDef.options[index];\r\n }\r\n\r\n }\r\n }\r\n });\r\n\r\n if (typeof item.toUpperCase !== undefined && item.toUpperCase === true) {\r\n valueViaOption = valueViaOption.toUpperCase();\r\n }\r\n\r\n if (valueViaOption == \"\") {\r\n valueViaOption = \"-\";\r\n }\r\n\r\n return \r\n {labelHelper}\r\n {valueViaOption}\r\n ;\r\n }\r\n\r\n let isReactComponent = false;\r\n let value = props.forms[formName][fieldName];\r\n let displayValue = value;\r\n \r\n // workaround to prevent \"true\" or \"false\" being visible in form-summary\r\n // (happens with checkboxes)\r\n if ((value as unknown || '').toString().toLowerCase() === \"true\") {\r\n displayValue = \"Ja\";\r\n }\r\n \r\n if ((value as unknown || '').toString().toLowerCase() === \"false\") {\r\n // see explicit field type check below\r\n displayValue = \"Nee\";\r\n }\r\n\r\n if (props.formFieldDefinition && props.formFieldDefinition.orgField &&\r\n props.formFieldDefinition.orgField.type == \"chooseLocation\") {\r\n const locationNameField = props.formFieldDefinition.orgField.locationNameInPayloadField; \r\n const payload = props.formContainer.getPayload();\r\n \r\n displayValue = (payload && payload[locationNameField]) || displayValue;\r\n }\r\n\r\n let alwaysShowSummaryFieldOverride : boolean = false;\r\n props.formDefinitions[formName].map((formDef : any) => {\r\n if (formDef.name == fieldName) {\r\n displayValue = FormControlHelpers.convertValueToType(displayValue, formDef);\r\n\r\n if (formDef.alwaysShowSummaryField === true) {\r\n alwaysShowSummaryFieldOverride = true;\r\n }\r\n\r\n if (formDef.type == \"fileupload\") {\r\n labelHelper = null;\r\n if (displayValue && displayValue.name) {\r\n displayValue = getFileComponent(displayValue.name);\r\n isReactComponent = true;\r\n }\r\n } else \r\n if (formDef.type == \"checkbox\" || formDef.type == \"switch\") {\r\n // fallback if text is empty and it is a checkbox or switch\r\n if (displayValue == \"\" || !displayValue) {\r\n displayValue = \"Nee\";\r\n }\r\n }\r\n }\r\n });\r\n \r\n if (displayValue && displayValue.label !== undefined) {\r\n displayValue = displayValue.label;\r\n\r\n if (displayValue == \"\") {\r\n lastFieldEmpty = true;\r\n }\r\n }\r\n\r\n if (typeof item.toUpperCase !== undefined && item.toUpperCase === true) { \r\n displayValue = (displayValue || \"\").toUpperCase();\r\n }\r\n\r\n if ((displayValue == \"\" || displayValue == undefined) && \r\n (alwaysShowSummaryFieldOverride ||\r\n (props.formFieldDefinition.alwaysShowSummaryField !== undefined && props.formFieldDefinition.alwaysShowSummaryField))\r\n ) {\r\n displayValue = \"-\";\r\n }\r\n\r\n return (displayValue != \"\" ? \r\n {labelHelper}\r\n {isReactComponent ? displayValue : \r\n ReactHtmlParser(FormControlHelpers.replaceTaggedEmailAddressesWithoutTags(displayValue))}\r\n : null);\r\n }\r\n \r\n }\r\n lastFieldEmpty = true;\r\n return ;\r\n }\r\n })}\r\n
\r\n
;\r\n })}\r\n
\r\n
;\r\n};\r\n\r\nfunction getFileComponent(fileName) {\r\n if (!fileName) {\r\n return null;\r\n }\r\n\r\n const fileNameExtensionImage = FileNameHelpers.getFileAttachmentImage(fileName);\r\n const fileNameExtension = FileNameHelpers.getFileNameExtensionUppercase(fileName);\r\n\r\n if (fileNameExtensionImage != \"\") {\r\n return \r\n \r\n {fileNameExtension}\r\n \r\n \r\n {FileNameHelpers.getFileNameWithoutPath(fileName)}\r\n ;\r\n } else if (fileNameExtension && fileNameExtension !== \"\") {\r\n return \r\n \r\n {fileNameExtension}\r\n \r\n \r\n {FileNameHelpers.getFileNameWithoutPath(fileName)}\r\n ;\r\n }\r\n}","import * as React from \"react\";\r\nimport { Link } from \"react-router-dom\";\r\n\r\nexport interface LinkProps {\r\n formFieldDefinition: any; \r\n initialValues : any;\r\n}\r\n\r\nexport const InternalLink = (props: LinkProps) => {\r\n if (!!props.formFieldDefinition.isDataField) {\r\n if (props.initialValues && props.initialValues[props.formFieldDefinition.name]) {\r\n return {props.formFieldDefinition.label};\r\n } else {\r\n return <>;\r\n }\r\n } else\r\n if (props.formFieldDefinition.url.indexOf(\"http\") == 0) {\r\n return {props.formFieldDefinition.label};\r\n }\r\n return {props.formFieldDefinition.label};\r\n};","import * as React from \"react\";\r\nimport { FormStylingHelpers } from \"../formcontrols/helpers/FormStylingHelpers\";\r\n\r\nexport interface SimpleTextProps {\r\n formFieldDefinition: any; \r\n}\r\n\r\nexport const SimpleText = (props: SimpleTextProps) =>
\r\n \r\n

{props.formFieldDefinition.explanation !== undefined && props.formFieldDefinition.explanation !== \"\" ? props.formFieldDefinition.explanation : props.formFieldDefinition.text}

\r\n
;\r\n\r\n","import * as React from \"react\";\r\nimport Modal from 'react-bootstrap/Modal';\r\n\r\ninterface onSubmitFunction {\r\n (event : React.MouseEvent) : void;\r\n}\r\n\r\nexport interface PopupConfirmProps {\r\n formFieldDefinition: any;\r\n onCancel : onSubmitFunction;\r\n onOK : onSubmitFunction;\r\n}\r\n\r\nexport const PopupConfirm = (props: PopupConfirmProps) => {}}>\r\n \r\n {props.formFieldDefinition.label}\r\n \r\n \r\n

{props.formFieldDefinition.explanation !== undefined && props.formFieldDefinition.text !== \"\" ? props.formFieldDefinition.text : null}

\r\n

{props.formFieldDefinition.explanation !== undefined && props.formFieldDefinition.explanation !== \"\" ? props.formFieldDefinition.explanation : null}

\r\n
\r\n \r\n props.onCancel(e)} className=\"btn btn-outline-primary\">Nee\r\n props.onOK(e)} className=\"btn btn-form-submit\">Ja\r\n \r\n
;\r\n\r\n","import * as React from \"react\";\r\nimport Modal from 'react-bootstrap/Modal';\r\n\r\ninterface onSubmitFunction {\r\n (event : React.MouseEvent, reactRouteOnSuccess?) : void;\r\n}\r\n\r\nexport interface PopupOKProps {\r\n formFieldDefinition: any;\r\n onOK : onSubmitFunction;\r\n}\r\n\r\nexport const PopupOK = (props: PopupOKProps) => {}}>\r\n \r\n {props.formFieldDefinition.label}\r\n \r\n \r\n
{props.formFieldDefinition.explanation !== undefined && props.formFieldDefinition.text !== \"\" ? props.formFieldDefinition.text : null}
\r\n
{props.formFieldDefinition.explanation !== undefined && props.formFieldDefinition.explanation !== \"\" ? props.formFieldDefinition.explanation : null}
\r\n
\r\n \r\n props.onOK(e)} className=\"btn btn-primary\">OK\r\n \r\n
;\r\n\r\n","import * as React from 'react';\r\nimport ReactHtmlParser, { processNodes } from 'react-html-parser';\r\nimport { connect } from 'react-redux';\r\nimport fetch from 'cross-fetch';\r\nimport * as Handlebars from 'handlebars';\r\n\r\nimport { AjaxCallHelpers } from '../formcontrols/helpers/AjaxCallHelpers';\r\nimport { IModule } from '../modules/module';\r\nimport { ReactFormHelpers } from '../containers/helpers/FormHelpers';\r\nimport { registerHandlebarsHelpers } from '../../helpers/handlebars-helpers';\r\nimport { StringHelpers } from '../helpers/StringHelpers';\r\n\r\nimport { IFormConfig } from '../interfaces/FormConfig';\r\nimport { retrieveSavedQuerystring } from '../../helpers/sessionstorage-helpers';\r\n\r\nregisterHandlebarsHelpers();\r\n\r\nexport interface RichtTextContentProps {\r\n forms: any;\r\n formConfig: IFormConfig;\r\n formFieldDefinition: any;\r\n formName: string;\r\n payload: any;\r\n formDefinitions: any;\r\n formController: any;\r\n formikBag: any; \r\n}\r\n\r\nexport interface RichtTextContentState {\r\n module: IModule;\r\n isLoadingModule: boolean;\r\n isLoading: boolean;\r\n isErrorLoading: boolean;\r\n collapseUpdate: number;\r\n}\r\n\r\nconst mapStateToProps = (state: any) => {\r\n return {\r\n forms: state.forms\r\n };\r\n};\r\n\r\nclass InternalRichtTextContent extends React.Component {\r\n constructor(props: RichtTextContentProps) {\r\n super(props);\r\n this.state = {\r\n module: undefined,\r\n isLoadingModule: false,\r\n isLoading: false,\r\n isErrorLoading: false,\r\n collapseUpdate: 1\r\n };\r\n }\r\n\r\n componentDidMount() {\r\n if (this.props.formFieldDefinition.useModule) {\r\n this.setState({isLoadingModule: true});\r\n import('../modules/' + this.props.formFieldDefinition.useModule).then(module => { \r\n if (this.unmounted) {\r\n return;\r\n } \r\n this.setState(\r\n {\r\n module: new module.Module(),\r\n isLoadingModule: false\r\n });\r\n }); \r\n }\r\n\r\n if (this.props.formFieldDefinition.triggerDatasource) {\r\n AjaxCallHelpers.getRelatedData(this as any, \"\");\r\n }\r\n }\r\n\r\n unmounted : boolean = false;\r\n\r\n componentWillUnmount() {\r\n this.unmounted = true;\r\n }\r\n\r\n showPDF(blobInfo) {\r\n if (!!blobInfo.error) {\r\n return;\r\n }\r\n if (blobInfo && blobInfo.blob) {\r\n blobInfo.blob.then(blobData => {\r\n \r\n let newBlob = new Blob([blobData], {type: \"application/pdf\"});\r\n \r\n if (window.navigator && window.navigator.msSaveOrOpenBlob) {\r\n window.navigator.msSaveOrOpenBlob(newBlob);\r\n return;\r\n } \r\n \r\n const data = window.URL.createObjectURL(newBlob);\r\n let link = document.createElement('a');\r\n link.href = data;\r\n link.target = \"_blank\";\r\n link.download = blobInfo.fileName || \"file.pdf\";\r\n link.click();\r\n setTimeout(function(){\r\n // For Firefox it is necessary to delay revoking the ObjectURL\r\n window.URL.revokeObjectURL(data);\r\n }, 100);\r\n });\r\n }\r\n }\r\n\r\n onClick = (href, event) => {\r\n let data = {};\r\n\r\n if (!!this.props.formFieldDefinition.includePayload) {\r\n data = {...data, ...this.props.payload};\r\n }\r\n\r\n // fill data from current form using form definition to prevent prefilled data to be inserted:\r\n let currentFormData = {};\r\n let currentForm = this.props.forms[this.props.formName];\r\n if (currentForm) {\r\n this.props.formDefinitions[this.props.formName].map((fieldDef) => {\r\n if (currentForm[fieldDef.name]) {\r\n currentFormData[fieldDef.name] = currentForm[fieldDef.name]; \r\n }\r\n });\r\n }\r\n data = {...data, ...currentFormData};\r\n \r\n this.props.formConfig.formSteps.map((form: string, index) => {\r\n // ignore current screen, this is filled with values from current form in the code above\r\n if (form != this.props.formName) { \r\n if (this.props.forms[form] !== undefined) {\r\n data = (Object as any).assign({}, data, this.props.forms[form]);\r\n }\r\n } \r\n });\r\n\r\n data = ReactFormHelpers.rewriteValueObjectsInPostData(data, this.props.formDefinitions, this.props.formConfig.formSteps);\r\n \r\n fetch(\r\n href,\r\n {\r\n method: 'post',\r\n headers: {\r\n Accept: 'application/json',\r\n 'Content-Type': 'application/json'\r\n },\r\n body: JSON.stringify(data)\r\n }\r\n )\r\n .then(response => {\r\n if (response.status >= 300) {\r\n return {\r\n error: true \r\n };\r\n }\r\n let contentType = response.headers.get('content-type');\r\n if (contentType == \"application/pdf\") {\r\n let disposition = response.headers.get('content-disposition');\r\n let fileName = disposition.match(/filename=(.+)/)[1];\r\n return {\r\n fileName : fileName,\r\n blob: response.blob()\r\n };\r\n } else {\r\n return {\r\n error: true \r\n };\r\n }\r\n })\r\n .then(blob => this.showPDF(blob));\r\n }\r\n\r\n onCollapse = (collapseId : string, event) => {\r\n event.preventDefault();\r\n this.setState(state => {\r\n return {...state, \r\n collapseUpdate: state.collapseUpdate + 1,\r\n [collapseId] : !state[collapseId]\r\n };\r\n });\r\n return false;\r\n }\r\n\r\n transformNode = (node, index) => {\r\n if (node.type === 'tag' && node.name === 'a') {\r\n if (node && node.attribs) {\r\n // PBI#25634 - need to support querystring parameters in URLS between different forms\r\n if (this.props.formConfig.usePersistedQueryString &&\r\n node.attribs['href'].length > 0){ \r\n node.attribs['href'] = `${node.attribs['href']}?${retrieveSavedQuerystring()}`;\r\n }\r\n if (!!node.attribs[\"data-include-form-data\"] || \r\n node.attribs[\"data-include-form-data\"] == \"true\") {\r\n return {processNodes(node.children)};\r\n } \r\n else if(!!node.attribs[\"data-collapseid\"]) {\r\n return {processNodes(node.children)};\r\n }\r\n }\r\n } \r\n if (node.type === 'tag' && node.name === 'div') {\r\n if (node && node.attribs) { \r\n if (node.attribs[\"data-collapsableid\"]) {\r\n return
{processNodes(node.children)}
;\r\n }\r\n }\r\n }\r\n }\r\n\r\n\r\n render() {\r\n let data = {};\r\n\r\n if (this.props.formFieldDefinition.form) {\r\n data = {...this.props.forms[this.props.formFieldDefinition.form],\r\n ...this.props.forms[this.props.formName]};\r\n } else {\r\n data = {...this.props.forms[this.props.formName]};\r\n }\r\n\r\n if (!!this.props.formFieldDefinition.includePayload) {\r\n data = {...data, ...this.props.payload};\r\n }\r\n\r\n let html = this.props.formFieldDefinition.content || \"\";\r\n if (this.props.formFieldDefinition.templateType === \"handlebars\") {\r\n const template = Handlebars.compile(this.props.formFieldDefinition.content || \"\");\r\n html = template({...data, ...this.props.formikBag.values});\r\n }\r\n\r\n let contentHtml = ReactHtmlParser(StringHelpers.replacePropertiesInString(html, \r\n data, true), {\r\n transform: this.transformNode\r\n });\r\n \r\n \r\n return <>\r\n {(!!this.state.isLoadingModule || !!this.state.isLoading) &&
\r\n \r\n
}\r\n {!!this.state.isErrorLoading && (this.props.formController.props.formConfig as any).ErrorOnGetRelatedData && \r\n
{ReactHtmlParser((this.props.formController.props.formConfig as any).ErrorOnGetRelatedData || \"\")}
}\r\n {!this.state.isLoading && !this.state.isErrorLoading &&
\r\n {contentHtml}\r\n
}\r\n {!!this.props.formFieldDefinition.useModule && this.state.module && this.state.module.render(this.props.forms)}\r\n ;\r\n }\r\n}\r\n\r\nconst RichtTextContent = connect(mapStateToProps)(InternalRichtTextContent);\r\n\r\nexport { RichtTextContent };","import * as React from \"react\";\r\nimport { LabelAndPopover } from '../formcontrols/components/label-and-popover';\r\n\r\nexport interface TitleHeadingTwoProps {\r\n formFieldDefinition: any; \r\n}\r\n\r\nexport const TitleHeadingTwo = (props: TitleHeadingTwoProps) => {\r\n return <>\r\n

{props.formFieldDefinition.label}

\r\n {props.formFieldDefinition.description &&

{props.formFieldDefinition.description}

}\r\n ;\r\n\r\n};","import * as React from 'react';\r\nimport { useState , useEffect, useRef } from 'react';\r\nimport { StringHelpers } from '../helpers/StringHelpers';\r\nimport ReactHtmlParser from 'react-html-parser';\r\n\r\nexport interface PetitieTellerProps {\r\n formFieldDefinition: {\r\n name: string;\r\n label: string;\r\n text: string;\r\n maxPetitionCount: number;\r\n StartValuePetitionCount: number;\r\n\r\n explanation?: string;\r\n };\r\n initialValues: {\r\n [key: string]: string;\r\n };\r\n}\r\n\r\nfunction useInterval(callback: () => void, delay: number) {\r\n const savedCallback = useRef<() => void>();\r\n\r\n useEffect(() => {\r\n savedCallback.current = callback;\r\n }, [callback]);\r\n\r\n useEffect(() => {\r\n function tick() {\r\n if (savedCallback) {\r\n savedCallback.current();\r\n }\r\n }\r\n if (delay !== null) {\r\n let id = setInterval(tick, delay);\r\n return () => clearInterval(id);\r\n }\r\n }, [delay]);\r\n}\r\n\r\nexport function PetitieTeller(props: PetitieTellerProps) {\r\n let initial = 0;\r\n let maxCount = 50000;\r\n const maxPetitionCount = props.formFieldDefinition.maxPetitionCount || 0;\r\n let startCount = props.formFieldDefinition.StartValuePetitionCount || 0;\r\n\r\n if (props.initialValues && props.initialValues[props.formFieldDefinition.name] != null) {\r\n initial = startCount;\r\n const parsedInitialValue = parseFloat(props.initialValues[props.formFieldDefinition.name]);\r\n if(!isNaN(parsedInitialValue)) {\r\n initial += parsedInitialValue;\r\n }\r\n maxCount = Math.min(maxPetitionCount, (initial));\r\n initial = Math.max(initial - 10000, 0);\r\n }\r\n\r\n const [count, setCount] = useState(initial);\r\n const [delay, setDelay] = useState(20);\r\n\r\n useInterval(() => {\r\n const add = 257;\r\n if (count + add <= maxCount) {\r\n setCount(count + add);\r\n setDelay(delay + 1);\r\n } else {\r\n setCount(maxCount);\r\n }\r\n }, delay);\r\n\r\n const counterWidthPercentage = Math.min(100, count * 100 / props.formFieldDefinition.maxPetitionCount);\r\n\r\n return (\r\n
\r\n \r\n

{props.formFieldDefinition.explanation ? props.formFieldDefinition.explanation : props.formFieldDefinition.text}

\r\n
\r\n
\r\n
\r\n
\r\n );\r\n}","import * as React from \"react\";\r\nimport ReactHtmlParser from 'react-html-parser';\r\n\r\nexport interface CTABlockProps {\r\n formFieldDefinition: any;\r\n}\r\n\r\nexport class CTABlock extends React.Component {\r\n constructor(props: CTABlockProps) {\r\n super(props);\r\n }\r\n\r\n render() {\r\n return
\r\n

{this.props.formFieldDefinition.ctaTitle}

\r\n

{ReactHtmlParser(this.props.formFieldDefinition.ctaDescription)}

\r\n {this.props.formFieldDefinition.ctaButtonText}\r\n
;\r\n }\r\n}","import * as React from \"react\";\r\nimport ReactHtmlParser from 'react-html-parser';\r\n\r\nexport interface HorizontalRulerProps {\r\n formFieldDefinition: any; \r\n}\r\n\r\nexport const HorizontalRuler = (props: HorizontalRulerProps) => {\r\n return
;\r\n};","import { Tokenizer } from '@fnv-core/tokens';\r\nimport * as React from 'react';\r\nimport { LOGIN_URL } from '../constants/Constants';\r\n\r\nconst LOGIN_URL_TEMPLATE = `${LOGIN_URL}?redirectUrl={0}`;\r\n\r\nexport interface LoginRedirectProps {\r\n formFieldDefinition: any;\r\n}\r\n\r\nexport const LoginRedirect = (props: LoginRedirectProps) => {\r\n const { formFieldDefinition } = props;\r\n const redirectUrl = location.pathname + location.search;\r\n const href = Tokenizer.replaceTokens(LOGIN_URL_TEMPLATE, [redirectUrl]);\r\n\r\n return (\r\n
\r\n

\r\n {formFieldDefinition.label}\r\n
\r\n {formFieldDefinition.linkText}\r\n

\r\n
\r\n );\r\n};","import { IFormatter } from './interfaces';\r\nimport { CurrencyFormatter } from './currency';\r\nimport { DateFormatter } from './date';\r\nimport { DecimalFormatter } from './decimal';\r\n\r\nexport class Formatter {\r\n\r\n private static _formatterMap: { [key: string]: () => IFormatter } = {\r\n 'currency': () => new CurrencyFormatter(),\r\n 'decimal': () => new DecimalFormatter(),\r\n 'date': () => new DateFormatter(),\r\n };\r\n\r\n static format(value: string | number, type: string, options?: any) {\r\n\r\n const formatter = this._formatterMap[type];\r\n if (formatter) {\r\n return formatter().format(value, options);\r\n }\r\n\r\n return value;\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { Formatter } from '@fnv-core/formatting';\r\nimport { Tokenizer } from '@fnv-core/tokens';\r\n\r\ninterface IColumn {\r\n title: string;\r\n property: string;\r\n template?: string;\r\n formatter?: string;\r\n formatterOptions?: any;\r\n}\r\n\r\ninterface IListProps {\r\n /**\r\n * A unique name to add to the container class.\r\n */\r\n name: string;\r\n /**\r\n * An optional title to display.\r\n */\r\n title?: string;\r\n /**\r\n * Text to display when there are no items.\r\n */\r\n noDataText?: string;\r\n /**\r\n * The items to display.\r\n */\r\n items: any[];\r\n /**\r\n * The columns to display.\r\n */\r\n columns: IColumn[];\r\n}\r\n\r\n/**\r\n * A component for displaying items in a list style.\r\n */\r\nexport const List = (props: IListProps) => {\r\n\r\n const { items, name, title, columns, noDataText } = props;\r\n\r\n if (!items) {\r\n return null;\r\n }\r\n\r\n return (\r\n
\r\n {title &&

{title}

}\r\n {!items.length && {noDataText}}\r\n {!!items.length && (\r\n
\r\n {items.map((item) => (\r\n
\r\n \r\n
\r\n ))}\r\n
\r\n )}\r\n
\r\n );\r\n};\r\n\r\ninterface IListItemProps {\r\n data: {\r\n [key: string]: string;\r\n };\r\n columns: IColumn[];\r\n}\r\n\r\nconst ListItem = ({ data, columns }: IListItemProps) => {\r\n\r\n const getDisplayValue = (column: IColumn) => {\r\n\r\n let value = data[column.property];\r\n let displayValue;\r\n if (column.formatter) {\r\n displayValue = Formatter.format(value, column.formatter, column.formatterOptions);\r\n } else {\r\n displayValue = value;\r\n }\r\n\r\n if (!column.template) {\r\n return displayValue;\r\n }\r\n\r\n // Pass other values as well so it can be used in the template, e.g.:\r\n // Value is {value} and another thing is {AnotherProperty}\r\n const otherTokens = Object.keys(data).map(key => {\r\n return {\r\n name: key,\r\n value: data[key].toString(),\r\n };\r\n });\r\n const tokens = [\r\n ...otherTokens,\r\n { name: 'value', value: displayValue },\r\n ];\r\n\r\n const tokenized = Tokenizer.replaceTokens(column.template, tokens, true);\r\n return tokenized;\r\n };\r\n\r\n return (\r\n <>\r\n {columns.map((column) => {\r\n const displayValue = getDisplayValue(column);\r\n return (\r\n
\r\n
{column.title}
\r\n
{displayValue}
\r\n
\r\n );\r\n })\r\n }\r\n \r\n );\r\n};\r\n","import * as React from \"react\";\r\nimport { useState, useEffect } from 'react';\r\nimport ReactHtmlParser from 'react-html-parser';\r\nimport Downshift from 'downshift';\r\nimport { ArrayHelper, Slug } from '@fnv-core/utils';\r\nimport { LabelAndPopover } from '../../formcontrols/components/label-and-popover';\r\n\r\ninterface IOption {\r\n value: any;\r\n label: string;\r\n}\r\n\r\nexport interface IDropdownMultipleProps {\r\n // The name to be used for form values.\r\n name: string;\r\n // The label to display above the component.\r\n label: string;\r\n\r\n // The options to use in the dropdowns.\r\n options?: IOption[];\r\n // Optionally provide a datasource function instead of already available options.\r\n datasource?: Promise;\r\n \r\n // A function to trigger when the selected options are changed.\r\n onChange: (selectedOptions: IOption[]) => void;\r\n // The selected values. If changed, the dropdowns are rendered again based on the selectedValues input.\r\n selectedValues?: string[];\r\n\r\n // The label to display when no option is selected.\r\n chooseOptionLabel: string;\r\n // An optional explanation to display above the field.\r\n explanation?: string;\r\n // Indicates if an information icon should be added.\r\n hasPopover?: boolean;\r\n // The label to use for the 'add more' button.\r\n addMoreLabel?: string;\r\n\r\n // An optional maximum number of items that is allowed to be selected.\r\n maxItems?: number;\r\n // If true, sort items alphabetically by label.\r\n sortItems?: boolean;\r\n\r\n // A boolean indicating if the current value is invalid. If true, the errors are displayed.\r\n isInvalid?: boolean;\r\n // An optional error (html) to display when isInvalid is truthy.\r\n error?: string;\r\n}\r\n\r\n/**\r\n * A control for managing multiple dropdowns to handle a single value.\r\n * NOTE: This code is fully based on the formcontrols/Dropdown.tsx, so there is a lot of double code.\r\n */\r\nexport const DropdownMultipleControl = (props: IDropdownMultipleProps) => {\r\n\r\n if (!props.options && !props.datasource) {\r\n throw new Error('Either provide options or a datasource that resolves to options.');\r\n }\r\n\r\n // Can also be 'null', for example when adding a new empty one\r\n const [selectedOptions, setSelectedOptions] = useState<(IOption | null)[]>([]);\r\n const [options, setOptions] = useState([]);\r\n // Indicates which dropdown search field has the current focus\r\n const [dropdownSearchIndexHasFocus, setDropdownSearchIndexHasFocus] = useState(null);\r\n const [isInvalid, setIsInvalid] = useState(false);\r\n\r\n // Load options\r\n useEffect(() => {\r\n if (props.options) {\r\n setOptions(props.options);\r\n } else {\r\n const loadOptions = async () => {\r\n const optionsResult = await props.datasource!;\r\n setOptions(optionsResult);\r\n };\r\n\r\n loadOptions().then(() => {\r\n // nothing, just invoke the promise\r\n });\r\n }\r\n }, [props.options, props.datasource]);\r\n\r\n // Set selected values\r\n useEffect(() => {\r\n if (props.selectedValues?.length) {\r\n const selected = props.selectedValues.map(val => {\r\n return options.find(opt => opt.value === val);\r\n });\r\n setSelectedOptions(selected);\r\n } else {\r\n setSelectedOptions([null]);\r\n }\r\n }, [props.selectedValues]);\r\n\r\n // External validation\r\n useEffect(() => {\r\n if (typeof (props.isInvalid) === 'boolean') {\r\n setIsInvalid(props.isInvalid);\r\n }\r\n }, [props.isInvalid]);\r\n\r\n const selectionChanged = (index: number, selection: IOption) => {\r\n // It is assumed here that `null` is not in the array\r\n const copy = [...selectedOptions] as IOption[];\r\n copy[index] = selection;\r\n setSelectedOptions(copy);\r\n props.onChange(copy.filter(c => !!c));\r\n };\r\n\r\n const onDeleteClick = (index: number) => {\r\n // It is assumed here that `null` is not in the array\r\n const copy = [...selectedOptions] as IOption[];\r\n const deletedItem = copy[index];\r\n copy.splice(index, 1);\r\n setSelectedOptions(copy);\r\n if (deletedItem) {\r\n props.onChange(copy.filter(c => !!c));\r\n }\r\n };\r\n\r\n const optionFilter = (option: IOption, selectedItem: IOption | null, filter: string, index: number) => {\r\n // Current selected value for this dropdown\r\n if (selectedItem && option.value === selectedItem.value) {\r\n return true;\r\n }\r\n\r\n if (selectedOptions.find(so => so?.value === option.value)) {\r\n // Already selected in another dropdown\r\n return false;\r\n }\r\n\r\n // No filtering\r\n if (!filter) {\r\n return true;\r\n }\r\n\r\n // Not editing the current dropdown filter\r\n if (dropdownSearchIndexHasFocus !== index) {\r\n return true;\r\n }\r\n\r\n // Filter by given filter value\r\n return option.label.toLowerCase().indexOf(filter.toLowerCase()) > -1;\r\n };\r\n\r\n const sortOptions = (options: IOption[]) => {\r\n if (!props.sortItems) {\r\n return options;\r\n }\r\n\r\n const sorted = ArrayHelper.sortBy(options, 'label', 'ascending', (item) => item.value === '' ? -1 : null);\r\n\r\n return sorted;\r\n };\r\n\r\n const filterAndSortOptions = (options: IOption[], selectedItem: IOption | null, inputValue: string, dropdownIndex: number) => {\r\n const filtered = options.filter((option) => {\r\n // The first dropdown is allowed to have an empty option if there are no other options selected\r\n if (option.value === '') {\r\n return dropdownIndex === 0 && selectedOptions.length <= 1;\r\n }\r\n\r\n return optionFilter(option, selectedItem, inputValue, dropdownIndex);\r\n });\r\n const sorted = sortOptions(filtered);\r\n return sorted;\r\n };\r\n\r\n const handleMoreClick = () => {\r\n if (!props.maxItems || selectedOptions.length < props.maxItems) {\r\n setSelectedOptions([...selectedOptions, null]);\r\n }\r\n };\r\n\r\n const onInputFocus = (index: number) => {\r\n setDropdownSearchIndexHasFocus(index);\r\n };\r\n\r\n const onInputBlur = () => {\r\n setDropdownSearchIndexHasFocus(null);\r\n };\r\n\r\n const showAddMoreButton = \r\n // 1. All existing dropdowns have a value\r\n !!selectedOptions[selectedOptions.length - 1] \r\n // 2. There is no max items configured or the number of dropdowns has nog reached the maxItems yet\r\n && (!props.maxItems || selectedOptions.length < props.maxItems)\r\n // 3. There are still values not selected in other dropdowns\r\n && selectedOptions.length < options.length\r\n ;\r\n\r\n return (\r\n <>\r\n
\r\n \r\n {selectedOptions.map((selectedOption, dropdownIndex) => {\r\n // First cannot be deleted\r\n const deletable = dropdownIndex !== 0;\r\n\r\n return (\r\n
\r\n item ? item.label : ''}\r\n onChange={selection => selectionChanged(dropdownIndex, selection)}\r\n >\r\n {({\r\n getInputProps,\r\n getItemProps,\r\n getMenuProps,\r\n isOpen,\r\n inputValue,\r\n highlightedIndex,\r\n selectedItem,\r\n getRootProps,\r\n getToggleButtonProps,\r\n }) => (\r\n
\r\n
\r\n
\r\n onInputFocus(dropdownIndex)}\r\n />\r\n
\r\n
\r\n
\r\n
\r\n
\r\n {isOpen && (\r\n
\r\n
    \r\n {filterAndSortOptions(options, selectedItem, inputValue, dropdownIndex).map((item, dropdownItemIndex) => (\r\n
  • \r\n {item.label}\r\n
  • \r\n ))}\r\n
\r\n
\r\n )}\r\n
\r\n )}\r\n \r\n {deletable && (\r\n
\r\n \r\n
\r\n )}\r\n
\r\n );\r\n })}\r\n {showAddMoreButton &&\r\n \r\n }\r\n {dropdownSearchIndexHasFocus != null && isInvalid && (\r\n
\r\n {ReactHtmlParser(props.error)}\r\n
\r\n )}\r\n
\r\n \r\n );\r\n};\r\n","import * as React from 'react';\r\nimport { useEffect, useRef, useState } from 'react';\r\nimport { v4 as uuidv4 } from 'uuid';\r\n\r\nexport interface ISwitchControlProps {\r\n /**\r\n * An optional id for the switch, otherwise generated\r\n */\r\n id?: string;\r\n /**\r\n * The state of the switch\r\n */\r\n checked: boolean;\r\n /**\r\n * Is the switch disabled\r\n */\r\n disabled?: boolean;\r\n /**\r\n * An optional label to display with the switch\r\n */\r\n label?: string;\r\n /**\r\n * The onChange handler\r\n */\r\n onChange?: (newState: boolean) => void;\r\n}\r\n\r\n/**\r\n * Component for displaying a simple switch\r\n * @param {ISwitchControlProps} props\r\n */\r\nexport const SwitchControl = (props: ISwitchControlProps) => {\r\n const [checked, setChecked] = useState(props.checked);\r\n useEffect(() => {\r\n setChecked(props.checked);\r\n }, [props.checked]);\r\n\r\n // Generate an id if not given\r\n const switchId = props.id || uuidv4();\r\n\r\n const handleSwitchChange = (checked: boolean) => {\r\n if (props.disabled) {\r\n return;\r\n }\r\n\r\n setChecked(checked);\r\n \r\n if (props.onChange) {\r\n props.onChange(checked);\r\n }\r\n };\r\n\r\n return (\r\n <>\r\n
\r\n handleSwitchChange(event.target.checked)}\r\n disabled={props.disabled}\r\n />\r\n \r\n
\r\n \r\n );\r\n};\r\n","import * as React from 'react';\r\n \r\nexport const MijnFNVPageContext = React.createContext(\r\n {\r\n routeState : { },\r\n search : \"\",\r\n pathParam : \"\",\r\n pathname : \"\"\r\n }\r\n);","export interface IGridCell {\r\n name : string;\r\n visible : boolean;\r\n cssClasses : string;\r\n title : string;\r\n addValueAsCssClass? : boolean;\r\n\r\n dataType : string;\r\n currencyFormat : string;\r\n decimalSeparator : string;\r\n\r\n isLink? : boolean;\r\n url?: string;\r\n format? : string;\r\n icon? : string;\r\n}\r\n\r\n\r\nexport interface IGridColumnCell {\r\n name : string;\r\n data : any;\r\n visible : boolean;\r\n cssClasses : string;\r\n title : string;\r\n addValueAsCssClass : boolean;\r\n\r\n dataType? : string;\r\n currencyFormat? : string;\r\n decimalSeparator? : string;\r\n\r\n format? : string;\r\n}\r\n\r\nexport interface IGridDetailCell {\r\n name : string;\r\n data : any;\r\n visible : boolean;\r\n title : string;\r\n url : string;\r\n dataType? : string;\r\n currencyFormat? : string;\r\n decimalSeparator? : string;\r\n}\r\n\r\nexport interface IGridDefinition {\r\n groupByColumnName : string;\r\n gridColumns : IGridCell[];\r\n gridDetailsColumns : any[];\r\n fieldContaningDetailsList? : string;\r\n}\r\n\r\nexport class GridHelpers {\r\n static getHeaders(gridDefinition: IGridDefinition) : IGridCell[] {\r\n return gridDefinition.gridColumns.map((gridColumn : IGridCell) => {\r\n return {\r\n name: gridColumn.name,\r\n visible: gridColumn.visible,\r\n cssClasses: gridColumn.cssClasses,\r\n title: gridColumn.title,\r\n dataType: gridColumn.dataType || \"\",\r\n currencyFormat: gridColumn.currencyFormat || \"\",\r\n decimalSeparator: gridColumn.decimalSeparator || \"\"\r\n };\r\n });\r\n }\r\n\r\n static getColumns(gridData : any[], gridDefinition: IGridDefinition) : IGridColumnCell[] {\r\n return gridDefinition.gridColumns\r\n .map((gridColumn : IGridCell) => {\r\n return {\r\n data: gridData[gridColumn.name],\r\n name: gridColumn.name,\r\n visible: gridColumn.visible,\r\n cssClasses: gridColumn.cssClasses,\r\n title: gridColumn.title,\r\n addValueAsCssClass: gridColumn.addValueAsCssClass || false,\r\n dataType: gridColumn.dataType || \"\",\r\n currencyFormat: gridColumn.currencyFormat || \"\",\r\n decimalSeparator: gridColumn.decimalSeparator || \"\",\r\n isLink: gridColumn.isLink || false,\r\n url: gridColumn.url || \"\",\r\n format: gridColumn.format || \"\",\r\n icon: gridColumn.icon || \"\"\r\n };\r\n });\r\n }\r\n\r\n static getDetailsForRow(gridData : any[], gridDefinition: IGridDefinition) : IGridDetailCell[] {\r\n return gridDefinition.gridDetailsColumns\r\n .filter((gridColumn: IGridCell) => gridData[gridColumn.name] !== undefined)\r\n .map((gridColumn : IGridCell) => {\r\n return {\r\n data: gridData[gridColumn.name],\r\n name: gridColumn.name,\r\n visible: gridColumn.visible,\r\n title: gridColumn.title,\r\n url: gridColumn.url,\r\n dataType: gridColumn.dataType || \"\",\r\n currencyFormat: gridColumn.currencyFormat || \"\",\r\n decimalSeparator: gridColumn.decimalSeparator || \"\"\r\n };\r\n });\r\n }\r\n\r\n static isRowPartOfGroup(gridData: any[], groupByColumnName: string, groupByColumnValue) : boolean {\r\n return (groupByColumnName === \"\") || \r\n (gridData[groupByColumnName] === groupByColumnValue);\r\n }\r\n\r\n static getGroupsFromRows(dataRows: any[], groupByColumnName: string) : string[] {\r\n let groupHelper : string[] = [];\r\n dataRows.map((item) => {\r\n if (groupHelper.indexOf(item[groupByColumnName]) < 0) {\r\n groupHelper.push(item[groupByColumnName]);\r\n return true;\r\n } \r\n return false; \r\n });\r\n return groupHelper; \r\n }\r\n}","import * as React from 'react';\r\nimport Accordion from \"react-bootstrap/Accordion\";\r\nimport Button from \"react-bootstrap/Button\";\r\nimport Card from \"react-bootstrap/Card\";\r\n\r\nexport interface IGridDetailCardProps {\r\n rowIndex : string;\r\n activeRow : string;\r\n detailsLabel : string;\r\n onCloseAllDetailCards : () => any;\r\n}\r\n\r\nexport const GridDetailCard = (props: IGridDetailCardProps) => {\r\n return \r\n \r\n {\r\n if (props.activeRow == props.rowIndex) {\r\n props.onCloseAllDetailCards();\r\n }\r\n }}\r\n className={\"mijn-fnv-grid__btn-link \" + (props.activeRow == props.rowIndex ? \"mijn-fnv-grid__btn-link--active\" : \"\")} \r\n >\r\n {props.detailsLabel}\r\n \r\n \r\n \r\n ;\r\n};","import * as React from 'react';\r\nimport { Link } from \"react-router-dom\";\r\nimport ReactHtmlParser from 'react-html-parser';\r\nimport { Slug } from '@fnv-core/utils';\r\nimport { FormControlHelpers } from '../../formcontrols/helpers/FormControlHelpers';\r\nimport { StringHelpers } from '../../helpers/StringHelpers';\r\n\r\nexport interface IGridColumnProps {\r\n visible : boolean;\r\n data : any;\r\n cssClasses : string;\r\n addValueAsCssClass : boolean;\r\n dataType : string;\r\n currencyFormat : string;\r\n decimalSeparator : string;\r\n isLink: string;\r\n url: string;\r\n valuesObject? : any;\r\n format: string;\r\n icon: string;\r\n}\r\n\r\nexport const GridColumn = (props : IGridColumnProps) => {\r\n let data = props.data;\r\n let url = props.url;\r\n \r\n if (props.valuesObject) {\r\n if (props.format) {\r\n data = StringHelpers.replacePropertiesInUrl(props.format, props.valuesObject, true);\r\n }\r\n if (props.isLink) {\r\n url = StringHelpers.replacePropertiesInUrl(url, props.valuesObject, true);\r\n }\r\n }\r\n if (props.dataType !== undefined && props.dataType !== \"\") {\r\n data = FormControlHelpers.convertValueToType(data, {\r\n dataType: props.dataType,\r\n decimalSeparator: props.decimalSeparator,\r\n currencyFormat: props.currencyFormat\r\n });\r\n }\r\n const orgData = data;\r\n data = ReactHtmlParser(data ? data : \"-\");\r\n\r\n return
{props.icon !== \"\" && !props.isLink ? : \"\"}{!!props.isLink ? \r\n {props.icon !== \"\" ? : \"\"}{data} : {data}}\r\n
; \r\n};","import * as React from 'react';\r\n\r\nexport interface IGridHeaderColumnProps {\r\n title : string;\r\n cssClasses : string;\r\n visible : boolean;\r\n}\r\n\r\nexport const GridHeaderColumn = (props : IGridHeaderColumnProps) => {\r\n return
\r\n \r\n {props.title}\r\n \r\n
;\r\n};","import * as React from 'react';\r\nimport { FormControlHelpers } from '../../formcontrols/helpers/FormControlHelpers';\r\nimport ReactHtmlParser from 'react-html-parser';\r\nimport { StringHelpers } from '../../helpers/StringHelpers';\r\n\r\nexport interface IGridColumnDetailsProps {\r\n data: any;\r\n title: string;\r\n dataType: string;\r\n currencyFormat: string;\r\n decimalSeparator: string;\r\n url: string;\r\n}\r\n\r\nexport const GridColumnDetails = (props: IGridColumnDetailsProps) => {\r\n let data = props.data;\r\n\r\n if (props.dataType !== undefined && props.dataType !== \"\") {\r\n\r\n if (props.url) {\r\n data = StringHelpers.replacePropertiesInUrl(props.url, props, true);\r\n } else {\r\n data = FormControlHelpers.convertValueToType(data, {\r\n dataType: props.dataType,\r\n decimalSeparator: props.decimalSeparator,\r\n currencyFormat: props.currencyFormat\r\n });\r\n }\r\n }\r\n\r\n data = ReactHtmlParser(data ? FormControlHelpers.replaceTaggedEmailAddressesWithoutTags(data) : \"-\");\r\n\r\n return \r\n {props.title}\r\n {data}\r\n ;\r\n};","import * as React from 'react';\r\nimport { useState } from 'react';\r\nimport Accordion from \"react-bootstrap/Accordion\";\r\nimport Card from \"react-bootstrap/Card\";\r\nimport { GridHelpers, IGridDefinition, IGridCell, IGridColumnCell, IGridDetailCell } from \"../helpers/GridHelpers\";\r\nimport { GridDetailCard } from \"./GridDetailCard\";\r\nimport { GridColumn } from \"./GridColumn\";\r\nimport { GridHeaderColumn } from \"./GridHeaderColumn\";\r\nimport { GridColumnDetails } from \"./GridColumnDetails\";\r\n\r\nexport interface IGridGroupProps {\r\n formFieldDefinition: any;\r\n data: any[];\r\n groupByColumnName: string;\r\n groupByColumnValue: string; \r\n}\r\n\r\nexport const GridGroup = (props: IGridGroupProps) => {\r\n\r\n const [activeRow, setActiveRow] = useState(\"\");\r\n\r\n var shouldRenderHeaders: boolean = true;\r\n const onCloseAllDetailCards = () => {\r\n setActiveRow(\"\");\r\n };\r\n\r\n return (\r\n
\r\n {props.data !== undefined ? (\r\n \r\n {\r\n setActiveRow(data);\r\n }\r\n }>\r\n {props.data.map((item, index) => {\r\n let rowIndex = index.toString();\r\n\r\n let rows: any = [];\r\n if (shouldRenderHeaders) {\r\n shouldRenderHeaders = false;\r\n rows.push(
\r\n {\r\n GridHelpers.getHeaders( props.formFieldDefinition as IGridDefinition).map((cell : IGridCell , index) => {\r\n return ;\r\n })\r\n }\r\n
);\r\n }\r\n\r\n if (GridHelpers.isRowPartOfGroup(item, props.groupByColumnName, props.groupByColumnValue)) {\r\n \r\n let contentRow: any = GridHelpers.getColumns(item, props.formFieldDefinition as IGridDefinition).map((cell : IGridColumnCell , index) => {\r\n return ;\r\n });\r\n rows.push(\r\n
\r\n {contentRow}\r\n {\r\n ((props.formFieldDefinition as IGridDefinition).fieldContaningDetailsList === undefined ||\r\n (props.formFieldDefinition as IGridDefinition).fieldContaningDetailsList === \"\") &&\r\n (props.formFieldDefinition as IGridDefinition).gridDetailsColumns.length > 0 ?\r\n <>\r\n \r\n\r\n \r\n \r\n {\r\n GridHelpers.getDetailsForRow(item, props.formFieldDefinition as IGridDefinition).map((cell : IGridDetailCell , index) => {\r\n return ;\r\n })\r\n }\r\n \r\n \r\n : (((props.formFieldDefinition as IGridDefinition).fieldContaningDetailsList !== undefined ||\r\n (props.formFieldDefinition as IGridDefinition).fieldContaningDetailsList !== \"\") &&\r\n (props.formFieldDefinition as IGridDefinition).gridDetailsColumns.length > 0 ? \r\n \r\n <>\r\n \r\n\r\n \r\n \r\n {\r\n item[(props.formFieldDefinition as IGridDefinition).fieldContaningDetailsList].map((detailItem, index) => {\r\n\r\n return
\r\n {GridHelpers.getDetailsForRow(detailItem, props.formFieldDefinition as IGridDefinition).map((cell : IGridDetailCell, index) => {\r\n \r\n return ;\r\n \r\n })}\r\n
;\r\n\r\n }\r\n )\r\n }\r\n
\r\n
\r\n \r\n : null )\r\n }\r\n
\r\n );\r\n }\r\n\r\n return {rows};\r\n })}\r\n
\r\n
\r\n ) : null}\r\n
\r\n );\r\n};\r\n","import * as React from 'react';\r\nimport { GridGroup } from \"./grid/GridGroup\";\r\nimport { GridHelpers } from \"./helpers/GridHelpers\";\r\n\r\nexport interface GridProps {\r\n formFieldDefinition: any;\r\n form: any;\r\n}\r\n\r\nexport const Grid = (props: GridProps) => {\r\n\r\n if (props.form === undefined || \r\n props.form[props.formFieldDefinition.name] === undefined) {\r\n return <>;\r\n }\r\n\r\n let gridData: any[] = props.form[props.formFieldDefinition.name];\r\n\r\n if (props.formFieldDefinition.groupByColumnName === \"\") {\r\n\r\n if (gridData.length === 0) {\r\n if (props.formFieldDefinition.noResults !== undefined && props.formFieldDefinition.noResults !== \"\") {\r\n return

{props.formFieldDefinition.noResults}

;\r\n }\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n ); \r\n }\r\n\r\n let groupValues : string[] = GridHelpers.getGroupsFromRows(gridData, props.formFieldDefinition.groupByColumnName);\r\n if (groupValues.length === 0) {\r\n if (props.formFieldDefinition.noResults !== undefined && props.formFieldDefinition.noResults !== \"\") {\r\n return

{props.formFieldDefinition.noResults}

;\r\n }\r\n return null;\r\n }\r\n\r\n return <>{groupValues.map((value, index) => \r\n

{value}

\r\n \r\n
\r\n )\r\n };\r\n \r\n};\r\n"],"names":["map","webpackAsyncContext","req","__webpack_require__","o","Promise","resolve","then","e","Error","code","ids","id","keys","Object","module","exports","defaultOptions","currency","decimalSeparator","stripDecimals","format","input","options","opts","formatted","possibleInputFormats","name","validDate","some","checkDate","isValid","asNumber","parseFloat","isNaN","isFinite","toString","decimals","result","toFixed","replace","replaceTokens","template","tokens","replaceEmptyValues","length","tokenizedValue","forEach","t","index","token","tokenValue","value","convertIndexToToken","RegExp","safeValue","match","SESSIONSTORE_QUERYSTRING","retrieveSavedQuerystring","storage","window","sessionStorage","JSON","parse","getItem","createUpdateSavedQuerystringParameters","url","newParams","currentParams","assign","setItem","stringify","getFormValuesToStore","component","values","formDefinition","props","formDefinitions","state","currentForm","valuesToStore","formFieldDefinition","allowPrefixSpacesInInputOnly","gotoFormStepNyName","formName","stepIndex","formConfig","formSteps","indexOf","setActiveStepForm","setState","scrollToForm","continuewithGotoNextStep","nextStep","onlySaveForm","isSubmitting","gotoNextFormStep","includeCurrentValues","ReactFormHelpers","postToBackendPopup","catch","postOnNextAndPreviousStep","undefined","postUrlForFirstStep","$","off","actionUrl","queryParameters","key","push","urlParams","location","href","join","popupConfirm","showPopupConfirm","onPostToBackend","isReadOnly","editMode","readOnly","getPageSettings","pageSettings","activateFormController","clearFormErrorMessage","pathParam","context","search","fillViaApi","fillFormViaApi","userId","initialData","setFormValues","clearStep","clearExtraStep","extraDummySteps","step","storeExtraStep","storeStep","title","startForm","clearErrorOnApiError","finishGotoPreviousStep","gotoPreviousStep","onStoreValues","getBaseFormProperties","additionalCssClass","withLinkToFormPage","pageType","collectDataFromForms","reactForms","forms","reduce","postData","formStep","data","getFormValues","getDefaultFormValues","defaultFormValues","field","defaultValue","StringHelpers","replacePropertiesInString","CurrentRoleEnvironment","getCurrentRole","setInitialFormValues","initialFormValues","getInitialFormValues","addToUrl","addToUrls","postDataToBackend","thanksPageUrlFields","fieldItem","isReturnedBasedOnPostResult","urlField","form","filter","addQueryParamsBasedOnPostResult","activateForm","handleProces","ProcesHandlerHelpers","handlers","Init_done","createFormData","formData","FormData","property","hasOwnProperty","append","getValueForFormDefinition","formDef","dataType","date","type","isNumeric","allowDecimals","Array","isArray","valueField","val","separator","rewriteValueObjectsInPostData","every","formStepName","find","hasFileUploadField","clearFormIfAllowed","clearFormAfterPost","clearFormValues","steps","err","console","log","isPostDataToBig","bytes","sizeOf","obj","size","objClass","prototype","call","slice","isOnlySaveForm","reject","disableAnimationsForForm","getProcessesForHander","procesHandlers","p_preProcess","Put_preprocess","Put_postprocess_Success","Put_postprocess_Fail","doFormMultipartPost","postPutMethod","includePayloadInPost","getPayload","bronCode","WordLidBroncode","handleActionUrl","postUrl","doFormMultipartPostForFirstStep","idForUrl","toLowerCase","params","hasParams","urlParam","addQueryParameterSeparator","replaceUrlVariablesWithFormData","replacePropertiesInUrl","useModuleForFormPost","Module","post","thanksPageUrl","storeFormErrorMessage","skipPost","onPopupOKSubmit","reactRouteOnSuccess","isShowTooBigDataError","_postData","ajaxOptions","contentType","enctype","processData","headers","pathname","ajax","done","receivedData","isPreventDefault","isShowPostDataError","RedirectUrl","Target","open","target","reload","HasError","ErrorText","popupMessageOnFailure","showPollResultsAfterFormSubmit","onShowPollResults","reactRouteOnFailure","queryParams","json","popupOK","VerwerkingsCode","isShowPostOk","isShowPostOKWithVisualCheck","showThanksMessageAsInPageContent","thankYouMessageRef","current","scrollIntoView","reason","errorPageUrl","fail","error","isError","handleUserError","dataError","formContainer","ControlName","setFieldError","isUserError","IsUserError","hasLidConsentForSpecificFormsOrIgnoreIfIsCurrentUser","ignorePaths","i","entry","split","setIsInLidZoekenSubFunctions","getUserId","lidZoeken","results","lidGevonden","lid","PersoonsId","LidgaatAkkoord","isLidGevonden","setLidZoekenSubFunctionsForMember","memberName","Naam","isMember","IsLid","reactRootElement","document","getElementsByClassName","hasAttribute","getAttribute","queryParamsSeparator","getProcesses","procesName","ProcesName","execute","onSuccess","onError","IntakeService","setAnswer","setQuestion","PopupOnOk","onPopupOkClick","Get_preprocess","Get_postprocess_Success","Get_postprocess_Fail","CancelForm","procesList","proces","responseText","status","processes","handler","GespreksRegistratieProcessHandlerHelpers","IntakeProcessHandlerHelpers","PopupProcessHandlerHelpers","componentDidUpdate","prevProps","this","behavior","block","render","DisplayFormikState","style","margin","background","padding","fontSize","touched","errors","convertUnicode","restDataMapper","option","optionLabel","resultMode","propertyNameInArrayMode","label","text","parent","optionField","formController","formikBag","Link","kenticoOptionsMapper","valueoptions","icon","iconoptions","hasDatasource","ComponentStoreHelpers","hasFieldDatasource","datasource","getValueData","item","itemValue","checkContainsValue","getValueDataForPayload","getListData","dataset","setFormFieldData","getFormFieldData","addMontsToDate","addMonths","newDate","Date","setMonth","getMonth","month","day","getDate","year","getFullYear","getCurrentDate","getDataUrl","parameters","urlMappings","getAsyncData","inputValue","isLoading","getData","FormFieldStateHelpers","clearMarkedFields","isDependentField","clearFormStateForFieldsPrefetch","clearFields","clearPayloadForFieldsPrefetch","setPayload","DatasourceOptionsService","setOptionsForForm","returnData","substring","unmounted","getUserRoles","regularExpressionForMatchingCurlyBrackets","matches","inputvalue","matchValue","getBondsId","optionyes","fieldName","convertNLDateToIso","DatasourceLoaderStateService","increaseLoadingCounter","counter","FormControlHelpers","getCounter","triggerDatasourceRequest","get","cache","resetLoadingCounter","decreaseLoadingCounter","dataSourceCounter","useAutoDelayWhenTriggeringDatasource","timeDelay","timer","getTimeDelay","setTimeout","getFormGroupStyle","cssClass","fieldCssClass","visibilityClass","getInputStyle","isTouchedOnlyWhenRequired","getFieldState","hasErrors","isTouchedHasErrors","getDropdownStyle","getCheckboxStyle","getRadioStyle","BedrijvenZoekerOption","className","onClick","onNewClick","Bedrijfsnaam","CaoNaam","Straat","AddressLine1","PostalCode","Plaats","DefaultZoekerOption","getOptionTemplate","PicklistTemplate","styles","clearIndicator","container","control","dropdownIndicator","groupHeading","indicatorsContainer","indicatorSeparator","loadingIndicator","loadingMessage","menu","menuList","multiValue","multiValueLabel","multiValueRemove","noOptionsMessage","placeholder","singleValue","valueContainer","selectRef","updateFieldValue","dropdownProperties","inputProperties","selectedOption","valueToCompare","autoSetUsingDatasource","resetSelectedValueAfterInit","optionKey","fieldToUseForPreSelect","setFieldValue","initDropdown","onInputFocus","event","hasFocus","onInputBlur","persist","onBlur","hasAsyncData","PicklistMode","onChange","newValue","isFiltering","setFieldTouched","res","handleTriggerFieldDependingOnCondition","mapPayloadFieldsOnChange","FormikHelpers","mapValuesToFields","triggerDatasource","AjaxCallHelpers","getRelatedData","validateForm","hasInputValueChanged","additionalDropDownCssClass","renderSelectItem","getItemProps","highlightedIndex","selectedItem","Option","backgroundColor","fontWeight","componentDidMount","componentWillUnmount","selectedValues","foundOptions","opt","triggerGetDatasource","dependentOnField","dependentField","dependentValue","prevDependentValue","shouldComponentUpdate","nextProps","nextState","datasourceDiffers","currentError","nextError","asyncSelectOptions","onClickWrapperDiv","onClickFocusHack","select","inputRef","opacity","focus","optionsCount","includeDefaultEmptyOption","defaultEmptyOption","onChangeSetValue","noSelectionLabel","hideWhenNoOptions","bind","fromString","fieldId","PropertyHelpers","getFieldID","FormLabelHelpers","getFieldLabel","explanation","hasPopover","getUseAccessibleDropdown","dropdownOptions","dropdownOption","disabled","onInputValueChange","stateAndHelpers","closeMenu","onSelect","itemToString","getInputProps","getMenuProps","isOpen","getRootProps","getToggleButtonProps","selectItem","FormStylingHelpers","suppressRefError","onFocus","allowCreateNewOption","__isNew__","invalidFeedbackComponent","Dropdown","ContainedDropdown","initDropdowns","properties","onSelectionsChange","selections","isInvalid","addMoreLabel","selectedOptions","av","chooseOptionLabel","v","maxItems","sortItems","clickButton","preventDefault","buttonMode","submitToContainer","isButtonClicked","isErrorLoading","inputDecorators","inputcontrolstyle","hasEuro","hasPercentage","hasAppendedIcon","textAppended","textAppendedClass","imageGroupClass","hasImage","inputMode","hasNumericKeyboard","autoComplete","disableAutoComplete","autoCompleteToken","maxLength","getMaxLength","hasButton","isInValid","buttonLabel","src","imageUrl","alt","ref","checked","validateField","tabIndex","htmlFor","PollResult","useState","pollScore","setPollScore","pollScoreBackgroundElement","useRef","useEffect","pollResults","Results","TotalCount","resultForOption","trim","totalCount","percentage","Math","round","width","PollResultsTotal","getCheckedState","radioAsImageValue","clickOuterRadioDiv","radioButtonId","radioButtonElement","getElementById","click","showPollResults","isShowPollResults","getId","formCMSName","fieldProperties","baseProperties","onChangeSetValueViaEvent","isBlockMode","showAsDisabled","subtype","splittedKeys","imageValue","isIcon","correctAnswerClass","correctAnswer","onRadioButtonChangeSetValueViaEvent","changeValidationError","validation","required","algemenevoorwaardenLinkTekst","errorLabel","ShortText","linkAlgemeneVoorwaarden","dontRenderLabelAboveInput","isRequired","algemenevoorwaarden","valueyes","mask","enableMaskConditions","kenticoMacroFunction","fieldMapper","maskChar","formatChars","a","triggerDatasourceOnShow","visible","concatFields","concatLabel","replaceBracketFieldsWithValues","concatFieldShowLabel","fieldDefinition","doShowCharacterWhenEmpty","showCharacterWhenEmpty","ReadOnly","onlyRenderValue","characterWhenEmpty","concatFieldClassess","postfix","concatFieldsSeparator","fieldValue","orgFieldValue","isCalculatedField","expression","services","Moment","optionIndex","convertValueToType","replaceTaggedEmailAddressesWithoutTags","isParsedHtmlFieldValue","containsHtmlTags","content","prefix","noTitleHintOnLabelTag","getLinkElements","formatParts","link","linkText","rows","minRows","maxRows","calculateTextareaHeight","textarea","previousRows","currentRows","floor","scrollHeight","scrollTop","handleChange","getTextAreaValueAndNewLines","textAreaValue","newLines","addition","count","maxchars","textAreaMaxLength","textAreaHint","getUrlWithId","to","StyledLinkBlocks","contextType","MijnFNVPageContext","handleEditorChange","editor","labelProps","onEditorChange","init","plugins","autoresize_bottom_margin","menubar","toolbar","content_style","paste_word_valid_elements","paste_webkit_styles","theme","mobile","fileUploadInputRef","showPopoverText","removeFile","removeFocusEventHandler","fileName","resetFocus","onInputClick","resetFocusWasRequestedFromBodyFocus","body","addEventListener","onBodyFocus","timeoutOnBodyFocus","removeEventListener","checkNeedsFocusReset","clearTimeout","onInputChange","files","currentTarget","resetFocusHelper","fileNameExtensionImage","FileNameHelpers","getFileAttachmentImage","fileNameExtension","getFileNameExtensionUppercase","containerClassName","registerLocale","nl","culture","currentCultureCode","importCulture","substr","closedDatePickerWhenOnIos","handleKeyDown","proxyEvent","changeHandlerMode","datetimepicker","setOpen","blur","inline","iOS","onKeyDown","initDatepicker","dateItem","showMessageIfNoOptions","includeDates","getDateAsNlDate","updateFormikField","getDateAsJSDate","getDateAsIsoDate","convertDateToNL","dateToUse","isString","isDate","eventToUse","nlDate","newEvent","nextFieldName","currentTouched","nextTouched","DateTimePickerInput","locale","dateFormat","dateFormatCalendar","isBirthDate","hasYearMonthControls","selected","showMonthDropdown","showYearDropdown","yearDropdownItemNumber","minDate","fromToday","toDate","maxDate","maxMonth","scrollableYearDropdown","dropdownMode","customInput","isClearable","adjustDateOnChange","onClickOutside","getLocations","locationFilter","baseApiUrl","address","latitide","longitude","appointmentTypeId","defaultApiOptions","getAppointmentTypes","getAllAppointmentTypes","getAppointmentTypeById","typeId","at","appointmentId","InfoWindow","show","regionalOfficeId","regionalOfficeName","street","zipcode","MarkerComponent","onMarkerClick","childProps","showInfowindow","center","lat","lng","onSelectLocation","filterRegionalOffices","regionalOffices","regionalOffice","documentGuid","onSelectLocationViaInfoWindow","googleMapsLoaded","step1Submitted","onGoogleMapsLoaded","getLocation","locationMethod","renderLocations","zoom","hideGoogleMaps","p","latitude","google","maps","LatLngBounds","extend","LatLng","ne","getNorthEast","sw","getSouthWest","nw","se","googleMap","clientWidth","calcBounds","fitBounds","height","autoSelect","hideUI","fetchLatLongByZipcode","zipcodeField","AppointmentPlannerService","appointmentType","locations","payload","forceGetAllLocations","navigator","geolocation","getCurrentPosition","position","coords","latitudeMapCenter","longitudeMapCenter","LocationMethodField","afspraaktype","x","el","innerHTML","description","hasRegionalOfficeLocation","visibility","officeName","streetNumber","streetSuffix","onGoogleApiLoaded","bootstrapURLKeys","googleMapsKey","language","region","defaultCenter","defaultZoom","onChildClick","uuidV4","uuid","v4","triggerSubmit","triggerFormChange","hasIcon","btnClassName","left","max","showMinValue","min","showMaxValue","self","addEmail","emailValue","list","email","validatorPromises","schemaValidator","_emailAddressListFieldDefinition","emailError","all","hasError","validatorResult","emailAdresses","emailSeparator","copyAndPastedEmail","deleteEmailFromList","emailToDelete","filterEmail","showAllOtherExistingEmailAddresses","showAllExistingEmailAddresses","getExistingEmailAddressesList","fieldForExistingEmailAddresses","isSummary","existingEmailAddressesLabel","showAllOtherEmailAddresses","showAllEmailAddresses","getEmailList","emailCount","handleQRCodeScan","lastScannedCode","_qrCodeScannerFieldDefinition","isUsedToScanJson","onFieldChange","inputAsJsonObject","TryJsonParse","submitForm","handleQRCodeScanError","qrCodeComponent","QRCode","default","QRComponent","onScan","delay","facingMode","instance","reCaptchaRef","executeAsync","sitekey","siteKey","badge","CheckboxControl","checkboxId","onCheckboxChanged","_checkboxFieldDefinition","onSelectAllChanged","optionValues","ov","getSelectedItems","allOptions","currentSelected","currentIndex","splice","selectedItems","selectAllChecked","sortBy","displaySelectAll","selectAll","selectAllText","selection","animatedComponents","components","isSearchable","isMulti","isOptionDisabled","closeMenuOnSelect","classNamePrefix","getFormControlComponent","typeName","datepicker","dropdown","dropdownmultiple","radio","checkbox","checkboxMultiple","maskedtext","hidden","password","styledlinkblocks","richtexteditor","fileupload","chooseLocation","button","range","emailaddresslist","switch","qrcodescanner","reCaptchaV2Invisible","dropdownMultiselect","isFormDefinedInConditionButNotEXistsInFormValues","condition","formValues","isFormDefinedInConditionButFieldDoesntExistInForm","isArrayConditionAndFieldValueDoesntExist","isFieldValueNotEqualToConditionValue","isFieldValueEmptyAndNotEmptyCondition","isFieldObjectValueNotEqualToConditionValue","isFormUndefinedOrCurrentFieldValueUndefinedOrEmpty","isArrayCondition","isCurrentFieldValueNotInArrayCondition","isCurrentFieldObjectValueNotEqualToConditionValue","isCurrentFieldValueOfTypeStringWithSubstringCondition","isCurrentFieldValueNotEqualToConditionValue","isNotEQConditionalConditionAndValuesAreEqual","subValue","isEQConditionAndValuesAreNotEqual","checkKenticoVisibilityRule","fieldsMapper","kenticoVisibilityFunction","addKenticoValidator","validationSchemaShape","fieldDefinitions","rules","rule","test","defineProperty","Value","validationFunction","addLidNrValidator","typeError","transform","originalvalue","left2Numbers","valueString","loop","hasOnlyNumbers","addNumberValidator","schema","numberSchema","_","includes","minmaxerror","addMaxAgeCheckValidator","maxage","age","diff","minage","createError","path","message","parseInt","minyear","minageerror","formFieldRequiredFieldErrorMessage","getLabelWithoutAsterisk","addDateValidator","isType","addIbanValidator","addZipcodeValidator","addCheckboxValidator","addFileUploadValidator","maxUploadSizeKBError","maxUploadSizeKB","fileFormatsError","formFieldUnsupportedFormatFieldErrorMessage","fileNameToSplit","fileExtension","fileFormats","addMaxSizeValidator","maxSize","maxSizeError","showOrHideBlockOnSummarySteps","pageWithOnly1Step","isSummaryStep","addClass","removeClass","renderSummaryIntro","summaryIntro","summaryIntroElement","node","attribs","children","nodeChild","childrenIndex","showOrHideBackLink","isVisible","getFieldsMapper","formFieldDefinitions","_formikBag","valueObject","allowedTags","allowedAttributes","sanitize","html","__html","SanitizeHTML","dangerouslySetInnerHTML","isSetEditFieldsToReadonly","collapsableState","_promptLeaveMessage","revalidateForm","touchedFields","acc","setTouched","validateValueSet","saveForm","submit","fieldType","ignoreVisibilityConditionDuringSubmit","visibilityCondition","isFieldVisible","addFormControlsToSummary","controlName","onSubmit","hasFormBlockIntelligence","noFormBlockIntelligence","clickAlternateSubmitButton","shouldExtraButtonFollowLink","onSubmitSuccessButtonLink","onSubmitSuccessButton1Link","onSubmitSuccessButton2Link","redirectToUrl","renderOptionalExtraButton","disableSubmitButtonOnValidationError","onSubmitSuccessButtonLinkText","onSubmitSuccessButton1LinkText","onSubmitSuccessButton2LinkText","isSubmitStep","summarySendButtonCondition","submitLabel","cssClasses","onSubmitSuccessButtonLinkCssClass","onSubmitSuccessButton1LinkCssClass","onSubmitSuccessButton2LinkCssClass","onPrintClick","print","checkSubmitButtonCondition","isPrintView","orgReactRouteOnSuccess","buttonLabelIf","buttonLabelIfClass","value1","buttonLabelElseIf","buttonLabelElseIfClass","buttonLabelElse","buttonLabelElseClass","getNextPageLink","additionialInfo","additionalId","backTitleForCurrentPageBackLink","gobackUrl","includeCurrentPageAsBackAndSubmitUrl","hash","urlQueryParameter","cancelButtonClick","onCancelForm","renderSubmitButton","submitCssClass","hideSubmitButtons","saveFormButton","showSaveFormButton","showSaveFormButtonTitle","btnFormSubmitClassName","overrideBtnFormSubmitClassName","formButtonsWithExtraButtonBelowIt","printButton","showPrintButton","hasFormEditableControls","hasFormOnlyNonRequiredControls","disabledButtonCheck","dirty","wasOnSummaryStep","visitedSteps","noDisabledButtonCheckForDirtyState","hideButtonIfNoEditableControls","showRecaptchaText","submitButtonIsDisabledIfFormIsNotDirty","isFormDirty","renderRecaptchaText","backButtonInFirstStep","showCancelButton","cancelButtonTitle","enableButtonOnValidationErrors","noDirtyCheck","linkFormPage","hasLinkToFormPage","hasFormEditableControlsThatWereSetToDisabled","explicitNextButton","onFormBackgroundClick","PopoverService","closeAllPopovers","getCurrentStepCaption","stepCaption","checkShowPrompt","onToggleGroupCollapsable","collapsableGroupTitle","initialCollapsableState","newCollapsableState","createBackToStepLink","section","backToFormStepElement","renderFormElement","customType","hideEditLink","onSummaryBackToStepClick","getFieldKey","fieldKey","getAdditionalClassForCustomField","tipLayout","validationRules","PrintViewService","setPrintView","FormService","setFormConfig","callFormRelatedDataCallback","isRealReadOnlyField","enabledCondition","isFieldEnabled","initialValues","storeFormWhenStepBack","leavePageProtection","confirm","leavePageProtectionMessage","onGotoPreviousStep","FieldVisibilityHelpers","subStringValue","start","end","createValidationShape","extraValidationRules","kind","ValidationHelpers","doZipcodeValidation","validationRuleKey","getOptionsForForm","requiredWhenOptions","shape","validateSync","ex","renderDebugInformation","isEnabled","setIsSummaryView","FormControllerHelper","disableOnValidationError","sections","sectionCssClassNames","sectionCssClass","additionalFormCssClass","additionalCSSClass","formGroupCount","summaryValueBelowFields","requiredFieldTip","enableReinitialize","validateOnChange","validateOnBlur","placeFirstTitlePanelInSectionOutside","formErrorWasRendered","formTitleIndex","referrer","action","method","formMethod","when","sectionBreakClass","formGroupCssClass","collapsableGroup","collapsableTitle","fieldIndex","groupCssClass","collapsable","isAdresBlokField","CollapsableElement","hasElements","formElements","PlaceInFormArea","renderCustomField","labelText","hasValue","placeOutsideClass","renderFormError","hasSubtitle","subtitle","hasEmptyLabel","formPanelClass","formTitleClass","showStepAsTitle","addStepAsTitle","validate","showCheckboxAsTextWhenDisabled","showRadioButtonInDisabledState","showSwitchInDisabledState","showTextAreaInDisabledState","disableWhenFieldHasUrlParam","enabledOnError","formControlComponentName","FormControlsHelper","LabelAndPopover","setShowPopoverText","closePopoverCallback","useCallback","popoverFieldId","registerPopover","unRegisterPopover","titleHintText","hasExplanationText","labelClassName","stopPropagation","hasParameterMappings","parameterMappings","doPerItem","parameterMappingsViaDatasource","hasRelatedDataUrl","requiredParameters","ParameterMappingsHelper","fieldMapping","getValue","datasourceConditions","mapsTo","checkValid","datasoureRequiresAllFieldsFilled","mapEmptyToFields","_parameters","isActionUrl","actions","urlMappingsRelatedData","getRelatedDataUrl","setDatasource","FormConfigHelpers","outputMappings","getDefaultFormConfig","formTitle","OnSubmitSuccessLinkIncludeUrlGuid","hasOutputMappings","hasFormSteps","formStepsForEach","doPerStep","getMergedFormConfig","globalFormConfig","getFormConfig","formOverride","formOverrides","autoInsertFormFieldGroup","urlMapping","urlMappingRelatedData","parameterMapping","outputMapping","datasourceCondition","currentFormControlComponent","initials","noInitials","isNullOrEmpty","voornaam","toUpperCase","isEmpty","displayValue","currencyFormatted","currencyFormat","hasDecimals","arrayValue","joiner","displayMode","payloadFieldValue","usePayloadAsDefaultForInput","triggerFieldWithCondition","onChangeSetValueDoAction","handleDatasource","onInputFocusChangeBlur","canUpdateField","FormControlSpecifics","timerComponent","datasourceTimer","targetString","curMatch","rxp","exec","testMaskedValue","regularExpression","getMaskCharsExpression","passTest","visibleOnError","fieldForErrorCheck","hasErrorsByFieldName","maskCharsExpression","FieldMaskHelpers","alwaysUppercase","checkBoxLabel","dateFormatSpecs","getValid","fieldError","setInitialValues","defaultValueByCondition","_ageCheck","checkForm","check","checkValue","elseValue","getFileNameToSplit","pop","getFileNameWithoutPath","getFieldReference","defaultLength","maxlength","getName","IsEmail","isReadOnlyView","getPageType","UserIsKaderlid","IsSummaryView","getIsSummaryView","IsAuthenticated","isAuthenticated","IsPrintView","getPrintView","IsESBOnline","getESBIsOnline","IsAgeYoungerThen16","birthDate","GetBooleanPropertyFromPayload","ContainsValue","items","Contributie","setLabel","setTitle","richTextHtml","setRichTextHtml","hasRichText","setHasRichText","lidVoordelenRichtText","titleHelper","labelHelper","includePayload","toonLidVoordelen","beforeText","periodText","afterText","additionalText","toonLidWordenButton","lidWordenButtonTitle","hintContributieTarief","lidVoordelenBeforeText","lidVoordelenTitle","lidVoordelen","lidVoordeel","Tip","tipIcon","layout","tip","labelHtml","Alert","alertclass","alertClass","alert","Summary","indexFieldDef","lastFieldEmpty","labelPrinted","fields","indexItem","formFields","fieldValueHasLabel","viaOption","rawValueFromForm","orgField","locationNameField","locationNameInPayloadField","alwaysShowSummaryField","getFileComponent","InternalLink","isDataField","SimpleText","PopupConfirm","Modal","centered","onHide","Header","Title","Body","Footer","onCancel","onOK","PopupOK","currentFormData","fieldDef","Accept","response","blob","showPDF","onCollapse","collapseId","collapseUpdate","transformNode","usePersistedQueryString","isLoadingModule","useModule","blobInfo","blobData","newBlob","Blob","msSaveOrOpenBlob","URL","createObjectURL","createElement","download","revokeObjectURL","templateType","contentHtml","ErrorOnGetRelatedData","RichtTextContent","InternalRichtTextContent","TitleHeadingTwo","PetitieTeller","initial","maxCount","maxPetitionCount","startCount","StartValuePetitionCount","parsedInitialValue","setCount","setDelay","callback","savedCallback","setInterval","clearInterval","useInterval","counterWidthPercentage","petitie","ctaTitle","ctaDescription","ctaButtonLink","ctaButtonText","HorizontalRuler","LOGIN_URL_TEMPLATE","LoginRedirect","redirectUrl","formatter","_formatterMap","List","columns","noDataText","ListItem","column","Formatter","formatterOptions","otherTokens","getDisplayValue","DropdownMultipleControl","setSelectedOptions","setOptions","dropdownSearchIndexHasFocus","setDropdownSearchIndexHasFocus","setIsInvalid","optionsResult","showAddMoreButton","dropdownIndex","deletable","copy","c","selectionChanged","filtered","so","optionFilter","sorted","sortOptions","filterAndSortOptions","dropdownItemIndex","deletedItem","SwitchControl","setChecked","switchId","defaultChecked","handleSwitchChange","routeState","getHeaders","gridDefinition","gridColumns","gridColumn","getColumns","gridData","addValueAsCssClass","isLink","getDetailsForRow","gridDetailsColumns","isRowPartOfGroup","groupByColumnName","groupByColumnValue","getGroupsFromRows","dataRows","groupHelper","GridDetailCard","Card","Accordion","A","Toggle","as","Button","variant","eventKey","rowIndex","activeRow","onCloseAllDetailCards","detailsLabel","GridColumn","valuesObject","orgData","GridHeaderColumn","GridColumnDetails","GridGroup","setActiveRow","shouldRenderHeaders","activeKey","GridHelpers","cell","contentRow","fieldContaningDetailsList","Collapse","detailItem","Grid","noResults","groupValues"],"sourceRoot":""}