Skip to content

Commit

Permalink
chore(datagrid-web): revert reference set support for 9.24
Browse files Browse the repository at this point in the history
  • Loading branch information
gjulivan committed Nov 13, 2024
1 parent 4c645f2 commit 2531a52
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 83 deletions.
58 changes: 4 additions & 54 deletions packages/modules/data-widgets/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,57 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

## [2.26.0] DataWidgets - 2024-10-31

### [2.10.3] DatagridDateFilter

#### Fixed

- We fixed an issue with grid wide filters not resetting.

### [2.9.2] DatagridDropdownFilter

#### Fixed

- We fixed an issue where onChange events were not being triggered on dropdown filter.

- We fixed an issue with dropdown filters in some cases not setting or resetting.

### [2.8.3] DatagridNumberFilter

#### Fixed

- We fixed an issue with grid wide filters not resetting.

### [2.8.3] DatagridTextFilter

#### Fixed

- We fixed an issue with grid wide filters not resetting.

### [2.26.1] Datagrid

#### Changed

- We improved our drop-down filter integration - now the drop-down can store its value in the personalization config. For best results, the new 'Use lazy load' property should be set to false.

#### Added

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

#### Fixed

- We fixed an issue with grid wide filters not resetting.

### [1.12.2] Gallery

#### Fixed

- We resolved an issue where the gallery filter was not being applied at first.

- We fixed an issue with grid wide filters not resetting.

## [2.24.1] DataWidgets - 2024-10-14
## [2.23.2] DataWidgets - 2024-10-14

### Fixed

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

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

## [2.24.0] DataWidgets - 2024-09-23
## [2.23.1] DataWidgets - 2024-09-25

### [2.10.2] DatagridDateFilter

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

- Widget maintenance.

### [2.24.0] Datagrid
### [2.23.1] Datagrid

#### Added

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

### [1.2.1] DropdownSort

Expand Down
6 changes: 3 additions & 3 deletions packages/modules/data-widgets/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@mendix/data-widgets",
"moduleName": "Data Widgets",
"version": "2.28.0",
"version": "2.27.0",
"license": "Apache-2.0",
"copyright": "© Mendix Technology BV 2023. All rights reserved.",
"private": true,
Expand All @@ -27,13 +27,13 @@
},
"moduleFolderNameInModeler": "datawidgets",
"marketplace": {
"minimumMXVersion": "10.12.6.46815",
"minimumMXVersion": "9.24.0.2965",
"appNumber": 116540,
"appName": "Data Widgets"
},
"testProject": {
"githubUrl": "https://github.com/mendix/DataWidgets-module",
"branchName": "main"
"branchName": "data-widgets-backport-9-24"
},
"scripts": {
"verify": "rui-verify-package-format",
Expand Down
6 changes: 3 additions & 3 deletions packages/pluggableWidgets/datagrid-web/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

- We fixed an issue with grid wide filters not resetting.

## [2.24.0] - 2024-09-23
## [2.23.1] - 2024-09-25

### Added
### Changed

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

## [2.23.0] - 2024-09-20

Expand Down
6 changes: 3 additions & 3 deletions packages/pluggableWidgets/datagrid-web/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@mendix/datagrid-web",
"widgetName": "Datagrid",
"version": "2.28.0",
"version": "2.27.0",
"description": "",
"copyright": "© Mendix Technology BV 2023. All rights reserved.",
"private": true,
Expand All @@ -17,12 +17,12 @@
"mpkName": "com.mendix.widget.web.Datagrid.mpk"
},
"marketplace": {
"minimumMXVersion": "10.12.0",
"minimumMXVersion": "9.24.0.2965",
"appName": "Data Grid 2"
},
"testProject": {
"githubUrl": "https://github.com/mendix/testProjects",
"branchName": "datagrid-web-referenceSet"
"branchName": "datagrid-web-next"
},
"packagePath": "com.mendix.widget.web",
"scripts": {
Expand Down
4 changes: 0 additions & 4 deletions packages/pluggableWidgets/datagrid-web/src/Datagrid.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,6 @@
<attributeType name="Integer" />
<attributeType name="Long" />
</attributeTypes>
<associationTypes>
<associationType name="Reference" />
<associationType name="ReferenceSet" />
</associationTypes>
</property>
<property key="content" type="widgets" dataSource="../datasource" required="false">
<caption>Custom content</caption>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { StaticSelectFilterStore } from "@mendix/widget-plugin-filtering/stores/
import { InputFilterStore, attrgroupFilterStore } from "@mendix/widget-plugin-filtering/stores/store-utils";
import { ensure } from "@mendix/widget-plugin-platform/utils/ensure";
import { FilterCondition } from "mendix/filters";
import { ListAttributeValue, ListAttributeListValue } from "mendix";
import { action, computed, makeObservable } from "mobx";
import { ReactNode, createElement } from "react";
import { ColumnsType } from "../../../../typings/DatagridProps";
Expand Down Expand Up @@ -50,7 +49,7 @@ export class ColumnFilterStore implements IColumnFilterStore {

if (store.type === "refselect") {
store.updateProps(this.toRefselectProps(props));
} else if (isListAttributeValue(props.attribute)) {
} else if (props.attribute) {
store.updateProps([props.attribute]);
}
}
Expand All @@ -69,7 +68,7 @@ export class ColumnFilterStore implements IColumnFilterStore {
return new RefFilterStore(this.toRefselectProps(props), dsViewState);
}

if (isListAttributeValue(props.attribute)) {
if (props.attribute) {
return attrgroupFilterStore(props.attribute.type, [props.attribute], dsViewState);
}

Expand Down Expand Up @@ -108,11 +107,5 @@ export class ColumnFilterStore implements IColumnFilterStore {
}
}

const isListAttributeValue = (
attribute?: ListAttributeValue | ListAttributeListValue
): attribute is ListAttributeValue => {
return !!(attribute && attribute.isList === false);
};

const errorMessage = (propName: string): string =>
`Can't map ColumnsType to AssociationProperties: ${propName} is undefined`;
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {
DynamicValue,
ListAttributeValue,
ListAttributeListValue,
ListExpressionValue,
ListWidgetValue,
ObjectItem,
Expand Down Expand Up @@ -35,9 +34,7 @@ export class ColumnStore implements GridColumn {
private _header?: DynamicValue<string> = undefined; // can render when unavailable
private _columnClass?: ListExpressionValue<string> = undefined; // can render when unavailable
private _tooltip?: ListExpressionValue<string> = undefined; // part of attribute or dynamicText
private _attribute?:
| ListAttributeValue<string | Big | boolean | Date>
| ListAttributeListValue<string | Big | boolean | Date> = undefined; // as "attribute"
private _attribute?: ListAttributeValue<string | Big | boolean | Date> = undefined; // as "attribute"
private _dynamicText?: ListExpressionValue<string> = undefined; // as "dynamicText"
private _content?: ListWidgetValue = undefined; // as "customContent"

Expand Down
2 changes: 1 addition & 1 deletion packages/pluggableWidgets/datagrid-web/src/package.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<package xmlns="http://www.mendix.com/package/1.0/">
<clientModule name="Datagrid" version="2.28.0" xmlns="http://www.mendix.com/clientModule/1.0/">
<clientModule name="Datagrid" version="2.27.0" xmlns="http://www.mendix.com/clientModule/1.0/">
<widgetFiles>
<widgetFile path="Datagrid.xml" />
</widgetFiles>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @author Mendix Widgets Framework Team
*/
import { ComponentType, CSSProperties, ReactNode } from "react";
import { ActionValue, DynamicValue, EditableValue, ListValue, ListActionValue, ListAttributeValue, ListAttributeListValue, ListExpressionValue, ListReferenceValue, ListReferenceSetValue, ListWidgetValue, SelectionSingleValue, SelectionMultiValue } from "mendix";
import { ActionValue, DynamicValue, EditableValue, ListValue, ListActionValue, ListAttributeValue, ListExpressionValue, ListReferenceValue, ListReferenceSetValue, ListWidgetValue, SelectionSingleValue, SelectionMultiValue } from "mendix";
import { Big } from "big.js";

export type ItemSelectionMethodEnum = "checkbox" | "rowClick";
Expand All @@ -25,7 +25,7 @@ export type AlignmentEnum = "left" | "center" | "right";

export interface ColumnsType {
showContentAs: ShowContentAsEnum;
attribute?: ListAttributeValue<string | Big | boolean | Date> | ListAttributeListValue<string | Big | boolean | Date>;
attribute?: ListAttributeValue<string | Big | boolean | Date>;
content?: ListWidgetValue;
dynamicText?: ListExpressionValue<string>;
exportValue?: ListExpressionValue<string>;
Expand Down

0 comments on commit 2531a52

Please sign in to comment.