stz-chart-maker 1.0.14 → 1.0.16

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 (3) hide show
  1. package/dist/index.d.ts +9 -12
  2. package/dist/index.js +1364 -1359
  3. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -64,10 +64,10 @@ type PartialDataLabels = Partial<DataLabels>;
64
64
 
65
65
  /** ■■■■■■■■■■■■■■■■공통으로 사용하는 타입을 선언해놓습니다.■■■■■■■■■■■■■■■■*/
66
66
 
67
- interface ChartBuilder$1<TType extends ChartType> {
67
+ interface ChartBuilder<TType extends ChartType> {
68
68
  setPlugin(plugins: any): this;
69
69
  removePlugin(pluginId: string): this;
70
- build(id?: string): any;
70
+ build(id?: string): ChartConfig;
71
71
  }
72
72
  type Position = 'start' | 'center' | 'end' | 'left' | 'right' | 'top' | 'bottom';
73
73
  type CartesianChartType = 'line' | 'bar' | 'scatter' | 'bubble';
@@ -250,7 +250,7 @@ type HtmlLegendOptions = {
250
250
  getItemText?: (item: any) => string;
251
251
  getDatasetType?: (chart: Chart, item: Record<string, any>) => string | undefined;
252
252
  };
253
- interface CartesianChartBuilder<TType extends CartesianChartType> extends ChartBuilder$1<TType> {
253
+ interface CartesianChartBuilder<TType extends CartesianChartType> extends ChartBuilder<TType> {
254
254
  makeConfig(id?: string): any;
255
255
  hasPlugin(pluginId: string): boolean;
256
256
  setScales(scales: CommonAxesSacels): this;
@@ -306,6 +306,7 @@ type Types_BarChartBuilder = BarChartBuilder;
306
306
  type Types_CartesianChartBuilder<TType extends CartesianChartType> = CartesianChartBuilder<TType>;
307
307
  type Types_CartesianChartType = CartesianChartType;
308
308
  type Types_CartesianDataset<TType extends CartesianChartType = CartesianChartType> = CartesianDataset<TType>;
309
+ type Types_ChartBuilder<TType extends ChartType> = ChartBuilder<TType>;
309
310
  type Types_Color = Color;
310
311
  type Types_CommonAxes = CommonAxes;
311
312
  type Types_CommonAxesSacels = CommonAxesSacels;
@@ -330,7 +331,7 @@ type Types_Mode = Mode;
330
331
  type Types_Position = Position;
331
332
  type Types_SettingOptions = SettingOptions;
332
333
  declare namespace Types {
333
- export type { Types_BarChartBuilder as BarChartBuilder, Types_CartesianChartBuilder as CartesianChartBuilder, Types_CartesianChartType as CartesianChartType, Types_CartesianDataset as CartesianDataset, ChartBuilder$1 as ChartBuilder, Types_Color as Color, Types_CommonAxes as CommonAxes, Types_CommonAxesSacels as CommonAxesSacels, Types_CommonCartesian as CommonCartesian, Types_CommonCartesianAxes as CommonCartesianAxes, Types_CommonCartesianTicks as CommonCartesianTicks, Types_CommonCartesianTitleConfig as CommonCartesianTitleConfig, Types_CommonTicks as CommonTicks, Types_Constructor as Constructor, Types_CustomBarChartOptions as CustomBarChartOptions, Types_CustomCartesianDataset as CustomCartesianDataset, Types_CustomChartOptions as CustomChartOptions, Types_CustomLineChartOptions as CustomLineChartOptions, Types_CustomOptionPlugins as CustomOptionPlugins, Types_CustomPieChartOptions as CustomPieChartOptions, Types_DeepPartial as DeepPartial, Types_DeepPartialCartesianAxes as DeepPartialCartesianAxes, Types_DeepPartialPluginOptions as DeepPartialPluginOptions, Types_HtmlLegendOptions as HtmlLegendOptions, Types_LineChartBuilder as LineChartBuilder, Types_Mode as Mode, Types_Position as Position, Types_SettingOptions as SettingOptions };
334
+ export type { Types_BarChartBuilder as BarChartBuilder, Types_CartesianChartBuilder as CartesianChartBuilder, Types_CartesianChartType as CartesianChartType, Types_CartesianDataset as CartesianDataset, Types_ChartBuilder as ChartBuilder, Types_Color as Color, Types_CommonAxes as CommonAxes, Types_CommonAxesSacels as CommonAxesSacels, Types_CommonCartesian as CommonCartesian, Types_CommonCartesianAxes as CommonCartesianAxes, Types_CommonCartesianTicks as CommonCartesianTicks, Types_CommonCartesianTitleConfig as CommonCartesianTitleConfig, Types_CommonTicks as CommonTicks, Types_Constructor as Constructor, Types_CustomBarChartOptions as CustomBarChartOptions, Types_CustomCartesianDataset as CustomCartesianDataset, Types_CustomChartOptions as CustomChartOptions, Types_CustomLineChartOptions as CustomLineChartOptions, Types_CustomOptionPlugins as CustomOptionPlugins, Types_CustomPieChartOptions as CustomPieChartOptions, Types_DeepPartial as DeepPartial, Types_DeepPartialCartesianAxes as DeepPartialCartesianAxes, Types_DeepPartialPluginOptions as DeepPartialPluginOptions, Types_HtmlLegendOptions as HtmlLegendOptions, Types_LineChartBuilder as LineChartBuilder, Types_Mode as Mode, Types_Position as Position, Types_SettingOptions as SettingOptions };
334
335
  }
335
336
 
336
337
  interface ChartConfig {
@@ -340,11 +341,6 @@ interface ChartConfig {
340
341
  options: any;
341
342
  plugins?: any;
342
343
  }
343
- interface ChartBuilder<TType extends ChartType> {
344
- setPlugin(plugins: any): this;
345
- removePlugin(pluginId: string): this;
346
- build(id?: string): ChartConfig;
347
- }
348
344
  declare abstract class ChartWrapper<TType extends ChartType> implements ChartBuilder<TType> {
349
345
  protected type: TType;
350
346
  protected labels: (string | number)[];
@@ -353,7 +349,7 @@ declare abstract class ChartWrapper<TType extends ChartType> implements ChartBui
353
349
  protected plugins?: any | undefined;
354
350
  static registry: Map<string, Constructor<any, any>>;
355
351
  constructor(type: TType, labels: (string | number)[], datasets: ChartDataset<TType, (number | null)[]>[], options: CustomChartOptions<TType>, plugins?: any | undefined);
356
- static create<TType extends ChartType>(type: TType, labels: (string | number)[], datasets: ChartDataset<TType, (number | null)[]>[], options?: CustomChartOptions<TType>, plugins?: any): ChartBuilder<TType>;
352
+ static create<TType extends ChartType>(type: TType, labels: (string | number)[], datasets: ChartDataset<TType, (number | null)[]>[], options?: CustomChartOptions<TType>, plugins?: any): TType extends CartesianChartType ? CartesianChartBuilder<TType> : ChartBuilder<TType>;
357
353
  protected abstract normalize(): void;
358
354
  protected abstract configAop(config: any): any;
359
355
  static register<TType extends ChartType, TInstance>(type: TType, wrapperClass: Constructor<TType, TInstance>): void;
@@ -381,7 +377,7 @@ declare abstract class ChartWrapper<TType extends ChartType> implements ChartBui
381
377
  * @param pluginId
382
378
  */
383
379
  hasPlugin(pluginId: string): boolean;
384
- build(id?: string): ChartConfig;
380
+ abstract build(id?: string): ChartConfig;
385
381
  }
386
382
 
387
383
  interface AxisColors {
@@ -463,6 +459,7 @@ declare abstract class CartesianChartWrapper<TType extends CartesianChartType> e
463
459
  protected isBar(): boolean;
464
460
  protected normalize(): void;
465
461
  protected configAop(config: any): any;
462
+ build(id?: string): ChartConfig;
466
463
  makeConfig(id?: string): {
467
464
  _chartId: any;
468
465
  type: any;
@@ -1062,4 +1059,4 @@ declare const T$: {
1062
1059
  };
1063
1060
 
1064
1061
  export { BarChartWrapper, CartesianChartWrapper, ChartFactory, ChartInstance, ChartToolBox, ChartTypes, ChartWrapper, CreateZoomRangeSlider, LineChartWrapper, T$, barScaleImgPlugin, blinkPlugin, changeSetting, chartMountPlugin, createDefaultBarOptions, createDefaultLineOptions, customLegend, T$ as default, defaultBarScales, defaultBarTooltipCallback, defaultLineScales, defaultLineTooltipCallback, doughnutCenterTextPlugin, loadingPlugin, makeCenterHtml, noDataPlugin, zoomRangeSlider, zoomResetPlugin };
1065
- export type { AllChartTypes, AxisColors, BarChartBuilder, CartesianChartBuilder, CartesianChartType, CartesianDataset, ChartBuilder$1 as ChartBuilder, ChartWithFocus, Color, CommonAxes, CommonAxesSacels, CommonCartesian, CommonCartesianAxes, CommonCartesianTicks, CommonCartesianTitleConfig, CommonTicks, Constructor, CustomBarChartOptions, CustomCartesianDataset, CustomChartOptions, CustomLineChartOptions, CustomOptionPlugins, CustomPieChartOptions, CustomZoomType, DataLabels, DataLabelsContext, DatasetWithPrevColors, DeepPartial, DeepPartialCartesianAxes, DeepPartialPluginOptions, DeepPartialZoomType, FocusCallback, HtmlLegendOptions, LineChartBuilder, Mode, OriginalColors, PartialDataLabels, Position, ScaleWithOriginalColors, SettingOptions, ZoomRangeSliderColors, ZoomRangeSliderPlugin, ZoomRangeSliderVar };
1062
+ export type { AllChartTypes, AxisColors, BarChartBuilder, CartesianChartBuilder, CartesianChartType, CartesianDataset, ChartBuilder, ChartWithFocus, Color, CommonAxes, CommonAxesSacels, CommonCartesian, CommonCartesianAxes, CommonCartesianTicks, CommonCartesianTitleConfig, CommonTicks, Constructor, CustomBarChartOptions, CustomCartesianDataset, CustomChartOptions, CustomLineChartOptions, CustomOptionPlugins, CustomPieChartOptions, CustomZoomType, DataLabels, DataLabelsContext, DatasetWithPrevColors, DeepPartial, DeepPartialCartesianAxes, DeepPartialPluginOptions, DeepPartialZoomType, FocusCallback, HtmlLegendOptions, LineChartBuilder, Mode, OriginalColors, PartialDataLabels, Position, ScaleWithOriginalColors, SettingOptions, ZoomRangeSliderColors, ZoomRangeSliderPlugin, ZoomRangeSliderVar };