@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.
- package/dist/actions/add_item.d.ts +5 -1
- package/dist/actions/change_pass.d.ts +1 -1
- package/dist/actions/copy_item.d.ts +6 -1
- package/dist/actions/copy_items.d.ts +6 -1
- package/dist/actions/index.d.ts +2 -2
- package/dist/actions/move_item.d.ts +6 -1
- package/dist/actions/move_items.d.ts +6 -1
- package/dist/actions/remove_item.d.ts +6 -1
- package/dist/actions/remove_items.d.ts +6 -1
- package/dist/components/Link.d.ts +10 -6
- package/dist/components/TdLink.d.ts +10 -5
- package/dist/components/behavior_view.d.ts +8 -5
- package/dist/components/behaviors/iattachment.d.ts +9 -4
- package/dist/components/behaviors/idublincore.d.ts +10 -4
- package/dist/components/behaviors/iimageattachment.d.ts +9 -4
- package/dist/components/behaviors/imultiattachment.d.ts +11 -4
- package/dist/components/behaviors/imultiimageattachment.d.ts +11 -4
- package/dist/components/behaviors/imultiimageorderedattachment.d.ts +9 -4
- package/dist/components/behaviors/iworkflow.d.ts +1 -1
- package/dist/components/context_toolbar.d.ts +7 -5
- package/dist/components/error_boundary.d.ts +6 -4
- package/dist/components/error_zone.d.ts +16 -13
- package/dist/components/fields/downloadField.d.ts +11 -4
- package/dist/components/fields/editComponent.d.ts +14 -2
- package/dist/components/fields/editableField.d.ts +10 -8
- package/dist/components/fields/renderField.d.ts +31 -21
- package/dist/components/flash.d.ts +1 -1
- package/dist/components/guillotina.d.ts +12 -5
- package/dist/components/index.d.ts +54 -54
- package/dist/components/input/button.d.ts +12 -10
- package/dist/components/input/checkbox.d.ts +18 -17
- package/dist/components/input/dropdown.d.ts +15 -10
- package/dist/components/input/email.d.ts +9 -5
- package/dist/components/input/form.d.ts +13 -20
- package/dist/components/input/form_builder.d.ts +15 -12
- package/dist/components/input/index.d.ts +11 -1
- package/dist/components/input/input.d.ts +26 -1
- package/dist/components/input/input_list.d.ts +9 -2
- package/dist/components/input/password.d.ts +8 -4
- package/dist/components/input/search_input.d.ts +21 -36
- package/dist/components/input/search_input_list.d.ts +21 -35
- package/dist/components/input/select.d.ts +25 -1
- package/dist/components/input/select_vocabulary.d.ts +15 -1
- package/dist/components/input/textarea.d.ts +15 -1
- package/dist/components/input/upload.d.ts +9 -5
- package/dist/components/item.d.ts +23 -13
- package/dist/components/layout.d.ts +9 -5
- package/dist/components/login.d.ts +10 -7
- package/dist/components/modal.d.ts +24 -14
- package/dist/components/notallowed.d.ts +1 -1
- package/dist/components/notfound.d.ts +1 -1
- package/dist/components/pagination.d.ts +8 -6
- package/dist/components/panel/actions.d.ts +1 -1
- package/dist/components/panel/addons.d.ts +1 -1
- package/dist/components/panel/behaviors.d.ts +1 -1
- package/dist/components/panel/index.d.ts +4 -1
- package/dist/components/panel/items.d.ts +1 -1
- package/dist/components/panel/permissions.d.ts +7 -5
- package/dist/components/panel/permissions_prinperm.d.ts +17 -6
- package/dist/components/panel/permissions_prinrole.d.ts +17 -6
- package/dist/components/panel/permissions_roleperm.d.ts +17 -6
- package/dist/components/panel/properties.d.ts +1 -1
- package/dist/components/path.d.ts +1 -1
- package/dist/components/properties_view.d.ts +7 -2
- package/dist/components/search_labels.d.ts +5 -1
- package/dist/components/search_options_labels.d.ts +9 -1
- package/dist/components/search_vocabulary_labels.d.ts +6 -1
- package/dist/components/selected_items_actions.d.ts +17 -12
- package/dist/components/tabs.d.ts +10 -11
- package/dist/components/ui/delete.d.ts +8 -5
- package/dist/components/ui/icon.d.ts +7 -5
- package/dist/components/ui/index.d.ts +6 -6
- package/dist/components/ui/loading.d.ts +6 -3
- package/dist/components/ui/notification.d.ts +7 -4
- package/dist/components/ui/table.d.ts +8 -5
- package/dist/components/ui/tag.d.ts +9 -7
- package/dist/components/widgets/index.d.ts +1 -1
- package/dist/components/widgets/tags.d.ts +10 -8
- package/dist/contexts/index.d.ts +54 -13
- package/dist/forms/base.d.ts +12 -7
- package/dist/forms/required_fields.d.ts +12 -8
- package/dist/forms/users.d.ts +13 -5
- package/dist/hooks/useClickAway.d.ts +1 -1
- package/dist/hooks/useConfig.d.ts +17 -17
- package/dist/hooks/useCrudContext.d.ts +20 -1
- package/dist/hooks/useInput.d.ts +10 -7
- package/dist/hooks/useLocation.d.ts +2 -1
- package/dist/hooks/useMountedState.d.ts +1 -1
- package/dist/hooks/useRegistry.d.ts +61 -106
- package/dist/hooks/useRemoteField.d.ts +2 -1
- package/dist/hooks/useSetState.d.ts +1 -1
- package/dist/hooks/useVocabulary.d.ts +8 -1
- package/dist/index.d.ts +29 -29
- package/dist/lib/auth.d.ts +31 -31
- package/dist/lib/client.d.ts +59 -57
- package/dist/lib/helpers.d.ts +24 -24
- package/dist/lib/rest.d.ts +23 -22
- package/dist/lib/search.d.ts +2 -2
- package/dist/lib/search.test.d.ts +1 -1
- package/dist/lib/utils.d.ts +4 -3
- package/dist/lib/validators.d.ts +12 -12
- package/dist/locales/generic_messages.d.ts +370 -370
- package/dist/models/index.d.ts +17 -17
- package/dist/models/sharing.d.ts +12 -9
- package/dist/react-gmi.esm.js +3865 -3278
- package/dist/react-gmi.esm.js.map +1 -1
- package/dist/react-gmi.js +3864 -3276
- package/dist/react-gmi.js.map +1 -1
- package/dist/react-gmi.modern.js +3627 -3129
- package/dist/react-gmi.modern.js.map +1 -1
- package/dist/react-gmi.umd.js +3867 -3280
- package/dist/react-gmi.umd.js.map +1 -1
- package/dist/reducers/guillotina.d.ts +29 -19
- package/dist/setupTests.d.ts +1 -1
- package/dist/types/global.d.ts +8 -0
- package/dist/types/guillotina.d.ts +121 -0
- package/dist/views/application.d.ts +13 -17
- package/dist/views/base.d.ts +5 -1
- package/dist/views/container.d.ts +1 -1
- package/dist/views/folder.d.ts +1 -1
- package/dist/views/groups.d.ts +3 -3
- package/dist/views/item.d.ts +1 -1
- package/dist/views/users.d.ts +3 -3
- package/package.json +13 -6
- package/dist/hooks/useAsync.d.ts +0 -3
- package/dist/hooks/useAsyncFn.d.ts +0 -5
package/dist/index.d.ts
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
12
|
-
export * from
|
|
13
|
-
export * from
|
|
14
|
-
export * from
|
|
15
|
-
export * from
|
|
16
|
-
export * from
|
|
17
|
-
export * from
|
|
18
|
-
export * from
|
|
19
|
-
export * from
|
|
20
|
-
export * from
|
|
21
|
-
export * from
|
|
22
|
-
export * from
|
|
23
|
-
export * from
|
|
24
|
-
export * from
|
|
25
|
-
export * from
|
|
26
|
-
export * from
|
|
27
|
-
export * from
|
|
28
|
-
export * from
|
|
29
|
-
export * from
|
|
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';
|
package/dist/lib/auth.d.ts
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
export class Auth {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
+
}
|
package/dist/lib/client.d.ts
CHANGED
|
@@ -1,57 +1,59 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
rest:
|
|
5
|
-
pathContainsContainer:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
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>;
|
package/dist/lib/helpers.d.ts
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export function
|
|
6
|
-
export function
|
|
7
|
-
export function
|
|
8
|
-
export
|
|
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
|
+
};
|
package/dist/lib/rest.d.ts
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
+
}
|
package/dist/lib/search.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export function parser(qs:
|
|
2
|
-
export function buildQs(parsedQuery:
|
|
1
|
+
export declare function parser(qs: string, defaultField?: string): string[][];
|
|
2
|
+
export declare function buildQs(parsedQuery: string[][]): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
package/dist/lib/utils.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
export
|
|
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;
|
package/dist/lib/validators.d.ts
CHANGED
|
@@ -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
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
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;
|