@guillotinaweb/react-gmi 0.26.0 → 0.28.0

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 +3855 -3280
  106. package/dist/react-gmi.esm.js.map +1 -1
  107. package/dist/react-gmi.js +3854 -3278
  108. package/dist/react-gmi.js.map +1 -1
  109. package/dist/react-gmi.modern.js +3622 -3132
  110. package/dist/react-gmi.modern.js.map +1 -1
  111. package/dist/react-gmi.umd.js +3857 -3282
  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
package/dist/index.d.ts CHANGED
@@ -1,29 +1,29 @@
1
- export * from "./actions";
2
- export * from "./components";
3
- export * from "./contexts";
4
- export * from "./forms/base";
5
- export * from "./forms/users";
6
- export * from "./forms/required_fields";
7
- export * from "./hooks/useConfig";
8
- export * from "./hooks/useCrudContext";
9
- export * from "./hooks/useInput";
10
- export * from "./hooks/useRemoteField";
11
- export * from "./hooks/useLocation";
12
- export * from "./hooks/useRegistry";
13
- export * from "./hooks/useVocabulary";
14
- export * from "./lib/helpers";
15
- export * from "./lib/validators";
16
- export * from "./lib/utils";
17
- export * from "./lib/client";
18
- export * from "./lib/auth";
19
- export * from "./lib/rest";
20
- export * from "./lib/search";
21
- export * from "./models";
22
- export * from "./views/base";
23
- export * from "./views/application";
24
- export * from "./views/container";
25
- export * from "./views/folder";
26
- export * from "./views/item";
27
- export * from "./views/users";
28
- export * from "./views/groups";
29
- export * from "./locales/generic_messages";
1
+ export * from './actions';
2
+ export * from './components';
3
+ export * from './contexts';
4
+ export * from './forms/base';
5
+ export * from './forms/users';
6
+ export * from './forms/required_fields';
7
+ export * from './hooks/useConfig';
8
+ export * from './hooks/useCrudContext';
9
+ export * from './hooks/useInput';
10
+ export * from './hooks/useRemoteField';
11
+ export * from './hooks/useLocation';
12
+ export * from './hooks/useRegistry';
13
+ export * from './hooks/useVocabulary';
14
+ export * from './lib/helpers';
15
+ export * from './lib/validators';
16
+ export * from './lib/utils';
17
+ export * from './lib/client';
18
+ export * from './lib/auth';
19
+ export * from './lib/rest';
20
+ export * from './lib/search';
21
+ export * from './models';
22
+ export * from './views/base';
23
+ export * from './views/application';
24
+ export * from './views/container';
25
+ export * from './views/folder';
26
+ export * from './views/item';
27
+ export * from './views/users';
28
+ export * from './views/groups';
29
+ export * from './locales/generic_messages';
@@ -1,31 +1,31 @@
1
- export class Auth {
2
- constructor(url: any);
3
- maxRetry: number;
4
- retryRefresh: number;
5
- events: {};
6
- url: any;
7
- base_url: any;
8
- errors: string;
9
- getUrl(endpoint: any): string;
10
- setAccount(account: any): void;
11
- login(username: any, password: any): Promise<boolean>;
12
- get isLogged(): boolean;
13
- get username(): any;
14
- storeAuth(data: any): void;
15
- cleanAuth(): void;
16
- logout(): void;
17
- refreshToken(): Promise<any>;
18
- willExpire(expiration: any): boolean;
19
- isExpired(expiration: any): boolean;
20
- _getToken(): string[];
21
- getToken(): string;
22
- getHeaders(): {
23
- Accept?: undefined;
24
- 'Content-Type'?: undefined;
25
- Authorization?: undefined;
26
- } | {
27
- Accept: string;
28
- 'Content-Type': string;
29
- Authorization: string;
30
- };
31
- }
1
+ export declare class Auth {
2
+ maxRetry: number;
3
+ retryRefresh: number;
4
+ events: {};
5
+ url: string;
6
+ base_url: string;
7
+ errors: string;
8
+ constructor(url: any);
9
+ getUrl(endpoint: any): string;
10
+ setAccount(account: any): void;
11
+ login(username: any, password: any): Promise<boolean>;
12
+ get isLogged(): boolean;
13
+ get username(): any;
14
+ storeAuth(data: any): void;
15
+ cleanAuth(): void;
16
+ logout(): void;
17
+ refreshToken(): Promise<any>;
18
+ willExpire(expiration: any): boolean;
19
+ isExpired(expiration: any): boolean;
20
+ _getToken(): string[];
21
+ getToken(): string;
22
+ getHeaders(): {
23
+ Accept?: undefined;
24
+ 'Content-Type'?: undefined;
25
+ Authorization?: undefined;
26
+ } | {
27
+ Accept: string;
28
+ 'Content-Type': string;
29
+ Authorization: string;
30
+ };
31
+ }
@@ -1,57 +1,59 @@
1
- export function getClient(url: any, container: any, auth: any): GuillotinaClient;
2
- export class GuillotinaClient {
3
- constructor(rest: any, pathContainsContainer: any);
4
- rest: any;
5
- pathContainsContainer: any;
6
- getContainerFromPath: (path: any) => string;
7
- clearContainerFromPath: (path: any) => any;
8
- getContext(path: any): Promise<any>;
9
- get(path: any, fetchData: any): Promise<any>;
10
- getQueryParamsPostresql({ start, pageSize, withDepth }: {
11
- start?: number;
12
- pageSize?: number;
13
- withDepth?: boolean;
14
- }): any[];
15
- getQueryParamsElasticsearch({ start, pageSize, path, withDepth, }: {
16
- start?: number;
17
- pageSize?: number;
18
- path: any;
19
- withDepth?: boolean;
20
- }): any[];
21
- getItemsColumn(): ({
22
- label: string;
23
- isSortable: boolean;
24
- child: (m: any) => JSX.Element;
25
- key?: undefined;
26
- } | {
27
- label: string;
28
- key: string;
29
- isSortable: boolean;
30
- child: (m: any, navigate: any, search: any) => JSX.Element;
31
- })[];
32
- applyCompat(data: any): any;
33
- search(path: any, params: any, container?: boolean, prepare?: boolean, fetchData?: {}): Promise<any>;
34
- canido(path: any, permissions: any): Promise<any>;
35
- createObject(path: any, data: any): Promise<any>;
36
- cleanPath(path: any): string;
37
- delete(path: any, data: any): Promise<any>;
38
- create(path: any, data: any): Promise<any>;
39
- post(path: any, data: any): Promise<any>;
40
- patch(path: any, data: any): Promise<any>;
41
- upload(path: any, file: any): Promise<any>;
42
- download(path: any): Promise<any>;
43
- getTypeSchema(path: any, name: any): Promise<any>;
44
- getAddons(path: any): Promise<any>;
45
- installAddon(path: any, key: any): Promise<any>;
46
- removeAddon(path: any, key: any): Promise<any>;
47
- getGroups(path: any): Promise<any>;
48
- getUsers(path: any): Promise<any>;
49
- getPrincipals(path: any): Promise<{
50
- groups: any;
51
- users: any;
52
- }>;
53
- getRoles(path: any): Promise<any>;
54
- getAllPermissions(path: any): Promise<any[]>;
55
- getTypes(path: any): Promise<any>;
56
- }
57
- export function lightFileReader(file: any): Promise<any>;
1
+ import { RestClient } from './rest';
2
+ import { LightFile } from '../types/global';
3
+ export declare class GuillotinaClient {
4
+ rest: RestClient;
5
+ pathContainsContainer: boolean;
6
+ constructor(rest: RestClient, pathContainsContainer: boolean);
7
+ getContainerFromPath: (path: any) => string;
8
+ clearContainerFromPath: (path: any) => any;
9
+ getContext(path: any): Promise<Response>;
10
+ get(path: any): Promise<Response>;
11
+ getQueryParamsPostresql({ start, pageSize, withDepth }: {
12
+ start?: number;
13
+ pageSize?: number;
14
+ withDepth?: boolean;
15
+ }): any[];
16
+ getQueryParamsElasticsearch({ start, pageSize, path, withDepth, }: {
17
+ start?: number;
18
+ pageSize?: number;
19
+ path: any;
20
+ withDepth?: boolean;
21
+ }): any[];
22
+ getItemsColumn(): ({
23
+ label: string;
24
+ isSortable: boolean;
25
+ child: (m: any) => import("react/jsx-runtime").JSX.Element;
26
+ key?: undefined;
27
+ } | {
28
+ label: string;
29
+ key: string;
30
+ isSortable: boolean;
31
+ child: (m: any, navigate: any, search: any) => import("react/jsx-runtime").JSX.Element;
32
+ })[];
33
+ applyCompat(data: any): any;
34
+ search(path: string, params: string | string[][], container?: boolean, prepare?: boolean): Promise<any>;
35
+ canido(path: any, permissions: any): Promise<Response>;
36
+ createObject(path: any, data: any): Promise<Response>;
37
+ cleanPath(path: any): string;
38
+ delete(path: any, data: any): Promise<Response>;
39
+ create(path: any, data: any): Promise<Response>;
40
+ post(path: any, data: any): Promise<Response>;
41
+ patch(path: any, data: any): Promise<Response>;
42
+ upload(path: any, file: any): Promise<Response>;
43
+ download(path: any): Promise<Response>;
44
+ getTypeSchema(path: any, name: any): Promise<any>;
45
+ getAddons(path: any): Promise<Response>;
46
+ installAddon(path: any, key: any): Promise<Response>;
47
+ removeAddon(path: any, key: any): Promise<Response>;
48
+ getGroups(path: any): Promise<Response>;
49
+ getUsers(path: any): Promise<Response>;
50
+ getPrincipals(path: any): Promise<{
51
+ groups: any;
52
+ users: any;
53
+ }>;
54
+ getRoles(path: any): Promise<Response>;
55
+ getAllPermissions(path: any): Promise<any[]>;
56
+ getTypes(path: any): Promise<any>;
57
+ }
58
+ export declare function getClient(url: any, container: any, auth: any): GuillotinaClient;
59
+ export declare const lightFileReader: (file: any) => Promise<LightFile>;
@@ -1,24 +1,24 @@
1
- export function base64ToArrayBuffer(base64: any): Uint8Array;
2
- export function stringToSlug(str: any): any;
3
- export function sleep(ms: any): Promise<any>;
4
- export function classnames(classNames: any): any;
5
- export function noop(): void;
6
- export function generateUID(prefix: any): string;
7
- export function toQueryString(params: any): string;
8
- export function getActionsObject(intl: any, multiple?: boolean): {
9
- DELETE: {
10
- text: any;
11
- perms: string[];
12
- action: string;
13
- };
14
- MOVE: {
15
- text: any;
16
- perms: string[];
17
- action: string;
18
- };
19
- COPY: {
20
- text: any;
21
- perms: string[];
22
- action: string;
23
- };
24
- };
1
+ export declare const classnames: (classNames: any) => any;
2
+ export declare const noop: () => void;
3
+ export declare const generateUID: (prefix?: string) => string;
4
+ export declare const toQueryString: (params: string[][]) => string;
5
+ export declare function base64ToArrayBuffer(base64: any): Uint8Array;
6
+ export declare function stringToSlug(str: any): any;
7
+ export declare function sleep(ms: any): Promise<void>;
8
+ export declare const getActionsObject: (intl: any, multiple?: boolean) => {
9
+ DELETE: {
10
+ text: any;
11
+ perms: string[];
12
+ action: string;
13
+ };
14
+ MOVE: {
15
+ text: any;
16
+ perms: string[];
17
+ action: string;
18
+ };
19
+ COPY: {
20
+ text: any;
21
+ perms: string[];
22
+ action: string;
23
+ };
24
+ };
@@ -1,22 +1,23 @@
1
- export class RestClient {
2
- constructor(url: any, container: any, auth: any);
3
- auth: any;
4
- url: any;
5
- container: any;
6
- request(path: any, data: any, headers: any): Promise<Response>;
7
- getHeaders(): {
8
- Accept?: undefined;
9
- 'Content-Type'?: undefined;
10
- Authorization?: undefined;
11
- } | {
12
- Accept: string;
13
- 'Content-Type': string;
14
- Authorization: string;
15
- };
16
- post(path: any, data: any): Promise<Response>;
17
- get(path: any, fetchData: any): Promise<Response>;
18
- put(path: any, data: any): Promise<Response>;
19
- patch(path: any, data: any): Promise<Response>;
20
- upload(path: any, data: any): Promise<Response>;
21
- delete(path: any, data?: any): Promise<Response>;
22
- }
1
+ import { Auth } from './auth';
2
+ export declare class RestClient {
3
+ url: string;
4
+ container: string;
5
+ auth: Auth;
6
+ constructor(url: string, container: string, auth: Auth);
7
+ request(path: any, data?: any, headers?: any): Promise<Response>;
8
+ getHeaders(): {
9
+ Accept?: undefined;
10
+ 'Content-Type'?: undefined;
11
+ Authorization?: undefined;
12
+ } | {
13
+ Accept: string;
14
+ 'Content-Type': string;
15
+ Authorization: string;
16
+ };
17
+ post(path: any, data: any): Promise<Response>;
18
+ get(path: any): Promise<Response>;
19
+ put(path: any, data: any): Promise<Response>;
20
+ patch(path: any, data: any): Promise<Response>;
21
+ upload(path: any, data: any): Promise<Response>;
22
+ delete(path: any, data?: any): Promise<Response>;
23
+ }
@@ -1,2 +1,2 @@
1
- export function parser(qs: any, defaultField?: string): any;
2
- export function buildQs(parsedQuery: any): any;
1
+ export declare function parser(qs: string, defaultField?: string): string[][];
2
+ export declare function buildQs(parsedQuery: string[][]): string;
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,3 +1,4 @@
1
- export function getNewId(id?: string): any;
2
- export function formatDate(str: any): string;
3
- export function get(obj: any, path: any, defValue: any): any;
1
+ import { IndexSignature } from '../types/global';
2
+ export declare const formatDate: (str: string) => string;
3
+ export declare const get: <T>(obj: IndexSignature, path: string | string[], defValue: any) => T;
4
+ export declare function getNewId(id?: string): any;
@@ -1,12 +1,12 @@
1
- export const REGEX_EMAIL: RegExp;
2
- export const REGEX_URL: RegExp;
3
- export const REGEX_HEX_COLOR: RegExp;
4
- export const REGEX_NUMBER: RegExp;
5
- export function isEmpty(value?: string): boolean;
6
- export function maxLength(value?: string, limit?: number): boolean;
7
- export function minLength(value?: string, limit?: number): boolean;
8
- export function isEmail(value?: string): boolean;
9
- export function isURL(value?: string): boolean;
10
- export function isHexColor(value?: string): boolean;
11
- export function isNumber(value?: string): boolean;
12
- export function notEmpty(value: any): boolean;
1
+ export declare const REGEX_EMAIL: RegExp;
2
+ export declare const REGEX_URL: RegExp;
3
+ export declare const REGEX_HEX_COLOR: RegExp;
4
+ export declare const REGEX_NUMBER: RegExp;
5
+ export declare const isEmpty: (value?: string) => boolean;
6
+ export declare const maxLength: (value?: string, limit?: number) => boolean;
7
+ export declare const minLength: (value?: string, limit?: number) => boolean;
8
+ export declare const isEmail: (value?: string) => boolean;
9
+ export declare const isURL: (value?: string) => boolean;
10
+ export declare const isHexColor: (value?: string) => boolean;
11
+ export declare const isNumber: (value?: string) => boolean;
12
+ export declare const notEmpty: (value: any) => boolean;