Skip to content

Commit 3f78e5e

Browse files
authored
Merge pull request #215 from objectstack-ai/copilot/refactor-field-renderers-to-shadcn-ui
2 parents bf15b65 + 2214df2 commit 3f78e5e

25 files changed

+687
-1220
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"name": "@object-ui/plugin-calendar",
3+
"version": "0.3.0",
4+
"type": "module",
5+
"license": "MIT",
6+
"description": "Calendar view plugin for Object UI",
7+
"homepage": "https://www.objectui.org",
8+
"repository": {
9+
"type": "git",
10+
"url": "https://github.com/objectstack-ai/objectui.git",
11+
"directory": "packages/plugin-calendar"
12+
},
13+
"bugs": {
14+
"url": "https://github.com/objectstack-ai/objectui/issues"
15+
},
16+
"main": "dist/index.umd.cjs",
17+
"module": "dist/index.js",
18+
"types": "dist/index.d.ts",
19+
"exports": {
20+
".": {
21+
"types": "./dist/index.d.ts",
22+
"import": "./dist/index.js",
23+
"require": "./dist/index.umd.cjs"
24+
}
25+
},
26+
"scripts": {
27+
"build": "vite build",
28+
"test": "vitest run",
29+
"test:watch": "vitest",
30+
"type-check": "tsc --noEmit",
31+
"lint": "eslint ."
32+
},
33+
"dependencies": {
34+
"@object-ui/components": "workspace:*",
35+
"@object-ui/core": "workspace:*",
36+
"@object-ui/react": "workspace:*",
37+
"@object-ui/types": "workspace:*",
38+
"lucide-react": "^0.563.0"
39+
},
40+
"peerDependencies": {
41+
"react": "^18.0.0 || ^19.0.0",
42+
"react-dom": "^18.0.0 || ^19.0.0"
43+
},
44+
"devDependencies": {
45+
"@types/react": "^19.2.9",
46+
"@types/react-dom": "^19.2.3",
47+
"@vitejs/plugin-react": "^4.2.1",
48+
"typescript": "^5.9.3",
49+
"vite": "^7.3.1",
50+
"vite-plugin-dts": "^4.5.4"
51+
}
52+
}
File renamed without changes.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/**
2+
* ObjectUI
3+
* Copyright (c) 2024-present ObjectStack Inc.
4+
*
5+
* This source code is licensed under the MIT license found in the
6+
* LICENSE file in the root directory of this source tree.
7+
*/
8+
9+
import React from 'react';
10+
import { ComponentRegistry } from '@object-ui/core';
11+
import { ObjectCalendar } from './ObjectCalendar';
12+
import type { ObjectCalendarProps } from './ObjectCalendar';
13+
14+
export { ObjectCalendar };
15+
export type { ObjectCalendarProps };
16+
17+
// Register component
18+
const ObjectCalendarRenderer: React.FC<{ schema: any }> = ({ schema }) => {
19+
return <ObjectCalendar schema={schema} dataSource={null as any} />;
20+
};
21+
22+
ComponentRegistry.register('object-calendar', ObjectCalendarRenderer, {
23+
label: 'Object Calendar',
24+
category: 'plugin',
25+
inputs: [
26+
{ name: 'objectName', type: 'string', label: 'Object Name', required: true },
27+
{ name: 'calendar', type: 'object', label: 'Calendar Config', description: 'startDateField, endDateField, titleField, colorField' },
28+
],
29+
});
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"extends": "../../tsconfig.json",
3+
"compilerOptions": {
4+
"outDir": "dist",
5+
"jsx": "react-jsx",
6+
"baseUrl": ".",
7+
"paths": {
8+
"@/*": ["src/*"]
9+
},
10+
"noEmit": false,
11+
"declaration": true,
12+
"composite": true,
13+
"declarationMap": true,
14+
"skipLibCheck": true
15+
},
16+
"include": ["src"],
17+
"exclude": ["node_modules", "dist", "**/*.test.ts", "**/*.test.tsx"]
18+
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/**
2+
* ObjectUI
3+
* Copyright (c) 2024-present ObjectStack Inc.
4+
*
5+
* This source code is licensed under the MIT license found in the
6+
* LICENSE file in the root directory of this source tree.
7+
*/
8+
9+
import { defineConfig } from 'vite';
10+
import react from '@vitejs/plugin-react';
11+
import dts from 'vite-plugin-dts';
12+
import { resolve } from 'path';
13+
14+
export default defineConfig({
15+
plugins: [
16+
react(),
17+
dts({
18+
insertTypesEntry: true,
19+
include: ['src'],
20+
exclude: ['**/*.test.ts', '**/*.test.tsx', 'node_modules'],
21+
skipDiagnostics: true,
22+
}),
23+
],
24+
resolve: {
25+
alias: {
26+
'@': resolve(__dirname, './src'),
27+
},
28+
},
29+
build: {
30+
lib: {
31+
entry: resolve(__dirname, 'src/index.tsx'),
32+
name: 'ObjectUIPluginCalendar',
33+
fileName: 'index',
34+
},
35+
rollupOptions: {
36+
external: ['react', 'react-dom', '@object-ui/components', '@object-ui/core', '@object-ui/react', '@object-ui/types', 'lucide-react'],
37+
output: {
38+
globals: {
39+
react: 'React',
40+
'react-dom': 'ReactDOM',
41+
'@object-ui/components': 'ObjectUIComponents',
42+
'@object-ui/core': 'ObjectUICore',
43+
'@object-ui/react': 'ObjectUIReact',
44+
'@object-ui/types': 'ObjectUITypes',
45+
'lucide-react': 'LucideReact',
46+
},
47+
},
48+
},
49+
},
50+
});

packages/plugin-gantt/package.json

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"name": "@object-ui/plugin-gantt",
3+
"version": "0.3.0",
4+
"type": "module",
5+
"license": "MIT",
6+
"description": "Gantt chart plugin for Object UI",
7+
"homepage": "https://www.objectui.org",
8+
"repository": {
9+
"type": "git",
10+
"url": "https://github.com/objectstack-ai/objectui.git",
11+
"directory": "packages/plugin-gantt"
12+
},
13+
"bugs": {
14+
"url": "https://github.com/objectstack-ai/objectui/issues"
15+
},
16+
"main": "dist/index.umd.cjs",
17+
"module": "dist/index.js",
18+
"types": "dist/index.d.ts",
19+
"exports": {
20+
".": {
21+
"types": "./dist/index.d.ts",
22+
"import": "./dist/index.js",
23+
"require": "./dist/index.umd.cjs"
24+
}
25+
},
26+
"scripts": {
27+
"build": "vite build",
28+
"test": "vitest run",
29+
"test:watch": "vitest",
30+
"type-check": "tsc --noEmit",
31+
"lint": "eslint ."
32+
},
33+
"dependencies": {
34+
"@object-ui/components": "workspace:*",
35+
"@object-ui/core": "workspace:*",
36+
"@object-ui/react": "workspace:*",
37+
"@object-ui/types": "workspace:*",
38+
"lucide-react": "^0.563.0"
39+
},
40+
"peerDependencies": {
41+
"react": "^18.0.0 || ^19.0.0",
42+
"react-dom": "^18.0.0 || ^19.0.0"
43+
},
44+
"devDependencies": {
45+
"@types/react": "^19.2.9",
46+
"@types/react-dom": "^19.2.3",
47+
"@vitejs/plugin-react": "^4.2.1",
48+
"typescript": "^5.9.3",
49+
"vite": "^7.3.1",
50+
"vite-plugin-dts": "^4.5.4"
51+
}
52+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/**
2+
* ObjectUI
3+
* Copyright (c) 2024-present ObjectStack Inc.
4+
*
5+
* This source code is licensed under the MIT license found in the
6+
* LICENSE file in the root directory of this source tree.
7+
*/
8+
9+
import React from 'react';
10+
import { ComponentRegistry } from '@object-ui/core';
11+
import { ObjectGantt } from './ObjectGantt';
12+
import type { ObjectGanttProps } from './ObjectGantt';
13+
14+
export { ObjectGantt };
15+
export type { ObjectGanttProps };
16+
17+
// Register component
18+
const ObjectGanttRenderer: React.FC<{ schema: any }> = ({ schema }) => {
19+
return <ObjectGantt schema={schema} dataSource={null as any} />;
20+
};
21+
22+
ComponentRegistry.register('object-gantt', ObjectGanttRenderer, {
23+
label: 'Object Gantt',
24+
category: 'plugin',
25+
inputs: [
26+
{ name: 'objectName', type: 'string', label: 'Object Name', required: true },
27+
{ name: 'gantt', type: 'object', label: 'Gantt Config', description: 'startDateField, endDateField, titleField, progressField, dependenciesField' },
28+
],
29+
});
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"extends": "../../tsconfig.json",
3+
"compilerOptions": {
4+
"outDir": "dist",
5+
"jsx": "react-jsx",
6+
"baseUrl": ".",
7+
"paths": {
8+
"@/*": ["src/*"]
9+
},
10+
"noEmit": false,
11+
"declaration": true,
12+
"composite": true,
13+
"declarationMap": true,
14+
"skipLibCheck": true
15+
},
16+
"include": ["src"],
17+
"exclude": ["node_modules", "dist", "**/*.test.ts", "**/*.test.tsx"]
18+
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/**
2+
* ObjectUI
3+
* Copyright (c) 2024-present ObjectStack Inc.
4+
*
5+
* This source code is licensed under the MIT license found in the
6+
* LICENSE file in the root directory of this source tree.
7+
*/
8+
9+
import { defineConfig } from 'vite';
10+
import react from '@vitejs/plugin-react';
11+
import dts from 'vite-plugin-dts';
12+
import { resolve } from 'path';
13+
14+
export default defineConfig({
15+
plugins: [
16+
react(),
17+
dts({
18+
insertTypesEntry: true,
19+
include: ['src'],
20+
exclude: ['**/*.test.ts', '**/*.test.tsx', 'node_modules'],
21+
skipDiagnostics: true,
22+
}),
23+
],
24+
resolve: {
25+
alias: {
26+
'@': resolve(__dirname, './src'),
27+
},
28+
},
29+
build: {
30+
lib: {
31+
entry: resolve(__dirname, 'src/index.tsx'),
32+
name: 'ObjectUIPluginGantt',
33+
fileName: 'index',
34+
},
35+
rollupOptions: {
36+
external: ['react', 'react-dom', '@object-ui/components', '@object-ui/core', '@object-ui/react', '@object-ui/types', 'lucide-react'],
37+
output: {
38+
globals: {
39+
react: 'React',
40+
'react-dom': 'ReactDOM',
41+
'@object-ui/components': 'ObjectUIComponents',
42+
'@object-ui/core': 'ObjectUICore',
43+
'@object-ui/react': 'ObjectUIReact',
44+
'@object-ui/types': 'ObjectUITypes',
45+
'lucide-react': 'LucideReact',
46+
},
47+
},
48+
},
49+
},
50+
});

0 commit comments

Comments
 (0)