strapi-layout-plugin 1.0.12 → 1.0.14

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": "strapi-layout-plugin",
3
- "version": "1.0.12",
3
+ "version": "1.0.14",
4
4
  "description": "Strapi layout engine plugin for Sitecore-like routing",
5
5
  "strapi": {
6
6
  "name": "strapi-layout-plugin",
@@ -1,5 +1,5 @@
1
1
  {
2
- "collectionName": "components_velox_footer_columns",
2
+ "collectionName": "components_core_footer_columns",
3
3
  "info": {
4
4
  "displayName": "Footer Column",
5
5
  "icon": "list",
@@ -14,7 +14,7 @@
14
14
  "links": {
15
15
  "type": "component",
16
16
  "repeatable": true,
17
- "component": "velox.link"
17
+ "component": "core.link"
18
18
  }
19
19
  }
20
20
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "collectionName": "components_velox_footers",
2
+ "collectionName": "components_core_footers",
3
3
  "info": {
4
4
  "displayName": "Footer",
5
5
  "icon": "bold",
@@ -25,17 +25,17 @@
25
25
  "socialLinks": {
26
26
  "type": "component",
27
27
  "repeatable": true,
28
- "component": "velox.social-link"
28
+ "component": "core.social-link"
29
29
  },
30
30
  "bottomLinks": {
31
31
  "type": "component",
32
32
  "repeatable": true,
33
- "component": "velox.link"
33
+ "component": "core.link"
34
34
  },
35
35
  "columns": {
36
36
  "type": "component",
37
37
  "repeatable": true,
38
- "component": "velox.footer-column"
38
+ "component": "core.footer-column"
39
39
  }
40
40
  }
41
41
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "collectionName": "components_velox_headers",
2
+ "collectionName": "components_core_headers",
3
3
  "info": {
4
4
  "displayName": "Header",
5
5
  "icon": "bold",
@@ -16,7 +16,7 @@
16
16
  "links": {
17
17
  "type": "component",
18
18
  "repeatable": true,
19
- "component": "velox.link"
19
+ "component": "core.link"
20
20
  }
21
21
  }
22
22
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "collectionName": "components_velox_links",
2
+ "collectionName": "components_core_links",
3
3
  "info": {
4
4
  "displayName": "Link",
5
5
  "description": "This component is used to create reusable links across the website. It supports link text, URL (href), internal/external identification, and target options such as opening in the same or new tab."
@@ -1,5 +1,5 @@
1
1
  {
2
- "collectionName": "components_velox_social_links",
2
+ "collectionName": "components_core_social_links",
3
3
  "info": {
4
4
  "displayName": "Social Link",
5
5
  "icon": "twitter",
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
3
  module.exports = {
4
- 'velox.header': require('./velox/header.json'),
5
- 'velox.footer': require('./velox/footer.json'),
6
- 'velox.link': require('./velox/link.json'),
7
- 'velox.social-link': require('./velox/social-link.json'),
8
- 'velox.footer-column': require('./velox/footer-column.json'),
4
+ 'core.header': require('./core/header.json'),
5
+ 'core.footer': require('./core/footer.json'),
6
+ 'core.link': require('./core/link.json'),
7
+ 'core.social-link': require('./core/social-link.json'),
8
+ 'core.footer-column': require('./core/footer-column.json'),
9
9
  'shared.seo': require('./shared/seo.json'),
10
10
  };
@@ -28,13 +28,13 @@
28
28
  "header": {
29
29
  "type": "dynamiczone",
30
30
  "components": [
31
- "velox.header"
31
+ "core.header"
32
32
  ]
33
33
  },
34
34
  "footer": {
35
35
  "type": "dynamiczone",
36
36
  "components": [
37
- "velox.footer"
37
+ "core.footer"
38
38
  ]
39
39
  }
40
40
  }
@@ -29,9 +29,8 @@ const getDynamicSectionsPopulate = (strapi) => {
29
29
  const components = strapi.components;
30
30
 
31
31
  for (const [uid, schema] of Object.entries(components)) {
32
- if (uid.startsWith('velox.')) {
33
- const attributes = schema.attributes || {};
34
- const populateMap = {};
32
+ const attributes = schema.attributes || {};
33
+ const populateMap = {};
35
34
 
36
35
  for (const [attrName, attrDef] of Object.entries(attributes)) {
37
36
  const type = attrDef.type;
@@ -84,7 +83,6 @@ const getDynamicSectionsPopulate = (strapi) => {
84
83
  } else {
85
84
  populate[uid] = { populate: '*' };
86
85
  }
87
- }
88
86
  }
89
87
  return populate;
90
88
  };
@@ -236,7 +234,7 @@ module.exports = ({ strapi }) => ({
236
234
  pageSections = entity.blocks;
237
235
  } else {
238
236
  pageSections = [{
239
- __component: `velox.${typeName}-detail`,
237
+ __component: `core.${typeName}-detail`,
240
238
  id: 0,
241
239
  ...entity
242
240
  }];
@@ -11,11 +11,11 @@ module.exports = ({ strapi }) => {
11
11
 
12
12
  // 1. Inject directly into memory to prevent database.init crash
13
13
  const componentsToInject = {
14
- 'velox.header': require('./components/velox/header.json'),
15
- 'velox.footer': require('./components/velox/footer.json'),
16
- 'velox.link': require('./components/velox/link.json'),
17
- 'velox.social-link': require('./components/velox/social-link.json'),
18
- 'velox.footer-column': require('./components/velox/footer-column.json'),
14
+ 'core.header': require('./components/core/header.json'),
15
+ 'core.footer': require('./components/core/footer.json'),
16
+ 'core.link': require('./components/core/link.json'),
17
+ 'core.social-link': require('./components/core/social-link.json'),
18
+ 'core.footer-column': require('./components/core/footer-column.json'),
19
19
  'shared.seo': require('./components/shared/seo.json')
20
20
  };
21
21
 
@@ -40,19 +40,19 @@ module.exports = ({ strapi }) => {
40
40
  }
41
41
 
42
42
  // 2. Also copy to physical files so user can see them in UI
43
- const veloxDir = path.join(appComponentsDir, 'velox');
43
+ const coreDir = path.join(appComponentsDir, 'core');
44
44
  const sharedDir = path.join(appComponentsDir, 'shared');
45
45
 
46
46
  if (!fs.existsSync(appComponentsDir)) fs.mkdirSync(appComponentsDir, { recursive: true });
47
- if (!fs.existsSync(veloxDir)) fs.mkdirSync(veloxDir, { recursive: true });
47
+ if (!fs.existsSync(coreDir)) fs.mkdirSync(coreDir, { recursive: true });
48
48
  if (!fs.existsSync(sharedDir)) fs.mkdirSync(sharedDir, { recursive: true });
49
49
 
50
50
  const filesToCopy = [
51
- { src: path.join(pluginComponentsDir, 'velox', 'header.json'), dest: path.join(veloxDir, 'header.json') },
52
- { src: path.join(pluginComponentsDir, 'velox', 'footer.json'), dest: path.join(veloxDir, 'footer.json') },
53
- { src: path.join(pluginComponentsDir, 'velox', 'link.json'), dest: path.join(veloxDir, 'link.json') },
54
- { src: path.join(pluginComponentsDir, 'velox', 'social-link.json'), dest: path.join(veloxDir, 'social-link.json') },
55
- { src: path.join(pluginComponentsDir, 'velox', 'footer-column.json'), dest: path.join(veloxDir, 'footer-column.json') },
51
+ { src: path.join(pluginComponentsDir, 'core', 'header.json'), dest: path.join(coreDir, 'header.json') },
52
+ { src: path.join(pluginComponentsDir, 'core', 'footer.json'), dest: path.join(coreDir, 'footer.json') },
53
+ { src: path.join(pluginComponentsDir, 'core', 'link.json'), dest: path.join(coreDir, 'link.json') },
54
+ { src: path.join(pluginComponentsDir, 'core', 'social-link.json'), dest: path.join(coreDir, 'social-link.json') },
55
+ { src: path.join(pluginComponentsDir, 'core', 'footer-column.json'), dest: path.join(coreDir, 'footer-column.json') },
56
56
  { src: path.join(pluginComponentsDir, 'shared', 'seo.json'), dest: path.join(sharedDir, 'seo.json') }
57
57
  ];
58
58