@vuu-ui/vuu-data-react 0.8.32-debug → 0.8.33

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/cjs/index.js CHANGED
@@ -1,595 +1,25 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/index.ts
21
- var src_exports = {};
22
- __export(src_exports, {
23
- MovingWindow: () => MovingWindow,
24
- addRowsFromInstruments: () => addRowsFromInstruments,
25
- getSelectedOption: () => getSelectedOption,
26
- getTypeaheadParams: () => getTypeaheadParams,
27
- getVuuTableSchema: () => getVuuTableSchema,
28
- useDataSource: () => useDataSource,
29
- useLookupValues: () => useLookupValues,
30
- useServerConnectionQuality: () => useServerConnectionQuality,
31
- useServerConnectionStatus: () => useServerConnectionStatus,
32
- useTypeaheadSuggestions: () => useTypeaheadSuggestions,
33
- useVuuMenuActions: () => useVuuMenuActions,
34
- useVuuTables: () => useVuuTables
35
- });
36
- module.exports = __toCommonJS(src_exports);
37
-
38
- // src/hooks/useDataSource.ts
39
- var import_vuu_utils = require("@vuu-ui/vuu-utils");
40
- var import_react = require("react");
41
- var { SELECTED } = import_vuu_utils.metadataKeys;
42
- function useDataSource({
43
- dataSource,
44
- renderBufferSize = 10
45
- }) {
46
- const [, forceUpdate] = (0, import_react.useState)(null);
47
- const isMounted = (0, import_react.useRef)(true);
48
- const hasUpdated = (0, import_react.useRef)(false);
49
- const rafHandle = (0, import_react.useRef)(null);
50
- const data = (0, import_react.useRef)([]);
51
- const rangeRef = (0, import_react.useRef)({ from: 0, to: 10 });
52
- const dataWindow = (0, import_react.useMemo)(
53
- () => new MovingWindow((0, import_vuu_utils.getFullRange)(rangeRef.current, renderBufferSize)),
54
- [renderBufferSize]
55
- );
56
- const setData = (0, import_react.useCallback)(
57
- (updates) => {
58
- for (const row of updates) {
59
- dataWindow.add(row);
60
- }
61
- data.current = dataWindow.data.slice();
62
- hasUpdated.current = true;
63
- },
64
- [dataWindow]
65
- );
66
- const datasourceMessageHandler = (0, import_react.useCallback)(
67
- (message) => {
68
- if (message.type === "viewport-update") {
69
- if (message.size !== void 0) {
70
- dataWindow.setRowCount(message.size);
71
- }
72
- if (message.rows) {
73
- setData(message.rows);
74
- forceUpdate({});
75
- } else if (message.size !== void 0) {
76
- data.current = dataWindow.data.slice();
77
- hasUpdated.current = true;
78
- }
79
- }
80
- },
81
- [dataWindow, setData]
82
- );
83
- (0, import_react.useEffect)(
84
- () => () => {
85
- if (rafHandle.current) {
86
- cancelAnimationFrame(rafHandle.current);
87
- rafHandle.current = null;
88
- }
89
- isMounted.current = false;
90
- },
91
- []
92
- );
93
- const setRange = (0, import_react.useCallback)(
94
- (range) => {
95
- rangeRef.current = range;
96
- const fullRange = (0, import_vuu_utils.getFullRange)(rangeRef.current, renderBufferSize);
97
- dataSource.range = fullRange;
98
- dataWindow.setRange(fullRange.from, fullRange.to);
99
- },
100
- [dataSource, dataWindow, renderBufferSize]
101
- );
102
- (0, import_react.useMemo)(() => {
103
- const { from, to } = rangeRef.current;
104
- const fullRange = (0, import_vuu_utils.getFullRange)({ from, to }, renderBufferSize);
105
- dataSource.range = fullRange;
106
- dataWindow.setRange(fullRange.from, fullRange.to);
107
- }, [dataSource, dataWindow, renderBufferSize]);
108
- (0, import_react.useEffect)(() => {
109
- const { from, to } = (0, import_vuu_utils.getFullRange)(rangeRef.current, renderBufferSize);
110
- dataSource.subscribe(
111
- {
112
- range: { from, to }
113
- },
114
- datasourceMessageHandler
115
- );
116
- }, [dataSource, datasourceMessageHandler, renderBufferSize]);
117
- (0, import_react.useEffect)(
118
- () => () => {
119
- dataSource.unsubscribe();
120
- },
121
- [dataSource]
122
- );
123
- return [
124
- data.current,
125
- dataWindow.rowCount,
126
- (0, import_vuu_utils.getFullRange)(rangeRef.current, renderBufferSize),
127
- setRange
128
- ];
129
- }
130
- var MovingWindow = class {
131
- constructor({ from, to }) {
132
- this.rowCount = 0;
133
- this.setRowCount = (rowCount) => {
134
- if (rowCount < this.data.length) {
135
- this.data.length = rowCount;
136
- }
137
- this.rowCount = rowCount;
138
- };
139
- this.range = new import_vuu_utils.WindowRange(from, to);
140
- this.data = new Array(to - from);
141
- }
142
- add(data) {
143
- const [index] = data;
144
- if (this.isWithinRange(index)) {
145
- const internalIndex = index - this.range.from;
146
- this.data[internalIndex] = data;
147
- if (this.data[internalIndex - 1]) {
148
- if (this.data[internalIndex - 1][SELECTED] === 1 && data[SELECTED] === 0) {
149
- data[SELECTED] = 2;
150
- }
151
- }
152
- if (index === this.rowCount - 1) {
153
- this.data.length = internalIndex + 1;
154
- }
155
- }
156
- }
157
- getAtIndex(index) {
158
- return this.range.isWithin(index) && this.data[index - this.range.from] != null ? this.data[index - this.range.from] : void 0;
159
- }
160
- isWithinRange(index) {
161
- return this.range.isWithin(index);
162
- }
163
- setRange(from, to) {
164
- if (from !== this.range.from || to !== this.range.to) {
165
- const [overlapFrom, overlapTo] = this.range.overlap(from, to);
166
- const newData = new Array(to - from);
167
- for (let i = overlapFrom; i < overlapTo; i++) {
168
- const data = this.getAtIndex(i);
169
- if (data) {
170
- const index = i - from;
171
- newData[index] = data;
172
- }
173
- }
174
- this.data = newData;
175
- this.range.from = from;
176
- this.range.to = to;
177
- }
178
- }
179
- };
180
-
181
- // src/hooks/useLookupValues.ts
182
- var import_vuu_data_remote = require("@vuu-ui/vuu-data-remote");
183
- var import_vuu_shell = require("@vuu-ui/vuu-shell");
184
- var import_vuu_utils2 = require("@vuu-ui/vuu-utils");
185
- var import_react2 = require("react");
186
- var NO_VALUES = [];
187
- var toListOption = (value) => ({
188
- label: value,
189
- value
190
- });
191
- var lookupValueMap = /* @__PURE__ */ new Map();
192
- var loadLookupValues = ({
193
- labelColumn,
194
- table,
195
- valueColumn
196
- }) => {
197
- const tableKey = `${table.module}:${table.table}`;
198
- const lookupValues = lookupValueMap.get(tableKey);
199
- if (lookupValues) {
200
- return lookupValues;
201
- } else {
202
- const promise = new Promise((resolve) => {
203
- const columns = [valueColumn, labelColumn];
204
- const columnMap = (0, import_vuu_utils2.buildColumnMap)(columns);
205
- const dataSource = new import_vuu_data_remote.VuuDataSource({
206
- bufferSize: 0,
207
- table
208
- });
209
- dataSource.subscribe(
210
- {
211
- columns,
212
- range: { from: 0, to: 100 }
213
- },
214
- (message) => {
215
- if (message.type === "viewport-update") {
216
- if (message.rows) {
217
- const listOptions = message.rows.map((row) => ({
218
- value: row[columnMap[valueColumn]],
219
- label: row[columnMap[labelColumn]]
220
- }));
221
- resolve(listOptions);
222
- dataSource.unsubscribe();
223
- }
224
- }
225
- }
226
- );
227
- });
228
- lookupValueMap.set(tableKey, promise);
229
- return promise;
230
- }
231
- };
232
- var getSelectedOption = (values, selectedValue) => {
233
- var _a;
234
- if (selectedValue === void 0) {
235
- return null;
236
- }
237
- return (_a = values.find((option) => option.value === selectedValue)) != null ? _a : null;
238
- };
239
- var getLookupDetails = ({ name, type }) => {
240
- if ((0, import_vuu_utils2.isTypeDescriptor)(type) && (0, import_vuu_utils2.isLookupRenderer)(type.renderer)) {
241
- return type.renderer.lookup;
242
- } else {
243
- throw Error(
244
- `useLookupValues column ${name} is not configured to use lookup values`
245
- );
246
- }
247
- };
248
- var useLookupValues = (column, initialValueProp) => {
249
- const { type: columnType } = column;
250
- const { getLookupValues } = (0, import_vuu_shell.useShellContext)();
251
- const initialState = (0, import_react2.useMemo)(() => {
252
- var _a;
253
- if ((0, import_vuu_utils2.isTypeDescriptor)(columnType) && (0, import_vuu_utils2.isValueListRenderer)(columnType == null ? void 0 : columnType.renderer)) {
254
- const values2 = columnType.renderer.values.map(toListOption);
255
- return {
256
- initialValue: getSelectedOption(values2, initialValueProp),
257
- values: values2
258
- };
259
- } else {
260
- const lookupDetails = getLookupDetails(column);
261
- const values2 = (_a = getLookupValues == null ? void 0 : getLookupValues(lookupDetails.table)) != null ? _a : NO_VALUES;
262
- return {
263
- initialValue: getSelectedOption(values2, initialValueProp),
264
- values: values2
265
- };
266
- }
267
- }, [column, columnType, getLookupValues, initialValueProp]);
268
- const [{ initialValue, values }, setLookupState] = (0, import_react2.useState)(initialState);
269
- (0, import_react2.useMemo)(() => {
270
- if (values === NO_VALUES) {
271
- const lookupDetails = getLookupDetails(column);
272
- loadLookupValues(lookupDetails).then(
273
- (values2) => setLookupState({
274
- initialValue: getSelectedOption(values2, initialValueProp),
275
- values: values2
276
- })
277
- );
278
- }
279
- }, [values, column, initialValueProp]);
280
- return {
281
- initialValue,
282
- values
283
- };
284
- };
285
-
286
- // src/hooks/useServerConnectionStatus.ts
287
- var import_react3 = require("react");
288
- var import_vuu_data_remote2 = require("@vuu-ui/vuu-data-remote");
289
- var useServerConnectionStatus = () => {
290
- const [connectionStatus, setConnectionStatus] = (0, import_react3.useState)("disconnected");
291
- const handleStatusChange = (0, import_react3.useCallback)(
292
- ({ status }) => {
293
- setConnectionStatus(status);
294
- },
295
- []
296
- );
297
- (0, import_react3.useEffect)(() => {
298
- import_vuu_data_remote2.ConnectionManager.on("connection-status", handleStatusChange);
299
- return () => {
300
- import_vuu_data_remote2.ConnectionManager.removeListener("connection-status", handleStatusChange);
301
- };
302
- }, [handleStatusChange]);
303
- return connectionStatus;
304
- };
305
-
306
- // src/hooks/useServerConnectionQuality.ts
307
- var import_react4 = require("react");
308
- var import_vuu_data_remote3 = require("@vuu-ui/vuu-data-remote");
309
- var useServerConnectionQuality = () => {
310
- const [messagesPerSecond, setMessagesPerSecond] = (0, import_react4.useState)(0);
311
- const handleConnectivityMessage = (0, import_react4.useCallback)(({ messages }) => {
312
- setMessagesPerSecond(messages.messagesLength);
313
- }, []);
314
- (0, import_react4.useEffect)(() => {
315
- import_vuu_data_remote3.ConnectionManager.on("connection-metrics", handleConnectivityMessage);
316
- return () => {
317
- import_vuu_data_remote3.ConnectionManager.removeListener(
318
- "connection-metrics",
319
- handleConnectivityMessage
320
- );
321
- };
322
- }, [handleConnectivityMessage]);
323
- return messagesPerSecond;
324
- };
325
-
326
- // src/hooks/useTypeaheadSuggestions.ts
327
- var import_vuu_data_remote4 = require("@vuu-ui/vuu-data-remote");
328
- var import_react5 = require("react");
329
- var TYPEAHEAD_MESSAGE_CONSTANTS = {
330
- type: "RPC_CALL",
331
- service: "TypeAheadRpcHandler"
332
- };
333
- var getTypeaheadParams = (table, column, text = "", selectedValues = []) => {
334
- if (text !== "" && !selectedValues.includes(text.toLowerCase())) {
335
- return [table, column, text];
336
- }
337
- return [table, column];
338
- };
339
- var useTypeaheadSuggestions = () => (0, import_react5.useCallback)(async (params) => {
340
- const rpcMessage = params.length === 2 ? {
341
- method: "getUniqueFieldValues",
342
- params,
343
- ...TYPEAHEAD_MESSAGE_CONSTANTS
344
- } : {
345
- method: "getUniqueFieldValuesStartingWith",
346
- params,
347
- ...TYPEAHEAD_MESSAGE_CONSTANTS
348
- };
349
- return (0, import_vuu_data_remote4.makeRpcCall)(rpcMessage);
350
- }, []);
351
-
352
- // src/hooks/useVuuMenuActions.ts
353
- var import_vuu_filter_parser = require("@vuu-ui/vuu-filter-parser");
354
- var import_vuu_utils3 = require("@vuu-ui/vuu-utils");
355
- var import_react6 = require("react");
356
- var addRowsFromInstruments = "addRowsFromInstruments";
357
- var { KEY } = import_vuu_utils3.metadataKeys;
358
- var NO_CONFIG = {};
359
- var isMenuItem = (menu) => "rpcName" in menu;
360
- var isGroupMenuItem = (menu) => "menus" in menu;
361
- var isRoot = (menu) => menu.name === "ROOT";
362
- var isCellMenu = (options) => options.context === "cell";
363
- var isRowMenu = (options) => options.context === "row";
364
- var isSelectionMenu = (options) => options.context === "selected-rows";
365
- var vuuContextCompatibleWithTableLocation = (uiLocation, vuuContext, selectedRowCount = 0) => {
366
- switch (uiLocation) {
367
- case "grid":
368
- if (vuuContext === "selected-rows") {
369
- return selectedRowCount > 0;
370
- } else {
371
- return true;
372
- }
373
- case "header":
374
- return vuuContext === "grid";
375
- default:
376
- return false;
377
- }
378
- };
379
- var gridRowMeetsFilterCriteria = (context, row, selectedRows, filter, columnMap) => {
380
- if (context === "cell" || context === "row") {
381
- const filterPredicate = (0, import_vuu_filter_parser.getFilterPredicate)(columnMap, filter);
382
- return filterPredicate(row);
383
- } else if (context === "selected-rows") {
384
- if (selectedRows.length === 0) {
385
- return false;
386
- } else {
387
- const filterPredicate = (0, import_vuu_filter_parser.getFilterPredicate)(columnMap, filter);
388
- return selectedRows.every(filterPredicate);
389
- }
390
- }
391
- return true;
392
- };
393
- var getMenuRpcRequest = (options) => {
394
- const { rpcName } = options;
395
- if (isCellMenu(options)) {
396
- return {
397
- field: options.field,
398
- rowKey: options.rowKey,
399
- rpcName,
400
- value: options.value,
401
- type: "VIEW_PORT_MENU_CELL_RPC"
402
- };
403
- } else if (isRowMenu(options)) {
404
- return {
405
- rowKey: options.rowKey,
406
- row: options.row,
407
- rpcName,
408
- type: "VIEW_PORT_MENU_ROW_RPC"
409
- };
410
- } else if (isSelectionMenu(options)) {
411
- return {
412
- rpcName,
413
- type: "VIEW_PORT_MENUS_SELECT_RPC"
414
- };
415
- } else {
416
- return {
417
- rpcName,
418
- type: "VIEW_PORT_MENU_TABLE_RPC"
419
- };
420
- }
421
- };
422
- var isTableLocation = (location) => ["grid", "header", "filter"].includes(location);
423
- var hasFilter = ({ filter }) => typeof filter === "string" && filter.length > 0;
424
- var getMenuItemOptions = (menu, options) => {
425
- switch (menu.context) {
426
- case "cell":
427
- return {
428
- ...menu,
429
- field: options.columnName,
430
- rowKey: options.row[KEY],
431
- value: options.row[options.columnMap[options.columnName]]
432
- };
433
- case "row":
434
- return {
435
- ...menu,
436
- row: (0, import_vuu_utils3.getRowRecord)(options.row, options.columnMap),
437
- rowKey: options.row[KEY]
438
- };
439
- default:
440
- return menu;
441
- }
442
- };
443
- var menuShouldBeRenderedInThisContext = (menuItem, tableLocation, options) => {
444
- var _a;
445
- if (isGroupMenuItem(menuItem)) {
446
- return menuItem.menus.some(
447
- (childMenu) => menuShouldBeRenderedInThisContext(childMenu, tableLocation, options)
448
- );
449
- }
450
- if (!vuuContextCompatibleWithTableLocation(
451
- tableLocation,
452
- menuItem.context,
453
- (_a = options.selectedRows) == null ? void 0 : _a.length
454
- )) {
455
- return false;
456
- }
457
- if (tableLocation === "grid" && hasFilter(menuItem)) {
458
- return gridRowMeetsFilterCriteria(
459
- menuItem.context,
460
- options.row,
461
- options.selectedRows,
462
- menuItem.filter,
463
- options.columnMap
464
- );
465
- }
466
- if (isCellMenu(menuItem) && menuItem.field !== "*") {
467
- return menuItem.field === options.columnName;
468
- }
469
- return true;
470
- };
471
- var buildMenuDescriptor = (menu, tableLocation, options) => {
472
- if (menuShouldBeRenderedInThisContext(menu, tableLocation, options)) {
473
- if (isMenuItem(menu)) {
474
- return {
475
- label: menu.name,
476
- action: "MENU_RPC_CALL",
477
- options: getMenuItemOptions(menu, options)
478
- };
479
- } else {
480
- const children = menu.menus.map(
481
- (childMenu) => buildMenuDescriptor(childMenu, tableLocation, options)
482
- ).filter(
483
- (childMenu) => childMenu !== void 0
484
- );
485
- if (children.length > 0) {
486
- return {
487
- label: menu.name,
488
- children
489
- };
490
- }
491
- }
492
- }
493
- };
494
- var useVuuMenuActions = ({
495
- clientSideMenuActionHandler,
496
- dataSource,
497
- menuActionConfig = NO_CONFIG,
498
- onRpcResponse
499
- }) => {
500
- const buildViewserverMenuOptions = (0, import_react6.useCallback)(
501
- (location, options) => {
502
- const { links, menu } = dataSource;
503
- const { visualLink } = menuActionConfig;
504
- const descriptors = [];
505
- if (location === "grid" && links && !visualLink) {
506
- links.forEach((linkDescriptor) => {
507
- const { link, label: linkLabel } = linkDescriptor;
508
- const label = linkLabel ? linkLabel : link.toTable;
509
- descriptors.push({
510
- label: `Link to ${label}`,
511
- action: "link-table",
512
- options: linkDescriptor
513
- });
514
- });
515
- }
516
- if (menu && isTableLocation(location)) {
517
- const menuDescriptor = buildMenuDescriptor(
518
- menu,
519
- location,
520
- options
521
- );
522
- if (isRoot(menu) && (0, import_vuu_utils3.isGroupMenuItemDescriptor)(menuDescriptor)) {
523
- descriptors.push(...menuDescriptor.children);
524
- } else if (menuDescriptor) {
525
- descriptors.push(menuDescriptor);
526
- }
527
- }
528
- return descriptors;
529
- },
530
- [dataSource, menuActionConfig]
531
- );
532
- const handleMenuAction = (0, import_react6.useCallback)(
533
- ({ menuId, options }) => {
534
- if (clientSideMenuActionHandler == null ? void 0 : clientSideMenuActionHandler(menuId, options)) {
535
- return true;
536
- } else if (menuId === "MENU_RPC_CALL") {
537
- const rpcRequest = getMenuRpcRequest(options);
538
- dataSource.menuRpcCall(rpcRequest).then((rpcResponse) => {
539
- if (onRpcResponse && rpcResponse) {
540
- onRpcResponse && onRpcResponse(rpcResponse);
541
- }
542
- });
543
- return true;
544
- } else if (menuId === "link-table") {
545
- return dataSource.visualLink = options, true;
546
- } else {
547
- console.log(
548
- `useViewServer handleMenuAction, can't handle action type ${menuId}`
549
- );
550
- }
551
- return false;
552
- },
553
- [clientSideMenuActionHandler, dataSource, onRpcResponse]
554
- );
555
- return {
556
- buildViewserverMenuOptions,
557
- handleMenuAction
558
- };
559
- };
560
-
561
- // src/hooks/useVuuTables.ts
562
- var import_vuu_data_remote5 = require("@vuu-ui/vuu-data-remote");
563
- var import_react7 = require("react");
564
- var useVuuTables = () => {
565
- const [tables, setTables] = (0, import_react7.useState)();
566
- const buildTables = (0, import_react7.useCallback)((schemas) => {
567
- const vuuTables = /* @__PURE__ */ new Map();
568
- schemas.forEach((schema) => {
569
- vuuTables.set(schema.table.table, schema);
570
- });
571
- return vuuTables;
572
- }, []);
573
- (0, import_react7.useEffect)(() => {
574
- async function fetchTableMetadata() {
575
- try {
576
- const server = await (0, import_vuu_data_remote5.getServerAPI)();
577
- const { tables: tables2 } = await server.getTableList();
578
- const tableSchemas = buildTables(
579
- await Promise.all(
580
- tables2.map((vuuTable) => server.getTableSchema(vuuTable))
581
- )
582
- );
583
- setTables(tableSchemas);
584
- } catch (err) {
585
- console.warn(
586
- `useVuuTables: unable to connect to Vuu server ${String(err)}`
587
- );
588
- }
589
- }
590
- fetchTableMetadata();
591
- }, [buildTables]);
592
- return tables;
593
- };
594
- var getVuuTableSchema = (table) => (0, import_vuu_data_remote5.getServerAPI)().then((server) => server.getTableSchema(table));
1
+ 'use strict';
2
+
3
+ var useDataSource = require('./hooks/useDataSource.js');
4
+ var useLookupValues = require('./hooks/useLookupValues.js');
5
+ var useServerConnectionStatus = require('./hooks/useServerConnectionStatus.js');
6
+ var useServerConnectionQuality = require('./hooks/useServerConnectionQuality.js');
7
+ var useTypeaheadSuggestions = require('./hooks/useTypeaheadSuggestions.js');
8
+ var useVuuMenuActions = require('./hooks/useVuuMenuActions.js');
9
+ var useVuuTables = require('./hooks/useVuuTables.js');
10
+
11
+
12
+
13
+ exports.MovingWindow = useDataSource.MovingWindow;
14
+ exports.useDataSource = useDataSource.useDataSource;
15
+ exports.getSelectedOption = useLookupValues.getSelectedOption;
16
+ exports.useLookupValues = useLookupValues.useLookupValues;
17
+ exports.useServerConnectionStatus = useServerConnectionStatus.useServerConnectionStatus;
18
+ exports.useServerConnectionQuality = useServerConnectionQuality.useServerConnectionQuality;
19
+ exports.getTypeaheadParams = useTypeaheadSuggestions.getTypeaheadParams;
20
+ exports.useTypeaheadSuggestions = useTypeaheadSuggestions.useTypeaheadSuggestions;
21
+ exports.addRowsFromInstruments = useVuuMenuActions.addRowsFromInstruments;
22
+ exports.useVuuMenuActions = useVuuMenuActions.useVuuMenuActions;
23
+ exports.getVuuTableSchema = useVuuTables.getVuuTableSchema;
24
+ exports.useVuuTables = useVuuTables.useVuuTables;
595
25
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,32 +1,31 @@
1
1
  {
2
- "name": "@vuu-ui/vuu-data-react",
3
- "version": "0.8.32-debug",
2
+ "version": "0.8.33",
4
3
  "author": "heswell",
5
4
  "license": "Apache-2.0",
6
5
  "devDependencies": {
7
- "@vuu-ui/vuu-data-types": "0.8.32-debug",
8
- "@vuu-ui/vuu-filter-types": "0.8.32-debug",
9
- "@vuu-ui/vuu-popups": "0.8.32-debug",
10
- "@vuu-ui/vuu-protocol-types": "0.8.32-debug",
11
- "@vuu-ui/vuu-table-types": "0.8.32-debug"
6
+ "@vuu-ui/vuu-data-types": "0.8.33",
7
+ "@vuu-ui/vuu-filter-types": "0.8.33",
8
+ "@vuu-ui/vuu-popups": "0.8.33",
9
+ "@vuu-ui/vuu-protocol-types": "0.8.33",
10
+ "@vuu-ui/vuu-table-types": "0.8.33"
12
11
  },
13
12
  "dependencies": {
14
- "@vuu-ui/vuu-data-remote": "0.8.32-debug",
15
- "@vuu-ui/vuu-filter-parser": "0.8.32-debug",
16
- "@vuu-ui/vuu-popups": "0.8.32-debug",
17
- "@vuu-ui/vuu-shell": "0.8.32-debug",
18
- "@vuu-ui/vuu-utils": "0.8.32-debug"
13
+ "@vuu-ui/vuu-data-remote": "0.8.33",
14
+ "@vuu-ui/vuu-filter-parser": "0.8.33",
15
+ "@vuu-ui/vuu-popups": "0.8.33",
16
+ "@vuu-ui/vuu-shell": "0.8.33",
17
+ "@vuu-ui/vuu-utils": "0.8.33"
19
18
  },
20
19
  "peerDependencies": {
21
20
  "react": ">=17.0.2",
22
21
  "react-dom": ">=17.0.2"
23
22
  },
24
23
  "files": [
25
- "cjs",
26
- "esm",
24
+ "README.md",
27
25
  "/types"
28
26
  ],
29
- "module": "esm/index.js",
30
27
  "main": "cjs/index.js",
28
+ "module": "esm/index.js",
29
+ "name": "@vuu-ui/vuu-data-react",
31
30
  "types": "types/index.d.ts"
32
31
  }
@@ -1,4 +1,4 @@
1
- import { DataSource, DataSourceRow, DataSourceVisualLinkCreatedMessage, MenuActionHandler, MenuBuilder, MenuRpcResponse, ViewportRpcResponse, VuuUIMessageInRPCEditReject, VuuUIMessageInRPCEditResponse } from "@vuu-ui/vuu-data-types";
1
+ import { DataSource, DataSourceRow, DataSourceVisualLinkCreatedMessage, MenuActionHandler, MenuBuilder, RpcResponseHandler } from "@vuu-ui/vuu-data-types";
2
2
  import { LinkDescriptorWithLabel, VuuMenu, VuuMenuItem, VuuRowDataItemType } from "@vuu-ui/vuu-protocol-types";
3
3
  import { ColumnMap } from "@vuu-ui/vuu-utils";
4
4
  export declare const addRowsFromInstruments = "addRowsFromInstruments";
@@ -23,7 +23,6 @@ export interface MenuActionConfig {
23
23
  visualLink?: DataSourceVisualLinkCreatedMessage;
24
24
  visualLinks?: LinkDescriptorWithLabel[];
25
25
  }
26
- export type RpcResponseHandler = (response: MenuRpcResponse | VuuUIMessageInRPCEditReject | VuuUIMessageInRPCEditResponse | ViewportRpcResponse) => void;
27
26
  export interface VuuMenuActionHookProps {
28
27
  /**
29
28
  * By default, vuuMenuActions will be handled automatically. When activated, a