Skip to content

Data widgets v3.0 #1496

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 141 commits into from
Jun 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
141 commits
Select commit Hold shift + click to select a range
d2dc22f
chore: add attributes to settings
iobuhov Feb 26, 2025
8f6bdf7
chore: change interface
iobuhov Feb 27, 2025
50f0e1a
chore: rename controller
iobuhov Feb 28, 2025
92b195b
refactor: rename interface
iobuhov Feb 28, 2025
60df386
feat: add filter observer
iobuhov Feb 28, 2025
0168c9d
refactor: rename type
iobuhov Feb 28, 2025
cd655ff
refactor: remove dead code
iobuhov Feb 28, 2025
b67cf0b
feat: add filter observer to filter api
iobuhov Feb 28, 2025
b2d2c49
chore: change personalization
iobuhov Mar 3, 2025
f3eb45b
chore: change attr type
iobuhov Mar 3, 2025
75e6917
feat: add custom text filter
iobuhov Mar 3, 2025
18ef7f6
chore: merge filters
iobuhov Mar 4, 2025
1ea3d85
feat: add state persistence
iobuhov Mar 4, 2025
0e9b9ca
chore: change tag exp to not equal
iobuhov Mar 4, 2025
933e4c5
chore: add condition tagging
iobuhov Mar 4, 2025
f704c3d
chore: add filter initialization
iobuhov Mar 4, 2025
f560b4d
chore: remove placeholder tag
iobuhov Mar 4, 2025
fa838b0
test: fix unit tests
iobuhov Mar 4, 2025
4d1ea45
test: fix unit tests
iobuhov Mar 4, 2025
745872d
chore: change label
iobuhov Mar 5, 2025
13dd24c
chore: fix types
iobuhov Mar 5, 2025
1f28a5e
fix: update types
iobuhov Mar 7, 2025
efdbae9
fix: update types
iobuhov Mar 7, 2025
eb9b42e
fix: update types
iobuhov Mar 7, 2025
53c9af3
fix: change types
iobuhov Mar 7, 2025
1220cb9
test: update settings schema
iobuhov Mar 7, 2025
c40a287
chore: update lockfile
iobuhov Apr 4, 2025
d9832be
feat: add custom text filter
iobuhov Mar 3, 2025
724e590
feat(datagrid-date-filter-web): add linked ds
iobuhov Apr 4, 2025
bb5941d
feat: add date store provider
iobuhov Apr 4, 2025
d7a6563
feat: add store injector to date filter
iobuhov Apr 4, 2025
ae03cba
chore: show linked ds in settings
iobuhov Apr 9, 2025
9379692
feat: number filter grid wide filtering
gjulivan Mar 27, 2025
88624eb
chore: update xml
iobuhov Apr 9, 2025
3696576
chore(datagrid-number-filter-web): update editor config
iobuhov Apr 9, 2025
774aa77
chore: update formatter logic
iobuhov Apr 9, 2025
ad5f7e1
chore: fix type error
iobuhov Apr 17, 2025
c14ad00
chore: resolve mobx warnings
iobuhov Apr 30, 2025
f896ff0
feat: add new set of properties
iobuhov Apr 11, 2025
9e9fe13
chore: split code into packages
iobuhov Apr 18, 2025
b7cc512
chore: fix imports and remove old modules
iobuhov Apr 18, 2025
bec5fa2
chore: move tests
iobuhov Apr 18, 2025
b12be62
build: fix all type issues
iobuhov Apr 18, 2025
024a12e
refactor(!): remove legacy provider
iobuhov Apr 18, 2025
e88c866
chore: move hook
iobuhov Apr 22, 2025
f948edf
refactor: remove header filter
iobuhov Apr 22, 2025
fa656fd
refactor: remove header filter
iobuhov Apr 23, 2025
354732d
chore: introduce wide filter api
iobuhov Apr 23, 2025
a11c511
chore: update imports
iobuhov Apr 23, 2025
51db221
chore: remove dead code
iobuhov Apr 23, 2025
c3df206
chore: start migrating dd filter
iobuhov Apr 23, 2025
92c5c95
refactor: switch to gate
iobuhov Apr 24, 2025
5cc9191
chore: update type
iobuhov Apr 24, 2025
300f3ab
chore: migrate to gate
iobuhov Apr 24, 2025
100d9fb
refactor: move static filter container
iobuhov Apr 24, 2025
b3b8b80
chore: update ref filter props
iobuhov Apr 24, 2025
cf2b6fa
chore: create new component tree
iobuhov Apr 24, 2025
6a9e086
chore: finish enum filter
iobuhov Apr 25, 2025
61beba0
feat: add linked ref store
iobuhov Apr 25, 2025
2f46cd2
feat: switch to assc metadata
iobuhov Apr 25, 2025
f94111d
chore: restore code
iobuhov Apr 25, 2025
529f821
feat: first implementation of linked dd filter
iobuhov Apr 28, 2025
8527d65
chore: fix issue with ref
iobuhov Apr 28, 2025
621ac4e
refactor: change to useSetup
iobuhov Apr 29, 2025
a005828
fix: resolve linter issues
iobuhov Apr 29, 2025
288cb63
chore: move ds controllers to grid plugin
iobuhov Apr 30, 2025
f0fb56c
chore: change DS controller
iobuhov Apr 30, 2025
9e8effc
chore: format file
iobuhov May 12, 2025
e816368
chore: add controller module
iobuhov May 12, 2025
ea59b89
chore: fix build issues
iobuhov May 13, 2025
4b65966
chore: switch to new gallery store
iobuhov May 13, 2025
f2279ba
chore: add root context
iobuhov May 13, 2025
e1df662
chore: pass header as prop
iobuhov May 13, 2025
15b5e83
feat: remove old gallery settings
iobuhov May 14, 2025
190ed91
chore: remove outdated check
iobuhov May 14, 2025
bab40d7
chore: add observable sort store
iobuhov May 14, 2025
c439cc8
chore: change interfaces
iobuhov May 14, 2025
45ee095
chore: change naming
iobuhov May 14, 2025
584a2d5
chore: add sort store provider
iobuhov May 14, 2025
3028603
feat: add sort store injector
iobuhov May 15, 2025
c69dd1d
chore: rename HOCs
iobuhov May 15, 2025
c008d8f
chore: updating unit test
iobuhov May 16, 2025
8088f50
chore: redo the sort host
iobuhov May 16, 2025
43f98d7
test: add tests for sort host
iobuhov May 16, 2025
05773ce
feat: change sort host implementation
iobuhov May 19, 2025
e32f0df
chore: enable multisort
iobuhov May 20, 2025
7507e7d
chore: fix typings
iobuhov May 20, 2025
6f04891
fix: change header context
iobuhov May 20, 2025
6590bab
fix: add filter context
iobuhov May 20, 2025
ba81656
fix: catch invalid argument error
iobuhov May 20, 2025
f5d829e
chore: bump versions
iobuhov May 20, 2025
5cee4d3
fix: remove typo
iobuhov May 20, 2025
37e0a3d
chore: hide pagination props for now
iobuhov May 21, 2025
edf4a58
chore: remove old xml
iobuhov May 21, 2025
e06b954
chore: fix attribute typo
iobuhov May 22, 2025
9249cf5
chore: add missing dep
iobuhov Jun 5, 2025
d370930
chore: update hocs
iobuhov Jun 5, 2025
23152df
chore: update top widgets
iobuhov Jun 5, 2025
d3fdfef
chore: fix mobx warnings
iobuhov Jun 5, 2025
1424aaa
chore: remove obsolete code
iobuhov Jun 5, 2025
b1f3623
chore: rename static select store
iobuhov Jun 5, 2025
e536109
chore: update imports
iobuhov Jun 5, 2025
af2838d
chore: rename static filter container
iobuhov Jun 5, 2025
0761da8
chore: rename static base controller
iobuhov Jun 5, 2025
a608cca
chore: rename static controllers
iobuhov Jun 5, 2025
f7d5032
chore: rename base controller classes
iobuhov Jun 5, 2025
b2937ae
chore: finish with tests
iobuhov Jun 6, 2025
71beb12
chore: add missing scripts
iobuhov Jun 6, 2025
e8d820a
chore: remove prepare script
iobuhov Jun 6, 2025
2ebba0a
chore: update scripts
iobuhov Jun 6, 2025
ac63a09
chore: update turbo deps
iobuhov Jun 6, 2025
a62e959
chore: fix issue with build command
iobuhov Jun 10, 2025
228f968
chore: fix command and update mendix
iobuhov Jun 10, 2025
be86a40
build: skip build command as it's now part of code quality check
iobuhov Jun 10, 2025
cedb48a
chore: update release task
iobuhov Jun 10, 2025
6b3a0a4
chore: remove tsbuildinfo
iobuhov Jun 10, 2025
3546609
chore: add missing dependency
iobuhov Jun 10, 2025
1a9dc30
chore: add changelog
iobuhov Jun 10, 2025
e8de4ac
chore: update pnpm-lock file
iobuhov Jun 12, 2025
ab606bb
chore: remove unwanted e2e hook
iobuhov Jun 12, 2025
aa4c5d7
build: fix dependencies in sort plugin
iobuhov Jun 12, 2025
cf545c7
chore: update run-e2e dev command
iobuhov Jun 12, 2025
3ace711
test: update test project and spec
iobuhov Jun 12, 2025
d8050fc
chore: rewrite sort store context
iobuhov Jun 16, 2025
94f69de
test: update unit tests
iobuhov Jun 16, 2025
910d2e4
chore: update gallery store
iobuhov Jun 17, 2025
0b55deb
test: update gallery e2e
iobuhov Jun 17, 2025
436bafa
feat: improve error reporting
iobuhov Jun 17, 2025
5252c89
test: update e2e test for datagrid
iobuhov Jun 18, 2025
23c84f2
test: add test for sort store host
iobuhov Jun 18, 2025
60036e3
test: update test project branch
iobuhov Jun 18, 2025
76b37fb
chore: enable default formatter
iobuhov Jun 18, 2025
f9a5989
test: update e2e snapshots
iobuhov Jun 18, 2025
a812abc
test: update test project branch
iobuhov Jun 19, 2025
f1262ee
test: update test project branch
iobuhov Jun 19, 2025
f6c97bd
test: update unit test
iobuhov Jun 19, 2025
63f8dfb
test: update test project branch
iobuhov Jun 19, 2025
6fedf69
test: update test project branch
iobuhov Jun 19, 2025
a6856ac
test: update test project branch
iobuhov Jun 19, 2025
4be5749
fix: prevent widget failing on missing formatter
iobuhov Jun 19, 2025
abb62b8
fix: restore correct behavior of clear button
iobuhov Jun 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/BuildJobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
target: [build, release]
target: [release]

steps:
- name: Checkout
Expand Down
14 changes: 8 additions & 6 deletions automation/run-e2e/lib/dev.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ export async function dev() {

const parseArgsOptions = {
string: ["browser"],
boolean: ["with-preps"],
boolean: ["with-preps", "update-project", "setup-project"],
default: {
browser: "chromium",
"with-preps": false
"with-preps": false,
"update-project": true,
"setup-project": false
},
configuration: {
// https://github.com/yargs/yargs-parser#boolean-negation
Expand All @@ -33,9 +35,11 @@ export async function dev() {
process.env.PATH += `${delimiter}${packageBinariesPath}`;
const options = parseArgs(process.argv.slice(2), parseArgsOptions);

if (options.withPreps) {
if (options.withPreps || options.setupProject) {
// Download test project from github
await setupTestProject();
}
if (options.withPreps || options.updateProject) {
// Run update project hook
await updateTestProject();

Expand All @@ -51,12 +55,10 @@ export async function dev() {

await enquirer.prompt({
type: "confirm",
name: "__ingore__",
name: "__ignore__",
result: () => "continue",
message: "Press Enter to continue"
});
} else {
console.log(c.yellow("Skip preparations"));
}

const url = process.env.URL ?? "http://127.0.0.1:8080";
Expand Down
4 changes: 4 additions & 0 deletions packages/modules/data-widgets/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

### Breaking changes

- We removing grid wide filtering in favor of new, in widget, configuration for more flexible filtering.

## [2.32.1] DataWidgets - 2025-05-28

### [2.30.6] Datagrid
Expand Down
2 changes: 1 addition & 1 deletion 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.32.1",
"version": "3.0.0",
"copyright": "© Mendix Technology BV 2025. All rights reserved.",
"license": "Apache-2.0",
"private": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@
"update-changelog": "rui-update-changelog-widget",
"verify": "rui-verify-package-format"
},
"dependencies": {
"@mendix/widget-plugin-component-kit": "workspace:*"
},
"devDependencies": {
"@mendix/automation-utils": "workspace:*",
"@mendix/eslint-config-web-widgets": "workspace:*",
Expand Down
1 change: 1 addition & 0 deletions packages/pluggableWidgets/area-chart-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
},
"dependencies": {
"@mendix/shared-charts": "workspace:*",
"@mendix/widget-plugin-component-kit": "workspace:*",
"classnames": "^2.3.2",
"plotly.js-dist-min": "^3.0.0"
},
Expand Down
1 change: 1 addition & 0 deletions packages/pluggableWidgets/badge-button-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"verify": "rui-verify-package-format"
},
"dependencies": {
"@mendix/widget-plugin-component-kit": "workspace:*",
"classnames": "^2.3.2"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions packages/pluggableWidgets/badge-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"verify": "rui-verify-package-format"
},
"dependencies": {
"@mendix/widget-plugin-component-kit": "workspace:*",
"classnames": "^2.3.2"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions packages/pluggableWidgets/bar-chart-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
},
"dependencies": {
"@mendix/shared-charts": "workspace:*",
"@mendix/widget-plugin-component-kit": "workspace:*",
"classnames": "^2.3.2",
"plotly.js-dist-min": "^3.0.0"
},
Expand Down
1 change: 1 addition & 0 deletions packages/pluggableWidgets/bubble-chart-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
},
"dependencies": {
"@mendix/shared-charts": "workspace:*",
"@mendix/widget-plugin-component-kit": "workspace:*",
"classnames": "^2.3.2",
"plotly.js-dist-min": "^3.0.0"
},
Expand Down
1 change: 1 addition & 0 deletions packages/pluggableWidgets/carousel-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"verify": "rui-verify-package-format"
},
"dependencies": {
"@mendix/widget-plugin-component-kit": "workspace:*",
"@types/react-test-renderer": "^18.0.7",
"classnames": "^2.3.2",
"react-test-renderer": "^18.2.0",
Expand Down
4 changes: 3 additions & 1 deletion packages/pluggableWidgets/charts-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@
"@mendix/heatmap-chart-web": "workspace:*",
"@mendix/line-chart-web": "workspace:*",
"@mendix/pie-doughnut-chart-web": "workspace:*",
"@mendix/time-series-chart-web": "workspace:*"
"@mendix/time-series-chart-web": "workspace:*",
"@mendix/widget-plugin-component-kit": "workspace:*",
"@mendix/widget-plugin-platform": "workspace:*"
},
"devDependencies": {
"@mendix/automation-utils": "workspace:*",
Expand Down
1 change: 1 addition & 0 deletions packages/pluggableWidgets/column-chart-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
},
"dependencies": {
"@mendix/shared-charts": "workspace:*",
"@mendix/widget-plugin-component-kit": "workspace:*",
"classnames": "^2.3.2",
"plotly.js-dist-min": "^3.0.0"
},
Expand Down
2 changes: 2 additions & 0 deletions packages/pluggableWidgets/custom-chart-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@
},
"dependencies": {
"@mendix/shared-charts": "workspace:*",
"@mendix/widget-plugin-component-kit": "workspace:*",
"@mendix/widget-plugin-mobx-kit": "workspace:*",
"@mendix/widget-plugin-platform": "workspace:*",
"classnames": "^2.3.2",
"plotly.js-dist-min": "^3.0.0"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@mendix/datagrid-date-filter-web",
"widgetName": "DatagridDateFilter",
"version": "2.11.3",
"version": "3.0.0",
"description": "",
"copyright": "© Mendix Technology BV 2025. All rights reserved.",
"license": "Apache-2.0",
Expand All @@ -23,7 +23,7 @@
},
"testProject": {
"githubUrl": "https://github.com/mendix/testProjects",
"branchName": "datagrid-date-filter-web/main"
"branchName": "datagrid-date-filter-web/data-widgets-3.0"
},
"scripts": {
"build": "pluggable-widgets-tools build:ts",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { hidePropertiesIn, hidePropertyIn, Properties } from "@mendix/pluggable-widgets-tools";
import {
betweenIcon,
betweenIconDark,
Expand All @@ -23,22 +24,23 @@ import {
import {
ContainerProps,
ImageProps,
structurePreviewPalette,
StructurePreviewProps,
text,
structurePreviewPalette
text
} from "@mendix/widget-plugin-platform/preview/structure-preview-api";
import { hidePropertiesIn, hidePropertyIn, Properties } from "@mendix/pluggable-widgets-tools";

import { DatagridDateFilterPreviewProps, DefaultFilterEnum } from "../typings/DatagridDateFilterProps";

export function getProperties(
values: DatagridDateFilterPreviewProps,
defaultProperties: Properties,
platform: "web" | "desktop"
): Properties {
export function getProperties(values: DatagridDateFilterPreviewProps, defaultProperties: Properties): Properties {
if (!values.adjustable) {
hidePropertyIn(defaultProperties, values, "screenReaderButtonCaption");
}

if (values.attrChoice === "auto") {
hidePropertyIn(defaultProperties, values, "attributes");
hidePropertyIn(defaultProperties, {} as { linkedDs: unknown }, "linkedDs");
}

if (values.defaultFilter !== "between") {
hidePropertiesIn(defaultProperties, values, [
"defaultStartDate",
Expand All @@ -49,13 +51,7 @@ export function getProperties(
} else {
hidePropertiesIn(defaultProperties, values, ["defaultValue", "valueAttribute"]);
}
if (platform === "web") {
if (!values.advanced) {
hidePropertiesIn(defaultProperties, values, ["onChange", "valueAttribute"]);
}
} else {
hidePropertyIn(defaultProperties, values, "advanced");
}

return defaultProperties;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
import { withFilterAPI } from "@mendix/widget-plugin-filtering/helpers/withFilterAPI";
import { withPreloader } from "@mendix/widget-plugin-platform/hoc/withPreloader";
import { createElement, ReactElement } from "react";
import { DatagridDateFilterContainerProps } from "../typings/DatagridDateFilterProps";
import { Container } from "./components/DateFilterContainer";
import { withDateFilterAPI } from "./hocs/withDateFilterAPI";
import { DateFilterContainer } from "./components/DateFilterContainer";
import { withLinkedDateStore } from "./hocs/withLinkedDateStore";
import { withParentProvidedDateStore } from "./hocs/withParentProvidedDateStore";
import { isLoadingDefaultValues } from "./utils/widget-utils";

const container = withPreloader(Container, isLoadingDefaultValues);
const Widget = withDateFilterAPI(container);
const Container = withPreloader(DateFilterContainer, isLoadingDefaultValues);

const FilterAuto = withParentProvidedDateStore(Container);

const FilterLinked = withFilterAPI(withLinkedDateStore(Container));

export default function DatagridDateFilter(props: DatagridDateFilterContainerProps): ReactElement | null {
return <Widget {...props} />;
if (props.attrChoice === "auto") {
return <FilterAuto {...props} />;
}

return <FilterLinked {...props} />;
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,32 @@
<properties>
<propertyGroup caption="General">
<propertyGroup caption="General">
<property key="advanced" type="boolean" defaultValue="false">
<caption>Enable advanced options</caption>
<property key="attrChoice" type="enumeration" defaultValue="auto">
<caption>Filter attributes</caption>
<description />
<enumerationValues>
<enumerationValue key="auto">Auto</enumerationValue>
<enumerationValue key="linked">Custom</enumerationValue>
</enumerationValues>
</property>
<property key="linkedDs" type="datasource" isLinked="true" isList="true">
<caption>Datasource to Filter</caption>
<description />
</property>
<property key="attributes" type="object" isList="true" required="false">
<caption>Attributes</caption>
<description>Select the attributes that the end-user may use for filtering.</description>
<properties>
<propertyGroup caption="General">
<property key="attribute" type="attribute" dataSource="../linkedDs" isMetaData="true" required="true">
<caption>Attribute</caption>
<description />
<attributeTypes>
<attributeType name="DateTime" />
</attributeTypes>
</property>
</propertyGroup>
</properties>
</property>
<property key="defaultValue" type="expression" required="false">
<caption>Default value</caption>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ interface ContainerProps extends DatagridDateFilterContainerProps {
parentChannelName?: string;
}

export const Container: (props: ContainerProps) => React.ReactElement = observer(function Container(props) {
export const DateFilterContainer: (props: ContainerProps) => React.ReactElement = observer(function Container(props) {
const staticProps = useSetup({
defaultEndValue: props.defaultEndDate?.value,
defaultFilter: props.defaultFilter,
Expand Down
Loading
Loading