@deephaven/jsapi-components 0.71.1-alpha-ui-picker-formatting.9 → 0.71.1-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"useGetItemIndexByValue.d.ts","sourceRoot":"","sources":["../src/useGetItemIndexByValue.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,wBAAwB,CAAC;AAM5C;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,EAC7C,UAAU,EACV,KAAK,EACL,KAAK,GACN,EAAE;IACD,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,EAAE,CAAC,KAAK,GAAG,IAAI,CAAC;IACvB,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CAClC,GAAG,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAmB/B;AAED,eAAe,sBAAsB,CAAC"}
1
+ {"version":3,"file":"useGetItemIndexByValue.d.ts","sourceRoot":"","sources":["../src/useGetItemIndexByValue.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,wBAAwB,CAAC;AAG5C;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,EAC7C,UAAU,EACV,KAAK,EACL,KAAK,GACN,EAAE;IACD,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,EAAE,CAAC,KAAK,GAAG,IAAI,CAAC;IACvB,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CAClC,GAAG,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAc/B;AAED,eAAe,sBAAsB,CAAC"}
@@ -1,10 +1,7 @@
1
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
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
3
  import { useCallback } from 'react';
4
- import Log from '@deephaven/log';
5
4
  import { useTableUtils } from "./useTableUtils.js";
6
- var log = Log.module('useGetItemIndexByValue');
7
-
8
5
  /**
9
6
  * Returns a function that gets the index of the first row containing a column
10
7
  * value.
@@ -27,17 +24,8 @@ export function useGetItemIndexByValue(_ref) {
27
24
  }
28
25
  var column = table.findColumn(columnName);
29
26
  var columnValueType = tableUtils.getValueType(column.type);
30
- try {
31
- var index = yield table.seekRow(0, column, columnValueType, value);
32
- return index === -1 ? null : index;
33
- } catch (err) {
34
- log.debug('Error seeking row', {
35
- column,
36
- value,
37
- columnValueType
38
- });
39
- throw err;
40
- }
27
+ var index = yield table.seekRow(0, column, columnValueType, value);
28
+ return index === -1 ? null : index;
41
29
  }), [columnName, table, tableUtils, value]);
42
30
  }
43
31
  export default useGetItemIndexByValue;
@@ -1 +1 @@
1
- {"version":3,"file":"useGetItemIndexByValue.js","names":["useCallback","Log","useTableUtils","log","module","useGetItemIndexByValue","_ref","columnName","value","table","tableUtils","_asyncToGenerator","column","findColumn","columnValueType","getValueType","type","index","seekRow","err","debug"],"sources":["../src/useGetItemIndexByValue.ts"],"sourcesContent":["import { useCallback } from 'react';\nimport { dh } from '@deephaven/jsapi-types';\nimport Log from '@deephaven/log';\nimport { useTableUtils } from './useTableUtils';\n\nconst log = Log.module('useGetItemIndexByValue');\n\n/**\n * Returns a function that gets the index of the first row containing a column\n * value.\n * @param columnName The name of the column to search\n * @param value The value to search for\n * @param table The table to search in\n * @returns A function that returns the index of the first row containing the\n * matching value, or `null` if no match is found\n */\nexport function useGetItemIndexByValue<TValue>({\n columnName,\n value,\n table,\n}: {\n columnName: string;\n table: dh.Table | null;\n value: TValue | null | undefined;\n}): () => Promise<number | null> {\n const tableUtils = useTableUtils();\n\n return useCallback(async () => {\n if (table == null || value == null) {\n return null;\n }\n\n const column = table.findColumn(columnName);\n const columnValueType = tableUtils.getValueType(column.type);\n\n try {\n const index = await table.seekRow(0, column, columnValueType, value);\n return index === -1 ? null : index;\n } catch (err) {\n log.debug('Error seeking row', { column, value, columnValueType });\n throw err;\n }\n }, [columnName, table, tableUtils, value]);\n}\n\nexport default useGetItemIndexByValue;\n"],"mappings":";;AAAA,SAASA,WAAW,QAAQ,OAAO;AAEnC,OAAOC,GAAG,MAAM,gBAAgB;AAAC,SACxBC,aAAa;AAEtB,IAAMC,GAAG,GAAGF,GAAG,CAACG,MAAM,CAAC,wBAAwB,CAAC;;AAEhD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,sBAAsBA,CAAAC,IAAA,EAQL;EAAA,IARc;IAC7CC,UAAU;IACVC,KAAK;IACLC;EAKF,CAAC,GAAAH,IAAA;EACC,IAAMI,UAAU,GAAGR,aAAa,CAAC,CAAC;EAElC,OAAOF,WAAW,eAAAW,iBAAA,CAAC,aAAY;IAC7B,IAAIF,KAAK,IAAI,IAAI,IAAID,KAAK,IAAI,IAAI,EAAE;MAClC,OAAO,IAAI;IACb;IAEA,IAAMI,MAAM,GAAGH,KAAK,CAACI,UAAU,CAACN,UAAU,CAAC;IAC3C,IAAMO,eAAe,GAAGJ,UAAU,CAACK,YAAY,CAACH,MAAM,CAACI,IAAI,CAAC;IAE5D,IAAI;MACF,IAAMC,KAAK,SAASR,KAAK,CAACS,OAAO,CAAC,CAAC,EAAEN,MAAM,EAAEE,eAAe,EAAEN,KAAK,CAAC;MACpE,OAAOS,KAAK,KAAK,CAAC,CAAC,GAAG,IAAI,GAAGA,KAAK;IACpC,CAAC,CAAC,OAAOE,GAAG,EAAE;MACZhB,GAAG,CAACiB,KAAK,CAAC,mBAAmB,EAAE;QAAER,MAAM;QAAEJ,KAAK;QAAEM;MAAgB,CAAC,CAAC;MAClE,MAAMK,GAAG;IACX;EACF,CAAC,GAAE,CAACZ,UAAU,EAAEE,KAAK,EAAEC,UAAU,EAAEF,KAAK,CAAC,CAAC;AAC5C;AAEA,eAAeH,sBAAsB"}
1
+ {"version":3,"file":"useGetItemIndexByValue.js","names":["useCallback","useTableUtils","useGetItemIndexByValue","_ref","columnName","value","table","tableUtils","_asyncToGenerator","column","findColumn","columnValueType","getValueType","type","index","seekRow"],"sources":["../src/useGetItemIndexByValue.ts"],"sourcesContent":["import { useCallback } from 'react';\nimport { dh } from '@deephaven/jsapi-types';\nimport { useTableUtils } from './useTableUtils';\n\n/**\n * Returns a function that gets the index of the first row containing a column\n * value.\n * @param columnName The name of the column to search\n * @param value The value to search for\n * @param table The table to search in\n * @returns A function that returns the index of the first row containing the\n * matching value, or `null` if no match is found\n */\nexport function useGetItemIndexByValue<TValue>({\n columnName,\n value,\n table,\n}: {\n columnName: string;\n table: dh.Table | null;\n value: TValue | null | undefined;\n}): () => Promise<number | null> {\n const tableUtils = useTableUtils();\n\n return useCallback(async () => {\n if (table == null || value == null) {\n return null;\n }\n\n const column = table.findColumn(columnName);\n const columnValueType = tableUtils.getValueType(column.type);\n\n const index = await table.seekRow(0, column, columnValueType, value);\n return index === -1 ? null : index;\n }, [columnName, table, tableUtils, value]);\n}\n\nexport default useGetItemIndexByValue;\n"],"mappings":";;AAAA,SAASA,WAAW,QAAQ,OAAO;AAAC,SAE3BC,aAAa;AAEtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,sBAAsBA,CAAAC,IAAA,EAQL;EAAA,IARc;IAC7CC,UAAU;IACVC,KAAK;IACLC;EAKF,CAAC,GAAAH,IAAA;EACC,IAAMI,UAAU,GAAGN,aAAa,CAAC,CAAC;EAElC,OAAOD,WAAW,eAAAQ,iBAAA,CAAC,aAAY;IAC7B,IAAIF,KAAK,IAAI,IAAI,IAAID,KAAK,IAAI,IAAI,EAAE;MAClC,OAAO,IAAI;IACb;IAEA,IAAMI,MAAM,GAAGH,KAAK,CAACI,UAAU,CAACN,UAAU,CAAC;IAC3C,IAAMO,eAAe,GAAGJ,UAAU,CAACK,YAAY,CAACH,MAAM,CAACI,IAAI,CAAC;IAE5D,IAAMC,KAAK,SAASR,KAAK,CAACS,OAAO,CAAC,CAAC,EAAEN,MAAM,EAAEE,eAAe,EAAEN,KAAK,CAAC;IACpE,OAAOS,KAAK,KAAK,CAAC,CAAC,GAAG,IAAI,GAAGA,KAAK;EACpC,CAAC,GAAE,CAACV,UAAU,EAAEE,KAAK,EAAEC,UAAU,EAAEF,KAAK,CAAC,CAAC;AAC5C;AAEA,eAAeH,sBAAsB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deephaven/jsapi-components",
3
- "version": "0.71.1-alpha-ui-picker-formatting.9+1e86dc67",
3
+ "version": "0.71.1-beta.3+f06a141a",
4
4
  "description": "Deephaven JSAPI Components",
5
5
  "author": "Deephaven Data Labs LLC",
6
6
  "license": "Apache-2.0",
@@ -22,13 +22,13 @@
22
22
  "build:sass": "sass --embed-sources --load-path=../../node_modules ./src:./dist"
23
23
  },
24
24
  "dependencies": {
25
- "@deephaven/components": "^0.71.1-alpha-ui-picker-formatting.9+1e86dc67",
26
- "@deephaven/jsapi-bootstrap": "^0.71.1-alpha-ui-picker-formatting.9+1e86dc67",
25
+ "@deephaven/components": "^0.71.1-beta.3+f06a141a",
26
+ "@deephaven/jsapi-bootstrap": "^0.71.1-beta.3+f06a141a",
27
27
  "@deephaven/jsapi-types": "1.0.0-dev0.33.1",
28
- "@deephaven/jsapi-utils": "^0.71.1-alpha-ui-picker-formatting.9+1e86dc67",
29
- "@deephaven/log": "^0.71.1-alpha-ui-picker-formatting.9+1e86dc67",
30
- "@deephaven/react-hooks": "^0.71.1-alpha-ui-picker-formatting.9+1e86dc67",
31
- "@deephaven/utils": "^0.71.1-alpha-ui-picker-formatting.9+1e86dc67",
28
+ "@deephaven/jsapi-utils": "^0.71.1-beta.3+f06a141a",
29
+ "@deephaven/log": "^0.71.1-beta.3+f06a141a",
30
+ "@deephaven/react-hooks": "^0.71.1-beta.3+f06a141a",
31
+ "@deephaven/utils": "^0.71.1-beta.3+f06a141a",
32
32
  "@types/js-cookie": "^3.0.3",
33
33
  "classnames": "^2.3.2",
34
34
  "js-cookie": "^3.0.5",
@@ -36,7 +36,7 @@
36
36
  "prop-types": "^15.8.1"
37
37
  },
38
38
  "devDependencies": {
39
- "@deephaven/jsapi-shim": "^0.71.1-alpha-ui-picker-formatting.9+1e86dc67",
39
+ "@deephaven/jsapi-shim": "^0.71.1-beta.3+f06a141a",
40
40
  "react-test-renderer": "^17.0.2"
41
41
  },
42
42
  "peerDependencies": {
@@ -51,5 +51,5 @@
51
51
  "publishConfig": {
52
52
  "access": "public"
53
53
  },
54
- "gitHead": "1e86dc67aa5a14e89ba2d9c3c0451627b1596e5c"
54
+ "gitHead": "f06a141a611e1a86c9b6dcbff963d61e3bee7010"
55
55
  }