Skip to content
Closed
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
16 changes: 15 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,21 @@ jobs:
- name: Build packages
env:
NODE_OPTIONS: "--max_old_space_size=4096"
run: node common/scripts/install-run-rush.js build --only tag:package
NO_EMIT_ON_ERROR: "true"
run: |
# 设置环境变量确保错误信息完整输出
export NODE_OPTIONS="--max_old_space_size=4096"
export NO_EMIT_ON_ERROR="true"
# 运行构建,并将输出保存到文件
node common/scripts/install-run-rush.js build --only tag:package 2>&1 | tee build.log || {
echo "=== Build failed, showing last 1000 lines of build.log ==="
tail -n 1000 build.log
echo "=== Full error details ==="
# 尝试从日志中提取错误信息
grep -A 50 "TypeScript Compilation Errors" build.log || true
grep -A 50 "Build Error" build.log || true
exit 1
}

# - name: Run Bugserver
# working-directory: ./packages/vtable
Expand Down
58 changes: 29 additions & 29 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
"dependencies": {
"@arco-design/web-react": "2.60.2",
"@arco-design/web-vue": "^2.11.0",
"@visactor/vtable": "workspace:*",
"@visactor/vtable-gantt": "workspace:*",
"@visactor/react-vtable": "workspace:*",
"@visactor/vue-vtable": "workspace:*",
"@visactor/openinula-vtable": "workspace:*",
"@visactor/vtable-editors": "workspace:*",
"@visactor/vtable-export": "workspace:*",
"@visactor/vtable-search": "workspace:*",
"@visactor/vtable-sheet": "workspace:*",
"@visactor/vtable": "workspace:1.22.9-alpha.3",
"@visactor/vtable-gantt": "workspace:1.22.9-alpha.3",
"@visactor/react-vtable": "workspace:1.22.9-alpha.3",
"@visactor/vue-vtable": "workspace:1.22.9-alpha.3",
"@visactor/openinula-vtable": "workspace:1.22.9-alpha.3",
"@visactor/vtable-editors": "workspace:1.22.9-alpha.3",
"@visactor/vtable-export": "workspace:1.22.9-alpha.3",
"@visactor/vtable-search": "workspace:1.22.9-alpha.3",
"@visactor/vtable-sheet": "workspace:1.22.9-alpha.3",
"buble": "^0.20.0",
"@visactor/vchart": "2.0.11-alpha.3",
"markdown-it": "^13.0.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/openinula-vtable/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@visactor/openinula-vtable",
"version": "1.22.8",
"version": "1.22.9-alpha.3",
"description": "The openinula version of VTable",
"keywords": [
"openinula",
Expand Down Expand Up @@ -48,7 +48,7 @@
"access": "public"
},
"dependencies": {
"@visactor/vtable": "workspace:*",
"@visactor/vtable": "workspace:1.22.9-alpha.3",
"@visactor/vutils": "~1.0.17"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import type { BaseComponentProps } from '../base-component';
import { createComponent } from '../base-component';
import type { IRowDimension, IColumnDimension } from '@visactor/vtable';
import type { TYPES } from '@visactor/vtable';
type IRowDimension = TYPES.IRowDimension;
type IColumnDimension = TYPES.IColumnDimension;

export type RowPivotDimensionProps = IRowDimension & BaseComponentProps;
export type ColumnPivotDimensionProps = IColumnDimension & BaseComponentProps;
Expand Down
2 changes: 1 addition & 1 deletion packages/openinula-vtable/src/containers/withContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ export default function withContainer<Props extends ContainerProps, CompProps>(
</div>
);
});
Cls.displayName = name || Comp.name;
(Cls as any).displayName = name || Comp.name;
return Cls;
}
2 changes: 1 addition & 1 deletion packages/openinula-vtable/src/context/table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function withTableInstance<T>(Component: typeof Inula.Component) {
</TableContext.Consumer>
);
});
Com.displayName = Component.name;
(Com as any).displayName = Component.name;
return Com;
}

Expand Down
17 changes: 10 additions & 7 deletions packages/openinula-vtable/src/tables/base-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export interface BaseTableProps extends EventsProps {
onError?: (err: Error) => void;
}

type Props = Inula.PropsWithChildren<BaseTableProps>;
type Props = BaseTableProps & { children?: Inula.InulaNode };

const notOptionKeys = [
...INULA_PRIVATE_PROPS,
Expand Down Expand Up @@ -204,9 +204,12 @@ const BaseTable: Inula.FC<Props> = Inula.forwardRef((props, ref) => {
!isEqual(eventsBinded.current.records, props.records, { skipFunction: skipFunctionDiff })
) {
eventsBinded.current = props;
tableContext.current.table.setRecords(props.records as any[], {
restoreHierarchyState: props.option.restoreHierarchyState
});
tableContext.current.table.setRecords(
props.records as any[],
{
restoreHierarchyState: props.option.restoreHierarchyState
} as any
);
handleTableRender();
}
return;
Expand All @@ -229,7 +232,7 @@ const BaseTable: Inula.FC<Props> = Inula.forwardRef((props, ref) => {
prevRecords.current = props.records;
tableContext.current.table.setRecords(props.records, {
restoreHierarchyState: props.option?.restoreHierarchyState
});
} as any);
handleTableRender();
}
// tableContext.current = {
Expand All @@ -255,7 +258,7 @@ const BaseTable: Inula.FC<Props> = Inula.forwardRef((props, ref) => {
<RootTableContext.Provider value={tableContext.current}>
{toArray(props.children).map((child: Inula.InulaNode, index: number) => {
if (typeof child === 'string') {
return;
return null;
}

const childId = getComponentId(child, index);
Expand Down Expand Up @@ -295,6 +298,6 @@ export const createTable = <T extends Props>(componentName: string, type?: strin
}
return props;
});
Com.displayName = componentName;
(Com as any).displayName = componentName;
return Com;
};
2 changes: 1 addition & 1 deletion packages/openinula-vtable/src/tables/list-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ export interface ListTableProps
extends Omit<BaseTableProps, 'records' | 'type'>,
Omit<ListTableConstructorOptions, 'container'> {}

export const ListTable = createTable<Inula.PropsWithChildren<ListTableProps>>('ListTable', 'list-table');
export const ListTable = createTable<ListTableProps & { children?: Inula.InulaNode }>('ListTable', 'list-table');
4 changes: 2 additions & 2 deletions packages/openinula-vtable/src/tables/pivot-chart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import { createTable } from './base-table';

export interface PivotChartProps
extends Omit<BaseTableProps, 'records' | 'type'>,
Omit<PivotChartConstructorOptions, 'container'> {}
Omit<PivotChartConstructorOptions, 'container' | 'records'> {}

export const PivotChart = createTable<Inula.PropsWithChildren<PivotChartProps>>('PivotChart', 'pivot-chart');
export const PivotChart = createTable<PivotChartProps & { children?: Inula.InulaNode }>('PivotChart', 'pivot-chart');

export function registerChartModule(name: string, chart: any) {
VTable.register.chartModule(name, chart);
Expand Down
2 changes: 1 addition & 1 deletion packages/openinula-vtable/src/tables/pivot-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ export interface PivotTableProps
extends Omit<BaseTableProps, 'records' | 'type'>,
Omit<PivotTableConstructorOptions, 'container'> {}

export const PivotTable = createTable<Inula.PropsWithChildren<PivotTableProps>>('PivotTable', 'pivot-table');
export const PivotTable = createTable<PivotTableProps & { children?: Inula.InulaNode }>('PivotTable', 'pivot-table');
4 changes: 2 additions & 2 deletions packages/react-vtable/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@visactor/react-vtable",
"version": "1.22.8",
"version": "1.22.9-alpha.3",
"description": "The react version of VTable",
"keywords": [
"react",
Expand Down Expand Up @@ -50,7 +50,7 @@
"access": "public"
},
"dependencies": {
"@visactor/vtable": "workspace:*",
"@visactor/vtable": "workspace:1.22.9-alpha.3",
"@visactor/vutils": "~1.0.17",
"react-is": "^18.2.0",
"react-reconciler": "0.29.2"
Expand Down
1 change: 1 addition & 0 deletions packages/react-vtable/src/components/avatar/avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ function getGroupAttribute(props: AvatarProps) {
height: size,
clip: true,
cornerRadius: shape === 'circle' ? size / 2 : panelStyle.cornerRadius ?? 2,
cornerType: 'round', // 添加必需的 cornerType 属性
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
Expand Down
2 changes: 1 addition & 1 deletion packages/react-vtable/src/containers/withContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default function withContainer<Props extends ContainerProps, CompProps>(
name = 'TableContainer',
getProps?: (props: any) => CompProps
) {
const Cls = React.forwardRef<any, CompProps & Props>((props: CompProps & Props, ref) => {
const Cls = React.forwardRef<any, any>((props: any, ref) => {
const container = useRef();
const [inited, setInited] = useState(false);
const { className, style, width, ...options } = props;
Expand Down
2 changes: 1 addition & 1 deletion packages/react-vtable/src/context/table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const TableContext = React.createContext<TableContextType>(null);
TableContext.displayName = 'TableContext';

export function withTableInstance<T>(Component: typeof React.Component) {
const Com = React.forwardRef<any, T>((props: T, ref) => {
const Com = React.forwardRef<any, any>((props: any, ref) => {
return (
<TableContext.Consumer>
{(ctx: TableContextType) => <Component ref={ref} table={ctx.table} {...props} />}
Expand Down
9 changes: 5 additions & 4 deletions packages/react-vtable/src/table-components/base-component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const createComponent = <T extends ComponentProps>(
const ignoreKeys = ['id', 'updateId', 'componentIndex', 'children'];
const notOptionKeys = supportedEvents ? Object.keys(supportedEvents).concat(ignoreKeys) : ignoreKeys;

const Comp: React.FC<T> = (props: T) => {
const Comp = (props: T): React.ReactElement | null => {
const context = useContext(RootTableContext);
// const id = React.useRef<string | number>(isNil(props.id) ? uid(optionName) : props.id);

Expand All @@ -38,7 +38,7 @@ export const createComponent = <T extends ComponentProps>(

// rebind events after table render
const hasPrevEventsBinded = supportedEvents
? bindEventsToTable(context.table, props, eventsBinded.current, supportedEvents)
? bindEventsToTable(context.table, props as any, eventsBinded.current as any, supportedEvents)
: false;
if (hasPrevEventsBinded) {
eventsBinded.current = props;
Expand All @@ -55,7 +55,7 @@ export const createComponent = <T extends ComponentProps>(
useEffect(() => {
return () => {
if (supportedEvents) {
bindEventsToTable(context.table, null, eventsBinded.current, supportedEvents);
bindEventsToTable(context.table, null, eventsBinded.current as any, supportedEvents);
}
// deleteToContext(context, id.current, optionName, isSingle);
};
Expand All @@ -72,7 +72,8 @@ export const createComponent = <T extends ComponentProps>(
// }
// });
// }
return parseCustomChildren(props.children, props.componentId);
const result = parseCustomChildren(props.children, props.componentId);
return result as React.ReactElement | null;
};

Comp.displayName = componentName;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import type { BaseComponentProps } from '../base-component';
import { createComponent } from '../base-component';
import type { IRowDimension, IColumnDimension } from '@visactor/vtable';
import type { TYPES } from '@visactor/vtable';
type IRowDimension = TYPES.IRowDimension;
type IColumnDimension = TYPES.IColumnDimension;

export type RowPivotDimensionProps = IRowDimension & BaseComponentProps;
export type ColumnPivotDimensionProps = IColumnDimension & BaseComponentProps;
Expand Down
Loading
Loading