@vulcanjs/react-ui 0.6.7 → 0.6.8-alpha.4
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/VulcanComponents/Consumer.d.ts.map +0 -0
- package/dist/components/VulcanComponents/Context.d.ts.map +0 -0
- package/dist/components/VulcanComponents/Dummy.d.ts.map +0 -0
- package/dist/components/VulcanComponents/Provider.d.ts.map +0 -0
- package/dist/components/VulcanComponents/defaultVulcanComponents/index.d.ts.map +0 -0
- package/dist/components/VulcanComponents/index.d.ts +1 -1
- package/dist/components/VulcanComponents/index.d.ts.map +1 -1
- package/dist/components/VulcanComponents/typings.d.ts.map +0 -0
- package/dist/components/VulcanCurrentUser/Consumer.d.ts.map +0 -0
- package/dist/components/VulcanCurrentUser/Context.d.ts.map +0 -0
- package/dist/components/VulcanCurrentUser/Provider.d.ts.map +0 -0
- package/dist/components/VulcanCurrentUser/index.d.ts.map +0 -0
- package/dist/components/core/LoadingButton.d.ts.map +0 -0
- package/dist/components/core/MutationButton.d.ts.map +0 -0
- package/dist/components/core/index.d.ts +4 -0
- package/dist/components/core/index.d.ts.map +1 -0
- package/dist/components/core/typings.d.ts.map +0 -0
- package/dist/components/form/FieldErrors.d.ts +6 -0
- package/dist/components/form/Form/Form.d.ts +4 -0
- package/dist/components/form/Form/fields.d.ts +22 -0
- package/dist/components/form/Form/index.d.ts +3 -0
- package/dist/components/form/Form/typings.d.ts +76 -0
- package/dist/components/form/Form/utils.d.ts +2 -0
- package/dist/components/form/FormComponent.d.ts +31 -0
- package/dist/components/form/FormComponentInner.d.ts +32 -0
- package/dist/components/form/FormComponentLoader.d.ts +15 -0
- package/dist/components/form/FormContainer.d.ts +18 -0
- package/dist/components/form/FormContext.d.ts +25 -0
- package/dist/components/form/FormElement.d.ts +4 -0
- package/dist/components/form/FormError.d.ts +11 -0
- package/dist/components/form/FormErrors.d.ts +3 -0
- package/dist/components/form/FormGroup.d.ts +30 -0
- package/dist/components/form/FormIntl.d.ts +15 -0
- package/dist/components/form/FormLayout.d.ts +10 -0
- package/dist/components/form/FormNestedArray.d.ts +26 -0
- package/dist/components/form/FormNestedArrayLayout.d.ts +18 -0
- package/dist/components/form/FormNestedDivider.d.ts +13 -0
- package/dist/components/form/FormNestedItem.d.ts +52 -0
- package/dist/components/form/FormNestedObject.d.ts +35 -0
- package/dist/components/form/FormOptionLabel.d.ts +5 -0
- package/dist/components/form/FormSubmit.d.ts +38 -0
- package/dist/components/form/core/Button.d.ts +4 -0
- package/dist/components/form/core/Form/Form.d.ts.map +0 -0
- package/dist/components/form/core/Form/fields.d.ts.map +0 -0
- package/dist/components/form/core/Form/index.d.ts.map +0 -0
- package/dist/components/form/core/Form/typings.d.ts.map +0 -0
- package/dist/components/form/core/Form/utils.d.ts.map +0 -0
- package/dist/components/form/core/FormComponent.d.ts +27 -2
- package/dist/components/form/core/FormComponentInner.d.ts +30 -2
- package/dist/components/form/core/FormContainer.d.ts.map +0 -0
- package/dist/components/form/core/FormContext.d.ts.map +0 -0
- package/dist/components/form/core/Loading.d.ts +3 -0
- package/dist/components/form/core/index.d.ts.map +0 -0
- package/dist/components/form/hooks/useBlockTransition/block.d.ts.map +0 -0
- package/dist/components/form/hooks/useBlockTransition/useBlockTransition.d.ts.map +0 -0
- package/dist/components/form/hooks/useWarnOnUnsaved/index.d.ts.map +0 -0
- package/dist/components/form/hooks/useWarnOnUnsaved/useWarnOnUnsaved.d.ts.map +0 -0
- package/dist/components/form/index.d.ts +1 -1
- package/dist/components/form/index.d.ts.map +1 -1
- package/dist/components/form/inputs/AutocompleteMultiple.d.ts +1 -1
- package/dist/components/form/inputs/BasicInputs.d.ts +1 -1
- package/dist/components/form/inputs/Checkboxgroup.d.ts +1 -1
- package/dist/components/form/inputs/FormItem.d.ts +1 -1
- package/dist/components/form/inputs/FormOptionLabel.d.ts +1 -1
- package/dist/components/form/inputs/RadioGroup.d.ts +1 -1
- package/dist/components/form/inputs/SelectInputs.d.ts +1 -1
- package/dist/components/form/modules/formFragments.d.ts +16 -0
- package/dist/components/form/modules/path_utils.d.ts +6 -0
- package/dist/components/form/modules/schema_utils.d.ts +14 -0
- package/dist/components/form/modules/utils.d.ts +17 -0
- package/dist/components/form/typings.d.ts +2 -0
- package/dist/components/form/typings.d.ts.map +1 -1
- package/dist/components/form/ui_utils.d.ts +3 -0
- package/dist/components/form/useBlockTransition/block.d.ts +4 -0
- package/dist/components/form/useBlockTransition/useBlockTransition.d.ts +5 -0
- package/dist/components/form/useWarnOnUnsaved/index.d.ts +2 -0
- package/dist/components/form/useWarnOnUnsaved/useWarnOnUnsaved.d.ts +5 -0
- package/dist/components/form/utils/formFragments.d.ts.map +0 -0
- package/dist/components/form/utils/index.d.ts.map +0 -0
- package/dist/components/form/utils/path_utils.d.ts.map +0 -0
- package/dist/components/form/utils/schema_utils.d.ts.map +0 -0
- package/dist/components/form/utils/ui_utils.d.ts.map +0 -0
- package/dist/components/form/utils/utils.d.ts.map +0 -0
- package/dist/componentsHelpers.d.ts.map +0 -0
- package/dist/decorators/autocomplete.d.ts +8 -0
- package/dist/decorators/index.d.ts +4 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +449 -440
- package/dist/index.js.map +1 -1
- package/dist/testing/ExpectedErrorBoundary.d.ts.map +0 -0
- package/dist/testing.d.ts.map +0 -0
- package/dist/testing.js +0 -0
- package/dist/testing.js.map +0 -0
- package/package.json +8 -8
@@ -1,4 +1,32 @@
|
|
1
|
-
|
2
|
-
import
|
1
|
+
import React, { MouseEventHandler } from "react";
|
2
|
+
import { FormComponentProps } from "./FormComponent";
|
3
|
+
import { VulcanCoreInput } from "@vulcanjs/schema";
|
4
|
+
import { PossibleVulcanComponents } from "../../VulcanComponents/typings";
|
5
|
+
export interface FormComponentInnerProps extends FormComponentProps {
|
6
|
+
inputType: VulcanCoreInput;
|
7
|
+
clearField?: MouseEventHandler<HTMLButtonElement>;
|
8
|
+
handleChange?: Function;
|
9
|
+
itemProperties?: any;
|
10
|
+
description?: string;
|
11
|
+
loading?: boolean;
|
12
|
+
submitForm: any;
|
13
|
+
formComponents: PossibleVulcanComponents;
|
14
|
+
intlKeys?: any;
|
15
|
+
inputClassName: any;
|
16
|
+
name?: string;
|
17
|
+
input: any;
|
18
|
+
beforeComponent: any;
|
19
|
+
afterComponent: any;
|
20
|
+
errors: any;
|
21
|
+
showCharsRemaining: any;
|
22
|
+
charsRemaining: any;
|
23
|
+
renderComponent: any;
|
24
|
+
formInput: any;
|
25
|
+
}
|
3
26
|
export declare const FormComponentInner: (props: FormComponentInnerProps) => JSX.Element;
|
27
|
+
export interface FormInputProps<TInput = HTMLInputElement> extends FormComponentInnerProps {
|
28
|
+
inputProperties: React.HTMLProps<TInput>;
|
29
|
+
itemProperties: any;
|
30
|
+
}
|
31
|
+
export declare type FormTextAreaProps = FormInputProps<HTMLTextAreaElement>;
|
4
32
|
//# sourceMappingURL=FormComponentInner.d.ts.map
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,6 +1,6 @@
|
|
1
1
|
export * from "./core/FormContext";
|
2
2
|
export * from "./core/Form";
|
3
3
|
export * from "./core/FormContainer";
|
4
|
-
export type { FormInputProps } from "./typings";
|
4
|
+
export type { FormInputProps, FormOption } from "./typings";
|
5
5
|
export * from "./utils";
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/form/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AAErC,YAAY,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/form/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AAErC,YAAY,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE5D,cAAc,SAAS,CAAC"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
import type { FormInputProps } from "../
|
2
|
+
import type { FormInputProps } from "../core/FormComponentInner";
|
3
3
|
export interface AutocompleteMultipleProps extends FormInputProps {
|
4
4
|
}
|
5
5
|
export declare const AutocompleteMultiple: (props: AutocompleteMultipleProps) => JSX.Element;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
import { FormInputProps, FormTextAreaProps } from "../
|
2
|
+
import { FormInputProps, FormTextAreaProps } from "../core/FormComponentInner";
|
3
3
|
export declare const FormComponentDefault: (props: FormInputProps) => JSX.Element;
|
4
4
|
export declare const FormComponentPassword: (props: FormInputProps) => JSX.Element;
|
5
5
|
export declare const FormComponentNumber: (props: FormInputProps) => JSX.Element;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
import
|
2
|
+
import { FormInputProps } from "../core/FormComponentInner";
|
3
3
|
export declare const otherMarker = "[other]";
|
4
4
|
export declare const isOtherValue: (s: any) => any;
|
5
5
|
export declare const removeOtherMarker: (s: any) => any;
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
import { FormInputProps } from "../
|
2
|
+
import { FormInputProps } from "../core/FormComponentInner";
|
3
3
|
export declare const FormItem: (props: FormInputProps["itemProperties"] & Pick<FormInputProps["inputProperties"], "label" | "name">) => JSX.Element;
|
4
4
|
//# sourceMappingURL=FormItem.d.ts.map
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
import { FormInputProps } from "../
|
2
|
+
import { FormInputProps } from "../core/FormComponentInner";
|
3
3
|
export declare const FormComponentRadioGroup: (props: FormInputProps) => JSX.Element;
|
4
4
|
//# sourceMappingURL=RadioGroup.d.ts.map
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
import type { FormInputProps } from "../
|
2
|
+
import type { FormInputProps } from "../core/FormComponentInner";
|
3
3
|
export declare const FormComponentSelect: (props: FormInputProps<HTMLSelectElement>) => JSX.Element;
|
4
4
|
export declare const FormComponentSelectMultiple: (props: any) => JSX.Element;
|
5
5
|
//# sourceMappingURL=SelectInputs.d.ts.map
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { VulcanGraphqlModel } from "@vulcanjs/graphql";
|
2
|
+
import type { FormType } from "../typings";
|
3
|
+
declare const getFormFragments: ({ formType, model, fields, addFields, }: {
|
4
|
+
model: VulcanGraphqlModel;
|
5
|
+
formType: FormType;
|
6
|
+
fields?: string[] | undefined;
|
7
|
+
addFields?: string[] | undefined;
|
8
|
+
}) => {
|
9
|
+
queryFragment: import("graphql").DocumentNode;
|
10
|
+
mutationFragment: import("graphql").DocumentNode;
|
11
|
+
queryFragmentName: string;
|
12
|
+
mutationFragmentName: string;
|
13
|
+
extraQueries: (string | (() => string))[];
|
14
|
+
};
|
15
|
+
export default getFormFragments;
|
16
|
+
//# sourceMappingURL=formFragments.d.ts.map
|
@@ -0,0 +1,6 @@
|
|
1
|
+
export declare const splitPath: (string: string) => string[];
|
2
|
+
export declare const joinPath: (array: Array<string | number>) => string;
|
3
|
+
export declare const getParentPath: (string: string) => string;
|
4
|
+
export declare const removePrefix: (prefix: string, paths: Array<string>) => Array<string>;
|
5
|
+
export declare const filterPathsByPrefix: (prefix: string, paths: Array<string>) => string[];
|
6
|
+
//# sourceMappingURL=path_utils.d.ts.map
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { VulcanFieldSchema, VulcanSchema } from "@vulcanjs/schema";
|
2
|
+
export declare const getValidFields: (schema: any) => string[];
|
3
|
+
export declare const getInsertableFields: (schema: any, user: any) => string[];
|
4
|
+
export declare const getEditableFields: (schema: any, user: any, document: any) => string[];
|
5
|
+
export declare const convertSchema: (schema: VulcanSchema, options?: {
|
6
|
+
flatten?: boolean;
|
7
|
+
removeArrays?: boolean;
|
8
|
+
}) => {};
|
9
|
+
export declare const getFieldSchema: (fieldName: string, schema: VulcanSchema) => {};
|
10
|
+
export declare const getSchemaType: (fieldSchema: VulcanFieldSchema) => import("@vulcanjs/schema").VulcanFieldType;
|
11
|
+
export declare const getNestedFieldSchemaOrType: (fieldName: any, schema: any) => Object | Number | Date | null;
|
12
|
+
export declare const schemaProperties: string[];
|
13
|
+
export declare const formProperties: string[];
|
14
|
+
//# sourceMappingURL=schema_utils.d.ts.map
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import { VulcanFieldSchema } from "@vulcanjs/schema";
|
2
|
+
export declare const deepValue: (obj: any, path: any) => any;
|
3
|
+
export declare const flatten: (data: any) => {};
|
4
|
+
export declare const isEmptyValue: (value: any) => boolean;
|
5
|
+
export declare const mergeValue: ({ currentValue, documentValue, deletedValues: deletedFields, path, locale, datatype, }: {
|
6
|
+
currentValue: any;
|
7
|
+
documentValue: any;
|
8
|
+
deletedValues: any;
|
9
|
+
path: any;
|
10
|
+
locale: any;
|
11
|
+
datatype: any;
|
12
|
+
}) => any;
|
13
|
+
export declare const getDeletedValues: (deletedFields: any, accumulator?: {}) => any;
|
14
|
+
export declare const getNestedDeletedValues: (prefix: any, deletedFields: any, accumulator?: {}) => any;
|
15
|
+
export declare const getFieldType: (fieldSchema: VulcanFieldSchema) => import("@vulcanjs/schema").VulcanFieldType;
|
16
|
+
export declare const getNullValue: (datatype: any) => false | "" | never[] | null;
|
17
|
+
//# sourceMappingURL=utils.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"typings.d.ts","sourceRoot":"","sources":["../../../components/form/typings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,KAAK,EACV,iBAAi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AC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,GAAG,CAAC;IACX,eAAe,EAAE,GAAG,CAAC;IACrB,cAAc,EAAE,GAAG,CAAC;IACpB,MAAM,EAAE,GAAG,CAAC;IACZ,kBAAkB,EAAE,GAAG,CAAC;IACxB,cAAc,EAAE,GAAG,CAAC;IACpB,eAAe,EAAE,GAAG,CAAC;IACrB,SAAS,EAAE,GAAG,CAAC;CAChB;AAKD,MAAM,WAAW,cAAc,CAAC,MAAM,GAAG,gBAAgB,CACvD,SAAQ,uBAAuB;IAU/B,eAAe,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IACzC,cAAc,EAAE,GAAG,CAAC;CACrB;AACD,oBAAY,iBAAiB,GAAG,cAAc,CAAC,mBAAmB,CAAC,CAAC"}
|
@@ -0,0 +1,4 @@
|
|
1
|
+
export declare const BLOCK_TRANSITION_EVENT_TYPE = "blocktransition";
|
2
|
+
export declare const UNBLOCK_TRANSITION_EVENT_TYPE = "unblocktransition";
|
3
|
+
export declare const block: (setConfirmationMessage: (event?: BeforeUnloadEvent | undefined) => string, onUnblock?: Function | undefined) => () => void;
|
4
|
+
//# sourceMappingURL=block.d.ts.map
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qBAAqB,CAAC"}
|