@sealcode/sealgen 0.19.16 → 0.19.18
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.
- package/@types/app-config/get-app-port.d.ts +1 -0
- package/@types/app-config/load-app-config.d.ts +4 -0
- package/@types/app-config/resolve-app-config-path.d.ts +1 -0
- package/@types/controllers/sealgen-table.stimulus.d.ts +9 -0
- package/@types/forms/controls/table.d.ts +2 -0
- package/@types/forms/fields/structured-array.d.ts +2 -2
- package/@types/utils/translate.d.ts +2 -1
- package/lib/controllers/sealgen-table.stimulus.js +98 -0
- package/lib/forms/controls/table.js +49 -43
- package/lib/forms/controls/tickable.js +1 -3
- package/lib/forms/fields/collection-field.js +2 -1
- package/lib/generate-routes.js +23 -1
- package/lib/mount.js +8 -10
- package/lib/utils/translate.js +4 -4
- package/package.json +2 -2
- package/src/controllers/sealgen-table.stimulus.ts +115 -0
- package/src/forms/controls/table.ts +94 -81
- package/src/forms/fields/collection-field.ts +2 -1
- package/src/forms/fields/structured-array.ts +2 -11
- package/src/generate-routes.ts +38 -9
- package/src/mount.ts +8 -12
- package/.xunit +0 -75
- package/@types/add-verbose-crud.d.ts +0 -3
- package/@types/builders/colors-builder.d.sync-conflict-20250918-184323-TFDLWFG.ts +0 -10
- package/@types/builders/fonts-builder.d.sync-conflict-20250918-184322-TFDLWFG.ts +0 -7
- package/@types/controllers/table-add-button.d.ts +0 -6
- package/@types/crud-field-snippets.d.ts +0 -1
- package/@types/find-css-includes.d.ts +0 -1
- package/@types/forms/controls/array.d.sync-conflict-20250918-184306-TFDLWFG.ts +0 -33
- package/@types/forms/controls/array.sync-conflict-20250918-222045-TFDLWFG.d.ts +0 -33
- package/@types/forms/controls/autocomplete.d.sync-conflict-20250918-222042-TFDLWFG.ts +0 -22
- package/@types/forms/controls/checkbox-group.d.sync-conflict-20250918-184319-TFDLWFG.ts +0 -21
- package/@types/forms/controls/checkboxed-list-input.d.sync-conflict-20250918-184323-TFDLWFG.ts +0 -21
- package/@types/forms/controls/derived-frame.d.sync-conflict-20250918-184314-TFDLWFG.ts +0 -19
- package/@types/forms/controls/dropdown.d.sync-conflict-20250918-222044-TFDLWFG.ts +0 -30
- package/@types/forms/controls/file.d.sync-conflict-20250918-222045-TFDLWFG.ts +0 -13
- package/@types/forms/controls/form-control.d.sync-conflict-20250918-184322-TFDLWFG.ts +0 -19
- package/@types/forms/controls/form-control.d.sync-conflict-20250918-222046-TFDLWFG.ts +0 -19
- package/@types/forms/controls/multiple-files.d.sync-conflict-20250918-184318-TFDLWFG.ts +0 -42
- package/@types/forms/controls/multiple-photos.d.ts +0 -19
- package/@types/forms/controls/number.d.sync-conflict-20250918-222046-TFDLWFG.ts +0 -13
- package/@types/forms/controls/photo.d.sync-conflict-20250918-184321-TFDLWFG.ts +0 -19
- package/@types/forms/controls/photo.d.ts +0 -19
- package/@types/forms/controls/photo.test.d.ts +0 -1
- package/@types/forms/controls/reverse-single-reference.d.ts +0 -1
- package/@types/forms/controls/simple-input.d.sync-conflict-20250918-184310-TFDLWFG.ts +0 -33
- package/@types/forms/controls/simple-input.d.sync-conflict-20250918-222042-TFDLWFG.ts +0 -33
- package/@types/forms/controls/simple-input.sync-conflict-20250918-222045-TFDLWFG.d.ts +0 -33
- package/@types/forms/controls/table.d.sync-conflict-20250918-184302-TFDLWFG.ts +0 -39
- package/@types/forms/controls/table.sync-conflict-20250918-222042-TFDLWFG.d.ts +0 -39
- package/@types/forms/controls/textarea.d.sync-conflict-20250918-222045-TFDLWFG.ts +0 -25
- package/@types/forms/fields/boolean.d.sync-conflict-20250918-184325-TFDLWFG.ts +0 -22
- package/@types/forms/fields/boolean.sync-conflict-20250918-222042-TFDLWFG.d.ts +0 -22
- package/@types/forms/fields/checkboxed-list.d.sync-conflict-20250918-184325-TFDLWFG.ts +0 -23
- package/@types/forms/fields/collection-field.d.sync-conflict-20250918-184319-TFDLWFG.ts +0 -22
- package/@types/forms/fields/collection-field.d.sync-conflict-20250918-222047-TFDLWFG.ts +0 -22
- package/@types/forms/fields/coordinates.d.sync-conflict-20250918-222044-TFDLWFG.ts +0 -14
- package/@types/forms/fields/datetime.d.sync-conflict-20250918-222050-TFDLWFG.ts +0 -4
- package/@types/forms/fields/email.d.sync-conflict-20250918-184303-TFDLWFG.ts +0 -8
- package/@types/forms/fields/enum-multiple-sealious.sync-conflict-20250918-222047-TFDLWFG.d.ts +0 -16
- package/@types/forms/fields/enum-multiple.d.ts +0 -18
- package/@types/forms/fields/enum-multiple.test.d.ts +0 -1
- package/@types/forms/fields/enum.d.ts +0 -18
- package/@types/forms/fields/enum.test.d.ts +0 -1
- package/@types/forms/fields/field.d.sync-conflict-20250918-184306-TFDLWFG.ts +0 -70
- package/@types/forms/fields/fields.d.sync-conflict-20250918-184314-TFDLWFG.ts +0 -29
- package/@types/forms/fields/file.d.sync-conflict-20250918-184310-TFDLWFG.ts +0 -23
- package/@types/forms/fields/file.d.sync-conflict-20250918-222046-TFDLWFG.ts +0 -23
- package/@types/forms/fields/file.sync-conflict-20250918-222049-TFDLWFG.d.ts +0 -23
- package/@types/forms/fields/get-field-for-sealious.d.sync-conflict-20250918-222046-TFDLWFG.ts +0 -29
- package/@types/forms/fields/get-field-for-sealious.sync-conflict-20250918-222042-TFDLWFG.d.ts +0 -29
- package/@types/forms/fields/image.d.sync-conflict-20250918-222042-TFDLWFG.ts +0 -5
- package/@types/forms/fields/multiple-files.d.sync-conflict-20250918-184304-TFDLWFG.ts +0 -16
- package/@types/forms/fields/number.d.sync-conflict-20250918-184317-TFDLWFG.ts +0 -25
- package/@types/forms/fields/number.d.sync-conflict-20250918-222047-TFDLWFG.ts +0 -25
- package/@types/forms/fields/pick-from-list.d.sync-conflict-20250918-184322-TFDLWFG.ts +0 -15
- package/@types/forms/fields/proxy-field.d.sync-conflict-20250918-184307-TFDLWFG.ts +0 -15
- package/@types/forms/fields/regexp.d.sync-conflict-20250918-184305-TFDLWFG.ts +0 -21
- package/@types/forms/fields/regexp.d.sync-conflict-20250918-222045-TFDLWFG.ts +0 -21
- package/@types/forms/fields/regexp.sync-conflict-20250918-222047-TFDLWFG.d.ts +0 -21
- package/@types/forms/fields/reverse-single-reference.d.ts +0 -13
- package/@types/forms/fields/simple-form-field.d.sync-conflict-20250918-184309-TFDLWFG.ts +0 -29
- package/@types/forms/fields/simple-form-field.d.sync-conflict-20250918-222044-TFDLWFG.ts +0 -29
- package/@types/forms/fields/simple-form-field.sync-conflict-20250918-222049-TFDLWFG.d.ts +0 -29
- package/@types/forms/fields/single-reference.sync-conflict-20250918-222043-TFDLWFG.d.ts +0 -10
- package/@types/forms/fields/structured-array.d.sync-conflict-20250918-184302-TFDLWFG.ts +0 -27
- package/@types/forms/fields/structured-array.d.sync-conflict-20250918-222049-TFDLWFG.ts +0 -27
- package/@types/forms/fields/structured-array.sync-conflict-20250918-222047-TFDLWFG.d.ts +0 -27
- package/@types/forms/fields/table.d.sync-conflict-20250918-184303-TFDLWFG.ts +0 -16
- package/@types/forms/form-types.d.sync-conflict-20250918-222045-TFDLWFG.ts +0 -26
- package/@types/forms/form.d.sync-conflict-20250918-184315-TFDLWFG.ts +0 -32
- package/@types/forms/form.d.sync-conflict-20250918-222049-TFDLWFG.ts +0 -32
- package/@types/forms/form.sync-conflict-20250918-222049-TFDLWFG.d.ts +0 -33
- package/@types/forms/form.test.d.sync-conflict-20250918-184318-TFDLWFG.ts +0 -6
- package/@types/forms/form.test.d.sync-conflict-20250918-222047-TFDLWFG.ts +0 -6
- package/@types/forms/multiform.d.sync-conflict-20250918-184308-TFDLWFG.ts +0 -23
- package/@types/forms/multiform.sync-conflict-20250918-222044-TFDLWFG.d.ts +0 -23
- package/@types/index.d.sync-conflict-20250918-184316-TFDLWFG.ts +0 -46
- package/@types/mount.d.sync-conflict-20250918-184320-TFDLWFG.ts +0 -6
- package/@types/page/list.d.sync-conflict-20250918-184318-TFDLWFG.ts +0 -48
- package/@types/page/list.d.sync-conflict-20250918-222046-TFDLWFG.ts +0 -48
- package/@types/page/list.sync-conflict-20250918-222048-TFDLWFG.d.ts +0 -48
- package/@types/page/mountable-with-fields.d.sync-conflict-20250918-184321-TFDLWFG.ts +0 -42
- package/@types/page/mountable-with-fields.d.sync-conflict-20250918-222046-TFDLWFG.ts +0 -42
- package/@types/page/mountable-with-fields.sync-conflict-20250918-222044-TFDLWFG.d.ts +0 -42
- package/@types/page/mountable.d.sync-conflict-20250918-184306-TFDLWFG.ts +0 -10
- package/@types/page/page.d.sync-conflict-20250918-184320-TFDLWFG.ts +0 -18
- package/@types/page/props-parser.d.sync-conflict-20250918-184305-TFDLWFG.ts +0 -15
- package/@types/page/stateful-page.d.sync-conflict-20250918-184326-TFDLWFG.ts +0 -62
- package/@types/templates/shared/handlers/boolean.d.ts +0 -2
- package/@types/templates/shared/handlers/date.d.ts +0 -2
- package/@types/templates/shared/handlers/deep-reverse-single-reference.d.ts +0 -2
- package/@types/templates/shared/handlers/default.d.ts +0 -2
- package/@types/templates/shared/handlers/enum.d.ts +0 -2
- package/@types/templates/shared/handlers/file.d.ts +0 -2
- package/@types/templates/shared/handlers/image.d.ts +0 -2
- package/@types/templates/shared/handlers/int.d.ts +0 -2
- package/@types/templates/shared/handlers/jdd.d.ts +0 -2
- package/@types/templates/shared/handlers/single-reference.d.ts +0 -2
- package/@types/templates/shared/handlers/structured-array.d.ts +0 -2
- package/@types/templates/shared/shared-crud-form-fields.d.sync-conflict-20250918-184306-TFDLWFG.ts +0 -1
- package/@types/test_utils/test-on-real-app.d.sync-conflict-20250918-184320-TFDLWFG.ts +0 -26
- package/@types/utils/extract-fields-from-collection.d.sync-conflict-20250918-184312-TFDLWFG.ts +0 -18
- package/@types/utils/extract-fields-from-collection.sync-conflict-20250918-222045-TFDLWFG.d.ts +0 -18
- package/lib/controllers/table-add-button.stimulus.js +0 -35
- package/src/controllers/table-add-button.stimulus.ts +0 -35
- /package/@types/{add-crud.d.sync-conflict-20250918-184311-TFDLWFG.ts → app-config/get-app-port.test.d.ts} +0 -0
- /package/@types/{crud-field-snippets.d.sync-conflict-20250918-184323-TFDLWFG.ts → app-config/load-app-config.test.d.ts} +0 -0
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Context } from "koa";
|
|
2
|
-
import { PickFromListField } from "../fields/pick-from-list.js";
|
|
3
|
-
import { FormControlContext } from "./form-control.js";
|
|
4
|
-
import { SimpleInput } from "./simple-input.js";
|
|
5
|
-
export declare class Autocomplete extends SimpleInput<string | null> {
|
|
6
|
-
field: PickFromListField<boolean>;
|
|
7
|
-
options: {
|
|
8
|
-
id?: string;
|
|
9
|
-
label?: string;
|
|
10
|
-
placeholder?: string;
|
|
11
|
-
};
|
|
12
|
-
constructor(field: PickFromListField<boolean>, options: {
|
|
13
|
-
id?: string;
|
|
14
|
-
label?: string;
|
|
15
|
-
placeholder?: string;
|
|
16
|
-
});
|
|
17
|
-
getListID(): string;
|
|
18
|
-
getInputAttributes(fctx: FormControlContext): Promise<{
|
|
19
|
-
list: string;
|
|
20
|
-
}>;
|
|
21
|
-
postInput(ctx: Context): Promise<string>;
|
|
22
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { FlatTemplatable } from "tempstream";
|
|
2
|
-
import { CheckboxWithValue } from "./checkbox.js";
|
|
3
|
-
import { FormControlContext } from "./form-control.js";
|
|
4
|
-
import { FormFieldControl } from "./form-field-control.js";
|
|
5
|
-
import { CheckboxedListField } from "../fields/checkboxed-list.js";
|
|
6
|
-
export type DefaultCheckboxOptions = {
|
|
7
|
-
id?: string;
|
|
8
|
-
label?: string;
|
|
9
|
-
hide_errors?: boolean;
|
|
10
|
-
readonly?: boolean;
|
|
11
|
-
name?: string;
|
|
12
|
-
checkboxNameToLabel?: (name: string) => string;
|
|
13
|
-
classes?: string[];
|
|
14
|
-
};
|
|
15
|
-
export declare class CheckboxGroup<Options extends DefaultCheckboxOptions = DefaultCheckboxOptions> extends FormFieldControl {
|
|
16
|
-
field: CheckboxedListField<boolean, string>;
|
|
17
|
-
options: Options;
|
|
18
|
-
constructor(field: CheckboxedListField<boolean, string>, options?: Options);
|
|
19
|
-
wrapGroup(fctx: FormControlContext, checkboxes: CheckboxWithValue[]): Promise<FlatTemplatable>;
|
|
20
|
-
render(fctx: FormControlContext): Promise<FlatTemplatable>;
|
|
21
|
-
}
|
package/@types/forms/controls/checkboxed-list-input.d.sync-conflict-20250918-184323-TFDLWFG.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { CheckboxedListField } from "../fields/checkboxed-list.js";
|
|
2
|
-
import { FormControlContext } from "./form-control.js";
|
|
3
|
-
import { FormFieldControl } from "./form-field-control.js";
|
|
4
|
-
export declare class CheckboxedListInput<Values extends string> extends FormFieldControl {
|
|
5
|
-
field: CheckboxedListField<boolean, Values>;
|
|
6
|
-
options: {
|
|
7
|
-
label: string;
|
|
8
|
-
};
|
|
9
|
-
constructor(field: CheckboxedListField<boolean, Values>, options?: {
|
|
10
|
-
label: string;
|
|
11
|
-
});
|
|
12
|
-
generateCountBasedClasses(n: number): string[];
|
|
13
|
-
render(fctx: FormControlContext): Promise<string>;
|
|
14
|
-
renderOption({ name, value, form_id, label, checked, }: {
|
|
15
|
-
name: string;
|
|
16
|
-
form_id: string;
|
|
17
|
-
value: string;
|
|
18
|
-
label?: string;
|
|
19
|
-
checked: boolean;
|
|
20
|
-
}): string | Promise<string>;
|
|
21
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import Router from "@koa/router";
|
|
2
|
-
import { Context } from "koa";
|
|
3
|
-
import { ParsedUrlQuery } from "querystring";
|
|
4
|
-
import { FlatTemplatable } from "tempstream";
|
|
5
|
-
import { FormField } from "../fields/field.js";
|
|
6
|
-
import { Derived } from "./derived.js";
|
|
7
|
-
import { FormControlContext } from "./form-control.js";
|
|
8
|
-
export declare class DerivedFrame extends Derived<{
|
|
9
|
-
frame_id: string;
|
|
10
|
-
form_id: string;
|
|
11
|
-
field_name_prefix: string;
|
|
12
|
-
}> {
|
|
13
|
-
frame_name: string;
|
|
14
|
-
generateFrameContent: (ctx: FormControlContext, args: ParsedUrlQuery) => Promise<FlatTemplatable>;
|
|
15
|
-
frame_id: string;
|
|
16
|
-
constructor(frame_name: string, fields: FormField[], generateFrameContent: (ctx: FormControlContext, args: ParsedUrlQuery) => Promise<FlatTemplatable>, frame_id?: string);
|
|
17
|
-
renderBackendResponseFrame(_ctx: Context, content: FlatTemplatable): string | Promise<string>;
|
|
18
|
-
mount(router: Router): void;
|
|
19
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { Context } from "koa";
|
|
2
|
-
import { FlatTemplatable } from "tempstream";
|
|
3
|
-
import { FormField } from "../fields/field.js";
|
|
4
|
-
import { PickFromListField } from "../fields/pick-from-list.js";
|
|
5
|
-
import { FormDataValue } from "../form-types.js";
|
|
6
|
-
import { FormControlContext } from "./form-control.js";
|
|
7
|
-
import { SimpleInput } from "./simple-input.js";
|
|
8
|
-
export type DropdownOptions = {
|
|
9
|
-
label: string;
|
|
10
|
-
autosubmit?: boolean;
|
|
11
|
-
autocomplete?: boolean;
|
|
12
|
-
};
|
|
13
|
-
export type DropdownOption = {
|
|
14
|
-
value: string;
|
|
15
|
-
label: string;
|
|
16
|
-
};
|
|
17
|
-
export declare class FreeformDropdown extends SimpleInput<string | null> {
|
|
18
|
-
field: FormField<boolean, string | null>;
|
|
19
|
-
_generateOptions: (ctx: Context) => Promise<DropdownOption[]>;
|
|
20
|
-
options: DropdownOptions;
|
|
21
|
-
constructor(field: FormField<boolean, string | null>, _generateOptions: (ctx: Context) => Promise<DropdownOption[]>, options?: DropdownOptions);
|
|
22
|
-
generateOptions(ctx: Context): Promise<DropdownOption[]>;
|
|
23
|
-
getInputAttributes(fctx: FormControlContext): Promise<Record<string, string | boolean>>;
|
|
24
|
-
renderInput(ctx: Context, attributes_str: string, data: Record<string, FormDataValue>): Promise<FlatTemplatable>;
|
|
25
|
-
}
|
|
26
|
-
export declare class Dropdown extends FreeformDropdown {
|
|
27
|
-
field: PickFromListField<boolean>;
|
|
28
|
-
options: DropdownOptions;
|
|
29
|
-
constructor(field: PickFromListField<boolean>, options?: DropdownOptions);
|
|
30
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Context } from "koa";
|
|
2
|
-
import { FilePointer } from "@sealcode/file-manager";
|
|
3
|
-
import { FlatTemplatable } from "tempstream";
|
|
4
|
-
import { FileContainer } from "../fields/file.js";
|
|
5
|
-
import { FormDataValue } from "../form-types.js";
|
|
6
|
-
import { FormControlContext } from "./form-control.js";
|
|
7
|
-
import { SimpleInput } from "./simple-input.js";
|
|
8
|
-
export declare class File extends SimpleInput<FileContainer> {
|
|
9
|
-
getType(): string;
|
|
10
|
-
renderFilePreview(_ctx: Context, file: FilePointer | null): Promise<FlatTemplatable>;
|
|
11
|
-
preInput(fctx: FormControlContext, data: Record<string, FormDataValue>): Promise<string>;
|
|
12
|
-
getInputAttributes(fctx: FormControlContext): Promise<Record<string, string | boolean>>;
|
|
13
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import Router from "@koa/router";
|
|
2
|
-
import { Context } from "koa";
|
|
3
|
-
import { FlatTemplatable } from "tempstream";
|
|
4
|
-
import { FormDataValue, FormMessage } from "../form-types.js";
|
|
5
|
-
import type { Form } from "../form.js";
|
|
6
|
-
export declare class FormControlContext {
|
|
7
|
-
ctx: Context;
|
|
8
|
-
data: Record<string, FormDataValue>;
|
|
9
|
-
messages: FormMessage[];
|
|
10
|
-
field_name_prefix: string;
|
|
11
|
-
form_id: string;
|
|
12
|
-
validate: boolean;
|
|
13
|
-
constructor(ctx: Context, data: Record<string, FormDataValue>, messages: FormMessage[], field_name_prefix: string, form_id: string, validate: boolean);
|
|
14
|
-
}
|
|
15
|
-
export declare abstract class FormControl {
|
|
16
|
-
abstract render(fctx: FormControlContext): FlatTemplatable | Promise<FlatTemplatable>;
|
|
17
|
-
abstract role: "input" | "decoration" | "messages" | "submit";
|
|
18
|
-
mount(_router: Router, _form: Form<any, any>): void;
|
|
19
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import Router from "@koa/router";
|
|
2
|
-
import { Context } from "koa";
|
|
3
|
-
import { FlatTemplatable } from "tempstream";
|
|
4
|
-
import { FormDataValue, FormMessage } from "../form-types.js";
|
|
5
|
-
import type { Form } from "../form.js";
|
|
6
|
-
export declare class FormControlContext {
|
|
7
|
-
ctx: Context;
|
|
8
|
-
data: Record<string, FormDataValue>;
|
|
9
|
-
messages: FormMessage[];
|
|
10
|
-
field_name_prefix: string;
|
|
11
|
-
form_id: string;
|
|
12
|
-
validate: boolean;
|
|
13
|
-
constructor(ctx: Context, data: Record<string, FormDataValue>, messages: FormMessage[], field_name_prefix: string, form_id: string, validate: boolean);
|
|
14
|
-
}
|
|
15
|
-
export declare abstract class FormControl {
|
|
16
|
-
abstract render(fctx: FormControlContext): FlatTemplatable | Promise<FlatTemplatable>;
|
|
17
|
-
abstract role: "input" | "decoration" | "messages" | "submit";
|
|
18
|
-
mount(_router: Router, _form: Form<any, any>): void;
|
|
19
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import Router from "@koa/router";
|
|
2
|
-
import { Collection, CollectionItem, Field as SealiousField } from "sealious";
|
|
3
|
-
import { Context } from "koa";
|
|
4
|
-
import { FlatTemplatable } from "tempstream";
|
|
5
|
-
import { MultipleFiles as MultipleFilesField } from "../fields/multiple-files.js";
|
|
6
|
-
import { FormFieldControl } from "./form-field-control.js";
|
|
7
|
-
import { FormControlContext } from "./form-control.js";
|
|
8
|
-
import { FilePointer } from "@sealcode/file-manager";
|
|
9
|
-
export type MultipleFilesOptions = {
|
|
10
|
-
label?: string;
|
|
11
|
-
uploadLabel?: string;
|
|
12
|
-
getAdditionalFields: (ctx: Context, file: FilePointer) => Promise<Record<string, unknown>>;
|
|
13
|
-
};
|
|
14
|
-
export declare class MultipleFiles extends FormFieldControl {
|
|
15
|
-
field: MultipleFilesField;
|
|
16
|
-
options: MultipleFilesOptions;
|
|
17
|
-
constructor(field: MultipleFilesField, options?: Partial<MultipleFilesOptions>);
|
|
18
|
-
getClassModifiers(): string[];
|
|
19
|
-
mount(router: Router): void;
|
|
20
|
-
deleteFileAssociation(ctx: Context, file_item_id: string): Promise<void>;
|
|
21
|
-
addFileAssociation(ctx: Context, file: FilePointer): Promise<void>;
|
|
22
|
-
getFrameRelativeURL(): string;
|
|
23
|
-
getFrameID(): string;
|
|
24
|
-
renderFrame(_ctx: Context, content?: FlatTemplatable): string | Promise<string>;
|
|
25
|
-
render(fctx: FormControlContext): FlatTemplatable | Promise<FlatTemplatable>;
|
|
26
|
-
getReferencingCollection(): Collection;
|
|
27
|
-
getFileField(): SealiousField<any> | null;
|
|
28
|
-
extractFileFromItem(item: CollectionItem<Collection>): Promise<FilePointer | null>;
|
|
29
|
-
renderFileItemPreview(_fileItem: CollectionItem, file: FilePointer): Promise<FlatTemplatable>;
|
|
30
|
-
renderFileItem(fileItem: CollectionItem, file: FilePointer): Promise<FlatTemplatable>;
|
|
31
|
-
renderFileRemoveButton(fileItem: CollectionItem): FlatTemplatable;
|
|
32
|
-
getFileItems(ctx: Context): Promise<CollectionItem<any>[]>;
|
|
33
|
-
getInputAttributes(): {
|
|
34
|
-
type: string;
|
|
35
|
-
name: string;
|
|
36
|
-
multiple: boolean;
|
|
37
|
-
};
|
|
38
|
-
renderFrameContent(ctx: Context): Promise<FlatTemplatable>;
|
|
39
|
-
setLabel(label: string): void;
|
|
40
|
-
setUploadLabel(label: string): void;
|
|
41
|
-
setAdditionalFieldsGetter(fn: (ctx: Context, file: FilePointer) => Promise<Record<string, unknown>>): void;
|
|
42
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { CollectionItem } from "sealious";
|
|
2
|
-
import { FilePointer } from "@sealcode/file-manager";
|
|
3
|
-
import { FlatTemplatable } from "tempstream";
|
|
4
|
-
import { MultipleFiles, MultipleFilesOptions } from "./multiple-files.js";
|
|
5
|
-
import { MultipleFiles as MultipleFilesField } from "../fields/multiple-files.js";
|
|
6
|
-
import { KoaResponsiveImageRouter } from "koa-responsive-image-router";
|
|
7
|
-
export declare class MultiplePhotos extends MultipleFiles {
|
|
8
|
-
field: MultipleFilesField;
|
|
9
|
-
imageRouter: KoaResponsiveImageRouter;
|
|
10
|
-
constructor(field: MultipleFilesField, imageRouter: KoaResponsiveImageRouter, options?: Partial<MultipleFilesOptions>);
|
|
11
|
-
getClassModifiers(): string[];
|
|
12
|
-
getInputAttributes(): {
|
|
13
|
-
accept: string;
|
|
14
|
-
type: string;
|
|
15
|
-
name: string;
|
|
16
|
-
multiple: boolean;
|
|
17
|
-
};
|
|
18
|
-
renderFileItem(fileItem: CollectionItem, file: FilePointer): Promise<FlatTemplatable>;
|
|
19
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { NumberField } from "../fields/number.js";
|
|
2
|
-
import { FormControlContext } from "./form-control.js";
|
|
3
|
-
import { SimpleInput, SimpleInputOptions } from "./simple-input.js";
|
|
4
|
-
export type NumberOptions = SimpleInputOptions & Partial<{
|
|
5
|
-
step: number;
|
|
6
|
-
}>;
|
|
7
|
-
export declare class Number extends SimpleInput<number | null> {
|
|
8
|
-
field: NumberField;
|
|
9
|
-
options: NumberOptions;
|
|
10
|
-
constructor(field: NumberField, options: NumberOptions);
|
|
11
|
-
getType(): string;
|
|
12
|
-
getInputAttributes(fctx: FormControlContext): Promise<Record<string, string | boolean>>;
|
|
13
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Context } from "koa";
|
|
2
|
-
import { FlatTemplatable } from "tempstream";
|
|
3
|
-
import { File } from "./file.js";
|
|
4
|
-
import { FormField } from "../fields/field.js";
|
|
5
|
-
import { SimpleInputOptions } from "./simple-input.js";
|
|
6
|
-
import { FormControlContext } from "./form-control.js";
|
|
7
|
-
import { FileContainer } from "../fields/file.js";
|
|
8
|
-
import { FilePointer } from "@sealcode/file-manager";
|
|
9
|
-
export declare class Photo extends File {
|
|
10
|
-
field: FormField<boolean, FileContainer>;
|
|
11
|
-
constructor(field: FormField<boolean, FileContainer>, options?: SimpleInputOptions);
|
|
12
|
-
getImgStyle(): Promise<string>;
|
|
13
|
-
renderFilePreview(ctx: Context, file: FilePointer | null): Promise<FlatTemplatable>;
|
|
14
|
-
getWrapperModifiers(): string[];
|
|
15
|
-
getInputAttributes(fctx: FormControlContext): Promise<{
|
|
16
|
-
accept: string;
|
|
17
|
-
onchange: string;
|
|
18
|
-
}>;
|
|
19
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Context } from "koa";
|
|
2
|
-
import { FlatTemplatable } from "tempstream";
|
|
3
|
-
import { File } from "./file.js";
|
|
4
|
-
import { FormField } from "../fields/field.js";
|
|
5
|
-
import { SimpleInputOptions } from "./simple-input.js";
|
|
6
|
-
import { FormControlContext } from "./form-control.js";
|
|
7
|
-
import { FileContainer } from "../fields/file.js";
|
|
8
|
-
import { FilePointer } from "@sealcode/file-manager";
|
|
9
|
-
export declare class Image extends File {
|
|
10
|
-
field: FormField<boolean, FileContainer>;
|
|
11
|
-
constructor(field: FormField<boolean, FileContainer>, options?: SimpleInputOptions);
|
|
12
|
-
getImgStyle(): Promise<string>;
|
|
13
|
-
renderFilePreview(ctx: Context, file: FilePointer | null): Promise<FlatTemplatable>;
|
|
14
|
-
getWrapperModifiers(): string[];
|
|
15
|
-
getInputAttributes(fctx: FormControlContext): Promise<{
|
|
16
|
-
accept: string;
|
|
17
|
-
onchange: string;
|
|
18
|
-
}>;
|
|
19
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { Context } from "koa";
|
|
2
|
-
import { FlatTemplatable } from "tempstream";
|
|
3
|
-
import { FormField } from "../fields/field.js";
|
|
4
|
-
import { FormDataValue } from "../form-types.js";
|
|
5
|
-
import { FormControlContext } from "./form-control.js";
|
|
6
|
-
import { FormFieldControl } from "./form-field-control.js";
|
|
7
|
-
export type SimpleInputOptions = {
|
|
8
|
-
id?: string;
|
|
9
|
-
label?: string;
|
|
10
|
-
autocomplete?: boolean;
|
|
11
|
-
hide_errors?: boolean;
|
|
12
|
-
type?: string;
|
|
13
|
-
value?: string;
|
|
14
|
-
placeholder?: string;
|
|
15
|
-
readonly?: boolean;
|
|
16
|
-
step?: number;
|
|
17
|
-
suffix?: string;
|
|
18
|
-
};
|
|
19
|
-
export declare class SimpleInput<ParsedValue, Options extends SimpleInputOptions = SimpleInputOptions> extends FormFieldControl {
|
|
20
|
-
field: FormField<boolean, ParsedValue>;
|
|
21
|
-
options: SimpleInputOptions;
|
|
22
|
-
constructor(field: FormField<boolean, ParsedValue>, options?: Options);
|
|
23
|
-
preInput(_ctx: FormControlContext, _data: Record<string, FormDataValue>): Promise<FlatTemplatable>;
|
|
24
|
-
getType(): string;
|
|
25
|
-
getLabel(): string;
|
|
26
|
-
getID(): string;
|
|
27
|
-
getPlaceholder(): string;
|
|
28
|
-
getInputAttributes(fctx: FormControlContext): Promise<Record<string, string | boolean>>;
|
|
29
|
-
postInput(_: Context): Promise<FlatTemplatable>;
|
|
30
|
-
renderInput(_ctx: Context, attributes_str: string, _data: Record<string, FormDataValue>): Promise<FlatTemplatable>;
|
|
31
|
-
getWrapperModifiers(): string[];
|
|
32
|
-
render(fctx: FormControlContext): Promise<FlatTemplatable>;
|
|
33
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { Context } from "koa";
|
|
2
|
-
import { FlatTemplatable } from "tempstream";
|
|
3
|
-
import { FormField } from "../fields/field.js";
|
|
4
|
-
import { FormDataValue } from "../form-types.js";
|
|
5
|
-
import { FormControlContext } from "./form-control.js";
|
|
6
|
-
import { FormFieldControl } from "./form-field-control.js";
|
|
7
|
-
export type SimpleInputOptions = {
|
|
8
|
-
id?: string;
|
|
9
|
-
label?: string;
|
|
10
|
-
autocomplete?: boolean;
|
|
11
|
-
hide_errors?: boolean;
|
|
12
|
-
type?: string;
|
|
13
|
-
value?: string;
|
|
14
|
-
placeholder?: string;
|
|
15
|
-
readonly?: boolean;
|
|
16
|
-
step?: number;
|
|
17
|
-
suffix?: string;
|
|
18
|
-
};
|
|
19
|
-
export declare class SimpleInput<ParsedValue, Options extends SimpleInputOptions = SimpleInputOptions> extends FormFieldControl {
|
|
20
|
-
field: FormField<boolean, ParsedValue>;
|
|
21
|
-
options: SimpleInputOptions;
|
|
22
|
-
constructor(field: FormField<boolean, ParsedValue>, options?: Options);
|
|
23
|
-
preInput(_ctx: FormControlContext, _data: Record<string, FormDataValue>): Promise<FlatTemplatable>;
|
|
24
|
-
getType(): string;
|
|
25
|
-
getLabel(): string;
|
|
26
|
-
getID(): string;
|
|
27
|
-
getPlaceholder(): string;
|
|
28
|
-
getInputAttributes(fctx: FormControlContext): Promise<Record<string, string | boolean>>;
|
|
29
|
-
postInput(_: Context): Promise<FlatTemplatable>;
|
|
30
|
-
renderInput(_ctx: Context, attributes_str: string, _data: Record<string, FormDataValue>): Promise<FlatTemplatable>;
|
|
31
|
-
getWrapperModifiers(): string[];
|
|
32
|
-
render(fctx: FormControlContext): Promise<FlatTemplatable>;
|
|
33
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { Context } from "koa";
|
|
2
|
-
import { FlatTemplatable } from "tempstream";
|
|
3
|
-
import { FormField } from "../fields/field.js";
|
|
4
|
-
import { FormDataValue } from "../form-types.js";
|
|
5
|
-
import { FormControlContext } from "./form-control.js";
|
|
6
|
-
import { FormFieldControl } from "./form-field-control.js";
|
|
7
|
-
export type SimpleInputOptions = {
|
|
8
|
-
id?: string;
|
|
9
|
-
label?: string;
|
|
10
|
-
autocomplete?: boolean;
|
|
11
|
-
hide_errors?: boolean;
|
|
12
|
-
type?: string;
|
|
13
|
-
value?: string;
|
|
14
|
-
placeholder?: string;
|
|
15
|
-
readonly?: boolean;
|
|
16
|
-
step?: number;
|
|
17
|
-
suffix?: string;
|
|
18
|
-
};
|
|
19
|
-
export declare class SimpleInput<ParsedValue, Options extends SimpleInputOptions = SimpleInputOptions> extends FormFieldControl {
|
|
20
|
-
field: FormField<boolean, ParsedValue>;
|
|
21
|
-
options: SimpleInputOptions;
|
|
22
|
-
constructor(field: FormField<boolean, ParsedValue>, options?: Options);
|
|
23
|
-
preInput(_ctx: FormControlContext, _data: Record<string, FormDataValue>): Promise<FlatTemplatable>;
|
|
24
|
-
getType(): string;
|
|
25
|
-
getLabel(): string;
|
|
26
|
-
getID(): string;
|
|
27
|
-
getPlaceholder(): string;
|
|
28
|
-
getInputAttributes(fctx: FormControlContext): Promise<Record<string, string | boolean>>;
|
|
29
|
-
postInput(_: Context): Promise<FlatTemplatable>;
|
|
30
|
-
renderInput(_ctx: Context, attributes_str: string, _data: Record<string, FormDataValue>): Promise<FlatTemplatable>;
|
|
31
|
-
getWrapperModifiers(): string[];
|
|
32
|
-
render(fctx: FormControlContext): Promise<FlatTemplatable>;
|
|
33
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import Router from "@koa/router";
|
|
2
|
-
import { Context } from "koa";
|
|
3
|
-
import { FlatTemplatable } from "tempstream";
|
|
4
|
-
import { FormField } from "../fields/field.js";
|
|
5
|
-
import { Table as TableField } from "../fields/table.js";
|
|
6
|
-
import { Form } from "../form.js";
|
|
7
|
-
import { FormControl, FormControlContext } from "./form-control.js";
|
|
8
|
-
export type TableControlOptions<F extends Record<string, FormField>> = {
|
|
9
|
-
render_fields: {
|
|
10
|
-
[field_name in keyof F]: (fctx: FormControlContext, name: string, value: string) => FlatTemplatable | Promise<FlatTemplatable>;
|
|
11
|
-
};
|
|
12
|
-
allow_removing?: boolean;
|
|
13
|
-
label_add?: string;
|
|
14
|
-
label: string;
|
|
15
|
-
label_remove?: string;
|
|
16
|
-
} & ({
|
|
17
|
-
allow_adding: false;
|
|
18
|
-
} | {
|
|
19
|
-
allow_adding: true;
|
|
20
|
-
make_new_row: (ctx: Context) => Promise<{
|
|
21
|
-
[field_name in keyof F]: unknown;
|
|
22
|
-
}>;
|
|
23
|
-
});
|
|
24
|
-
export declare const TABLE_COLUMN_FIELD_INDEX_PLACEHOLDER = "____$$$$";
|
|
25
|
-
export declare class Table<F extends Record<string, FormField>> extends FormControl {
|
|
26
|
-
table_field: TableField<F>;
|
|
27
|
-
options: TableControlOptions<F>;
|
|
28
|
-
role: "input";
|
|
29
|
-
constructor(table_field: TableField<F>, options: TableControlOptions<F>);
|
|
30
|
-
render(fctx: FormControlContext): Promise<FlatTemplatable>;
|
|
31
|
-
getFrameID(): string;
|
|
32
|
-
getActionURL(field_name: string, action: Record<string, unknown>): string;
|
|
33
|
-
mount(router: Router, form: Form<any, any>): void;
|
|
34
|
-
setAllowRemoving(value: boolean): this;
|
|
35
|
-
setAllowAdding(value: boolean): this;
|
|
36
|
-
setLabel(value: string): this;
|
|
37
|
-
setRemoveLabel(value: string): this;
|
|
38
|
-
setAddLabel(value: string): this;
|
|
39
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import Router from "@koa/router";
|
|
2
|
-
import { Context } from "koa";
|
|
3
|
-
import { FlatTemplatable } from "tempstream";
|
|
4
|
-
import { FormField } from "../fields/field.js";
|
|
5
|
-
import { Table as TableField } from "../fields/table.js";
|
|
6
|
-
import { Form } from "../form.js";
|
|
7
|
-
import { FormControl, FormControlContext } from "./form-control.js";
|
|
8
|
-
export type TableControlOptions<F extends Record<string, FormField>> = {
|
|
9
|
-
render_fields: {
|
|
10
|
-
[field_name in keyof F]: (fctx: FormControlContext, name: string, value: string) => FlatTemplatable | Promise<FlatTemplatable>;
|
|
11
|
-
};
|
|
12
|
-
allow_removing?: boolean;
|
|
13
|
-
label_add?: string;
|
|
14
|
-
label: string;
|
|
15
|
-
label_remove?: string;
|
|
16
|
-
} & ({
|
|
17
|
-
allow_adding: false;
|
|
18
|
-
} | {
|
|
19
|
-
allow_adding: true;
|
|
20
|
-
make_new_row: (ctx: Context) => Promise<{
|
|
21
|
-
[field_name in keyof F]: unknown;
|
|
22
|
-
}>;
|
|
23
|
-
});
|
|
24
|
-
export declare const TABLE_COLUMN_FIELD_INDEX_PLACEHOLDER = "____$$$$";
|
|
25
|
-
export declare class Table<F extends Record<string, FormField>> extends FormControl {
|
|
26
|
-
table_field: TableField<F>;
|
|
27
|
-
options: TableControlOptions<F>;
|
|
28
|
-
role: "input";
|
|
29
|
-
constructor(table_field: TableField<F>, options: TableControlOptions<F>);
|
|
30
|
-
render(fctx: FormControlContext): Promise<FlatTemplatable>;
|
|
31
|
-
getFrameID(): string;
|
|
32
|
-
getActionURL(field_name: string, action: Record<string, unknown>): string;
|
|
33
|
-
mount(router: Router, form: Form<any, any>): void;
|
|
34
|
-
setAllowRemoving(value: boolean): this;
|
|
35
|
-
setAllowAdding(value: boolean): this;
|
|
36
|
-
setLabel(value: string): this;
|
|
37
|
-
setRemoveLabel(value: string): this;
|
|
38
|
-
setAddLabel(value: string): this;
|
|
39
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Context } from "koa";
|
|
2
|
-
import { FormField } from "../fields/field.js";
|
|
3
|
-
import { FormDataValue } from "../form-types.js";
|
|
4
|
-
import { FormControlContext } from "./form-control.js";
|
|
5
|
-
import { SimpleInput, SimpleInputOptions } from "./simple-input.js";
|
|
6
|
-
export declare class Textarea extends SimpleInput<string | null> {
|
|
7
|
-
field: FormField<boolean, string | null>;
|
|
8
|
-
options: SimpleInputOptions & {
|
|
9
|
-
label?: string;
|
|
10
|
-
rows?: number;
|
|
11
|
-
cols?: number;
|
|
12
|
-
description?: string;
|
|
13
|
-
autogrow?: boolean;
|
|
14
|
-
};
|
|
15
|
-
constructor(field: FormField<boolean, string | null>, options?: SimpleInputOptions & {
|
|
16
|
-
label?: string;
|
|
17
|
-
rows?: number;
|
|
18
|
-
cols?: number;
|
|
19
|
-
description?: string;
|
|
20
|
-
autogrow?: boolean;
|
|
21
|
-
});
|
|
22
|
-
renderDescription(): string;
|
|
23
|
-
getInputAttributes(fctx: FormControlContext): Promise<Record<string, string | boolean>>;
|
|
24
|
-
renderInput(ctx: Context, attributes: string, data: Record<string, FormDataValue>): Promise<string>;
|
|
25
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Context } from "koa";
|
|
2
|
-
import { Checkbox } from "../controls/checkbox.js";
|
|
3
|
-
import { FormDataValue } from "../form-types.js";
|
|
4
|
-
import { FieldParseResult, FormField } from "./field.js";
|
|
5
|
-
import { FormControlContext } from "../controls/form-control.js";
|
|
6
|
-
export declare class Boolean<Required extends boolean> extends FormField<Required, boolean, Checkbox> {
|
|
7
|
-
error_message: string;
|
|
8
|
-
predicate: (v: unknown, w: unknown) => {
|
|
9
|
-
readonly match: boolean;
|
|
10
|
-
readonly wildcard: boolean;
|
|
11
|
-
};
|
|
12
|
-
constructor(required: Required, error_message?: string);
|
|
13
|
-
isValueValid(_: Context, value: boolean): Promise<{
|
|
14
|
-
valid: boolean;
|
|
15
|
-
message: string;
|
|
16
|
-
}>;
|
|
17
|
-
parse(_: Context, value: FormDataValue): Promise<FieldParseResult<boolean>>;
|
|
18
|
-
getEmptyValue(): boolean;
|
|
19
|
-
getControl(): Checkbox;
|
|
20
|
-
getSealiousCreateValue(fctx: FormControlContext): Promise<boolean>;
|
|
21
|
-
sealiousValueToForm(_: Context, value: boolean | null): Promise<FormDataValue>;
|
|
22
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Context } from "koa";
|
|
2
|
-
import { Checkbox } from "../controls/checkbox.js";
|
|
3
|
-
import { FormDataValue } from "../form-types.js";
|
|
4
|
-
import { FieldParseResult, FormField } from "./field.js";
|
|
5
|
-
import { FormControlContext } from "../controls/form-control.js";
|
|
6
|
-
export declare class Boolean<Required extends boolean> extends FormField<Required, boolean, Checkbox> {
|
|
7
|
-
error_message: string;
|
|
8
|
-
predicate: (v: unknown, w: unknown) => {
|
|
9
|
-
readonly match: boolean;
|
|
10
|
-
readonly wildcard: boolean;
|
|
11
|
-
};
|
|
12
|
-
constructor(required: Required, error_message?: string);
|
|
13
|
-
isValueValid(_: Context, value: boolean): Promise<{
|
|
14
|
-
valid: boolean;
|
|
15
|
-
message: string;
|
|
16
|
-
}>;
|
|
17
|
-
parse(_: Context, value: FormDataValue): Promise<FieldParseResult<boolean>>;
|
|
18
|
-
getEmptyValue(): boolean;
|
|
19
|
-
getControl(): Checkbox;
|
|
20
|
-
getSealiousCreateValue(fctx: FormControlContext): Promise<boolean>;
|
|
21
|
-
sealiousValueToForm(_: Context, value: boolean | null): Promise<FormDataValue>;
|
|
22
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Context } from "koa";
|
|
2
|
-
import { CheckboxedListInput } from "../controls/checkboxed-list-input.js";
|
|
3
|
-
import { FormDataValue } from "../form-types.js";
|
|
4
|
-
import { FieldParseResult, FormField, FormFieldValidationResponse } from "./field.js";
|
|
5
|
-
export type CheckboxedListItem = {
|
|
6
|
-
value: string;
|
|
7
|
-
label?: string;
|
|
8
|
-
group?: string;
|
|
9
|
-
};
|
|
10
|
-
export declare class CheckboxedListField<Required extends boolean, Values extends string> extends FormField<Required, Record<Values, "on">, CheckboxedListInput<Values>> {
|
|
11
|
-
required: Required;
|
|
12
|
-
generateOptions: (ctx: Context) => Promise<CheckboxedListItem[]>;
|
|
13
|
-
isVisible: (ctx: Context) => Promise<boolean>;
|
|
14
|
-
constructor(required: Required, generateOptions: (ctx: Context) => Promise<CheckboxedListItem[]>, isVisible?: (ctx: Context) => Promise<boolean>);
|
|
15
|
-
predicate: (v: unknown, w: unknown) => {
|
|
16
|
-
readonly match: boolean;
|
|
17
|
-
readonly wildcard: string[];
|
|
18
|
-
};
|
|
19
|
-
isValueValid(_: Context, value: unknown): Promise<FormFieldValidationResponse>;
|
|
20
|
-
parse(_: Context, raw_value: FormDataValue): Promise<FieldParseResult<Record<string, "on">>>;
|
|
21
|
-
getEmptyValue(): Record<string, "on">;
|
|
22
|
-
getControl(): CheckboxedListInput<Values>;
|
|
23
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Context } from "koa";
|
|
2
|
-
import { ExtractFieldDecoded, Field } from "sealious";
|
|
3
|
-
import { SimpleInput } from "../controls/controls.js";
|
|
4
|
-
import { FormDataValue } from "../form-types.js";
|
|
5
|
-
import { FieldParseResult, FormField, FormFieldValidationResponse } from "./field.js";
|
|
6
|
-
import { ExtractedFieldInfo } from "../../utils/extract-fields-from-collection.js";
|
|
7
|
-
export declare class CollectionField<F extends Field<any>, Required extends boolean> extends FormField<Required, ExtractFieldDecoded<F> | null, SimpleInput<unknown>> {
|
|
8
|
-
sealiousField: F;
|
|
9
|
-
constructor(required: Required, sealiousField: F);
|
|
10
|
-
predicate: (v: unknown, w: unknown) => {
|
|
11
|
-
readonly match: true;
|
|
12
|
-
readonly wildcard: unknown;
|
|
13
|
-
};
|
|
14
|
-
parse(ctx: Context, raw_value: FormDataValue): Promise<FieldParseResult<ExtractFieldDecoded<F> | null>>;
|
|
15
|
-
isValueValid(ctx: Context, value: ExtractFieldDecoded<F>): Promise<FormFieldValidationResponse>;
|
|
16
|
-
getEmptyValue(): ExtractFieldDecoded<F>;
|
|
17
|
-
getControl(): SimpleInput<unknown>;
|
|
18
|
-
generateFieldDeclaration(field_info: ExtractedFieldInfo, vars: {
|
|
19
|
-
form_field_types: string;
|
|
20
|
-
sealious_field: string;
|
|
21
|
-
}): string;
|
|
22
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Context } from "koa";
|
|
2
|
-
import { ExtractFieldDecoded, Field } from "sealious";
|
|
3
|
-
import { SimpleInput } from "../controls/controls.js";
|
|
4
|
-
import { FormDataValue } from "../form-types.js";
|
|
5
|
-
import { FieldParseResult, FormField, FormFieldValidationResponse } from "./field.js";
|
|
6
|
-
import { ExtractedFieldInfo } from "../../utils/extract-fields-from-collection.js";
|
|
7
|
-
export declare class CollectionField<F extends Field<any>, Required extends boolean> extends FormField<Required, ExtractFieldDecoded<F> | null, SimpleInput<unknown>> {
|
|
8
|
-
sealiousField: F;
|
|
9
|
-
constructor(required: Required, sealiousField: F);
|
|
10
|
-
predicate: (v: unknown, w: unknown) => {
|
|
11
|
-
readonly match: true;
|
|
12
|
-
readonly wildcard: unknown;
|
|
13
|
-
};
|
|
14
|
-
parse(ctx: Context, raw_value: FormDataValue): Promise<FieldParseResult<ExtractFieldDecoded<F> | null>>;
|
|
15
|
-
isValueValid(ctx: Context, value: ExtractFieldDecoded<F>): Promise<FormFieldValidationResponse>;
|
|
16
|
-
getEmptyValue(): ExtractFieldDecoded<F>;
|
|
17
|
-
getControl(): SimpleInput<unknown>;
|
|
18
|
-
generateFieldDeclaration(field_info: ExtractedFieldInfo, vars: {
|
|
19
|
-
form_field_types: string;
|
|
20
|
-
sealious_field: string;
|
|
21
|
-
}): string;
|
|
22
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Context } from "koa";
|
|
2
|
-
import { FormControl, FormControlContext } from "../controls/form-control.js";
|
|
3
|
-
import { SimpleInput } from "../controls/simple-input.js";
|
|
4
|
-
import { FormDataValue } from "../form-types.js";
|
|
5
|
-
import { FieldParseResult } from "./field.js";
|
|
6
|
-
import { SimpleFormField } from "./simple-form-field.js";
|
|
7
|
-
export declare class Coordinates<Required extends boolean, DefaultControl extends FormControl = SimpleInput<[number, number] | null>> extends SimpleFormField<Required, DefaultControl, [number, number]> {
|
|
8
|
-
parse(_: Context, raw_value: FormDataValue): Promise<FieldParseResult<[number, number]>>;
|
|
9
|
-
getSealiousCreateValue(fctx: FormControlContext): Promise<[number, number] | undefined>;
|
|
10
|
-
postSealiousCreate(): Promise<void>;
|
|
11
|
-
postSealiousEdit(): Promise<void>;
|
|
12
|
-
getControl(): DefaultControl;
|
|
13
|
-
getEmptyValue(): [number, number];
|
|
14
|
-
}
|