@webbio/strapi-plugin-page-builder 0.0.11 → 0.0.12
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/dist/admin/src/pluginId.js +8 -0
- package/dist/package.json +71 -0
- package/dist/server/bootstrap.js +95 -0
- package/dist/server/config/index.js +6 -0
- package/dist/server/content-types/index.js +3 -0
- package/dist/server/controllers/collection-types.js +19 -0
- package/dist/server/controllers/index.js +13 -0
- package/dist/server/controllers/page-type.js +13 -0
- package/dist/server/controllers/page.js +17 -0
- package/dist/server/destroy.js +5 -0
- package/dist/server/index.js +27 -0
- package/dist/server/middlewares/index.js +3 -0
- package/dist/server/policies/index.js +3 -0
- package/dist/server/register.js +6 -0
- package/dist/server/routes/index.js +43 -0
- package/dist/server/schema/page-end.json +97 -0
- package/dist/server/schema/page-start.json +87 -0
- package/dist/server/schema/page-type-end.json +49 -0
- package/dist/server/schema/page-type-start.json +44 -0
- package/dist/server/schema/template.json +35 -0
- package/dist/server/services/builder.js +97 -0
- package/dist/server/services/collection-types.js +46 -0
- package/dist/server/services/index.js +15 -0
- package/dist/server/services/page-type.js +24 -0
- package/dist/server/services/page.js +25 -0
- package/dist/server/utils/graphql.js +97 -0
- package/dist/server/utils/reload-strapi-on-load.js +12 -0
- package/dist/shared/utils/constants.js +7 -0
- package/dist/tsconfig.server.tsbuildinfo +1 -0
- package/package.json +5 -1
- package/.prettierignore +0 -17
- package/admin/src/api/collection-type.ts +0 -110
- package/admin/src/api/has-page-relation.ts +0 -34
- package/admin/src/api/page-type.ts +0 -31
- package/admin/src/api/template.ts +0 -25
- package/admin/src/components/Combobox/index.tsx +0 -77
- package/admin/src/components/Combobox/react-select-custom-styles.tsx +0 -111
- package/admin/src/components/Combobox/styles.ts +0 -22
- package/admin/src/components/ConfirmModal/index.tsx +0 -90
- package/admin/src/components/EditView/CollectionTypeSearch/index.tsx +0 -118
- package/admin/src/components/EditView/CollectionTypeSettings/CreatePageButton/index.tsx +0 -95
- package/admin/src/components/EditView/CollectionTypeSettings/CreatePageButton/styles.ts +0 -26
- package/admin/src/components/EditView/CollectionTypeSettings/index.tsx +0 -53
- package/admin/src/components/EditView/Details/index.tsx +0 -47
- package/admin/src/components/EditView/Details/styles.ts +0 -51
- package/admin/src/components/EditView/PageSettings/index.tsx +0 -104
- package/admin/src/components/EditView/Template/TemplateConfirmModal/index.tsx +0 -36
- package/admin/src/components/EditView/Template/TemplateSelect/index.tsx +0 -64
- package/admin/src/components/EditView/Template/TemplateSelect/use-template-modules.ts +0 -30
- package/admin/src/components/EditView/index.tsx +0 -27
- package/admin/src/components/EditView/page-type-select.tsx +0 -30
- package/admin/src/components/EditView/wrapper.tsx +0 -35
- package/admin/src/components/Initializer/index.tsx +0 -24
- package/admin/src/components/PageTypeFilter/index.tsx +0 -17
- package/admin/src/components/PageTypeFilter/page-type-filter.tsx +0 -130
- package/admin/src/components/PluginIcon/index.tsx +0 -12
- package/admin/src/constants.ts +0 -1
- package/admin/src/index.tsx +0 -115
- package/admin/src/pages/App/index.tsx +0 -25
- package/admin/src/pages/HomePage/index.tsx +0 -19
- package/admin/src/pluginId.ts +0 -5
- package/admin/src/redux/initialData.reducer.ts +0 -0
- package/admin/src/translations/en.json +0 -6
- package/admin/src/translations/nl.json +0 -6
- package/admin/src/utils/getRequestUrl.ts +0 -11
- package/admin/src/utils/getTrad.ts +0 -5
- package/admin/src/utils/hooks/useDebounce.ts +0 -17
- package/admin/src/utils/hooks/useGetLocaleFromUrl.ts +0 -9
- package/admin/src/utils/hooks/usePrevious.ts +0 -12
- package/admin/src/utils/sanitizeModules.ts +0 -10
- package/custom.d.ts +0 -5
- package/server/bootstrap.ts +0 -106
- package/server/config/index.ts +0 -4
- package/server/content-types/index.ts +0 -1
- package/server/controllers/collection-types.ts +0 -27
- package/server/controllers/index.ts +0 -9
- package/server/controllers/page-type.ts +0 -12
- package/server/controllers/page.ts +0 -20
- package/server/destroy.ts +0 -5
- package/server/index.ts +0 -23
- package/server/middlewares/index.ts +0 -1
- package/server/policies/index.ts +0 -1
- package/server/register.ts +0 -5
- package/server/routes/index.ts +0 -42
- package/server/schema/page-end.json +0 -97
- package/server/schema/page-start.json +0 -87
- package/server/schema/page-type-end.json +0 -49
- package/server/schema/page-type-start.json +0 -44
- package/server/schema/template.json +0 -35
- package/server/services/builder.ts +0 -121
- package/server/services/collection-types.ts +0 -49
- package/server/services/index.ts +0 -11
- package/server/services/page-type.ts +0 -22
- package/server/services/page.ts +0 -24
- package/server/utils/graphql.ts +0 -110
- package/server/utils/reload-strapi-on-load.ts +0 -13
- package/shared/utils/constants.ts +0 -4
- package/shared/utils/sleep.ts +0 -1
- package/strapi-admin.js +0 -3
- package/strapi-server.js +0 -3
- package/tsconfig.json +0 -20
- package/tsconfig.server.json +0 -25
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const package_json_1 = __importDefault(require("../../package.json"));
|
|
7
|
+
const pluginId = package_json_1.default.strapi.name;
|
|
8
|
+
exports.default = pluginId;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@webbio/strapi-plugin-page-builder",
|
|
3
|
+
"version": "0.0.5",
|
|
4
|
+
"description": "This is the description of the plugin.",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"develop": "tsc -p tsconfig.server.json -w",
|
|
7
|
+
"build": "tsc -p tsconfig.server.json",
|
|
8
|
+
"prepublish": "tsc -p tsconfig.server.json",
|
|
9
|
+
"format": "prettier --write .",
|
|
10
|
+
"spu": "yarn upgrade-interactive --latest"
|
|
11
|
+
},
|
|
12
|
+
"strapi": {
|
|
13
|
+
"name": "page-builder",
|
|
14
|
+
"description": "Description of page-builder plugin",
|
|
15
|
+
"displayName": "Page Builder",
|
|
16
|
+
"kind": "plugin"
|
|
17
|
+
},
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "https://github.com/webbio/strapi-plugin-page-builder.git"
|
|
21
|
+
},
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"@strapi/design-system": "^1.8.2",
|
|
24
|
+
"@strapi/helper-plugin": "^4.12.0",
|
|
25
|
+
"@strapi/icons": "^1.8.2",
|
|
26
|
+
"@strapi/typescript-utils": "^4.12.0",
|
|
27
|
+
"@strapi/utils": "^4.12.0",
|
|
28
|
+
"react-select": "^5.7.4"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@strapi/typescript-utils": "^4.12.0",
|
|
32
|
+
"@types/react": "^17.0.53",
|
|
33
|
+
"@types/react-dom": "^18.0.28",
|
|
34
|
+
"@types/react-router-dom": "^5.3.3",
|
|
35
|
+
"@types/styled-components": "^5.1.26",
|
|
36
|
+
"react": "^18.2.0",
|
|
37
|
+
"react-dom": "^18.2.0",
|
|
38
|
+
"react-router-dom": "^5.3.4",
|
|
39
|
+
"styled-components": "^5.3.6",
|
|
40
|
+
"typescript": "5.1.6"
|
|
41
|
+
},
|
|
42
|
+
"peerDependencies": {
|
|
43
|
+
"@strapi/strapi": "^4.12.0",
|
|
44
|
+
"@webbio/strapi-plugin-slug": "^0.1.0",
|
|
45
|
+
"react": "^17.0.0 || ^18.0.0",
|
|
46
|
+
"react-dom": "^17.0.0 || ^18.0.0",
|
|
47
|
+
"react-router-dom": "^5.3.4",
|
|
48
|
+
"styled-components": "^5.3.6"
|
|
49
|
+
},
|
|
50
|
+
"author": {
|
|
51
|
+
"name": "Webbio B.V.",
|
|
52
|
+
"email": "info@webbio.nl",
|
|
53
|
+
"url": "https://webbio.nl"
|
|
54
|
+
},
|
|
55
|
+
"maintainers": [
|
|
56
|
+
{
|
|
57
|
+
"name": "Webbio B.V.",
|
|
58
|
+
"email": "info@webbio.nl",
|
|
59
|
+
"url": "https://webbio.nl"
|
|
60
|
+
}
|
|
61
|
+
],
|
|
62
|
+
"engines": {
|
|
63
|
+
"node": ">=14.19.1 <=18.x.x",
|
|
64
|
+
"npm": ">=6.0.0"
|
|
65
|
+
},
|
|
66
|
+
"license": "MIT",
|
|
67
|
+
"publishConfig": {
|
|
68
|
+
"access": "public",
|
|
69
|
+
"registry": "https://registry.npmjs.org"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const utils_1 = require("@strapi/utils");
|
|
4
|
+
const constants_1 = require("../shared/utils/constants");
|
|
5
|
+
exports.default = async ({ strapi }) => {
|
|
6
|
+
// TODO: refactor to own function
|
|
7
|
+
try {
|
|
8
|
+
const pageTypes = await strapi.entityService.findMany('api::page-type.page-type', {
|
|
9
|
+
limit: -1
|
|
10
|
+
});
|
|
11
|
+
const pagePermissions = pageTypes.map((pageType) => {
|
|
12
|
+
const name = `page-type-is-${pageType.uid}`;
|
|
13
|
+
const displayName = pageType.title;
|
|
14
|
+
return {
|
|
15
|
+
plugin: 'page-builder',
|
|
16
|
+
name,
|
|
17
|
+
displayName,
|
|
18
|
+
category: 'Page type',
|
|
19
|
+
handler: async () => {
|
|
20
|
+
return {
|
|
21
|
+
$or: [
|
|
22
|
+
{
|
|
23
|
+
'pageType.uid': {
|
|
24
|
+
$eq: pageType.uid
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
uid: {
|
|
29
|
+
$eq: pageType.uid
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
});
|
|
37
|
+
// @ts-ignore shitty types
|
|
38
|
+
await strapi.admin.services.permission.conditionProvider.registerMany(pagePermissions);
|
|
39
|
+
}
|
|
40
|
+
catch {
|
|
41
|
+
console.log('Cannot set page permissions');
|
|
42
|
+
}
|
|
43
|
+
const updateCollectionTypeData = (data, collectionTypeId, uid) => {
|
|
44
|
+
data.collectionTypeData = {
|
|
45
|
+
id: collectionTypeId,
|
|
46
|
+
__type: uid,
|
|
47
|
+
__pivot: {
|
|
48
|
+
field: 'page'
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
return data;
|
|
52
|
+
};
|
|
53
|
+
strapi.db.lifecycles.subscribe({
|
|
54
|
+
// @ts-ignore
|
|
55
|
+
models: [constants_1.PAGE_UID],
|
|
56
|
+
async beforeCreate(event) {
|
|
57
|
+
var _a, _b;
|
|
58
|
+
let { data } = event.params;
|
|
59
|
+
const collectionTypeId = data === null || data === void 0 ? void 0 : data.collectionTypeId;
|
|
60
|
+
const pageTypeId = ((_b = (_a = data === null || data === void 0 ? void 0 : data.pageType.connect) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.id) || data.initialPageType;
|
|
61
|
+
if (collectionTypeId && pageTypeId) {
|
|
62
|
+
const { uid } = await strapi.entityService.findOne('api::page-type.page-type', pageTypeId);
|
|
63
|
+
const collectionToConnect = await strapi.entityService.findOne(uid, collectionTypeId, {
|
|
64
|
+
populate: { page: true }
|
|
65
|
+
});
|
|
66
|
+
if (collectionToConnect.page && collectionToConnect.page.length > 0) {
|
|
67
|
+
throw new utils_1.errors.ValidationError('You can only link one CollectionType to one page');
|
|
68
|
+
}
|
|
69
|
+
data = updateCollectionTypeData(data, collectionTypeId, uid);
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
async beforeUpdate(event) {
|
|
73
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
74
|
+
let data = (_a = event === null || event === void 0 ? void 0 : event.params) === null || _a === void 0 ? void 0 : _a.data;
|
|
75
|
+
const collectionTypeId = data === null || data === void 0 ? void 0 : data.collectionTypeId;
|
|
76
|
+
const pageTypeId = ((_d = (_c = (_b = data === null || data === void 0 ? void 0 : data.pageType) === null || _b === void 0 ? void 0 : _b.connect) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.id) || (data === null || data === void 0 ? void 0 : data.initialPageType);
|
|
77
|
+
const removedPageType = (_g = (_f = (_e = data === null || data === void 0 ? void 0 : data.pageType) === null || _e === void 0 ? void 0 : _e.disconnect) === null || _f === void 0 ? void 0 : _f[0]) === null || _g === void 0 ? void 0 : _g.id;
|
|
78
|
+
if (removedPageType || collectionTypeId === null) {
|
|
79
|
+
data.collectionTypeData = undefined;
|
|
80
|
+
}
|
|
81
|
+
if (collectionTypeId && pageTypeId && !removedPageType) {
|
|
82
|
+
const { uid } = await strapi.entityService.findOne('api::page-type.page-type', pageTypeId);
|
|
83
|
+
const collectionToConnect = await strapi.entityService.findOne(uid, collectionTypeId, {
|
|
84
|
+
populate: { page: true }
|
|
85
|
+
});
|
|
86
|
+
if (collectionToConnect.page &&
|
|
87
|
+
collectionToConnect.page.length > 0 &&
|
|
88
|
+
!(collectionToConnect === null || collectionToConnect === void 0 ? void 0 : collectionToConnect.page.some((p) => p.id === data.id))) {
|
|
89
|
+
throw new utils_1.errors.ValidationError('You can only link one CollectionType to one page');
|
|
90
|
+
}
|
|
91
|
+
data = updateCollectionTypeData(data, collectionTypeId, uid);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = {
|
|
4
|
+
async hasPageRelation(ctx) {
|
|
5
|
+
var _a;
|
|
6
|
+
const uid = (_a = ctx.params) === null || _a === void 0 ? void 0 : _a.uid;
|
|
7
|
+
// @ts-ignore
|
|
8
|
+
return strapi.service('plugin::page-builder.collection-types').hasPageRelation(uid);
|
|
9
|
+
},
|
|
10
|
+
async getTranslationPageLinks(ctx) {
|
|
11
|
+
const { uid, ids } = ctx.params || {};
|
|
12
|
+
const idsArr = ids === null || ids === void 0 ? void 0 : ids.split(',').map(Number).filter((x) => !isNaN(x));
|
|
13
|
+
if (!uid || (idsArr === null || idsArr === void 0 ? void 0 : idsArr.length) === 0) {
|
|
14
|
+
return undefined;
|
|
15
|
+
}
|
|
16
|
+
// @ts-ignore
|
|
17
|
+
return strapi.service('plugin::page-builder.collection-types').getTranslationPageLinks(uid, idsArr);
|
|
18
|
+
}
|
|
19
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const page_1 = __importDefault(require("./page"));
|
|
7
|
+
const page_type_1 = __importDefault(require("./page-type"));
|
|
8
|
+
const collection_types_1 = __importDefault(require("./collection-types"));
|
|
9
|
+
exports.default = {
|
|
10
|
+
page: page_1.default,
|
|
11
|
+
'page-type': page_type_1.default,
|
|
12
|
+
'collection-types': collection_types_1.default
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = {
|
|
4
|
+
async findOneByUid(ctx) {
|
|
5
|
+
var _a;
|
|
6
|
+
const uid = (_a = ctx === null || ctx === void 0 ? void 0 : ctx.params) === null || _a === void 0 ? void 0 : _a.uid;
|
|
7
|
+
if (!uid) {
|
|
8
|
+
return ctx.badRequest('uid is missing.');
|
|
9
|
+
}
|
|
10
|
+
// @ts-ignore strapi typings
|
|
11
|
+
return await strapi.service('plugin::page-builder.page-type').findOneByUid(uid);
|
|
12
|
+
}
|
|
13
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const constants_1 = require("../../shared/utils/constants");
|
|
4
|
+
exports.default = {
|
|
5
|
+
async getPage(ctx) {
|
|
6
|
+
var _a, _b;
|
|
7
|
+
const id = (_a = ctx.params) === null || _a === void 0 ? void 0 : _a.id;
|
|
8
|
+
return (_b = strapi.service('plugin::page-builder.page')) === null || _b === void 0 ? void 0 : _b.getPage(id);
|
|
9
|
+
},
|
|
10
|
+
async findOneBySlug(ctx) {
|
|
11
|
+
var _a;
|
|
12
|
+
const { slug = '' } = ctx.params;
|
|
13
|
+
const entity = await ((_a = strapi.service(constants_1.PAGE_UID)) === null || _a === void 0 ? void 0 : _a.find({ filters: { slug } }));
|
|
14
|
+
const sanitizedEntity = await this.sanitizeOutput(entity, ctx);
|
|
15
|
+
return this.transformResponse(sanitizedEntity);
|
|
16
|
+
}
|
|
17
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const register_1 = __importDefault(require("./register"));
|
|
7
|
+
const bootstrap_1 = __importDefault(require("./bootstrap"));
|
|
8
|
+
const destroy_1 = __importDefault(require("./destroy"));
|
|
9
|
+
const config_1 = __importDefault(require("./config"));
|
|
10
|
+
const content_types_1 = __importDefault(require("./content-types"));
|
|
11
|
+
const controllers_1 = __importDefault(require("./controllers"));
|
|
12
|
+
const routes_1 = __importDefault(require("./routes"));
|
|
13
|
+
const middlewares_1 = __importDefault(require("./middlewares"));
|
|
14
|
+
const policies_1 = __importDefault(require("./policies"));
|
|
15
|
+
const services_1 = __importDefault(require("./services"));
|
|
16
|
+
exports.default = {
|
|
17
|
+
register: register_1.default,
|
|
18
|
+
bootstrap: bootstrap_1.default,
|
|
19
|
+
destroy: destroy_1.default,
|
|
20
|
+
config: config_1.default,
|
|
21
|
+
controllers: controllers_1.default,
|
|
22
|
+
routes: routes_1.default,
|
|
23
|
+
services: services_1.default,
|
|
24
|
+
contentTypes: content_types_1.default,
|
|
25
|
+
policies: policies_1.default,
|
|
26
|
+
middlewares: middlewares_1.default
|
|
27
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = async ({ strapi }) => {
|
|
4
|
+
var _a, _b;
|
|
5
|
+
await ((_b = (_a = strapi.services) === null || _a === void 0 ? void 0 : _a['plugin::page-builder.builder']) === null || _b === void 0 ? void 0 : _b.buildContentTypes());
|
|
6
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const routes = {
|
|
4
|
+
'page-type': {
|
|
5
|
+
type: 'admin',
|
|
6
|
+
prefix: undefined,
|
|
7
|
+
routes: [
|
|
8
|
+
{
|
|
9
|
+
method: 'GET',
|
|
10
|
+
path: '/page-types/:uid',
|
|
11
|
+
handler: 'page-type.findOneByUid'
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
page: {
|
|
16
|
+
type: 'admin',
|
|
17
|
+
prefix: undefined,
|
|
18
|
+
routes: [
|
|
19
|
+
{
|
|
20
|
+
method: 'GET',
|
|
21
|
+
path: '/page/:id',
|
|
22
|
+
handler: 'page.getPage'
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
'collection-types': {
|
|
27
|
+
type: 'admin',
|
|
28
|
+
prefix: undefined,
|
|
29
|
+
routes: [
|
|
30
|
+
{
|
|
31
|
+
method: 'GET',
|
|
32
|
+
path: '/collection-types/:uid',
|
|
33
|
+
handler: 'collection-types.hasPageRelation'
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
method: 'GET',
|
|
37
|
+
path: '/collection-types-page-links/:uid/:ids?',
|
|
38
|
+
handler: 'collection-types.getTranslationPageLinks'
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
exports.default = routes;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
{
|
|
2
|
+
"draftAndPublish": true,
|
|
3
|
+
"displayName": "Pagina's",
|
|
4
|
+
"singularName": "page",
|
|
5
|
+
"pluralName": "pages",
|
|
6
|
+
"description": "",
|
|
7
|
+
"plugin": "page-builder",
|
|
8
|
+
"pluginOptions": {
|
|
9
|
+
"i18n": {
|
|
10
|
+
"localized": true
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"kind": "collectionType",
|
|
14
|
+
"collectionName": "pages",
|
|
15
|
+
"attributes": {
|
|
16
|
+
"collectionTypeData": {
|
|
17
|
+
"type": "relation",
|
|
18
|
+
"relation": "morphToMany",
|
|
19
|
+
"configurable": false
|
|
20
|
+
},
|
|
21
|
+
"title": {
|
|
22
|
+
"pluginOptions": {
|
|
23
|
+
"i18n": {
|
|
24
|
+
"localized": true
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"type": "string",
|
|
28
|
+
"required": true
|
|
29
|
+
},
|
|
30
|
+
"slug": {
|
|
31
|
+
"pluginOptions": {
|
|
32
|
+
"i18n": {
|
|
33
|
+
"localized": true
|
|
34
|
+
},
|
|
35
|
+
"slug": {
|
|
36
|
+
"field": "slug",
|
|
37
|
+
"targetField": "title"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"type": "customField",
|
|
41
|
+
"customField": "plugin::slug.slug",
|
|
42
|
+
"required": true
|
|
43
|
+
},
|
|
44
|
+
"path": {
|
|
45
|
+
"pluginOptions": {
|
|
46
|
+
"i18n": {
|
|
47
|
+
"localized": true
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"type": "string",
|
|
51
|
+
"required": false
|
|
52
|
+
},
|
|
53
|
+
"parent": {
|
|
54
|
+
"type": "relation",
|
|
55
|
+
"relation": "oneToOne",
|
|
56
|
+
"target": "api::page.page",
|
|
57
|
+
"private": false
|
|
58
|
+
},
|
|
59
|
+
"excerpt": {
|
|
60
|
+
"pluginOptions": {
|
|
61
|
+
"i18n": {
|
|
62
|
+
"localized": true
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"type": "text"
|
|
66
|
+
},
|
|
67
|
+
"modules": {
|
|
68
|
+
"pluginOptions": {
|
|
69
|
+
"i18n": {
|
|
70
|
+
"localized": true
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"type": "dynamiczone",
|
|
74
|
+
"components": []
|
|
75
|
+
},
|
|
76
|
+
"seo": {
|
|
77
|
+
"type": "component",
|
|
78
|
+
"pluginOptions": {
|
|
79
|
+
"i18n": {
|
|
80
|
+
"localized": true
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"component": "shared.seo"
|
|
84
|
+
},
|
|
85
|
+
"template": {
|
|
86
|
+
"relation": "manyToOne",
|
|
87
|
+
"target": "api::template.template",
|
|
88
|
+
"targetAttribute": "pages",
|
|
89
|
+
"type": "relation"
|
|
90
|
+
},
|
|
91
|
+
"pageType": {
|
|
92
|
+
"type": "relation",
|
|
93
|
+
"relation": "oneToOne",
|
|
94
|
+
"target": "api::page-type.page-type"
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
{
|
|
2
|
+
"draftAndPublish": true,
|
|
3
|
+
"displayName": "Pagina's",
|
|
4
|
+
"singularName": "page",
|
|
5
|
+
"pluralName": "pages",
|
|
6
|
+
"description": "",
|
|
7
|
+
"plugin": "page-builder",
|
|
8
|
+
"pluginOptions": {
|
|
9
|
+
"i18n": {
|
|
10
|
+
"localized": true
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"kind": "collectionType",
|
|
14
|
+
"collectionName": "pages",
|
|
15
|
+
"attributes": {
|
|
16
|
+
"collectionTypeData": {
|
|
17
|
+
"type": "relation",
|
|
18
|
+
"relation": "morphToMany",
|
|
19
|
+
"configurable": false,
|
|
20
|
+
"private": false
|
|
21
|
+
},
|
|
22
|
+
"title": {
|
|
23
|
+
"pluginOptions": {
|
|
24
|
+
"i18n": {
|
|
25
|
+
"localized": true
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"type": "string",
|
|
29
|
+
"required": true
|
|
30
|
+
},
|
|
31
|
+
"slug": {
|
|
32
|
+
"pluginOptions": {
|
|
33
|
+
"i18n": {
|
|
34
|
+
"localized": true
|
|
35
|
+
},
|
|
36
|
+
"slug": {
|
|
37
|
+
"field": "slug",
|
|
38
|
+
"targetField": "title"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"type": "customField",
|
|
42
|
+
"customField": "plugin::slug.slug",
|
|
43
|
+
"required": true
|
|
44
|
+
},
|
|
45
|
+
"path": {
|
|
46
|
+
"pluginOptions": {
|
|
47
|
+
"i18n": {
|
|
48
|
+
"localized": true
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"type": "string",
|
|
52
|
+
"required": false
|
|
53
|
+
},
|
|
54
|
+
"parent": {
|
|
55
|
+
"type": "relation",
|
|
56
|
+
"relation": "oneToOne",
|
|
57
|
+
"target": "api::page.page",
|
|
58
|
+
"private": false
|
|
59
|
+
},
|
|
60
|
+
"excerpt": {
|
|
61
|
+
"pluginOptions": {
|
|
62
|
+
"i18n": {
|
|
63
|
+
"localized": true
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"type": "text"
|
|
67
|
+
},
|
|
68
|
+
"modules": {
|
|
69
|
+
"pluginOptions": {
|
|
70
|
+
"i18n": {
|
|
71
|
+
"localized": true
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"type": "dynamiczone",
|
|
75
|
+
"components": []
|
|
76
|
+
},
|
|
77
|
+
"seo": {
|
|
78
|
+
"type": "component",
|
|
79
|
+
"pluginOptions": {
|
|
80
|
+
"i18n": {
|
|
81
|
+
"localized": true
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"component": "shared.seo"
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"draftAndPublish": false,
|
|
3
|
+
"displayName": "Pagina Types",
|
|
4
|
+
"singularName": "page-type",
|
|
5
|
+
"pluralName": "page-types",
|
|
6
|
+
"description": "",
|
|
7
|
+
"plugin": "page-builder",
|
|
8
|
+
"pluginOptions": {
|
|
9
|
+
"i18n": {
|
|
10
|
+
"localized": true
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"kind": "collectionType",
|
|
14
|
+
"collectionName": "page_types",
|
|
15
|
+
"attributes": {
|
|
16
|
+
"uid": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"required": true,
|
|
19
|
+
"unique": true,
|
|
20
|
+
"pluginOptions": {
|
|
21
|
+
"i18n": {
|
|
22
|
+
"localized": true
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"title": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"pluginOptions": {
|
|
29
|
+
"i18n": {
|
|
30
|
+
"localized": true
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"modules": {
|
|
35
|
+
"type": "dynamiczone",
|
|
36
|
+
"components": [],
|
|
37
|
+
"pluginOptions": {
|
|
38
|
+
"i18n": {
|
|
39
|
+
"localized": true
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"template": {
|
|
44
|
+
"type": "relation",
|
|
45
|
+
"relation": "oneToOne",
|
|
46
|
+
"target": "api::template.template"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"draftAndPublish": false,
|
|
3
|
+
"displayName": "Pagina Types",
|
|
4
|
+
"singularName": "page-type",
|
|
5
|
+
"pluralName": "page-types",
|
|
6
|
+
"description": "",
|
|
7
|
+
"plugin": "page-builder",
|
|
8
|
+
"pluginOptions": {
|
|
9
|
+
"i18n": {
|
|
10
|
+
"localized": true
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"kind": "collectionType",
|
|
14
|
+
"collectionName": "page_types",
|
|
15
|
+
"attributes": {
|
|
16
|
+
"uid": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"required": true,
|
|
19
|
+
"unique": true,
|
|
20
|
+
"pluginOptions": {
|
|
21
|
+
"i18n": {
|
|
22
|
+
"localized": true
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"title": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"pluginOptions": {
|
|
29
|
+
"i18n": {
|
|
30
|
+
"localized": true
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"modules": {
|
|
35
|
+
"type": "dynamiczone",
|
|
36
|
+
"components": [],
|
|
37
|
+
"pluginOptions": {
|
|
38
|
+
"i18n": {
|
|
39
|
+
"localized": true
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"draftAndPublish": false,
|
|
3
|
+
"displayName": "Templates",
|
|
4
|
+
"singularName": "template",
|
|
5
|
+
"pluralName": "templates",
|
|
6
|
+
"description": "",
|
|
7
|
+
"plugin": "page-builder",
|
|
8
|
+
"pluginOptions": {
|
|
9
|
+
"i18n": {
|
|
10
|
+
"localized": true
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"kind": "collectionType",
|
|
14
|
+
"collectionName": "templates",
|
|
15
|
+
"attributes": {
|
|
16
|
+
"title": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"required": true,
|
|
19
|
+
"pluginOptions": {
|
|
20
|
+
"i18n": {
|
|
21
|
+
"localized": true
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"modules": {
|
|
26
|
+
"type": "dynamiczone",
|
|
27
|
+
"components": [],
|
|
28
|
+
"pluginOptions": {
|
|
29
|
+
"i18n": {
|
|
30
|
+
"localized": true
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|