@sealcode/sealgen 0.19.31 → 0.19.32
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<
|
|
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>;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { Context } from "koa";
|
|
2
|
-
import {
|
|
2
|
+
import { ExtractFieldDecoded, FieldTypes as SealiousFieldTypes } from "sealious";
|
|
3
3
|
import { CollectionField } from "../fields/collection-field.js";
|
|
4
4
|
import { DropdownOptions, FreeformDropdown } from "./dropdown.js";
|
|
5
5
|
import { Collection, CollectionItem } from "sealious";
|
|
6
|
-
export type ExtractFieldDecoded<F extends SealiousField<any, any, any>> = F extends SealiousField<infer T, unknown, unknown> ? T : never;
|
|
7
6
|
export declare class SingleReferenceDropdown<TargetCollection extends Collection, SealiousField extends SealiousFieldTypes.SingleReference, Required extends boolean> extends FreeformDropdown<ExtractFieldDecoded<SealiousField>> {
|
|
8
7
|
field: CollectionField<SealiousField, Required>;
|
|
9
8
|
options: DropdownOptions & {
|
package/lib/get-fonts.js
CHANGED
|
@@ -80,7 +80,13 @@ async function getFonts(_ = {}) {
|
|
|
80
80
|
} catch {
|
|
81
81
|
console.info("No fonsta config present, using just google fonts");
|
|
82
82
|
}
|
|
83
|
-
|
|
83
|
+
try {
|
|
84
|
+
await rmdir("public/tmp");
|
|
85
|
+
} catch {
|
|
86
|
+
console.info(
|
|
87
|
+
"Could not remove ./public/tmp. Maybe it wasn't there in the first place"
|
|
88
|
+
);
|
|
89
|
+
}
|
|
84
90
|
console.info("Downloaded new fonts pack from Font Squirrel");
|
|
85
91
|
console.info("Downloaded new fonts pack");
|
|
86
92
|
}
|
package/package.json
CHANGED
|
@@ -52,7 +52,7 @@ export class Textarea extends SimpleInput {
|
|
|
52
52
|
// eslint-disable-next-line no-await-in-loop, @typescript-eslint/no-unsafe-assignment
|
|
53
53
|
const { parsed: value } = await this.field.getParsedValue(ctx, data);
|
|
54
54
|
return /* HTML */ `<textarea ${attributes}>
|
|
55
|
-
${String(value)
|
|
55
|
+
${value ? String(value) : ""}</textarea
|
|
56
56
|
>`;
|
|
57
57
|
}
|
|
58
58
|
}
|