@visactor/vseed 0.0.12 → 0.0.14

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 (42) hide show
  1. package/dist/builder/builder/builder.d.ts +9 -0
  2. package/dist/dataReshape/constant.d.ts +1 -0
  3. package/dist/dataReshape/dataReshapeFor1D1M.d.ts +1 -0
  4. package/dist/dataReshape/dataReshapeFor2D1M.d.ts +1 -0
  5. package/dist/dataReshape/unfoldDimensions.d.ts +1 -1
  6. package/dist/i18n/i18n.d.ts +17 -0
  7. package/dist/i18n/index.d.ts +1 -0
  8. package/dist/index.cjs +273 -95
  9. package/dist/index.cjs.map +1 -1
  10. package/dist/index.d.ts +1 -0
  11. package/dist/index.js +216 -53
  12. package/dist/index.js.map +1 -1
  13. package/dist/pipeline/advanced/pipes/i18n/index.d.ts +1 -0
  14. package/dist/pipeline/advanced/pipes/i18n/locale.d.ts +2 -0
  15. package/dist/pipeline/advanced/pipes/index.d.ts +1 -0
  16. package/dist/pipeline/constant.d.ts +1 -1
  17. package/dist/pipeline/utils/format/createFormatter.d.ts +2 -1
  18. package/dist/pipeline/utils/format/createNumFormatter.d.ts +2 -1
  19. package/dist/pipeline/utils/format/index.d.ts +2 -2
  20. package/dist/types/advancedVSeed.d.ts +10 -4
  21. package/dist/types/chartType/area/area.d.ts +7 -0
  22. package/dist/types/chartType/areaPercent/areaPercent.d.ts +7 -0
  23. package/dist/types/chartType/bar/bar.d.ts +7 -0
  24. package/dist/types/chartType/barParallel/barParallel.d.ts +7 -0
  25. package/dist/types/chartType/barPercent/barPercent.d.ts +7 -0
  26. package/dist/types/chartType/column/column.d.ts +7 -0
  27. package/dist/types/chartType/columnParallel/columnParallel.d.ts +7 -0
  28. package/dist/types/chartType/columnPercent/columnPercent.d.ts +7 -0
  29. package/dist/types/chartType/donut/donut.d.ts +7 -0
  30. package/dist/types/chartType/dualAxis/dualAxis.d.ts +7 -0
  31. package/dist/types/chartType/line/line.d.ts +7 -0
  32. package/dist/types/chartType/pie/pie.d.ts +7 -0
  33. package/dist/types/chartType/pivotTable/pivotTable.d.ts +7 -0
  34. package/dist/types/chartType/rose/rose.d.ts +7 -0
  35. package/dist/types/chartType/table/table.d.ts +7 -0
  36. package/dist/types/i18n/i18n.d.ts +9 -0
  37. package/dist/types/i18n/index.d.ts +1 -0
  38. package/dist/types/index.d.ts +1 -0
  39. package/dist/types/properties/datasetReshapeInfo/datasetReshapeInfo.d.ts +6 -0
  40. package/dist/types/properties/measures/measures.d.ts +8 -8
  41. package/dist/types/vseed.d.ts +13 -9
  42. package/package.json +1 -1
@@ -19,6 +19,8 @@ export declare class Builder implements VSeedBuilder {
19
19
  };
20
20
  unfoldInfo: {
21
21
  colorItems: string[];
22
+ groupId: string;
23
+ colorIdMap: Record<string, string>;
22
24
  groupName: string;
23
25
  };
24
26
  }[];
@@ -1396,6 +1398,7 @@ export declare class Builder implements VSeedBuilder {
1396
1398
  outerPadding?: number | undefined;
1397
1399
  }[] | undefined;
1398
1400
  };
1401
+ locale: "zh-CN" | "en-US";
1399
1402
  dimensions?: {
1400
1403
  id: string;
1401
1404
  location: "dimension" | "rowDimension" | "columnDimension";
@@ -5554,6 +5557,8 @@ export declare class Builder implements VSeedBuilder {
5554
5557
  };
5555
5558
  unfoldInfo: {
5556
5559
  colorItems: string[];
5560
+ groupId: string;
5561
+ colorIdMap: Record<string, string>;
5557
5562
  groupName: string;
5558
5563
  };
5559
5564
  }[];
@@ -6931,6 +6936,7 @@ export declare class Builder implements VSeedBuilder {
6931
6936
  outerPadding?: number | undefined;
6932
6937
  }[] | undefined;
6933
6938
  };
6939
+ locale: "zh-CN" | "en-US";
6934
6940
  dimensions?: {
6935
6941
  id: string;
6936
6942
  location: "dimension" | "rowDimension" | "columnDimension";
@@ -8353,6 +8359,8 @@ export declare class Builder implements VSeedBuilder {
8353
8359
  };
8354
8360
  unfoldInfo: {
8355
8361
  colorItems: string[];
8362
+ groupId: string;
8363
+ colorIdMap: Record<string, string>;
8356
8364
  groupName: string;
8357
8365
  };
8358
8366
  }[];
@@ -9730,6 +9738,7 @@ export declare class Builder implements VSeedBuilder {
9730
9738
  outerPadding?: number | undefined;
9731
9739
  }[] | undefined;
9732
9740
  };
9741
+ locale: "zh-CN" | "en-US";
9733
9742
  dimensions?: {
9734
9743
  id: string;
9735
9744
  location: "dimension" | "rowDimension" | "columnDimension";
@@ -2,5 +2,6 @@ export declare const FoldMeasureName = "__MeaName__";
2
2
  export declare const FoldMeasureValue = "__MeaValue__";
3
3
  export declare const FoldMeasureId = "__MeaId__";
4
4
  export declare const UnfoldDimensionGroup = "__DimGroup__";
5
+ export declare const UnfoldDimensionGroupId = "__DimGroupID__";
5
6
  export declare const Separator = "-";
6
7
  export declare const ORIGINAL_DATA = "__OriginalData__";
@@ -11,6 +11,7 @@ export declare const dataReshapeFor1D1M: (dataset: Dataset, dimensions: Dimensio
11
11
  foldMeasureName?: string;
12
12
  foldMeasureValue?: string;
13
13
  unfoldDimensionGroup?: string;
14
+ unfoldDimensionGroupId?: string;
14
15
  }) => {
15
16
  dataset: Dataset;
16
17
  foldInfo: FoldInfo;
@@ -11,6 +11,7 @@ export declare const dataReshapeFor2D1M: (dataset: Dataset, dimensions: Dimensio
11
11
  foldMeasureName?: string;
12
12
  foldMeasureValue?: string;
13
13
  unfoldDimensionGroup?: string;
14
+ unfoldDimensionGroupId?: string;
14
15
  }) => {
15
16
  dataset: Dataset;
16
17
  foldInfo: FoldInfo;
@@ -5,7 +5,7 @@ import type { UnfoldInfo } from '../types';
5
5
  * 展开指定的维度
6
6
  * @description 第一步: 根据指定的维度, 将多个维度展开为N个指标(取决于维值去重后的数量), 随后合并成一个维度.
7
7
  */
8
- export declare const unfoldDimensions: (dataset: Dataset, dimensions: Dimension[], measures: Measure[], unfoldStartIndex?: number, foldGroupName?: string, dimensionsSeparator?: string) => {
8
+ export declare const unfoldDimensions: (dataset: Dataset, dimensions: Dimension[], measures: Measure[], unfoldStartIndex?: number, unfoldGroupName?: string, unfoldGroupId?: string, foldMeasureId?: string, dimensionsSeparator?: string) => {
9
9
  dataset: Dataset;
10
10
  unfoldInfo: UnfoldInfo;
11
11
  };
@@ -0,0 +1,17 @@
1
+ import type { Locale } from '../types';
2
+ declare class Intl {
3
+ private static instance;
4
+ private translateMap;
5
+ private locale;
6
+ canTranslate: (value: string) => boolean;
7
+ /**
8
+ * @example i18n`指标名称`
9
+ */
10
+ i18n: (segments: TemplateStringsArray, ...values: Array<number | string>) => string;
11
+ setLocale: (locale: Locale) => void;
12
+ getLocale: () => Locale;
13
+ static getInstance(): Intl;
14
+ }
15
+ declare const intl: Intl;
16
+ declare const i18n: (segments: TemplateStringsArray, ...values: Array<number | string>) => string;
17
+ export { intl, i18n };
@@ -0,0 +1 @@
1
+ export * from './i18n.ts';