@deephaven/jsapi-utils 0.38.1-beta.0 → 0.38.1-beta.12
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/dist/ConnectionUtils.d.ts +1 -1
- package/dist/ConnectionUtils.d.ts.map +1 -1
- package/dist/ConnectionUtils.js.map +1 -1
- package/dist/DateUtils.d.ts +4 -4
- package/dist/DateUtils.d.ts.map +1 -1
- package/dist/DateUtils.js +16 -17
- package/dist/DateUtils.js.map +1 -1
- package/dist/Formatter.d.ts +3 -1
- package/dist/Formatter.d.ts.map +1 -1
- package/dist/Formatter.js +8 -7
- package/dist/Formatter.js.map +1 -1
- package/dist/FormatterUtils.d.ts +1 -1
- package/dist/FormatterUtils.js.map +1 -1
- package/dist/SessionUtils.d.ts +3 -3
- package/dist/SessionUtils.d.ts.map +1 -1
- package/dist/SessionUtils.js +2 -2
- package/dist/SessionUtils.js.map +1 -1
- package/dist/TableUtils.d.ts +106 -46
- package/dist/TableUtils.d.ts.map +1 -1
- package/dist/TableUtils.js +444 -284
- package/dist/TableUtils.js.map +1 -1
- package/dist/ViewportDataUtils.d.ts +13 -5
- package/dist/ViewportDataUtils.d.ts.map +1 -1
- package/dist/ViewportDataUtils.js +20 -9
- package/dist/ViewportDataUtils.js.map +1 -1
- package/dist/formatters/DateTimeColumnFormatter.d.ts +5 -3
- package/dist/formatters/DateTimeColumnFormatter.d.ts.map +1 -1
- package/dist/formatters/DateTimeColumnFormatter.js +8 -5
- package/dist/formatters/DateTimeColumnFormatter.js.map +1 -1
- package/dist/formatters/DecimalColumnFormatter.d.ts +5 -2
- package/dist/formatters/DecimalColumnFormatter.d.ts.map +1 -1
- package/dist/formatters/DecimalColumnFormatter.js +8 -5
- package/dist/formatters/DecimalColumnFormatter.js.map +1 -1
- package/dist/formatters/IntegerColumnFormatter.d.ts +5 -2
- package/dist/formatters/IntegerColumnFormatter.d.ts.map +1 -1
- package/dist/formatters/IntegerColumnFormatter.js +8 -5
- package/dist/formatters/IntegerColumnFormatter.js.map +1 -1
- package/dist/formatters/TableColumnFormatter.d.ts +3 -1
- package/dist/formatters/TableColumnFormatter.d.ts.map +1 -1
- package/dist/formatters/TableColumnFormatter.js +2 -1
- package/dist/formatters/TableColumnFormatter.js.map +1 -1
- package/package.json +8 -8
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DateWrapper, TimeZone } from '@deephaven/jsapi-types';
|
|
1
|
+
import type { dh as DhType, DateWrapper, TimeZone } from '@deephaven/jsapi-types';
|
|
2
2
|
import TableColumnFormatter, { TableColumnFormat } from './TableColumnFormatter';
|
|
3
3
|
export type DateTimeColumnFormatterOptions = {
|
|
4
4
|
timeZone?: string;
|
|
@@ -9,10 +9,11 @@ export type DateTimeColumnFormatterOptions = {
|
|
|
9
9
|
export declare class DateTimeColumnFormatter extends TableColumnFormatter<Date | DateWrapper | number> {
|
|
10
10
|
/**
|
|
11
11
|
* Validates format object
|
|
12
|
+
* @param dh JSAPI instance
|
|
12
13
|
* @param format Format object
|
|
13
14
|
* @returns true for valid object
|
|
14
15
|
*/
|
|
15
|
-
static isValid(format: Pick<TableColumnFormat, 'formatString'>): boolean;
|
|
16
|
+
static isValid(dh: DhType, format: Pick<TableColumnFormat, 'formatString'>): boolean;
|
|
16
17
|
static makeFormat(label: string, formatString: string, type?: import("./TableColumnFormatter").TableColumnFormatType): TableColumnFormat;
|
|
17
18
|
/**
|
|
18
19
|
* Check if the given formats match
|
|
@@ -27,12 +28,13 @@ export declare class DateTimeColumnFormatter extends TableColumnFormatter<Date |
|
|
|
27
28
|
static getGlobalFormats(showTimeZone: boolean, showTSeparator: boolean): string[];
|
|
28
29
|
static makeFormatStringMap(showTimeZone?: boolean, showTSeparator?: boolean): Map<string, string>;
|
|
29
30
|
static getFormats(showTimeZone?: boolean, showTSeparator?: boolean): string[];
|
|
31
|
+
dh: DhType;
|
|
30
32
|
dhTimeZone: TimeZone;
|
|
31
33
|
defaultDateTimeFormatString: string;
|
|
32
34
|
showTimeZone: boolean;
|
|
33
35
|
showTSeparator: boolean;
|
|
34
36
|
formatStringMap: Map<string, string>;
|
|
35
|
-
constructor({ timeZone: timeZoneParam, showTimeZone, showTSeparator, defaultDateTimeFormatString, }?: DateTimeColumnFormatterOptions);
|
|
37
|
+
constructor(dh: DhType, { timeZone: timeZoneParam, showTimeZone, showTSeparator, defaultDateTimeFormatString, }?: DateTimeColumnFormatterOptions);
|
|
36
38
|
getEffectiveFormatString(baseFormatString: string): string;
|
|
37
39
|
format(value: Date | DateWrapper | number, format?: Partial<TableColumnFormat>): string;
|
|
38
40
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateTimeColumnFormatter.d.ts","sourceRoot":"","sources":["../../src/formatters/DateTimeColumnFormatter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DateTimeColumnFormatter.d.ts","sourceRoot":"","sources":["../../src/formatters/DateTimeColumnFormatter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,EAAE,IAAI,MAAM,EACZ,WAAW,EACX,QAAQ,EACT,MAAM,wBAAwB,CAAC;AAEhC,OAAO,oBAAoB,EAAE,EAC3B,iBAAiB,EAClB,MAAM,wBAAwB,CAAC;AAIhC,MAAM,MAAM,8BAA8B,GAAG;IAE3C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAGlB,YAAY,CAAC,EAAE,OAAO,CAAC;IAGvB,cAAc,CAAC,EAAE,OAAO,CAAC;IAGzB,2BAA2B,CAAC,EAAE,MAAM,CAAC;CACtC,CAAC;AAEF,qBAAa,uBAAwB,SAAQ,oBAAoB,CAC/D,IAAI,GAAG,WAAW,GAAG,MAAM,CAC5B;IACC;;;;;OAKG;IACH,MAAM,CAAC,OAAO,CACZ,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,IAAI,CAAC,iBAAiB,EAAE,cAAc,CAAC,GAC9C,OAAO;IASV,MAAM,CAAC,UAAU,CACf,KAAK,EAAE,MAAM,EACb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CAAC"}
|
|
@@ -2,17 +2,18 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
2
2
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
3
3
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
4
4
|
/* eslint class-methods-use-this: "off" */
|
|
5
|
-
|
|
5
|
+
|
|
6
6
|
import Log from '@deephaven/log';
|
|
7
7
|
import TableColumnFormatter from "./TableColumnFormatter.js";
|
|
8
8
|
var log = Log.module('DateTimeColumnFormatter');
|
|
9
9
|
export class DateTimeColumnFormatter extends TableColumnFormatter {
|
|
10
10
|
/**
|
|
11
11
|
* Validates format object
|
|
12
|
+
* @param dh JSAPI instance
|
|
12
13
|
* @param format Format object
|
|
13
14
|
* @returns true for valid object
|
|
14
15
|
*/
|
|
15
|
-
static isValid(format) {
|
|
16
|
+
static isValid(dh, format) {
|
|
16
17
|
try {
|
|
17
18
|
dh.i18n.DateTimeFormat.format(format.formatString, new Date());
|
|
18
19
|
return true;
|
|
@@ -56,14 +57,15 @@ export class DateTimeColumnFormatter extends TableColumnFormatter {
|
|
|
56
57
|
var formatStringMap = DateTimeColumnFormatter.makeFormatStringMap(showTimeZone, showTSeparator);
|
|
57
58
|
return [...formatStringMap.keys()];
|
|
58
59
|
}
|
|
59
|
-
constructor() {
|
|
60
|
+
constructor(dh) {
|
|
60
61
|
var {
|
|
61
62
|
timeZone: timeZoneParam = '',
|
|
62
63
|
showTimeZone = true,
|
|
63
64
|
showTSeparator = false,
|
|
64
65
|
defaultDateTimeFormatString = DateTimeColumnFormatter.DEFAULT_DATETIME_FORMAT_STRING
|
|
65
|
-
} = arguments.length >
|
|
66
|
+
} = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
66
67
|
super();
|
|
68
|
+
_defineProperty(this, "dh", void 0);
|
|
67
69
|
_defineProperty(this, "dhTimeZone", void 0);
|
|
68
70
|
_defineProperty(this, "defaultDateTimeFormatString", void 0);
|
|
69
71
|
_defineProperty(this, "showTimeZone", void 0);
|
|
@@ -76,6 +78,7 @@ export class DateTimeColumnFormatter extends TableColumnFormatter {
|
|
|
76
78
|
log.error('Unsupported time zone id', timeZone);
|
|
77
79
|
this.dhTimeZone = dh.i18n.TimeZone.getTimeZone(DateTimeColumnFormatter.DEFAULT_TIME_ZONE_ID);
|
|
78
80
|
}
|
|
81
|
+
this.dh = dh;
|
|
79
82
|
this.defaultDateTimeFormatString = defaultDateTimeFormatString;
|
|
80
83
|
this.showTimeZone = showTimeZone;
|
|
81
84
|
this.showTSeparator = showTSeparator;
|
|
@@ -90,7 +93,7 @@ export class DateTimeColumnFormatter extends TableColumnFormatter {
|
|
|
90
93
|
var baseFormatString = format.formatString != null && format.formatString !== '' ? format.formatString : this.defaultDateTimeFormatString;
|
|
91
94
|
var formatString = this.getEffectiveFormatString(baseFormatString);
|
|
92
95
|
try {
|
|
93
|
-
return dh.i18n.DateTimeFormat.format(formatString, value, this.dhTimeZone);
|
|
96
|
+
return this.dh.i18n.DateTimeFormat.format(formatString, value, this.dhTimeZone);
|
|
94
97
|
} catch (e) {
|
|
95
98
|
log.error('Invalid format arguments');
|
|
96
99
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateTimeColumnFormatter.js","names":["dh","Log","TableColumnFormatter","log","module","DateTimeColumnFormatter","isValid","format","i18n","DateTimeFormat","formatString","Date","e","makeFormat","label","type","TYPE_CONTEXT_PRESET","isSameFormat","formatA","formatB","makeGlobalFormatStringMap","showTimeZone","showTSeparator","separator","tz","Map","getGlobalFormats","formatStringMap","keys","makeFormatStringMap","undefined","getFormats","constructor","timeZone","timeZoneParam","defaultDateTimeFormatString","DEFAULT_DATETIME_FORMAT_STRING","DEFAULT_TIME_ZONE_ID","dhTimeZone","TimeZone","getTimeZone","error","getEffectiveFormatString","baseFormatString","get","value"],"sources":["../../src/formatters/DateTimeColumnFormatter.ts"],"sourcesContent":["/* eslint class-methods-use-this: \"off\" */\nimport dh from '@deephaven/jsapi-shim';\nimport type { DateWrapper, TimeZone } from '@deephaven/jsapi-types';\nimport Log from '@deephaven/log';\nimport TableColumnFormatter, {\n TableColumnFormat,\n} from './TableColumnFormatter';\n\nconst log = Log.module('DateTimeColumnFormatter');\n\nexport type DateTimeColumnFormatterOptions = {\n // Time zone\n timeZone?: string;\n\n // Show time zone in DateTime values\n showTimeZone?: boolean;\n\n // Show 'T' separator in DateTime values\n showTSeparator?: boolean;\n\n // DateTime format to use if columnFormats for DateTime isn't set\n defaultDateTimeFormatString?: string;\n};\n\nexport class DateTimeColumnFormatter extends TableColumnFormatter<\n Date | DateWrapper | number\n> {\n /**\n * Validates format object\n * @param format Format object\n * @returns true for valid object\n */\n static isValid(format: Pick<TableColumnFormat, 'formatString'>): boolean {\n try {\n dh.i18n.DateTimeFormat.format(format.formatString, new Date());\n return true;\n } catch (e) {\n return false;\n }\n }\n\n static makeFormat(\n label: string,\n formatString: string,\n type = TableColumnFormatter.TYPE_CONTEXT_PRESET\n ): TableColumnFormat {\n return {\n label,\n formatString,\n type,\n };\n }\n\n /**\n * Check if the given formats match\n * @param formatA format object to check\n * @param formatB format object to check\n * @returns True if the formats match\n */\n static isSameFormat(\n formatA: TableColumnFormat | null,\n formatB: TableColumnFormat | null\n ): boolean {\n return (\n formatA === formatB ||\n (formatA !== null &&\n formatB !== null &&\n formatA.type === formatB.type &&\n formatA.formatString === formatB.formatString)\n );\n }\n\n static DEFAULT_DATETIME_FORMAT_STRING = 'yyyy-MM-dd HH:mm:ss.SSS';\n\n static DEFAULT_TIME_ZONE_ID = 'America/New_York';\n\n static makeGlobalFormatStringMap(\n showTimeZone: boolean,\n showTSeparator: boolean\n ): Map<string, string> {\n const separator = showTSeparator ? `'T'` : ' ';\n const tz = showTimeZone ? ' z' : '';\n return new Map([\n ['yyyy-MM-dd HH:mm:ss', `yyyy-MM-dd${separator}HH:mm:ss${tz}`],\n ['yyyy-MM-dd HH:mm:ss.SSS', `yyyy-MM-dd${separator}HH:mm:ss.SSS${tz}`],\n [\n 'yyyy-MM-dd HH:mm:ss.SSSSSSSSS',\n `yyyy-MM-dd${separator}HH:mm:ss.SSSSSSSSS${tz}`,\n ],\n ]);\n }\n\n static getGlobalFormats(\n showTimeZone: boolean,\n showTSeparator: boolean\n ): string[] {\n const formatStringMap = DateTimeColumnFormatter.makeGlobalFormatStringMap(\n showTimeZone,\n showTSeparator\n );\n return [...formatStringMap.keys()];\n }\n\n static makeFormatStringMap(\n showTimeZone?: boolean,\n showTSeparator?: boolean\n ): Map<string, string> {\n const separator =\n showTSeparator !== undefined && showTSeparator ? `'T'` : ' ';\n const tz = showTimeZone !== undefined && showTimeZone ? ' z' : '';\n return new Map([\n ['yyyy-MM-dd', `yyyy-MM-dd${tz}`],\n ['MM-dd-yyyy', `MM-dd-yyyy${tz}`],\n ['HH:mm:ss', `HH:mm:ss${tz}`],\n ['HH:mm:ss.SSS', `HH:mm:ss.SSS${tz}`],\n ['HH:mm:ss.SSSSSSSSS', `HH:mm:ss.SSSSSSSSS${tz}`],\n ['yyyy-MM-dd HH:mm:ss', `yyyy-MM-dd${separator}HH:mm:ss${tz}`],\n ['yyyy-MM-dd HH:mm:ss.SSS', `yyyy-MM-dd${separator}HH:mm:ss.SSS${tz}`],\n [\n 'yyyy-MM-dd HH:mm:ss.SSSSSSSSS',\n `yyyy-MM-dd${separator}HH:mm:ss.SSSSSSSSS${tz}`,\n ],\n ]);\n }\n\n static getFormats(\n showTimeZone?: boolean,\n showTSeparator?: boolean\n ): string[] {\n const formatStringMap = DateTimeColumnFormatter.makeFormatStringMap(\n showTimeZone,\n showTSeparator\n );\n return [...formatStringMap.keys()];\n }\n\n dhTimeZone: TimeZone;\n\n defaultDateTimeFormatString: string;\n\n showTimeZone: boolean;\n\n showTSeparator: boolean;\n\n formatStringMap: Map<string, string>;\n\n constructor({\n timeZone: timeZoneParam = '',\n showTimeZone = true,\n showTSeparator = false,\n defaultDateTimeFormatString = DateTimeColumnFormatter.DEFAULT_DATETIME_FORMAT_STRING,\n }: DateTimeColumnFormatterOptions = {}) {\n super();\n\n const timeZone =\n timeZoneParam || DateTimeColumnFormatter.DEFAULT_TIME_ZONE_ID;\n\n try {\n this.dhTimeZone = dh.i18n.TimeZone.getTimeZone(timeZone);\n } catch (e) {\n log.error('Unsupported time zone id', timeZone);\n this.dhTimeZone = dh.i18n.TimeZone.getTimeZone(\n DateTimeColumnFormatter.DEFAULT_TIME_ZONE_ID\n );\n }\n\n this.defaultDateTimeFormatString = defaultDateTimeFormatString;\n this.showTimeZone = showTimeZone;\n this.showTSeparator = showTSeparator;\n this.formatStringMap = DateTimeColumnFormatter.makeFormatStringMap(\n showTimeZone,\n showTSeparator\n );\n }\n\n getEffectiveFormatString(baseFormatString: string): string {\n return this.formatStringMap.get(baseFormatString) ?? baseFormatString;\n }\n\n format(\n value: Date | DateWrapper | number,\n format: Partial<TableColumnFormat> = {}\n ): string {\n const baseFormatString =\n format.formatString != null && format.formatString !== ''\n ? format.formatString\n : this.defaultDateTimeFormatString;\n const formatString = this.getEffectiveFormatString(baseFormatString);\n try {\n return dh.i18n.DateTimeFormat.format(\n formatString,\n value,\n this.dhTimeZone\n );\n } catch (e) {\n log.error('Invalid format arguments');\n }\n return '';\n }\n}\n\nexport default DateTimeColumnFormatter;\n"],"mappings":";;;AAAA;AACA,OAAOA,EAAE,MAAM,uBAAuB;AAEtC,OAAOC,GAAG,MAAM,gBAAgB;AAAC,OAC1BC,oBAAoB;AAI3B,IAAMC,GAAG,GAAGF,GAAG,CAACG,MAAM,CAAC,yBAAyB,CAAC;AAgBjD,OAAO,MAAMC,uBAAuB,SAASH,oBAAoB,CAE/D;EACA;AACF;AACA;AACA;AACA;EACE,OAAOI,OAAO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ColumnFormatter.js","names":["Log","TableColumnFormatter","log","module","DateTimeColumnFormatter","isValid","dh","format","i18n","DateTimeFormat","formatString","Date","e","makeFormat","label","type","TYPE_CONTEXT_PRESET","isSameFormat","formatA","formatB","makeGlobalFormatStringMap","showTimeZone","showTSeparator","separator","tz","Map","getGlobalFormats","formatStringMap","keys","makeFormatStringMap","undefined","getFormats","constructor","timeZone","timeZoneParam","defaultDateTimeFormatString","DEFAULT_DATETIME_FORMAT_STRING","DEFAULT_TIME_ZONE_ID","dhTimeZone","TimeZone","getTimeZone","error","getEffectiveFormatString","baseFormatString","get","value"],"sources":["../../src/formatters/DateTimeColumnFormatter.ts"],"sourcesContent":["/* eslint class-methods-use-this: \"off\" */\nimport type {\n dh as DhType,\n DateWrapper,\n TimeZone,\n} from '@deephaven/jsapi-types';\nimport Log from '@deephaven/log';\nimport TableColumnFormatter, {\n TableColumnFormat,\n} from './TableColumnFormatter';\n\nconst log = Log.module('DateTimeColumnFormatter');\n\nexport type DateTimeColumnFormatterOptions = {\n // Time zone\n timeZone?: string;\n\n // Show time zone in DateTime values\n showTimeZone?: boolean;\n\n // Show 'T' separator in DateTime values\n showTSeparator?: boolean;\n\n // DateTime format to use if columnFormats for DateTime isn't set\n defaultDateTimeFormatString?: string;\n};\n\nexport class DateTimeColumnFormatter extends TableColumnFormatter<\n Date | DateWrapper | number\n> {\n /**\n * Validates format object\n * @param dh JSAPI instance\n * @param format Format object\n * @returns true for valid object\n */\n static isValid(\n dh: DhType,\n format: Pick<TableColumnFormat, 'formatString'>\n ): boolean {\n try {\n dh.i18n.DateTimeFormat.format(format.formatString, new Date());\n return true;\n } catch (e) {\n return false;\n }\n }\n\n static makeFormat(\n label: string,\n formatString: string,\n type = TableColumnFormatter.TYPE_CONTEXT_PRESET\n ): TableColumnFormat {\n return {\n label,\n formatString,\n type,\n };\n }\n\n /**\n * Check if the given formats match\n * @param formatA format object to check\n * @param formatB format object to check\n * @returns True if the formats match\n */\n static isSameFormat(\n formatA: TableColumnFormat | null,\n formatB: TableColumnFormat | null\n ): boolean {\n return (\n formatA === formatB ||\n (formatA !== null &&\n formatB !== null &&\n formatA.type === formatB.type &&\n formatA.formatString === formatB.formatString)\n );\n }\n\n static DEFAULT_DATETIME_FORMAT_STRING = 'yyyy-MM-dd HH:mm:ss.SSS';\n\n static DEFAULT_TIME_ZONE_ID = 'America/New_York';\n\n static makeGlobalFormatStringMap(\n showTimeZone: boolean,\n showTSeparator: boolean\n ): Map<string, string> {\n const separator = showTSeparator ? `'T'` : ' ';\n const tz = showTimeZone ? ' z' : '';\n return new Map([\n ['yyyy-MM-dd HH:mm:ss', `yyyy-MM-dd${separator}HH:mm:ss${tz}`],\n ['yyyy-MM-dd HH:mm:ss.SSS', `yyyy-MM-dd${separator}HH:mm:ss.SSS${tz}`],\n [\n 'yyyy-MM-dd HH:mm:ss.SSSSSSSSS',\n `yyyy-MM-dd${separator}HH:mm:ss.SSSSSSSSS${tz}`,\n ],\n ]);\n }\n\n static getGlobalFormats(\n showTimeZone: boolean,\n showTSeparator: boolean\n ): string[] {\n const formatStringMap = DateTimeColumnFormatter.makeGlobalFormatStringMap(\n showTimeZone,\n showTSeparator\n );\n return [...formatStringMap.keys()];\n }\n\n static makeFormatStringMap(\n showTimeZone?: boolean,\n showTSeparator?: boolean\n ): Map<string, string> {\n const separator =\n showTSeparator !== undefined && showTSeparator ? `'T'` : ' ';\n const tz = showTimeZone !== undefined && showTimeZone ? ' z' : '';\n return new Map([\n ['yyyy-MM-dd', `yyyy-MM-dd${tz}`],\n ['MM-dd-yyyy', `MM-dd-yyyy${tz}`],\n ['HH:mm:ss', `HH:mm:ss${tz}`],\n ['HH:mm:ss.SSS', `HH:mm:ss.SSS${tz}`],\n ['HH:mm:ss.SSSSSSSSS', `HH:mm:ss.SSSSSSSSS${tz}`],\n ['yyyy-MM-dd HH:mm:ss', `yyyy-MM-dd${separator}HH:mm:ss${tz}`],\n ['yyyy-MM-dd HH:mm:ss.SSS', `yyyy-MM-dd${separator}HH:mm:ss.SSS${tz}`],\n [\n 'yyyy-MM-dd HH:mm:ss.SSSSSSSSS',\n `yyyy-MM-dd${separator}HH:mm:ss.SSSSSSSSS${tz}`,\n ],\n ]);\n }\n\n static getFormats(\n showTimeZone?: boolean,\n showTSeparator?: boolean\n ): string[] {\n const formatStringMap = DateTimeColumnFormatter.makeFormatStringMap(\n showTimeZone,\n showTSeparator\n );\n return [...formatStringMap.keys()];\n }\n\n dh: DhType;\n\n dhTimeZone: TimeZone;\n\n defaultDateTimeFormatString: string;\n\n showTimeZone: boolean;\n\n showTSeparator: boolean;\n\n formatStringMap: Map<string, string>;\n\n constructor(\n dh: DhType,\n {\n timeZone: timeZoneParam = '',\n showTimeZone = true,\n showTSeparator = false,\n defaultDateTimeFormatString = DateTimeColumnFormatter.DEFAULT_DATETIME_FORMAT_STRING,\n }: DateTimeColumnFormatterOptions = {}\n ) {\n super();\n\n const timeZone =\n timeZoneParam || DateTimeColumnFormatter.DEFAULT_TIME_ZONE_ID;\n\n try {\n this.dhTimeZone = dh.i18n.TimeZone.getTimeZone(timeZone);\n } catch (e) {\n log.error('Unsupported time zone id', timeZone);\n this.dhTimeZone = dh.i18n.TimeZone.getTimeZone(\n DateTimeColumnFormatter.DEFAULT_TIME_ZONE_ID\n );\n }\n this.dh = dh;\n this.defaultDateTimeFormatString = defaultDateTimeFormatString;\n this.showTimeZone = showTimeZone;\n this.showTSeparator = showTSeparator;\n this.formatStringMap = DateTimeColumnFormatter.makeFormatStringMap(\n showTimeZone,\n showTSeparator\n );\n }\n\n getEffectiveFormatString(baseFormatString: string): string {\n return this.formatStringMap.get(baseFormatString) ?? baseFormatString;\n }\n\n format(\n value: Date | DateWrapper | number,\n format: Partial<TableColumnFormat> = {}\n ): string {\n const baseFormatString =\n format.formatString != null && format.formatString !== ''\n ? format.formatString\n : this.defaultDateTimeFormatString;\n const formatString = this.getEffectiveFormatString(baseFormatString);\n try {\n return this.dh.i18n.DateTimeFormat.format(\n formatString,\n value,\n this.dhTimeZone\n );\n } catch (e) {\n log.error('Invalid format arguments');\n }\n return '';\n }\n}\n\nexport default DateTimeColumnFormatter;\n"],"mappings":";;;AAAA;;AAMA,OAAOA,GAAG,MAAM,gBAAgB;AAAC,OAC1BC,oBAAoB;AAI3B,IAAMC,GAAG,GAAGF,GAAG,CAACG,MAAM,CAAC,yBAAyB,CAAC;AAgBjD,OAAO,MAAMC,uBAAuB,SAASH,oBAAoB,CAE/D;EACA;AACF;AACA;AACA;AACA;AACA;EACE,OAAOI,OAAO,CACZC,EAAU,EACVC,MAA+C,EACtC;IACT,IAAI;MACFD,EAAE,CAACE,IAAI,CAACC,cAAc,CAACF,MAAM,CAACA,MAAM,CAACG,YAAY,EAAE,IAAIC,IAAI,EAAE,CAAC;MAC9D,OAAO,IAAI;IACb,CAAC,CAAC,OAAOC,CAAC,EAAE;MACV,OAAO,KAAK;IACd;EACF;EAEA,OAAOC,UAAU,CACfC,KAAa,EACbJ,YAAoB,EAED;IAAA,IADnBK,IAAI,uEAAGd,oBAAoB,CAACe,mBAAmB;IAE/C,OAAO;MACLF,KAAK;MACLJ,YAAY;MACZK;IACF,CAAC;EACH;;EAEA;AACF;AACA;AACA;AACA;AACA;EACE,OAAOE,YAAY,CACjBC,OAAiC,EACjCC,OAAiC,EACxB;IACT,OACED,OAAO,KAAKC,OAAO,IAClBD,OAAO,KAAK,IAAI,IACfC,OAAO,KAAK,IAAI,IAChBD,OAAO,CAACH,IAAI,KAAKI,OAAO,CAACJ,IAAI,IAC7BG,OAAO,CAACR,YAAY,KAAKS,OAAO,CAACT,YAAa;EAEpD;EAMA,OAAOU,yBAAyB,CAC9BC,YAAqB,EACrBC,cAAuB,EACF;IACrB,IAAMC,SAAS,GAAGD,cAAc,WAAW,GAAG;IAC9C,IAAME,EAAE,GAAGH,YAAY,GAAG,IAAI,GAAG,EAAE;IACnC,OAAO,IAAII,GAAG,CAAC,CACb,CAAC,qBAAqB,sBAAeF,SAAS,qBAAWC,EAAE,EAAG,EA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gB,CAAC;IACpE,IAAI;MACF,OAAO,IAAI,CAACrC,EAAE,CAACE,IAAI,CAACC,cAAc,CAACF,MAAM,CACvCG,YAAY,EACZmC,KAAK,EACL,IAAI,CAACP,UAAU,CAChB;IACH,CAAC,CAAC,OAAO1B,CAAC,EAAE;MACVV,GAAG,CAACuC,KAAK,CAAC,0BAA0B,CAAC;IACvC;IACA,OAAO,EAAE;EACX;AACF;AAAC,gBAxLYrC,uBAAuB,oCAoDM,yBAAyB;AAAA,gBApDtDA,uBAAuB,0BAsDJ,kBAAkB;AAoIlD,eAAeA,uBAAuB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { dh as DhType } from '@deephaven/jsapi-types';
|
|
1
2
|
import TableColumnFormatter, { TableColumnFormat } from './TableColumnFormatter';
|
|
2
3
|
export type DecimalColumnFormat = TableColumnFormat & {
|
|
3
4
|
multiplier?: number | null;
|
|
@@ -8,10 +9,11 @@ export type DecimalColumnFormatterOptions = {
|
|
|
8
9
|
export declare class DecimalColumnFormatter extends TableColumnFormatter<number> {
|
|
9
10
|
/**
|
|
10
11
|
* Validates format object
|
|
12
|
+
* @param dh JSAPI instance
|
|
11
13
|
* @param format Format object
|
|
12
14
|
* @returns true for valid object
|
|
13
15
|
*/
|
|
14
|
-
static isValid(format: Pick<TableColumnFormat, 'formatString'>): boolean;
|
|
16
|
+
static isValid(dh: DhType, format: Pick<TableColumnFormat, 'formatString'>): boolean;
|
|
15
17
|
/**
|
|
16
18
|
* Create a DecimalColumnFormat object with the parameters specified
|
|
17
19
|
* @param label Label for the format
|
|
@@ -52,7 +54,8 @@ export declare class DecimalColumnFormatter extends TableColumnFormatter<number>
|
|
|
52
54
|
*/
|
|
53
55
|
static isSameFormat(formatA: DecimalColumnFormat | null, formatB: DecimalColumnFormat | null): boolean;
|
|
54
56
|
defaultFormatString: string;
|
|
55
|
-
|
|
57
|
+
dh: DhType;
|
|
58
|
+
constructor(dh: DhType, { defaultFormatString, }?: DecimalColumnFormatterOptions);
|
|
56
59
|
/**
|
|
57
60
|
* Format a value with the provided format object
|
|
58
61
|
* @param valueParam Value to format
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DecimalColumnFormatter.d.ts","sourceRoot":"","sources":["../../src/formatters/DecimalColumnFormatter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DecimalColumnFormatter.d.ts","sourceRoot":"","sources":["../../src/formatters/DecimalColumnFormatter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAE3D,OAAO,oBAAoB,EAAE,EAC3B,iBAAiB,EAClB,MAAM,wBAAwB,CAAC;AAIhC,MAAM,MAAM,mBAAmB,GAAG,iBAAiB,GAAG;IACpD,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG;IAE1C,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,qBAAa,sBAAuB,SAAQ,oBAAoB,CAAC,MAAM,CAAC;IACtE;;;;;OAKG;IACH,MAAM,CAAC,OAAO,CACZ,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,IAAI,CAAC,iBAAiB,EAAE,cAAc,CAAC,GAC9C,OAAO;IASV;;;;;;;OAOG;IACH,MAAM,CAAC,UAAU,CACf,KAAK,EAAE,MAAM,EACb,YAAY,EAAE,MAAM,EACpB,IAAI,yDAA2C,EAC/C,UAAU,CAAC,EAAE,MAAM,GAClB,mBAAmB;IAStB;;;;;;OAMG;IACH,MAAM,CAAC,gBAAgB,CACrB,KAAK,EAAE,MAAM,EACb,YAAY,SAAK,EACjB,UAAU,CAAC,EAAE,MAAM,GAClB,mBAAmB;IAStB;;;;;OAKG;IACH,MAAM,CAAC,gBAAgB,CACrB,YAAY,SAAK,EACjB,UAAU,CAAC,EAAE,MAAM,GAClB,mBAAmB;IAStB,MAAM,CAAC,qBAAqB,SAAkB;IAE9C,MAAM,CAAC,cAAc,sBAGnB;IAEF,MAAM,CAAC,mBAAmB,sBAIxB;IAEF,MAAM,CAAC,eAAe,sBAIpB;IAEF,MAAM,CAAC,0BAA0B,sBAG/B;IAEF,MAAM,CAAC,YAAY,sBAGjB;IAEF,MAAM,CAAC,yBAAyB,sBAG9B;IAEF,MAAM,CAAC,0BAA0B,sBAG/B;IAEF;;;;;OAKG;IACH,MAAM,CAAC,YAAY,CACjB,OAAO,EAAE,mBAAmB,GAAG,IAAI,EACnC,OAAO,EAAE,mBAAmB,GAAG,IAAI,GAClC,OAAO;IAWV,mBAAmB,EAAE,MAAM,CAAC;IAE5B,EAAE,EAAE,MAAM,CAAC;gBAGT,EAAE,EAAE,MAAM,EACV,EACE,mBAAkE,GACnE,GAAE,6BAAkC;IAQvC;;;;;OAKG;IACH,MAAM,CACJ,UAAU,EAAE,MAAM,EAClB,MAAM,GAAE,OAAO,CAAC,mBAAmB,CAAM,GACxC,MAAM;CAgBV;AAED,eAAe,sBAAsB,CAAC"}
|
|
@@ -2,17 +2,18 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
2
2
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
3
3
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
4
4
|
/* eslint class-methods-use-this: "off" */
|
|
5
|
-
|
|
5
|
+
|
|
6
6
|
import Log from '@deephaven/log';
|
|
7
7
|
import TableColumnFormatter from "./TableColumnFormatter.js";
|
|
8
8
|
var log = Log.module('DecimalColumnFormatter');
|
|
9
9
|
export class DecimalColumnFormatter extends TableColumnFormatter {
|
|
10
10
|
/**
|
|
11
11
|
* Validates format object
|
|
12
|
+
* @param dh JSAPI instance
|
|
12
13
|
* @param format Format object
|
|
13
14
|
* @returns true for valid object
|
|
14
15
|
*/
|
|
15
|
-
static isValid(format) {
|
|
16
|
+
static isValid(dh, format) {
|
|
16
17
|
try {
|
|
17
18
|
dh.i18n.NumberFormat.format(format.formatString, 0);
|
|
18
19
|
return true;
|
|
@@ -73,12 +74,14 @@ export class DecimalColumnFormatter extends TableColumnFormatter {
|
|
|
73
74
|
static isSameFormat(formatA, formatB) {
|
|
74
75
|
return formatA === formatB || formatA != null && formatB != null && formatA.type === formatB.type && formatA.formatString === formatB.formatString && formatA.multiplier === formatB.multiplier;
|
|
75
76
|
}
|
|
76
|
-
constructor() {
|
|
77
|
+
constructor(dh) {
|
|
77
78
|
var {
|
|
78
79
|
defaultFormatString = DecimalColumnFormatter.DEFAULT_FORMAT_STRING
|
|
79
|
-
} = arguments.length >
|
|
80
|
+
} = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
80
81
|
super();
|
|
81
82
|
_defineProperty(this, "defaultFormatString", void 0);
|
|
83
|
+
_defineProperty(this, "dh", void 0);
|
|
84
|
+
this.dh = dh;
|
|
82
85
|
this.defaultFormatString = defaultFormatString;
|
|
83
86
|
}
|
|
84
87
|
|
|
@@ -93,7 +96,7 @@ export class DecimalColumnFormatter extends TableColumnFormatter {
|
|
|
93
96
|
var formatString = format.formatString != null && format.formatString !== '' ? format.formatString : this.defaultFormatString;
|
|
94
97
|
var value = format.multiplier != null && format.multiplier !== 0 ? valueParam * format.multiplier : valueParam;
|
|
95
98
|
try {
|
|
96
|
-
return dh.i18n.NumberFormat.format(formatString, value);
|
|
99
|
+
return this.dh.i18n.NumberFormat.format(formatString, value);
|
|
97
100
|
} catch (e) {
|
|
98
101
|
log.error('Invalid format arguments');
|
|
99
102
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DecimalColumnFormatter.js","names":["
|
|
1
|
+
{"version":3,"file":"DecimalColumnFormatter.js","names":["Log","TableColumnFormatter","log","module","DecimalColumnFormatter","isValid","dh","format","i18n","NumberFormat","formatString","e","makeFormat","label","type","TYPE_CONTEXT_PRESET","multiplier","makePresetFormat","makeCustomFormat","TYPE_CONTEXT_CUSTOM","isSameFormat","formatA","formatB","constructor","defaultFormatString","DEFAULT_FORMAT_STRING","valueParam","value","error"],"sources":["../../src/formatters/DecimalColumnFormatter.ts"],"sourcesContent":["/* eslint class-methods-use-this: \"off\" */\nimport type { dh as DhType } from '@deephaven/jsapi-types';\nimport Log from '@deephaven/log';\nimport TableColumnFormatter, {\n TableColumnFormat,\n} from './TableColumnFormatter';\n\nconst log = Log.module('DecimalColumnFormatter');\n\nexport type DecimalColumnFormat = TableColumnFormat & {\n multiplier?: number | null;\n};\n\nexport type DecimalColumnFormatterOptions = {\n // Default format string to use. Defaults to DecimalColumnFormatter.DEFAULT_FORMAT_STRING\n defaultFormatString?: string;\n};\n\nexport class DecimalColumnFormatter extends TableColumnFormatter<number> {\n /**\n * Validates format object\n * @param dh JSAPI instance\n * @param format Format object\n * @returns true for valid object\n */\n static isValid(\n dh: DhType,\n format: Pick<TableColumnFormat, 'formatString'>\n ): boolean {\n try {\n dh.i18n.NumberFormat.format(format.formatString, 0);\n return true;\n } catch (e) {\n return false;\n }\n }\n\n /**\n * Create a DecimalColumnFormat object with the parameters specified\n * @param label Label for the format\n * @param formatString Format string for the format\n * @param multiplier Optional multiplier for the formatter\n * @param type Type of format created\n * @returns DecimalColumnFormat object\n */\n static makeFormat(\n label: string,\n formatString: string,\n type = TableColumnFormatter.TYPE_CONTEXT_PRESET,\n multiplier?: number\n ): DecimalColumnFormat {\n return {\n label,\n type,\n formatString,\n multiplier,\n };\n }\n\n /**\n * Convenient function to create a DecimalFormatObject with Preset type set\n * @param label Label for this format object\n * @param formatString Format string to use\n * @param multiplier Multiplier to use\n * @returns DecimalColumnFormat object\n */\n static makePresetFormat(\n label: string,\n formatString = '',\n multiplier?: number\n ): DecimalColumnFormat {\n return DecimalColumnFormatter.makeFormat(\n label,\n formatString,\n TableColumnFormatter.TYPE_CONTEXT_PRESET,\n multiplier\n );\n }\n\n /**\n * Convenient function to create a DecimalFormatObject with a default 'Custom Format' label and Custom type\n * @param formatString Format string to use\n * @param multiplier Multiplier to use\n * @returns DecimalColumnFormat object\n */\n static makeCustomFormat(\n formatString = '',\n multiplier?: number\n ): DecimalColumnFormat {\n return DecimalColumnFormatter.makeFormat(\n 'Custom Format',\n formatString,\n TableColumnFormatter.TYPE_CONTEXT_CUSTOM,\n multiplier\n );\n }\n\n static DEFAULT_FORMAT_STRING = '###,##0.0000';\n\n static FORMAT_PERCENT = DecimalColumnFormatter.makePresetFormat(\n 'Percent',\n '##0.00%'\n );\n\n static FORMAT_BASIS_POINTS = DecimalColumnFormatter.makePresetFormat(\n 'Basis Points',\n '###,##0 bp',\n 10000\n );\n\n static FORMAT_MILLIONS = DecimalColumnFormatter.makePresetFormat(\n 'Millions',\n '###,##0.000 mm',\n 0.000001\n );\n\n static FORMAT_SCIENTIFIC_NOTATION = DecimalColumnFormatter.makePresetFormat(\n 'Scientific Notation',\n '0.0000E0'\n );\n\n static FORMAT_ROUND = DecimalColumnFormatter.makePresetFormat(\n 'Round',\n '###,##0'\n );\n\n static FORMAT_ROUND_TWO_DECIMALS = DecimalColumnFormatter.makePresetFormat(\n '0.00',\n '###,##0.00'\n );\n\n static FORMAT_ROUND_FOUR_DECIMALS = DecimalColumnFormatter.makePresetFormat(\n '0.0000',\n '###,##0.0000'\n );\n\n /**\n * Check if the given formats match\n * @param formatA format object to check\n * @param formatB format object to check\n * @returns True if the formats match\n */\n static isSameFormat(\n formatA: DecimalColumnFormat | null,\n formatB: DecimalColumnFormat | null\n ): boolean {\n return (\n formatA === formatB ||\n (formatA != null &&\n formatB != null &&\n formatA.type === formatB.type &&\n formatA.formatString === formatB.formatString &&\n formatA.multiplier === formatB.multiplier)\n );\n }\n\n defaultFormatString: string;\n\n dh: DhType;\n\n constructor(\n dh: DhType,\n {\n defaultFormatString = DecimalColumnFormatter.DEFAULT_FORMAT_STRING,\n }: DecimalColumnFormatterOptions = {}\n ) {\n super();\n\n this.dh = dh;\n this.defaultFormatString = defaultFormatString;\n }\n\n /**\n * Format a value with the provided format object\n * @param valueParam Value to format\n * @param format Format object\n * @returns Formatted string\n */\n format(\n valueParam: number,\n format: Partial<DecimalColumnFormat> = {}\n ): string {\n const formatString =\n format.formatString != null && format.formatString !== ''\n ? format.formatString\n : this.defaultFormatString;\n const value =\n format.multiplier != null && format.multiplier !== 0\n ? valueParam * format.multiplier\n : valueParam;\n try {\n return this.dh.i18n.NumberFormat.format(formatString, value);\n } catch (e) {\n log.error('Invalid format arguments');\n }\n return '';\n }\n}\n\nexport default DecimalColumnFormatter;\n"],"mappings":";;;AAAA;;AAEA,OAAOA,GAAG,MAAM,gBAAgB;AAAC,OAC1BC,oBAAoB;AAI3B,IAAMC,GAAG,GAAGF,GAAG,CAACG,MAAM,CAAC,wBAAwB,CAAC;AAWhD,OAAO,MAAMC,sBAAsB,SAASH,oBAAoB,CAAS;EACvE;AACF;AACA;AACA;AACA;AACA;EACE,OAAOI,OAAO,CACZC,EAAU,EACVC,MAA+C,EACtC;IACT,IAAI;MACFD,EAAE,CAACE,IAAI,CAACC,YAAY,CAACF,MAAM,CAACA,MAAM,CAACG,YAAY,EAAE,CAAC,CAAC;MACnD,OAAO,IAAI;IACb,CAAC,CAAC,OAAOC,CAAC,EAAE;MACV,OAAO,KAAK;IACd;EACF;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACE,OAAOC,UAAU,CACfC,KAAa,EACbH,YAAoB,EAGC;IAAA,IAFrBI,IAAI,uEAAGb,oBAAoB,CAACc,mBAAmB;IAAA,IAC/CC,UAAmB;IAEnB,OAAO;MACLH,KAAK;MACLC,IAAI;MACJJ,YAAY;MACZM;IACF,CAAC;EACH;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;EACE,OAAOC,gBAAgB,CACrBJ,KAAa,EAGQ;IAAA,IAFrB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UAAU,IAAI,IAAI,IAAIT,MAAM,CAACS,UAAU,KAAK,CAAC,GAChDU,UAAU,GAAGnB,MAAM,CAACS,UAAU,GAC9BU,UAAU;IAChB,IAAI;MACF,OAAO,IAAI,CAACpB,EAAE,CAACE,IAAI,CAACC,YAAY,CAACF,MAAM,CAACG,YAAY,EAAEiB,KAAK,CAAC;IAC9D,CAAC,CAAC,OAAOhB,CAAC,EAAE;MACVT,GAAG,CAAC0B,KAAK,CAAC,0BAA0B,CAAC;IACvC;IACA,OAAO,EAAE;EACX;AACF;AAAC,gBAnLYxB,sBAAsB,2BA+EF,cAAc;AAAA,gBA/ElCA,sBAAsB,oBAiFTA,sBAAsB,CAACa,gBAAgB,CAC7D,SAAS,EACT,SAAS,CACV;AAAA,gBApFUb,sBAAsB,yBAsFJA,sBAAsB,CAACa,gBAAgB,CAClE,cAAc,EACd,YAAY,EACZ,KAAK,CACN;AAAA,gBA1FUb,sBAAsB,qBA4FRA,sBAAsB,CAACa,gBAAgB,CAC9D,UAAU,EACV,gBAAgB,EAChB,QAAQ,CACT;AAAA,gBAhGUb,sBAAsB,gCAkGGA,sBAAsB,CAACa,gBAAgB,CACzE,qBAAqB,EACrB,UAAU,CACX;AAAA,gBArGUb,sBAAsB,kBAuGXA,sBAAsB,CAACa,gBAAgB,CAC3D,OAAO,EACP,SAAS,CACV;AAAA,gBA1GUb,sBAAsB,+BA4GEA,sBAAsB,CAACa,gBAAgB,CACxE,MAAM,EACN,YAAY,CACb;AAAA,gBA/GUb,sBAAsB,gCAiHGA,sBAAsB,CAACa,gBAAgB,CACzE,QAAQ,EACR,cAAc,CACf;AAiEH,eAAeb,sBAAsB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { dh as DhType } from '@deephaven/jsapi-types';
|
|
1
2
|
import TableColumnFormatter, { TableColumnFormat } from './TableColumnFormatter';
|
|
2
3
|
export type IntegerColumnFormat = TableColumnFormat & {
|
|
3
4
|
multiplier?: number | null;
|
|
@@ -9,10 +10,11 @@ export type IntegerColumnFormatterOptions = {
|
|
|
9
10
|
export declare class IntegerColumnFormatter extends TableColumnFormatter<number> {
|
|
10
11
|
/**
|
|
11
12
|
* Validates format object
|
|
13
|
+
* @param dh JSAPI instance
|
|
12
14
|
* @param format Format object
|
|
13
15
|
* @returns true for valid object
|
|
14
16
|
*/
|
|
15
|
-
static isValid(format: Pick<TableColumnFormat, 'formatString'>): boolean;
|
|
17
|
+
static isValid(dh: DhType, format: Pick<TableColumnFormat, 'formatString'>): boolean;
|
|
16
18
|
/**
|
|
17
19
|
* Create an IntegerColumnFormat object with the parameters specified
|
|
18
20
|
* @param label Label for the format
|
|
@@ -47,8 +49,9 @@ export declare class IntegerColumnFormatter extends TableColumnFormatter<number>
|
|
|
47
49
|
static DEFAULT_FORMAT_STRING: string;
|
|
48
50
|
static FORMAT_MILLIONS: IntegerColumnFormat;
|
|
49
51
|
static FORMAT_SCIENTIFIC_NOTATION: IntegerColumnFormat;
|
|
52
|
+
dh: DhType;
|
|
50
53
|
defaultFormatString: string;
|
|
51
|
-
constructor({ defaultFormatString, }?: IntegerColumnFormatterOptions);
|
|
54
|
+
constructor(dh: DhType, { defaultFormatString, }?: IntegerColumnFormatterOptions);
|
|
52
55
|
/**
|
|
53
56
|
* Format a value with the provided format object
|
|
54
57
|
* @param valueParam Value to format
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IntegerColumnFormatter.d.ts","sourceRoot":"","sources":["../../src/formatters/IntegerColumnFormatter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IntegerColumnFormatter.d.ts","sourceRoot":"","sources":["../../src/formatters/IntegerColumnFormatter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAE3D,OAAO,oBAAoB,EAAE,EAC3B,iBAAiB,EAClB,MAAM,wBAAwB,CAAC;AAIhC,MAAM,MAAM,mBAAmB,GAAG,iBAAiB,GA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CAAC"}
|
|
@@ -2,7 +2,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
2
2
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
3
3
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
4
4
|
/* eslint class-methods-use-this: "off" */
|
|
5
|
-
|
|
5
|
+
|
|
6
6
|
import Log from '@deephaven/log';
|
|
7
7
|
import TableColumnFormatter from "./TableColumnFormatter.js";
|
|
8
8
|
var log = Log.module('IntegerColumnFormatter');
|
|
@@ -10,10 +10,11 @@ var log = Log.module('IntegerColumnFormatter');
|
|
|
10
10
|
export class IntegerColumnFormatter extends TableColumnFormatter {
|
|
11
11
|
/**
|
|
12
12
|
* Validates format object
|
|
13
|
+
* @param dh JSAPI instance
|
|
13
14
|
* @param format Format object
|
|
14
15
|
* @returns true for valid object
|
|
15
16
|
*/
|
|
16
|
-
static isValid(format) {
|
|
17
|
+
static isValid(dh, format) {
|
|
17
18
|
try {
|
|
18
19
|
dh.i18n.NumberFormat.format(format.formatString, 0);
|
|
19
20
|
return true;
|
|
@@ -75,12 +76,14 @@ export class IntegerColumnFormatter extends TableColumnFormatter {
|
|
|
75
76
|
static isSameFormat(formatA, formatB) {
|
|
76
77
|
return formatA === formatB || formatA != null && formatB != null && formatA.type === formatB.type && formatA.formatString === formatB.formatString && formatA.multiplier === formatB.multiplier;
|
|
77
78
|
}
|
|
78
|
-
constructor() {
|
|
79
|
+
constructor(dh) {
|
|
79
80
|
var {
|
|
80
81
|
defaultFormatString = IntegerColumnFormatter.DEFAULT_FORMAT_STRING
|
|
81
|
-
} = arguments.length >
|
|
82
|
+
} = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
82
83
|
super();
|
|
84
|
+
_defineProperty(this, "dh", void 0);
|
|
83
85
|
_defineProperty(this, "defaultFormatString", void 0);
|
|
86
|
+
this.dh = dh;
|
|
84
87
|
this.defaultFormatString = defaultFormatString;
|
|
85
88
|
}
|
|
86
89
|
|
|
@@ -95,7 +98,7 @@ export class IntegerColumnFormatter extends TableColumnFormatter {
|
|
|
95
98
|
var formatString = format.formatString != null && format.formatString !== '' ? format.formatString : this.defaultFormatString;
|
|
96
99
|
var value = format.multiplier != null && format.multiplier !== 0 ? valueParam * format.multiplier : valueParam;
|
|
97
100
|
try {
|
|
98
|
-
return dh.i18n.NumberFormat.format(formatString, value);
|
|
101
|
+
return this.dh.i18n.NumberFormat.format(formatString, value);
|
|
99
102
|
} catch (e) {
|
|
100
103
|
log.error('Invalid format arguments');
|
|
101
104
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IntegerColumnFormatter.js","names":["
|
|
1
|
+
{"version":3,"file":"IntegerColumnFormatter.js","names":["Log","TableColumnFormatter","log","module","IntegerColumnFormatter","isValid","dh","format","i18n","NumberFormat","formatString","e","makeFormat","label","type","TYPE_CONTEXT_PRESET","multiplier","makePresetFormat","makeCustomFormat","TYPE_CONTEXT_CUSTOM","isSameFormat","formatA","formatB","constructor","defaultFormatString","DEFAULT_FORMAT_STRING","valueParam","value","error"],"sources":["../../src/formatters/IntegerColumnFormatter.ts"],"sourcesContent":["/* eslint class-methods-use-this: \"off\" */\nimport type { dh as DhType } from '@deephaven/jsapi-types';\nimport Log from '@deephaven/log';\nimport TableColumnFormatter, {\n TableColumnFormat,\n} from './TableColumnFormatter';\n\nconst log = Log.module('IntegerColumnFormatter');\n\nexport type IntegerColumnFormat = TableColumnFormat & {\n multiplier?: number | null;\n};\n\nexport type IntegerColumnFormatterOptions = {\n // Default format string to use. Defaults to IntegerColumnFormatter.DEFAULT_FORMAT_STRING\n defaultFormatString?: string;\n};\n\n/** Column formatter for integers/whole numbers */\nexport class IntegerColumnFormatter extends TableColumnFormatter<number> {\n /**\n * Validates format object\n * @param dh JSAPI instance\n * @param format Format object\n * @returns true for valid object\n */\n static isValid(\n dh: DhType,\n format: Pick<TableColumnFormat, 'formatString'>\n ): boolean {\n try {\n dh.i18n.NumberFormat.format(format.formatString, 0);\n return true;\n } catch (e) {\n return false;\n }\n }\n\n /**\n * Create an IntegerColumnFormat object with the parameters specified\n * @param label Label for the format\n * @param formatString Format string for the format\n * @param multiplier Optional multiplier for the formatter\n * @param type Type of format created\n * @returns IntegerColumnFormat object\n */\n static makeFormat(\n label: string,\n formatString: string,\n type = TableColumnFormatter.TYPE_CONTEXT_PRESET,\n multiplier?: number\n ): IntegerColumnFormat {\n return {\n label,\n type,\n formatString,\n multiplier,\n };\n }\n\n /**\n * Convenient function to create a IntegerFormatObject with Preset type set\n * @param label Label for this format object\n * @param formatString Format string to use\n * @param multiplier Multiplier to use\n * @returns IntegerColumnFormat object\n */\n static makePresetFormat(\n label: string,\n formatString = '',\n multiplier?: number\n ): IntegerColumnFormat {\n return IntegerColumnFormatter.makeFormat(\n label,\n formatString,\n TableColumnFormatter.TYPE_CONTEXT_PRESET,\n multiplier\n );\n }\n\n /**\n * Convenient function to create a IntegerFormatObject with a default 'Custom Format' label and Custom type\n * @param formatString Format string to use\n * @param multiplier Multiplier to use\n * @returns IntegerColumnFormat object\n */\n static makeCustomFormat(\n formatString = '',\n multiplier?: number\n ): IntegerColumnFormat {\n return IntegerColumnFormatter.makeFormat(\n 'Custom Format',\n formatString,\n TableColumnFormatter.TYPE_CONTEXT_CUSTOM,\n multiplier\n );\n }\n\n /**\n * Check if the given formats match\n * @param formatA format object to check\n * @param formatB format object to check\n * @returns True if the formats match\n */\n static isSameFormat(\n formatA: IntegerColumnFormat | null,\n formatB: IntegerColumnFormat | null\n ): boolean {\n return (\n formatA === formatB ||\n (formatA != null &&\n formatB != null &&\n formatA.type === formatB.type &&\n formatA.formatString === formatB.formatString &&\n formatA.multiplier === formatB.multiplier)\n );\n }\n\n static DEFAULT_FORMAT_STRING = '###,##0';\n\n static FORMAT_MILLIONS = IntegerColumnFormatter.makePresetFormat(\n 'Millions',\n '###,##0.000 mm',\n 0.000001\n );\n\n static FORMAT_SCIENTIFIC_NOTATION = IntegerColumnFormatter.makePresetFormat(\n 'Scientific Notation',\n '0.0000E0'\n );\n\n dh: DhType;\n\n defaultFormatString: string;\n\n constructor(\n dh: DhType,\n {\n defaultFormatString = IntegerColumnFormatter.DEFAULT_FORMAT_STRING,\n }: IntegerColumnFormatterOptions = {}\n ) {\n super();\n this.dh = dh;\n this.defaultFormatString = defaultFormatString;\n }\n\n /**\n * Format a value with the provided format object\n * @param valueParam Value to format\n * @param format Format object\n * @returns Formatted string\n */\n format(\n valueParam: number,\n format: Partial<IntegerColumnFormat> = {}\n ): string {\n const formatString =\n format.formatString != null && format.formatString !== ''\n ? format.formatString\n : this.defaultFormatString;\n const value =\n format.multiplier != null && format.multiplier !== 0\n ? valueParam * format.multiplier\n : valueParam;\n try {\n return this.dh.i18n.NumberFormat.format(formatString, value);\n } catch (e) {\n log.error('Invalid format arguments');\n }\n return '';\n }\n}\n\nexport default IntegerColumnFormatter;\n"],"mappings":";;;AAAA;;AAEA,OAAOA,GAAG,MAAM,gBAAgB;AAAC,OAC1BC,oBAAoB;AAI3B,IAAMC,GAAG,GAAGF,GAAG,CAACG,MAAM,CAAC,wBAAwB,CAAC;AAWhD;AACA,OAAO,MAAMC,sBAAsB,SAASH,oBAAoB,CAAS;EACvE;AACF;AACA;AACA;AACA;AACA;EACE,OAAOI,OAAO,CACZC,EAAU,EACVC,MAA+C,EACtC;IACT,IAAI;MACFD,EAAE,CAACE,IAAI,CAACC,YAAY,CAACF,MAAM,CAACA,MAAM,CAACG,YAAY,EAAE,CAAC,CAAC;MACnD,OAAO,IAAI;IACb,CAAC,CAAC,OAAOC,CAAC,EAAE;MACV,OAAO,KAAK;IACd;EACF;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EAC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AACF;AACA;AACA;AACA;AACA;EACEjB,MAAM,CACJmB,UAAkB,EAEV;IAAA,IADRnB,MAAoC,uEAAG,CAAC,CAAC;IAEzC,IAAMG,YAAY,GAChBH,MAAM,CAACG,YAAY,IAAI,IAAI,IAAIH,MAAM,CAACG,YAAY,KAAK,EAAE,GACrDH,MAAM,CAACG,YAAY,GACnB,IAAI,CAACc,mBAAmB;IAC9B,IAAMG,KAAK,GACTpB,MAAM,CAACS,UAAU,IAAI,IAAI,IAAIT,MAAM,CAACS,UAAU,KAAK,CAAC,GAChDU,UAAU,GAAGnB,MAAM,CAACS,UAAU,GAC9BU,UAAU;IAChB,IAAI;MACF,OAAO,IAAI,CAACpB,EAAE,CAACE,IAAI,CAACC,YAAY,CAACF,MAAM,CAACG,YAAY,EAAEiB,KAAK,CAAC;IAC9D,CAAC,CAAC,OAAOhB,CAAC,EAAE;MACVT,GAAG,CAAC0B,KAAK,CAAC,0BAA0B,CAAC;IACvC;IACA,OAAO,EAAE;EACX;AACF;AAAC,gBAxJYxB,sBAAsB,2BAmGF,SAAS;AAAA,gBAnG7BA,sBAAsB,qBAqGRA,sBAAsB,CAACa,gBAAgB,CAC9D,UAAU,EACV,gBAAgB,EAChB,QAAQ,CACT;AAAA,gBAzGUb,sBAAsB,gCA2GGA,sBAAsB,CAACa,gBAAgB,CACzE,qBAAqB,EACrB,UAAU,CACX;AA4CH,eAAeb,sBAAsB"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Default column data formatter. Just interpolates the value as a string and returns.
|
|
3
3
|
* Extend this class and register with TableUtils to make use of it.
|
|
4
4
|
*/
|
|
5
|
+
import type { dh as DhType } from '@deephaven/jsapi-types';
|
|
5
6
|
export type TableColumnFormatType = 'type-global' | 'type-context-preset' | 'type-context-custom';
|
|
6
7
|
export type TableColumnFormat = {
|
|
7
8
|
label: string;
|
|
@@ -14,10 +15,11 @@ export declare class TableColumnFormatter<T = unknown> {
|
|
|
14
15
|
static TYPE_CONTEXT_CUSTOM: TableColumnFormatType;
|
|
15
16
|
/**
|
|
16
17
|
* Validates format object
|
|
18
|
+
* @param dh JSAPI instance
|
|
17
19
|
* @param format Format object
|
|
18
20
|
* @returns true for valid object
|
|
19
21
|
*/
|
|
20
|
-
static isValid(format: TableColumnFormat): boolean;
|
|
22
|
+
static isValid(dh: DhType, format: TableColumnFormat): boolean;
|
|
21
23
|
/**
|
|
22
24
|
* Check if the given formats match
|
|
23
25
|
* @param formatA format object to check
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableColumnFormatter.d.ts","sourceRoot":"","sources":["../../src/formatters/TableColumnFormatter.ts"],"names":[],"mappings":"AACA;;;GAGG;AAEH,MAAM,MAAM,qBAAqB,GAC7B,aAAa,GACb,qBAAqB,GACrB,qBAAqB,CAAC;AAE1B,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,qBAAqB,CAAC;CAC7B,CAAC;AAEF,qBAAa,oBAAoB,CAAC,CAAC,GAAG,OAAO;IAC3C,MAAM,CAAC,WAAW,EAAE,qBAAqB,CAAiB;IAE1D,MAAM,CAAC,mBAAmB,EAAE,qBAAqB,CAAyB;IAE1E,MAAM,CAAC,mBAAmB,EAAE,qBAAqB,CAAyB;IAE1E
|
|
1
|
+
{"version":3,"file":"TableColumnFormatter.d.ts","sourceRoot":"","sources":["../../src/formatters/TableColumnFormatter.ts"],"names":[],"mappings":"AACA;;;GAGG;AAEH,OAAO,KAAK,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAE3D,MAAM,MAAM,qBAAqB,GAC7B,aAAa,GACb,qBAAqB,GACrB,qBAAqB,CAAC;AAE1B,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,qBAAqB,CAAC;CAC7B,CAAC;AAEF,qBAAa,oBAAoB,CAAC,CAAC,GAAG,OAAO;IAC3C,MAAM,CAAC,WAAW,EAAE,qBAAqB,CAAiB;IAE1D,MAAM,CAAC,mBAAmB,EAAE,qBAAqB,CAAyB;IAE1E,MAAM,CAAC,mBAAmB,EAAE,qBAAqB,CAAyB;IAE1E;;;;;OAKG;IACH,MAAM,CAAC,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,GAAG,OAAO;IAI9D;;;;;OAKG;IACH,MAAM,CAAC,YAAY,CACjB,OAAO,EAAE,iBAAiB,GAAG,IAAI,EACjC,OAAO,EAAE,iBAAiB,GAAG,IAAI,GAChC,OAAO;IAIV;;;;;;OAMG;IACH,MAAM,CAAC,UAAU,CACf,KAAK,EAAE,MAAM,EACb,YAAY,EAAE,MAAM,EACpB,IAAI,EAAE,qBAAqB,GAC1B,iBAAiB;IAIpB;;;;OAIG;IACH,MAAM,CAAC,KAAK,EAAE,CAAC,EAAE,MAAM,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,GAAG,MAAM;CAG9D;AAED,eAAe,oBAAoB,CAAC"}
|
|
@@ -10,10 +10,11 @@ function _toPrimitive(input, hint) { if (typeof input !== "object" || input ===
|
|
|
10
10
|
export class TableColumnFormatter {
|
|
11
11
|
/**
|
|
12
12
|
* Validates format object
|
|
13
|
+
* @param dh JSAPI instance
|
|
13
14
|
* @param format Format object
|
|
14
15
|
* @returns true for valid object
|
|
15
16
|
*/
|
|
16
|
-
static isValid(format) {
|
|
17
|
+
static isValid(dh, format) {
|
|
17
18
|
return true;
|
|
18
19
|
}
|
|
19
20
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableColumnFormatter.js","names":["TableColumnFormatter","isValid","format","isSameFormat","formatA","formatB","Error","makeFormat","label","formatString","type","value"],"sources":["../../src/formatters/TableColumnFormatter.ts"],"sourcesContent":["/* eslint class-methods-use-this: \"off\" */\n/**\n * Default column data formatter. Just interpolates the value as a string and returns.\n * Extend this class and register with TableUtils to make use of it.\n */\n\nexport type TableColumnFormatType =\n | 'type-global'\n | 'type-context-preset'\n | 'type-context-custom';\n\nexport type TableColumnFormat = {\n label: string;\n formatString: string;\n type: TableColumnFormatType;\n};\n\nexport class TableColumnFormatter<T = unknown> {\n static TYPE_GLOBAL: TableColumnFormatType = 'type-global';\n\n static TYPE_CONTEXT_PRESET: TableColumnFormatType = 'type-context-preset';\n\n static TYPE_CONTEXT_CUSTOM: TableColumnFormatType = 'type-context-custom';\n\n /**\n * Validates format object\n * @param format Format object\n * @returns true for valid object\n */\n static isValid(format: TableColumnFormat): boolean {\n return true;\n }\n\n /**\n * Check if the given formats match\n * @param formatA format object to check\n * @param formatB format object to check\n * @returns True if the formats match\n */\n static isSameFormat(\n formatA: TableColumnFormat | null,\n formatB: TableColumnFormat | null\n ): boolean {\n throw new Error('isSameFormat not implemented');\n }\n\n /**\n * Create and return a Format object\n * @param label The label of the format object\n * @param formatString Format string to use for the format\n * @param type The type of column to use for this format\n * @returns A format object\n */\n static makeFormat(\n label: string,\n formatString: string,\n type: TableColumnFormatType\n ): TableColumnFormat {\n return { label, formatString, type };\n }\n\n /**\n * @param value The value to format\n * @param format Optional format object with value transformation options\n * @returns String the formatted text string of the value passed in.\n */\n format(value: T, format?: Partial<TableColumnFormat>): string {\n return '';\n }\n}\n\nexport default TableColumnFormatter;\n"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;;
|
|
1
|
+
{"version":3,"file":"TableColumnFormatter.js","names":["TableColumnFormatter","isValid","dh","format","isSameFormat","formatA","formatB","Error","makeFormat","label","formatString","type","value"],"sources":["../../src/formatters/TableColumnFormatter.ts"],"sourcesContent":["/* eslint class-methods-use-this: \"off\" */\n/**\n * Default column data formatter. Just interpolates the value as a string and returns.\n * Extend this class and register with TableUtils to make use of it.\n */\n\nimport type { dh as DhType } from '@deephaven/jsapi-types';\n\nexport type TableColumnFormatType =\n | 'type-global'\n | 'type-context-preset'\n | 'type-context-custom';\n\nexport type TableColumnFormat = {\n label: string;\n formatString: string;\n type: TableColumnFormatType;\n};\n\nexport class TableColumnFormatter<T = unknown> {\n static TYPE_GLOBAL: TableColumnFormatType = 'type-global';\n\n static TYPE_CONTEXT_PRESET: TableColumnFormatType = 'type-context-preset';\n\n static TYPE_CONTEXT_CUSTOM: TableColumnFormatType = 'type-context-custom';\n\n /**\n * Validates format object\n * @param dh JSAPI instance\n * @param format Format object\n * @returns true for valid object\n */\n static isValid(dh: DhType, format: TableColumnFormat): boolean {\n return true;\n }\n\n /**\n * Check if the given formats match\n * @param formatA format object to check\n * @param formatB format object to check\n * @returns True if the formats match\n */\n static isSameFormat(\n formatA: TableColumnFormat | null,\n formatB: TableColumnFormat | null\n ): boolean {\n throw new Error('isSameFormat not implemented');\n }\n\n /**\n * Create and return a Format object\n * @param label The label of the format object\n * @param formatString Format string to use for the format\n * @param type The type of column to use for this format\n * @returns A format object\n */\n static makeFormat(\n label: string,\n formatString: string,\n type: TableColumnFormatType\n ): TableColumnFormat {\n return { label, formatString, type };\n }\n\n /**\n * @param value The value to format\n * @param format Optional format object with value transformation options\n * @returns String the formatted text string of the value passed in.\n */\n format(value: T, format?: Partial<TableColumnFormat>): string {\n return '';\n }\n}\n\nexport default TableColumnFormatter;\n"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;;AAeA,OAAO,MAAMA,oBAAoB,CAAc;EAO7C;AACF;AACA;AACA;AACA;AACA;EACE,OAAOC,OAAO,CAACC,EAAU,EAAEC,MAAyB,EAAW;IAC7D,OAAO,IAAI;EACb;;EAEA;AACF;AACA;AACA;AACA;AACA;EACE,OAAOC,YAAY,CACjBC,OAAiC,EACjCC,OAAiC,EACxB;IACT,MAAM,IAAIC,KAAK,CAAC,8BAA8B,CAAC;EACjD;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;EACE,OAAOC,UAAU,CACfC,KAAa,EACbC,YAAoB,EACpBC,IAA2B,EACR;IACnB,OAAO;MAAEF,KAAK;MAAEC,YAAY;MAAEC;IAAK,CAAC;EACtC;;EAEA;AACF;AACA;AACA;AACA;EACER,MAAM,CAACS,KAAQ,EAAET,MAAmC,EAAU;IAC5D,OAAO,EAAE;EACX;AACF;AAAC,gBArDYH,oBAAoB,iBACa,aAAa;AAAA,gBAD9CA,oBAAoB,yBAGqB,qBAAqB;AAAA,gBAH9DA,oBAAoB,yBAKqB,qBAAqB;AAkD3E,eAAeA,oBAAoB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deephaven/jsapi-utils",
|
|
3
|
-
"version": "0.38.1-beta.
|
|
3
|
+
"version": "0.38.1-beta.12+29ed459c",
|
|
4
4
|
"description": "Deephaven JSAPI Utils",
|
|
5
5
|
"author": "Deephaven Data Labs LLC",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -21,17 +21,17 @@
|
|
|
21
21
|
"build:babel": "babel ./src --out-dir ./dist --extensions \".ts,.tsx,.js,.jsx\" --source-maps --root-mode upward"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@deephaven/filters": "^0.38.1-beta.
|
|
25
|
-
"@deephaven/jsapi-
|
|
26
|
-
"@deephaven/
|
|
27
|
-
"@deephaven/
|
|
28
|
-
"@deephaven/utils": "^0.38.1-beta.0+e334848a",
|
|
24
|
+
"@deephaven/filters": "^0.38.1-beta.12+29ed459c",
|
|
25
|
+
"@deephaven/jsapi-types": "^0.38.1-beta.12+29ed459c",
|
|
26
|
+
"@deephaven/log": "^0.38.1-beta.12+29ed459c",
|
|
27
|
+
"@deephaven/utils": "^0.38.1-beta.12+29ed459c",
|
|
29
28
|
"@react-stately/data": "^3.9.1",
|
|
30
29
|
"lodash.clamp": "^4.0.3",
|
|
31
30
|
"shortid": "^2.2.16"
|
|
32
31
|
},
|
|
33
32
|
"devDependencies": {
|
|
34
|
-
"@deephaven/
|
|
33
|
+
"@deephaven/jsapi-shim": "^0.38.1-beta.12+29ed459c",
|
|
34
|
+
"@deephaven/tsconfig": "^0.38.1-beta.12+29ed459c"
|
|
35
35
|
},
|
|
36
36
|
"files": [
|
|
37
37
|
"dist"
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"access": "public"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "29ed459c130dae9d6a1f3876716d25fb2f0a5fea"
|
|
44
44
|
}
|