@fnd-platform/cms 1.0.0-alpha.1 → 1.0.0-alpha.11
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/lib/cms-project.d.ts +91 -86
- package/lib/cms-project.d.ts.map +1 -1
- package/lib/cms-project.js +39 -14
- package/lib/cms-project.js.map +1 -1
- package/lib/index.js +5 -10
- package/lib/templates/admin-content-edit-route.d.ts +9 -0
- package/lib/templates/admin-content-edit-route.d.ts.map +1 -0
- package/lib/templates/admin-content-edit-route.js +195 -0
- package/lib/templates/admin-content-edit-route.js.map +1 -0
- package/lib/templates/admin-content-new-route.d.ts +9 -0
- package/lib/templates/admin-content-new-route.d.ts.map +1 -0
- package/lib/templates/admin-content-new-route.js +160 -0
- package/lib/templates/admin-content-new-route.js.map +1 -0
- package/lib/templates/admin-content-type-route.d.ts +2 -2
- package/lib/templates/admin-content-type-route.d.ts.map +1 -1
- package/lib/templates/admin-content-type-route.js +67 -27
- package/lib/templates/admin-content-type-route.js.map +1 -1
- package/lib/templates/content-api.d.ts +9 -0
- package/lib/templates/content-api.d.ts.map +1 -0
- package/lib/templates/content-api.js +195 -0
- package/lib/templates/content-api.js.map +1 -0
- package/lib/templates/content-types-registry.d.ts.map +1 -1
- package/lib/templates/content-types-registry.js +17 -4
- package/lib/templates/content-types-registry.js.map +1 -1
- package/lib/templates/form-fields/index.d.ts +2 -2
- package/lib/templates/form-fields/index.js +32 -110
- package/lib/templates/index.d.ts +4 -0
- package/lib/templates/index.d.ts.map +1 -1
- package/lib/templates/index.js +11 -1
- package/lib/templates/index.js.map +1 -1
- package/lib/templates/ui-select.d.ts +9 -0
- package/lib/templates/ui-select.d.ts.map +1 -0
- package/lib/templates/ui-select.js +172 -0
- package/lib/templates/ui-select.js.map +1 -0
- package/package.json +13 -13
- package/LICENSE +0 -21
package/lib/cms-project.d.ts
CHANGED
|
@@ -38,90 +38,95 @@ import type { FndCmsProjectOptions } from './options';
|
|
|
38
38
|
* ```
|
|
39
39
|
*/
|
|
40
40
|
export declare class FndCmsProject extends FndFrontendProject {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
41
|
+
/**
|
|
42
|
+
* Whether media upload functionality is enabled.
|
|
43
|
+
*/
|
|
44
|
+
readonly mediaUpload: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Rich text editor to use for content editing.
|
|
47
|
+
*/
|
|
48
|
+
readonly richTextEditor: 'tiptap' | 'lexical';
|
|
49
|
+
/**
|
|
50
|
+
* Creates a new FndCmsProject.
|
|
51
|
+
*
|
|
52
|
+
* @param options - Configuration options for the CMS project
|
|
53
|
+
* @throws {Error} If required options are missing
|
|
54
|
+
*/
|
|
55
|
+
constructor(options: FndCmsProjectOptions);
|
|
56
|
+
/**
|
|
57
|
+
* Generates additional shadcn/ui components for the CMS.
|
|
58
|
+
*
|
|
59
|
+
* Creates:
|
|
60
|
+
* - badge.tsx - Status badge component
|
|
61
|
+
* - avatar.tsx - User avatar component
|
|
62
|
+
* - dropdown-menu.tsx - Dropdown menu component
|
|
63
|
+
* - table.tsx - Table component
|
|
64
|
+
* - popover.tsx - Popover component for link dialogs
|
|
65
|
+
*/
|
|
66
|
+
private generateUiComponents;
|
|
67
|
+
/**
|
|
68
|
+
* Generates the admin components for the CMS.
|
|
69
|
+
*
|
|
70
|
+
* Creates:
|
|
71
|
+
* - sidebar.tsx - Admin sidebar navigation
|
|
72
|
+
* - header.tsx - Admin header with user menu
|
|
73
|
+
* - breadcrumbs.tsx - Breadcrumb navigation
|
|
74
|
+
* - dashboard-stats.tsx - Dashboard statistics cards
|
|
75
|
+
* - recent-content.tsx - Recent content list
|
|
76
|
+
* - content-table.tsx - Content list table
|
|
77
|
+
*/
|
|
78
|
+
private generateAdminComponents;
|
|
79
|
+
/**
|
|
80
|
+
* Generates the admin routes for the CMS.
|
|
81
|
+
*
|
|
82
|
+
* Creates:
|
|
83
|
+
* - admin.tsx - Admin layout with sidebar and header
|
|
84
|
+
* - admin._index.tsx - Admin dashboard with stats
|
|
85
|
+
* - admin.content.tsx - Content section layout
|
|
86
|
+
* - admin.content._index.tsx - Content overview
|
|
87
|
+
* - admin.content.$type._index.tsx - Content type list
|
|
88
|
+
* - admin.content.$type.new.tsx - Create new content
|
|
89
|
+
* - admin.content.$type.$id.tsx - Edit existing content
|
|
90
|
+
*
|
|
91
|
+
* Note: Routes use "admin." prefix (not "_admin.") so they create URL paths
|
|
92
|
+
* at /admin/*. The underscore prefix in Remix creates pathless layouts.
|
|
93
|
+
*/
|
|
94
|
+
private generateAdminRoutes;
|
|
95
|
+
/**
|
|
96
|
+
* Generates the content type definition system.
|
|
97
|
+
*
|
|
98
|
+
* Creates:
|
|
99
|
+
* - app/lib/content-types.ts - Content type definitions and interfaces
|
|
100
|
+
* - app/lib/content-schema.ts - Zod schema generation utilities
|
|
101
|
+
* - app/lib/slug-utils.ts - Slug generation utilities
|
|
102
|
+
* - app/content-types/index.ts - Content type registry
|
|
103
|
+
* - app/content-types/blog-post.ts - Example blog post content type
|
|
104
|
+
* - app/content-types/page.ts - Example page content type
|
|
105
|
+
* - app/components/form-fields/* - All form field components
|
|
106
|
+
* - app/components/admin/content-editor.tsx - Dynamic content editor
|
|
107
|
+
*/
|
|
108
|
+
private generateContentTypeSystem;
|
|
109
|
+
/**
|
|
110
|
+
* Generates the editor components for rich text editing.
|
|
111
|
+
*
|
|
112
|
+
* Creates:
|
|
113
|
+
* - app/components/editor/toolbar.tsx - Editor toolbar with formatting buttons
|
|
114
|
+
* - app/components/editor/rich-text-editor.tsx - Tiptap-based rich text editor
|
|
115
|
+
*/
|
|
116
|
+
private generateEditorComponents;
|
|
117
|
+
/**
|
|
118
|
+
* Generates the media library components.
|
|
119
|
+
*
|
|
120
|
+
* Creates:
|
|
121
|
+
* - app/lib/media-api.ts - Client-side API helpers for presigned URL uploads
|
|
122
|
+
* - app/components/media/media-uploader.tsx - Drag-drop upload with progress
|
|
123
|
+
* - app/components/media/media-grid.tsx - Grid display with selection
|
|
124
|
+
* - app/components/media/media-picker.tsx - Dialog for field integration
|
|
125
|
+
* - app/routes/admin.media.tsx - Media library route
|
|
126
|
+
* - app/components/ui/progress.tsx - Progress bar component
|
|
127
|
+
* - app/components/ui/dialog.tsx - Dialog component
|
|
128
|
+
* - app/components/ui/tabs.tsx - Tabs component
|
|
129
|
+
*/
|
|
130
|
+
private generateMediaComponents;
|
|
126
131
|
}
|
|
127
|
-
//# sourceMappingURL=cms-project.d.ts.map
|
|
132
|
+
//# sourceMappingURL=cms-project.d.ts.map
|
package/lib/cms-project.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cms-project.d.ts","sourceRoot":"","sources":["../src/cms-project.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"cms-project.d.ts","sourceRoot":"","sources":["../src/cms-project.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AA4DtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,qBAAa,aAAc,SAAQ,kBAAkB;IACnD;;OAEG;IACH,SAAgB,WAAW,EAAE,OAAO,CAAC;IAErC;;OAEG;IACH,SAAgB,cAAc,EAAE,QAAQ,GAAG,SAAS,CAAC;IAErD;;;;;OAKG;gBACS,OAAO,EAAE,oBAAoB;IAoEzC;;;;;;;;;OASG;IACH,OAAO,CAAC,oBAAoB;IA0B5B;;;;;;;;;;OAUG;IACH,OAAO,CAAC,uBAAuB;IA0B/B;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,mBAAmB;IA0C3B;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,yBAAyB;IA0FjC;;;;;;OAMG;IACH,OAAO,CAAC,wBAAwB;IAUhC;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,uBAAuB;CAqChC"}
|
package/lib/cms-project.js
CHANGED
|
@@ -77,10 +77,13 @@ class FndCmsProject extends frontend_1.FndFrontendProject {
|
|
|
77
77
|
auth: true, // CMS always requires auth
|
|
78
78
|
port: options.port ?? 3001, // Different port than frontend (3000)
|
|
79
79
|
shadcnTheme: options.shadcnTheme,
|
|
80
|
+
defaultLoginRedirect: '/admin', // CMS redirects to admin, not dashboard
|
|
80
81
|
});
|
|
81
82
|
// Store CMS-specific options
|
|
82
83
|
this.mediaUpload = options.mediaUpload ?? true;
|
|
83
84
|
this.richTextEditor = options.richTextEditor ?? 'tiptap';
|
|
85
|
+
// Add @fnd-platform/cms to parent's devDependencies (for .projenrc.ts imports)
|
|
86
|
+
this.parentProject.addDevDeps('@fnd-platform/cms@^1.0.0-alpha.11');
|
|
84
87
|
// Add CMS-specific dependencies
|
|
85
88
|
this.addDeps('lucide-react@^0.344.0');
|
|
86
89
|
this.addDeps('@radix-ui/react-dropdown-menu@^2.0.0');
|
|
@@ -93,6 +96,8 @@ class FndCmsProject extends frontend_1.FndFrontendProject {
|
|
|
93
96
|
this.addDeps('@tiptap/extension-image@^2.2.0');
|
|
94
97
|
// Radix Popover for link insertion dialog
|
|
95
98
|
this.addDeps('@radix-ui/react-popover@^1.0.0');
|
|
99
|
+
// Radix Select for media grid filter
|
|
100
|
+
this.addDeps('@radix-ui/react-select@^2.0.0');
|
|
96
101
|
// Additional Radix dependencies for media library
|
|
97
102
|
this.addDeps('@radix-ui/react-dialog@^1.0.0');
|
|
98
103
|
this.addDeps('@radix-ui/react-tabs@^1.0.0');
|
|
@@ -134,6 +139,9 @@ class FndCmsProject extends frontend_1.FndFrontendProject {
|
|
|
134
139
|
new projen_1.SampleFile(this, 'app/components/ui/popover.tsx', {
|
|
135
140
|
contents: (0, templates_1.getPopoverTemplate)(),
|
|
136
141
|
});
|
|
142
|
+
new projen_1.SampleFile(this, 'app/components/ui/select.tsx', {
|
|
143
|
+
contents: (0, templates_1.getSelectTemplate)(),
|
|
144
|
+
});
|
|
137
145
|
}
|
|
138
146
|
/**
|
|
139
147
|
* Generates the admin components for the CMS.
|
|
@@ -170,33 +178,50 @@ class FndCmsProject extends frontend_1.FndFrontendProject {
|
|
|
170
178
|
* Generates the admin routes for the CMS.
|
|
171
179
|
*
|
|
172
180
|
* Creates:
|
|
173
|
-
* -
|
|
174
|
-
* -
|
|
175
|
-
* -
|
|
176
|
-
* -
|
|
177
|
-
* -
|
|
181
|
+
* - admin.tsx - Admin layout with sidebar and header
|
|
182
|
+
* - admin._index.tsx - Admin dashboard with stats
|
|
183
|
+
* - admin.content.tsx - Content section layout
|
|
184
|
+
* - admin.content._index.tsx - Content overview
|
|
185
|
+
* - admin.content.$type._index.tsx - Content type list
|
|
186
|
+
* - admin.content.$type.new.tsx - Create new content
|
|
187
|
+
* - admin.content.$type.$id.tsx - Edit existing content
|
|
188
|
+
*
|
|
189
|
+
* Note: Routes use "admin." prefix (not "_admin.") so they create URL paths
|
|
190
|
+
* at /admin/*. The underscore prefix in Remix creates pathless layouts.
|
|
178
191
|
*/
|
|
179
192
|
generateAdminRoutes() {
|
|
180
193
|
// Admin layout with sidebar and header
|
|
181
|
-
new projen_1.SampleFile(this, 'app/routes/
|
|
194
|
+
new projen_1.SampleFile(this, 'app/routes/admin.tsx', {
|
|
182
195
|
contents: (0, templates_1.getAdminLayoutTemplate)(),
|
|
183
196
|
});
|
|
184
197
|
// Admin dashboard with stats
|
|
185
|
-
new projen_1.SampleFile(this, 'app/routes/
|
|
198
|
+
new projen_1.SampleFile(this, 'app/routes/admin._index.tsx', {
|
|
186
199
|
contents: (0, templates_1.getAdminIndexTemplate)(),
|
|
187
200
|
});
|
|
188
201
|
// Content section layout
|
|
189
|
-
new projen_1.SampleFile(this, 'app/routes/
|
|
202
|
+
new projen_1.SampleFile(this, 'app/routes/admin.content.tsx', {
|
|
190
203
|
contents: (0, templates_1.getAdminContentRouteTemplate)(),
|
|
191
204
|
});
|
|
192
205
|
// Content overview
|
|
193
|
-
new projen_1.SampleFile(this, 'app/routes/
|
|
206
|
+
new projen_1.SampleFile(this, 'app/routes/admin.content._index.tsx', {
|
|
194
207
|
contents: (0, templates_1.getAdminContentIndexTemplate)(),
|
|
195
208
|
});
|
|
196
|
-
// Content type list
|
|
197
|
-
new projen_1.SampleFile(this, 'app/routes/
|
|
209
|
+
// Content type list (index route for the type)
|
|
210
|
+
new projen_1.SampleFile(this, 'app/routes/admin.content.$type._index.tsx', {
|
|
198
211
|
contents: (0, templates_1.getAdminContentTypeRouteTemplate)(),
|
|
199
212
|
});
|
|
213
|
+
// Create new content route
|
|
214
|
+
new projen_1.SampleFile(this, 'app/routes/admin.content.$type.new.tsx', {
|
|
215
|
+
contents: (0, templates_1.getAdminContentNewRouteTemplate)(),
|
|
216
|
+
});
|
|
217
|
+
// Edit content route
|
|
218
|
+
new projen_1.SampleFile(this, 'app/routes/admin.content.$type.$id.tsx', {
|
|
219
|
+
contents: (0, templates_1.getAdminContentEditRouteTemplate)(),
|
|
220
|
+
});
|
|
221
|
+
// Content API client
|
|
222
|
+
new projen_1.SampleFile(this, 'app/lib/content-api.ts', {
|
|
223
|
+
contents: (0, templates_1.getContentApiTemplate)(),
|
|
224
|
+
});
|
|
200
225
|
}
|
|
201
226
|
/**
|
|
202
227
|
* Generates the content type definition system.
|
|
@@ -237,7 +262,7 @@ class FndCmsProject extends frontend_1.FndFrontendProject {
|
|
|
237
262
|
contents: (0, templates_1.getContentEditorTemplate)(),
|
|
238
263
|
});
|
|
239
264
|
// Form field components
|
|
240
|
-
new projen_1.SampleFile(this, 'app/components/form-fields/index.
|
|
265
|
+
new projen_1.SampleFile(this, 'app/components/form-fields/index.tsx', {
|
|
241
266
|
contents: (0, templates_1.getFormFieldsIndexTemplate)(),
|
|
242
267
|
});
|
|
243
268
|
new projen_1.SampleFile(this, 'app/components/form-fields/text-field.tsx', {
|
|
@@ -303,7 +328,7 @@ class FndCmsProject extends frontend_1.FndFrontendProject {
|
|
|
303
328
|
* - app/components/media/media-uploader.tsx - Drag-drop upload with progress
|
|
304
329
|
* - app/components/media/media-grid.tsx - Grid display with selection
|
|
305
330
|
* - app/components/media/media-picker.tsx - Dialog for field integration
|
|
306
|
-
* - app/routes/
|
|
331
|
+
* - app/routes/admin.media.tsx - Media library route
|
|
307
332
|
* - app/components/ui/progress.tsx - Progress bar component
|
|
308
333
|
* - app/components/ui/dialog.tsx - Dialog component
|
|
309
334
|
* - app/components/ui/tabs.tsx - Tabs component
|
|
@@ -324,7 +349,7 @@ class FndCmsProject extends frontend_1.FndFrontendProject {
|
|
|
324
349
|
contents: (0, templates_1.getMediaPickerTemplate)(),
|
|
325
350
|
});
|
|
326
351
|
// Media library route
|
|
327
|
-
new projen_1.SampleFile(this, 'app/routes/
|
|
352
|
+
new projen_1.SampleFile(this, 'app/routes/admin.media.tsx', {
|
|
328
353
|
contents: (0, templates_1.getMediaLibraryRouteTemplate)(),
|
|
329
354
|
});
|
|
330
355
|
// Additional UI components for media library
|
package/lib/cms-project.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cms-project.js","sourceRoot":"","sources":["../src/cms-project.ts"],"names":[],"mappings":";;;AAAA,mCAAoC;AACpC,qDAA4D;AAE5D,
|
|
1
|
+
{"version":3,"file":"cms-project.js","sourceRoot":"","sources":["../src/cms-project.ts"],"names":[],"mappings":";;;AAAA,mCAAoC;AACpC,qDAA4D;AAE5D,2CAyDqB;AAErB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,MAAa,aAAc,SAAQ,6BAAkB;IACnD;;OAEG;IACa,WAAW,CAAU;IAErC;;OAEG;IACa,cAAc,CAAuB;IAErD;;;;;OAKG;IACH,YAAY,OAA6B;QACvC,4BAA4B;QAC5B,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;YACpB,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;QAC5D,CAAC;QACD,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;YAClB,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;QAC1D,CAAC;QACD,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;YACjB,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC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AI,mBAAU,CAAC,IAAI,EAAE,4BAA4B,EAAE;YACjD,QAAQ,EAAE,IAAA,wCAA4B,GAAE;SACzC,CAAC,CAAC;QAEH,6CAA6C;QAC7C,IAAI,mBAAU,CAAC,IAAI,EAAE,gCAAgC,EAAE;YACrD,QAAQ,EAAE,IAAA,+BAAmB,GAAE;SAChC,CAAC,CAAC;QAEH,IAAI,mBAAU,CAAC,IAAI,EAAE,8BAA8B,EAAE;YACnD,QAAQ,EAAE,IAAA,6BAAiB,GAAE;SAC9B,CAAC,CAAC;QAEH,IAAI,mBAAU,CAAC,IAAI,EAAE,4BAA4B,EAAE;YACjD,QAAQ,EAAE,IAAA,2BAAe,GAAE;SAC5B,CAAC,CAAC;IACL,CAAC;CACF;AAjYD,sCAiYC"}
|
package/lib/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
/**
|
|
3
3
|
* @fnd-platform/cms
|
|
4
4
|
*
|
|
@@ -7,14 +7,9 @@
|
|
|
7
7
|
*
|
|
8
8
|
* @packageDocumentation
|
|
9
9
|
*/
|
|
10
|
-
Object.defineProperty(exports,
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
11
|
exports.FndCmsProject = void 0;
|
|
12
12
|
// Main project class
|
|
13
|
-
var cms_project_1 = require(
|
|
14
|
-
Object.defineProperty(exports,
|
|
15
|
-
|
|
16
|
-
get: function () {
|
|
17
|
-
return cms_project_1.FndCmsProject;
|
|
18
|
-
},
|
|
19
|
-
});
|
|
20
|
-
//# sourceMappingURL=index.js.map
|
|
13
|
+
var cms_project_1 = require("./cms-project");
|
|
14
|
+
Object.defineProperty(exports, "FndCmsProject", { enumerable: true, get: function () { return cms_project_1.FndCmsProject; } });
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generates the admin content edit route template.
|
|
3
|
+
*
|
|
4
|
+
* This route provides a form for editing existing content items.
|
|
5
|
+
*
|
|
6
|
+
* @returns Template string for app/routes/_admin.content.$type.$id.tsx
|
|
7
|
+
*/
|
|
8
|
+
export declare function getAdminContentEditRouteTemplate(): string;
|
|
9
|
+
//# sourceMappingURL=admin-content-edit-route.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-content-edit-route.d.ts","sourceRoot":"","sources":["../../src/templates/admin-content-edit-route.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wBAAgB,gCAAgC,IAAI,MAAM,CAuLzD"}
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getAdminContentEditRouteTemplate = getAdminContentEditRouteTemplate;
|
|
4
|
+
/**
|
|
5
|
+
* Generates the admin content edit route template.
|
|
6
|
+
*
|
|
7
|
+
* This route provides a form for editing existing content items.
|
|
8
|
+
*
|
|
9
|
+
* @returns Template string for app/routes/_admin.content.$type.$id.tsx
|
|
10
|
+
*/
|
|
11
|
+
function getAdminContentEditRouteTemplate() {
|
|
12
|
+
return `import {
|
|
13
|
+
json,
|
|
14
|
+
redirect,
|
|
15
|
+
type LoaderFunctionArgs,
|
|
16
|
+
type ActionFunctionArgs,
|
|
17
|
+
type MetaFunction,
|
|
18
|
+
} from '@remix-run/node';
|
|
19
|
+
import { useLoaderData } from '@remix-run/react';
|
|
20
|
+
import { requireAuth, hasAnyRole, getOptionalUser, getAccessToken } from '~/lib/auth.server';
|
|
21
|
+
import { ContentEditor, type ContentActionData } from '~/components/admin/content-editor';
|
|
22
|
+
import { Breadcrumbs } from '~/components/admin/breadcrumbs';
|
|
23
|
+
import { contentTypes } from '~/content-types';
|
|
24
|
+
import { contentApi, type UpdateContentInput } from '~/lib/content-api';
|
|
25
|
+
|
|
26
|
+
export const meta: MetaFunction<typeof loader> = ({ data }) => {
|
|
27
|
+
const title = data?.content?.title ?? 'Edit Content';
|
|
28
|
+
return [{ title: \`\${title} - CMS Admin\` }];
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export async function loader({ request, params }: LoaderFunctionArgs) {
|
|
32
|
+
await requireAuth(request);
|
|
33
|
+
const user = await getOptionalUser(request);
|
|
34
|
+
const token = await getAccessToken(request);
|
|
35
|
+
|
|
36
|
+
const { type, id } = params;
|
|
37
|
+
|
|
38
|
+
if (!type || !id) {
|
|
39
|
+
throw new Response('Content type and ID required', { status: 400 });
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// Get content type definition
|
|
43
|
+
const contentType = contentTypes[type];
|
|
44
|
+
if (!contentType) {
|
|
45
|
+
throw new Response(\`Content type '\${type}' not found\`, { status: 404 });
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// Fetch content from API
|
|
49
|
+
let content;
|
|
50
|
+
try {
|
|
51
|
+
content = await contentApi.get(id, token);
|
|
52
|
+
} catch (error) {
|
|
53
|
+
throw new Response(\`Content not found\`, { status: 404 });
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// Check permissions
|
|
57
|
+
const canEdit = hasAnyRole(user, ['admin', 'editor']);
|
|
58
|
+
if (!canEdit) {
|
|
59
|
+
throw new Response('You do not have permission to edit content', { status: 403 });
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const canPublish = hasAnyRole(user, ['admin', 'editor']);
|
|
63
|
+
const canDelete = hasAnyRole(user, ['admin']);
|
|
64
|
+
|
|
65
|
+
return json({
|
|
66
|
+
contentType,
|
|
67
|
+
content,
|
|
68
|
+
permissions: { canPublish, canDelete },
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export async function action({ request, params }: ActionFunctionArgs) {
|
|
73
|
+
await requireAuth(request);
|
|
74
|
+
const user = await getOptionalUser(request);
|
|
75
|
+
const token = await getAccessToken(request);
|
|
76
|
+
|
|
77
|
+
const { type, id } = params;
|
|
78
|
+
|
|
79
|
+
if (!type || !id) {
|
|
80
|
+
return json<ContentActionData>(
|
|
81
|
+
{ success: false, message: 'Content type and ID required' },
|
|
82
|
+
{ status: 400 }
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
const formData = await request.formData();
|
|
87
|
+
const action = formData.get('_action') as string;
|
|
88
|
+
const formDataJson = formData.get('_formData') as string;
|
|
89
|
+
|
|
90
|
+
if (!formDataJson) {
|
|
91
|
+
return json<ContentActionData>(
|
|
92
|
+
{ success: false, message: 'Form data missing' },
|
|
93
|
+
{ status: 400 }
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
const data = JSON.parse(formDataJson) as Record<string, unknown>;
|
|
98
|
+
|
|
99
|
+
// Handle delete action
|
|
100
|
+
if (action === 'delete') {
|
|
101
|
+
const canDelete = hasAnyRole(user, ['admin']);
|
|
102
|
+
if (!canDelete) {
|
|
103
|
+
return json<ContentActionData>(
|
|
104
|
+
{ success: false, message: 'You do not have permission to delete' },
|
|
105
|
+
{ status: 403 }
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
try {
|
|
110
|
+
await contentApi.delete(id, token!);
|
|
111
|
+
return redirect(\`/admin/content/\${type}\`);
|
|
112
|
+
} catch (error) {
|
|
113
|
+
return json<ContentActionData>(
|
|
114
|
+
{
|
|
115
|
+
success: false,
|
|
116
|
+
message: error instanceof Error ? error.message : 'Failed to delete content',
|
|
117
|
+
},
|
|
118
|
+
{ status: 500 }
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// Check edit permissions
|
|
124
|
+
const canEdit = hasAnyRole(user, ['admin', 'editor']);
|
|
125
|
+
if (!canEdit) {
|
|
126
|
+
return json<ContentActionData>(
|
|
127
|
+
{ success: false, message: 'You do not have permission to edit content' },
|
|
128
|
+
{ status: 403 }
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// Determine status based on action
|
|
133
|
+
let status: 'draft' | 'published' | undefined;
|
|
134
|
+
if (action === 'publish') {
|
|
135
|
+
const canPublish = hasAnyRole(user, ['admin', 'editor']);
|
|
136
|
+
if (!canPublish) {
|
|
137
|
+
return json<ContentActionData>(
|
|
138
|
+
{ success: false, message: 'You do not have permission to publish' },
|
|
139
|
+
{ status: 403 }
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
status = 'published';
|
|
143
|
+
} else if (action === 'unpublish') {
|
|
144
|
+
status = 'draft';
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
try {
|
|
148
|
+
const input: UpdateContentInput = {
|
|
149
|
+
slug: data.slug as string,
|
|
150
|
+
title: data.title as string,
|
|
151
|
+
excerpt: data.excerpt as string | undefined,
|
|
152
|
+
content: data.content as string,
|
|
153
|
+
status,
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
await contentApi.update(id, input, token!);
|
|
157
|
+
|
|
158
|
+
return json<ContentActionData>({ success: true, message: 'Content saved successfully' });
|
|
159
|
+
} catch (error) {
|
|
160
|
+
return json<ContentActionData>(
|
|
161
|
+
{
|
|
162
|
+
success: false,
|
|
163
|
+
message: error instanceof Error ? error.message : 'Failed to save content',
|
|
164
|
+
},
|
|
165
|
+
{ status: 500 }
|
|
166
|
+
);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export default function EditContent() {
|
|
171
|
+
const { contentType, content, permissions } = useLoaderData<typeof loader>();
|
|
172
|
+
|
|
173
|
+
return (
|
|
174
|
+
<div className="space-y-6">
|
|
175
|
+
<Breadcrumbs
|
|
176
|
+
items={[
|
|
177
|
+
{ label: 'Content', href: '/admin/content' },
|
|
178
|
+
{ label: contentType.label, href: \`/admin/content/\${contentType.name}\` },
|
|
179
|
+
{ label: content.title },
|
|
180
|
+
]}
|
|
181
|
+
/>
|
|
182
|
+
|
|
183
|
+
<ContentEditor
|
|
184
|
+
contentType={contentType}
|
|
185
|
+
initialData={content}
|
|
186
|
+
mode="edit"
|
|
187
|
+
cancelUrl={\`/admin/content/\${contentType.name}\`}
|
|
188
|
+
permissions={permissions}
|
|
189
|
+
/>
|
|
190
|
+
</div>
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
`;
|
|
194
|
+
}
|
|
195
|
+
//# sourceMappingURL=admin-content-edit-route.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-content-edit-route.js","sourceRoot":"","sources":["../../src/templates/admin-content-edit-route.ts"],"names":[],"mappings":";;AAOA,4EAuLC;AA9LD;;;;;;GAMG;AACH,SAAgB,gCAAgC;IAC9C,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqLR,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generates the admin content create route template.
|
|
3
|
+
*
|
|
4
|
+
* This route provides a form for creating new content items.
|
|
5
|
+
*
|
|
6
|
+
* @returns Template string for app/routes/_admin.content.$type.new.tsx
|
|
7
|
+
*/
|
|
8
|
+
export declare function getAdminContentNewRouteTemplate(): string;
|
|
9
|
+
//# sourceMappingURL=admin-content-new-route.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-content-new-route.d.ts","sourceRoot":"","sources":["../../src/templates/admin-content-new-route.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wBAAgB,+BAA+B,IAAI,MAAM,CAoJxD"}
|