@niledatabase/react 1.0.0-alpha.200 → 1.0.0-alpha.202

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.
Files changed (40) hide show
  1. package/dist/GoogleLoginButton/GoogleLoginButton.d.ts +13 -13
  2. package/dist/GoogleLoginButton/GoogleLoginButton.stories.d.ts +12 -12
  3. package/dist/GoogleLoginButton/index.d.ts +1 -1
  4. package/dist/LoginForm/LoginForm.d.ts +3 -3
  5. package/dist/LoginForm/SingleSignOn.d.ts +7 -7
  6. package/dist/LoginForm/UserLoginForm.stories.d.ts +5 -5
  7. package/dist/LoginForm/index.d.ts +2 -2
  8. package/dist/LoginForm/types.d.ts +16 -16
  9. package/dist/SSO/BaseSSOForm.d.ts +8 -8
  10. package/dist/SSO/Okta.d.ts +3 -3
  11. package/dist/SSO/SSO.stories.d.ts +6 -6
  12. package/dist/SSO/index.d.ts +3 -3
  13. package/dist/SSO/types.d.ts +8 -8
  14. package/dist/SignUpForm/NewUserSignUp.stories.d.ts +5 -5
  15. package/dist/SignUpForm/SignUpForm.d.ts +3 -3
  16. package/dist/SignUpForm/index.d.ts +1 -1
  17. package/dist/SignUpForm/types.d.ts +13 -13
  18. package/dist/UserTenantList/CreateUser.d.ts +9 -9
  19. package/dist/UserTenantList/UserList.d.ts +17 -17
  20. package/dist/UserTenantList/UserList.stories.d.ts +5 -5
  21. package/dist/UserTenantList/UserModal.d.ts +8 -8
  22. package/dist/UserTenantList/index.d.ts +1 -1
  23. package/dist/UserTenantList/useDataParser.d.ts +4 -4
  24. package/dist/context/index.d.ts +9 -9
  25. package/dist/context/theme.d.ts +2 -2
  26. package/dist/context/types.d.ts +18 -18
  27. package/dist/hooks/useResults.d.ts +22 -22
  28. package/dist/hooks/useTextSizer.d.ts +1 -1
  29. package/dist/index.d.ts +12 -12
  30. package/dist/lib/SimpleForm/CheckGroup/index.d.ts +10 -10
  31. package/dist/lib/SimpleForm/index.d.ts +11 -11
  32. package/dist/lib/SimpleForm/types.d.ts +36 -36
  33. package/dist/react.cjs.development.js +1 -1
  34. package/dist/react.cjs.development.js.map +1 -1
  35. package/dist/react.cjs.production.min.js +1 -1
  36. package/dist/react.cjs.production.min.js.map +1 -1
  37. package/dist/react.esm.js +1 -1
  38. package/dist/react.esm.js.map +1 -1
  39. package/dist/utils/getColumnSize.d.ts +2 -2
  40. package/package.json +48 -48
@@ -1,13 +1,13 @@
1
- import React from 'react';
2
- /**
3
- * A component for a Google login button, according to their design language.
4
- * This works when an identity provider is configured in the admin dashboard.
5
- * @param props href: a string to override the URL provided by the context
6
- * @returns a JSX.Element to render
7
- */
8
- export default function GoogleSSOButton(props: {
9
- href?: string;
10
- workspace?: string;
11
- database?: string;
12
- newTenantName?: string;
13
- }): React.JSX.Element;
1
+ import React from 'react';
2
+ /**
3
+ * A component for a Google login button, according to their design language.
4
+ * This works when an identity provider is configured in the admin dashboard.
5
+ * @param props href: a string to override the URL provided by the context
6
+ * @returns a JSX.Element to render
7
+ */
8
+ export default function GoogleSSOButton(props: {
9
+ href?: string;
10
+ workspace?: string;
11
+ database?: string;
12
+ newTenantName?: string;
13
+ }): React.JSX.Element;
@@ -1,12 +1,12 @@
1
- import React from 'react';
2
- import GoogleLoginButton from './GoogleLoginButton';
3
- declare const meta: {
4
- title: string;
5
- component: typeof GoogleLoginButton;
6
- tags: string[];
7
- };
8
- export default meta;
9
- export declare function Basic(): React.JSX.Element;
10
- export declare function BasicWithTenantNameProvider(): React.JSX.Element;
11
- export declare function AlphaVersionWithOutProvider(): React.JSX.Element;
12
- export declare function AlphaVersionWithProvider(): React.JSX.Element;
1
+ import React from 'react';
2
+ import GoogleLoginButton from './GoogleLoginButton';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof GoogleLoginButton;
6
+ tags: string[];
7
+ };
8
+ export default meta;
9
+ export declare function Basic(): React.JSX.Element;
10
+ export declare function BasicWithTenantNameProvider(): React.JSX.Element;
11
+ export declare function AlphaVersionWithOutProvider(): React.JSX.Element;
12
+ export declare function AlphaVersionWithProvider(): React.JSX.Element;
@@ -1 +1 @@
1
- export { default } from './GoogleLoginButton';
1
+ export { default } from './GoogleLoginButton';
@@ -1,3 +1,3 @@
1
- import React from 'react';
2
- import { Props } from './types';
3
- export default function LoginForm(props: Props): React.JSX.Element;
1
+ import React from 'react';
2
+ import { Props } from './types';
3
+ export default function LoginForm(props: Props): React.JSX.Element;
@@ -1,7 +1,7 @@
1
- import React from 'react';
2
- import { Props } from './types';
3
- export default function SingleSignOnForm(props: Props & {
4
- nextButtonText?: string;
5
- loginButtonText?: string;
6
- onSuccess: () => void;
7
- }): React.JSX.Element;
1
+ import React from 'react';
2
+ import { Props } from './types';
3
+ export default function SingleSignOnForm(props: Props & {
4
+ nextButtonText?: string;
5
+ loginButtonText?: string;
6
+ onSuccess: () => void;
7
+ }): React.JSX.Element;
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
- import { Meta } from '@storybook/react';
3
- declare const meta: Meta;
4
- export default meta;
5
- export declare function Basic(): React.JSX.Element;
1
+ import React from 'react';
2
+ import { Meta } from '@storybook/react';
3
+ declare const meta: Meta;
4
+ export default meta;
5
+ export declare function Basic(): React.JSX.Element;
@@ -1,2 +1,2 @@
1
- export { default } from './LoginForm';
2
- export { default as SingleSignOnForm } from './SingleSignOn';
1
+ export { default } from './LoginForm';
2
+ export { default as SingleSignOnForm } from './SingleSignOn';
@@ -1,16 +1,16 @@
1
- import { LoginRequest } from '@niledatabase/browser';
2
- import { Attribute } from '../lib/SimpleForm/types';
3
- export declare type AllowedAny = any;
4
- export declare type LoginInfo = {
5
- email: string;
6
- password: string;
7
- };
8
- declare type LoginSuccess = (response: LoginRequest, formValues: LoginInfo, ...args: AllowedAny) => void;
9
- export interface Props {
10
- beforeMutate?: (data: AllowedAny) => AllowedAny;
11
- onSuccess: LoginSuccess;
12
- onError?: (error: Error, data: AllowedAny) => void;
13
- attributes?: Attribute[];
14
- disableSSO?: boolean;
15
- }
16
- export {};
1
+ import { LoginRequest } from '@niledatabase/browser';
2
+ import { Attribute } from '../lib/SimpleForm/types';
3
+ export type AllowedAny = any;
4
+ export type LoginInfo = {
5
+ email: string;
6
+ password: string;
7
+ };
8
+ type LoginSuccess = (response: LoginRequest, formValues: LoginInfo, ...args: AllowedAny) => void;
9
+ export interface Props {
10
+ beforeMutate?: (data: AllowedAny) => AllowedAny;
11
+ onSuccess: LoginSuccess;
12
+ onError?: (error: Error, data: AllowedAny) => void;
13
+ attributes?: Attribute[];
14
+ disableSSO?: boolean;
15
+ }
16
+ export {};
@@ -1,8 +1,8 @@
1
- import React from 'react';
2
- import { SSOProvider } from '@niledatabase/browser';
3
- import { OktaProps } from './types';
4
- export default function BaseSSOForm(props: Omit<OktaProps, 'callbackUrl' | 'providers'> & {
5
- providerName: string;
6
- configurationGuide: JSX.Element;
7
- config: SSOProvider;
8
- }): React.JSX.Element;
1
+ import React from 'react';
2
+ import { SSOProvider } from '@niledatabase/browser';
3
+ import { OktaProps } from './types';
4
+ export default function BaseSSOForm(props: Omit<OktaProps, 'callbackUrl' | 'providers'> & {
5
+ providerName: string;
6
+ configurationGuide?: JSX.Element;
7
+ config?: SSOProvider;
8
+ }): React.JSX.Element;
@@ -1,3 +1,3 @@
1
- import React from 'react';
2
- import { OktaProps } from './types';
3
- export default function Okta(props: OktaProps): React.JSX.Element | null;
1
+ import React from 'react';
2
+ import { OktaProps } from './types';
3
+ export default function Okta(props: OktaProps): React.JSX.Element | null;
@@ -1,6 +1,6 @@
1
- import React from 'react';
2
- import { Meta } from '@storybook/react';
3
- declare const meta: Meta;
4
- export default meta;
5
- export declare function BasicSSO(): React.JSX.Element;
6
- export declare function OktaSSO(): React.JSX.Element;
1
+ import React from 'react';
2
+ import { Meta } from '@storybook/react';
3
+ declare const meta: Meta;
4
+ export default meta;
5
+ export declare function BasicSSO(): React.JSX.Element;
6
+ export declare function OktaSSO(): React.JSX.Element;
@@ -1,3 +1,3 @@
1
- export { default as Okta } from './Okta';
2
- export { default } from './BaseSSOForm';
3
- export * from './types';
1
+ export { default as Okta } from './Okta';
2
+ export { default } from './BaseSSOForm';
3
+ export * from './types';
@@ -1,8 +1,8 @@
1
- import { SSOProvider } from '@niledatabase/browser';
2
- export declare type OktaProps = {
3
- providers: SSOProvider[];
4
- callbackUrl: string;
5
- onSuccess?: (data: unknown, variables: unknown) => void;
6
- onError?: (e: Error) => void;
7
- allowEdit?: boolean;
8
- };
1
+ import { SSOProvider } from '@niledatabase/browser';
2
+ export type OktaProps = {
3
+ providers?: SSOProvider[];
4
+ callbackUrl?: string;
5
+ onSuccess?: (data: unknown, variables: unknown) => void;
6
+ onError?: (e: Error) => void;
7
+ allowEdit?: boolean;
8
+ };
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
- import { Meta } from '@storybook/react';
3
- declare const meta: Meta;
4
- export default meta;
5
- export declare function Basic(): React.JSX.Element;
1
+ import React from 'react';
2
+ import { Meta } from '@storybook/react';
3
+ declare const meta: Meta;
4
+ export default meta;
5
+ export declare function Basic(): React.JSX.Element;
@@ -1,3 +1,3 @@
1
- import React from 'react';
2
- import { Props } from './types';
3
- export default function SignUpForm(props: Props): React.JSX.Element;
1
+ import React from 'react';
2
+ import { Props } from './types';
3
+ export default function SignUpForm(props: Props): React.JSX.Element;
@@ -1 +1 @@
1
- export { default } from './SignUpForm';
1
+ export { default } from './SignUpForm';
@@ -1,13 +1,13 @@
1
- import { SignUp201Response } from '@niledatabase/browser';
2
- import { Attribute } from '../lib/SimpleForm/types';
3
- export declare type LoginInfo = SignUp201Response;
4
- declare type SignInSuccess = (response: void | SignUp201Response, formValues: LoginInfo) => void;
5
- export declare type AllowedAny = any;
6
- export interface Props {
7
- onSuccess: SignInSuccess;
8
- onError?: (e: Error, info: LoginInfo) => void;
9
- beforeMutate?: (data: AllowedAny) => AllowedAny;
10
- attributes?: Attribute[];
11
- buttonText?: string;
12
- }
13
- export {};
1
+ import { SignUp201Response } from '@niledatabase/browser';
2
+ import { Attribute } from '../lib/SimpleForm/types';
3
+ export type LoginInfo = SignUp201Response;
4
+ type SignInSuccess = (response: void | SignUp201Response, formValues: LoginInfo) => void;
5
+ export type AllowedAny = any;
6
+ export interface Props {
7
+ onSuccess: SignInSuccess;
8
+ onError?: (e: Error, info: LoginInfo) => void;
9
+ beforeMutate?: (data: AllowedAny) => AllowedAny;
10
+ attributes?: Attribute[];
11
+ buttonText?: string;
12
+ }
13
+ export {};
@@ -1,9 +1,9 @@
1
- import React from 'react';
2
- import { SignUp201Response } from '@niledatabase/browser';
3
- declare type Props = {
4
- allowCreation: boolean;
5
- buttonText: string;
6
- onUserCreateSuccess?: (user: SignUp201Response) => void;
7
- };
8
- export default function CreateUser(props: Props): React.JSX.Element | null;
9
- export {};
1
+ import React from 'react';
2
+ import { SignUp201Response } from '@niledatabase/browser';
3
+ type Props = {
4
+ allowCreation: boolean;
5
+ buttonText: string;
6
+ onUserCreateSuccess?: (user: SignUp201Response) => void;
7
+ };
8
+ export default function CreateUser(props: Props): React.JSX.Element | null;
9
+ export {};
@@ -1,17 +1,17 @@
1
- import React from 'react';
2
- import { IdentifyUser200Response, SignUp201Response } from '@niledatabase/browser';
3
- import { SxProps } from '@mui/system/styleFunctionSx/styleFunctionSx';
4
- import { Theme } from '@mui/system/createTheme';
5
- declare type ColumnNames = string;
6
- declare type Props = {
7
- data: void | IdentifyUser200Response[];
8
- allowCreation?: boolean;
9
- buttonText?: string;
10
- onUserCreateSuccess?: (user: SignUp201Response) => void;
11
- slots?: {
12
- dataGrid?: SxProps<Theme>;
13
- };
14
- include?: ColumnNames[];
15
- };
16
- export default function UserList(props: Props): React.JSX.Element;
17
- export {};
1
+ import React from 'react';
2
+ import { IdentifyUser200Response, SignUp201Response } from '@niledatabase/browser';
3
+ import { SxProps } from '@mui/system/styleFunctionSx/styleFunctionSx';
4
+ import { Theme } from '@mui/system/createTheme';
5
+ type ColumnNames = string;
6
+ type Props = {
7
+ data: void | IdentifyUser200Response[];
8
+ allowCreation?: boolean;
9
+ buttonText?: string;
10
+ onUserCreateSuccess?: (user: SignUp201Response) => void;
11
+ slots?: {
12
+ dataGrid?: SxProps<Theme>;
13
+ };
14
+ include?: ColumnNames[];
15
+ };
16
+ export default function UserList(props: Props): React.JSX.Element;
17
+ export {};
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
- import { Meta } from '@storybook/react';
3
- declare const meta: Meta;
4
- export default meta;
5
- export declare function Basic(): React.JSX.Element;
1
+ import React from 'react';
2
+ import { Meta } from '@storybook/react';
3
+ declare const meta: Meta;
4
+ export default meta;
5
+ export declare function Basic(): React.JSX.Element;
@@ -1,8 +1,8 @@
1
- import React from 'react';
2
- import { SignUp201Response } from '@niledatabase/browser';
3
- export declare type UserFormProps = {
4
- open: boolean;
5
- setOpen: (open: boolean) => void;
6
- refetch?: (user: SignUp201Response) => void;
7
- };
8
- export default function AddUser(props: UserFormProps): React.JSX.Element;
1
+ import React from 'react';
2
+ import { SignUp201Response } from '@niledatabase/browser';
3
+ export type UserFormProps = {
4
+ open: boolean;
5
+ setOpen: (open: boolean) => void;
6
+ refetch?: (user: SignUp201Response) => void;
7
+ };
8
+ export default function AddUser(props: UserFormProps): React.JSX.Element;
@@ -1 +1 @@
1
- export { default } from './UserList';
1
+ export { default } from './UserList';
@@ -1,4 +1,4 @@
1
- import { GridColDef, GridRowsProp } from '@mui/x-data-grid';
2
- import { IdentifyUser200Response } from '@niledatabase/browser';
3
- export declare const internalRowId = "_nile_data_grid_identifier";
4
- export default function useDataParser(data: void | IdentifyUser200Response[], include: string[]): [GridColDef[], GridRowsProp];
1
+ import { GridColDef, GridRowsProp } from '@mui/x-data-grid';
2
+ import { IdentifyUser200Response } from '@niledatabase/browser';
3
+ export declare const internalRowId = "_nile_data_grid_identifier";
4
+ export default function useDataParser(data: void | IdentifyUser200Response[], include: string[]): [GridColDef[], GridRowsProp];
@@ -1,9 +1,9 @@
1
- import React from 'react';
2
- import { Client } from '@niledatabase/browser';
3
- import { NileProviderProps, NileReactConfig } from './types';
4
- export declare const BaseQueryProvider: ({ children, }: {
5
- children: JSX.Element;
6
- }) => JSX.Element;
7
- export declare const NileProvider: (props: NileProviderProps) => React.JSX.Element;
8
- export declare const useNileConfig: () => NileReactConfig;
9
- export declare const useApi: () => Client;
1
+ import React from 'react';
2
+ import { Client } from '@niledatabase/browser';
3
+ import { NileProviderProps, NileReactConfig } from './types';
4
+ export declare const BaseQueryProvider: ({ children, }: {
5
+ children: JSX.Element;
6
+ }) => JSX.Element;
7
+ export declare const NileProvider: (props: NileProviderProps) => React.JSX.Element;
8
+ export declare const useNileConfig: () => NileReactConfig;
9
+ export declare const useApi: () => Client;
@@ -1,2 +1,2 @@
1
- declare const _default: any;
2
- export default _default;
1
+ declare const _default: import("@mui/joy/styles").Theme;
2
+ export default _default;
@@ -1,18 +1,18 @@
1
- import { Client } from '@niledatabase/browser';
2
- import { Theme } from '@mui/joy/styles';
3
- export interface NileReactConfig {
4
- tenantId?: string;
5
- basePath?: string;
6
- }
7
- export declare type NileContext = NileReactConfig & {
8
- api: Client;
9
- theme?: Theme;
10
- };
11
- export declare type NileProviderProps = NileReactConfig & {
12
- children: JSX.Element | JSX.Element[];
13
- theme?: Theme;
14
- QueryProvider?: (props: {
15
- children: JSX.Element;
16
- }) => JSX.Element;
17
- api?: Client;
18
- };
1
+ import { Client } from '@niledatabase/browser';
2
+ import { Theme } from '@mui/joy/styles';
3
+ export interface NileReactConfig {
4
+ tenantId?: string;
5
+ basePath?: string;
6
+ }
7
+ export type NileContext = NileReactConfig & {
8
+ api: Client;
9
+ theme?: Theme;
10
+ };
11
+ export type NileProviderProps = NileReactConfig & {
12
+ children: JSX.Element | JSX.Element[];
13
+ theme?: Theme;
14
+ QueryProvider?: (props: {
15
+ children: JSX.Element;
16
+ }) => JSX.Element;
17
+ api?: Client;
18
+ };
@@ -1,22 +1,22 @@
1
- import { GridColDef, GridRowsProp } from '@mui/x-data-grid';
2
- export declare const internalRowId = "_nile_data_grid_identifier";
3
- declare enum Commands {
4
- insert = "INSERT",
5
- update = "UPDATE",
6
- delete = "DELETE",
7
- create = "CREATE",
8
- drop = "DROP",
9
- alter = "ALTER"
10
- }
11
- declare type Any = any;
12
- declare type ResultSet = null | Record<string, never> | {
13
- command: Commands;
14
- rowCount: number;
15
- oid: number;
16
- rows: Any[];
17
- fields: Any[];
18
- RowCtor: null;
19
- rowAsArray: boolean;
20
- };
21
- export default function useResults(resultSet: null | ResultSet): [GridColDef[], GridRowsProp];
22
- export {};
1
+ import { GridColDef, GridRowsProp } from '@mui/x-data-grid';
2
+ export declare const internalRowId = "_nile_data_grid_identifier";
3
+ declare enum Commands {
4
+ insert = "INSERT",
5
+ update = "UPDATE",
6
+ delete = "DELETE",
7
+ create = "CREATE",
8
+ drop = "DROP",
9
+ alter = "ALTER"
10
+ }
11
+ type Any = any;
12
+ type ResultSet = null | Record<string, never> | {
13
+ command: Commands;
14
+ rowCount: number;
15
+ oid: number;
16
+ rows: Any[];
17
+ fields: Any[];
18
+ RowCtor: null;
19
+ rowAsArray: boolean;
20
+ };
21
+ export default function useResults(resultSet: null | ResultSet): [GridColDef[], GridRowsProp];
22
+ export {};
@@ -1 +1 @@
1
- export default function useTextSizer(): CanvasRenderingContext2D | undefined;
1
+ export default function useTextSizer(): CanvasRenderingContext2D | undefined;
package/dist/index.d.ts CHANGED
@@ -1,12 +1,12 @@
1
- export { NileProvider } from './context';
2
- export { default as GoogleLoginButton } from './GoogleLoginButton';
3
- export * from './GoogleLoginButton';
4
- export * from './SignUpForm';
5
- export { default as UserSignupForm } from './SignUpForm';
6
- export * from './LoginForm';
7
- export { default as UserLoginForm } from './LoginForm';
8
- export * from './UserTenantList';
9
- export { default as UserTenantList } from './UserTenantList';
10
- export * from './SSO';
11
- export { default as SSOForm } from './SSO';
12
- export { Attribute as FormAttribute, AttributeType as FormAttributeType, } from './lib/SimpleForm/types';
1
+ export { NileProvider } from './context';
2
+ export { default as GoogleLoginButton } from './GoogleLoginButton';
3
+ export * from './GoogleLoginButton';
4
+ export * from './SignUpForm';
5
+ export { default as UserSignupForm } from './SignUpForm';
6
+ export * from './LoginForm';
7
+ export { default as UserLoginForm } from './LoginForm';
8
+ export * from './UserTenantList';
9
+ export { default as UserTenantList } from './UserTenantList';
10
+ export * from './SSO';
11
+ export { default as SSOForm } from './SSO';
12
+ export { Attribute as FormAttribute, AttributeType as FormAttributeType, } from './lib/SimpleForm/types';
@@ -1,10 +1,10 @@
1
- import * as React from 'react';
2
- import { Attribute, DisplayProps, Options } from '../types';
3
- declare type Props = {
4
- attribute: Attribute;
5
- display: DisplayProps;
6
- options: Options;
7
- helperText: string;
8
- };
9
- export default function CheckGroup(props: Props): React.JSX.Element;
10
- export {};
1
+ import * as React from 'react';
2
+ import { Attribute, DisplayProps, Options } from '../types';
3
+ type Props = {
4
+ attribute: Attribute;
5
+ display: DisplayProps;
6
+ options: Options;
7
+ helperText: string;
8
+ };
9
+ export default function CheckGroup(props: Props): React.JSX.Element;
10
+ export {};
@@ -1,11 +1,11 @@
1
- import React from 'react';
2
- import { Attribute } from './types';
3
- export declare const getAttributeDefault: (attribute: Attribute) => string | number | boolean | string[] | number[];
4
- export default function SimpleForm(props: {
5
- buttonText: string;
6
- cancelButton?: React.ReactNode;
7
- attributes: Attribute[];
8
- mutation: any;
9
- loading?: boolean;
10
- successMessage?: JSX.Element;
11
- }): React.JSX.Element;
1
+ import React from 'react';
2
+ import { Attribute } from './types';
3
+ export declare const getAttributeDefault: (attribute: Attribute) => string | number | boolean | string[] | number[];
4
+ export default function SimpleForm(props: {
5
+ buttonText: string;
6
+ cancelButton?: React.ReactNode;
7
+ attributes: Attribute[];
8
+ mutation: any;
9
+ loading?: boolean;
10
+ successMessage?: JSX.Element;
11
+ }): React.JSX.Element;
@@ -1,36 +1,36 @@
1
- export declare enum AttributeType {
2
- Text = "text",
3
- Password = "password",
4
- Select = "select",
5
- Number = "number",
6
- Float = "float",
7
- Checkbox = "checkbox",
8
- Switch = "switch"
9
- }
10
- declare type SimplePrimitive = number | string | boolean;
11
- export declare type Options = {
12
- label: string;
13
- value?: SimplePrimitive;
14
- }[];
15
- export declare type Attribute = {
16
- name: string;
17
- type?: AttributeType;
18
- defaultValue?: SimplePrimitive;
19
- options?: Options;
20
- allowMultiple?: boolean;
21
- label?: string;
22
- required?: boolean;
23
- placeholder?: string;
24
- helpText?: string;
25
- disabled?: boolean;
26
- };
27
- export declare type DisplayProps = {
28
- key: string;
29
- id: string;
30
- label: string;
31
- placeholder: string;
32
- error?: boolean;
33
- color?: 'danger';
34
- disabled?: boolean;
35
- };
36
- export {};
1
+ export declare enum AttributeType {
2
+ Text = "text",
3
+ Password = "password",
4
+ Select = "select",
5
+ Number = "number",
6
+ Float = "float",
7
+ Checkbox = "checkbox",
8
+ Switch = "switch"
9
+ }
10
+ type SimplePrimitive = number | string | boolean;
11
+ export type Options = {
12
+ label: string;
13
+ value?: SimplePrimitive;
14
+ }[];
15
+ export type Attribute = {
16
+ name: string;
17
+ type?: AttributeType;
18
+ defaultValue?: SimplePrimitive;
19
+ options?: Options;
20
+ allowMultiple?: boolean;
21
+ label?: string;
22
+ required?: boolean;
23
+ placeholder?: string;
24
+ helpText?: string;
25
+ disabled?: boolean;
26
+ };
27
+ export type DisplayProps = {
28
+ key: string;
29
+ id: string;
30
+ label: string;
31
+ placeholder: string;
32
+ error?: boolean;
33
+ color?: 'danger';
34
+ disabled?: boolean;
35
+ };
36
+ export {};