Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions packages/plugin-calendar/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"name": "@object-ui/plugin-calendar",
"version": "0.3.0",
"type": "module",
"license": "MIT",
"description": "Calendar view plugin for Object UI",
"homepage": "https://www.objectui.org",
"repository": {
"type": "git",
"url": "https://github.com/objectstack-ai/objectui.git",
"directory": "packages/plugin-calendar"
},
"bugs": {
"url": "https://github.com/objectstack-ai/objectui/issues"
},
"main": "dist/index.umd.cjs",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"require": "./dist/index.umd.cjs"
}
},
"scripts": {
"build": "vite build",
"test": "vitest run",
"test:watch": "vitest",
"type-check": "tsc --noEmit",
"lint": "eslint ."
},
"dependencies": {
"@object-ui/components": "workspace:*",
"@object-ui/core": "workspace:*",
"@object-ui/react": "workspace:*",
"@object-ui/types": "workspace:*",
"lucide-react": "^0.563.0"
},
"peerDependencies": {
"react": "^18.0.0 || ^19.0.0",
"react-dom": "^18.0.0 || ^19.0.0"
},
"devDependencies": {
"@types/react": "^19.2.9",
"@types/react-dom": "^19.2.3",
"@vitejs/plugin-react": "^4.2.1",
"typescript": "^5.9.3",
"vite": "^7.3.1",
"vite-plugin-dts": "^4.5.4"
}
}
29 changes: 29 additions & 0 deletions packages/plugin-calendar/src/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/**
* ObjectUI
* Copyright (c) 2024-present ObjectStack Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

import React from 'react';
import { ComponentRegistry } from '@object-ui/core';
import { ObjectCalendar } from './ObjectCalendar';
import type { ObjectCalendarProps } from './ObjectCalendar';

export { ObjectCalendar };
export type { ObjectCalendarProps };

// Register component
const ObjectCalendarRenderer: React.FC<{ schema: any }> = ({ schema }) => {
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The plugin renderers (ObjectCalendarRenderer, ObjectGanttRenderer, ObjectMapRenderer) pass dataSource={null as any} to their components without checking if the schema has inline data first. This differs from the pattern used in the views package where ObjectGridRenderer, ObjectFormRenderer, and ObjectViewRenderer check for inline data before rendering.

If these components are rendered without inline data (i.e., when schema.data.provider is not 'value'), they will throw an error "DataSource required for object/api providers" which will be displayed as an error state. While this is handled gracefully, it would be more consistent to add the same inline data guards that exist in the views package renderers.

Consider adding the same pattern used in packages/views/src/index.tsx lines 68-84 to provide a clearer error message upfront.

Suggested change
const ObjectCalendarRenderer: React.FC<{ schema: any }> = ({ schema }) => {
const ObjectCalendarRenderer: React.FC<{ schema: any }> = ({ schema }) => {
const provider = schema?.data?.provider;
if (provider && provider !== 'value') {
return (
<div className="text-sm text-destructive">
object-calendar plugin renderer requires inline data (schema.data.provider = &apos;value&apos;) when no dataSource is provided.
</div>
);
}

Copilot uses AI. Check for mistakes.
return <ObjectCalendar schema={schema} dataSource={null as any} />;
};

ComponentRegistry.register('object-calendar', ObjectCalendarRenderer, {
label: 'Object Calendar',
category: 'plugin',
inputs: [
{ name: 'objectName', type: 'string', label: 'Object Name', required: true },
{ name: 'calendar', type: 'object', label: 'Calendar Config', description: 'startDateField, endDateField, titleField, colorField' },
],
});
18 changes: 18 additions & 0 deletions packages/plugin-calendar/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "dist",
"jsx": "react-jsx",
"baseUrl": ".",
"paths": {
"@/*": ["src/*"]
},
"noEmit": false,
"declaration": true,
"composite": true,
"declarationMap": true,
"skipLibCheck": true
},
"include": ["src"],
"exclude": ["node_modules", "dist", "**/*.test.ts", "**/*.test.tsx"]
}
50 changes: 50 additions & 0 deletions packages/plugin-calendar/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/**
* ObjectUI
* Copyright (c) 2024-present ObjectStack Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import dts from 'vite-plugin-dts';
import { resolve } from 'path';

export default defineConfig({
plugins: [
react(),
dts({
insertTypesEntry: true,
include: ['src'],
exclude: ['**/*.test.ts', '**/*.test.tsx', 'node_modules'],
skipDiagnostics: true,
}),
],
resolve: {
alias: {
'@': resolve(__dirname, './src'),
},
},
build: {
lib: {
entry: resolve(__dirname, 'src/index.tsx'),
name: 'ObjectUIPluginCalendar',
fileName: 'index',
},
rollupOptions: {
external: ['react', 'react-dom', '@object-ui/components', '@object-ui/core', '@object-ui/react', '@object-ui/types', 'lucide-react'],
output: {
globals: {
react: 'React',
'react-dom': 'ReactDOM',
'@object-ui/components': 'ObjectUIComponents',
'@object-ui/core': 'ObjectUICore',
'@object-ui/react': 'ObjectUIReact',
'@object-ui/types': 'ObjectUITypes',
'lucide-react': 'LucideReact',
},
},
},
},
});
52 changes: 52 additions & 0 deletions packages/plugin-gantt/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"name": "@object-ui/plugin-gantt",
"version": "0.3.0",
"type": "module",
"license": "MIT",
"description": "Gantt chart plugin for Object UI",
"homepage": "https://www.objectui.org",
"repository": {
"type": "git",
"url": "https://github.com/objectstack-ai/objectui.git",
"directory": "packages/plugin-gantt"
},
"bugs": {
"url": "https://github.com/objectstack-ai/objectui/issues"
},
"main": "dist/index.umd.cjs",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"require": "./dist/index.umd.cjs"
}
},
"scripts": {
"build": "vite build",
"test": "vitest run",
"test:watch": "vitest",
"type-check": "tsc --noEmit",
"lint": "eslint ."
},
"dependencies": {
"@object-ui/components": "workspace:*",
"@object-ui/core": "workspace:*",
"@object-ui/react": "workspace:*",
"@object-ui/types": "workspace:*",
"lucide-react": "^0.563.0"
},
"peerDependencies": {
"react": "^18.0.0 || ^19.0.0",
"react-dom": "^18.0.0 || ^19.0.0"
},
"devDependencies": {
"@types/react": "^19.2.9",
"@types/react-dom": "^19.2.3",
"@vitejs/plugin-react": "^4.2.1",
"typescript": "^5.9.3",
"vite": "^7.3.1",
"vite-plugin-dts": "^4.5.4"
}
}
29 changes: 29 additions & 0 deletions packages/plugin-gantt/src/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/**
* ObjectUI
* Copyright (c) 2024-present ObjectStack Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

import React from 'react';
import { ComponentRegistry } from '@object-ui/core';
import { ObjectGantt } from './ObjectGantt';
import type { ObjectGanttProps } from './ObjectGantt';

export { ObjectGantt };
export type { ObjectGanttProps };

// Register component
const ObjectGanttRenderer: React.FC<{ schema: any }> = ({ schema }) => {
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The plugin renderers (ObjectCalendarRenderer, ObjectGanttRenderer, ObjectMapRenderer) pass dataSource={null as any} to their components without checking if the schema has inline data first. This differs from the pattern used in the views package where ObjectGridRenderer, ObjectFormRenderer, and ObjectViewRenderer check for inline data before rendering.

If these components are rendered without inline data (i.e., when schema.data.provider is not 'value'), they will throw an error "DataSource required for object/api providers" which will be displayed as an error state. While this is handled gracefully, it would be more consistent to add the same inline data guards that exist in the views package renderers.

Consider adding the same pattern used in packages/views/src/index.tsx lines 68-84 to provide a clearer error message upfront.

Suggested change
const ObjectGanttRenderer: React.FC<{ schema: any }> = ({ schema }) => {
const ObjectGanttRenderer: React.FC<{ schema: any }> = ({ schema }) => {
const provider = schema?.data?.provider;
// When used as a standalone plugin renderer, we only support inline data (provider: 'value')
// because no external DataSource is injected here. This mirrors the guard logic used in
// the views package to fail fast with a clearer error message.
if (provider && provider !== 'value') {
return (
<div className="text-sm text-destructive">
ObjectGantt plugin requires inline data (schema.data.provider === &quot;value&quot;) when no
DataSource is provided. Use a views renderer or supply inline data for this plugin.
</div>
);
}

Copilot uses AI. Check for mistakes.
return <ObjectGantt schema={schema} dataSource={null as any} />;
};

ComponentRegistry.register('object-gantt', ObjectGanttRenderer, {
label: 'Object Gantt',
category: 'plugin',
inputs: [
{ name: 'objectName', type: 'string', label: 'Object Name', required: true },
{ name: 'gantt', type: 'object', label: 'Gantt Config', description: 'startDateField, endDateField, titleField, progressField, dependenciesField' },
],
});
18 changes: 18 additions & 0 deletions packages/plugin-gantt/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "dist",
"jsx": "react-jsx",
"baseUrl": ".",
"paths": {
"@/*": ["src/*"]
},
"noEmit": false,
"declaration": true,
"composite": true,
"declarationMap": true,
"skipLibCheck": true
},
"include": ["src"],
"exclude": ["node_modules", "dist", "**/*.test.ts", "**/*.test.tsx"]
}
50 changes: 50 additions & 0 deletions packages/plugin-gantt/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/**
* ObjectUI
* Copyright (c) 2024-present ObjectStack Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import dts from 'vite-plugin-dts';
import { resolve } from 'path';

export default defineConfig({
plugins: [
react(),
dts({
insertTypesEntry: true,
include: ['src'],
exclude: ['**/*.test.ts', '**/*.test.tsx', 'node_modules'],
skipDiagnostics: true,
}),
],
resolve: {
alias: {
'@': resolve(__dirname, './src'),
},
},
build: {
lib: {
entry: resolve(__dirname, 'src/index.tsx'),
name: 'ObjectUIPluginGantt',
fileName: 'index',
},
rollupOptions: {
external: ['react', 'react-dom', '@object-ui/components', '@object-ui/core', '@object-ui/react', '@object-ui/types', 'lucide-react'],
output: {
globals: {
react: 'React',
'react-dom': 'ReactDOM',
'@object-ui/components': 'ObjectUIComponents',
'@object-ui/core': 'ObjectUICore',
'@object-ui/react': 'ObjectUIReact',
'@object-ui/types': 'ObjectUITypes',
'lucide-react': 'LucideReact',
},
},
},
},
});
52 changes: 52 additions & 0 deletions packages/plugin-map/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"name": "@object-ui/plugin-map",
"version": "0.3.0",
"type": "module",
"license": "MIT",
"description": "Map visualization plugin for Object UI",
"homepage": "https://www.objectui.org",
"repository": {
"type": "git",
"url": "https://github.com/objectstack-ai/objectui.git",
"directory": "packages/plugin-map"
},
"bugs": {
"url": "https://github.com/objectstack-ai/objectui/issues"
},
"main": "dist/index.umd.cjs",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"require": "./dist/index.umd.cjs"
}
},
"scripts": {
"build": "vite build",
"test": "vitest run",
"test:watch": "vitest",
"type-check": "tsc --noEmit",
"lint": "eslint ."
},
"dependencies": {
"@object-ui/components": "workspace:*",
"@object-ui/core": "workspace:*",
"@object-ui/react": "workspace:*",
"@object-ui/types": "workspace:*",
"lucide-react": "^0.563.0"
},
"peerDependencies": {
"react": "^18.0.0 || ^19.0.0",
"react-dom": "^18.0.0 || ^19.0.0"
},
"devDependencies": {
"@types/react": "^19.2.9",
"@types/react-dom": "^19.2.3",
"@vitejs/plugin-react": "^4.2.1",
"typescript": "^5.9.3",
"vite": "^7.3.1",
"vite-plugin-dts": "^4.5.4"
}
}
File renamed without changes.
29 changes: 29 additions & 0 deletions packages/plugin-map/src/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/**
* ObjectUI
* Copyright (c) 2024-present ObjectStack Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

import React from 'react';
import { ComponentRegistry } from '@object-ui/core';
import { ObjectMap } from './ObjectMap';
import type { ObjectMapProps } from './ObjectMap';

export { ObjectMap };
export type { ObjectMapProps };

// Register component
const ObjectMapRenderer: React.FC<{ schema: any }> = ({ schema }) => {
return <ObjectMap schema={schema} dataSource={null as any} />;
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The plugin renderers (ObjectCalendarRenderer, ObjectGanttRenderer, ObjectMapRenderer) pass dataSource={null as any} to their components without checking if the schema has inline data first. This differs from the pattern used in the views package where ObjectGridRenderer, ObjectFormRenderer, and ObjectViewRenderer check for inline data before rendering.

If these components are rendered without inline data (i.e., when schema.data.provider is not 'value'), they will throw an error "DataSource required for object/api providers" which will be displayed as an error state. While this is handled gracefully, it would be more consistent to add the same inline data guards that exist in the views package renderers.

Consider adding the same pattern used in packages/views/src/index.tsx lines 68-84 to provide a clearer error message upfront.

Suggested change
return <ObjectMap schema={schema} dataSource={null as any} />;
const provider = schema?.data?.provider;
const hasInlineData = provider === 'value';
const inlineData = hasInlineData ? schema?.data?.value : undefined;
if (!hasInlineData) {
return (
<div className="text-sm text-red-500">
Object Map plugin requires inline data. Set <code>schema.data.provider = &quot;value&quot;</code> and provide
inline data to use this renderer.
</div>
);
}
return <ObjectMap schema={schema} dataSource={inlineData} />;

Copilot uses AI. Check for mistakes.
};

ComponentRegistry.register('object-map', ObjectMapRenderer, {
label: 'Object Map',
category: 'plugin',
inputs: [
{ name: 'objectName', type: 'string', label: 'Object Name', required: true },
{ name: 'map', type: 'object', label: 'Map Config', description: 'latitudeField, longitudeField, titleField' },
],
});
Loading
Loading