-
Notifications
You must be signed in to change notification settings - Fork 142
James/b/updated qb branch #4993
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
Open
James-Baloyi
wants to merge
67
commits into
shesha-io:main
Choose a base branch
from
James-Baloyi:james/b/updated-qb-branch
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
67 commits
Select commit
Hold shift + click to select a range
d5f45d9
UI & Layout changes for the empty state of the query builder
teboho 8b56737
Merge branch 'main' into teboho/e/4346
teboho 9e63a73
Merge branch 'main' into teboho/e/4346
teboho 9becd2e
queryBuilder): add ValueSources component and IgnoreIfUnassigned widget
teboho 45b852c
Merge branch 'main' of https://github.com/shesha-io/shesha-framework …
teboho ad97a6f
add support for JsonLogic expressions in deepMergeValues function
teboho 5bc85ac
feat: add mustache expression evaluation and utility functions
teboho 0e81c68
Align query builder control layout
teboho fe2dfaa
feat: implement expression context building from metadata and enhance…
teboho 30877e4
reduce modal size
teboho ad2182b
unify source selector and tighten rule/value cell styling
teboho 9ede58e
This keeps OBJECT, NUMBER, etc. vertically centered inside the colore…
teboho e54d383
The empty-state buttons are now aligned to the start of their contain…
teboho 6a4a41f
query builder field-source fx expression + build type fixes
teboho 3c5555f
undo qb styles
teboho 6228b34
replace library-rendered query builder with custom builder component
teboho a16fde1
query builder layout fixes — rule spacing, boolean toggle, rail, and …
teboho 5f48d1b
replace boolean segmented with custom pill button group
teboho 3b6fc56
boolean fields use value-only source with no operator/value-src selector
teboho 17f6c69
tighten expression editor focus selectors to custom builder DOM path
teboho 2497db0
remove unused content
teboho f467639
add function source to query builder field side
teboho da3ddd3
wrap rule row layout at deep nesting levels
teboho 9d82da0
fix typed constants in LINQ converter, unify empty operators, and aud…
teboho 9861f52
remove unused var
teboho 4a0a20b
add safe fallbacks for ConfigUtils API in query builder
teboho f84e949
widen query builder field column and fix date picker input alignment
teboho 35e4859
Replacing inline empty-state markup with a dedicated QueryRuleElement…
teboho c37e792
refine query builder empty state, value editor layout, and expression…
teboho dc0c2ab
Refine query builder UI: group nesting limits, item shell layout, and…
teboho 543113e
expression editor: float inline on focus, expand into antd Modal with…
teboho 271565b
Portal inline expression editor to document body to avoid overflow cl…
teboho ceb622e
The >> caret icon is now hidden by default (display: none) and only s…
teboho 6f430d0
Fix group logic label to account for OR child relations and allow dra…
teboho 98cbce1
Add stopPropagation to drag-over and drop handlers to prevent parent …
teboho 1f00616
Improve query builder layout: fixed-width rule rows with horizontal s…
teboho ec1d46e
rm unused
teboho 2c077ca
remove unused code
teboho 593e45b
Merge branch 'main' of https://github.com/shesha-io/shesha-framework …
teboho 215fb33
fix build
teboho 833abf1
Merge remote-tracking branch 'origin/main' into teboho/e/4346
James-Baloyi 0e46078
Merge branch 'main' into james/b/updated-qb-branch
James-Baloyi d2eaf13
Merge branch 'main' into james/b/updated-qb-branch
James-Baloyi 72c4f3b
move horizontal scrollbar to query builder parent
James-Baloyi 07223af
fix: build
James-Baloyi 7e62108
fix: build
James-Baloyi b955bce
resolve merge conflicts
James-Baloyi 17a28ec
fix: build errors
James-Baloyi b47a305
fix: duplicate expression editor exports
James-Baloyi b0cc8d8
fix: resolve strict-mode type errors in query builder for rollup build
James-Baloyi 670adc5
test: align StringField_IsEmpty_Convert with null-or-whitespace is-em…
James-Baloyi b9d4d1e
fix: address CodeRabbit findings on PR #4993
James-Baloyi 6d6ec46
fix: merge conflicts, address code rabbit comments
James-Baloyi f134afb
Merge branch 'james/b/updated-qb-branch' of https://github.com/James-…
James-Baloyi d547fcf
fix: return empty array for unevaluatedExpressions on empty expression
James-Baloyi 82af62a
address code-rabbit issues
James-Baloyi 4feb17c
fix: stop infinite render loop in query builder value editors
James-Baloyi 9ba617b
fix infinite state calls when updating query builder values
James-Baloyi 01456e1
address persistent slowness and lag
James-Baloyi 5c04547
refactor: remove duplicate inline type annotation on FunctionValueEditor
James-Baloyi ace435f
Merge branch 'main' into james/b/updated-qb-branch
James-Baloyi 0a50cb6
address PR comments
James-Baloyi 6250bb8
clean up queryBuilderContent.tsx diff
James-Baloyi 0c10c06
fix component crash when changing mode
James-Baloyi 98d92d3
fix 'fieldSettings' crash issue
James-Baloyi de0a514
scale query builder layout and unify control styling
James-Baloyi b152c90
clean up no arg functions
James-Baloyi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
440 changes: 246 additions & 194 deletions
440
shesha-core/src/Shesha.Framework/JsonLogic/JsonLogic2LinqConverter.cs
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
shesha-reactjs/src/components/expressionEditor/contextMetadata.test.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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, | ||
| }, | ||
| }, | ||
| }, | ||
| }); | ||
| }); | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.