@guillotinaweb/react-gmi 0.27.0 → 0.28.1

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 (126) hide show
  1. package/dist/actions/add_item.d.ts +5 -1
  2. package/dist/actions/change_pass.d.ts +1 -1
  3. package/dist/actions/copy_item.d.ts +6 -1
  4. package/dist/actions/copy_items.d.ts +6 -1
  5. package/dist/actions/index.d.ts +2 -2
  6. package/dist/actions/move_item.d.ts +6 -1
  7. package/dist/actions/move_items.d.ts +6 -1
  8. package/dist/actions/remove_item.d.ts +6 -1
  9. package/dist/actions/remove_items.d.ts +6 -1
  10. package/dist/components/Link.d.ts +10 -6
  11. package/dist/components/TdLink.d.ts +10 -5
  12. package/dist/components/behavior_view.d.ts +8 -5
  13. package/dist/components/behaviors/iattachment.d.ts +9 -4
  14. package/dist/components/behaviors/idublincore.d.ts +10 -4
  15. package/dist/components/behaviors/iimageattachment.d.ts +9 -4
  16. package/dist/components/behaviors/imultiattachment.d.ts +11 -4
  17. package/dist/components/behaviors/imultiimageattachment.d.ts +11 -4
  18. package/dist/components/behaviors/imultiimageorderedattachment.d.ts +9 -4
  19. package/dist/components/behaviors/iworkflow.d.ts +1 -1
  20. package/dist/components/context_toolbar.d.ts +7 -5
  21. package/dist/components/error_boundary.d.ts +6 -4
  22. package/dist/components/error_zone.d.ts +16 -13
  23. package/dist/components/fields/downloadField.d.ts +11 -4
  24. package/dist/components/fields/editComponent.d.ts +14 -2
  25. package/dist/components/fields/editableField.d.ts +10 -8
  26. package/dist/components/fields/renderField.d.ts +31 -21
  27. package/dist/components/flash.d.ts +1 -1
  28. package/dist/components/guillotina.d.ts +12 -5
  29. package/dist/components/index.d.ts +54 -54
  30. package/dist/components/input/button.d.ts +12 -10
  31. package/dist/components/input/checkbox.d.ts +18 -17
  32. package/dist/components/input/dropdown.d.ts +15 -10
  33. package/dist/components/input/email.d.ts +9 -5
  34. package/dist/components/input/form.d.ts +13 -20
  35. package/dist/components/input/form_builder.d.ts +15 -12
  36. package/dist/components/input/index.d.ts +11 -1
  37. package/dist/components/input/input.d.ts +26 -1
  38. package/dist/components/input/input_list.d.ts +9 -2
  39. package/dist/components/input/password.d.ts +8 -4
  40. package/dist/components/input/search_input.d.ts +21 -36
  41. package/dist/components/input/search_input_list.d.ts +21 -35
  42. package/dist/components/input/select.d.ts +25 -1
  43. package/dist/components/input/select_vocabulary.d.ts +15 -1
  44. package/dist/components/input/textarea.d.ts +15 -1
  45. package/dist/components/input/upload.d.ts +9 -5
  46. package/dist/components/item.d.ts +23 -13
  47. package/dist/components/layout.d.ts +9 -5
  48. package/dist/components/login.d.ts +10 -7
  49. package/dist/components/modal.d.ts +24 -14
  50. package/dist/components/notallowed.d.ts +1 -1
  51. package/dist/components/notfound.d.ts +1 -1
  52. package/dist/components/pagination.d.ts +8 -6
  53. package/dist/components/panel/actions.d.ts +1 -1
  54. package/dist/components/panel/addons.d.ts +1 -1
  55. package/dist/components/panel/behaviors.d.ts +1 -1
  56. package/dist/components/panel/index.d.ts +4 -1
  57. package/dist/components/panel/items.d.ts +1 -1
  58. package/dist/components/panel/permissions.d.ts +7 -5
  59. package/dist/components/panel/permissions_prinperm.d.ts +17 -6
  60. package/dist/components/panel/permissions_prinrole.d.ts +17 -6
  61. package/dist/components/panel/permissions_roleperm.d.ts +17 -6
  62. package/dist/components/panel/properties.d.ts +1 -1
  63. package/dist/components/path.d.ts +1 -1
  64. package/dist/components/properties_view.d.ts +7 -2
  65. package/dist/components/search_labels.d.ts +5 -1
  66. package/dist/components/search_options_labels.d.ts +9 -1
  67. package/dist/components/search_vocabulary_labels.d.ts +6 -1
  68. package/dist/components/selected_items_actions.d.ts +17 -12
  69. package/dist/components/tabs.d.ts +10 -11
  70. package/dist/components/ui/delete.d.ts +8 -5
  71. package/dist/components/ui/icon.d.ts +7 -5
  72. package/dist/components/ui/index.d.ts +6 -6
  73. package/dist/components/ui/loading.d.ts +6 -3
  74. package/dist/components/ui/notification.d.ts +7 -4
  75. package/dist/components/ui/table.d.ts +8 -5
  76. package/dist/components/ui/tag.d.ts +9 -7
  77. package/dist/components/widgets/index.d.ts +1 -1
  78. package/dist/components/widgets/tags.d.ts +10 -8
  79. package/dist/contexts/index.d.ts +54 -13
  80. package/dist/forms/base.d.ts +12 -7
  81. package/dist/forms/required_fields.d.ts +12 -8
  82. package/dist/forms/users.d.ts +13 -5
  83. package/dist/hooks/useClickAway.d.ts +1 -1
  84. package/dist/hooks/useConfig.d.ts +17 -17
  85. package/dist/hooks/useCrudContext.d.ts +20 -1
  86. package/dist/hooks/useInput.d.ts +10 -7
  87. package/dist/hooks/useLocation.d.ts +2 -1
  88. package/dist/hooks/useMountedState.d.ts +1 -1
  89. package/dist/hooks/useRegistry.d.ts +61 -106
  90. package/dist/hooks/useRemoteField.d.ts +2 -1
  91. package/dist/hooks/useSetState.d.ts +1 -1
  92. package/dist/hooks/useVocabulary.d.ts +8 -1
  93. package/dist/index.d.ts +29 -29
  94. package/dist/lib/auth.d.ts +31 -31
  95. package/dist/lib/client.d.ts +59 -57
  96. package/dist/lib/helpers.d.ts +24 -24
  97. package/dist/lib/rest.d.ts +23 -22
  98. package/dist/lib/search.d.ts +2 -2
  99. package/dist/lib/search.test.d.ts +1 -1
  100. package/dist/lib/utils.d.ts +4 -3
  101. package/dist/lib/validators.d.ts +12 -12
  102. package/dist/locales/generic_messages.d.ts +370 -370
  103. package/dist/models/index.d.ts +17 -17
  104. package/dist/models/sharing.d.ts +12 -9
  105. package/dist/react-gmi.esm.js +3865 -3278
  106. package/dist/react-gmi.esm.js.map +1 -1
  107. package/dist/react-gmi.js +3864 -3276
  108. package/dist/react-gmi.js.map +1 -1
  109. package/dist/react-gmi.modern.js +3627 -3129
  110. package/dist/react-gmi.modern.js.map +1 -1
  111. package/dist/react-gmi.umd.js +3867 -3280
  112. package/dist/react-gmi.umd.js.map +1 -1
  113. package/dist/reducers/guillotina.d.ts +29 -19
  114. package/dist/setupTests.d.ts +1 -1
  115. package/dist/types/global.d.ts +8 -0
  116. package/dist/types/guillotina.d.ts +121 -0
  117. package/dist/views/application.d.ts +13 -17
  118. package/dist/views/base.d.ts +5 -1
  119. package/dist/views/container.d.ts +1 -1
  120. package/dist/views/folder.d.ts +1 -1
  121. package/dist/views/groups.d.ts +3 -3
  122. package/dist/views/item.d.ts +1 -1
  123. package/dist/views/users.d.ts +3 -3
  124. package/package.json +13 -6
  125. package/dist/hooks/useAsync.d.ts +0 -3
  126. package/dist/hooks/useAsyncFn.d.ts +0 -5
@@ -1,12 +1,17 @@
1
- export function ItemsActionsProvider({ items, children }: {
2
- items: any;
3
- children: any;
4
- }): JSX.Element;
5
- export function AllItemsCheckbox({ dataTest }: {
6
- dataTest: any;
7
- }): JSX.Element;
8
- export function ItemCheckbox({ item, dataTest }: {
9
- item: any;
10
- dataTest: any;
11
- }): JSX.Element;
12
- export function ItemsActionsDropdown(): JSX.Element;
1
+ /// <reference types="react" />
2
+ import { SearchItem } from '../types/guillotina';
3
+ interface PropsItemsActionsProvider {
4
+ items: SearchItem[];
5
+ children: React.ReactNode;
6
+ }
7
+ export declare function ItemsActionsProvider({ items, children, }: PropsItemsActionsProvider): import("react/jsx-runtime").JSX.Element;
8
+ export declare function AllItemsCheckbox({ dataTest }: {
9
+ dataTest?: string;
10
+ }): import("react/jsx-runtime").JSX.Element;
11
+ interface PropsItemCheckbox {
12
+ item: SearchItem;
13
+ dataTest?: string;
14
+ }
15
+ export declare function ItemCheckbox({ item, dataTest }: PropsItemCheckbox): import("react/jsx-runtime").JSX.Element;
16
+ export declare function ItemsActionsDropdown(): import("react/jsx-runtime").JSX.Element;
17
+ export {};
@@ -1,11 +1,10 @@
1
- export function TabsPanel({ tabs, currentTab, rightToolbar, fallback, ...props }: {
2
- [x: string]: any;
3
- tabs: any;
4
- currentTab: any;
5
- rightToolbar: any;
6
- fallback?: typeof FallbackTab;
7
- }): JSX.Element;
8
- declare function FallbackTab({ title }: {
9
- title: any;
10
- }): JSX.Element;
11
- export {};
1
+ import React from 'react';
2
+ import { IndexSignature } from '../types/global';
3
+ interface Props {
4
+ tabs: IndexSignature;
5
+ currentTab?: string;
6
+ rightToolbar?: React.ReactNode;
7
+ fallback?: React.ComponentType;
8
+ }
9
+ export declare function TabsPanel({ tabs, currentTab, rightToolbar, fallback, }: Props): import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -1,5 +1,8 @@
1
- export function Delete({ onClick, className, children }: {
2
- onClick: any;
3
- className: any;
4
- children: any;
5
- }): JSX.Element;
1
+ import { MouseEvent } from 'react';
2
+ interface Props {
3
+ onClick: (event: MouseEvent<HTMLButtonElement>) => void;
4
+ className?: string;
5
+ children?: React.ReactNode;
6
+ }
7
+ export declare function Delete({ onClick, className, children }: Props): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -1,5 +1,7 @@
1
- export function Icon({ icon, className, align }: {
2
- icon: any;
3
- className: any;
4
- align: any;
5
- }): JSX.Element;
1
+ interface Props {
2
+ icon: string;
3
+ className?: string;
4
+ align?: string;
5
+ }
6
+ export declare const Icon: ({ icon, className, align }: Props) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -1,6 +1,6 @@
1
- export * from "./icon";
2
- export * from "./loading";
3
- export * from "./tag";
4
- export * from "./delete";
5
- export * from "./table";
6
- export * from "./notification";
1
+ export * from './icon';
2
+ export * from './loading';
3
+ export * from './tag';
4
+ export * from './delete';
5
+ export * from './table';
6
+ export * from './notification';
@@ -1,3 +1,6 @@
1
- export function Loading({ ...rest }: {
2
- [x: string]: any;
3
- }): JSX.Element;
1
+ import { IndexSignature } from '../../types/global';
2
+ interface Props {
3
+ style?: IndexSignature;
4
+ }
5
+ export declare const Loading: ({ style }: Props) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -1,4 +1,7 @@
1
- export function Notification({ isColor, children }: {
2
- isColor?: string;
3
- children: any;
4
- }): JSX.Element;
1
+ /// <reference types="react" />
2
+ interface Props {
3
+ isColor?: string;
4
+ children: React.ReactNode;
5
+ }
6
+ export declare function Notification({ isColor, children }: Props): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -1,5 +1,8 @@
1
- export function Table({ headers, children, className }: {
2
- headers: any;
3
- children: any;
4
- className: any;
5
- }): JSX.Element;
1
+ /// <reference types="react" />
2
+ interface Props {
3
+ headers?: string[];
4
+ className?: string;
5
+ children: React.ReactNode;
6
+ }
7
+ export declare function Table({ headers, children, className }: Props): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -1,7 +1,9 @@
1
- export function Tag({ name, id, onRemove, size, color, }: {
2
- name: any;
3
- id: any;
4
- onRemove: any;
5
- size?: string;
6
- color?: string;
7
- }): JSX.Element;
1
+ interface Props {
2
+ name: string;
3
+ id: string;
4
+ onRemove?: () => void;
5
+ size?: string;
6
+ color?: string;
7
+ }
8
+ export declare const Tag: ({ name, id, onRemove, size, color, }: Props) => import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -1 +1 @@
1
- export * from "./tags";
1
+ export * from './tags';
@@ -1,8 +1,10 @@
1
- export function TagsWidget({ items, available, title, noData, onChange, loading, }: {
2
- items: any;
3
- available: any;
4
- title: any;
5
- noData: any;
6
- onChange: any;
7
- loading: any;
8
- }): JSX.Element;
1
+ interface Props {
2
+ items: string[];
3
+ available?: string[];
4
+ title: string;
5
+ noData: string;
6
+ onChange: (items: string[]) => void;
7
+ loading?: boolean;
8
+ }
9
+ export declare function TagsWidget({ items, available, title, noData, onChange, loading, }: Props): import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -1,13 +1,54 @@
1
- export function TraversalProvider({ children, ...props }: {
2
- [x: string]: any;
3
- children: any;
4
- }): JSX.Element;
5
- export function useTraversal(): any;
6
- export function ClientProvider({ children, client }: {
7
- children: any;
8
- client: any;
9
- }): JSX.Element;
10
- export function useGuillotinaClient(): any;
11
- export const AuthContext: import("react").Context<{}>;
12
- export const ClientContext: import("react").Context<{}>;
13
- export const TraversalContext: import("react").Context<{}>;
1
+ import { Dispatch } from 'react';
2
+ import { GuillotinaClient } from '../lib/client.js';
3
+ import { Auth } from '../lib/auth.js';
4
+ import { IndexSignature } from '../types/global';
5
+ import { GuillotinaGlobalState } from '../reducers/guillotina';
6
+ export declare const AuthContext: import("react").Context<{}>;
7
+ export declare const ClientContext: import("react").Context<GuillotinaClient>;
8
+ interface PropsTraversal {
9
+ client: GuillotinaClient;
10
+ auth: Auth;
11
+ state: GuillotinaGlobalState;
12
+ dispatch: Dispatch<{
13
+ type: string;
14
+ payload: IndexSignature;
15
+ }>;
16
+ registry: IndexSignature;
17
+ flash: (action: string, result: string) => void;
18
+ url: string;
19
+ }
20
+ export declare class Traversal {
21
+ private dispatch;
22
+ state: any;
23
+ client: any;
24
+ registry: any;
25
+ url: any;
26
+ auth: any;
27
+ constructor({ flash, ...props }: PropsTraversal);
28
+ refresh({ transparent }?: {
29
+ transparent?: boolean;
30
+ }): void;
31
+ get path(): any;
32
+ get pathPrefix(): any;
33
+ get context(): any;
34
+ get containerPath(): any;
35
+ apply(data: any): void;
36
+ flash(message: any, type: any): void;
37
+ clearFlash(): void;
38
+ doAction(action: any, params?: {}): void;
39
+ cancelAction(): void;
40
+ hasPerm(permission: any): boolean;
41
+ filterTabs(tabs: any, tabsPermissions: any): {};
42
+ }
43
+ export declare const TraversalContext: import("react").Context<Traversal>;
44
+ export declare function TraversalProvider({ children, ...props }: PropsTraversal & {
45
+ children: React.ReactNode;
46
+ }): import("react/jsx-runtime").JSX.Element;
47
+ export declare function useTraversal(): Traversal;
48
+ interface PropsClient {
49
+ children: React.ReactNode;
50
+ client: GuillotinaClient;
51
+ }
52
+ export declare function ClientProvider({ children, client }: PropsClient): import("react/jsx-runtime").JSX.Element;
53
+ export declare function useGuillotinaClient(): GuillotinaClient;
54
+ export {};
@@ -1,7 +1,12 @@
1
- export function BaseForm({ onSubmit, actionName, title, dataTest, loading }: {
2
- onSubmit: any;
3
- actionName: any;
4
- title: any;
5
- dataTest: any;
6
- loading: any;
7
- }): JSX.Element;
1
+ interface Props {
2
+ onSubmit: (data: {
3
+ title: string;
4
+ id: string;
5
+ }) => void;
6
+ actionName?: string;
7
+ title?: string;
8
+ dataTest?: string;
9
+ loading?: boolean;
10
+ }
11
+ export declare function BaseForm({ onSubmit, actionName, title, dataTest, loading, }: Props): import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -1,8 +1,12 @@
1
- export function RequiredFieldsForm({ loading, onSubmit, actionName, title, dataTest, type, }: {
2
- loading: any;
3
- onSubmit: any;
4
- actionName: any;
5
- title: any;
6
- dataTest: any;
7
- type: any;
8
- }): JSX.Element;
1
+ interface Props {
2
+ onSubmit: (data: {
3
+ [key: string]: any;
4
+ }) => void;
5
+ actionName?: string;
6
+ title?: string;
7
+ dataTest?: string;
8
+ loading?: boolean;
9
+ type: string;
10
+ }
11
+ export declare function RequiredFieldsForm({ loading, onSubmit, actionName, title, dataTest, type, }: Props): import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -1,5 +1,13 @@
1
- export function UserForm({ isEdit, children, ...props }: {
2
- [x: string]: any;
3
- isEdit?: boolean;
4
- children: any;
5
- }): JSX.Element;
1
+ /// <reference types="react" />
2
+ import { IndexSignature } from '../types/global';
3
+ interface Props {
4
+ children: React.ReactNode;
5
+ onSubmit: (data: IndexSignature) => void;
6
+ actionName?: string;
7
+ formData?: IndexSignature;
8
+ exclude?: string[];
9
+ remotes?: IndexSignature;
10
+ submitButton?: boolean;
11
+ }
12
+ export declare const UserForm: ({ children, actionName, onSubmit, formData, exclude, remotes, submitButton, }: Props) => import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -1 +1 @@
1
- export default function useClickAway(ref: any, onClickAway: any, events?: string[]): void;
1
+ export default function useClickAway(ref: any, onClickAway: any, events?: string[]): void;
@@ -1,17 +1,17 @@
1
- export function useConfig(cfg: any): {
2
- DisabledTypes: string[];
3
- PageSize: number;
4
- DelayActions: number;
5
- Permissions: string[];
6
- SearchEngine: string;
7
- fieldHaveDeleteButton: (schema: any) => boolean;
8
- };
9
- export const Permissions: string[];
10
- export namespace Config {
11
- export const DisabledTypes: string[];
12
- export const PageSize: number;
13
- export const DelayActions: number;
14
- export { Permissions };
15
- export const SearchEngine: string;
16
- export function fieldHaveDeleteButton(schema: any): boolean;
17
- }
1
+ import { GuillotinaSchemaProperty } from '../types/guillotina';
2
+ export declare const Permissions: string[];
3
+ interface IConfig {
4
+ DisabledTypes: string[];
5
+ PageSize: number;
6
+ DelayActions: number;
7
+ Permissions: string[];
8
+ SearchEngine: string;
9
+ SizeImages?: string[];
10
+ icons?: string[];
11
+ properties_default?: string[];
12
+ properties_ignore_fields?: string[];
13
+ fieldHaveDeleteButton: (schema: GuillotinaSchemaProperty) => boolean;
14
+ }
15
+ export declare const Config: IConfig;
16
+ export declare function useConfig(cfg?: {}): IConfig;
17
+ export {};
@@ -1 +1,20 @@
1
- export function useCrudContext(): any;
1
+ interface State<T = unknown> {
2
+ loading?: boolean;
3
+ isError?: boolean;
4
+ errorMessage?: string;
5
+ result?: T;
6
+ response?: unknown;
7
+ }
8
+ export declare function useCrudContext<T>(): {
9
+ Ctx: import("../contexts").Traversal;
10
+ patch: (data: any, endpoint?: any, body?: boolean) => Promise<State<unknown>>;
11
+ del: (data?: {}, endpoint?: any, body?: boolean) => Promise<State<unknown>>;
12
+ post: (data: any, endpoint?: any, body?: boolean) => Promise<State<unknown>>;
13
+ get: (endpoint?: any) => Promise<State<unknown>>;
14
+ loading?: boolean;
15
+ isError?: boolean;
16
+ errorMessage?: string;
17
+ result?: T;
18
+ response?: unknown;
19
+ };
20
+ export {};
@@ -1,7 +1,10 @@
1
- export default useInput;
2
- declare function useInput(onChange: any, value: any, validator: any): {
3
- onChange: (ev: any) => void;
4
- onFocus: () => void;
5
- onBlur: () => void;
6
- state: any;
7
- };
1
+ declare const useInput: (onChange: any, value: any, validator: any) => {
2
+ onChange: (ev: any) => void;
3
+ onFocus: () => void;
4
+ onBlur: () => void;
5
+ state: {
6
+ hasError: boolean;
7
+ value: any;
8
+ };
9
+ };
10
+ export default useInput;
@@ -1 +1,2 @@
1
- export function useLocation(): (URLSearchParams | ((to: any, replace: any) => void))[];
1
+ import { IndexSignature } from '../types/global';
2
+ export declare const useLocation: () => [URLSearchParams, (to: IndexSignature, replace?: boolean) => void, (param: string) => void];
@@ -1 +1 @@
1
- export default function useMountedState(): () => boolean;
1
+ export default function useMountedState(): () => boolean;
@@ -1,106 +1,61 @@
1
- export function useRegistry(data: any): {
2
- registry: {
3
- paths: {};
4
- views: {
5
- ErrorBoundary: import("react-intl/node_modules/@types/react").FC<import("react-intl").WithIntlProps<import("react-intl").WrappedComponentProps<any>>> & {
6
- WrappedComponent: import("react-intl/node_modules/@types/react").ComponentType<import("react-intl").WrappedComponentProps<any>>;
7
- };
8
- NotAllowed: typeof NotAllowed;
9
- NotFound: typeof NotFound;
10
- Application: typeof ApplicationCtx;
11
- Database: typeof DatabaseCtx;
12
- Container: typeof ContainerCtx;
13
- UserManager: typeof UsersCtx;
14
- User: typeof UserCtx;
15
- Group: typeof GroupCtx;
16
- GroupManager: typeof GroupsCtx;
17
- Folder: typeof FolderCtx;
18
- Item: typeof ItemCtx;
19
- };
20
- actions: {
21
- addItem: typeof AddItem;
22
- copyItems: typeof CopyItems;
23
- copyItem: typeof CopyItem;
24
- moveItems: typeof MoveItems;
25
- moveItem: typeof MoveItem;
26
- removeItems: typeof RemoveItems;
27
- changePassword: typeof ChangePassword;
28
- removeItem: typeof RemoveItem;
29
- };
30
- forms: {
31
- UserManager: typeof BaseForm;
32
- GroupManager: typeof BaseForm;
33
- Folder: typeof BaseForm;
34
- Item: typeof BaseForm;
35
- User: ({ isEdit, children, ...props }: {
36
- [x: string]: any;
37
- isEdit?: boolean;
38
- children: any;
39
- }) => JSX.Element;
40
- Group: typeof BaseForm;
41
- };
42
- behaviors: {
43
- 'guillotina.behaviors.dublincore.IDublinCore': typeof IDublinCore;
44
- 'guillotina.behaviors.attachment.IAttachment': typeof IAttachment;
45
- 'guillotina.behaviors.attachment.IMultiAttachment': typeof IMultiAttachment;
46
- 'guillotina.contrib.image.behaviors.IImageAttachment': typeof IImageAttachment;
47
- 'guillotina.contrib.image.behaviors.IMultiImageAttachment': typeof IMultiImageAttachment;
48
- 'guillotina.contrib.image.behaviors.IMultiImageOrderedAttachment': typeof IMultiImageOrderedAttachment;
49
- 'guillotina.contrib.workflows.interfaces.IWorkflowBehavior': typeof IWorkflow;
50
- };
51
- itemsColumn: {};
52
- schemas: {};
53
- properties: {};
54
- components: {
55
- Path: typeof Path;
56
- EditComponent: any;
57
- RenderFieldComponent: typeof RenderFieldComponent;
58
- };
59
- searchEngineQueryParamsFunction: {
60
- PostreSQL: string;
61
- Elasticsearch: string;
62
- };
63
- fieldsToFilter: {
64
- UserManager: string[];
65
- };
66
- };
67
- get: (key: any, param: any, fallback: any) => any;
68
- getForm: (type: any, fallback?: typeof BaseForm) => any;
69
- getComponent: (context: any, path: any, fallback: any) => any;
70
- getAction: (type: any, fallback: any) => any;
71
- getBehavior: (type: any, fallback: any) => any;
72
- getProperties: (type: any) => any;
73
- getItemsColumn: (type: any) => any;
74
- getFieldsToFilter: (type: any, fallback: any) => any;
75
- getSchemas: (type: any) => any;
76
- };
77
- export function defaultComponent(context: any): typeof FolderCtx;
78
- import { NotAllowed } from "../components/notallowed";
79
- import { NotFound } from "../components/notfound";
80
- import { ApplicationCtx } from "../views/application";
81
- import { DatabaseCtx } from "../views/application";
82
- import { ContainerCtx } from "../views/container";
83
- import { UsersCtx } from "../views/users";
84
- import { UserCtx } from "../views/users";
85
- import { GroupCtx } from "../views/groups";
86
- import { GroupsCtx } from "../views/groups";
87
- import { FolderCtx } from "../views/folder";
88
- import { ItemCtx } from "../views/item";
89
- import { AddItem } from "../actions/add_item";
90
- import { CopyItems } from "../actions/copy_items";
91
- import { CopyItem } from "../actions/copy_item";
92
- import { MoveItems } from "../actions/move_items";
93
- import { MoveItem } from "../actions/move_item";
94
- import { RemoveItems } from "../actions/remove_items";
95
- import { ChangePassword } from "../actions/change_pass";
96
- import { RemoveItem } from "../actions/remove_item";
97
- import { BaseForm } from "../forms/base";
98
- import { IDublinCore } from "../components/behaviors/idublincore";
99
- import { IAttachment } from "../components/behaviors/iattachment";
100
- import { IMultiAttachment } from "../components/behaviors/imultiattachment";
101
- import { IImageAttachment } from "../components/behaviors/iimageattachment";
102
- import { IMultiImageAttachment } from "../components/behaviors/imultiimageattachment";
103
- import { IMultiImageOrderedAttachment } from "../components/behaviors/imultiimageorderedattachment";
104
- import { IWorkflow } from "../components/behaviors/iworkflow";
105
- import { Path } from "../components/path";
106
- import { RenderFieldComponent } from "../components/fields/renderField";
1
+ import { FolderCtx } from '../views/folder';
2
+ import React from 'react';
3
+ import { GuillotinaSchema } from '../types/guillotina';
4
+ export interface IRegistry {
5
+ paths: {
6
+ [key: string]: React.FC;
7
+ };
8
+ views: {
9
+ [key: string]: React.FC | React.ComponentType;
10
+ };
11
+ actions: {
12
+ [key: string]: React.FC;
13
+ };
14
+ forms: {
15
+ [key: string]: React.FC;
16
+ };
17
+ behaviors: {
18
+ [key: string]: React.FC;
19
+ };
20
+ itemsColumn: {
21
+ [key: string]: () => {
22
+ label: string;
23
+ key: string;
24
+ isSortable?: boolean;
25
+ child: React.ReactNode;
26
+ }[];
27
+ };
28
+ schemas: {
29
+ [key: string]: GuillotinaSchema;
30
+ };
31
+ properties: {
32
+ [key: string]: React.FC;
33
+ };
34
+ components: {
35
+ [key: string]: React.FC;
36
+ };
37
+ searchEngineQueryParamsFunction: {
38
+ [key: string]: string;
39
+ };
40
+ fieldsToFilter: {
41
+ [key: string]: string[];
42
+ };
43
+ }
44
+ export declare const defaultComponent: (context: any) => typeof FolderCtx;
45
+ export declare function useRegistry(data: any): {
46
+ registry: IRegistry;
47
+ get: (key: any, param: any, fallback?: any) => any;
48
+ getForm: (type: string, fallback?: React.FC<{}>) => React.FC<{}>;
49
+ getComponent: (context: any, path: any, fallback?: any) => any;
50
+ getAction: (type: string, fallback?: React.FC<{}>) => React.FC<{}>;
51
+ getBehavior: (type: string, fallback: React.FC<{}>) => React.FC<{}>;
52
+ getProperties: (type: string) => {};
53
+ getItemsColumn: (type: any) => {
54
+ label: string;
55
+ key: string;
56
+ isSortable?: boolean;
57
+ child: React.ReactNode;
58
+ }[];
59
+ getFieldsToFilter: (type: string, fallback: any) => any;
60
+ getSchemas: (type: string) => {};
61
+ };
@@ -1 +1,2 @@
1
- export function useRemoteField(initial: any): any[];
1
+ import { IndexSignature } from '../types/global';
2
+ export declare const useRemoteField: (initial: IndexSignature<string[]>) => [IndexSignature<string[]>, (name: string) => (value: string[]) => void];
@@ -1 +1 @@
1
- export default function useSetState(initialState: any): any[];
1
+ export default function useSetState<T>(initialState: any): [T, (value: Partial<T>) => void];
@@ -1 +1,8 @@
1
- export function useVocabulary(vocabularyName: any, path: any): any;
1
+ import { GuillotinaVocabulary } from '../types/guillotina';
2
+ interface State {
3
+ data: GuillotinaVocabulary;
4
+ loading: boolean;
5
+ error: any;
6
+ }
7
+ export declare function useVocabulary(vocabularyName: string, path?: string): State;
8
+ export {};