@sealcode/sealgen 0.8.31 → 0.8.33
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/forms/controls/autocomplete.d.ts +2 -2
- package/@types/forms/controls/big-radio-group.d.ts +4 -5
- package/@types/forms/controls/checkbox-group.d.ts +3 -4
- package/@types/forms/controls/checkboxed-list-input.d.ts +2 -3
- package/@types/forms/controls/collapsible-checkbox-group.d.ts +2 -3
- package/@types/forms/controls/controls.d.ts +2 -1
- package/@types/forms/controls/derived-frame.d.ts +21 -0
- package/@types/forms/controls/derived.d.ts +6 -6
- package/@types/forms/controls/dropdown.d.ts +23 -14
- package/@types/forms/controls/editable-collection-subset.d.ts +2 -3
- package/@types/forms/controls/field-group.d.ts +2 -4
- package/@types/forms/controls/file.d.ts +3 -2
- package/@types/forms/controls/form-control.d.ts +10 -1
- package/@types/forms/controls/form-field-control.d.ts +3 -4
- package/@types/forms/controls/form-header.d.ts +4 -4
- package/@types/forms/controls/hidden-input.d.ts +2 -3
- package/@types/forms/controls/html.d.ts +3 -4
- package/@types/forms/controls/multiple-files.d.ts +3 -3
- package/@types/forms/controls/number.d.ts +2 -3
- package/@types/forms/controls/photo.d.ts +2 -2
- package/@types/forms/controls/simple-input.d.ts +5 -4
- package/@types/forms/controls/textarea.d.ts +2 -1
- package/@types/forms/controls/tickable.d.ts +2 -1
- package/@types/forms/fields/pick-from-list.d.ts +3 -6
- package/@types/page/mountable-with-fields.d.ts +3 -2
- package/lib/forms/controls/autocomplete.js +3 -3
- package/lib/forms/controls/autocomplete.js.map +1 -1
- package/lib/forms/controls/big-radio-group.js +4 -4
- package/lib/forms/controls/big-radio-group.js.map +1 -1
- package/lib/forms/controls/checkbox-group.js +5 -5
- package/lib/forms/controls/checkbox-group.js.map +1 -1
- package/lib/forms/controls/checkboxed-list-input.js +4 -4
- package/lib/forms/controls/checkboxed-list-input.js.map +1 -1
- package/lib/forms/controls/collapsible-checkbox-group.js +2 -2
- package/lib/forms/controls/collapsible-checkbox-group.js.map +1 -1
- package/lib/forms/controls/controls.js +3 -3
- package/lib/forms/controls/controls.js.map +1 -1
- package/lib/forms/controls/derived-frame.js +57 -0
- package/lib/forms/controls/derived-frame.js.map +1 -0
- package/lib/forms/controls/derived.js +15 -16
- package/lib/forms/controls/derived.js.map +1 -1
- package/lib/forms/controls/dropdown.js +23 -9
- package/lib/forms/controls/dropdown.js.map +1 -1
- package/lib/forms/controls/editable-collection-subset.js +6 -6
- package/lib/forms/controls/editable-collection-subset.js.map +1 -1
- package/lib/forms/controls/field-group.js +2 -2
- package/lib/forms/controls/field-group.js.map +1 -1
- package/lib/forms/controls/file.js +4 -4
- package/lib/forms/controls/file.js.map +1 -1
- package/lib/forms/controls/form-control.js +12 -1
- package/lib/forms/controls/form-control.js.map +1 -1
- package/lib/forms/controls/form-field-control.js.map +1 -1
- package/lib/forms/controls/form-header.js +2 -2
- package/lib/forms/controls/form-header.js.map +1 -1
- package/lib/forms/controls/hidden-input.js +3 -3
- package/lib/forms/controls/hidden-input.js.map +1 -1
- package/lib/forms/controls/html.js +2 -2
- package/lib/forms/controls/html.js.map +1 -1
- package/lib/forms/controls/multiple-files.js +4 -4
- package/lib/forms/controls/multiple-files.js.map +1 -1
- package/lib/forms/controls/number.js +2 -2
- package/lib/forms/controls/number.js.map +1 -1
- package/lib/forms/controls/photo.js +3 -3
- package/lib/forms/controls/photo.js.map +1 -1
- package/lib/forms/controls/simple-input.js +11 -12
- package/lib/forms/controls/simple-input.js.map +1 -1
- package/lib/forms/controls/textarea.js +2 -2
- package/lib/forms/controls/textarea.js.map +1 -1
- package/lib/forms/controls/tickable.js +11 -9
- package/lib/forms/controls/tickable.js.map +1 -1
- package/lib/forms/fields/field.js +1 -1
- package/lib/forms/fields/field.js.map +1 -1
- package/lib/forms/fields/pick-from-list.js +1 -1
- package/lib/forms/fields/pick-from-list.js.map +1 -1
- package/lib/forms/form.js +1 -1
- package/lib/forms/form.js.map +1 -1
- package/lib/page/list.js +1 -1
- package/lib/page/list.js.map +1 -1
- package/lib/page/mountable-with-fields.js +6 -2
- package/lib/page/mountable-with-fields.js.map +1 -1
- package/package.json +1 -1
- package/src/forms/controls/autocomplete.ts +5 -14
- package/src/forms/controls/big-radio-group.ts +9 -28
- package/src/forms/controls/checkbox-group.ts +10 -31
- package/src/forms/controls/checkboxed-list-input.ts +8 -4
- package/src/forms/controls/collapsible-checkbox-group.ts +4 -15
- package/src/forms/controls/controls.ts +2 -1
- package/src/forms/controls/derived-frame.ts +92 -0
- package/src/forms/controls/derived.ts +19 -18
- package/src/forms/controls/dropdown.ts +41 -29
- package/src/forms/controls/editable-collection-subset.ts +25 -25
- package/src/forms/controls/field-group.ts +3 -19
- package/src/forms/controls/file.ts +5 -12
- package/src/forms/controls/form-control.ts +12 -6
- package/src/forms/controls/form-field-control.ts +2 -7
- package/src/forms/controls/form-header.ts +6 -3
- package/src/forms/controls/hidden-input.ts +6 -6
- package/src/forms/controls/html.ts +4 -9
- package/src/forms/controls/multiple-files.ts +5 -10
- package/src/forms/controls/number.ts +3 -10
- package/src/forms/controls/photo.ts +7 -14
- package/src/forms/controls/simple-input.ts +21 -34
- package/src/forms/controls/textarea.ts +6 -14
- package/src/forms/controls/tickable.ts +15 -14
- package/src/forms/fields/field.ts +1 -1
- package/src/forms/fields/pick-from-list.ts +3 -4
- package/src/forms/form.ts +3 -1
- package/src/page/list.ts +7 -1
- package/src/page/mountable-with-fields.ts +23 -14
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Context } from "koa";
|
|
2
2
|
import { PickFromListField } from "../fields/pick-from-list";
|
|
3
|
-
import {
|
|
3
|
+
import { FormControlContext } from "./form-control";
|
|
4
4
|
import { SimpleInput } from "./simple-input";
|
|
5
5
|
export declare class Autocomplete extends SimpleInput<string | null> {
|
|
6
6
|
field: PickFromListField<boolean>;
|
|
@@ -15,7 +15,7 @@ export declare class Autocomplete extends SimpleInput<string | null> {
|
|
|
15
15
|
placeholder?: string;
|
|
16
16
|
});
|
|
17
17
|
getListID(): string;
|
|
18
|
-
getInputAttributes(
|
|
18
|
+
getInputAttributes(fctx: FormControlContext): Promise<{
|
|
19
19
|
list: string;
|
|
20
20
|
}>;
|
|
21
21
|
postInput(ctx: Context): Promise<string>;
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { Context } from "koa";
|
|
2
1
|
import { FlatTemplatable } from "tempstream";
|
|
3
2
|
import { FormField } from "../fields/field";
|
|
4
|
-
import {
|
|
3
|
+
import { FormControlContext } from "./form-control";
|
|
5
4
|
import { FormFieldControl } from "./form-field-control";
|
|
6
5
|
export declare class BigRadioGroup extends FormFieldControl {
|
|
7
6
|
field: FormField;
|
|
8
7
|
options: Record<string, {
|
|
9
|
-
description: FlatTemplatable | ((
|
|
8
|
+
description: FlatTemplatable | ((fctx: FormControlContext) => FlatTemplatable);
|
|
10
9
|
}>;
|
|
11
10
|
constructor(field: FormField, options: Record<string, {
|
|
12
|
-
description: FlatTemplatable | ((
|
|
11
|
+
description: FlatTemplatable | ((fctx: FormControlContext) => FlatTemplatable);
|
|
13
12
|
}>);
|
|
14
|
-
render(
|
|
13
|
+
render(fctx: FormControlContext): Promise<FlatTemplatable>;
|
|
15
14
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { Context } from "koa";
|
|
2
1
|
import { FlatTemplatable } from "tempstream";
|
|
3
2
|
import { EnumMultipleField, FormField } from "../fields/field";
|
|
4
|
-
import { FormDataValue, FormMessage } from "../form";
|
|
5
3
|
import { CheckboxWithValue } from "./checkbox";
|
|
6
4
|
import { FormFieldControl } from "./controls";
|
|
5
|
+
import { FormControlContext } from "./form-control";
|
|
7
6
|
export declare type DefaultCheckboxOptions = {
|
|
8
7
|
id?: string;
|
|
9
8
|
label?: string;
|
|
@@ -17,6 +16,6 @@ export declare class CheckboxGroup<Options extends DefaultCheckboxOptions = Defa
|
|
|
17
16
|
field: EnumMultipleField<readonly string[], boolean>;
|
|
18
17
|
options: Options;
|
|
19
18
|
constructor(field: EnumMultipleField<readonly string[], boolean>, options?: Options);
|
|
20
|
-
wrapGroup(
|
|
21
|
-
render<Fields extends Record<string, FormField>>(
|
|
19
|
+
wrapGroup(fctx: FormControlContext, checkboxes: CheckboxWithValue[]): Promise<FlatTemplatable>;
|
|
20
|
+
render<Fields extends Record<string, FormField>>(fctx: FormControlContext): Promise<FlatTemplatable>;
|
|
22
21
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import { Context } from "koa";
|
|
3
2
|
import { ChekboxedListField } from "../fields/field";
|
|
4
|
-
import { FormDataValue } from "../form";
|
|
5
3
|
import { FormFieldControl } from "./controls";
|
|
4
|
+
import { FormControlContext } from "./form-control";
|
|
6
5
|
export declare class CheckboxedListInput extends FormFieldControl {
|
|
7
6
|
field: ChekboxedListField<boolean>;
|
|
8
7
|
options: {
|
|
@@ -11,5 +10,5 @@ export declare class CheckboxedListInput extends FormFieldControl {
|
|
|
11
10
|
constructor(field: ChekboxedListField<boolean>, options?: {
|
|
12
11
|
label: string;
|
|
13
12
|
});
|
|
14
|
-
render(
|
|
13
|
+
render(fctx: FormControlContext): Promise<import("stream").Readable>;
|
|
15
14
|
}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { Context } from "koa";
|
|
2
1
|
import { FlatTemplatable } from "tempstream";
|
|
3
|
-
import { FormDataValue, FormMessage } from "../form";
|
|
4
2
|
import { CheckboxWithValue } from "./checkbox";
|
|
5
3
|
import { CheckboxGroup, DefaultCheckboxOptions } from "./checkbox-group";
|
|
4
|
+
import { FormControlContext } from "./form-control";
|
|
6
5
|
export declare class CollapsibleCheckboxGroup extends CheckboxGroup<DefaultCheckboxOptions & {
|
|
7
6
|
textWhenOpen?: string;
|
|
8
7
|
textWhenClosed?: string;
|
|
9
8
|
groupID?: string;
|
|
10
9
|
}> {
|
|
11
|
-
wrapGroup(
|
|
10
|
+
wrapGroup(fctx: FormControlContext, checkboxes: CheckboxWithValue[]): Promise<FlatTemplatable>;
|
|
12
11
|
}
|
|
@@ -3,7 +3,7 @@ export { FormFieldControl } from "./form-field-control";
|
|
|
3
3
|
export { EditableCollectionSubset } from "./editable-collection-subset";
|
|
4
4
|
export { Frame } from "./frame";
|
|
5
5
|
export { CheckboxedListInput } from "./checkboxed-list-input";
|
|
6
|
-
export
|
|
6
|
+
export * from "./dropdown";
|
|
7
7
|
export { SimpleInput } from "./simple-input";
|
|
8
8
|
export { FormHeader } from "./form-header";
|
|
9
9
|
export { FormParagraph } from "./form-paragraph";
|
|
@@ -12,6 +12,7 @@ export { HiddenInput } from "./hidden-input";
|
|
|
12
12
|
export { Textarea } from "./textarea";
|
|
13
13
|
export { FieldGroup } from "./field-group";
|
|
14
14
|
export * from "./derived";
|
|
15
|
+
export * from "./derived-frame";
|
|
15
16
|
export * from "./tickable";
|
|
16
17
|
export * from "./checkbox";
|
|
17
18
|
export * from "./radio";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/// <reference types="koa__router" />
|
|
3
|
+
import Router from "@koa/router";
|
|
4
|
+
import { Context } from "koa";
|
|
5
|
+
import { ParsedUrlQuery } from "querystring";
|
|
6
|
+
import { FlatTemplatable } from "tempstream";
|
|
7
|
+
import { FormField } from "../fields/field";
|
|
8
|
+
import { Derived } from "./derived";
|
|
9
|
+
import { FormControlContext } from "./form-control";
|
|
10
|
+
export declare class DerivedFrame extends Derived<{
|
|
11
|
+
frame_id: string;
|
|
12
|
+
form_id: string;
|
|
13
|
+
field_name_prefix: string;
|
|
14
|
+
}> {
|
|
15
|
+
frame_name: string;
|
|
16
|
+
generateFrameContent: (ctx: FormControlContext, args: ParsedUrlQuery) => Promise<FlatTemplatable>;
|
|
17
|
+
frame_id: string;
|
|
18
|
+
constructor(frame_name: string, fields: FormField[], generateFrameContent: (ctx: FormControlContext, args: ParsedUrlQuery) => Promise<FlatTemplatable>, frame_id?: string);
|
|
19
|
+
renderBackendResponseFrame(_ctx: Context, content: FlatTemplatable): import("stream").Readable;
|
|
20
|
+
mount(router: Router): void;
|
|
21
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { FlatTemplatable } from "tempstream";
|
|
2
2
|
import { FormField } from "../fields/field";
|
|
3
|
-
import { FormControl } from "./form-control";
|
|
4
|
-
export declare class Derived<Consts extends Record<string, unknown
|
|
3
|
+
import { FormControl, FormControlContext } from "./form-control";
|
|
4
|
+
export declare class Derived<Consts extends Record<string, unknown | undefined>> extends FormControl {
|
|
5
5
|
fields: FormField[];
|
|
6
|
-
_render: (values: Record<string, string>, consts: Consts) =>
|
|
7
|
-
|
|
6
|
+
_render: (values: Record<string, string>, consts: Consts) => Promise<FlatTemplatable>;
|
|
7
|
+
getConsts: (fctx: FormControlContext) => Promise<Consts>;
|
|
8
8
|
role: "decoration";
|
|
9
|
-
constructor(fields: FormField[], _render: (values: Record<string, string>, consts: Consts) =>
|
|
10
|
-
render(): FlatTemplatable
|
|
9
|
+
constructor(fields: FormField[], _render: (values: Record<string, string>, consts: Consts) => Promise<FlatTemplatable>, getConsts: (fctx: FormControlContext) => Promise<Consts>);
|
|
10
|
+
render(fctx: FormControlContext): Promise<FlatTemplatable>;
|
|
11
11
|
}
|
|
@@ -1,20 +1,29 @@
|
|
|
1
1
|
import { Context } from "koa";
|
|
2
2
|
import { FlatTemplatable } from "tempstream";
|
|
3
|
-
import { PickFromListField } from "../fields/field";
|
|
3
|
+
import { FormField, PickFromListField } from "../fields/field";
|
|
4
4
|
import { FormDataValue } from "../form";
|
|
5
|
+
import { FormControlContext } from "./form-control";
|
|
5
6
|
import { SimpleInput } from "./simple-input";
|
|
6
|
-
export declare
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
7
|
+
export declare type DropdownOptions = {
|
|
8
|
+
label: string;
|
|
9
|
+
autosubmit?: boolean;
|
|
10
|
+
autocomplete?: boolean;
|
|
11
|
+
};
|
|
12
|
+
export declare type DropdownOption = {
|
|
13
|
+
value: string;
|
|
14
|
+
label: string;
|
|
15
|
+
};
|
|
16
|
+
export declare class FreeformDropdown extends SimpleInput<string | null> {
|
|
17
|
+
field: FormField<boolean, string | null>;
|
|
18
|
+
_generateOptions: (ctx: Context) => Promise<DropdownOption[]>;
|
|
19
|
+
options: DropdownOptions;
|
|
20
|
+
constructor(field: FormField<boolean, string | null>, _generateOptions: (ctx: Context) => Promise<DropdownOption[]>, options?: DropdownOptions);
|
|
21
|
+
generateOptions(ctx: Context): Promise<DropdownOption[]>;
|
|
22
|
+
getInputAttributes(fctx: FormControlContext): Promise<Record<string, string | boolean>>;
|
|
19
23
|
renderInput(ctx: Context, attributes_str: string, data: Record<string, FormDataValue>): Promise<FlatTemplatable>;
|
|
20
24
|
}
|
|
25
|
+
export declare class Dropdown extends FreeformDropdown {
|
|
26
|
+
field: PickFromListField<boolean>;
|
|
27
|
+
options: DropdownOptions;
|
|
28
|
+
constructor(field: PickFromListField<boolean>, options?: DropdownOptions);
|
|
29
|
+
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { Context } from "koa";
|
|
2
1
|
import { FlatTemplatable } from "tempstream";
|
|
3
2
|
import { PickFromListField } from "../fields/field";
|
|
4
|
-
import { FormDataValue } from "../form";
|
|
5
3
|
import { FormFieldControl } from "./controls";
|
|
4
|
+
import { FormControlContext } from "./form-control";
|
|
6
5
|
/**
|
|
7
6
|
* This control has own forms in it so if you want to use it you
|
|
8
7
|
* probably shouldn't use `await super.render(ctx, data, path)` in
|
|
@@ -16,6 +15,6 @@ export declare class EditableCollectionSubset extends FormFieldControl {
|
|
|
16
15
|
listLabel?: string | undefined;
|
|
17
16
|
selectLabel?: string | undefined;
|
|
18
17
|
constructor(field: PickFromListField<false>, actionname: string, listLabel?: string | undefined, selectLabel?: string | undefined);
|
|
19
|
-
render(
|
|
18
|
+
render(fctx: FormControlContext): Promise<FlatTemplatable>;
|
|
20
19
|
role: "input";
|
|
21
20
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { Context } from "koa";
|
|
2
1
|
import { FlatTemplatable } from "tempstream";
|
|
3
|
-
import {
|
|
4
|
-
import { FormControl } from "./form-control";
|
|
2
|
+
import { FormControl, FormControlContext } from "./form-control";
|
|
5
3
|
import { FormFieldControl } from "./form-field-control";
|
|
6
4
|
export declare class FieldGroup extends FormFieldControl {
|
|
7
5
|
controls: FormControl[];
|
|
@@ -21,5 +19,5 @@ export declare class FieldGroup extends FormFieldControl {
|
|
|
21
19
|
preFields(): FlatTemplatable;
|
|
22
20
|
postFields(): FlatTemplatable;
|
|
23
21
|
getGroupLabelProps(): FlatTemplatable;
|
|
24
|
-
render(
|
|
22
|
+
render(fctx: FormControlContext): Promise<FlatTemplatable>;
|
|
25
23
|
}
|
|
@@ -3,13 +3,14 @@ import { Context } from "koa";
|
|
|
3
3
|
import { FlatTemplatable } from "tempstream";
|
|
4
4
|
import { FileContainer } from "../fields/file";
|
|
5
5
|
import { FormDataValue } from "../form";
|
|
6
|
+
import { FormControlContext } from "./form-control";
|
|
6
7
|
import { SimpleInput } from "./simple-input";
|
|
7
8
|
export declare class File extends SimpleInput<FileContainer> {
|
|
8
9
|
getType(): string;
|
|
9
|
-
renderFilePreview(
|
|
10
|
+
renderFilePreview(_ctx: Context, file_data: {
|
|
10
11
|
id?: string;
|
|
11
12
|
filename?: string;
|
|
12
13
|
} | null): Promise<FlatTemplatable>;
|
|
13
14
|
preInput(ctx: Context, data: Record<string, FormDataValue>): Promise<import("stream").Readable>;
|
|
14
|
-
getInputAttributes(
|
|
15
|
+
getInputAttributes(fctx: FormControlContext): Promise<Record<string, string | boolean>>;
|
|
15
16
|
}
|
|
@@ -3,8 +3,17 @@ import Router from "@koa/router";
|
|
|
3
3
|
import { Context } from "koa";
|
|
4
4
|
import { FlatTemplatable } from "tempstream";
|
|
5
5
|
import { FormDataValue, FormMessage } from "../form";
|
|
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
|
+
}
|
|
6
15
|
export declare abstract class FormControl {
|
|
7
|
-
abstract render(
|
|
16
|
+
abstract render(fctx: FormControlContext): FlatTemplatable | Promise<FlatTemplatable>;
|
|
8
17
|
abstract role: "input" | "decoration" | "messages" | "submit";
|
|
9
18
|
mount(router: Router): void;
|
|
10
19
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { Context } from "koa";
|
|
2
1
|
import { FlatTemplatable } from "tempstream";
|
|
3
2
|
import { FormField } from "../fields/field";
|
|
4
|
-
import { FieldValueType
|
|
5
|
-
import { FormControl } from "./form-control";
|
|
3
|
+
import { FieldValueType } from "../form";
|
|
4
|
+
import { FormControl, FormControlContext } from "./form-control";
|
|
6
5
|
export declare type FormFieldsToTypes<FormFields extends readonly FormField[]> = {
|
|
7
6
|
[Index in keyof FormFields]: FormFields[Index] extends FormField ? FieldValueType<FormFields[Index]> : never;
|
|
8
7
|
};
|
|
@@ -10,5 +9,5 @@ export declare abstract class FormFieldControl extends FormControl {
|
|
|
10
9
|
fields: FormField[];
|
|
11
10
|
role: "input";
|
|
12
11
|
constructor(fields: FormField[]);
|
|
13
|
-
abstract render(
|
|
12
|
+
abstract render(fctx: FormControlContext): FlatTemplatable | Promise<FlatTemplatable>;
|
|
14
13
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Context } from "koa";
|
|
2
1
|
import { FormControl } from "./controls";
|
|
2
|
+
import { FormControlContext } from "./form-control";
|
|
3
3
|
export declare class FormHeader extends FormControl {
|
|
4
4
|
text: string;
|
|
5
|
-
isVisible: (
|
|
5
|
+
isVisible: (fctx: FormControlContext) => Promise<boolean>;
|
|
6
6
|
role: "decoration";
|
|
7
|
-
constructor(text: string, isVisible?: (
|
|
8
|
-
render(
|
|
7
|
+
constructor(text: string, isVisible?: (fctx: FormControlContext) => Promise<boolean>);
|
|
8
|
+
render(fctx: FormControlContext): Promise<string>;
|
|
9
9
|
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { Context } from "koa";
|
|
2
1
|
import { FlatTemplatable } from "tempstream";
|
|
3
2
|
import { FormField } from "../fields/field";
|
|
4
|
-
import {
|
|
3
|
+
import { FormControlContext } from "./form-control";
|
|
5
4
|
import { FormFieldControl } from "./form-field-control";
|
|
6
5
|
export declare class HiddenInput extends FormFieldControl {
|
|
7
6
|
field: FormField;
|
|
8
7
|
constructor(field: FormField);
|
|
9
|
-
render(
|
|
8
|
+
render(fctx: FormControlContext): Promise<FlatTemplatable>;
|
|
10
9
|
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { Context } from "koa";
|
|
2
1
|
import { FlatTemplatable } from "tempstream";
|
|
3
|
-
import { FormDataValue, FormMessage } from "../form";
|
|
4
2
|
import { FormControl } from "./controls";
|
|
5
|
-
|
|
3
|
+
import { FormControlContext } from "./form-control";
|
|
4
|
+
declare type Renderer = ((fctx: FormControlContext) => FlatTemplatable) | FlatTemplatable;
|
|
6
5
|
export declare class HTML extends FormControl {
|
|
7
6
|
role: "decoration" | "submit";
|
|
8
7
|
renderer: Renderer;
|
|
9
8
|
constructor(role: "decoration" | "submit", renderer: Renderer);
|
|
10
9
|
constructor(renderer: Renderer);
|
|
11
|
-
render(
|
|
10
|
+
render(fctx: FormControlContext): Promise<FlatTemplatable>;
|
|
12
11
|
}
|
|
13
12
|
export {};
|
|
@@ -5,8 +5,8 @@ import { Collection, CollectionItem, File as SealiousFile, Field as SealiousFiel
|
|
|
5
5
|
import { Context } from "koa";
|
|
6
6
|
import { FlatTemplatable } from "tempstream";
|
|
7
7
|
import { MultipleFiles as MultipleFilesField } from "../fields/multiple-files";
|
|
8
|
-
import { FormDataValue } from "../form";
|
|
9
8
|
import { FormFieldControl } from "./form-field-control";
|
|
9
|
+
import { FormControlContext } from "./form-control";
|
|
10
10
|
export declare type MultipleFilesOptions = {
|
|
11
11
|
label?: string;
|
|
12
12
|
uploadLabel?: string;
|
|
@@ -23,11 +23,11 @@ export declare class MultipleFiles extends FormFieldControl {
|
|
|
23
23
|
getFrameRelativeURL(): string;
|
|
24
24
|
getFrameID(): string;
|
|
25
25
|
renderFrame(ctx: Context, content?: FlatTemplatable): import("stream").Readable;
|
|
26
|
-
render(
|
|
26
|
+
render(fctx: FormControlContext): FlatTemplatable | Promise<FlatTemplatable>;
|
|
27
27
|
getReferencingCollection(): Collection;
|
|
28
28
|
getFileField(): SealiousField | null;
|
|
29
29
|
extractFileFromItem(item: CollectionItem): Promise<SealiousFile | null>;
|
|
30
|
-
renderFileItemPreview(
|
|
30
|
+
renderFileItemPreview(_fileItem: CollectionItem, file: SealiousFile): Promise<FlatTemplatable>;
|
|
31
31
|
renderFileItem(fileItem: CollectionItem, file: SealiousFile): Promise<FlatTemplatable>;
|
|
32
32
|
renderFileRemoveButton(fileItem: CollectionItem): FlatTemplatable;
|
|
33
33
|
getFileItems(ctx: Context): Promise<CollectionItem<any>[]>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { Context } from "koa";
|
|
2
1
|
import { NumberField } from "../fields/field";
|
|
3
|
-
import {
|
|
2
|
+
import { FormControlContext } from "./form-control";
|
|
4
3
|
import { SimpleInput, SimpleInputOptions } from "./simple-input";
|
|
5
4
|
export declare type NumberOptions = SimpleInputOptions & Partial<{
|
|
6
5
|
step: number;
|
|
@@ -10,5 +9,5 @@ export declare class Number extends SimpleInput<number | null> {
|
|
|
10
9
|
options: NumberOptions;
|
|
11
10
|
constructor(field: NumberField, options: NumberOptions);
|
|
12
11
|
getType(): string;
|
|
13
|
-
getInputAttributes(
|
|
12
|
+
getInputAttributes(fctx: FormControlContext): Promise<Record<string, string | boolean>>;
|
|
14
13
|
}
|
|
@@ -4,7 +4,7 @@ import { File } from "./file";
|
|
|
4
4
|
import { FileContainer, FormField } from "../fields/field";
|
|
5
5
|
import { SimpleInputOptions } from "./simple-input";
|
|
6
6
|
import KoaResponsiveImageRouter from "koa-responsive-image-router";
|
|
7
|
-
import {
|
|
7
|
+
import { FormControlContext } from "./form-control";
|
|
8
8
|
export declare class Photo extends File {
|
|
9
9
|
field: FormField<boolean, FileContainer>;
|
|
10
10
|
imageRouter: KoaResponsiveImageRouter;
|
|
@@ -14,7 +14,7 @@ export declare class Photo extends File {
|
|
|
14
14
|
id?: string;
|
|
15
15
|
filename?: string;
|
|
16
16
|
} | null): Promise<FlatTemplatable>;
|
|
17
|
-
getInputAttributes(
|
|
17
|
+
getInputAttributes(fctx: FormControlContext): Promise<{
|
|
18
18
|
accept: string;
|
|
19
19
|
onchange: string;
|
|
20
20
|
}>;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Context } from "koa";
|
|
2
2
|
import { FlatTemplatable } from "tempstream";
|
|
3
3
|
import { FormField } from "../fields/field";
|
|
4
|
-
import { FormDataValue
|
|
4
|
+
import { FormDataValue } from "../form";
|
|
5
5
|
import { FormFieldControl } from "./controls";
|
|
6
|
+
import { FormControlContext } from "./form-control";
|
|
6
7
|
export declare type SimpleInputOptions = {
|
|
7
8
|
id?: string;
|
|
8
9
|
label?: string;
|
|
@@ -24,8 +25,8 @@ export declare class SimpleInput<ParsedValue, Options extends SimpleInputOptions
|
|
|
24
25
|
getLabel(): string;
|
|
25
26
|
getID(): string;
|
|
26
27
|
getPlaceholder(): string;
|
|
27
|
-
getInputAttributes(
|
|
28
|
+
getInputAttributes(fctx: FormControlContext): Promise<Record<string, string | boolean>>;
|
|
28
29
|
postInput(_: Context): Promise<FlatTemplatable>;
|
|
29
|
-
renderInput(
|
|
30
|
-
render<Fields extends Record<string, FormField>>(
|
|
30
|
+
renderInput(_ctx: Context, attributes_str: string, _data: Record<string, FormDataValue>): Promise<FlatTemplatable>;
|
|
31
|
+
render<Fields extends Record<string, FormField>>(fctx: FormControlContext): Promise<FlatTemplatable>;
|
|
31
32
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Context } from "koa";
|
|
2
2
|
import { FormField } from "../fields/field";
|
|
3
3
|
import { FormDataValue } from "../form";
|
|
4
|
+
import { FormControlContext } from "./form-control";
|
|
4
5
|
import { SimpleInput, SimpleInputOptions } from "./simple-input";
|
|
5
6
|
export declare class Textarea<Required extends boolean> extends SimpleInput<string | null> {
|
|
6
7
|
field: FormField<boolean, string | null>;
|
|
@@ -19,6 +20,6 @@ export declare class Textarea<Required extends boolean> extends SimpleInput<stri
|
|
|
19
20
|
autogrow?: boolean;
|
|
20
21
|
});
|
|
21
22
|
renderDescription(): string;
|
|
22
|
-
getInputAttributes(
|
|
23
|
+
getInputAttributes(fctx: FormControlContext): Promise<Record<string, string | boolean>>;
|
|
23
24
|
renderInput(ctx: Context, attributes: string, data: Record<string, FormDataValue>): Promise<string>;
|
|
24
25
|
}
|
|
@@ -3,6 +3,7 @@ import { FlatTemplatable } from "tempstream";
|
|
|
3
3
|
import { FormField } from "../fields/field";
|
|
4
4
|
import { FormDataValue } from "../form";
|
|
5
5
|
import { FormFieldControl } from "./controls";
|
|
6
|
+
import { FormControlContext } from "./form-control";
|
|
6
7
|
export declare type TickableOptions = {
|
|
7
8
|
id?: string;
|
|
8
9
|
name?: string;
|
|
@@ -19,5 +20,5 @@ export declare abstract class Tickable<T extends unknown> extends FormFieldContr
|
|
|
19
20
|
abstract isChecked(ctx: Context, data: Record<string, FormDataValue>, value: T): boolean;
|
|
20
21
|
makeInputID(ctx: Context, data: Record<string, FormDataValue>, value: T): string;
|
|
21
22
|
getWrapperClasses(ctx: Context, data: Record<string, FormDataValue>, value: T): string[];
|
|
22
|
-
render<Fields extends Record<string, FormField>>(
|
|
23
|
+
render<Fields extends Record<string, FormField>>(fctx: FormControlContext): Promise<FlatTemplatable>;
|
|
23
24
|
}
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import { Context } from "koa";
|
|
2
|
+
import { DropdownOption } from "../controls/dropdown";
|
|
2
3
|
import { FormFieldValidationResponse } from "./field";
|
|
3
4
|
import { SimpleFormField } from "./simple-form-field";
|
|
4
5
|
export declare class PickFromListField<Required extends boolean> extends SimpleFormField<Required> {
|
|
5
6
|
required: Required;
|
|
6
|
-
generateOptions: (ctx: Context) => Promise<
|
|
7
|
-
[i: string]: string;
|
|
8
|
-
}>;
|
|
7
|
+
generateOptions: (ctx: Context) => Promise<DropdownOption[]>;
|
|
9
8
|
customValidation: (ctx: Context, value: unknown, instance: PickFromListField<Required>) => Promise<FormFieldValidationResponse>;
|
|
10
|
-
constructor(required: Required, generateOptions: (ctx: Context) => Promise<
|
|
11
|
-
[i: string]: string;
|
|
12
|
-
}>, customValidation?: (ctx: Context, value: unknown, instance: PickFromListField<Required>) => Promise<FormFieldValidationResponse>);
|
|
9
|
+
constructor(required: Required, generateOptions: (ctx: Context) => Promise<DropdownOption[]>, customValidation?: (ctx: Context, value: unknown, instance: PickFromListField<Required>) => Promise<FormFieldValidationResponse>);
|
|
13
10
|
predicate: import("@sealcode/ts-predicates").Predicate<string>;
|
|
14
11
|
isValueValid(ctx: Context, value: string): Promise<FormFieldValidationResponse>;
|
|
15
12
|
valueInList(ctx: Context, value: unknown): Promise<FormFieldValidationResponse>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ShapeToType } from "@sealcode/ts-predicates";
|
|
2
2
|
import { Context } from "koa";
|
|
3
3
|
import { FlatTemplatable } from "tempstream";
|
|
4
|
-
import { FormControl } from "../forms/controls/form-control";
|
|
4
|
+
import { FormControl, FormControlContext } from "../forms/controls/form-control";
|
|
5
5
|
import { FieldsToShape, FormField } from "../forms/fields/field";
|
|
6
6
|
import { FormData, FormDataValue, FormMessage } from "../forms/form";
|
|
7
7
|
import { Mountable } from "./mountable";
|
|
@@ -17,6 +17,7 @@ export declare abstract class MountableWithFields<F extends Fields = Fields> ext
|
|
|
17
17
|
abstract controls: FormControl[];
|
|
18
18
|
constructor();
|
|
19
19
|
init(): void;
|
|
20
|
+
makeFormControlContext(ctx: Context, data: FormData, validate: boolean, field_name_prefix?: string, form_id?: string): FormControlContext;
|
|
20
21
|
validateValues(ctx: Context, data: Record<string, FormDataValue>): Promise<{
|
|
21
22
|
valid: boolean;
|
|
22
23
|
error: string;
|
|
@@ -26,7 +27,7 @@ export declare abstract class MountableWithFields<F extends Fields = Fields> ext
|
|
|
26
27
|
field_errors: Partial<Record<keyof Fields, string>>;
|
|
27
28
|
form_messages: FormMessage[];
|
|
28
29
|
}>;
|
|
29
|
-
renderControls(
|
|
30
|
+
renderControls(fctx: FormControlContext): FlatTemplatable;
|
|
30
31
|
renderError(_: Context, error: PageErrorMessage): Promise<FlatTemplatable>;
|
|
31
32
|
renderMessages(_: Context, data: FormData<keyof Fields>): FlatTemplatable;
|
|
32
33
|
abstract extractRawValues(ctx: Context): Promise<Record<string, FormDataValue>>;
|
|
@@ -11,15 +11,15 @@ class Autocomplete extends simple_input_1.SimpleInput {
|
|
|
11
11
|
getListID() {
|
|
12
12
|
return this.getID() + "_list";
|
|
13
13
|
}
|
|
14
|
-
async getInputAttributes(
|
|
14
|
+
async getInputAttributes(fctx) {
|
|
15
15
|
return {
|
|
16
|
-
...(await super.getInputAttributes(
|
|
16
|
+
...(await super.getInputAttributes(fctx)),
|
|
17
17
|
list: this.getListID(),
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
20
|
async postInput(ctx) {
|
|
21
21
|
return /* HTML */ `<datalist id="${this.getListID()}">
|
|
22
|
-
${
|
|
22
|
+
${(await this.field.generateOptions(ctx)).map(({ value }) => /* HTML */ `<option>${value}</option>`)}
|
|
23
23
|
</datalist>`;
|
|
24
24
|
}
|
|
25
25
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"autocomplete.js","sourceRoot":"","sources":["../../../src/forms/controls/autocomplete.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"autocomplete.js","sourceRoot":"","sources":["../../../src/forms/controls/autocomplete.ts"],"names":[],"mappings":";;;AAIA,iDAA6C;AAE7C,MAAa,YAAa,SAAQ,0BAA0B;IAC3D,YACQ,KAAiC,EACjC,OAA8D;QAErE,KAAK,CAAC,KAAK,CAAC,CAAC;QAHN,UAAK,GAAL,KAAK,CAA4B;QACjC,YAAO,GAAP,OAAO,CAAuD;IAGtE,CAAC;IAED,SAAS;QACR,OAAO,IAAI,CAAC,KAAK,EAAE,GAAG,OAAO,CAAC;IAC/B,CAAC;IAED,KAAK,CAAC,kBAAkB,CAAC,IAAwB;QAChD,OAAO;YACN,GAAG,CAAC,MAAM,KAAK,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;YACzC,IAAI,EAAE,IAAI,CAAC,SAAS,EAAE;SACtB,CAAC;IACH,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,GAAY;QAC3B,OAAO,UAAU,CAAC,iBAAiB,IAAI,CAAC,SAAS,EAAE;KAChD,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAC5C,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,UAAU,CAAC,WAAW,KAAK,WAAW,CACrD;cACU,CAAC;IACd,CAAC;CACD;AA1BD,oCA0BC"}
|
|
@@ -9,8 +9,8 @@ class BigRadioGroup extends form_field_control_1.FormFieldControl {
|
|
|
9
9
|
this.field = field;
|
|
10
10
|
this.options = options;
|
|
11
11
|
}
|
|
12
|
-
async render(
|
|
13
|
-
const { raw: current_value } = await this.field.getValue(ctx, data);
|
|
12
|
+
async render(fctx) {
|
|
13
|
+
const { raw: current_value } = await this.field.getValue(fctx.ctx, fctx.data);
|
|
14
14
|
return tempstream_1.tempstream /* HTML */ `<div class="bigradios">
|
|
15
15
|
${Object.entries(this.options).map(([key, { description }]) => {
|
|
16
16
|
const id = `${this.field.name}-radio-${key}`;
|
|
@@ -20,13 +20,13 @@ class BigRadioGroup extends form_field_control_1.FormFieldControl {
|
|
|
20
20
|
value="${key}"
|
|
21
21
|
id="${id}"
|
|
22
22
|
style="display: none"
|
|
23
|
-
${form_id ? `form=${form_id}` : ""}
|
|
23
|
+
${fctx.form_id ? `form=${fctx.form_id}` : ""}
|
|
24
24
|
${this.field.required ? "required" : ""}
|
|
25
25
|
${key == current_value ? "checked" : ""}
|
|
26
26
|
/>
|
|
27
27
|
<div class="bigradio">
|
|
28
28
|
${typeof description == "function"
|
|
29
|
-
? description(
|
|
29
|
+
? description(fctx)
|
|
30
30
|
: description}
|
|
31
31
|
<label class="bigradio__cta" for="${id}">Wybierz</label>
|
|
32
32
|
</div>`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"big-radio-group.js","sourceRoot":"","sources":["../../../src/forms/controls/big-radio-group.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"big-radio-group.js","sourceRoot":"","sources":["../../../src/forms/controls/big-radio-group.ts"],"names":[],"mappings":";;;AAAA,2CAAyD;AAGzD,6DAAwD;AAExD,MAAa,aAAc,SAAQ,qCAAgB;IAClD,YACQ,KAAgB,EAChB,OAON;QAED,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;QAVR,UAAK,GAAL,KAAK,CAAW;QAChB,YAAO,GAAP,OAAO,CAOb;IAGF,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,IAAwB;QACpC,MAAM,EAAE,GAAG,EAAE,aAAa,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,QAAQ,CACvD,IAAI,CAAC,GAAG,EACR,IAAI,CAAC,IAAI,CACT,CAAC;QACF,OAAO,uBAAU,CAAA,UAAU,CAAC;KACzB,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE,WAAW,EAAE,CAAC,EAAE,EAAE;YAC7D,MAAM,EAAE,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,UAAU,GAAG,EAAE,CAAC;YAC7C,OAAO,uBAAU,CAAA,UAAU,CAAC;;cAElB,IAAI,CAAC,KAAK,CAAC,IAAI;eACd,GAAG;YACN,EAAE;;QAEN,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE;QAC1C,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE;QACrC,GAAG,IAAI,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE;;;QAGrC,OAAO,WAAW,IAAI,UAAU;gBACjC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC;gBACnB,CAAC,CAAC,WAAW;0CACsB,EAAE;YAChC,CAAC;QACV,CAAC,CAAC;SACI,CAAC;IACT,CAAC;CACD;AA1CD,sCA0CC"}
|
|
@@ -10,23 +10,23 @@ class CheckboxGroup extends controls_1.FormFieldControl {
|
|
|
10
10
|
this.field = field;
|
|
11
11
|
this.options = options;
|
|
12
12
|
}
|
|
13
|
-
wrapGroup(
|
|
13
|
+
wrapGroup(fctx, checkboxes) {
|
|
14
14
|
return new controls_1.FieldGroup(checkboxes, {
|
|
15
15
|
label: this.options.label,
|
|
16
16
|
classes: [
|
|
17
17
|
...(this.options.classes || []),
|
|
18
18
|
"field-group--checkboxes",
|
|
19
19
|
],
|
|
20
|
-
}).render(
|
|
20
|
+
}).render(fctx);
|
|
21
21
|
}
|
|
22
|
-
async render(
|
|
23
|
-
const { parsed: values } = await this.field.getValue(ctx, data);
|
|
22
|
+
async render(fctx) {
|
|
23
|
+
const { parsed: values } = await this.field.getValue(fctx.ctx, fctx.data);
|
|
24
24
|
const checkboxes = this.field.options.map((option) => new checkbox_1.CheckboxWithValue(new proxy_field_1.ProxyFormField(false, this.field.name, false, values.includes(option)), {
|
|
25
25
|
id: this.field.name + "__" + option,
|
|
26
26
|
label: (this.options.checkboxNameToLabel ||
|
|
27
27
|
((s) => s))(option),
|
|
28
28
|
}, option));
|
|
29
|
-
return this.wrapGroup(
|
|
29
|
+
return this.wrapGroup(fctx, checkboxes);
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
exports.CheckboxGroup = CheckboxGroup;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox-group.js","sourceRoot":"","sources":["../../../src/forms/controls/checkbox-group.ts"],"names":[],"mappings":";;;AAGA,uDAAuD;AAEvD,yCAA+C;AAC/C,yCAA0D;
|
|
1
|
+
{"version":3,"file":"checkbox-group.js","sourceRoot":"","sources":["../../../src/forms/controls/checkbox-group.ts"],"names":[],"mappings":";;;AAGA,uDAAuD;AAEvD,yCAA+C;AAC/C,yCAA0D;AAa1D,MAAa,aAEX,SAAQ,2BAAgB;IACzB,YACQ,KAAoD,EACpD,UAAmB,EAAa;QAEvC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;QAHR,UAAK,GAAL,KAAK,CAA+C;QACpD,YAAO,GAAP,OAAO,CAAyB;IAGxC,CAAC;IAED,SAAS,CACR,IAAwB,EACxB,UAA+B;QAE/B,OAAO,IAAI,qBAAU,CAAC,UAAU,EAAE;YACjC,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,KAAK;YACzB,OAAO,EAAE;gBACR,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC;gBAC/B,yBAAyB;aACzB;SACD,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACjB,CAAC;IAED,KAAK,CAAC,MAAM,CACX,IAAwB;QAExB,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,QAAQ,CACnD,IAAI,CAAC,GAAG,EACR,IAAI,CAAC,IAAI,CACT,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CACxC,CAAC,MAAM,EAAE,EAAE,CACV,IAAI,4BAAiB,CACpB,IAAI,4BAAc,CACjB,KAAK,EACL,IAAI,CAAC,KAAK,CAAC,IAAI,EACf,KAAK,EACL,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CACvB,EACD;YACC,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,IAAI,GAAG,MAAM;YACnC,KAAK,EAAE,CACN,IAAI,CAAC,OAAO,CAAC,mBAAmB;gBAChC,CAAC,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,CAClB,CAAC,MAAM,CAAC;SACT,EACD,MAAM,CACN,CACF,CAAC;QACF,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;IACzC,CAAC;CACD;AAnDD,sCAmDC"}
|