@webbio/strapi-plugin-page-builder 0.11.17-platform → 0.12.0-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/components/PageFilters/index.tsx +1 -1
- package/dist/package.json +1 -1
- package/dist/server/bootstrap/permissions.js +1 -1
- package/dist/server/content-types/index.js +2 -2
- package/dist/server/content-types/{category → user-categories}/schema.json +4 -4
- package/dist/server/content-types/user-category/schema.json +23 -0
- package/dist/server/services/private-content/page.js +5 -0
- package/dist/server/services/private-content/user.js +11 -1
- package/dist/tsconfig.server.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/server/bootstrap/permissions.ts +1 -1
- package/server/content-types/index.ts +3 -3
- package/server/content-types/user-category/schema.json +23 -0
- package/server/services/private-content/page.ts +6 -0
- package/server/services/private-content/user.ts +11 -1
- package/dist/server/services/private-content/mail-template/txtMail.interface.js +0 -2
- package/server/content-types/category/schema.json +0 -18
|
@@ -10,7 +10,7 @@ import { useHasPlatformRelation } from '../../api/has-platform-relation';
|
|
|
10
10
|
|
|
11
11
|
const PageFiltersContainer = () => {
|
|
12
12
|
const { pathname } = useLocation();
|
|
13
|
-
const uid = pathname.split('/').find((x) => x.startsWith('api::')) || '';
|
|
13
|
+
const uid = pathname.split('/').find((x) => x.startsWith('api::') || x.startsWith('plugin::')) || '';
|
|
14
14
|
const isPageCollectionType = uid === PAGE_UID;
|
|
15
15
|
|
|
16
16
|
const { data: hasPageRelation, isLoading } = useHasPageRelation({
|
package/dist/package.json
CHANGED
|
@@ -18,7 +18,7 @@ exports.default = async ({ strapi }) => {
|
|
|
18
18
|
plugin: 'page-builder',
|
|
19
19
|
name,
|
|
20
20
|
displayName,
|
|
21
|
-
category:
|
|
21
|
+
category: 'Platform',
|
|
22
22
|
handler: async (x) => {
|
|
23
23
|
var _a, _b, _c, _d;
|
|
24
24
|
if (((_a = x === null || x === void 0 ? void 0 : x.permission) === null || _a === void 0 ? void 0 : _a.subject) === 'api::platform.platform') {
|
|
@@ -3,9 +3,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const schema_json_1 = __importDefault(require("./category/schema.json"));
|
|
6
|
+
const schema_json_1 = __importDefault(require("./user-category/schema.json"));
|
|
7
7
|
exports.default = {
|
|
8
|
-
category: {
|
|
8
|
+
'user-category': {
|
|
9
9
|
schema: schema_json_1.default
|
|
10
10
|
}
|
|
11
11
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"kind": "collectionType",
|
|
3
|
-
"collectionName": "categories",
|
|
3
|
+
"collectionName": "user-categories",
|
|
4
4
|
"info": {
|
|
5
|
-
"singularName": "category",
|
|
6
|
-
"pluralName": "categories",
|
|
7
|
-
"displayName": "
|
|
5
|
+
"singularName": "user-category",
|
|
6
|
+
"pluralName": "user-categories",
|
|
7
|
+
"displayName": "User Categories"
|
|
8
8
|
},
|
|
9
9
|
"options": {
|
|
10
10
|
"draftAndPublish": false,
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"kind": "collectionType",
|
|
3
|
+
"collectionName": "user-categories",
|
|
4
|
+
"info": {
|
|
5
|
+
"singularName": "user-category",
|
|
6
|
+
"pluralName": "user-categories",
|
|
7
|
+
"displayName": "User Categories"
|
|
8
|
+
},
|
|
9
|
+
"options": {
|
|
10
|
+
"draftAndPublish": false,
|
|
11
|
+
"comment": ""
|
|
12
|
+
},
|
|
13
|
+
"attributes": {
|
|
14
|
+
"title": {
|
|
15
|
+
"type": "string"
|
|
16
|
+
},
|
|
17
|
+
"platform": {
|
|
18
|
+
"type": "relation",
|
|
19
|
+
"relation": "oneToOne",
|
|
20
|
+
"target": "api::platform.platform"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -56,7 +56,17 @@ const extendUser = () => {
|
|
|
56
56
|
categories: {
|
|
57
57
|
type: 'relation',
|
|
58
58
|
relation: 'oneToMany',
|
|
59
|
-
target: 'plugin::page-builder.category'
|
|
59
|
+
target: 'plugin::page-builder.user-category'
|
|
60
|
+
},
|
|
61
|
+
filteredCategories: {
|
|
62
|
+
pluginOptions: {
|
|
63
|
+
filteredSelect: {
|
|
64
|
+
targetField: 'categories'
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
// @ts-expect-error
|
|
68
|
+
type: 'customField',
|
|
69
|
+
customField: 'plugin::page-builder.filtered-select'
|
|
60
70
|
},
|
|
61
71
|
confirmMailSend: {
|
|
62
72
|
type: 'boolean',
|