@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
|
@@ -1,19 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ItemModel } from '../models';
|
|
3
|
+
import { IndexSignature } from '../types/global';
|
|
4
|
+
import { GuillotinaCommonObject } from '../types/guillotina';
|
|
5
|
+
export interface GuillotinaGlobalState {
|
|
6
|
+
path: string;
|
|
7
|
+
loading: boolean;
|
|
8
|
+
context: GuillotinaCommonObject;
|
|
9
|
+
flash: {
|
|
10
|
+
message: string;
|
|
11
|
+
type: string;
|
|
12
|
+
};
|
|
13
|
+
action: {
|
|
14
|
+
action: string;
|
|
15
|
+
params: IndexSignature;
|
|
16
|
+
};
|
|
17
|
+
permissions: IndexSignature;
|
|
18
|
+
errorStatus: number;
|
|
19
|
+
registry: IndexSignature;
|
|
20
|
+
refresh: number;
|
|
21
|
+
}
|
|
22
|
+
export declare const initialState: GuillotinaGlobalState;
|
|
23
|
+
export declare function guillotinaReducer(state: any, action: any): any;
|
|
24
|
+
export interface IColumn {
|
|
25
|
+
key: string;
|
|
26
|
+
label: string;
|
|
27
|
+
isSortable: string;
|
|
28
|
+
child: (model: ItemModel, link: () => void, search: string) => React.ReactElement;
|
|
29
|
+
}
|
package/dist/setupTests.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { IndexSignature } from './global';
|
|
2
|
+
type ItemsPropertyObject = {
|
|
3
|
+
'@id': string;
|
|
4
|
+
'@name': string;
|
|
5
|
+
'@type': string;
|
|
6
|
+
'@uid': string;
|
|
7
|
+
__behaviors__: string[];
|
|
8
|
+
'@static_behaviors': string[];
|
|
9
|
+
};
|
|
10
|
+
export interface GuillotinaSchema {
|
|
11
|
+
title: string;
|
|
12
|
+
$schema: string;
|
|
13
|
+
type: string;
|
|
14
|
+
required: string[];
|
|
15
|
+
definitions: Definitions;
|
|
16
|
+
properties: GuillotinaSchemaProperties;
|
|
17
|
+
}
|
|
18
|
+
export interface Definitions {
|
|
19
|
+
[key: string]: {
|
|
20
|
+
type: string;
|
|
21
|
+
properties: GuillotinaSchemaProperties;
|
|
22
|
+
required: string[];
|
|
23
|
+
title: string;
|
|
24
|
+
description: string;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export interface GuillotinaItemsProperty {
|
|
28
|
+
type: string;
|
|
29
|
+
widget?: string;
|
|
30
|
+
properties?: GuillotinaSchemaProperties;
|
|
31
|
+
vocabulary?: string[];
|
|
32
|
+
vocabularyName?: string;
|
|
33
|
+
queryCondition?: string;
|
|
34
|
+
queryPath?: string;
|
|
35
|
+
labelProperty?: string;
|
|
36
|
+
typeNameQuery?: string;
|
|
37
|
+
items: GuillotinaItemsProperty;
|
|
38
|
+
title: string;
|
|
39
|
+
}
|
|
40
|
+
export interface GuillotinaSchemaProperty {
|
|
41
|
+
type: string;
|
|
42
|
+
title: string;
|
|
43
|
+
widget?: string;
|
|
44
|
+
readonly?: boolean;
|
|
45
|
+
description?: string;
|
|
46
|
+
vocabularyName?: string;
|
|
47
|
+
vocabulary?: string[];
|
|
48
|
+
items?: GuillotinaItemsProperty;
|
|
49
|
+
properties?: GuillotinaSchemaProperties;
|
|
50
|
+
additionalProperties?: GuillotinaSchemaProperties;
|
|
51
|
+
typeNameQuery?: string;
|
|
52
|
+
labelProperty?: string;
|
|
53
|
+
}
|
|
54
|
+
export interface GuillotinaSchemaProperties {
|
|
55
|
+
[key: string]: GuillotinaSchemaProperty | {
|
|
56
|
+
$ref: string;
|
|
57
|
+
}[];
|
|
58
|
+
}
|
|
59
|
+
export type GuillotinaCommonObject = {
|
|
60
|
+
creation_date: Date;
|
|
61
|
+
modification_date: string;
|
|
62
|
+
title: string;
|
|
63
|
+
type_name: string;
|
|
64
|
+
uuid: string;
|
|
65
|
+
'guillotina.behaviors.attachment.IMultiAttachment'?: {
|
|
66
|
+
files: {
|
|
67
|
+
[key: string]: GuillotinaFile;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
} & ItemsPropertyObject;
|
|
71
|
+
export type GuillotinaFile = {
|
|
72
|
+
filename: string;
|
|
73
|
+
content_type: string;
|
|
74
|
+
extension: string;
|
|
75
|
+
size: number;
|
|
76
|
+
md5: string;
|
|
77
|
+
};
|
|
78
|
+
export type SearchItem = {
|
|
79
|
+
id: string;
|
|
80
|
+
parent_uuid: string;
|
|
81
|
+
path: string;
|
|
82
|
+
tid: string;
|
|
83
|
+
uuid: string;
|
|
84
|
+
title: string;
|
|
85
|
+
type_name: string;
|
|
86
|
+
creation_date: string;
|
|
87
|
+
modification_date: string;
|
|
88
|
+
} & ItemsPropertyObject;
|
|
89
|
+
export interface GuillotinaVocabulary {
|
|
90
|
+
'@id': string;
|
|
91
|
+
items: GuillotinaVocabularyItem[];
|
|
92
|
+
items_total: number;
|
|
93
|
+
}
|
|
94
|
+
export interface GuillotinaVocabularyItem {
|
|
95
|
+
title: string;
|
|
96
|
+
token: string;
|
|
97
|
+
}
|
|
98
|
+
export interface GuillotinaSharing {
|
|
99
|
+
local: GuillotinaSharingMap;
|
|
100
|
+
inherit: GuillotinaSharingInheritItem[];
|
|
101
|
+
}
|
|
102
|
+
export interface GuillotinaSharingInheritItem extends GuillotinaSharingMap {
|
|
103
|
+
'@id': string;
|
|
104
|
+
}
|
|
105
|
+
export interface GuillotinaSharingMap {
|
|
106
|
+
roleperm: {
|
|
107
|
+
[key: string]: IndexSignature<string>;
|
|
108
|
+
};
|
|
109
|
+
prinperm: {
|
|
110
|
+
[key: string]: IndexSignature<string>;
|
|
111
|
+
};
|
|
112
|
+
prinrole: {
|
|
113
|
+
[key: string]: IndexSignature<string>;
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
export interface GuillotinaBehaviors {
|
|
117
|
+
static: string[];
|
|
118
|
+
dynamic: string[];
|
|
119
|
+
available: string[];
|
|
120
|
+
}
|
|
121
|
+
export {};
|
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
export function ApplicationCtx(
|
|
2
|
-
export function DatabaseCtx(
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const defaultMessage_1: string;
|
|
15
|
-
export { defaultMessage_1 as defaultMessage };
|
|
16
|
-
}
|
|
17
|
-
}
|
|
1
|
+
export declare function ApplicationCtx(): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function DatabaseCtx(): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare function CreateContainer(): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const messages: {
|
|
5
|
+
add_container: {
|
|
6
|
+
id: string;
|
|
7
|
+
defaultMessage: string;
|
|
8
|
+
};
|
|
9
|
+
container_created: {
|
|
10
|
+
id: string;
|
|
11
|
+
defaultMessage: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
package/dist/views/base.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export function ContainerCtx(
|
|
1
|
+
export declare function ContainerCtx(): import("react/jsx-runtime").JSX.Element;
|
package/dist/views/folder.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export function FolderCtx(props: any): JSX.Element;
|
|
1
|
+
export declare function FolderCtx(props: any): import("react/jsx-runtime").JSX.Element;
|
package/dist/views/groups.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export function GroupToolbar(): JSX.Element;
|
|
2
|
-
export function GroupsCtx(props: any): JSX.Element;
|
|
3
|
-
export function GroupCtx(): JSX.Element;
|
|
1
|
+
export declare function GroupToolbar(): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function GroupsCtx(props: any): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare function GroupCtx(): import("react/jsx-runtime").JSX.Element;
|
package/dist/views/item.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export function ItemCtx(props: any): JSX.Element;
|
|
1
|
+
export declare function ItemCtx(props: any): import("react/jsx-runtime").JSX.Element;
|
package/dist/views/users.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export function UsersToolbar(): JSX.Element;
|
|
2
|
-
export function UsersCtx(props: any): JSX.Element;
|
|
3
|
-
export function UserCtx(): JSX.Element;
|
|
1
|
+
export declare function UsersToolbar(): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function UsersCtx(props: any): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare function UserCtx(): import("react/jsx-runtime").JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.
|
|
2
|
+
"version": "0.28.1",
|
|
3
3
|
"repository": {
|
|
4
4
|
"type": "git",
|
|
5
5
|
"url": "git@github.com:guillotinaweb/guillotina_react.git"
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"files": [
|
|
8
8
|
"dist"
|
|
9
9
|
],
|
|
10
|
-
"source": "./src/guillo-gmi/index.
|
|
10
|
+
"source": "./src/guillo-gmi/index.ts",
|
|
11
11
|
"main": "./dist/react-gmi.js",
|
|
12
12
|
"exports": "./dist/react-gmi.modern.js",
|
|
13
13
|
"types": "./dist/index.d.ts",
|
|
@@ -31,32 +31,39 @@
|
|
|
31
31
|
"@babel/cli": "7.12.10",
|
|
32
32
|
"@babel/core": "7.12.10",
|
|
33
33
|
"@formatjs/cli": "^6.2.4",
|
|
34
|
+
"@formatjs/ts-transformer": "^3.13.11",
|
|
34
35
|
"@testing-library/jest-dom": "5.11.6",
|
|
35
36
|
"@testing-library/react": "11.2.2",
|
|
36
37
|
"@testing-library/user-event": "12.6.0",
|
|
38
|
+
"@typescript-eslint/eslint-plugin": "^6.18.1",
|
|
39
|
+
"@typescript-eslint/parser": "^6.18.1",
|
|
37
40
|
"babel-plugin-formatjs": "^10.5.10",
|
|
41
|
+
"eslint": "^8.56.0",
|
|
42
|
+
"eslint-plugin-react": "^7.33.2",
|
|
38
43
|
"husky": "4.3.6",
|
|
39
44
|
"microbundle": "0.13.0",
|
|
40
45
|
"prettier": "2.2.1",
|
|
41
46
|
"sass": "1.69.5",
|
|
42
47
|
"serialize-javascript": "5.0.1",
|
|
43
|
-
"
|
|
48
|
+
"typescript": "^5.3.3",
|
|
49
|
+
"vitest": "^0.34.6",
|
|
50
|
+
"@types/react-beautiful-dnd": "13.1.8"
|
|
44
51
|
},
|
|
45
52
|
"scripts": {
|
|
46
|
-
"format": "prettier --write \"src/**/*.js\"",
|
|
53
|
+
"format": "prettier --write \"src/**/*.{js,ts,tsx}\"",
|
|
47
54
|
"format:tests": "prettier --write \"e2e/cypress/**/*.js\"",
|
|
48
55
|
"format:check": "prettier --check \"src/**/*.js\"",
|
|
49
56
|
"build": "yarn build:js && yarn build:css",
|
|
50
57
|
"build:js": "rm -rf ./dist && microbundle --jsx React.createElement --no-compress --sourcemap",
|
|
51
|
-
"build:css": "rm -rf ./dist/css && mkdir ./dist/css && sass ./src/guillo-gmi/scss/styles.sass ./dist/css/style.css",
|
|
58
|
+
"build:css": "rm -rf ./dist/css && mkdir -p ./dist/css && sass ./src/guillo-gmi/scss/styles.sass ./dist/css/style.css",
|
|
52
59
|
"prepublish": "yarn build",
|
|
53
60
|
"test": "vitest run",
|
|
61
|
+
"lint": "eslint src",
|
|
54
62
|
"intl-extract": "formatjs extract 'src/**/*.js' --out-file src/guillo-gmi/locales/en.json --id-interpolation-pattern '[sha512:contenthash:base64:6]'",
|
|
55
63
|
"intl-compile-en": "formatjs compile src/guillo-gmi/locales/en.json --ast --out-file src/guillo-gmi/locales/compiled/en.json",
|
|
56
64
|
"intl-compile-ca": "formatjs compile src/guillo-gmi/locales/ca.json --ast --out-file src/guillo-gmi/locales/compiled/ca.json",
|
|
57
65
|
"intl-compile-es": "formatjs compile src/guillo-gmi/locales/es.json --ast --out-file src/guillo-gmi/locales/compiled/es.json",
|
|
58
66
|
"intl-compile": "npm run intl-compile-en && npm run intl-compile-es && npm run intl-compile-ca"
|
|
59
|
-
|
|
60
67
|
},
|
|
61
68
|
"eslintConfig": {
|
|
62
69
|
"extends": "react-app"
|
package/dist/hooks/useAsync.d.ts
DELETED