@webbio/strapi-plugin-page-builder 0.4.1-platform → 0.4.2-platform
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/admin/src/api/platform-relation.ts +40 -0
- package/admin/src/components/EditView/CollectionTypeSettings/index.tsx +5 -54
- package/admin/src/components/EditView/Details/index.tsx +1 -11
- package/admin/src/components/EditView/PageSettings/index.tsx +15 -47
- package/admin/src/components/EditView/Platform/platform-select.tsx +1 -2
- package/admin/src/components/GlobalPlatformSelect/index.tsx +40 -0
- package/admin/src/components/GlobalPlatformSelect/styles.ts +27 -0
- package/admin/src/components/PageFilters/PlatformFilter/index.tsx +12 -8
- package/admin/src/components/PageFilters/filters.tsx +20 -11
- package/admin/src/components/PluginIcon/index.tsx +85 -3
- package/admin/src/index.tsx +16 -0
- package/admin/src/pages/app/index.tsx +14 -0
- package/admin/src/utils/findDomElement.ts +6 -0
- package/admin/src/utils/findElementParent.ts +20 -0
- package/admin/src/utils/hooks/useDefaultPlatformFromLocalStorage.ts +30 -0
- package/admin/src/utils/hooks/useHideOverviewFilterTags.ts +34 -0
- package/admin/src/utils/hooks/usePlatformFormData.ts +49 -0
- package/dist/package.json +2 -1
- package/dist/server/controllers/platform.js +5 -5
- package/dist/server/routes/index.js +2 -2
- package/dist/server/services/platform.js +6 -11
- package/dist/tsconfig.server.tsbuildinfo +1 -1
- package/package.json +2 -1
- package/server/controllers/platform.ts +5 -5
- package/server/routes/index.ts +2 -2
- package/server/services/platform.ts +6 -12
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webbio/strapi-plugin-page-builder",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2-platform",
|
|
4
4
|
"description": "This is the description of the plugin.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"develop": "tsc -p tsconfig.server.json -w",
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
"url": "https://github.com/webbio/strapi-plugin-page-builder.git"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
+
"@mantine/hooks": "^7.2.2",
|
|
23
24
|
"@strapi/design-system": "^1.11.0",
|
|
24
25
|
"@strapi/helper-plugin": "^4.15.0",
|
|
25
26
|
"@strapi/icons": "^1.11.0",
|
|
@@ -5,14 +5,14 @@ export default {
|
|
|
5
5
|
return await (strapi as Strapi).service('plugin::page-builder.platform').findAll();
|
|
6
6
|
},
|
|
7
7
|
|
|
8
|
-
async
|
|
9
|
-
const
|
|
8
|
+
async findOneById(ctx: any) {
|
|
9
|
+
const id = ctx?.params?.id;
|
|
10
10
|
|
|
11
|
-
if (!
|
|
12
|
-
return ctx.badRequest('
|
|
11
|
+
if (!id) {
|
|
12
|
+
return ctx.badRequest('id is missing.');
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
return await strapi.service('plugin::page-builder.platform').
|
|
15
|
+
return await strapi.service('plugin::page-builder.platform').findOneById(id);
|
|
16
16
|
},
|
|
17
17
|
async findPageTypesByPlatform(ctx: any) {
|
|
18
18
|
const platform = ctx?.params?.platform;
|
package/server/routes/index.ts
CHANGED
|
@@ -1,28 +1,22 @@
|
|
|
1
|
-
import { Common } from '@strapi/strapi';
|
|
2
1
|
import { PLATFORM_UID } from '../../shared/utils/constants';
|
|
3
2
|
|
|
4
3
|
export default {
|
|
5
4
|
async findAll() {
|
|
6
5
|
return await strapi.entityService.findMany(PLATFORM_UID, { populate: '*' });
|
|
7
6
|
},
|
|
8
|
-
async
|
|
9
|
-
return await strapi.entityService.
|
|
10
|
-
populate: '*'
|
|
11
|
-
filters: {
|
|
12
|
-
pagetype: {
|
|
13
|
-
uid
|
|
14
|
-
}
|
|
15
|
-
}
|
|
7
|
+
async findOneById(id: string) {
|
|
8
|
+
return await strapi.entityService.findOne(PLATFORM_UID, id, {
|
|
9
|
+
populate: '*'
|
|
16
10
|
});
|
|
17
11
|
},
|
|
18
|
-
async findPageTypesByPlatform(
|
|
12
|
+
async findPageTypesByPlatform(id: string) {
|
|
19
13
|
const results = await strapi.entityService.findMany(PLATFORM_UID, {
|
|
20
14
|
populate: {
|
|
21
15
|
pagetype: true
|
|
22
16
|
},
|
|
23
17
|
filters: {
|
|
24
|
-
|
|
25
|
-
$eq:
|
|
18
|
+
id: {
|
|
19
|
+
$eq: id
|
|
26
20
|
}
|
|
27
21
|
}
|
|
28
22
|
});
|