@vuu-ui/vuu-layout 0.8.66 → 0.8.67

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 (143) hide show
  1. package/cjs/layout-view/useViewBroadcastChannel.js.map +1 -1
  2. package/esm/layout-view/useViewBroadcastChannel.js.map +1 -1
  3. package/package.json +9 -9
  4. package/types/vuu-utils/src/DataWindow.d.ts +0 -39
  5. package/types/vuu-utils/src/ThemeProvider.d.ts +0 -32
  6. package/types/vuu-utils/src/array-utils.d.ts +0 -8
  7. package/types/vuu-utils/src/box-utils.d.ts +0 -9
  8. package/types/vuu-utils/src/broadcast-channel.d.ts +0 -16
  9. package/types/vuu-utils/src/column-utils.d.ts +0 -148
  10. package/types/vuu-utils/src/common-types.d.ts +0 -6
  11. package/types/vuu-utils/src/component-registry.d.ts +0 -51
  12. package/types/vuu-utils/src/cookie-utils.d.ts +0 -1
  13. package/types/vuu-utils/src/css-utils.d.ts +0 -1
  14. package/types/vuu-utils/src/data-utils.d.ts +0 -14
  15. package/types/vuu-utils/src/datasource-action-utils.d.ts +0 -7
  16. package/types/vuu-utils/src/datasource-utils.d.ts +0 -36
  17. package/types/vuu-utils/src/date/date-utils.d.ts +0 -2
  18. package/types/vuu-utils/src/date/dateTimePattern.d.ts +0 -8
  19. package/types/vuu-utils/src/date/formatter.d.ts +0 -4
  20. package/types/vuu-utils/src/date/index.d.ts +0 -4
  21. package/types/vuu-utils/src/date/types.d.ts +0 -24
  22. package/types/vuu-utils/src/debug-utils.d.ts +0 -9
  23. package/types/vuu-utils/src/event-emitter.d.ts +0 -21
  24. package/types/vuu-utils/src/feature-utils.d.ts +0 -62
  25. package/types/vuu-utils/src/filters/filterAsQuery.d.ts +0 -7
  26. package/types/vuu-utils/src/filters/index.d.ts +0 -2
  27. package/types/vuu-utils/src/filters/utils.d.ts +0 -55
  28. package/types/vuu-utils/src/form-utils.d.ts +0 -6
  29. package/types/vuu-utils/src/formatting-utils.d.ts +0 -7
  30. package/types/vuu-utils/src/getUniqueId.d.ts +0 -1
  31. package/types/vuu-utils/src/group-utils.d.ts +0 -3
  32. package/types/vuu-utils/src/html-utils.d.ts +0 -18
  33. package/types/vuu-utils/src/index.d.ts +0 -50
  34. package/types/vuu-utils/src/input-utils.d.ts +0 -2
  35. package/types/vuu-utils/src/invariant.d.ts +0 -1
  36. package/types/vuu-utils/src/itemToString.d.ts +0 -2
  37. package/types/vuu-utils/src/json-utils.d.ts +0 -6
  38. package/types/vuu-utils/src/keyboard-utils.d.ts +0 -12
  39. package/types/vuu-utils/src/keyset.d.ts +0 -12
  40. package/types/vuu-utils/src/list-utils.d.ts +0 -2
  41. package/types/vuu-utils/src/local-storage-utils.d.ts +0 -3
  42. package/types/vuu-utils/src/logging-utils.d.ts +0 -44
  43. package/types/vuu-utils/src/menu-utils.d.ts +0 -20
  44. package/types/vuu-utils/src/module-utils.d.ts +0 -9
  45. package/types/vuu-utils/src/nanoid/index.d.ts +0 -1
  46. package/types/vuu-utils/src/perf-utils.d.ts +0 -5
  47. package/types/vuu-utils/src/protocol-message-utils.d.ts +0 -6
  48. package/types/vuu-utils/src/range-utils.d.ts +0 -25
  49. package/types/vuu-utils/src/react-utils.d.ts +0 -2
  50. package/types/vuu-utils/src/round-decimal.d.ts +0 -1
  51. package/types/vuu-utils/src/row-utils.d.ts +0 -25
  52. package/types/vuu-utils/src/selection-utils.d.ts +0 -28
  53. package/types/vuu-utils/src/sort-utils.d.ts +0 -5
  54. package/types/vuu-utils/src/table-schema-utils.d.ts +0 -3
  55. package/types/vuu-utils/src/text-utils.d.ts +0 -2
  56. package/types/vuu-utils/src/ts-utils.d.ts +0 -1
  57. package/types/vuu-utils/src/url-utils.d.ts +0 -2
  58. package/types/vuu-utils/src/useId.d.ts +0 -1
  59. package/types/vuu-utils/src/useLayoutEffectSkipFirst.d.ts +0 -2
  60. package/types/vuu-utils/src/user-types.d.ts +0 -4
  61. /package/types/{vuu-layout/src/Component.d.ts → Component.d.ts} +0 -0
  62. /package/types/{vuu-layout/src/DraggableLayout.d.ts → DraggableLayout.d.ts} +0 -0
  63. /package/types/{vuu-layout/src/debug.d.ts → debug.d.ts} +0 -0
  64. /package/types/{vuu-layout/src/dock-layout → dock-layout}/DockLayout.d.ts +0 -0
  65. /package/types/{vuu-layout/src/dock-layout → dock-layout}/Drawer.d.ts +0 -0
  66. /package/types/{vuu-layout/src/dock-layout → dock-layout}/index.d.ts +0 -0
  67. /package/types/{vuu-layout/src/drag-drop → drag-drop}/BoxModel.d.ts +0 -0
  68. /package/types/{vuu-layout/src/drag-drop → drag-drop}/DragState.d.ts +0 -0
  69. /package/types/{vuu-layout/src/drag-drop → drag-drop}/Draggable.d.ts +0 -0
  70. /package/types/{vuu-layout/src/drag-drop → drag-drop}/DropMenu.d.ts +0 -0
  71. /package/types/{vuu-layout/src/drag-drop → drag-drop}/DropTarget.d.ts +0 -0
  72. /package/types/{vuu-layout/src/drag-drop → drag-drop}/DropTargetRenderer.d.ts +0 -0
  73. /package/types/{vuu-layout/src/drag-drop → drag-drop}/dragDropTypes.d.ts +0 -0
  74. /package/types/{vuu-layout/src/drag-drop → drag-drop}/index.d.ts +0 -0
  75. /package/types/{vuu-layout/src/flexbox → flexbox}/Flexbox.d.ts +0 -0
  76. /package/types/{vuu-layout/src/flexbox → flexbox}/FlexboxLayout.d.ts +0 -0
  77. /package/types/{vuu-layout/src/flexbox → flexbox}/FluidGrid.d.ts +0 -0
  78. /package/types/{vuu-layout/src/flexbox → flexbox}/FluidGridLayout.d.ts +0 -0
  79. /package/types/{vuu-layout/src/flexbox → flexbox}/Splitter.d.ts +0 -0
  80. /package/types/{vuu-layout/src/flexbox → flexbox}/flexbox-utils.d.ts +0 -0
  81. /package/types/{vuu-layout/src/flexbox → flexbox}/flexboxTypes.d.ts +0 -0
  82. /package/types/{vuu-layout/src/flexbox → flexbox}/index.d.ts +0 -0
  83. /package/types/{vuu-layout/src/flexbox → flexbox}/useResponsiveSizing.d.ts +0 -0
  84. /package/types/{vuu-layout/src/flexbox → flexbox}/useSplitterResizing.d.ts +0 -0
  85. /package/types/{vuu-layout/src/index.d.ts → index.d.ts} +0 -0
  86. /package/types/{vuu-layout/src/layout-action.d.ts → layout-action.d.ts} +0 -0
  87. /package/types/{vuu-layout/src/layout-header → layout-header}/ActionButton.d.ts +0 -0
  88. /package/types/{vuu-layout/src/layout-header → layout-header}/Header.d.ts +0 -0
  89. /package/types/{vuu-layout/src/layout-header → layout-header}/index.d.ts +0 -0
  90. /package/types/{vuu-layout/src/layout-provider → layout-provider}/LayoutProvider.d.ts +0 -0
  91. /package/types/{vuu-layout/src/layout-provider → layout-provider}/LayoutProviderContext.d.ts +0 -0
  92. /package/types/{vuu-layout/src/layout-provider → layout-provider}/index.d.ts +0 -0
  93. /package/types/{vuu-layout/src/layout-provider → layout-provider}/useLayoutDragDrop.d.ts +0 -0
  94. /package/types/{vuu-layout/src/layout-reducer → layout-reducer}/flexUtils.d.ts +0 -0
  95. /package/types/{vuu-layout/src/layout-reducer → layout-reducer}/index.d.ts +0 -0
  96. /package/types/{vuu-layout/src/layout-reducer → layout-reducer}/insert-layout-element.d.ts +0 -0
  97. /package/types/{vuu-layout/src/layout-reducer → layout-reducer}/layout-reducer.d.ts +0 -0
  98. /package/types/{vuu-layout/src/layout-reducer → layout-reducer}/layoutTypes.d.ts +0 -0
  99. /package/types/{vuu-layout/src/layout-reducer → layout-reducer}/layoutUtils.d.ts +0 -0
  100. /package/types/{vuu-layout/src/layout-reducer → layout-reducer}/move-layout-element.d.ts +0 -0
  101. /package/types/{vuu-layout/src/layout-reducer → layout-reducer}/remove-layout-element.d.ts +0 -0
  102. /package/types/{vuu-layout/src/layout-reducer → layout-reducer}/replace-layout-element.d.ts +0 -0
  103. /package/types/{vuu-layout/src/layout-reducer → layout-reducer}/resize-flex-children.d.ts +0 -0
  104. /package/types/{vuu-layout/src/layout-reducer → layout-reducer}/wrap-layout-element.d.ts +0 -0
  105. /package/types/{vuu-layout/src/layout-view → layout-view}/View.d.ts +0 -0
  106. /package/types/{vuu-layout/src/layout-view → layout-view}/index.d.ts +0 -0
  107. /package/types/{vuu-layout/src/layout-view → layout-view}/useView.d.ts +0 -0
  108. /package/types/{vuu-layout/src/layout-view → layout-view}/useViewBroadcastChannel.d.ts +0 -0
  109. /package/types/{vuu-layout/src/layout-view → layout-view}/useViewResize.d.ts +0 -0
  110. /package/types/{vuu-layout/src/layout-view → layout-view}/viewTypes.d.ts +0 -0
  111. /package/types/{vuu-layout/src/layout-view-actions → layout-view-actions}/ViewContext.d.ts +0 -0
  112. /package/types/{vuu-layout/src/layout-view-actions → layout-view-actions}/index.d.ts +0 -0
  113. /package/types/{vuu-layout/src/layout-view-actions → layout-view-actions}/useViewActionDispatcher.d.ts +0 -0
  114. /package/types/{vuu-layout/src/palette → palette}/Palette.d.ts +0 -0
  115. /package/types/{vuu-layout/src/palette → palette}/index.d.ts +0 -0
  116. /package/types/{vuu-layout/src/placeholder → placeholder}/LayoutStartPanel.d.ts +0 -0
  117. /package/types/{vuu-layout/src/placeholder → placeholder}/Placeholder.d.ts +0 -0
  118. /package/types/{vuu-layout/src/placeholder → placeholder}/index.d.ts +0 -0
  119. /package/types/{vuu-layout/src/responsive → responsive}/breakpoints.d.ts +0 -0
  120. /package/types/{vuu-layout/src/responsive → responsive}/index.d.ts +0 -0
  121. /package/types/{vuu-layout/src/responsive → responsive}/measureMinimumNodeSize.d.ts +0 -0
  122. /package/types/{vuu-layout/src/responsive → responsive}/overflowUtils.d.ts +0 -0
  123. /package/types/{vuu-layout/src/responsive → responsive}/use-breakpoints.d.ts +0 -0
  124. /package/types/{vuu-layout/src/responsive → responsive}/useResizeObserver.d.ts +0 -0
  125. /package/types/{vuu-layout/src/responsive → responsive}/utils.d.ts +0 -0
  126. /package/types/{vuu-layout/src/stack → stack}/Stack.d.ts +0 -0
  127. /package/types/{vuu-layout/src/stack → stack}/StackLayout.d.ts +0 -0
  128. /package/types/{vuu-layout/src/stack → stack}/index.d.ts +0 -0
  129. /package/types/{vuu-layout/src/stack → stack}/stackTypes.d.ts +0 -0
  130. /package/types/{vuu-layout/src/tabs → tabs}/TabPanel.d.ts +0 -0
  131. /package/types/{vuu-layout/src/tabs → tabs}/index.d.ts +0 -0
  132. /package/types/{vuu-layout/src/tools → tools}/config-wrapper/ConfigWrapper.d.ts +0 -0
  133. /package/types/{vuu-layout/src/tools → tools}/config-wrapper/index.d.ts +0 -0
  134. /package/types/{vuu-layout/src/tools → tools}/devtools-box/layout-configurator.d.ts +0 -0
  135. /package/types/{vuu-layout/src/tools → tools}/devtools-tree/layout-tree-viewer.d.ts +0 -0
  136. /package/types/{vuu-layout/src/tools → tools}/index.d.ts +0 -0
  137. /package/types/{vuu-layout/src/use-persistent-state.d.ts → use-persistent-state.d.ts} +0 -0
  138. /package/types/{vuu-layout/src/utils → utils}/index.d.ts +0 -0
  139. /package/types/{vuu-layout/src/utils → utils}/pathUtils.d.ts +0 -0
  140. /package/types/{vuu-layout/src/utils → utils}/propUtils.d.ts +0 -0
  141. /package/types/{vuu-layout/src/utils → utils}/refUtils.d.ts +0 -0
  142. /package/types/{vuu-layout/src/utils → utils}/styleUtils.d.ts +0 -0
  143. /package/types/{vuu-layout/src/utils → utils}/typeOf.d.ts +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"useViewBroadcastChannel.js","sources":["../../src/layout-view/useViewBroadcastChannel.ts"],"sourcesContent":["import { VuuBroadcastChannel } from \"packages/vuu-utils/src\";\nimport { RefObject, useCallback, useEffect, useRef } from \"react\";\n\nexport interface ViewBroadcastMessage {\n targetId: string;\n type: \"highlight-on\" | \"highlight-off\";\n}\n\nexport const useViewBroadcastChannel = (\n id: string,\n rootRef: RefObject<HTMLDivElement>\n) => {\n const broadcastChannelRef =\n useRef<VuuBroadcastChannel<ViewBroadcastMessage>>();\n\n useEffect(() => {\n console.log(`useViewActionChannnel create Channel ${id}`);\n const broadcastChannel: VuuBroadcastChannel<ViewBroadcastMessage> =\n new BroadcastChannel(\"vuu\");\n broadcastChannel.onmessage = (evt) => {\n if (evt.data.targetId === id) {\n switch (evt.data.type) {\n case \"highlight-on\":\n rootRef.current?.classList.add(\"vuuHighlighted\");\n break;\n case \"highlight-off\":\n rootRef.current?.classList.remove(\"vuuHighlighted\");\n break;\n }\n }\n };\n broadcastChannelRef.current = broadcastChannel;\n return () => {\n broadcastChannel.close();\n broadcastChannelRef.current = undefined;\n };\n }, [id]);\n\n const sendMessage = useCallback((message: ViewBroadcastMessage) => {\n broadcastChannelRef.current?.postMessage(message);\n }, []);\n\n return sendMessage;\n};\n"],"names":["useRef","useEffect","useCallback"],"mappings":";;;;AAQa,MAAA,uBAAA,GAA0B,CACrC,EAAA,EACA,OACG,KAAA;AACH,EAAA,MAAM,sBACJA,YAAkD,EAAA,CAAA;AAEpD,EAAAC,eAAA,CAAU,MAAM;AACd,IAAQ,OAAA,CAAA,GAAA,CAAI,CAAwC,qCAAA,EAAA,EAAE,CAAE,CAAA,CAAA,CAAA;AACxD,IAAM,MAAA,gBAAA,GACJ,IAAI,gBAAA,CAAiB,KAAK,CAAA,CAAA;AAC5B,IAAiB,gBAAA,CAAA,SAAA,GAAY,CAAC,GAAQ,KAAA;AACpC,MAAI,IAAA,GAAA,CAAI,IAAK,CAAA,QAAA,KAAa,EAAI,EAAA;AAC5B,QAAQ,QAAA,GAAA,CAAI,KAAK,IAAM;AAAA,UACrB,KAAK,cAAA;AACH,YAAQ,OAAA,CAAA,OAAA,EAAS,SAAU,CAAA,GAAA,CAAI,gBAAgB,CAAA,CAAA;AAC/C,YAAA,MAAA;AAAA,UACF,KAAK,eAAA;AACH,YAAQ,OAAA,CAAA,OAAA,EAAS,SAAU,CAAA,MAAA,CAAO,gBAAgB,CAAA,CAAA;AAClD,YAAA,MAAA;AAAA,SACJ;AAAA,OACF;AAAA,KACF,CAAA;AACA,IAAA,mBAAA,CAAoB,OAAU,GAAA,gBAAA,CAAA;AAC9B,IAAA,OAAO,MAAM;AACX,MAAA,gBAAA,CAAiB,KAAM,EAAA,CAAA;AACvB,MAAA,mBAAA,CAAoB,OAAU,GAAA,KAAA,CAAA,CAAA;AAAA,KAChC,CAAA;AAAA,GACF,EAAG,CAAC,EAAE,CAAC,CAAA,CAAA;AAEP,EAAM,MAAA,WAAA,GAAcC,iBAAY,CAAA,CAAC,OAAkC,KAAA;AACjE,IAAoB,mBAAA,CAAA,OAAA,EAAS,YAAY,OAAO,CAAA,CAAA;AAAA,GAClD,EAAG,EAAE,CAAA,CAAA;AAEL,EAAO,OAAA,WAAA,CAAA;AACT;;;;"}
1
+ {"version":3,"file":"useViewBroadcastChannel.js","sources":["../../src/layout-view/useViewBroadcastChannel.ts"],"sourcesContent":["import { VuuBroadcastChannel } from \"@vuu-ui/vuu-utils\";\nimport { RefObject, useCallback, useEffect, useRef } from \"react\";\n\nexport interface ViewBroadcastMessage {\n targetId: string;\n type: \"highlight-on\" | \"highlight-off\";\n}\n\nexport const useViewBroadcastChannel = (\n id: string,\n rootRef: RefObject<HTMLDivElement>\n) => {\n const broadcastChannelRef =\n useRef<VuuBroadcastChannel<ViewBroadcastMessage>>();\n\n useEffect(() => {\n console.log(`useViewActionChannnel create Channel ${id}`);\n const broadcastChannel: VuuBroadcastChannel<ViewBroadcastMessage> =\n new BroadcastChannel(\"vuu\");\n broadcastChannel.onmessage = (evt) => {\n if (evt.data.targetId === id) {\n switch (evt.data.type) {\n case \"highlight-on\":\n rootRef.current?.classList.add(\"vuuHighlighted\");\n break;\n case \"highlight-off\":\n rootRef.current?.classList.remove(\"vuuHighlighted\");\n break;\n }\n }\n };\n broadcastChannelRef.current = broadcastChannel;\n return () => {\n broadcastChannel.close();\n broadcastChannelRef.current = undefined;\n };\n }, [id]);\n\n const sendMessage = useCallback((message: ViewBroadcastMessage) => {\n broadcastChannelRef.current?.postMessage(message);\n }, []);\n\n return sendMessage;\n};\n"],"names":["useRef","useEffect","useCallback"],"mappings":";;;;AAQa,MAAA,uBAAA,GAA0B,CACrC,EAAA,EACA,OACG,KAAA;AACH,EAAA,MAAM,sBACJA,YAAkD,EAAA,CAAA;AAEpD,EAAAC,eAAA,CAAU,MAAM;AACd,IAAQ,OAAA,CAAA,GAAA,CAAI,CAAwC,qCAAA,EAAA,EAAE,CAAE,CAAA,CAAA,CAAA;AACxD,IAAM,MAAA,gBAAA,GACJ,IAAI,gBAAA,CAAiB,KAAK,CAAA,CAAA;AAC5B,IAAiB,gBAAA,CAAA,SAAA,GAAY,CAAC,GAAQ,KAAA;AACpC,MAAI,IAAA,GAAA,CAAI,IAAK,CAAA,QAAA,KAAa,EAAI,EAAA;AAC5B,QAAQ,QAAA,GAAA,CAAI,KAAK,IAAM;AAAA,UACrB,KAAK,cAAA;AACH,YAAQ,OAAA,CAAA,OAAA,EAAS,SAAU,CAAA,GAAA,CAAI,gBAAgB,CAAA,CAAA;AAC/C,YAAA,MAAA;AAAA,UACF,KAAK,eAAA;AACH,YAAQ,OAAA,CAAA,OAAA,EAAS,SAAU,CAAA,MAAA,CAAO,gBAAgB,CAAA,CAAA;AAClD,YAAA,MAAA;AAAA,SACJ;AAAA,OACF;AAAA,KACF,CAAA;AACA,IAAA,mBAAA,CAAoB,OAAU,GAAA,gBAAA,CAAA;AAC9B,IAAA,OAAO,MAAM;AACX,MAAA,gBAAA,CAAiB,KAAM,EAAA,CAAA;AACvB,MAAA,mBAAA,CAAoB,OAAU,GAAA,KAAA,CAAA,CAAA;AAAA,KAChC,CAAA;AAAA,GACF,EAAG,CAAC,EAAE,CAAC,CAAA,CAAA;AAEP,EAAM,MAAA,WAAA,GAAcC,iBAAY,CAAA,CAAC,OAAkC,KAAA;AACjE,IAAoB,mBAAA,CAAA,OAAA,EAAS,YAAY,OAAO,CAAA,CAAA;AAAA,GAClD,EAAG,EAAE,CAAA,CAAA;AAEL,EAAO,OAAA,WAAA,CAAA;AACT;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useViewBroadcastChannel.js","sources":["../../src/layout-view/useViewBroadcastChannel.ts"],"sourcesContent":["import { VuuBroadcastChannel } from \"packages/vuu-utils/src\";\nimport { RefObject, useCallback, useEffect, useRef } from \"react\";\n\nexport interface ViewBroadcastMessage {\n targetId: string;\n type: \"highlight-on\" | \"highlight-off\";\n}\n\nexport const useViewBroadcastChannel = (\n id: string,\n rootRef: RefObject<HTMLDivElement>\n) => {\n const broadcastChannelRef =\n useRef<VuuBroadcastChannel<ViewBroadcastMessage>>();\n\n useEffect(() => {\n console.log(`useViewActionChannnel create Channel ${id}`);\n const broadcastChannel: VuuBroadcastChannel<ViewBroadcastMessage> =\n new BroadcastChannel(\"vuu\");\n broadcastChannel.onmessage = (evt) => {\n if (evt.data.targetId === id) {\n switch (evt.data.type) {\n case \"highlight-on\":\n rootRef.current?.classList.add(\"vuuHighlighted\");\n break;\n case \"highlight-off\":\n rootRef.current?.classList.remove(\"vuuHighlighted\");\n break;\n }\n }\n };\n broadcastChannelRef.current = broadcastChannel;\n return () => {\n broadcastChannel.close();\n broadcastChannelRef.current = undefined;\n };\n }, [id]);\n\n const sendMessage = useCallback((message: ViewBroadcastMessage) => {\n broadcastChannelRef.current?.postMessage(message);\n }, []);\n\n return sendMessage;\n};\n"],"names":[],"mappings":";;AAQa,MAAA,uBAAA,GAA0B,CACrC,EAAA,EACA,OACG,KAAA;AACH,EAAA,MAAM,sBACJ,MAAkD,EAAA,CAAA;AAEpD,EAAA,SAAA,CAAU,MAAM;AACd,IAAQ,OAAA,CAAA,GAAA,CAAI,CAAwC,qCAAA,EAAA,EAAE,CAAE,CAAA,CAAA,CAAA;AACxD,IAAM,MAAA,gBAAA,GACJ,IAAI,gBAAA,CAAiB,KAAK,CAAA,CAAA;AAC5B,IAAiB,gBAAA,CAAA,SAAA,GAAY,CAAC,GAAQ,KAAA;AACpC,MAAI,IAAA,GAAA,CAAI,IAAK,CAAA,QAAA,KAAa,EAAI,EAAA;AAC5B,QAAQ,QAAA,GAAA,CAAI,KAAK,IAAM;AAAA,UACrB,KAAK,cAAA;AACH,YAAQ,OAAA,CAAA,OAAA,EAAS,SAAU,CAAA,GAAA,CAAI,gBAAgB,CAAA,CAAA;AAC/C,YAAA,MAAA;AAAA,UACF,KAAK,eAAA;AACH,YAAQ,OAAA,CAAA,OAAA,EAAS,SAAU,CAAA,MAAA,CAAO,gBAAgB,CAAA,CAAA;AAClD,YAAA,MAAA;AAAA,SACJ;AAAA,OACF;AAAA,KACF,CAAA;AACA,IAAA,mBAAA,CAAoB,OAAU,GAAA,gBAAA,CAAA;AAC9B,IAAA,OAAO,MAAM;AACX,MAAA,gBAAA,CAAiB,KAAM,EAAA,CAAA;AACvB,MAAA,mBAAA,CAAoB,OAAU,GAAA,KAAA,CAAA,CAAA;AAAA,KAChC,CAAA;AAAA,GACF,EAAG,CAAC,EAAE,CAAC,CAAA,CAAA;AAEP,EAAM,MAAA,WAAA,GAAc,WAAY,CAAA,CAAC,OAAkC,KAAA;AACjE,IAAoB,mBAAA,CAAA,OAAA,EAAS,YAAY,OAAO,CAAA,CAAA;AAAA,GAClD,EAAG,EAAE,CAAA,CAAA;AAEL,EAAO,OAAA,WAAA,CAAA;AACT;;;;"}
1
+ {"version":3,"file":"useViewBroadcastChannel.js","sources":["../../src/layout-view/useViewBroadcastChannel.ts"],"sourcesContent":["import { VuuBroadcastChannel } from \"@vuu-ui/vuu-utils\";\nimport { RefObject, useCallback, useEffect, useRef } from \"react\";\n\nexport interface ViewBroadcastMessage {\n targetId: string;\n type: \"highlight-on\" | \"highlight-off\";\n}\n\nexport const useViewBroadcastChannel = (\n id: string,\n rootRef: RefObject<HTMLDivElement>\n) => {\n const broadcastChannelRef =\n useRef<VuuBroadcastChannel<ViewBroadcastMessage>>();\n\n useEffect(() => {\n console.log(`useViewActionChannnel create Channel ${id}`);\n const broadcastChannel: VuuBroadcastChannel<ViewBroadcastMessage> =\n new BroadcastChannel(\"vuu\");\n broadcastChannel.onmessage = (evt) => {\n if (evt.data.targetId === id) {\n switch (evt.data.type) {\n case \"highlight-on\":\n rootRef.current?.classList.add(\"vuuHighlighted\");\n break;\n case \"highlight-off\":\n rootRef.current?.classList.remove(\"vuuHighlighted\");\n break;\n }\n }\n };\n broadcastChannelRef.current = broadcastChannel;\n return () => {\n broadcastChannel.close();\n broadcastChannelRef.current = undefined;\n };\n }, [id]);\n\n const sendMessage = useCallback((message: ViewBroadcastMessage) => {\n broadcastChannelRef.current?.postMessage(message);\n }, []);\n\n return sendMessage;\n};\n"],"names":[],"mappings":";;AAQa,MAAA,uBAAA,GAA0B,CACrC,EAAA,EACA,OACG,KAAA;AACH,EAAA,MAAM,sBACJ,MAAkD,EAAA,CAAA;AAEpD,EAAA,SAAA,CAAU,MAAM;AACd,IAAQ,OAAA,CAAA,GAAA,CAAI,CAAwC,qCAAA,EAAA,EAAE,CAAE,CAAA,CAAA,CAAA;AACxD,IAAM,MAAA,gBAAA,GACJ,IAAI,gBAAA,CAAiB,KAAK,CAAA,CAAA;AAC5B,IAAiB,gBAAA,CAAA,SAAA,GAAY,CAAC,GAAQ,KAAA;AACpC,MAAI,IAAA,GAAA,CAAI,IAAK,CAAA,QAAA,KAAa,EAAI,EAAA;AAC5B,QAAQ,QAAA,GAAA,CAAI,KAAK,IAAM;AAAA,UACrB,KAAK,cAAA;AACH,YAAQ,OAAA,CAAA,OAAA,EAAS,SAAU,CAAA,GAAA,CAAI,gBAAgB,CAAA,CAAA;AAC/C,YAAA,MAAA;AAAA,UACF,KAAK,eAAA;AACH,YAAQ,OAAA,CAAA,OAAA,EAAS,SAAU,CAAA,MAAA,CAAO,gBAAgB,CAAA,CAAA;AAClD,YAAA,MAAA;AAAA,SACJ;AAAA,OACF;AAAA,KACF,CAAA;AACA,IAAA,mBAAA,CAAoB,OAAU,GAAA,gBAAA,CAAA;AAC9B,IAAA,OAAO,MAAM;AACX,MAAA,gBAAA,CAAiB,KAAM,EAAA,CAAA;AACvB,MAAA,mBAAA,CAAoB,OAAU,GAAA,KAAA,CAAA,CAAA;AAAA,KAChC,CAAA;AAAA,GACF,EAAG,CAAC,EAAE,CAAC,CAAA,CAAA;AAEP,EAAM,MAAA,WAAA,GAAc,WAAY,CAAA,CAAC,OAAkC,KAAA;AACjE,IAAoB,mBAAA,CAAA,OAAA,EAAS,YAAY,OAAO,CAAA,CAAA;AAAA,GAClD,EAAG,EAAE,CAAA,CAAA;AAEL,EAAO,OAAA,WAAA,CAAA;AACT;;;;"}
package/package.json CHANGED
@@ -1,23 +1,23 @@
1
1
  {
2
- "version": "0.8.66",
2
+ "version": "0.8.67",
3
3
  "description": "VUU Layout Components",
4
4
  "author": "heswell",
5
5
  "license": "Apache-2.0",
6
6
  "types": "types/index.d.ts",
7
7
  "devDependencies": {
8
- "@vuu-ui/vuu-data-types": "0.8.66",
9
- "@vuu-ui/vuu-filter-types": "0.8.66"
8
+ "@vuu-ui/vuu-data-types": "0.8.67",
9
+ "@vuu-ui/vuu-filter-types": "0.8.67"
10
10
  },
11
11
  "dependencies": {
12
12
  "@salt-ds/core": "1.27.1",
13
13
  "@salt-ds/styles": "0.2.1",
14
14
  "@salt-ds/window": "0.1.1",
15
- "@vuu-ui/vuu-data-types": "0.8.66",
16
- "@vuu-ui/vuu-filters": "0.8.66",
17
- "@vuu-ui/vuu-popups": "0.8.66",
18
- "@vuu-ui/vuu-table": "0.8.66",
19
- "@vuu-ui/vuu-ui-controls": "0.8.66",
20
- "@vuu-ui/vuu-utils": "0.8.66"
15
+ "@vuu-ui/vuu-data-types": "0.8.67",
16
+ "@vuu-ui/vuu-filters": "0.8.67",
17
+ "@vuu-ui/vuu-popups": "0.8.67",
18
+ "@vuu-ui/vuu-table": "0.8.67",
19
+ "@vuu-ui/vuu-ui-controls": "0.8.67",
20
+ "@vuu-ui/vuu-utils": "0.8.67"
21
21
  },
22
22
  "peerDependencies": {
23
23
  "clsx": "^2.0.0",
@@ -1,39 +0,0 @@
1
- export type DataItem = string | number | boolean;
2
- export type DataRow = [
3
- /** index */
4
- number,
5
- /** render index */
6
- number,
7
- /** isLeaf */
8
- boolean,
9
- /** isExpanded */
10
- boolean,
11
- /** depth */
12
- number,
13
- /** child count */
14
- number,
15
- /** key */
16
- string,
17
- /** selected */
18
- number,
19
- /** data values */
20
- ...DataItem[]
21
- ];
22
- export type RangeLike = {
23
- from: number;
24
- to: number;
25
- };
26
- export declare class DataWindow {
27
- private range;
28
- data: DataRow[];
29
- rowCount: number;
30
- constructor({ from, to }: RangeLike);
31
- setRowCount: (rowCount: number) => void;
32
- add(data: DataRow): boolean;
33
- getAtIndex(index: number): DataRow | undefined;
34
- getByKey(key: string): DataRow | undefined;
35
- isWithinRange(index: number): boolean;
36
- setRange(from: number, to: number): void;
37
- hasData(from: number, to: number): boolean;
38
- getData(from: number, to: number): any[];
39
- }
@@ -1,32 +0,0 @@
1
- import React, { ReactNode } from "react";
2
- export declare const DEFAULT_DENSITY: Density;
3
- export declare const DEFAULT_THEME = "salt-theme";
4
- export declare const DEFAULT_THEME_MODE: ThemeMode;
5
- export type Density = "high" | "medium" | "low" | "touch";
6
- export type ThemeMode = "light" | "dark";
7
- export type TargetElement = "root" | "scope" | "child";
8
- export interface ThemeContextProps {
9
- density: Density;
10
- theme: string;
11
- themeMode: ThemeMode;
12
- }
13
- export declare const ThemeContext: React.Context<ThemeContextProps>;
14
- export type ThemeClasses = [string, string, ThemeMode];
15
- export type ThemeAttributes = {
16
- themeClass: string;
17
- densityClass: string;
18
- dataMode: ThemeMode;
19
- };
20
- export declare const useThemeAttributes: (themeAttributes?: ThemeAttributes) => [string, string, ThemeMode];
21
- interface ThemeProviderProps {
22
- applyThemeClasses?: boolean;
23
- children: ReactNode;
24
- density?: Density;
25
- theme?: string;
26
- themeMode?: ThemeMode;
27
- }
28
- export declare const ThemeProvider: {
29
- ({ applyThemeClasses, children, theme: themeProp, themeMode: themeModeProp, density: densityProp, }: ThemeProviderProps): JSX.Element;
30
- displayName: string;
31
- };
32
- export {};
@@ -1,8 +0,0 @@
1
- export type PartitionTest<T> = (value: T, index: number) => boolean;
2
- export declare function partition<T>(array: T[], test: PartitionTest<T>, pass?: T[], fail?: T[]): [T[], T[]];
3
- export declare function itemsChanged<T = unknown>(currentItems: T[], newItems: T[], identityProperty?: string): boolean;
4
- export declare function itemsOrOrderChanged<T = unknown>(currentItems: T[], newItems: T[], identityProperty?: string): boolean;
5
- export declare const moveItemDeprecated: <T = unknown>(items: T[], item: T, moveTo: number) => T[];
6
- export declare const moveItem: <T = unknown>(items: T[], fromIndex: number, toIndex: number) => T[];
7
- export declare const getAddedItems: <T>(values: undefined | T[], newValues: T[]) => T[];
8
- export declare const getMissingItems: <T, I>(sourceItems: T[], items: I[], identity: (s: T) => I) => I[];
@@ -1,9 +0,0 @@
1
- export interface rect {
2
- bottom: number;
3
- left: number;
4
- right: number;
5
- top: number;
6
- }
7
- export type rectTuple = [number, number, number, number];
8
- export type dimension = "width" | "height";
9
- export declare function boxContainsPoint(rect: rect, x: number, y: number): boolean | undefined;
@@ -1,16 +0,0 @@
1
- interface VuuBroadcastChannelEventMap<T> {
2
- message: MessageEvent<T>;
3
- messageerror: MessageEvent<T>;
4
- }
5
- export interface VuuBroadcastChannel<T> extends EventTarget {
6
- readonly name: string;
7
- onmessage: ((this: BroadcastChannel, evt: MessageEvent<T>) => void) | null;
8
- onmessageerror: ((this: BroadcastChannel, evt: MessageEvent<T>) => void) | null;
9
- close(): void;
10
- postMessage(message: T): void;
11
- addEventListener<K extends keyof VuuBroadcastChannelEventMap<T>>(type: K, listener: (this: BroadcastChannel, evt: VuuBroadcastChannelEventMap<T>[K]) => void, options?: boolean | AddEventListenerOptions): void;
12
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
13
- removeEventListener<K extends keyof VuuBroadcastChannelEventMap<T>>(type: K, listener: (this: BroadcastChannel, evt: VuuBroadcastChannelEventMap<T>[K]) => void, options?: boolean | EventListenerOptions): void;
14
- removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
15
- }
16
- export {};
@@ -1,148 +0,0 @@
1
- import type { DataSourceRow, SchemaColumn, TableSchema } from "@vuu-ui/vuu-data-types";
2
- import type { VuuAggregation, VuuAggType, VuuColumnDataType, VuuDataRow, VuuGroupBy, VuuRowRecord, VuuSort } from "@vuu-ui/vuu-protocol-types";
3
- import type { ColumnAlignment, ColumnDescriptor, ColumnType, ColumnTypeDescriptor, ColumnTypeFormatting, ColumnTypeRendering, ColumnTypeSimple, ColumnTypeWithValidationRules, DefaultColumnConfiguration, GroupColumnDescriptor, LookupRenderer, MappedValueTypeRenderer, PinLocation, RuntimeColumnDescriptor, TableHeadings, ValueListRenderer, DateTimeColumnDescriptor, TableCellRendererProps, ColumnLayout, TableConfig } from "@vuu-ui/vuu-table-types";
4
- import type { CSSProperties } from "react";
5
- /**
6
- * ColumnMap provides a lookup of the index position of a data item within a row
7
- * by column name.
8
- */
9
- export interface ColumnMap {
10
- [columnName: string]: number;
11
- }
12
- export type SortCriteriaItem = string | [string, "asc"];
13
- export declare const AggregationType: {
14
- [key: string]: VuuAggType;
15
- };
16
- export declare function mapSortCriteria(sortCriteria: SortCriteriaItem[], columnMap: ColumnMap, metadataOffset?: number): [number, "asc"][];
17
- export declare const getDefaultAlignment: (serverDataType?: VuuColumnDataType) => ColumnAlignment;
18
- export declare const getRuntimeColumnWidth: (col: ColumnDescriptor, runtimeColumns: RuntimeColumnDescriptor[]) => number;
19
- export declare const applyRuntimeColumnWidthsToConfig: (tableConfig: TableConfig, columns: RuntimeColumnDescriptor[]) => TableConfig;
20
- export declare const isValidColumnAlignment: (v: string) => v is ColumnAlignment;
21
- export declare const isValidPinLocation: (v: string) => v is PinLocation;
22
- export type CalculatedColumn = {
23
- name: string;
24
- expression: string;
25
- serverDataType: VuuColumnDataType;
26
- };
27
- export declare const isVuuColumnDataType: (value: string | undefined | null) => value is VuuColumnDataType;
28
- export declare const fromServerDataType: (serverDataType: VuuColumnDataType) => ColumnTypeSimple;
29
- export declare const isNumericColumn: ({ serverDataType, type }: ColumnDescriptor) => boolean;
30
- export declare const isDateTimeColumn: (column: ColumnDescriptor) => column is DateTimeColumnDescriptor;
31
- export declare const isPinned: (column: ColumnDescriptor) => boolean;
32
- export declare const hasHeadings: (column: ColumnDescriptor) => boolean;
33
- export declare const isResizing: (column: RuntimeColumnDescriptor) => boolean | undefined;
34
- export declare const isTextColumn: ({ serverDataType }: ColumnDescriptor) => boolean;
35
- export declare const toColumnDescriptor: (name: string) => ColumnDescriptor;
36
- /**
37
- *
38
- */
39
- export declare const isTypeDescriptor: (type?: ColumnType) => type is ColumnTypeDescriptor;
40
- export declare const isColumnTypeRenderer: (renderer?: unknown) => renderer is ColumnTypeRendering;
41
- export declare const isLookupRenderer: (renderer?: unknown) => renderer is LookupRenderer;
42
- export declare const isValueListRenderer: (renderer?: unknown) => renderer is ValueListRenderer;
43
- export declare const hasValidationRules: (type?: ColumnType) => type is ColumnTypeWithValidationRules;
44
- export declare const isMappedValueTypeRenderer: (renderer?: unknown) => renderer is MappedValueTypeRenderer;
45
- export declare function buildColumnMap(columns?: (RuntimeColumnDescriptor | SchemaColumn | string)[]): ColumnMap;
46
- export declare function projectUpdates(updates: number[]): number[];
47
- export declare const metadataKeys: {
48
- readonly IDX: 0;
49
- readonly RENDER_IDX: 1;
50
- readonly IS_LEAF: 2;
51
- readonly IS_EXPANDED: 3;
52
- readonly DEPTH: 4;
53
- readonly COUNT: 5;
54
- readonly KEY: 6;
55
- readonly SELECTED: 7;
56
- readonly count: 8;
57
- readonly PARENT_IDX: "parent_idx";
58
- readonly IDX_POINTER: "idx_pointer";
59
- readonly FILTER_COUNT: "filter_count";
60
- readonly NEXT_FILTER_IDX: "next_filter_idx";
61
- };
62
- export declare const flattenColumnGroup: (columns: RuntimeColumnDescriptor[]) => RuntimeColumnDescriptor[];
63
- export declare function extractGroupColumn(columns: RuntimeColumnDescriptor[], groupBy?: VuuGroupBy, confirmed?: boolean): [GroupColumnDescriptor | null, RuntimeColumnDescriptor[]];
64
- export declare const isGroupColumn: (column: RuntimeColumnDescriptor) => column is GroupColumnDescriptor;
65
- export declare const isJsonAttribute: (value: unknown) => boolean;
66
- export declare const isJsonGroup: (column: RuntimeColumnDescriptor, row: VuuDataRow, columnMap: ColumnMap) => boolean;
67
- export declare const isJsonColumn: (column: RuntimeColumnDescriptor) => boolean;
68
- export declare const sortPinnedColumns: (columns: RuntimeColumnDescriptor[]) => RuntimeColumnDescriptor[];
69
- export declare const measurePinnedColumns: (columns: RuntimeColumnDescriptor[], selectionEndSize: number) => {
70
- pinnedWidthLeft: number;
71
- pinnedWidthRight: number;
72
- unpinnedWidth: number;
73
- };
74
- export declare const getTableHeadings: (columns: RuntimeColumnDescriptor[]) => TableHeadings;
75
- export declare const getColumnStyle: ({ pin, pinnedOffset, width, }: RuntimeColumnDescriptor) => CSSProperties;
76
- export declare const setAggregations: (aggregations: VuuAggregation[], column: RuntimeColumnDescriptor, aggType: VuuAggType) => VuuAggregation[];
77
- export declare const applyGroupByToColumns: (columns: RuntimeColumnDescriptor[], groupBy: VuuGroupBy, confirmed?: boolean) => RuntimeColumnDescriptor[];
78
- export declare const applySortToColumns: (columns: RuntimeColumnDescriptor[], sort: VuuSort) => RuntimeColumnDescriptor[];
79
- export declare const removeSort: (columns: RuntimeColumnDescriptor[]) => RuntimeColumnDescriptor[];
80
- export declare const existingSort: (columns: RuntimeColumnDescriptor[]) => boolean;
81
- export declare const getColumnName: (name: string) => string;
82
- export declare const getColumnLabel: (column: ColumnDescriptor) => string;
83
- export declare const findColumn: (columns: RuntimeColumnDescriptor[], columnName: string) => RuntimeColumnDescriptor | undefined;
84
- export declare function updateColumn<T extends ColumnDescriptor>(columns: T[], column: T): T[];
85
- export declare function updateColumn(columns: RuntimeColumnDescriptor[], column: string, options: Partial<ColumnDescriptor>): RuntimeColumnDescriptor[];
86
- export declare const toDataSourceColumns: (column: ColumnDescriptor) => string;
87
- export declare const getRowRecord: (row: DataSourceRow, columnMap: ColumnMap) => VuuRowRecord;
88
- export declare const isDataLoading: (columns: RuntimeColumnDescriptor[]) => boolean;
89
- export declare const getColumnsInViewport: (columns: RuntimeColumnDescriptor[], vpStart: number, vpEnd: number) => [RuntimeColumnDescriptor[], number];
90
- export declare const isNotHidden: (column: RuntimeColumnDescriptor) => boolean;
91
- export declare const visibleColumnAtIndex: (columns: RuntimeColumnDescriptor[], index: number) => RuntimeColumnDescriptor | undefined;
92
- export declare const getGroupValueAndOffset: (columns: RuntimeColumnDescriptor[], row: DataSourceRow, columnMap: ColumnMap) => [unknown, number];
93
- export declare const getDefaultColumnType: (serverDataType?: VuuColumnDataType) => ColumnTypeSimple;
94
- export declare const updateColumnFormatting: <T extends ColumnDescriptor = ColumnDescriptor>(column: T, formatting: ColumnTypeFormatting) => T;
95
- export declare function updateColumnType<T extends ColumnDescriptor = ColumnDescriptor>(column: T, type: ColumnTypeSimple): T;
96
- export declare const updateColumnRenderProps: <T extends ColumnDescriptor = ColumnDescriptor>(column: T, renderer: ColumnTypeRendering) => T;
97
- export declare const getTypeFormattingFromColumn: (column: ColumnDescriptor) => ColumnTypeFormatting;
98
- /**
99
- *
100
- * return a filter predicate that will reject columns, names of which
101
- * are not in provided list.
102
- */
103
- export declare const subscribedOnly: (columnNames?: string[]) => (column: ColumnDescriptor) => boolean | undefined;
104
- export declare const addColumnToSubscribedColumns: (subscribedColumns: ColumnDescriptor[], availableColumns: SchemaColumn[], columnName: string) => ColumnDescriptor[];
105
- export declare const isCalculatedColumn: (columnName?: string) => boolean;
106
- export declare const getCalculatedColumnDetails: (column: ColumnDescriptor) => Partial<CalculatedColumn>;
107
- export declare const setCalculatedColumnName: (column: ColumnDescriptor, name: string) => ColumnDescriptor;
108
- export declare const setCalculatedColumnType: (column: ColumnDescriptor, type: string) => ColumnDescriptor;
109
- export declare const setCalculatedColumnExpression: (column: ColumnDescriptor, expression: string) => ColumnDescriptor;
110
- export declare const moveColumnTo: (columns: ColumnDescriptor[], column: ColumnDescriptor, newIndex: number) => ColumnDescriptor[];
111
- export declare function replaceColumn<C extends ColumnDescriptor = RuntimeColumnDescriptor>(columns: C[], column: C): C[];
112
- export declare const applyDefaultColumnConfig: ({ columns, table }: TableSchema, getDefaultColumnConfig?: DefaultColumnConfiguration) => SchemaColumn[];
113
- export declare const getColumnByName: (schema: TableSchema, name?: string) => SchemaColumn | undefined;
114
- export type columnOptions = {
115
- availableWidth?: number;
116
- columnLayout?: ColumnLayout;
117
- defaultWidth?: number;
118
- defaultMinWidth?: number;
119
- defaultMaxWidth?: number;
120
- defaultFlex?: number;
121
- };
122
- type ColumnLayoutOptions = Pick<columnOptions, "defaultMinWidth" | "defaultMaxWidth" | "defaultWidth">;
123
- interface StaticColumnLayoutOptions extends ColumnLayoutOptions {
124
- columnLayout: "manual" | "static";
125
- }
126
- interface FitColumnLayoutOptions extends ColumnLayoutOptions {
127
- availableWidth?: number;
128
- columnLayout: "fit";
129
- }
130
- export declare function applyWidthToColumns(columns: RuntimeColumnDescriptor[], options: StaticColumnLayoutOptions | FitColumnLayoutOptions): RuntimeColumnDescriptor[];
131
- /**
132
- * A memo compare function for cell renderers. Can be used to suppress
133
- * render where column and data are both unchanged. Avoids render
134
- * when row changes, where changes in row are unrelated to this cell.
135
- * Suitabnle only for readonly cell renderers. See below for editable
136
- * cell renderers.
137
- */
138
- export declare const dataAndColumnUnchanged: (p: TableCellRendererProps, p1: TableCellRendererProps) => boolean;
139
- /**
140
- * A memo compare function for cell renderers. Can be used to suppress
141
- * render where column, row key and data are all unchanged. Avoids render
142
- * when row changes, where changes in row are unrelated to this cell.
143
- * Suitable for editable cells. Including key in compare is not strictly
144
- * necessary for rendering, but it is important in the event that user
145
- * edits data - ensures we never have a stale key.
146
- */
147
- export declare const dataColumnAndKeyUnchanged: (p: TableCellRendererProps, p1: TableCellRendererProps) => boolean;
148
- export {};
@@ -1,6 +0,0 @@
1
- export type orientationType = "horizontal" | "vertical";
2
- type measureProp = keyof DOMRect;
3
- type measureType = Record<string, measureProp>;
4
- type measuresType = Record<orientationType, measureType>;
5
- export declare const MEASURES: measuresType;
6
- export {};
@@ -1,51 +0,0 @@
1
- import { DataSourceRow } from "@vuu-ui/vuu-data-types";
2
- import { VuuColumnDataType, VuuRowDataItemType } from "@vuu-ui/vuu-protocol-types";
3
- import { ColumnDescriptor, ColumnDescriptorCustomRenderer, ColumnTypeRendering, EditValidationRule, HeaderCellProps, TableCellRendererProps } from "@vuu-ui/vuu-table-types";
4
- import { FunctionComponent as FC, HTMLAttributes } from "react";
5
- import { ColumnMap } from "./column-utils";
6
- export interface CellConfigPanelProps extends HTMLAttributes<HTMLDivElement> {
7
- onConfigChange: () => void;
8
- }
9
- export type PropertyChangeHandler = (propertyName: string, propertyValue: string | number | boolean) => void;
10
- export type ColumnRenderPropsChangeHandler = (renderProps: ColumnTypeRendering) => void;
11
- export interface ConfigurationEditorProps {
12
- column: ColumnDescriptorCustomRenderer;
13
- onChangeRendering: ColumnRenderPropsChangeHandler;
14
- }
15
- export type RowClassNameGenerator = (row: DataSourceRow, columnMap: ColumnMap) => string | undefined;
16
- export type RowClassGenerator = {
17
- id: string;
18
- fn: RowClassNameGenerator;
19
- };
20
- export type ConfigEditorComponent = FC<CellConfigPanelProps>;
21
- export type EditRuleValidator = (editRule: EditValidationRule, value?: VuuRowDataItemType) => boolean | string;
22
- export type layoutComponentType = "container" | "view";
23
- export type ComponentType = layoutComponentType | "cell-renderer" | "cell-config-panel" | "column-header-content-renderer" | "column-header-label-renderer" | "component" | "data-edit-validator" | "row-class-generator";
24
- type CellRendererOptions = {
25
- configEditor?: string;
26
- description?: string;
27
- label?: string;
28
- serverDataType?: VuuColumnDataType | VuuColumnDataType[] | "json" | "private";
29
- userCanAssign?: boolean;
30
- };
31
- export interface CellRendererDescriptor extends CellRendererOptions {
32
- name: string;
33
- }
34
- export declare const isContainer: (componentType: string) => boolean;
35
- export declare const isView: (componentType: string) => boolean;
36
- export declare const isLayoutComponent: (componentType: string) => componentType is layoutComponentType;
37
- export declare function registerComponent(componentName: string, component: RowClassGenerator, componentType: "row-class-generator", options?: CellRendererOptions): void;
38
- export declare function registerComponent(componentName: string, component: EditRuleValidator, componentType: "data-edit-validator", options?: CellRendererOptions): void;
39
- export declare function registerComponent(componentName: string, component: FC<any>, componentType: Omit<ComponentType, "data-edit-validator" | "row-class-generator">, options?: CellRendererOptions): void;
40
- export declare const registerConfigurationEditor: (componentName: string, configurationEditor: FC<ConfigurationEditorProps>) => void;
41
- export declare const getRegisteredCellRenderers: (serverDataType?: VuuColumnDataType | "json") => CellRendererDescriptor[];
42
- export declare const getLayoutComponent: (componentName: string) => FC<any>;
43
- export declare const getCellRendererOptions: (renderName: string) => CellRendererOptions | undefined;
44
- export declare function getCellRenderer(column: ColumnDescriptor): FC<TableCellRendererProps> | undefined;
45
- export declare function getColumnHeaderContentRenderer(column: ColumnDescriptor): FC<HeaderCellProps> | undefined;
46
- export declare function getColumnHeaderLabelRenderer(column: ColumnDescriptor): FC<HeaderCellProps> | undefined;
47
- export declare const getRowClassNameGenerator: (generatorId: string) => RowClassGenerator | undefined;
48
- export declare function getConfigurationEditor(configEditor?: string): FC<ConfigurationEditorProps> | undefined;
49
- export declare function getCellConfigPanelRenderer(name: string): ConfigEditorComponent | undefined;
50
- export declare function getEditRuleValidator(name: string): EditRuleValidator | undefined;
51
- export {};
@@ -1 +0,0 @@
1
- export declare const getCookieValue: (name: string) => string | number | undefined;
@@ -1 +0,0 @@
1
- export declare const importCSS: (path: string) => Promise<CSSStyleSheet>;
@@ -1,14 +0,0 @@
1
- export type valueChangeDirection = "up1" | "up2" | "down1" | "down2" | "";
2
- export declare const UP1 = "up1";
3
- export declare const UP2 = "up2";
4
- export declare const DOWN1 = "down1";
5
- export declare const DOWN2 = "down2";
6
- export declare const isValidNumber: (n: unknown) => n is number;
7
- export declare const shallowEquals: (o1?: {
8
- [key: string]: unknown;
9
- }, o2?: {
10
- [key: string]: unknown;
11
- }) => boolean;
12
- export declare function getMovingValueDirection(newValue?: number, direction?: valueChangeDirection, prevValue?: number,
13
- /** the number of decimal places to take into account when highlighting a change */
14
- decimalPlaces?: number): valueChangeDirection;
@@ -1,7 +0,0 @@
1
- import { DataSourceMenusMessage, DataSourceVisualLinkCreatedMessage, DataSourceVisualLinkRemovedMessage, DataSourceVisualLinksMessage, VuuFeatureMessage } from "@vuu-ui/vuu-data-types";
2
- import { GridAction } from "@vuu-ui/vuu-table-types";
3
- export declare const isVisualLinksAction: (action: GridAction) => action is DataSourceVisualLinksMessage;
4
- export declare const isVisualLinkCreatedAction: (action: GridAction) => action is DataSourceVisualLinkCreatedMessage;
5
- export declare const isVisualLinkRemovedAction: (action: GridAction) => action is DataSourceVisualLinkRemovedMessage;
6
- export declare const isViewportMenusAction: (action: GridAction) => action is DataSourceMenusMessage;
7
- export declare const isVuuFeatureAction: (action: GridAction) => action is VuuFeatureMessage;
@@ -1,36 +0,0 @@
1
- import { ConnectionQualityMetrics, ConnectionStatusMessage, DataSourceConfig, MenuRpcResponse, RpcResponse, TypeaheadSuggestionProvider, VuuUIMessageIn, VuuUIMessageInRPC, VuuUIMessageInRPCEditReject, VuuUIMessageInRPCEditResponse, VuuUIMessageInTableMeta, VuuUIMessageOutViewport, WithFilter, WithFullConfig, WithGroupBy, WithSort } from "@vuu-ui/vuu-data-types";
2
- import { LinkDescriptorWithLabel, VuuFilter, VuuSort } from "@vuu-ui/vuu-protocol-types";
3
- export declare const NoFilter: VuuFilter;
4
- export declare const NoSort: VuuSort;
5
- export declare const vanillaConfig: WithFullConfig;
6
- export type DataSourceConfigChanges = {
7
- aggregationsChanged: boolean;
8
- columnsChanged: boolean;
9
- filterChanged: boolean;
10
- groupByChanged: boolean;
11
- sortChanged: boolean;
12
- visualLinkChanged: boolean;
13
- };
14
- export type MaybeDataSourceConfigChanges = DataSourceConfigChanges & {
15
- noChanges: boolean;
16
- };
17
- type DataConfigPredicate = (config: DataSourceConfig, newConfig: DataSourceConfig) => boolean;
18
- export declare const isFilterChanged: DataConfigPredicate;
19
- export declare const isGroupByChanged: DataConfigPredicate;
20
- export declare const NO_CONFIG_CHANGES: MaybeDataSourceConfigChanges;
21
- export declare const isConfigChanged: (config: DataSourceConfig | undefined, newConfig: DataSourceConfig | undefined) => MaybeDataSourceConfigChanges;
22
- export declare const hasGroupBy: (config?: DataSourceConfig) => config is WithGroupBy;
23
- export declare const hasFilter: (config?: DataSourceConfig) => config is WithFilter;
24
- export declare const hasSort: (config?: DataSourceConfig) => config is WithSort;
25
- export declare const isTypeaheadSuggestionProvider: (source: unknown) => source is TypeaheadSuggestionProvider;
26
- export declare const isTableSchemaMessage: (message: VuuUIMessageIn) => message is VuuUIMessageInTableMeta;
27
- export declare const isConnectionStatusMessage: (msg: object | ConnectionStatusMessage) => msg is ConnectionStatusMessage;
28
- export declare const isConnectionQualityMetrics: (msg: object) => msg is ConnectionQualityMetrics;
29
- export declare const messageHasResult: (msg: object) => msg is VuuUIMessageInRPC;
30
- export declare const isErrorResponse: (response?: RpcResponse) => response is VuuUIMessageInRPCEditReject;
31
- export declare const hasAction: (response?: RpcResponse) => response is VuuUIMessageInRPCEditResponse | MenuRpcResponse<any>;
32
- export declare const isViewportMessage: (msg: object) => msg is VuuUIMessageOutViewport;
33
- export declare const withConfigDefaults: (config: DataSourceConfig) => WithFullConfig & {
34
- visualLink?: LinkDescriptorWithLabel;
35
- };
36
- export {};
@@ -1,2 +0,0 @@
1
- import { CalendarDate } from "@internationalized/date";
2
- export declare function toCalendarDate(d: Date): CalendarDate;
@@ -1,8 +0,0 @@
1
- import { DateTimeColumnDescriptor } from "@vuu-ui/vuu-table-types";
2
- import { DateTimePattern } from "./types";
3
- export declare const defaultPatternsByType: {
4
- readonly time: "hh:mm:ss";
5
- readonly date: "dd.mm.yyyy";
6
- };
7
- export declare const fallbackDateTimePattern: DateTimePattern;
8
- export declare function dateTimePattern(type: DateTimeColumnDescriptor["type"]): DateTimePattern;
@@ -1,4 +0,0 @@
1
- import { DateFormatter } from "@internationalized/date";
2
- import { DateTimePattern } from "./types";
3
- export declare function formatDate(pattern: DateTimePattern): (d: Date) => string;
4
- export declare function getDateFormatter(locale: string, options?: Intl.DateTimeFormatOptions): DateFormatter;
@@ -1,4 +0,0 @@
1
- export * from "./formatter";
2
- export { dateTimeLabelByType, isDatePattern, isTimePattern, isDateTimePattern, type DatePattern, type TimePattern, type DateTimePattern, supportedDateTimePatterns, } from "./types";
3
- export { toCalendarDate } from "./date-utils";
4
- export { dateTimePattern, defaultPatternsByType, fallbackDateTimePattern, } from "./dateTimePattern";
@@ -1,24 +0,0 @@
1
- import { ColumnTypeFormatting } from "@vuu-ui/vuu-table-types";
2
- declare const supportedDatePatterns: readonly ["dd.mm.yyyy", "dd/mm/yyyy", "dd MMM yyyy", "dd MMMM yyyy", "mm/dd/yyyy", "MMM dd, yyyy", "MMMM dd, yyyy"];
3
- declare const supportedTimePatterns: readonly ["hh:mm:ss", "hh:mm:ss a"];
4
- export declare const supportedDateTimePatterns: {
5
- date: readonly ["dd.mm.yyyy", "dd/mm/yyyy", "dd MMM yyyy", "dd MMMM yyyy", "mm/dd/yyyy", "MMM dd, yyyy", "MMMM dd, yyyy"];
6
- time: readonly ["hh:mm:ss", "hh:mm:ss a"];
7
- };
8
- export declare const dateTimeLabelByType: {
9
- readonly date: "Date";
10
- readonly time: "Time";
11
- };
12
- export type DatePattern = (typeof supportedDatePatterns)[number];
13
- export type TimePattern = (typeof supportedTimePatterns)[number];
14
- export type DateTimePattern = {
15
- date?: DatePattern;
16
- time: TimePattern;
17
- } | {
18
- date: DatePattern;
19
- time?: TimePattern;
20
- };
21
- export declare const isDatePattern: (pattern?: string) => pattern is "dd.mm.yyyy" | "dd/mm/yyyy" | "dd MMM yyyy" | "dd MMMM yyyy" | "mm/dd/yyyy" | "MMM dd, yyyy" | "MMMM dd, yyyy";
22
- export declare const isTimePattern: (pattern?: string) => pattern is "hh:mm:ss" | "hh:mm:ss a";
23
- export declare const isDateTimePattern: (pattern?: ColumnTypeFormatting["pattern"]) => pattern is DateTimePattern;
24
- export {};
@@ -1,9 +0,0 @@
1
- import { VuuRange } from "@vuu-ui/vuu-protocol-types";
2
- export declare class RangeMonitor {
3
- private source;
4
- range: VuuRange;
5
- timestamp: number;
6
- constructor(source: string);
7
- isSet(): boolean;
8
- set({ from, to }: VuuRange): 0 | undefined;
9
- }
@@ -1,21 +0,0 @@
1
- type Listener = (...args: any[]) => void;
2
- export type EmittedEvents = Record<string, Listener>;
3
- export interface IEventEmitter<Events extends EmittedEvents> {
4
- addListener<E extends keyof Events>(event: E, listener: Events[E]): void;
5
- emit<E extends keyof Events>(event: E, ...args: Parameters<Events[E]>): void;
6
- on<E extends keyof Events>(event: E, listener: Events[E]): void;
7
- removeListener<E extends keyof Events>(event: E, listener: Events[E]): void;
8
- removeAllListeners<E extends keyof Events>(event?: E): void;
9
- }
10
- export declare class EventEmitter<Events extends EmittedEvents> implements IEventEmitter<Events> {
11
- #private;
12
- addListener<E extends keyof Events>(event: E, listener: Events[E]): void;
13
- removeListener<E extends keyof Events>(event: E, listener: Events[E]): void;
14
- removeAllListeners<E extends keyof Events>(event?: E): void;
15
- emit<E extends keyof Events>(event: E, ...args: Parameters<Events[E]>): void;
16
- once<E extends keyof Events>(event: E, listener: Events[E]): void;
17
- on<E extends keyof Events>(event: E, listener: Events[E]): void;
18
- hasListener<E extends keyof Events>(event: E, listener: Events[E]): boolean;
19
- private invokeHandler;
20
- }
21
- export {};
@@ -1,62 +0,0 @@
1
- import type { TableSchema } from "@vuu-ui/vuu-data-types";
2
- import type { VuuTable } from "@vuu-ui/vuu-protocol-types";
3
- import type { FeatureProps } from "@vuu-ui/vuu-shell";
4
- export type PathMap = {
5
- [key: string]: Pick<FeatureConfig, "css" | "url">;
6
- };
7
- export type Environment = "development" | "production";
8
- export declare const env: Environment;
9
- export interface ViewConfig {
10
- allowRename?: boolean;
11
- closeable?: boolean;
12
- header?: boolean;
13
- }
14
- declare global {
15
- const vuuConfig: Promise<VuuConfig>;
16
- }
17
- export interface FeatureConfig {
18
- name: string;
19
- title: string;
20
- url: string;
21
- css?: string;
22
- leftNavLocation: "vuu-features" | "vuu-tables";
23
- featureProps?: {
24
- schema?: "*" | VuuTable;
25
- schemas?: VuuTable[];
26
- };
27
- viewProps?: ViewConfig;
28
- }
29
- export interface VuuConfig {
30
- features: Features;
31
- authUrl?: string;
32
- websocketUrl: string;
33
- ssl: boolean;
34
- }
35
- export interface FilterTableFeatureProps {
36
- tableSchema: TableSchema;
37
- }
38
- export type Features = {
39
- [key: string]: FeatureConfig;
40
- };
41
- export interface VuuConfig {
42
- features: Features;
43
- authUrl?: string;
44
- websocketUrl: string;
45
- ssl: boolean;
46
- }
47
- export declare const isCustomFeature: (feature: FeatureConfig) => boolean;
48
- export declare const isWildcardSchema: (schema?: "*" | VuuTable) => schema is "*";
49
- export declare const isTableSchema: (schema?: "*" | VuuTable) => schema is VuuTable;
50
- export interface FeaturePropsWithFilterTableFeature extends Omit<FeatureProps, "ComponentProps"> {
51
- ComponentProps: FilterTableFeatureProps;
52
- }
53
- export declare const hasFilterTableFeatureProps: (props: FeatureProps) => props is FeaturePropsWithFilterTableFeature;
54
- export declare const byModule: (schema1: TableSchema, schema2: TableSchema) => 0 | 1 | -1;
55
- export type GetFeaturePaths = (params: {
56
- env: Environment;
57
- fileName: string;
58
- withCss?: boolean;
59
- }) => FeatureProps;
60
- export declare const getFilterTableFeatures: (schemas: TableSchema[], getFeaturePath: GetFeaturePaths) => FeatureProps<FilterTableFeatureProps>[];
61
- export declare const assertComponentRegistered: (componentName: string, component: unknown) => void;
62
- export declare const getCustomAndTableFeatures: (features: Features, vuuTables: Map<string, TableSchema>) => [FeatureProps[], FeatureProps<FilterTableFeatureProps>[]];
@@ -1,7 +0,0 @@
1
- import { ColumnDescriptorsByName, Filter, SingleValueFilterClause } from "@vuu-ui/vuu-filter-types";
2
- import type { RuntimeColumnDescriptor } from "@vuu-ui/vuu-table-types";
3
- export declare const filterAsQuery: (f: Filter, opts?: {
4
- columnsByName?: ColumnDescriptorsByName;
5
- }) => string;
6
- export declare function dateFilterAsQuery(f: SingleValueFilterClause<number>): string;
7
- export declare const removeColumnFromFilter: (column: RuntimeColumnDescriptor, filter: Filter) => [Filter | undefined, string];
@@ -1,2 +0,0 @@
1
- export * from "./utils";
2
- export * from "./filterAsQuery";