@gen-epix/ui-core-form 4.0.2 → 4.2.0
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/dist/_chunks/Autocomplete.js +86 -84
- package/dist/_chunks/Autocomplete.js.map +1 -1
- package/dist/_chunks/DatePicker.js +26 -26
- package/dist/_chunks/FileUpload.js +73 -0
- package/dist/_chunks/FileUpload.js.map +1 -0
- package/dist/_chunks/FormUtil.js +4 -1
- package/dist/_chunks/FormUtil.js.map +1 -1
- package/dist/_chunks/RichTextEditor.js +7658 -4335
- package/dist/_chunks/RichTextEditor.js.map +1 -1
- package/dist/_chunks/TransferList.js +59 -59
- package/dist/_chunks/TransferList.js.map +1 -1
- package/dist/components/fields/Autocomplete/Autocomplete.d.ts +6 -3
- package/dist/components/fields/CheckboxGroup/index.js +14 -14
- package/dist/components/fields/DateRangePicker/index.js +39 -39
- package/dist/components/fields/DateRangePicker/index.js.map +1 -1
- package/dist/components/fields/{UploadButton/UploadButton.d.ts → FileUpload/FileUpload.d.ts} +2 -2
- package/dist/components/fields/FileUpload/index.d.ts +1 -0
- package/dist/components/fields/FileUpload/index.js +2 -0
- package/dist/components/fields/NumberField/index.js +29 -29
- package/dist/components/fields/NumberField/index.js.map +1 -1
- package/dist/components/fields/NumberRangeInput/index.js +34 -34
- package/dist/components/fields/RadioGroup/index.js +7 -7
- package/dist/components/fields/Select/index.js +32 -19
- package/dist/components/fields/Select/index.js.map +1 -1
- package/dist/components/fields/Switch/Switch.d.ts +3 -2
- package/dist/components/fields/Switch/index.js +50 -40
- package/dist/components/fields/Switch/index.js.map +1 -1
- package/dist/components/fields/TextField/index.js +19 -19
- package/dist/components/fields/ToggleButtonGroup/index.js +7 -7
- package/dist/components/helpers/GenericForm/GenericForm.d.ts +1 -1
- package/dist/components/helpers/GenericForm/index.js +42 -32
- package/dist/components/helpers/GenericForm/index.js.map +1 -1
- package/dist/hooks/useIsFormFieldRequiredFromSchema/index.js +5 -4
- package/dist/hooks/useIsFormFieldRequiredFromSchema/index.js.map +1 -1
- package/dist/models/form.d.ts +31 -19
- package/dist/models/form.js.map +1 -1
- package/package.json +84 -81
- package/dist/_chunks/UploadButton.js +0 -91
- package/dist/_chunks/UploadButton.js.map +0 -1
- package/dist/_chunks/index.esm.js +0 -398
- package/dist/_chunks/index.esm.js.map +0 -1
- package/dist/components/fields/UploadButton/index.d.ts +0 -1
- package/dist/components/fields/UploadButton/index.js +0 -2
package/dist/models/form.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { FieldValues, Path } from 'react-hook-form';
|
|
2
|
+
import { ReactElement } from 'react';
|
|
2
3
|
import { RichTextEditorProps } from '../components/fields/RichTextEditor';
|
|
3
4
|
import { TransferListProps } from '../components/fields/TransferList';
|
|
4
5
|
import { AutocompleteProps } from '../components/fields/Autocomplete';
|
|
5
6
|
import { TextFieldProps } from '../components/fields/TextField';
|
|
6
7
|
import { SelectProps } from '../components/fields/Select';
|
|
7
8
|
import { DatePickerProps } from '../components/fields/DatePicker';
|
|
8
|
-
import {
|
|
9
|
+
import { FileUploadProps } from '../components/fields/FileUpload/FileUpload';
|
|
9
10
|
import { RadioGroupProps } from '../components/fields/RadioGroup';
|
|
10
11
|
import { NumberFieldProps } from '../components/fields/NumberField';
|
|
11
12
|
import { SwitchProps } from '../components/fields/Switch';
|
|
@@ -35,61 +36,67 @@ export type AutocompleteSelectAllContextData = {
|
|
|
35
36
|
selectAllLabel: string;
|
|
36
37
|
};
|
|
37
38
|
export type AutocompleteValue = number | string;
|
|
39
|
+
export type BaseFormFieldDefinition = {
|
|
40
|
+
contentAfter?: ReactElement;
|
|
41
|
+
contentBefore?: ReactElement;
|
|
42
|
+
};
|
|
38
43
|
export type CheckboxOption = OptionBase<number | string>;
|
|
39
|
-
export type FormFieldDefinition<TFormFields extends FieldValues> =
|
|
40
|
-
export type FormFieldDefinitionAutocomplete<TFormFields extends FieldValues> = {
|
|
44
|
+
export type FormFieldDefinition<TFormFields extends FieldValues> = FormFieldDefinitionAutocompleteForName<TFormFields> | FormFieldDefinitionBoolean<TFormFields> | FormFieldDefinitionBooleanSwitch<TFormFields> | FormFieldDefinitionDate<TFormFields> | FormFieldDefinitionFile<TFormFields> | FormFieldDefinitionHidden<TFormFields> | FormFieldDefinitionNumber<TFormFields> | FormFieldDefinitionRadioGroup<TFormFields> | FormFieldDefinitionRichText<TFormFields> | FormFieldDefinitionSelect<TFormFields> | FormFieldDefinitionSelectMultiple<TFormFields> | FormFieldDefinitionSwitch<TFormFields> | FormFieldDefinitionTextField<TFormFields> | FormFieldDefinitionTransferList<TFormFields>;
|
|
45
|
+
export type FormFieldDefinitionAutocomplete<TFormFields extends FieldValues, TName extends Path<TFormFields> = Path<TFormFields>> = {
|
|
41
46
|
definition: FORM_FIELD_DEFINITION_TYPE.AUTOCOMPLETE;
|
|
42
47
|
multiple?: false;
|
|
43
|
-
} & AutocompleteProps<TFormFields,
|
|
44
|
-
export type FormFieldDefinitionAutocompleteMultiple<TFormFields extends FieldValues> = {
|
|
48
|
+
} & AutocompleteProps<TFormFields, TName, false> & BaseFormFieldDefinition & FormFieldGrouping;
|
|
49
|
+
export type FormFieldDefinitionAutocompleteMultiple<TFormFields extends FieldValues, TName extends Path<TFormFields> = Path<TFormFields>> = {
|
|
45
50
|
definition: FORM_FIELD_DEFINITION_TYPE.AUTOCOMPLETE;
|
|
46
51
|
multiple?: true;
|
|
47
|
-
} & AutocompleteProps<TFormFields,
|
|
52
|
+
} & AutocompleteProps<TFormFields, TName, true> & BaseFormFieldDefinition & FormFieldGrouping;
|
|
48
53
|
export type FormFieldDefinitionBoolean<TFormFields extends FieldValues> = {
|
|
49
54
|
definition: FORM_FIELD_DEFINITION_TYPE.BOOLEAN;
|
|
50
|
-
} & FormFieldGrouping & Omit<SelectProps<TFormFields, Path<TFormFields>, false>, 'options'>;
|
|
55
|
+
} & BaseFormFieldDefinition & FormFieldGrouping & Omit<SelectProps<TFormFields, Path<TFormFields>, false>, 'options'>;
|
|
51
56
|
export type FormFieldDefinitionBooleanSwitch<TFormFields extends FieldValues> = {
|
|
52
57
|
definition: FORM_FIELD_DEFINITION_TYPE.BOOLEAN_SWITCH;
|
|
53
|
-
} & FormFieldGrouping & Omit<SwitchProps<TFormFields, Path<TFormFields>>, 'options'>;
|
|
58
|
+
} & BaseFormFieldDefinition & FormFieldGrouping & Omit<SwitchProps<TFormFields, Path<TFormFields>>, 'options'>;
|
|
54
59
|
export type FormFieldDefinitionDate<TFormFields extends FieldValues> = {
|
|
55
60
|
definition: FORM_FIELD_DEFINITION_TYPE.DATE;
|
|
56
|
-
} & DatePickerProps<TFormFields, Path<TFormFields>> & FormFieldGrouping;
|
|
61
|
+
} & BaseFormFieldDefinition & DatePickerProps<TFormFields, Path<TFormFields>> & FormFieldGrouping;
|
|
57
62
|
export type FormFieldDefinitionFile<TFormFields extends FieldValues> = {
|
|
58
63
|
definition: FORM_FIELD_DEFINITION_TYPE.FILE;
|
|
59
|
-
} &
|
|
64
|
+
} & BaseFormFieldDefinition & FileUploadProps<TFormFields, Path<TFormFields>> & FormFieldGrouping;
|
|
60
65
|
export type FormFieldDefinitionHidden<TFormFields extends FieldValues> = {
|
|
61
66
|
definition: FORM_FIELD_DEFINITION_TYPE.HIDDEN;
|
|
62
|
-
} & FormFieldGrouping & TextFieldProps<TFormFields, Path<TFormFields>>;
|
|
67
|
+
} & BaseFormFieldDefinition & FormFieldGrouping & TextFieldProps<TFormFields, Path<TFormFields>>;
|
|
63
68
|
export type FormFieldDefinitionNumber<TFormFields extends FieldValues> = {
|
|
64
69
|
definition: FORM_FIELD_DEFINITION_TYPE.NUMBER;
|
|
65
|
-
} & FormFieldGrouping & NumberFieldProps<TFormFields, Path<TFormFields>>;
|
|
70
|
+
} & BaseFormFieldDefinition & FormFieldGrouping & NumberFieldProps<TFormFields, Path<TFormFields>>;
|
|
66
71
|
export type FormFieldDefinitionRadioGroup<TFormFields extends FieldValues> = {
|
|
67
72
|
definition: FORM_FIELD_DEFINITION_TYPE.RADIO_GROUP;
|
|
68
|
-
} & FormFieldGrouping & RadioGroupProps<TFormFields, Path<TFormFields>>;
|
|
73
|
+
} & BaseFormFieldDefinition & FormFieldGrouping & RadioGroupProps<TFormFields, Path<TFormFields>>;
|
|
69
74
|
export type FormFieldDefinitionRichText<TFormFields extends FieldValues> = {
|
|
70
75
|
definition: FORM_FIELD_DEFINITION_TYPE.RICH_TEXT;
|
|
71
|
-
} & FormFieldGrouping & RichTextEditorProps<TFormFields, Path<TFormFields>>;
|
|
76
|
+
} & BaseFormFieldDefinition & FormFieldGrouping & RichTextEditorProps<TFormFields, Path<TFormFields>>;
|
|
72
77
|
export type FormFieldDefinitionSelect<TFormFields extends FieldValues> = {
|
|
73
78
|
definition: FORM_FIELD_DEFINITION_TYPE.SELECT;
|
|
74
79
|
multiple?: false;
|
|
75
|
-
} & FormFieldGrouping & SelectProps<TFormFields, Path<TFormFields>, false>;
|
|
80
|
+
} & BaseFormFieldDefinition & FormFieldGrouping & SelectProps<TFormFields, Path<TFormFields>, false>;
|
|
76
81
|
export type FormFieldDefinitionSelectMultiple<TFormFields extends FieldValues> = {
|
|
77
82
|
definition: FORM_FIELD_DEFINITION_TYPE.SELECT;
|
|
78
83
|
multiple?: true;
|
|
79
|
-
} & FormFieldGrouping & SelectProps<TFormFields, Path<TFormFields>, true>;
|
|
84
|
+
} & BaseFormFieldDefinition & FormFieldGrouping & SelectProps<TFormFields, Path<TFormFields>, true>;
|
|
80
85
|
export type FormFieldDefinitionSwitch<TFormFields extends FieldValues> = {
|
|
81
86
|
definition: FORM_FIELD_DEFINITION_TYPE.SWITCH;
|
|
82
|
-
} & FormFieldGrouping & SwitchProps<TFormFields, Path<TFormFields>>;
|
|
87
|
+
} & BaseFormFieldDefinition & FormFieldGrouping & SwitchProps<TFormFields, Path<TFormFields>>;
|
|
83
88
|
export type FormFieldDefinitionTextField<TFormFields extends FieldValues> = {
|
|
84
89
|
definition: FORM_FIELD_DEFINITION_TYPE.TEXTFIELD;
|
|
85
|
-
} & FormFieldGrouping & TextFieldProps<TFormFields, Path<TFormFields>>;
|
|
90
|
+
} & BaseFormFieldDefinition & FormFieldGrouping & TextFieldProps<TFormFields, Path<TFormFields>>;
|
|
86
91
|
export type FormFieldDefinitionTransferList<TFormFields extends FieldValues> = {
|
|
87
92
|
definition: FORM_FIELD_DEFINITION_TYPE.TRANSFER_LIST;
|
|
88
|
-
} & FormFieldGrouping & TransferListProps<TFormFields, Path<TFormFields>>;
|
|
93
|
+
} & BaseFormFieldDefinition & FormFieldGrouping & TransferListProps<TFormFields, Path<TFormFields>>;
|
|
89
94
|
export type FormFieldGrouping = {
|
|
90
95
|
groupKey?: string;
|
|
91
96
|
};
|
|
92
97
|
export type FormGroupDefinition = {
|
|
98
|
+
contentAfter?: ReactElement;
|
|
99
|
+
contentBefore?: ReactElement;
|
|
93
100
|
description?: string;
|
|
94
101
|
groupKey: string;
|
|
95
102
|
label: string;
|
|
@@ -104,9 +111,14 @@ export type FormGroupMessage = {
|
|
|
104
111
|
export interface OptionBase<TValue> {
|
|
105
112
|
disabled?: boolean;
|
|
106
113
|
label?: string;
|
|
114
|
+
secondaryLabel?: string;
|
|
107
115
|
value?: TValue;
|
|
108
116
|
}
|
|
109
117
|
export type RadioButtonOption<TValue = void> = OptionBase<TValue extends void ? (boolean | number | string) : TValue>;
|
|
110
118
|
export type SelectOption<TValue = void> = OptionBase<TValue extends void ? (boolean | number | string) : TValue>;
|
|
111
119
|
export type ToggleButtonOption<TValue = void> = OptionBase<TValue extends void ? (boolean | number | string) : TValue>;
|
|
112
120
|
export type TransferListOption = OptionBase<string>;
|
|
121
|
+
type FormFieldDefinitionAutocompleteForName<TFormFields extends FieldValues> = {
|
|
122
|
+
[TName in Path<TFormFields>]: FormFieldDefinitionAutocomplete<TFormFields, TName> | FormFieldDefinitionAutocompleteMultiple<TFormFields, TName>;
|
|
123
|
+
}[Path<TFormFields>];
|
|
124
|
+
export {};
|
package/dist/models/form.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.js","names":[],"sources":["../../src/models/form.ts"],"sourcesContent":["import type {\n FieldValues,\n Path,\n} from 'react-hook-form';\n\nimport type { RichTextEditorProps } from '../components/fields/RichTextEditor';\nimport type { TransferListProps } from '../components/fields/TransferList';\nimport type { AutocompleteProps } from '../components/fields/Autocomplete';\nimport type { TextFieldProps } from '../components/fields/TextField';\nimport type { SelectProps } from '../components/fields/Select';\nimport type { DatePickerProps } from '../components/fields/DatePicker';\nimport type {
|
|
1
|
+
{"version":3,"file":"form.js","names":[],"sources":["../../src/models/form.ts"],"sourcesContent":["import type {\n FieldValues,\n Path,\n} from 'react-hook-form';\nimport type { ReactElement } from 'react';\n\nimport type { RichTextEditorProps } from '../components/fields/RichTextEditor';\nimport type { TransferListProps } from '../components/fields/TransferList';\nimport type { AutocompleteProps } from '../components/fields/Autocomplete';\nimport type { TextFieldProps } from '../components/fields/TextField';\nimport type { SelectProps } from '../components/fields/Select';\nimport type { DatePickerProps } from '../components/fields/DatePicker';\nimport type { FileUploadProps } from '../components/fields/FileUpload/FileUpload';\nimport type { RadioGroupProps } from '../components/fields/RadioGroup';\nimport type { NumberFieldProps } from '../components/fields/NumberField';\nimport type { SwitchProps } from '../components/fields/Switch';\n\nexport enum FORM_FIELD_DEFINITION_TYPE {\n AUTOCOMPLETE = 'AUTOCOMPLETE',\n BOOLEAN = 'BOOLEAN',\n BOOLEAN_SWITCH = 'BOOLEAN_SWITCH',\n DATE = 'DATE',\n FILE = 'FILE',\n HIDDEN = 'HIDDEN',\n NUMBER = 'NUMBER',\n RADIO_GROUP = 'RADIO_GROUP',\n RICH_TEXT = 'RICH_TEXT',\n SELECT = 'SELECT',\n SWITCH = 'SWITCH',\n TEXTFIELD = 'TEXTFIELD',\n TRANSFER_LIST = 'TRANSFER_LIST',\n}\n\nexport interface AutoCompleteOption<TValue = void> extends OptionBase<TValue extends void ? (number | string) : TValue> {\n groupBySortOrderValue?: number;\n groupByValue?: string;\n}\n\nexport type AutocompleteSelectAllContextData = {\n currentValues: AutocompleteValue[];\n enabledOptionValues: AutocompleteValue[];\n handleSelectAll: (isCurrentlyAll: boolean, currentValues: AutocompleteValue[]) => void;\n selectAllLabel: string;\n};\nexport type AutocompleteValue = number | string;\nexport type BaseFormFieldDefinition = {\n contentAfter?: ReactElement;\n contentBefore?: ReactElement;\n};\n\nexport type CheckboxOption = OptionBase<number | string>;\n\nexport type FormFieldDefinition<TFormFields extends FieldValues> =\n FormFieldDefinitionAutocompleteForName<TFormFields> |\n FormFieldDefinitionBoolean<TFormFields> |\n FormFieldDefinitionBooleanSwitch<TFormFields> |\n FormFieldDefinitionDate<TFormFields> |\n FormFieldDefinitionFile<TFormFields> |\n FormFieldDefinitionHidden<TFormFields> |\n FormFieldDefinitionNumber<TFormFields> |\n FormFieldDefinitionRadioGroup<TFormFields> |\n FormFieldDefinitionRichText<TFormFields> |\n FormFieldDefinitionSelect<TFormFields> |\n FormFieldDefinitionSelectMultiple<TFormFields> |\n FormFieldDefinitionSwitch<TFormFields> |\n FormFieldDefinitionTextField<TFormFields> |\n FormFieldDefinitionTransferList<TFormFields>;\nexport type FormFieldDefinitionAutocomplete<TFormFields extends FieldValues, TName extends Path<TFormFields> = Path<TFormFields>> = { definition: FORM_FIELD_DEFINITION_TYPE.AUTOCOMPLETE; multiple?: false } & AutocompleteProps<TFormFields, TName, false> & BaseFormFieldDefinition & FormFieldGrouping;\nexport type FormFieldDefinitionAutocompleteMultiple<TFormFields extends FieldValues, TName extends Path<TFormFields> = Path<TFormFields>> = { definition: FORM_FIELD_DEFINITION_TYPE.AUTOCOMPLETE; multiple?: true } & AutocompleteProps<TFormFields, TName, true> & BaseFormFieldDefinition & FormFieldGrouping;\nexport type FormFieldDefinitionBoolean<TFormFields extends FieldValues> = { definition: FORM_FIELD_DEFINITION_TYPE.BOOLEAN } & BaseFormFieldDefinition & FormFieldGrouping & Omit<SelectProps<TFormFields, Path<TFormFields>, false>, 'options'>;\nexport type FormFieldDefinitionBooleanSwitch<TFormFields extends FieldValues> = { definition: FORM_FIELD_DEFINITION_TYPE.BOOLEAN_SWITCH } & BaseFormFieldDefinition & FormFieldGrouping & Omit<SwitchProps<TFormFields, Path<TFormFields>>, 'options'>;\nexport type FormFieldDefinitionDate<TFormFields extends FieldValues> = { definition: FORM_FIELD_DEFINITION_TYPE.DATE } & BaseFormFieldDefinition & DatePickerProps<TFormFields, Path<TFormFields>> & FormFieldGrouping;\nexport type FormFieldDefinitionFile<TFormFields extends FieldValues> = { definition: FORM_FIELD_DEFINITION_TYPE.FILE } & BaseFormFieldDefinition & FileUploadProps<TFormFields, Path<TFormFields>> & FormFieldGrouping;\nexport type FormFieldDefinitionHidden<TFormFields extends FieldValues> = { definition: FORM_FIELD_DEFINITION_TYPE.HIDDEN } & BaseFormFieldDefinition & FormFieldGrouping & TextFieldProps<TFormFields, Path<TFormFields>>;\nexport type FormFieldDefinitionNumber<TFormFields extends FieldValues> = { definition: FORM_FIELD_DEFINITION_TYPE.NUMBER } & BaseFormFieldDefinition & FormFieldGrouping & NumberFieldProps<TFormFields, Path<TFormFields>>;\nexport type FormFieldDefinitionRadioGroup<TFormFields extends FieldValues> = { definition: FORM_FIELD_DEFINITION_TYPE.RADIO_GROUP } & BaseFormFieldDefinition & FormFieldGrouping & RadioGroupProps<TFormFields, Path<TFormFields>>;\nexport type FormFieldDefinitionRichText<TFormFields extends FieldValues> = { definition: FORM_FIELD_DEFINITION_TYPE.RICH_TEXT } & BaseFormFieldDefinition & FormFieldGrouping & RichTextEditorProps<TFormFields, Path<TFormFields>>;\nexport type FormFieldDefinitionSelect<TFormFields extends FieldValues> = { definition: FORM_FIELD_DEFINITION_TYPE.SELECT; multiple?: false } & BaseFormFieldDefinition & FormFieldGrouping & SelectProps<TFormFields, Path<TFormFields>, false>;\nexport type FormFieldDefinitionSelectMultiple<TFormFields extends FieldValues> = { definition: FORM_FIELD_DEFINITION_TYPE.SELECT; multiple?: true } & BaseFormFieldDefinition & FormFieldGrouping & SelectProps<TFormFields, Path<TFormFields>, true>;\nexport type FormFieldDefinitionSwitch<TFormFields extends FieldValues> = { definition: FORM_FIELD_DEFINITION_TYPE.SWITCH } & BaseFormFieldDefinition & FormFieldGrouping & SwitchProps<TFormFields, Path<TFormFields>>;\nexport type FormFieldDefinitionTextField<TFormFields extends FieldValues> = { definition: FORM_FIELD_DEFINITION_TYPE.TEXTFIELD } & BaseFormFieldDefinition & FormFieldGrouping & TextFieldProps<TFormFields, Path<TFormFields>>;\nexport type FormFieldDefinitionTransferList<TFormFields extends FieldValues> = { definition: FORM_FIELD_DEFINITION_TYPE.TRANSFER_LIST } & BaseFormFieldDefinition & FormFieldGrouping & TransferListProps<TFormFields, Path<TFormFields>>;\nexport type FormFieldGrouping = {\n groupKey?: string;\n};\nexport type FormGroupDefinition = {\n contentAfter?: ReactElement;\n contentBefore?: ReactElement;\n description?: string;\n groupKey: string;\n label: string;\n messages?: FormGroupMessage[];\n};\nexport type FormGroupMessage = {\n buttonLabel?: string;\n message: string;\n onButtonClick?: () => void;\n severity: 'error' | 'info' | 'warning';\n};\nexport interface OptionBase<TValue> {\n disabled?: boolean;\n label?: string;\n secondaryLabel?: string;\n value?: TValue;\n}\nexport type RadioButtonOption<TValue = void> = OptionBase<TValue extends void ? (boolean | number | string) : TValue>;\nexport type SelectOption<TValue = void> = OptionBase<TValue extends void ? (boolean | number | string) : TValue>;\nexport type ToggleButtonOption<TValue = void> = OptionBase<TValue extends void ? (boolean | number | string) : TValue>;\nexport type TransferListOption = OptionBase<string>;\n\n// Distributes over each field name so `onChange`'s value type resolves to the concrete\n// `TFormFields[TName]` per field instead of collapsing to `unknown` for the whole `Path<TFormFields>` union.\ntype FormFieldDefinitionAutocompleteForName<TFormFields extends FieldValues> = {\n [TName in Path<TFormFields>]: FormFieldDefinitionAutocomplete<TFormFields, TName> | FormFieldDefinitionAutocompleteMultiple<TFormFields, TName>;\n}[Path<TFormFields>];\n"],"mappings":";AAiBA,IAAY,IAAL,yBAAA,GAAA;QACL,EAAA,eAAA,gBACA,EAAA,UAAA,WACA,EAAA,iBAAA,kBACA,EAAA,OAAA,QACA,EAAA,OAAA,QACA,EAAA,SAAA,UACA,EAAA,SAAA,UACA,EAAA,cAAA,eACA,EAAA,YAAA,aACA,EAAA,SAAA,UACA,EAAA,SAAA,UACA,EAAA,YAAA,aACA,EAAA,gBAAA;AACF,EAAA,CAAA,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,23 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gen-epix/ui-core-form",
|
|
3
|
-
"version": "4.0
|
|
4
|
-
"
|
|
3
|
+
"version": "4.2.0",
|
|
4
|
+
"homepage": "https://github.com/RIVM-bioinformatics/gen-epix",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/RIVM-bioinformatics/gen-epix-ui.git"
|
|
8
8
|
},
|
|
9
|
+
"license": "EUPL-1.2",
|
|
9
10
|
"author": "RIVM-bioinformatics <ids-bioinformatics@rivm.nl>",
|
|
10
|
-
"homepage": "https://github.com/RIVM-bioinformatics/gen-epix",
|
|
11
11
|
"type": "module",
|
|
12
|
-
"files": [
|
|
13
|
-
"dist"
|
|
14
|
-
],
|
|
15
|
-
"publishConfig": {
|
|
16
|
-
"files": [
|
|
17
|
-
"dist"
|
|
18
|
-
],
|
|
19
|
-
"access": "public"
|
|
20
|
-
},
|
|
21
12
|
"exports": {
|
|
22
13
|
"./types": {
|
|
23
14
|
"types": "./dist/@types/ui-core-form.d.ts",
|
|
@@ -39,6 +30,10 @@
|
|
|
39
30
|
"types": "./dist/components/fields/DateRangePicker/index.d.ts",
|
|
40
31
|
"import": "./dist/components/fields/DateRangePicker/index.js"
|
|
41
32
|
},
|
|
33
|
+
"./components/fields/FileUpload": {
|
|
34
|
+
"types": "./dist/components/fields/FileUpload/index.d.ts",
|
|
35
|
+
"import": "./dist/components/fields/FileUpload/index.js"
|
|
36
|
+
},
|
|
42
37
|
"./components/fields/NumberField": {
|
|
43
38
|
"types": "./dist/components/fields/NumberField/index.d.ts",
|
|
44
39
|
"import": "./dist/components/fields/NumberField/index.js"
|
|
@@ -75,10 +70,6 @@
|
|
|
75
70
|
"types": "./dist/components/fields/TransferList/index.d.ts",
|
|
76
71
|
"import": "./dist/components/fields/TransferList/index.js"
|
|
77
72
|
},
|
|
78
|
-
"./components/fields/UploadButton": {
|
|
79
|
-
"types": "./dist/components/fields/UploadButton/index.d.ts",
|
|
80
|
-
"import": "./dist/components/fields/UploadButton/index.js"
|
|
81
|
-
},
|
|
82
73
|
"./components/helpers/FormFieldHelperText": {
|
|
83
74
|
"types": "./dist/components/helpers/FormFieldHelperText/index.d.ts",
|
|
84
75
|
"import": "./dist/components/helpers/FormFieldHelperText/index.js"
|
|
@@ -112,96 +103,108 @@
|
|
|
112
103
|
"import": "./dist/utils/SchemaUtil/index.js"
|
|
113
104
|
}
|
|
114
105
|
},
|
|
115
|
-
"
|
|
116
|
-
"
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
"
|
|
120
|
-
|
|
121
|
-
"react": "*",
|
|
122
|
-
"react-i18next": "*",
|
|
123
|
-
"yup": "*"
|
|
124
|
-
},
|
|
106
|
+
"files": [
|
|
107
|
+
"dist"
|
|
108
|
+
],
|
|
109
|
+
"browserslist": [
|
|
110
|
+
"last 2 Chrome versions"
|
|
111
|
+
],
|
|
125
112
|
"dependencies": {
|
|
126
|
-
"@tiptap/core": "3.31.
|
|
127
|
-
"@tiptap/extension-blockquote": "3.31.
|
|
128
|
-
"@tiptap/extension-bold": "3.31.
|
|
129
|
-
"@tiptap/extension-bullet-list": "3.31.
|
|
130
|
-
"@tiptap/extension-code-block": "3.31.
|
|
131
|
-
"@tiptap/extension-color": "3.31.
|
|
132
|
-
"@tiptap/extension-document": "3.31.
|
|
133
|
-
"@tiptap/extension-dropcursor": "3.31.
|
|
134
|
-
"@tiptap/extension-font-family": "3.31.
|
|
135
|
-
"@tiptap/extension-gapcursor": "3.31.
|
|
136
|
-
"@tiptap/extension-hard-break": "3.31.
|
|
137
|
-
"@tiptap/extension-heading": "3.31.
|
|
138
|
-
"@tiptap/extension-highlight": "3.31.
|
|
139
|
-
"@tiptap/extension-history": "3.31.
|
|
140
|
-
"@tiptap/extension-horizontal-rule": "3.31.
|
|
141
|
-
"@tiptap/extension-image": "3.31.
|
|
142
|
-
"@tiptap/extension-italic": "3.31.
|
|
143
|
-
"@tiptap/extension-link": "3.31.
|
|
144
|
-
"@tiptap/extension-list-item": "3.31.
|
|
145
|
-
"@tiptap/extension-ordered-list": "3.31.
|
|
146
|
-
"@tiptap/extension-paragraph": "3.31.
|
|
147
|
-
"@tiptap/extension-placeholder": "3.31.
|
|
148
|
-
"@tiptap/extension-strike": "3.31.
|
|
149
|
-
"@tiptap/extension-subscript": "3.31.
|
|
150
|
-
"@tiptap/extension-superscript": "3.31.
|
|
151
|
-
"@tiptap/extension-table
|
|
152
|
-
"@tiptap/extension-table-
|
|
153
|
-
"@tiptap/extension-table-
|
|
154
|
-
"@tiptap/extension-table": "3.31.
|
|
155
|
-
"@tiptap/extension-task-item": "3.31.
|
|
156
|
-
"@tiptap/extension-task-list": "3.31.
|
|
157
|
-
"@tiptap/extension-text
|
|
158
|
-
"@tiptap/extension-text-
|
|
159
|
-
"@tiptap/extension-text": "3.31.
|
|
160
|
-
"@tiptap/extension-underline": "3.31.
|
|
161
|
-
"@tiptap/pm": "3.31.
|
|
162
|
-
"@tiptap/react": "3.31.
|
|
113
|
+
"@tiptap/core": "3.31.3",
|
|
114
|
+
"@tiptap/extension-blockquote": "3.31.3",
|
|
115
|
+
"@tiptap/extension-bold": "3.31.3",
|
|
116
|
+
"@tiptap/extension-bullet-list": "3.31.3",
|
|
117
|
+
"@tiptap/extension-code-block": "3.31.3",
|
|
118
|
+
"@tiptap/extension-color": "3.31.3",
|
|
119
|
+
"@tiptap/extension-document": "3.31.3",
|
|
120
|
+
"@tiptap/extension-dropcursor": "3.31.3",
|
|
121
|
+
"@tiptap/extension-font-family": "3.31.3",
|
|
122
|
+
"@tiptap/extension-gapcursor": "3.31.3",
|
|
123
|
+
"@tiptap/extension-hard-break": "3.31.3",
|
|
124
|
+
"@tiptap/extension-heading": "3.31.3",
|
|
125
|
+
"@tiptap/extension-highlight": "3.31.3",
|
|
126
|
+
"@tiptap/extension-history": "3.31.3",
|
|
127
|
+
"@tiptap/extension-horizontal-rule": "3.31.3",
|
|
128
|
+
"@tiptap/extension-image": "3.31.3",
|
|
129
|
+
"@tiptap/extension-italic": "3.31.3",
|
|
130
|
+
"@tiptap/extension-link": "3.31.3",
|
|
131
|
+
"@tiptap/extension-list-item": "3.31.3",
|
|
132
|
+
"@tiptap/extension-ordered-list": "3.31.3",
|
|
133
|
+
"@tiptap/extension-paragraph": "3.31.3",
|
|
134
|
+
"@tiptap/extension-placeholder": "3.31.3",
|
|
135
|
+
"@tiptap/extension-strike": "3.31.3",
|
|
136
|
+
"@tiptap/extension-subscript": "3.31.3",
|
|
137
|
+
"@tiptap/extension-superscript": "3.31.3",
|
|
138
|
+
"@tiptap/extension-table": "3.31.3",
|
|
139
|
+
"@tiptap/extension-table-cell": "3.31.3",
|
|
140
|
+
"@tiptap/extension-table-header": "3.31.3",
|
|
141
|
+
"@tiptap/extension-table-row": "3.31.3",
|
|
142
|
+
"@tiptap/extension-task-item": "3.31.3",
|
|
143
|
+
"@tiptap/extension-task-list": "3.31.3",
|
|
144
|
+
"@tiptap/extension-text": "3.31.3",
|
|
145
|
+
"@tiptap/extension-text-align": "3.31.3",
|
|
146
|
+
"@tiptap/extension-text-style": "3.31.3",
|
|
147
|
+
"@tiptap/extension-underline": "3.31.3",
|
|
148
|
+
"@tiptap/pm": "3.31.3",
|
|
149
|
+
"@tiptap/react": "3.31.3",
|
|
163
150
|
"classnames": "2.5.1",
|
|
164
151
|
"date-fns": "4.4.0",
|
|
165
152
|
"lodash": "4.18.1",
|
|
166
153
|
"mui-tiptap": "1.31.0",
|
|
167
|
-
"react-hook-form": "7.87.0",
|
|
168
154
|
"use-debounce": "10.1.1",
|
|
169
155
|
"uuid": "14.0.2"
|
|
170
156
|
},
|
|
171
157
|
"devDependencies": {
|
|
172
158
|
"@gen-epix/eslint-config": "0.5.0",
|
|
173
|
-
"@gen-epix/ui-core": "^3.0.2",
|
|
174
159
|
"@gen-epix/translation-util": "0.2.0",
|
|
160
|
+
"@gen-epix/ui-core": "^3.2.0",
|
|
161
|
+
"@gen-epix/ui-core-components": "^4.2.0",
|
|
175
162
|
"@mui/icons-material": "9.4.0",
|
|
176
163
|
"@mui/material": "9.4.0",
|
|
177
|
-
"@mui/x-date-pickers": "9.
|
|
164
|
+
"@mui/x-date-pickers": "9.13.0",
|
|
178
165
|
"@types/lodash": "4.17.25",
|
|
179
|
-
"@types/react": "19.
|
|
180
|
-
"eslint": "10.
|
|
181
|
-
"i18next": "26.4.
|
|
182
|
-
"react": "19.
|
|
166
|
+
"@types/react": "19.3.0",
|
|
167
|
+
"eslint": "10.10.0",
|
|
168
|
+
"i18next": "26.4.2",
|
|
169
|
+
"react": "19.3.0",
|
|
170
|
+
"react-hook-form": "7.87.0",
|
|
183
171
|
"react-i18next": "17.0.13",
|
|
184
172
|
"typescript": "6.0.3",
|
|
173
|
+
"vite": "8.2.2",
|
|
185
174
|
"vite-plugin-dts": "5.1.0",
|
|
186
175
|
"vite-plugin-static-copy": "4.1.1",
|
|
187
|
-
"
|
|
188
|
-
"vitest": "4.1.11",
|
|
176
|
+
"vitest": "5.0.0",
|
|
189
177
|
"yup": "1.7.1"
|
|
190
178
|
},
|
|
191
|
-
"
|
|
192
|
-
"
|
|
193
|
-
|
|
179
|
+
"peerDependencies": {
|
|
180
|
+
"@gen-epix/ui-core": "^3.2.0",
|
|
181
|
+
"@gen-epix/ui-core-components": "^4.2.0",
|
|
182
|
+
"@mui/icons-material": "*",
|
|
183
|
+
"@mui/material": "*",
|
|
184
|
+
"@mui/x-date-pickers": "*",
|
|
185
|
+
"i18next": "*",
|
|
186
|
+
"react": "*",
|
|
187
|
+
"react-hook-form": "*",
|
|
188
|
+
"react-i18next": "*",
|
|
189
|
+
"yup": "*"
|
|
190
|
+
},
|
|
191
|
+
"publishConfig": {
|
|
192
|
+
"access": "public",
|
|
193
|
+
"files": [
|
|
194
|
+
"dist"
|
|
195
|
+
]
|
|
196
|
+
},
|
|
194
197
|
"scripts": {
|
|
195
|
-
"test-missing-translations": "translation-util ./ --dry-run --fail-on-missing --fail-on-stale",
|
|
196
198
|
"add-missing-translations": "translation-util ./",
|
|
197
|
-
"update-exports": "node scripts/update-exports.js",
|
|
198
199
|
"build": "vite build",
|
|
199
200
|
"build-publish": "pnpm build && pnpm publish --access=public",
|
|
200
|
-
"
|
|
201
|
-
"test": "vitest --coverage",
|
|
202
|
-
"test-run": "vitest run --passWithNoTests --coverage",
|
|
201
|
+
"check-types": "tsc --noemit",
|
|
203
202
|
"lint": "eslint ./src --report-unused-disable-directives --max-warnings 0",
|
|
204
203
|
"lint-fix": "eslint ./src --report-unused-disable-directives --max-warnings 0 --fix",
|
|
205
|
-
"
|
|
204
|
+
"test": "vitest --coverage",
|
|
205
|
+
"test-missing-translations": "translation-util ./ --dry-run --fail-on-missing --fail-on-stale",
|
|
206
|
+
"test-run": "vitest run --passWithNoTests --coverage",
|
|
207
|
+
"update-exports": "node scripts/update-exports.js",
|
|
208
|
+
"validate": "pnpm run lint && pnpm run check-types && pnpm run test-run"
|
|
206
209
|
}
|
|
207
210
|
}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./FormUtil.js";
|
|
2
|
-
import { i as t, t as n } from "./index.esm.js";
|
|
3
|
-
import { FormFieldHelperText as r } from "../components/helpers/FormFieldHelperText/index.js";
|
|
4
|
-
import { useCallback as i, useId as a, useRef as o } from "react";
|
|
5
|
-
import { useTranslation as s } from "react-i18next";
|
|
6
|
-
import { Box as c, Button as l, FormControl as u, FormHelperText as d, FormLabel as f, styled as p } from "@mui/material";
|
|
7
|
-
import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
8
|
-
import { TestIdUtil as _ } from "@gen-epix/ui-core/utils/TestIdUtil";
|
|
9
|
-
import v from "@mui/icons-material/CloudUpload";
|
|
10
|
-
import { WindowService as y } from "@gen-epix/ui-core/classes/services/WindowService";
|
|
11
|
-
//#region src/components/fields/UploadButton/UploadButton.tsx
|
|
12
|
-
var b = p("input")({
|
|
13
|
-
bottom: 0,
|
|
14
|
-
clip: "rect(0 0 0 0)",
|
|
15
|
-
clipPath: "inset(50%)",
|
|
16
|
-
height: 1,
|
|
17
|
-
left: 0,
|
|
18
|
-
overflow: "hidden",
|
|
19
|
-
position: "absolute",
|
|
20
|
-
whiteSpace: "nowrap",
|
|
21
|
-
width: 1
|
|
22
|
-
}), x = ({ accept: p, disabled: x, infoMessage: S, label: C, multiple: w = !1, name: T, onChange: E, required: D, warningMessage: O }) => {
|
|
23
|
-
let { t: k } = s(), A = a(), j = a(), { control: M, formState: { errors: N } } = t(), P = e.getFieldErrorMessage(N, T), F = o(null), I = !!P, L = i((e) => (t) => {
|
|
24
|
-
E && E(t.target.files), e(t.target.files);
|
|
25
|
-
}, [E]), R = i(({ field: { onBlur: e, onChange: t, ref: n, value: r } }) => {
|
|
26
|
-
n({ focus: () => {
|
|
27
|
-
F?.current?.focus();
|
|
28
|
-
} });
|
|
29
|
-
let i = y.getInstance().document.getElementById(j);
|
|
30
|
-
return !r && i && (i.value = ""), /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ g(l, {
|
|
31
|
-
component: "label",
|
|
32
|
-
disabled: x,
|
|
33
|
-
onBlur: e,
|
|
34
|
-
role: void 0,
|
|
35
|
-
size: "large",
|
|
36
|
-
startIcon: /* @__PURE__ */ h(v, {}),
|
|
37
|
-
sx: { height: (e) => e.spacing(7) },
|
|
38
|
-
tabIndex: -1,
|
|
39
|
-
variant: "outlined",
|
|
40
|
-
children: [k(w ? "Upload files ({{accept}})" : "Upload file ({{accept}})", { accept: p.split(",").join(", ") }), /* @__PURE__ */ h(b, {
|
|
41
|
-
accept: p,
|
|
42
|
-
id: j,
|
|
43
|
-
multiple: w,
|
|
44
|
-
onChange: L(t),
|
|
45
|
-
type: "file"
|
|
46
|
-
})]
|
|
47
|
-
}), r && /* @__PURE__ */ h(c, { children: Array.from(r).map((e) => e.name).join(", ") })] });
|
|
48
|
-
}, [
|
|
49
|
-
p,
|
|
50
|
-
x,
|
|
51
|
-
j,
|
|
52
|
-
w,
|
|
53
|
-
L,
|
|
54
|
-
k
|
|
55
|
-
]);
|
|
56
|
-
return /* @__PURE__ */ g(u, {
|
|
57
|
-
error: I,
|
|
58
|
-
..._.createAttributes("UploadButton", {
|
|
59
|
-
label: C,
|
|
60
|
-
name: T
|
|
61
|
-
}),
|
|
62
|
-
fullWidth: !0,
|
|
63
|
-
children: [
|
|
64
|
-
/* @__PURE__ */ h(f, {
|
|
65
|
-
component: "legend",
|
|
66
|
-
id: A,
|
|
67
|
-
required: D,
|
|
68
|
-
children: C
|
|
69
|
-
}),
|
|
70
|
-
/* @__PURE__ */ h(n, {
|
|
71
|
-
control: M,
|
|
72
|
-
defaultValue: null,
|
|
73
|
-
name: T,
|
|
74
|
-
render: R
|
|
75
|
-
}),
|
|
76
|
-
/* @__PURE__ */ h(d, {
|
|
77
|
-
sx: { ml: 0 },
|
|
78
|
-
children: /* @__PURE__ */ h(r, {
|
|
79
|
-
errorMessage: P,
|
|
80
|
-
infoMessage: S,
|
|
81
|
-
noIndent: !0,
|
|
82
|
-
warningMessage: O
|
|
83
|
-
})
|
|
84
|
-
})
|
|
85
|
-
]
|
|
86
|
-
});
|
|
87
|
-
};
|
|
88
|
-
//#endregion
|
|
89
|
-
export { x as t };
|
|
90
|
-
|
|
91
|
-
//# sourceMappingURL=UploadButton.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"UploadButton.js","names":[],"sources":["../../src/components/fields/UploadButton/UploadButton.tsx"],"sourcesContent":["import type {\n ChangeEvent,\n ReactElement,\n} from 'react';\nimport {\n useCallback,\n useId,\n useRef,\n} from 'react';\nimport {\n Box,\n Button,\n FormControl,\n FormHelperText,\n FormLabel,\n styled,\n} from '@mui/material';\nimport {\n Controller,\n useFormContext,\n} from 'react-hook-form';\nimport type {\n ControllerRenderProps,\n FieldValues,\n Path,\n UseControllerReturn,\n} from 'react-hook-form';\nimport CloudUploadIcon from '@mui/icons-material/CloudUpload';\nimport { useTranslation } from 'react-i18next';\nimport { TestIdUtil } from '@gen-epix/ui-core/utils/TestIdUtil';\nimport { WindowService } from '@gen-epix/ui-core/classes/services/WindowService';\n\nimport { FormUtil } from '../../../utils/FormUtil';\nimport { FormFieldHelperText } from '../../helpers/FormFieldHelperText';\n\nexport type UploadButtonProps<TFieldValues extends FieldValues, TName extends Path<TFieldValues> = Path<TFieldValues>> = {\n readonly accept: string;\n readonly disabled?: boolean;\n readonly infoMessage?: string;\n readonly label: string;\n readonly loading?: boolean; // NOT implemented\n readonly multiple?: boolean;\n readonly name: TName;\n readonly onChange?: (value: FileList) => void;\n readonly required?: boolean;\n readonly warningMessage?: string;\n};\n\nconst VisuallyHiddenInput = styled('input')({\n bottom: 0,\n clip: 'rect(0 0 0 0)',\n clipPath: 'inset(50%)',\n height: 1,\n left: 0,\n overflow: 'hidden',\n position: 'absolute',\n whiteSpace: 'nowrap',\n width: 1,\n});\n\nexport const UploadButton = <TFieldValues extends FieldValues, TName extends Path<TFieldValues> = Path<TFieldValues>>({\n accept,\n disabled,\n infoMessage,\n label,\n multiple = false,\n name,\n onChange: onChangeProp,\n required,\n warningMessage,\n}: UploadButtonProps<TFieldValues, TName>): ReactElement => {\n const { t } = useTranslation();\n const id = useId();\n const inputId = useId();\n const { control, formState: { errors } } = useFormContext<TFieldValues>();\n const errorMessage = FormUtil.getFieldErrorMessage(errors, name);\n\n const buttonRef = useRef<HTMLButtonElement>(null);\n const hasError = !!errorMessage;\n\n const onInputChange = useCallback((onChange: ControllerRenderProps<TFieldValues, TName>['onChange']) =>\n (event: ChangeEvent<HTMLInputElement>) => {\n if (onChangeProp) {\n onChangeProp(event.target.files);\n }\n onChange(event.target.files);\n }\n , [onChangeProp]);\n\n const renderController = useCallback(({ field: { onBlur, onChange, ref, value } }: UseControllerReturn<TFieldValues, TName>) => {\n ref({\n focus: () => {\n buttonRef?.current?.focus();\n },\n });\n const inputElement = WindowService.getInstance().document.getElementById(inputId) as HTMLInputElement | null;\n if (!value && inputElement) {\n inputElement.value = '';\n }\n return (\n <>\n <Button\n component={'label'}\n // ref={buttonRef}\n disabled={disabled}\n onBlur={onBlur}\n role={undefined}\n size={'large'}\n startIcon={<CloudUploadIcon />}\n sx={{\n height: theme => theme.spacing(7),\n }}\n tabIndex={-1}\n variant={'outlined'}\n >\n {multiple ? t('Upload files ({{accept}})', { accept: accept.split(',').join(', ') }) : t('Upload file ({{accept}})', { accept: accept.split(',').join(', ') })}\n <VisuallyHiddenInput\n accept={accept}\n id={inputId}\n multiple={multiple}\n onChange={onInputChange(onChange)}\n type={'file'}\n />\n </Button>\n {value && (\n <Box>\n {Array.from(value as unknown as FileList).map((file) => file.name).join(', ')}\n </Box>\n )}\n </>\n );\n }, [accept, disabled, inputId, multiple, onInputChange, t]);\n\n return (\n <FormControl\n error={hasError}\n {...TestIdUtil.createAttributes('UploadButton', { label, name })}\n fullWidth\n >\n <FormLabel\n component={'legend'}\n id={id}\n required={required}\n >\n {label}\n </FormLabel>\n <Controller\n control={control}\n defaultValue={null}\n name={name}\n render={renderController}\n />\n <FormHelperText sx={{ ml: 0 }}>\n <FormFieldHelperText\n errorMessage={errorMessage}\n infoMessage={infoMessage}\n noIndent\n warningMessage={warningMessage}\n />\n </FormHelperText>\n </FormControl>\n );\n};\n"],"mappings":";;;;;;;;;;;AAgDA,IAAM,IAAsB,EAAO,OAAO,CAAC,CAAC;CAC1C,QAAQ;CACR,MAAM;CACN,UAAU;CACV,QAAQ;CACR,MAAM;CACN,UAAU;CACV,UAAU;CACV,YAAY;CACZ,OAAO;AACT,CAAC,GAEY,KAAyG,EACpH,WACA,aACA,gBACA,UACA,cAAW,IACX,SACA,UAAU,GACV,aACA,wBAC0D;CAC1D,IAAM,EAAE,SAAM,EAAe,GACvB,IAAK,EAAM,GACX,IAAU,EAAM,GAChB,EAAE,YAAS,WAAW,EAAE,gBAAa,EAA6B,GAClE,IAAe,EAAS,qBAAqB,GAAQ,CAAI,GAEzD,IAAY,EAA0B,IAAI,GAC1C,IAAW,CAAC,CAAC,GAEb,IAAgB,GAAa,OAChC,MAAyC;EAIxC,AAHI,KACF,EAAa,EAAM,OAAO,KAAK,GAEjC,EAAS,EAAM,OAAO,KAAK;CAC7B,GACA,CAAC,CAAY,CAAC,GAEV,IAAmB,GAAa,EAAE,OAAO,EAAE,WAAQ,aAAU,QAAK,iBAAwD;EAC9H,EAAI,EACF,aAAa;GACX,GAAW,SAAS,MAAM;EAC5B,EACF,CAAC;EACD,IAAM,IAAe,EAAc,YAAY,CAAC,CAAC,SAAS,eAAe,CAAO;EAIhF,OAHI,CAAC,KAAS,MACZ,EAAa,QAAQ,KAGrB,kBAAA,GAAA,EAAA,UAAA,CACE,kBAAC,GAAD;GACE,WAAW;GAED;GACF;GACR,MAAM,KAAA;GACN,MAAM;GACN,WAAW,kBAAC,GAAD,CAAkB,CAAA;GAC7B,IAAI,EACF,SAAQ,MAAS,EAAM,QAAQ,CAAC,EAClC;GACA,UAAU;GACV,SAAS;GAZX,UAAA,CAcc,EAAX,IAAa,8BAA2E,4BAA9C,EAAE,QAAQ,EAAO,MAAM,GAAG,CAAC,CAAC,KAAK,IAAI,EAAE,CAA2E,GAC7J,kBAAC,GAAD;IACU;IACR,IAAI;IACM;IACV,UAAU,EAAc,CAAQ;IAChC,MAAM;GACP,CAAA,CACK;EACP,CAAA,GAAA,KACC,kBAAC,GAAD,EAAA,UACG,MAAM,KAAK,CAA4B,CAAC,CAAC,KAAK,MAAS,EAAK,IAAI,CAAC,CAAC,KAAK,IAAI,EACzE,CAAA,CAEP,EAAA,CAAA;CAEN,GAAG;EAAC;EAAQ;EAAU;EAAS;EAAU;EAAe;CAAC,CAAC;CAE1D,OACE,kBAAC,GAAD;EACE,OAAO;EACP,GAAI,EAAW,iBAAiB,gBAAgB;GAAE;GAAO;EAAK,CAAC;EAC/D,WAAA;EAHF,UAAA;GAKE,kBAAC,GAAD;IACE,WAAW;IACP;IACM;IAET,UAAA;GACQ,CAAA;GACX,kBAAC,GAAD;IACW;IACT,cAAc;IACR;IACN,QAAQ;GACT,CAAA;GACD,kBAAC,GAAD;IAAgB,IAAI,EAAE,IAAI,EAAE;IAC1B,UAAA,kBAAC,GAAD;KACgB;KACD;KACb,UAAA;KACgB;IACjB,CAAA;GACa,CAAA;EACL;;AAEjB"}
|