@sealcode/sealgen 0.19.33 → 0.19.34

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.
@@ -23,7 +23,9 @@ export declare class StructuredArray<Subfields extends Record<string, Field<any>
23
23
  getActionURL(form_id?: string, action?: Record<string, unknown>): string;
24
24
  getDefaultItemBody(): Promise<{}>;
25
25
  makeSubfield(_field_name: string): FormField;
26
- renderItemControl(ctx: Context, form_id: string, control: FormControl | UnboundControlStorage, item: FieldsetOutput<Subfields>, index: number): Promise<(string | number | import("stream").Readable | null) | (string | number | import("stream").Readable | null)[] | Promise<string | number | import("stream").Readable | null>[]>;
26
+ renderItemControl(ctx: Context, form_id: string, control: FormControl | UnboundControlStorage, item: FieldsetOutput<Subfields>, index: number): Promise<string | number | {
27
+ toString(): string;
28
+ } | null>;
27
29
  renderItem(ctx: Context, form_id: string, item: FieldsetOutput<Subfields>, index: number): Promise<string>;
28
30
  getItems(ctx: Context, raw_values: Record<string, FormDataValue>): Promise<FieldsetOutput<Subfields>[]>;
29
31
  _render(ctx: Context, form_id: string, raw_values: Record<string, FormDataValue>): Promise<string>;
@@ -29,7 +29,7 @@ class FormField {
29
29
  return this;
30
30
  }
31
31
  getValuePath() {
32
- return this.value_path || this.name;
32
+ return (this.value_path || this.name).replaceAll("][", ".").replaceAll("[", ".");
33
33
  }
34
34
  setValuePath(path) {
35
35
  this.value_path = path;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sealcode/sealgen",
3
- "version": "0.19.33",
3
+ "version": "0.19.34",
4
4
  "description": "Module to automate adding routes and collections to a sealious application",
5
5
  "main": "lib/index.js",
6
6
  "type": "module",
@@ -92,7 +92,9 @@ export abstract class FormField<
92
92
  }
93
93
 
94
94
  public getValuePath() {
95
- return this.value_path || this.name;
95
+ return (this.value_path || this.name)
96
+ .replaceAll("][", ".")
97
+ .replaceAll("[", ".");
96
98
  }
97
99
 
98
100
  public setValuePath(path: string) {