@lssm/lib.presentation-runtime-react-native 8.0.2 → 8.0.4
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 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +10 -3
- package/dist/ui-kit/dist/ui/form.js +0 -16
- package/dist/ui-kit/dist/ui/form.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { DefaultValues, Resolver, UseFormReturn } from "react-hook-form";
|
|
3
|
+
import { ListFetcher, ListState } from "@lssm/lib.presentation-runtime-core";
|
|
3
4
|
|
|
4
5
|
//#region src/index.d.ts
|
|
5
6
|
interface UsePresentationControllerOpts<TFilters extends Record<string, unknown>, TVars, TItem> {
|
|
@@ -55,7 +56,7 @@ declare function usePresentationController<TFilters extends Record<string, unkno
|
|
|
55
56
|
onRemove?: () => void;
|
|
56
57
|
}[];
|
|
57
58
|
readonly setSearch: (q: string) => void;
|
|
58
|
-
readonly submitFilters:
|
|
59
|
+
readonly submitFilters: (e?: React.BaseSyntheticEvent) => Promise<void>;
|
|
59
60
|
readonly clearAll: () => void;
|
|
60
61
|
};
|
|
61
62
|
interface UseListCoordinatorOpts<TFilters extends Record<string, unknown>, TVars> {
|
|
@@ -103,7 +104,7 @@ declare function useListCoordinator<TFilters extends Record<string, unknown>, TV
|
|
|
103
104
|
onRemove?: () => void;
|
|
104
105
|
}[];
|
|
105
106
|
readonly setSearch: (q: string) => void;
|
|
106
|
-
readonly submitFilters:
|
|
107
|
+
readonly submitFilters: (e?: React.BaseSyntheticEvent) => Promise<void>;
|
|
107
108
|
readonly clearAll: () => void;
|
|
108
109
|
};
|
|
109
110
|
//#endregion
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"sour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CAAA,EAAA,GAAA,GAAA,IAAA;EAAR,CAAA,EAAA;EAEJ,SAAA,SAAA,EAAA,CAAA,CAAA,EAAA,MAAA,EAAA,GAAA,IAAA;EACJ,SAAA,aAAA,EAAA,CAAA,CAAA,CAAA,0BAAA,EAAA,UAAA,CAAA,IAAA,CAAA;EAAe,SAAA,QAAA,EAAA,GAAA,GAAA,IAAA;CAAQ"}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useForm } from "./ui-kit/dist/ui/form.js";
|
|
2
1
|
import * as React from "react";
|
|
2
|
+
import { useForm } from "@lssm/lib.ui-kit/ui/form";
|
|
3
3
|
|
|
4
4
|
//#region src/index.ts
|
|
5
5
|
function usePresentationController({ defaults, form: formOpts, toVariables, fetcher, toChips, useUrlState, replace }) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lssm/lib.presentation-runtime-react-native",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -20,10 +20,11 @@
|
|
|
20
20
|
"react-native": "*",
|
|
21
21
|
"react-hook-form": "7.66.0",
|
|
22
22
|
"zod": "^4.1.5",
|
|
23
|
-
"@lssm/lib.presentation-runtime-core": "^1.7.
|
|
23
|
+
"@lssm/lib.presentation-runtime-core": "^1.7.4"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@lssm/lib.presentation-runtime-core": "^1.7.
|
|
26
|
+
"@lssm/lib.presentation-runtime-core": "^1.7.4",
|
|
27
|
+
"@lssm/lib.ui-kit": "^1.7.4"
|
|
27
28
|
},
|
|
28
29
|
"files": [
|
|
29
30
|
"dist",
|
|
@@ -32,5 +33,11 @@
|
|
|
32
33
|
"exports": {
|
|
33
34
|
".": "./dist/index.js",
|
|
34
35
|
"./*": "./*"
|
|
36
|
+
},
|
|
37
|
+
"publishConfig": {
|
|
38
|
+
"exports": {
|
|
39
|
+
".": "./dist/index.js",
|
|
40
|
+
"./*": "./*"
|
|
41
|
+
}
|
|
35
42
|
}
|
|
36
43
|
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import * as React$1 from "react";
|
|
5
|
-
import "react/jsx-runtime";
|
|
6
|
-
import "../node_modules/@radix-ui/react-slot/dist/index.js";
|
|
7
|
-
import { useForm } from "../node_modules/react-hook-form/dist/index.esm.js";
|
|
8
|
-
import "../node_modules/@hookform/resolvers/zod/dist/zod.js";
|
|
9
|
-
|
|
10
|
-
//#region ../ui-kit/dist/ui/form.js
|
|
11
|
-
const FormFieldContext = React$1.createContext({});
|
|
12
|
-
const FormItemContext = React$1.createContext({});
|
|
13
|
-
|
|
14
|
-
//#endregion
|
|
15
|
-
export { useForm };
|
|
16
|
-
//# sourceMappingURL=form.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"form.js","names":[],"sources":["../../../../../ui-kit/dist/ui/form.js"],"sourcesContent":["'use client';\n\n\nimport { cn } from \"./utils.js\";\nimport { Label } from \"./label.js\";\nimport { Slot } from \"../node_modules/@radix-ui/react-slot/dist/index.js\";\nimport { Controller, FormProvider, useFieldArray, useForm, useFormContext, useFormState } from \"../node_modules/react-hook-form/dist/index.esm.js\";\nimport { t } from \"../node_modules/@hookform/resolvers/zod/dist/zod.js\";\nimport * as React$1 from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\n\n//#region ui/form.tsx\nconst Form = FormProvider;\nconst FormFieldContext = React$1.createContext({});\nconst FormField = ({ ...props }) => {\n\treturn /* @__PURE__ */ jsx(FormFieldContext.Provider, {\n\t\tvalue: { name: props.name },\n\t\tchildren: /* @__PURE__ */ jsx(Controller, { ...props })\n\t});\n};\nconst useFormField = () => {\n\tconst fieldContext = React$1.useContext(FormFieldContext);\n\tconst itemContext = React$1.useContext(FormItemContext);\n\tconst { getFieldState } = useFormContext();\n\tconst formState = useFormState({ name: fieldContext.name });\n\tconst fieldState = getFieldState(fieldContext.name, formState);\n\tif (!fieldContext) throw new Error(\"useFormField should be used within <FormField>\");\n\tconst { id } = itemContext;\n\treturn {\n\t\tid,\n\t\tname: fieldContext.name,\n\t\tformItemId: `${id}-form-item`,\n\t\tformDescriptionId: `${id}-form-item-description`,\n\t\tformMessageId: `${id}-form-item-message`,\n\t\t...fieldState\n\t};\n};\nconst FormItemContext = React$1.createContext({});\nfunction FormItem({ className,...props }) {\n\tconst id = React$1.useId();\n\treturn /* @__PURE__ */ jsx(FormItemContext.Provider, {\n\t\tvalue: { id },\n\t\tchildren: /* @__PURE__ */ jsx(\"div\", {\n\t\t\t\"data-slot\": \"form-item\",\n\t\t\tclassName: cn(\"grid gap-2\", className),\n\t\t\t...props\n\t\t})\n\t});\n}\nfunction FormLabel({ className,...props }) {\n\tconst { error, formItemId } = useFormField();\n\treturn /* @__PURE__ */ jsx(Label, {\n\t\t\"data-slot\": \"form-label\",\n\t\t\"data-error\": !!error,\n\t\tclassName: cn(\"data-[error=true]:text-destructive\", className),\n\t\thtmlFor: formItemId,\n\t\t...props\n\t});\n}\nfunction FormControl({ ...props }) {\n\tconst { error, formItemId, formDescriptionId, formMessageId } = useFormField();\n\treturn /* @__PURE__ */ jsx(Slot, {\n\t\t\"data-slot\": \"form-control\",\n\t\tid: formItemId,\n\t\t\"aria-describedby\": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`,\n\t\t\"aria-invalid\": !!error,\n\t\t...props\n\t});\n}\nfunction FormDescription({ className,...props }) {\n\tconst { formDescriptionId } = useFormField();\n\treturn /* @__PURE__ */ jsx(\"p\", {\n\t\t\"data-slot\": \"form-description\",\n\t\tid: formDescriptionId,\n\t\tclassName: cn(\"text-muted-foreground text-sm\", className),\n\t\t...props\n\t});\n}\nfunction FormMessage({ className,...props }) {\n\tconst { error, formMessageId } = useFormField();\n\tconst body = error ? String(error?.message ?? \"\") : props.children;\n\tif (!body) return null;\n\treturn /* @__PURE__ */ jsx(\"p\", {\n\t\t\"data-slot\": \"form-message\",\n\t\tid: formMessageId,\n\t\tclassName: cn(\"text-destructive text-sm\", className),\n\t\t...props,\n\t\tchildren: body\n\t});\n}\n\n//#endregion\nexport { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFieldArray, useForm, useFormField, t as zodResolver };\n//# sourceMappingURL=form.js.map"],"mappings":";;;;;;;;;;AAaA,MAAM,mBAAmB,QAAQ,cAAc,EAAE,CAAC;AAwBlD,MAAM,kBAAkB,QAAQ,cAAc,EAAE,CAAC"}
|