@experium/findy-form 1.3.21 → 1.3.25

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.
@@ -96,7 +96,7 @@ var getConstructorOpd = function getConstructorOpd(opdSettings, pdaLanguage, lan
96
96
  return res + ((0, _ramda.path)(['translations', pdaLanguage], cur) || (0, _ramda.path)(['translations', language], cur) || cur.text || '');
97
97
 
98
98
  case 'checkbox':
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>");
99
+ return "".concat(res, "<div>\n <input type=\"checkbox\" id=\"", "checkbox-".concat(cur.id), "\" ").concat(cur.required ? 'required="required"' : '', " ").concat(cur["default"] ? 'checked' : '', " />\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
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>");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@experium/findy-form",
3
- "version": "1.3.21",
3
+ "version": "1.3.25",
4
4
  "main": "./lib/index.js",
5
5
  "homepage": "https://experium.github.io/findy-form",
6
6
  "repository": "https://github.com/experium/findy-form",
@@ -21,7 +21,7 @@ const getConstructorOpd = (opdSettings, pdaLanguage, language) => {
21
21
  return res + (path(['translations', pdaLanguage], cur) || path(['translations', language], cur) || cur.text || '');
22
22
  case 'checkbox':
23
23
  return `${res}<div>
24
- <input type="checkbox" id="${`checkbox-${cur.id}`}" ${cur.required ? 'required="required"' : ''} />
24
+ <input type="checkbox" id="${`checkbox-${cur.id}`}" ${cur.required ? 'required="required"' : ''} ${cur.default ? 'checked' : ''} />
25
25
  <label for="${`checkbox-${cur.id}`}">${path(['translations', pdaLanguage], cur) || path(['translations', language], cur) || cur.label || ''}</label>
26
26
  </div>`;
27
27
  case 'opdCheckbox':