@guillotinaweb/react-gmi 0.29.2-alpha.2 → 0.29.2-alpha.3
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/README.md +2 -1
- package/dist/actions/copy_item.d.ts +2 -2
- package/dist/actions/move_item.d.ts +2 -2
- package/dist/actions/remove_item.d.ts +2 -2
- package/dist/components/behaviors/iattachment.d.ts +4 -2
- package/dist/components/behaviors/imultiimageorderedattachment.d.ts +3 -1
- package/dist/components/behaviors/iworkflow.d.ts +1 -1
- package/dist/components/context_toolbar.d.ts +1 -1
- package/dist/components/fields/editComponent.d.ts +5 -4
- package/dist/components/fields/editableField.d.ts +4 -2
- package/dist/components/fields/renderField.d.ts +8 -5
- package/dist/components/flash.d.ts +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/input/email.d.ts +1 -1
- package/dist/components/input/form_builder.d.ts +2 -2
- package/dist/components/input/input.d.ts +1 -1
- package/dist/components/input/search_input.d.ts +1 -1
- package/dist/components/input/search_input_list.d.ts +2 -2
- package/dist/components/input/select_vocabulary.d.ts +2 -2
- package/dist/components/input/upload.d.ts +1 -2
- package/dist/components/pagination.d.ts +1 -1
- package/dist/components/panel/permissions.d.ts +1 -1
- package/dist/components/panel/permissions_prinperm.d.ts +2 -2
- package/dist/components/panel/permissions_prinrole.d.ts +1 -1
- package/dist/components/panel/permissions_roleperm.d.ts +1 -1
- package/dist/components/path.d.ts +1 -1
- package/dist/components/properties_view.d.ts +2 -2
- package/dist/components/search_labels.d.ts +1 -1
- package/dist/components/search_options_labels.d.ts +1 -1
- package/dist/components/search_vocabulary_labels.d.ts +2 -2
- package/dist/components/tabs.d.ts +4 -2
- package/dist/components/widgets/tags.d.ts +4 -1
- package/dist/contexts/index.d.ts +21 -19
- package/dist/forms/required_fields.d.ts +2 -3
- package/dist/forms/users.d.ts +1 -1
- package/dist/hooks/useClickAway.d.ts +2 -1
- package/dist/hooks/useConfig.d.ts +4 -2
- package/dist/hooks/useCrudContext.d.ts +11 -10
- package/dist/hooks/useInput.d.ts +4 -3
- package/dist/hooks/useRegistry.d.ts +29 -29
- package/dist/hooks/useSetState.d.ts +6 -1
- package/dist/hooks/useVocabulary.d.ts +1 -1
- package/dist/index.d.ts +0 -2
- package/dist/lib/auth.d.ts +14 -19
- package/dist/lib/client.d.ts +49 -36
- package/dist/lib/helpers.d.ts +10 -18
- package/dist/lib/processResponse.d.ts +9 -0
- package/dist/lib/rest.d.ts +9 -16
- package/dist/lib/utils.d.ts +3 -2
- package/dist/lib/validators.d.ts +1 -1
- package/dist/locales/generic_messages.d.ts +248 -0
- package/dist/models/index.d.ts +5 -5
- package/dist/models/sharing.d.ts +5 -5
- package/dist/react-gmi.esm.js +1215 -1041
- package/dist/react-gmi.esm.js.map +1 -1
- package/dist/react-gmi.js +1214 -1041
- package/dist/react-gmi.js.map +1 -1
- package/dist/react-gmi.modern.js +1182 -983
- package/dist/react-gmi.modern.js.map +1 -1
- package/dist/react-gmi.umd.js +1214 -1041
- package/dist/react-gmi.umd.js.map +1 -1
- package/dist/reducers/guillotina.d.ts +22 -8
- package/dist/types/global.d.ts +9 -0
- package/dist/types/guillotina.d.ts +153 -19
- package/dist/views/folder.d.ts +1 -1
- package/dist/views/groups.d.ts +1 -1
- package/dist/views/item.d.ts +1 -1
- package/dist/views/users.d.ts +1 -1
- package/package.json +2 -1
|
@@ -5,22 +5,36 @@ import { GuillotinaCommonObject } from '../types/guillotina';
|
|
|
5
5
|
export interface GuillotinaGlobalState {
|
|
6
6
|
path: string;
|
|
7
7
|
loading: boolean;
|
|
8
|
-
context
|
|
8
|
+
context?: GuillotinaCommonObject;
|
|
9
9
|
flash: {
|
|
10
|
-
message
|
|
11
|
-
type
|
|
10
|
+
message?: string;
|
|
11
|
+
type?: string;
|
|
12
12
|
};
|
|
13
13
|
action: {
|
|
14
|
-
action
|
|
15
|
-
params
|
|
14
|
+
action?: string;
|
|
15
|
+
params?: IndexSignature;
|
|
16
16
|
};
|
|
17
17
|
permissions: IndexSignature;
|
|
18
|
-
errorStatus
|
|
18
|
+
errorStatus?: string;
|
|
19
19
|
registry: IndexSignature;
|
|
20
|
-
refresh
|
|
20
|
+
refresh?: number;
|
|
21
21
|
}
|
|
22
22
|
export declare const initialState: GuillotinaGlobalState;
|
|
23
|
-
export declare
|
|
23
|
+
export declare enum GuillotinaReducerActionTypes {
|
|
24
|
+
SET_PATH = "SET_PATH",
|
|
25
|
+
SET_CONTEXT = "SET_CONTEXT",
|
|
26
|
+
SET_ERROR = "SET_ERROR",
|
|
27
|
+
SET_FLASH = "SET_FLASH",
|
|
28
|
+
CLEAR_FLASH = "CLEAR_FLASH",
|
|
29
|
+
SET_ACTION = "SET_ACTION",
|
|
30
|
+
CLEAR_ACTION = "CLEAR_ACTION",
|
|
31
|
+
REFRESH = "REFRESH",
|
|
32
|
+
APPLY = "APPLY"
|
|
33
|
+
}
|
|
34
|
+
export declare function guillotinaReducer(state: GuillotinaGlobalState, action: {
|
|
35
|
+
type: GuillotinaReducerActionTypes;
|
|
36
|
+
payload: IndexSignature;
|
|
37
|
+
}): GuillotinaGlobalState;
|
|
24
38
|
export interface IColumn {
|
|
25
39
|
key: string;
|
|
26
40
|
label: string;
|
package/dist/types/global.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { GuillotinaFile } from './guillotina';
|
|
1
2
|
export interface LightFile {
|
|
2
3
|
filename: string;
|
|
3
4
|
data: ArrayBuffer | string;
|
|
@@ -6,3 +7,11 @@ export interface LightFile {
|
|
|
6
7
|
export interface IndexSignature<T = any> {
|
|
7
8
|
[key: string]: T;
|
|
8
9
|
}
|
|
10
|
+
export type EditableFieldValue = GuillotinaFile | LightFile | IndexSignature | string | string[] | boolean | Date | undefined | null;
|
|
11
|
+
interface FormElements extends HTMLFormControlsCollection {
|
|
12
|
+
filterInput: HTMLInputElement;
|
|
13
|
+
}
|
|
14
|
+
export interface FilterFormElement extends HTMLFormElement {
|
|
15
|
+
readonly elements: FormElements;
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -1,12 +1,26 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { IndexSignature } from './global';
|
|
2
3
|
type ItemsPropertyObject = {
|
|
3
4
|
'@id': string;
|
|
4
5
|
'@name': string;
|
|
5
6
|
'@type': string;
|
|
6
7
|
'@uid': string;
|
|
8
|
+
'@absolute_url': string;
|
|
7
9
|
__behaviors__: string[];
|
|
8
10
|
'@static_behaviors': string[];
|
|
9
11
|
};
|
|
12
|
+
export interface IBehaviorDublinCore {
|
|
13
|
+
title: string;
|
|
14
|
+
description: string | null;
|
|
15
|
+
creation_date: string;
|
|
16
|
+
modification_date: string;
|
|
17
|
+
effective_date: string | null;
|
|
18
|
+
expiration_date: string | null;
|
|
19
|
+
creators: string[];
|
|
20
|
+
tags: string[] | null;
|
|
21
|
+
publisher: string | null;
|
|
22
|
+
contributors: string[];
|
|
23
|
+
}
|
|
10
24
|
export interface GuillotinaSchema {
|
|
11
25
|
title: string;
|
|
12
26
|
$schema: string;
|
|
@@ -15,6 +29,11 @@ export interface GuillotinaSchema {
|
|
|
15
29
|
definitions: Definitions;
|
|
16
30
|
properties: GuillotinaSchemaProperties;
|
|
17
31
|
}
|
|
32
|
+
export interface GuillotinaSchemaProperties {
|
|
33
|
+
[key: string]: GuillotinaSchemaProperty | {
|
|
34
|
+
$ref: string;
|
|
35
|
+
}[];
|
|
36
|
+
}
|
|
18
37
|
export interface Definitions {
|
|
19
38
|
[key: string]: {
|
|
20
39
|
type: string;
|
|
@@ -24,19 +43,6 @@ export interface Definitions {
|
|
|
24
43
|
description: string;
|
|
25
44
|
};
|
|
26
45
|
}
|
|
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
46
|
export interface GuillotinaSchemaProperty {
|
|
41
47
|
type: string;
|
|
42
48
|
title: string;
|
|
@@ -45,23 +51,38 @@ export interface GuillotinaSchemaProperty {
|
|
|
45
51
|
description?: string;
|
|
46
52
|
vocabularyName?: string;
|
|
47
53
|
vocabulary?: string[];
|
|
48
|
-
items?:
|
|
54
|
+
items?: GuillotinaSchemaProperty;
|
|
49
55
|
properties?: GuillotinaSchemaProperties;
|
|
50
56
|
additionalProperties?: GuillotinaSchemaProperties;
|
|
51
57
|
typeNameQuery?: string;
|
|
52
58
|
labelProperty?: string;
|
|
59
|
+
enum?: string[];
|
|
60
|
+
queryCondition?: string;
|
|
61
|
+
queryPath?: string;
|
|
53
62
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
63
|
+
interface GuillotinaParentObject {
|
|
64
|
+
'@id': string;
|
|
65
|
+
'@name': string;
|
|
66
|
+
'@type': string;
|
|
67
|
+
'@uid': string;
|
|
58
68
|
}
|
|
59
69
|
export type GuillotinaCommonObject = {
|
|
60
|
-
creation_date:
|
|
70
|
+
creation_date: string;
|
|
61
71
|
modification_date: string;
|
|
62
72
|
title: string;
|
|
63
73
|
type_name: string;
|
|
64
74
|
uuid: string;
|
|
75
|
+
is_folderish: boolean;
|
|
76
|
+
parent: GuillotinaParentObject;
|
|
77
|
+
length: number;
|
|
78
|
+
__behaviors__?: string[];
|
|
79
|
+
'guillotina.behaviors.dublincore.IDublinCore'?: IBehaviorDublinCore;
|
|
80
|
+
'guillotina.contrib.workflows.interfaces.IWorkflowBehavior'?: {
|
|
81
|
+
review_state: string;
|
|
82
|
+
};
|
|
83
|
+
'guillotina.behaviors.attachment.IAttachment'?: {
|
|
84
|
+
file: GuillotinaFile;
|
|
85
|
+
};
|
|
65
86
|
'guillotina.behaviors.attachment.IMultiAttachment'?: {
|
|
66
87
|
files: {
|
|
67
88
|
[key: string]: GuillotinaFile;
|
|
@@ -118,4 +139,117 @@ export interface GuillotinaBehaviors {
|
|
|
118
139
|
dynamic: string[];
|
|
119
140
|
available: string[];
|
|
120
141
|
}
|
|
142
|
+
export interface AllPermissions {
|
|
143
|
+
[key: string]: AllPermissionsItem;
|
|
144
|
+
}
|
|
145
|
+
export interface AllPermissionsItem {
|
|
146
|
+
prinperm?: PrimPerm[];
|
|
147
|
+
prinrole?: Prinrole[];
|
|
148
|
+
roleperm?: Roleperm[];
|
|
149
|
+
perminhe?: Perminhe[];
|
|
150
|
+
}
|
|
151
|
+
export interface Prinrole {
|
|
152
|
+
principal: string;
|
|
153
|
+
role: string;
|
|
154
|
+
setting: Setting;
|
|
155
|
+
}
|
|
156
|
+
export interface Roleperm {
|
|
157
|
+
permission: string;
|
|
158
|
+
role: string;
|
|
159
|
+
setting: Setting;
|
|
160
|
+
}
|
|
161
|
+
export interface PrimPerm {
|
|
162
|
+
principal: string;
|
|
163
|
+
permission: string;
|
|
164
|
+
setting: Setting;
|
|
165
|
+
}
|
|
166
|
+
export interface Perminhe {
|
|
167
|
+
permission: string;
|
|
168
|
+
setting: Setting;
|
|
169
|
+
}
|
|
170
|
+
export declare enum Setting {
|
|
171
|
+
Allow = "Allow",
|
|
172
|
+
AllowSingle = "AllowSingle",
|
|
173
|
+
Deny = "Deny",
|
|
174
|
+
Unset = "Unset"
|
|
175
|
+
}
|
|
176
|
+
export interface Workflow {
|
|
177
|
+
'@id': string;
|
|
178
|
+
history: History[];
|
|
179
|
+
transitions: Transition[];
|
|
180
|
+
}
|
|
181
|
+
export interface History {
|
|
182
|
+
actor: string;
|
|
183
|
+
comments: string;
|
|
184
|
+
time: string;
|
|
185
|
+
title: string;
|
|
186
|
+
type: string;
|
|
187
|
+
data: Data;
|
|
188
|
+
}
|
|
189
|
+
export interface Data {
|
|
190
|
+
action: null;
|
|
191
|
+
review_state: string;
|
|
192
|
+
}
|
|
193
|
+
export interface Transition {
|
|
194
|
+
'@id': string;
|
|
195
|
+
title: string;
|
|
196
|
+
metadata: IndexSignature;
|
|
197
|
+
}
|
|
198
|
+
export interface Addons {
|
|
199
|
+
available: AddonAvailable[];
|
|
200
|
+
installed: string[];
|
|
201
|
+
}
|
|
202
|
+
export interface AddonAvailable {
|
|
203
|
+
id: string;
|
|
204
|
+
title: string;
|
|
205
|
+
dependencies: any[];
|
|
206
|
+
}
|
|
207
|
+
export interface RegistrySchema {
|
|
208
|
+
filters: RegistrySchemaFilter[];
|
|
209
|
+
}
|
|
210
|
+
export interface RegistrySchemaFilter {
|
|
211
|
+
attribute_key: string;
|
|
212
|
+
label: string;
|
|
213
|
+
type: string;
|
|
214
|
+
values?: {
|
|
215
|
+
value: string;
|
|
216
|
+
text: string;
|
|
217
|
+
}[];
|
|
218
|
+
vocabulary?: string;
|
|
219
|
+
input_type?: string;
|
|
220
|
+
}
|
|
221
|
+
export type ReturnSearch<T> = {
|
|
222
|
+
items: T[];
|
|
223
|
+
items_total: number;
|
|
224
|
+
};
|
|
225
|
+
export type ReturnSearchCompatible<T> = {
|
|
226
|
+
member: T[];
|
|
227
|
+
items_count: number;
|
|
228
|
+
items: T[];
|
|
229
|
+
items_total: number;
|
|
230
|
+
};
|
|
231
|
+
export interface ItemColumn {
|
|
232
|
+
label: string;
|
|
233
|
+
key: string;
|
|
234
|
+
isSortable?: boolean;
|
|
235
|
+
child: React.ReactNode;
|
|
236
|
+
}
|
|
237
|
+
export type GuillotinaUser = {
|
|
238
|
+
user_roles: string[];
|
|
239
|
+
user_groups: string[];
|
|
240
|
+
user_permissions: string[];
|
|
241
|
+
fullname: string;
|
|
242
|
+
email: string;
|
|
243
|
+
username: string;
|
|
244
|
+
} & GuillotinaCommonObject;
|
|
245
|
+
export type GuillotinaGroup = {
|
|
246
|
+
user_roles: string[];
|
|
247
|
+
users: string[];
|
|
248
|
+
} & GuillotinaCommonObject;
|
|
249
|
+
export type GuillotinaApplication = {
|
|
250
|
+
databases: string[];
|
|
251
|
+
} & GuillotinaCommonObject;
|
|
252
|
+
export type GuillotinaDatabase = {
|
|
253
|
+
containers: string[];
|
|
254
|
+
} & GuillotinaCommonObject;
|
|
121
255
|
export {};
|
package/dist/views/folder.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function FolderCtx(
|
|
1
|
+
export declare function FolderCtx(): import("react/jsx-runtime").JSX.Element;
|
package/dist/views/groups.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare function GroupToolbar(): import("react/jsx-runtime").JSX.Element;
|
|
2
|
-
export declare function GroupsCtx(
|
|
2
|
+
export declare function GroupsCtx(): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export declare function GroupCtx(): import("react/jsx-runtime").JSX.Element;
|
package/dist/views/item.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function ItemCtx(
|
|
1
|
+
export declare function ItemCtx(): import("react/jsx-runtime").JSX.Element;
|
package/dist/views/users.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare function UsersToolbar(): import("react/jsx-runtime").JSX.Element;
|
|
2
|
-
export declare function UsersCtx(
|
|
2
|
+
export declare function UsersCtx(): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export declare function UserCtx(): import("react/jsx-runtime").JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.29.2-alpha.
|
|
2
|
+
"version": "0.29.2-alpha.3",
|
|
3
3
|
"repository": {
|
|
4
4
|
"type": "git",
|
|
5
5
|
"url": "git@github.com:guillotinaweb/guillotina_react.git"
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
"@testing-library/user-event": "12.6.0",
|
|
38
38
|
"@typescript-eslint/eslint-plugin": "^6.18.1",
|
|
39
39
|
"@typescript-eslint/parser": "^6.18.1",
|
|
40
|
+
"@types/uuid":"9.0.8",
|
|
40
41
|
"babel-plugin-formatjs": "^10.5.10",
|
|
41
42
|
"eslint": "^8.56.0",
|
|
42
43
|
"eslint-plugin-react": "^7.33.2",
|