@povio/ui 3.3.0-rc.4 → 3.4.0-rc.1
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/README.md +15 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.js +55 -206
- package/dist/components/buttons/InlineIconButton/InlineIconButton.js +9 -34
- package/dist/components/buttons/shared/ButtonContent.js +22 -80
- package/dist/components/inputs/Checkbox/Checkbox.d.ts +1 -2
- package/dist/components/inputs/Checkbox/Checkbox.js +93 -100
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +10 -24
- package/dist/components/inputs/Checkbox/CheckboxGroup.d.ts +1 -2
- package/dist/components/inputs/Checkbox/CheckboxGroup.js +109 -113
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +1 -2
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +97 -238
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +1 -2
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +88 -214
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +1 -2
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +64 -143
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +1 -2
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +275 -294
- package/dist/components/inputs/DateTime/shared/Calendar.js +139 -339
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +114 -308
- package/dist/components/inputs/DateTime/shared/CalendarGrid.js +35 -150
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +95 -229
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +115 -296
- package/dist/components/inputs/DateTime/shared/DateField.js +135 -306
- package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +1 -2
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +136 -343
- package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +10 -59
- package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +1 -2
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +43 -46
- package/dist/components/inputs/File/FileUpload.d.ts +1 -1
- package/dist/components/inputs/File/FileUpload.js +18 -18
- package/dist/components/inputs/File/InputUpload.d.ts +1 -1
- package/dist/components/inputs/File/InputUpload.js +82 -278
- package/dist/components/inputs/File/fileUpload.types.d.ts +1 -1
- package/dist/components/inputs/File/inputUpload.types.d.ts +1 -1
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +48 -180
- package/dist/components/inputs/File/shared/FileUploadContentError.js +95 -265
- package/dist/components/inputs/File/shared/FileUploadContentFilled.js +99 -261
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +56 -234
- package/dist/components/inputs/File/shared/ProgressBar.js +15 -102
- package/dist/components/inputs/FormField/FormField.js +34 -47
- package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +1 -1
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +19 -19
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +1 -1
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +93 -331
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.d.ts +1 -1
- package/dist/components/inputs/Input/TextArea/TextArea.d.ts +1 -1
- package/dist/components/inputs/Input/TextArea/TextArea.js +18 -18
- package/dist/components/inputs/Input/TextInput/TextInput.d.ts +2 -2
- package/dist/components/inputs/Input/TextInput/TextInput.js +36 -38
- package/dist/components/inputs/Inputs/Form.d.ts +4 -4
- package/dist/components/inputs/Inputs/InputItem.d.ts +22 -22
- package/dist/components/inputs/Inputs/InputItem.js +35 -36
- package/dist/components/inputs/Inputs/Inputs.d.ts +2 -2
- package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +1 -2
- package/dist/components/inputs/RadioGroup/RadioGroup.js +107 -111
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +1 -1
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +26 -86
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +1 -1
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +19 -19
- package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +1 -1
- package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +1 -1
- package/dist/components/inputs/Selection/Select/QuerySelect.js +49 -115
- package/dist/components/inputs/Selection/Select/Select.d.ts +1 -1
- package/dist/components/inputs/Selection/Select/Select.js +22 -22
- package/dist/components/inputs/Selection/shared/SelectBase.d.ts +0 -1
- package/dist/components/inputs/Selection/shared/SelectBase.js +34 -37
- package/dist/components/inputs/Selection/shared/SelectInput.js +1 -0
- package/dist/components/inputs/Selection/shared/SelectListBox.js +51 -163
- package/dist/components/inputs/Selection/shared/select.context.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/select.context.js +4 -8
- package/dist/components/inputs/Selection/shared/select.types.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/useSelectItems.js +48 -108
- package/dist/components/inputs/Skeleton/InputFrame.js +177 -552
- package/dist/components/inputs/Slider/Slider.d.ts +1 -1
- package/dist/components/inputs/Slider/Slider.js +18 -18
- package/dist/components/inputs/TextEditor/TextEditor.d.ts +1 -1
- package/dist/components/inputs/TextEditor/TextEditor.js +105 -407
- package/dist/components/inputs/Toggle/Toggle.d.ts +1 -2
- package/dist/components/inputs/Toggle/Toggle.js +59 -63
- package/dist/components/inputs/shared/InputClear.js +24 -40
- package/dist/components/inputs/shared/form.binding.d.ts +27 -0
- package/dist/components/inputs/shared/form.binding.js +57 -0
- package/dist/components/inputs/shared/form.types.d.ts +9 -8
- package/dist/components/inputs/shared/form.types.js +8 -0
- package/dist/components/navigation/Accordion/Accordion.js +22 -69
- package/dist/components/navigation/Accordion/AccordionItem.js +41 -86
- package/dist/components/navigation/Stepper/Stepper.js +22 -67
- package/dist/components/overlays/ActionModal/ActionModal.js +35 -169
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +29 -110
- package/dist/components/segment/Segment.d.ts +1 -1
- package/dist/components/segment/Segment.js +17 -17
- package/dist/components/segment/segment.types.d.ts +1 -1
- package/dist/components/shared/pagination/Pagination.js +22 -108
- package/dist/components/status/Alert/Alert.js +30 -97
- package/dist/components/table/InfiniteTable.js +16 -67
- package/dist/components/table/Table.d.ts +2 -8
- package/dist/components/table/Table.js +33 -55
- package/dist/components/text/Typography/Typography.js +8 -23
- package/dist/config/confirmation.context.js +1 -1
- package/dist/config/theme.context.js +45 -98
- package/dist/config/uiConfig.context.d.ts +5 -5
- package/dist/config/uiConfig.context.js +11 -51
- package/dist/config/uiOverrides.context.d.ts +0 -1
- package/dist/helpers/dynamicColumns.d.ts +1 -1
- package/dist/helpers/dynamicInputs.d.ts +7 -7
- package/dist/hooks/useAutosave.d.ts +4 -4
- package/dist/hooks/useAutosave.js +64 -49
- package/dist/hooks/useDebounceCallback.js +17 -51
- package/dist/hooks/useForm.d.ts +39 -15
- package/dist/hooks/useForm.js +96 -43
- package/dist/hooks/useFormAutosave.d.ts +8 -9
- package/dist/hooks/useFormAutosave.js +49 -122
- package/dist/hooks/useLongPressRepeat.js +20 -55
- package/dist/index.d.ts +2 -3
- package/dist/index.js +3 -4
- package/package.json +3 -4
- package/dist/components/inputs/FormField/formField.cva.d.ts +0 -11
- package/dist/components/inputs/FormField/formField.cva.js +0 -16
- package/dist/components/table/TableColumnFilterInput.d.ts +0 -9
- package/dist/components/table/TableColumnFilterInput.js +0 -108
- package/dist/components/table/TableColumnFilterPlaceholder.d.ts +0 -5
- package/dist/components/table/TableColumnFilterPlaceholder.js +0 -41
- package/dist/components/table/TableColumnFilterRow.d.ts +0 -16
- package/dist/components/table/TableColumnFilterRow.js +0 -68
- package/dist/hooks/useAutosave.spec.d.ts +0 -1
package/dist/hooks/useForm.js
CHANGED
|
@@ -1,48 +1,101 @@
|
|
|
1
1
|
import { c } from "react/compiler-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { useEffect, useMemo, useRef } from "react";
|
|
3
|
+
import { useForm, useStore } from "@tanstack/react-form";
|
|
4
4
|
//#region src/hooks/useForm.ts
|
|
5
|
-
function useForm$1(
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
5
|
+
function useForm$1({ defaultValues, disabled = false, mode = "onSubmit", onSubmitAsync, zodSchema } = {}) {
|
|
6
|
+
const submitHandlerRef = useRef(() => void 0);
|
|
7
|
+
const submitErrorHandlerRef = useRef(void 0);
|
|
8
|
+
const blurListenersRef = useRef(/* @__PURE__ */ new Set());
|
|
9
|
+
const fieldValidators = useMemo(() => {
|
|
10
|
+
return /* @__PURE__ */ new Map();
|
|
11
|
+
}, [mode, zodSchema]);
|
|
12
|
+
const formValidator = useMemo(() => {
|
|
13
|
+
if (!zodSchema) return;
|
|
14
|
+
return ({ value }) => {
|
|
15
|
+
const result = zodSchema.safeParse(value);
|
|
16
|
+
if (result.success) return;
|
|
17
|
+
return { fields: Object.fromEntries(result.error.issues.map((issue) => [pathToString(issue.path), issue.message])) };
|
|
18
|
+
};
|
|
19
|
+
}, [zodSchema]);
|
|
20
|
+
const form = useForm({
|
|
21
|
+
defaultValues: (typeof defaultValues === "function" ? {} : defaultValues) ?? {},
|
|
22
|
+
validators: formValidator || onSubmitAsync ? {
|
|
23
|
+
onSubmit: formValidator,
|
|
24
|
+
onSubmitAsync
|
|
25
|
+
} : void 0,
|
|
26
|
+
onSubmit: async ({ value: value_0 }) => {
|
|
27
|
+
const transformed = zodSchema ? zodSchema.parse(value_0) : value_0;
|
|
28
|
+
await submitHandlerRef.current(transformed);
|
|
29
|
+
},
|
|
30
|
+
onSubmitInvalid: ({ value: value_1, formApi }) => {
|
|
31
|
+
submitErrorHandlerRef.current?.(formApi.state.errors, value_1);
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
const originalHandleSubmit = useMemo(() => form.handleSubmit.bind(form), [form]);
|
|
35
|
+
const uiForm = form;
|
|
36
|
+
Object.defineProperties(uiForm, { disabled: {
|
|
37
|
+
configurable: true,
|
|
38
|
+
get: () => disabled
|
|
39
|
+
} });
|
|
40
|
+
uiForm.getFieldValidators = (name) => {
|
|
41
|
+
const cached = fieldValidators.get(name);
|
|
42
|
+
if (cached || fieldValidators.has(name)) return cached;
|
|
43
|
+
const schema = zodSchema ? getSchemaAtPath(zodSchema, name) : void 0;
|
|
44
|
+
if (!schema || mode === "onSubmit") {
|
|
45
|
+
fieldValidators.set(name, void 0);
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
const validate = ({ value: value_2 }) => {
|
|
49
|
+
const result_0 = schema.safeParse(value_2);
|
|
50
|
+
return result_0.success ? void 0 : result_0.error.issues[0]?.message;
|
|
39
51
|
};
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
52
|
+
const validators = mode === "onChange" || mode === "all" ? { onChange: validate } : { onBlur: validate };
|
|
53
|
+
fieldValidators.set(name, validators);
|
|
54
|
+
return validators;
|
|
55
|
+
};
|
|
56
|
+
uiForm.notifyBlur = (name_0) => {
|
|
57
|
+
for (const listener of blurListenersRef.current) listener(name_0);
|
|
58
|
+
};
|
|
59
|
+
uiForm.parseValues = (values) => zodSchema ? zodSchema.parse(values) : values;
|
|
60
|
+
uiForm.subscribeBlur = (listener_0) => {
|
|
61
|
+
blurListenersRef.current.add(listener_0);
|
|
62
|
+
return () => blurListenersRef.current.delete(listener_0);
|
|
63
|
+
};
|
|
64
|
+
uiForm.handleSubmit = (onValid, onInvalid) => async (event) => {
|
|
65
|
+
event?.preventDefault?.();
|
|
66
|
+
event?.stopPropagation?.();
|
|
67
|
+
submitHandlerRef.current = onValid;
|
|
68
|
+
submitErrorHandlerRef.current = onInvalid;
|
|
69
|
+
await originalHandleSubmit();
|
|
70
|
+
};
|
|
71
|
+
useEffect(() => {
|
|
72
|
+
if (typeof defaultValues === "function") defaultValues().then((values_0) => form.reset(values_0));
|
|
73
|
+
}, [defaultValues, form]);
|
|
74
|
+
return uiForm;
|
|
46
75
|
}
|
|
76
|
+
var useFormValue = (form, selector) => {
|
|
77
|
+
const $ = c(2);
|
|
78
|
+
let t0;
|
|
79
|
+
if ($[0] !== selector) {
|
|
80
|
+
t0 = (state) => selector(state.values);
|
|
81
|
+
$[0] = selector;
|
|
82
|
+
$[1] = t0;
|
|
83
|
+
} else t0 = $[1];
|
|
84
|
+
return useStore(form.store, t0);
|
|
85
|
+
};
|
|
86
|
+
var useFormState = (form, selector) => {
|
|
87
|
+
return useStore(form.store, selector);
|
|
88
|
+
};
|
|
89
|
+
var getSchemaAtPath = (rootSchema, path) => {
|
|
90
|
+
let schema = rootSchema;
|
|
91
|
+
for (const segment of parsePath(path)) {
|
|
92
|
+
while (schema?.unwrap && !schema.shape && !schema.element && !schema.items) schema = schema.unwrap();
|
|
93
|
+
schema = typeof segment === "number" ? schema?.element ?? schema?.items?.[segment] : schema?.shape?.[segment];
|
|
94
|
+
if (!schema) return;
|
|
95
|
+
}
|
|
96
|
+
return schema;
|
|
97
|
+
};
|
|
98
|
+
var parsePath = (path) => path.replaceAll("[", ".").replaceAll("]", "").split(".").filter(Boolean).map((segment) => /^\d+$/.test(segment) ? Number(segment) : segment);
|
|
99
|
+
var pathToString = (path) => path.reduce((result, segment) => typeof segment === "number" ? `${result}[${segment}]` : result ? `${result}.${String(segment)}` : String(segment), "");
|
|
47
100
|
//#endregion
|
|
48
|
-
export { useForm$1 as useForm };
|
|
101
|
+
export { useForm$1 as useForm, useFormState, useFormValue };
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { DependencyList } from 'react';
|
|
2
|
-
import { FieldValues } from 'react-hook-form';
|
|
3
2
|
import { UseAutosaveProps } from './useAutosave';
|
|
4
|
-
import { UseFormProps
|
|
5
|
-
export type UseFormAutosaveProps<TFieldValues extends
|
|
6
|
-
autosaveDelay?: UseAutosaveProps<TFieldValues,
|
|
7
|
-
enableAutosave?: UseAutosaveProps<TFieldValues,
|
|
8
|
-
autosaveOn?: UseAutosaveProps<TFieldValues,
|
|
3
|
+
import { UseFormProps } from './useForm';
|
|
4
|
+
export type UseFormAutosaveProps<TFieldValues extends Record<string, unknown> = Record<string, unknown>, _TContext = any, TTransformedValues = TFieldValues, TResponse = unknown> = Omit<UseFormProps<TFieldValues, TTransformedValues>, "defaultValues"> & {
|
|
5
|
+
autosaveDelay?: UseAutosaveProps<TFieldValues, TTransformedValues, TResponse>["delay"];
|
|
6
|
+
enableAutosave?: UseAutosaveProps<TFieldValues, TTransformedValues, TResponse>["enabled"];
|
|
7
|
+
autosaveOn?: UseAutosaveProps<TFieldValues, TTransformedValues, TResponse>["trigger"];
|
|
9
8
|
normalizeAutosaveData?: (data: Partial<TTransformedValues>) => Partial<TTransformedValues> | undefined;
|
|
10
|
-
onAutosave: UseAutosaveProps<TFieldValues,
|
|
11
|
-
getResetValues: () => UseFormProps<TFieldValues,
|
|
9
|
+
onAutosave: UseAutosaveProps<TFieldValues, TTransformedValues, TResponse>["onSave"];
|
|
10
|
+
getResetValues: () => UseFormProps<TFieldValues, TTransformedValues>["defaultValues"];
|
|
12
11
|
resetDeps: DependencyList;
|
|
13
12
|
resetTimeout?: number;
|
|
14
13
|
};
|
|
15
|
-
export declare function useFormAutosave<TFieldValues extends
|
|
14
|
+
export declare function useFormAutosave<TFieldValues extends Record<string, unknown> = Record<string, unknown>, TContext = any, TTransformedValues = TFieldValues, TResponse = any>({ autosaveDelay, enableAutosave, autosaveOn, normalizeAutosaveData, onAutosave, getResetValues, resetDeps, resetTimeout, ...props }: UseFormAutosaveProps<TFieldValues, TContext, TTransformedValues, TResponse>): import('./useForm').UIForm<TFieldValues>;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { ObjectUtils } from "../utils/object.utils.js";
|
|
2
2
|
import { useAutosave } from "./useAutosave.js";
|
|
3
3
|
import { useForm } from "./useForm.js";
|
|
4
|
-
import {
|
|
5
|
-
import { useEffect, useRef } from "react";
|
|
4
|
+
import { useCallback, useEffect, useRef } from "react";
|
|
6
5
|
//#region src/hooks/useFormAutosave.ts
|
|
7
6
|
var getResetTimeoutErrorMessage = (resetTimeout) => `Form Reset Timeout (${resetTimeout}ms) - Action Required
|
|
8
7
|
Problem: Form values weren't reset after submission.
|
|
@@ -16,130 +15,58 @@ Solutions:
|
|
|
16
15
|
1. Ensure reset dependencies include all relevant state variables
|
|
17
16
|
2. Confirm your submission handler updates state properly (check query invalidation)
|
|
18
17
|
3. For slower operations, consider increasing the timeout threshold`;
|
|
19
|
-
function useFormAutosave(
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
let normalizeAutosaveData;
|
|
25
|
-
let onAutosave;
|
|
26
|
-
let props;
|
|
27
|
-
let resetDeps;
|
|
28
|
-
let t1;
|
|
29
|
-
let t2;
|
|
30
|
-
if ($[0] !== t0) {
|
|
31
|
-
({autosaveDelay, enableAutosave, autosaveOn: t1, normalizeAutosaveData, onAutosave, getResetValues, resetDeps, resetTimeout: t2, ...props} = t0);
|
|
32
|
-
$[0] = t0;
|
|
33
|
-
$[1] = autosaveDelay;
|
|
34
|
-
$[2] = enableAutosave;
|
|
35
|
-
$[3] = getResetValues;
|
|
36
|
-
$[4] = normalizeAutosaveData;
|
|
37
|
-
$[5] = onAutosave;
|
|
38
|
-
$[6] = props;
|
|
39
|
-
$[7] = resetDeps;
|
|
40
|
-
$[8] = t1;
|
|
41
|
-
$[9] = t2;
|
|
42
|
-
} else {
|
|
43
|
-
autosaveDelay = $[1];
|
|
44
|
-
enableAutosave = $[2];
|
|
45
|
-
getResetValues = $[3];
|
|
46
|
-
normalizeAutosaveData = $[4];
|
|
47
|
-
onAutosave = $[5];
|
|
48
|
-
props = $[6];
|
|
49
|
-
resetDeps = $[7];
|
|
50
|
-
t1 = $[8];
|
|
51
|
-
t2 = $[9];
|
|
52
|
-
}
|
|
53
|
-
const autosaveOn = t1 === void 0 ? "change" : t1;
|
|
54
|
-
const resetTimeout = t2 === void 0 ? 5e3 : t2;
|
|
55
|
-
let t3;
|
|
56
|
-
if ($[10] !== getResetValues) {
|
|
57
|
-
t3 = getResetValues();
|
|
58
|
-
$[10] = getResetValues;
|
|
59
|
-
$[11] = t3;
|
|
60
|
-
} else t3 = $[11];
|
|
61
|
-
let t4;
|
|
62
|
-
if ($[12] !== props || $[13] !== t3) {
|
|
63
|
-
t4 = {
|
|
64
|
-
...props,
|
|
65
|
-
defaultValues: t3
|
|
66
|
-
};
|
|
67
|
-
$[12] = props;
|
|
68
|
-
$[13] = t3;
|
|
69
|
-
$[14] = t4;
|
|
70
|
-
} else t4 = $[14];
|
|
71
|
-
const form = useForm(t4);
|
|
18
|
+
function useFormAutosave({ autosaveDelay, enableAutosave, autosaveOn = "change", normalizeAutosaveData, onAutosave, getResetValues, resetDeps, resetTimeout = 5e3, ...props }) {
|
|
19
|
+
const form = useForm({
|
|
20
|
+
...props,
|
|
21
|
+
defaultValues: getResetValues()
|
|
22
|
+
});
|
|
72
23
|
const shouldResetFormValuesRef = useRef(false);
|
|
73
24
|
const resetFormValuesTimeoutRef = useRef(void 0);
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
};
|
|
88
|
-
$[15] = form;
|
|
89
|
-
$[16] = getResetValues;
|
|
90
|
-
$[17] = t5;
|
|
91
|
-
} else t5 = $[17];
|
|
92
|
-
let t6;
|
|
93
|
-
if ($[18] !== resetDeps) {
|
|
94
|
-
t6 = [...resetDeps];
|
|
95
|
-
$[18] = resetDeps;
|
|
96
|
-
$[19] = t6;
|
|
97
|
-
} else t6 = $[19];
|
|
98
|
-
useEffect(t5, t6);
|
|
99
|
-
let t7;
|
|
100
|
-
if ($[20] !== resetTimeout) {
|
|
101
|
-
t7 = () => {
|
|
102
|
-
shouldResetFormValuesRef.current = true;
|
|
103
|
-
if (resetFormValuesTimeoutRef.current) clearTimeout(resetFormValuesTimeoutRef.current);
|
|
104
|
-
resetFormValuesTimeoutRef.current = setTimeout(() => {
|
|
105
|
-
if (shouldResetFormValuesRef.current) throw new Error(getResetTimeoutErrorMessage(resetTimeout));
|
|
106
|
-
}, resetTimeout);
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
const resetValues = getResetValues();
|
|
27
|
+
if (resetValues === void 0) return;
|
|
28
|
+
const resetFormValues = async () => {
|
|
29
|
+
const keepCurrentValues = shouldResetFormValuesRef.current;
|
|
30
|
+
shouldResetFormValuesRef.current = false;
|
|
31
|
+
let values;
|
|
32
|
+
if (ObjectUtils.isFunction(resetValues)) values = await resetValues();
|
|
33
|
+
else values = resetValues;
|
|
34
|
+
form.reset(keepCurrentValues ? {
|
|
35
|
+
...values,
|
|
36
|
+
...form.state.values
|
|
37
|
+
} : values);
|
|
107
38
|
};
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
39
|
+
resetFormValues();
|
|
40
|
+
}, [...resetDeps]);
|
|
41
|
+
const prepareForSaveReset = () => {
|
|
42
|
+
shouldResetFormValuesRef.current = true;
|
|
43
|
+
if (resetFormValuesTimeoutRef.current) clearTimeout(resetFormValuesTimeoutRef.current);
|
|
44
|
+
resetFormValuesTimeoutRef.current = setTimeout(() => {
|
|
45
|
+
if (shouldResetFormValuesRef.current) throw new Error(getResetTimeoutErrorMessage(resetTimeout));
|
|
46
|
+
}, resetTimeout);
|
|
47
|
+
};
|
|
48
|
+
useAutosave({
|
|
49
|
+
form,
|
|
50
|
+
delay: autosaveDelay,
|
|
51
|
+
enabled: enableAutosave,
|
|
52
|
+
trigger: autosaveOn,
|
|
53
|
+
onSave: useCallback(async (data) => {
|
|
115
54
|
const normalizedData = normalizeAutosaveData ? normalizeAutosaveData(data) : data;
|
|
116
|
-
if (!normalizedData || ObjectUtils.isEmpty(normalizedData)) return
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
onSave,
|
|
132
|
-
onSaveSuccess
|
|
133
|
-
};
|
|
134
|
-
$[25] = autosaveDelay;
|
|
135
|
-
$[26] = autosaveOn;
|
|
136
|
-
$[27] = enableAutosave;
|
|
137
|
-
$[28] = form;
|
|
138
|
-
$[29] = onSave;
|
|
139
|
-
$[30] = onSaveSuccess;
|
|
140
|
-
$[31] = t9;
|
|
141
|
-
} else t9 = $[31];
|
|
142
|
-
useAutosave(t9);
|
|
55
|
+
if (!normalizedData || ObjectUtils.isEmpty(normalizedData)) return;
|
|
56
|
+
prepareForSaveReset();
|
|
57
|
+
try {
|
|
58
|
+
return await onAutosave(normalizedData);
|
|
59
|
+
} catch (error) {
|
|
60
|
+
shouldResetFormValuesRef.current = false;
|
|
61
|
+
if (resetFormValuesTimeoutRef.current) clearTimeout(resetFormValuesTimeoutRef.current);
|
|
62
|
+
throw error;
|
|
63
|
+
}
|
|
64
|
+
}, [
|
|
65
|
+
normalizeAutosaveData,
|
|
66
|
+
onAutosave,
|
|
67
|
+
resetTimeout
|
|
68
|
+
])
|
|
69
|
+
});
|
|
143
70
|
return form;
|
|
144
71
|
}
|
|
145
72
|
//#endregion
|
|
@@ -1,64 +1,29 @@
|
|
|
1
|
-
import { c } from "react/compiler-runtime";
|
|
2
1
|
import { useEffect, useRef } from "react";
|
|
3
2
|
//#region src/hooks/useLongPressRepeat.ts
|
|
4
|
-
var useLongPressRepeat = (
|
|
5
|
-
const $ = c(10);
|
|
6
|
-
const { onPress, enabled: t1, interval: t2, timeout: t3 } = t0;
|
|
7
|
-
const enabled = t1 === void 0 ? true : t1;
|
|
8
|
-
const interval = t2 === void 0 ? 85 : t2;
|
|
9
|
-
const timeout = t3 === void 0 ? 500 : t3;
|
|
3
|
+
var useLongPressRepeat = ({ onPress, enabled = true, interval = 85, timeout = 500 }) => {
|
|
10
4
|
const intervalRef = useRef(void 0);
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
14
|
-
t4 = () => () => {
|
|
5
|
+
useEffect(() => {
|
|
6
|
+
return () => {
|
|
15
7
|
clearInterval(intervalRef.current);
|
|
16
8
|
};
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
useEffect(t4, t5);
|
|
25
|
-
let t6;
|
|
26
|
-
if ($[2] !== enabled || $[3] !== interval || $[4] !== onPress || $[5] !== timeout) {
|
|
27
|
-
t6 = () => {
|
|
28
|
-
onPress(false);
|
|
29
|
-
if (!enabled) return;
|
|
30
|
-
intervalRef.current = setTimeout(() => {
|
|
9
|
+
}, []);
|
|
10
|
+
const onPressStart = () => {
|
|
11
|
+
onPress(false);
|
|
12
|
+
if (!enabled) return;
|
|
13
|
+
intervalRef.current = setTimeout(() => {
|
|
14
|
+
onPress(true);
|
|
15
|
+
intervalRef.current = setInterval(() => {
|
|
31
16
|
onPress(true);
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
} else t6 = $[6];
|
|
43
|
-
const onPressStart = t6;
|
|
44
|
-
let t7;
|
|
45
|
-
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
46
|
-
t7 = () => {
|
|
47
|
-
clearInterval(intervalRef.current);
|
|
48
|
-
};
|
|
49
|
-
$[7] = t7;
|
|
50
|
-
} else t7 = $[7];
|
|
51
|
-
const onPressEnd = t7;
|
|
52
|
-
let t8;
|
|
53
|
-
if ($[8] !== onPressStart) {
|
|
54
|
-
t8 = {
|
|
55
|
-
onPressStart,
|
|
56
|
-
onPressEnd
|
|
57
|
-
};
|
|
58
|
-
$[8] = onPressStart;
|
|
59
|
-
$[9] = t8;
|
|
60
|
-
} else t8 = $[9];
|
|
61
|
-
return t8;
|
|
17
|
+
}, interval);
|
|
18
|
+
}, timeout);
|
|
19
|
+
};
|
|
20
|
+
const onPressEnd = () => {
|
|
21
|
+
clearInterval(intervalRef.current);
|
|
22
|
+
};
|
|
23
|
+
return {
|
|
24
|
+
onPressStart,
|
|
25
|
+
onPressEnd
|
|
26
|
+
};
|
|
62
27
|
};
|
|
63
28
|
//#endregion
|
|
64
29
|
export { useLongPressRepeat };
|
package/dist/index.d.ts
CHANGED
|
@@ -193,7 +193,6 @@ export { inputUploadButtonDefinition, inputUploadDropZoneDefinition, } from './c
|
|
|
193
193
|
export { progressBarDefinition, progressBarFillDefinition, progressBarTrackDefinition, progressBarTrackWrapperDefinition, progressBarValueDefinition, } from './components/inputs/File/shared/progressBar.cva';
|
|
194
194
|
export type { ProgressBarConfig, ProgressBarTrackConfig, ProgressBarVariantProps, } from './components/inputs/File/shared/progressBar.cva';
|
|
195
195
|
export { formFieldHeaderDefinition } from './components/inputs/FormField/formFieldHeader.cva';
|
|
196
|
-
export { formFieldDefinition } from './components/inputs/FormField/formField.cva';
|
|
197
196
|
export { formFieldErrorDefinition } from './components/inputs/FormField/formFieldError.cva';
|
|
198
197
|
export { formFieldHelperDefinition } from './components/inputs/FormField/formFieldHelper.cva';
|
|
199
198
|
export { textAreaWrapperDefinition } from './components/inputs/Input/TextArea/TextArea.cva';
|
|
@@ -231,8 +230,8 @@ export { useDebounceCallback } from './hooks/useDebounceCallback';
|
|
|
231
230
|
export { useDeepCompareEffect, useDeepCompareLayoutEffect, useDeepCompareMemo } from './hooks/useDeepCompare';
|
|
232
231
|
export type { FilterStore } from './hooks/useFilters';
|
|
233
232
|
export { useFilters } from './hooks/useFilters';
|
|
234
|
-
export type { UseFormProps,
|
|
235
|
-
export { useForm } from './hooks/useForm';
|
|
233
|
+
export type { DeepKeys, DeepValue, FormSubmitErrorHandler, FormSubmitHandler, UIForm, UseFormProps, } from './hooks/useForm';
|
|
234
|
+
export { useForm, useFormState, useFormValue } from './hooks/useForm';
|
|
236
235
|
export type { UseFormAutosaveProps } from './hooks/useFormAutosave';
|
|
237
236
|
export { useFormAutosave } from './hooks/useFormAutosave';
|
|
238
237
|
export { useIntersectionObserver } from './hooks/useIntersectionObserver';
|
package/dist/index.js
CHANGED
|
@@ -77,7 +77,6 @@ import { Checkbox } from "./components/inputs/Checkbox/Checkbox.js";
|
|
|
77
77
|
import { formFieldHeaderDefinition } from "./components/inputs/FormField/formFieldHeader.cva.js";
|
|
78
78
|
import { labelDefinition } from "./components/inputs/shared/label.cva.js";
|
|
79
79
|
import { formFieldHelperDefinition } from "./components/inputs/FormField/formFieldHelper.cva.js";
|
|
80
|
-
import { formFieldDefinition } from "./components/inputs/FormField/formField.cva.js";
|
|
81
80
|
import { FormField } from "./components/inputs/FormField/FormField.js";
|
|
82
81
|
import { inputBaseDefinition, inputClearClassDefinition, inputContentWrapperDefinition, inputSideDefinition, inputSizeDefinition } from "./components/inputs/shared/input.cva.js";
|
|
83
82
|
import { CheckboxGroup } from "./components/inputs/Checkbox/CheckboxGroup.js";
|
|
@@ -88,10 +87,10 @@ import { DateTimeUtils } from "./utils/date-time.utils.js";
|
|
|
88
87
|
import { datePickerInputContentRowDefinition } from "./components/inputs/DateTime/shared/datePickerInput.cva.js";
|
|
89
88
|
import { popoverDefinition } from "./components/shared/popover.cva.js";
|
|
90
89
|
import { tooltipWrapperTriggerDefinition } from "./components/inputs/shared/tooltipWrapper.cva.js";
|
|
91
|
-
import { useDebounceCallback } from "./hooks/useDebounceCallback.js";
|
|
92
90
|
import { DatePicker } from "./components/inputs/DateTime/DatePicker/DatePicker.js";
|
|
93
91
|
import { tagDefinition } from "./components/text/Tag/tag.cva.js";
|
|
94
92
|
import { Tag } from "./components/text/Tag/Tag.js";
|
|
93
|
+
import { useDebounceCallback } from "./hooks/useDebounceCallback.js";
|
|
95
94
|
import { selectInputTagsContentWrapperDefinition } from "./components/inputs/Selection/shared/selectInput.cva.js";
|
|
96
95
|
import { createKeyInteractionsHandler, getKeyInteractionAction, useKeyInteractions } from "./hooks/useKeyInteractions.js";
|
|
97
96
|
import { selectListBoxItemDefinition } from "./components/inputs/Selection/shared/selectItem.cva.js";
|
|
@@ -171,11 +170,11 @@ import { dynamicColumns } from "./helpers/dynamicColumns.js";
|
|
|
171
170
|
import { useAutosave } from "./hooks/useAutosave.js";
|
|
172
171
|
import { RoutingUtils } from "./utils/routing.utils.js";
|
|
173
172
|
import { useFilters } from "./hooks/useFilters.js";
|
|
174
|
-
import { useForm } from "./hooks/useForm.js";
|
|
173
|
+
import { useForm, useFormState, useFormValue } from "./hooks/useForm.js";
|
|
175
174
|
import { useFormAutosave } from "./hooks/useFormAutosave.js";
|
|
176
175
|
import { usePagination } from "./hooks/usePagination.js";
|
|
177
176
|
import { useSorting } from "./hooks/useSorting.js";
|
|
178
177
|
import { useTableColumnConfig } from "./hooks/useTableColumnConfig.js";
|
|
179
178
|
import { ArrayUtils } from "./utils/array.utils.js";
|
|
180
179
|
import { QueriesUtils } from "./utils/queries.utils.js";
|
|
181
|
-
export { Accordion, ActionModal, Alert, AlignCenterIcon, AlignLeftIcon, AlignLeftRightIcon, AlignRightIcon, ArrayUtils, ArrowDropDownIcon, ArrowDropUpIcon, ArrowLeftIcon, ArrowRightIcon, Autocomplete, BoldIcon, BottomSheet, Breadcrumbs, BulletedListIcon, Button, CalendarIcon, CellText, CheckIcon, Checkbox, CheckboxCheckmarkIcon, CheckboxGroup, CheckboxIndeterminateIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsLeftIcon, ChevronsRightIcon, ClockIcon, CloseIcon, ColumnConfigModal, Confirmation, DatePicker, DateRangePicker, DateTimeIcon, DateTimePicker, DateTimeUtils, DateUtils, DomUtils, Drawer, FileUpload, FileUploadContainer, FileUtils, Form, FormField, HeaderText, HighlightIcon, HighlightOnIcon, HomeIcon, IconButton, InfiniteTable, InfoIcon, InlineIconButton, InputUpload, Inputs, IntlUtils, ItalicIcon, Link, LinkContext, LinkIcon, Loader, Menu, MenuIcon, MenuItem, MenuPopover, Modal, NumberInput, NumberRangeInput, NumberedListIcon, ObjectUtils, PaginatedTable, Pagination, PaginationList, PasswordInput, Pill, PillButton, PointerHorizontalIcon, PointerVerticalIcon, ProgressBar, QueriesUtils, QueryAutocomplete, QuerySelect, RadioGroup, ResponsivePopover, RestUtils, RoutingUtils, Segment, Select, SendIcon, Slider, SplitButton, Stepper, StrikethroughIcon, StringUtils, Table, Tag, TextArea, TextButton, TextColorIcon, TextInput, ThemeContext, TimePicker, Toast, ToastContainer, Toggle, ToggleButton, Tooltip, TooltipEllipsis, Typography, UIConfig, UIOverrides, UIRouter, UnderlinedIcon, VisibilityIcon, VisibilityOffIcon, ZodUtils, accordionChevronDefinition, accordionDefinition, accordionHeadingDefinition, accordionHeadingSubtitleDefinition, accordionHeadingTitleDefinition, accordionIconDefinition, accordionItemDefinition, accordionPanelContentDefinition, accordionPanelDefinition, accordionTriggerDefinition, alertDefinition, breadcrumbChevronDefinition, breadcrumbIconDefinition, breadcrumbItemDefinition, breadcrumbSegmentDefinition, breadcrumbsDefinition, buttonContentDefinition, buttonDefinition, buttonIconSizeDefinition, buttonSizeDefinition, checkboxContentRowDefinition, checkboxContentWrapperDefinition, checkboxDefinition, checkboxGroupLabelDefinition, checkboxIconDefinition, compoundMapper, createKeyInteractionsHandler, datePickerInputContentRowDefinition, dynamicColumns, dynamicInputs, fileUploadDropZoneDefinition,
|
|
180
|
+
export { Accordion, ActionModal, Alert, AlignCenterIcon, AlignLeftIcon, AlignLeftRightIcon, AlignRightIcon, ArrayUtils, ArrowDropDownIcon, ArrowDropUpIcon, ArrowLeftIcon, ArrowRightIcon, Autocomplete, BoldIcon, BottomSheet, Breadcrumbs, BulletedListIcon, Button, CalendarIcon, CellText, CheckIcon, Checkbox, CheckboxCheckmarkIcon, CheckboxGroup, CheckboxIndeterminateIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsLeftIcon, ChevronsRightIcon, ClockIcon, CloseIcon, ColumnConfigModal, Confirmation, DatePicker, DateRangePicker, DateTimeIcon, DateTimePicker, DateTimeUtils, DateUtils, DomUtils, Drawer, FileUpload, FileUploadContainer, FileUtils, Form, FormField, HeaderText, HighlightIcon, HighlightOnIcon, HomeIcon, IconButton, InfiniteTable, InfoIcon, InlineIconButton, InputUpload, Inputs, IntlUtils, ItalicIcon, Link, LinkContext, LinkIcon, Loader, Menu, MenuIcon, MenuItem, MenuPopover, Modal, NumberInput, NumberRangeInput, NumberedListIcon, ObjectUtils, PaginatedTable, Pagination, PaginationList, PasswordInput, Pill, PillButton, PointerHorizontalIcon, PointerVerticalIcon, ProgressBar, QueriesUtils, QueryAutocomplete, QuerySelect, RadioGroup, ResponsivePopover, RestUtils, RoutingUtils, Segment, Select, SendIcon, Slider, SplitButton, Stepper, StrikethroughIcon, StringUtils, Table, Tag, TextArea, TextButton, TextColorIcon, TextInput, ThemeContext, TimePicker, Toast, ToastContainer, Toggle, ToggleButton, Tooltip, TooltipEllipsis, Typography, UIConfig, UIOverrides, UIRouter, UnderlinedIcon, VisibilityIcon, VisibilityOffIcon, ZodUtils, accordionChevronDefinition, accordionDefinition, accordionHeadingDefinition, accordionHeadingSubtitleDefinition, accordionHeadingTitleDefinition, accordionIconDefinition, accordionItemDefinition, accordionPanelContentDefinition, accordionPanelDefinition, accordionTriggerDefinition, alertDefinition, breadcrumbChevronDefinition, breadcrumbIconDefinition, breadcrumbItemDefinition, breadcrumbSegmentDefinition, breadcrumbsDefinition, buttonContentDefinition, buttonDefinition, buttonIconSizeDefinition, buttonSizeDefinition, checkboxContentRowDefinition, checkboxContentWrapperDefinition, checkboxDefinition, checkboxGroupLabelDefinition, checkboxIconDefinition, compoundMapper, createKeyInteractionsHandler, datePickerInputContentRowDefinition, dynamicColumns, dynamicInputs, fileUploadDropZoneDefinition, formFieldErrorDefinition, formFieldHeaderDefinition, formFieldHelperDefinition, getKeyInteractionAction, inputBaseDefinition, inputClearClassDefinition, inputContentWrapperDefinition, inputSideDefinition, inputSizeDefinition, inputUploadButtonDefinition, inputUploadDropZoneDefinition, isEqual, labelDefinition, linkDefinition, loaderDefinition, loaderWrapperDefinition, logger, menuDefinition, menuItemDefinition, menuPopoverDefinition, menuPopoverWrapperDefinition, modalContentDefinition, modalMainDefinition, modalOverlayDefinition, ns, pillButtonContentDefinition, pillButtonDefinition, popoverDefinition, progressBarDefinition, progressBarFillDefinition, progressBarTrackDefinition, progressBarTrackWrapperDefinition, progressBarValueDefinition, radioContentRowDefinition, radioContentWrapperDefinition, radioDefinition, resources, segmentDefinition, segmentItemDefinition, selectInputTagsContentWrapperDefinition, selectListBoxItemDefinition, selectPopoverDefinition, statusIconDefinition, statusSeparatorDefinition, stepperDefinition, stepperIconDefinition, stepperItemDefinition, stepperNumberDefinition, stepperSeparatorDefinition, stepperSubtextDefinition, stepperTitleDefinition, tableCellTextDefinition, tableDataDefinition, tableHeadDataDefinition, tableHeadRowDefinition, tableHeaderTextDefinition, tableRowDefinition, tagDefinition, textAreaWrapperDefinition, toastDefinition, statusIconDefinition$1 as toastStatusIconDefinition, statusSeparatorDefinition$1 as toastStatusSeparatorDefinition, toggleDefinition, tooltipDefinition, tooltipPointerHorizontalDefinition, tooltipPointerVerticalDefinition, tooltipTextDefinition, tooltipWrapperTriggerDefinition, typographyDefinition, uiOutlineClass, useAutosave, useBreakpoint, useDebounceCallback, useDeepCompareEffect, useDeepCompareLayoutEffect, useDeepCompareMemo, useFilters, useForm, useFormAutosave, useFormState, useFormValue, useIntersectionObserver, useKeyInteractions, useLocalStorage, useLongPressRepeat, usePagination, useScrollableListBox, useSorting, useStateAndRef, useTableColumnConfig, useTableNav, useToast, useTranslationMemo };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@povio/ui",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0-rc.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
"@dnd-kit/modifiers": "^9.0.0",
|
|
21
21
|
"@dnd-kit/sortable": "^10.0.0",
|
|
22
22
|
"@dnd-kit/utilities": "^3.2.2",
|
|
23
|
-
"@hookform/resolvers": "^5.2.2",
|
|
24
23
|
"@internationalized/date": "^3.11.0",
|
|
25
24
|
"@react-aria/button": "^3.14.4",
|
|
26
25
|
"@react-aria/calendar": "^3.9.4",
|
|
@@ -30,7 +29,7 @@
|
|
|
30
29
|
"@react-stately/calendar": "^3.9.2",
|
|
31
30
|
"@react-stately/datepicker": "^3.16.0",
|
|
32
31
|
"@react-types/shared": "^3.33.0",
|
|
33
|
-
"@tanstack/react-
|
|
32
|
+
"@tanstack/react-form": "^1.33.2",
|
|
34
33
|
"@tanstack/react-table": "^8.21.3",
|
|
35
34
|
"axios": "^1.13.2",
|
|
36
35
|
"class-variance-authority": "^0.7.1",
|
|
@@ -41,7 +40,6 @@
|
|
|
41
40
|
"motion": "~12.23.24",
|
|
42
41
|
"react-aria": "^3.46.0",
|
|
43
42
|
"react-aria-components": "^1.15.1",
|
|
44
|
-
"react-hook-form": "^7.65.0",
|
|
45
43
|
"react-responsive": "^10.0.1",
|
|
46
44
|
"react-stately": "^3.44.0",
|
|
47
45
|
"react-toastify": "^11.0.5",
|
|
@@ -52,6 +50,7 @@
|
|
|
52
50
|
"peerDependencies": {
|
|
53
51
|
"@casl/ability": "^6.7.3",
|
|
54
52
|
"@casl/react": "^5.0.0",
|
|
53
|
+
"@tanstack/react-query": "^5.89.0",
|
|
55
54
|
"@tiptap/core": "^3.19.0",
|
|
56
55
|
"@tiptap/extension-color": "^3.19.0",
|
|
57
56
|
"@tiptap/extension-heading": "^3.19.0",
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare const formFieldDefinition: {
|
|
2
|
-
base: string[];
|
|
3
|
-
config: import("../../../utils/style-merge.util").StyleMergeUtils.Config<{
|
|
4
|
-
readonly as: {
|
|
5
|
-
readonly default: "";
|
|
6
|
-
readonly filter: "";
|
|
7
|
-
readonly floating: "";
|
|
8
|
-
readonly inline: "";
|
|
9
|
-
};
|
|
10
|
-
}>;
|
|
11
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
2
|
-
//#region src/components/inputs/FormField/formField.cva.ts
|
|
3
|
-
var formFieldDefinition = UIOverrides.defineConfig({
|
|
4
|
-
base: [""],
|
|
5
|
-
config: {
|
|
6
|
-
variants: { as: {
|
|
7
|
-
default: "",
|
|
8
|
-
filter: "",
|
|
9
|
-
floating: "",
|
|
10
|
-
inline: ""
|
|
11
|
-
} },
|
|
12
|
-
defaultVariants: { as: "default" }
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
|
-
//#endregion
|
|
16
|
-
export { formFieldDefinition };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { InputDef } from '../inputs/Inputs/InputItem';
|
|
2
|
-
import { UseFormReturn } from 'react-hook-form';
|
|
3
|
-
interface TableColumnFilterInputProps<TFilterData extends Record<string, any>> {
|
|
4
|
-
form: UseFormReturn<TFilterData>;
|
|
5
|
-
inputDef: InputDef<TFilterData>;
|
|
6
|
-
className?: string;
|
|
7
|
-
}
|
|
8
|
-
export declare const TableColumnFilterInput: <TFilterData extends Record<string, any>>({ form, inputDef, className, }: TableColumnFilterInputProps<TFilterData>) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export {};
|