@deephaven/jsapi-utils 0.32.1-table-plugins.9 → 0.33.1-auth-plugins.25
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 +1 -1
- package/dist/DateUtils.d.ts.map +1 -1
- package/dist/DateUtils.js.map +1 -1
- package/dist/MessageUtils.d.ts +34 -0
- package/dist/MessageUtils.d.ts.map +1 -0
- package/dist/MessageUtils.js +80 -0
- package/dist/MessageUtils.js.map +1 -0
- package/dist/NoConsolesError.d.ts +6 -0
- package/dist/NoConsolesError.d.ts.map +1 -0
- package/dist/NoConsolesError.js +14 -0
- package/dist/NoConsolesError.js.map +1 -0
- package/dist/SessionUtils.d.ts +28 -0
- package/dist/SessionUtils.d.ts.map +1 -0
- package/dist/SessionUtils.js +93 -0
- package/dist/SessionUtils.js.map +1 -0
- package/dist/TableUtils.d.ts +1 -1
- package/dist/TableUtils.d.ts.map +1 -1
- package/dist/TableUtils.js.map +1 -1
- package/dist/formatters/DateTimeColumnFormatter.d.ts +1 -1
- package/dist/formatters/DateTimeColumnFormatter.d.ts.map +1 -1
- package/dist/formatters/DateTimeColumnFormatter.js.map +1 -1
- package/dist/formatters/DecimalColumnFormatter.d.ts +1 -1
- package/dist/formatters/DecimalColumnFormatter.d.ts.map +1 -1
- package/dist/formatters/DecimalColumnFormatter.js +1 -1
- package/dist/formatters/DecimalColumnFormatter.js.map +1 -1
- package/dist/formatters/IntegerColumnFormatter.d.ts +1 -1
- package/dist/formatters/IntegerColumnFormatter.d.ts.map +1 -1
- package/dist/formatters/IntegerColumnFormatter.js +1 -1
- package/dist/formatters/IntegerColumnFormatter.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/package.json +10 -7
|
@@ -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","
|
|
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,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;AACA;AACA;AACA;AACA;EACE,OAAOC,gBAAgB,CACrBJ,KAAa,EAGQ;IAAA,IAFrBH,YAAY,uEAAG,EAAE;IAAA,IACjBM,UAAmB;IAEnB,OAAOX,sBAAsB,CAACO,UAAU,CACtCC,KAAK,EACL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AACC,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,9 @@ 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';
|
|
8
|
+
export * from './NoConsolesError';
|
|
9
|
+
export * from './SessionUtils';
|
|
7
10
|
export * from './Settings';
|
|
8
11
|
export * from './TableUtils';
|
|
9
12
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -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,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -4,6 +4,9 @@ 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";
|
|
8
|
+
export * from "./NoConsolesError.js";
|
|
9
|
+
export * from "./SessionUtils.js";
|
|
7
10
|
export * from "./Settings.js";
|
|
8
11
|
export * from "./TableUtils.js";
|
|
9
12
|
//# 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 './NoConsolesError';\nexport * from './SessionUtils';\nexport * from './Settings';\nexport * from './TableUtils';\n"],"mappings":";;;;SAISA,OAAO,IAAIC,cAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deephaven/jsapi-utils",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.33.1-auth-plugins.25+2a689a65",
|
|
4
4
|
"description": "Deephaven JSAPI Utils",
|
|
5
5
|
"author": "Deephaven Data Labs LLC",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -21,19 +21,22 @@
|
|
|
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.
|
|
25
|
-
"@deephaven/jsapi-shim": "^0.
|
|
26
|
-
"@deephaven/
|
|
27
|
-
"@deephaven/
|
|
24
|
+
"@deephaven/filters": "^0.33.1-auth-plugins.25+2a689a65",
|
|
25
|
+
"@deephaven/jsapi-shim": "^0.33.1-auth-plugins.25+2a689a65",
|
|
26
|
+
"@deephaven/jsapi-types": "^0.33.1-auth-plugins.25+2a689a65",
|
|
27
|
+
"@deephaven/log": "^0.33.1-auth-plugins.25+2a689a65",
|
|
28
|
+
"@deephaven/utils": "^0.33.1-auth-plugins.25+2a689a65",
|
|
29
|
+
"shortid": "^2.2.16"
|
|
28
30
|
},
|
|
29
31
|
"devDependencies": {
|
|
30
|
-
"@deephaven/tsconfig": "^0.
|
|
32
|
+
"@deephaven/tsconfig": "^0.33.1-auth-plugins.25+2a689a65"
|
|
31
33
|
},
|
|
32
34
|
"files": [
|
|
33
35
|
"dist"
|
|
34
36
|
],
|
|
37
|
+
"sideEffects": false,
|
|
35
38
|
"publishConfig": {
|
|
36
39
|
"access": "public"
|
|
37
40
|
},
|
|
38
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "2a689a654f019c33259582f8196ea9acf64497e9"
|
|
39
42
|
}
|