@capillarytech/blaze-ui 5.18.6 → 5.18.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capillarytech/blaze-ui",
3
- "version": "5.18.6",
3
+ "version": "5.18.7",
4
4
  "description": "Capillary UI component library with Ant Design v6",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -36,7 +36,6 @@
36
36
  "@ant-design-v5/icons": "npm:@ant-design/icons@^6.1.0",
37
37
  "@capillarytech/cap-ui-utils": "^3.0.4",
38
38
  "antd-v5": "npm:antd@^6.1.0",
39
- "bizcharts": "^3.5.5",
40
39
  "classnames": "^2.5.1",
41
40
  "dayjs": "^1.11.19",
42
41
  "dayjs-abbr-timezone": "^1.0.0",
@@ -55,6 +54,7 @@
55
54
  "react-rnd": "^10.5.2",
56
55
  "react-virtuoso": "4.9.0",
57
56
  "sanitize.css": "^13.0.0",
57
+ "semantic-ui-react": "^2.1.4",
58
58
  "whatwg-fetch": "3.0.0",
59
59
  "@antv/x6": "1.12.4",
60
60
  "@antv/x6-react-shape": "1.2.3",
@@ -1,69 +0,0 @@
1
- # CapGraph – Migration (Antd v3→v6) Step 1
2
-
3
- ## Stage 1: Pre-Analysis Report
4
-
5
- ### Analysis Report for CapGraph
6
-
7
- #### 1. Antd Style Overrides Found
8
-
9
- | Line # | Old Override | Can Tokenize? | Token Path | Token Value | Override Reason |
10
- |--------|-------------|---------------|------------|-------------|-----------------|
11
- | N/A | None | N/A | N/A | N/A | Component uses BizCharts (G2), not Ant Design |
12
-
13
- **Tokenizable overrides**: 0
14
- **Non-tokenizable overrides**: 0
15
- **No antd overrides found – theme config update skipped.**
16
-
17
- `styles.scss` contains only `@import '../styles/_variables.scss'` and a wrapper class. No `:global` or `.ant-` usage.
18
-
19
- #### 2. API Breaking Changes
20
-
21
- | Old API | New API | Affected Props |
22
- |---------|---------|----------------|
23
- | N/A | N/A | CapGraph does not wrap an Ant Design component |
24
-
25
- #### 3. Backward Compatibility Plan
26
-
27
- | Deprecated Prop | Fallback Logic |
28
- |-----------------|----------------|
29
- | None | N/A – no deprecated props in this migration |
30
-
31
- #### 4. Type Definitions Needed
32
-
33
- - `CapGraphProps` – main component props
34
- - `CapGraphLegendConfig` – legend marker, position, spread props
35
- - `CapGraphGuideItem` – guide position, content
36
- - `CapGraphGeomItem` – graphList item (type, groupBy, colors, shape, tooltip, label, etc.)
37
-
38
- #### 5. PropTypes Removal
39
-
40
- - [x] Component uses PropTypes: **YES** (removed)
41
- - [x] PropTypes file exists: **NO**
42
- - [x] PropTypes imports found: **YES** (removed)
43
- - [x] Component.propTypes assignments found: **YES** (removed)
44
- - All prop types moved to `types.ts` (TypeScript interfaces).
45
-
46
- #### 6. DefaultProps Removal
47
-
48
- - [x] Component uses defaultProps: **YES** (removed)
49
- - [x] Component.defaultProps assignments found: **YES** (removed)
50
- - [x] Old function syntax with props parameter: **NO** (was class component; converted to function)
51
- - [x] Default values assigned inside function body: **NO**
52
- - Defaults applied via destructuring: `graphList = []`, `xAxisProps = {}`, `yAxisProps = {}`, `title = null`, `y1AxisProps = {}`, `chartProps = {}`.
53
-
54
- ---
55
-
56
- ## Implementation Summary
57
-
58
- - **types.ts**: Added; defines `CapGraphProps`, `CapGraphLegendConfig`, `CapGraphGuideItem`, `CapGraphGeomItem`.
59
- - **index.tsx**: Converted from class to function component; removed PropTypes and defaultProps; uses TypeScript types; `tooltipIndex` moved to `useState`; defaults in destructuring.
60
- - **styles.scss**: Uses CSS Modules (`.cap-graph-wrapper`); no `:global` or `.ant-`; variables import retained.
61
- - **Package dependency**: `bizcharts` added to `package.json` (^3.5.5).
62
- - **Export**: `CapGraph` and `CapGraphProps` added to `components/index.ts`.
63
-
64
- ## Validation
65
-
66
- - **SCSS**: No `:global` or `.ant-` in `styles.scss`.
67
- - **Theme config**: Not updated (no Antd component).
68
- - **PropTypes/defaultProps**: Removed; no remaining references.
69
- - **TypeScript**: Types in `types.ts`; `bizcharts` declared in `types.d.ts` for module resolution.
@@ -1,66 +0,0 @@
1
- # Test Cases: CapGraph (Antd v3→v6)
2
-
3
- **Component**: CapGraph
4
- **Complexity**: medium (≤20 test cases)
5
- **Source**: blaze-ui/components/CapGraph/
6
-
7
- ---
8
-
9
- ## Use cases (for Storybook & migration validation)
10
-
11
- | ID | Use Case | Props/Config | Expected Visual/Behavior | Priority | Storybook Story | Notes |
12
- |----|----------|--------------|---------------------------|----------|-----------------|--------|
13
- | UC-001 | All core prop variants | `data`, `xAxis`, `yAxis`, `graphList` (type, groupBy, colors, shape, showlabel, label), `legend` (marker, position, title), `size`, `scale`, `height` | Chart renders with correct axes, series, legend, and dimensions | P1 | PropVariants | Grouped size, scale, legend, graphList config |
14
- | UC-002 | Visual states | Default; `showGuide` + `guide`; `coord`; `y1Axis` + `y1AxisProps`; `graphList: []` | Optional sections (guide, second axis, coord) show/hide; empty graphList renders chart shell without Geoms | P1 | VisualStates | Grouped optional visual features |
15
- | UC-003 | Tooltip behavior and styling | Default tooltip; `containerTemplate`, `itemTemplate`; `g2Tooltip`, `g2TooltipList`, `g2TooltipListItem`; `tooltipData`; `showTooltip`/`tooltipDisable` on graphList item | Tooltip appears on hover with correct content and custom styles; can be disabled or fully custom per series | P0 | Tooltip | Grouped all tooltip props and behavior |
16
- | UC-004 | Content variants | Normal `data`; `data: []`; long data (many points) | Chart renders; empty data handled without crash; long data doesn’t break layout/performance | P1 | ContentVariants | Grouped normal/empty/long content |
17
- | UC-005 | Styling and chart config | `height`, `chartProps`, `guide.style` | Chart height and BizCharts options applied; guide text uses custom style | P2 | Styling | Grouped height + chartProps + guide style |
18
- | UC-006 | Axis configuration | `xAxisProps`, `yAxisProps`, `y1AxisProps` | Axis labels, ticks, and scale config applied for x, y, and optional y1 | P1 | AxisConfig | Grouped all axis prop overrides |
19
- | UC-007 | Coord and Guide | `coord` (e.g. polar); `showGuide` with `guide` (position, content, style) | Coord transforms chart (e.g. polar); guide text renders at given positions with content/style | P2 | CoordAndGuide | Grouped coord + guide usage |
20
- | UC-008 | Legend variants | `legend`: marker type (e.g. circle), position (e.g. bottom-center), title, spread `legendProps` | Legend renders with correct marker, position, and title | P1 | LegendVariants | Grouped legend options |
21
- | UC-009 | Geom types and options | `graphList`: type (line/bar/area/etc), `groupBy`, `colors`, `shape`; `showlabel` + `label` | Correct geometry and optional labels per series | P1 | GeomTypes | Grouped Geom type and label config |
22
- | UC-010 | Edge cases | `graphList: []`; omit optional props (use defaults); `data` with missing or partial keys for xAxis/yAxis | No crash; default height/empty graphList; graceful handling of malformed data | P0 | EdgeCases | Production-breaking only |
23
- | UC-011 | Tooltip template callback | `containerTemplate(tooltipData, tooltipIndex)` | Custom template receives current tooltipData and tooltipIndex (hovered point) | P2 | TooltipTemplate | Events/callbacks grouped |
24
- | UC-012 | Migration parity (v3 → v6) | Same props used in v3 and v6 (BizCharts/Chart) | Same visual and tooltip behavior after upgrade | P1 | MigrationParity | v3 vs v6 parity check |
25
-
26
- ---
27
-
28
- ## Summary
29
-
30
- - **Total**: 12 use cases (within medium limit of 20).
31
- - **P0**: UC-003 (Tooltip), UC-010 (Edge cases).
32
- - **P1**: UC-001, UC-002, UC-004, UC-006, UC-008, UC-009, UC-012.
33
- - **P2**: UC-005, UC-007, UC-011.
34
-
35
- ## Testing notes (from command)
36
-
37
- - Use **React Testing Library** with **Jest**.
38
- - Prefer `data-testid` for querying (add to CapGraph wrapper/container if needed).
39
- - Do **not** mock Cap UI Library components unless instructed.
40
- - Avoid `getByRole` for chart internals; query by testid or container.
41
- - Keep tests focused; merge scenarios to stay within limits.
42
-
43
- ---
44
-
45
- ## Google Sheets payload (for `GOOGLESHEETS_VALUES_UPDATE`)
46
-
47
- **Spreadsheet ID**: `1Xt8l8Q6Hw0cUYV65SlGvGcPnOtzprr0fukDR9UWJ3kg`
48
- **Range**: `CapGraph!A1`
49
-
50
- ```json
51
- [
52
- ["ID", "Use Case", "Props/Config", "Expected Visual/Behavior", "Priority", "Storybook Story", "Notes"],
53
- ["UC-001", "All core prop variants", "data, xAxis, yAxis, graphList (type, groupBy, colors, shape, showlabel, label), legend (marker, position, title), size, scale, height", "Chart renders with correct axes, series, legend, and dimensions", "P1", "PropVariants", "Grouped size, scale, legend, graphList config"],
54
- ["UC-002", "Visual states", "Default; showGuide + guide; coord; y1Axis + y1AxisProps; graphList: []", "Optional sections (guide, second axis, coord) show/hide; empty graphList renders chart shell without Geoms", "P1", "VisualStates", "Grouped optional visual features"],
55
- ["UC-003", "Tooltip behavior and styling", "Default tooltip; containerTemplate, itemTemplate; g2Tooltip, g2TooltipList, g2TooltipListItem; tooltipData; showTooltip/tooltipDisable on graphList item", "Tooltip appears on hover with correct content and custom styles; can be disabled or fully custom per series", "P0", "Tooltip", "Grouped all tooltip props and behavior"],
56
- ["UC-004", "Content variants", "Normal data; data: []; long data (many points)", "Chart renders; empty data handled without crash; long data doesn't break layout/performance", "P1", "ContentVariants", "Grouped normal/empty/long content"],
57
- ["UC-005", "Styling and chart config", "height, chartProps, guide.style", "Chart height and BizCharts options applied; guide text uses custom style", "P2", "Styling", "Grouped height + chartProps + guide style"],
58
- ["UC-006", "Axis configuration", "xAxisProps, yAxisProps, y1AxisProps", "Axis labels, ticks, and scale config applied for x, y, and optional y1", "P1", "AxisConfig", "Grouped all axis prop overrides"],
59
- ["UC-007", "Coord and Guide", "coord (e.g. polar); showGuide with guide (position, content, style)", "Coord transforms chart (e.g. polar); guide text renders at given positions with content/style", "P2", "CoordAndGuide", "Grouped coord + guide usage"],
60
- ["UC-008", "Legend variants", "legend: marker type (e.g. circle), position (e.g. bottom-center), title, spread legendProps", "Legend renders with correct marker, position, and title", "P1", "LegendVariants", "Grouped legend options"],
61
- ["UC-009", "Geom types and options", "graphList: type (line/bar/area/etc), groupBy, colors, shape; showlabel + label", "Correct geometry and optional labels per series", "P1", "GeomTypes", "Grouped Geom type and label config"],
62
- ["UC-010", "Edge cases", "graphList: []; omit optional props (use defaults); data with missing or partial keys for xAxis/yAxis", "No crash; default height/empty graphList; graceful handling of malformed data", "P0", "EdgeCases", "Production-breaking only"],
63
- ["UC-011", "Tooltip template callback", "containerTemplate(tooltipData, tooltipIndex)", "Custom template receives current tooltipData and tooltipIndex (hovered point)", "P2", "TooltipTemplate", "Events/callbacks grouped"],
64
- ["UC-012", "Migration parity (v3 → v6)", "Same props used in v3 and v6 (BizCharts/Chart)", "Same visual and tooltip behavior after upgrade", "P1", "MigrationParity", "v3 vs v6 parity check"]
65
- ]
66
- ```
@@ -1,10 +0,0 @@
1
- import type React from 'react';
2
- /** Default chart height in pixels (BizCharts expects number). */
3
- export declare const DEFAULT_HEIGHT = 400;
4
- /** Default G2 tooltip styles (rem-based, 14px = 1rem). */
5
- export declare const DEFAULT_TOOLTIP_STYLES: {
6
- g2Tooltip: React.CSSProperties;
7
- g2TooltipList: React.CSSProperties;
8
- g2TooltipListItem: React.CSSProperties;
9
- };
10
- //# sourceMappingURL=constants.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../components/CapGraph/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,iEAAiE;AACjE,eAAO,MAAM,cAAc,MAAM,CAAC;AAElC,0DAA0D;AAC1D,eAAO,MAAM,sBAAsB,EAAE;IACnC,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC;IAC/B,aAAa,EAAE,KAAK,CAAC,aAAa,CAAC;IACnC,iBAAiB,EAAE,KAAK,CAAC,aAAa,CAAC;CAqBxC,CAAC"}
@@ -1,9 +0,0 @@
1
- /**
2
- * CapGraph – chart component built on BizCharts (G2).
3
- */
4
- import React from 'react';
5
- import type { CapGraphProps } from './types';
6
- declare const CapGraph: React.FC<CapGraphProps>;
7
- export default CapGraph;
8
- export type { CapGraphProps } from './types';
9
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../components/CapGraph/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAgC,MAAM,OAAO,CAAC;AAIrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAS7C,QAAA,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAiHrC,CAAC;AAEF,eAAe,QAAQ,CAAC;AACxB,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC"}
@@ -1,55 +0,0 @@
1
- import type React from 'react';
2
- /** Legend configuration passed to BizCharts Legend */
3
- export interface CapGraphLegendConfig {
4
- marker?: string;
5
- position?: string;
6
- [key: string]: unknown;
7
- }
8
- /** Guide text item for showGuide */
9
- export interface CapGraphGuideItem {
10
- position?: string | [string, string];
11
- content?: string;
12
- [key: string]: unknown;
13
- }
14
- /** Single geometry (series) config in graphList */
15
- export interface CapGraphGeomItem {
16
- showTooltip?: boolean;
17
- tooltip?: unknown;
18
- tooltipDisable?: boolean;
19
- type: string;
20
- groupBy?: string;
21
- colors?: string | string[];
22
- shape?: string | string[];
23
- showlabel?: boolean;
24
- label?: Record<string, unknown>;
25
- [key: string]: unknown;
26
- }
27
- export interface CapGraphProps {
28
- height?: number;
29
- data: Array<Record<string, unknown>>;
30
- xAxis: string;
31
- yAxis: string;
32
- y1Axis?: string;
33
- y1AxisProps?: Record<string, unknown>;
34
- legend?: CapGraphLegendConfig;
35
- g2Tooltip?: React.CSSProperties;
36
- g2TooltipList?: React.CSSProperties;
37
- g2TooltipListItem?: React.CSSProperties;
38
- itemTemplate?: string;
39
- containerTemplate?: (tooltipData?: Record<string, unknown>, tooltipIndex?: number) => string;
40
- size?: number;
41
- scale?: Record<string, unknown>;
42
- tooltipData?: Record<string, unknown>;
43
- graphList?: CapGraphGeomItem[];
44
- yAxisProps?: Record<string, unknown>;
45
- xAxisProps?: Record<string, unknown>;
46
- chartProps?: Record<string, unknown>;
47
- title?: Record<string, unknown> | null;
48
- showGuide?: boolean;
49
- coord?: Record<string, unknown>;
50
- guide?: {
51
- style?: React.CSSProperties;
52
- [key: string]: unknown;
53
- };
54
- }
55
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../components/CapGraph/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,sDAAsD;AACtD,MAAM,WAAW,oBAAoB;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,oCAAoC;AACpC,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,mDAAmD;AACnD,MAAM,WAAW,gBAAgB;IAC/B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OA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