@deephaven/jsapi-utils 0.31.3 → 0.31.5

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.
@@ -0,0 +1,34 @@
1
+ export declare const LOGIN_OPTIONS_REQUEST = "io.deephaven.message.LoginOptions.request";
2
+ export declare const SESSION_DETAILS_REQUEST = "io.deephaven.message.SessionDetails.request";
3
+ export interface Message<T> {
4
+ message: string;
5
+ payload?: T;
6
+ id: string;
7
+ }
8
+ export interface Response<T> {
9
+ id: string;
10
+ payload: T;
11
+ }
12
+ /**
13
+ * Make message object with optional payload
14
+ * @param message Message string
15
+ * @param id Unique message id
16
+ * @param payload Payload to send
17
+ * @returns Message
18
+ */
19
+ export declare function makeMessage<T>(message: string, id?: string, payload?: T): Message<T>;
20
+ /**
21
+ * Make response object for given message id
22
+ * @param messageId Id of the request message to respond to
23
+ * @param payload Payload to respond with
24
+ * @returns Response
25
+ */
26
+ export declare function makeResponse<T>(messageId: string, payload: T): Response<T>;
27
+ /**
28
+ * Request data from the parent window and wait for response
29
+ * @param request Request message to send to the parent window
30
+ * @param timeout Timeout in ms
31
+ * @returns Payload of the given type, or undefined
32
+ */
33
+ export declare function requestParentResponse<T>(request: string, timeout?: number): Promise<T>;
34
+ //# sourceMappingURL=MessageUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MessageUtils.d.ts","sourceRoot":"","sources":["../src/MessageUtils.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,qBAAqB,8CACW,CAAC;AAE9C,eAAO,MAAM,uBAAuB,gDACW,CAAC;AAEhD,MAAM,WAAW,OAAO,CAAC,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,CAAC,CAAC;IACZ,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,QAAQ,CAAC,CAAC;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,CAAC,CAAC;CACZ;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAC3B,OAAO,EAAE,MAAM,EACf,EAAE,SAAY,EACd,OAAO,CAAC,EAAE,CAAC,GACV,OAAO,CAAC,CAAC,CAAC,CAEZ;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAE1E;AAED;;;;;GAKG;AACH,wBAAsB,qBAAqB,CAAC,CAAC,EAC3C,OAAO,EAAE,MAAM,EACf,OAAO,SAAQ,GACd,OAAO,CAAC,CAAC,CAAC,CAyBZ"}
@@ -0,0 +1,80 @@
1
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
2
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
3
+ import shortid from 'shortid';
4
+ import Log from '@deephaven/log';
5
+ import { TimeoutError } from '@deephaven/utils';
6
+ var log = Log.module('MessageUtils');
7
+ export var LOGIN_OPTIONS_REQUEST = 'io.deephaven.message.LoginOptions.request';
8
+ export var SESSION_DETAILS_REQUEST = 'io.deephaven.message.SessionDetails.request';
9
+ /**
10
+ * Make message object with optional payload
11
+ * @param message Message string
12
+ * @param id Unique message id
13
+ * @param payload Payload to send
14
+ * @returns Message
15
+ */
16
+ export function makeMessage(message) {
17
+ var id = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : shortid();
18
+ var payload = arguments.length > 2 ? arguments[2] : undefined;
19
+ return {
20
+ message,
21
+ id,
22
+ payload
23
+ };
24
+ }
25
+
26
+ /**
27
+ * Make response object for given message id
28
+ * @param messageId Id of the request message to respond to
29
+ * @param payload Payload to respond with
30
+ * @returns Response
31
+ */
32
+ export function makeResponse(messageId, payload) {
33
+ return {
34
+ id: messageId,
35
+ payload
36
+ };
37
+ }
38
+
39
+ /**
40
+ * Request data from the parent window and wait for response
41
+ * @param request Request message to send to the parent window
42
+ * @param timeout Timeout in ms
43
+ * @returns Payload of the given type, or undefined
44
+ */
45
+ export function requestParentResponse(_x) {
46
+ return _requestParentResponse.apply(this, arguments);
47
+ }
48
+ function _requestParentResponse() {
49
+ _requestParentResponse = _asyncToGenerator(function* (request) {
50
+ var timeout = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 30000;
51
+ if (window.opener == null) {
52
+ throw new Error('window.opener is null, unable to send request.');
53
+ }
54
+ return new Promise((resolve, reject) => {
55
+ var timeoutId;
56
+ var id = shortid();
57
+ var listener = event => {
58
+ var {
59
+ data
60
+ } = event;
61
+ log.debug('Received message', data);
62
+ if ((data === null || data === void 0 ? void 0 : data.id) !== id) {
63
+ log.debug("Ignore message, id doesn't match", data);
64
+ return;
65
+ }
66
+ clearTimeout(timeoutId);
67
+ window.removeEventListener('message', listener);
68
+ resolve(data.payload);
69
+ };
70
+ window.addEventListener('message', listener);
71
+ timeoutId = setTimeout(() => {
72
+ window.removeEventListener('message', listener);
73
+ reject(new TimeoutError('Request timed out'));
74
+ }, timeout);
75
+ window.opener.postMessage(makeMessage(request, id), '*');
76
+ });
77
+ });
78
+ return _requestParentResponse.apply(this, arguments);
79
+ }
80
+ //# sourceMappingURL=MessageUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MessageUtils.js","names":["shortid","Log","TimeoutError","log","module","LOGIN_OPTIONS_REQUEST","SESSION_DETAILS_REQUEST","makeMessage","message","id","payload","makeResponse","messageId","requestParentResponse","request","timeout","window","opener","Error","Promise","resolve","reject","timeoutId","listener","event","data","debug","clearTimeout","removeEventListener","addEventListener","setTimeout","postMessage"],"sources":["../src/MessageUtils.ts"],"sourcesContent":["import shortid from 'shortid';\nimport Log from '@deephaven/log';\nimport { TimeoutError } from '@deephaven/utils';\n\nconst log = Log.module('MessageUtils');\n\nexport const LOGIN_OPTIONS_REQUEST =\n 'io.deephaven.message.LoginOptions.request';\n\nexport const SESSION_DETAILS_REQUEST =\n 'io.deephaven.message.SessionDetails.request';\n\nexport interface Message<T> {\n message: string;\n payload?: T;\n id: string;\n}\n\nexport interface Response<T> {\n id: string;\n payload: T;\n}\n\n/**\n * Make message object with optional payload\n * @param message Message string\n * @param id Unique message id\n * @param payload Payload to send\n * @returns Message\n */\nexport function makeMessage<T>(\n message: string,\n id = shortid(),\n payload?: T\n): Message<T> {\n return { message, id, payload };\n}\n\n/**\n * Make response object for given message id\n * @param messageId Id of the request message to respond to\n * @param payload Payload to respond with\n * @returns Response\n */\nexport function makeResponse<T>(messageId: string, payload: T): Response<T> {\n return { id: messageId, payload };\n}\n\n/**\n * Request data from the parent window and wait for response\n * @param request Request message to send to the parent window\n * @param timeout Timeout in ms\n * @returns Payload of the given type, or undefined\n */\nexport async function requestParentResponse<T>(\n request: string,\n timeout = 30000\n): Promise<T> {\n if (window.opener == null) {\n throw new Error('window.opener is null, unable to send request.');\n }\n return new Promise((resolve, reject) => {\n let timeoutId: NodeJS.Timeout;\n const id = shortid();\n const listener = (event: MessageEvent<Response<T>>) => {\n const { data } = event;\n log.debug('Received message', data);\n if (data?.id !== id) {\n log.debug(\"Ignore message, id doesn't match\", data);\n return;\n }\n clearTimeout(timeoutId);\n window.removeEventListener('message', listener);\n resolve(data.payload);\n };\n window.addEventListener('message', listener);\n timeoutId = setTimeout(() => {\n window.removeEventListener('message', listener);\n reject(new TimeoutError('Request timed out'));\n }, timeout);\n window.opener.postMessage(makeMessage(request, id), '*');\n });\n}\n"],"mappings":";;AAAA,OAAOA,OAAO,MAAM,SAAS;AAC7B,OAAOC,GAAG,MAAM,gBAAgB;AAChC,SAASC,YAAY,QAAQ,kBAAkB;AAE/C,IA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EL,QAAQ,CAAC;QAC/CH,OAAO,CAACK,IAAI,CAACf,OAAO,CAAC;MACvB,CAAC;MACDM,MAAM,CAACa,gBAAgB,CAAC,SAAS,EAAEN,QAAQ,CAAC;MAC5CD,SAAS,GAAGQ,UAAU,CAAC,MAAM;QAC3Bd,MAAM,CAACY,mBAAmB,CAAC,SAAS,EAAEL,QAAQ,CAAC;QAC/CF,MAAM,CAAC,IAAInB,YAAY,CAAC,mBAAmB,CAAC,CAAC;MAC/C,CAAC,EAAEa,OAAO,CAAC;MACXC,MAAM,CAACC,MAAM,CAACc,WAAW,CAACxB,WAAW,CAACO,OAAO,EAAEL,EAAE,CAAC,EAAE,GAAG,CAAC;IAC1D,CAAC,CAAC;EACJ,CAAC;EAAA;AAAA"}
@@ -1,6 +1,6 @@
1
1
  import TableColumnFormatter, { TableColumnFormat } from './TableColumnFormatter';
2
2
  export type DecimalColumnFormat = TableColumnFormat & {
3
- multiplier?: number;
3
+ multiplier?: number | null;
4
4
  };
5
5
  export type DecimalColumnFormatterOptions = {
6
6
  defaultFormatString?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"DecimalColumnFormatter.d.ts","sourceRoot":"","sources":["../../src/formatters/DecimalColumnFormatter.ts"],"names":[],"mappings":"AAGA,OAAO,oBAAoB,EAAE,EAC3B,iBAAiB,EAClB,MAAM,wBAAwB,CAAC;AAIhC,MAAM,MAAM,mBAAmB,GAAG,iBAAiB,GAAG;IACpD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG;IAE1C,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,qBAAa,sBAAuB,SAAQ,oBAAoB,CAAC,MAAM,CAAC;IACtE;;;;OAIG;IACH,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,iBAAiB,EAAE,cAAc,CAAC,GAAG,OAAO;IASxE;;;;;;;OAOG;IACH,MAAM,CAAC,UAAU,CACf,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,eAAe,sBAAsB,CAAC"}
@@ -91,7 +91,7 @@ export class DecimalColumnFormatter extends TableColumnFormatter {
91
91
  format(valueParam) {
92
92
  var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
93
93
  var formatString = format.formatString != null && format.formatString !== '' ? format.formatString : this.defaultFormatString;
94
- var value = format.multiplier !== undefined && format.multiplier !== 0 ? valueParam * format.multiplier : valueParam;
94
+ var value = format.multiplier != null && format.multiplier !== 0 ? valueParam * format.multiplier : valueParam;
95
95
  try {
96
96
  return dh.i18n.NumberFormat.format(formatString, value);
97
97
  } catch (e) {
@@ -1 +1 @@
1
- {"version":3,"file":"DecimalColumnFormatter.js","names":["dh","Log","TableColumnFormatter","log","module","DecimalColumnFormatter","isValid","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","undefined","error"],"sources":["../../src/formatters/DecimalColumnFormatter.ts"],"sourcesContent":["/* eslint class-methods-use-this: \"off\" */\nimport dh from '@deephaven/jsapi-shim';\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;\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 format Format object\n * @returns true for valid object\n */\n static isValid(format: Pick<TableColumnFormat, 'formatString'>): 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 constructor({\n defaultFormatString = DecimalColumnFormatter.DEFAULT_FORMAT_STRING,\n }: DecimalColumnFormatterOptions = {}) {\n super();\n\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 !== undefined && format.multiplier !== 0\n ? valueParam * format.multiplier\n : valueParam;\n try {\n return 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;AACA,OAAOA,EAAE,MAAM,uBAAuB;AACtC,OAAOC,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;EACE,OAAOI,OAAO,CAACC,MAA+C,EAAW;IACvE,IAAI;MACFP,EAAE,CAACQ,IAAI,CAACC,YAAY,CAACF,MAAM,CAACA,MAAM,CAACG,YAAY,EAAE,CAAC,CAAC;MACnD,OAAO,IAAI;IACb,CAAC,CAAC,OAAOC,C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UZ,sBAAsB,gCA6GGA,sBAAsB,CAACY,gBAAgB,CACzE,QAAQ,EACR,cAAc,CACf;AA2DH,eAAeZ,sBAAsB"}
1
+ {"version":3,"file":"DecimalColumnFormatter.js","names":["dh","Log","TableColumnFormatter","log","module","DecimalColumnFormatter","isValid","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 dh from '@deephaven/jsapi-shim';\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 format Format object\n * @returns true for valid object\n */\n static isValid(format: Pick<TableColumnFormat, 'formatString'>): 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 constructor({\n defaultFormatString = DecimalColumnFormatter.DEFAULT_FORMAT_STRING,\n }: DecimalColumnFormatterOptions = {}) {\n super();\n\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 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;AACA,OAAOA,EAAE,MAAM,uBAAuB;AACtC,OAAOC,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;EACE,OAAOI,OAAO,CAACC,MAA+C,EAAW;IACvE,IAAI;MACFP,EAAE,CAACQ,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,uEAAGZ,oBAAoB,CAACa,mBAAmB;IAAA,IAC/CC,UAAmB;IAEnB,OAAO;MACLH,KAAK;MACLC,IAAI;MACJJ,YAAY;MACZM;IACF,CAAC;EACH;;EAEA;AACF;AACA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MAAM,CAACS,UAAU,IAAI,IAAI,IAAIT,MAAM,CAACS,UAAU,KAAK,CAAC,GAChDU,UAAU,GAAGnB,MAAM,CAACS,UAAU,GAC9BU,UAAU;IAChB,IAAI;MACF,OAAO1B,EAAE,CAACQ,IAAI,CAACC,YAAY,CAACF,MAAM,CAACG,YAAY,EAAEiB,KAAK,CAAC;IACzD,CAAC,CAAC,OAAOhB,CAAC,EAAE;MACVR,GAAG,CAACyB,KAAK,CAAC,0BAA0B,CAAC;IACvC;IACA,OAAO,EAAE;EACX;AACF;AAAC,gBAzKYvB,sBAAsB,2BA2EF,cAAc;AAAA,gBA3ElCA,sBAAsB,oBA6ETA,sBAAsB,CAACY,gBAAgB,CAC7D,SAAS,EACT,SAAS,CACV;AAAA,gBAhFUZ,sBAAsB,yBAkFJA,sBAAsB,CAACY,gBAAgB,CAClE,cAAc,EACd,YAAY,EACZ,KAAK,CACN;AAAA,gBAtFUZ,sBAAsB,qBAwFRA,sBAAsB,CAACY,gBAAgB,CAC9D,UAAU,EACV,gBAAgB,EAChB,QAAQ,CACT;AAAA,gBA5FUZ,sBAAsB,gCA8FGA,sBAAsB,CAACY,gBAAgB,CACzE,qBAAqB,EACrB,UAAU,CACX;AAAA,gBAjGUZ,sBAAsB,kBAmGXA,sBAAsB,CAACY,gBAAgB,CAC3D,OAAO,EACP,SAAS,CACV;AAAA,gBAtGUZ,sBAAsB,+BAwGEA,sBAAsB,CAACY,gBAAgB,CACxE,MAAM,EACN,YAAY,CACb;AAAA,gBA3GUZ,sBAAsB,gCA6GGA,sBAAsB,CAACY,gBAAgB,CACzE,QAAQ,EACR,cAAc,CACf;AA2DH,eAAeZ,sBAAsB"}
@@ -1,6 +1,6 @@
1
1
  import TableColumnFormatter, { TableColumnFormat } from './TableColumnFormatter';
2
2
  export type IntegerColumnFormat = TableColumnFormat & {
3
- multiplier?: number;
3
+ multiplier?: number | null;
4
4
  };
5
5
  export type IntegerColumnFormatterOptions = {
6
6
  defaultFormatString?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"IntegerColumnFormatter.d.ts","sourceRoot":"","sources":["../../src/formatters/IntegerColumnFormatter.ts"],"names":[],"mappings":"AAGA,OAAO,oBAAoB,EAAE,EAC3B,iBAAiB,EAClB,MAAM,wBAAwB,CAAC;AAIhC,MAAM,MAAM,mBAAmB,GAAG,iBAAiB,GAAG;IACpD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG;IAE1C,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,kDAAkD;AAClD,qBAAa,sBAAuB,SAAQ,oBAAoB,CAAC,MAAM,CAAC;IACtE;;;;OAIG;IACH,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,iBAAiB,EAAE,cAAc,CAAC,GAAG,OAAO;IASxE;;;;;;;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;;;;;OAKG;IACH,MAAM,CAAC,YAAY,CACjB,OAAO,EAAE,mBAAmB,GAAG,IAAI,EACnC,OAAO,EAAE,mBAAmB,GAAG,IAAI,GAClC,OAAO;IAWV,MAAM,CAAC,qBAAqB,SAAa;IAEzC,MAAM,CAAC,eAAe,sBAIpB;IAEF,MAAM,CAAC,0BAA0B,sBAG/B;IAEF,mBAAmB,EAAE,MAAM,CAAC;gBAEhB,EACV,mBAAkE,GACnE,GAAE,6BAAkC;IAMrC;;;;;OAKG;IACH,MAAM,CACJ,UAAU,EAAE,MAAM,EAClB,MAAM,GAAE,OAAO,CAAC,mBAAmB,CAAM,GACxC,MAAM;CAgBV;AAED,eAAe,sBAAsB,CAAC"}
1
+ {"version":3,"file":"IntegerColumnFormatter.d.ts","sourceRoot":"","sources":["../../src/formatters/IntegerColumnFormatter.ts"],"names":[],"mappings":"AAGA,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,kDAAkD;AAClD,qBAAa,sBAAuB,SAAQ,oBAAoB,CAAC,MAAM,CAAC;IACtE;;;;OAIG;IACH,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,iBAAiB,EAAE,cAAc,CAAC,GAAG,OAAO;IASxE;;;;;;;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;;;;;OAKG;IACH,MAAM,CAAC,YAAY,CACjB,OAAO,EAAE,mBAAmB,GAAG,IAAI,EACnC,OAAO,EAAE,mBAAmB,GAAG,IAAI,GAClC,OAAO;IAWV,MAAM,CAAC,qBAAqB,SAAa;IAEzC,MAAM,CAAC,eAAe,sBAIpB;IAEF,MAAM,CAAC,0BAA0B,sBAG/B;IAEF,mBAAmB,EAAE,MAAM,CAAC;gBAEhB,EACV,mBAAkE,GACnE,GAAE,6BAAkC;IAMrC;;;;;OAKG;IACH,MAAM,CACJ,UAAU,EAAE,MAAM,EAClB,MAAM,GAAE,OAAO,CAAC,mBAAmB,CAAM,GACxC,MAAM;CAgBV;AAED,eAAe,sBAAsB,CAAC"}
@@ -93,7 +93,7 @@ export class IntegerColumnFormatter extends TableColumnFormatter {
93
93
  format(valueParam) {
94
94
  var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
95
95
  var formatString = format.formatString != null && format.formatString !== '' ? format.formatString : this.defaultFormatString;
96
- var value = format.multiplier !== undefined && format.multiplier !== 0 ? valueParam * format.multiplier : valueParam;
96
+ var value = format.multiplier != null && format.multiplier !== 0 ? valueParam * format.multiplier : valueParam;
97
97
  try {
98
98
  return dh.i18n.NumberFormat.format(formatString, value);
99
99
  } catch (e) {
@@ -1 +1 @@
1
- {"version":3,"file":"IntegerColumnFormatter.js","names":["dh","Log","TableColumnFormatter","log","module","IntegerColumnFormatter","isValid","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","undefined","error"],"sources":["../../src/formatters/IntegerColumnFormatter.ts"],"sourcesContent":["/* eslint class-methods-use-this: \"off\" */\nimport dh from '@deephaven/jsapi-shim';\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;\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 format Format object\n * @returns true for valid object\n */\n static isValid(format: Pick<TableColumnFormat, 'formatString'>): 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 defaultFormatString: string;\n\n constructor({\n defaultFormatString = IntegerColumnFormatter.DEFAULT_FORMAT_STRING,\n }: IntegerColumnFormatterOptions = {}) {\n super();\n\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 !== undefined && format.multiplier !== 0\n ? valueParam * format.multiplier\n : valueParam;\n try {\n return 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;AACA,OAAOA,EAAE,MAAM,uBAAuB;AACtC,OAAOC,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;EACE,OAAOI,OAAO,CAACC,MAA+C,EAAW;IACvE,IAAI;MACFP,EAAE,CAACQ,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,KA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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,KAAKY,SAAS,IAAIrB,MAAM,CAACS,UAAU,KAAK,CAAC,GACtDU,UAAU,GAAGnB,MAAM,CAACS,UAAU,GAC9BU,UAAU;IAChB,IAAI;MACF,OAAO1B,EAAE,CAACQ,IAAI,CAACC,YAAY,CAACF,MAAM,CAACG,YAAY,EAAEiB,KAAK,CAAC;IACzD,CAAC,CAAC,OAAOhB,CAAC,EAAE;MACVR,GAAG,CAAC0B,KAAK,CAAC,0BAA0B,CAAC;IACvC;IACA,OAAO,EAAE;EACX;AACF;AAAC,gBA/IYxB,sBAAsB,2BA+FF,SAAS;AAAA,gBA/F7BA,sBAAsB,qBAiGRA,sBAAsB,CAACY,gBAAgB,CAC9D,UAAU,EACV,gBAAgB,EAChB,QAAQ,CACT;AAAA,gBArGUZ,sBAAsB,gCAuGGA,sBAAsB,CAACY,gBAAgB,CACzE,qBAAqB,EACrB,UAAU,CACX;AAuCH,eAAeZ,sBAAsB"}
1
+ {"version":3,"file":"IntegerColumnFormatter.js","names":["dh","Log","TableColumnFormatter","log","module","IntegerColumnFormatter","isValid","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 dh from '@deephaven/jsapi-shim';\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 format Format object\n * @returns true for valid object\n */\n static isValid(format: Pick<TableColumnFormat, 'formatString'>): 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 defaultFormatString: string;\n\n constructor({\n defaultFormatString = IntegerColumnFormatter.DEFAULT_FORMAT_STRING,\n }: IntegerColumnFormatterOptions = {}) {\n super();\n\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 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;AACA,OAAOA,EAAE,MAAM,uBAAuB;AACtC,OAAOC,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;EACE,OAAOI,OAAO,CAACC,MAA+C,EAAW;IACvE,IAAI;MACFP,EAAE,CAACQ,IAAI,CAACC,YAAY,CAACF,MAAM,CAACA,MAAM,CAACG,YAAY,EAAE,CAAC,CAAC;MACnD,O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;IAER,IAAI,CAACD,mBAAmB,GAAGA,mBAAmB;EAChD;;EAEA;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,OAAO1B,EAAE,CAACQ,IAAI,CAACC,YAAY,CAACF,MAAM,CAACG,YAAY,EAAEiB,KAAK,CAAC;IACzD,CAAC,CAAC,OAAOhB,CAAC,EAAE;MACVR,GAAG,CAACyB,KAAK,CAAC,0BAA0B,CAAC;IACvC;IACA,OAAO,EAAE;EACX;AACF;AAAC,gBA/IYvB,sBAAsB,2BA+FF,SAAS;AAAA,gBA/F7BA,sBAAsB,qBAiGRA,sBAAsB,CAACY,gBAAgB,CAC9D,UAAU,EACV,gBAAgB,EAChB,QAAQ,CACT;AAAA,gBArGUZ,sBAAsB,gCAuGGA,sBAAsB,CAACY,gBAAgB,CACzE,qBAAqB,EACrB,UAAU,CACX;AAuCH,eAAeZ,sBAAsB"}
package/dist/index.d.ts CHANGED
@@ -4,6 +4,7 @@ export * from './DateUtils';
4
4
  export * from './Formatter';
5
5
  export { default as FormatterUtils } from './FormatterUtils';
6
6
  export * from './FormatterUtils';
7
+ export * from './MessageUtils';
7
8
  export * from './Settings';
8
9
  export * from './TableUtils';
9
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC"}
package/dist/index.js CHANGED
@@ -4,6 +4,7 @@ export * from "./DateUtils.js";
4
4
  export * from "./Formatter.js";
5
5
  export { default as FormatterUtils } from "./FormatterUtils.js";
6
6
  export * from "./FormatterUtils.js";
7
+ export * from "./MessageUtils.js";
7
8
  export * from "./Settings.js";
8
9
  export * from "./TableUtils.js";
9
10
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["default","FormatterUtils"],"sources":["../src/index.ts"],"sourcesContent":["export * from './ConnectionUtils';\nexport * from './formatters';\nexport * from './DateUtils';\nexport * from './Formatter';\nexport { default as FormatterUtils } from './FormatterUtils';\nexport * from './FormatterUtils';\nexport * from './Settings';\nexport * from './TableUtils';\n"],"mappings":";;;;SAISA,OAAO,IAAIC,cAAc;AAAA;AAAA;AAAA"}
1
+ {"version":3,"file":"index.js","names":["default","FormatterUtils"],"sources":["../src/index.ts"],"sourcesContent":["export * from './ConnectionUtils';\nexport * from './formatters';\nexport * from './DateUtils';\nexport * from './Formatter';\nexport { default as FormatterUtils } from './FormatterUtils';\nexport * from './FormatterUtils';\nexport * from './MessageUtils';\nexport * from './Settings';\nexport * from './TableUtils';\n"],"mappings":";;;;SAISA,OAAO,IAAIC,cAAc;AAAA;AAAA;AAAA;AAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deephaven/jsapi-utils",
3
- "version": "0.31.3",
3
+ "version": "0.31.5",
4
4
  "description": "Deephaven JSAPI Utils",
5
5
  "author": "Deephaven Data Labs LLC",
6
6
  "license": "Apache-2.0",
@@ -24,7 +24,8 @@
24
24
  "@deephaven/filters": "^0.31.0",
25
25
  "@deephaven/jsapi-shim": "^0.31.0",
26
26
  "@deephaven/log": "^0.31.0",
27
- "@deephaven/utils": "^0.31.0"
27
+ "@deephaven/utils": "^0.31.0",
28
+ "shortid": "^2.2.16"
28
29
  },
29
30
  "devDependencies": {
30
31
  "@deephaven/tsconfig": "^0.31.0"
@@ -35,5 +36,5 @@
35
36
  "publishConfig": {
36
37
  "access": "public"
37
38
  },
38
- "gitHead": "a42ea53976af76011b5fd85224e7795a5c2e4b5e"
39
+ "gitHead": "0e3eb2c7072167f82791c29ccd1a4f6466d4aca8"
39
40
  }