Skip to content

Commit ffdf408

Browse files
Copilothotlong
andcommitted
feat: Add namespace to all plugin registrations
- plugin-grid: use 'plugin-grid' and 'view' namespaces - plugin-aggrid: use 'plugin-aggrid' namespace - plugin-charts: use 'plugin-charts' and 'chart' namespaces - plugin-kanban: use 'plugin-kanban' namespace - plugin-form: use 'plugin-form' namespace - plugin-view: use 'plugin-view' and 'view' namespaces - plugin-calendar: use 'plugin-calendar' namespace - plugin-dashboard: use 'plugin-dashboard' namespace - plugin-editor: use 'plugin-editor' namespace - plugin-gantt: use 'plugin-gantt' namespace - plugin-map: use 'plugin-map' namespace - plugin-markdown: use 'plugin-markdown' namespace - plugin-timeline: use 'plugin-timeline' namespace - plugin-chatbot: use 'plugin-chatbot' namespace Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 7cbbab7 commit ffdf408

14 files changed

Lines changed: 29 additions & 6 deletions

File tree

packages/plugin-aggrid/src/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ ComponentRegistry.register(
9999
'aggrid',
100100
AgGridRenderer,
101101
{
102+
namespace: 'plugin-aggrid',
102103
label: 'AG Grid',
103104
icon: 'Table',
104105
category: 'plugin',
@@ -386,6 +387,7 @@ ComponentRegistry.register(
386387
'object-aggrid',
387388
ObjectAgGridRenderer,
388389
{
390+
namespace: 'plugin-aggrid',
389391
label: 'Object AG Grid',
390392
icon: 'Table',
391393
category: 'plugin',

packages/plugin-calendar/src/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ const ObjectCalendarRenderer: React.FC<{ schema: any }> = ({ schema }) => {
2828
};
2929

3030
ComponentRegistry.register('object-calendar', ObjectCalendarRenderer, {
31+
namespace: 'plugin-calendar',
3132
label: 'Object Calendar',
3233
category: 'plugin',
3334
inputs: [

packages/plugin-charts/src/index.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ ComponentRegistry.register(
5656
'bar-chart',
5757
ChartBarRenderer,
5858
{
59+
namespace: 'plugin-charts',
5960
label: 'Bar Chart',
6061
category: 'plugin',
6162
inputs: [
@@ -162,6 +163,7 @@ ComponentRegistry.register(
162163
'chart',
163164
ChartRenderer,
164165
{
166+
namespace: 'plugin-charts',
165167
label: 'Chart',
166168
category: 'plugin',
167169
inputs: [
@@ -212,9 +214,10 @@ export const chartComponents = {
212214

213215
// Alias for CRM App compatibility
214216
ComponentRegistry.register(
215-
'chart:bar',
217+
'bar',
216218
ChartRenderer, // Use the smart renderer to handle Tremor-like props
217219
{
220+
namespace: 'chart',
218221
label: 'Bar Chart (Alias)',
219222
category: 'plugin',
220223
defaultProps: { chartType: 'bar' }

packages/plugin-chatbot/src/renderer.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ ComponentRegistry.register('chatbot',
8787
);
8888
},
8989
{
90+
namespace: 'plugin-chatbot',
9091
label: 'Chatbot',
9192
inputs: [
9293
{

packages/plugin-dashboard/src/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ ComponentRegistry.register(
1717
'dashboard',
1818
DashboardRenderer,
1919
{
20+
namespace: 'plugin-dashboard',
2021
label: 'Dashboard',
2122
category: 'Complex',
2223
icon: 'layout-dashboard',
@@ -37,6 +38,7 @@ ComponentRegistry.register(
3738
'metric',
3839
MetricWidget,
3940
{
41+
namespace: 'plugin-dashboard',
4042
label: 'Metric Card',
4143
category: 'Dashboard',
4244
inputs: [

packages/plugin-editor/src/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ ComponentRegistry.register(
5858
'code-editor',
5959
CodeEditorRenderer,
6060
{
61+
namespace: 'plugin-editor',
6162
label: 'Code Editor',
6263
category: 'plugin',
6364
inputs: [

packages/plugin-form/src/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ const ObjectFormRenderer: React.FC<{ schema: any }> = ({ schema }) => {
1818
return <ObjectForm schema={schema} />;
1919
};
2020

21-
ComponentRegistry.register('object-form', ObjectFormRenderer);
21+
ComponentRegistry.register('object-form', ObjectFormRenderer, {
22+
namespace: 'plugin-form'
23+
});
2224
// Note: 'form' type is handled by @object-ui/components Form component
2325
// This plugin only handles 'object-form' which integrates with ObjectQL/ObjectStack

packages/plugin-gantt/src/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ const ObjectGanttRenderer: React.FC<{ schema: any }> = ({ schema }) => {
2020
};
2121

2222
ComponentRegistry.register('object-gantt', ObjectGanttRenderer, {
23+
namespace: 'plugin-gantt',
2324
label: 'Object Gantt',
2425
category: 'plugin',
2526
inputs: [

packages/plugin-grid/src/index.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,13 @@ const ObjectGridRenderer: React.FC<{ schema: any }> = ({ schema }) => {
2020
return <ObjectGrid schema={schema} dataSource={null as any} />;
2121
};
2222

23-
ComponentRegistry.register('object-grid', ObjectGridRenderer);
23+
ComponentRegistry.register('object-grid', ObjectGridRenderer, {
24+
namespace: 'plugin-grid'
25+
});
2426

2527
// Alias for view:grid
26-
ComponentRegistry.register('view:grid', ObjectGridRenderer, {
28+
ComponentRegistry.register('grid', ObjectGridRenderer, {
29+
namespace: 'view',
2730
label: 'Data Grid',
2831
category: 'view'
2932
});

packages/plugin-kanban/src/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ ComponentRegistry.register(
7878
'kanban',
7979
KanbanRenderer,
8080
{
81+
namespace: 'plugin-kanban',
8182
label: 'Kanban Board',
8283
icon: 'LayoutDashboard',
8384
category: 'plugin',

0 commit comments

Comments
 (0)