@formio/js 5.0.0-dev.5910.f7a730e → 5.0.0-dev.5912.590e895

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.
@@ -10,6 +10,7 @@ export default class HiddenComponent extends Input {
10
10
  };
11
11
  get inputInfo(): any;
12
12
  labelIsHidden(): boolean;
13
+ get emptyValue(): string;
13
14
  setValue(value: any, flags?: {}): boolean;
14
15
  }
15
16
  import Input from '../_classes/input/Input';
@@ -48,7 +48,7 @@ class HiddenComponent extends Input_1.default {
48
48
  return true;
49
49
  }
50
50
  get emptyValue() {
51
- return null;
51
+ return '';
52
52
  }
53
53
  setValue(value, flags = {}) {
54
54
  return this.updateValue(value, flags);
@@ -1099,7 +1099,6 @@ declare const _default: ({
1099
1099
  alwaysEnabled?: undefined;
1100
1100
  } | {
1101
1101
  key: string;
1102
- type: string;
1103
1102
  conditional: {
1104
1103
  json: {
1105
1104
  and: ({
@@ -1150,6 +1149,7 @@ declare const _default: ({
1150
1149
  };
1151
1150
  };
1152
1151
  data?: undefined;
1152
+ type?: undefined;
1153
1153
  weight?: undefined;
1154
1154
  input?: undefined;
1155
1155
  label?: undefined;
@@ -687,7 +687,6 @@ exports.default = [
687
687
  },
688
688
  {
689
689
  key: 'selectData',
690
- type: 'hidden',
691
690
  conditional: {
692
691
  json: {
693
692
  and: [
@@ -159,7 +159,9 @@ class SignatureComponent extends Input_1.default {
159
159
  if (this.dataValue) {
160
160
  this.setDataToSigaturePad();
161
161
  }
162
- this.showCanvas(true);
162
+ if (!this.disabled) {
163
+ this.showCanvas(true);
164
+ }
163
165
  }
164
166
  }
165
167
  renderElement(value, index) {
@@ -79,7 +79,12 @@ class I18n {
79
79
  this.languages[language] = strings;
80
80
  }
81
81
  t(text, ...args) {
82
+ var _a;
82
83
  if (this.currentLanguage[text]) {
84
+ const customTranslationFieldName = (_a = args[0]) === null || _a === void 0 ? void 0 : _a.field;
85
+ if (customTranslationFieldName && this.currentLanguage[customTranslationFieldName]) {
86
+ args[0].field = this.currentLanguage[customTranslationFieldName];
87
+ }
83
88
  return utils_1.Evaluator.interpolateString(this.currentLanguage[text], ...args);
84
89
  }
85
90
  return utils_1.Evaluator.interpolateString(text, ...args);
@@ -10,6 +10,7 @@ export default class HiddenComponent extends Input {
10
10
  };
11
11
  get inputInfo(): any;
12
12
  labelIsHidden(): boolean;
13
+ get emptyValue(): string;
13
14
  setValue(value: any, flags?: {}): boolean;
14
15
  }
15
16
  import Input from '../_classes/input/Input';
@@ -43,7 +43,7 @@ export default class HiddenComponent extends Input {
43
43
  return true;
44
44
  }
45
45
  get emptyValue() {
46
- return null;
46
+ return '';
47
47
  }
48
48
  setValue(value, flags = {}) {
49
49
  return this.updateValue(value, flags);
@@ -1099,7 +1099,6 @@ declare const _default: ({
1099
1099
  alwaysEnabled?: undefined;
1100
1100
  } | {
1101
1101
  key: string;
1102
- type: string;
1103
1102
  conditional: {
1104
1103
  json: {
1105
1104
  and: ({
@@ -1150,6 +1149,7 @@ declare const _default: ({
1150
1149
  };
1151
1150
  };
1152
1151
  data?: undefined;
1152
+ type?: undefined;
1153
1153
  weight?: undefined;
1154
1154
  input?: undefined;
1155
1155
  label?: undefined;
@@ -681,7 +681,6 @@ export default [
681
681
  },
682
682
  {
683
683
  key: 'selectData',
684
- type: 'hidden',
685
684
  conditional: {
686
685
  json: {
687
686
  and: [
@@ -156,7 +156,9 @@ export default class SignatureComponent extends Input {
156
156
  if (this.dataValue) {
157
157
  this.setDataToSigaturePad();
158
158
  }
159
- this.showCanvas(true);
159
+ if (!this.disabled) {
160
+ this.showCanvas(true);
161
+ }
160
162
  }
161
163
  }
162
164
  renderElement(value, index) {
@@ -74,6 +74,10 @@ export class I18n {
74
74
  }
75
75
  t(text, ...args) {
76
76
  if (this.currentLanguage[text]) {
77
+ const customTranslationFieldName = args[0]?.field;
78
+ if (customTranslationFieldName && this.currentLanguage[customTranslationFieldName]) {
79
+ args[0].field = this.currentLanguage[customTranslationFieldName];
80
+ }
77
81
  return Evaluator.interpolateString(this.currentLanguage[text], ...args);
78
82
  }
79
83
  return Evaluator.interpolateString(text, ...args);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formio/js",
3
- "version": "5.0.0-dev.5910.f7a730e",
3
+ "version": "5.0.0-dev.5912.590e895",
4
4
  "description": "JavaScript powered Forms with JSON Form Builder",
5
5
  "main": "lib/cjs/index.js",
6
6
  "exports": {