Skip to content

Commit e6d1564

Browse files
committed
chore(datagrid-web): revert reference set support for 9.24
1 parent aad4eb1 commit e6d1564

File tree

10 files changed

+23
-217
lines changed

10 files changed

+23
-217
lines changed

packages/modules/data-widgets/CHANGELOG.md

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

77
## [Unreleased]
88

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

11-
### [2.10.2] DatagridDateFilter
12-
13-
#### Changed
14-
15-
- Widget maintenance.
16-
17-
#### Fixed
18-
19-
- Fixed issue with "empty" and "not empty" filters showing incorrect results.
20-
21-
### [2.9.1] DatagridDropdownFilter
22-
23-
#### Changed
24-
25-
- Widget maintenance.
26-
27-
### [2.8.1] DatagridNumberFilter
28-
29-
#### Changed
30-
31-
- Widget maintenance.
32-
33-
### [2.8.1] DatagridTextFilter
34-
35-
#### Changed
36-
37-
- Widget maintenance.
38-
39-
### [2.24.0] Datagrid
40-
41-
#### Added
42-
43-
- We have introduced support for reference set associations in the linked attribute property.
44-
45-
### [1.2.1] DropdownSort
46-
47-
#### Changed
48-
49-
- Widget maintenance.
50-
51-
### [1.12.0] Gallery
11+
### [2.23.1] Datagrid
5212

5313
#### Changed
5414

packages/modules/data-widgets/package.json

+2-2
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.24.0",
4+
"version": "2.23.1",
55
"license": "Apache-2.0",
66
"copyright": "© Mendix Technology BV 2023. All rights reserved.",
77
"private": true,
@@ -27,7 +27,7 @@
2727
},
2828
"moduleFolderNameInModeler": "datawidgets",
2929
"marketplace": {
30-
"minimumMXVersion": "10.12.0",
30+
"minimumMXVersion": "9.24.0.2965",
3131
"appNumber": 116540,
3232
"appName": "Data Widgets"
3333
},

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,7 +17,7 @@
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": {
@@ -51,7 +51,7 @@
5151
"devDependencies": {
5252
"@mendix/automation-utils": "workspace:*",
5353
"@mendix/eslint-config-web-widgets": "workspace:*",
54-
"@mendix/pluggable-widgets-tools": "^10.12.1",
54+
"@mendix/pluggable-widgets-tools": "^10.7.2",
5555
"@mendix/prettier-config-web-widgets": "workspace:*",
5656
"@mendix/run-e2e": "workspace:*",
5757
"@mendix/widget-plugin-external-events": "workspace:*",

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-3
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>;
@@ -143,7 +143,6 @@ export interface DatagridPreviewProps {
143143
style: string;
144144
styleObject?: CSSProperties;
145145
readOnly: boolean;
146-
renderMode?: "design" | "xray" | "structure";
147146
advanced: boolean;
148147
datasource: {} | { caption: string } | { type: string } | null;
149148
refreshInterval: number | null;

0 commit comments

Comments
 (0)