@gaddario98/react-core 2.0.7 → 2.0.9
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/auth/index.d.ts +2 -2
- package/dist/auth/index.js +184 -2
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/index.mjs +183 -1
- package/dist/auth/index.mjs.map +1 -1
- package/dist/form/index.js +263 -3959
- package/dist/form/index.js.map +1 -1
- package/dist/form/index.mjs +213 -3909
- package/dist/form/index.mjs.map +1 -1
- package/dist/index.d.ts +623 -93
- package/dist/index.js +5381 -16418
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5372 -16409
- package/dist/index.mjs.map +1 -1
- package/dist/localization/index.js +184 -2
- package/dist/localization/index.js.map +1 -1
- package/dist/localization/index.mjs +183 -1
- package/dist/localization/index.mjs.map +1 -1
- package/dist/notifications/index.d.ts +2 -2
- package/dist/notifications/index.js +185 -3
- package/dist/notifications/index.js.map +1 -1
- package/dist/notifications/index.mjs +184 -2
- package/dist/notifications/index.mjs.map +1 -1
- package/dist/pages/index.d.ts +29 -29
- package/dist/pages/index.js +1536 -1680
- package/dist/pages/index.js.map +1 -1
- package/dist/pages/index.mjs +1522 -1666
- package/dist/pages/index.mjs.map +1 -1
- package/dist/queries/index.js +393 -7439
- package/dist/queries/index.js.map +1 -1
- package/dist/queries/index.mjs +385 -7431
- package/dist/queries/index.mjs.map +1 -1
- package/dist/state/index.js +10 -1783
- package/dist/state/index.js.map +1 -1
- package/dist/state/index.mjs +2 -1775
- package/dist/state/index.mjs.map +1 -1
- package/package.json +8 -6
|
@@ -1 +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","now","toString","showNotification","t5","clearNotification","t6"],"mappings":"qIAGA,MAAM;AACJA,EAAAA,IAAI,EAAEC,gBAAgB;AACtBC,EAAAA,QAAQ,EAAEC,oBAAoB;AAC9BC,EAAAA,QAAQ,EAAEC;AAAoB,CAC/B,GAAGC,kBAAkB,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,CAAA,CAAA,EAAA,CAAA;EAAC,MAAAC,EAAA,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AAA,EAAA,OAHMyB,EAGN;AAAA"}
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../state/storage.ts","../../state/atomStateGenerator.ts","../../notifications/notificationAtom.ts","../../notifications/useNotification.ts"],"sourcesContent":["import { deflateSync, inflateSync, strFromU8, strToU8 } from 'fflate'\n\nexport type SyncStorage = Pick<Storage, 'getItem' | 'setItem' | 'removeItem'>\n\nconst RAW_PREFIX = 'storage:raw:'\nconst DEFLATE_PREFIX = 'storage:deflate:v1:'\n\nconst isProbablyJson = (value: string) => {\n if (!value) return false\n const c = value.charCodeAt(0)\n // { [ \" digits, t/f/n (true/false/null)\n return (\n c === 123 ||\n c === 91 ||\n c === 34 ||\n (c >= 48 && c <= 57) ||\n c === 45 ||\n c === 116 ||\n c === 102 ||\n c === 110\n )\n}\n\nconst u8ToBase64 = (bytes: Uint8Array) => {\n let binary = ''\n const chunkSize = 0x8000\n for (let i = 0; i < bytes.length; i += chunkSize) {\n binary += String.fromCharCode(...bytes.subarray(i, i + chunkSize))\n }\n return btoa(binary)\n}\n\nconst base64ToU8 = (base64: string) => {\n const binary = atob(base64)\n const bytes = new Uint8Array(binary.length)\n for (let i = 0; i < binary.length; i++) {\n bytes[i] = binary.charCodeAt(i)\n }\n return bytes\n}\n\ntype CompressedStorageOptions = {\n minSizeToCompress?: number\n deflateLevel?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9\n writeDebounceMs?: number\n}\n\nconst createCompressedStorage = (\n base: SyncStorage,\n options: CompressedStorageOptions = {},\n): SyncStorage => {\n const {\n minSizeToCompress = 1024,\n deflateLevel = 1,\n writeDebounceMs = 50,\n } = options\n\n const pendingWrites = new Map<string, string>()\n let flushTimer: number | undefined\n let lifecycleHooksInstalled = false\n\n const flush = () => {\n flushTimer = undefined\n for (const [key, value] of pendingWrites) {\n try {\n if (value.length < minSizeToCompress) {\n base.setItem(key, RAW_PREFIX + value)\n continue\n }\n\n const input = strToU8(value)\n const compressed = deflateSync(input, { level: deflateLevel })\n base.setItem(key, DEFLATE_PREFIX + u8ToBase64(compressed))\n } catch (error) {\n console.error('Error setting item:', error)\n try {\n base.setItem(key, RAW_PREFIX + value)\n } catch {\n // ignore\n }\n }\n }\n pendingWrites.clear()\n }\n\n const scheduleFlush = () => {\n if (flushTimer != null) return\n if (!lifecycleHooksInstalled && typeof window !== 'undefined') {\n lifecycleHooksInstalled = true\n window.addEventListener('beforeunload', flush)\n document.addEventListener('visibilitychange', () => {\n if (document.visibilityState === 'hidden') flush()\n })\n }\n flushTimer = globalThis.setTimeout(\n flush,\n writeDebounceMs,\n ) as unknown as number\n }\n\n return {\n getItem: (key: string): string | null => {\n try {\n const stored = base.getItem(key)\n if (!stored) return null\n\n if (stored.startsWith(RAW_PREFIX)) {\n return stored.slice(RAW_PREFIX.length)\n }\n\n if (stored.startsWith(DEFLATE_PREFIX)) {\n const b64 = stored.slice(DEFLATE_PREFIX.length)\n const bytes = base64ToU8(b64)\n const decompressed = inflateSync(bytes)\n return strFromU8(decompressed)\n }\n\n // Back-compat: older versions may have stored raw JSON without any prefix\n if (isProbablyJson(stored)) return stored\n\n return null\n } catch (error) {\n console.error('Error getting item:', error)\n return null\n }\n },\n\n setItem: (key: string, value: string) => {\n try {\n // Some upstream serializers can return `undefined` (e.g. JSON.stringify(undefined)).\n const rawValue = value as unknown as string | null | undefined\n if (rawValue == null) {\n pendingWrites.delete(key)\n base.removeItem(key)\n return\n }\n\n const stringValue = typeof rawValue === 'string' ? rawValue : String(rawValue)\n pendingWrites.set(key, stringValue)\n scheduleFlush()\n } catch (error) {\n console.error('Error setting item:', error)\n }\n },\n\n removeItem: (key: string) => {\n try {\n pendingWrites.delete(key)\n base.removeItem(key)\n } catch (error) {\n console.error('Error removing item:', error)\n }\n },\n }\n}\n\nconst baseStorage: SyncStorage = {\n getItem: (key) => {\n if (typeof localStorage === 'undefined') return null\n return localStorage.getItem(key)\n },\n setItem: (key, value) => {\n if (typeof localStorage === 'undefined') return\n localStorage.setItem(key, value)\n },\n removeItem: (key) => {\n if (typeof localStorage === 'undefined') return\n localStorage.removeItem(key)\n },\n}\n\nexport let storage: SyncStorage = createCompressedStorage(baseStorage)\n\nexport const setCustomStorage = (newStorage: SyncStorage) => {\n storage = newStorage\n}\n","import { atom, useAtom } from 'jotai'\nimport { atomWithStorage, createJSONStorage } from 'jotai/utils'\nimport { storage } from './storage'\nimport type { PrimitiveAtom } from 'jotai'\n\nexport type { PrimitiveAtom } from 'jotai'\n\nexport type AtomGeneratorOptions<T> = {\n key: string\n defaultValue: T\n persist?: boolean\n storage?: Pick<Storage, 'getItem' | 'setItem' | 'removeItem'>\n}\n\nexport type AtomState<T> = {\n atom: PrimitiveAtom<T>\n useValue: () => T\n useState: () => [T, (value: T) => void]\n useReset: () => () => void\n}\n\n// Overload per persist = true\nexport function atomStateGenerator<T>(\n options: AtomGeneratorOptions<T> & { persist: true },\n): AtomState<T>\n\n// Overload per persist = false o undefined\nexport function atomStateGenerator<T>(\n options: AtomGeneratorOptions<T> & { persist?: false },\n): AtomState<T>\n\n// Implementazione\nexport function atomStateGenerator<T>({\n key,\n defaultValue,\n persist = false,\n storage: customStorage,\n}: AtomGeneratorOptions<T>): AtomState<T> {\n const resolvedStorage = customStorage || storage\n\n // Usa atomWithStorage solo se persist è true, altrimenti atom normale\n const jotaiAtom = persist\n ? atomWithStorage<T>(\n key,\n defaultValue,\n createJSONStorage<T>(() => resolvedStorage),\n )\n : atom<T>(defaultValue)\n\n const useValue = () => {\n const [value] = useAtom(jotaiAtom as PrimitiveAtom<T>)\n return value\n }\n\n const useState = () => {\n const [value, setValue] = useAtom(jotaiAtom as PrimitiveAtom<T>)\n return [value, setValue] as [T, (value: T) => void]\n }\n\n const useReset = () => {\n const [, setValue] = useAtom(jotaiAtom as PrimitiveAtom<T>)\n return () => {\n setValue(defaultValue)\n // Rimuovi dallo storage solo se era persistente\n if (persist) {\n resolvedStorage.removeItem(key)\n }\n }\n }\n\n return {\n atom: jotaiAtom as PrimitiveAtom<T>,\n useValue,\n useState,\n useReset,\n }\n}\n","import { atomStateGenerator } from \"../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":["RAW_PREFIX","DEFLATE_PREFIX","isProbablyJson","value","c","charCodeAt","u8ToBase64","bytes","binary","chunkSize","i","length","String","fromCharCode","subarray","btoa","base64ToU8","base64","atob","Uint8Array","createCompressedStorage","base","options","minSizeToCompress","deflateLevel","writeDebounceMs","pendingWrites","Map","flushTimer","lifecycleHooksInstalled","flush","undefined","key","setItem","input","strToU8","compressed","deflateSync","level","error","console","_a","clear","scheduleFlush","window","addEventListener","document","visibilityState","globalThis","setTimeout","getItem","stored","startsWith","slice","b64","decompressed","inflateSync","strFromU8","rawValue","delete","removeItem","stringValue","set","baseStorage","localStorage","storage","atomStateGenerator","defaultValue","persist","customStorage","resolvedStorage","jotaiAtom","atomWithStorage","createJSONStorage","atom","useValue","useAtom","useState","$","_c","setValue","t0","useReset","notificationAtom","useNotificationValue","useNotificationState","useNotificationSet","useNotification","ns","setNotification","t1","ref","useRef","t2","t3","current","useEffect","t4","Symbol","for","notification","Object","assign","id","Date","now","toString","showNotification","t5","clearNotification","t6"],"mappings":"wOAIA,MAAMA,UAAU,GAAG,cAAc;AACjC,MAAMC,cAAc,GAAG,qBAAqB;AAE5C,MAAMC,cAAc,GAAIC,KAAa,IAAI;AACvC,EAAA,IAAI,CAACA,KAAK,EAAE,OAAO,KAAK;AACxB,EAAA,MAAMC,CAAC,GAAGD,KAAK,CAACE,UAAU,CAAC,CAAC,CAAC;AAC7B;AACA,EAAA,OACED,CAAC,KAAK,GAAG,IACTA,CAAC,KAAK,EAAE,IACRA,CAAC,KAAK,EAAE,IACPA,CAAC,IAAI,EAAE,IAAIA,CAAC,IAAI,EAAG,IACpBA,CAAC,KAAK,EAAE,IACRA,CAAC,KAAK,GAAG,IACTA,CAAC,KAAK,GAAG,IACTA,CAAC,KAAK,GAAG;AAEb,CAAC;AAED,MAAME,UAAU,GAAIC,KAAiB,IAAI;EACvC,IAAIC,MAAM,GAAG,EAAE;EACf,MAAMC,SAAS,GAAG,MAAM;AACxB,EAAA,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGH,KAAK,CAACI,MAAM,EAAED,CAAC,IAAID,SAAS,EAAE;AAChDD,IAAAA,MAAM,IAAII,MAAM,CAACC,YAAY,CAAC,GAAGN,KAAK,CAACO,QAAQ,CAACJ,CAAC,EAAEA,CAAC,GAAGD,SAAS,CAAC,CAAC;AACpE,EAAA;EACA,OAAOM,IAAI,CAACP,MAAM,CAAC;AACrB,CAAC;AAED,MAAMQ,UAAU,GAAIC,MAAc,IAAI;AACpC,EAAA,MAAMT,MAAM,GAAGU,IAAI,CAACD,MAAM,CAAC;EAC3B,MAAMV,KAAK,GAAG,IAAIY,UAAU,CAACX,MAAM,CAACG,MAAM,CAAC;AAC3C,EAAA,KAAK,IAAID,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGF,MAAM,CAACG,MAAM,EAAED,CAAC,EAAE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pB;AAAC,EAAA,IAAAE,EAAA;AAAA,EAAA,IAAAhC,CAAA,CAAA,CAAA,CAAA,KAAAoB,MAAA,CAAAC,GAAA,CAAA,2BAAA,CAAA,EAAA;IAEAW,EAAA,GAAA;MAAAH,gBAAA;AAAAE,MAAAA;KAGN;AAAA/B,IAAAA,CAAA,MAAAgC,EAAA;AAAA,EAAA,CAAA,MAAA;AAAAA,IAAAA,EAAA,GAAAhC,CAAA,CAAA,CAAA,CAAA;AAAA,EAAA;AAAA,EAAA,OAHMgC,EAGN;AAAA"}
|
package/dist/pages/index.d.ts
CHANGED
|
@@ -1082,24 +1082,24 @@ type MutationCompositeKey$1<Q extends QueriesArray> = {
|
|
|
1082
1082
|
}[MutationTopKey$1<Q>];
|
|
1083
1083
|
type MutationValue$1<Q extends QueriesArray, K extends MutationCompositeKey$1<Q>> = K extends `${infer Top}.${infer Sub}` ? Top extends MutationTopKey$1<Q> ? Sub extends MutationSubKey$1<Q, Top> ? AllMutation<Q>[Top][Sub] : never : never : K extends MutationTopKey$1<Q> ? AllMutation<Q>[K] : never;
|
|
1084
1084
|
type GetFunction$1<F extends FieldValues, Q extends QueriesArray, V extends Record<string, unknown> = Record<string, unknown>> = {
|
|
1085
|
-
<K extends QueryTopKey$1<Q>>(type:
|
|
1086
|
-
<K extends QueryCompositeKey$1<Q>>(type:
|
|
1087
|
-
<K extends QueryCompositeKey$1<Q>>(type:
|
|
1088
|
-
<K extends QueryTopKey$1<Q>>(type:
|
|
1089
|
-
<K extends QueryCompositeKey$1<Q>>(type:
|
|
1090
|
-
<K extends MutationTopKey$1<Q>>(type:
|
|
1091
|
-
<K extends MutationCompositeKey$1<Q>>(type:
|
|
1092
|
-
<K extends MutationCompositeKey$1<Q>>(type:
|
|
1093
|
-
<K extends MutationTopKey$1<Q>>(type:
|
|
1094
|
-
<K extends MutationCompositeKey$1<Q>>(type:
|
|
1095
|
-
<K extends VariableTopKey$1<V>>(type:
|
|
1096
|
-
<K extends VariableTopKey$1<V>>(type:
|
|
1097
|
-
<TField extends DeepKeys<F>>(type:
|
|
1098
|
-
<TField extends DeepKeys<F>>(type:
|
|
1085
|
+
<K extends QueryTopKey$1<Q>>(type: "query", key: K): MultipleQueryResponse<Q>[K];
|
|
1086
|
+
<K extends QueryCompositeKey$1<Q>>(type: "query", key: K): QueryValue$1<Q, K>;
|
|
1087
|
+
<K extends QueryCompositeKey$1<Q>>(type: "query", key: K, defaultValue: unknown): NonNullable<QueryValue$1<Q, K>>;
|
|
1088
|
+
<K extends QueryTopKey$1<Q>>(type: "query", key: K, defaultValue: MultipleQueryResponse<Q>[K]["data"]): MultipleQueryResponse<Q>[K]["data"];
|
|
1089
|
+
<K extends QueryCompositeKey$1<Q>>(type: "query", key: K, defaultValue: QueryValue$1<Q, K>): NonNullable<QueryValue$1<Q, K>>;
|
|
1090
|
+
<K extends MutationTopKey$1<Q>>(type: "mutation", key: K): AllMutation<Q>[K];
|
|
1091
|
+
<K extends MutationCompositeKey$1<Q>>(type: "mutation", key: K): MutationValue$1<Q, K>;
|
|
1092
|
+
<K extends MutationCompositeKey$1<Q>>(type: "mutation", key: K, defaultValue: unknown): NonNullable<MutationValue$1<Q, K>>;
|
|
1093
|
+
<K extends MutationTopKey$1<Q>>(type: "mutation", key: K, defaultValue: AllMutation<Q>[K]["data"]): AllMutation<Q>[K]["data"];
|
|
1094
|
+
<K extends MutationCompositeKey$1<Q>>(type: "mutation", key: K, defaultValue: MutationValue$1<Q, K>): NonNullable<MutationValue$1<Q, K>>;
|
|
1095
|
+
<K extends VariableTopKey$1<V>>(type: "state", key: K): VariableValue$1<V, K>;
|
|
1096
|
+
<K extends VariableTopKey$1<V>>(type: "state", key: K, defaultValue: VariableValue$1<V, K>): NonNullable<VariableValue$1<V, K>>;
|
|
1097
|
+
<TField extends DeepKeys<F>>(type: "form", key: TField): DeepValue<F, TField> | undefined;
|
|
1098
|
+
<TField extends DeepKeys<F>>(type: "form", key: TField, defaultValue: DeepValue<F, TField>): NonNullable<DeepValue<F, TField>>;
|
|
1099
1099
|
};
|
|
1100
1100
|
type SetFunction$1<F extends FieldValues, V extends Record<string, unknown> = Record<string, unknown>> = {
|
|
1101
|
-
(type:
|
|
1102
|
-
(type:
|
|
1101
|
+
(type: "form"): SetValueFunction<F>;
|
|
1102
|
+
(type: "state"): <K extends VariableTopKey$1<V>>(key: K, value: VariableValue$1<V, K>) => void;
|
|
1103
1103
|
};
|
|
1104
1104
|
type FunctionProps$1<F extends FieldValues, Q extends QueriesArray, V extends Record<string, unknown> = Record<string, unknown>> = {
|
|
1105
1105
|
/**
|
|
@@ -1125,7 +1125,7 @@ type LifecycleContext$1<F extends FieldValues = FieldValues, Q extends QueriesAr
|
|
|
1125
1125
|
pageConfig?: PageProps$1<F, Q, V>;
|
|
1126
1126
|
};
|
|
1127
1127
|
type Items$1<F extends FieldValues, Q extends QueriesArray, V extends Record<string, unknown> = Record<string, unknown>> = {
|
|
1128
|
-
type:
|
|
1128
|
+
type: "custom";
|
|
1129
1129
|
component: React.JSX.Element | ((props: FunctionProps$1<F, Q, V>) => React.JSX.Element);
|
|
1130
1130
|
index?: number;
|
|
1131
1131
|
usedBoxes?: number;
|
|
@@ -1136,12 +1136,12 @@ type Items$1<F extends FieldValues, Q extends QueriesArray, V extends Record<str
|
|
|
1136
1136
|
isInDraggableView?: boolean;
|
|
1137
1137
|
key?: string;
|
|
1138
1138
|
lazy?: boolean;
|
|
1139
|
-
lazyTrigger?:
|
|
1139
|
+
lazyTrigger?: "viewport" | "interaction" | "conditional";
|
|
1140
1140
|
lazyCondition?: MappedItemsFunction$1<F, Q, boolean, V>;
|
|
1141
1141
|
};
|
|
1142
1142
|
type ContainerItem$1<F extends FieldValues, Q extends QueriesArray, V extends Record<string, unknown> = Record<string, unknown>> = {
|
|
1143
|
-
type:
|
|
1144
|
-
component?: PageConfigProps$1[
|
|
1143
|
+
type: "container";
|
|
1144
|
+
component?: PageConfigProps$1["ItemsContainer"];
|
|
1145
1145
|
items: ContentItemsType$1<F, Q, V>;
|
|
1146
1146
|
index?: number;
|
|
1147
1147
|
usedBoxes?: number;
|
|
@@ -1152,28 +1152,28 @@ type ContainerItem$1<F extends FieldValues, Q extends QueriesArray, V extends Re
|
|
|
1152
1152
|
isInDraggableView?: boolean;
|
|
1153
1153
|
key?: string;
|
|
1154
1154
|
lazy?: boolean;
|
|
1155
|
-
lazyTrigger?:
|
|
1155
|
+
lazyTrigger?: "viewport" | "interaction" | "conditional";
|
|
1156
1156
|
lazyCondition?: MappedItemsFunction$1<F, Q, boolean, V>;
|
|
1157
1157
|
};
|
|
1158
1158
|
type ContentItem$1<F extends FieldValues, Q extends QueriesArray, V extends Record<string, unknown> = Record<string, unknown>> = Items$1<F, Q, V> | ContainerItem$1<F, Q, V>;
|
|
1159
1159
|
type MappedContents$1<F extends FieldValues, Q extends QueriesArray, V extends Record<string, unknown> = Record<string, unknown>> = MappedItemsFunction$1<F, Q, Array<ContentItem$1<F, Q, V>>, V>;
|
|
1160
1160
|
type ContentItemsType$1<F extends FieldValues, Q extends QueriesArray = QueriesArray, V extends Record<string, unknown> = Record<string, unknown>> = Array<ContentItem$1<F, Q, V>> | MappedContents$1<F, Q, V>;
|
|
1161
|
-
type FormPageProps$1<F extends FieldValues, Q extends QueriesArray, V extends Record<string, unknown> = Record<string, unknown>> = Omit<ComponentProps<typeof FormManager<F>>,
|
|
1161
|
+
type FormPageProps$1<F extends FieldValues, Q extends QueriesArray, V extends Record<string, unknown> = Record<string, unknown>> = Omit<ComponentProps<typeof FormManager<F>>, "updateFormValues" | "submit" | "data"> & {
|
|
1162
1162
|
defaultValueQueryKey?: Array<string>;
|
|
1163
|
-
defaultValueQueryMap?: (props: ExtractQuery<Q>[
|
|
1163
|
+
defaultValueQueryMap?: (props: ExtractQuery<Q>["response"]) => F;
|
|
1164
1164
|
submit?: Array<Submit<F>> | MappedItemsFunction$1<F, Q, Array<Submit<F>>, V>;
|
|
1165
1165
|
index?: number;
|
|
1166
1166
|
data?: Array<FormManagerConfig<F> | MappedItemsFunction$1<F, Q, FormManagerConfig<F>, V>>;
|
|
1167
1167
|
debounceDelay?: number;
|
|
1168
1168
|
hidden?: boolean | MappedItemsFunction$1<F, Q, boolean, V>;
|
|
1169
1169
|
};
|
|
1170
|
-
type SingleQueryConfig$1<F extends FieldValues, Q extends QueryDefinition<any, any, any, any, any>, V extends Record<string, unknown> = Record<string, unknown>> = Q extends QueryDefinition<infer K, infer T, infer P, infer R, infer C> ? T extends
|
|
1171
|
-
type:
|
|
1170
|
+
type SingleQueryConfig$1<F extends FieldValues, Q extends QueryDefinition<any, any, any, any, any>, V extends Record<string, unknown> = Record<string, unknown>> = Q extends QueryDefinition<infer K, infer T, infer P, infer R, infer C> ? T extends "mutation" ? {
|
|
1171
|
+
type: "mutation";
|
|
1172
1172
|
mutationConfig: (<Qa extends QueriesArray>(props: FunctionProps$1<F, Qa, V>) => MutationConfig<P, R, C>) | MutationConfig<P, R, C>;
|
|
1173
1173
|
key: K;
|
|
1174
1174
|
} : {
|
|
1175
|
-
type:
|
|
1176
|
-
queryConfig?: (<Qa extends QueriesArray>(props: FunctionProps$1<F, Qa, V>) => Omit<QueryProps<K, R>,
|
|
1175
|
+
type: "query";
|
|
1176
|
+
queryConfig?: (<Qa extends QueriesArray>(props: FunctionProps$1<F, Qa, V>) => Omit<QueryProps<K, R>, "keyToMap">) | Omit<QueryProps<K, R>, "keyToMap">;
|
|
1177
1177
|
key: K;
|
|
1178
1178
|
} : never;
|
|
1179
1179
|
type QueryPageConfigArray$1<F extends FieldValues, Q extends QueriesArray, V extends Record<string, unknown> = Record<string, unknown>> = {
|
|
@@ -1226,9 +1226,9 @@ type ViewSettings$1 = {
|
|
|
1226
1226
|
} & Record<string, unknown>>;
|
|
1227
1227
|
pageContainerProps?: Record<string, unknown>;
|
|
1228
1228
|
/** @deprecated Use layoutComponent instead */
|
|
1229
|
-
customLayoutComponent?: PageConfigProps$1[
|
|
1229
|
+
customLayoutComponent?: PageConfigProps$1["BodyContainer"];
|
|
1230
1230
|
/** @deprecated Use pageContainerComponent instead */
|
|
1231
|
-
customPageContainer?: PageConfigProps$1[
|
|
1231
|
+
customPageContainer?: PageConfigProps$1["PageContainer"];
|
|
1232
1232
|
};
|
|
1233
1233
|
|
|
1234
1234
|
declare const usePageConfig: <F extends FieldValues, Q extends QueriesArray, V extends Record<string, unknown> = Record<string, unknown>>({ queries, form, ns, viewSettings, meta, lazyLoading, variables, pageId, }: {
|