@devtable/dashboard 8.44.1 → 8.46.0

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.
@@ -1,6 +1,6 @@
1
1
  import { AnyObject } from '~/types';
2
2
  export declare type AggregationType = {
3
- type: 'none' | 'sum' | 'mean' | 'median' | 'max' | 'min';
3
+ type: 'none' | 'sum' | 'mean' | 'median' | 'max' | 'min' | 'CV' | 'std';
4
4
  config: Record<$TSFixMe, never>;
5
5
  } | {
6
6
  type: 'quantile';
@@ -9,4 +9,4 @@ export declare type AggregationType = {
9
9
  };
10
10
  };
11
11
  export declare const DefaultAggregation: AggregationType;
12
- export declare function aggregateValue(data: AnyObject[], data_field: string, aggregation: AggregationType): number | number[] | null;
12
+ export declare function aggregateValue(data: AnyObject[], data_field: string, aggregation: AggregationType): number | number[] | "N/A" | null;
@@ -3,11 +3,13 @@ import dayjs from 'dayjs';
3
3
  import lodash from 'lodash';
4
4
  import numbro from 'numbro';
5
5
  import * as d3Array from 'd3-array';
6
+ import * as mathjs from 'mathjs';
6
7
  export declare const functionUtils: {
7
8
  CryptoJS: typeof CryptoJS;
8
9
  d3Array: typeof d3Array;
9
10
  dayjs: typeof dayjs;
10
11
  lodash: lodash.LoDashStatic;
11
12
  numbro: typeof numbro;
13
+ mathjs: mathjs.MathJsStatic;
12
14
  };
13
- export declare const FunctionUtilsDescription = "\n<p>\n Parameter <code>utils</code> is <code>functionUtils</code>, which contains:\n</p>\n<ul>\n <li>\n <p>\n <code>CryptoJS</code>\n <a\n target=\"_blank\"\n rel=\"noopener noreferrer nofollow\"\n href=\"https://github.com/brix/crypto-js\"\n >crypto-js@4.1.1</a\n >\n </p>\n </li>\n <li>\n <p>\n <code>d3Array</code>\n <a\n target=\"_blank\"\n rel=\"noopener noreferrer nofollow\"\n href=\"https://github.com/d3/d3-array\"\n >d3-array@3.2.0</a\n >\n </p>\n </li>\n <li>\n <p>\n <code>dayjs</code>\n <a\n target=\"_blank\"\n rel=\"noopener noreferrer nofollow\"\n href=\"https://day.js.org/\"\n >dayjs@1.11.6</a\n >\n </p>\n </li>\n <li>\n <p>\n <code>lodash</code>\n <a\n rel=\"noopener noreferrer nofollow\"\n href=\"https://lodash.com/docs/4.17.15\"\n >lodash@4.17.21</a\n >\n </p>\n </li>\n <li>\n <p>\n <code>numbro</code>\n <a rel=\"noopener noreferrer nofollow\" href=\"https://numbrojs.com/\"\n >numbro@2.3.6</a\n >\n </p>\n </li>\n</ul>\n\n";
15
+ export declare const FunctionUtilsDescription: string;
@@ -1,4 +1,4 @@
1
1
  import { ITemplateVariable } from './types';
2
2
  export declare function getNonStatsDataText(data: $TSFixMe): any;
3
- export declare function getAggregatedValue({ data_field, aggregation }: ITemplateVariable, data: Record<string, number>[]): number | number[] | null;
3
+ export declare function getAggregatedValue({ data_field, aggregation }: ITemplateVariable, data: Record<string, number>[]): number | number[] | "N/A" | null;
4
4
  export declare function formatAggregatedValue({ formatter }: ITemplateVariable, value: number | string | number[] | null): any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devtable/dashboard",
3
- "version": "8.44.1",
3
+ "version": "8.46.0",
4
4
  "license": "Apache-2.0",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -34,6 +34,7 @@
34
34
  "@monaco-editor/react": "4.4.6",
35
35
  "@types/chroma-js": "^2.1.4",
36
36
  "file-saver": "2.0.5",
37
+ "mathjs": "11.7.0",
37
38
  "monaco-editor": "0.36.0",
38
39
  "performant-array-to-tree": "1.11.0",
39
40
  "popmotion": "^11.0.3",
@@ -55,18 +56,23 @@
55
56
  "@testing-library/react": "^13.3.0",
56
57
  "@testing-library/react-hooks": "^8.0.1",
57
58
  "@testing-library/user-event": "^14.3.0",
58
- "@tiptap/extension-code-block-lowlight": "^2.0.0-beta.209",
59
- "@tiptap/extension-color": "^2.0.0-beta.209",
60
- "@tiptap/extension-highlight": "^2.0.0-beta.209",
61
- "@tiptap/extension-link": "^2.0.0-beta.209",
62
- "@tiptap/extension-placeholder": "^2.0.0-beta.209",
63
- "@tiptap/extension-subscript": "^2.0.0-beta.209",
64
- "@tiptap/extension-superscript": "^2.0.0-beta.209",
65
- "@tiptap/extension-text-align": "^2.0.0-beta.209",
66
- "@tiptap/extension-text-style": "^2.0.0-beta.209",
67
- "@tiptap/extension-underline": "^2.0.0-beta.209",
68
- "@tiptap/react": "^2.0.0-beta.209",
69
- "@tiptap/starter-kit": "^2.0.0-beta.209",
59
+ "@tiptap/extension-code-block-lowlight": "2.0.1",
60
+ "@tiptap/extension-color": "2.0.1",
61
+ "@tiptap/extension-highlight": "2.0.1",
62
+ "@tiptap/extension-link": "2.0.1",
63
+ "@tiptap/extension-placeholder": "2.0.1",
64
+ "@tiptap/extension-subscript": "2.0.1",
65
+ "@tiptap/extension-superscript": "2.0.1",
66
+ "@tiptap/extension-table": "2.0.1",
67
+ "@tiptap/extension-table-cell": "2.0.1",
68
+ "@tiptap/extension-table-header": "2.0.1",
69
+ "@tiptap/extension-table-row": "2.0.1",
70
+ "@tiptap/extension-text-align": "2.0.1",
71
+ "@tiptap/extension-text-style": "2.0.1",
72
+ "@tiptap/extension-underline": "2.0.1",
73
+ "@tiptap/pm": "2.0.1",
74
+ "@tiptap/react": "2.0.1",
75
+ "@tiptap/starter-kit": "2.0.1",
70
76
  "@types/crypto-js": "v4.1.1",
71
77
  "@types/d3-array": "3.0.3",
72
78
  "@types/eventemitter2": "^4.1.0",
@@ -114,18 +120,23 @@
114
120
  "@mantine/tiptap": "5.9.5",
115
121
  "@tabler/icons": "^1.118.0",
116
122
  "@tanstack/react-table": "^8.5.13",
117
- "@tiptap/extension-code-block-lowlight": "^2.0.0-beta.209",
118
- "@tiptap/extension-color": "^2.0.0-beta.209",
119
- "@tiptap/extension-highlight": "^2.0.0-beta.209",
120
- "@tiptap/extension-link": "^2.0.0-beta.209",
121
- "@tiptap/extension-placeholder": "^2.0.0-beta.209",
122
- "@tiptap/extension-subscript": "^2.0.0-beta.209",
123
- "@tiptap/extension-superscript": "^2.0.0-beta.209",
124
- "@tiptap/extension-text-align": "^2.0.0-beta.209",
125
- "@tiptap/extension-text-style": "^2.0.0-beta.209",
126
- "@tiptap/extension-underline": "^2.0.0-beta.209",
127
- "@tiptap/react": "^2.0.0-beta.209",
128
- "@tiptap/starter-kit": "^2.0.0-beta.209",
123
+ "@tiptap/extension-code-block-lowlight": "2.0.1",
124
+ "@tiptap/extension-color": "2.0.1",
125
+ "@tiptap/extension-highlight": "2.0.1",
126
+ "@tiptap/extension-link": "2.0.1",
127
+ "@tiptap/extension-placeholder": "2.0.1",
128
+ "@tiptap/extension-subscript": "2.0.1",
129
+ "@tiptap/extension-superscript": "2.0.1",
130
+ "@tiptap/extension-table": "2.0.1",
131
+ "@tiptap/extension-table-cell": "2.0.1",
132
+ "@tiptap/extension-table-header": "2.0.1",
133
+ "@tiptap/extension-table-row": "2.0.1",
134
+ "@tiptap/extension-text-align": "2.0.1",
135
+ "@tiptap/extension-text-style": "2.0.1",
136
+ "@tiptap/extension-underline": "2.0.1",
137
+ "@tiptap/pm": "2.0.1",
138
+ "@tiptap/react": "2.0.1",
139
+ "@tiptap/starter-kit": "2.0.1",
129
140
  "ahooks": "^3.3.11",
130
141
  "axios": "^0.27.2",
131
142
  "chroma-js": "^2.4.2",