@guillotinaweb/react-gmi 0.18.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.
- package/CHANGELOG.md +210 -0
- package/LICENSE +23 -0
- package/README.md +126 -0
- package/dist/actions/add_item.d.ts +1 -0
- package/dist/actions/change_pass.d.ts +1 -0
- package/dist/actions/copy_item.d.ts +1 -0
- package/dist/actions/copy_items.d.ts +1 -0
- package/dist/actions/index.d.ts +2 -0
- package/dist/actions/move_item.d.ts +1 -0
- package/dist/actions/move_items.d.ts +1 -0
- package/dist/actions/remove_item.d.ts +1 -0
- package/dist/actions/remove_items.d.ts +1 -0
- package/dist/components/Link.d.ts +6 -0
- package/dist/components/TdLink.d.ts +5 -0
- package/dist/components/behavior_view.d.ts +5 -0
- package/dist/components/behaviors/iattachment.d.ts +4 -0
- package/dist/components/behaviors/idublincore.d.ts +4 -0
- package/dist/components/behaviors/imultiattachment.d.ts +4 -0
- package/dist/components/context_toolbar.d.ts +5 -0
- package/dist/components/error_boundary.d.ts +5 -0
- package/dist/components/error_zone.d.ts +13 -0
- package/dist/components/fields/downloadField.d.ts +3 -0
- package/dist/components/fields/editComponent.d.ts +2 -0
- package/dist/components/fields/editableField.d.ts +10 -0
- package/dist/components/fields/renderField.d.ts +4 -0
- package/dist/components/flash.d.ts +1 -0
- package/dist/components/guillotina.d.ts +4 -0
- package/dist/components/index.d.ts +48 -0
- package/dist/components/input/button.d.ts +10 -0
- package/dist/components/input/checkbox.d.ts +17 -0
- package/dist/components/input/dropdown.d.ts +10 -0
- package/dist/components/input/email.d.ts +5 -0
- package/dist/components/input/form.d.ts +20 -0
- package/dist/components/input/form_builder.d.ts +12 -0
- package/dist/components/input/index.d.ts +1 -0
- package/dist/components/input/input.d.ts +1 -0
- package/dist/components/input/input_list.d.ts +1 -0
- package/dist/components/input/password.d.ts +4 -0
- package/dist/components/input/search_input.d.ts +25 -0
- package/dist/components/input/select.d.ts +1 -0
- package/dist/components/input/textarea.d.ts +1 -0
- package/dist/components/input/upload.d.ts +5 -0
- package/dist/components/item.d.ts +13 -0
- package/dist/components/layout.d.ts +5 -0
- package/dist/components/login.d.ts +14 -0
- package/dist/components/modal.d.ts +14 -0
- package/dist/components/notallowed.d.ts +1 -0
- package/dist/components/notfound.d.ts +1 -0
- package/dist/components/pagination.d.ts +6 -0
- package/dist/components/panel/actions.d.ts +24 -0
- package/dist/components/panel/addons.d.ts +1 -0
- package/dist/components/panel/behaviors.d.ts +1 -0
- package/dist/components/panel/index.d.ts +1 -0
- package/dist/components/panel/items.d.ts +1 -0
- package/dist/components/panel/permissions.d.ts +5 -0
- package/dist/components/panel/permissions_prinperm.d.ts +6 -0
- package/dist/components/panel/permissions_prinrole.d.ts +6 -0
- package/dist/components/panel/permissions_roleperm.d.ts +6 -0
- package/dist/components/panel/properties.d.ts +1 -0
- package/dist/components/panel/requester.d.ts +1 -0
- package/dist/components/path.d.ts +1 -0
- package/dist/components/properties_view.d.ts +2 -0
- package/dist/components/searchLabels.d.ts +1 -0
- package/dist/components/selected_items_actions.d.ts +32 -0
- package/dist/components/tabs.d.ts +11 -0
- package/dist/components/ui/delete.d.ts +5 -0
- package/dist/components/ui/icon.d.ts +5 -0
- package/dist/components/ui/index.d.ts +6 -0
- package/dist/components/ui/loading.d.ts +3 -0
- package/dist/components/ui/notification.d.ts +4 -0
- package/dist/components/ui/table.d.ts +5 -0
- package/dist/components/ui/tag.d.ts +6 -0
- package/dist/components/widgets/index.d.ts +1 -0
- package/dist/components/widgets/tags.d.ts +8 -0
- package/dist/contexts/index.d.ts +13 -0
- package/dist/css/style.css +7792 -0
- package/dist/forms/base.d.ts +7 -0
- package/dist/forms/required_fields.d.ts +8 -0
- package/dist/forms/users.d.ts +5 -0
- package/dist/hooks/useAsync.d.ts +1 -0
- package/dist/hooks/useAsyncFn.d.ts +3 -0
- package/dist/hooks/useClickAway.d.ts +1 -0
- package/dist/hooks/useConfig.d.ts +15 -0
- package/dist/hooks/useCrudContext.d.ts +1 -0
- package/dist/hooks/useInput.d.ts +7 -0
- package/dist/hooks/useLocation.d.ts +1 -0
- package/dist/hooks/useMountedState.d.ts +1 -0
- package/dist/hooks/useRegistry.d.ts +90 -0
- package/dist/hooks/useRemoteField.d.ts +1 -0
- package/dist/hooks/useSetState.d.ts +1 -0
- package/dist/index.d.ts +27 -0
- package/dist/lib/auth.d.ts +31 -0
- package/dist/lib/client.d.ts +49 -0
- package/dist/lib/helpers.d.ts +7 -0
- package/dist/lib/rest.d.ts +21 -0
- package/dist/lib/search.d.ts +2 -0
- package/dist/lib/search.test.d.ts +1 -0
- package/dist/lib/utils.d.ts +3 -0
- package/dist/lib/validators.d.ts +12 -0
- package/dist/models/index.d.ts +17 -0
- package/dist/models/sharing.d.ts +9 -0
- package/dist/react-gmi.esm.js +7521 -0
- package/dist/react-gmi.esm.js.map +1 -0
- package/dist/react-gmi.js +7658 -0
- package/dist/react-gmi.js.map +1 -0
- package/dist/react-gmi.modern.js +6163 -0
- package/dist/react-gmi.modern.js.map +1 -0
- package/dist/react-gmi.umd.js +7660 -0
- package/dist/react-gmi.umd.js.map +1 -0
- package/dist/reducers/guillotina.d.ts +19 -0
- package/dist/setupTests.d.ts +1 -0
- package/dist/views/application.d.ts +5 -0
- package/dist/views/base.d.ts +1 -0
- package/dist/views/container.d.ts +1 -0
- package/dist/views/folder.d.ts +1 -0
- package/dist/views/groups.d.ts +3 -0
- package/dist/views/item.d.ts +1 -0
- package/dist/views/users.d.ts +3 -0
- package/package.json +78 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function useAsync(fn: any, deps?: any[]): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function useClickAway(ref: any, onClickAway: any, events?: string[]): void;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export function useConfig(cfg: any): {
|
|
2
|
+
DisabledTypes: string[];
|
|
3
|
+
PageSize: number;
|
|
4
|
+
DelayActions: number;
|
|
5
|
+
Permissions: string[];
|
|
6
|
+
SearchEngine: string;
|
|
7
|
+
};
|
|
8
|
+
export const Permissions: string[];
|
|
9
|
+
export namespace Config {
|
|
10
|
+
export const DisabledTypes: string[];
|
|
11
|
+
export const PageSize: number;
|
|
12
|
+
export const DelayActions: number;
|
|
13
|
+
export { Permissions };
|
|
14
|
+
export const SearchEngine: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function useCrudContext(): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function useLocation(): any[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function useMountedState(): any;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
export function useRegistry(data: any): {
|
|
2
|
+
registry: {
|
|
3
|
+
paths: {};
|
|
4
|
+
views: {
|
|
5
|
+
ErrorBoundary: typeof ErrorBoundary;
|
|
6
|
+
NotAllowed: typeof NotAllowed;
|
|
7
|
+
NotFound: typeof NotFound;
|
|
8
|
+
Application: typeof ApplicationCtx;
|
|
9
|
+
Database: typeof DatabaseCtx;
|
|
10
|
+
Container: typeof ContainerCtx;
|
|
11
|
+
UserManager: typeof UsersCtx;
|
|
12
|
+
User: typeof UserCtx;
|
|
13
|
+
Group: typeof GroupCtx;
|
|
14
|
+
GroupManager: typeof GroupsCtx;
|
|
15
|
+
Folder: typeof FolderCtx;
|
|
16
|
+
Item: typeof ItemCtx;
|
|
17
|
+
};
|
|
18
|
+
actions: {
|
|
19
|
+
addItem: typeof AddItem;
|
|
20
|
+
copyItems: typeof CopyItems;
|
|
21
|
+
copyItem: typeof CopyItem;
|
|
22
|
+
moveItems: typeof MoveItems;
|
|
23
|
+
moveItem: typeof MoveItem;
|
|
24
|
+
removeItems: typeof RemoveItems;
|
|
25
|
+
changePassword: typeof ChangePassword;
|
|
26
|
+
removeItem: typeof RemoveItem;
|
|
27
|
+
};
|
|
28
|
+
forms: {
|
|
29
|
+
UserManager: typeof BaseForm;
|
|
30
|
+
GroupManager: typeof BaseForm;
|
|
31
|
+
Folder: typeof BaseForm;
|
|
32
|
+
Item: typeof BaseForm;
|
|
33
|
+
User: ({ isEdit, children, ...props }: {
|
|
34
|
+
[x: string]: any;
|
|
35
|
+
isEdit?: boolean;
|
|
36
|
+
children: any;
|
|
37
|
+
}) => any;
|
|
38
|
+
Group: typeof BaseForm;
|
|
39
|
+
};
|
|
40
|
+
behaviors: {
|
|
41
|
+
'guillotina.behaviors.dublincore.IDublinCore': typeof IDublinCore;
|
|
42
|
+
'guillotina.behaviors.attachment.IAttachment': typeof IAttachment;
|
|
43
|
+
'guillotina.behaviors.attachment.IMultiAttachment': typeof IMultiAttachment;
|
|
44
|
+
};
|
|
45
|
+
itemsColumn: {};
|
|
46
|
+
schemas: {};
|
|
47
|
+
properties: {};
|
|
48
|
+
components: {
|
|
49
|
+
Path: typeof Path;
|
|
50
|
+
EditComponent: any;
|
|
51
|
+
};
|
|
52
|
+
searchEngineQueryParamsFunction: {
|
|
53
|
+
PostreSQL: string;
|
|
54
|
+
Elasticsearch: string;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
get: (key: any, param: any, fallback: any) => any;
|
|
58
|
+
getForm: (type: any, fallback?: typeof BaseForm) => any;
|
|
59
|
+
getComponent: (context: any, path: any, fallback: any) => any;
|
|
60
|
+
getAction: (type: any, fallback: any) => any;
|
|
61
|
+
getBehavior: (type: any, fallback: any) => any;
|
|
62
|
+
getProperties: (type: any) => any;
|
|
63
|
+
getItemsColumn: (type: any) => any;
|
|
64
|
+
};
|
|
65
|
+
export function defaultComponent(context: any): typeof FolderCtx;
|
|
66
|
+
import ErrorBoundary from "../components/error_boundary";
|
|
67
|
+
import { NotAllowed } from "../components/notallowed";
|
|
68
|
+
import { NotFound } from "../components/notfound";
|
|
69
|
+
import { ApplicationCtx } from "../views/application";
|
|
70
|
+
import { DatabaseCtx } from "../views/application";
|
|
71
|
+
import { ContainerCtx } from "../views/container";
|
|
72
|
+
import { UsersCtx } from "../views/users";
|
|
73
|
+
import { UserCtx } from "../views/users";
|
|
74
|
+
import { GroupCtx } from "../views/groups";
|
|
75
|
+
import { GroupsCtx } from "../views/groups";
|
|
76
|
+
import { FolderCtx } from "../views/folder";
|
|
77
|
+
import { ItemCtx } from "../views/item";
|
|
78
|
+
import { AddItem } from "../actions/add_item";
|
|
79
|
+
import { CopyItems } from "../actions/copy_items";
|
|
80
|
+
import { CopyItem } from "../actions/copy_item";
|
|
81
|
+
import { MoveItems } from "../actions/move_items";
|
|
82
|
+
import { MoveItem } from "../actions/move_item";
|
|
83
|
+
import { RemoveItems } from "../actions/remove_items";
|
|
84
|
+
import { ChangePassword } from "../actions/change_pass";
|
|
85
|
+
import { RemoveItem } from "../actions/remove_item";
|
|
86
|
+
import { BaseForm } from "../forms/base";
|
|
87
|
+
import { IDublinCore } from "../components/behaviors/idublincore";
|
|
88
|
+
import { IAttachment } from "../components/behaviors/iattachment";
|
|
89
|
+
import { IMultiAttachment } from "../components/behaviors/imultiattachment";
|
|
90
|
+
import { Path } from "../components/path";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function useRemoteField(initial: any): any[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function useSetState(initialState: any): any[];
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
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 "./lib/helpers";
|
|
14
|
+
export * from "./lib/validators";
|
|
15
|
+
export * from "./lib/utils";
|
|
16
|
+
export * from "./lib/client";
|
|
17
|
+
export * from "./lib/auth";
|
|
18
|
+
export * from "./lib/rest";
|
|
19
|
+
export * from "./lib/search";
|
|
20
|
+
export * from "./models";
|
|
21
|
+
export * from "./views/base";
|
|
22
|
+
export * from "./views/application";
|
|
23
|
+
export * from "./views/container";
|
|
24
|
+
export * from "./views/folder";
|
|
25
|
+
export * from "./views/item";
|
|
26
|
+
export * from "./views/users";
|
|
27
|
+
export * from "./views/groups";
|
|
@@ -0,0 +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
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export function getClient(url: any, auth: any, isContainer?: boolean): GuillotinaClient;
|
|
2
|
+
export class GuillotinaClient {
|
|
3
|
+
constructor(rest: any, isContainer: any);
|
|
4
|
+
rest: any;
|
|
5
|
+
isContainer: any;
|
|
6
|
+
getContext(path: any): Promise<any>;
|
|
7
|
+
get(path: any): Promise<any>;
|
|
8
|
+
getQueryParamsPostresql({ start, pageSize, withDepth }: {
|
|
9
|
+
start?: number;
|
|
10
|
+
pageSize?: number;
|
|
11
|
+
withDepth?: boolean;
|
|
12
|
+
}): any[];
|
|
13
|
+
getQueryParamsElasticsearch({ start, pageSize, path, withDepth, }: {
|
|
14
|
+
start?: number;
|
|
15
|
+
pageSize?: number;
|
|
16
|
+
path: any;
|
|
17
|
+
withDepth?: boolean;
|
|
18
|
+
}): any[];
|
|
19
|
+
getItemsColumn(): {
|
|
20
|
+
label: string;
|
|
21
|
+
child: (m: any, navigate: any, search: any) => any;
|
|
22
|
+
}[];
|
|
23
|
+
applyCompat(data: any): any;
|
|
24
|
+
search(path: any, params: any, container?: boolean, prepare?: boolean): Promise<any>;
|
|
25
|
+
canido(path: any, permissions: any): Promise<any>;
|
|
26
|
+
createObject(path: any, data: any): Promise<any>;
|
|
27
|
+
cleanPath(path: any): string;
|
|
28
|
+
delete(path: any, data: any): Promise<any>;
|
|
29
|
+
create(path: any, data: any): Promise<any>;
|
|
30
|
+
post(path: any, data: any): Promise<any>;
|
|
31
|
+
patch(path: any, data: any): Promise<any>;
|
|
32
|
+
upload(path: any, file: any): Promise<any>;
|
|
33
|
+
download(path: any): Promise<any>;
|
|
34
|
+
getTypeSchema(path: any, name: any): Promise<any>;
|
|
35
|
+
getAddons(path: any): Promise<any>;
|
|
36
|
+
installAddon(path: any, key: any): Promise<any>;
|
|
37
|
+
removeAddon(path: any, key: any): Promise<any>;
|
|
38
|
+
getGroups(path: any): Promise<any>;
|
|
39
|
+
getUsers(path: any): Promise<any>;
|
|
40
|
+
getPrincipals(path: any): Promise<{
|
|
41
|
+
groups: any;
|
|
42
|
+
users: any;
|
|
43
|
+
}>;
|
|
44
|
+
getRoles(path: any): Promise<any>;
|
|
45
|
+
getAllPermissions(path: any): Promise<any[]>;
|
|
46
|
+
getTypes(path: any): Promise<any>;
|
|
47
|
+
}
|
|
48
|
+
export function getContainerFromPath(path: any): string;
|
|
49
|
+
export function lightFileReader(file: any): Promise<any>;
|
|
@@ -0,0 +1,7 @@
|
|
|
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;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export class RestClient {
|
|
2
|
+
constructor(url: any, auth: any);
|
|
3
|
+
auth: any;
|
|
4
|
+
url: any;
|
|
5
|
+
request(path: any, data: any, headers: any): Promise<Response>;
|
|
6
|
+
getHeaders(): {
|
|
7
|
+
Accept?: undefined;
|
|
8
|
+
'Content-Type'?: undefined;
|
|
9
|
+
Authorization?: undefined;
|
|
10
|
+
} | {
|
|
11
|
+
Accept: string;
|
|
12
|
+
'Content-Type': string;
|
|
13
|
+
Authorization: string;
|
|
14
|
+
};
|
|
15
|
+
post(path: any, data: any): Promise<Response>;
|
|
16
|
+
get(path: any): Promise<Response>;
|
|
17
|
+
put(path: any, data: any): Promise<Response>;
|
|
18
|
+
patch(path: any, data: any): Promise<Response>;
|
|
19
|
+
upload(path: any, data: any): Promise<Response>;
|
|
20
|
+
delete(path: any, data?: any): Promise<Response>;
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +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;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export * from "./sharing";
|
|
2
|
+
export class ItemModel {
|
|
3
|
+
constructor(item: any, url: any, path: any);
|
|
4
|
+
item: any;
|
|
5
|
+
url: any;
|
|
6
|
+
_path: any;
|
|
7
|
+
get path(): any;
|
|
8
|
+
get name(): any;
|
|
9
|
+
get icon(): any;
|
|
10
|
+
get fullPath(): any;
|
|
11
|
+
get id(): any;
|
|
12
|
+
get uid(): any;
|
|
13
|
+
get type(): any;
|
|
14
|
+
get title(): any;
|
|
15
|
+
get created(): string;
|
|
16
|
+
get updated(): string;
|
|
17
|
+
}
|