Skip to content

Commit b20c97f

Browse files
authored
Merge pull request lowcoder-org#626 from raheeliftikhar5/worflows-updates
Worflows updates + Table fixes
2 parents 113c768 + 9d81d29 commit b20c97f

File tree

12 files changed

+36
-18
lines changed

12 files changed

+36
-18
lines changed

.github/workflows/publish-lowcoder-cli.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99

1010
jobs:
1111
publish-package:
12+
if: ${{ github.repositoryUrl == 'git://github.com/lowcoder/lowcoder.git'}}
1213
runs-on: ubuntu-latest
1314
steps:
1415
- name: Checkout repository
@@ -19,7 +20,9 @@ jobs:
1920
id: check
2021
with:
2122
diff-search: true
23+
static-checking: localIsNew
2224
file-name: client/packages/lowcoder-cli/package.json
25+
file-url: https://unpkg.com/lowcoder-cli@latest/package.json
2326

2427
- name: Version update detected
2528
if: steps.check.outputs.changed == 'true'

.github/workflows/publish-lowcoder-comps.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99

1010
jobs:
1111
publish-package:
12+
if: ${{ github.repositoryUrl == 'git://github.com/lowcoder/lowcoder.git'}}
1213
runs-on: ubuntu-latest
1314
steps:
1415
- name: Checkout repository
@@ -19,7 +20,9 @@ jobs:
1920
id: check
2021
with:
2122
diff-search: true
23+
static-checking: localIsNew
2224
file-name: client/packages/lowcoder-comps/package.json
25+
file-url: https://unpkg.com/lowcoder-comps@latest/package.json
2326

2427
- name: Version update detected
2528
if: steps.check.outputs.changed == 'true'

.github/workflows/publish-lowcoder-core.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99

1010
jobs:
1111
publish-package:
12+
if: ${{ github.repositoryUrl == 'git://github.com/lowcoder/lowcoder.git'}}
1213
runs-on: ubuntu-latest
1314
steps:
1415
- name: Checkout repository
@@ -19,7 +20,9 @@ jobs:
1920
id: check
2021
with:
2122
diff-search: true
23+
static-checking: localIsNew
2224
file-name: client/packages/lowcoder-core/package.json
25+
file-url: https://unpkg.com/lowcoder-core@latest/package.json
2326

2427
- name: Version update detected
2528
if: steps.check.outputs.changed == 'true'

.github/workflows/publish-lowcoder-sdk.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99

1010
jobs:
1111
publish-package:
12+
if: ${{ github.repositoryUrl == 'git://github.com/lowcoder/lowcoder.git'}}
1213
runs-on: ubuntu-latest
1314
steps:
1415
- name: Checkout repository
@@ -19,7 +20,9 @@ jobs:
1920
id: check
2021
with:
2122
diff-search: true
23+
static-checking: localIsNew
2224
file-name: client/packages/lowcoder-sdk/package.json
25+
file-url: https://unpkg.com/lowcoder-sdk@latest/package.json
2326

2427
- name: Version update detected
2528
if: steps.check.outputs.changed == 'true'

client/packages/lowcoder/src/comps/comps/tableComp/column/tableColumnComp.tsx

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import { ColorControl } from "comps/controls/colorControl";
2727
import { JSONValue } from "util/jsonTypes";
2828
import styled from "styled-components";
2929
import { TextOverflowControl } from "comps/controls/textOverflowControl";
30-
import { TableColumnLinkStyle, styleControl } from "@lowcoder-ee/index.sdk";
3130
import { default as Divider } from "antd/es/divider";
3231
export type Render = ReturnType<ConstructorToComp<typeof RenderComp>["getOriginalComp"]>;
3332
export const RenderComp = withSelectedMultiContext(ColumnTypeComp);
@@ -86,6 +85,7 @@ export type CellColorViewType = (param: {
8685
export const columnChildrenMap = {
8786
// column title
8887
title: StringControl,
88+
showTitle: withDefault(BoolControl, true),
8989
// a custom column or a data column
9090
isCustom: valueComp<boolean>(false),
9191
// If it is a data column, it must be the name of the column and cannot be duplicated as a react key
@@ -149,6 +149,13 @@ export class ColumnComp extends ColumnInitComp {
149149
)
150150
);
151151
}
152+
if(action.type === CompActionTypes.CHANGE_VALUE) {
153+
const title = comp.children.title.unevaledValue;
154+
const dataIndex = comp.children.dataIndex.getView();
155+
if(!Boolean(title)) {
156+
comp.children.title.dispatchChangeValueAction(dataIndex);
157+
}
158+
}
152159
return comp;
153160
}
154161

@@ -180,9 +187,14 @@ export class ColumnComp extends ColumnInitComp {
180187
<>
181188
{this.children.title.propertyView({
182189
label: trans("table.columnTitle"),
190+
placeholder: this.children.dataIndex.getView(),
183191
})}
184192
{/* FIXME: cast type currently, return type of withContext should be corrected later */}
185193
{this.children.render.getPropertyView()}
194+
{this.children.showTitle.propertyView({
195+
label: trans("table.showTitle"),
196+
tooltip: trans("table.showTitleTooltip"),
197+
})}
186198
{ColumnTypeCompMap[columnType].canBeEditable() &&
187199
this.children.editable.propertyView({ label: trans("table.editable") })}
188200
{this.children.sortable.propertyView({
@@ -311,6 +323,7 @@ export function newPrimaryColumn(
311323
title?: string,
312324
isTag?: boolean
313325
): ConstructorToDataType<typeof ColumnComp> {
326+
console.log('newPrimaryColumn', title);
314327
return {
315328
title: title ?? key,
316329
dataIndex: key,

client/packages/lowcoder/src/comps/comps/tableComp/column/tableColumnListComp.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ export class ColumnListComp extends ColumnListTmpComp {
101101
dynamicColumn: boolean;
102102
data: Array<JSONObject>;
103103
}) {
104-
console.log("dataChangedAction", param);
105104
return customAction<ActionDataType>(
106105
{
107106
type: "dataChanged",

client/packages/lowcoder/src/comps/comps/tableComp/tableCompView.tsx

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -553,11 +553,6 @@ function ResizeableTable<RecordType extends object>(props: CustomTableProps<Reco
553553
} else {
554554
allColumnFixed = false;
555555
}
556-
if (allColumnFixed && index === props.columns.length - 1) {
557-
// all column fixed, the last column fill extra space
558-
colWidth = "auto";
559-
minWidth = resizeWidth;
560-
}
561556
return {
562557
...restCol,
563558
RC_TABLE_INTERNAL_COL_DEFINE: {
@@ -583,14 +578,6 @@ function ResizeableTable<RecordType extends object>(props: CustomTableProps<Reco
583578
width: resizeWidth,
584579
title: col.titleText,
585580
viewModeResizable: props.viewModeResizable,
586-
// onResize: (width: number) => {
587-
// if (width) {
588-
// setResizeData({
589-
// index: index,
590-
// width: width,
591-
// });
592-
// }
593-
// },
594581
onResize: (width: React.SyntheticEvent) => {
595582
if (width) {
596583
setResizeData({

client/packages/lowcoder/src/comps/comps/tableComp/tableToolbarComp.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ function ColumnSetting(props: {
609609
allChecked = false;
610610
}
611611
return (
612-
<ColumnCheckItem>
612+
<ColumnCheckItem key={columnView.dataIndex}>
613613
<CheckBox
614614
checked={checked}
615615
onChange={(e) => {
@@ -677,6 +677,7 @@ function ToolbarPopover(props: {
677677
<Popover
678678
open={visible}
679679
overlayStyle={{ pointerEvents: "auto" }}
680+
overlayInnerStyle={{ padding: '0' }}
680681
content={
681682
<div
682683
ref={popOverRef}

client/packages/lowcoder/src/comps/comps/tableComp/tableUtils.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ export function columnsToAntdFormat(
311311
}[];
312312
const title = renderTitle({ title: column.title, editable: column.editable });
313313
return {
314-
title: title,
314+
title: column.showTitle ? title : '',
315315
titleText: column.title,
316316
dataIndex: column.dataIndex,
317317
align: column.align,

client/packages/lowcoder/src/i18n/locales/de.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1124,7 +1124,9 @@ export const de = {
11241124
"columnValueTooltip": "\\'{{currentCell}}\\': Aktuelle Zelldaten\n \\'{{currentRow}}\\': Aktuelle Zeilendaten\n \\'{{currentIndex}}\\': Aktueller Datenindex (beginnend bei 0)\n Beispiel: \\'{{currentCell * 5}}\\' Show 5 Times the Original Value Data.",
11251125
"imageSrc": "Bildquelle",
11261126
"imageSize": "Bildgröße",
1127-
"columnTitle": "Titel",
1127+
"columnTitle": "Titel anzeigen",
1128+
"showTitle": "Show Title",
1129+
"showTitleTooltip": "Spaltentitel im Tabellenkopf ein-/ausblenden",
11281130
"sortable": "Sortierbar",
11291131
"align": "Ausrichtung",
11301132
"fixedColumn": "Feste Säule",

client/packages/lowcoder/src/i18n/locales/en.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1229,6 +1229,8 @@ export const en = {
12291229
"imageSrc": "Image Source",
12301230
"imageSize": "Image Size",
12311231
"columnTitle": "Title",
1232+
"showTitle": "Show Title",
1233+
"showTitleTooltip": "Show/Hide column title in table header",
12321234
"sortable": "Sortable",
12331235
"align": "Alignment",
12341236
"fixedColumn": "Fixed Column",

client/packages/lowcoder/src/i18n/locales/zh.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1200,6 +1200,8 @@ table: {
12001200
imageSrc: "图片链接",
12011201
imageSize: "图片尺寸",
12021202
columnTitle: "标题",
1203+
showTitle: "显示标题",
1204+
showTitleTooltip: "显示/隐藏表标题中的列标题",
12031205
sortable: "可排序",
12041206
align: "对齐方式",
12051207
fixedColumn: "固定列",

0 commit comments

Comments
 (0)