Skip to content

Commit 394079e

Browse files
committed
chore(datagrid-web): revert reference set support for 9.24
1 parent a2eec37 commit 394079e

File tree

10 files changed

+92
-106
lines changed

10 files changed

+92
-106
lines changed

packages/modules/data-widgets/CHANGELOG.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66

77
## [Unreleased]
88

9-
## [2.24.1] DataWidgets - 2024-10-14
9+
## [2.23.2] DataWidgets - 2024-10-14
1010

1111
### Fixed
1212

@@ -24,7 +24,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
2424

2525
- We fixed an issue where filters wouldn't reset.
2626

27-
## [2.24.0] DataWidgets - 2024-09-23
27+
## [2.23.1] DataWidgets - 2024-09-25
2828

2929
### [2.10.2] DatagridDateFilter
3030

@@ -54,11 +54,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5454

5555
- Widget maintenance.
5656

57-
### [2.24.0] Datagrid
57+
### [2.23.1] Datagrid
5858

5959
#### Added
6060

61-
- We have introduced support for reference set associations in the linked attribute property.
61+
- Widget maintenance.
6262

6363
### [1.2.1] DropdownSort
6464

+72-72
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,74 @@
11
{
2-
"name": "@mendix/data-widgets",
3-
"moduleName": "Data Widgets",
4-
"version": "2.24.1",
5-
"license": "Apache-2.0",
6-
"copyright": "© Mendix Technology BV 2023. All rights reserved.",
7-
"private": true,
8-
"repository": {
9-
"type": "git",
10-
"url": "https://github.com/mendix/web-widgets.git"
11-
},
12-
"mxpackage": {
13-
"name": "DataWidgets",
14-
"type": "module",
15-
"mpkName": "DataWidgets.mpk",
16-
"dependencies": [
17-
"@mendix/datagrid-date-filter-web",
18-
"@mendix/datagrid-dropdown-filter-web",
19-
"@mendix/datagrid-number-filter-web",
20-
"@mendix/datagrid-text-filter-web",
21-
"@mendix/datagrid-web",
22-
"@mendix/dropdown-sort-web",
23-
"@mendix/gallery-web",
24-
"@mendix/selection-helper-web",
25-
"@mendix/tree-node-web"
26-
]
27-
},
28-
"moduleFolderNameInModeler": "datawidgets",
29-
"marketplace": {
30-
"minimumMXVersion": "10.12.6.46815",
31-
"appNumber": 116540,
32-
"appName": "Data Widgets"
33-
},
34-
"testProject": {
35-
"githubUrl": "https://github.com/mendix/DataWidgets-module",
36-
"branchName": "main"
37-
},
38-
"scripts": {
39-
"verify": "rui-verify-package-format",
40-
"update-changelog": "rui-update-changelog-module",
41-
"build:module": "ts-node --project scripts/tsconfig.json scripts/build.ts",
42-
"build:deps": "turbo run build --filter=data-widgets^...",
43-
"build:include-deps": "pnpm run build:deps && pnpm run build:module",
44-
"create-gh-release": "rui-create-gh-release",
45-
"push-update": "ts-node --project scripts/tsconfig.json scripts/push-update.ts",
46-
"release:module": "ts-node --project scripts/tsconfig.json scripts/release.ts",
47-
"create-module-mpk": "turbo release:module --filter data-widgets",
48-
"start": "ts-node --project scripts/tsconfig.json scripts/start.ts",
49-
"publish-marketplace": "rui-publish-marketplace",
50-
"format": "prettier --write .",
51-
"lint": "tsc --project scripts/tsconfig.json"
52-
},
53-
"dependencies": {
54-
"@mendix/datagrid-date-filter-web": "workspace:*",
55-
"@mendix/datagrid-dropdown-filter-web": "workspace:*",
56-
"@mendix/datagrid-number-filter-web": "workspace:*",
57-
"@mendix/datagrid-text-filter-web": "workspace:*",
58-
"@mendix/datagrid-web": "workspace:*",
59-
"@mendix/dropdown-sort-web": "workspace:*",
60-
"@mendix/gallery-web": "workspace:*",
61-
"@mendix/selection-helper-web": "workspace:*",
62-
"@mendix/tree-node-web": "workspace:*"
63-
},
64-
"devDependencies": {
65-
"@mendix/automation-utils": "workspace:*",
66-
"@mendix/prettier-config-web-widgets": "workspace:*",
67-
"@rollup/plugin-node-resolve": "^15.2.3",
68-
"@rollup/plugin-terser": "^0.4.4",
69-
"concurrently": "^6.5.1",
70-
"copy-and-watch": "^0.1.6",
71-
"rollup": "^2.79.1",
72-
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.0/xlsx-0.20.0.tgz"
73-
}
2+
"name": "@mendix/data-widgets",
3+
"moduleName": "Data Widgets",
4+
"version": "2.23.2",
5+
"license": "Apache-2.0",
6+
"copyright": "© Mendix Technology BV 2023. All rights reserved.",
7+
"private": true,
8+
"repository": {
9+
"type": "git",
10+
"url": "https://github.com/mendix/web-widgets.git"
11+
},
12+
"mxpackage": {
13+
"name": "DataWidgets",
14+
"type": "module",
15+
"mpkName": "DataWidgets.mpk",
16+
"dependencies": [
17+
"@mendix/datagrid-date-filter-web",
18+
"@mendix/datagrid-dropdown-filter-web",
19+
"@mendix/datagrid-number-filter-web",
20+
"@mendix/datagrid-text-filter-web",
21+
"@mendix/datagrid-web",
22+
"@mendix/dropdown-sort-web",
23+
"@mendix/gallery-web",
24+
"@mendix/selection-helper-web",
25+
"@mendix/tree-node-web"
26+
]
27+
},
28+
"moduleFolderNameInModeler": "datawidgets",
29+
"marketplace": {
30+
"minimumMXVersion": "9.24.0.2965",
31+
"appNumber": 116540,
32+
"appName": "Data Widgets"
33+
},
34+
"testProject": {
35+
"githubUrl": "https://github.com/mendix/DataWidgets-module",
36+
"branchName": "data-widgets-backport-9-24"
37+
},
38+
"scripts": {
39+
"verify": "rui-verify-package-format",
40+
"update-changelog": "rui-update-changelog-module",
41+
"build:module": "ts-node --project scripts/tsconfig.json scripts/build.ts",
42+
"build:deps": "turbo run build --filter=data-widgets^...",
43+
"build:include-deps": "pnpm run build:deps && pnpm run build:module",
44+
"create-gh-release": "rui-create-gh-release",
45+
"push-update": "ts-node --project scripts/tsconfig.json scripts/push-update.ts",
46+
"release:module": "ts-node --project scripts/tsconfig.json scripts/release.ts",
47+
"create-module-mpk": "turbo release:module --filter data-widgets",
48+
"start": "ts-node --project scripts/tsconfig.json scripts/start.ts",
49+
"publish-marketplace": "rui-publish-marketplace",
50+
"format": "prettier --write .",
51+
"lint": "tsc --project scripts/tsconfig.json"
52+
},
53+
"dependencies": {
54+
"@mendix/datagrid-date-filter-web": "workspace:*",
55+
"@mendix/datagrid-dropdown-filter-web": "workspace:*",
56+
"@mendix/datagrid-number-filter-web": "workspace:*",
57+
"@mendix/datagrid-text-filter-web": "workspace:*",
58+
"@mendix/datagrid-web": "workspace:*",
59+
"@mendix/dropdown-sort-web": "workspace:*",
60+
"@mendix/gallery-web": "workspace:*",
61+
"@mendix/selection-helper-web": "workspace:*",
62+
"@mendix/tree-node-web": "workspace:*"
63+
},
64+
"devDependencies": {
65+
"@mendix/automation-utils": "workspace:*",
66+
"@mendix/prettier-config-web-widgets": "workspace:*",
67+
"@rollup/plugin-node-resolve": "^15.2.3",
68+
"@rollup/plugin-terser": "^0.4.4",
69+
"concurrently": "^6.5.1",
70+
"copy-and-watch": "^0.1.6",
71+
"rollup": "^2.79.1",
72+
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.0/xlsx-0.20.0.tgz"
73+
}
7474
}

packages/pluggableWidgets/datagrid-web/CHANGELOG.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66

77
## [Unreleased]
88

9-
## [2.24.0] - 2024-09-23
9+
## [2.23.1] - 2024-09-25
1010

11-
### Added
11+
### Changed
1212

13-
- We have introduced support for reference set associations in the linked attribute property.
13+
- Widget maintenance.
1414

1515
## [2.23.0] - 2024-09-20
1616

packages/pluggableWidgets/datagrid-web/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@mendix/datagrid-web",
33
"widgetName": "Datagrid",
4-
"version": "2.24.0",
4+
"version": "2.23.1",
55
"description": "",
66
"copyright": "© Mendix Technology BV 2023. All rights reserved.",
77
"private": true,
@@ -17,12 +17,12 @@
1717
"mpkName": "com.mendix.widget.web.Datagrid.mpk"
1818
},
1919
"marketplace": {
20-
"minimumMXVersion": "10.12.0",
20+
"minimumMXVersion": "9.24.0.2965",
2121
"appName": "Data Grid 2"
2222
},
2323
"testProject": {
2424
"githubUrl": "https://github.com/mendix/testProjects",
25-
"branchName": "datagrid-web-referenceSet"
25+
"branchName": "datagrid-web-next"
2626
},
2727
"packagePath": "com.mendix.widget.web",
2828
"scripts": {

packages/pluggableWidgets/datagrid-web/src/Datagrid.xml

-4
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,6 @@
7878
<attributeType name="Integer" />
7979
<attributeType name="Long" />
8080
</attributeTypes>
81-
<associationTypes>
82-
<associationType name="Reference" />
83-
<associationType name="ReferenceSet" />
84-
</associationTypes>
8581
</property>
8682
<property key="content" type="widgets" dataSource="../datasource" required="false">
8783
<caption>Custom content</caption>

packages/pluggableWidgets/datagrid-web/src/helpers/state/column/ColumnFilterStore.tsx

+2-9
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { StaticSelectFilterStore } from "@mendix/widget-plugin-filtering/stores/
44
import { InputFilterStore, attrgroupFilterStore } from "@mendix/widget-plugin-filtering/stores/store-utils";
55
import { ensure } from "@mendix/widget-plugin-platform/utils/ensure";
66
import { FilterCondition } from "mendix/filters";
7-
import { ListAttributeValue, ListAttributeListValue } from "mendix";
87
import { action, computed, makeObservable } from "mobx";
98
import { ReactNode, createElement } from "react";
109
import { ColumnsType } from "../../../../typings/DatagridProps";
@@ -50,7 +49,7 @@ export class ColumnFilterStore implements IColumnFilterStore {
5049

5150
if (store.type === "refselect") {
5251
store.updateProps(this.toRefselectProps(props));
53-
} else if (isListAttributeValue(props.attribute)) {
52+
} else if (props.attribute) {
5453
store.updateProps([props.attribute]);
5554
}
5655
}
@@ -68,7 +67,7 @@ export class ColumnFilterStore implements IColumnFilterStore {
6867
return new RefFilterStore(this.toRefselectProps(props), dsViewState);
6968
}
7069

71-
if (isListAttributeValue(props.attribute)) {
70+
if (props.attribute) {
7271
return attrgroupFilterStore(props.attribute.type, [props.attribute], dsViewState);
7372
}
7473

@@ -107,11 +106,5 @@ export class ColumnFilterStore implements IColumnFilterStore {
107106
}
108107
}
109108

110-
const isListAttributeValue = (
111-
attribute?: ListAttributeValue | ListAttributeListValue
112-
): attribute is ListAttributeValue => {
113-
return !!(attribute && attribute.isList === false);
114-
};
115-
116109
const errorMessage = (propName: string): string =>
117110
`Can't map ColumnsType to AssociationProperties: ${propName} is undefined`;

packages/pluggableWidgets/datagrid-web/src/helpers/state/column/ColumnStore.tsx

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import {
22
DynamicValue,
33
ListAttributeValue,
4-
ListAttributeListValue,
54
ListExpressionValue,
65
ListWidgetValue,
76
ObjectItem,
@@ -33,9 +32,7 @@ export class ColumnStore implements GridColumn {
3332
private _header?: DynamicValue<string> = undefined; // can render when unavailable
3433
private _columnClass?: ListExpressionValue<string> = undefined; // can render when unavailable
3534
private _tooltip?: ListExpressionValue<string> = undefined; // part of attribute or dynamicText
36-
private _attribute?:
37-
| ListAttributeValue<string | Big | boolean | Date>
38-
| ListAttributeListValue<string | Big | boolean | Date> = undefined; // as "attribute"
35+
private _attribute?: ListAttributeValue<string | Big | boolean | Date> = undefined; // as "attribute"
3936
private _dynamicText?: ListExpressionValue<string> = undefined; // as "dynamicText"
4037
private _content?: ListWidgetValue = undefined; // as "customContent"
4138

Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8" ?>
22
<package xmlns="http://www.mendix.com/package/1.0/">
3-
<clientModule name="Datagrid" version="2.24.0" xmlns="http://www.mendix.com/clientModule/1.0/">
3+
<clientModule name="Datagrid" version="2.23.1" xmlns="http://www.mendix.com/clientModule/1.0/">
44
<widgetFiles>
55
<widgetFile path="Datagrid.xml" />
66
</widgetFiles>
77
<files>
88
<file path="com/mendix/widget/web/datagrid/" />
99
</files>
1010
</clientModule>
11-
</package>
11+
</package>

packages/pluggableWidgets/datagrid-web/typings/DatagridProps.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* @author Mendix Widgets Framework Team
55
*/
66
import { ComponentType, CSSProperties, ReactNode } from "react";
7-
import { ActionValue, DynamicValue, EditableValue, ListValue, ListActionValue, ListAttributeValue, ListAttributeListValue, ListExpressionValue, ListReferenceValue, ListReferenceSetValue, ListWidgetValue, SelectionSingleValue, SelectionMultiValue } from "mendix";
7+
import { ActionValue, DynamicValue, EditableValue, ListValue, ListActionValue, ListAttributeValue, ListExpressionValue, ListReferenceValue, ListReferenceSetValue, ListWidgetValue, SelectionSingleValue, SelectionMultiValue } from "mendix";
88
import { Big } from "big.js";
99

1010
export type ItemSelectionMethodEnum = "checkbox" | "rowClick";
@@ -23,7 +23,7 @@ export type AlignmentEnum = "left" | "center" | "right";
2323

2424
export interface ColumnsType {
2525
showContentAs: ShowContentAsEnum;
26-
attribute?: ListAttributeValue<string | Big | boolean | Date> | ListAttributeListValue<string | Big | boolean | Date>;
26+
attribute?: ListAttributeValue<string | Big | boolean | Date>;
2727
content?: ListWidgetValue;
2828
dynamicText?: ListExpressionValue<string>;
2929
exportValue?: ListExpressionValue<string>;

pnpm-lock.yaml

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)