Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
d5f45d9
UI & Layout changes for the empty state of the query builder
teboho Feb 17, 2026
8b56737
Merge branch 'main' into teboho/e/4346
teboho Mar 5, 2026
9e63a73
Merge branch 'main' into teboho/e/4346
teboho Mar 12, 2026
9becd2e
queryBuilder): add ValueSources component and IgnoreIfUnassigned widget
teboho Mar 17, 2026
45b852c
Merge branch 'main' of https://github.com/shesha-io/shesha-framework …
teboho Mar 19, 2026
ad97a6f
add support for JsonLogic expressions in deepMergeValues function
teboho Mar 19, 2026
5bc85ac
feat: add mustache expression evaluation and utility functions
teboho Mar 26, 2026
0e81c68
Align query builder control layout
teboho Mar 26, 2026
fe2dfaa
feat: implement expression context building from metadata and enhance…
teboho Mar 27, 2026
30877e4
reduce modal size
teboho Mar 29, 2026
ad2182b
unify source selector and tighten rule/value cell styling
teboho Mar 31, 2026
9ede58e
This keeps OBJECT, NUMBER, etc. vertically centered inside the colore…
teboho Mar 31, 2026
e54d383
The empty-state buttons are now aligned to the start of their contain…
teboho Mar 31, 2026
6a4a41f
query builder field-source fx expression + build type fixes
teboho Mar 31, 2026
3c5555f
undo qb styles
teboho Mar 31, 2026
6228b34
replace library-rendered query builder with custom builder component
teboho Apr 1, 2026
a16fde1
query builder layout fixes — rule spacing, boolean toggle, rail, and …
teboho Apr 1, 2026
5f48d1b
replace boolean segmented with custom pill button group
teboho Apr 1, 2026
3b6fc56
boolean fields use value-only source with no operator/value-src selector
teboho Apr 1, 2026
17f6c69
tighten expression editor focus selectors to custom builder DOM path
teboho Apr 1, 2026
2497db0
remove unused content
teboho Apr 1, 2026
f467639
add function source to query builder field side
teboho Apr 1, 2026
da3ddd3
wrap rule row layout at deep nesting levels
teboho Apr 1, 2026
9d82da0
fix typed constants in LINQ converter, unify empty operators, and aud…
teboho Apr 1, 2026
9861f52
remove unused var
teboho Apr 1, 2026
4a0a20b
add safe fallbacks for ConfigUtils API in query builder
teboho Apr 2, 2026
f84e949
widen query builder field column and fix date picker input alignment
teboho Apr 2, 2026
35e4859
Replacing inline empty-state markup with a dedicated QueryRuleElement…
teboho Apr 2, 2026
c37e792
refine query builder empty state, value editor layout, and expression…
teboho Apr 2, 2026
dc0c2ab
Refine query builder UI: group nesting limits, item shell layout, and…
teboho Apr 7, 2026
543113e
expression editor: float inline on focus, expand into antd Modal with…
teboho Apr 7, 2026
271565b
Portal inline expression editor to document body to avoid overflow cl…
teboho Apr 7, 2026
ceb622e
The >> caret icon is now hidden by default (display: none) and only s…
teboho Apr 7, 2026
6f430d0
Fix group logic label to account for OR child relations and allow dra…
teboho Apr 7, 2026
98cbce1
Add stopPropagation to drag-over and drop handlers to prevent parent …
teboho Apr 7, 2026
1f00616
Improve query builder layout: fixed-width rule rows with horizontal s…
teboho Apr 7, 2026
ec1d46e
rm unused
teboho Apr 7, 2026
2c077ca
remove unused code
teboho Apr 7, 2026
593e45b
Merge branch 'main' of https://github.com/shesha-io/shesha-framework …
teboho Apr 9, 2026
215fb33
fix build
teboho Apr 9, 2026
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
434 changes: 241 additions & 193 deletions shesha-core/src/Shesha.Framework/JsonLogic/JsonLogic2LinqConverter.cs

Large diffs are not rendered by default.

10 changes: 9 additions & 1 deletion shesha-reactjs/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@ const baseTsConfig = {
ignores: [
"src/apis/*",
"**/__tests__/**/*",
"**/*.test.ts",
"**/*.test.tsx",
],
plugins: {
"memory-monitor": memoryTracePlugin,
Expand Down Expand Up @@ -418,6 +420,12 @@ const makeStrictConfig = (path) => {
}

export default [
{
ignores: [
"dist/**",
".next/**",
],
},
{
...baseTsConfig,
files: [
Expand Down Expand Up @@ -455,4 +463,4 @@ export default [
'@typescript-eslint/no-var-requires': 'off', // Allow require() in JS files
}
},
];
];
9 changes: 4 additions & 5 deletions shesha-reactjs/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,24 @@ module.exports = {
// extended assertions to Jest
setupFilesAfterEnv: [
//"@testing-library/jest-dom/extend-expect"
"@testing-library/jest-dom"
"@testing-library/jest-dom",
"<rootDir>/src/testSetup.ts",
],

// Test spec file resolution pattern
// Matches parent folder `__tests__` and filename
// should contain `test` or `spec`.
//testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.ts$",
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.(ts|tsx)$',
// other Jest configuration options...
/*
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
},
*/
// other Jest configuration options...
// Module file extensions for importing
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
globals: {
'ts-jest': {
tsconfig: 'tsconfig.test.json'
}
}
};
};
8 changes: 5 additions & 3 deletions shesha-reactjs/src/components/autocomplete/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,11 @@ const AutocompleteInner: FC<IAutocompleteBaseProps> = (props: IAutocompleteBaseP
}, [selected.current, source?.tableData, props.grouping]);

const title = useMemo(() => {
return selected.current.length === 1 ? displayValueFunc(selected.current[0], allData) : null;
}, [selected.current]);
if (selected.current.length === 1)
return displayValueFunc(selected.current[0], allData);

return props.placeholder ?? null;
}, [allData, displayValueFunc, props.placeholder, selected.current]);

// Show loading when actively fetching data
const shouldShowLoading = (loadingIndicator || (!props.readOnly && loadingValues));
Expand Down Expand Up @@ -527,4 +530,3 @@ export {
AutocompleteInterface as Autocomplete, type AutocompleteDataSourceType, type IAutocompleteProps,
type ISelectOption,
};

Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
import { DataTypes } from '@/interfaces';
import { IObjectMetadata } from '@/interfaces/metadata';
import { buildExpressionContextFromMetadata } from './contextMetadata';

describe('buildExpressionContextFromMetadata', () => {
it('merges nested properties with type-definition members for context suggestions', async () => {
const metadata: IObjectMetadata = {
dataType: DataTypes.object,
properties: [
{
path: 'contexts',
dataType: DataTypes.object,
properties: [
{
path: 'canvasContext',
dataType: DataTypes.object,
properties: [
{ path: 'zoom', dataType: DataTypes.number },
{ path: 'details.themeName', dataType: DataTypes.string },
],
typeDefinitionLoader: async () => ({
typeName: 'ICanvasContextApi',
files: [{
fileName: 'apis/canvasContext.ts',
content: `
export interface ICanvasActions {
setDesignerDevice(deviceType: string): void;
setCanvasWidth(width: number | string): void;
}

export interface ICanvasState {
activeDevice?: string;
}

export interface ICanvasContextApi extends ICanvasState {
zoom?: number;
api: ICanvasActions;
}
`,
}],
}),
},
],
},
],
};

await expect(buildExpressionContextFromMetadata(metadata)).resolves.toEqual({
contexts: {
canvasContext: {
zoom: null,
details: {
themeName: null,
},
activeDevice: null,
api: {
setDesignerDevice: null,
setCanvasWidth: null,
},
},
},
});
});
});
Loading