From fceaf48e76b315da65f3c9b79bd81cc78fb33f35 Mon Sep 17 00:00:00 2001 From: Ognjen Stefanovic Date: Mon, 19 Jan 2026 09:54:01 +0100 Subject: [PATCH 1/3] Add litmus-ts project with initial setup and components --- litmus-ts/TestWidget.tsx | 16 +++ litmus-ts/bugs/GridOnFetchRecords.tsx | 62 +++++++++ litmus-ts/index.html | 18 +++ litmus-ts/index.scss | 2 + litmus-ts/index.tsx | 31 +++++ litmus-ts/package.json | 42 ++++++ litmus-ts/tsconfig.json | 15 +++ litmus-ts/webpack.config.js | 182 ++++++++++++++++++++++++++ package.json | 3 +- yarn.lock | 36 +++++ 10 files changed, 406 insertions(+), 1 deletion(-) create mode 100644 litmus-ts/TestWidget.tsx create mode 100644 litmus-ts/bugs/GridOnFetchRecords.tsx create mode 100644 litmus-ts/index.html create mode 100644 litmus-ts/index.scss create mode 100644 litmus-ts/index.tsx create mode 100644 litmus-ts/package.json create mode 100644 litmus-ts/tsconfig.json create mode 100644 litmus-ts/webpack.config.js diff --git a/litmus-ts/TestWidget.tsx b/litmus-ts/TestWidget.tsx new file mode 100644 index 000000000..e01912f3c --- /dev/null +++ b/litmus-ts/TestWidget.tsx @@ -0,0 +1,16 @@ +/** @jsxImportSource react */ + +import { Widget } from "cx/widgets"; +import { RenderingContext, Instance } from "cx/ui"; + +interface TestWidgetProps {} + +export class TestWidget extends Widget { + constructor(props: TestWidgetProps) { + super(props); + } + + render(context: RenderingContext, instance: Instance, key: string): React.ReactNode { + return
Test Widget
; + } +} diff --git a/litmus-ts/bugs/GridOnFetchRecords.tsx b/litmus-ts/bugs/GridOnFetchRecords.tsx new file mode 100644 index 000000000..41f5602b5 --- /dev/null +++ b/litmus-ts/bugs/GridOnFetchRecords.tsx @@ -0,0 +1,62 @@ + +import { createAccessorModelProxy, createFunctionalComponent } from "cx/ui"; +import { Button, Grid, GridColumnConfig, LookupField, PureContainer } from "cx/widgets"; + +const tags = ["history", "american", "crime", "tets"].map(tag => ({ name: tag, id: tag })); + +interface Model { + $page: { + showGrid: boolean; + tag: string; + } +} + +const m = createAccessorModelProxy(); + +const columns = [ + { + field: "id", + header: "ID", + }, + { + field: "title", + header: "Title", + }, + { + field: "body", + header: "Body", + }, +] as GridColumnConfig[]; + +export default createFunctionalComponent(() => ( +