@gaddario98/react-core 2.0.8 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth/index.d.ts +2 -2
- package/dist/auth/index.js +2 -2
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/index.mjs +1 -1
- package/dist/auth/index.mjs.map +1 -1
- package/dist/form/index.js +52 -3930
- package/dist/form/index.js.map +1 -1
- package/dist/form/index.mjs +2 -3880
- package/dist/form/index.mjs.map +1 -1
- package/dist/index.d.ts +627 -97
- package/dist/index.js +14 -20037
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -20031
- package/dist/index.mjs.map +1 -1
- package/dist/notifications/index.d.ts +2 -2
- package/dist/notifications/index.js +3 -3
- package/dist/notifications/index.js.map +1 -1
- package/dist/notifications/index.mjs +2 -2
- package/dist/notifications/index.mjs.map +1 -1
- package/dist/pages/index.d.ts +3 -3
- package/dist/pages/index.js +58 -1789
- package/dist/pages/index.js.map +1 -1
- package/dist/pages/index.mjs +13 -1744
- package/dist/pages/index.mjs.map +1 -1
- package/dist/queries/index.js +235 -7463
- package/dist/queries/index.js.map +1 -1
- package/dist/queries/index.mjs +228 -7456
- 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,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as jotai_vanilla_atom from 'jotai/vanilla/atom';
|
|
2
2
|
|
|
3
3
|
interface NotificationMessage {
|
|
4
4
|
id: string;
|
|
@@ -29,7 +29,7 @@ declare const useNotification: (ns?: string) => {
|
|
|
29
29
|
clearNotification: () => void;
|
|
30
30
|
};
|
|
31
31
|
|
|
32
|
-
declare const notificationAtom:
|
|
32
|
+
declare const notificationAtom: jotai_vanilla_atom.PrimitiveAtom<NotificationMessage | null>;
|
|
33
33
|
declare const useNotificationValue: () => NotificationMessage | null;
|
|
34
34
|
declare const useNotificationState: () => [NotificationMessage | null, (value: NotificationMessage | null) => void];
|
|
35
35
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
'use strict';var compilerRuntime=require('react/compiler-runtime'),react=require('react'),
|
|
1
|
+
'use strict';var compilerRuntime=require('react/compiler-runtime'),react=require('react'),index_ts=require('../state/index.js');const {
|
|
2
2
|
atom: notificationAtom,
|
|
3
3
|
useValue: useNotificationValue,
|
|
4
4
|
useState: useNotificationState
|
|
5
|
-
} =
|
|
5
|
+
} = index_ts.atomStateGenerator({
|
|
6
6
|
defaultValue: null,
|
|
7
|
-
key:
|
|
7
|
+
key: "reactNotificationAtom",
|
|
8
8
|
persist: false
|
|
9
9
|
});const useNotificationSet = () => {
|
|
10
10
|
const [, setValue] = useNotificationState();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../notifications/notificationAtom.ts","../../notifications/useNotification.ts"],"sourcesContent":["import { atomStateGenerator } from
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../notifications/notificationAtom.ts","../../notifications/useNotification.ts"],"sourcesContent":["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":["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":"gIAGA,MAAM;AACJA,EAAAA,IAAI,EAAEC,gBAAgB;AACtBC,EAAAA,QAAQ,EAAEC,oBAAoB;AAC9BC,EAAAA,QAAQ,EAAEC;AAAoB,CAC/B,GAAGC,2BAAkB,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,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A,CACH;AAAArB,IAAAA,CAAA,MAAAY,EAAA;AAAA,EAAA,CAAA,MAAA;AAAAA,IAAAA,EAAA,GAAAZ,CAAA,CAAA,CAAA,CAAA;AAAA,EAAA;EAPH,MAAAsB,gBAAA,GAAyBV,EASxB;AAAC,EAAA,IAAAW,EAAA;AAAA,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"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {c}from'react/compiler-runtime';import {useRef,useEffect}from'react';import {atomStateGenerator}from'
|
|
1
|
+
import {c}from'react/compiler-runtime';import {useRef,useEffect}from'react';import {atomStateGenerator}from'../state/index.mjs';const {
|
|
2
2
|
atom: notificationAtom,
|
|
3
3
|
useValue: useNotificationValue,
|
|
4
4
|
useState: useNotificationState
|
|
5
5
|
} = atomStateGenerator({
|
|
6
6
|
defaultValue: null,
|
|
7
|
-
key:
|
|
7
|
+
key: "reactNotificationAtom",
|
|
8
8
|
persist: false
|
|
9
9
|
});const useNotificationSet = () => {
|
|
10
10
|
const [, setValue] = useNotificationState();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../notifications/notificationAtom.ts","../../notifications/useNotification.ts"],"sourcesContent":["import { atomStateGenerator } from
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../notifications/notificationAtom.ts","../../notifications/useNotification.ts"],"sourcesContent":["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":["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":"gIAGA,MAAM;AACJA,EAAAA,IAAI,EAAEC,gBAAgB;AACtBC,EAAAA,QAAQ,EA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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"}
|
package/dist/pages/index.d.ts
CHANGED
|
@@ -512,12 +512,12 @@ interface PageTranslationOptions {
|
|
|
512
512
|
ns?: string;
|
|
513
513
|
}
|
|
514
514
|
interface PageConfigProps {
|
|
515
|
-
HeaderContainer: <F extends FieldValues = FieldValues, Q extends QueriesArray = QueriesArray, V extends Record<string, unknown> = Record<string, unknown>>(props: Omit<DefaultContainerProps<F, Q, V>,
|
|
516
|
-
FooterContainer: <F extends FieldValues = FieldValues, Q extends QueriesArray = QueriesArray, V extends Record<string, unknown> = Record<string, unknown>>(props: Omit<DefaultContainerProps<F, Q, V>,
|
|
515
|
+
HeaderContainer: <F extends FieldValues = FieldValues, Q extends QueriesArray = QueriesArray, V extends Record<string, unknown> = Record<string, unknown>>(props: Omit<DefaultContainerProps<F, Q, V>, "viewSettings"> & ViewSettings["header"]) => React.ReactNode;
|
|
516
|
+
FooterContainer: <F extends FieldValues = FieldValues, Q extends QueriesArray = QueriesArray, V extends Record<string, unknown> = Record<string, unknown>>(props: Omit<DefaultContainerProps<F, Q, V>, "viewSettings"> & ViewSettings["footer"]) => React.ReactNode;
|
|
517
517
|
BodyContainer: <F extends FieldValues = FieldValues, Q extends QueriesArray = QueriesArray, V extends Record<string, unknown> = Record<string, unknown>>(props: DefaultContainerProps<F, Q, V>) => React.ReactNode;
|
|
518
518
|
authPageImage: string;
|
|
519
519
|
authPageProps: PageProps;
|
|
520
|
-
isLogged: (val:
|
|
520
|
+
isLogged: (val: PageAuthState | null) => boolean;
|
|
521
521
|
ItemsContainer: (props: {
|
|
522
522
|
children: React.ReactNode;
|
|
523
523
|
}) => React.ReactNode;
|