@sprucelabs/schema 31.1.6 → 31.1.7

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.
@@ -25,12 +25,11 @@ class SelectField extends AbstractField {
25
25
  return errors;
26
26
  }
27
27
  static generateTemplateDetails(options) {
28
- // Build union of select options
29
28
  const { definition } = options;
30
29
  const { isArray, options: { choices }, } = definition;
31
30
  return {
32
31
  valueType: `(${choices
33
- .map((choice) => `"${choice.value}"`)
32
+ .map((choice) => `${typeof choice.value === 'number' ? choice.value : `"${choice.value}"`}`)
34
33
  .join(' | ')})${isArray ? '[]' : ''}`,
35
34
  };
36
35
  }
@@ -30,12 +30,11 @@ class SelectField extends AbstractField_1.default {
30
30
  return errors;
31
31
  }
32
32
  static generateTemplateDetails(options) {
33
- // Build union of select options
34
33
  const { definition } = options;
35
34
  const { isArray, options: { choices }, } = definition;
36
35
  return {
37
36
  valueType: `(${choices
38
- .map((choice) => `"${choice.value}"`)
37
+ .map((choice) => `${typeof choice.value === 'number' ? choice.value : `"${choice.value}"`}`)
39
38
  .join(' | ')})${isArray ? '[]' : ''}`,
40
39
  };
41
40
  }
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "!build/__tests__",
9
9
  "esm"
10
10
  ],
11
- "version": "31.1.6",
11
+ "version": "31.1.7",
12
12
  "main": "./build/index.js",
13
13
  "types": "./build/index.d.ts",
14
14
  "module": "./build/esm/index.js",