@univerjs-pro/engine-chart 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.
- package/README.md +25 -3
- package/lib/cjs/facade.js +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/locale/ar-SA.js +1 -0
- package/lib/cjs/locale/ca-ES.js +1 -0
- package/lib/cjs/locale/de-DE.js +1 -0
- package/lib/cjs/locale/en-US.js +1 -0
- package/lib/cjs/locale/es-ES.js +1 -0
- package/lib/cjs/locale/fa-IR.js +1 -0
- package/lib/cjs/locale/fr-FR.js +1 -0
- package/lib/cjs/locale/id-ID.js +1 -0
- package/lib/cjs/locale/it-IT.js +1 -0
- package/lib/cjs/locale/ja-JP.js +1 -0
- package/lib/cjs/locale/ko-KR.js +1 -0
- package/lib/cjs/locale/pl-PL.js +1 -0
- package/lib/cjs/locale/pt-BR.js +1 -0
- package/lib/cjs/locale/ru-RU.js +1 -0
- package/lib/cjs/locale/sk-SK.js +1 -0
- package/lib/cjs/locale/vi-VN.js +1 -0
- package/lib/cjs/locale/zh-CN.js +1 -0
- package/lib/cjs/locale/zh-HK.js +1 -0
- package/lib/cjs/locale/zh-TW.js +1 -0
- package/lib/es/facade.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/es/locale/ar-SA.js +1 -0
- package/lib/es/locale/ca-ES.js +1 -0
- package/lib/es/locale/de-DE.js +1 -0
- package/lib/es/locale/en-US.js +1 -0
- package/lib/es/locale/es-ES.js +1 -0
- package/lib/es/locale/fa-IR.js +1 -0
- package/lib/es/locale/fr-FR.js +1 -0
- package/lib/es/locale/id-ID.js +1 -0
- package/lib/es/locale/it-IT.js +1 -0
- package/lib/es/locale/ja-JP.js +1 -0
- package/lib/es/locale/ko-KR.js +1 -0
- package/lib/es/locale/pl-PL.js +1 -0
- package/lib/es/locale/pt-BR.js +1 -0
- package/lib/es/locale/ru-RU.js +1 -0
- package/lib/es/locale/sk-SK.js +1 -0
- package/lib/es/locale/vi-VN.js +1 -0
- package/lib/es/locale/zh-CN.js +1 -0
- package/lib/es/locale/zh-HK.js +1 -0
- package/lib/es/locale/zh-TW.js +1 -0
- package/lib/facade.js +1 -1
- package/lib/index.js +1 -1
- package/lib/locale/ar-SA.js +1 -0
- package/lib/locale/ca-ES.js +1 -0
- package/lib/locale/de-DE.js +1 -0
- package/lib/locale/en-US.js +1 -0
- package/lib/locale/es-ES.js +1 -0
- package/lib/locale/fa-IR.js +1 -0
- package/lib/locale/fr-FR.js +1 -0
- package/lib/locale/id-ID.js +1 -0
- package/lib/locale/it-IT.js +1 -0
- package/lib/locale/ja-JP.js +1 -0
- package/lib/locale/ko-KR.js +1 -0
- package/lib/locale/pl-PL.js +1 -0
- package/lib/locale/pt-BR.js +1 -0
- package/lib/locale/ru-RU.js +1 -0
- package/lib/locale/sk-SK.js +1 -0
- package/lib/locale/vi-VN.js +1 -0
- package/lib/locale/zh-CN.js +1 -0
- package/lib/locale/zh-HK.js +1 -0
- package/lib/locale/zh-TW.js +1 -0
- package/lib/types/chart-builder/chart-builder-adapter.d.ts +1 -3
- package/lib/types/chart-builder/chart-builder.d.ts +4 -6
- package/lib/types/chart-builder/chart-live-adapter.d.ts +15 -0
- package/lib/types/chart-builder/chart-starter-data.d.ts +3 -2
- package/lib/types/chart-builder/chart-types.d.ts +129 -13
- package/lib/types/chart-builder/configuration/assertions.d.ts +2 -0
- package/lib/types/chart-builder/configuration/cartesian-series.d.ts +3 -1
- package/lib/types/chart-builder/configuration/chart-config-group.d.ts +38 -0
- package/lib/types/chart-builder/configuration/chart-config-operation.d.ts +1 -33
- package/lib/types/chart-builder/configuration/chord.d.ts +12 -0
- package/lib/types/chart-builder/configuration/gauge.d.ts +31 -0
- package/lib/types/chart-builder/configuration/pie.d.ts +5 -6
- package/lib/types/chart-builder/configuration/sunburst.d.ts +7 -0
- package/lib/types/chart-builder/configuration/treemap.d.ts +2 -2
- package/lib/types/chart-builder/configuration/waterfall.d.ts +3 -1
- package/lib/types/chart-builder/conversion/chart-config-converter.d.ts +25 -10
- package/lib/types/chart-builder/conversion/chart-context-patch.d.ts +1 -1
- package/lib/types/chart-builder/conversion/chart-create-config.d.ts +6 -0
- package/lib/types/chart-builder/conversion/chart-model-fields.d.ts +25 -7
- package/lib/types/chart-builder/conversion/chart-type-converter.d.ts +3 -1
- package/lib/types/chart-builder/conversion/describe-chart-model.d.ts +1419 -7
- package/lib/types/chart-builder/conversion/resolve-chart-model-data.d.ts +2 -2
- package/lib/types/chart-builder/detached-chart-builder-adapter.d.ts +4 -4
- package/lib/types/chart-builder/internal/apply-pending-to-description.d.ts +2 -0
- package/lib/types/chart-builder/internal/chart-host-config-adapter.d.ts +3 -0
- package/lib/types/chart-builder/internal/chart-patch-replace-policy.d.ts +6 -0
- package/lib/types/chart-builder/internal/chart-pending-patch.d.ts +11 -0
- package/lib/types/chart-builder/internal/patch-interpreter.d.ts +17 -0
- package/lib/types/chart-data-aggregation.d.ts +10 -0
- package/lib/types/config/config.d.ts +7 -0
- package/lib/types/enum.d.ts +45 -2
- package/lib/types/facade/builders/f-area-chart-builder.d.ts +52 -7
- package/lib/types/facade/builders/f-boxplot-chart-builder.d.ts +88 -3
- package/lib/types/facade/builders/f-bubble-chart-builder.d.ts +59 -6
- package/lib/types/facade/builders/f-candlestick-chart-builder.d.ts +90 -31
- package/lib/types/facade/builders/f-chord-chart-builder.d.ts +202 -0
- package/lib/types/facade/builders/f-combination-chart-builder.d.ts +55 -10
- package/lib/types/facade/builders/f-funnel-chart-builder.d.ts +55 -9
- package/lib/types/facade/builders/f-gauge-chart-builder.d.ts +420 -0
- package/lib/types/facade/builders/f-heatmap-chart-builder.d.ts +83 -26
- package/lib/types/facade/builders/f-histogram-chart-builder.d.ts +142 -16
- package/lib/types/facade/builders/f-line-chart-builder.d.ts +51 -6
- package/lib/types/facade/builders/f-pareto-chart-builder.d.ts +83 -20
- package/lib/types/facade/builders/f-pie-chart-builder.d.ts +134 -107
- package/lib/types/facade/builders/f-radar-chart-builder.d.ts +64 -11
- package/lib/types/facade/builders/f-relation-chart-builder.d.ts +72 -38
- package/lib/types/facade/builders/f-scatter-chart-builder.d.ts +58 -6
- package/lib/types/facade/builders/f-sunburst-chart-builder.d.ts +138 -0
- package/lib/types/facade/builders/f-treemap-chart-builder.d.ts +116 -14
- package/lib/types/facade/builders/f-waterfall-chart-builder.d.ts +87 -53
- package/lib/types/facade/builders/f-word-cloud-chart-builder.d.ts +64 -15
- package/lib/types/facade/chart-builder-registry.d.ts +4 -4
- package/lib/types/facade/chart-builder-type-map.d.ts +55 -30
- package/lib/types/facade/chart-host-builder-types.d.ts +2 -21
- package/lib/types/facade/create-chart-builder.d.ts +46 -0
- package/lib/types/facade/f-axis-chart-builder.d.ts +21 -38
- package/lib/types/facade/f-cartesian-chart-builder.d.ts +34 -22
- package/lib/types/facade/f-chart-builder-base.d.ts +206 -74
- package/lib/types/facade/f-chart.d.ts +652 -0
- package/lib/types/facade/f-enum.d.ts +686 -31
- package/lib/types/facade/f-univer.d.ts +51 -0
- package/lib/types/facade/index.d.ts +27 -10
- package/lib/types/facade/internal/chart-builder-facade-context.d.ts +11 -10
- package/lib/types/index.d.ts +131 -39
- package/lib/types/locale/ar-SA.d.ts +3 -0
- package/lib/types/locale/ca-ES.d.ts +3 -0
- package/lib/types/locale/de-DE.d.ts +3 -0
- package/lib/types/locale/en-US.d.ts +46 -0
- package/lib/types/locale/es-ES.d.ts +3 -0
- package/lib/types/locale/fa-IR.d.ts +3 -0
- package/lib/types/locale/fr-FR.d.ts +3 -0
- package/lib/types/locale/id-ID.d.ts +3 -0
- package/lib/types/locale/it-IT.d.ts +3 -0
- package/lib/types/locale/ja-JP.d.ts +3 -0
- package/lib/types/locale/ko-KR.d.ts +3 -0
- package/lib/types/locale/pl-PL.d.ts +3 -0
- package/lib/types/locale/pt-BR.d.ts +3 -0
- package/lib/types/locale/ru-RU.d.ts +3 -0
- package/lib/types/locale/sk-SK.d.ts +3 -0
- package/lib/types/locale/types.d.ts +3 -0
- package/lib/types/locale/vi-VN.d.ts +3 -0
- package/lib/types/locale/zh-CN.d.ts +3 -0
- package/lib/types/locale/zh-HK.d.ts +3 -0
- package/lib/types/locale/zh-TW.d.ts +3 -0
- package/lib/types/models/{chart-semantic-axes.d.ts → chart-context/axes/chart-semantic-axes.d.ts} +2 -2
- package/lib/types/models/chart-context/chart-field-selection.d.ts +21 -0
- package/lib/types/models/chart-context/resolve-chart-context.d.ts +5 -0
- package/lib/types/models/chart-data/build-chart-data.d.ts +5 -0
- package/lib/types/models/chart-data/builders/boxplot-chart-data.d.ts +4 -0
- package/lib/types/models/chart-data/builders/candlestick-chart-data.d.ts +4 -0
- package/lib/types/models/chart-data/builders/cartesian-point-chart-data.d.ts +5 -0
- package/lib/types/models/chart-data/builders/category-series-chart-data.d.ts +5 -0
- package/lib/types/models/chart-data/builders/chord-chart-data.d.ts +4 -0
- package/lib/types/models/chart-data/builders/gauge-chart-data.d.ts +4 -0
- package/lib/types/models/chart-data/builders/heatmap-chart-data.d.ts +3 -0
- package/lib/types/models/chart-data/builders/hierarchy-chart-data.d.ts +5 -0
- package/lib/types/models/chart-data/builders/histogram-chart-data.d.ts +4 -0
- package/lib/types/models/chart-data/builders/relation-chart-data.d.ts +3 -0
- package/lib/types/models/chart-data/builders/sankey-chart-data.d.ts +3 -0
- package/lib/types/models/chart-data/chart-field-consumption-validator.d.ts +15 -0
- package/lib/types/models/chart-data/chart-field-consumption.d.ts +4 -0
- package/lib/types/models/chart-data/chart-field-requirements.d.ts +7 -0
- package/lib/types/models/chart-data/get-chart-data-builder.d.ts +7 -0
- package/lib/types/models/chart-data/internal/aggregate-number-format.d.ts +8 -0
- package/lib/types/models/{chart-data-operators → chart-data/internal}/cartesian-point-data.d.ts +3 -8
- package/lib/types/models/chart-data/internal/category-data.d.ts +3 -0
- package/lib/types/models/chart-data/internal/category-series-aggregation.d.ts +10 -0
- package/lib/types/models/chart-data/internal/chart-data-result.d.ts +5 -0
- package/lib/types/models/chart-data/internal/chart-hierarchy-data.d.ts +1 -0
- package/lib/types/models/chart-data/internal/chord-data.d.ts +7 -0
- package/lib/types/models/chart-data/internal/data-set-accessors.d.ts +7 -0
- package/lib/types/models/chart-data/internal/gauge-data.d.ts +5 -0
- package/lib/types/models/{chart-data-operators/histogram-data.d.ts → chart-data/internal/histogram-bins.d.ts} +1 -1
- package/lib/types/models/chart-data/internal/relation-data-shape.d.ts +2 -0
- package/lib/types/models/chart-data/internal/source-cell-label.d.ts +3 -0
- package/lib/types/models/chart-data/internal/sunburst-data.d.ts +4 -0
- package/lib/types/models/chart-data/internal/treemap-data.d.ts +4 -0
- package/lib/types/models/chart-data/pie-composite/pie-composite-projection.d.ts +36 -0
- package/lib/types/models/chart-data/pie-composite/pie-composite-render-metadata.d.ts +15 -0
- package/lib/types/models/chart-data/pie-composite/pie-composite-spec.d.ts +38 -0
- package/lib/types/models/{chart-host-style.d.ts → chart-host/chart-host-style.d.ts} +1 -1
- package/lib/types/models/chart-host/config/chart-config-interpreter.d.ts +13 -0
- package/lib/types/models/{image-chart-host.d.ts → chart-host/image-chart-host.d.ts} +14 -2
- package/lib/types/models/{offscreen-chart-host.d.ts → chart-host/offscreen-chart-host.d.ts} +1 -1
- package/lib/types/models/chart-host/resource/chart-data-source-resolver.d.ts +58 -0
- package/lib/types/models/chart-host/resource/chart-resource-repository.d.ts +111 -0
- package/lib/types/models/{chart-resource-serializer.d.ts → chart-host/resource/chart-resource-serializer.d.ts} +3 -2
- package/lib/types/models/chart-host/resource/inline-chart-table.d.ts +5 -0
- package/lib/types/models/chart-host/resource/persisted-chart-style.d.ts +3 -0
- package/lib/types/models/chart-host/resource/resource-ref-chart-data-source.adapter.d.ts +22 -0
- package/lib/types/models/chart-host/resource/resource-ref-chart-data-source.provider.d.ts +12 -0
- package/lib/types/models/chart-host/static/chart-model-store.d.ts +56 -0
- package/lib/types/models/chart-host/static/chart-runtime.d.ts +27 -0
- package/lib/types/models/{chart-model.d.ts → chart-model/chart-model.d.ts} +1415 -947
- package/lib/types/models/{echart-to-chart-model-init.d.ts → chart-model/echart-to-chart-model-init.d.ts} +2 -2
- package/lib/types/models/{data-context-transformers/bar-data-context-transformer.d.ts → chart-model/type-transition/bar-type-transition.d.ts} +1 -1
- package/lib/types/models/{data-context-transformers/line-like-context-transformer.d.ts → chart-model/type-transition/line-like-type-transition.d.ts} +1 -1
- package/lib/types/models/{data-context-transformers/percent-data-context-transformer.d.ts → chart-model/type-transition/percent-type-transition.d.ts} +1 -1
- package/lib/types/models/{chart-element-axis-id.d.ts → chart-render/axes/chart-element-axis-id.d.ts} +1 -1
- package/lib/types/models/{chart-runtime-axes.d.ts → chart-render/axes/chart-runtime-axes.d.ts} +4 -4
- package/lib/types/models/{chart-render-input-resolver.d.ts → chart-render/chart-render-input-resolver.d.ts} +3 -3
- package/lib/types/models/{chart-render-model-manager.service.d.ts → chart-render/chart-render-model-manager.service.d.ts} +2 -3
- package/lib/types/models/chart-render/converter/converters/boxplot-chart-converter.d.ts +2 -0
- package/lib/types/models/chart-render/converter/converters/bubble-chart-converter.d.ts +2 -0
- package/lib/types/models/chart-render/converter/converters/candlestick-chart-converter.d.ts +4 -0
- package/lib/types/models/chart-render/converter/converters/chord-chart-converter.d.ts +10 -0
- package/lib/types/models/chart-render/converter/converters/combination-chart-converter.d.ts +2 -0
- package/lib/types/models/chart-render/converter/converters/funnel-chart-converter.d.ts +2 -0
- package/lib/types/models/chart-render/converter/converters/gauge-chart-converter.d.ts +20 -0
- package/lib/types/models/chart-render/converter/converters/heatmap-chart-convert.d.ts +2 -0
- package/lib/types/models/{mode-converter → chart-render/converter}/converters/histogram-chart-converter.d.ts +2 -3
- package/lib/types/models/chart-render/converter/converters/pareto-chart-converter.d.ts +2 -0
- package/lib/types/models/chart-render/converter/converters/pie-chart-converter.d.ts +2 -0
- package/lib/types/models/chart-render/converter/converters/radar-chart-converter.d.ts +2 -0
- package/lib/types/models/chart-render/converter/converters/relation-chart-converter.d.ts +2 -0
- package/lib/types/models/chart-render/converter/converters/sankey-chart-converter.d.ts +2 -0
- package/lib/types/models/chart-render/converter/converters/scatter-chart-converter.d.ts +2 -0
- package/lib/types/models/chart-render/converter/converters/sunburst-chart-converter.d.ts +3 -0
- package/lib/types/models/{mode-converter → chart-render/converter}/converters/tools.d.ts +1 -1
- package/lib/types/models/chart-render/converter/converters/treemap-chart-converter.d.ts +3 -0
- package/lib/types/models/chart-render/converter/converters/waterfall-chart-converter.d.ts +2 -0
- package/lib/types/models/{mode-converter → chart-render/converter}/converters/waterfall-layout.d.ts +2 -2
- package/lib/types/models/chart-render/converter/converters/word-cloud-converter.d.ts +2 -0
- package/lib/types/models/chart-render/converter/echart-text-overflow.d.ts +7 -0
- package/lib/types/models/{mode-converter → chart-render/converter}/mode-converter.d.ts +3 -5
- package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/auto-gradient-presets.d.ts +1 -1
- package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/axis-title.operator.d.ts +1 -1
- package/lib/types/models/chart-render/converter/render-spec-operators/bar-layout.operator.d.ts +3 -0
- package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/bubble-style.operator.d.ts +1 -1
- package/lib/types/models/{mode-converter/render-spec-operators/trend-line/trend-line.operator.d.ts → chart-render/converter/render-spec-operators/chart-axes.operator.d.ts} +1 -1
- package/lib/types/models/{mode-converter/render-spec-operators/relation-chart-operator/relation-chart-operator.d.ts → chart-render/converter/render-spec-operators/chart-box-style.operator.d.ts} +1 -1
- package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/chart-color.d.ts +1 -1
- package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/empty-style-operator.d.ts +1 -1
- package/lib/types/models/chart-render/converter/render-spec-operators/font-size.operator.d.ts +2 -0
- package/lib/types/models/chart-render/converter/render-spec-operators/grid-operator.d.ts +12 -0
- package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/heatmap-chart-operator.d.ts +1 -1
- package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/hover-mark-style.operator.d.ts +1 -1
- package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/implicit-category-axis.operator.d.ts +1 -1
- package/lib/types/models/{mode-converter/render-spec-operators/series-style-operator/pareto-series-style.handler.d.ts → chart-render/converter/render-spec-operators/invalid-value-style.operator.d.ts} +1 -1
- package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/legend-size.d.ts +1 -2
- package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/legend-style.operator.d.ts +1 -1
- package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/line-like-style.operator.d.ts +1 -1
- package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/mark-line.operator.d.ts +1 -1
- package/lib/types/models/chart-render/converter/render-spec-operators/pie-composite-layout.operator.d.ts +2 -0
- package/lib/types/models/chart-render/converter/render-spec-operators/pie-style.operator.d.ts +2 -0
- package/lib/types/models/chart-render/converter/render-spec-operators/plot-area.d.ts +10 -0
- package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/radar-style.operator.d.ts +1 -1
- package/lib/types/models/chart-render/converter/render-spec-operators/relation-chart-operator/relation-chart-operator.d.ts +2 -0
- package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/rich-text-inheritance.operator.d.ts +1 -1
- package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/rtl-render-spec.operator.d.ts +1 -1
- package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/sankey-chart-operator.d.ts +1 -1
- package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/scatter-style.operator.d.ts +1 -1
- package/lib/types/models/chart-render/converter/render-spec-operators/series-style-operator/pareto-series-style.handler.d.ts +2 -0
- package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/series-style-operator/series-style-operator.d.ts +3 -3
- package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/series-style-operator/waterfall-series-style-operator.d.ts +1 -1
- package/lib/types/models/chart-render/converter/render-spec-operators/stack.operator.d.ts +2 -0
- package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/theme.operator.d.ts +1 -1
- package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/title-style.operator.d.ts +1 -1
- package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/tool-tip-operator.d.ts +6 -17
- package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/tool-tip-renderer.d.ts +1 -1
- package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/tools.d.ts +5 -7
- package/lib/types/models/chart-render/converter/render-spec-operators/trend-line/trend-line.operator.d.ts +2 -0
- package/lib/types/models/chart-render/converter/render-spec-operators/visual-map-operator.d.ts +6 -0
- package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/watermark.operator.d.ts +1 -1
- package/lib/types/models/{echart-render-model.d.ts → chart-render/echart-render-model.d.ts} +22 -12
- package/lib/types/models/{chart-element-edit-overlay → chart-render/edit-overlay}/chart-element-edit-overlay.d.ts +2 -2
- package/lib/types/models/{chart-element-edit-overlay → chart-render/edit-overlay}/resolve-chart-element-hit-layout.d.ts +2 -2
- package/lib/types/models/{chart-element-edit-overlay → chart-render/edit-overlay}/types.d.ts +1 -1
- package/lib/types/models/chart-render/format/chart-value-format.d.ts +16 -0
- package/lib/types/models/{chart-runtime-style.d.ts → chart-render/style/chart-runtime-style.d.ts} +3 -3
- package/lib/types/models/common/chart-field-diagnostic.d.ts +14 -0
- package/lib/types/models/common/chart-field-role.d.ts +53 -0
- package/lib/types/models/common/chart-locale-texts.d.ts +44 -0
- package/lib/types/models/common/constants/chord.d.ts +5 -0
- package/lib/types/models/common/constants/default-chart-style.d.ts +920 -0
- package/lib/types/models/{constants → common/constants}/default.d.ts +3 -2
- package/lib/types/models/common/constants/hierarchy.d.ts +5 -0
- package/lib/types/models/common/constants/histogram-defaults.d.ts +8 -0
- package/lib/types/models/common/constants/treemap.d.ts +1 -0
- package/lib/types/models/common/theme/build-in-theme/theme-util.d.ts +4 -0
- package/lib/types/models/{chart-theme.service.d.ts → common/theme/chart-theme.service.d.ts} +1 -3
- package/lib/types/plugin.d.ts +15 -0
- package/lib/types/types.d.ts +307 -39
- package/lib/types/util.d.ts +1 -1
- package/lib/types/utils/compact.d.ts +6 -0
- package/lib/types/utils/echarts.d.ts +0 -1
- package/lib/types/word-cloud-resource/word-cloud-resource-config.d.ts +5 -0
- package/lib/types/wordcloud-chart/adapters/echarts/chart-view.d.ts +0 -2
- package/lib/types/wordcloud-chart/adapters/echarts/echarts-options.d.ts +1 -1
- package/lib/types/wordcloud-chart/adapters/echarts/layout-register.d.ts +0 -2
- package/lib/types/wordcloud-chart/adapters/echarts/series-model.d.ts +0 -2
- package/lib/types/wordcloud-chart/adapters/echarts/text-measurer.d.ts +1 -1
- package/lib/types/wordcloud-chart/core/collision/box-shape-engine.d.ts +1 -1
- package/lib/types/wordcloud-chart/word-cloud-render-config.d.ts +1 -0
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +1 -1
- package/lib/umd/locale/ar-SA.js +1 -0
- package/lib/umd/locale/ca-ES.js +1 -0
- package/lib/umd/locale/de-DE.js +1 -0
- package/lib/umd/locale/en-US.js +1 -0
- package/lib/umd/locale/es-ES.js +1 -0
- package/lib/umd/locale/fa-IR.js +1 -0
- package/lib/umd/locale/fr-FR.js +1 -0
- package/lib/umd/locale/id-ID.js +1 -0
- package/lib/umd/locale/it-IT.js +1 -0
- package/lib/umd/locale/ja-JP.js +1 -0
- package/lib/umd/locale/ko-KR.js +1 -0
- package/lib/umd/locale/pl-PL.js +1 -0
- package/lib/umd/locale/pt-BR.js +1 -0
- package/lib/umd/locale/ru-RU.js +1 -0
- package/lib/umd/locale/sk-SK.js +1 -0
- package/lib/umd/locale/vi-VN.js +1 -0
- package/lib/umd/locale/zh-CN.js +1 -0
- package/lib/umd/locale/zh-HK.js +1 -0
- package/lib/umd/locale/zh-TW.js +1 -0
- package/package.json +11 -4
- package/lib/types/chart-builder/candlestick-inline-table.d.ts +0 -4
- package/lib/types/chart-builder/configuration/index.d.ts +0 -34
- package/lib/types/chart-builder/index.d.ts +0 -17
- package/lib/types/chart-builder/internal/host-builder-runtime.d.ts +0 -3
- package/lib/types/chart-builder/internal/merge-description.d.ts +0 -2
- package/lib/types/facade/builders/index.d.ts +0 -17
- package/lib/types/facade/f-chart-base.d.ts +0 -82
- package/lib/types/facade/f-charts-base.d.ts +0 -74
- package/lib/types/facade/internal/host-builder-composer.d.ts +0 -16
- package/lib/types/models/chart-data-operators/build-chart-data.d.ts +0 -9
- package/lib/types/models/chart-data-operators/index.d.ts +0 -3
- package/lib/types/models/chart-data-operators/operators.d.ts +0 -26
- package/lib/types/models/chart-data-operators/treemap-data.d.ts +0 -3
- package/lib/types/models/chart-element-edit-overlay/index.d.ts +0 -4
- package/lib/types/models/chart-locale-texts.d.ts +0 -36
- package/lib/types/models/constants/build-in-theme/index.d.ts +0 -15
- package/lib/types/models/constants/build-in-theme/theme-util.d.ts +0 -5
- package/lib/types/models/constants/default-chart-style.d.ts +0 -181
- package/lib/types/models/constants/histogram-defaults.d.ts +0 -4
- package/lib/types/models/constants/treemap.d.ts +0 -1
- package/lib/types/models/data-context-transformers/box-plot-data-context-transformer.d.ts +0 -3
- package/lib/types/models/data-context-transformers/candlestick-data-context-transformer.d.ts +0 -4
- package/lib/types/models/data-context-transformers/histogram-data-context-transformer.d.ts +0 -7
- package/lib/types/models/data-context-transformers/pareto-data-context-transformer.d.ts +0 -3
- package/lib/types/models/data-context-transformers/pie-data-context-transformer.d.ts +0 -3
- package/lib/types/models/data-context-transformers/treemap-data-context-transformer.d.ts +0 -11
- package/lib/types/models/data-context-transformers/word-cloud-data-context-transform.d.ts +0 -3
- package/lib/types/models/mode-converter/converters/boxplot-chart-converter.d.ts +0 -3
- package/lib/types/models/mode-converter/converters/bubble-chart-converter.d.ts +0 -3
- package/lib/types/models/mode-converter/converters/candlestick-chart-converter.d.ts +0 -5
- package/lib/types/models/mode-converter/converters/combination-chart-converter.d.ts +0 -3
- package/lib/types/models/mode-converter/converters/funnel-chart-converter.d.ts +0 -3
- package/lib/types/models/mode-converter/converters/heatmap-chart-convert.d.ts +0 -3
- package/lib/types/models/mode-converter/converters/pareto-chart-converter.d.ts +0 -3
- package/lib/types/models/mode-converter/converters/pie-chart-converter.d.ts +0 -3
- package/lib/types/models/mode-converter/converters/radar-chart-converter.d.ts +0 -3
- package/lib/types/models/mode-converter/converters/relation-chart-converter.d.ts +0 -3
- package/lib/types/models/mode-converter/converters/sankey-chart-converter.d.ts +0 -3
- package/lib/types/models/mode-converter/converters/scatter-chart-converter.d.ts +0 -3
- package/lib/types/models/mode-converter/converters/treemap-chart-converter.d.ts +0 -4
- package/lib/types/models/mode-converter/converters/waterfall-chart-converter.d.ts +0 -3
- package/lib/types/models/mode-converter/converters/word-cloud-converter.d.ts +0 -3
- package/lib/types/models/mode-converter/render-spec-operators/chart-axes.operator.d.ts +0 -2
- package/lib/types/models/mode-converter/render-spec-operators/chart-box-style.operator.d.ts +0 -2
- package/lib/types/models/mode-converter/render-spec-operators/font-size.operator.d.ts +0 -2
- package/lib/types/models/mode-converter/render-spec-operators/grid-operator.d.ts +0 -2
- package/lib/types/models/mode-converter/render-spec-operators/index.d.ts +0 -15
- package/lib/types/models/mode-converter/render-spec-operators/invalid-value-style.operator.d.ts +0 -2
- package/lib/types/models/mode-converter/render-spec-operators/pie-style.operator.d.ts +0 -2
- package/lib/types/models/mode-converter/render-spec-operators/stack.operator.d.ts +0 -2
- package/lib/types/models/mode-converter/render-spec-operators/visual-map-operator.d.ts +0 -2
- package/lib/types/models/spec-converter/spec-converter.d.ts +0 -1
- package/lib/types/models/word-cloud-musk-image.service.d.ts +0 -17
- package/lib/types/wordcloud-chart/index.d.ts +0 -12
- /package/lib/types/models/{mode-converter → chart-render/converter}/converters/constants.d.ts +0 -0
- /package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/operator-types.d.ts +0 -0
- /package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/relation-chart-operator/relation-force-directed-layout.d.ts +0 -0
- /package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/series-style-operator/series-chart-style.handler.d.ts +0 -0
- /package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/series-style-operator/series-data-label.handler.d.ts +0 -0
- /package/lib/types/models/{mode-converter → chart-render/converter}/render-spec-operators/trend-line/trendline-util.d.ts +0 -0
- /package/lib/types/models/{chart-element-edit-overlay → chart-render/edit-overlay}/palette.d.ts +0 -0
- /package/lib/types/models/{series-style → chart-render/style/series-style}/series-style-resolver.d.ts +0 -0
- /package/lib/types/models/{constants → common/theme}/build-in-theme/default.d.ts +0 -0
- /package/lib/types/models/{constants → common/theme}/build-in-theme/types.d.ts +0 -0
- /package/lib/types/models/{constants → common/theme}/build-in-theme/univer-gradient1.d.ts +0 -0
- /package/lib/types/models/{constants → common/theme}/build-in-theme/univer-gradient2.d.ts +0 -0
- /package/lib/types/models/{constants → common/theme}/build-in-theme/univer-gradient3.d.ts +0 -0
- /package/lib/types/models/{constants → common/theme}/build-in-theme/univer-gradient4.d.ts +0 -0
- /package/lib/types/models/{constants → common/theme}/build-in-theme/univer-gradient5.d.ts +0 -0
- /package/lib/types/models/{constants → common/theme}/build-in-theme/univer-gradient6.d.ts +0 -0
- /package/lib/types/models/{constants → common/theme}/build-in-theme/univer1.d.ts +0 -0
- /package/lib/types/models/{constants → common/theme}/build-in-theme/univer2.d.ts +0 -0
- /package/lib/types/models/{constants → common/theme}/build-in-theme/univer3.d.ts +0 -0
- /package/lib/types/models/{constants → common/theme}/build-in-theme/univer4.d.ts +0 -0
- /package/lib/types/models/{constants → common/theme}/build-in-theme/univer5.d.ts +0 -0
- /package/lib/types/models/{constants → common/theme}/build-in-theme/univer6.d.ts +0 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { IChartContext, IChartData, IUniverDataSet } from '../../../types';
|
|
2
|
+
import type { IChartLocaleTexts } from '../../common/chart-locale-texts';
|
|
3
|
+
import type { IChartFieldConsumption } from '../chart-field-consumption';
|
|
4
|
+
export declare function buildTreemapChartData(dataSet: IUniverDataSet, fieldConsumption: IChartFieldConsumption, chartContext: IChartContext, localeTexts: IChartLocaleTexts): IChartData;
|
|
5
|
+
export declare function buildSunburstChartData(dataSet: IUniverDataSet, fieldConsumption: IChartFieldConsumption, chartContext: IChartContext, localeTexts: IChartLocaleTexts): IChartData;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { IChartContext, IChartData, IUniverDataSet } from '../../../types';
|
|
2
|
+
import type { IChartLocaleTexts } from '../../common/chart-locale-texts';
|
|
3
|
+
import type { IChartFieldConsumption } from '../chart-field-consumption';
|
|
4
|
+
export declare function buildHistogramChartData(dataSet: IUniverDataSet, fieldConsumption: IChartFieldConsumption, chartContext: IChartContext, localeTexts: IChartLocaleTexts): IChartData;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { IChartContext, IChartData, IUniverDataSet } from '../../../types';
|
|
2
|
+
import type { IChartFieldConsumption } from '../chart-field-consumption';
|
|
3
|
+
export declare function buildRelationChartData(dataSet: IUniverDataSet, fieldConsumption: IChartFieldConsumption, _chartContext: IChartContext): IChartData;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { IChartContext, IChartData, IUniverDataSet } from '../../../types';
|
|
2
|
+
import type { IChartFieldConsumption } from '../chart-field-consumption';
|
|
3
|
+
export declare function buildSankeyChartData(dataSet: IUniverDataSet, fieldConsumption: IChartFieldConsumption, _chartContext: IChartContext): IChartData;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ChartTypeBits } from '../../enum';
|
|
2
|
+
import type { IUniverDataSet } from '../../types';
|
|
3
|
+
import type { IChartFieldDiagnostic } from '../common/chart-field-diagnostic';
|
|
4
|
+
import type { IChartFieldConsumption } from './chart-field-consumption';
|
|
5
|
+
export type ChartFieldValidationResult = {
|
|
6
|
+
valid: true;
|
|
7
|
+
} | {
|
|
8
|
+
valid: false;
|
|
9
|
+
diagnostic: IChartFieldDiagnostic;
|
|
10
|
+
};
|
|
11
|
+
export declare function validateChartFieldConsumption(input: {
|
|
12
|
+
chartType: ChartTypeBits;
|
|
13
|
+
consumption: IChartFieldConsumption;
|
|
14
|
+
dataSet: IUniverDataSet;
|
|
15
|
+
}): ChartFieldValidationResult;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { IUniverDataSet } from '../../types';
|
|
2
|
+
import { ChartTypeBits } from '../../enum';
|
|
3
|
+
export interface IChartRequiredFieldCounts {
|
|
4
|
+
categoryRequiredCount: number;
|
|
5
|
+
seriesRequiredCount: number;
|
|
6
|
+
}
|
|
7
|
+
export declare function getChartRequiredFieldCounts(chartType: ChartTypeBits, dataSet: IUniverDataSet): IChartRequiredFieldCounts | undefined;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { IChartDataAggregation } from '../../chart-data-aggregation';
|
|
2
|
+
import type { IChartContext, IChartData, IUniverDataSet } from '../../types';
|
|
3
|
+
import type { IChartLocaleTexts } from '../common/chart-locale-texts';
|
|
4
|
+
import type { IChartFieldConsumption } from './chart-field-consumption';
|
|
5
|
+
import { ChartTypeBits } from '../../enum';
|
|
6
|
+
export type ChartDataBuilder = (dataSet: IUniverDataSet, fieldConsumption: IChartFieldConsumption, chartContext: IChartContext, localeTexts: IChartLocaleTexts, dataAggregation?: IChartDataAggregation) => IChartData;
|
|
7
|
+
export declare function getChartDataBuilder(chartType: ChartTypeBits): ChartDataBuilder;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { IUniverDataSet } from '../../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Reconstructs the visible number pattern carried by a normalized chart source.
|
|
4
|
+
* Source datasets currently expose formatted labels rather than number-format codes,
|
|
5
|
+
* so aggregates reuse the first positive finite sample's prefix, suffix, separators,
|
|
6
|
+
* scale, and precision instead of copying any input cell's already-formatted value.
|
|
7
|
+
*/
|
|
8
|
+
export declare function createAggregateNumberFormatter(dataSet: IUniverDataSet, fieldIndex: number): (value: number) => string;
|
package/lib/types/models/{chart-data-operators → chart-data/internal}/cartesian-point-data.d.ts
RENAMED
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
import type { IUniverDataSet } from '
|
|
2
|
-
import type { IChartLocaleTexts } from '
|
|
3
|
-
export declare enum CartesianPointRoleIndex {
|
|
4
|
-
X = 0,
|
|
5
|
-
Y = 1,
|
|
6
|
-
Size = 2
|
|
7
|
-
}
|
|
1
|
+
import type { IUniverDataSet } from '../../../types';
|
|
2
|
+
import type { IChartLocaleTexts } from '../../common/chart-locale-texts';
|
|
8
3
|
export declare enum CartesianPointValueIndex {
|
|
9
4
|
X = 0,
|
|
10
5
|
Y = 1,
|
|
@@ -39,5 +34,5 @@ interface ICartesianPointRoleIndexes {
|
|
|
39
34
|
headers?: string[];
|
|
40
35
|
}
|
|
41
36
|
/** Builds normalized Cartesian point records consumed by coordinate-chart converters. */
|
|
42
|
-
export declare function buildCartesianPointData(
|
|
37
|
+
export declare function buildCartesianPointData(dataSet: IUniverDataSet, roles: ICartesianPointRoleIndexes, localeTexts: IChartLocaleTexts, visitRecord?: (record: ICartesianPointRecord) => void): ICartesianPointData;
|
|
43
38
|
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { IChartContext, IChartData, IUniverDataSet } from '../../../types';
|
|
2
|
+
import type { IChartLocaleTexts } from '../../common/chart-locale-texts';
|
|
3
|
+
export declare function buildChartCategory(dataSet: IUniverDataSet, categoryIndex: number | undefined, chartContext: IChartContext, localeTexts: IChartLocaleTexts): IChartData['category'];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IChartDataAggregation } from '../../../chart-data-aggregation';
|
|
2
|
+
import type { IUniverDataSet } from '../../../types';
|
|
3
|
+
import type { IChartFieldConsumption } from '../chart-field-consumption';
|
|
4
|
+
/**
|
|
5
|
+
* Projects category/value rows while preserving source-field indexes.
|
|
6
|
+
*
|
|
7
|
+
* This runs after field-consumption validation, so callers continue to own chart-specific
|
|
8
|
+
* mapping rules and this module owns only ordinary category/value aggregation and ranking.
|
|
9
|
+
*/
|
|
10
|
+
export declare function projectCategorySeriesData(dataSet: IUniverDataSet, fieldConsumption: IChartFieldConsumption, dataAggregation: IChartDataAggregation | undefined): IUniverDataSet;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { IChartData } from '../../../types';
|
|
2
|
+
import type { IChartFieldDiagnostic } from '../../common/chart-field-diagnostic';
|
|
3
|
+
export declare function createEmptyChartData(headers?: string[]): IChartData;
|
|
4
|
+
export declare function createInvalidChartData(headers: string[] | undefined, fieldDiagnostic: IChartFieldDiagnostic): IChartData;
|
|
5
|
+
export declare function calculateNumericExtent<T>(items: readonly T[], getValue: (item: T) => number): Pick<IChartData, 'maxValue' | 'minValue'>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { IChartChordData, IUniverDataSet } from '../../../types';
|
|
2
|
+
import type { IChartLocaleTexts } from '../../common/chart-locale-texts';
|
|
3
|
+
import type { IChartFieldConsumption } from '../chart-field-consumption';
|
|
4
|
+
export declare const CHORD_NODE_ID_PREFIX = "chord-node:";
|
|
5
|
+
export declare const CHORD_LINK_ID_PREFIX = "chord-link:";
|
|
6
|
+
/** Resolves a normalized spreadsheet edge list into one undirected semantic graph. */
|
|
7
|
+
export declare function buildChordData(dataSet: IUniverDataSet, fields: IChartFieldConsumption, localeTexts: IChartLocaleTexts): IChartChordData;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { DimensionDefinitionLoose, IUniverDataSet, OptionDataValue } from '../../../types';
|
|
2
|
+
export declare function getRawDataValue(dataSet: IUniverDataSet, fieldIndex: number, itemIndex: number): OptionDataValue;
|
|
3
|
+
export declare function getDataValue(dataSet: IUniverDataSet, fieldIndex: number, itemIndex: number): OptionDataValue;
|
|
4
|
+
export declare function getDataLabel(dataSet: IUniverDataSet, fieldIndex: number, itemIndex: number): string;
|
|
5
|
+
export declare function getDimensionLabel(value: DimensionDefinitionLoose | undefined): string;
|
|
6
|
+
export declare function getDataSetItemCount(dataSet: IUniverDataSet, fieldIndex: number, categoryIndex?: number): number;
|
|
7
|
+
export declare function getDataSetRowCount(dataSet: IUniverDataSet): number;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { IChartGaugeData, IUniverDataSet } from '../../../types';
|
|
2
|
+
import type { IChartLocaleTexts } from '../../common/chart-locale-texts';
|
|
3
|
+
import type { IChartFieldConsumption } from '../chart-field-consumption';
|
|
4
|
+
export declare const GAUGE_ITEM_ID_PREFIX = "gauge-item:";
|
|
5
|
+
export declare function buildGaugeData(dataSet: IUniverDataSet, fields: IChartFieldConsumption, localeTexts: IChartLocaleTexts): IChartGaugeData;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IChartHistogramBin, IChartHistogramDataSpec } from '
|
|
1
|
+
import type { IChartHistogramBin, IChartHistogramDataSpec } from '../../../types';
|
|
2
2
|
export declare const MAX_HISTOGRAM_BIN_COUNT = 1000;
|
|
3
3
|
export interface IBuildHistogramBinsResult {
|
|
4
4
|
bins: IChartHistogramBin[];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { IChartSunburstData, IUniverDataSet } from '../../../types';
|
|
2
|
+
import type { IChartFieldConsumption } from '../chart-field-consumption';
|
|
3
|
+
/** Builds runtime-only Sunburst data through the shared hierarchy policy. */
|
|
4
|
+
export declare function buildSunburstData(dataSet: IUniverDataSet, fields: IChartFieldConsumption, diagnostic?: string): IChartSunburstData;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { IChartTreemapData, IUniverDataSet } from '../../../types';
|
|
2
|
+
import type { IChartFieldConsumption } from '../chart-field-consumption';
|
|
3
|
+
/** Builds Treemap runtime data through the shared renderer-independent hierarchy policy. */
|
|
4
|
+
export declare function buildTreemapData(dataSet: IUniverDataSet, fields: IChartFieldConsumption, diagnostic?: string): IChartTreemapData;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { IChartPieCompositeSpec, PieSecondaryPlotType } from '../../../chart-builder/chart-types';
|
|
2
|
+
import { PieCompositeMarkRole, PieCompositePlot } from '../../../chart-builder/chart-types';
|
|
3
|
+
export declare const PieCompositeDiagnosticCode: {
|
|
4
|
+
readonly InsufficientSourcePoints: "insufficientSourcePoints";
|
|
5
|
+
readonly InvalidSecondaryPlot: "invalidSecondaryPlot";
|
|
6
|
+
readonly InvalidPositionCount: "invalidPositionCount";
|
|
7
|
+
readonly EmptySecondarySelection: "emptySecondarySelection";
|
|
8
|
+
readonly AllPointsSelected: "allPointsSelected";
|
|
9
|
+
};
|
|
10
|
+
export type PieCompositeDiagnosticCode = typeof PieCompositeDiagnosticCode[keyof typeof PieCompositeDiagnosticCode];
|
|
11
|
+
export type PieCompositeDatum = {
|
|
12
|
+
plot: typeof PieCompositePlot.Primary | typeof PieCompositePlot.Secondary;
|
|
13
|
+
role: typeof PieCompositeMarkRole.Source;
|
|
14
|
+
sourcePointIndex: number;
|
|
15
|
+
} | {
|
|
16
|
+
plot: typeof PieCompositePlot.Primary;
|
|
17
|
+
role: typeof PieCompositeMarkRole.Aggregate;
|
|
18
|
+
memberSourcePointIndexes: readonly number[];
|
|
19
|
+
value: number;
|
|
20
|
+
};
|
|
21
|
+
export interface IPieCompositeDiagnostic {
|
|
22
|
+
code: PieCompositeDiagnosticCode;
|
|
23
|
+
sourcePointCount: number;
|
|
24
|
+
selectedPointCount: number;
|
|
25
|
+
}
|
|
26
|
+
export interface IPieCompositeProjection {
|
|
27
|
+
active: boolean;
|
|
28
|
+
primary: readonly PieCompositeDatum[];
|
|
29
|
+
secondary: readonly PieCompositeDatum[];
|
|
30
|
+
secondaryPlotType?: PieSecondaryPlotType;
|
|
31
|
+
diagnostics: readonly IPieCompositeDiagnostic[];
|
|
32
|
+
}
|
|
33
|
+
export declare function projectCompositePie(values: readonly number[], composite?: IChartPieCompositeSpec | {
|
|
34
|
+
enabled?: boolean;
|
|
35
|
+
secondaryPlot?: Partial<IChartPieCompositeSpec['secondaryPlot']>;
|
|
36
|
+
}): IPieCompositeProjection;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { PieCompositeDatum } from './pie-composite-projection';
|
|
2
|
+
export declare const PIE_COMPOSITE_METADATA_FIELD = "pieComposite";
|
|
3
|
+
export declare const PIE_COMPOSITE_PERCENT_FIELD = "pieCompositePercent";
|
|
4
|
+
export declare const PIE_COMPOSITE_SERIES_PLOT_FIELD = "pieCompositePlot";
|
|
5
|
+
export declare const PIE_COMPOSITE_PRIMARY_SERIES_ID = "pie-composite-primary";
|
|
6
|
+
export declare const PIE_COMPOSITE_SECONDARY_SERIES_ID = "pie-composite-secondary";
|
|
7
|
+
export declare const PIE_COMPOSITE_SECONDARY_STACK_ID = "pie-composite-secondary";
|
|
8
|
+
export declare const PIE_COMPOSITE_CONNECTOR_GRAPHIC_ID = "pie-composite-connector";
|
|
9
|
+
export interface IPieCompositeMarkMetadata {
|
|
10
|
+
plot: PieCompositeDatum['plot'];
|
|
11
|
+
role: PieCompositeDatum['role'];
|
|
12
|
+
sourcePointIndex?: number;
|
|
13
|
+
memberSourcePointIndexes?: readonly number[];
|
|
14
|
+
}
|
|
15
|
+
export declare function toPieCompositeMarkMetadata(datum: PieCompositeDatum): IPieCompositeMarkMetadata;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { IChartPieCompositeSpec, PieSecondaryPlotType } from '../../../chart-builder/chart-types';
|
|
2
|
+
import type { DeepNullish } from '../../../types';
|
|
3
|
+
import { ChartBorderDashType } from '../../../enum';
|
|
4
|
+
export declare const PIE_COMPOSITE_MIN_SOURCE_POINT_COUNT = 2;
|
|
5
|
+
export declare const PIE_AUTO_SPLIT_DIVISOR = 3;
|
|
6
|
+
export declare const PIE_PERCENTAGE_WHOLE = 100;
|
|
7
|
+
export declare const PIE_SECONDARY_SIZE_MIN = 5;
|
|
8
|
+
export declare const PIE_SECONDARY_SIZE_MAX = 200;
|
|
9
|
+
export declare const PIE_SECONDARY_SIZE_DEFAULT = 75;
|
|
10
|
+
export declare const PIE_SECONDARY_GAP_WIDTH_MIN = 0;
|
|
11
|
+
export declare const PIE_SECONDARY_GAP_WIDTH_MAX = 500;
|
|
12
|
+
export declare const PIE_SECONDARY_GAP_WIDTH_DEFAULT = 150;
|
|
13
|
+
export declare const PIE_POSITION_SPLIT_COUNT_MIN = 1;
|
|
14
|
+
export declare const PIE_POSITION_SPLIT_COUNT_DEFAULT = 2;
|
|
15
|
+
export declare const PIE_VALUE_SPLIT_LESS_THAN_DEFAULT = 0;
|
|
16
|
+
export declare const PIE_PERCENTAGE_SPLIT_LESS_THAN_DEFAULT = 10;
|
|
17
|
+
export declare const PIE_AGGREGATE_COLOR_DEFAULT = "#D9D9D9";
|
|
18
|
+
export declare const PIE_CONNECTOR_VISIBLE_DEFAULT = true;
|
|
19
|
+
export declare const PIE_CONNECTOR_COLOR_DEFAULT = "#8C8C8C";
|
|
20
|
+
export declare const PIE_CONNECTOR_WIDTH_DEFAULT = 1;
|
|
21
|
+
export declare const PIE_CONNECTOR_OPACITY_DEFAULT = 1;
|
|
22
|
+
export declare const PIE_CONNECTOR_DASH_TYPE_DEFAULT = ChartBorderDashType.Solid;
|
|
23
|
+
export declare const PIE_COMPOSITE_SECONDARY_PLOT_REQUIRED_ERROR = "Active Pie composite requires a secondary plot with type \"pie\" or \"bar\".";
|
|
24
|
+
export declare const PIE_COMPOSITE_INVALID_VALUE_ERROR_PREFIX = "Invalid Pie composite value";
|
|
25
|
+
export declare function assertPieCompositePatch(current: DeepNullish<IChartPieCompositeSpec> | null | undefined, patch: DeepNullish<IChartPieCompositeSpec> | null | undefined): void;
|
|
26
|
+
/**
|
|
27
|
+
* Composite Pie fields were added to the persisted Pie style additively.
|
|
28
|
+
* Historical snapshots omit `composite`, and an abandoned transition shape can
|
|
29
|
+
* omit `enabled`; both remain disabled without materializing persisted defaults.
|
|
30
|
+
*/
|
|
31
|
+
export declare function resolveActivePieComposite(pie: {
|
|
32
|
+
composite?: {
|
|
33
|
+
enabled?: boolean | null;
|
|
34
|
+
secondaryPlot?: {
|
|
35
|
+
type?: PieSecondaryPlotType | null;
|
|
36
|
+
} | null;
|
|
37
|
+
} | null;
|
|
38
|
+
} | null | undefined): IChartPieCompositeSpec | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ChartImageSource, ChartStyle, IChartHostBorderStyle, IChartHostRect, IChartHostStyle } from '
|
|
1
|
+
import type { ChartImageSource, ChartStyle, IChartHostBorderStyle, IChartHostRect, IChartHostStyle } from '../../types';
|
|
2
2
|
export interface IResolveChartHostFrameStyleInput {
|
|
3
3
|
style?: ChartStyle | null;
|
|
4
4
|
getRenderColor?: (color: string) => string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { IChartDataAggregation } from '../../../chart-data-aggregation';
|
|
2
|
+
import type { ChartStyle, IChartContext } from '../../../types';
|
|
3
|
+
import type { IChartResourceSnapshot } from '../resource/chart-resource-repository';
|
|
4
|
+
export interface IChartConfigUpdate {
|
|
5
|
+
chartType?: IChartResourceSnapshot['chartType'];
|
|
6
|
+
style?: ChartStyle;
|
|
7
|
+
context?: IChartContext;
|
|
8
|
+
dataAggregation?: Partial<IChartDataAggregation>;
|
|
9
|
+
patch?: Partial<Omit<IChartResourceSnapshot, 'id'>>;
|
|
10
|
+
}
|
|
11
|
+
export declare const chartConfigInterpreter: {
|
|
12
|
+
apply(previous: IChartResourceSnapshot, update: IChartConfigUpdate, replaceConfig: boolean): IChartResourceSnapshot | null;
|
|
13
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ChartImageSource, IChartHostLease, IChartHostRect, IChartHostStyle, IImageChartHost } from '
|
|
1
|
+
import type { ChartImageSource, IChartHostLease, IChartHostRect, IChartHostStyle, IImageChartHost } from '../../types';
|
|
2
2
|
import { Disposable } from '@univerjs/core';
|
|
3
|
-
import { ChartHostRenderMode } from '
|
|
3
|
+
import { ChartHostRenderMode } from '../../types';
|
|
4
4
|
export declare function chartImageSourceToDataUrl(image: ChartImageSource): string;
|
|
5
5
|
export declare abstract class ImageChartHost extends Disposable implements IImageChartHost {
|
|
6
6
|
readonly chartId: string;
|
|
@@ -16,3 +16,15 @@ export declare abstract class ImageChartHost extends Disposable implements IImag
|
|
|
16
16
|
acquireOffscreenHost(rect: IChartHostRect): IChartHostLease;
|
|
17
17
|
dispose(): void;
|
|
18
18
|
}
|
|
19
|
+
export declare class DataUrlImageChartHost extends ImageChartHost {
|
|
20
|
+
private readonly _rect;
|
|
21
|
+
private _dataUrl;
|
|
22
|
+
constructor(chartId: string, _rect: IChartHostRect);
|
|
23
|
+
getRect(): IChartHostRect;
|
|
24
|
+
setStyle(_style: IChartHostStyle): void;
|
|
25
|
+
nextVersion(): number;
|
|
26
|
+
commitSnapshot(image: ChartImageSource, _version: number): boolean;
|
|
27
|
+
requestPaint(): void;
|
|
28
|
+
invalidateSnapshot(): void;
|
|
29
|
+
getDataUrl(): string | undefined;
|
|
30
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IChartHostLease, IChartHostRect } from '
|
|
1
|
+
import type { IChartHostLease, IChartHostRect } from '../../types';
|
|
2
2
|
import { Disposable } from '@univerjs/core';
|
|
3
3
|
export declare class OffscreenChartHost extends Disposable {
|
|
4
4
|
private readonly _leases;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { IDisposable } from '@univerjs/core';
|
|
2
|
+
import type { Observable } from 'rxjs';
|
|
3
|
+
import type { ChartDataSourceValue } from './inline-chart-table';
|
|
4
|
+
import type { IResourceRefChartDataSourceReference } from './resource-ref-chart-data-source.adapter';
|
|
5
|
+
import { Disposable } from '@univerjs/core';
|
|
6
|
+
export declare enum ChartDataSourceRuntimeStatus {
|
|
7
|
+
LOADING = "loading",
|
|
8
|
+
READY = "ready",
|
|
9
|
+
UNAVAILABLE = "unavailable",
|
|
10
|
+
REFRESH_ERROR = "refresh-error"
|
|
11
|
+
}
|
|
12
|
+
export interface IChartDataSourceResolveResult {
|
|
13
|
+
values: ReadonlyArray<ReadonlyArray<ChartDataSourceValue>>;
|
|
14
|
+
}
|
|
15
|
+
export interface IChartDataSourceProvider {
|
|
16
|
+
readonly kind: IResourceRefChartDataSourceReference['kind'];
|
|
17
|
+
getCacheKey(source: Readonly<IResourceRefChartDataSourceReference>): string;
|
|
18
|
+
resolve(source: Readonly<IResourceRefChartDataSourceReference>, options: {
|
|
19
|
+
signal: AbortSignal;
|
|
20
|
+
}): Promise<IChartDataSourceResolveResult>;
|
|
21
|
+
}
|
|
22
|
+
export interface IChartDataSourceRuntimeState {
|
|
23
|
+
status: ChartDataSourceRuntimeStatus;
|
|
24
|
+
values?: ReadonlyArray<ReadonlyArray<ChartDataSourceValue>>;
|
|
25
|
+
error?: unknown;
|
|
26
|
+
}
|
|
27
|
+
export interface IChartDataSourceHandle extends IDisposable {
|
|
28
|
+
readonly state$: Observable<IChartDataSourceRuntimeState>;
|
|
29
|
+
refresh(): Promise<void>;
|
|
30
|
+
}
|
|
31
|
+
export interface IChartDataSourceResolver {
|
|
32
|
+
registerProvider(provider: IChartDataSourceProvider): IDisposable;
|
|
33
|
+
acquire(source: Readonly<IResourceRefChartDataSourceReference>): IChartDataSourceHandle;
|
|
34
|
+
}
|
|
35
|
+
export declare const IChartDataSourceResolver: import("@wendellhu/redi").IdentifierDecorator<IChartDataSourceResolver>;
|
|
36
|
+
export declare class ChartDataSourceResolver extends Disposable implements IChartDataSourceResolver {
|
|
37
|
+
private readonly _providers;
|
|
38
|
+
private readonly _entries;
|
|
39
|
+
private readonly _handles;
|
|
40
|
+
private _isDisposed;
|
|
41
|
+
registerProvider(provider: IChartDataSourceProvider): IDisposable;
|
|
42
|
+
acquire(source: Readonly<IResourceRefChartDataSourceReference>): IChartDataSourceHandle;
|
|
43
|
+
dispose(): void;
|
|
44
|
+
private _getOrCreateEntry;
|
|
45
|
+
private _attachHandle;
|
|
46
|
+
private _detachHandle;
|
|
47
|
+
private _releaseHandle;
|
|
48
|
+
private _refreshHandle;
|
|
49
|
+
private _startResolve;
|
|
50
|
+
private _resolveEntry;
|
|
51
|
+
private _isCurrentGeneration;
|
|
52
|
+
private _clearPending;
|
|
53
|
+
private _publishEntry;
|
|
54
|
+
private _invalidateProviderEntry;
|
|
55
|
+
private _cancelEntry;
|
|
56
|
+
private _snapshotState;
|
|
57
|
+
private _unavailableState;
|
|
58
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import type { Observable } from 'rxjs';
|
|
2
|
+
import type { IChartDataAggregation } from '../../../chart-data-aggregation';
|
|
3
|
+
import type { ChartTypeBits } from '../../../enum';
|
|
4
|
+
import type { ChartStyle, IChartContext } from '../../../types';
|
|
5
|
+
import type { ChartDataSourceValue } from './inline-chart-table';
|
|
6
|
+
import type { IResourceRefChartDataSourceReference } from './resource-ref-chart-data-source.adapter';
|
|
7
|
+
import { Disposable } from '@univerjs/core';
|
|
8
|
+
export declare const CHART_RESOURCE_VERSION = 2;
|
|
9
|
+
export interface IInlineChartDataSource<TCell extends ChartDataSourceValue = ChartDataSourceValue> {
|
|
10
|
+
id: string;
|
|
11
|
+
name?: string;
|
|
12
|
+
values: TCell[][];
|
|
13
|
+
}
|
|
14
|
+
export interface IReferencedChartDataSource {
|
|
15
|
+
id: string;
|
|
16
|
+
name?: string;
|
|
17
|
+
source: IResourceRefChartDataSourceReference;
|
|
18
|
+
}
|
|
19
|
+
export type IChartResourceDataSource = IInlineChartDataSource | IReferencedChartDataSource;
|
|
20
|
+
export type IChartDataSourceInput = {
|
|
21
|
+
values: ChartDataSourceValue[][];
|
|
22
|
+
source?: never;
|
|
23
|
+
} | {
|
|
24
|
+
source: IResourceRefChartDataSourceReference;
|
|
25
|
+
values?: never;
|
|
26
|
+
};
|
|
27
|
+
interface IChartDataSourceCandidate {
|
|
28
|
+
values?: ChartDataSourceValue[][];
|
|
29
|
+
source?: IResourceRefChartDataSourceReference;
|
|
30
|
+
}
|
|
31
|
+
export declare function isInlineChartDataSource<T extends IChartDataSourceCandidate>(dataSource: T | null | undefined): dataSource is T & {
|
|
32
|
+
values: ChartDataSourceValue[][];
|
|
33
|
+
source?: never;
|
|
34
|
+
};
|
|
35
|
+
export declare function isReferencedChartDataSource<T extends IChartDataSourceCandidate>(dataSource: T | null | undefined): dataSource is T & {
|
|
36
|
+
source: IResourceRefChartDataSourceReference;
|
|
37
|
+
values?: never;
|
|
38
|
+
};
|
|
39
|
+
export interface IChartResourceContext {
|
|
40
|
+
orient?: 'row' | 'column';
|
|
41
|
+
chartContext?: Partial<IChartContext>;
|
|
42
|
+
}
|
|
43
|
+
export interface IChartResourceState {
|
|
44
|
+
legendSelected?: Record<string, boolean>;
|
|
45
|
+
activePage?: number;
|
|
46
|
+
relationNodePositions?: Record<string, {
|
|
47
|
+
x: number;
|
|
48
|
+
y: number;
|
|
49
|
+
}>;
|
|
50
|
+
}
|
|
51
|
+
export interface IChartResourceSnapshot<TContext = IChartResourceContext, TState = IChartResourceState> {
|
|
52
|
+
id: string;
|
|
53
|
+
dataSourceId: string;
|
|
54
|
+
chartType: ChartTypeBits;
|
|
55
|
+
style?: ChartStyle;
|
|
56
|
+
context?: TContext;
|
|
57
|
+
state?: TState;
|
|
58
|
+
dataAggregation?: IChartDataAggregation;
|
|
59
|
+
}
|
|
60
|
+
export interface IChartResource<TDataSource extends IChartResourceDataSource = IChartResourceDataSource, TChart extends IChartResourceSnapshot<unknown, unknown> = IChartResourceSnapshot> {
|
|
61
|
+
version: typeof CHART_RESOURCE_VERSION;
|
|
62
|
+
dataSources: Record<string, TDataSource>;
|
|
63
|
+
charts: Record<string, TChart>;
|
|
64
|
+
}
|
|
65
|
+
export type ICreateChartDataSourceOptions<TDataSource extends IChartResourceDataSource = IChartResourceDataSource> = TDataSource extends IChartResourceDataSource ? Omit<TDataSource, 'id'> & {
|
|
66
|
+
id?: string;
|
|
67
|
+
} : never;
|
|
68
|
+
export type ICreateChartSnapshotOptions<TChart extends IChartResourceSnapshot<unknown, unknown>> = Omit<TChart, 'id'> & {
|
|
69
|
+
id?: string;
|
|
70
|
+
};
|
|
71
|
+
export type IUpdateChartSnapshotPatch<TChart extends IChartResourceSnapshot<unknown, unknown>> = Partial<Omit<TChart, 'id'>>;
|
|
72
|
+
interface IChartDataSourceRemovedEvent {
|
|
73
|
+
unitId: string;
|
|
74
|
+
dataSourceId: string;
|
|
75
|
+
}
|
|
76
|
+
export declare class ChartResourceRepository<TDataSource extends IChartResourceDataSource = IChartResourceDataSource, TChart extends IChartResourceSnapshot<unknown, unknown> = IChartResourceSnapshot, TResource extends IChartResource<TDataSource, TChart> = IChartResource<TDataSource, TChart>> extends Disposable {
|
|
77
|
+
private readonly _resources;
|
|
78
|
+
private readonly _dataSourceRemoved$;
|
|
79
|
+
readonly dataSourceRemoved$: Observable<IChartDataSourceRemovedEvent>;
|
|
80
|
+
ensureUnitResource(unitId: string): TResource;
|
|
81
|
+
loadUnit(unitId: string, resource: unknown): TResource;
|
|
82
|
+
unloadUnit(unitId: string): void;
|
|
83
|
+
serializeUnit(unitId: string): string;
|
|
84
|
+
getResource(unitId: string): TResource;
|
|
85
|
+
getDataSource(unitId: string, dataSourceId: string): TDataSource | undefined;
|
|
86
|
+
getChart(unitId: string, chartId: string): TChart | undefined;
|
|
87
|
+
createDataSource(unitId: string, options: ICreateChartDataSourceOptions<TDataSource>): TDataSource;
|
|
88
|
+
setDataSource(unitId: string, dataSource: TDataSource): TDataSource;
|
|
89
|
+
updateDataSource(unitId: string, dataSourceId: string, values: ChartDataSourceValue[][], patch?: Partial<Pick<TDataSource, 'name'>>): TDataSource | undefined;
|
|
90
|
+
removeDataSource(unitId: string, dataSourceId: string): boolean;
|
|
91
|
+
createChart(unitId: string, options: ICreateChartSnapshotOptions<TChart>): TChart;
|
|
92
|
+
setChart(unitId: string, chart: TChart): TChart;
|
|
93
|
+
updateChart(unitId: string, chartId: string, patch: IUpdateChartSnapshotPatch<TChart>): TChart | undefined;
|
|
94
|
+
removeChart(unitId: string, chartId: string, options?: {
|
|
95
|
+
cleanupDataSource?: boolean;
|
|
96
|
+
}): TChart | undefined;
|
|
97
|
+
getChartIdsByDataSource(unitId: string, dataSourceId: string): string[];
|
|
98
|
+
getDataSourceSharingCount(unitId: string, dataSourceId: string): number;
|
|
99
|
+
isDataSourceShared(unitId: string, dataSourceId: string): boolean;
|
|
100
|
+
duplicateDataSourceForChart(unitId: string, chartId: string, duplicateDataSourceId?: string): TDataSource | undefined;
|
|
101
|
+
cleanupOrphanedResources(unitId: string): void;
|
|
102
|
+
dispose(): void;
|
|
103
|
+
private _decodeResource;
|
|
104
|
+
private _decodeDataSource;
|
|
105
|
+
private _cloneDataSource;
|
|
106
|
+
private _isResourceEnvelope;
|
|
107
|
+
private _isValues;
|
|
108
|
+
private _normalizeReference;
|
|
109
|
+
private _invalidDataSource;
|
|
110
|
+
}
|
|
111
|
+
export {};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import type { ChartStyle } from '
|
|
1
|
+
import type { ChartStyle } from '../../../types';
|
|
2
2
|
interface IChartResourceSnapshot {
|
|
3
3
|
style?: ChartStyle;
|
|
4
|
+
context?: unknown;
|
|
4
5
|
}
|
|
5
6
|
interface IChartResourceEnvelope<TChart extends IChartResourceSnapshot> {
|
|
6
7
|
charts: Record<string, TChart>;
|
|
7
8
|
}
|
|
8
|
-
/** Serializes a host chart resource
|
|
9
|
+
/** Serializes a host chart resource with authored-only persisted chart styles. */
|
|
9
10
|
export declare function serializeChartResource<TChart extends IChartResourceSnapshot, TResource extends IChartResourceEnvelope<TChart>>(resource: TResource): string;
|
|
10
11
|
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { CellValue } from '@univerjs/core';
|
|
2
|
+
import type { IUniverDataSet } from '../../../types';
|
|
3
|
+
export type ChartDataSourceValue = CellValue | null;
|
|
4
|
+
export declare function parseInlineChartTable(text: string): ChartDataSourceValue[][];
|
|
5
|
+
export declare function buildChartDataSetFromValues(values: readonly (readonly ChartDataSourceValue[])[]): IUniverDataSet;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { IResourceRef } from '@univerjs-pro/embed';
|
|
2
|
+
export declare const RESOURCE_REF_CHART_DATA_SOURCE_KIND = "resource-ref";
|
|
3
|
+
export interface IResourceRefChartDataSourceReference {
|
|
4
|
+
readonly kind: typeof RESOURCE_REF_CHART_DATA_SOURCE_KIND;
|
|
5
|
+
readonly ref: IResourceRef;
|
|
6
|
+
}
|
|
7
|
+
export interface IResourceRefChartDataSourceInput extends Omit<IResourceRef, 'file'> {
|
|
8
|
+
readonly file?: IResourceRef['file'];
|
|
9
|
+
}
|
|
10
|
+
interface ICompatibleResourceRefChartDataSourceReference {
|
|
11
|
+
readonly kind: typeof RESOURCE_REF_CHART_DATA_SOURCE_KIND;
|
|
12
|
+
readonly ref: IResourceRefChartDataSourceInput;
|
|
13
|
+
}
|
|
14
|
+
export declare class ResourceRefChartDataSourceAdapter {
|
|
15
|
+
static toReference(ref: IResourceRefChartDataSourceInput): IResourceRefChartDataSourceReference;
|
|
16
|
+
static isReference(reference: unknown): reference is Readonly<IResourceRefChartDataSourceReference>;
|
|
17
|
+
static assertReference(reference: unknown): asserts reference is Readonly<ICompatibleResourceRefChartDataSourceReference>;
|
|
18
|
+
static fromReference(reference: Readonly<ICompatibleResourceRefChartDataSourceReference>): IResourceRef;
|
|
19
|
+
private static _normalizeInput;
|
|
20
|
+
private static _isCompatibleReference;
|
|
21
|
+
}
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { IChartDataSourceProvider, IChartDataSourceResolveResult } from './chart-data-source-resolver';
|
|
2
|
+
import type { IResourceRefChartDataSourceReference } from './resource-ref-chart-data-source.adapter';
|
|
3
|
+
import { Injector } from '@univerjs/core';
|
|
4
|
+
export declare class ResourceRefChartDataSourceProvider implements IChartDataSourceProvider {
|
|
5
|
+
private readonly _injector;
|
|
6
|
+
readonly kind = "resource-ref";
|
|
7
|
+
constructor(_injector: Injector);
|
|
8
|
+
getCacheKey(source: IResourceRefChartDataSourceReference): string;
|
|
9
|
+
resolve(source: IResourceRefChartDataSourceReference, options: {
|
|
10
|
+
signal: AbortSignal;
|
|
11
|
+
}): Promise<IChartDataSourceResolveResult>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { Injector } from '@univerjs/core';
|
|
2
|
+
import type { Observable } from 'rxjs';
|
|
3
|
+
import type { IChartContext, IUniverDataSet } from '../../../types';
|
|
4
|
+
import type { ChartModel } from '../../chart-model/chart-model';
|
|
5
|
+
import type { IChartDataSourceResolver, IChartDataSourceRuntimeState } from '../resource/chart-data-source-resolver';
|
|
6
|
+
import type { ChartResourceRepository, IChartResource, IChartResourceContext, IChartResourceDataSource, IChartResourceSnapshot } from '../resource/chart-resource-repository';
|
|
7
|
+
import type { ChartDataSourceValue } from '../resource/inline-chart-table';
|
|
8
|
+
import type { IChartRuntime } from './chart-runtime';
|
|
9
|
+
import { Disposable } from '@univerjs/core';
|
|
10
|
+
export interface IChartModelRuntime extends IChartRuntime {
|
|
11
|
+
unitId: string;
|
|
12
|
+
chartId: string;
|
|
13
|
+
dataSourceId: string;
|
|
14
|
+
}
|
|
15
|
+
export declare class ChartModelStore<TDataSource extends IChartResourceDataSource, TChart extends IChartResourceSnapshot<IChartResourceContext, unknown>, TResource extends IChartResource<TDataSource, TChart>, TRuntime extends IChartModelRuntime = IChartModelRuntime> extends Disposable {
|
|
16
|
+
private readonly _resourceRepository;
|
|
17
|
+
private readonly _injector;
|
|
18
|
+
private readonly _buildDataSet;
|
|
19
|
+
private readonly _dataSourceResolver;
|
|
20
|
+
private readonly _activeRuntimeModel$;
|
|
21
|
+
readonly activeRuntimeModel$: Observable<TRuntime | null>;
|
|
22
|
+
get activeRuntimeModel(): TRuntime | null;
|
|
23
|
+
private readonly _activeChartModel$;
|
|
24
|
+
readonly activeChartModel$: Observable<ChartModel<import("../../..").IChartDataSource> | null>;
|
|
25
|
+
get activeChartModel(): ChartModel | null;
|
|
26
|
+
private readonly _runtimeModels;
|
|
27
|
+
private readonly _dataSourceBindings;
|
|
28
|
+
private readonly _chartModelAdded$;
|
|
29
|
+
readonly chartModelAdded$: Observable<TRuntime>;
|
|
30
|
+
private readonly _chartModelRemoved$;
|
|
31
|
+
readonly chartModelRemoved$: Observable<TRuntime>;
|
|
32
|
+
constructor(_resourceRepository: ChartResourceRepository<TDataSource, TChart, TResource>, _injector: Injector, _buildDataSet: (values: ReadonlyArray<ReadonlyArray<ChartDataSourceValue>>) => IUniverDataSet, _dataSourceResolver: IChartDataSourceResolver);
|
|
33
|
+
ensureChartModel(unitId: string, chartId: string): TRuntime | undefined;
|
|
34
|
+
getChartModel(unitId: string, chartId: string): TRuntime | undefined;
|
|
35
|
+
getDataSourceRuntimeState$(unitId: string, chartId: string): Observable<IChartDataSourceRuntimeState> | undefined;
|
|
36
|
+
getDataSourceRuntimeState(unitId: string, chartId: string): IChartDataSourceRuntimeState | undefined;
|
|
37
|
+
refreshChartDataSource(unitId: string, chartId: string): Promise<void>;
|
|
38
|
+
setActiveChartRuntime(runtime: TRuntime | null): void;
|
|
39
|
+
setActiveChartModel(chartModel: ChartModel | null): void;
|
|
40
|
+
setActiveChartById(unitId: string, chartId: string): TRuntime | null;
|
|
41
|
+
generateChartModelContext(unitId: string, chartId: string): IChartContext | undefined;
|
|
42
|
+
refreshChartModel(unitId: string, chartId: string): TRuntime | undefined;
|
|
43
|
+
refreshChartsByDataSource(unitId: string, dataSourceId: string): TRuntime[];
|
|
44
|
+
removeChartModel(unitId: string, chartId: string): boolean;
|
|
45
|
+
removeUnit(unitId: string): void;
|
|
46
|
+
dispose(): void;
|
|
47
|
+
protected _createStoredRuntime(runtime: IChartModelRuntime): TRuntime;
|
|
48
|
+
protected _beforeRuntimeRefresh(_runtime: TRuntime): void;
|
|
49
|
+
private _bindDataSource;
|
|
50
|
+
private _releaseBindingsByDataSource;
|
|
51
|
+
private _releaseHandle;
|
|
52
|
+
private _disposeBinding;
|
|
53
|
+
private _disposeUnitBindings;
|
|
54
|
+
private _disposeRuntime;
|
|
55
|
+
private _getOrCreateUnitMap;
|
|
56
|
+
}
|