Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 6 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 17 additions & 2 deletions packages/jdm-editor/.storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,30 @@ export const parameters = {
};

const preview: Preview = {
globalTypes: {
locale: {
name: 'Locale',
description: 'Internationalization locale',
defaultValue: 'en',
toolbar: {
icon: 'globe',
items: [
{ value: 'en', right: '🇺🇸', title: 'English' },
{ value: 'zh', right: '🇨🇳', title: '中文' },
],
},
},
},
parameters: {
layout: 'fullscreen',
},
decorators: [
(Story) => {
(Story, context) => {
const isDark = useDarkMode();
const { locale } = context.globals;

return (
<JdmConfigProvider theme={{ mode: isDark ? 'dark' : 'light' }}>
<JdmConfigProvider locale={locale} theme={{ mode: isDark ? 'dark' : 'light' }}>
<style
dangerouslySetInnerHTML={{
__html: `html { background-color: ${isDark ? '#1f1f1f' : 'white'} }
Expand Down
34 changes: 34 additions & 0 deletions packages/jdm-editor/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,40 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [1.51.5](https://github.com/gorules/jdm-editor/compare/@gorules/jdm-editor@1.51.4...@gorules/jdm-editor@1.51.5) (2026-03-17)

**Note:** Version bump only for package @gorules/jdm-editor

## [1.51.4](https://github.com/gorules/jdm-editor/compare/@gorules/jdm-editor@1.51.3...@gorules/jdm-editor@1.51.4) (2026-03-11)

### Bug Fixes

- modal not showing on delete issue ([#226](https://github.com/gorules/jdm-editor/issues/226)) ([9a0982e](https://github.com/gorules/jdm-editor/commit/9a0982ed14a62591b695d9bf0ce052b2d039d866))

## [1.51.3](https://github.com/gorules/jdm-editor/compare/@gorules/jdm-editor@1.51.2...@gorules/jdm-editor@1.51.3) (2026-03-04)

### Bug Fixes

- expression builder ([#234](https://github.com/gorules/jdm-editor/issues/234)) ([4994e87](https://github.com/gorules/jdm-editor/commit/4994e87bee4a135ff4b8852fa470851aff406619))

## [1.51.2](https://github.com/gorules/jdm-editor/compare/@gorules/jdm-editor@1.51.1...@gorules/jdm-editor@1.51.2) (2026-02-13)

### Bug Fixes

- add expression builder defaults ([#233](https://github.com/gorules/jdm-editor/issues/233)) ([46dda06](https://github.com/gorules/jdm-editor/commit/46dda06568554b13adfc245d67189480df14e01d))

## [1.51.1](https://github.com/gorules/jdm-editor/compare/@gorules/jdm-editor@1.51.0...@gorules/jdm-editor@1.51.1) (2026-02-13)

### Bug Fixes

- minor expression builder fixes ([#232](https://github.com/gorules/jdm-editor/issues/232)) ([20f9e27](https://github.com/gorules/jdm-editor/commit/20f9e275943ddc22cb5c782fbb65dea248491773))

# [1.51.0](https://github.com/gorules/jdm-editor/compare/@gorules/jdm-editor@1.50.6...@gorules/jdm-editor@1.51.0) (2026-02-12)

### Features

- ui expression builder ([#231](https://github.com/gorules/jdm-editor/issues/231)) ([8fd7621](https://github.com/gorules/jdm-editor/commit/8fd76212ed5218e3267d0ea6bbc8a70ad443cd3d))

## [1.50.6](https://github.com/gorules/jdm-editor/compare/@gorules/jdm-editor@1.50.5...@gorules/jdm-editor@1.50.6) (2026-01-19)

**Note:** Version bump only for package @gorules/jdm-editor
Expand Down
4 changes: 3 additions & 1 deletion packages/jdm-editor/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gorules/jdm-editor",
"version": "1.50.6",
"version": "1.51.5",
"description": "",
"author": "GoRules <hi@gorules.io> (https://gorules.io)",
"homepage": "https://github.com/gorules/jdm-editor",
Expand Down Expand Up @@ -59,6 +59,7 @@
"dnd-core": "^16.0.1",
"exceljs": "^4.4.0",
"fast-deep-equal": "^3.1.3",
"i18next": "^25.8.1",
"immer": "10.1.1",
"json-stringify-pretty-compact": "^4.0.0",
"json5": "^2.2.3",
Expand All @@ -68,6 +69,7 @@
"re-resizable": "^6.11.2",
"react-dnd": "^16.0.1",
"react-dnd-html5-backend": "16.0.1",
"react-i18next": "^16.5.4",
"react-intersection-observer": "^9.16.0",
"react-json-tree": "^0.20.0",
"react-resizable-panels": "^2.1.7",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
@mixin builder-vars {
--b-font-size: 13px;
--b-line-height: 1.5;
--b-v-padding: 2px;
--b-h-padding: 4px;
--b-height: calc(var(--b-font-size) * var(--b-line-height) + var(--b-v-padding) * 2);
--b-max-rows: 3;
--b-max-height: calc(var(--b-height) * var(--b-max-rows));

display: flex;
align-items: flex-start;
gap: 4px;
min-height: var(--b-height);
font-size: var(--b-font-size);
line-height: var(--b-line-height);
}

@mixin builder-input-base {
font-family: inherit;
font-size: var(--b-font-size) !important;
line-height: var(--b-line-height) !important;
padding: var(--b-v-padding) var(--b-h-padding) !important;
height: auto !important;
min-height: var(--b-height);
}

@mixin builder-input {
flex: 1;
min-width: 40px;
border: none;
background: transparent;
outline: none;
resize: none;
@include builder-input-base;
}

@mixin builder-code {
flex: 1;
min-width: 40px;
max-height: var(--b-max-height);
overflow-y: auto;

--ce-lineHeight: var(--b-line-height);
--ce-verticalPadding: var(--b-v-padding);
--ce-horizontalPadding: var(--b-h-padding);
}

@mixin builder-number {
flex: 1;
min-width: 40px;
padding: 0 !important;

.ant-input-number-input-wrap {
padding: 0;
}

.ant-input-number-input {
@include builder-input-base;
}
}

@mixin builder-select {
min-width: 50px;
height: var(--b-height) !important;

.ant-select-selector {
padding: 0 !important;
height: 100% !important;
}

.ant-select-selection-item {
font-family: inherit;
font-size: var(--b-font-size) !important;
line-height: var(--b-height) !important;
padding: 0 var(--b-h-padding) !important;
}
}

@mixin builder-select-multi {
min-width: 0;
min-height: var(--b-height) !important;
height: auto !important;
overflow: hidden;

.ant-select-selector {
padding: 0 2px !important;
min-height: var(--b-height) !important;
height: auto !important;
max-height: var(--b-max-height);
overflow-y: auto;
overflow-x: hidden;
flex-wrap: wrap;
}

.ant-select-selection-overflow {
gap: 2px;
flex-wrap: wrap;
max-width: 100%;
}

.ant-select-selection-overflow-item {
max-width: 100%;
}

.ant-select-selection-item {
font-family: inherit;
font-size: calc(var(--b-font-size) - 1px) !important;
line-height: 1.4 !important;
height: auto !important;
margin: 0 !important;
padding: 0 4px !important;
max-width: 100% !important;

.ant-select-selection-item-content {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}

.ant-select-selection-search {
margin: 0 !important;
max-width: 100%;
}
}

@mixin builder-date {
padding: 0 !important;
height: var(--b-height) !important;
min-height: unset !important;

.ant-picker-input {
padding: 0 !important;
height: var(--b-height) !important;

> input {
font-family: inherit;
font-size: var(--b-font-size) !important;
line-height: var(--b-height) !important;
padding: 0 var(--b-h-padding) !important;
height: var(--b-height) !important;
min-height: unset !important;
}
}

.ant-picker-suffix {
display: none;
}
}
Loading