lkd-web-kit 0.1.3 → 0.1.5
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/index.d.ts +3 -0
- package/dist/src/form/Form.cjs +1 -1
- package/dist/src/form/Form.cjs.map +1 -1
- package/dist/src/form/Form.mjs +13 -11
- package/dist/src/form/Form.mjs.map +1 -1
- package/dist/src/form/utils/optionalInput.cjs +2 -0
- package/dist/src/form/utils/optionalInput.cjs.map +1 -0
- package/dist/src/form/utils/optionalInput.mjs +10 -0
- package/dist/src/form/utils/optionalInput.mjs.map +1 -0
- package/dist/src/hocs/withForm.cjs +1 -1
- package/dist/src/hocs/withForm.cjs.map +1 -1
- package/dist/src/hocs/withForm.mjs +1 -1
- package/dist/src/hocs/withForm.mjs.map +1 -1
- package/dist/src/hocs/withModalManager.cjs +1 -1
- package/dist/src/hocs/withModalManager.cjs.map +1 -1
- package/dist/src/hocs/withModalManager.mjs +1 -1
- package/dist/src/hocs/withModalManager.mjs.map +1 -1
- package/dist/src/index.cjs +1 -1
- package/dist/src/index.mjs +57 -55
- package/dist/src/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -42,6 +42,7 @@ import { TextInputProps } from '@mantine/core';
|
|
|
42
42
|
import { TimeInputProps } from '@mantine/dates';
|
|
43
43
|
import { UseFormReturn } from 'react-hook-form';
|
|
44
44
|
import { z } from 'zod';
|
|
45
|
+
import * as z_2 from 'zod';
|
|
45
46
|
import { ZodTypeAny } from 'zod';
|
|
46
47
|
|
|
47
48
|
export declare const addBodyJsonHook: BeforeErrorHook;
|
|
@@ -345,6 +346,8 @@ export declare const nullableInput: <T extends ZodTypeAny>(schema: T, message?:
|
|
|
345
346
|
|
|
346
347
|
export declare const numberToTimeInput: (number: number) => string;
|
|
347
348
|
|
|
349
|
+
export declare function optionalInput<T extends z_2.ZodTypeAny>(schema: T): z_2.ZodUnion<[z_2.ZodOptional<T>, z_2.ZodEffects<z_2.ZodLiteral<"">, undefined, "">]>;
|
|
350
|
+
|
|
348
351
|
export declare const PageDataProvider: ({ value, children }: PageDataProviderProps) => JSX.Element;
|
|
349
352
|
|
|
350
353
|
declare interface PageDataProviderProps {
|
package/dist/src/form/Form.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("@mantine/core"),u=require("react-hook-form"),s=({methods:o,onSubmit:t=()=>{},onSubmitError:n,...i})=>e.jsx(u.FormProvider,{...o,children:e.jsx(c.Box,{component:"form",onSubmit:r=>{r.stopPropagation(),o.handleSubmit(t,n)(r)},...i})});exports.Form=s;
|
|
2
2
|
//# sourceMappingURL=Form.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.cjs","sources":["../../../src/form/Form.tsx"],"sourcesContent":["'use client';\r\nimport { Box, BoxProps, ElementProps } from '@mantine/core';\r\nimport {\r\n FieldValues,\r\n FormProvider,\r\n SubmitErrorHandler,\r\n SubmitHandler,\r\n UseFormReturn,\r\n} from 'react-hook-form';\r\n\r\n// TODO: Completar el tipado con el schema usando z.output<schema> en el data del onSubmit\r\ninterface FormProps<T extends FieldValues> extends BoxProps, ElementProps<'form', 'onSubmit'> {\r\n methods: UseFormReturn<T, any, any>;\r\n onSubmit?: SubmitHandler<T>;\r\n onSubmitError?: SubmitErrorHandler<any>;\r\n}\r\n\r\nexport const Form = <T extends FieldValues>({\r\n methods,\r\n onSubmit = () => {},\r\n onSubmitError,\r\n ...rest\r\n}: FormProps<T>) => {\r\n return (\r\n <FormProvider {...methods}>\r\n <Box\r\n component=\"form\"\r\n onSubmit={methods.handleSubmit(onSubmit, onSubmitError)}\r\n {...rest}\r\n />\r\n </FormProvider>\r\n );\r\n};\r\n"],"names":["Form","methods","onSubmit","onSubmitError","rest","jsx","FormProvider","Box"],"mappings":"0LAiBaA,EAAO,CAAwB,CAC1C,QAAAC,EACA,SAAAC,EAAW,IAAM,CAAC,EAClB,cAAAC,EACA,GAAGC,CACL,IAEIC,EAAA,IAACC,EAAc,aAAA,CAAA,GAAGL,EAChB,SAAAI,EAAA,IAACE,EAAA,IAAA,CACC,UAAU,OACV,
|
|
1
|
+
{"version":3,"file":"Form.cjs","sources":["../../../src/form/Form.tsx"],"sourcesContent":["'use client';\r\nimport { Box, BoxProps, ElementProps } from '@mantine/core';\r\nimport {\r\n FieldValues,\r\n FormProvider,\r\n SubmitErrorHandler,\r\n SubmitHandler,\r\n UseFormReturn,\r\n} from 'react-hook-form';\r\n\r\n// TODO: Completar el tipado con el schema usando z.output<schema> en el data del onSubmit\r\ninterface FormProps<T extends FieldValues> extends BoxProps, ElementProps<'form', 'onSubmit'> {\r\n methods: UseFormReturn<T, any, any>;\r\n onSubmit?: SubmitHandler<T>;\r\n onSubmitError?: SubmitErrorHandler<any>;\r\n}\r\n\r\nexport const Form = <T extends FieldValues>({\r\n methods,\r\n onSubmit = () => {},\r\n onSubmitError,\r\n ...rest\r\n}: FormProps<T>) => {\r\n return (\r\n <FormProvider {...methods}>\r\n <Box\r\n component=\"form\"\r\n onSubmit={(e) => {\r\n e.stopPropagation();\r\n methods.handleSubmit(onSubmit, onSubmitError)(e);\r\n }}\r\n {...rest}\r\n />\r\n </FormProvider>\r\n );\r\n};\r\n"],"names":["Form","methods","onSubmit","onSubmitError","rest","jsx","FormProvider","Box","e"],"mappings":"0LAiBaA,EAAO,CAAwB,CAC1C,QAAAC,EACA,SAAAC,EAAW,IAAM,CAAC,EAClB,cAAAC,EACA,GAAGC,CACL,IAEIC,EAAA,IAACC,EAAc,aAAA,CAAA,GAAGL,EAChB,SAAAI,EAAA,IAACE,EAAA,IAAA,CACC,UAAU,OACV,SAAWC,GAAM,CACfA,EAAE,gBAAgB,EAClBP,EAAQ,aAAaC,EAAUC,CAAa,EAAEK,CAAC,CACjD,EACC,GAAGJ,CAAA,CAAA,EAER"}
|
package/dist/src/form/Form.mjs
CHANGED
|
@@ -1,22 +1,24 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { Box as
|
|
2
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
3
|
+
import { Box as p } from "@mantine/core";
|
|
4
4
|
import { FormProvider as e } from "react-hook-form";
|
|
5
|
-
const
|
|
5
|
+
const a = ({
|
|
6
6
|
methods: o,
|
|
7
|
-
onSubmit:
|
|
7
|
+
onSubmit: t = () => {
|
|
8
8
|
},
|
|
9
|
-
onSubmitError:
|
|
10
|
-
...
|
|
11
|
-
}) => /* @__PURE__ */
|
|
12
|
-
|
|
9
|
+
onSubmitError: i,
|
|
10
|
+
...n
|
|
11
|
+
}) => /* @__PURE__ */ m(e, { ...o, children: /* @__PURE__ */ m(
|
|
12
|
+
p,
|
|
13
13
|
{
|
|
14
14
|
component: "form",
|
|
15
|
-
onSubmit:
|
|
16
|
-
|
|
15
|
+
onSubmit: (r) => {
|
|
16
|
+
r.stopPropagation(), o.handleSubmit(t, i)(r);
|
|
17
|
+
},
|
|
18
|
+
...n
|
|
17
19
|
}
|
|
18
20
|
) });
|
|
19
21
|
export {
|
|
20
|
-
|
|
22
|
+
a as Form
|
|
21
23
|
};
|
|
22
24
|
//# sourceMappingURL=Form.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.mjs","sources":["../../../src/form/Form.tsx"],"sourcesContent":["'use client';\r\nimport { Box, BoxProps, ElementProps } from '@mantine/core';\r\nimport {\r\n FieldValues,\r\n FormProvider,\r\n SubmitErrorHandler,\r\n SubmitHandler,\r\n UseFormReturn,\r\n} from 'react-hook-form';\r\n\r\n// TODO: Completar el tipado con el schema usando z.output<schema> en el data del onSubmit\r\ninterface FormProps<T extends FieldValues> extends BoxProps, ElementProps<'form', 'onSubmit'> {\r\n methods: UseFormReturn<T, any, any>;\r\n onSubmit?: SubmitHandler<T>;\r\n onSubmitError?: SubmitErrorHandler<any>;\r\n}\r\n\r\nexport const Form = <T extends FieldValues>({\r\n methods,\r\n onSubmit = () => {},\r\n onSubmitError,\r\n ...rest\r\n}: FormProps<T>) => {\r\n return (\r\n <FormProvider {...methods}>\r\n <Box\r\n component=\"form\"\r\n onSubmit={methods.handleSubmit(onSubmit, onSubmitError)}\r\n {...rest}\r\n />\r\n </FormProvider>\r\n );\r\n};\r\n"],"names":["Form","methods","onSubmit","onSubmitError","rest","jsx","FormProvider","Box"],"mappings":";;;;AAiBO,MAAMA,IAAO,CAAwB;AAAA,EAC1C,SAAAC;AAAA,EACA,UAAAC,IAAW,MAAM;AAAA,EAAC;AAAA,EAClB,eAAAC;AAAA,EACA,GAAGC;AACL,MAEI,gBAAAC,EAACC,GAAc,EAAA,GAAGL,GAChB,UAAA,gBAAAI;AAAA,EAACE;AAAA,EAAA;AAAA,IACC,WAAU;AAAA,IACV,
|
|
1
|
+
{"version":3,"file":"Form.mjs","sources":["../../../src/form/Form.tsx"],"sourcesContent":["'use client';\r\nimport { Box, BoxProps, ElementProps } from '@mantine/core';\r\nimport {\r\n FieldValues,\r\n FormProvider,\r\n SubmitErrorHandler,\r\n SubmitHandler,\r\n UseFormReturn,\r\n} from 'react-hook-form';\r\n\r\n// TODO: Completar el tipado con el schema usando z.output<schema> en el data del onSubmit\r\ninterface FormProps<T extends FieldValues> extends BoxProps, ElementProps<'form', 'onSubmit'> {\r\n methods: UseFormReturn<T, any, any>;\r\n onSubmit?: SubmitHandler<T>;\r\n onSubmitError?: SubmitErrorHandler<any>;\r\n}\r\n\r\nexport const Form = <T extends FieldValues>({\r\n methods,\r\n onSubmit = () => {},\r\n onSubmitError,\r\n ...rest\r\n}: FormProps<T>) => {\r\n return (\r\n <FormProvider {...methods}>\r\n <Box\r\n component=\"form\"\r\n onSubmit={(e) => {\r\n e.stopPropagation();\r\n methods.handleSubmit(onSubmit, onSubmitError)(e);\r\n }}\r\n {...rest}\r\n />\r\n </FormProvider>\r\n );\r\n};\r\n"],"names":["Form","methods","onSubmit","onSubmitError","rest","jsx","FormProvider","Box","e"],"mappings":";;;;AAiBO,MAAMA,IAAO,CAAwB;AAAA,EAC1C,SAAAC;AAAA,EACA,UAAAC,IAAW,MAAM;AAAA,EAAC;AAAA,EAClB,eAAAC;AAAA,EACA,GAAGC;AACL,MAEI,gBAAAC,EAACC,GAAc,EAAA,GAAGL,GAChB,UAAA,gBAAAI;AAAA,EAACE;AAAA,EAAA;AAAA,IACC,WAAU;AAAA,IACV,UAAU,CAACC,MAAM;AACf,MAAAA,EAAE,gBAAgB,GAClBP,EAAQ,aAAaC,GAAUC,CAAa,EAAEK,CAAC;AAAA,IACjD;AAAA,IACC,GAAGJ;AAAA,EAAA;AAAA,GAER;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("zod");function i(t){if(t&&t.__esModule)return t;const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const o=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,o.get?o:{enumerable:!0,get:()=>t[e]})}}return n.default=t,Object.freeze(n)}const u=i(r),c=u.literal("").transform(()=>{});function a(t){return t.optional().or(c)}exports.optionalInput=a;
|
|
2
|
+
//# sourceMappingURL=optionalInput.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"optionalInput.cjs","sources":["../../../../src/form/utils/optionalInput.ts"],"sourcesContent":["import * as z from 'zod';\r\n\r\nconst emptyStringToUndefined = z.literal('').transform(() => undefined);\r\n\r\nexport function optionalInput<T extends z.ZodTypeAny>(schema: T) {\r\n return schema.optional().or(emptyStringToUndefined);\r\n}\r\n"],"names":["emptyStringToUndefined","z","optionalInput","schema"],"mappings":"6ZAEMA,EAAyBC,EAAE,QAAQ,EAAE,EAAE,UAAU,IAAA,EAAe,EAE/D,SAASC,EAAsCC,EAAW,CAC/D,OAAOA,EAAO,WAAW,GAAGH,CAAsB,CACpD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"optionalInput.mjs","sources":["../../../../src/form/utils/optionalInput.ts"],"sourcesContent":["import * as z from 'zod';\r\n\r\nconst emptyStringToUndefined = z.literal('').transform(() => undefined);\r\n\r\nexport function optionalInput<T extends z.ZodTypeAny>(schema: T) {\r\n return schema.optional().or(emptyStringToUndefined);\r\n}\r\n"],"names":["emptyStringToUndefined","z","optionalInput","schema"],"mappings":";AAEA,MAAMA,IAAyBC,EAAE,QAAQ,EAAE,EAAE,UAAU,MAAA;AAAA,CAAe;AAE/D,SAASC,EAAsCC,GAAW;AAC/D,SAAOA,EAAO,WAAW,GAAGH,CAAsB;AACpD;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),b=require("react-hook-form"),f=require("../form/utils/zodValidator.cjs"),h=(i,a)=>{const r=e=>{const{validate:l,name:d="",placeholder:s,label:c,description:n,...u}=e;return o.jsx(b.Controller,{name:d,defaultValue:"",rules:{validate:l&&!e.disabled?f.zodValidator(l):void 0},disabled:e.disabled,...a?.(e),render:t=>{const{fieldState:{isTouched:v,error:m}}=t,F={...t,props:{...e,validate:void 0},field:{...t.field,label:c,placeholder:s,description:n,error:m?.message},...u};return o.jsx(i,{...F})}})};return r.displayName=`
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),b=require("react-hook-form"),f=require("../form/utils/zodValidator.cjs"),h=(i,a)=>{const r=e=>{const{validate:l,name:d="",placeholder:s,label:c,description:n,...u}=e;return o.jsx(b.Controller,{name:d,defaultValue:"",rules:{validate:l&&!e.disabled?f.zodValidator(l):void 0},disabled:e.disabled,...a?.(e),render:t=>{const{fieldState:{isTouched:v,error:m}}=t,F={...t,props:{...e,validate:void 0},field:{...t.field,label:c,placeholder:s,description:n,error:m?.message},...u};return o.jsx(i,{...F})}})};return r.displayName=`WithForm(${i.displayName})`,r};exports.withForm=h;
|
|
2
2
|
//# sourceMappingURL=withForm.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withForm.cjs","sources":["../../../src/hocs/withForm.tsx"],"sourcesContent":["'use client';\r\nimport { Controller, ControllerProps } from 'react-hook-form';\r\nimport { ZodTypeAny } from 'zod';\r\nimport { zodValidator } from '../form';\r\n\r\nexport interface WithFormProps {\r\n name?: string;\r\n label?: React.ReactNode;\r\n placeholder?: string;\r\n description?: React.ReactNode;\r\n validate?: ZodTypeAny;\r\n disabled?: boolean;\r\n}\r\n\r\nexport type FormFieldProps<T = unknown> = Parameters<ControllerProps['render']>[0] & {\r\n props: T;\r\n field: {\r\n label?: React.ReactNode;\r\n placeholder?: string;\r\n description?: React.ReactNode;\r\n error?: string;\r\n };\r\n};\r\n\r\nexport const withForm = <P extends unknown>(\r\n WrappedComponent: React.ComponentType<FormFieldProps<P>>,\r\n getControllerProps?: (props: P) => Omit<Partial<ControllerProps>, 'render'>,\r\n) => {\r\n const FormField: React.FC<P & WithFormProps> = (props) => {\r\n const { validate, name = '', placeholder, label, description, ...withFormRestProps } = props;\r\n\r\n return (\r\n <Controller\r\n name={name}\r\n defaultValue={''}\r\n rules={{\r\n validate: validate && !props.disabled ? zodValidator(validate) : undefined,\r\n }}\r\n disabled={props.disabled}\r\n {...getControllerProps?.(props)}\r\n render={(renderProps) => {\r\n const {\r\n fieldState: { isTouched, error },\r\n } = renderProps;\r\n\r\n const fieldProps = {\r\n ...renderProps,\r\n props: {\r\n ...props,\r\n validate: undefined,\r\n },\r\n field: {\r\n ...renderProps.field,\r\n label,\r\n placeholder,\r\n description,\r\n error: error?.message,\r\n },\r\n ...withFormRestProps,\r\n } as FormFieldProps<P>;\r\n\r\n return <WrappedComponent {...fieldProps} />;\r\n }}\r\n />\r\n );\r\n };\r\n\r\n FormField.displayName = `
|
|
1
|
+
{"version":3,"file":"withForm.cjs","sources":["../../../src/hocs/withForm.tsx"],"sourcesContent":["'use client';\r\nimport { Controller, ControllerProps } from 'react-hook-form';\r\nimport { ZodTypeAny } from 'zod';\r\nimport { zodValidator } from '../form';\r\n\r\nexport interface WithFormProps {\r\n name?: string;\r\n label?: React.ReactNode;\r\n placeholder?: string;\r\n description?: React.ReactNode;\r\n validate?: ZodTypeAny;\r\n disabled?: boolean;\r\n}\r\n\r\nexport type FormFieldProps<T = unknown> = Parameters<ControllerProps['render']>[0] & {\r\n props: T;\r\n field: {\r\n label?: React.ReactNode;\r\n placeholder?: string;\r\n description?: React.ReactNode;\r\n error?: string;\r\n };\r\n};\r\n\r\nexport const withForm = <P extends unknown>(\r\n WrappedComponent: React.ComponentType<FormFieldProps<P>>,\r\n getControllerProps?: (props: P) => Omit<Partial<ControllerProps>, 'render'>,\r\n) => {\r\n const FormField: React.FC<P & WithFormProps> = (props) => {\r\n const { validate, name = '', placeholder, label, description, ...withFormRestProps } = props;\r\n\r\n return (\r\n <Controller\r\n name={name}\r\n defaultValue={''}\r\n rules={{\r\n validate: validate && !props.disabled ? zodValidator(validate) : undefined,\r\n }}\r\n disabled={props.disabled}\r\n {...getControllerProps?.(props)}\r\n render={(renderProps) => {\r\n const {\r\n fieldState: { isTouched, error },\r\n } = renderProps;\r\n\r\n const fieldProps = {\r\n ...renderProps,\r\n props: {\r\n ...props,\r\n validate: undefined,\r\n },\r\n field: {\r\n ...renderProps.field,\r\n label,\r\n placeholder,\r\n description,\r\n error: error?.message,\r\n },\r\n ...withFormRestProps,\r\n } as FormFieldProps<P>;\r\n\r\n return <WrappedComponent {...fieldProps} />;\r\n }}\r\n />\r\n );\r\n };\r\n\r\n FormField.displayName = `WithForm(${WrappedComponent.displayName})`;\r\n\r\n return FormField;\r\n};\r\n"],"names":["withForm","WrappedComponent","getControllerProps","FormField","props","validate","name","placeholder","label","description","withFormRestProps","jsx","Controller","zodValidator","renderProps","isTouched","error","fieldProps"],"mappings":"2MAwBaA,EAAW,CACtBC,EACAC,IACG,CACG,MAAAC,EAA0CC,GAAU,CAClD,KAAA,CAAE,SAAAC,EAAU,KAAAC,EAAO,GAAI,YAAAC,EAAa,MAAAC,EAAO,YAAAC,EAAa,GAAGC,CAAA,EAAsBN,EAGrF,OAAAO,EAAA,IAACC,EAAA,WAAA,CACC,KAAAN,EACA,aAAc,GACd,MAAO,CACL,SAAUD,GAAY,CAACD,EAAM,SAAWS,EAAAA,aAAaR,CAAQ,EAAI,MACnE,EACA,SAAUD,EAAM,SACf,GAAGF,IAAqBE,CAAK,EAC9B,OAASU,GAAgB,CACjB,KAAA,CACJ,WAAY,CAAE,UAAAC,EAAW,MAAAC,CAAM,CAAA,EAC7BF,EAEEG,EAAa,CACjB,GAAGH,EACH,MAAO,CACL,GAAGV,EACH,SAAU,MACZ,EACA,MAAO,CACL,GAAGU,EAAY,MACf,MAAAN,EACA,YAAAD,EACA,YAAAE,EACA,MAAOO,GAAO,OAChB,EACA,GAAGN,CACL,EAEO,OAAAC,MAACV,EAAkB,CAAA,GAAGgB,CAAY,CAAA,CAAA,CAC3C,CACF,CAEJ,EAEU,OAAAd,EAAA,YAAc,YAAYF,EAAiB,WAAW,IAEzDE,CACT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withForm.mjs","sources":["../../../src/hocs/withForm.tsx"],"sourcesContent":["'use client';\r\nimport { Controller, ControllerProps } from 'react-hook-form';\r\nimport { ZodTypeAny } from 'zod';\r\nimport { zodValidator } from '../form';\r\n\r\nexport interface WithFormProps {\r\n name?: string;\r\n label?: React.ReactNode;\r\n placeholder?: string;\r\n description?: React.ReactNode;\r\n validate?: ZodTypeAny;\r\n disabled?: boolean;\r\n}\r\n\r\nexport type FormFieldProps<T = unknown> = Parameters<ControllerProps['render']>[0] & {\r\n props: T;\r\n field: {\r\n label?: React.ReactNode;\r\n placeholder?: string;\r\n description?: React.ReactNode;\r\n error?: string;\r\n };\r\n};\r\n\r\nexport const withForm = <P extends unknown>(\r\n WrappedComponent: React.ComponentType<FormFieldProps<P>>,\r\n getControllerProps?: (props: P) => Omit<Partial<ControllerProps>, 'render'>,\r\n) => {\r\n const FormField: React.FC<P & WithFormProps> = (props) => {\r\n const { validate, name = '', placeholder, label, description, ...withFormRestProps } = props;\r\n\r\n return (\r\n <Controller\r\n name={name}\r\n defaultValue={''}\r\n rules={{\r\n validate: validate && !props.disabled ? zodValidator(validate) : undefined,\r\n }}\r\n disabled={props.disabled}\r\n {...getControllerProps?.(props)}\r\n render={(renderProps) => {\r\n const {\r\n fieldState: { isTouched, error },\r\n } = renderProps;\r\n\r\n const fieldProps = {\r\n ...renderProps,\r\n props: {\r\n ...props,\r\n validate: undefined,\r\n },\r\n field: {\r\n ...renderProps.field,\r\n label,\r\n placeholder,\r\n description,\r\n error: error?.message,\r\n },\r\n ...withFormRestProps,\r\n } as FormFieldProps<P>;\r\n\r\n return <WrappedComponent {...fieldProps} />;\r\n }}\r\n />\r\n );\r\n };\r\n\r\n FormField.displayName = `
|
|
1
|
+
{"version":3,"file":"withForm.mjs","sources":["../../../src/hocs/withForm.tsx"],"sourcesContent":["'use client';\r\nimport { Controller, ControllerProps } from 'react-hook-form';\r\nimport { ZodTypeAny } from 'zod';\r\nimport { zodValidator } from '../form';\r\n\r\nexport interface WithFormProps {\r\n name?: string;\r\n label?: React.ReactNode;\r\n placeholder?: string;\r\n description?: React.ReactNode;\r\n validate?: ZodTypeAny;\r\n disabled?: boolean;\r\n}\r\n\r\nexport type FormFieldProps<T = unknown> = Parameters<ControllerProps['render']>[0] & {\r\n props: T;\r\n field: {\r\n label?: React.ReactNode;\r\n placeholder?: string;\r\n description?: React.ReactNode;\r\n error?: string;\r\n };\r\n};\r\n\r\nexport const withForm = <P extends unknown>(\r\n WrappedComponent: React.ComponentType<FormFieldProps<P>>,\r\n getControllerProps?: (props: P) => Omit<Partial<ControllerProps>, 'render'>,\r\n) => {\r\n const FormField: React.FC<P & WithFormProps> = (props) => {\r\n const { validate, name = '', placeholder, label, description, ...withFormRestProps } = props;\r\n\r\n return (\r\n <Controller\r\n name={name}\r\n defaultValue={''}\r\n rules={{\r\n validate: validate && !props.disabled ? zodValidator(validate) : undefined,\r\n }}\r\n disabled={props.disabled}\r\n {...getControllerProps?.(props)}\r\n render={(renderProps) => {\r\n const {\r\n fieldState: { isTouched, error },\r\n } = renderProps;\r\n\r\n const fieldProps = {\r\n ...renderProps,\r\n props: {\r\n ...props,\r\n validate: undefined,\r\n },\r\n field: {\r\n ...renderProps.field,\r\n label,\r\n placeholder,\r\n description,\r\n error: error?.message,\r\n },\r\n ...withFormRestProps,\r\n } as FormFieldProps<P>;\r\n\r\n return <WrappedComponent {...fieldProps} />;\r\n }}\r\n />\r\n );\r\n };\r\n\r\n FormField.displayName = `WithForm(${WrappedComponent.displayName})`;\r\n\r\n return FormField;\r\n};\r\n"],"names":["withForm","WrappedComponent","getControllerProps","FormField","props","validate","name","placeholder","label","description","withFormRestProps","jsx","Controller","zodValidator","renderProps","isTouched","error","fieldProps"],"mappings":";;;;AAwBa,MAAAA,IAAW,CACtBC,GACAC,MACG;AACG,QAAAC,IAAyC,CAACC,MAAU;AAClD,UAAA,EAAE,UAAAC,GAAU,MAAAC,IAAO,IAAI,aAAAC,GAAa,OAAAC,GAAO,aAAAC,GAAa,GAAGC,EAAA,IAAsBN;AAGrF,WAAA,gBAAAO;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAAN;AAAA,QACA,cAAc;AAAA,QACd,OAAO;AAAA,UACL,UAAUD,KAAY,CAACD,EAAM,WAAWS,EAAaR,CAAQ,IAAI;AAAA,QACnE;AAAA,QACA,UAAUD,EAAM;AAAA,QACf,GAAGF,IAAqBE,CAAK;AAAA,QAC9B,QAAQ,CAACU,MAAgB;AACjB,gBAAA;AAAA,YACJ,YAAY,EAAE,WAAAC,GAAW,OAAAC,EAAM;AAAA,UAAA,IAC7BF,GAEEG,IAAa;AAAA,YACjB,GAAGH;AAAA,YACH,OAAO;AAAA,cACL,GAAGV;AAAA,cACH,UAAU;AAAA,YACZ;AAAA,YACA,OAAO;AAAA,cACL,GAAGU,EAAY;AAAA,cACf,OAAAN;AAAA,cACA,aAAAD;AAAA,cACA,aAAAE;AAAA,cACA,OAAOO,GAAO;AAAA,YAChB;AAAA,YACA,GAAGN;AAAA,UACL;AAEO,iBAAA,gBAAAC,EAACV,GAAkB,EAAA,GAAGgB,EAAY,CAAA;AAAA,QAAA;AAAA,MAC3C;AAAA,IACF;AAAA,EAEJ;AAEU,SAAAd,EAAA,cAAc,YAAYF,EAAiB,WAAW,KAEzDE;AACT;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),i=require("react"),c=e=>{const t=({removeModal:r,opened:s,...n})=>{const[l,a]=i.useState(!1),o=()=>{a(!1),setTimeout(()=>r(),200),n.onClose?.()};return i.useEffect(()=>{s?setTimeout(()=>a(!0),0):o()},[s]),u.jsx(e,{...n,opened:l,onClose:o})};return t.displayName=`
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),i=require("react"),c=e=>{const t=({removeModal:r,opened:s,...n})=>{const[l,a]=i.useState(!1),o=()=>{a(!1),setTimeout(()=>r(),200),n.onClose?.()};return i.useEffect(()=>{s?setTimeout(()=>a(!0),0):o()},[s]),u.jsx(e,{...n,opened:l,onClose:o})};return t.displayName=`WithModalManager(${e.displayName})`,t};exports.withModalManager=c;
|
|
2
2
|
//# sourceMappingURL=withModalManager.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withModalManager.cjs","sources":["../../../src/hocs/withModalManager.tsx"],"sourcesContent":["'use client';\r\nimport { ModalProps } from '@mantine/core';\r\nimport { useEffect, useState } from 'react';\r\n\r\nexport interface WithModalManagerProps {\r\n removeModal: () => void;\r\n opened: boolean;\r\n}\r\n\r\nexport const withModalManager = <P extends Object>(\r\n WrappedComponent: React.ComponentType<P & ModalProps>,\r\n) => {\r\n const Component: React.FC<P & WithModalManagerProps & ModalProps> = ({\r\n removeModal,\r\n opened,\r\n ...props\r\n }) => {\r\n const [isOpen, setIsOpen] = useState(false);\r\n\r\n const onClose = () => {\r\n setIsOpen(false);\r\n setTimeout(() => removeModal(), 200);\r\n props.onClose?.();\r\n };\r\n\r\n useEffect(() => {\r\n if (opened) setTimeout(() => setIsOpen(true), 0);\r\n else onClose();\r\n }, [opened]);\r\n\r\n return (\r\n <WrappedComponent\r\n {...(props as P)}\r\n opened={isOpen}\r\n onClose={onClose}\r\n />\r\n );\r\n };\r\n\r\n Component.displayName = `
|
|
1
|
+
{"version":3,"file":"withModalManager.cjs","sources":["../../../src/hocs/withModalManager.tsx"],"sourcesContent":["'use client';\r\nimport { ModalProps } from '@mantine/core';\r\nimport { useEffect, useState } from 'react';\r\n\r\nexport interface WithModalManagerProps {\r\n removeModal: () => void;\r\n opened: boolean;\r\n}\r\n\r\nexport const withModalManager = <P extends Object>(\r\n WrappedComponent: React.ComponentType<P & ModalProps>,\r\n) => {\r\n const Component: React.FC<P & WithModalManagerProps & ModalProps> = ({\r\n removeModal,\r\n opened,\r\n ...props\r\n }) => {\r\n const [isOpen, setIsOpen] = useState(false);\r\n\r\n const onClose = () => {\r\n setIsOpen(false);\r\n setTimeout(() => removeModal(), 200);\r\n props.onClose?.();\r\n };\r\n\r\n useEffect(() => {\r\n if (opened) setTimeout(() => setIsOpen(true), 0);\r\n else onClose();\r\n }, [opened]);\r\n\r\n return (\r\n <WrappedComponent\r\n {...(props as P)}\r\n opened={isOpen}\r\n onClose={onClose}\r\n />\r\n );\r\n };\r\n\r\n Component.displayName = `WithModalManager(${WrappedComponent.displayName})`;\r\n\r\n return Component;\r\n};\r\n"],"names":["withModalManager","WrappedComponent","Component","removeModal","opened","props","isOpen","setIsOpen","useState","onClose","useEffect","jsx"],"mappings":"qJASaA,EACXC,GACG,CACH,MAAMC,EAA8D,CAAC,CACnE,YAAAC,EACA,OAAAC,EACA,GAAGC,CAAA,IACC,CACJ,KAAM,CAACC,EAAQC,CAAS,EAAIC,EAAAA,SAAS,EAAK,EAEpCC,EAAU,IAAM,CACpBF,EAAU,EAAK,EACJ,WAAA,IAAMJ,EAAY,EAAG,GAAG,EACnCE,EAAM,UAAU,CAClB,EAEAK,OAAAA,EAAAA,UAAU,IAAM,CACVN,EAAmB,WAAA,IAAMG,EAAU,EAAI,EAAG,CAAC,EAClCE,EAAA,CAAA,EACZ,CAACL,CAAM,CAAC,EAGTO,EAAA,IAACV,EAAA,CACE,GAAII,EACL,OAAQC,EACR,QAAAG,CAAA,CACF,CAEJ,EAEU,OAAAP,EAAA,YAAc,oBAAoBD,EAAiB,WAAW,IAEjEC,CACT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withModalManager.mjs","sources":["../../../src/hocs/withModalManager.tsx"],"sourcesContent":["'use client';\r\nimport { ModalProps } from '@mantine/core';\r\nimport { useEffect, useState } from 'react';\r\n\r\nexport interface WithModalManagerProps {\r\n removeModal: () => void;\r\n opened: boolean;\r\n}\r\n\r\nexport const withModalManager = <P extends Object>(\r\n WrappedComponent: React.ComponentType<P & ModalProps>,\r\n) => {\r\n const Component: React.FC<P & WithModalManagerProps & ModalProps> = ({\r\n removeModal,\r\n opened,\r\n ...props\r\n }) => {\r\n const [isOpen, setIsOpen] = useState(false);\r\n\r\n const onClose = () => {\r\n setIsOpen(false);\r\n setTimeout(() => removeModal(), 200);\r\n props.onClose?.();\r\n };\r\n\r\n useEffect(() => {\r\n if (opened) setTimeout(() => setIsOpen(true), 0);\r\n else onClose();\r\n }, [opened]);\r\n\r\n return (\r\n <WrappedComponent\r\n {...(props as P)}\r\n opened={isOpen}\r\n onClose={onClose}\r\n />\r\n );\r\n };\r\n\r\n Component.displayName = `
|
|
1
|
+
{"version":3,"file":"withModalManager.mjs","sources":["../../../src/hocs/withModalManager.tsx"],"sourcesContent":["'use client';\r\nimport { ModalProps } from '@mantine/core';\r\nimport { useEffect, useState } from 'react';\r\n\r\nexport interface WithModalManagerProps {\r\n removeModal: () => void;\r\n opened: boolean;\r\n}\r\n\r\nexport const withModalManager = <P extends Object>(\r\n WrappedComponent: React.ComponentType<P & ModalProps>,\r\n) => {\r\n const Component: React.FC<P & WithModalManagerProps & ModalProps> = ({\r\n removeModal,\r\n opened,\r\n ...props\r\n }) => {\r\n const [isOpen, setIsOpen] = useState(false);\r\n\r\n const onClose = () => {\r\n setIsOpen(false);\r\n setTimeout(() => removeModal(), 200);\r\n props.onClose?.();\r\n };\r\n\r\n useEffect(() => {\r\n if (opened) setTimeout(() => setIsOpen(true), 0);\r\n else onClose();\r\n }, [opened]);\r\n\r\n return (\r\n <WrappedComponent\r\n {...(props as P)}\r\n opened={isOpen}\r\n onClose={onClose}\r\n />\r\n );\r\n };\r\n\r\n Component.displayName = `WithModalManager(${WrappedComponent.displayName})`;\r\n\r\n return Component;\r\n};\r\n"],"names":["withModalManager","WrappedComponent","Component","removeModal","opened","props","isOpen","setIsOpen","useState","onClose","useEffect","jsx"],"mappings":";;;AASa,MAAAA,IAAmB,CAC9BC,MACG;AACH,QAAMC,IAA8D,CAAC;AAAA,IACnE,aAAAC;AAAA,IACA,QAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,MACC;AACJ,UAAM,CAACC,GAAQC,CAAS,IAAIC,EAAS,EAAK,GAEpCC,IAAU,MAAM;AACpB,MAAAF,EAAU,EAAK,GACJ,WAAA,MAAMJ,EAAY,GAAG,GAAG,GACnCE,EAAM,UAAU;AAAA,IAClB;AAEA,WAAAK,EAAU,MAAM;AACd,MAAIN,IAAmB,WAAA,MAAMG,EAAU,EAAI,GAAG,CAAC,IAClCE,EAAA;AAAA,IAAA,GACZ,CAACL,CAAM,CAAC,GAGT,gBAAAO;AAAA,MAACV;AAAA,MAAA;AAAA,QACE,GAAII;AAAA,QACL,QAAQC;AAAA,QACR,SAAAG;AAAA,MAAA;AAAA,IACF;AAAA,EAEJ;AAEU,SAAAP,EAAA,cAAc,oBAAoBD,EAAiB,WAAW,KAEjEC;AACT;"}
|
package/dist/src/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./components/EmptyState/index.cjs"),n=require("./components/InfinityLoader/index.cjs"),u=require("./components/NavItems.cjs"),a=require("./components/Icon.cjs"),s=require("./components/MyDatePickerInput/index.cjs"),c=require("./components/MyDateTimePicker/index.cjs"),m=require("./components/MyNotifications/index.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./components/EmptyState/index.cjs"),n=require("./components/InfinityLoader/index.cjs"),u=require("./components/NavItems.cjs"),a=require("./components/Icon.cjs"),s=require("./components/MyDatePickerInput/index.cjs"),c=require("./components/MyDateTimePicker/index.cjs"),m=require("./components/MyNotifications/index.cjs"),p=require("./components/MyNumberInput/index.cjs"),l=require("./components/MySelect/index.cjs"),y=require("./components/MyTextarea/index.cjs"),d=require("./components/MyTextInput/index.cjs"),q=require("./components/MyTimeInput/index.cjs"),I=require("./components/SelectInfinity/index.cjs"),F=require("./consts/http-status.cjs"),x=require("./consts/revalidate.cjs"),e=require("./contexts/NavigationHistoryContext/index.cjs"),t=require("./contexts/PageDataContext/index.cjs"),P=require("./form/Form.cjs"),T=require("./form/FormButtonSubmit.cjs"),S=require("./form/utils/zodValidator.cjs"),f=require("./form/utils/nullableInput.cjs"),h=require("./form/utils/optionalInput.cjs"),M=require("./form/base/FormCheckbox.cjs"),b=require("./form/base/FormDatePickerInput.cjs"),N=require("./form/base/FormDateTimePicker.cjs"),g=require("./form/base/FormNumberInput.cjs"),k=require("./form/base/FormRadioGroup.cjs"),B=require("./form/base/FormSelect.cjs"),D=require("./form/base/FormSelectInfinity.cjs"),v=require("./form/base/FormTextArea.cjs"),w=require("./form/base/FormTextInput.cjs"),r=require("./form/base/FormTimeInput.cjs"),H=require("./hocs/withForm.cjs"),$=require("./hocs/withModalManager.cjs"),O=require("./hooks/useBreakpoint.cjs"),A=require("./hooks/useFetchNextPageOnScroll.cjs"),C=require("./hooks/useOnScrollProgress.cjs"),E=require("./hooks/useUpdateSearchParams.cjs"),R=require("./mantine/breakpoints-with-px.cjs"),J=require("./mantine/to-tailwind-colors.cjs"),_=require("./mantine/my-default-theme.cjs"),U=require("./utils/formatBytes.cjs"),L=require("./utils/ky/addBodyJsonHook.cjs"),z=require("./utils/ky/parseJson.cjs"),o=require("./utils/array/groupBy.cjs"),G=require("./utils/array/shuffleArray.cjs"),V=require("./utils/newHref.cjs"),W=require("./utils/isInfinityEmpty.cjs");exports.EmptyState=i.EmptyState;exports.InfinityLoader=n.InfinityLoader;exports.NavItems=u.NavItems;exports.Icon=a.Icon;exports.MyDatePickerInput=s.MyDatePickerInput;exports.MyDateTimePicker=c.MyDateTimePicker;exports.MyNotifications=m.MyNotifications;exports.MyNumberInput=p.MyNumberInput;exports.MySelect=l.MySelect;exports.MyTextarea=y.MyTextarea;exports.MyTextInput=d.MyTextInput;exports.MyTimeInput=q.MyTimeInput;exports.SelectInfinity=I.SelectInfinity;exports.HttpStatus=F.HttpStatus;exports.Revalidate=x.Revalidate;exports.NavigationHistoryProvider=e.NavigationHistoryProvider;exports.QP_BACK_URL_NAME=e.QP_BACK_URL_NAME;exports.useNavigationHistory=e.useNavigationHistory;exports.PageDataProvider=t.PageDataProvider;exports.usePageData=t.usePageData;exports.Form=P.Form;exports.FormButtonSubmit=T.FormButtonSubmit;exports.zodValidator=S.zodValidator;exports.nullableInput=f.nullableInput;exports.optionalInput=h.optionalInput;exports.FormCheckbox=M.FormCheckbox;exports.FormDatePickerInput=b.FormDatePickerInput;exports.FormDateTimePicker=N.FormDateTimePicker;exports.FormNumberInput=g.FormNumberInput;exports.FormRadioGroup=k.FormRadioGroup;exports.FormSelect=B.FormSelect;exports.FormSelectInfinity=D.FormSelectInfinity;exports.FormTextarea=v.FormTextarea;exports.FormTextInput=w.FormTextInput;exports.FormTimeInput=r.FormTimeInput;exports.numberToTimeInput=r.numberToTimeInput;exports.timeInputToNumber=r.timeInputToNumber;exports.withForm=H.withForm;exports.withModalManager=$.withModalManager;exports.useBreakpoint=O.useBreakpoint;exports.useFetchNextPageOnScroll=A.useFetchNextPageOnScroll;exports.useOnScrollProgress=C.useOnScrollProgress;exports.useUpdateSearchParams=E.useUpdateSearchParams;exports.breakpointsWithPx=R.breakpointsWithPx;exports.toTailwindColors=J.toTailwindColors;exports.myDefaultTheme=_.myDefaultTheme;exports.formatBytes=U.formatBytes;exports.addBodyJsonHook=L.addBodyJsonHook;exports.parseJSON=z.parseJSON;exports.groupBy=o.groupBy;exports.indexBy=o.indexBy;exports.shuffleArray=G.shuffleArray;exports.newHref=V.newHref;exports.isInfinityEmpty=W.isInfinityEmpty;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/src/index.mjs
CHANGED
|
@@ -19,46 +19,47 @@ import { Form as J } from "./form/Form.mjs";
|
|
|
19
19
|
import { FormButtonSubmit as U } from "./form/FormButtonSubmit.mjs";
|
|
20
20
|
import { zodValidator as G } from "./form/utils/zodValidator.mjs";
|
|
21
21
|
import { nullableInput as Q } from "./form/utils/nullableInput.mjs";
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
22
|
+
import { optionalInput as W } from "./form/utils/optionalInput.mjs";
|
|
23
|
+
import { FormCheckbox as q } from "./form/base/FormCheckbox.mjs";
|
|
24
|
+
import { FormDatePickerInput as Y } from "./form/base/FormDatePickerInput.mjs";
|
|
25
|
+
import { FormDateTimePicker as $ } from "./form/base/FormDateTimePicker.mjs";
|
|
26
|
+
import { FormNumberInput as ro } from "./form/base/FormNumberInput.mjs";
|
|
27
|
+
import { FormRadioGroup as to } from "./form/base/FormRadioGroup.mjs";
|
|
28
|
+
import { FormSelect as po } from "./form/base/FormSelect.mjs";
|
|
29
|
+
import { FormSelectInfinity as xo } from "./form/base/FormSelectInfinity.mjs";
|
|
30
|
+
import { FormTextarea as io } from "./form/base/FormTextArea.mjs";
|
|
31
|
+
import { FormTextInput as uo } from "./form/base/FormTextInput.mjs";
|
|
32
|
+
import { FormTimeInput as so, numberToTimeInput as lo, timeInputToNumber as Io } from "./form/base/FormTimeInput.mjs";
|
|
33
|
+
import { withForm as Fo } from "./hocs/withForm.mjs";
|
|
34
|
+
import { withModalManager as To } from "./hocs/withModalManager.mjs";
|
|
35
|
+
import { useBreakpoint as So } from "./hooks/useBreakpoint.mjs";
|
|
36
|
+
import { useFetchNextPageOnScroll as bo } from "./hooks/useFetchNextPageOnScroll.mjs";
|
|
37
|
+
import { useOnScrollProgress as ho } from "./hooks/useOnScrollProgress.mjs";
|
|
38
|
+
import { useUpdateSearchParams as Bo } from "./hooks/useUpdateSearchParams.mjs";
|
|
39
|
+
import { breakpointsWithPx as vo } from "./mantine/breakpoints-with-px.mjs";
|
|
40
|
+
import { toTailwindColors as wo } from "./mantine/to-tailwind-colors.mjs";
|
|
41
|
+
import { myDefaultTheme as Co } from "./mantine/my-default-theme.mjs";
|
|
42
|
+
import { formatBytes as Oo } from "./utils/formatBytes.mjs";
|
|
43
|
+
import { addBodyJsonHook as _o } from "./utils/ky/addBodyJsonHook.mjs";
|
|
44
|
+
import { parseJSON as Lo } from "./utils/ky/parseJson.mjs";
|
|
45
|
+
import { groupBy as zo, indexBy as Go } from "./utils/array/groupBy.mjs";
|
|
46
|
+
import { shuffleArray as Qo } from "./utils/array/shuffleArray.mjs";
|
|
47
|
+
import { newHref as Wo } from "./utils/newHref.mjs";
|
|
48
|
+
import { isInfinityEmpty as qo } from "./utils/isInfinityEmpty.mjs";
|
|
48
49
|
export {
|
|
49
50
|
e as EmptyState,
|
|
50
51
|
J as Form,
|
|
51
52
|
U as FormButtonSubmit,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
53
|
+
q as FormCheckbox,
|
|
54
|
+
Y as FormDatePickerInput,
|
|
55
|
+
$ as FormDateTimePicker,
|
|
56
|
+
ro as FormNumberInput,
|
|
57
|
+
to as FormRadioGroup,
|
|
58
|
+
po as FormSelect,
|
|
59
|
+
xo as FormSelectInfinity,
|
|
60
|
+
uo as FormTextInput,
|
|
61
|
+
io as FormTextarea,
|
|
62
|
+
so as FormTimeInput,
|
|
62
63
|
B as HttpStatus,
|
|
63
64
|
a as Icon,
|
|
64
65
|
m as InfinityLoader,
|
|
@@ -76,28 +77,29 @@ export {
|
|
|
76
77
|
A as QP_BACK_URL_NAME,
|
|
77
78
|
v as Revalidate,
|
|
78
79
|
h as SelectInfinity,
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
80
|
+
_o as addBodyJsonHook,
|
|
81
|
+
vo as breakpointsWithPx,
|
|
82
|
+
Oo as formatBytes,
|
|
83
|
+
zo as groupBy,
|
|
84
|
+
Go as indexBy,
|
|
85
|
+
qo as isInfinityEmpty,
|
|
86
|
+
Co as myDefaultTheme,
|
|
87
|
+
Wo as newHref,
|
|
87
88
|
Q as nullableInput,
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
89
|
+
lo as numberToTimeInput,
|
|
90
|
+
W as optionalInput,
|
|
91
|
+
Lo as parseJSON,
|
|
92
|
+
Qo as shuffleArray,
|
|
93
|
+
Io as timeInputToNumber,
|
|
94
|
+
wo as toTailwindColors,
|
|
95
|
+
So as useBreakpoint,
|
|
96
|
+
bo as useFetchNextPageOnScroll,
|
|
95
97
|
C as useNavigationHistory,
|
|
96
|
-
|
|
98
|
+
ho as useOnScrollProgress,
|
|
97
99
|
R as usePageData,
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
100
|
+
Bo as useUpdateSearchParams,
|
|
101
|
+
Fo as withForm,
|
|
102
|
+
To as withModalManager,
|
|
101
103
|
G as zodValidator
|
|
102
104
|
};
|
|
103
105
|
//# sourceMappingURL=index.mjs.map
|
package/dist/src/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|