@vuu-ui/vuu-utils 0.13.4 → 0.13.6

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.
Files changed (86) hide show
  1. package/cjs/datasource/BaseDataSource.js +4 -0
  2. package/cjs/datasource/BaseDataSource.js.map +1 -1
  3. package/cjs/moving-window.js +0 -2
  4. package/cjs/moving-window.js.map +1 -1
  5. package/cjs/range-utils.js +0 -3
  6. package/cjs/range-utils.js.map +1 -1
  7. package/esm/datasource/BaseDataSource.js +4 -0
  8. package/esm/datasource/BaseDataSource.js.map +1 -1
  9. package/esm/moving-window.js +0 -2
  10. package/esm/moving-window.js.map +1 -1
  11. package/esm/range-utils.js +0 -3
  12. package/esm/range-utils.js.map +1 -1
  13. package/package.json +11 -9
  14. package/types/DataWindow.d.ts +39 -0
  15. package/types/ShellContext.d.ts +11 -0
  16. package/types/ThemeProvider.d.ts +32 -0
  17. package/types/array-utils.d.ts +8 -0
  18. package/types/box-utils.d.ts +24 -0
  19. package/types/broadcast-channel.d.ts +16 -0
  20. package/types/column-utils.d.ts +175 -0
  21. package/types/common-types.d.ts +6 -0
  22. package/types/component-registry.d.ts +62 -0
  23. package/types/context-definitions/DataContext.d.ts +19 -0
  24. package/types/context-definitions/DataProvider.d.ts +8 -0
  25. package/types/context-definitions/DataSourceProvider.d.ts +12 -0
  26. package/types/context-definitions/WorkspaceContext.d.ts +17 -0
  27. package/types/cookie-utils.d.ts +1 -0
  28. package/types/css-utils.d.ts +1 -0
  29. package/types/data-utils.d.ts +19 -0
  30. package/types/datasource/BaseDataSource.d.ts +46 -0
  31. package/types/datasource/datasource-action-utils.d.ts +7 -0
  32. package/types/datasource/datasource-filter-utils.d.ts +2 -0
  33. package/types/datasource/datasource-utils.d.ts +45 -0
  34. package/types/date/date-utils.d.ts +2 -0
  35. package/types/date/dateTimePattern.d.ts +8 -0
  36. package/types/date/formatter.d.ts +4 -0
  37. package/types/date/index.d.ts +4 -0
  38. package/types/date/types.d.ts +24 -0
  39. package/types/debug-utils.d.ts +9 -0
  40. package/types/event-emitter.d.ts +21 -0
  41. package/types/feature-utils.d.ts +104 -0
  42. package/types/filters/filter-utils.d.ts +69 -0
  43. package/types/filters/filterAsQuery.d.ts +7 -0
  44. package/types/filters/index.d.ts +2 -0
  45. package/types/form-utils.d.ts +22 -0
  46. package/types/formatting-utils.d.ts +14 -0
  47. package/types/getUniqueId.d.ts +1 -0
  48. package/types/group-utils.d.ts +10 -0
  49. package/types/html-utils.d.ts +21 -0
  50. package/types/index.d.ts +67 -0
  51. package/types/input-utils.d.ts +2 -0
  52. package/types/invariant.d.ts +1 -0
  53. package/types/itemToString.d.ts +2 -0
  54. package/types/json-types.d.ts +52 -0
  55. package/types/json-utils.d.ts +6 -0
  56. package/types/keyboard-utils.d.ts +15 -0
  57. package/types/keyset.d.ts +12 -0
  58. package/types/layout-types.d.ts +22 -0
  59. package/types/list-utils.d.ts +2 -0
  60. package/types/local-storage-utils.d.ts +3 -0
  61. package/types/logging-utils.d.ts +45 -0
  62. package/types/menu-utils.d.ts +6 -0
  63. package/types/module-utils.d.ts +8 -0
  64. package/types/moving-window.d.ts +18 -0
  65. package/types/nanoid/index.d.ts +1 -0
  66. package/types/perf-utils.d.ts +5 -0
  67. package/types/promise-utils.d.ts +8 -0
  68. package/types/protocol-message-utils.d.ts +28 -0
  69. package/types/range-utils.d.ts +31 -0
  70. package/types/react-utils.d.ts +4 -0
  71. package/types/round-decimal.d.ts +1 -0
  72. package/types/row-utils.d.ts +24 -0
  73. package/types/selection-utils.d.ts +29 -0
  74. package/types/shell-layout-types.d.ts +14 -0
  75. package/types/sort-utils.d.ts +11 -0
  76. package/types/table-schema-utils.d.ts +3 -0
  77. package/types/text-utils.d.ts +2 -0
  78. package/types/tree-types.d.ts +8 -0
  79. package/types/tree-utils.d.ts +9 -0
  80. package/types/ts-utils.d.ts +19 -0
  81. package/types/typeahead-utils.d.ts +1 -0
  82. package/types/url-utils.d.ts +2 -0
  83. package/types/useId.d.ts +1 -0
  84. package/types/useLayoutEffectSkipFirst.d.ts +2 -0
  85. package/types/useStateRef.d.ts +2 -0
  86. package/types/user-types.d.ts +4 -0
@@ -0,0 +1,8 @@
1
+ export interface TreeSourceNode<T = unknown> {
2
+ nodeData?: T;
3
+ id: string;
4
+ icon?: string;
5
+ header?: boolean;
6
+ label: string;
7
+ childNodes?: TreeSourceNode<T>[];
8
+ }
@@ -0,0 +1,9 @@
1
+ import { TreeSourceNode } from "./tree-types";
2
+ import { ColumnDescriptor } from "@vuu-ui/vuu-table-types";
3
+ import { DataSourceRow } from "@vuu-ui/vuu-data-types";
4
+ import { IconProvider } from "@vuu-ui/vuu-data-local/src/tree-data-source/IconProvider";
5
+ export declare const treeToDataSourceRows: (treeSourceNodes: TreeSourceNode[], iconProvider?: IconProvider) => [ColumnDescriptor[], DataSourceRow[]];
6
+ export declare const lastPathSegment: (path: string, separator?: string) => string;
7
+ export declare const dropLastPathSegment: (path: string, separator?: string) => string;
8
+ export declare const getParentRow: (rows: DataSourceRow[], row: DataSourceRow) => DataSourceRow | undefined;
9
+ export declare const missingAncestor: (row: DataSourceRow, previousRow?: DataSourceRow) => boolean;
@@ -0,0 +1,19 @@
1
+ import { JSXElementConstructor, ReactElement } from "react";
2
+ import { LayoutJSON } from "./json-types";
3
+ export declare function isNotNullOrUndefined<T>(value: T | undefined | null): value is NonNullable<T>;
4
+ export declare const isObject: (o: unknown) => o is object;
5
+ export type OptionalProperty<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
6
+ /**
7
+ * test whether a given react element implements a custom toJSON
8
+ * serialisation (static) method.
9
+ */
10
+ type JsonEnabledJSXElementConstructor<P> = JSXElementConstructor<P> & {
11
+ toJSON: (el: ReactElement) => LayoutJSON<any>;
12
+ };
13
+ interface ReactElementWithJSON<P = any, T extends JsonEnabledJSXElementConstructor<any> = JsonEnabledJSXElementConstructor<any>> {
14
+ type: T;
15
+ props: P;
16
+ key: string | null;
17
+ }
18
+ export declare const elementImplementsJSONSerialization: (element: ReactElement) => element is ReactElementWithJSON;
19
+ export {};
@@ -0,0 +1 @@
1
+ export declare const NO_DATA_MATCH: string[];
@@ -0,0 +1,2 @@
1
+ export declare const getUrlParameter: (paramName: string, defaultValue?: string) => string | undefined;
2
+ export declare const hasUrlParameter: (paramName: string) => boolean;
@@ -0,0 +1 @@
1
+ export declare const useId: (id?: string) => string;
@@ -0,0 +1,2 @@
1
+ import { DependencyList, EffectCallback } from "react";
2
+ export declare const useLayoutEffectSkipFirst: (func: EffectCallback, deps: DependencyList) => void;
@@ -0,0 +1,2 @@
1
+ import { Dispatch, MutableRefObject, SetStateAction } from "react";
2
+ export declare const useStateRef: <T = string>(initialValue: T) => [MutableRefObject<T>, Dispatch<SetStateAction<T>>];
@@ -0,0 +1,4 @@
1
+ export type VuuUser = {
2
+ username: string;
3
+ token: string;
4
+ };