From 92583141c906e59e4f90533b393f5e8025b25139 Mon Sep 17 00:00:00 2001 From: Duhan BALCI Date: Thu, 9 Apr 2026 02:16:27 +0300 Subject: [PATCH] fixes --- core/src/models.rs | 20 ++++ .../src/components/panels/PropertiesPanel.vue | 8 ++ .../src/components/panels/ToolboxPanel.vue | 13 +++ .../properties/CalculatedTextProperties.vue | 2 + .../components/properties/ChartProperties.vue | 19 ++++ .../properties/CheckboxProperties.vue | 31 ++++++ .../properties/CurrentDateProperties.vue | 5 +- .../properties/PageNumberProperties.vue | 5 +- .../properties/RichTextProperties.vue | 24 +++- .../components/properties/ShapeProperties.vue | 13 +++ .../components/properties/SizeProperties.vue | 48 ++++++++ .../components/properties/TextProperties.vue | 35 +++++- .../properties/shared/PropCondition.vue | 84 ++++++++++++++ .../properties/shared/PropTextStyleGroup.vue | 22 +++- .../properties/table/TableStyleEditor.vue | 20 +++- frontend/src/core/types.ts | 11 ++ ...roperties-panel-selected-editor-darwin.png | Bin 34143 -> 30814 bytes .../toolbox-panel-editor-darwin.png | Bin 24330 -> 25978 bytes justfile | 4 + layout-engine/src/chart_layout.rs | 104 +++++++++++++++--- layout-engine/src/chart_render.rs | 81 ++++++++++++-- layout-engine/src/lib.rs | 17 +++ layout-engine/src/pdf_render.rs | 58 +++++++++- .../tests/snapshots/chart_test_svg.html | 2 +- 24 files changed, 586 insertions(+), 40 deletions(-) create mode 100644 frontend/src/components/properties/shared/PropCondition.vue diff --git a/core/src/models.rs b/core/src/models.rs index eb91bbf..4c0180c 100644 --- a/core/src/models.rs +++ b/core/src/models.rs @@ -230,6 +230,26 @@ pub struct ChartAxis { pub y_label: Option, pub show_grid: Option, pub grid_color: Option, + /// Show vertical grid lines at each category (line charts). Defaults to true. + pub show_vertical_grid: Option, + pub vertical_grid_color: Option, + #[serde(default)] + pub reference_lines: Vec, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct ChartReferenceLine { + /// Category index (0-based) where the vertical line is drawn + pub category_index: usize, + #[serde(default)] + pub color: Option, + #[serde(default)] + pub width: Option, + #[serde(default)] + pub label: Option, + #[serde(default)] + pub dash: Option, } #[derive(Debug, Clone, Default, Serialize, Deserialize)] diff --git a/frontend/src/components/panels/PropertiesPanel.vue b/frontend/src/components/panels/PropertiesPanel.vue index ce6274f..14d829c 100644 --- a/frontend/src/components/panels/PropertiesPanel.vue +++ b/frontend/src/components/panels/PropertiesPanel.vue @@ -32,6 +32,7 @@ import RichTextProperties from '../properties/RichTextProperties.vue' import ContainerProperties from '../properties/ContainerProperties.vue' import RepeatingTableProperties from '../properties/RepeatingTableProperties.vue' import ChartProperties from '../properties/ChartProperties.vue' +import PropCondition from '../properties/shared/PropCondition.vue' import '../../styles/properties.css' const templateStore = useTemplateStore() @@ -233,6 +234,13 @@ function deleteSelected() { + + +
diff --git a/frontend/src/components/panels/ToolboxPanel.vue b/frontend/src/components/panels/ToolboxPanel.vue index fca71c1..9d1be17 100644 --- a/frontend/src/components/panels/ToolboxPanel.vue +++ b/frontend/src/components/panels/ToolboxPanel.vue @@ -3,6 +3,7 @@ import { useEditorStore } from '../../stores/editor' import { useSchemaStore } from '../../stores/schema' import type { TemplateElement, + TextElement, RepeatingTableElement, TableColumn, ImageElement, @@ -46,6 +47,18 @@ const tools: ToolItem[] = [ content: 'Yeni metin', }), }, + { + label: 'Veri Metni', + icon: 'D', + create: (): TextElement => ({ + id: nextId('dtxt'), + type: 'text', + position: { type: 'flow' }, + size: { width: sz.auto(), height: sz.auto() }, + style: { fontSize: 11, color: '#000000' }, + binding: { type: 'scalar', path: '' }, + }), + }, { label: 'Zengin Metin', icon: 'R', diff --git a/frontend/src/components/properties/CalculatedTextProperties.vue b/frontend/src/components/properties/CalculatedTextProperties.vue index 7f76924..b6da9cd 100644 --- a/frontend/src/components/properties/CalculatedTextProperties.vue +++ b/frontend/src/components/properties/CalculatedTextProperties.vue @@ -42,10 +42,12 @@ const formatOptions = [ diff --git a/frontend/src/components/properties/ChartProperties.vue b/frontend/src/components/properties/ChartProperties.vue index 4dcde07..af21dc0 100644 --- a/frontend/src/components/properties/ChartProperties.vue +++ b/frontend/src/components/properties/ChartProperties.vue @@ -247,6 +247,19 @@ function removeColor(index: number) { :model-value="element.axis?.gridColor ?? '#E5E7EB'" @update:model-value="(v) => updateNested('axis', 'gridColor', v, {})" /> + @@ -292,6 +305,12 @@ function removeColor(index: number) { :min="0.1" @update:model-value="(v) => updateStyle('lineWidth', v)" /> + +import { computed } from 'vue' import { usePropertyUpdate } from '../../composables/usePropertyUpdate' +import { useSchemaStore } from '../../stores/schema' import PropSection from './shared/PropSection.vue' import PropNumberInput from './shared/PropNumberInput.vue' import PropColorInput from './shared/PropColorInput.vue' import PropCheckbox from './shared/PropCheckbox.vue' +import PropFieldSelect from './shared/PropFieldSelect.vue' import type { CheckboxElement } from '../../core/types' import '../../styles/properties.css' const props = defineProps<{ element: CheckboxElement }>() const { update, updateStyle } = usePropertyUpdate(() => props.element) +const schemaStore = useSchemaStore() + +const booleanFields = computed(() => + schemaStore.scalarFields.filter((f) => f.type === 'boolean' || f.type === 'string'), +) diff --git a/frontend/src/components/properties/CurrentDateProperties.vue b/frontend/src/components/properties/CurrentDateProperties.vue index 98455a9..a961f2e 100644 --- a/frontend/src/components/properties/CurrentDateProperties.vue +++ b/frontend/src/components/properties/CurrentDateProperties.vue @@ -29,10 +29,13 @@ const formatOptions = [ /> diff --git a/frontend/src/components/properties/PageNumberProperties.vue b/frontend/src/components/properties/PageNumberProperties.vue index 9a02cf5..2be4e8e 100644 --- a/frontend/src/components/properties/PageNumberProperties.vue +++ b/frontend/src/components/properties/PageNumberProperties.vue @@ -29,10 +29,13 @@ const formatOptions = [ /> diff --git a/frontend/src/components/properties/RichTextProperties.vue b/frontend/src/components/properties/RichTextProperties.vue index 29dbe39..8eb5011 100644 --- a/frontend/src/components/properties/RichTextProperties.vue +++ b/frontend/src/components/properties/RichTextProperties.vue @@ -1,14 +1,17 @@ diff --git a/frontend/src/components/properties/TextProperties.vue b/frontend/src/components/properties/TextProperties.vue index 8531005..2a82dfc 100644 --- a/frontend/src/components/properties/TextProperties.vue +++ b/frontend/src/components/properties/TextProperties.vue @@ -1,17 +1,23 @@