From 2531a526e9512cbd5f20e278be59e2e463a8872f Mon Sep 17 00:00:00 2001 From: Grand Julivan Date: Mon, 14 Oct 2024 17:29:11 +0200 Subject: [PATCH] chore(datagrid-web): revert reference set support for 9.24 --- packages/modules/data-widgets/CHANGELOG.md | 58 ++----------------- packages/modules/data-widgets/package.json | 6 +- .../datagrid-web/CHANGELOG.md | 6 +- .../datagrid-web/package.json | 6 +- .../datagrid-web/src/Datagrid.xml | 4 -- .../state/column/ColumnFilterStore.tsx | 11 +--- .../src/helpers/state/column/ColumnStore.tsx | 5 +- .../datagrid-web/src/package.xml | 2 +- .../datagrid-web/typings/DatagridProps.d.ts | 4 +- 9 files changed, 19 insertions(+), 83 deletions(-) diff --git a/packages/modules/data-widgets/CHANGELOG.md b/packages/modules/data-widgets/CHANGELOG.md index 2b6f6b8ccb..b0022e380b 100644 --- a/packages/modules/data-widgets/CHANGELOG.md +++ b/packages/modules/data-widgets/CHANGELOG.md @@ -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 @@ -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 @@ -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 diff --git a/packages/modules/data-widgets/package.json b/packages/modules/data-widgets/package.json index eeb6a7ab5e..a85ae70d0f 100644 --- a/packages/modules/data-widgets/package.json +++ b/packages/modules/data-widgets/package.json @@ -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, @@ -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", diff --git a/packages/pluggableWidgets/datagrid-web/CHANGELOG.md b/packages/pluggableWidgets/datagrid-web/CHANGELOG.md index 9a42e92202..c313958f38 100644 --- a/packages/pluggableWidgets/datagrid-web/CHANGELOG.md +++ b/packages/pluggableWidgets/datagrid-web/CHANGELOG.md @@ -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 diff --git a/packages/pluggableWidgets/datagrid-web/package.json b/packages/pluggableWidgets/datagrid-web/package.json index dcb1f57431..893f11afc9 100644 --- a/packages/pluggableWidgets/datagrid-web/package.json +++ b/packages/pluggableWidgets/datagrid-web/package.json @@ -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, @@ -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": { diff --git a/packages/pluggableWidgets/datagrid-web/src/Datagrid.xml b/packages/pluggableWidgets/datagrid-web/src/Datagrid.xml index a955ee3ec0..b01cdc1874 100644 --- a/packages/pluggableWidgets/datagrid-web/src/Datagrid.xml +++ b/packages/pluggableWidgets/datagrid-web/src/Datagrid.xml @@ -86,10 +86,6 @@ - - - - Custom content diff --git a/packages/pluggableWidgets/datagrid-web/src/helpers/state/column/ColumnFilterStore.tsx b/packages/pluggableWidgets/datagrid-web/src/helpers/state/column/ColumnFilterStore.tsx index fff0191303..9df6d038e4 100644 --- a/packages/pluggableWidgets/datagrid-web/src/helpers/state/column/ColumnFilterStore.tsx +++ b/packages/pluggableWidgets/datagrid-web/src/helpers/state/column/ColumnFilterStore.tsx @@ -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"; @@ -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]); } } @@ -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); } @@ -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`; diff --git a/packages/pluggableWidgets/datagrid-web/src/helpers/state/column/ColumnStore.tsx b/packages/pluggableWidgets/datagrid-web/src/helpers/state/column/ColumnStore.tsx index a182f04992..2e5702bd7c 100644 --- a/packages/pluggableWidgets/datagrid-web/src/helpers/state/column/ColumnStore.tsx +++ b/packages/pluggableWidgets/datagrid-web/src/helpers/state/column/ColumnStore.tsx @@ -1,7 +1,6 @@ import { DynamicValue, ListAttributeValue, - ListAttributeListValue, ListExpressionValue, ListWidgetValue, ObjectItem, @@ -35,9 +34,7 @@ export class ColumnStore implements GridColumn { private _header?: DynamicValue = undefined; // can render when unavailable private _columnClass?: ListExpressionValue = undefined; // can render when unavailable private _tooltip?: ListExpressionValue = undefined; // part of attribute or dynamicText - private _attribute?: - | ListAttributeValue - | ListAttributeListValue = undefined; // as "attribute" + private _attribute?: ListAttributeValue = undefined; // as "attribute" private _dynamicText?: ListExpressionValue = undefined; // as "dynamicText" private _content?: ListWidgetValue = undefined; // as "customContent" diff --git a/packages/pluggableWidgets/datagrid-web/src/package.xml b/packages/pluggableWidgets/datagrid-web/src/package.xml index b9884084e4..87ca1b75f4 100644 --- a/packages/pluggableWidgets/datagrid-web/src/package.xml +++ b/packages/pluggableWidgets/datagrid-web/src/package.xml @@ -1,6 +1,6 @@ - + diff --git a/packages/pluggableWidgets/datagrid-web/typings/DatagridProps.d.ts b/packages/pluggableWidgets/datagrid-web/typings/DatagridProps.d.ts index f479524f3b..d3407bc2c8 100644 --- a/packages/pluggableWidgets/datagrid-web/typings/DatagridProps.d.ts +++ b/packages/pluggableWidgets/datagrid-web/typings/DatagridProps.d.ts @@ -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"; @@ -25,7 +25,7 @@ export type AlignmentEnum = "left" | "center" | "right"; export interface ColumnsType { showContentAs: ShowContentAsEnum; - attribute?: ListAttributeValue | ListAttributeListValue; + attribute?: ListAttributeValue; content?: ListWidgetValue; dynamicText?: ListExpressionValue; exportValue?: ListExpressionValue;