@univerjs-pro/chart-ui 1.0.0-alpha.8 → 1.0.0-beta.1

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.
Files changed (186) hide show
  1. package/lib/cjs/facade.js +1 -0
  2. package/lib/cjs/index.js +1 -1
  3. package/lib/cjs/locale/ar-SA.js +1 -1
  4. package/lib/cjs/locale/ca-ES.js +1 -1
  5. package/lib/cjs/locale/de-DE.js +1 -1
  6. package/lib/cjs/locale/en-US.js +1 -1
  7. package/lib/cjs/locale/es-ES.js +1 -1
  8. package/lib/cjs/locale/fa-IR.js +1 -1
  9. package/lib/cjs/locale/fr-FR.js +1 -1
  10. package/lib/cjs/locale/id-ID.js +1 -1
  11. package/lib/cjs/locale/it-IT.js +1 -1
  12. package/lib/cjs/locale/ja-JP.js +1 -1
  13. package/lib/cjs/locale/ko-KR.js +1 -1
  14. package/lib/cjs/locale/pl-PL.js +1 -1
  15. package/lib/cjs/locale/pt-BR.js +1 -1
  16. package/lib/cjs/locale/ru-RU.js +1 -1
  17. package/lib/cjs/locale/sk-SK.js +1 -1
  18. package/lib/cjs/locale/vi-VN.js +1 -1
  19. package/lib/cjs/locale/zh-CN.js +1 -1
  20. package/lib/cjs/locale/zh-HK.js +1 -1
  21. package/lib/cjs/locale/zh-TW.js +1 -1
  22. package/lib/es/facade.js +1 -0
  23. package/lib/es/index.js +1 -1
  24. package/lib/es/locale/ar-SA.js +1 -1
  25. package/lib/es/locale/ca-ES.js +1 -1
  26. package/lib/es/locale/de-DE.js +1 -1
  27. package/lib/es/locale/en-US.js +1 -1
  28. package/lib/es/locale/es-ES.js +1 -1
  29. package/lib/es/locale/fa-IR.js +1 -1
  30. package/lib/es/locale/fr-FR.js +1 -1
  31. package/lib/es/locale/id-ID.js +1 -1
  32. package/lib/es/locale/it-IT.js +1 -1
  33. package/lib/es/locale/ja-JP.js +1 -1
  34. package/lib/es/locale/ko-KR.js +1 -1
  35. package/lib/es/locale/pl-PL.js +1 -1
  36. package/lib/es/locale/pt-BR.js +1 -1
  37. package/lib/es/locale/ru-RU.js +1 -1
  38. package/lib/es/locale/sk-SK.js +1 -1
  39. package/lib/es/locale/vi-VN.js +1 -1
  40. package/lib/es/locale/zh-CN.js +1 -1
  41. package/lib/es/locale/zh-HK.js +1 -1
  42. package/lib/es/locale/zh-TW.js +1 -1
  43. package/lib/facade.js +1 -0
  44. package/lib/index.css +181 -25
  45. package/lib/index.js +1 -1
  46. package/lib/locale/ar-SA.js +1 -1
  47. package/lib/locale/ca-ES.js +1 -1
  48. package/lib/locale/de-DE.js +1 -1
  49. package/lib/locale/en-US.js +1 -1
  50. package/lib/locale/es-ES.js +1 -1
  51. package/lib/locale/fa-IR.js +1 -1
  52. package/lib/locale/fr-FR.js +1 -1
  53. package/lib/locale/id-ID.js +1 -1
  54. package/lib/locale/it-IT.js +1 -1
  55. package/lib/locale/ja-JP.js +1 -1
  56. package/lib/locale/ko-KR.js +1 -1
  57. package/lib/locale/pl-PL.js +1 -1
  58. package/lib/locale/pt-BR.js +1 -1
  59. package/lib/locale/ru-RU.js +1 -1
  60. package/lib/locale/sk-SK.js +1 -1
  61. package/lib/locale/vi-VN.js +1 -1
  62. package/lib/locale/zh-CN.js +1 -1
  63. package/lib/locale/zh-HK.js +1 -1
  64. package/lib/locale/zh-TW.js +1 -1
  65. package/lib/types/components/ChartEditPanel.d.ts +49 -0
  66. package/lib/types/components/ChartInlineTableEditor.d.ts +1 -1
  67. package/lib/types/components/ChartReferencedDataSourceEditor.d.ts +11 -0
  68. package/lib/types/components/ChartSemanticDataFields.d.ts +3 -3
  69. package/lib/types/components/ChartTypeOptions.d.ts +148 -2
  70. package/lib/types/components/FontFormatBar.d.ts +19 -1
  71. package/lib/types/components/chart-inline-starter-data.d.ts +16 -6
  72. package/lib/types/components/use-chart-panel-input-focus.d.ts +4 -0
  73. package/lib/types/controllers/components.controller.d.ts +4 -2
  74. package/lib/types/editor/ChartEditorProvider.d.ts +11 -0
  75. package/lib/types/editor/atoms/common/ChartFontAtom.d.ts +28 -0
  76. package/lib/types/editor/atoms/common/ChartNumberFormatAtom.d.ts +9 -0
  77. package/lib/types/editor/atoms/common/chart-number-format.d.ts +28 -0
  78. package/lib/types/editor/components/ChartCheckboxField.d.ts +11 -0
  79. package/lib/types/editor/components/ChartColorField.d.ts +14 -0
  80. package/lib/types/editor/components/ChartField.d.ts +15 -0
  81. package/lib/types/editor/components/ChartFieldGroup.d.ts +9 -0
  82. package/lib/types/editor/components/ChartFieldGroupTitle.d.ts +6 -0
  83. package/lib/types/editor/components/ChartFieldRow.d.ts +5 -0
  84. package/lib/types/editor/components/ChartFontField.d.ts +28 -0
  85. package/lib/types/editor/components/ChartImageSelectField.d.ts +13 -0
  86. package/lib/types/editor/components/ChartListField.d.ts +18 -0
  87. package/lib/types/editor/components/ChartMultiSelectField.d.ts +25 -0
  88. package/lib/types/editor/components/ChartNumberField.d.ts +16 -0
  89. package/lib/types/editor/components/ChartSelectField.d.ts +25 -0
  90. package/lib/types/editor/components/ChartTextField.d.ts +14 -0
  91. package/lib/types/editor/hooks/use-chart-config-state.d.ts +3 -0
  92. package/lib/types/editor/hooks/use-chart-data-mapping-fields.d.ts +5 -0
  93. package/lib/types/editor/hooks/use-chart-editor-model.d.ts +3 -0
  94. package/lib/types/editor/hooks/use-chart-runtime-context.d.ts +13 -0
  95. package/lib/types/editor/hooks/use-chart-type-state.d.ts +19 -0
  96. package/lib/types/editor/routing/chart-edit-panel-route.d.ts +21 -0
  97. package/lib/types/editor/sections/ChartAxisSections.d.ts +63 -0
  98. package/lib/types/editor/sections/ChartIndicatorLineSection.d.ts +20 -0
  99. package/lib/types/editor/sections/ChartLegendSection.d.ts +27 -0
  100. package/lib/types/editor/sections/ChartLineAndAreaSection.d.ts +11 -0
  101. package/lib/types/editor/sections/ChartParetoSeriesSection.d.ts +26 -0
  102. package/lib/types/editor/sections/ChartSeriesSection.d.ts +60 -0
  103. package/lib/types/editor/sections/ChartSetupSections.d.ts +21 -0
  104. package/lib/types/editor/sections/ChartStyleSection.d.ts +15 -0
  105. package/lib/types/editor/sections/ChartTitleSections.d.ts +50 -0
  106. package/lib/types/editor/sections/ChartTrendlineSection.d.ts +18 -0
  107. package/lib/types/editor/sections/chart-capabilities.d.ts +10 -0
  108. package/lib/types/editor/sections/chart-style-options.d.ts +86 -0
  109. package/lib/types/editor/sections/specific-section/ChartCandlestickStyleSection.d.ts +1 -0
  110. package/lib/types/editor/sections/specific-section/ChartFunnelStyleSection.d.ts +10 -0
  111. package/lib/types/editor/sections/specific-section/ChartHeatmapStyleSection.d.ts +10 -0
  112. package/lib/types/editor/sections/specific-section/ChartHistogramStyleSection.d.ts +1 -0
  113. package/lib/types/editor/sections/specific-section/ChartPieStyleSection.d.ts +21 -0
  114. package/lib/types/editor/sections/specific-section/ChartRadarStyleSection.d.ts +9 -0
  115. package/lib/types/editor/sections/specific-section/ChartRelationStyleSection.d.ts +17 -0
  116. package/lib/types/editor/sections/specific-section/ChartTreemapStyleSection.d.ts +1 -0
  117. package/lib/types/editor/sections/specific-section/ChartTypeSpecificSections.d.ts +9 -0
  118. package/lib/types/editor/sections/specific-section/ChartWaterfallStyleSection.d.ts +26 -0
  119. package/lib/types/editor/sections/specific-section/ChartWordCloudStyleSection.d.ts +21 -0
  120. package/lib/types/editor/sections/specific-section/ChordDataMappingAtom.d.ts +1 -0
  121. package/lib/types/editor/sections/specific-section/ChordLabelAtom.d.ts +1 -0
  122. package/lib/types/editor/sections/specific-section/ChordLayoutAtom.d.ts +1 -0
  123. package/lib/types/editor/sections/specific-section/ChordRibbonAtom.d.ts +1 -0
  124. package/lib/types/editor/sections/specific-section/GaugeDataMappingAtom.d.ts +1 -0
  125. package/lib/types/editor/sections/specific-section/GaugeModeAtom.d.ts +1 -0
  126. package/lib/types/editor/sections/specific-section/GaugePointerAtom.d.ts +1 -0
  127. package/lib/types/editor/sections/specific-section/GaugeProgressAtom.d.ts +1 -0
  128. package/lib/types/editor/sections/specific-section/GaugeRangesAtom.d.ts +1 -0
  129. package/lib/types/editor/sections/specific-section/GaugeScaleAtom.d.ts +1 -0
  130. package/lib/types/editor/sections/specific-section/SunburstCenterLabelAtom.d.ts +1 -0
  131. package/lib/types/editor/sections/specific-section/SunburstDataMappingAtom.d.ts +1 -0
  132. package/lib/types/editor/sections/specific-section/SunburstLabelAtom.d.ts +1 -0
  133. package/lib/types/editor/sections/specific-section/chord-field-options.d.ts +2 -0
  134. package/lib/types/editor/sections/specific-section/chord-style.d.ts +16 -0
  135. package/lib/types/editor/sections/specific-section/gauge-style.d.ts +10 -0
  136. package/lib/types/editor/sections/specific-section/sunburst-label.d.ts +8 -0
  137. package/lib/types/editor/utils/chart-runtime-axis.d.ts +3 -0
  138. package/lib/types/facade/f-chart.d.ts +19 -0
  139. package/lib/types/facade/index.d.ts +2 -0
  140. package/lib/types/float-menu/ChartElementFloatMenu.d.ts +2 -2
  141. package/lib/types/float-menu/chart-element-selection.d.ts +7 -0
  142. package/lib/types/float-menu/constants.d.ts +72 -91
  143. package/lib/types/float-menu/create-chart-element-float-menu-adapter.d.ts +10 -0
  144. package/lib/types/float-menu/pie-mark-patch.d.ts +8 -0
  145. package/lib/types/float-menu/types.d.ts +28 -9
  146. package/lib/types/index.d.ts +74 -3
  147. package/lib/types/locale/en-US.d.ts +487 -58
  148. package/lib/types/services/chart-host-adapter.d.ts +12 -0
  149. package/lib/types/services/chart-image-export.service.d.ts +26 -0
  150. package/lib/types/services/chart-referenced-data-source-binding.service.d.ts +13 -0
  151. package/lib/types/services/chart-snapshot-queue.d.ts +59 -0
  152. package/lib/types/services/chart-ui.service.d.ts +19 -0
  153. package/lib/types/services/chart-view-state-projector.d.ts +15 -0
  154. package/lib/types/services/chart-view-state-registry.d.ts +11 -0
  155. package/lib/types/services/chart-view-state.d.ts +118 -0
  156. package/lib/types/services/inline-chart-creation.d.ts +42 -0
  157. package/lib/types/services/register-chart-config-states.d.ts +3 -0
  158. package/lib/types/services/register-chart-view-states/chart-specific.d.ts +4 -0
  159. package/lib/types/services/register-chart-view-states/semantic.d.ts +4 -0
  160. package/lib/umd/facade.js +1 -0
  161. package/lib/umd/index.js +1 -1
  162. package/lib/umd/locale/ar-SA.js +1 -1
  163. package/lib/umd/locale/ca-ES.js +1 -1
  164. package/lib/umd/locale/de-DE.js +1 -1
  165. package/lib/umd/locale/en-US.js +1 -1
  166. package/lib/umd/locale/es-ES.js +1 -1
  167. package/lib/umd/locale/fa-IR.js +1 -1
  168. package/lib/umd/locale/fr-FR.js +1 -1
  169. package/lib/umd/locale/id-ID.js +1 -1
  170. package/lib/umd/locale/it-IT.js +1 -1
  171. package/lib/umd/locale/ja-JP.js +1 -1
  172. package/lib/umd/locale/ko-KR.js +1 -1
  173. package/lib/umd/locale/pl-PL.js +1 -1
  174. package/lib/umd/locale/pt-BR.js +1 -1
  175. package/lib/umd/locale/ru-RU.js +1 -1
  176. package/lib/umd/locale/sk-SK.js +1 -1
  177. package/lib/umd/locale/vi-VN.js +1 -1
  178. package/lib/umd/locale/zh-CN.js +1 -1
  179. package/lib/umd/locale/zh-HK.js +1 -1
  180. package/lib/umd/locale/zh-TW.js +1 -1
  181. package/package.json +25 -9
  182. package/lib/types/components/ChartEditPanelScaffold.d.ts +0 -32
  183. package/lib/types/components/ChartEditorFields.d.ts +0 -68
  184. package/lib/types/components/ChartPresentationFields.d.ts +0 -9
  185. package/lib/types/components/index.d.ts +0 -19
  186. package/lib/types/float-menu/index.d.ts +0 -5
@@ -0,0 +1,17 @@
1
+ import type { LinePointShape } from '@univerjs-pro/engine-chart';
2
+ import { RelationChartLayoutEnum } from '@univerjs-pro/engine-chart';
3
+ export interface IChartRelationDefaultValues {
4
+ circularLabelRotation: boolean;
5
+ emphasisEnabled: boolean;
6
+ force: {
7
+ gravity: number;
8
+ repulsion: number;
9
+ };
10
+ layout: RelationChartLayoutEnum;
11
+ nodeShape: LinePointShape;
12
+ useValueAsSymbolSize: boolean;
13
+ }
14
+ export declare const DEFAULT_CHART_RELATION_VALUES: IChartRelationDefaultValues;
15
+ export declare function ChartRelationStyleSection(props: {
16
+ defaultValues: IChartRelationDefaultValues;
17
+ }): import("react").JSX.Element | null;
@@ -0,0 +1 @@
1
+ export declare function ChartTreemapStyleSection(): import("react").JSX.Element | null;
@@ -0,0 +1,9 @@
1
+ import type { ReactNode } from 'react';
2
+ export declare function ChartTypeSpecificDataSection(): import("react").JSX.Element | null;
3
+ export declare function ChartTypeSpecificSetupSection(): import("react").JSX.Element | null;
4
+ export interface IChartCommonDataMappingSectionProps {
5
+ categoryToggleLabel?: string;
6
+ orientationControl?: ReactNode;
7
+ }
8
+ export declare function ChartCommonDataMappingSection(props: IChartCommonDataMappingSectionProps): import("react").JSX.Element | null;
9
+ export declare function ChartTypeSpecificStyleSection(): import("react").JSX.Element | null;
@@ -0,0 +1,26 @@
1
+ import type { ChartNumberFormatFieldComponent } from '../../atoms/common/ChartNumberFormatAtom';
2
+ import { ChartBorderDashType, ChartWaterfallStyleTarget, LabelContentType, SeriesLabelPosition } from '@univerjs-pro/engine-chart';
3
+ export interface IChartWaterfallStyleDefaultValues {
4
+ borderDashType: ChartBorderDashType;
5
+ borderOpacity: number;
6
+ borderWidth: number;
7
+ connector: boolean;
8
+ fillOpacity: number;
9
+ labelContentType: LabelContentType;
10
+ labelPosition: SeriesLabelPosition;
11
+ labelVisible: boolean;
12
+ textColor: string;
13
+ }
14
+ export declare const DEFAULT_CHART_WATERFALL_STYLE_VALUES: IChartWaterfallStyleDefaultValues;
15
+ export interface IChartWaterfallBucketNameContext {
16
+ isAllSeries: boolean;
17
+ seriesName: string;
18
+ target: ChartWaterfallStyleTarget;
19
+ }
20
+ export declare function ChartWaterfallStyleSection(props: {
21
+ defaultValues: IChartWaterfallStyleDefaultValues;
22
+ getDefaultBucketName?: (context: IChartWaterfallBucketNameContext) => string;
23
+ NumberFormatField?: ChartNumberFormatFieldComponent;
24
+ selectedSeriesId?: string;
25
+ showBucketName?: (context: IChartWaterfallBucketNameContext) => boolean;
26
+ }): import("react").JSX.Element | null;
@@ -0,0 +1,21 @@
1
+ import type { ReactNode } from 'react';
2
+ import { WordCloudShapeEnum } from '@univerjs-pro/engine-chart';
3
+ export declare function ChartWordCloudRoot(props: {
4
+ children: ReactNode;
5
+ }): import("react").JSX.Element | null;
6
+ export interface IChartWordCloudDefaultValues {
7
+ repeat: boolean;
8
+ shape: WordCloudShapeEnum;
9
+ }
10
+ export declare const DEFAULT_CHART_WORD_CLOUD_VALUES: IChartWordCloudDefaultValues;
11
+ export declare function ChartWordCloudShapeField(props: {
12
+ defaultValues: IChartWordCloudDefaultValues;
13
+ }): import("react").JSX.Element;
14
+ export declare function ChartWordCloudMaskImageField(): import("react").JSX.Element;
15
+ export declare function ChartWordCloudMaskImageIdField(): import("react").JSX.Element;
16
+ export declare function ChartWordCloudRepeatField(props: {
17
+ defaultValues: IChartWordCloudDefaultValues;
18
+ }): import("react").JSX.Element;
19
+ export declare function ChartWordCloudStyleSection(props: {
20
+ defaultValues: IChartWordCloudDefaultValues;
21
+ }): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function ChordDataMappingAtom(): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function ChordLabelAtom(): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function ChordLayoutAtom(): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function ChordRibbonAtom(): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function GaugeDataMappingAtom(): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function GaugeModeAtom(): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function GaugePointerAtom(): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function GaugeProgressAtom(): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function GaugeRangesAtom(): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function GaugeRangeScaleAtom(): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function SunburstCenterLabelAtom(): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function SunburstDataMappingAtom(): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function SunburstLabelAtom(): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { IChartEditorOption } from '../../../services/chart-view-state';
2
+ export declare function getChordFieldOptions(fields: IChartEditorOption[], excludedIndexes: Array<number | undefined>): IChartEditorOption[];
@@ -0,0 +1,16 @@
1
+ import type { DeepNullish, IChartChordSpec } from '@univerjs-pro/engine-chart';
2
+ /** Shared numeric constraints for Chord ratio fields. */
3
+ export declare const CHORD_RATIO_FIELD_CONSTRAINTS: {
4
+ readonly min: 0;
5
+ readonly max: 1;
6
+ readonly precision: 2;
7
+ readonly step: 0.01;
8
+ };
9
+ export declare const CHORD_OPACITY_FIELD_CONSTRAINTS: {
10
+ readonly min: 0;
11
+ readonly max: 1;
12
+ readonly precision: 2;
13
+ readonly step: 0.05;
14
+ };
15
+ export declare function resolveEffectiveChordStyle(style: DeepNullish<IChartChordSpec> | undefined): IChartChordSpec;
16
+ export declare function hasInvalidChordRadii(style: DeepNullish<IChartChordSpec> | undefined): boolean;
@@ -0,0 +1,10 @@
1
+ import type { DeepNullish, IChartGaugeRangeSpec, IChartGaugeSpec } from '@univerjs-pro/engine-chart';
2
+ /** Resolves nullable editor patches against the canonical Gauge defaults. */
3
+ export declare function resolveEffectiveGaugeStyle(style: DeepNullish<IChartGaugeSpec> | undefined): IChartGaugeSpec;
4
+ export declare function mergeGaugeStylePatch(style: DeepNullish<IChartGaugeSpec> | undefined, patch: DeepNullish<IChartGaugeSpec>): DeepNullish<IChartGaugeSpec>;
5
+ export declare function areGaugeScaleBoundsValid(scale: DeepNullish<IChartGaugeSpec['scale']>): scale is NonNullable<IChartGaugeSpec['scale']> & {
6
+ min: number;
7
+ max: number;
8
+ };
9
+ export declare function areGaugeRangesValid(ranges: readonly IChartGaugeRangeSpec[], scale: DeepNullish<IChartGaugeSpec['scale']>): boolean;
10
+ export declare function createNextGaugeRange(style: DeepNullish<IChartGaugeSpec> | undefined): IChartGaugeRangeSpec | undefined;
@@ -0,0 +1,8 @@
1
+ import type { DeepNullish, IChartSunburstCenterLabelSpec, IChartSunburstLabelSpec, IChartSunburstSpec } from '@univerjs-pro/engine-chart';
2
+ import { LabelContentType } from '@univerjs-pro/engine-chart';
3
+ /** Authored label content options supported by Sunburst. */
4
+ export declare const SUNBURST_LABEL_CONTENT_TYPES: readonly [LabelContentType.CategoryName, LabelContentType.Value];
5
+ export declare function resolveEffectiveSunburstLabel(style: DeepNullish<IChartSunburstSpec> | undefined): IChartSunburstLabelSpec;
6
+ export declare function resolveEffectiveSunburstCenterLabel(style: DeepNullish<IChartSunburstSpec> | undefined): IChartSunburstCenterLabelSpec;
7
+ export declare function getSunburstLabelContentValues(contentType: LabelContentType | null | undefined): string[];
8
+ export declare function mergeSunburstLabelContentTypes(values: string[]): LabelContentType | undefined;
@@ -0,0 +1,3 @@
1
+ import type { ChartDirection, IChartAxesSpec, IRuntimeAxis } from '@univerjs-pro/engine-chart';
2
+ export type ChartAxisKey = keyof IChartAxesSpec;
3
+ export declare function getChartEditorRuntimeAxis(runtimeAxes: IRuntimeAxis[], direction: ChartDirection, axis: ChartAxisKey): IRuntimeAxis | undefined;
@@ -0,0 +1,19 @@
1
+ import { FChart } from '@univerjs-pro/engine-chart/facade';
2
+ export interface IFChartUIMixin<TChart = FChart<never>> {
3
+ /**
4
+ * Exports this Chart through its host UI renderer.
5
+ * @returns {Promise<string | undefined>} The rendered image data URL, or `undefined` when the host has no exportable UI image.
6
+ * @example
7
+ * ```ts
8
+ * const fWorkbook = univerAPI.getActiveWorkbook();
9
+ * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
10
+ * const image = await fWorksheet.getCharts()[0]?.exportImage();
11
+ * console.log(image);
12
+ * ```
13
+ */
14
+ exportImage(this: TChart): Promise<string | undefined>;
15
+ }
16
+ declare module '@univerjs-pro/engine-chart/facade' {
17
+ interface FChart<TSource, TDataSource, TInfo, TExtension> extends IFChartUIMixin<FChart<TSource, TDataSource, TInfo, TExtension>> {
18
+ }
19
+ }
@@ -0,0 +1,2 @@
1
+ import './f-chart';
2
+ export type { IFChartUIMixin } from './f-chart';
@@ -1,7 +1,7 @@
1
1
  import type { ReactElement } from 'react';
2
- import type { IChartElementFloatMenuExtraProps } from './types';
2
+ import type { IChartElementFloatMenuContext } from './types';
3
3
  export declare function ChartElementFloatMenu(props: {
4
4
  popup: {
5
- extraProps?: IChartElementFloatMenuExtraProps;
5
+ extraProps?: IChartElementFloatMenuContext;
6
6
  };
7
7
  }): ReactElement | null;
@@ -0,0 +1,7 @@
1
+ import type { ChartModel, IChartElementHit } from '@univerjs-pro/engine-chart';
2
+ import type { ChartElementConfigTarget } from './types';
3
+ export interface IChartElementSelection {
4
+ target: ChartElementConfigTarget;
5
+ showFloatMenu: boolean;
6
+ }
7
+ export declare function resolveChartElementSelection(chartModel: ChartModel, hit: IChartElementHit): IChartElementSelection | undefined;
@@ -1,4 +1,5 @@
1
1
  import { AxisAlignEnum, LegendPositionEnum, PieLabelPosition, SelectModeEnum, TitlePositionEnum } from '@univerjs-pro/engine-chart';
2
+ import { ChartViewStateKey } from '../services/chart-view-state';
2
3
  export declare const CHART_ELEMENT_FLOAT_MENU_COMPONENT = "chart.element.float-menu";
3
4
  export declare const CHART_ELEMENT_FLOAT_MENU_OFFSET: [number, number];
4
5
  export declare const CHART_ELEMENT_FLOAT_MENU_EMPTY_VALUE = "";
@@ -10,189 +11,169 @@ export declare const CHART_ELEMENT_FLOAT_MENU_VISUAL_MAP_TYPES: {
10
11
  readonly PIECEWISE: "piecewise";
11
12
  };
12
13
  export declare const CHART_ELEMENT_FLOAT_MENU_STATE_KEYS: {
13
- readonly TITLES: "titles";
14
- readonly TITLE_POSITION: "titlePosition";
15
- readonly LEGEND_STYLE: "legendStyle";
16
- readonly PIE_BORDER_COLOR: "pieBorderColor";
17
- readonly PIE_LABEL_STYLE: "pieLabelStyle";
18
- readonly SERIES_STYLE_MAP: "seriesStyleMap";
19
- readonly PARETO_STYLE: "paretoStyle";
20
- readonly VISUAL_MAP_TYPE: "visualMapType";
21
- readonly USE_DATE_AXIS: "useDateAxis";
22
- readonly X_AXIS_OPTIONS: "xAxisOptions";
23
- readonly Y_AXIS_OPTIONS: "yAxisOptions";
24
- readonly RIGHT_Y_AXIS_OPTIONS: "rightYAxisOptions";
25
- readonly RUNTIME_AXES: "runtimeAxes";
26
- };
27
- export declare const CHART_ELEMENT_FLOAT_MENU_CLASS_NAMES: {
28
- readonly ROOT: "\n univer-inline-flex univer-h-fit univer-w-fit univer-max-w-[760px] univer-flex-col univer-items-start\n univer-gap-1.5 univer-rounded-md univer-bg-white univer-px-3 univer-py-2\n univer-text-sm univer-text-gray-900\n univer-shadow-md\n dark:!univer-bg-gray-900 dark:!univer-text-white\n ";
29
- readonly TITLE: "\n univer-whitespace-nowrap univer-text-sm univer-font-medium univer-text-gray-900\n dark:!univer-text-gray-100\n ";
30
- readonly BODY: "univer-inline-flex univer-w-max univer-flex-col univer-items-start univer-gap-1.5";
31
- readonly ROW: "univer-flex univer-w-max univer-items-center univer-gap-2";
32
- readonly ROW_FULL: "univer-w-full";
33
- readonly CONTROL_WRAPPER: "univer-w-36 univer-shrink-0";
34
- readonly MARK_COLOR_WRAPPER: "univer-w-8";
35
- readonly INLINE_FONT_CONTROLS: "univer-inline-flex univer-w-max univer-items-center univer-gap-1.5";
36
- readonly PANEL_SELECT: "!univer-h-8 univer-w-full univer-text-sm";
37
- readonly MULTIPLE_SELECT_WRAPPER: "univer-w-52";
38
- readonly TEXT_INPUT: "!univer-h-7 !univer-w-full";
39
- readonly NUMBER_INPUT: "!univer-h-7 univer-w-20";
14
+ readonly TITLE: ChartViewStateKey.Title;
15
+ readonly SUBTITLE: ChartViewStateKey.Subtitle;
16
+ readonly LEGEND: ChartViewStateKey.Legend;
17
+ readonly PIE: ChartViewStateKey.Pie;
18
+ readonly SERIES: ChartViewStateKey.Series;
19
+ readonly PARETO: ChartViewStateKey.Pareto;
20
+ readonly AXES: ChartViewStateKey.Axes;
40
21
  };
41
22
  export declare const CHART_ELEMENT_FLOAT_MENU_LOCALE_KEYS: {
42
23
  readonly MENU_TITLE: {
43
24
  readonly CHART: "chart-ui.floatMenu.menuTitle.chart";
44
- readonly CHART_TITLE: "chart-ui.floatMenu.menuTitle.chartTitle";
45
- readonly SUBTITLE: "chart-ui.floatMenu.menuTitle.subtitle";
25
+ readonly CHART_TITLE: "chart-ui.common.chartTitle";
26
+ readonly SUBTITLE: "chart-ui.common.subtitle";
46
27
  readonly AXIS_TITLE: "chart-ui.floatMenu.menuTitle.axisTitle";
47
- readonly LEGEND: "chart-ui.floatMenu.menuTitle.legend";
48
- readonly HORIZONTAL_AXIS: "chart-ui.floatMenu.menuTitle.horizontalAxis";
49
- readonly VERTICAL_AXIS: "chart-ui.floatMenu.menuTitle.verticalAxis";
50
- readonly RIGHT_VERTICAL_AXIS: "chart-ui.floatMenu.menuTitle.rightVerticalAxis";
28
+ readonly LEGEND: "chart-ui.common.legend";
29
+ readonly HORIZONTAL_AXIS: "chart-ui.common.horizontalAxis";
30
+ readonly VERTICAL_AXIS: "chart-ui.common.verticalAxis";
31
+ readonly RIGHT_VERTICAL_AXIS: "chart-ui.common.rightVerticalAxis";
51
32
  readonly GRIDLINE: "chart-ui.floatMenu.menuTitle.gridline";
52
33
  readonly TICK: "chart-ui.floatMenu.menuTitle.tick";
53
34
  readonly MARK: "chart-ui.floatMenu.menuTitle.mark";
54
- readonly SERIES: "chart-ui.floatMenu.menuTitle.series";
55
- readonly DATA_POINT: "chart-ui.floatMenu.menuTitle.dataPoint";
35
+ readonly SERIES: "chart-ui.common.series";
36
+ readonly DATA_POINT: "chart-ui.common.dataPoint";
56
37
  readonly DATA_LABEL: "chart-ui.floatMenu.menuTitle.dataLabel";
57
38
  };
58
39
  readonly FIELD: {
59
- readonly TITLE: "chart-ui.floatMenu.field.title";
60
- readonly SUBTITLE: "chart-ui.floatMenu.field.subtitle";
40
+ readonly TITLE: "chart-ui.common.title";
41
+ readonly SUBTITLE: "chart-ui.common.subtitle";
61
42
  readonly POSITION: "chart-ui.floatMenu.field.position";
62
43
  readonly SIZE: "chart-ui.floatMenu.field.size";
63
44
  readonly ALIGN: "chart-ui.floatMenu.field.align";
64
- readonly MODE: "chart-ui.floatMenu.field.mode";
45
+ readonly MODE: "chart-ui.common.mode";
65
46
  readonly MAP: "chart-ui.floatMenu.field.map";
66
47
  readonly ROTATE: "chart-ui.floatMenu.field.rotate";
67
- readonly MIN: "chart-ui.floatMenu.field.min";
68
- readonly MAX: "chart-ui.floatMenu.field.max";
69
- readonly COLOR: "chart-ui.floatMenu.field.color";
70
- readonly BORDER_COLOR: "chart-ui.floatMenu.field.borderColor";
71
- readonly OPACITY: "chart-ui.floatMenu.field.opacity";
72
- readonly LABEL_POSITION: "chart-ui.floatMenu.field.labelPosition";
48
+ readonly MIN: "chart-ui.common.min";
49
+ readonly MAX: "chart-ui.common.max";
50
+ readonly COLOR: "chart-ui.common.color";
51
+ readonly BORDER_COLOR: "chart-ui.common.borderColor";
52
+ readonly OPACITY: "chart-ui.common.opacity";
53
+ readonly LABEL_POSITION: "chart-ui.common.labelPosition";
73
54
  readonly LABEL_TEXT: "chart-ui.floatMenu.field.labelText";
74
55
  readonly TITLE_TEXT: "chart-ui.floatMenu.field.titleText";
75
56
  };
76
57
  readonly ACTION: {
77
58
  readonly MORE: "chart-ui.floatMenu.action.more";
78
- readonly BOLD: "chart-ui.floatMenu.action.bold";
79
- readonly ITALIC: "chart-ui.floatMenu.action.italic";
59
+ readonly BOLD: "chart-ui.common.bold";
60
+ readonly ITALIC: "chart-ui.common.italic";
80
61
  };
81
62
  readonly CONTROL: {
82
63
  readonly LABELS: "chart-ui.floatMenu.control.labels";
83
64
  readonly LINE: "chart-ui.floatMenu.control.line";
84
65
  readonly REVERSE: "chart-ui.floatMenu.control.reverse";
85
- readonly DATE: "chart-ui.floatMenu.control.date";
66
+ readonly DATE: "chart-ui.common.date";
86
67
  };
87
68
  readonly OPTION: {
88
69
  readonly TEXT_ALIGN: {
89
- readonly LEFT: "chart-ui.floatMenu.option.textAlign.left";
90
- readonly CENTER: "chart-ui.floatMenu.option.textAlign.center";
91
- readonly RIGHT: "chart-ui.floatMenu.option.textAlign.right";
70
+ readonly LEFT: "chart-ui.common.textAlign.left";
71
+ readonly CENTER: "chart-ui.common.textAlign.center";
72
+ readonly RIGHT: "chart-ui.common.textAlign.right";
92
73
  };
93
74
  readonly POSITION: {
94
- readonly TOP: "chart-ui.floatMenu.option.position.top";
95
- readonly BOTTOM: "chart-ui.floatMenu.option.position.bottom";
96
- readonly LEFT: "chart-ui.floatMenu.option.position.left";
97
- readonly RIGHT: "chart-ui.floatMenu.option.position.right";
98
- readonly HIDE: "chart-ui.floatMenu.option.position.hide";
99
- readonly INSIDE: "chart-ui.floatMenu.option.position.inside";
100
- readonly OUTSIDE: "chart-ui.floatMenu.option.position.outside";
75
+ readonly TOP: "chart-ui.common.position.top";
76
+ readonly BOTTOM: "chart-ui.common.position.bottom";
77
+ readonly LEFT: "chart-ui.common.position.left";
78
+ readonly RIGHT: "chart-ui.common.position.right";
79
+ readonly HIDE: "chart-ui.common.position.hide";
80
+ readonly INSIDE: "chart-ui.common.position.inside";
81
+ readonly OUTSIDE: "chart-ui.common.position.outside";
101
82
  };
102
83
  readonly LABEL_TEXT: {
103
- readonly CATEGORY: "chart-ui.floatMenu.option.labelText.category";
104
- readonly VALUE: "chart-ui.floatMenu.option.labelText.value";
105
- readonly PERCENTAGE: "chart-ui.floatMenu.option.labelText.percentage";
84
+ readonly CATEGORY: "chart-ui.common.category";
85
+ readonly VALUE: "chart-ui.common.value";
86
+ readonly PERCENTAGE: "chart-ui.common.percentage";
106
87
  };
107
88
  readonly AXIS_ALIGN: {
108
- readonly START: "chart-ui.floatMenu.option.axisAlign.start";
109
- readonly CENTER: "chart-ui.floatMenu.option.axisAlign.center";
110
- readonly END: "chart-ui.floatMenu.option.axisAlign.end";
89
+ readonly START: "chart-ui.common.axisAlign.start";
90
+ readonly CENTER: "chart-ui.common.axisAlign.center";
91
+ readonly END: "chart-ui.common.axisAlign.end";
111
92
  };
112
93
  readonly LEGEND_SELECT_MODE: {
113
- readonly SINGLE: "chart-ui.floatMenu.option.legendSelectMode.single";
114
- readonly MULTIPLE: "chart-ui.floatMenu.option.legendSelectMode.multiple";
115
- readonly CLOSE: "chart-ui.floatMenu.option.legendSelectMode.close";
94
+ readonly SINGLE: "chart-ui.common.legendSelectMode.single";
95
+ readonly MULTIPLE: "chart-ui.common.legendSelectMode.multiple";
96
+ readonly CLOSE: "chart-ui.common.legendSelectMode.disabled";
116
97
  };
117
98
  readonly VISUAL_MAP_TYPE: {
118
- readonly CONTINUOUS: "chart-ui.floatMenu.option.visualMapType.continuous";
119
- readonly PIECEWISE: "chart-ui.floatMenu.option.visualMapType.piecewise";
99
+ readonly CONTINUOUS: "chart-ui.common.visualMapType.continuous";
100
+ readonly PIECEWISE: "chart-ui.common.visualMapType.piecewise";
120
101
  };
121
102
  };
122
103
  };
123
104
  export declare const CHART_ELEMENT_FLOAT_MENU_TITLE_POSITION_OPTION_DEFINITIONS: readonly [{
124
- readonly labelKey: "chart-ui.floatMenu.option.position.top";
105
+ readonly labelKey: "chart-ui.common.position.top";
125
106
  readonly value: TitlePositionEnum.Top;
126
107
  }, {
127
- readonly labelKey: "chart-ui.floatMenu.option.position.bottom";
108
+ readonly labelKey: "chart-ui.common.position.bottom";
128
109
  readonly value: TitlePositionEnum.Bottom;
129
110
  }, {
130
- readonly labelKey: "chart-ui.floatMenu.option.position.left";
111
+ readonly labelKey: "chart-ui.common.position.left";
131
112
  readonly value: TitlePositionEnum.Left;
132
113
  }, {
133
- readonly labelKey: "chart-ui.floatMenu.option.position.right";
114
+ readonly labelKey: "chart-ui.common.position.right";
134
115
  readonly value: TitlePositionEnum.Right;
135
116
  }, {
136
- readonly labelKey: "chart-ui.floatMenu.option.position.hide";
117
+ readonly labelKey: "chart-ui.common.position.hide";
137
118
  readonly value: TitlePositionEnum.Hide;
138
119
  }];
139
120
  export declare const CHART_ELEMENT_FLOAT_MENU_PIE_LABEL_POSITION_OPTION_DEFINITIONS: readonly [{
140
- readonly labelKey: "chart-ui.floatMenu.option.position.inside";
121
+ readonly labelKey: "chart-ui.common.position.inside";
141
122
  readonly value: PieLabelPosition.Inside;
142
123
  }, {
143
- readonly labelKey: "chart-ui.floatMenu.option.position.outside";
124
+ readonly labelKey: "chart-ui.common.position.outside";
144
125
  readonly value: PieLabelPosition.Outside;
145
126
  }];
146
127
  export declare const CHART_ELEMENT_FLOAT_MENU_PIE_LABEL_TEXT_OPTION_DEFINITIONS: readonly [{
147
- readonly labelKey: "chart-ui.floatMenu.option.labelText.category";
128
+ readonly labelKey: "chart-ui.common.category";
148
129
  readonly value: string;
149
130
  }, {
150
- readonly labelKey: "chart-ui.floatMenu.option.labelText.value";
131
+ readonly labelKey: "chart-ui.common.value";
151
132
  readonly value: string;
152
133
  }, {
153
- readonly labelKey: "chart-ui.floatMenu.option.labelText.percentage";
134
+ readonly labelKey: "chart-ui.common.percentage";
154
135
  readonly value: string;
155
136
  }];
156
137
  export declare const CHART_ELEMENT_FLOAT_MENU_AXIS_TITLE_ALIGN_OPTION_DEFINITIONS: readonly [{
157
- readonly labelKey: "chart-ui.floatMenu.option.axisAlign.start";
138
+ readonly labelKey: "chart-ui.common.axisAlign.start";
158
139
  readonly value: AxisAlignEnum.Start;
159
140
  }, {
160
- readonly labelKey: "chart-ui.floatMenu.option.axisAlign.center";
141
+ readonly labelKey: "chart-ui.common.axisAlign.center";
161
142
  readonly value: AxisAlignEnum.Center;
162
143
  }, {
163
- readonly labelKey: "chart-ui.floatMenu.option.axisAlign.end";
144
+ readonly labelKey: "chart-ui.common.axisAlign.end";
164
145
  readonly value: AxisAlignEnum.End;
165
146
  }];
166
147
  export declare const CHART_ELEMENT_FLOAT_MENU_LEGEND_POSITION_OPTION_DEFINITIONS: readonly [{
167
- readonly labelKey: "chart-ui.floatMenu.option.position.top";
148
+ readonly labelKey: "chart-ui.common.position.top";
168
149
  readonly value: LegendPositionEnum.Top;
169
150
  }, {
170
- readonly labelKey: "chart-ui.floatMenu.option.position.bottom";
151
+ readonly labelKey: "chart-ui.common.position.bottom";
171
152
  readonly value: LegendPositionEnum.Bottom;
172
153
  }, {
173
- readonly labelKey: "chart-ui.floatMenu.option.position.left";
154
+ readonly labelKey: "chart-ui.common.position.left";
174
155
  readonly value: LegendPositionEnum.Left;
175
156
  }, {
176
- readonly labelKey: "chart-ui.floatMenu.option.position.right";
157
+ readonly labelKey: "chart-ui.common.position.right";
177
158
  readonly value: LegendPositionEnum.Right;
178
159
  }, {
179
- readonly labelKey: "chart-ui.floatMenu.option.position.hide";
160
+ readonly labelKey: "chart-ui.common.position.hide";
180
161
  readonly value: LegendPositionEnum.Hide;
181
162
  }];
182
163
  export declare const CHART_ELEMENT_FLOAT_MENU_LEGEND_SELECT_MODE_OPTION_DEFINITIONS: readonly [{
183
- readonly labelKey: "chart-ui.floatMenu.option.legendSelectMode.single";
164
+ readonly labelKey: "chart-ui.common.legendSelectMode.single";
184
165
  readonly value: SelectModeEnum.Single;
185
166
  }, {
186
- readonly labelKey: "chart-ui.floatMenu.option.legendSelectMode.multiple";
167
+ readonly labelKey: "chart-ui.common.legendSelectMode.multiple";
187
168
  readonly value: SelectModeEnum.Multiple;
188
169
  }, {
189
- readonly labelKey: "chart-ui.floatMenu.option.legendSelectMode.close";
170
+ readonly labelKey: "chart-ui.common.legendSelectMode.disabled";
190
171
  readonly value: SelectModeEnum.Close;
191
172
  }];
192
173
  export declare const CHART_ELEMENT_FLOAT_MENU_VISUAL_MAP_TYPE_OPTION_DEFINITIONS: readonly [{
193
- readonly labelKey: "chart-ui.floatMenu.option.visualMapType.continuous";
174
+ readonly labelKey: "chart-ui.common.visualMapType.continuous";
194
175
  readonly value: "continuous";
195
176
  }, {
196
- readonly labelKey: "chart-ui.floatMenu.option.visualMapType.piecewise";
177
+ readonly labelKey: "chart-ui.common.visualMapType.piecewise";
197
178
  readonly value: "piecewise";
198
179
  }];
@@ -0,0 +1,10 @@
1
+ import type { IChartHostAdapter } from '../services/chart-host-adapter';
2
+ import type { IChartUIService } from '../services/chart-ui.service';
3
+ import type { IChartElementFloatMenuAdapter, IChartElementFloatMenuContext } from './types';
4
+ export interface ICreateChartElementFloatMenuAdapterOptions {
5
+ chartUIService: IChartUIService;
6
+ getHostAdapter(context: IChartElementFloatMenuContext): IChartHostAdapter | undefined;
7
+ close?(): void;
8
+ openFullPanel?(context: IChartElementFloatMenuContext): void;
9
+ }
10
+ export declare function createChartElementFloatMenuAdapter(options: ICreateChartElementFloatMenuAdapterOptions): IChartElementFloatMenuAdapter;
@@ -0,0 +1,8 @@
1
+ import type { ChartPendingConfig } from '@univerjs-pro/engine-chart';
2
+ import type { ChartMarkDirectEditTarget } from './types';
3
+ export interface IPieDirectStylePatch {
4
+ color?: string | null;
5
+ fillOpacity?: number;
6
+ }
7
+ export declare function buildPieDirectStylePatch(pie: ChartPendingConfig['pie'] | undefined, directEdit: ChartMarkDirectEditTarget | undefined, patch: IPieDirectStylePatch): ChartPendingConfig['pie'] | undefined;
8
+ export declare function buildPieConnectorPatch(pie: ChartPendingConfig['pie'] | undefined, patch: NonNullable<NonNullable<NonNullable<ChartPendingConfig['pie']>['composite']>['secondaryPlot']>['connector']): ChartPendingConfig['pie'];
@@ -1,9 +1,12 @@
1
1
  import type { IChartElementHit, ParetoSeriesPart, WaterfallSeriesTypeEnum } from '@univerjs-pro/engine-chart';
2
2
  import type { IDisposable } from '@univerjs/core';
3
- import type { CHART_ELEMENT_FLOAT_MENU_STATE_KEYS } from './constants';
3
+ import type { ChartViewStateName } from '../services/chart-view-state';
4
4
  export declare enum ChartMarkDirectEditKind {
5
5
  SeriesStyle = "seriesStyle",
6
6
  PieStyle = "pieStyle",
7
+ PieSliceStyle = "pieSliceStyle",
8
+ PieAggregateStyle = "pieAggregateStyle",
9
+ PieConnectorStyle = "pieConnectorStyle",
7
10
  ParetoStyle = "paretoStyle",
8
11
  WaterfallStyle = "waterfallStyle"
9
12
  }
@@ -22,6 +25,13 @@ export type ChartMarkDirectEditTarget = {
22
25
  seriesIndex: number;
23
26
  } | {
24
27
  kind: `${ChartMarkDirectEditKind.PieStyle}`;
28
+ } | {
29
+ kind: `${ChartMarkDirectEditKind.PieSliceStyle}`;
30
+ sourcePointIndex: number;
31
+ } | {
32
+ kind: `${ChartMarkDirectEditKind.PieAggregateStyle}`;
33
+ } | {
34
+ kind: `${ChartMarkDirectEditKind.PieConnectorStyle}`;
25
35
  } | {
26
36
  kind: `${ChartMarkDirectEditKind.ParetoStyle}`;
27
37
  part: `${ParetoSeriesPart}`;
@@ -49,7 +59,20 @@ export declare enum ChartEditPanelSection {
49
59
  ParetoLineSeries = "paretoLineSeries",
50
60
  WaterfallSeries = "waterfallSeries",
51
61
  Relation = "relation",
52
- WordCloud = "wordCloud"
62
+ WordCloud = "wordCloud",
63
+ Radar = "radar",
64
+ Funnel = "funnel",
65
+ Heatmap = "heatmap",
66
+ LineAndArea = "lineAndArea",
67
+ GridlinesAndTicks = "gridlinesAndTicks",
68
+ IndicatorLine = "indicatorLine",
69
+ Trendline = "trendline",
70
+ Candlestick = "candlestick",
71
+ Histogram = "histogram",
72
+ Treemap = "treemap",
73
+ Sunburst = "sunburst",
74
+ Gauge = "gauge",
75
+ Chord = "chord"
53
76
  }
54
77
  export declare const ChartTitleKey: {
55
78
  readonly Title: "title";
@@ -109,9 +132,7 @@ export type ChartElementConfigTarget = {
109
132
  seriesIndex?: number;
110
133
  dataIndex?: number;
111
134
  };
112
- export type ChartElementFloatMenuStateKey = typeof CHART_ELEMENT_FLOAT_MENU_STATE_KEYS[keyof typeof CHART_ELEMENT_FLOAT_MENU_STATE_KEYS];
113
- export interface IChartElementFloatMenuExtraProps {
114
- host: 'sheet' | 'slide' | 'board';
135
+ export interface IChartElementFloatMenuContext {
115
136
  unitId: string;
116
137
  subUnitId?: string;
117
138
  chartId: string;
@@ -120,16 +141,14 @@ export interface IChartElementFloatMenuExtraProps {
120
141
  target: ChartElementConfigTarget;
121
142
  adapterKey: string;
122
143
  }
123
- export interface IChartElementFloatMenuContext extends IChartElementFloatMenuExtraProps {
124
- }
125
144
  export interface IChartElementFloatMenuObservable<T> {
126
145
  subscribe(next: (value: T) => void): {
127
146
  unsubscribe(): void;
128
147
  };
129
148
  }
130
149
  export interface IChartElementFloatMenuAdapter {
131
- getState<T>(context: IChartElementFloatMenuContext, key: ChartElementFloatMenuStateKey): IChartElementFloatMenuObservable<T | undefined> | undefined;
132
- setState<T>(context: IChartElementFloatMenuContext, key: ChartElementFloatMenuStateKey, patch: T): void;
150
+ getState<T>(context: IChartElementFloatMenuContext, key: ChartViewStateName): IChartElementFloatMenuObservable<T | undefined> | undefined;
151
+ setState<T>(context: IChartElementFloatMenuContext, key: ChartViewStateName, patch: T): void;
133
152
  close?(): void;
134
153
  openFullPanel?(context: IChartElementFloatMenuContext): void;
135
154
  }