@blaze-cms/plugin-data-ui 0.146.0-core-styles.43 → 0.146.0-node18.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 +13 -163
- package/lib/components/EntityDataListing/EntityDataListing.js.map +1 -1
- package/lib/components/EntityDataListing/index.js.map +1 -1
- package/lib/components/EntityManager/Entity/EntitiyNavLinks/EntityNavLinks.js +1 -0
- package/lib/components/EntityManager/Entity/EntitiyNavLinks/EntityNavLinks.js.map +1 -1
- package/lib/components/EntityManager/Entity/EntitiyNavLinks/index.js.map +1 -1
- package/lib/components/EntityManager/Entity/Entity.js +18 -18
- package/lib/components/EntityManager/Entity/Entity.js.map +1 -1
- package/lib/components/EntityManager/Entity/EntityHeader/EntityHeader.js +1 -1
- package/lib/components/EntityManager/Entity/EntityHeader/EntityHeader.js.map +1 -1
- package/lib/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js +1 -1
- package/lib/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js.map +1 -1
- package/lib/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/index.js.map +1 -1
- package/lib/components/EntityManager/Entity/EntityHeader/index.js.map +1 -1
- package/lib/components/EntityManager/Entity/SideBarRelations/container/CustomSidebarInfoContainer.js +1 -1
- package/lib/components/EntityManager/Entity/SideBarRelations/container/CustomSidebarInfoContainer.js.map +1 -1
- package/lib/components/EntityManager/Entity/SideBarRelations/helpers/build-dynamic-query.js +1 -0
- package/lib/components/EntityManager/Entity/SideBarRelations/helpers/build-dynamic-query.js.map +1 -1
- package/lib/components/EntityManager/Entity/SideBarRelations/hooks/useCustomSidebarData.js.map +1 -1
- package/lib/components/EntityManager/Entity/SideBarRelations/index.js +9 -9
- package/lib/components/EntityManager/Entity/SideBarRelations/index.js.map +1 -1
- package/lib/components/EntityManager/Entity/SideBarRelations/presentational/CustomSidebarInfo.js +1 -1
- package/lib/components/EntityManager/Entity/SideBarRelations/presentational/CustomSidebarInfo.js.map +1 -1
- package/lib/components/EntityManager/Entity/actions-handlers/create/index.js.map +1 -1
- package/lib/components/EntityManager/Entity/actions-handlers/create/submit.js +2 -2
- package/lib/components/EntityManager/Entity/actions-handlers/create/submit.js.map +1 -1
- package/lib/components/EntityManager/Entity/actions-handlers/delete/delete.js +1 -1
- package/lib/components/EntityManager/Entity/actions-handlers/delete/delete.js.map +1 -1
- package/lib/components/EntityManager/Entity/actions-handlers/delete/index.js.map +1 -1
- package/lib/components/EntityManager/Entity/actions-handlers/index.js.map +1 -1
- package/lib/components/EntityManager/Entity/actions-handlers/shared/index.js.map +1 -1
- package/lib/components/EntityManager/Entity/actions-handlers/shared/publish.js +1 -1
- package/lib/components/EntityManager/Entity/actions-handlers/shared/publish.js.map +1 -1
- package/lib/components/EntityManager/Entity/actions-handlers/update/index.js.map +1 -1
- package/lib/components/EntityManager/Entity/actions-handlers/update/submit.js +6 -6
- package/lib/components/EntityManager/Entity/actions-handlers/update/submit.js.map +1 -1
- package/lib/components/EntityManager/Entity/index.js.map +1 -1
- package/lib/components/EntityManager/EntityManager.js +9 -9
- package/lib/components/EntityManager/EntityManager.js.map +1 -1
- package/lib/components/EntityManager/index.js.map +1 -1
- package/lib/components/EntityManager/utils/RecordEditContext/index.js.map +1 -1
- package/lib/components/EntityManager/utils/data-mappers.js +8 -8
- package/lib/components/EntityManager/utils/data-mappers.js.map +1 -1
- package/lib/components/EntityManager/utils/entity.js +8 -8
- package/lib/components/EntityManager/utils/entity.js.map +1 -1
- package/lib/components/EntityManager/utils/entityAvailableActions.js +2 -2
- package/lib/components/EntityManager/utils/entityAvailableActions.js.map +1 -1
- package/lib/components/EntityManager/utils/is-form-empty.js.map +1 -1
- package/lib/components/EntityManager/utils/query.js.map +1 -1
- package/lib/components/InfoBoxes/InfoBoxes.js +1 -0
- package/lib/components/InfoBoxes/InfoBoxes.js.map +1 -1
- package/lib/components/InfoBoxes/container/InfoBoxContainer.js +4 -4
- package/lib/components/InfoBoxes/container/InfoBoxContainer.js.map +1 -1
- package/lib/components/InfoBoxes/helpers/build-dynamic-query.js +1 -0
- package/lib/components/InfoBoxes/helpers/build-dynamic-query.js.map +1 -1
- package/lib/components/InfoBoxes/hooks/useData.js.map +1 -1
- package/lib/components/InfoBoxes/hooks/useInfoBox.js.map +1 -1
- package/lib/components/InfoBoxes/index.js.map +1 -1
- package/lib/components/InfoBoxes/presentational/InfoBox.js +2 -2
- package/lib/components/InfoBoxes/presentational/InfoBox.js.map +1 -1
- package/lib/components/InfoBoxes/presentational/InfoBoxLabel.js.map +1 -1
- package/lib/components/InfoBoxes/presentational/InfoBoxValue.js.map +1 -1
- package/lib/components/ListingTable/ListingTable.js +19 -19
- package/lib/components/ListingTable/ListingTable.js.map +1 -1
- package/lib/components/ListingTable/ListingTableContent/ListingTableContent.js +2 -2
- package/lib/components/ListingTable/ListingTableContent/ListingTableContent.js.map +1 -1
- package/lib/components/ListingTable/ListingTableContent/index.js.map +1 -1
- package/lib/components/ListingTable/TableActions/TableActions.js.map +1 -1
- package/lib/components/ListingTable/TableActions/index.js.map +1 -1
- package/lib/components/ListingTable/index.js.map +1 -1
- package/lib/components/ListingTable/mappers/populate-rows.js +9 -9
- package/lib/components/ListingTable/mappers/populate-rows.js.map +1 -1
- package/lib/components/ListingTable/service/index.js +8 -7
- package/lib/components/ListingTable/service/index.js.map +1 -1
- package/lib/components/Tabs/index.js +3 -3
- package/lib/components/Tabs/index.js.map +1 -1
- package/lib/components/hooks/useCallbackDebounce.js.map +1 -1
- package/lib/constants.js.map +1 -1
- package/lib/icons/ContentIcon.js.map +1 -1
- package/lib/icons/SettingsIcon.js.map +1 -1
- package/lib/icons/TaxonomyIcon.js.map +1 -1
- package/lib/icons/UsersIcon.js.map +1 -1
- package/lib/icons/index.js.map +1 -1
- package/lib/index.js +11 -11
- package/lib/index.js.map +1 -1
- package/lib/utils/add-content-menu-items.js +2 -2
- package/lib/utils/add-content-menu-items.js.map +1 -1
- package/lib/utils/build-create-entity-mutation.js.map +1 -1
- package/lib/utils/build-delete-entity-mutation.js.map +1 -1
- package/lib/utils/build-listing-query.js.map +1 -1
- package/lib/utils/build-update-data-query.js.map +1 -1
- package/lib/utils/build-update-publish-unpublish-mutation.js.map +1 -1
- package/lib/utils/get-default-query-params.js.map +1 -1
- package/lib/utils/hoc/withContext.js.map +1 -1
- package/lib/utils/hooks/useToggle.js.map +1 -1
- package/lib/utils/index.js.map +1 -1
- package/lib-es/components/EntityDataListing/EntityDataListing.js.map +1 -1
- package/lib-es/components/EntityDataListing/index.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/EntitiyNavLinks/EntityNavLinks.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/EntitiyNavLinks/index.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/Entity.js +1 -1
- package/lib-es/components/EntityManager/Entity/Entity.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/EntityHeader/EntityHeader.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/HeaderPreviewButton.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/EntityHeader/HeaderPreviewButton/index.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/EntityHeader/index.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/SideBarRelations/container/CustomSidebarInfoContainer.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/SideBarRelations/helpers/build-dynamic-query.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/SideBarRelations/hooks/useCustomSidebarData.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/SideBarRelations/index.js +1 -1
- package/lib-es/components/EntityManager/Entity/SideBarRelations/index.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/SideBarRelations/presentational/CustomSidebarInfo.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/actions-handlers/create/index.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/actions-handlers/create/submit.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/actions-handlers/delete/delete.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/actions-handlers/delete/index.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/actions-handlers/index.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/actions-handlers/shared/index.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/actions-handlers/shared/publish.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/actions-handlers/update/index.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/actions-handlers/update/submit.js.map +1 -1
- package/lib-es/components/EntityManager/Entity/index.js.map +1 -1
- package/lib-es/components/EntityManager/EntityManager.js.map +1 -1
- package/lib-es/components/EntityManager/index.js.map +1 -1
- package/lib-es/components/EntityManager/utils/RecordEditContext/index.js.map +1 -1
- package/lib-es/components/EntityManager/utils/data-mappers.js.map +1 -1
- package/lib-es/components/EntityManager/utils/entity.js.map +1 -1
- package/lib-es/components/EntityManager/utils/entityAvailableActions.js.map +1 -1
- package/lib-es/components/EntityManager/utils/is-form-empty.js.map +1 -1
- package/lib-es/components/EntityManager/utils/query.js.map +1 -1
- package/lib-es/components/InfoBoxes/InfoBoxes.js.map +1 -1
- package/lib-es/components/InfoBoxes/container/InfoBoxContainer.js.map +1 -1
- package/lib-es/components/InfoBoxes/helpers/build-dynamic-query.js.map +1 -1
- package/lib-es/components/InfoBoxes/hooks/useData.js.map +1 -1
- package/lib-es/components/InfoBoxes/hooks/useInfoBox.js.map +1 -1
- package/lib-es/components/InfoBoxes/index.js.map +1 -1
- package/lib-es/components/InfoBoxes/presentational/InfoBox.js.map +1 -1
- package/lib-es/components/InfoBoxes/presentational/InfoBoxLabel.js.map +1 -1
- package/lib-es/components/InfoBoxes/presentational/InfoBoxValue.js.map +1 -1
- package/lib-es/components/ListingTable/ListingTable.js +1 -1
- package/lib-es/components/ListingTable/ListingTable.js.map +1 -1
- package/lib-es/components/ListingTable/ListingTableContent/ListingTableContent.js +2 -2
- package/lib-es/components/ListingTable/ListingTableContent/ListingTableContent.js.map +1 -1
- package/lib-es/components/ListingTable/ListingTableContent/index.js.map +1 -1
- package/lib-es/components/ListingTable/TableActions/TableActions.js.map +1 -1
- package/lib-es/components/ListingTable/TableActions/index.js.map +1 -1
- package/lib-es/components/ListingTable/index.js.map +1 -1
- package/lib-es/components/ListingTable/mappers/populate-rows.js.map +1 -1
- package/lib-es/components/ListingTable/service/index.js.map +1 -1
- package/lib-es/components/Tabs/index.js.map +1 -1
- package/lib-es/components/hooks/useCallbackDebounce.js.map +1 -1
- package/lib-es/constants.js.map +1 -1
- package/lib-es/icons/ContentIcon.js.map +1 -1
- package/lib-es/icons/SettingsIcon.js.map +1 -1
- package/lib-es/icons/TaxonomyIcon.js.map +1 -1
- package/lib-es/icons/UsersIcon.js.map +1 -1
- package/lib-es/icons/index.js.map +1 -1
- package/lib-es/index.js +2 -2
- package/lib-es/index.js.map +1 -1
- package/lib-es/utils/add-content-menu-items.js.map +1 -1
- package/lib-es/utils/build-create-entity-mutation.js.map +1 -1
- package/lib-es/utils/build-delete-entity-mutation.js.map +1 -1
- package/lib-es/utils/build-listing-query.js.map +1 -1
- package/lib-es/utils/build-update-data-query.js.map +1 -1
- package/lib-es/utils/build-update-publish-unpublish-mutation.js.map +1 -1
- package/lib-es/utils/get-default-query-params.js.map +1 -1
- package/lib-es/utils/hoc/withContext.js.map +1 -1
- package/lib-es/utils/hooks/useToggle.js.map +1 -1
- package/lib-es/utils/index.js.map +1 -1
- package/package.json +17 -16
- package/src/components/EntityManager/Entity/Entity.js +41 -44
- package/src/components/EntityManager/Entity/EntityHeader/EntityHeader.js +1 -2
- package/src/components/EntityManager/Entity/SideBarRelations/hooks/useCustomSidebarData.js +9 -7
- package/src/components/EntityManager/Entity/SideBarRelations/index.js +40 -51
- package/src/components/EntityManager/EntityManager.js +52 -45
- package/src/components/InfoBoxes/container/InfoBoxContainer.js +3 -6
- package/src/components/InfoBoxes/hooks/useData.js +6 -1
- package/src/components/ListingTable/ListingTable.js +26 -29
- package/src/components/ListingTable/ListingTableContent/ListingTableContent.js +15 -17
- package/src/components/ListingTable/service/index.js +2 -3
- package/src/index.js +4 -4
|
@@ -19,56 +19,63 @@ const EntityManager = ({ match, history }) => {
|
|
|
19
19
|
|
|
20
20
|
const { action, entityIdentifier, id = null, onViewUrl } = match.params;
|
|
21
21
|
|
|
22
|
-
useEffect(
|
|
23
|
-
() => {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
addToast(PAGE_NOT_FOUND, {
|
|
34
|
-
appearance: ERROR,
|
|
35
|
-
autoDismiss: true
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
history.push(`/data-listing/${entityIdentifier}`);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
let localData = data;
|
|
42
|
-
|
|
43
|
-
if (isPageBuilderTemplateSet(data)) {
|
|
44
|
-
const pageBuilderComponents = await getPageBuilderComponents({
|
|
45
|
-
entitySchema,
|
|
46
|
-
client,
|
|
47
|
-
id
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
localData = {
|
|
51
|
-
...localData,
|
|
52
|
-
pageBuilder: pageBuilderComponents || localData.pageBuilder
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
setFormData({ values: localData });
|
|
57
|
-
setEntity(data);
|
|
58
|
-
setSchema(entitySchema);
|
|
59
|
-
setPreviousQuery(requestedQuery);
|
|
60
|
-
setShouldRefetch(false);
|
|
61
|
-
} catch (error) {
|
|
62
|
-
addToast(error.message, {
|
|
22
|
+
useEffect(() => {
|
|
23
|
+
(async () => {
|
|
24
|
+
try {
|
|
25
|
+
const [entitySchema, data = {}, requestedQuery] = await entityAvailableActions[action]({
|
|
26
|
+
client,
|
|
27
|
+
identifier: entityIdentifier,
|
|
28
|
+
id
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
if (!data) {
|
|
32
|
+
addToast(PAGE_NOT_FOUND, {
|
|
63
33
|
appearance: ERROR,
|
|
64
34
|
autoDismiss: true
|
|
65
35
|
});
|
|
36
|
+
|
|
66
37
|
history.push(`/data-listing/${entityIdentifier}`);
|
|
67
38
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
39
|
+
|
|
40
|
+
let localData = data;
|
|
41
|
+
|
|
42
|
+
if (isPageBuilderTemplateSet(data)) {
|
|
43
|
+
const pageBuilderComponents = await getPageBuilderComponents({
|
|
44
|
+
entitySchema,
|
|
45
|
+
client,
|
|
46
|
+
id
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
localData = {
|
|
50
|
+
...localData,
|
|
51
|
+
pageBuilder: pageBuilderComponents || localData.pageBuilder
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
setFormData({ values: localData });
|
|
56
|
+
setEntity(data);
|
|
57
|
+
setSchema(entitySchema);
|
|
58
|
+
setPreviousQuery(requestedQuery);
|
|
59
|
+
setShouldRefetch(false);
|
|
60
|
+
} catch (error) {
|
|
61
|
+
addToast(error.message, {
|
|
62
|
+
appearance: ERROR,
|
|
63
|
+
autoDismiss: true
|
|
64
|
+
});
|
|
65
|
+
history.push(`/data-listing/${entityIdentifier}`);
|
|
66
|
+
}
|
|
67
|
+
})();
|
|
68
|
+
}, [
|
|
69
|
+
action,
|
|
70
|
+
addToast,
|
|
71
|
+
client,
|
|
72
|
+
entityIdentifier,
|
|
73
|
+
history,
|
|
74
|
+
history.push,
|
|
75
|
+
id,
|
|
76
|
+
schema,
|
|
77
|
+
shouldRefetch
|
|
78
|
+
]);
|
|
72
79
|
|
|
73
80
|
const updateFormData = (updatedFormData, shouldRefresh) => {
|
|
74
81
|
if (shouldRefresh) setShouldRefetch(true);
|
|
@@ -9,12 +9,9 @@ const InfoBoxContainer = ({ id, schema, infoBox }) => {
|
|
|
9
9
|
|
|
10
10
|
const { data, refetch } = useData({ id, schema, infoBox });
|
|
11
11
|
|
|
12
|
-
useEffect(
|
|
13
|
-
()
|
|
14
|
-
|
|
15
|
-
},
|
|
16
|
-
[externalUpdateTime, refetch]
|
|
17
|
-
);
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
refetch();
|
|
14
|
+
}, [externalUpdateTime, refetch]);
|
|
18
15
|
|
|
19
16
|
if (!data || !Object.keys(data) || Object.keys(data).length === 0) return null;
|
|
20
17
|
|
|
@@ -12,7 +12,12 @@ function useData({ id, schema, infoBox }) {
|
|
|
12
12
|
}
|
|
13
13
|
`;
|
|
14
14
|
|
|
15
|
-
const {
|
|
15
|
+
const {
|
|
16
|
+
data = {},
|
|
17
|
+
loading,
|
|
18
|
+
error,
|
|
19
|
+
refetch
|
|
20
|
+
} = useQuery(infoBoxQuery, {
|
|
16
21
|
variables: { id },
|
|
17
22
|
skip: !query
|
|
18
23
|
});
|
|
@@ -144,7 +144,6 @@ const ListingTable = ({ match, entitySchema, history }) => {
|
|
|
144
144
|
});
|
|
145
145
|
history.push('?page=1');
|
|
146
146
|
};
|
|
147
|
-
|
|
148
147
|
if (!tableData || !tableData.rows) return 'loading';
|
|
149
148
|
|
|
150
149
|
const {
|
|
@@ -160,35 +159,33 @@ const ListingTable = ({ match, entitySchema, history }) => {
|
|
|
160
159
|
|
|
161
160
|
return (
|
|
162
161
|
<div className="page">
|
|
163
|
-
{modalStatus &&
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
)}
|
|
162
|
+
{modalStatus && _deleteAction.active && (
|
|
163
|
+
<DeleteAction
|
|
164
|
+
data-testid="deleteEntity"
|
|
165
|
+
onClose={toggleModal}
|
|
166
|
+
deleteAction={deleteAction}
|
|
167
|
+
itemName={itemToDelete.name}
|
|
168
|
+
/>
|
|
169
|
+
)}
|
|
172
170
|
<PageHeader title={entitySchema.displayName} subtitle="">
|
|
173
|
-
{createAction.active &&
|
|
174
|
-
|
|
175
|
-
<
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
<
|
|
183
|
-
<More>
|
|
184
|
-
<
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
)}
|
|
171
|
+
{createAction.active && !showAddButton && (
|
|
172
|
+
<>
|
|
173
|
+
<Link
|
|
174
|
+
data-testid="addEntity"
|
|
175
|
+
className="button button--small"
|
|
176
|
+
to={`${match.url}/create`}>
|
|
177
|
+
Add
|
|
178
|
+
</Link>
|
|
179
|
+
<PageHeader.Actions>
|
|
180
|
+
<More>
|
|
181
|
+
<More.Avatar isMoreMenu>
|
|
182
|
+
<span className="material-icons">more_vert</span>
|
|
183
|
+
</More.Avatar>
|
|
184
|
+
<More.Content isMoreMenu />
|
|
185
|
+
</More>
|
|
186
|
+
</PageHeader.Actions>
|
|
187
|
+
</>
|
|
188
|
+
)}
|
|
192
189
|
</PageHeader>
|
|
193
190
|
{showAddButton ? (
|
|
194
191
|
<CardPrompt>
|
|
@@ -20,23 +20,21 @@ const ListingTableContent = ({
|
|
|
20
20
|
return (
|
|
21
21
|
<>
|
|
22
22
|
{displayTable ? (
|
|
23
|
-
|
|
24
|
-
<
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
</div>
|
|
39
|
-
</>
|
|
23
|
+
<div className={className}>
|
|
24
|
+
<Table
|
|
25
|
+
onSort={onSort}
|
|
26
|
+
data={tableData}
|
|
27
|
+
checkboxes={!isEnquiry}
|
|
28
|
+
onSelect={handleSelect}
|
|
29
|
+
data-testid="listing-table-content"
|
|
30
|
+
/>
|
|
31
|
+
<Pagination
|
|
32
|
+
visiblePages={10}
|
|
33
|
+
totalItems={totalItems}
|
|
34
|
+
currentPage={currentPage}
|
|
35
|
+
onPageChange={handleOnPageChange}
|
|
36
|
+
/>
|
|
37
|
+
</div>
|
|
40
38
|
) : (
|
|
41
39
|
<span className="table-no-results" data-testid="no-results">
|
|
42
40
|
No results
|
|
@@ -34,9 +34,8 @@ function buildVariables({ entitySchema, isSearchQuery, listFilters = [], queryPa
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
const fetchData = async ({ client, querySettings: { entitySchema, queryParams }, listFilters }) => {
|
|
37
|
-
const {
|
|
38
|
-
|
|
39
|
-
} = entitySchema;
|
|
37
|
+
const { displayProperties: { adminListings: { dataSource: { source } = {} } = {} } = {} } =
|
|
38
|
+
entitySchema;
|
|
40
39
|
|
|
41
40
|
const isSearchQuery = source === 'search';
|
|
42
41
|
const query = buildListingQuery(entitySchema, isSearchQuery);
|
package/src/index.js
CHANGED
|
@@ -5,11 +5,11 @@ import { DATA_LISTING_PREFIX, PLUGIN_NAME } from './constants';
|
|
|
5
5
|
import getAddContentMenuItems from './utils/add-content-menu-items';
|
|
6
6
|
import { UserIcon, TaxonomyIcon, ContentIcon, SettingsIcon } from './icons';
|
|
7
7
|
|
|
8
|
-
const EntityDataListing = React.lazy(
|
|
9
|
-
import(/* webpackChunkName: 'EntityDataListing' */ './components/EntityDataListing')
|
|
8
|
+
const EntityDataListing = React.lazy(
|
|
9
|
+
() => import(/* webpackChunkName: 'EntityDataListing' */ './components/EntityDataListing')
|
|
10
10
|
);
|
|
11
|
-
const EntityManager = React.lazy(
|
|
12
|
-
import(/* webpackChunkName: 'EntityManager' */ './components/EntityManager')
|
|
11
|
+
const EntityManager = React.lazy(
|
|
12
|
+
() => import(/* webpackChunkName: 'EntityManager' */ './components/EntityManager')
|
|
13
13
|
);
|
|
14
14
|
|
|
15
15
|
export default async function load(app) {
|