@gaddario98/react-core 2.0.1 → 2.0.3
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/form/index.d.ts +236 -0
- package/dist/localization/index.d.ts +155 -0
- package/dist/notifications/index.d.ts +37 -0
- package/dist/notifications/index.js +84 -0
- package/dist/notifications/index.js.map +1 -0
- package/dist/notifications/index.mjs +84 -0
- package/dist/notifications/index.mjs.map +1 -0
- package/dist/pages/index.d.ts +1827 -0
- package/dist/queries/index.d.ts +372 -0
- package/dist/state/index.d.ts +28 -0
- package/package.json +7 -1
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
import * as _gaddario98_react_state from '@gaddario98/react-state';
|
|
2
|
+
import * as React$1 from 'react';
|
|
3
|
+
import React__default, { PropsWithChildren, JSX } from 'react';
|
|
4
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
|
+
import * as _tanstack_react_form from '@tanstack/react-form';
|
|
6
|
+
import { FormOptions, DeepKeys, DeepValue, FieldApi, FieldState, ReactFormExtendedApi } from '@tanstack/react-form';
|
|
7
|
+
import * as jotai from 'jotai';
|
|
8
|
+
|
|
9
|
+
interface FormNotificationMessage {
|
|
10
|
+
message: string;
|
|
11
|
+
type: 'success' | 'error' | 'info' | 'warning';
|
|
12
|
+
autoHideDuration?: number;
|
|
13
|
+
textTransOption?: Record<string, unknown>;
|
|
14
|
+
ns?: string;
|
|
15
|
+
}
|
|
16
|
+
interface FormTranslationOptions {
|
|
17
|
+
[key: string]: string | number | boolean | undefined;
|
|
18
|
+
ns?: string;
|
|
19
|
+
}
|
|
20
|
+
interface FormConfigProps {
|
|
21
|
+
formFieldContainer: React.FC<PropsWithChildren>;
|
|
22
|
+
showNotification?: (notification: FormNotificationMessage) => void;
|
|
23
|
+
translateText?: (key: string, options?: FormTranslationOptions) => string;
|
|
24
|
+
}
|
|
25
|
+
declare const formConfigAtom: _gaddario98_react_state.PrimitiveAtom<FormConfigProps>;
|
|
26
|
+
declare const useFormConfigValue: () => FormConfigProps;
|
|
27
|
+
declare const useFormConfigState: () => [FormConfigProps, (value: FormConfigProps) => void];
|
|
28
|
+
declare const useFormConfigReset: () => () => void;
|
|
29
|
+
|
|
30
|
+
interface UseCustomFormOptions<TData extends FieldValues> extends FormOptions<TData, any, any, any, any, any, any, any, any, any, any, any> {
|
|
31
|
+
formId?: string;
|
|
32
|
+
}
|
|
33
|
+
declare function useJotaiForm<TData extends FieldValues>(formOptions: UseCustomFormOptions<TData>): _tanstack_react_form.ReactFormExtendedApi<TData, any, any, any, any, any, any, any, any, any, any, any>;
|
|
34
|
+
|
|
35
|
+
interface FormElements {
|
|
36
|
+
index: number;
|
|
37
|
+
element: JSX.Element;
|
|
38
|
+
renderInFooter: boolean;
|
|
39
|
+
renderInHeader: boolean;
|
|
40
|
+
isSubmit?: boolean;
|
|
41
|
+
}
|
|
42
|
+
declare const useFormManager: <F extends FieldValues = FieldValues>({ data, onInvalid, submit, notification, formOptions, onValuesChange, globalErrorNs, id, }: UseFormManagerProps<F>) => {
|
|
43
|
+
elements: FormElements[];
|
|
44
|
+
formContents: (FormManagerConfig<F> | ((props: FormFunctionProps<F>) => FormManagerConfig<F>) | Submit<F, SubmitKeysArg<F>>)[];
|
|
45
|
+
errors: any[];
|
|
46
|
+
formValues: F;
|
|
47
|
+
setValue: SetValueFunction<F>;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
interface UseFormValuesProps {
|
|
51
|
+
formId: string;
|
|
52
|
+
scopeId?: string;
|
|
53
|
+
}
|
|
54
|
+
declare const useFormValues: <F extends FieldValues>({ formId, }: UseFormValuesProps) => FormFunctionProps<F>;
|
|
55
|
+
|
|
56
|
+
type FieldValues = Record<string, any>;
|
|
57
|
+
type SetValueFunction<F extends FieldValues> = <TField extends DeepKeys<F>>(field: TField, value: DeepValue<F, TField>) => void;
|
|
58
|
+
type GetFormValuesFunction<F extends FieldValues> = {
|
|
59
|
+
<TField extends DeepKeys<F>>(key: TField): DeepValue<F, TField> | undefined;
|
|
60
|
+
<TField extends DeepKeys<F>>(key: TField, defaultValue: DeepValue<F, TField>): NonNullable<DeepValue<F, TField>>;
|
|
61
|
+
};
|
|
62
|
+
type GenericFormApi<TData extends FieldValues> = ReactFormExtendedApi<TData, any, any, any, any, any, any, any, any, any, any, any>;
|
|
63
|
+
type GenericFieldApi<TData extends FieldValues> = FieldApi<TData, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any>;
|
|
64
|
+
type GenericFieldState<TData extends FieldValues> = FieldState<TData, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any>;
|
|
65
|
+
type SubmitKeysArg<T> = ReadonlyArray<keyof T> | undefined;
|
|
66
|
+
type SubmitPayload<T, K extends SubmitKeysArg<T>> = K extends ReadonlyArray<keyof T> ? Pick<T, K[number]> : T;
|
|
67
|
+
type FormFunctionProps<F extends FieldValues> = {
|
|
68
|
+
get: GetFormValuesFunction<F>;
|
|
69
|
+
set: SetValueFunction<F>;
|
|
70
|
+
};
|
|
71
|
+
interface Submit<T extends FieldValues = FieldValues, K extends SubmitKeysArg<T> = SubmitKeysArg<T>> {
|
|
72
|
+
onSuccess?: (values: T) => void;
|
|
73
|
+
onError?: (err: Error) => void;
|
|
74
|
+
values?: K;
|
|
75
|
+
index?: number;
|
|
76
|
+
buttonProps?: Record<string, unknown>;
|
|
77
|
+
renderInFooter?: boolean;
|
|
78
|
+
hidden?: boolean;
|
|
79
|
+
renderInHeader?: boolean;
|
|
80
|
+
isDisabled?: boolean;
|
|
81
|
+
isDraggable?: boolean;
|
|
82
|
+
isInDraggableView?: boolean;
|
|
83
|
+
isLoading?: boolean;
|
|
84
|
+
usedBoxes?: number;
|
|
85
|
+
type?: 'submit' | 'button';
|
|
86
|
+
key?: string;
|
|
87
|
+
component?: (props: {
|
|
88
|
+
onClick: () => void;
|
|
89
|
+
index: number;
|
|
90
|
+
key: string;
|
|
91
|
+
type: 'submit' | 'button';
|
|
92
|
+
}) => React__default.JSX.Element;
|
|
93
|
+
}
|
|
94
|
+
interface ViewSettingsContainerProps {
|
|
95
|
+
children: React__default.ReactNode;
|
|
96
|
+
}
|
|
97
|
+
type FormManagerProps<T extends FieldValues = FieldValues> = {
|
|
98
|
+
data: Array<FormManagerConfig<T> | ((props: FormFunctionProps<T>) => FormManagerConfig<T>)>;
|
|
99
|
+
defaultValues: T;
|
|
100
|
+
onInvalid?: (err: unknown) => void;
|
|
101
|
+
isHiddenErrors?: boolean;
|
|
102
|
+
ns?: string;
|
|
103
|
+
globalErrorNs?: string;
|
|
104
|
+
submit?: Array<Submit<T>>;
|
|
105
|
+
notification?: {
|
|
106
|
+
success?: FormNotificationMessage | ((res: unknown) => FormNotificationMessage);
|
|
107
|
+
error?: FormNotificationMessage | ((error: string) => FormNotificationMessage);
|
|
108
|
+
ns?: string;
|
|
109
|
+
};
|
|
110
|
+
onValuesChange?: (props: T, setValue: (name: any, value: any) => void) => void;
|
|
111
|
+
formSettings?: UseCustomFormOptions<T>;
|
|
112
|
+
isDraggable?: boolean;
|
|
113
|
+
isInDraggableView?: boolean;
|
|
114
|
+
id?: string;
|
|
115
|
+
viewSettings?: {
|
|
116
|
+
container?: React__default.ComponentType<ViewSettingsContainerProps>;
|
|
117
|
+
submitContainer?: React__default.ComponentType<ViewSettingsContainerProps>;
|
|
118
|
+
bodyContainer?: React__default.ComponentType<ViewSettingsContainerProps>;
|
|
119
|
+
containerProps?: Record<string, unknown>;
|
|
120
|
+
submitContainerProps?: Record<string, unknown>;
|
|
121
|
+
bodyContainerProps?: Record<string, unknown>;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
type UseFormManagerProps<T extends FieldValues> = {
|
|
125
|
+
data: Array<FormManagerConfig<T> | ((props: FormFunctionProps<T>) => FormManagerConfig<T>)>;
|
|
126
|
+
onInvalid?: (err: unknown) => void;
|
|
127
|
+
formOptions: UseCustomFormOptions<T>;
|
|
128
|
+
isHiddenErrors?: boolean;
|
|
129
|
+
ns?: string;
|
|
130
|
+
globalErrorNs?: string;
|
|
131
|
+
submit?: Array<Submit<T>>;
|
|
132
|
+
notification?: {
|
|
133
|
+
success?: FormNotificationMessage | ((res: unknown) => FormNotificationMessage);
|
|
134
|
+
error?: FormNotificationMessage | ((error: string) => FormNotificationMessage);
|
|
135
|
+
ns?: string;
|
|
136
|
+
};
|
|
137
|
+
onValuesChange?: (props: T, setValue: (name: any, value: any) => void) => void;
|
|
138
|
+
id?: string;
|
|
139
|
+
};
|
|
140
|
+
interface FieldComponentProps<T extends FieldValues> {
|
|
141
|
+
value: any;
|
|
142
|
+
onChange: (value: any) => void;
|
|
143
|
+
onBlur: () => void;
|
|
144
|
+
error?: boolean;
|
|
145
|
+
errorMessage?: string;
|
|
146
|
+
formValues?: T;
|
|
147
|
+
label?: string;
|
|
148
|
+
helperMessage?: string;
|
|
149
|
+
}
|
|
150
|
+
type FormManagerConfig<T extends FieldValues> = Omit<FormFieldConfig<T>, 'field' | 'fieldState' | 'fieldValues'>;
|
|
151
|
+
type MappedFormItemsFunction<F extends FieldValues, ComponentType> = (props: FormFunctionProps<F>) => ComponentType;
|
|
152
|
+
type Rules = {
|
|
153
|
+
validate?: (value: any) => string | undefined | Promise<string | undefined>;
|
|
154
|
+
onChange?: (value: any) => void;
|
|
155
|
+
onBlur?: () => void;
|
|
156
|
+
onMount?: (value: any) => void;
|
|
157
|
+
};
|
|
158
|
+
type FormFieldConfig<T extends FieldValues> = {
|
|
159
|
+
name: any;
|
|
160
|
+
label?: string;
|
|
161
|
+
rules?: Rules | MappedFormItemsFunction<T, Rules>;
|
|
162
|
+
field: GenericFieldApi<T>;
|
|
163
|
+
fieldState: GenericFieldState<T>;
|
|
164
|
+
containerStyle?: string;
|
|
165
|
+
component: (props: Omit<FieldComponentProps<T>, 'formValues'>) => React__default.JSX.Element;
|
|
166
|
+
container?: React__default.FC<PropsWithChildren>;
|
|
167
|
+
ns?: string;
|
|
168
|
+
errorNs?: string;
|
|
169
|
+
index?: number;
|
|
170
|
+
renderInFooter?: boolean;
|
|
171
|
+
renderInHeader?: boolean;
|
|
172
|
+
usedBoxes?: number;
|
|
173
|
+
key?: string;
|
|
174
|
+
isDraggable?: boolean;
|
|
175
|
+
isInDraggableView?: boolean;
|
|
176
|
+
helper?: {
|
|
177
|
+
text?: string;
|
|
178
|
+
translationOption?: FormTranslationOptions;
|
|
179
|
+
};
|
|
180
|
+
onFieldChange?: (value: any) => void;
|
|
181
|
+
hidden?: boolean | MappedFormItemsFunction<T, boolean>;
|
|
182
|
+
};
|
|
183
|
+
interface ErrorComponentProps {
|
|
184
|
+
message?: string;
|
|
185
|
+
fieldName?: string;
|
|
186
|
+
}
|
|
187
|
+
interface FormContainerProps {
|
|
188
|
+
className?: string;
|
|
189
|
+
children: React__default.ReactNode;
|
|
190
|
+
}
|
|
191
|
+
interface FormFieldProps<T extends FieldValues> {
|
|
192
|
+
config: FormFieldConfig<T>;
|
|
193
|
+
onFieldChange?: (value: T) => void;
|
|
194
|
+
ns?: string;
|
|
195
|
+
globalErrorNs?: string;
|
|
196
|
+
container?: React__default.FC<PropsWithChildren>;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
interface DefaultFormContainerProps {
|
|
200
|
+
children: React.ReactNode;
|
|
201
|
+
}
|
|
202
|
+
declare let DefaultContainer: ({ children }: ViewSettingsContainerProps) => React$1.ReactNode;
|
|
203
|
+
declare const setDefaultFormContainer: (val: ({ children, }: ViewSettingsContainerProps) => React.ReactNode) => void;
|
|
204
|
+
declare const DefaultFormContainer: <_T extends FieldValues = FieldValues>({ children, }: ViewSettingsContainerProps) => react_jsx_runtime.JSX.Element;
|
|
205
|
+
|
|
206
|
+
declare const FormManager: <T extends Record<string, any> = FieldValues>({ data, defaultValues, onInvalid, submit, ns, globalErrorNs, notification, formSettings, viewSettings, onValuesChange, id, }: FormManagerProps<T>) => react_jsx_runtime.JSX.Element;
|
|
207
|
+
|
|
208
|
+
declare const FormField: <T extends FieldValues>({ config, onFieldChange, ns: globalNs, globalErrorNs, }: FormFieldProps<T>) => react_jsx_runtime.JSX.Element;
|
|
209
|
+
|
|
210
|
+
interface FormStoreEntry<F extends FieldValues = FieldValues> {
|
|
211
|
+
formValues: F;
|
|
212
|
+
setValue: SetValueFunction<F>;
|
|
213
|
+
}
|
|
214
|
+
declare const DEFAULT_FORM_ENTRY: FormStoreEntry<FieldValues>;
|
|
215
|
+
/**
|
|
216
|
+
* Global atom storing all form state.
|
|
217
|
+
* Key format: "scopeId:formId" or just "formId" for backward compatibility.
|
|
218
|
+
*/
|
|
219
|
+
declare const formAtom: jotai.PrimitiveAtom<Record<string, FormStoreEntry<FieldValues>>> & {
|
|
220
|
+
init: Record<string, FormStoreEntry<FieldValues>>;
|
|
221
|
+
};
|
|
222
|
+
/**
|
|
223
|
+
* Helper to generate composite keys for forms.
|
|
224
|
+
*/
|
|
225
|
+
declare const getFormCompositeKey: (scopeId: string, key: string) => string;
|
|
226
|
+
/**
|
|
227
|
+
* Creates a derived atom for accessing forms of a specific scope.
|
|
228
|
+
*/
|
|
229
|
+
declare const createScopeFormsAtom: (scopeId: string) => jotai.WritableAtom<Record<string, FormStoreEntry<FieldValues>>, [update: Record<string, FormStoreEntry<FieldValues>>], void>;
|
|
230
|
+
declare const createFormSelector: <F extends FieldValues = FieldValues>(formId: string) => jotai.Atom<FormStoreEntry<F>>;
|
|
231
|
+
declare const useFormValue: <F extends FieldValues>(formId: string) => FormStoreEntry<F>;
|
|
232
|
+
declare const useFormState: <F extends FieldValues>() => [Record<string, FormStoreEntry<F>>, (value: Record<string, FormStoreEntry<F>>) => void];
|
|
233
|
+
declare const useSetFormState: <F extends FieldValues>(formId: string) => (val: Partial<FormStoreEntry<F>>) => void;
|
|
234
|
+
|
|
235
|
+
export { DEFAULT_FORM_ENTRY, DefaultContainer, DefaultFormContainer, FormField, FormManager, createFormSelector, createScopeFormsAtom, formAtom, formConfigAtom, getFormCompositeKey, setDefaultFormContainer, useFormConfigReset, useFormConfigState, useFormConfigValue, useFormManager, useFormState, useFormValue, useFormValues, useJotaiForm, useSetFormState };
|
|
236
|
+
export type { DefaultFormContainerProps, ErrorComponentProps, FieldComponentProps, FieldValues, FormConfigProps, FormContainerProps, FormElements, FormFieldConfig, FormFieldProps, FormFunctionProps, FormManagerConfig, FormManagerProps, FormNotificationMessage, FormStoreEntry, FormTranslationOptions, GenericFieldApi, GenericFieldState, GenericFormApi, GetFormValuesFunction, MappedFormItemsFunction, Rules, SetValueFunction, Submit, SubmitKeysArg, SubmitPayload, UseCustomFormOptions, UseFormManagerProps, UseFormValuesProps, ViewSettingsContainerProps };
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import * as _gaddario98_react_state from '@gaddario98/react-state';
|
|
2
|
+
|
|
3
|
+
type Locale = string;
|
|
4
|
+
type TranslationResources = Record<string, any>;
|
|
5
|
+
/**
|
|
6
|
+
* Opzioni di formattazione per i diversi tipi di valori
|
|
7
|
+
*/
|
|
8
|
+
interface FormatOptions {
|
|
9
|
+
number?: Intl.NumberFormatOptions;
|
|
10
|
+
date?: Intl.DateTimeFormatOptions;
|
|
11
|
+
currency?: Intl.NumberFormatOptions & {
|
|
12
|
+
currency?: string;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Opzioni per la traduzione con supporto parametri avanzati
|
|
17
|
+
*/
|
|
18
|
+
interface TranslationOptions {
|
|
19
|
+
[key: string]: any;
|
|
20
|
+
defaultValue?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Opzioni di formattazione per i parametri specifici
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* t('welcome', {
|
|
27
|
+
* price: 1234.56,
|
|
28
|
+
* formatOptions: {
|
|
29
|
+
* price: {
|
|
30
|
+
* currency: { currency: 'EUR', minimumFractionDigits: 2 }
|
|
31
|
+
* }
|
|
32
|
+
* }
|
|
33
|
+
* })
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
formatOptions?: Record<string, FormatOptions>;
|
|
37
|
+
ns?: string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Funzione di traduzione con supporto parametri avanzati
|
|
41
|
+
*
|
|
42
|
+
* @example Interpolazione semplice
|
|
43
|
+
* ```ts
|
|
44
|
+
* t('welcome', { name: 'Mario' })
|
|
45
|
+
* // "Benvenuto {{name}}" -> "Benvenuto Mario"
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* @example Formattazione numeri
|
|
49
|
+
* ```ts
|
|
50
|
+
* t('items_count', { count: 1000 })
|
|
51
|
+
* // "Hai {{count, number}} elementi" -> "Hai 1,000 elementi"
|
|
52
|
+
* ```
|
|
53
|
+
*
|
|
54
|
+
* @example Formattazione date
|
|
55
|
+
* ```ts
|
|
56
|
+
* t('last_login', { date: new Date() })
|
|
57
|
+
* // "Ultimo accesso: {{date, date}}" -> "Ultimo accesso: 15/12/2025"
|
|
58
|
+
* ```
|
|
59
|
+
*
|
|
60
|
+
* @example Formattazione valuta
|
|
61
|
+
* ```ts
|
|
62
|
+
* t('total', {
|
|
63
|
+
* price: 99.99,
|
|
64
|
+
* formatOptions: {
|
|
65
|
+
* price: { currency: { currency: 'EUR' } }
|
|
66
|
+
* }
|
|
67
|
+
* })
|
|
68
|
+
* // "Totale: {{price, currency}}" -> "Totale: €99.99"
|
|
69
|
+
* ```
|
|
70
|
+
*
|
|
71
|
+
* @example Pluralizzazione
|
|
72
|
+
* ```ts
|
|
73
|
+
* t('items', { count: 0 })
|
|
74
|
+
* // "{{count, plural, =0{Nessun elemento} one{Un elemento} other{# elementi}}}"
|
|
75
|
+
* // -> "Nessun elemento"
|
|
76
|
+
*
|
|
77
|
+
* t('items', { count: 1 })
|
|
78
|
+
* // -> "Un elemento"
|
|
79
|
+
*
|
|
80
|
+
* t('items', { count: 5 })
|
|
81
|
+
* // -> "5 elementi"
|
|
82
|
+
* ```
|
|
83
|
+
*
|
|
84
|
+
* @example Selezione
|
|
85
|
+
* ```ts
|
|
86
|
+
* t('greeting', { gender: 'male' })
|
|
87
|
+
* // "{{gender, select, male{Benvenuto} female{Benvenuta} other{Benvenuto/a}}}"
|
|
88
|
+
* // -> "Benvenuto"
|
|
89
|
+
* ```
|
|
90
|
+
*/
|
|
91
|
+
type TranslateFunction = (key: string, options?: TranslationOptions) => string;
|
|
92
|
+
interface I18nConfig {
|
|
93
|
+
defaultLocale: Locale;
|
|
94
|
+
supportedLocales: Array<Locale>;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
interface LocalizationConfigProps {
|
|
98
|
+
currentLocale: Locale;
|
|
99
|
+
locales: Record<Locale, TranslationResources>;
|
|
100
|
+
}
|
|
101
|
+
declare const localizationConfigAtom: _gaddario98_react_state.PrimitiveAtom<LocalizationConfigProps>;
|
|
102
|
+
declare const useLocalizationConfigValue: () => LocalizationConfigProps;
|
|
103
|
+
declare const useLocalizationConfigState: () => [LocalizationConfigProps, (value: LocalizationConfigProps) => void];
|
|
104
|
+
declare const useLocalizationConfigReset: () => () => void;
|
|
105
|
+
/**
|
|
106
|
+
* Hook per gestire le operazioni di localization
|
|
107
|
+
*/
|
|
108
|
+
declare const useLocalizationActions: () => {
|
|
109
|
+
/**
|
|
110
|
+
* Aggiunge o aggiorna una locale con le sue risorse
|
|
111
|
+
*/
|
|
112
|
+
addLocale: (locale: Locale, resources: TranslationResources) => void;
|
|
113
|
+
/**
|
|
114
|
+
* Switch alla locale specificata
|
|
115
|
+
*/
|
|
116
|
+
switchLocale: (locale: Locale) => void;
|
|
117
|
+
/**
|
|
118
|
+
* Inizializza con una locale di default
|
|
119
|
+
*/
|
|
120
|
+
initializeLocale: (locale: Locale, resources: TranslationResources) => void;
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Funzione core per risolvere una traduzione.
|
|
125
|
+
*/
|
|
126
|
+
declare const resolveTranslation: (key: string, resources: TranslationResources, options?: TranslationOptions, locale?: string) => string;
|
|
127
|
+
|
|
128
|
+
declare const useTranslation: (_ns?: string) => {
|
|
129
|
+
t: TranslateFunction;
|
|
130
|
+
locale: Locale;
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Crea un'istanza di traduzione per l'uso lato server (o fuori dai componenti React).
|
|
135
|
+
*/
|
|
136
|
+
declare const createServerTranslator: (resources: TranslationResources, locale?: Locale) => {
|
|
137
|
+
t: TranslateFunction;
|
|
138
|
+
locale: Locale;
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
type TranslationFunction = (key: string, options?: TranslationOptions) => string;
|
|
142
|
+
/**
|
|
143
|
+
* Hook per tradurre testi che si adatta al sistema di traduzione interno.
|
|
144
|
+
* Wrapper di retro-compatibilità per useTranslation.
|
|
145
|
+
*
|
|
146
|
+
* @param ns - Namespace opzionale (ignorato nella nuova implementazione)
|
|
147
|
+
* @returns Un oggetto con la funzione traslateText (e alias t)
|
|
148
|
+
*/
|
|
149
|
+
declare const useTranslatedText: (ns?: string) => {
|
|
150
|
+
traslateText: (text: string, options?: TranslationOptions) => string;
|
|
151
|
+
t: (text: string, options?: TranslationOptions) => string;
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
export { createServerTranslator, localizationConfigAtom, resolveTranslation, useLocalizationActions, useLocalizationConfigReset, useLocalizationConfigState, useLocalizationConfigValue, useTranslatedText, useTranslation };
|
|
155
|
+
export type { FormatOptions, I18nConfig, Locale, LocalizationConfigProps, TranslateFunction, TranslationFunction, TranslationOptions, TranslationResources };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as _gaddario98_react_state from '@gaddario98/react-state';
|
|
2
|
+
|
|
3
|
+
interface NotificationMessage {
|
|
4
|
+
id: string;
|
|
5
|
+
message: string;
|
|
6
|
+
type: 'success' | 'error' | 'info' | 'warning';
|
|
7
|
+
autoHideDuration?: number;
|
|
8
|
+
textTransOption?: Record<string, unknown>;
|
|
9
|
+
ns?: string;
|
|
10
|
+
}
|
|
11
|
+
type TypeNotification = 'like' | 'message' | 'comments' | 'follow';
|
|
12
|
+
interface UserNotification {
|
|
13
|
+
uid: string;
|
|
14
|
+
type: TypeNotification;
|
|
15
|
+
postId?: string;
|
|
16
|
+
typePost?: string;
|
|
17
|
+
token: string;
|
|
18
|
+
message?: string;
|
|
19
|
+
data?: Date;
|
|
20
|
+
read: boolean;
|
|
21
|
+
notificationId: string;
|
|
22
|
+
nickname?: string;
|
|
23
|
+
titlePost?: string;
|
|
24
|
+
}
|
|
25
|
+
type NotificationConfig = Partial<Omit<NotificationMessage, 'id'>>;
|
|
26
|
+
|
|
27
|
+
declare const useNotification: (ns?: string) => {
|
|
28
|
+
showNotification: (notification: Omit<NotificationMessage, "id">) => void;
|
|
29
|
+
clearNotification: () => void;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
declare const notificationAtom: _gaddario98_react_state.PrimitiveAtom<NotificationMessage | null>;
|
|
33
|
+
declare const useNotificationValue: () => NotificationMessage | null;
|
|
34
|
+
declare const useNotificationState: () => [NotificationMessage | null, (value: NotificationMessage | null) => void];
|
|
35
|
+
|
|
36
|
+
export { notificationAtom, useNotification, useNotificationState, useNotificationValue };
|
|
37
|
+
export type { NotificationConfig, NotificationMessage, UserNotification };
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
'use strict';var compilerRuntime=require('react/compiler-runtime'),react=require('react'),reactState=require('@gaddario98/react-state');const {
|
|
2
|
+
atom: notificationAtom,
|
|
3
|
+
useValue: useNotificationValue,
|
|
4
|
+
useState: useNotificationState
|
|
5
|
+
} = reactState.atomStateGenerator({
|
|
6
|
+
defaultValue: null,
|
|
7
|
+
key: 'reactNotificationAtom',
|
|
8
|
+
persist: false
|
|
9
|
+
});const useNotificationSet = () => {
|
|
10
|
+
const [, setValue] = useNotificationState();
|
|
11
|
+
return setValue;
|
|
12
|
+
};
|
|
13
|
+
const useNotification = t0 => {
|
|
14
|
+
const $ = compilerRuntime.c(10);
|
|
15
|
+
const ns = t0 === undefined ? "notifications" : t0;
|
|
16
|
+
const setNotification = useNotificationSet();
|
|
17
|
+
let t1;
|
|
18
|
+
if ($[0] !== ns || $[1] !== setNotification) {
|
|
19
|
+
t1 = {
|
|
20
|
+
setNotification,
|
|
21
|
+
ns
|
|
22
|
+
};
|
|
23
|
+
$[0] = ns;
|
|
24
|
+
$[1] = setNotification;
|
|
25
|
+
$[2] = t1;
|
|
26
|
+
} else {
|
|
27
|
+
t1 = $[2];
|
|
28
|
+
}
|
|
29
|
+
const ref = react.useRef(t1);
|
|
30
|
+
let t2;
|
|
31
|
+
let t3;
|
|
32
|
+
if ($[3] !== ns || $[4] !== setNotification) {
|
|
33
|
+
t2 = () => {
|
|
34
|
+
ref.current = {
|
|
35
|
+
setNotification,
|
|
36
|
+
ns
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
t3 = [setNotification, ns];
|
|
40
|
+
$[3] = ns;
|
|
41
|
+
$[4] = setNotification;
|
|
42
|
+
$[5] = t2;
|
|
43
|
+
$[6] = t3;
|
|
44
|
+
} else {
|
|
45
|
+
t2 = $[5];
|
|
46
|
+
t3 = $[6];
|
|
47
|
+
}
|
|
48
|
+
react.useEffect(t2, t3);
|
|
49
|
+
let t4;
|
|
50
|
+
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
51
|
+
t4 = notification => {
|
|
52
|
+
ref.current.setNotification(Object.assign(Object.assign({
|
|
53
|
+
ns: ref.current.ns
|
|
54
|
+
}, notification), {
|
|
55
|
+
id: Date.now().toString()
|
|
56
|
+
}));
|
|
57
|
+
};
|
|
58
|
+
$[7] = t4;
|
|
59
|
+
} else {
|
|
60
|
+
t4 = $[7];
|
|
61
|
+
}
|
|
62
|
+
const showNotification = t4;
|
|
63
|
+
let t5;
|
|
64
|
+
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
65
|
+
t5 = () => {
|
|
66
|
+
ref.current.setNotification(null);
|
|
67
|
+
};
|
|
68
|
+
$[8] = t5;
|
|
69
|
+
} else {
|
|
70
|
+
t5 = $[8];
|
|
71
|
+
}
|
|
72
|
+
const clearNotification = t5;
|
|
73
|
+
let t6;
|
|
74
|
+
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
75
|
+
t6 = {
|
|
76
|
+
showNotification,
|
|
77
|
+
clearNotification
|
|
78
|
+
};
|
|
79
|
+
$[9] = t6;
|
|
80
|
+
} else {
|
|
81
|
+
t6 = $[9];
|
|
82
|
+
}
|
|
83
|
+
return t6;
|
|
84
|
+
};exports.notificationAtom=notificationAtom;exports.useNotification=useNotification;exports.useNotificationState=useNotificationState;exports.useNotificationValue=useNotificationValue;//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../notifications/notificationAtom.ts","../../notifications/useNotification.ts"],"sourcesContent":["import { atomStateGenerator } from '@gaddario98/react-state';\nimport type { NotificationMessage } from './types';\n\nconst {\n atom: notificationAtom,\n useValue: useNotificationValue,\n useState: useNotificationState,\n} = atomStateGenerator<NotificationMessage | null>({\n defaultValue: null,\n key: 'reactNotificationAtom',\n persist: false,\n});\n\nexport { notificationAtom, useNotificationValue, useNotificationState };\n","import { useCallback, useEffect, useRef } from 'react';\nimport { useNotificationState } from './notificationAtom';\nimport type { NotificationMessage } from './types';\n\n const useNotificationSet = () => {\n const [, setValue] = useNotificationState();\n return setValue;\n };\n\nexport const useNotification = (ns = 'notifications') => {\n const setNotification = useNotificationSet();\n const ref =useRef({setNotification, ns})\n\n useEffect(() => {\n ref.current = { setNotification, ns };\n }, [setNotification, ns]);\n\n const showNotification = useCallback(\n (notification: Omit<NotificationMessage, 'id'>) => {\n ref.current.setNotification({\n ns: ref.current.ns,\n ...notification,\n id: Date.now().toString(),\n });\n },\n [],\n );\n\n const clearNotification = useCallback(() => {\n ref.current.setNotification(null);\n }, []);\n\n return {\n showNotification,\n clearNotification,\n };\n};\n"],"names":["atom","notificationAtom","useValue","useNotificationValue","useState","useNotificationState","atomStateGenerator","defaultValue","key","persist","useNotificationSet","setValue","useNotification","t0","$","_c","ns","undefined","setNotification","t1","ref","useRef","t2","t3","current","useEffect","t4","Symbol","for","notification","Object","assign","id","Date","now","toString","showNotification","t5","clearNotification","t6"],"mappings":"wIAGA,MAAM;AACJA,EAAAA,IAAI,EAAEC,gBAAgB;AACtBC,EAAAA,QAAQ,EAAEC,oBAAoB;AAC9BC,EAAAA,QAAQ,EAAEC;AAAoB,CAC/B,GAAGC,6BAAkB,CAA6B;AACjDC,EAAAA,YAAY,EAAE,IAAI;AAClBC,EAAAA,GAAG,EAAE,uBAAuB;AAC5BC,EAAAA,OAAO,EAAE;AACV,CAAA,ECPC,MAAMC,kBAAkB,GAAGA,MAAA;AACzB,EAAA,MAAA,GAAAC,QAAA,CAAA,GAAqBN,oBAAoB,EAAE;AAAC,EAAA,OACrCM,QAAQ;AAAA,CAChB;AAEI,MAAMC,eAAe,GAAGC,EAAA,IAAA;EAAA,MAAAC,CAAA,GAAAC,iBAAA,CAAA,EAAA,CAAA;EAAC,MAAAC,EAAA,GAAAH,EAAoB,KAApBI,SAAoB,GAApB,eAAoB,GAApBJ,EAAoB;AAClD,EAAA,MAAAK,eAAA,GAAwBR,kBAAkB,EAAE;AAAC,EAAA,IAAAS,EAAA;AAAA,EAAA,IAAAL,CAAA,CAAA,CAAA,CAAA,KAAAE,EAAA,IAAAF,CAAA,QAAAI,eAAA,EAAA;IAC3BC,EAAA,GAAA;MAAAD,eAAA;AAAAF,MAAAA;KAAqB;AAAAF,IAAAA,CAAA,MAAAE,EAAA;AAAAF,IAAAA,CAAA,MAAAI,eAAA;AAAAJ,IAAAA,CAAA,MAAAK,EAAA;AAAA,EAAA,CAAA,MAAA;AAAAA,IAAAA,EAAA,GAAAL,CAAA,CAAA,CAAA,CAAA;AAAA,EAAA;AAAvC,EAAA,MAAAM,GAAA,GAAWC,YAAM,CAACF,EAAqB,CAAC;AAAA,EAAA,IAAAG,EAAA;AAAA,EAAA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,EAAA,IAAAvB,CAAA,CAAA,CAAA,CAAA,KAAAa,MAAA,CAAAC,GAAA,CAAA,2BAAA,CAAA,EAAA;AAEoCS,IAAAA,EAAA,GAAAA,MAAA;AACpCjB,MAAAA,GAAG,CAAAI,OAAQ,CAAAN,eAAgB,CAAC,IAAI,CAAC;IAAA,CAClC;AAAAJ,IAAAA,CAAA,MAAAuB,EAAA;AAAA,EAAA,CAAA,MAAA;AAAAA,IAAAA,EAAA,GAAAvB,CAAA,CAAA,CAAA,CAAA;AAAA,EAAA;EAFD,MAAAwB,iBAAA,GAA0BD,EAEpB;AAAC,EAAA,IAAAE,EAAA;AAAA,EAAA,IAAAzB,CAAA,CAAA,CAAA,CAAA,KAAAa,MAAA,CAAAC,GAAA,CAAA,2BAAA,CAAA,EAAA;IAEAW,EAAA,GAAA;MAAAH,gBAAA;AAAAE,MAAAA;KAGN;AAAAxB,IAAAA,CAAA,MAAAyB,EAAA;AAAA,EAAA,CAAA,MAAA;AAAAA,IAAAA,EAAA,GAAAzB,CAAA,CAAA,CAAA,CAAA;AAAA,EAAA;AAAA,EAAA,OAHMyB,EAGN;AAAA"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import {c}from'react/compiler-runtime';import {useRef,useEffect}from'react';import {atomStateGenerator}from'@gaddario98/react-state';const {
|
|
2
|
+
atom: notificationAtom,
|
|
3
|
+
useValue: useNotificationValue,
|
|
4
|
+
useState: useNotificationState
|
|
5
|
+
} = atomStateGenerator({
|
|
6
|
+
defaultValue: null,
|
|
7
|
+
key: 'reactNotificationAtom',
|
|
8
|
+
persist: false
|
|
9
|
+
});const useNotificationSet = () => {
|
|
10
|
+
const [, setValue] = useNotificationState();
|
|
11
|
+
return setValue;
|
|
12
|
+
};
|
|
13
|
+
const useNotification = t0 => {
|
|
14
|
+
const $ = c(10);
|
|
15
|
+
const ns = t0 === undefined ? "notifications" : t0;
|
|
16
|
+
const setNotification = useNotificationSet();
|
|
17
|
+
let t1;
|
|
18
|
+
if ($[0] !== ns || $[1] !== setNotification) {
|
|
19
|
+
t1 = {
|
|
20
|
+
setNotification,
|
|
21
|
+
ns
|
|
22
|
+
};
|
|
23
|
+
$[0] = ns;
|
|
24
|
+
$[1] = setNotification;
|
|
25
|
+
$[2] = t1;
|
|
26
|
+
} else {
|
|
27
|
+
t1 = $[2];
|
|
28
|
+
}
|
|
29
|
+
const ref = useRef(t1);
|
|
30
|
+
let t2;
|
|
31
|
+
let t3;
|
|
32
|
+
if ($[3] !== ns || $[4] !== setNotification) {
|
|
33
|
+
t2 = () => {
|
|
34
|
+
ref.current = {
|
|
35
|
+
setNotification,
|
|
36
|
+
ns
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
t3 = [setNotification, ns];
|
|
40
|
+
$[3] = ns;
|
|
41
|
+
$[4] = setNotification;
|
|
42
|
+
$[5] = t2;
|
|
43
|
+
$[6] = t3;
|
|
44
|
+
} else {
|
|
45
|
+
t2 = $[5];
|
|
46
|
+
t3 = $[6];
|
|
47
|
+
}
|
|
48
|
+
useEffect(t2, t3);
|
|
49
|
+
let t4;
|
|
50
|
+
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
51
|
+
t4 = notification => {
|
|
52
|
+
ref.current.setNotification(Object.assign(Object.assign({
|
|
53
|
+
ns: ref.current.ns
|
|
54
|
+
}, notification), {
|
|
55
|
+
id: Date.now().toString()
|
|
56
|
+
}));
|
|
57
|
+
};
|
|
58
|
+
$[7] = t4;
|
|
59
|
+
} else {
|
|
60
|
+
t4 = $[7];
|
|
61
|
+
}
|
|
62
|
+
const showNotification = t4;
|
|
63
|
+
let t5;
|
|
64
|
+
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
65
|
+
t5 = () => {
|
|
66
|
+
ref.current.setNotification(null);
|
|
67
|
+
};
|
|
68
|
+
$[8] = t5;
|
|
69
|
+
} else {
|
|
70
|
+
t5 = $[8];
|
|
71
|
+
}
|
|
72
|
+
const clearNotification = t5;
|
|
73
|
+
let t6;
|
|
74
|
+
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
75
|
+
t6 = {
|
|
76
|
+
showNotification,
|
|
77
|
+
clearNotification
|
|
78
|
+
};
|
|
79
|
+
$[9] = t6;
|
|
80
|
+
} else {
|
|
81
|
+
t6 = $[9];
|
|
82
|
+
}
|
|
83
|
+
return t6;
|
|
84
|
+
};export{notificationAtom,useNotification,useNotificationState,useNotificationValue};//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../notifications/notificationAtom.ts","../../notifications/useNotification.ts"],"sourcesContent":["import { atomStateGenerator } from '@gaddario98/react-state';\nimport type { NotificationMessage } from './types';\n\nconst {\n atom: notificationAtom,\n useValue: useNotificationValue,\n useState: useNotificationState,\n} = atomStateGenerator<NotificationMessage | null>({\n defaultValue: null,\n key: 'reactNotificationAtom',\n persist: false,\n});\n\nexport { notificationAtom, useNotificationValue, useNotificationState };\n","import { useCallback, useEffect, useRef } from 'react';\nimport { useNotificationState } from './notificationAtom';\nimport type { NotificationMessage } from './types';\n\n const useNotificationSet = () => {\n const [, setValue] = useNotificationState();\n return setValue;\n };\n\nexport const useNotification = (ns = 'notifications') => {\n const setNotification = useNotificationSet();\n const ref =useRef({setNotification, ns})\n\n useEffect(() => {\n ref.current = { setNotification, ns };\n }, [setNotification, ns]);\n\n const showNotification = useCallback(\n (notification: Omit<NotificationMessage, 'id'>) => {\n ref.current.setNotification({\n ns: ref.current.ns,\n ...notification,\n id: Date.now().toString(),\n });\n },\n [],\n );\n\n const clearNotification = useCallback(() => {\n ref.current.setNotification(null);\n }, []);\n\n return {\n showNotification,\n clearNotification,\n };\n};\n"],"names":["atom","notificationAtom","useValue","useNotificationValue","useState","useNotificationState","atomStateGenerator","defaultValue","key","persist","useNotificationSet","setValue","useNotification","t0","$","_c","ns","undefined","setNotification","t1","ref","useRef","t2","t3","current","useEffect","t4","Symbol","for","notification","Object","assign","id","Date","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