@raketa-cloud/admin 1.8.12 → 1.8.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.
@@ -1701,6 +1701,10 @@ select {
1701
1701
  margin-bottom: 1.5rem;
1702
1702
  }
1703
1703
 
1704
+ .ml-10 {
1705
+ margin-left: 2.5rem;
1706
+ }
1707
+
1704
1708
  .ml-2 {
1705
1709
  margin-left: 0.5rem;
1706
1710
  }
@@ -1932,6 +1936,10 @@ select {
1932
1936
  align-items: center;
1933
1937
  }
1934
1938
 
1939
+ .justify-start {
1940
+ justify-content: flex-start;
1941
+ }
1942
+
1935
1943
  .justify-end {
1936
1944
  justify-content: flex-end;
1937
1945
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raketa-cloud/admin",
3
- "version": "1.8.12",
3
+ "version": "1.8.14",
4
4
  "main": "src/index.js",
5
5
  "files": [
6
6
  "src/",
@@ -66,7 +66,7 @@ const sanitizePath = (filePath) =>
66
66
  path.normalize(path.join("/", ...filePath.split("/")));
67
67
 
68
68
  function getPartialPath(partialPath, views, viewsFallback) {
69
- // First resolve the partial path relative to the views directory
69
+ // Resolve the partial path relative to the views directory
70
70
  // This normalizes "../_nav.ejs" relative to "page_revisions/codes"
71
71
  // Result: "page_revisions/_nav.ejs"
72
72
  const resolvedPartialPath = sanitizePath(`${views}/${partialPath}`);
@@ -76,16 +76,10 @@ function getPartialPath(partialPath, views, viewsFallback) {
76
76
  sanitizePath(`${currentPath}/views/${resolvedPartialPath}`),
77
77
  ];
78
78
 
79
- // For fallback, replace the resource name with the fallback path
79
+ // For fallback, resolve the partial path relative to viewsFallback
80
+ // This naturally handles ".." navigation: "resource_revisions/codes/../_nav.ejs" → "resource_revisions/_nav.ejs"
80
81
  if (viewsFallback) {
81
- // Extract base resource (e.g., "page_revisions" from "page_revisions/codes")
82
- const resourceBase = views.split("/")[0];
83
- // Replace resource base with fallback base
84
- // "page_revisions/_nav.ejs" → "resource_revisions/_nav.ejs" ✓
85
- const fallbackPath = resolvedPartialPath.replace(
86
- resourceBase,
87
- viewsFallback,
88
- );
82
+ const fallbackPath = sanitizePath(`${viewsFallback}/${partialPath}`);
89
83
  paths.push(sanitizePath(`${currentPath}/views/${fallbackPath}`));
90
84
  }
91
85
 
@@ -21,6 +21,7 @@ function minimalResourceFragment() {
21
21
  insertedAt
22
22
  updatedAt
23
23
  translations
24
+ tags ${tagFragment()}
24
25
  }
25
26
  `;
26
27
  }
@@ -75,6 +75,10 @@ function formatTranslations(item) {
75
75
  .join(";");
76
76
  }
77
77
 
78
+ function formatTags(item) {
79
+ return (item?.tags || []).map((tag) => tag.name).join(";");
80
+ }
81
+
78
82
  const standardFieldMapping = (remoteConfig, locale, type) => ({
79
83
  id: "id",
80
84
  type: (item) => extractResourceType(item, type),
@@ -85,6 +89,7 @@ const standardFieldMapping = (remoteConfig, locale, type) => ({
85
89
  created_at: "insertedAt",
86
90
  updated_at: "updatedAt",
87
91
  translations: formatTranslations,
92
+ tags: formatTags,
88
93
  });
89
94
 
90
95
  const standardHeaders = [
@@ -97,6 +102,7 @@ const standardHeaders = [
97
102
  "created_at",
98
103
  "updated_at",
99
104
  "translations",
105
+ "tags",
100
106
  ];
101
107
 
102
108
  export default {
@@ -144,7 +144,7 @@ describe("Resources ExportsHandler", () => {
144
144
  const result = await ExportsHandler.index(ctx);
145
145
 
146
146
  expect(result.text).toBe(
147
- "id,type,locale,title,URL,visibility,created_at,updated_at,translations",
147
+ "id,type,locale,title,URL,visibility,created_at,updated_at,translations,tags",
148
148
  );
149
149
  });
150
150
 
@@ -210,6 +210,7 @@ describe("CSVExportHelper", () => {
210
210
  es: {},
211
211
  de: {},
212
212
  },
213
+ tags: [{ name: "Finance" }, { name: "Product" }],
213
214
  },
214
215
  ];
215
216
  const headers = [...CSVExportHelper.standardHeaders];
@@ -226,8 +227,8 @@ describe("CSVExportHelper", () => {
226
227
  );
227
228
 
228
229
  expect(result).toBe(
229
- "id,type,locale,title,URL,visibility,created_at,updated_at,translations\r\n" +
230
- "1,article,en,Test Article,/en/article/1,public,2024-01-01,2024-01-02,es;de",
230
+ "id,type,locale,title,URL,visibility,created_at,updated_at,translations,tags\r\n" +
231
+ "1,article,en,Test Article,/en/article/1,public,2024-01-01,2024-01-02,es;de,Finance;Product",
231
232
  );
232
233
  });
233
234
  });
@@ -302,6 +303,7 @@ describe("CSVExportHelper", () => {
302
303
  created_at: "insertedAt",
303
304
  updated_at: "updatedAt",
304
305
  translations: expect.any(Function),
306
+ tags: expect.any(Function),
305
307
  });
306
308
  });
307
309
 
@@ -364,6 +366,7 @@ describe("CSVExportHelper", () => {
364
366
  "created_at",
365
367
  "updated_at",
366
368
  "translations",
369
+ "tags",
367
370
  ]);
368
371
  });
369
372
  });