@experium/findy-form 1.3.8 → 1.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/Fields.js +1 -0
- package/lib/components/Form.js +1 -1
- package/lib/components/formComponents/PersonalDataAgreement.js +1 -1
- package/package.json +1 -1
- package/src/components/Fields.js +1 -0
- package/src/components/Form.js +1 -1
- package/src/components/formComponents/PersonalDataAgreement.js +2 -2
package/lib/components/Fields.js
CHANGED
|
@@ -509,6 +509,7 @@ var Fields = /*#__PURE__*/function (_Component) {
|
|
|
509
509
|
selectHeight: selectHeight,
|
|
510
510
|
selectLineHeight: selectLineHeight,
|
|
511
511
|
language: language,
|
|
512
|
+
pdaLanguage: pdaLanguage,
|
|
512
513
|
languageOrigin: languageOrigin,
|
|
513
514
|
onChangeQuestion: _this.onChangeQuestion(field),
|
|
514
515
|
onChange: function onChange(value) {
|
package/lib/components/Form.js
CHANGED
|
@@ -252,10 +252,10 @@ var Form = /*#__PURE__*/function (_Component) {
|
|
|
252
252
|
|
|
253
253
|
handleSubmit(e);
|
|
254
254
|
});
|
|
255
|
-
var pdaLanguage = props.pdaLanguage || props.language || _translations.RU;
|
|
256
255
|
|
|
257
256
|
var _language = (0, _ramda.head)((props.language || _translations.RU).split('-'));
|
|
258
257
|
|
|
258
|
+
var pdaLanguage = props.pdaLanguage || _language || _translations.RU;
|
|
259
259
|
_this.state = {
|
|
260
260
|
language: _language,
|
|
261
261
|
pdaLanguage: pdaLanguage,
|
|
@@ -99,7 +99,7 @@ var getConstructorOpd = function getConstructorOpd(opdSettings, pdaLanguage, lan
|
|
|
99
99
|
return "".concat(res, "<div>\n <input type=\"checkbox\" id=\"", "checkbox-".concat(cur.id), "\" ").concat(cur.required ? 'required="required"' : '', " />\n <label for=\"", "checkbox-".concat(cur.id), "\">").concat((0, _ramda.path)(['translations', pdaLanguage], cur) || (0, _ramda.path)(['translations', language], cur) || cur.label || '', "</label>\n </div>");
|
|
100
100
|
|
|
101
101
|
case 'opdCheckbox':
|
|
102
|
-
return "".concat(res, "<div>\n <input type=\"checkbox\" id=\"").concat(cur.opdType, "\" name=\"").concat(cur.opdType, "\" data-separate-field=\"").concat(cur.opdType, "\" ").concat((0, _ramda.path)([cur.opdType, 'required'], opdSettings) ? 'required="required"' : '', " />\n <label for=\"").concat(cur.opdType, "\">").concat((0, _ramda.pathOr)('', [cur.
|
|
102
|
+
return "".concat(res, "<div>\n <input type=\"checkbox\" id=\"").concat(cur.opdType, "\" name=\"").concat(cur.opdType, "\" data-separate-field=\"").concat(cur.opdType, "\" ").concat((0, _ramda.path)([cur.opdType, 'required'], opdSettings) ? 'required="required"' : '', " />\n <label for=\"").concat(cur.opdType, "\">").concat((0, _ramda.pathOr)('', ['translations', pdaLanguage], cur) || (0, _ramda.pathOr)('', ['translations', language], cur) || (0, _ramda.pathOr)('', [cur.opdType, 'translations', language], opdSettings) || (0, _ramda.pathOr)('', [cur.opdType, 'label'], opdSettings), "</label>\n </div>");
|
|
103
103
|
|
|
104
104
|
default:
|
|
105
105
|
return res;
|
package/package.json
CHANGED
package/src/components/Fields.js
CHANGED
|
@@ -336,6 +336,7 @@ class Fields extends Component {
|
|
|
336
336
|
selectHeight={selectHeight}
|
|
337
337
|
selectLineHeight={selectLineHeight}
|
|
338
338
|
language={language}
|
|
339
|
+
pdaLanguage={pdaLanguage}
|
|
339
340
|
languageOrigin={languageOrigin}
|
|
340
341
|
onChangeQuestion={this.onChangeQuestion(field)}
|
|
341
342
|
onChange={value => this.onChange(value, field)}
|
package/src/components/Form.js
CHANGED
|
@@ -59,8 +59,8 @@ class Form extends Component {
|
|
|
59
59
|
constructor(props) {
|
|
60
60
|
super(props);
|
|
61
61
|
|
|
62
|
-
const pdaLanguage = props.pdaLanguage || props.language || RU;
|
|
63
62
|
const language = head((props.language || RU).split('-'));
|
|
63
|
+
const pdaLanguage = props.pdaLanguage || language || RU;
|
|
64
64
|
|
|
65
65
|
this.state = {
|
|
66
66
|
language,
|
|
@@ -2,7 +2,7 @@ import React, { Component, Fragment } from 'react';
|
|
|
2
2
|
import Modal from 'react-responsive-modal';
|
|
3
3
|
import { withTranslation } from 'react-i18next';
|
|
4
4
|
import { FormSpy } from 'react-final-form';
|
|
5
|
-
import { filter, find, map, path, pathOr, prop,
|
|
5
|
+
import { filter, find, map, path, pathOr, prop, pick } from 'ramda';
|
|
6
6
|
|
|
7
7
|
import { Checkbox } from './Checkbox';
|
|
8
8
|
import styles from '../../styles/index.module.css';
|
|
@@ -27,7 +27,7 @@ const getConstructorOpd = (opdSettings, pdaLanguage, language) => {
|
|
|
27
27
|
case 'opdCheckbox':
|
|
28
28
|
return `${res}<div>
|
|
29
29
|
<input type="checkbox" id="${cur.opdType}" name="${cur.opdType}" data-separate-field="${cur.opdType}" ${path([cur.opdType, 'required'], opdSettings) ? 'required="required"' : ''} />
|
|
30
|
-
<label for="${cur.opdType}">${pathOr('', [cur
|
|
30
|
+
<label for="${cur.opdType}">${pathOr('', ['translations', pdaLanguage], cur) || pathOr('', ['translations', language], cur) || pathOr('', [cur.opdType, 'translations', language], opdSettings) || pathOr('', [cur.opdType, 'label'], opdSettings)}</label>
|
|
31
31
|
</div>`;
|
|
32
32
|
default:
|
|
33
33
|
return res;
|