@comet/admin-generator 8.11.0-canary-20251216124014 → 8.11.0-canary-20251217080136

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.
@@ -92,22 +92,9 @@ function generateFormField({ gqlIntrospection, baseOutputFilename, config, formC
92
92
  : ""}
93
93
  ${validateCode}
94
94
  />`;
95
- //TODO MUI suggest not using type=number https://mui.com/material-ui/react-text-field/#type-quot-number-quot
96
- let assignment = `parseFloat($fieldName)`;
97
- if ((0, isFieldOptional_1.isFieldOptional)({ config, gqlIntrospection: gqlIntrospection, gqlType: gqlType })) {
98
- assignment = `$fieldName ? ${assignment} : null`;
99
- }
100
- formValueConfig.formValueToGqlInputCode = `${assignment}`;
101
- let initializationAssignment = `String(data.${dataRootName}.${nameWithPrefix})`;
102
- if (!required) {
103
- initializationAssignment = `data.${dataRootName}.${nameWithPrefix} ? ${initializationAssignment} : undefined`;
95
+ if (!required && !config.readOnly) {
96
+ formValueConfig.formValueToGqlInputCode = `$fieldName ?? null`;
104
97
  }
105
- formValueConfig.omitFromFragmentType = true;
106
- formValueConfig.typeCode = {
107
- nullable: !required,
108
- type: "string",
109
- };
110
- formValueConfig.initializationCode = `${initializationAssignment}`;
111
98
  if (config.initialValue !== undefined) {
112
99
  formValueConfig.defaultInitializationCode = JSON.stringify(config.initialValue);
113
100
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@comet/admin-generator",
3
- "version": "8.11.0-canary-20251216124014",
3
+ "version": "8.11.0-canary-20251217080136",
4
4
  "description": "Comet Admin Generator CLI tool",
5
5
  "repository": {
6
6
  "directory": "packages/admin/admin-generator",
@@ -48,10 +48,10 @@
48
48
  "rimraf": "^6.1.2",
49
49
  "ts-jest": "^29.4.0",
50
50
  "typescript": "5.9.3",
51
- "@comet/admin": "8.11.0-canary-20251216124014",
52
- "@comet/admin-icons": "8.11.0-canary-20251216124014",
53
- "@comet/cms-admin": "8.11.0-canary-20251216124014",
54
- "@comet/eslint-config": "8.11.0-canary-20251216124014"
51
+ "@comet/admin": "8.11.0-canary-20251217080136",
52
+ "@comet/admin-icons": "8.11.0-canary-20251217080136",
53
+ "@comet/cms-admin": "8.11.0-canary-20251217080136",
54
+ "@comet/eslint-config": "8.11.0-canary-20251217080136"
55
55
  },
56
56
  "engines": {
57
57
  "node": ">=22.0.0"