@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webbio/strapi-plugin-page-builder",
3
- "version": "0.11.17-platform",
3
+ "version": "0.12.0-platform",
4
4
  "description": "This is the description of the plugin.",
5
5
  "scripts": {
6
6
  "develop": "tsc -p tsconfig.server.json -w",
@@ -16,7 +16,7 @@ export default async ({ strapi }: { strapi: Strapi }) => {
16
16
  plugin: 'page-builder',
17
17
  name,
18
18
  displayName,
19
- category: `Platform`,
19
+ category: 'Platform',
20
20
  handler: async (x) => {
21
21
  if (x?.permission?.subject === 'api::platform.platform') {
22
22
  return {
@@ -1,7 +1,7 @@
1
- import category from './category/schema.json';
1
+ import userCategory from './user-category/schema.json';
2
2
 
3
3
  export default {
4
- category: {
5
- schema: category
4
+ 'user-category': {
5
+ schema: userCategory
6
6
  }
7
7
  };
@@ -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
+ }
@@ -5,6 +5,12 @@ export const extendPage = () => {
5
5
  pageContentType.attributes = {
6
6
  ...pageContentType.attributes,
7
7
  isPrivate: {
8
+ pluginOptions: {
9
+ i18n: {
10
+ localized: true
11
+ }
12
+ },
13
+
8
14
  type: 'boolean',
9
15
  required: false,
10
16
  default: false
@@ -60,7 +60,17 @@ export const extendUser = () => {
60
60
  categories: {
61
61
  type: 'relation',
62
62
  relation: 'oneToMany',
63
- target: 'plugin::page-builder.category'
63
+ target: 'plugin::page-builder.user-category'
64
+ },
65
+ filteredCategories: {
66
+ pluginOptions: {
67
+ filteredSelect: {
68
+ targetField: 'categories'
69
+ }
70
+ },
71
+ // @ts-expect-error
72
+ type: 'customField',
73
+ customField: 'plugin::page-builder.filtered-select'
64
74
  },
65
75
  confirmMailSend: {
66
76
  type: 'boolean',
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,18 +0,0 @@
1
- {
2
- "kind": "collectionType",
3
- "collectionName": "categories",
4
- "info": {
5
- "singularName": "category",
6
- "pluralName": "categories",
7
- "displayName": "category"
8
- },
9
- "options": {
10
- "draftAndPublish": false,
11
- "comment": ""
12
- },
13
- "attributes": {
14
- "title": {
15
- "type": "string"
16
- }
17
- }
18
- }