Skip to content

Commit c322247

Browse files
committed
chore(datagrid-web): revert reference set support for 9.24
1 parent 80d9c16 commit c322247

File tree

9 files changed

+19
-33
lines changed

9 files changed

+19
-33
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

packages/modules/data-widgets/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@mendix/data-widgets",
33
"moduleName": "Data Widgets",
4-
"version": "2.26.0",
4+
"version": "2.25.0",
55
"license": "Apache-2.0",
66
"copyright": "© Mendix Technology BV 2023. All rights reserved.",
77
"private": true,
@@ -27,13 +27,13 @@
2727
},
2828
"moduleFolderNameInModeler": "datawidgets",
2929
"marketplace": {
30-
"minimumMXVersion": "10.12.6.46815",
30+
"minimumMXVersion": "9.24.0.2965",
3131
"appNumber": 116540,
3232
"appName": "Data Widgets"
3333
},
3434
"testProject": {
3535
"githubUrl": "https://github.com/mendix/DataWidgets-module",
36-
"branchName": "main"
36+
"branchName": "data-widgets-backport-9-24"
3737
},
3838
"scripts": {
3939
"verify": "rui-verify-package-format",

packages/pluggableWidgets/datagrid-web/CHANGELOG.md

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

1515
- We added new 'Use lazy load' property that can be used to improve the end-user experience.
1616

17-
## [2.24.0] - 2024-09-23
17+
## [2.23.1] - 2024-09-25
1818

19-
### Added
19+
### Changed
2020

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

2323
## [2.23.0] - 2024-09-20
2424

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.26.0",
4+
"version": "2.25.0",
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
}
@@ -69,7 +68,7 @@ export class ColumnFilterStore implements IColumnFilterStore {
6968
return new RefFilterStore(this.toRefselectProps(props), dsViewState);
7069
}
7170

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

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

111-
const isListAttributeValue = (
112-
attribute?: ListAttributeValue | ListAttributeListValue
113-
): attribute is ListAttributeValue => {
114-
return !!(attribute && attribute.isList === false);
115-
};
116-
117110
const errorMessage = (propName: string): string =>
118111
`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

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<package xmlns="http://www.mendix.com/package/1.0/">
3-
<clientModule name="Datagrid" version="2.26.0" xmlns="http://www.mendix.com/clientModule/1.0/">
3+
<clientModule name="Datagrid" version="2.25.0" xmlns="http://www.mendix.com/clientModule/1.0/">
44
<widgetFiles>
55
<widgetFile path="Datagrid.xml" />
66
</widgetFiles>

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>;

0 commit comments

Comments
 (0)