@guillotinaweb/react-gmi 0.22.0 → 0.22.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/CHANGELOG.md +14 -0
- package/README.md +18 -10
- package/dist/components/fields/renderField.d.ts +4 -0
- package/dist/react-gmi.esm.js +3 -13
- package/dist/react-gmi.esm.js.map +1 -1
- package/dist/react-gmi.js +3 -12
- package/dist/react-gmi.js.map +1 -1
- package/dist/react-gmi.modern.js +3 -13
- package/dist/react-gmi.modern.js.map +1 -1
- package/dist/react-gmi.umd.js +3 -12
- package/dist/react-gmi.umd.js.map +1 -1
- package/package.json +2 -2
package/dist/react-gmi.modern.js
CHANGED
|
@@ -576,14 +576,6 @@ function useConfig(cfg) {
|
|
|
576
576
|
return calculated;
|
|
577
577
|
}
|
|
578
578
|
|
|
579
|
-
const getId = item => {
|
|
580
|
-
if (item['@id']) {
|
|
581
|
-
return item['@id'];
|
|
582
|
-
}
|
|
583
|
-
|
|
584
|
-
return item['@absolute_url'];
|
|
585
|
-
};
|
|
586
|
-
|
|
587
579
|
function RemoveItems(props) {
|
|
588
580
|
const Ctx = useTraversal();
|
|
589
581
|
const cfg = useConfig();
|
|
@@ -598,8 +590,7 @@ function RemoveItems(props) {
|
|
|
598
590
|
let errors = [];
|
|
599
591
|
setLoading(true);
|
|
600
592
|
const actions = items.map(async item => {
|
|
601
|
-
|
|
602
|
-
const res = await Ctx.client.delete(getId(item));
|
|
593
|
+
const res = await Ctx.client.delete(`${Ctx.path}${item['@name']}`);
|
|
603
594
|
|
|
604
595
|
if (!res.ok) {
|
|
605
596
|
const err = await res.json();
|
|
@@ -2437,7 +2428,6 @@ const DownloadField = ({
|
|
|
2437
2428
|
};
|
|
2438
2429
|
|
|
2439
2430
|
const plain = ['string', 'number', 'boolean'];
|
|
2440
|
-
|
|
2441
2431
|
function RenderField({
|
|
2442
2432
|
value,
|
|
2443
2433
|
Widget
|
|
@@ -4027,7 +4017,7 @@ function AddPermission({
|
|
|
4027
4017
|
value: group.id
|
|
4028
4018
|
}));
|
|
4029
4019
|
const users = principalsData.users.map(user => ({
|
|
4030
|
-
text: user.fullname,
|
|
4020
|
+
text: user.fullname || user.id,
|
|
4031
4021
|
value: user.id
|
|
4032
4022
|
}));
|
|
4033
4023
|
principals = [...groups, ...users];
|
|
@@ -6261,5 +6251,5 @@ class Auth {
|
|
|
6261
6251
|
|
|
6262
6252
|
}
|
|
6263
6253
|
|
|
6264
|
-
export { ACTIONS_OBJECT, AddItem, AddPermission, AllItemsCheckbox, ApplicationCtx, Auth, AuthContext, BaseForm, BehaviorNotImplemented, BehaviorsView, Button, Checkbox, ClientContext, ClientProvider, Config, Confirm, ContainerCtx, ContextToolbar, CreateButton, CreateContainer, DEFAULT_VALUE_EDITABLE_FIELD, DEFAULT_VALUE_NO_EDITABLE_FIELD, DatabaseCtx, Delete, DownloadField, EditableField, EmailInput, FileUpload, Flash, FolderCtx, Form, FormBuilder, GroupCtx, GroupToolbar, GroupsCtx, Guillotina, GuillotinaClient, IAttachment, IDublinCore, IMultiAttachment, Icon, Input, InputList, Item, ItemCheckbox, ItemCtx, ItemModel, ItemTitle, ItemsActionsDropdown, ItemsActionsProvider, Layout, Link, Loading, Login, Modal, NotAllowed, Notification, Pagination, PanelActions, PanelAddons, PanelBehaviors, PanelItems, PanelNotImplemented, PanelPermissions, PanelProperties, PasswordInput, Path, PathTree, PermissionPrinperm, PermissionPrinrole, PermissionRoleperm, Permissions, PropertiesButtonView, PropertiesView, REGEX_EMAIL, REGEX_HEX_COLOR, REGEX_NUMBER, REGEX_URL, RItem, RemoveItems, RenderFieldComponent, RequiredFieldsForm, RestClient, SearchInput, SearchLabels, Select, Sharing, Table, TabsPanel, Tag, TagsWidget, TdLink, Textarea, TraversalContext, TraversalProvider, UserCtx, UserForm, UsersCtx, UsersToolbar, actions, base64ToArrayBuffer, buildQs, classnames, defaultComponent, formatDate, generateUID, get$1 as get, getClient, getNewId, isEmail, isEmpty, isHexColor, isNumber, isURL, lightFileReader, maxLength, minLength, noop, notEmpty, parser, sleep, stringToSlug, toQueryString, useConfig, useCrudContext, useGuillotinaClient, useLocation, useRegistry, useRemoteField, useTraversal };
|
|
6254
|
+
export { ACTIONS_OBJECT, AddItem, AddPermission, AllItemsCheckbox, ApplicationCtx, Auth, AuthContext, BaseForm, BehaviorNotImplemented, BehaviorsView, Button, Checkbox, ClientContext, ClientProvider, Config, Confirm, ContainerCtx, ContextToolbar, CreateButton, CreateContainer, DEFAULT_VALUE_EDITABLE_FIELD, DEFAULT_VALUE_NO_EDITABLE_FIELD, DatabaseCtx, Delete, DownloadField, EditableField, EmailInput, FileUpload, Flash, FolderCtx, Form, FormBuilder, GroupCtx, GroupToolbar, GroupsCtx, Guillotina, GuillotinaClient, IAttachment, IDublinCore, IMultiAttachment, Icon, Input, InputList, Item, ItemCheckbox, ItemCtx, ItemModel, ItemTitle, ItemsActionsDropdown, ItemsActionsProvider, Layout, Link, Loading, Login, Modal, NotAllowed, Notification, Pagination, PanelActions, PanelAddons, PanelBehaviors, PanelItems, PanelNotImplemented, PanelPermissions, PanelProperties, PasswordInput, Path, PathTree, PermissionPrinperm, PermissionPrinrole, PermissionRoleperm, Permissions, PropertiesButtonView, PropertiesView, REGEX_EMAIL, REGEX_HEX_COLOR, REGEX_NUMBER, REGEX_URL, RItem, RemoveItems, RenderField, RenderFieldComponent, RequiredFieldsForm, RestClient, SearchInput, SearchLabels, Select, Sharing, Table, TabsPanel, Tag, TagsWidget, TdLink, Textarea, TraversalContext, TraversalProvider, UserCtx, UserForm, UsersCtx, UsersToolbar, actions, base64ToArrayBuffer, buildQs, classnames, defaultComponent, formatDate, generateUID, get$1 as get, getClient, getNewId, isEmail, isEmpty, isHexColor, isNumber, isURL, lightFileReader, maxLength, minLength, noop, notEmpty, parser, sleep, stringToSlug, toQueryString, useConfig, useCrudContext, useGuillotinaClient, useLocation, useRegistry, useRemoteField, useTraversal };
|
|
6265
6255
|
//# sourceMappingURL=react-gmi.modern.js.map
|