@lumel/ai-schema-host 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/compiler/AISchemaCompiler.d.ts +1 -1
- package/dist/compiler/AISchemaCompiler.js +2 -2
- package/dist/index.d.ts +5 -0
- package/dist/index.js +50 -5
- package/dist/knowledge/base.json +106 -0
- package/dist/knowledge/chart.json +265 -0
- package/dist/knowledge/index.d.ts +10 -0
- package/dist/knowledge/index.js +41 -0
- package/dist/{knowledge.json → knowledge/visual.json} +124 -222
- package/dist/schemaTypes/AiSchema.type.d.ts +10 -2
- package/dist/schemaTypes/AiSchema.type.js +4 -0
- package/dist/schemaTypes/visualStateSchema/BoxSchema/boxSchema.type.d.ts +29 -0
- package/dist/schemaTypes/visualStateSchema/BoxSchema/boxSchema.type.js +14 -0
- package/dist/schemaTypes/visualStateSchema/ChartSchema/chartSchema.type.d.ts +129 -17
- package/dist/schemaTypes/visualStateSchema/NavigatorSchema/navigatorSchema.type.d.ts +26 -0
- package/dist/schemaTypes/visualStateSchema/NavigatorSchema/navigatorSchema.type.js +12 -0
- package/dist/schemaTypes/visualStateSchema/ShapeSchema/shapeSchema.type.d.ts +35 -0
- package/dist/schemaTypes/visualStateSchema/ShapeSchema/shapeSchema.type.js +12 -0
- package/dist/schemaTypes/visualStateSchema/TextSchema/textSchema.type.d.ts +13 -0
- package/dist/schemaTypes/visualStateSchema/TextSchema/textSchema.type.js +11 -0
- package/dist/types.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,108 +1,4 @@
|
|
|
1
1
|
[
|
|
2
|
-
{
|
|
3
|
-
"id": "fabric-base-theme",
|
|
4
|
-
"scope": "base",
|
|
5
|
-
"visualType": "COMMON",
|
|
6
|
-
"sectionKey": "theme",
|
|
7
|
-
"propertyName": "themeSchema",
|
|
8
|
-
"affectedVisualTypes": ["dashboard", "report", "page"],
|
|
9
|
-
"title": "Base Theme",
|
|
10
|
-
"description": "Top-level dashboard/report theme. Sets the global look (light, dark, IBCS, color-blind, etc.) that every visual inherits unless it overrides locally. Lives on baseSchema.themeSchema.name.",
|
|
11
|
-
"structureNote": "BATCH = replace. themeSchema is a single object { name }. Send the whole themeSchema object when changing the theme. updatePatterns are NON-EXHAUSTIVE examples showing patch SHAPE only — copy the structure/nesting, not the literal values; any key in schemaJson is editable the same way.",
|
|
12
|
-
"schemaJson": {
|
|
13
|
-
"name": {
|
|
14
|
-
"type": "enum",
|
|
15
|
-
"default": "DEFAULT",
|
|
16
|
-
"options": ["LIGHT", "DARK", "DEFAULT", "MIDNIGHT", "IBCS", "COLOR_BLIND_LIGHT", "COLOR_BLIND_DARK", "INFORIVER", "CUSTOM"],
|
|
17
|
-
"description": "Global theme applied to the whole layout. IBCS enables IBCS-standard styling for all charts."
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
"updatePatterns": {
|
|
21
|
-
"setDarkTheme": {
|
|
22
|
-
"intent": "Switch the dashboard to a dark theme",
|
|
23
|
-
"patch": { "name": "DARK" }
|
|
24
|
-
},
|
|
25
|
-
"setIbcsTheme": {
|
|
26
|
-
"intent": "Apply IBCS standard styling to the whole report",
|
|
27
|
-
"patch": { "name": "IBCS" }
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
"id": "fabric-base-canvas",
|
|
33
|
-
"scope": "base",
|
|
34
|
-
"visualType": "COMMON",
|
|
35
|
-
"sectionKey": "canvas",
|
|
36
|
-
"propertyName": "canvasSchema",
|
|
37
|
-
"affectedVisualTypes": ["dashboard", "report", "page"],
|
|
38
|
-
"title": "Base Canvas",
|
|
39
|
-
"description": "Dashboard/report-wide canvas: background and global typography defaults that visuals inherit. Lives on baseSchema.canvasSchema.",
|
|
40
|
-
"structureNote": "BATCH = replace. Re-send the full canvasSchema slice you are changing; preserve sibling keys (background, font). updatePatterns are NON-EXHAUSTIVE examples showing patch SHAPE only — copy the structure/nesting, not the literal values; any key in schemaJson is editable the same way.",
|
|
41
|
-
"schemaJson": {
|
|
42
|
-
"background": {
|
|
43
|
-
"type": "hex-color",
|
|
44
|
-
"default": "#ffffff",
|
|
45
|
-
"description": "CSS color of the canvas background behind all visuals."
|
|
46
|
-
},
|
|
47
|
-
"font": {
|
|
48
|
-
"_description": "Global typography defaults inherited by visuals.",
|
|
49
|
-
"family": { "type": "string", "default": "Segoe UI", "description": "CSS font-family stack for the layout." },
|
|
50
|
-
"size": { "type": "number", "default": 12, "description": "Base font size (px)." },
|
|
51
|
-
"color": { "type": "hex-color", "default": "#333333", "description": "Base text color." },
|
|
52
|
-
"responsive": { "type": "boolean", "default": true, "description": "Scale fonts responsively with the layout size." },
|
|
53
|
-
"autoColor": { "type": "boolean", "default": false, "description": "Auto-pick text color for contrast against the background." }
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
"updatePatterns": {
|
|
57
|
-
"setBackground": {
|
|
58
|
-
"intent": "Set the canvas background color",
|
|
59
|
-
"patch": { "background": "#f5f5f5" }
|
|
60
|
-
},
|
|
61
|
-
"setBaseFont": {
|
|
62
|
-
"intent": "Change the global font family and size (values illustrative)",
|
|
63
|
-
"patch": { "font": { "family": "Arial", "size": 14 } }
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
"id": "fabric-base-visualGroupMap",
|
|
69
|
-
"scope": "base",
|
|
70
|
-
"visualType": "COMMON",
|
|
71
|
-
"sectionKey": "visualGroupMap",
|
|
72
|
-
"propertyName": "visualGroupMap",
|
|
73
|
-
"affectedVisualTypes": ["dashboard", "report", "page"],
|
|
74
|
-
"title": "Visual Group Map",
|
|
75
|
-
"description": "Map of group elements that bundle visuals together for collective layout, visibility and rotation. Keyed by group element id on baseSchema.visualGroupMap.",
|
|
76
|
-
"structureNote": "BATCH = replace. Each entry is keyed by group id. Send the full group entry when updating; do not drop sibling group entries. updatePatterns are NON-EXHAUSTIVE examples showing patch SHAPE only — copy the structure/nesting, not the literal values; any key in schemaJson is editable the same way.",
|
|
77
|
-
"schemaJson": {
|
|
78
|
-
"<groupId>": {
|
|
79
|
-
"name": { "type": "string", "default": "", "description": "Display name of the group." },
|
|
80
|
-
"isHidden": { "type": "boolean", "default": false, "description": "Hide the entire group and its visuals." },
|
|
81
|
-
"isExpanded": { "type": "boolean", "default": true, "description": "Whether the group is expanded in the layout tree." },
|
|
82
|
-
"shallowDelete": { "type": "boolean", "default": false, "description": "Soft-delete marker; keeps the group entry but removes it from render." },
|
|
83
|
-
"dimensionConfig": {
|
|
84
|
-
"_description": "Sizing behavior of the group container (see visual.dimensionConfig).",
|
|
85
|
-
"type": "object"
|
|
86
|
-
},
|
|
87
|
-
"rotation": {
|
|
88
|
-
"_description": "Group rotation transform.",
|
|
89
|
-
"isEnabled": { "type": "boolean", "default": false, "description": "Enable rotation for the group." },
|
|
90
|
-
"transform": { "type": "number", "default": 0, "description": "Rotation angle in degrees." },
|
|
91
|
-
"center": { "type": "object", "default": null, "description": "Optional rotation center { x, y }." }
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
|
-
"updatePatterns": {
|
|
96
|
-
"hideGroup": {
|
|
97
|
-
"intent": "Hide a visual group",
|
|
98
|
-
"patch": { "<groupId>": { "isHidden": true } }
|
|
99
|
-
},
|
|
100
|
-
"renameGroup": {
|
|
101
|
-
"intent": "Rename a visual group",
|
|
102
|
-
"patch": { "<groupId>": { "name": "KPIs" } }
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
},
|
|
106
2
|
{
|
|
107
3
|
"id": "fabric-visual-dimension",
|
|
108
4
|
"scope": "visual",
|
|
@@ -311,123 +207,6 @@
|
|
|
311
207
|
}
|
|
312
208
|
}
|
|
313
209
|
},
|
|
314
|
-
{
|
|
315
|
-
"id": "fabric-chart-axis",
|
|
316
|
-
"scope": "visual",
|
|
317
|
-
"visualType": "CHART",
|
|
318
|
-
"sectionKey": "axis",
|
|
319
|
-
"propertyName": "axis",
|
|
320
|
-
"affectedVisualTypes": ["bar", "column", "line", "area", "combo", "waterfall", "scatter", "bubble"],
|
|
321
|
-
"title": "Chart Axis Configuration",
|
|
322
|
-
"description": "Controls the chart axes: x (category), y (primary value), y2 (secondary/dual value) and yMeasures (per-measure value axes keyed by multiple-axis id). Each axis has enabled, label, title and gridLine groups. Not applicable to pie/donut/treemap/funnel/sankey/gantt.",
|
|
323
|
-
"structureNote": "BATCH = replace. y-axis title color/size/bold/italic are NOT read from title.* — they route to the matching series label; only title.show + x-axis title.text apply directly. Re-send the full axis slice you change and preserve sibling axes. updatePatterns are NON-EXHAUSTIVE examples showing patch SHAPE only — copy the structure/nesting, not the literal values; any key in schemaJson is editable the same way.",
|
|
324
|
-
"schemaJson": {
|
|
325
|
-
"x": {
|
|
326
|
-
"_description": "Category axis.",
|
|
327
|
-
"enabled": { "type": "boolean", "default": true, "description": "Show or hide the entire x-axis." },
|
|
328
|
-
"display": { "type": "enum", "default": "scaleBand", "options": ["off", "yAxis", "scaleBand", "individualScaling"], "description": "Axis render mode." },
|
|
329
|
-
"label": {
|
|
330
|
-
"_description": "Tick / category label styling.",
|
|
331
|
-
"show": { "type": "boolean", "default": true, "description": "Show category labels." },
|
|
332
|
-
"fontSize": { "type": "number", "default": null, "description": "Label font size (px)." },
|
|
333
|
-
"bold": { "type": "boolean", "default": false, "description": "Bold labels." },
|
|
334
|
-
"italic": { "type": "boolean", "default": false, "description": "Italic labels." },
|
|
335
|
-
"color": { "type": "hex-color", "default": "#333333", "description": "Label text color." }
|
|
336
|
-
},
|
|
337
|
-
"title": {
|
|
338
|
-
"_description": "Axis title text + styling.",
|
|
339
|
-
"show": { "type": "boolean", "default": true, "description": "Show the axis title." },
|
|
340
|
-
"text": { "type": "string", "default": "", "description": "Axis title text (x-axis applies directly)." },
|
|
341
|
-
"fontSize": { "type": "number", "default": null, "description": "Title font size (px)." },
|
|
342
|
-
"bold": { "type": "boolean", "default": false, "description": "Bold title." },
|
|
343
|
-
"italic": { "type": "boolean", "default": false, "description": "Italic title." },
|
|
344
|
-
"color": { "type": "hex-color", "default": "#333333", "description": "Title text color." }
|
|
345
|
-
},
|
|
346
|
-
"gridLine": {
|
|
347
|
-
"_description": "Major gridline visibility, color and width.",
|
|
348
|
-
"show": { "type": "boolean", "default": true, "description": "Show gridlines." },
|
|
349
|
-
"color": { "type": "hex-color", "default": "#cccccc", "description": "Gridline color." },
|
|
350
|
-
"width": { "type": "number", "default": 1, "description": "Gridline width (px)." }
|
|
351
|
-
}
|
|
352
|
-
},
|
|
353
|
-
"y": {
|
|
354
|
-
"_description": "Primary value axis. Same field groups as x. Note y-title style routes to series labels.",
|
|
355
|
-
"enabled": { "type": "boolean", "default": true, "description": "Show or hide the primary y-axis." },
|
|
356
|
-
"display": { "type": "enum", "default": "scaleBand", "options": ["off", "yAxis", "scaleBand", "individualScaling"], "description": "Axis render mode." },
|
|
357
|
-
"label": { "type": "object", "description": "Same label group as x.label." },
|
|
358
|
-
"title": { "type": "object", "description": "Same title group as x.title; only show applies directly, style routes to series label." },
|
|
359
|
-
"gridLine": { "type": "object", "description": "Same gridLine group as x.gridLine." }
|
|
360
|
-
},
|
|
361
|
-
"y2": {
|
|
362
|
-
"_description": "Secondary (dual) value axis. Same structure as y.",
|
|
363
|
-
"enabled": { "type": "boolean", "default": false, "description": "Show or hide the secondary y-axis." }
|
|
364
|
-
},
|
|
365
|
-
"yMeasures": {
|
|
366
|
-
"_description": "Per-measure value axes keyed by multipleYAxis id. Each value has the same structure as a single axis.",
|
|
367
|
-
"<multipleYAxisId>": { "type": "object", "description": "Axis config for one measure (label/title/gridLine)." }
|
|
368
|
-
}
|
|
369
|
-
},
|
|
370
|
-
"updatePatterns": {
|
|
371
|
-
"enableXAxisBoldLabels": {
|
|
372
|
-
"intent": "Enable the x-axis and bold its labels",
|
|
373
|
-
"patch": { "x": { "enabled": true, "label": { "bold": true } } }
|
|
374
|
-
},
|
|
375
|
-
"styleYTitle": {
|
|
376
|
-
"intent": "Color the primary y-axis title and set its size (routes to series labels; values illustrative)",
|
|
377
|
-
"patch": { "y": { "title": { "color": "#ff0000", "fontSize": 14 } } }
|
|
378
|
-
},
|
|
379
|
-
"stylePerMeasureAxis": {
|
|
380
|
-
"intent": "Style a per-measure y-axis label",
|
|
381
|
-
"patch": { "yMeasures": { "<multipleYAxisId>": { "label": { "color": "#333333" } } } }
|
|
382
|
-
},
|
|
383
|
-
"hideXGridLines": {
|
|
384
|
-
"intent": "Hide the x-axis grid lines",
|
|
385
|
-
"patch": { "x": { "gridLine": { "show": false } } }
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
},
|
|
389
|
-
{
|
|
390
|
-
"id": "fabric-chart-canvas",
|
|
391
|
-
"scope": "visual",
|
|
392
|
-
"visualType": "CHART",
|
|
393
|
-
"sectionKey": "canvas",
|
|
394
|
-
"propertyName": "canvas",
|
|
395
|
-
"affectedVisualTypes": ["bar", "column", "line", "area", "combo", "pie", "donut", "treemap", "funnel"],
|
|
396
|
-
"title": "Chart Canvas",
|
|
397
|
-
"description": "Chart-level canvas controls: chart theme, background color and typography. Overrides the inherited base canvas for this chart only.",
|
|
398
|
-
"structureNote": "BATCH = replace. Preserve sibling keys (theme, background, font) when patching. Changing theme resets measuresStyle to that theme's defaults. updatePatterns are NON-EXHAUSTIVE examples showing patch SHAPE only — copy the structure/nesting, not the literal values; any key in schemaJson is editable the same way.",
|
|
399
|
-
"schemaJson": {
|
|
400
|
-
"theme": {
|
|
401
|
-
"type": "enum",
|
|
402
|
-
"default": "ibcs",
|
|
403
|
-
"options": ["ibcs", "default", "ocean", "spring", "autumn", "grayscale"],
|
|
404
|
-
"description": "Active color theme. ibcs = IBCS standard black/gray palette (AC=black, PY=gray). Changing theme resets measuresStyle to theme defaults."
|
|
405
|
-
},
|
|
406
|
-
"background": { "type": "hex-color", "default": "#ffffff", "description": "Chart canvas background color." },
|
|
407
|
-
"font": {
|
|
408
|
-
"_description": "Chart typography.",
|
|
409
|
-
"family": { "type": "string", "default": "Segoe UI", "description": "Font family stack." },
|
|
410
|
-
"size": { "type": "number", "default": 12, "description": "Font size (px)." },
|
|
411
|
-
"color": { "type": "hex-color", "default": "#333333", "description": "Text color." },
|
|
412
|
-
"responsive": { "type": "boolean", "default": true, "description": "Scale fonts responsively." },
|
|
413
|
-
"autoColor": { "type": "boolean", "default": false, "description": "Auto-pick text color for contrast." }
|
|
414
|
-
}
|
|
415
|
-
},
|
|
416
|
-
"updatePatterns": {
|
|
417
|
-
"setChartTheme": {
|
|
418
|
-
"intent": "Switch the chart color theme (e.g. to ocean)",
|
|
419
|
-
"patch": { "theme": "ocean" }
|
|
420
|
-
},
|
|
421
|
-
"setChartBackground": {
|
|
422
|
-
"intent": "Set the chart background color",
|
|
423
|
-
"patch": { "background": "#fafafa" }
|
|
424
|
-
},
|
|
425
|
-
"setChartFont": {
|
|
426
|
-
"intent": "Change the chart font (values illustrative)",
|
|
427
|
-
"patch": { "font": { "family": "Arial", "size": 13 } }
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
},
|
|
431
210
|
{
|
|
432
211
|
"id": "fabric-matrix-placeholder",
|
|
433
212
|
"scope": "visual",
|
|
@@ -466,5 +245,128 @@
|
|
|
466
245
|
"structureNote": "Schema pending. Do not emit patches for secondary-visual visual-state until this section gains fields.",
|
|
467
246
|
"schemaJson": {},
|
|
468
247
|
"updatePatterns": {}
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"id": "fabric-box",
|
|
251
|
+
"scope": "visual",
|
|
252
|
+
"visualType": "BOX",
|
|
253
|
+
"sectionKey": "box",
|
|
254
|
+
"propertyName": "boxSchema",
|
|
255
|
+
"affectedVisualTypes": ["box"],
|
|
256
|
+
"title": "Box Native Visual",
|
|
257
|
+
"description": "Native layout container that holds other visuals. Controls layout direction, child spacing, alignment, overflow and wrapping. Maps to the box store (IBoxElementState) via the field-map driven native compiler, scoped by visualId.",
|
|
258
|
+
"structureNote": "MERGE = deep-merge against current state. 'between' alignment is valid only on the box's MAIN axis (vertical box -> verticalAlignment, horizontal box -> horizontalAlignment); pairing a layout with the off-axis 'between' is rejected, and changing the layout resets an off-axis 'between' to its default. updatePatterns are NON-EXHAUSTIVE examples showing patch SHAPE only — copy the structure/nesting, not the literal values; any key in schemaJson is editable the same way.",
|
|
259
|
+
"schemaJson": {
|
|
260
|
+
"layout": { "type": "enum", "default": "vertical", "options": ["vertical", "horizontal"], "description": "Layout direction of the container (store: boxType)." },
|
|
261
|
+
"gap": { "type": "number", "default": 0, "description": "Spacing between children (px)." },
|
|
262
|
+
"verticalAlignment": { "type": "enum", "default": "top", "options": ["top", "center", "bottom", "between"], "description": "Vertical alignment of children. 'between' valid only for a vertical box." },
|
|
263
|
+
"horizontalAlignment": { "type": "enum", "default": "left", "options": ["left", "center", "right", "between"], "description": "Horizontal alignment of children. 'between' valid only for a horizontal box." },
|
|
264
|
+
"overflow": {
|
|
265
|
+
"_description": "Overflow behavior per axis.",
|
|
266
|
+
"horizontal": { "type": "enum", "default": "hidden", "options": ["hidden", "scroll"], "description": "Horizontal overflow behavior." },
|
|
267
|
+
"vertical": { "type": "enum", "default": "hidden", "options": ["hidden", "scroll"], "description": "Vertical overflow behavior." }
|
|
268
|
+
},
|
|
269
|
+
"wrapContent": { "type": "boolean", "default": false, "description": "Whether children wrap onto multiple lines." }
|
|
270
|
+
},
|
|
271
|
+
"updatePatterns": {
|
|
272
|
+
"stackVertically": {
|
|
273
|
+
"intent": "Stack children vertically with spacing",
|
|
274
|
+
"patch": { "layout": "vertical", "gap": 16 }
|
|
275
|
+
},
|
|
276
|
+
"spaceBetween": {
|
|
277
|
+
"intent": "Distribute children with space between them in a horizontal box",
|
|
278
|
+
"patch": { "layout": "horizontal", "horizontalAlignment": "between" }
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"id": "fabric-shape",
|
|
284
|
+
"scope": "visual",
|
|
285
|
+
"visualType": "SHAPE",
|
|
286
|
+
"sectionKey": "shape",
|
|
287
|
+
"propertyName": "shapeSchema",
|
|
288
|
+
"affectedVisualTypes": ["shape"],
|
|
289
|
+
"title": "Shape Native Visual",
|
|
290
|
+
"description": "Native shape styling: fill, border, shadow and tooltip. Maps to the shape store (IShapeStyles) via the field-map driven native compiler, scoped by visualId. Shape geometry, text-on-shape, icon and action sections are deferred.",
|
|
291
|
+
"structureNote": "MERGE = deep-merge against current state. Each section (fill, border, shadow, tooltip) is its own nested object; preserve the sections you are not changing. updatePatterns are NON-EXHAUSTIVE examples showing patch SHAPE only — copy the structure/nesting, not the literal values; any key in schemaJson is editable the same way.",
|
|
292
|
+
"schemaJson": {
|
|
293
|
+
"fill": {
|
|
294
|
+
"_description": "Background fill.",
|
|
295
|
+
"color": { "type": "hex-color", "default": "#ffffff", "description": "Fill color (store: fill.fillColor)." },
|
|
296
|
+
"show": { "type": "boolean", "default": true, "description": "Enable the fill (store: fill.isEnabled)." }
|
|
297
|
+
},
|
|
298
|
+
"border": {
|
|
299
|
+
"_description": "Outline.",
|
|
300
|
+
"color": { "type": "hex-color", "default": "#cccccc", "description": "Border color." },
|
|
301
|
+
"width": { "type": "number", "default": 1, "description": "Border width (px)." },
|
|
302
|
+
"style": { "type": "enum", "default": "solid", "options": ["solid", "dotted", "dashed"], "description": "Border line style." },
|
|
303
|
+
"show": { "type": "boolean", "default": false, "description": "Enable the border (store: border.isEnabled)." }
|
|
304
|
+
},
|
|
305
|
+
"shadow": {
|
|
306
|
+
"_description": "Drop shadow.",
|
|
307
|
+
"color": { "type": "hex-color", "default": "#00000033", "description": "Shadow color." },
|
|
308
|
+
"blur": { "type": "number", "default": 4, "description": "Shadow blur radius (px)." },
|
|
309
|
+
"show": { "type": "boolean", "default": false, "description": "Enable the shadow (store: shadow.isEnabled)." }
|
|
310
|
+
},
|
|
311
|
+
"tooltip": {
|
|
312
|
+
"_description": "Hover tooltip.",
|
|
313
|
+
"content": { "type": "string", "default": "", "description": "Tooltip text." },
|
|
314
|
+
"show": { "type": "boolean", "default": false, "description": "Enable the tooltip (store: tooltip.isEnabled)." }
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
"updatePatterns": {
|
|
318
|
+
"fillWithDashedBorder": {
|
|
319
|
+
"intent": "Solid blue fill with a dashed border (values illustrative)",
|
|
320
|
+
"patch": { "fill": { "color": "#1f6feb", "show": true }, "border": { "color": "#0b3d91", "width": 1, "style": "dashed", "show": true } }
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
"id": "fabric-navigator",
|
|
326
|
+
"scope": "visual",
|
|
327
|
+
"visualType": "NAVIGATOR",
|
|
328
|
+
"sectionKey": "navigator",
|
|
329
|
+
"propertyName": "navigatorSchema",
|
|
330
|
+
"affectedVisualTypes": ["navigator"],
|
|
331
|
+
"title": "Navigator Native Visual",
|
|
332
|
+
"description": "Native runtime-input element ('Navigator' in the UI): navigator kind and button action. Maps to the navigator store (INavigatorState) via the field-map driven native compiler, scoped by visualId. Per-state styling and tab layout are deferred.",
|
|
333
|
+
"structureNote": "MERGE = deep-merge against current state. button.* fields apply to the NAVIGATOR_BUTTON kind; set the matching target (webUrl/bookmarkId/pageDestinationId/variableId) for the chosen action. updatePatterns are NON-EXHAUSTIVE examples showing patch SHAPE only — copy the structure/nesting, not the literal values; any key in schemaJson is editable the same way.",
|
|
334
|
+
"schemaJson": {
|
|
335
|
+
"type": { "type": "enum", "default": "NAVIGATOR_BUTTON", "options": ["NAVIGATOR_BUTTON", "BOOKMARK_TABS", "PAGE_NAVIGATOR_TABS"], "description": "Navigator kind." },
|
|
336
|
+
"button": {
|
|
337
|
+
"_description": "Button behavior (applies to the NAVIGATOR_BUTTON kind).",
|
|
338
|
+
"action": { "type": "enum", "default": "NONE", "options": ["NONE", "BACK", "WEB_URL", "PAGE_NAVIGATION", "BOOKMARK_NAVIGATION", "CLEAR_SLICER", "APPLY_SLICER", "DRILL_THROUGH", "VARIABLE"], "description": "Button action (store: navigatorButtonState.actionType)." },
|
|
339
|
+
"webUrl": { "type": "string", "default": "", "description": "Target URL when action is WEB_URL." },
|
|
340
|
+
"bookmarkId": { "type": "string", "default": "", "description": "Target bookmark id when action is BOOKMARK_NAVIGATION." },
|
|
341
|
+
"pageDestinationId": { "type": "string", "default": "", "description": "Target page id when action is PAGE_NAVIGATION." },
|
|
342
|
+
"variableId": { "type": "string", "default": "", "description": "Target variable id when action is VARIABLE." }
|
|
343
|
+
}
|
|
344
|
+
},
|
|
345
|
+
"updatePatterns": {
|
|
346
|
+
"openUrl": {
|
|
347
|
+
"intent": "Make the button open a URL",
|
|
348
|
+
"patch": { "type": "NAVIGATOR_BUTTON", "button": { "action": "WEB_URL", "webUrl": "https://example.com" } }
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
"id": "fabric-text",
|
|
354
|
+
"scope": "visual",
|
|
355
|
+
"visualType": "TEXT",
|
|
356
|
+
"sectionKey": "text",
|
|
357
|
+
"propertyName": "textSchema",
|
|
358
|
+
"affectedVisualTypes": ["text"],
|
|
359
|
+
"title": "Text Native Visual",
|
|
360
|
+
"description": "Native rich-text element. v1 exposes the plain-text content only. Maps to the text store (visualState.text) via the field-map driven native compiler, scoped by visualId. Character styling (font/color/bold) lives in the selection-scoped textStyleStore applied via the Lexical editor and is deferred.",
|
|
361
|
+
"structureNote": "MERGE = deep-merge against current state. Only content is writable; do not emit character-style patches. updatePatterns are NON-EXHAUSTIVE examples showing patch SHAPE only — copy the structure/nesting, not the literal values; any key in schemaJson is editable the same way.",
|
|
362
|
+
"schemaJson": {
|
|
363
|
+
"content": { "type": "string", "default": "", "description": "Plain-text content of the element (store: text)." }
|
|
364
|
+
},
|
|
365
|
+
"updatePatterns": {
|
|
366
|
+
"setContent": {
|
|
367
|
+
"intent": "Set the text content",
|
|
368
|
+
"patch": { "content": "Quarterly revenue summary" }
|
|
369
|
+
}
|
|
370
|
+
}
|
|
469
371
|
}
|
|
470
|
-
]
|
|
372
|
+
]
|
|
@@ -2,13 +2,21 @@ import { IMatrixSchema } from './visualStateSchema/MatrixSchema/matrixSchema.typ
|
|
|
2
2
|
import { ISecondaryVisualsSchema } from './visualStateSchema/SecondaryVisual/SecondaryVisualSchema.type';
|
|
3
3
|
import { ISuperFiltersSchema } from './visualStateSchema/SuperFilter/SuperFilterSchema.type';
|
|
4
4
|
import { IChartSchema } from './visualStateSchema/ChartSchema/chartSchema.type';
|
|
5
|
+
import { IBoxSchema } from './visualStateSchema/BoxSchema/boxSchema.type';
|
|
6
|
+
import { ITextSchema } from './visualStateSchema/TextSchema/textSchema.type';
|
|
7
|
+
import { IShapeSchema } from './visualStateSchema/ShapeSchema/shapeSchema.type';
|
|
8
|
+
import { INavigatorSchema } from './visualStateSchema/NavigatorSchema/navigatorSchema.type';
|
|
5
9
|
import type { EThemeType, EVisualType, IGroupElement, IPivotAssignment, ISuperFilter, IVisualDimension, IVisualDimensionConfig, IVisualElementStyles, IVisualPosition } from '@lumel/visual-host';
|
|
6
|
-
export type TVisualStateSchema = IMatrixSchema | IChartSchema | ISuperFiltersSchema | ISecondaryVisualsSchema;
|
|
10
|
+
export type TVisualStateSchema = IMatrixSchema | IChartSchema | ISuperFiltersSchema | ISecondaryVisualsSchema | IBoxSchema | ITextSchema | IShapeSchema | INavigatorSchema;
|
|
7
11
|
export declare enum EVisualStateSchemaType {
|
|
8
12
|
CHART = "CHART",
|
|
9
13
|
MATRIX = "MATRIX",
|
|
10
14
|
SUPER_FILTER = "SUPER_FILTER",
|
|
11
|
-
SECONDARY_VISUAL = "SECONDARY_VISUAL"
|
|
15
|
+
SECONDARY_VISUAL = "SECONDARY_VISUAL",
|
|
16
|
+
BOX = "BOX",
|
|
17
|
+
TEXT = "TEXT",
|
|
18
|
+
SHAPE = "SHAPE",
|
|
19
|
+
NAVIGATOR = "NAVIGATOR"
|
|
12
20
|
}
|
|
13
21
|
export interface IVisualSchema {
|
|
14
22
|
chartType?: string;
|
|
@@ -13,5 +13,9 @@ var EVisualStateSchemaType = /*#__PURE__*/ function(EVisualStateSchemaType) {
|
|
|
13
13
|
EVisualStateSchemaType["MATRIX"] = "MATRIX";
|
|
14
14
|
EVisualStateSchemaType["SUPER_FILTER"] = "SUPER_FILTER";
|
|
15
15
|
EVisualStateSchemaType["SECONDARY_VISUAL"] = "SECONDARY_VISUAL";
|
|
16
|
+
EVisualStateSchemaType["BOX"] = "BOX";
|
|
17
|
+
EVisualStateSchemaType["TEXT"] = "TEXT";
|
|
18
|
+
EVisualStateSchemaType["SHAPE"] = "SHAPE";
|
|
19
|
+
EVisualStateSchemaType["NAVIGATOR"] = "NAVIGATOR";
|
|
16
20
|
return EVisualStateSchemaType;
|
|
17
21
|
}({});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Curated AI schema contract for the native **Box** visual (layout container).
|
|
3
|
+
*
|
|
4
|
+
* The field-map driven compiler in `editable-app`
|
|
5
|
+
* (`modules/AiSchema/native/compilers/boxAiSchemaCompiler.ts`) is the single source of
|
|
6
|
+
* truth for how these map to the box store (`IBoxElementState`).
|
|
7
|
+
*
|
|
8
|
+
* Note: `between` alignment applies only to the box's MAIN axis — `verticalAlignment`
|
|
9
|
+
* for a vertical box, `horizontalAlignment` for a horizontal box. The compiler
|
|
10
|
+
* validates this on apply and normalizes it when the layout changes.
|
|
11
|
+
*/
|
|
12
|
+
export interface IBoxSchema {
|
|
13
|
+
schemaVersion?: number;
|
|
14
|
+
/** Layout direction of the container (store: `boxType`). */
|
|
15
|
+
layout?: 'vertical' | 'horizontal';
|
|
16
|
+
/** Spacing between children, in pixels. */
|
|
17
|
+
gap?: number;
|
|
18
|
+
/** Vertical alignment of children. `between` is valid only for a vertical box. */
|
|
19
|
+
verticalAlignment?: 'top' | 'center' | 'bottom' | 'between';
|
|
20
|
+
/** Horizontal alignment of children. `between` is valid only for a horizontal box. */
|
|
21
|
+
horizontalAlignment?: 'left' | 'center' | 'right' | 'between';
|
|
22
|
+
/** Overflow behaviour per axis. */
|
|
23
|
+
overflow?: {
|
|
24
|
+
horizontal?: 'hidden' | 'scroll';
|
|
25
|
+
vertical?: 'hidden' | 'scroll';
|
|
26
|
+
};
|
|
27
|
+
/** Whether children wrap onto multiple lines. */
|
|
28
|
+
wrapContent?: boolean;
|
|
29
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Curated AI schema contract for the native **Box** visual (layout container).
|
|
3
|
+
*
|
|
4
|
+
* The field-map driven compiler in `editable-app`
|
|
5
|
+
* (`modules/AiSchema/native/compilers/boxAiSchemaCompiler.ts`) is the single source of
|
|
6
|
+
* truth for how these map to the box store (`IBoxElementState`).
|
|
7
|
+
*
|
|
8
|
+
* Note: `between` alignment applies only to the box's MAIN axis — `verticalAlignment`
|
|
9
|
+
* for a vertical box, `horizontalAlignment` for a horizontal box. The compiler
|
|
10
|
+
* validates this on apply and normalizes it when the layout changes.
|
|
11
|
+
*/ "use strict";
|
|
12
|
+
Object.defineProperty(exports, "__esModule", {
|
|
13
|
+
value: true
|
|
14
|
+
});
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export type TChartTheme = string;
|
|
2
|
-
export interface
|
|
2
|
+
export interface IAxisLabelSchema {
|
|
3
3
|
show?: boolean;
|
|
4
4
|
fontSize?: number;
|
|
5
5
|
bold?: boolean;
|
|
6
6
|
italic?: boolean;
|
|
7
7
|
color?: string;
|
|
8
8
|
}
|
|
9
|
-
export interface
|
|
9
|
+
export interface IAxisTitleSchema {
|
|
10
10
|
show?: boolean;
|
|
11
11
|
text?: string;
|
|
12
12
|
fontSize?: number;
|
|
@@ -14,40 +14,152 @@ export interface AxisTitleSchema {
|
|
|
14
14
|
italic?: boolean;
|
|
15
15
|
color?: string;
|
|
16
16
|
}
|
|
17
|
-
export interface
|
|
17
|
+
export interface IAxisGridLineSchema {
|
|
18
18
|
show?: boolean;
|
|
19
19
|
color?: string;
|
|
20
20
|
width?: number;
|
|
21
21
|
}
|
|
22
22
|
export type TYAxisDisplayType = 'off' | 'yAxis' | 'scaleBand' | 'individualScaling';
|
|
23
|
-
export interface
|
|
23
|
+
export interface IAxisSchema {
|
|
24
24
|
enabled?: boolean;
|
|
25
25
|
/** Y-axis rendering mode. Applies to `axis.y` and `axis.yMeasures.*` only. */
|
|
26
26
|
display?: TYAxisDisplayType;
|
|
27
|
-
label?:
|
|
28
|
-
title?:
|
|
29
|
-
gridLine?:
|
|
27
|
+
label?: IAxisLabelSchema;
|
|
28
|
+
title?: IAxisTitleSchema;
|
|
29
|
+
gridLine?: IAxisGridLineSchema;
|
|
30
30
|
}
|
|
31
|
-
export interface
|
|
32
|
-
x?:
|
|
33
|
-
y?:
|
|
34
|
-
y2?:
|
|
35
|
-
yMeasures?: Record<string,
|
|
31
|
+
export interface IAxisGroupSchema {
|
|
32
|
+
x?: IAxisSchema;
|
|
33
|
+
y?: IAxisSchema;
|
|
34
|
+
y2?: IAxisSchema;
|
|
35
|
+
yMeasures?: Record<string, IAxisSchema>;
|
|
36
36
|
}
|
|
37
|
-
export interface
|
|
37
|
+
export interface ICanvasFontSchema {
|
|
38
38
|
family?: string;
|
|
39
39
|
size?: number;
|
|
40
40
|
color?: string;
|
|
41
41
|
responsive?: boolean;
|
|
42
42
|
autoColor?: boolean;
|
|
43
43
|
}
|
|
44
|
-
export interface
|
|
44
|
+
export interface ICanvasSchema {
|
|
45
45
|
theme?: TChartTheme;
|
|
46
46
|
background?: string;
|
|
47
|
-
font?:
|
|
47
|
+
font?: ICanvasFontSchema;
|
|
48
|
+
}
|
|
49
|
+
/** Legend title text + styling (curated). */
|
|
50
|
+
export interface ILegendTitleSchema {
|
|
51
|
+
show?: boolean;
|
|
52
|
+
text?: string;
|
|
53
|
+
fontSize?: number;
|
|
54
|
+
color?: string;
|
|
55
|
+
}
|
|
56
|
+
/** Legend label styling (curated). */
|
|
57
|
+
export interface ILegendLabelSchema {
|
|
58
|
+
show?: boolean;
|
|
59
|
+
fontSize?: number;
|
|
60
|
+
bold?: boolean;
|
|
61
|
+
italic?: boolean;
|
|
62
|
+
color?: string;
|
|
63
|
+
}
|
|
64
|
+
/** Curated legend controls. */
|
|
65
|
+
export interface ILegendSchema {
|
|
66
|
+
enabled?: boolean;
|
|
67
|
+
layout?: 'horizontal' | 'vertical';
|
|
68
|
+
horizontalAlignment?: 'left' | 'center' | 'right';
|
|
69
|
+
verticalAlignment?: 'top' | 'middle' | 'bottom';
|
|
70
|
+
showIcon?: boolean;
|
|
71
|
+
markerStyle?: 'markerDefault' | 'marker' | 'line' | 'lineAndMarkers';
|
|
72
|
+
title?: ILegendTitleSchema;
|
|
73
|
+
label?: ILegendLabelSchema;
|
|
74
|
+
}
|
|
75
|
+
export type TDataLabelDisplay = 'auto' | 'limited' | 'minMax' | 'minOnly' | 'maxOnly' | 'firstLast' | 'firstOnly' | 'lastOnly' | 'nthLabel' | 'none' | 'outlier' | 'nthAndLast';
|
|
76
|
+
export type TDataLabelPosition = 'auto' | 'outside' | 'insideTop' | 'insideCenter' | 'insideBottom' | 'center';
|
|
77
|
+
/** Universal (chart-wide) data-label styling for a single measure. */
|
|
78
|
+
export interface IDataLabelStyleSchema {
|
|
79
|
+
show?: boolean;
|
|
80
|
+
display?: TDataLabelDisplay;
|
|
81
|
+
position?: TDataLabelPosition;
|
|
82
|
+
fontSize?: number;
|
|
83
|
+
color?: string;
|
|
84
|
+
bold?: boolean;
|
|
85
|
+
italic?: boolean;
|
|
86
|
+
underline?: boolean;
|
|
87
|
+
background?: string;
|
|
88
|
+
showBackground?: boolean;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Variance data-label styling. Variance labels are a separate label shown for the
|
|
92
|
+
* variance measures (the change vs a reference scenario) on column/waterfall charts
|
|
93
|
+
* that have variance measures. This block is applied to every variance measure.
|
|
94
|
+
*/
|
|
95
|
+
export interface IDataLabelVarianceSchema {
|
|
96
|
+
/** Enable/disable the variance labels (store: enabled). */
|
|
97
|
+
show?: boolean;
|
|
98
|
+
/** Which variance labels to show (store: varianceDisplay). */
|
|
99
|
+
display?: TDataLabelDisplay;
|
|
100
|
+
/** Label position relative to the data point (store: position). */
|
|
101
|
+
position?: TDataLabelPosition;
|
|
102
|
+
fontSize?: number;
|
|
103
|
+
/** Font color (store: fontColor). */
|
|
104
|
+
color?: string;
|
|
105
|
+
/** Bold (store: commonFontStyle.isBold). */
|
|
106
|
+
bold?: boolean;
|
|
107
|
+
/** Italic (store: commonFontStyle.isItalic). */
|
|
108
|
+
italic?: boolean;
|
|
109
|
+
/** Background color (store: background). */
|
|
110
|
+
background?: string;
|
|
111
|
+
/** Show the background (store: showBackgroundColor). */
|
|
112
|
+
showBackground?: boolean;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Curated data-label controls, addressed by measure display name. `all` applies
|
|
116
|
+
* to every measure first; `measures` entries override per measure. `variance`
|
|
117
|
+
* styles the variance labels (applied to every variance measure).
|
|
118
|
+
*/
|
|
119
|
+
export interface IDataLabelSchema {
|
|
120
|
+
all?: IDataLabelStyleSchema;
|
|
121
|
+
measures?: Record<string, IDataLabelStyleSchema>;
|
|
122
|
+
variance?: IDataLabelVarianceSchema;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Curated chart types a single measure series can be rendered as. The allowed
|
|
126
|
+
* values depend on the measure category (actual/box-plot vs absolute/relative
|
|
127
|
+
* variance vs additional-actual); the resolver validates the choice per measure
|
|
128
|
+
* and skips with a warning when it does not apply.
|
|
129
|
+
*/
|
|
130
|
+
export type TMeasureChartType = 'groupedBar' | 'bar' | 'lollipop' | 'waterfall' | 'table' | 'lineChart' | 'areaChart' | 'varianceBar' | 'variancePin' | 'varianceWaterfall';
|
|
131
|
+
/** Which y-axis a measure is plotted against. Multi-axis (MAC) charts only. */
|
|
132
|
+
export type TMeasureAxis = 'yAxis1' | 'yAxis2' | 'yAxis3' | 'yAxis4' | 'yAxis5' | 'yAxis6' | 'none';
|
|
133
|
+
/** Per-measure series controls (visibility / render type / axis). */
|
|
134
|
+
export interface IMeasureSeriesEntrySchema {
|
|
135
|
+
/** Show or hide this measure's series (store: isVisible + chartIsVisible). */
|
|
136
|
+
show?: boolean;
|
|
137
|
+
/** Render type for this measure (store: chart). Valid options depend on the measure category. */
|
|
138
|
+
chartType?: TMeasureChartType;
|
|
139
|
+
/** Y-axis this measure is plotted on (store: yAxis). Multi-axis (MAC) charts only. */
|
|
140
|
+
axis?: TMeasureAxis;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Per-measure series controls, addressed by measure display name (NOT internal
|
|
144
|
+
* role/id). Lets you reorder, show/hide, change how a measure is plotted, and assign
|
|
145
|
+
* it to a secondary axis on multi-axis charts.
|
|
146
|
+
*/
|
|
147
|
+
export interface IMeasureSeriesSchema {
|
|
148
|
+
/**
|
|
149
|
+
* Desired display order, listed by measure display name (the drag sequence). May be
|
|
150
|
+
* partial — unlisted measures keep their current relative order, after the listed
|
|
151
|
+
* ones. Ordering is applied within each measure category (actuals vs variances)
|
|
152
|
+
* exactly as the Measure & Series modal does.
|
|
153
|
+
*/
|
|
154
|
+
order?: string[];
|
|
155
|
+
/** Per-measure controls (visibility / render type / axis), keyed by measure display name. */
|
|
156
|
+
measures?: Record<string, IMeasureSeriesEntrySchema>;
|
|
48
157
|
}
|
|
49
158
|
export interface IChartSchema {
|
|
50
159
|
schemaVersion?: number;
|
|
51
|
-
axis?:
|
|
52
|
-
canvas?:
|
|
160
|
+
axis?: IAxisGroupSchema;
|
|
161
|
+
canvas?: ICanvasSchema;
|
|
162
|
+
legend?: ILegendSchema;
|
|
163
|
+
dataLabel?: IDataLabelSchema;
|
|
164
|
+
measureSeries?: IMeasureSeriesSchema;
|
|
53
165
|
}
|