@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.
@@ -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
@@ -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",
@@ -18,7 +18,7 @@ exports.default = async ({ strapi }) => {
18
18
  plugin: 'page-builder',
19
19
  name,
20
20
  displayName,
21
- category: `Platform`,
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": "category"
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
+ }
@@ -7,6 +7,11 @@ const extendPage = () => {
7
7
  pageContentType.attributes = {
8
8
  ...pageContentType.attributes,
9
9
  isPrivate: {
10
+ pluginOptions: {
11
+ i18n: {
12
+ localized: true
13
+ }
14
+ },
10
15
  type: 'boolean',
11
16
  required: false,
12
17
  default: false
@@ -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',