@deephaven/iris-grid 1.2.1-plotly-rc.3 → 1.3.0

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 (147) hide show
  1. package/dist/AdvancedFilterCreator.css.map +1 -1
  2. package/dist/AdvancedFilterCreator.js.map +1 -1
  3. package/dist/AdvancedFilterCreatorFilterItem.css.map +1 -1
  4. package/dist/AdvancedFilterCreatorFilterItem.js.map +1 -1
  5. package/dist/AdvancedFilterCreatorSelectValue.css.map +1 -1
  6. package/dist/AdvancedFilterCreatorSelectValue.js.map +1 -1
  7. package/dist/AdvancedFilterCreatorSelectValueList.js.map +1 -1
  8. package/dist/ColumnHeaderGroup.js.map +1 -1
  9. package/dist/ColumnStatistics.css.map +1 -1
  10. package/dist/ColumnStatistics.js.map +1 -1
  11. package/dist/CommonTypes.js.map +1 -1
  12. package/dist/CrossColumnSearch.css.map +1 -1
  13. package/dist/CrossColumnSearch.js.map +1 -1
  14. package/dist/EmptyIrisGridModel.js.map +1 -1
  15. package/dist/FilterInputField.css.map +1 -1
  16. package/dist/FilterInputField.js.map +1 -1
  17. package/dist/GotoRow.css.map +1 -1
  18. package/dist/GotoRow.js.map +1 -1
  19. package/dist/IrisGrid.css.map +1 -1
  20. package/dist/IrisGrid.js.map +1 -1
  21. package/dist/IrisGridBottomBar.css.map +1 -1
  22. package/dist/IrisGridBottomBar.js.map +1 -1
  23. package/dist/IrisGridCacheUtils.js.map +1 -1
  24. package/dist/IrisGridCellOverflowModal.css.map +1 -1
  25. package/dist/IrisGridCellOverflowModal.js.map +1 -1
  26. package/dist/IrisGridCellRendererUtils.js.map +1 -1
  27. package/dist/IrisGridCopyHandler.css.map +1 -1
  28. package/dist/IrisGridCopyHandler.js.map +1 -1
  29. package/dist/IrisGridDataBarCellRenderer.js.map +1 -1
  30. package/dist/IrisGridIcons.js.map +1 -1
  31. package/dist/IrisGridMetricCalculator.js.map +1 -1
  32. package/dist/IrisGridModel.js.map +1 -1
  33. package/dist/IrisGridModelFactory.js.map +1 -1
  34. package/dist/IrisGridModelUpdater.js.map +1 -1
  35. package/dist/IrisGridPartitionSelector.css.map +1 -1
  36. package/dist/IrisGridPartitionSelector.js.map +1 -1
  37. package/dist/IrisGridPartitionedTableModel.js.map +1 -1
  38. package/dist/IrisGridProxyModel.js.map +1 -1
  39. package/dist/IrisGridRenderer.js.map +1 -1
  40. package/dist/IrisGridShortcuts.js.map +1 -1
  41. package/dist/IrisGridTableModel.js.map +1 -1
  42. package/dist/IrisGridTableModelTemplate.js.map +1 -1
  43. package/dist/IrisGridTestUtils.js.map +1 -1
  44. package/dist/IrisGridTextCellRenderer.js.map +1 -1
  45. package/dist/IrisGridTheme.js.map +1 -1
  46. package/dist/IrisGridTheme.module.css.map +1 -1
  47. package/dist/IrisGridThemeProvider.js.map +1 -1
  48. package/dist/IrisGridTreeTableModel.js.map +1 -1
  49. package/dist/IrisGridUtils.js.map +1 -1
  50. package/dist/LazyIrisGrid.js.map +1 -1
  51. package/dist/MissingKeyError.js.map +1 -1
  52. package/dist/MissingPartitionError.js.map +1 -1
  53. package/dist/NoPastePermissionModal.js.map +1 -1
  54. package/dist/PartitionedGridModel.js.map +1 -1
  55. package/dist/PendingDataBottomBar.css.map +1 -1
  56. package/dist/PendingDataBottomBar.js.map +1 -1
  57. package/dist/ToastBottomBar.js.map +1 -1
  58. package/dist/declaration.d.js.map +1 -1
  59. package/dist/format-context-menus/CustomFormatAction.css.map +1 -1
  60. package/dist/format-context-menus/CustomFormatAction.js.map +1 -1
  61. package/dist/format-context-menus/DateTimeFormatContextMenu.js.map +1 -1
  62. package/dist/format-context-menus/DecimalFormatContextMenu.js.map +1 -1
  63. package/dist/format-context-menus/FormatContextMenuUtils.js.map +1 -1
  64. package/dist/format-context-menus/IntegerFormatContextMenu.js.map +1 -1
  65. package/dist/format-context-menus/index.js.map +1 -1
  66. package/dist/index.js.map +1 -1
  67. package/dist/key-handlers/ClearFilterKeyHandler.js.map +1 -1
  68. package/dist/key-handlers/CopyCellKeyHandler.js.map +1 -1
  69. package/dist/key-handlers/CopyKeyHandler.js.map +1 -1
  70. package/dist/key-handlers/ReverseKeyHandler.js.map +1 -1
  71. package/dist/key-handlers/index.js.map +1 -1
  72. package/dist/mousehandlers/IrisGridCellOverflowMouseHandler.js.map +1 -1
  73. package/dist/mousehandlers/IrisGridColumnSelectMouseHandler.js.map +1 -1
  74. package/dist/mousehandlers/IrisGridColumnTooltipMouseHandler.js.map +1 -1
  75. package/dist/mousehandlers/IrisGridContextMenuHandler.css.map +1 -1
  76. package/dist/mousehandlers/IrisGridContextMenuHandler.js.map +1 -1
  77. package/dist/mousehandlers/IrisGridCopyCellMouseHandler.js.map +1 -1
  78. package/dist/mousehandlers/IrisGridDataSelectMouseHandler.js.map +1 -1
  79. package/dist/mousehandlers/IrisGridFilterMouseHandler.js.map +1 -1
  80. package/dist/mousehandlers/IrisGridPartitionedTableMouseHandler.js.map +1 -1
  81. package/dist/mousehandlers/IrisGridRowTreeMouseHandler.js.map +1 -1
  82. package/dist/mousehandlers/IrisGridSortMouseHandler.js.map +1 -1
  83. package/dist/mousehandlers/IrisGridTokenMouseHandler.js.map +1 -1
  84. package/dist/mousehandlers/PendingMouseHandler.js.map +1 -1
  85. package/dist/mousehandlers/index.js.map +1 -1
  86. package/dist/sidebar/AdvancedSettings.js.map +1 -1
  87. package/dist/sidebar/AdvancedSettingsMenu.js.map +1 -1
  88. package/dist/sidebar/AdvancedSettingsType.js.map +1 -1
  89. package/dist/sidebar/ChartBuilder.css.map +1 -1
  90. package/dist/sidebar/ChartBuilder.js.map +1 -1
  91. package/dist/sidebar/CustomColumnBuilder.css.map +1 -1
  92. package/dist/sidebar/CustomColumnBuilder.js.map +1 -1
  93. package/dist/sidebar/CustomColumnInput.js.map +1 -1
  94. package/dist/sidebar/DownloadServiceWorkerUtils.js.map +1 -1
  95. package/dist/sidebar/InputEditor.css.map +1 -1
  96. package/dist/sidebar/InputEditor.js.map +1 -1
  97. package/dist/sidebar/OptionType.js.map +1 -1
  98. package/dist/sidebar/RollupRows.css.map +1 -1
  99. package/dist/sidebar/RollupRows.js.map +1 -1
  100. package/dist/sidebar/SelectDistinctBuilder.css.map +1 -1
  101. package/dist/sidebar/SelectDistinctBuilder.js.map +1 -1
  102. package/dist/sidebar/TableCsvExporter.css.map +1 -1
  103. package/dist/sidebar/TableCsvExporter.js.map +1 -1
  104. package/dist/sidebar/TableSaver.js.map +1 -1
  105. package/dist/sidebar/aggregations/AggregationEdit.css.map +1 -1
  106. package/dist/sidebar/aggregations/AggregationEdit.js.map +1 -1
  107. package/dist/sidebar/aggregations/AggregationOperation.js.map +1 -1
  108. package/dist/sidebar/aggregations/AggregationUtils.js.map +1 -1
  109. package/dist/sidebar/aggregations/Aggregations.css.map +1 -1
  110. package/dist/sidebar/aggregations/Aggregations.js.map +1 -1
  111. package/dist/sidebar/aggregations/index.js.map +1 -1
  112. package/dist/sidebar/conditional-formatting/ColumnFormatEditor.js.map +1 -1
  113. package/dist/sidebar/conditional-formatting/ConditionEditor.js.map +1 -1
  114. package/dist/sidebar/conditional-formatting/ConditionalFormatEditor.css.map +1 -1
  115. package/dist/sidebar/conditional-formatting/ConditionalFormatEditor.js.map +1 -1
  116. package/dist/sidebar/conditional-formatting/ConditionalFormattingAPIUtils.js.map +1 -1
  117. package/dist/sidebar/conditional-formatting/ConditionalFormattingMenu.css.map +1 -1
  118. package/dist/sidebar/conditional-formatting/ConditionalFormattingMenu.js.map +1 -1
  119. package/dist/sidebar/conditional-formatting/ConditionalFormattingUtils.js.map +1 -1
  120. package/dist/sidebar/conditional-formatting/RowFormatEditor.js.map +1 -1
  121. package/dist/sidebar/conditional-formatting/StyleEditor.css.map +1 -1
  122. package/dist/sidebar/conditional-formatting/StyleEditor.js.map +1 -1
  123. package/dist/sidebar/icons/BarIcon.js.map +1 -1
  124. package/dist/sidebar/icons/FormatColumnWhereIcon.js.map +1 -1
  125. package/dist/sidebar/icons/FormatRowWhereIcon.js.map +1 -1
  126. package/dist/sidebar/icons/HistogramIcon.js.map +1 -1
  127. package/dist/sidebar/icons/LineIcon.js.map +1 -1
  128. package/dist/sidebar/icons/PieIcon.js.map +1 -1
  129. package/dist/sidebar/icons/ScatterIcon.js.map +1 -1
  130. package/dist/sidebar/icons/index.js.map +1 -1
  131. package/dist/sidebar/index.js.map +1 -1
  132. package/dist/sidebar/visibility-ordering-builder/VisibilityOrderingBuilder.css.map +1 -1
  133. package/dist/sidebar/visibility-ordering-builder/VisibilityOrderingBuilder.js.map +1 -1
  134. package/dist/sidebar/visibility-ordering-builder/VisibilityOrderingBuilderUtils.js.map +1 -1
  135. package/dist/sidebar/visibility-ordering-builder/VisibilityOrderingGroup.css.map +1 -1
  136. package/dist/sidebar/visibility-ordering-builder/VisibilityOrderingGroup.js.map +1 -1
  137. package/dist/sidebar/visibility-ordering-builder/VisibilityOrderingItem.js.map +1 -1
  138. package/dist/sidebar/visibility-ordering-builder/sortable-tree/PointerSensorWithInteraction.js.map +1 -1
  139. package/dist/sidebar/visibility-ordering-builder/sortable-tree/SortableTree.js.map +1 -1
  140. package/dist/sidebar/visibility-ordering-builder/sortable-tree/SortableTreeInner.js.map +1 -1
  141. package/dist/sidebar/visibility-ordering-builder/sortable-tree/SortableTreeItem.js.map +1 -1
  142. package/dist/sidebar/visibility-ordering-builder/sortable-tree/TreeItem.css.map +1 -1
  143. package/dist/sidebar/visibility-ordering-builder/sortable-tree/TreeItem.js.map +1 -1
  144. package/dist/sidebar/visibility-ordering-builder/sortable-tree/keyboardCoordinates.js.map +1 -1
  145. package/dist/sidebar/visibility-ordering-builder/sortable-tree/types.js.map +1 -1
  146. package/dist/sidebar/visibility-ordering-builder/sortable-tree/utilities.js.map +1 -1
  147. package/package.json +16 -16
@@ -1 +1 @@
1
- {"version":3,"file":"TableSaver.js","names":["PureComponent","Log","memoizeClear","FormatterUtils","TableUtils","PromiseUtils","assertNotNull","IrisGridUtils","log","module","UNFORMATTED_DATE_PATTERN","isUpdateEventData","data","added","undefined","assertIsUpdateEventData","Error","TableSaver","csvEscapeString","str","concat","replace","constructor","props","_defineProperty","isCustomColumnFormatDefined","max","handlePortMessage","bind","handleSnapshotResolved","handleDownloadTimeout","state","gridRanges","gridRangeCounter","rangedSnapshotsTotal","rangedSnapshotCounter","includeColumnHeaders","useUnformattedValues","snapshotsTotal","snapshotCounter","snapshotsBuffer","Map","currentSnapshotIndex","snapshotPending","cancelableSnapshots","useBlobFallback","componentDidMount","getDownloadWorker","then","sw","info","postMessage","catch","error","warn","componentWillUnmount","removeIframe","streamTimeout","clearTimeout","snapshotHandlerTimeout","createWriterStream","port","useBlob","chunks","encode","TextEncoder","prototype","fileName","streamConfig","write","chunk","header","push","rows","close","blob","Blob","type","link","document","createElement","href","URL","createObjectURL","download","click","abort","cancel","end","WritableStream","startDownload","frozenTable","tableSubscription","snapshotRanges","modelRanges","isDownloading","downloadStartTime","Date","now","table","columns","columnsFromRanges","encodedFileName","encodeURIComponent","escape","messageChannel","MessageChannel","port1","fileWriter","getWriter","writeCsvTable","port2","onmessage","finishDownload","onDownloadCompleted","resetTableSaver","cancelDownload","_this$table","_this$tableSubscripti","_this$fileWriter","forEach","cancelable","onDownloadCanceled","chunkRows","writeTableHeader","_this$fileWriter2","headerString","i","length","name","startWriteTableBody","Math","floor","DOWNLOAD_CELL_CHUNK","map","range","endRow","startRow","ceil","reduce","total","snapshotCount","makeSnapshot","min","SNAPSHOT_BUFFER_SIZE","writeSnapshot","snapshotIndex","snapshotStartRow","snapshotEndRow","has","n","get","convertSnapshotIntoCsv","delete","updateDownloadProgress","debug2","size","onDownloadProgressUpdate","downloadProgress","estimateTime","snapshot","csvString","snapshotIterator","iterator","dh","formatter","hasNext","next","value","rowIdx","j","cellData","_snapshot$getData","getData","isDateType","i18n","DateTimeFormat","format","TimeZone","getTimeZone","timeZone","toString","hasCustomColumnFormat","getCachedCustomColumnFormatFlag","formatOverride","cellFormat","getFormat","formatString","getFormattedString","_this","currentGridRange","_loop","makeCancelable","RangeSet","ofRange","err","val","_ref","readableStreamPulling","makeIframe","setTimeout","STREAM_TIMEOUT","set","SNAPSHOT_HANDLER_TIMEOUT","src","iframe","hidden","body","appendChild","_this$iframe","remove","render"],"sources":["../../src/sidebar/TableSaver.tsx"],"sourcesContent":["import { PureComponent } from 'react';\nimport type { dh as DhType } from '@deephaven/jsapi-types';\nimport Log from '@deephaven/log';\nimport {\n type GridRange,\n type GridRangeIndex,\n memoizeClear,\n} from '@deephaven/grid';\nimport {\n type Formatter,\n FormatterUtils,\n TableUtils,\n} from '@deephaven/jsapi-utils';\nimport {\n type CancelablePromise,\n PromiseUtils,\n assertNotNull,\n} from '@deephaven/utils';\nimport IrisGridUtils from '../IrisGridUtils';\n\nconst log = Log.module('TableSaver');\n\nconst UNFORMATTED_DATE_PATTERN = `yyyy-MM-dd'T'HH:mm:ss.SSSSSSSSS z`;\n\ninterface TableSaverProps {\n dh: typeof DhType;\n getDownloadWorker: () => Promise<ServiceWorker>;\n isDownloading: boolean;\n onDownloadCompleted: () => void;\n onDownloadCanceled: () => void;\n onDownloadProgressUpdate: (\n progress: number,\n estimatedTime: number | null\n ) => void;\n formatter: Formatter;\n}\n\nfunction isUpdateEventData(\n data: DhType.TableData\n): data is DhType.SubscriptionTableData {\n return (data as DhType.SubscriptionTableData).added !== undefined;\n}\n\nfunction assertIsUpdateEventData(\n data: DhType.TableData\n): asserts data is DhType.SubscriptionTableData {\n if (!isUpdateEventData(data)) {\n throw new Error('event is not UpdateEventData');\n }\n}\n\nexport default class TableSaver extends PureComponent<\n TableSaverProps,\n Record<string, never>\n> {\n static DOWNLOAD_CELL_CHUNK = 6000;\n\n static SNAPSHOT_BUFFER_SIZE = 5;\n\n static STREAM_TIMEOUT = 8000;\n\n static SNAPSHOT_HANDLER_TIMEOUT = 5;\n\n static defaultProps = {\n isDownloading: false,\n onDownloadCompleted: (): void => undefined,\n onDownloadCanceled: (): void => undefined,\n onDownloadProgressUpdate: (): void => undefined,\n };\n\n static csvEscapeString(str: string): string {\n return `\"${str.replace(/\"/g, '\"\"')}\"`;\n }\n\n constructor(props: TableSaverProps) {\n super(props);\n\n this.handlePortMessage = this.handlePortMessage.bind(this);\n this.handleSnapshotResolved = this.handleSnapshotResolved.bind(this);\n this.handleDownloadTimeout = this.handleDownloadTimeout.bind(this);\n\n this.state = {};\n\n this.gridRanges = [];\n this.gridRangeCounter = 0;\n this.rangedSnapshotsTotal = [];\n this.rangedSnapshotCounter = 0;\n\n this.includeColumnHeaders = true;\n this.useUnformattedValues = false;\n\n this.snapshotsTotal = 0;\n this.snapshotCounter = 0;\n this.snapshotsBuffer = new Map();\n\n this.currentSnapshotIndex = 0;\n this.snapshotPending = 0;\n this.cancelableSnapshots = [];\n\n // Due to an open issue in Chromium, readableStream.cancel() is never called when a user cancel the stream from Chromium's UI and the stream goes on even it's canceled.\n // Instead, we monitor the pull() behavior from the readableStream called when the stream wants more data to write.\n // If the stream doesn't pull for long enough time, chances are the stream is already canceled, so we stop the stream.\n // Issue ticket on Chromium: https://bugs.chromium.org/p/chromium/issues/detail?id=638494\n\n this.useBlobFallback = false;\n }\n\n componentDidMount(): void {\n const { getDownloadWorker } = this.props;\n getDownloadWorker()\n .then(sw => {\n log.info('found active service worker');\n this.sw = sw;\n this.sw.postMessage('ping'); // just to activate the service worker\n })\n .catch(error => {\n // if service worker is not available, use blob as fallback to download table csv\n log.warn('Download csv is not optimized.', error);\n this.useBlobFallback = true;\n });\n }\n\n componentWillUnmount(): void {\n this.removeIframe();\n if (this.streamTimeout) clearTimeout(this.streamTimeout);\n if (this.snapshotHandlerTimeout) clearTimeout(this.snapshotHandlerTimeout);\n }\n\n sw?: ServiceWorker;\n\n port?: MessagePort;\n\n fileWriter?: WritableStreamDefaultWriter<unknown>;\n\n table?: DhType.Table;\n\n tableSubscription?: DhType.TableViewportSubscription;\n\n columns?: readonly DhType.Column[];\n\n fileName?: string;\n\n includeColumnHeaders: boolean;\n\n useUnformattedValues: boolean;\n\n chunkRows?: number;\n\n gridRanges: readonly GridRange[];\n\n gridRangeCounter?: number;\n\n rangedSnapshotsTotal: readonly number[];\n\n rangedSnapshotCounter?: number;\n\n snapshotsTotal: number;\n\n snapshotCounter: number;\n\n snapshotsBuffer: Map<number, DhType.SubscriptionTableData>;\n\n currentSnapshotIndex: number;\n\n snapshotPending: number;\n\n cancelableSnapshots: (CancelablePromise<unknown> | null)[];\n\n // Due to an open issue in Chromium, readableStream.cancel() is never called when a user cancel the stream from Chromium's UI and the stream goes on even it's canceled.\n // Instead, we monitor the pull() behavior from the readableStream called when the stream wants more data to write.\n // If the stream doesn't pull for long enough time, chances are the stream is already canceled, so we stop the stream.\n // Issue ticket on Chromium: https://bugs.chromium.org/p/chromium/issues/detail?id=638494\n streamTimeout?: ReturnType<typeof setTimeout>;\n\n snapshotHandlerTimeout?: ReturnType<typeof setTimeout>;\n\n downloadStartTime?: number;\n\n iframe?: HTMLIFrameElement;\n\n useBlobFallback: boolean;\n\n getCachedCustomColumnFormatFlag = memoizeClear(\n FormatterUtils.isCustomColumnFormatDefined,\n { max: 10000 }\n );\n\n createWriterStream(port: MessagePort): WritableStream<{\n rows?: string | undefined;\n header?: string | undefined;\n }> {\n // use blob fall back if it's safari\n const useBlob = this.useBlobFallback;\n const chunks = [] as BlobPart[];\n let encode: ((input?: string) => Uint8Array) | null = null;\n if (useBlob) {\n encode = TextEncoder.prototype.encode.bind(new TextEncoder());\n }\n const { fileName } = this;\n\n const streamConfig = {} as UnderlyingSink<{\n rows?: string | undefined;\n header?: string | undefined;\n }>;\n if (useBlob) {\n streamConfig.write = (chunk: { rows?: string; header?: string }) => {\n assertNotNull(encode);\n if (chunk.header !== undefined) {\n chunks.push(encode(chunk.header));\n }\n if (chunk.rows !== undefined) {\n chunks.push(encode(chunk.rows));\n }\n };\n streamConfig.close = () => {\n assertNotNull(fileName);\n const blob = new Blob(chunks, {\n type: 'application/octet-stream; charset=utf-8',\n });\n const link = document.createElement('a');\n link.href = URL.createObjectURL(blob);\n link.download = fileName;\n link.click();\n };\n streamConfig.abort = () => {\n port.postMessage({ cancel: true });\n port.close();\n };\n } else {\n streamConfig.write = (chunk: unknown) => {\n port.postMessage(chunk);\n };\n streamConfig.close = () => {\n port.postMessage({ end: true });\n port.close();\n };\n streamConfig.abort = () => {\n port.postMessage({ cancel: true });\n port.close();\n };\n }\n\n return new WritableStream(streamConfig);\n }\n\n startDownload(\n fileName: string,\n frozenTable: DhType.Table,\n tableSubscription: DhType.TableViewportSubscription,\n snapshotRanges: readonly GridRange[],\n modelRanges: readonly GridRange[],\n includeColumnHeaders: boolean,\n useUnformattedValues: boolean\n ): void {\n // don't trigger another download when a download is ongoing\n const { isDownloading } = this.props;\n if (isDownloading) {\n return;\n }\n\n this.downloadStartTime = Date.now();\n log.info(`start downloading ${fileName}`);\n\n this.table = frozenTable;\n this.columns = IrisGridUtils.columnsFromRanges(\n modelRanges,\n frozenTable.columns\n );\n this.tableSubscription = tableSubscription;\n this.gridRanges = snapshotRanges;\n this.includeColumnHeaders = includeColumnHeaders;\n this.useUnformattedValues = useUnformattedValues;\n\n // Make filename RFC5987 compatible\n const encodedFileName = encodeURIComponent(fileName.replace(/\\//g, ':'))\n .replace(/['()]/g, escape)\n .replace(/\\*/g, '%2A');\n\n const messageChannel = new MessageChannel();\n this.port = messageChannel.port1;\n this.fileName = fileName;\n this.fileWriter = this.createWriterStream(this.port).getWriter();\n\n // if the browser doesn't support stream or there's no active service worker, use blobs for table download\n if (this.useBlobFallback) {\n this.writeCsvTable(includeColumnHeaders);\n return;\n }\n\n if (this.sw) {\n // send file name and port to service worker\n this.sw.postMessage({ encodedFileName }, [messageChannel.port2]);\n }\n this.port.onmessage = this.handlePortMessage;\n }\n\n finishDownload(): void {\n if (this.table) {\n this.table.close();\n }\n if (this.tableSubscription) {\n this.tableSubscription.close();\n }\n if (this.fileWriter) {\n this.fileWriter.close();\n }\n\n const { onDownloadCompleted } = this.props;\n onDownloadCompleted();\n this.resetTableSaver();\n\n if (this.downloadStartTime !== undefined) {\n log.info(\n `download finished, total elapsed time ${\n (Date.now() - this.downloadStartTime) / 1000\n } seconds`\n );\n }\n }\n\n cancelDownload(): void {\n this.table?.close();\n this.tableSubscription?.close();\n this.fileWriter?.abort();\n\n this.cancelableSnapshots.forEach(cancelable => {\n if (cancelable) {\n cancelable.catch(() => null);\n cancelable.cancel();\n }\n });\n const { onDownloadCanceled } = this.props;\n onDownloadCanceled();\n this.resetTableSaver();\n }\n\n resetTableSaver(): void {\n this.table = undefined;\n this.tableSubscription = undefined;\n this.columns = undefined;\n this.chunkRows = undefined;\n this.removeIframe();\n\n this.gridRanges = [];\n this.gridRangeCounter = 0;\n this.rangedSnapshotsTotal = [];\n this.rangedSnapshotCounter = 0;\n\n this.includeColumnHeaders = true;\n this.useUnformattedValues = false;\n\n this.snapshotsTotal = 0;\n this.snapshotCounter = 0;\n this.snapshotsBuffer = new Map();\n\n this.currentSnapshotIndex = 0;\n this.snapshotPending = 0;\n this.cancelableSnapshots = [];\n\n if (this.streamTimeout != null) {\n clearTimeout(this.streamTimeout);\n }\n\n if (this.snapshotHandlerTimeout != null) {\n clearTimeout(this.snapshotHandlerTimeout);\n }\n this.streamTimeout = undefined;\n this.snapshotHandlerTimeout = undefined;\n }\n\n handleDownloadTimeout(): void {\n log.info('download canceled');\n this.cancelDownload();\n }\n\n writeTableHeader(): void {\n let headerString = '';\n if (this.columns) {\n for (let i = 0; i < this.columns.length; i += 1) {\n headerString += this.columns[i].name;\n headerString += i === this.columns.length - 1 ? '\\n' : ',';\n }\n }\n this.fileWriter?.write({ header: headerString }).then(() => null);\n }\n\n startWriteTableBody(): void {\n if (this.columns && this.gridRanges != null) {\n this.chunkRows = Math.floor(\n TableSaver.DOWNLOAD_CELL_CHUNK / this.columns.length\n );\n\n this.rangedSnapshotsTotal = this.gridRanges.map((range: GridRange) => {\n assertNotNull(range.endRow);\n assertNotNull(range.startRow);\n assertNotNull(this.chunkRows);\n\n return Math.ceil((range.endRow - range.startRow + 1) / this.chunkRows);\n });\n this.snapshotsTotal = this.rangedSnapshotsTotal.reduce(\n (total: number, snapshotCount: number) => total + snapshotCount\n );\n\n log.info(`start writing table, total snapshots: `, this.snapshotsTotal);\n\n this.makeSnapshot(\n Math.min(TableSaver.SNAPSHOT_BUFFER_SIZE, this.snapshotsTotal)\n );\n }\n }\n\n writeCsvTable(includeColumnHeaders: boolean): void {\n if (includeColumnHeaders) {\n this.writeTableHeader();\n }\n this.startWriteTableBody();\n }\n\n writeSnapshot(\n snapshotIndex: number,\n snapshotStartRow: GridRangeIndex,\n snapshotEndRow: GridRangeIndex\n ): void {\n if (this.currentSnapshotIndex === snapshotIndex && this.fileWriter) {\n while (this.snapshotsBuffer.has(this.currentSnapshotIndex)) {\n const n = this.snapshotsBuffer.get(this.currentSnapshotIndex);\n assertNotNull(n);\n this.fileWriter.write({\n rows: this.convertSnapshotIntoCsv(n),\n });\n this.snapshotsBuffer.delete(this.currentSnapshotIndex);\n this.currentSnapshotIndex += 1;\n\n this.updateDownloadProgress(snapshotIndex);\n }\n if (\n this.snapshotsTotal &&\n this.currentSnapshotIndex >= this.snapshotsTotal\n ) {\n this.finishDownload();\n return;\n }\n }\n\n if (\n this.snapshotCounter &&\n this.snapshotsTotal &&\n this.snapshotCounter < this.snapshotsTotal\n ) {\n log.debug2(\n `\n current range index: ${this.gridRangeCounter}, \n snapshotIndexCounter: ${this.snapshotCounter}, \n currentRangedSnapshotIndex : ${this.rangedSnapshotCounter}, \n snapshotpending: ${this.snapshotPending}, \n buffered ${this.snapshotsBuffer.size}\n making ${Math.min(\n TableSaver.SNAPSHOT_BUFFER_SIZE -\n this.snapshotsBuffer.size -\n this.snapshotPending,\n this.snapshotsTotal - this.snapshotCounter\n )} more snapshots\n `\n );\n this.makeSnapshot(\n Math.min(\n TableSaver.SNAPSHOT_BUFFER_SIZE -\n this.snapshotsBuffer.size -\n this.snapshotPending,\n this.snapshotsTotal - this.snapshotCounter\n )\n );\n }\n }\n\n updateDownloadProgress(snapshotIndex: GridRangeIndex): void {\n if (\n snapshotIndex != null &&\n this.snapshotsTotal != null &&\n this.downloadStartTime != null\n ) {\n const { onDownloadProgressUpdate } = this.props;\n const downloadProgress = Math.floor(\n (snapshotIndex * 100) / this.snapshotsTotal\n );\n const estimateTime =\n snapshotIndex > 1\n ? Math.floor(\n ((Date.now() - this.downloadStartTime) *\n (this.snapshotsTotal - snapshotIndex)) /\n snapshotIndex /\n 1000\n )\n : null;\n\n onDownloadProgressUpdate(downloadProgress, estimateTime);\n }\n }\n\n convertSnapshotIntoCsv(snapshot: DhType.SubscriptionTableData): string {\n let csvString = '';\n const snapshotIterator = snapshot.added.iterator();\n const { dh, formatter } = this.props;\n\n const rows = [];\n while (snapshotIterator.hasNext()) {\n rows.push(snapshotIterator.next().value);\n }\n\n assertNotNull(this.columns);\n\n const { useUnformattedValues } = this;\n for (let i = 0; i < rows.length; i += 1) {\n const rowIdx = rows[i];\n for (let j = 0; j < this.columns.length; j += 1) {\n const { type, name } = this.columns[j];\n let cellData = null;\n if (useUnformattedValues) {\n let value = snapshot.getData(rowIdx, this.columns[j]) ?? '';\n if (value !== '' && TableUtils.isDateType(type)) {\n // value is just a long value, we should return the value formatted as a full date string\n value = dh.i18n.DateTimeFormat.format(\n UNFORMATTED_DATE_PATTERN,\n value as number | Date | DhType.DateWrapper,\n dh.i18n.TimeZone.getTimeZone(formatter.timeZone)\n );\n }\n cellData = value.toString();\n } else {\n const hasCustomColumnFormat = this.getCachedCustomColumnFormatFlag(\n formatter,\n name,\n type\n );\n let formatOverride = null;\n if (!hasCustomColumnFormat) {\n const cellFormat = snapshot.getFormat(rowIdx, this.columns[j]);\n formatOverride =\n cellFormat?.formatString != null ? cellFormat : null;\n }\n if (formatOverride) {\n cellData = formatter.getFormattedString(\n snapshot.getData(rowIdx, this.columns[j]),\n type,\n name,\n formatOverride\n );\n } else {\n cellData = formatter.getFormattedString(\n snapshot.getData(rowIdx, this.columns[j]),\n type,\n name\n );\n }\n }\n csvString += TableSaver.csvEscapeString(cellData);\n csvString += j === this.columns.length - 1 ? '\\n' : ',';\n }\n }\n\n return csvString;\n }\n\n makeSnapshot(n: number): void {\n if (n <= 0) {\n return;\n }\n const { dh } = this.props;\n assertNotNull(this.gridRangeCounter);\n let i = 0;\n let currentGridRange = this.gridRanges[this.gridRangeCounter];\n\n assertNotNull(this.tableSubscription);\n assertNotNull(this.columns);\n while (i < n) {\n assertNotNull(currentGridRange);\n assertNotNull(currentGridRange.startRow);\n assertNotNull(currentGridRange.endRow);\n assertNotNull(this.rangedSnapshotCounter);\n assertNotNull(this.chunkRows);\n const snapshotStartRow =\n currentGridRange.startRow + this.rangedSnapshotCounter * this.chunkRows;\n const snapshotEndRow = Math.min(\n snapshotStartRow + this.chunkRows - 1,\n currentGridRange.endRow\n );\n\n const snapshotIndex = this.snapshotCounter;\n this.cancelableSnapshots.push(\n PromiseUtils.makeCancelable(\n this.tableSubscription\n .snapshot(\n dh.RangeSet.ofRange(snapshotStartRow, snapshotEndRow),\n this.columns as DhType.Column[]\n )\n .then(snapshot => {\n assertIsUpdateEventData(snapshot);\n this.handleSnapshotResolved(\n snapshot,\n snapshotIndex,\n snapshotStartRow,\n snapshotEndRow\n );\n\n return snapshotIndex;\n })\n .catch(err => {\n log.error(err);\n }),\n val => {\n log.info(`snapshot ${val} has been canceled`);\n }\n )\n );\n\n this.rangedSnapshotCounter += 1;\n this.snapshotCounter += 1;\n this.snapshotPending += 1;\n\n if (\n this.rangedSnapshotCounter >=\n this.rangedSnapshotsTotal[this.gridRangeCounter]\n ) {\n this.gridRangeCounter += 1;\n this.rangedSnapshotCounter = 0;\n currentGridRange = this.gridRanges[this.gridRangeCounter];\n }\n i += 1;\n }\n }\n\n handlePortMessage({\n data,\n }: MessageEvent<{\n download: unknown;\n readableStreamPulling: unknown;\n }>): void {\n const { download, readableStreamPulling } = data;\n if (this.useBlobFallback) {\n return;\n }\n if (download != null) {\n const { includeColumnHeaders } = this;\n this.makeIframe(`${download}`);\n this.writeCsvTable(includeColumnHeaders);\n }\n if (readableStreamPulling != null) {\n if (!this.useBlobFallback) {\n if (this.streamTimeout != null) {\n clearTimeout(this.streamTimeout);\n }\n this.streamTimeout = setTimeout(\n this.handleDownloadTimeout,\n TableSaver.STREAM_TIMEOUT\n );\n }\n }\n }\n\n handleSnapshotResolved(\n snapshot: DhType.SubscriptionTableData,\n snapshotIndex: number,\n snapshotStartRow: GridRangeIndex,\n snapshotEndRow: GridRangeIndex\n ): void {\n // use time out to break writeSnapshot into an individual task in browser with timeout, so there's window for the browser to update table in needed.\n this.snapshotHandlerTimeout = setTimeout(() => {\n this.snapshotsBuffer.set(snapshotIndex, snapshot);\n this.snapshotPending -= 1;\n this.writeSnapshot(snapshotIndex, snapshotStartRow, snapshotEndRow);\n this.cancelableSnapshots[snapshotIndex] = null;\n }, TableSaver.SNAPSHOT_HANDLER_TIMEOUT);\n }\n\n makeIframe(src: string): void {\n // make a return value and make it static method\n const iframe = document.createElement('iframe');\n iframe.hidden = true;\n iframe.src = src;\n iframe.name = 'iframe';\n document.body.appendChild(iframe);\n this.iframe = iframe;\n }\n\n removeIframe(): void {\n this.iframe?.remove();\n this.iframe = undefined;\n }\n\n render(): null {\n return null;\n }\n}\n"],"mappings":";;;AAAA,SAASA,aAAa,QAAQ,OAAO;AAErC,OAAOC,GAAG,MAAM,gBAAgB;AAChC,SAGEC,YAAY,QACP,iBAAiB;AACxB,SAEEC,cAAc,EACdC,UAAU,QACL,wBAAwB;AAC/B,SAEEC,YAAY,EACZC,aAAa,QACR,kBAAkB;AAAC,OACnBC,aAAa;AAEpB,IAAMC,GAAG,GAAGP,GAAG,CAACQ,MAAM,CAAC,YAAY,CAAC;AAEpC,IAAMC,wBAAwB,sCAAsC;AAepE,SAASC,iBAAiBA,CACxBC,IAAsB,EACgB;EACtC,OAAQA,IAAI,CAAkCC,KAAK,KAAKC,SAAS;AACnE;AAEA,SAASC,uBAAuBA,CAC9BH,IAAsB,EACwB;EAC9C,IAAI,CAACD,iBA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C4G,kBAAkB,EAAEA,CAAA,KAAY5G,SAAS;EACzC+I,wBAAwB,EAAEA,CAAA,KAAY/I;AACxC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"TableSaver.js","names":["PureComponent","Log","memoizeClear","FormatterUtils","TableUtils","PromiseUtils","assertNotNull","IrisGridUtils","log","module","UNFORMATTED_DATE_PATTERN","isUpdateEventData","data","added","undefined","assertIsUpdateEventData","Error","TableSaver","csvEscapeString","str","concat","replace","constructor","props","_defineProperty","isCustomColumnFormatDefined","max","handlePortMessage","bind","handleSnapshotResolved","handleDownloadTimeout","state","gridRanges","gridRangeCounter","rangedSnapshotsTotal","rangedSnapshotCounter","includeColumnHeaders","useUnformattedValues","snapshotsTotal","snapshotCounter","snapshotsBuffer","Map","currentSnapshotIndex","snapshotPending","cancelableSnapshots","useBlobFallback","componentDidMount","getDownloadWorker","then","sw","info","postMessage","catch","error","warn","componentWillUnmount","removeIframe","streamTimeout","clearTimeout","snapshotHandlerTimeout","createWriterStream","port","useBlob","chunks","encode","TextEncoder","prototype","fileName","streamConfig","write","chunk","header","push","rows","close","blob","Blob","type","link","document","createElement","href","URL","createObjectURL","download","click","abort","cancel","end","WritableStream","startDownload","frozenTable","tableSubscription","snapshotRanges","modelRanges","isDownloading","downloadStartTime","Date","now","table","columns","columnsFromRanges","encodedFileName","encodeURIComponent","escape","messageChannel","MessageChannel","port1","fileWriter","getWriter","writeCsvTable","port2","onmessage","finishDownload","onDownloadCompleted","resetTableSaver","cancelDownload","_this$table","_this$tableSubscripti","_this$fileWriter","forEach","cancelable","onDownloadCanceled","chunkRows","writeTableHeader","_this$fileWriter2","headerString","i","length","name","startWriteTableBody","Math","floor","DOWNLOAD_CELL_CHUNK","map","range","endRow","startRow","ceil","reduce","total","snapshotCount","makeSnapshot","min","SNAPSHOT_BUFFER_SIZE","writeSnapshot","snapshotIndex","snapshotStartRow","snapshotEndRow","has","n","get","convertSnapshotIntoCsv","delete","updateDownloadProgress","debug2","size","onDownloadProgressUpdate","downloadProgress","estimateTime","snapshot","csvString","snapshotIterator","iterator","dh","formatter","hasNext","next","value","rowIdx","j","cellData","_snapshot$getData","getData","isDateType","i18n","DateTimeFormat","format","TimeZone","getTimeZone","timeZone","toString","hasCustomColumnFormat","getCachedCustomColumnFormatFlag","formatOverride","cellFormat","getFormat","formatString","getFormattedString","_this","currentGridRange","_loop","makeCancelable","RangeSet","ofRange","err","val","_ref","readableStreamPulling","makeIframe","setTimeout","STREAM_TIMEOUT","set","SNAPSHOT_HANDLER_TIMEOUT","src","iframe","hidden","body","appendChild","_this$iframe","remove","render"],"sources":["../../src/sidebar/TableSaver.tsx"],"sourcesContent":["import { PureComponent } from 'react';\nimport type { dh as DhType } from '@deephaven/jsapi-types';\nimport Log from '@deephaven/log';\nimport {\n type GridRange,\n type GridRangeIndex,\n memoizeClear,\n} from '@deephaven/grid';\nimport {\n type Formatter,\n FormatterUtils,\n TableUtils,\n} from '@deephaven/jsapi-utils';\nimport {\n type CancelablePromise,\n PromiseUtils,\n assertNotNull,\n} from '@deephaven/utils';\nimport IrisGridUtils from '../IrisGridUtils';\n\nconst log = Log.module('TableSaver');\n\nconst UNFORMATTED_DATE_PATTERN = `yyyy-MM-dd'T'HH:mm:ss.SSSSSSSSS z`;\n\ninterface TableSaverProps {\n dh: typeof DhType;\n getDownloadWorker: () => Promise<ServiceWorker>;\n isDownloading: boolean;\n onDownloadCompleted: () => void;\n onDownloadCanceled: () => void;\n onDownloadProgressUpdate: (\n progress: number,\n estimatedTime: number | null\n ) => void;\n formatter: Formatter;\n}\n\nfunction isUpdateEventData(\n data: DhType.TableData\n): data is DhType.SubscriptionTableData {\n return (data as DhType.SubscriptionTableData).added !== undefined;\n}\n\nfunction assertIsUpdateEventData(\n data: DhType.TableData\n): asserts data is DhType.SubscriptionTableData {\n if (!isUpdateEventData(data)) {\n throw new Error('event is not UpdateEventData');\n }\n}\n\nexport default class TableSaver extends PureComponent<\n TableSaverProps,\n Record<string, never>\n> {\n static DOWNLOAD_CELL_CHUNK = 6000;\n\n static SNAPSHOT_BUFFER_SIZE = 5;\n\n static STREAM_TIMEOUT = 8000;\n\n static SNAPSHOT_HANDLER_TIMEOUT = 5;\n\n static defaultProps = {\n isDownloading: false,\n onDownloadCompleted: (): void => undefined,\n onDownloadCanceled: (): void => undefined,\n onDownloadProgressUpdate: (): void => undefined,\n };\n\n static csvEscapeString(str: string): string {\n return `\"${str.replace(/\"/g, '\"\"')}\"`;\n }\n\n constructor(props: TableSaverProps) {\n super(props);\n\n this.handlePortMessage = this.handlePortMessage.bind(this);\n this.handleSnapshotResolved = this.handleSnapshotResolved.bind(this);\n this.handleDownloadTimeout = this.handleDownloadTimeout.bind(this);\n\n this.state = {};\n\n this.gridRanges = [];\n this.gridRangeCounter = 0;\n this.rangedSnapshotsTotal = [];\n this.rangedSnapshotCounter = 0;\n\n this.includeColumnHeaders = true;\n this.useUnformattedValues = false;\n\n this.snapshotsTotal = 0;\n this.snapshotCounter = 0;\n this.snapshotsBuffer = new Map();\n\n this.currentSnapshotIndex = 0;\n this.snapshotPending = 0;\n this.cancelableSnapshots = [];\n\n // Due to an open issue in Chromium, readableStream.cancel() is never called when a user cancel the stream from Chromium's UI and the stream goes on even it's canceled.\n // Instead, we monitor the pull() behavior from the readableStream called when the stream wants more data to write.\n // If the stream doesn't pull for long enough time, chances are the stream is already canceled, so we stop the stream.\n // Issue ticket on Chromium: https://bugs.chromium.org/p/chromium/issues/detail?id=638494\n\n this.useBlobFallback = false;\n }\n\n componentDidMount(): void {\n const { getDownloadWorker } = this.props;\n getDownloadWorker()\n .then(sw => {\n log.info('found active service worker');\n this.sw = sw;\n this.sw.postMessage('ping'); // just to activate the service worker\n })\n .catch(error => {\n // if service worker is not available, use blob as fallback to download table csv\n log.warn('Download csv is not optimized.', error);\n this.useBlobFallback = true;\n });\n }\n\n componentWillUnmount(): void {\n this.removeIframe();\n if (this.streamTimeout) clearTimeout(this.streamTimeout);\n if (this.snapshotHandlerTimeout) clearTimeout(this.snapshotHandlerTimeout);\n }\n\n sw?: ServiceWorker;\n\n port?: MessagePort;\n\n fileWriter?: WritableStreamDefaultWriter<unknown>;\n\n table?: DhType.Table;\n\n tableSubscription?: DhType.TableViewportSubscription;\n\n columns?: readonly DhType.Column[];\n\n fileName?: string;\n\n includeColumnHeaders: boolean;\n\n useUnformattedValues: boolean;\n\n chunkRows?: number;\n\n gridRanges: readonly GridRange[];\n\n gridRangeCounter?: number;\n\n rangedSnapshotsTotal: readonly number[];\n\n rangedSnapshotCounter?: number;\n\n snapshotsTotal: number;\n\n snapshotCounter: number;\n\n snapshotsBuffer: Map<number, DhType.SubscriptionTableData>;\n\n currentSnapshotIndex: number;\n\n snapshotPending: number;\n\n cancelableSnapshots: (CancelablePromise<unknown> | null)[];\n\n // Due to an open issue in Chromium, readableStream.cancel() is never called when a user cancel the stream from Chromium's UI and the stream goes on even it's canceled.\n // Instead, we monitor the pull() behavior from the readableStream called when the stream wants more data to write.\n // If the stream doesn't pull for long enough time, chances are the stream is already canceled, so we stop the stream.\n // Issue ticket on Chromium: https://bugs.chromium.org/p/chromium/issues/detail?id=638494\n streamTimeout?: ReturnType<typeof setTimeout>;\n\n snapshotHandlerTimeout?: ReturnType<typeof setTimeout>;\n\n downloadStartTime?: number;\n\n iframe?: HTMLIFrameElement;\n\n useBlobFallback: boolean;\n\n getCachedCustomColumnFormatFlag = memoizeClear(\n FormatterUtils.isCustomColumnFormatDefined,\n { max: 10000 }\n );\n\n createWriterStream(port: MessagePort): WritableStream<{\n rows?: string | undefined;\n header?: string | undefined;\n }> {\n // use blob fall back if it's safari\n const useBlob = this.useBlobFallback;\n const chunks = [] as BlobPart[];\n let encode: ((input?: string) => Uint8Array) | null = null;\n if (useBlob) {\n encode = TextEncoder.prototype.encode.bind(new TextEncoder());\n }\n const { fileName } = this;\n\n const streamConfig = {} as UnderlyingSink<{\n rows?: string | undefined;\n header?: string | undefined;\n }>;\n if (useBlob) {\n streamConfig.write = (chunk: { rows?: string; header?: string }) => {\n assertNotNull(encode);\n if (chunk.header !== undefined) {\n chunks.push(encode(chunk.header));\n }\n if (chunk.rows !== undefined) {\n chunks.push(encode(chunk.rows));\n }\n };\n streamConfig.close = () => {\n assertNotNull(fileName);\n const blob = new Blob(chunks, {\n type: 'application/octet-stream; charset=utf-8',\n });\n const link = document.createElement('a');\n link.href = URL.createObjectURL(blob);\n link.download = fileName;\n link.click();\n };\n streamConfig.abort = () => {\n port.postMessage({ cancel: true });\n port.close();\n };\n } else {\n streamConfig.write = (chunk: unknown) => {\n port.postMessage(chunk);\n };\n streamConfig.close = () => {\n port.postMessage({ end: true });\n port.close();\n };\n streamConfig.abort = () => {\n port.postMessage({ cancel: true });\n port.close();\n };\n }\n\n return new WritableStream(streamConfig);\n }\n\n startDownload(\n fileName: string,\n frozenTable: DhType.Table,\n tableSubscription: DhType.TableViewportSubscription,\n snapshotRanges: readonly GridRange[],\n modelRanges: readonly GridRange[],\n includeColumnHeaders: boolean,\n useUnformattedValues: boolean\n ): void {\n // don't trigger another download when a download is ongoing\n const { isDownloading } = this.props;\n if (isDownloading) {\n return;\n }\n\n this.downloadStartTime = Date.now();\n log.info(`start downloading ${fileName}`);\n\n this.table = frozenTable;\n this.columns = IrisGridUtils.columnsFromRanges(\n modelRanges,\n frozenTable.columns\n );\n this.tableSubscription = tableSubscription;\n this.gridRanges = snapshotRanges;\n this.includeColumnHeaders = includeColumnHeaders;\n this.useUnformattedValues = useUnformattedValues;\n\n // Make filename RFC5987 compatible\n const encodedFileName = encodeURIComponent(fileName.replace(/\\//g, ':'))\n .replace(/['()]/g, escape)\n .replace(/\\*/g, '%2A');\n\n const messageChannel = new MessageChannel();\n this.port = messageChannel.port1;\n this.fileName = fileName;\n this.fileWriter = this.createWriterStream(this.port).getWriter();\n\n // if the browser doesn't support stream or there's no active service worker, use blobs for table download\n if (this.useBlobFallback) {\n this.writeCsvTable(includeColumnHeaders);\n return;\n }\n\n if (this.sw) {\n // send file name and port to service worker\n this.sw.postMessage({ encodedFileName }, [messageChannel.port2]);\n }\n this.port.onmessage = this.handlePortMessage;\n }\n\n finishDownload(): void {\n if (this.table) {\n this.table.close();\n }\n if (this.tableSubscription) {\n this.tableSubscription.close();\n }\n if (this.fileWriter) {\n this.fileWriter.close();\n }\n\n const { onDownloadCompleted } = this.props;\n onDownloadCompleted();\n this.resetTableSaver();\n\n if (this.downloadStartTime !== undefined) {\n log.info(\n `download finished, total elapsed time ${\n (Date.now() - this.downloadStartTime) / 1000\n } seconds`\n );\n }\n }\n\n cancelDownload(): void {\n this.table?.close();\n this.tableSubscription?.close();\n this.fileWriter?.abort();\n\n this.cancelableSnapshots.forEach(cancelable => {\n if (cancelable) {\n cancelable.catch(() => null);\n cancelable.cancel();\n }\n });\n const { onDownloadCanceled } = this.props;\n onDownloadCanceled();\n this.resetTableSaver();\n }\n\n resetTableSaver(): void {\n this.table = undefined;\n this.tableSubscription = undefined;\n this.columns = undefined;\n this.chunkRows = undefined;\n this.removeIframe();\n\n this.gridRanges = [];\n this.gridRangeCounter = 0;\n this.rangedSnapshotsTotal = [];\n this.rangedSnapshotCounter = 0;\n\n this.includeColumnHeaders = true;\n this.useUnformattedValues = false;\n\n this.snapshotsTotal = 0;\n this.snapshotCounter = 0;\n this.snapshotsBuffer = new Map();\n\n this.currentSnapshotIndex = 0;\n this.snapshotPending = 0;\n this.cancelableSnapshots = [];\n\n if (this.streamTimeout != null) {\n clearTimeout(this.streamTimeout);\n }\n\n if (this.snapshotHandlerTimeout != null) {\n clearTimeout(this.snapshotHandlerTimeout);\n }\n this.streamTimeout = undefined;\n this.snapshotHandlerTimeout = undefined;\n }\n\n handleDownloadTimeout(): void {\n log.info('download canceled');\n this.cancelDownload();\n }\n\n writeTableHeader(): void {\n let headerString = '';\n if (this.columns) {\n for (let i = 0; i < this.columns.length; i += 1) {\n headerString += this.columns[i].name;\n headerString += i === this.columns.length - 1 ? '\\n' : ',';\n }\n }\n this.fileWriter?.write({ header: headerString }).then(() => null);\n }\n\n startWriteTableBody(): void {\n if (this.columns && this.gridRanges != null) {\n this.chunkRows = Math.floor(\n TableSaver.DOWNLOAD_CELL_CHUNK / this.columns.length\n );\n\n this.rangedSnapshotsTotal = this.gridRanges.map((range: GridRange) => {\n assertNotNull(range.endRow);\n assertNotNull(range.startRow);\n assertNotNull(this.chunkRows);\n\n return Math.ceil((range.endRow - range.startRow + 1) / this.chunkRows);\n });\n this.snapshotsTotal = this.rangedSnapshotsTotal.reduce(\n (total: number, snapshotCount: number) => total + snapshotCount\n );\n\n log.info(`start writing table, total snapshots: `, this.snapshotsTotal);\n\n this.makeSnapshot(\n Math.min(TableSaver.SNAPSHOT_BUFFER_SIZE, this.snapshotsTotal)\n );\n }\n }\n\n writeCsvTable(includeColumnHeaders: boolean): void {\n if (includeColumnHeaders) {\n this.writeTableHeader();\n }\n this.startWriteTableBody();\n }\n\n writeSnapshot(\n snapshotIndex: number,\n snapshotStartRow: GridRangeIndex,\n snapshotEndRow: GridRangeIndex\n ): void {\n if (this.currentSnapshotIndex === snapshotIndex && this.fileWriter) {\n while (this.snapshotsBuffer.has(this.currentSnapshotIndex)) {\n const n = this.snapshotsBuffer.get(this.currentSnapshotIndex);\n assertNotNull(n);\n this.fileWriter.write({\n rows: this.convertSnapshotIntoCsv(n),\n });\n this.snapshotsBuffer.delete(this.currentSnapshotIndex);\n this.currentSnapshotIndex += 1;\n\n this.updateDownloadProgress(snapshotIndex);\n }\n if (\n this.snapshotsTotal &&\n this.currentSnapshotIndex >= this.snapshotsTotal\n ) {\n this.finishDownload();\n return;\n }\n }\n\n if (\n this.snapshotCounter &&\n this.snapshotsTotal &&\n this.snapshotCounter < this.snapshotsTotal\n ) {\n log.debug2(\n `\n current range index: ${this.gridRangeCounter}, \n snapshotIndexCounter: ${this.snapshotCounter}, \n currentRangedSnapshotIndex : ${this.rangedSnapshotCounter}, \n snapshotpending: ${this.snapshotPending}, \n buffered ${this.snapshotsBuffer.size}\n making ${Math.min(\n TableSaver.SNAPSHOT_BUFFER_SIZE -\n this.snapshotsBuffer.size -\n this.snapshotPending,\n this.snapshotsTotal - this.snapshotCounter\n )} more snapshots\n `\n );\n this.makeSnapshot(\n Math.min(\n TableSaver.SNAPSHOT_BUFFER_SIZE -\n this.snapshotsBuffer.size -\n this.snapshotPending,\n this.snapshotsTotal - this.snapshotCounter\n )\n );\n }\n }\n\n updateDownloadProgress(snapshotIndex: GridRangeIndex): void {\n if (\n snapshotIndex != null &&\n this.snapshotsTotal != null &&\n this.downloadStartTime != null\n ) {\n const { onDownloadProgressUpdate } = this.props;\n const downloadProgress = Math.floor(\n (snapshotIndex * 100) / this.snapshotsTotal\n );\n const estimateTime =\n snapshotIndex > 1\n ? Math.floor(\n ((Date.now() - this.downloadStartTime) *\n (this.snapshotsTotal - snapshotIndex)) /\n snapshotIndex /\n 1000\n )\n : null;\n\n onDownloadProgressUpdate(downloadProgress, estimateTime);\n }\n }\n\n convertSnapshotIntoCsv(snapshot: DhType.SubscriptionTableData): string {\n let csvString = '';\n const snapshotIterator = snapshot.added.iterator();\n const { dh, formatter } = this.props;\n\n const rows = [];\n while (snapshotIterator.hasNext()) {\n rows.push(snapshotIterator.next().value);\n }\n\n assertNotNull(this.columns);\n\n const { useUnformattedValues } = this;\n for (let i = 0; i < rows.length; i += 1) {\n const rowIdx = rows[i];\n for (let j = 0; j < this.columns.length; j += 1) {\n const { type, name } = this.columns[j];\n let cellData = null;\n if (useUnformattedValues) {\n let value = snapshot.getData(rowIdx, this.columns[j]) ?? '';\n if (value !== '' && TableUtils.isDateType(type)) {\n // value is just a long value, we should return the value formatted as a full date string\n value = dh.i18n.DateTimeFormat.format(\n UNFORMATTED_DATE_PATTERN,\n value as number | Date | DhType.DateWrapper,\n dh.i18n.TimeZone.getTimeZone(formatter.timeZone)\n );\n }\n cellData = value.toString();\n } else {\n const hasCustomColumnFormat = this.getCachedCustomColumnFormatFlag(\n formatter,\n name,\n type\n );\n let formatOverride = null;\n if (!hasCustomColumnFormat) {\n const cellFormat = snapshot.getFormat(rowIdx, this.columns[j]);\n formatOverride =\n cellFormat?.formatString != null ? cellFormat : null;\n }\n if (formatOverride) {\n cellData = formatter.getFormattedString(\n snapshot.getData(rowIdx, this.columns[j]),\n type,\n name,\n formatOverride\n );\n } else {\n cellData = formatter.getFormattedString(\n snapshot.getData(rowIdx, this.columns[j]),\n type,\n name\n );\n }\n }\n csvString += TableSaver.csvEscapeString(cellData);\n csvString += j === this.columns.length - 1 ? '\\n' : ',';\n }\n }\n\n return csvString;\n }\n\n makeSnapshot(n: number): void {\n if (n <= 0) {\n return;\n }\n const { dh } = this.props;\n assertNotNull(this.gridRangeCounter);\n let i = 0;\n let currentGridRange = this.gridRanges[this.gridRangeCounter];\n\n assertNotNull(this.tableSubscription);\n assertNotNull(this.columns);\n while (i < n) {\n assertNotNull(currentGridRange);\n assertNotNull(currentGridRange.startRow);\n assertNotNull(currentGridRange.endRow);\n assertNotNull(this.rangedSnapshotCounter);\n assertNotNull(this.chunkRows);\n const snapshotStartRow =\n currentGridRange.startRow + this.rangedSnapshotCounter * this.chunkRows;\n const snapshotEndRow = Math.min(\n snapshotStartRow + this.chunkRows - 1,\n currentGridRange.endRow\n );\n\n const snapshotIndex = this.snapshotCounter;\n this.cancelableSnapshots.push(\n PromiseUtils.makeCancelable(\n this.tableSubscription\n .snapshot(\n dh.RangeSet.ofRange(snapshotStartRow, snapshotEndRow),\n this.columns as DhType.Column[]\n )\n .then(snapshot => {\n assertIsUpdateEventData(snapshot);\n this.handleSnapshotResolved(\n snapshot,\n snapshotIndex,\n snapshotStartRow,\n snapshotEndRow\n );\n\n return snapshotIndex;\n })\n .catch(err => {\n log.error(err);\n }),\n val => {\n log.info(`snapshot ${val} has been canceled`);\n }\n )\n );\n\n this.rangedSnapshotCounter += 1;\n this.snapshotCounter += 1;\n this.snapshotPending += 1;\n\n if (\n this.rangedSnapshotCounter >=\n this.rangedSnapshotsTotal[this.gridRangeCounter]\n ) {\n this.gridRangeCounter += 1;\n this.rangedSnapshotCounter = 0;\n currentGridRange = this.gridRanges[this.gridRangeCounter];\n }\n i += 1;\n }\n }\n\n handlePortMessage({\n data,\n }: MessageEvent<{\n download: unknown;\n readableStreamPulling: unknown;\n }>): void {\n const { download, readableStreamPulling } = data;\n if (this.useBlobFallback) {\n return;\n }\n if (download != null) {\n const { includeColumnHeaders } = this;\n this.makeIframe(`${download}`);\n this.writeCsvTable(includeColumnHeaders);\n }\n if (readableStreamPulling != null) {\n if (!this.useBlobFallback) {\n if (this.streamTimeout != null) {\n clearTimeout(this.streamTimeout);\n }\n this.streamTimeout = setTimeout(\n this.handleDownloadTimeout,\n TableSaver.STREAM_TIMEOUT\n );\n }\n }\n }\n\n handleSnapshotResolved(\n snapshot: DhType.SubscriptionTableData,\n snapshotIndex: number,\n snapshotStartRow: GridRangeIndex,\n snapshotEndRow: GridRangeIndex\n ): void {\n // use time out to break writeSnapshot into an individual task in browser with timeout, so there's window for the browser to update table in needed.\n this.snapshotHandlerTimeout = setTimeout(() => {\n this.snapshotsBuffer.set(snapshotIndex, snapshot);\n this.snapshotPending -= 1;\n this.writeSnapshot(snapshotIndex, snapshotStartRow, snapshotEndRow);\n this.cancelableSnapshots[snapshotIndex] = null;\n }, TableSaver.SNAPSHOT_HANDLER_TIMEOUT);\n }\n\n makeIframe(src: string): void {\n // make a return value and make it static method\n const iframe = document.createElement('iframe');\n iframe.hidden = true;\n iframe.src = src;\n iframe.name = 'iframe';\n document.body.appendChild(iframe);\n this.iframe = iframe;\n }\n\n removeIframe(): void {\n this.iframe?.remove();\n this.iframe = undefined;\n }\n\n render(): null {\n return null;\n }\n}\n"],"mappings":";;;AAAA,SAASA,aAAa,QAAQ,OAAO;AAErC,OAAOC,GAAG,MAAM,gBAAgB;AAChC,SAGEC,YAAY,QACP,iBAAiB;AACxB,SAEEC,cAAc,EACdC,UAAU,QACL,wBAAwB;AAC/B,SAEEC,YAAY,EACZC,aAAa,QACR,kBAAkB;AAAC,OACnBC,aAAa;AAEpB,IAAMC,GAAG,GAAGP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AI;AAAAO,eAAA,CAJdP,UAAU,0BAMC,CAAC;AAAAO,eAAA,CANZP,UAAU,oBAQL,IAAI;AAAAO,eAAA,CARTP,UAAU,8BAUK,CAAC;AAAAO,eAAA,CAVhBP,UAAU,kBAYP;EACpB8E,aAAa,EAAE,KAAK;EACpBmB,mBAAmB,EAAEA,CAAA,KAAYpG,SAAS;EAC1C4G,kBAAkB,EAAEA,CAAA,KAAY5G,SAAS;EACzC+I,wBAAwB,EAAEA,CAAA,KAAY/I;AACxC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"sourceRoot":"","sources":["../../../../../node_modules/@deephaven/components/scss/custom.scss","../../../../../node_modules/@deephaven/components/scss/bootstrap_overrides.scss","../../../src/sidebar/aggregations/AggregationEdit.scss","../../../../../node_modules/@deephaven/components/scss/new_variables.scss"],"names":[],"mappings":"AAAA;AC6LA;AC3LA;EACE;EACA;EACA;;AAEA;EACE,kBDgBO;ECfP;;AAEE;EACE,aCPG;EDQH,gBCRG;;ADUH;EACE;;AAGJ;EACE;;AAIJ;EACE,ODPK;;ACSL;EACE,ODSK;;ACLX;EACE;;AAEA;EACE;;AAEA;EACE,cClCG;EDmCH,eCnCG;EDoCH;;AAGE;EACE;EACA;;AAIJ;EACE;EACA;;AAEA;EACE;EACA,cCnDD;EDoDC,eCpDD;EDqDC;EACA,eDgGI;EC/FJ,eCvDD;EDwDC;;AAGF;AAAA;EAEE;EACA","file":"AggregationEdit.css","sourcesContent":["/* stylelint-disable scss/at-import-no-partial-leading-underscore */\n// Consumers should be able to resolve bootstrap/ to node_modules/bootstrap\n\n//Make bootstrap functions available for use in overrides\n@import 'bootstrap/scss/_functions.scss';\n@import './bootstrap_overrides.scss';\n\n//_variable imports come after bootstrap default overrides,\n// makes all other variables and mixins from bootstrap available\n/// with just importing customer.scss\n@import 'bootstrap/scss/_variables.scss';\n@import 'bootstrap/scss/_mixins.scss';\n\n//New variables come after imports\n@import './new_variables.scss';\n@import './util.scss';\n","// Styling overrides for bootstrap\n@use 'sass:map';\n\n// Override / set color variables\n$red: var(--dh-color-visual-red);\n$orange: var(--dh-color-visual-orange);\n$yellow: var(--dh-color-visual-yellow);\n$green: var(--dh-color-visual-green);\n$blue: var(--dh-color-visual-blue);\n$purple: var(--dh-color-visual-purple);\n\n// Fallback colors are used if theme isn't loaded\n// this is required for error messages if the API doesn't load\n\n//Define our Gray scale\n$gray-100: var(--dh-color-gray-900, #fcfcfa);\n$gray-200: var(--dh-color-gray-800);\n$gray-300: var(--dh-color-gray-700);\n$gray-400: var(--dh-color-gray-600);\n$gray-500: var(--dh-color-gray-500);\n// intentional duplicate, scale doesn't line up otherwise\n// as we have gray-850 and spectrum doesn't and it is needed\n$gray-600: var(--dh-color-gray-500);\n$gray-700: var(--dh-color-gray-400);\n$gray-800: var(--dh-color-gray-300);\n$gray-850: var(--dh-color-gray-200);\n$gray-900: var(--dh-color-gray-75);\n$black: var(--dh-color-black, #1a171a);\n$white: var(--dh-color-white, #f0f0ee);\n\n//Define some UI colors\n$interfacegray: var(--dh-color-content-bg, #2d2a2e);\n$interfaceblue: var(--dh-color-accent-bg);\n$interfacewhite: $white;\n$interfaceblack: $black;\n$content-bg: var(--dh-color-content-bg, #2d2a2e);\n$background: var(--dh-color-bg, #1a171a);\n$foreground: var(--dh-color-fg, #f0f0ee);\n\n// Extend default Bootstrap $grays map\n$grays-custom: (\n '850': $gray-850,\n);\n$grays: () !default;\n$grays: map-merge($grays, $grays-custom);\n\n// Extend default Bootstrap $colors map\n$colors-custom: (\n 'black': $black,\n);\n$colors: () !default;\n$colors: map-merge($colors, $colors-custom);\n\n// Override default Bootstrap $theme-colors map by mapping each key to itself.\n// These will then be re-mapped inside of `button-outline-variant` and\n// `button-outline-variant` mixins in `bootstrap_override_mixins_buttons.scss`\n$theme-colors-self-map: ();\n@each $key\n in (\n 'primary',\n 'secondary',\n 'success',\n 'info',\n 'warning',\n 'danger',\n 'light',\n 'dark'\n )\n{\n $theme-colors-self-map: map.set($theme-colors-self-map, $key, $key);\n}\n$theme-colors: () !default;\n$theme-colors: map-merge($theme-colors, $theme-colors-self-map);\n\n// Used by bootstrap_override_mixins_buttons.scss to map Bootstrap colors to\n// DH semantic colors\n$bootstrap-dh-semantic-map: (\n 'primary': 'accent',\n 'secondary': 'neutral',\n 'success': 'positive',\n 'info': 'info',\n 'warning': 'notice',\n 'danger': 'negative',\n // We shouldn't be using these, but mapping so they work with our custom\n // `color-yiq` mixin. If we find a way to remove $light + $dark that are\n // defined in Bootstrap _variables.scss, we should remove these\n 'light': 'neutral',\n 'dark': 'neutral',\n);\n\n//Set default colors\n$body-bg: $black;\n$body-color: $interfacewhite;\n\n// Set brand colors\n$primary: var(--dh-color-accent-bg);\n$primary-hover: var(--dh-color-accent-hover-bg);\n$primary-dark: var(--dh-color-accent-down-bg);\n$secondary: var(--dh-color-neutral-bg);\n$secondary-hover: var(--dh-color-neutral-hover-bg);\n$success: $green;\n$info: $yellow;\n$warning: $orange;\n$danger: var(--dh-color-negative-bg);\n$danger-hover: var(--dh-color-negative-hover-bg);\n// We really don't want to use $light or $dark variables, but Bootstrap defines\n// them in _variables.scss. Explicitly setting them to ensure we are in control\n// of their values. If we can find a way to remove them, we should\n$light: var(--dh-color-gray-light);\n$dark: var(--dh-color-gray-dark);\n// Bootstrap doesn't define $mid, and we want to move away from this particular\n// semantic. Should be deleted by #1635\n$mid: var(--dh-color-gray-mid);\n\n$semantic-colors: (\n 'primary-hover': $primary-hover,\n 'primary-dark': $primary-dark,\n 'mid': $mid,\n 'content-bg': $interfacegray,\n 'background': $interfaceblack,\n 'foreground': $interfacewhite,\n 'secondary-hover': $secondary-hover,\n 'danger-hover': $danger-hover,\n);\n\n$component-active-bg: $primary;\n$theme-color-interval: 9%;\n$yiq-contrasted-threshold: 180;\n\n// Override fonts\n$font-family-sans-serif:\n 'Fira Sans',\n -apple-system,\n blinkmacsystemfont,\n 'Segoe UI',\n 'Roboto',\n 'Helvetica Neue',\n arial,\n sans-serif; //fira sans then native system ui fallbacks\n$font-family-monospace: 'Fira Mono', menlo, monaco, consolas, 'Liberation Mono',\n 'Courier New', monospace;\n$font-family-base: $font-family-sans-serif;\n\n$headings-font-weight: 400;\n\n//Text overides\n$text-muted: $gray-400;\n\n//Style Selection highlight color\n$text-select-color: var(--dh-color-text-highlight);\n\n//Grid variables, same value as default just making easily accessible\n$grid-gutter-width: 30px;\n\n//Visual Overrides\n$border-radius: 4px;\n$box-shadow: 0 0.1rem 1rem var(--dh-color-dropshadow);\n\n//Override Btn\n$btn-border-radius: 4rem;\n$btn-padding-x: 1.5rem;\n$btn-transition:\n color 0.12s ease-in-out,\n background-color 0.12s ease-in-out,\n border-color 0.12s ease-in-out,\n box-shadow 0.12s ease-in-out; //default 0.15 is too long\n$btn-border-width: 2px;\n$btn-font-weight: var(--spectrum-global-font-weight-bold);\n$btn-line-height: 1.3;\n\n//Override Inputs\n$input-bg: var(--dh-color-input-bg);\n$input-disabled-bg: var(--dh-color-input-disabled-bg);\n$input-color: var(--dh-color-input-fg);\n$input-border-color: var(--dh-color-input-border);\n$input-placeholder-color: var(--dh-color-input-placeholder);\n$input-focus-border-color: var(--dh-color-input-focus-border);\n\n$input-btn-focus-width: 0.2rem;\n$input-btn-focus-color: color-mix(\n in srgb,\n var(--dh-color-accent) 35%,\n transparent\n);\n$input-btn-focus-box-shadow: 0 0 0 $input-btn-focus-width $input-btn-focus-color;\n$input-btn-line-height: 1.3;\n// Bootstrap uses a calc expression to determine the input height (calc(line-height + 2*padding-y + border)).\n// The padding-y value has to be in rem to match units as it is a SASS calc.\n// Using 0.42145rem with 1.3 line height gets us to spectrum's 32px.\n/* stylelint-disable-next-line number-max-precision */\n$input-btn-padding-y: 0.42145rem;\n\n//checkbox\n$custom-control-indicator-bg: var(--dh-color-input-bg);\n$custom-control-indicator-border-color: var(--dh-color-input-border);\n$custom-checkbox-indicator-border-radius: 2px;\n$custom-control-indicator-border-width: 2px;\n$custom-control-indicator-active-bg: var(--dh-color-input-bg);\n$custom-control-indicator-active-border-color: var(--dh-color-input-fg);\n$custom-control-indicator-checked-bg: var(--dh-color-input-fg);\n$custom-control-indicator-checked-color: black; // used as mask fill color\n$custom-checkbox-indicator-indeterminate-bg: var(--dh-color-input-fg);\n$custom-control-indicator-bg-size: 75% 75%;\n$custom-control-indicator-disabled-bg: var(--dh-color-input-disabled-bg);\n$custom-control-indicator-checked-disabled-bg: var(\n --dh-color-input-disabled-bg\n);\n$custom-control-label-disabled-color: var(--dh-color-input-disabled-fg);\n\n// The $custom-select-indicator variable is used by Bootstrap to provide the\n// icon for the select dropdown. Inline svgs can't use CSS variables, so we hard\n// code the color to #929192 (the default value of --dh-color-gray-600). PR #1651\n// overrides this icon altogether for known dropdowns, so technically we may not\n// need this, but it's here in case there are any remaining instances.\n$custom-select-indicator-color: #929192;\n$custom-select-bg: var(--dh-color-selector-bg);\n$custom-select-bg-size: 16px 16px;\n//dhSort icon encoded\n$custom-select-indicator: str-replace(\n url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='#{$custom-select-indicator-color}' d='M4 7l-.4-.8 4-3.7h.8l4 3.7-.4.8H4zm0 2l-.4.8 4 3.7h.8l4-3.7L12 9H4z'/%3E%3C/svg%3E\"),\n '#',\n '%23'\n);\n$custom-select-focus-box-shadow: $input-btn-focus-box-shadow;\n$custom-select-disabled-color: $gray-500;\n$custom-select-disabled-bg: $gray-800;\n\n//modal\n$modal-content-bg: $content-bg;\n$modal-content-border-width: 0;\n$modal-md: 550px;\n$close-color: var(--dh-color-text);\n$close-text-shadow: none;\n\n// Toast notification\n$toast-bg: var(--dh-color-accent-100);\n$toast-color: var(--dh-color-text);\n$toast-error-bg: var(--dh-color-negative-bg);\n$toast-error-color: var(--dh-color-text);\n\n//tooltips\n$tooltip-bg: var(--dh-color-tooltip-bg);\n$tooltip-color: var(--dh-color-tooltip-fg);\n$tooltip-box-shadow: 0 0.1rem 1.5rem 0.1rem var(--dh-color-tooltip-box-shadow);\n\n//drowdowns\n$dropdown-bg: $gray-600;\n$dropdown-link-color: $foreground;\n$dropdown-link-hover-color: $foreground;\n$dropdown-link-hover-bg: var(--dh-color-item-list-hover-bg);\n$dropdown-divider-bg: $gray-700;\n\n//context menus\n$contextmenu-bg: var(--dh-color-popover-bg);\n$contextmenu-color: var(--dh-color-text);\n$contextmenu-disabled-color: var(--dh-color-input-disabled-fg);\n$contextmenu-keyboard-selected-bg: var(--dh-color-keyboard-selected-bg);\n$contextmenu-selected-bg: var(--dh-color-item-list-hover-bg);\n$contextmenu-selected-color: var(--dh-color-item-list-selected-fg);\n\n//hr\n$hr-border-color: var(--dh-color-hr);\n\n//links\n$link-color: $gray-400;\n$link-hover-color: $foreground;\n\n//progress-bar\n$progress-bg: $gray-600;\n$progress-border-radius: 1rem;\n\n// Set global options\n$enable-shadows: false;\n$enable-gradients: false;\n$enable-print-styles: false; //I don't think anyone should expect to \"print\" this app.\n\n// Transition times\n$transition: 0.15s;\n$transition-mid: 0.2s;\n$transition-long: 0.3s;\n$transition-slow: 0.6s;\n\n//form-validation icon, uses vsWarning icon encoded here as svg\n$form-feedback-icon-invalid-color: $danger;\n$form-feedback-icon-invalid: str-replace(\n url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cg fill='none'%3E%3Cg fill='#{$form-feedback-icon-invalid-color}'%3E%3Cpath d='M7.56 1h.88l6.54 12.26-.44.74H1.44L1 13.26 7.56 1zM8 2.28 2.28 13H13.7L8 2.28zM8.625 12v-1h-1.25v1h1.25zm-1.25-2V6h1.25v4h-1.25z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E \"),\n '#',\n '%23'\n);\n\n// This section of variables is not consumed directly by DH, but they need to be\n// defined for sass to compile _variables\n$table-dark-bg: $gray-800;\n$table-dark-accent-bg: var(--dh-color-highlight-hover);\n$table-dark-hover-bg: var(--dh-color-highlight-active);\n$table-dark-border-color: $gray-700;\n$popover-bg: var(--dh-color-tooltip-bg);\n$popover-border-color: var(--dh-color-overlay-modal-bg);\n$popover-header-bg: #000;\n$popover-arrow-outer-color: var(--dh-color-dropshadow);\n$custom-range-thumb-active-bg: var(--dh-color-accent-1100);\n","@import '@deephaven/components/scss/custom.scss';\n\n.aggregation-edit {\n display: flex;\n flex-direction: column;\n height: 100%;\n\n .top-menu {\n background-color: $gray-800;\n padding: 0 $spacer-2;\n .form-inline {\n .custom-control {\n padding-top: $spacer-2;\n padding-bottom: $spacer-2;\n\n label {\n justify-content: left;\n }\n }\n .spacer {\n flex-grow: 1;\n }\n }\n\n .btn-link-icon {\n color: $gray-400;\n\n &.active {\n color: $foreground;\n }\n }\n }\n .aggregation-edit-item-list {\n flex-grow: 1;\n\n .item-list-scroll-pane {\n border: none;\n\n .item-list-item {\n padding-left: $spacer-2;\n padding-right: $spacer-2;\n display: flex;\n\n &:hover {\n label {\n background-color: var(--dh-color-item-list-hover-bg);\n color: var(--dh-color-item-list-selected-fg);\n }\n }\n\n .custom-control {\n flex-grow: 1;\n display: flex;\n\n label {\n padding-top: 1px;\n padding-left: $spacer-2;\n padding-right: $spacer-2;\n flex-grow: 1;\n border-radius: $border-radius;\n margin-bottom: $spacer-2;\n border: $input-border-width solid transparent;\n }\n\n &:focus-within label,\n input[type='checkbox']:active + label {\n background-color: var(--dh-color-item-list-selected-bg);\n color: var(--dh-color-item-list-selected-fg);\n }\n }\n }\n }\n }\n}\n","@use 'sass:math';\n\n//Set of spacer variables from the spacer map\n$spacer-0: map-get($spacers, 0); //0\n$spacer-1: map-get($spacers, 1);\n$spacer-2: map-get($spacers, 2);\n$spacer-3: map-get($spacers, 3);\n$spacer-4: map-get($spacers, 4);\n$spacer-5: map-get($spacers, 5);\n\n//Marching Ants for golden layout dropzone and drag and drop\n//top bottom, left right.\n//create 4 background images that are 50% color 1, 50% color 2 using graidents, two veritical, two horizontal\n//size them to ant-size and thickness\n//position those images along the egdes and make top/bottom repeat-x and left/right repeat-y\n//then offest each of those background positions by ant-size in animation to make them march.\n$ant-size: 8px;\n$ant-thickness: 1px;\n\n@mixin ants-base($color-1: black, $color-2: white) {\n background-image: linear-gradient(to right, $color-2 50%, $color-1 50%),\n linear-gradient(to right, $color-2 50%, $color-1 50%),\n linear-gradient(to bottom, $color-2 50%, $color-1 50%),\n linear-gradient(to bottom, $color-2 50%, $color-1 50%);\n background-size:\n $ant-size $ant-thickness,\n $ant-size $ant-thickness,\n $ant-thickness $ant-size,\n $ant-thickness $ant-size;\n background-position:\n 0 top,\n 0 bottom,\n left 0,\n right 0;\n background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;\n animation: march 0.5s;\n animation-timing-function: linear;\n animation-iteration-count: infinite;\n}\n\n@mixin drag-stack($pseudo-element) {\n &::#{$pseudo-element} {\n content: ' ';\n background: $primary;\n box-shadow: $box-shadow;\n border-radius: $border-radius;\n position: absolute;\n height: 100%;\n width: 100%;\n @content;\n }\n}\n\n$focus-bg-transparency: 12%;\n$hover-bg-transparency: 14%;\n$active-bg-transparency: 28%;\n$exception-transparency: 28%;\n"]}
1
+ {"version":3,"sourceRoot":"","sources":["../../../../../node_modules/@deephaven/components/scss/custom.scss","../../../../../node_modules/@deephaven/components/scss/bootstrap_overrides.scss","../../../src/sidebar/aggregations/AggregationEdit.scss","../../../../../node_modules/@deephaven/components/scss/new_variables.scss"],"names":[],"mappings":"AAAA;AC6LA;AC3LA;EACE;EACA;EACA;;AAEA;EACE,kBDgBO;ECfP;;AAEE;EACE,aCPG;EDQH,gBCRG;;ADUH;EACE;;AAGJ;EACE;;AAIJ;EACE,ODPK;;ACSL;EACE,ODSK;;ACLX;EACE;;AAEA;EACE;;AAEA;EACE,cClCG;EDmCH,eCnCG;EDoCH;;AAGE;EACE;EACA;;AAIJ;EACE;EACA;;AAEA;EACE;EACA,cCnDD;EDoDC,eCpDD;EDqDC;EACA,eDgGI;EC/FJ,eCvDD;EDwDC;;AAGF;AAAA;EAEE;EACA","file":"AggregationEdit.css","sourcesContent":["/* stylelint-disable scss/at-import-no-partial-leading-underscore */\n// Consumers should be able to resolve bootstrap/ to node_modules/bootstrap\n\n//Make bootstrap functions available for use in overrides\n@import 'bootstrap/scss/_functions.scss';\n@import './bootstrap_overrides.scss';\n\n//_variable imports come after bootstrap default overrides,\n// makes all other variables and mixins from bootstrap available\n/// with just importing customer.scss\n@import 'bootstrap/scss/_variables.scss';\n@import 'bootstrap/scss/_mixins.scss';\n\n//New variables come after imports\n@import './new_variables.scss';\n@import './util.scss';\n","// Styling overrides for bootstrap\n@use 'sass:map';\n\n// Override / set color variables\n$red: var(--dh-color-visual-red);\n$orange: var(--dh-color-visual-orange);\n$yellow: var(--dh-color-visual-yellow);\n$green: var(--dh-color-visual-green);\n$blue: var(--dh-color-visual-blue);\n$purple: var(--dh-color-visual-purple);\n\n// Fallback colors are used if theme isn't loaded\n// this is required for error messages if the API doesn't load\n\n//Define our Gray scale\n$gray-100: var(--dh-color-gray-900, #fcfcfa);\n$gray-200: var(--dh-color-gray-800);\n$gray-300: var(--dh-color-gray-700);\n$gray-400: var(--dh-color-gray-600);\n$gray-500: var(--dh-color-gray-500);\n// intentional duplicate, scale doesn't line up otherwise\n// as we have gray-850 and spectrum doesn't and it is needed\n$gray-600: var(--dh-color-gray-500);\n$gray-700: var(--dh-color-gray-400);\n$gray-800: var(--dh-color-gray-300);\n$gray-850: var(--dh-color-gray-200);\n$gray-900: var(--dh-color-gray-75);\n$black: var(--dh-color-black, #1a171a);\n$white: var(--dh-color-white, #f0f0ee);\n\n//Define some UI colors\n$interfacegray: var(--dh-color-content-bg, #2d2a2e);\n$interfaceblue: var(--dh-color-accent-bg);\n$interfacewhite: $white;\n$interfaceblack: $black;\n$content-bg: var(--dh-color-content-bg, #2d2a2e);\n$background: var(--dh-color-bg, #1a171a);\n$foreground: var(--dh-color-fg, #f0f0ee);\n\n// Extend default Bootstrap $grays map\n$grays-custom: (\n '850': $gray-850,\n);\n$grays: () !default;\n$grays: map-merge($grays, $grays-custom);\n\n// Extend default Bootstrap $colors map\n$colors-custom: (\n 'black': $black,\n);\n$colors: () !default;\n$colors: map-merge($colors, $colors-custom);\n\n// Override default Bootstrap $theme-colors map by mapping each key to itself.\n// These will then be re-mapped inside of `button-outline-variant` and\n// `button-outline-variant` mixins in `bootstrap_override_mixins_buttons.scss`\n$theme-colors-self-map: ();\n@each $key\n in (\n 'primary',\n 'secondary',\n 'success',\n 'info',\n 'warning',\n 'danger',\n 'light',\n 'dark'\n )\n{\n $theme-colors-self-map: map.set($theme-colors-self-map, $key, $key);\n}\n$theme-colors: () !default;\n$theme-colors: map-merge($theme-colors, $theme-colors-self-map);\n\n// Used by bootstrap_override_mixins_buttons.scss to map Bootstrap colors to\n// DH semantic colors\n$bootstrap-dh-semantic-map: (\n 'primary': 'accent',\n 'secondary': 'neutral',\n 'success': 'positive',\n 'info': 'info',\n 'warning': 'notice',\n 'danger': 'negative',\n // We shouldn't be using these, but mapping so they work with our custom\n // `color-yiq` mixin. If we find a way to remove $light + $dark that are\n // defined in Bootstrap _variables.scss, we should remove these\n 'light': 'neutral',\n 'dark': 'neutral',\n);\n\n//Set default colors\n$body-bg: $black;\n$body-color: $interfacewhite;\n\n// Set brand colors\n$primary: var(--dh-color-accent-bg);\n$primary-hover: var(--dh-color-accent-hover-bg);\n$primary-dark: var(--dh-color-accent-down-bg);\n$secondary: var(--dh-color-neutral-bg);\n$secondary-hover: var(--dh-color-neutral-hover-bg);\n$success: $green;\n$info: $yellow;\n$warning: $orange;\n$danger: var(--dh-color-negative-bg);\n$danger-hover: var(--dh-color-negative-hover-bg);\n// We really don't want to use $light or $dark variables, but Bootstrap defines\n// them in _variables.scss. Explicitly setting them to ensure we are in control\n// of their values. If we can find a way to remove them, we should\n$light: var(--dh-color-gray-light);\n$dark: var(--dh-color-gray-dark);\n// Bootstrap doesn't define $mid, and we want to move away from this particular\n// semantic. Should be deleted by #1635\n$mid: var(--dh-color-gray-mid);\n\n$semantic-colors: (\n 'primary-hover': $primary-hover,\n 'primary-dark': $primary-dark,\n 'mid': $mid,\n 'content-bg': $interfacegray,\n 'background': $interfaceblack,\n 'foreground': $interfacewhite,\n 'secondary-hover': $secondary-hover,\n 'danger-hover': $danger-hover,\n);\n\n$component-active-bg: $primary;\n$theme-color-interval: 9%;\n$yiq-contrasted-threshold: 180;\n\n// Override fonts\n$font-family-sans-serif:\n 'Fira Sans',\n -apple-system,\n blinkmacsystemfont,\n 'Segoe UI',\n 'Roboto',\n 'Helvetica Neue',\n arial,\n sans-serif; //fira sans then native system ui fallbacks\n$font-family-monospace: 'Fira Mono', menlo, monaco, consolas, 'Liberation Mono',\n 'Courier New', monospace;\n$font-family-base: $font-family-sans-serif;\n\n$headings-font-weight: 400;\n\n//Text overides\n$text-muted: $gray-400;\n\n//Style Selection highlight color\n$text-select-color: var(--dh-color-text-highlight);\n\n//Grid variables, same value as default just making easily accessible\n$grid-gutter-width: 30px;\n\n//Visual Overrides\n$border-radius: 4px;\n$box-shadow: 0 0.1rem 1rem var(--dh-color-dropshadow);\n\n//Override Btn\n$btn-border-radius: 4rem;\n$btn-padding-x: 1.5rem;\n$btn-transition:\n color 0.12s ease-in-out,\n background-color 0.12s ease-in-out,\n border-color 0.12s ease-in-out,\n box-shadow 0.12s ease-in-out; //default 0.15 is too long\n$btn-border-width: 2px;\n$btn-font-weight: var(--spectrum-global-font-weight-bold);\n$btn-line-height: 1.3;\n\n//Override Inputs\n$input-bg: var(--dh-color-input-bg);\n$input-disabled-bg: var(--dh-color-input-disabled-bg);\n$input-color: var(--dh-color-input-fg);\n$input-border-color: var(--dh-color-input-border);\n$input-placeholder-color: var(--dh-color-input-placeholder);\n$input-focus-border-color: var(--dh-color-input-focus-border);\n\n$input-btn-focus-width: 0.2rem;\n$input-btn-focus-color: color-mix(\n in srgb,\n var(--dh-color-accent) 35%,\n transparent\n);\n$input-btn-focus-box-shadow: 0 0 0 $input-btn-focus-width $input-btn-focus-color;\n$input-btn-line-height: 1.3;\n// Bootstrap uses a calc expression to determine the input height (calc(line-height + 2*padding-y + border)).\n// The padding-y value has to be in rem to match units as it is a SASS calc.\n// Using 0.42145rem with 1.3 line height gets us to spectrum's 32px.\n/* stylelint-disable-next-line number-max-precision */\n$input-btn-padding-y: 0.42145rem;\n\n//checkbox\n$custom-control-indicator-bg: var(--dh-color-input-bg);\n$custom-control-indicator-border-color: var(--dh-color-input-border);\n$custom-checkbox-indicator-border-radius: 2px;\n$custom-control-indicator-border-width: 2px;\n$custom-control-indicator-active-bg: var(--dh-color-input-bg);\n$custom-control-indicator-active-border-color: var(--dh-color-input-fg);\n$custom-control-indicator-checked-bg: var(--dh-color-input-fg);\n$custom-control-indicator-checked-color: black; // used as mask fill color\n$custom-checkbox-indicator-indeterminate-bg: var(--dh-color-input-fg);\n$custom-control-indicator-bg-size: 75% 75%;\n$custom-control-indicator-disabled-bg: var(--dh-color-input-disabled-bg);\n$custom-control-indicator-checked-disabled-bg: var(\n --dh-color-input-disabled-bg\n);\n$custom-control-label-disabled-color: var(--dh-color-input-disabled-fg);\n\n// The $custom-select-indicator variable is used by Bootstrap to provide the\n// icon for the select dropdown. Inline svgs can't use CSS variables, so we hard\n// code the color to #929192 (the default value of --dh-color-gray-600). PR #1651\n// overrides this icon altogether for known dropdowns, so technically we may not\n// need this, but it's here in case there are any remaining instances.\n$custom-select-indicator-color: #929192;\n$custom-select-bg: var(--dh-color-selector-bg);\n$custom-select-bg-size: 16px 16px;\n//dhSort icon encoded\n$custom-select-indicator: str-replace(\n url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='#{$custom-select-indicator-color}' d='M4 7l-.4-.8 4-3.7h.8l4 3.7-.4.8H4zm0 2l-.4.8 4 3.7h.8l4-3.7L12 9H4z'/%3E%3C/svg%3E\"),\n '#',\n '%23'\n);\n$custom-select-focus-box-shadow: $input-btn-focus-box-shadow;\n$custom-select-disabled-color: $gray-500;\n$custom-select-disabled-bg: $gray-800;\n\n//modal\n$modal-content-bg: $content-bg;\n$modal-content-border-width: 0;\n$modal-md: 550px;\n$close-color: var(--dh-color-text);\n$close-text-shadow: none;\n\n// Toast notification\n$toast-bg: var(--dh-color-accent-100);\n$toast-color: var(--dh-color-text);\n$toast-error-bg: var(--dh-color-negative-bg);\n$toast-error-color: var(--dh-color-text);\n\n//tooltips\n$tooltip-bg: var(--dh-color-tooltip-bg);\n$tooltip-color: var(--dh-color-tooltip-fg);\n$tooltip-box-shadow: 0 0.1rem 1.5rem 0.1rem var(--dh-color-tooltip-box-shadow);\n\n//drowdowns\n$dropdown-bg: $gray-600;\n$dropdown-link-color: $foreground;\n$dropdown-link-hover-color: $foreground;\n$dropdown-link-hover-bg: var(--dh-color-item-list-hover-bg);\n$dropdown-divider-bg: $gray-700;\n\n//context menus\n$contextmenu-bg: var(--dh-color-popover-bg);\n$contextmenu-color: var(--dh-color-text);\n$contextmenu-disabled-color: var(--dh-color-text-disabled);\n$contextmenu-keyboard-selected-bg: var(--dh-color-keyboard-selected-bg);\n$contextmenu-selected-bg: var(--dh-color-item-list-hover-bg);\n$contextmenu-selected-color: var(--dh-color-item-list-selected-fg);\n\n//hr\n$hr-border-color: var(--dh-color-hr);\n\n//links\n$link-color: $gray-400;\n$link-hover-color: $foreground;\n\n//progress-bar\n$progress-bg: $gray-600;\n$progress-border-radius: 1rem;\n\n// Set global options\n$enable-shadows: false;\n$enable-gradients: false;\n$enable-print-styles: false; //I don't think anyone should expect to \"print\" this app.\n\n// Transition times\n$transition: 0.15s;\n$transition-mid: 0.2s;\n$transition-long: 0.3s;\n$transition-slow: 0.6s;\n\n//form-validation icon, uses vsWarning icon encoded here as svg\n$form-feedback-icon-invalid-color: $danger;\n$form-feedback-icon-invalid: str-replace(\n url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cg fill='none'%3E%3Cg fill='#{$form-feedback-icon-invalid-color}'%3E%3Cpath d='M7.56 1h.88l6.54 12.26-.44.74H1.44L1 13.26 7.56 1zM8 2.28 2.28 13H13.7L8 2.28zM8.625 12v-1h-1.25v1h1.25zm-1.25-2V6h1.25v4h-1.25z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E \"),\n '#',\n '%23'\n);\n\n// This section of variables is not consumed directly by DH, but they need to be\n// defined for sass to compile _variables\n$table-dark-bg: $gray-800;\n$table-dark-accent-bg: var(--dh-color-highlight-hover);\n$table-dark-hover-bg: var(--dh-color-highlight-active);\n$table-dark-border-color: $gray-700;\n$popover-bg: var(--dh-color-tooltip-bg);\n$popover-border-color: var(--dh-color-overlay-modal-bg);\n$popover-header-bg: #000;\n$popover-arrow-outer-color: var(--dh-color-dropshadow);\n$custom-range-thumb-active-bg: var(--dh-color-accent-1100);\n","@import '@deephaven/components/scss/custom.scss';\n\n.aggregation-edit {\n display: flex;\n flex-direction: column;\n height: 100%;\n\n .top-menu {\n background-color: $gray-800;\n padding: 0 $spacer-2;\n .form-inline {\n .custom-control {\n padding-top: $spacer-2;\n padding-bottom: $spacer-2;\n\n label {\n justify-content: left;\n }\n }\n .spacer {\n flex-grow: 1;\n }\n }\n\n .btn-link-icon {\n color: $gray-400;\n\n &.active {\n color: $foreground;\n }\n }\n }\n .aggregation-edit-item-list {\n flex-grow: 1;\n\n .item-list-scroll-pane {\n border: none;\n\n .item-list-item {\n padding-left: $spacer-2;\n padding-right: $spacer-2;\n display: flex;\n\n &:hover {\n label {\n background-color: var(--dh-color-item-list-hover-bg);\n color: var(--dh-color-item-list-selected-fg);\n }\n }\n\n .custom-control {\n flex-grow: 1;\n display: flex;\n\n label {\n padding-top: 1px;\n padding-left: $spacer-2;\n padding-right: $spacer-2;\n flex-grow: 1;\n border-radius: $border-radius;\n margin-bottom: $spacer-2;\n border: $input-border-width solid transparent;\n }\n\n &:focus-within label,\n input[type='checkbox']:active + label {\n background-color: var(--dh-color-item-list-selected-bg);\n color: var(--dh-color-item-list-selected-fg);\n }\n }\n }\n }\n }\n}\n","@use 'sass:math';\n\n//Set of spacer variables from the spacer map\n$spacer-0: map-get($spacers, 0); //0\n$spacer-1: map-get($spacers, 1);\n$spacer-2: map-get($spacers, 2);\n$spacer-3: map-get($spacers, 3);\n$spacer-4: map-get($spacers, 4);\n$spacer-5: map-get($spacers, 5);\n\n//Marching Ants for golden layout dropzone and drag and drop\n//top bottom, left right.\n//create 4 background images that are 50% color 1, 50% color 2 using graidents, two veritical, two horizontal\n//size them to ant-size and thickness\n//position those images along the egdes and make top/bottom repeat-x and left/right repeat-y\n//then offest each of those background positions by ant-size in animation to make them march.\n$ant-size: 8px;\n$ant-thickness: 1px;\n\n@mixin ants-base($color-1: black, $color-2: white) {\n background-image: linear-gradient(to right, $color-2 50%, $color-1 50%),\n linear-gradient(to right, $color-2 50%, $color-1 50%),\n linear-gradient(to bottom, $color-2 50%, $color-1 50%),\n linear-gradient(to bottom, $color-2 50%, $color-1 50%);\n background-size:\n $ant-size $ant-thickness,\n $ant-size $ant-thickness,\n $ant-thickness $ant-size,\n $ant-thickness $ant-size;\n background-position:\n 0 top,\n 0 bottom,\n left 0,\n right 0;\n background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;\n animation: march 0.5s;\n animation-timing-function: linear;\n animation-iteration-count: infinite;\n}\n\n@mixin drag-stack($pseudo-element) {\n &::#{$pseudo-element} {\n content: ' ';\n background: $primary;\n box-shadow: $box-shadow;\n border-radius: $border-radius;\n position: absolute;\n height: 100%;\n width: 100%;\n @content;\n }\n}\n\n$focus-bg-transparency: 12%;\n$hover-bg-transparency: 14%;\n$active-bg-transparency: 28%;\n$exception-transparency: 28%;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"AggregationEdit.js","names":["React","useCallback","useMemo","useRef","useState","classNames","Button","Checkbox","FadeTransition","ItemList","ThemeExport","dhSortAlphaDown","dhSortAlphaUp","TableUtils","filterValidColumns","jsx","_jsx","jsxs","_jsxs","SortType","DEFAULT_ROW_HEIGHT","AggregationEdit","_ref","aggregation","columns","onChange","top","setTop","bottom","setBottom","sort","setSort","NONE","invert","selected","list","isSelected","name","includes","validColumns","filteredColumns","operation","sortColumns","ASCENDING","items","slice","map","c","value","displayValue","handleSelect","itemIndex","selectedIndex","indexOf","newSelected","newInvert","splice","push","length","_objectSpread","handleReset","handleViewportChange","newTop","newBottom","toggleAll","checked","isModified","role","className","children","in","timeout","transitionSlowMs","mountOnEnter","unmountOnExit","kind","onClick","active","icon","tooltip","DESCENDING","itemCount","offset","renderItem","_ref2","item","onSelect","onViewportChange","rowHeight","focusSelector","ref"],"sources":["../../../src/sidebar/aggregations/AggregationEdit.tsx"],"sourcesContent":["import React, { useCallback, useMemo, useRef, useState } from 'react';\nimport classNames from 'classnames';\nimport {\n Button,\n Checkbox,\n FadeTransition,\n ItemList,\n ThemeExport,\n} from '@deephaven/components';\nimport { dhSortAlphaDown, dhSortAlphaUp } from '@deephaven/icons';\nimport { TableUtils } from '@deephaven/jsapi-utils';\nimport { type Aggregation } from './Aggregations';\nimport { filterValidColumns } from './AggregationUtils';\nimport './AggregationEdit.scss';\nimport { type DisplayColumn } from '../../IrisGridModel';\n\ninterface AggregationEditItem {\n value: string;\n displayValue: string;\n}\n\nexport type AggregationEditProps = {\n aggregation: Aggregation;\n columns: readonly DisplayColumn[];\n onChange: (aggregation: Aggregation) => void;\n};\n\nenum SortType {\n NONE,\n ASCENDING,\n DESCENDING,\n}\n\nconst DEFAULT_ROW_HEIGHT = 30;\n\nfunction AggregationEdit({\n aggregation,\n columns,\n onChange,\n}: AggregationEditProps): JSX.Element {\n const [top, setTop] = useState(-1);\n const [bottom, setBottom] = useState(-1);\n const [sort, setSort] = useState(SortType.NONE);\n const { invert, selected } = aggregation;\n const list = useRef<ItemList<AggregationEditItem>>(null);\n\n const isSelected = useCallback(\n name => (selected.includes(name) ? !invert : invert),\n [invert, selected]\n );\n\n const validColumns = useMemo(() => {\n let filteredColumns = filterValidColumns(columns, aggregation.operation);\n if (sort !== SortType.NONE) {\n filteredColumns = TableUtils.sortColumns(\n filteredColumns,\n sort === SortType.ASCENDING\n );\n }\n return filteredColumns;\n }, [columns, aggregation.operation, sort]);\n\n const items = useMemo(\n () =>\n top >= 0\n ? validColumns.slice(top, bottom + 1).map(c => ({\n value: c.name,\n displayValue: c.name,\n isSelected: isSelected(c.name),\n }))\n : [],\n [validColumns, isSelected, bottom, top]\n );\n\n const handleSelect = useCallback(\n itemIndex => {\n const { name } = validColumns[itemIndex];\n const selectedIndex = selected.indexOf(name);\n let newSelected = [...selected];\n let newInvert = invert;\n if (selectedIndex >= 0) {\n newSelected.splice(selectedIndex, 1);\n } else {\n newSelected.push(name);\n if (newSelected.length === validColumns.length) {\n // Every item is either selected or deselected, flip the inversion bit\n newSelected = [];\n newInvert = !invert;\n }\n }\n\n onChange({ ...aggregation, selected: newSelected, invert: newInvert });\n },\n [aggregation, invert, validColumns, selected, onChange]\n );\n\n const handleReset = useCallback(() => {\n setSort(SortType.NONE);\n onChange({ ...aggregation, selected: [], invert: true });\n }, [aggregation, onChange]);\n\n const handleViewportChange = useCallback(\n (newTop, newBottom) => {\n setTop(newTop);\n setBottom(newBottom);\n },\n [setTop, setBottom]\n );\n\n const toggleAll = useCallback(() => {\n if (selected.length === 0) {\n onChange({ ...aggregation, invert: !invert });\n } else {\n onChange({ ...aggregation, selected: [], invert: true });\n }\n }, [aggregation, invert, onChange, selected]);\n\n const checked = selected.length === 0 ? invert : null;\n const isModified = selected.length !== 0 || !invert || sort !== SortType.NONE;\n\n return (\n <div role=\"menu\" className=\"aggregation-edit\">\n <div className=\"top-menu\">\n <div className=\"form-inline\">\n <Checkbox checked={checked} onChange={toggleAll}>\n Toggle All\n </Checkbox>\n <div className=\"spacer\" />\n <FadeTransition\n in={isModified}\n timeout={ThemeExport.transitionSlowMs}\n mountOnEnter\n unmountOnExit\n >\n <Button kind=\"ghost\" className=\"btn-reset\" onClick={handleReset}>\n Reset\n </Button>\n </FadeTransition>\n <Button\n kind=\"ghost\"\n className={classNames({\n active: sort === SortType.ASCENDING,\n })}\n icon={dhSortAlphaDown}\n tooltip=\"Sort ascending\"\n onClick={() => setSort(SortType.ASCENDING)}\n />\n <Button\n kind=\"ghost\"\n className={classNames({\n active: sort === SortType.DESCENDING,\n })}\n icon={dhSortAlphaUp}\n tooltip=\"Sort descending\"\n onClick={() => setSort(SortType.DESCENDING)}\n />\n </div>\n </div>\n <div className=\"aggregation-edit-item-list\">\n <ItemList\n itemCount={validColumns.length}\n items={items}\n offset={top}\n renderItem={({ item }) => (\n <Checkbox checked={isSelected(item.value)}>\n {item.displayValue}\n </Checkbox>\n )}\n onSelect={handleSelect}\n onViewportChange={handleViewportChange}\n rowHeight={DEFAULT_ROW_HEIGHT}\n focusSelector=\"input\"\n ref={list}\n />\n </div>\n </div>\n );\n}\n\nexport default AggregationEdit;\n"],"mappings":";;;;;AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AACrE,OAAOC,UAAU,MAAM,YAAY;AACnC,SACEC,MAAM,EACNC,QAAQ,EACRC,cAAc,EACdC,QAAQ,EACRC,WAAW,QACN,uBAAuB;AAC9B,SAASC,eAAe,EAAEC,aAAa,QAAQ,kBAAkB;AACjE,SAASC,UAAU,QAAQ,wBAAwB;AAAC,SAE3CC,kBAAkB;AAAA;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAAA,IAetBC,QAAQ;AAAA,WAARA,QAAQ;EAARA,QAAQ,CAARA,QAAQ;EAARA,QAAQ,CAARA,QAAQ;EAARA,QAAQ,CAARA,QAAQ;AAAA,GAARA,QAAQ,KAARA,QAAQ;AAMb,IAAMC,kBAAkB,GAAG,EAAE;AAE7B,SAASC,eAAeA,CAAAC,IAAA,EAIc;EAAA,IAJb;IACvBC,WAAW;IACXC,OAAO;IACPC;EACoB,CAAC,GAAAH,IAAA;EACrB,IAAM,CAACI,GAAG,EAAEC,MAAM,CAAC,GAAGvB,QAAQ,CAAC,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2B,SAAS,EAAEpE,kBAAmB;QAC9BqE,aAAa,EAAC,OAAO;QACrBC,GAAG,EAAEvD;MAAK,CACX;IAAC,CACC,CAAC;EAAA,CACH,CAAC;AAEV;AAEA,eAAed,eAAe","ignoreList":[]}
1
+ {"version":3,"file":"AggregationEdit.js","names":["React","useCallback","useMemo","useRef","useState","classNames","Button","Checkbox","FadeTransition","ItemList","ThemeExport","dhSortAlphaDown","dhSortAlphaUp","TableUtils","filterValidColumns","jsx","_jsx","jsxs","_jsxs","SortType","DEFAULT_ROW_HEIGHT","AggregationEdit","_ref","aggregation","columns","onChange","top","setTop","bottom","setBottom","sort","setSort","NONE","invert","selected","list","isSelected","name","includes","validColumns","filteredColumns","operation","sortColumns","ASCENDING","items","slice","map","c","value","displayValue","handleSelect","itemIndex","selectedIndex","indexOf","newSelected","newInvert","splice","push","length","_objectSpread","handleReset","handleViewportChange","newTop","newBottom","toggleAll","checked","isModified","role","className","children","in","timeout","transitionSlowMs","mountOnEnter","unmountOnExit","kind","onClick","active","icon","tooltip","DESCENDING","itemCount","offset","renderItem","_ref2","item","onSelect","onViewportChange","rowHeight","focusSelector","ref"],"sources":["../../../src/sidebar/aggregations/AggregationEdit.tsx"],"sourcesContent":["import React, { useCallback, useMemo, useRef, useState } from 'react';\nimport classNames from 'classnames';\nimport {\n Button,\n Checkbox,\n FadeTransition,\n ItemList,\n ThemeExport,\n} from '@deephaven/components';\nimport { dhSortAlphaDown, dhSortAlphaUp } from '@deephaven/icons';\nimport { TableUtils } from '@deephaven/jsapi-utils';\nimport { type Aggregation } from './Aggregations';\nimport { filterValidColumns } from './AggregationUtils';\nimport './AggregationEdit.scss';\nimport { type DisplayColumn } from '../../IrisGridModel';\n\ninterface AggregationEditItem {\n value: string;\n displayValue: string;\n}\n\nexport type AggregationEditProps = {\n aggregation: Aggregation;\n columns: readonly DisplayColumn[];\n onChange: (aggregation: Aggregation) => void;\n};\n\nenum SortType {\n NONE,\n ASCENDING,\n DESCENDING,\n}\n\nconst DEFAULT_ROW_HEIGHT = 30;\n\nfunction AggregationEdit({\n aggregation,\n columns,\n onChange,\n}: AggregationEditProps): JSX.Element {\n const [top, setTop] = useState(-1);\n const [bottom, setBottom] = useState(-1);\n const [sort, setSort] = useState(SortType.NONE);\n const { invert, selected } = aggregation;\n const list = useRef<ItemList<AggregationEditItem>>(null);\n\n const isSelected = useCallback(\n name => (selected.includes(name) ? !invert : invert),\n [invert, selected]\n );\n\n const validColumns = useMemo(() => {\n let filteredColumns = filterValidColumns(columns, aggregation.operation);\n if (sort !== SortType.NONE) {\n filteredColumns = TableUtils.sortColumns(\n filteredColumns,\n sort === SortType.ASCENDING\n );\n }\n return filteredColumns;\n }, [columns, aggregation.operation, sort]);\n\n const items = useMemo(\n () =>\n top >= 0\n ? validColumns.slice(top, bottom + 1).map(c => ({\n value: c.name,\n displayValue: c.name,\n isSelected: isSelected(c.name),\n }))\n : [],\n [validColumns, isSelected, bottom, top]\n );\n\n const handleSelect = useCallback(\n itemIndex => {\n const { name } = validColumns[itemIndex];\n const selectedIndex = selected.indexOf(name);\n let newSelected = [...selected];\n let newInvert = invert;\n if (selectedIndex >= 0) {\n newSelected.splice(selectedIndex, 1);\n } else {\n newSelected.push(name);\n if (newSelected.length === validColumns.length) {\n // Every item is either selected or deselected, flip the inversion bit\n newSelected = [];\n newInvert = !invert;\n }\n }\n\n onChange({ ...aggregation, selected: newSelected, invert: newInvert });\n },\n [aggregation, invert, validColumns, selected, onChange]\n );\n\n const handleReset = useCallback(() => {\n setSort(SortType.NONE);\n onChange({ ...aggregation, selected: [], invert: true });\n }, [aggregation, onChange]);\n\n const handleViewportChange = useCallback(\n (newTop, newBottom) => {\n setTop(newTop);\n setBottom(newBottom);\n },\n [setTop, setBottom]\n );\n\n const toggleAll = useCallback(() => {\n if (selected.length === 0) {\n onChange({ ...aggregation, invert: !invert });\n } else {\n onChange({ ...aggregation, selected: [], invert: true });\n }\n }, [aggregation, invert, onChange, selected]);\n\n const checked = selected.length === 0 ? invert : null;\n const isModified = selected.length !== 0 || !invert || sort !== SortType.NONE;\n\n return (\n <div role=\"menu\" className=\"aggregation-edit\">\n <div className=\"top-menu\">\n <div className=\"form-inline\">\n <Checkbox checked={checked} onChange={toggleAll}>\n Toggle All\n </Checkbox>\n <div className=\"spacer\" />\n <FadeTransition\n in={isModified}\n timeout={ThemeExport.transitionSlowMs}\n mountOnEnter\n unmountOnExit\n >\n <Button kind=\"ghost\" className=\"btn-reset\" onClick={handleReset}>\n Reset\n </Button>\n </FadeTransition>\n <Button\n kind=\"ghost\"\n className={classNames({\n active: sort === SortType.ASCENDING,\n })}\n icon={dhSortAlphaDown}\n tooltip=\"Sort ascending\"\n onClick={() => setSort(SortType.ASCENDING)}\n />\n <Button\n kind=\"ghost\"\n className={classNames({\n active: sort === SortType.DESCENDING,\n })}\n icon={dhSortAlphaUp}\n tooltip=\"Sort descending\"\n onClick={() => setSort(SortType.DESCENDING)}\n />\n </div>\n </div>\n <div className=\"aggregation-edit-item-list\">\n <ItemList\n itemCount={validColumns.length}\n items={items}\n offset={top}\n renderItem={({ item }) => (\n <Checkbox checked={isSelected(item.value)}>\n {item.displayValue}\n </Checkbox>\n )}\n onSelect={handleSelect}\n onViewportChange={handleViewportChange}\n rowHeight={DEFAULT_ROW_HEIGHT}\n focusSelector=\"input\"\n ref={list}\n />\n </div>\n </div>\n );\n}\n\nexport default AggregationEdit;\n"],"mappings":";;;;;AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AACrE,OAAOC,UAAU,MAAM,YAAY;AACnC,SACEC,MAAM,EACNC,QAAQ,EACRC,cAAc,EACdC,QAAQ,EACRC,WAAW,QACN,uBAAuB;AAC9B,SAASC,eAAe,EAAEC,aAAa,QAAQ,kBAAkB;AACjE,SAASC,UAAU,QAAQ,wBAAwB;AAAC,SAE3CC,kBAAkB;AAAA;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAA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EAAE1C,YAAY,CAACmB,MAAO;QAC/Bd,KAAK,EAAEA,KAAM;QACbsC,MAAM,EAAExD,GAAI;QACZyD,UAAU,EAAEC,KAAA;UAAA,IAAC;YAAEC;UAAK,CAAC,GAAAD,KAAA;UAAA,oBACnBpE,IAAA,CAACT,QAAQ;YAAC0D,OAAO,EAAE7B,UAAU,CAACiD,IAAI,CAACrC,KAAK,CAAE;YAAAqB,QAAA,EACvCgB,IAAI,CAACpC;UAAY,CACV,CAAC;QAAA,CACX;QACFqC,QAAQ,EAAEpC,YAAa;QACvBqC,gBAAgB,EAAE1B,oBAAqB;QACvC2B,SAAS,EAAEpE,kBAAmB;QAC9BqE,aAAa,EAAC,OAAO;QACrBC,GAAG,EAAEvD;MAAK,CACX;IAAC,CACC,CAAC;EAAA,CACH,CAAC;AAEV;AAEA,eAAed,eAAe"}
@@ -1 +1 @@
1
- {"version":3,"file":"AggregationOperation.js","names":["AggregationOperation"],"sources":["../../../src/sidebar/aggregations/AggregationOperation.ts"],"sourcesContent":["enum AggregationOperation {\n COUNT = 'Count',\n MIN = 'Min',\n MAX = 'Max',\n SUM = 'Sum',\n ABS_SUM = 'AbsSum',\n VAR = 'Var',\n AVG = 'Avg',\n MEDIAN = 'Median',\n STD = 'Std',\n FIRST = 'First',\n LAST = 'Last',\n SKIP = 'Skip',\n COUNT_DISTINCT = 'CountDistinct',\n DISTINCT = 'Distinct',\n UNIQUE = 'Unique',\n}\n\nexport default AggregationOperation;\n"],"mappings":"IAAKA,oBAAoB;AAAA,WAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;AAAA,GAApBA,oBAAoB,KAApBA,oBAAoB;AAkBzB,eAAeA,oBAAoB","ignoreList":[]}
1
+ {"version":3,"file":"AggregationOperation.js","names":["AggregationOperation"],"sources":["../../../src/sidebar/aggregations/AggregationOperation.ts"],"sourcesContent":["enum AggregationOperation {\n COUNT = 'Count',\n MIN = 'Min',\n MAX = 'Max',\n SUM = 'Sum',\n ABS_SUM = 'AbsSum',\n VAR = 'Var',\n AVG = 'Avg',\n MEDIAN = 'Median',\n STD = 'Std',\n FIRST = 'First',\n LAST = 'Last',\n SKIP = 'Skip',\n COUNT_DISTINCT = 'CountDistinct',\n DISTINCT = 'Distinct',\n UNIQUE = 'Unique',\n}\n\nexport default AggregationOperation;\n"],"mappings":"IAAKA,oBAAoB;AAAA,WAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;AAAA,GAApBA,oBAAoB,KAApBA,oBAAoB;AAkBzB,eAAeA,oBAAoB"}
@@ -1 +1 @@
1
- {"version":3,"file":"AggregationUtils.js","names":["TableUtils","AggregationOperation","SELECTABLE_OPTIONS","SUM","ABS_SUM","MIN","MAX","VAR","AVG","MEDIAN","STD","FIRST","LAST","COUNT_DISTINCT","DISTINCT","COUNT","UNIQUE","isRollupOperation","type","isRollupProhibited","isValidOperation","operationType","columnType","isNumberType","isDateType","isTextType","SKIP","filterValidColumns","columns","filter","c","isProxy","getOperationColumnNames","selected","invert","map","_ref","name","includes"],"sources":["../../../src/sidebar/aggregations/AggregationUtils.ts"],"sourcesContent":["import { TableUtils } from '@deephaven/jsapi-utils';\nimport { type DisplayColumn } from '../../IrisGridModel';\nimport AggregationOperation from './AggregationOperation';\n\nexport const SELECTABLE_OPTIONS = [\n AggregationOperation.SUM,\n AggregationOperation.ABS_SUM,\n AggregationOperation.MIN,\n AggregationOperation.MAX,\n AggregationOperation.VAR,\n AggregationOperation.AVG,\n AggregationOperation.MEDIAN,\n AggregationOperation.STD,\n AggregationOperation.FIRST,\n AggregationOperation.LAST,\n AggregationOperation.COUNT_DISTINCT,\n AggregationOperation.DISTINCT,\n AggregationOperation.COUNT,\n AggregationOperation.UNIQUE,\n];\n\n/**\n * Check if an operation requires a rollup/table grouping\n * @param type The operation to check\n * @returns True if this operation applies to the whole table, false if applies to columns\n */\nexport const isRollupOperation = (type: AggregationOperation): boolean => {\n switch (type) {\n // currently no rollup only operations, but there has been in the past\n default:\n return false;\n }\n};\n\n/**\n * Check if an operation is not supported for a rollup/table grouping\n * @param type The operation to check\n * @returns True if this operation is not supported for a rollup/table grouping\n */\nexport const isRollupProhibited = (type: AggregationOperation): boolean => {\n switch (type) {\n case AggregationOperation.MEDIAN:\n return true;\n default:\n return false;\n }\n};\n\n/**\n * Check if an operation is valid against the given column type\n * @param operationType The operation to check\n * @param columnType The column type to check against\n */\nexport const isValidOperation = (\n operationType: AggregationOperation,\n columnType: string\n): boolean => {\n switch (operationType) {\n case AggregationOperation.COUNT:\n case AggregationOperation.FIRST:\n case AggregationOperation.LAST:\n case AggregationOperation.COUNT_DISTINCT:\n case AggregationOperation.DISTINCT:\n case AggregationOperation.UNIQUE:\n return true;\n case AggregationOperation.MEDIAN:\n case AggregationOperation.MIN:\n case AggregationOperation.MAX:\n return (\n TableUtils.isNumberType(columnType) ||\n TableUtils.isDateType(columnType) ||\n TableUtils.isTextType(columnType)\n );\n case AggregationOperation.SUM:\n case AggregationOperation.ABS_SUM:\n case AggregationOperation.VAR:\n case AggregationOperation.AVG:\n case AggregationOperation.STD:\n return TableUtils.isNumberType(columnType);\n case AggregationOperation.SKIP:\n return false;\n // No default case - if AggregationOperation is added, we'll get a compile time error\n }\n};\n\nexport const filterValidColumns = (\n columns: readonly DisplayColumn[],\n operationType: AggregationOperation\n): DisplayColumn[] =>\n columns.filter(\n c => c.isProxy !== true && isValidOperation(operationType, c.type)\n );\n\nexport const getOperationColumnNames = (\n columns: readonly DisplayColumn[],\n operationType: AggregationOperation,\n selected: readonly string[],\n invert: boolean\n): string[] =>\n filterValidColumns(columns, operationType)\n .map(({ name }) => name)\n .filter(name => (selected.includes(name) ? !invert : invert));\n\nexport default {\n isValidOperation,\n isRollupOperation,\n isRollupProhibited,\n filterValidColumns,\n getOperationColumnNames,\n};\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,wBAAwB;AAAC,OAE7CC,oBAAoB;AAE3B,OAAO,IAAMC,kBAAkB,GAAG,CAChCD,oBAAoB,CAACE,GAAG,EACxBF,oBAAoB,CAACG,OAAO,EAC5BH,oBAAoB,CAACI,GAAG,EACxBJ,oBAAoB,CAACK,GAAG,EACxBL,oBAAoB,CAACM,GAAG,EACxBN,oBAAoB,CAACO,GAAG,EACxBP,oBAAoB,CAACQ,MAAM,EAC3BR,oBAAoB,CAACS,GAAG,EACxBT,oBAAoB,CAACU,KAAK,EAC1BV,oBAAoB,CAACW,IAAI,EACzBX,oBAAoB,CAACY,cAAc,EACnCZ,oBAAoB,CAACa,QAAQ,EAC7Bb,oBAAoB,CAACc,KAAK,EAC1Bd,oBAAoB,CAACe,MAAM,CAC5B;;AAED;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMC,iBAAiB,GAAIC,IAA0B,IAAc;EACxE,QAAQA,IAAI;IACV;IACA;MACE,OAAO,KAAK;EAChB;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMC,kBAAkB,GAAID,IAA0B,IAAc;EACzE,QAAQA,IAAI;IACV,KAAKjB,oBAAoB,CAACQ,MAAM;MAC9B,OAAO,IAAI;IACb;MACE,OAAO,KAAK;EAChB;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMW,gBAAgB,GAAGA,CAC9BC,aAAmC,EACnCC,UAAkB,KACN;EACZ,QAAQD,aAAa;IACnB,KA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,IAAI,IAAKJ,QAAQ,CAACK,QAAQ,CAACD,IAAI,CAAC,GAAG,CAACH,MAAM,GAAGA,MAAO,CAAC;AAEjE,eAAe;EACbd,gBAAgB;EAChBH,iBAAiB;EACjBE,kBAAkB;EAClBQ,kBAAkB;EAClBK;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"AggregationUtils.js","names":["TableUtils","AggregationOperation","SELECTABLE_OPTIONS","SUM","ABS_SUM","MIN","MAX","VAR","AVG","MEDIAN","STD","FIRST","LAST","COUNT_DISTINCT","DISTINCT","COUNT","UNIQUE","isRollupOperation","type","isRollupProhibited","isValidOperation","operationType","columnType","isNumberType","isDateType","isTextType","SKIP","filterValidColumns","columns","filter","c","isProxy","getOperationColumnNames","selected","invert","map","_ref","name","includes"],"sources":["../../../src/sidebar/aggregations/AggregationUtils.ts"],"sourcesContent":["import { TableUtils } from '@deephaven/jsapi-utils';\nimport { type DisplayColumn } from '../../IrisGridModel';\nimport AggregationOperation from './AggregationOperation';\n\nexport const SELECTABLE_OPTIONS = [\n AggregationOperation.SUM,\n AggregationOperation.ABS_SUM,\n AggregationOperation.MIN,\n AggregationOperation.MAX,\n AggregationOperation.VAR,\n AggregationOperation.AVG,\n AggregationOperation.MEDIAN,\n AggregationOperation.STD,\n AggregationOperation.FIRST,\n AggregationOperation.LAST,\n AggregationOperation.COUNT_DISTINCT,\n AggregationOperation.DISTINCT,\n AggregationOperation.COUNT,\n AggregationOperation.UNIQUE,\n];\n\n/**\n * Check if an operation requires a rollup/table grouping\n * @param type The operation to check\n * @returns True if this operation applies to the whole table, false if applies to columns\n */\nexport const isRollupOperation = (type: AggregationOperation): boolean => {\n switch (type) {\n // currently no rollup only operations, but there has been in the past\n default:\n return false;\n }\n};\n\n/**\n * Check if an operation is not supported for a rollup/table grouping\n * @param type The operation to check\n * @returns True if this operation is not supported for a rollup/table grouping\n */\nexport const isRollupProhibited = (type: AggregationOperation): boolean => {\n switch (type) {\n case AggregationOperation.MEDIAN:\n return true;\n default:\n return false;\n }\n};\n\n/**\n * Check if an operation is valid against the given column type\n * @param operationType The operation to check\n * @param columnType The column type to check against\n */\nexport const isValidOperation = (\n operationType: AggregationOperation,\n columnType: string\n): boolean => {\n switch (operationType) {\n case AggregationOperation.COUNT:\n case AggregationOperation.FIRST:\n case AggregationOperation.LAST:\n case AggregationOperation.COUNT_DISTINCT:\n case AggregationOperation.DISTINCT:\n case AggregationOperation.UNIQUE:\n return true;\n case AggregationOperation.MEDIAN:\n case AggregationOperation.MIN:\n case AggregationOperation.MAX:\n return (\n TableUtils.isNumberType(columnType) ||\n TableUtils.isDateType(columnType) ||\n TableUtils.isTextType(columnType)\n );\n case AggregationOperation.SUM:\n case AggregationOperation.ABS_SUM:\n case AggregationOperation.VAR:\n case AggregationOperation.AVG:\n case AggregationOperation.STD:\n return TableUtils.isNumberType(columnType);\n case AggregationOperation.SKIP:\n return false;\n // No default case - if AggregationOperation is added, we'll get a compile time error\n }\n};\n\nexport const filterValidColumns = (\n columns: readonly DisplayColumn[],\n operationType: AggregationOperation\n): DisplayColumn[] =>\n columns.filter(\n c => c.isProxy !== true && isValidOperation(operationType, c.type)\n );\n\nexport const getOperationColumnNames = (\n columns: readonly DisplayColumn[],\n operationType: AggregationOperation,\n selected: readonly string[],\n invert: boolean\n): string[] =>\n filterValidColumns(columns, operationType)\n .map(({ name }) => name)\n .filter(name => (selected.includes(name) ? !invert : invert));\n\nexport default {\n isValidOperation,\n isRollupOperation,\n isRollupProhibited,\n filterValidColumns,\n getOperationColumnNames,\n};\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,wBAAwB;AAAC,OAE7CC,oBAAoB;AAE3B,OAAO,IAAMC,kBAAkB,GAAG,CAChCD,oBAAoB,CAACE,GAAG,EACxBF,oBAAoB,CAACG,OAAO,EAC5BH,oBAAoB,CAACI,GAAG,EACxBJ,oBAAoB,CAACK,GAAG,EACxBL,oBAAoB,CAACM,GAAG,EACxBN,oBAAoB,CAACO,GAAG,EACxBP,oB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GAAG;IAC7B,KAAKN,oBAAoB,CAACO,GAAG;IAC7B,KAAKP,oBAAoB,CAACS,GAAG;MAC3B,OAAOV,UAAU,CAACuB,YAAY,CAACD,UAAU,CAAC;IAC5C,KAAKrB,oBAAoB,CAACyB,IAAI;MAC5B,OAAO,KAAK;IACd;EACF;AACF,CAAC;;AAED,OAAO,IAAMC,kBAAkB,GAAGA,CAChCC,OAAiC,EACjCP,aAAmC,KAEnCO,OAAO,CAACC,MAAM,CACZC,CAAC,IAAIA,CAAC,CAACC,OAAO,KAAK,IAAI,IAAIX,gBAAgB,CAACC,aAAa,EAAES,CAAC,CAACZ,IAAI,CACnE,CAAC;AAEH,OAAO,IAAMc,uBAAuB,GAAGA,CACrCJ,OAAiC,EACjCP,aAAmC,EACnCY,QAA2B,EAC3BC,MAAe,KAEfP,kBAAkB,CAACC,OAAO,EAAEP,aAAa,CAAC,CACvCc,GAAG,CAACC,IAAA;EAAA,IAAC;IAAEC;EAAK,CAAC,GAAAD,IAAA;EAAA,OAAKC,IAAI;AAAA,EAAC,CACvBR,MAAM,CAACQ,IAAI,IAAKJ,QAAQ,CAACK,QAAQ,CAACD,IAAI,CAAC,GAAG,CAACH,MAAM,GAAGA,MAAO,CAAC;AAEjE,eAAe;EACbd,gBAAgB;EAChBH,iBAAiB;EACjBE,kBAAkB;EAClBQ,kBAAkB;EAClBK;AACF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"sourceRoot":"","sources":["../../../../../node_modules/@deephaven/components/scss/custom.scss","../../../../../node_modules/@deephaven/components/scss/bootstrap_overrides.scss","../../../src/sidebar/aggregations/Aggregations.scss","../../../../../node_modules/@deephaven/components/scss/new_variables.scss"],"names":[],"mappings":"AAAA;AC6LA;AC3LA;EACE;EACA;EACA;;AAEA;EACE;EACA,kBDiBO;;ACdT;EACE,SCRO;;ADUP;EACE,aCZK;;ADeP;EACE,cCdK;;ADeL;EACE,aCjBG;;ADsBT;EACE;;AACA;EACE;;AAGF;EACE;;AAGE;EACE,aCjCC;;ADsCP;EACE;EACA;;AAEA;EACE,cC5CG","file":"Aggregations.css","sourcesContent":["/* stylelint-disable scss/at-import-no-partial-leading-underscore */\n// Consumers should be able to resolve bootstrap/ to node_modules/bootstrap\n\n//Make bootstrap functions available for use in overrides\n@import 'bootstrap/scss/_functions.scss';\n@import './bootstrap_overrides.scss';\n\n//_variable imports come after bootstrap default overrides,\n// makes all other variables and mixins from bootstrap available\n/// with just importing customer.scss\n@import 'bootstrap/scss/_variables.scss';\n@import 'bootstrap/scss/_mixins.scss';\n\n//New variables come after imports\n@import './new_variables.scss';\n@import './util.scss';\n","// Styling overrides for bootstrap\n@use 'sass:map';\n\n// Override / set color variables\n$red: var(--dh-color-visual-red);\n$orange: var(--dh-color-visual-orange);\n$yellow: var(--dh-color-visual-yellow);\n$green: var(--dh-color-visual-green);\n$blue: var(--dh-color-visual-blue);\n$purple: var(--dh-color-visual-purple);\n\n// Fallback colors are used if theme isn't loaded\n// this is required for error messages if the API doesn't load\n\n//Define our Gray scale\n$gray-100: var(--dh-color-gray-900, #fcfcfa);\n$gray-200: var(--dh-color-gray-800);\n$gray-300: var(--dh-color-gray-700);\n$gray-400: var(--dh-color-gray-600);\n$gray-500: var(--dh-color-gray-500);\n// intentional duplicate, scale doesn't line up otherwise\n// as we have gray-850 and spectrum doesn't and it is needed\n$gray-600: var(--dh-color-gray-500);\n$gray-700: var(--dh-color-gray-400);\n$gray-800: var(--dh-color-gray-300);\n$gray-850: var(--dh-color-gray-200);\n$gray-900: var(--dh-color-gray-75);\n$black: var(--dh-color-black, #1a171a);\n$white: var(--dh-color-white, #f0f0ee);\n\n//Define some UI colors\n$interfacegray: var(--dh-color-content-bg, #2d2a2e);\n$interfaceblue: var(--dh-color-accent-bg);\n$interfacewhite: $white;\n$interfaceblack: $black;\n$content-bg: var(--dh-color-content-bg, #2d2a2e);\n$background: var(--dh-color-bg, #1a171a);\n$foreground: var(--dh-color-fg, #f0f0ee);\n\n// Extend default Bootstrap $grays map\n$grays-custom: (\n '850': $gray-850,\n);\n$grays: () !default;\n$grays: map-merge($grays, $grays-custom);\n\n// Extend default Bootstrap $colors map\n$colors-custom: (\n 'black': $black,\n);\n$colors: () !default;\n$colors: map-merge($colors, $colors-custom);\n\n// Override default Bootstrap $theme-colors map by mapping each key to itself.\n// These will then be re-mapped inside of `button-outline-variant` and\n// `button-outline-variant` mixins in `bootstrap_override_mixins_buttons.scss`\n$theme-colors-self-map: ();\n@each $key\n in (\n 'primary',\n 'secondary',\n 'success',\n 'info',\n 'warning',\n 'danger',\n 'light',\n 'dark'\n )\n{\n $theme-colors-self-map: map.set($theme-colors-self-map, $key, $key);\n}\n$theme-colors: () !default;\n$theme-colors: map-merge($theme-colors, $theme-colors-self-map);\n\n// Used by bootstrap_override_mixins_buttons.scss to map Bootstrap colors to\n// DH semantic colors\n$bootstrap-dh-semantic-map: (\n 'primary': 'accent',\n 'secondary': 'neutral',\n 'success': 'positive',\n 'info': 'info',\n 'warning': 'notice',\n 'danger': 'negative',\n // We shouldn't be using these, but mapping so they work with our custom\n // `color-yiq` mixin. If we find a way to remove $light + $dark that are\n // defined in Bootstrap _variables.scss, we should remove these\n 'light': 'neutral',\n 'dark': 'neutral',\n);\n\n//Set default colors\n$body-bg: $black;\n$body-color: $interfacewhite;\n\n// Set brand colors\n$primary: var(--dh-color-accent-bg);\n$primary-hover: var(--dh-color-accent-hover-bg);\n$primary-dark: var(--dh-color-accent-down-bg);\n$secondary: var(--dh-color-neutral-bg);\n$secondary-hover: var(--dh-color-neutral-hover-bg);\n$success: $green;\n$info: $yellow;\n$warning: $orange;\n$danger: var(--dh-color-negative-bg);\n$danger-hover: var(--dh-color-negative-hover-bg);\n// We really don't want to use $light or $dark variables, but Bootstrap defines\n// them in _variables.scss. Explicitly setting them to ensure we are in control\n// of their values. If we can find a way to remove them, we should\n$light: var(--dh-color-gray-light);\n$dark: var(--dh-color-gray-dark);\n// Bootstrap doesn't define $mid, and we want to move away from this particular\n// semantic. Should be deleted by #1635\n$mid: var(--dh-color-gray-mid);\n\n$semantic-colors: (\n 'primary-hover': $primary-hover,\n 'primary-dark': $primary-dark,\n 'mid': $mid,\n 'content-bg': $interfacegray,\n 'background': $interfaceblack,\n 'foreground': $interfacewhite,\n 'secondary-hover': $secondary-hover,\n 'danger-hover': $danger-hover,\n);\n\n$component-active-bg: $primary;\n$theme-color-interval: 9%;\n$yiq-contrasted-threshold: 180;\n\n// Override fonts\n$font-family-sans-serif:\n 'Fira Sans',\n -apple-system,\n blinkmacsystemfont,\n 'Segoe UI',\n 'Roboto',\n 'Helvetica Neue',\n arial,\n sans-serif; //fira sans then native system ui fallbacks\n$font-family-monospace: 'Fira Mono', menlo, monaco, consolas, 'Liberation Mono',\n 'Courier New', monospace;\n$font-family-base: $font-family-sans-serif;\n\n$headings-font-weight: 400;\n\n//Text overides\n$text-muted: $gray-400;\n\n//Style Selection highlight color\n$text-select-color: var(--dh-color-text-highlight);\n\n//Grid variables, same value as default just making easily accessible\n$grid-gutter-width: 30px;\n\n//Visual Overrides\n$border-radius: 4px;\n$box-shadow: 0 0.1rem 1rem var(--dh-color-dropshadow);\n\n//Override Btn\n$btn-border-radius: 4rem;\n$btn-padding-x: 1.5rem;\n$btn-transition:\n color 0.12s ease-in-out,\n background-color 0.12s ease-in-out,\n border-color 0.12s ease-in-out,\n box-shadow 0.12s ease-in-out; //default 0.15 is too long\n$btn-border-width: 2px;\n$btn-font-weight: var(--spectrum-global-font-weight-bold);\n$btn-line-height: 1.3;\n\n//Override Inputs\n$input-bg: var(--dh-color-input-bg);\n$input-disabled-bg: var(--dh-color-input-disabled-bg);\n$input-color: var(--dh-color-input-fg);\n$input-border-color: var(--dh-color-input-border);\n$input-placeholder-color: var(--dh-color-input-placeholder);\n$input-focus-border-color: var(--dh-color-input-focus-border);\n\n$input-btn-focus-width: 0.2rem;\n$input-btn-focus-color: color-mix(\n in srgb,\n var(--dh-color-accent) 35%,\n transparent\n);\n$input-btn-focus-box-shadow: 0 0 0 $input-btn-focus-width $input-btn-focus-color;\n$input-btn-line-height: 1.3;\n// Bootstrap uses a calc expression to determine the input height (calc(line-height + 2*padding-y + border)).\n// The padding-y value has to be in rem to match units as it is a SASS calc.\n// Using 0.42145rem with 1.3 line height gets us to spectrum's 32px.\n/* stylelint-disable-next-line number-max-precision */\n$input-btn-padding-y: 0.42145rem;\n\n//checkbox\n$custom-control-indicator-bg: var(--dh-color-input-bg);\n$custom-control-indicator-border-color: var(--dh-color-input-border);\n$custom-checkbox-indicator-border-radius: 2px;\n$custom-control-indicator-border-width: 2px;\n$custom-control-indicator-active-bg: var(--dh-color-input-bg);\n$custom-control-indicator-active-border-color: var(--dh-color-input-fg);\n$custom-control-indicator-checked-bg: var(--dh-color-input-fg);\n$custom-control-indicator-checked-color: black; // used as mask fill color\n$custom-checkbox-indicator-indeterminate-bg: var(--dh-color-input-fg);\n$custom-control-indicator-bg-size: 75% 75%;\n$custom-control-indicator-disabled-bg: var(--dh-color-input-disabled-bg);\n$custom-control-indicator-checked-disabled-bg: var(\n --dh-color-input-disabled-bg\n);\n$custom-control-label-disabled-color: var(--dh-color-input-disabled-fg);\n\n// The $custom-select-indicator variable is used by Bootstrap to provide the\n// icon for the select dropdown. Inline svgs can't use CSS variables, so we hard\n// code the color to #929192 (the default value of --dh-color-gray-600). PR #1651\n// overrides this icon altogether for known dropdowns, so technically we may not\n// need this, but it's here in case there are any remaining instances.\n$custom-select-indicator-color: #929192;\n$custom-select-bg: var(--dh-color-selector-bg);\n$custom-select-bg-size: 16px 16px;\n//dhSort icon encoded\n$custom-select-indicator: str-replace(\n url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='#{$custom-select-indicator-color}' d='M4 7l-.4-.8 4-3.7h.8l4 3.7-.4.8H4zm0 2l-.4.8 4 3.7h.8l4-3.7L12 9H4z'/%3E%3C/svg%3E\"),\n '#',\n '%23'\n);\n$custom-select-focus-box-shadow: $input-btn-focus-box-shadow;\n$custom-select-disabled-color: $gray-500;\n$custom-select-disabled-bg: $gray-800;\n\n//modal\n$modal-content-bg: $content-bg;\n$modal-content-border-width: 0;\n$modal-md: 550px;\n$close-color: var(--dh-color-text);\n$close-text-shadow: none;\n\n// Toast notification\n$toast-bg: var(--dh-color-accent-100);\n$toast-color: var(--dh-color-text);\n$toast-error-bg: var(--dh-color-negative-bg);\n$toast-error-color: var(--dh-color-text);\n\n//tooltips\n$tooltip-bg: var(--dh-color-tooltip-bg);\n$tooltip-color: var(--dh-color-tooltip-fg);\n$tooltip-box-shadow: 0 0.1rem 1.5rem 0.1rem var(--dh-color-tooltip-box-shadow);\n\n//drowdowns\n$dropdown-bg: $gray-600;\n$dropdown-link-color: $foreground;\n$dropdown-link-hover-color: $foreground;\n$dropdown-link-hover-bg: var(--dh-color-item-list-hover-bg);\n$dropdown-divider-bg: $gray-700;\n\n//context menus\n$contextmenu-bg: var(--dh-color-popover-bg);\n$contextmenu-color: var(--dh-color-text);\n$contextmenu-disabled-color: var(--dh-color-input-disabled-fg);\n$contextmenu-keyboard-selected-bg: var(--dh-color-keyboard-selected-bg);\n$contextmenu-selected-bg: var(--dh-color-item-list-hover-bg);\n$contextmenu-selected-color: var(--dh-color-item-list-selected-fg);\n\n//hr\n$hr-border-color: var(--dh-color-hr);\n\n//links\n$link-color: $gray-400;\n$link-hover-color: $foreground;\n\n//progress-bar\n$progress-bg: $gray-600;\n$progress-border-radius: 1rem;\n\n// Set global options\n$enable-shadows: false;\n$enable-gradients: false;\n$enable-print-styles: false; //I don't think anyone should expect to \"print\" this app.\n\n// Transition times\n$transition: 0.15s;\n$transition-mid: 0.2s;\n$transition-long: 0.3s;\n$transition-slow: 0.6s;\n\n//form-validation icon, uses vsWarning icon encoded here as svg\n$form-feedback-icon-invalid-color: $danger;\n$form-feedback-icon-invalid: str-replace(\n url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cg fill='none'%3E%3Cg fill='#{$form-feedback-icon-invalid-color}'%3E%3Cpath d='M7.56 1h.88l6.54 12.26-.44.74H1.44L1 13.26 7.56 1zM8 2.28 2.28 13H13.7L8 2.28zM8.625 12v-1h-1.25v1h1.25zm-1.25-2V6h1.25v4h-1.25z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E \"),\n '#',\n '%23'\n);\n\n// This section of variables is not consumed directly by DH, but they need to be\n// defined for sass to compile _variables\n$table-dark-bg: $gray-800;\n$table-dark-accent-bg: var(--dh-color-highlight-hover);\n$table-dark-hover-bg: var(--dh-color-highlight-active);\n$table-dark-border-color: $gray-700;\n$popover-bg: var(--dh-color-tooltip-bg);\n$popover-border-color: var(--dh-color-overlay-modal-bg);\n$popover-header-bg: #000;\n$popover-arrow-outer-color: var(--dh-color-dropshadow);\n$custom-range-thumb-active-bg: var(--dh-color-accent-1100);\n","@import '@deephaven/components/scss/custom.scss';\n\n.aggregations {\n height: 100%;\n display: flex;\n flex-direction: column;\n\n hr {\n margin: $spacer-2 $spacer-2;\n background-color: $gray-900;\n }\n\n .form-inline {\n padding: $spacer-2;\n\n .btn-add {\n margin-left: $spacer-1;\n }\n\n .custom-radio {\n margin-right: $spacer-3;\n &:first-of-type {\n margin-left: $spacer-2;\n }\n }\n }\n\n .draggable-item-list {\n flex-grow: 1;\n .item-list-scroll-pane {\n border: none;\n }\n\n .draggable-item-list-item-content {\n margin-right: 0;\n\n .title {\n span {\n margin-left: $spacer-2;\n }\n }\n }\n\n .btn-link-icon {\n padding: 0 $spacer-2 0;\n margin: -1px 0 $spacer-1 $spacer-1;\n\n &:last-child {\n margin-right: $spacer-1;\n }\n }\n }\n}\n","@use 'sass:math';\n\n//Set of spacer variables from the spacer map\n$spacer-0: map-get($spacers, 0); //0\n$spacer-1: map-get($spacers, 1);\n$spacer-2: map-get($spacers, 2);\n$spacer-3: map-get($spacers, 3);\n$spacer-4: map-get($spacers, 4);\n$spacer-5: map-get($spacers, 5);\n\n//Marching Ants for golden layout dropzone and drag and drop\n//top bottom, left right.\n//create 4 background images that are 50% color 1, 50% color 2 using graidents, two veritical, two horizontal\n//size them to ant-size and thickness\n//position those images along the egdes and make top/bottom repeat-x and left/right repeat-y\n//then offest each of those background positions by ant-size in animation to make them march.\n$ant-size: 8px;\n$ant-thickness: 1px;\n\n@mixin ants-base($color-1: black, $color-2: white) {\n background-image: linear-gradient(to right, $color-2 50%, $color-1 50%),\n linear-gradient(to right, $color-2 50%, $color-1 50%),\n linear-gradient(to bottom, $color-2 50%, $color-1 50%),\n linear-gradient(to bottom, $color-2 50%, $color-1 50%);\n background-size:\n $ant-size $ant-thickness,\n $ant-size $ant-thickness,\n $ant-thickness $ant-size,\n $ant-thickness $ant-size;\n background-position:\n 0 top,\n 0 bottom,\n left 0,\n right 0;\n background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;\n animation: march 0.5s;\n animation-timing-function: linear;\n animation-iteration-count: infinite;\n}\n\n@mixin drag-stack($pseudo-element) {\n &::#{$pseudo-element} {\n content: ' ';\n background: $primary;\n box-shadow: $box-shadow;\n border-radius: $border-radius;\n position: absolute;\n height: 100%;\n width: 100%;\n @content;\n }\n}\n\n$focus-bg-transparency: 12%;\n$hover-bg-transparency: 14%;\n$active-bg-transparency: 28%;\n$exception-transparency: 28%;\n"]}
1
+ {"version":3,"sourceRoot":"","sources":["../../../../../node_modules/@deephaven/components/scss/custom.scss","../../../../../node_modules/@deephaven/components/scss/bootstrap_overrides.scss","../../../src/sidebar/aggregations/Aggregations.scss","../../../../../node_modules/@deephaven/components/scss/new_variables.scss"],"names":[],"mappings":"AAAA;AC6LA;AC3LA;EACE;EACA;EACA;;AAEA;EACE;EACA,kBDiBO;;ACdT;EACE,SCRO;;ADUP;EACE,aCZK;;ADeP;EACE,cCdK;;ADeL;EACE,aCjBG;;ADsBT;EACE;;AACA;EACE;;AAGF;EACE;;AAGE;EACE,aCjCC;;ADsCP;EACE;EACA;;AAEA;EACE,cC5CG","file":"Aggregations.css","sourcesContent":["/* stylelint-disable scss/at-import-no-partial-leading-underscore */\n// Consumers should be able to resolve bootstrap/ to node_modules/bootstrap\n\n//Make bootstrap functions available for use in overrides\n@import 'bootstrap/scss/_functions.scss';\n@import './bootstrap_overrides.scss';\n\n//_variable imports come after bootstrap default overrides,\n// makes all other variables and mixins from bootstrap available\n/// with just importing customer.scss\n@import 'bootstrap/scss/_variables.scss';\n@import 'bootstrap/scss/_mixins.scss';\n\n//New variables come after imports\n@import './new_variables.scss';\n@import './util.scss';\n","// Styling overrides for bootstrap\n@use 'sass:map';\n\n// Override / set color variables\n$red: var(--dh-color-visual-red);\n$orange: var(--dh-color-visual-orange);\n$yellow: var(--dh-color-visual-yellow);\n$green: var(--dh-color-visual-green);\n$blue: var(--dh-color-visual-blue);\n$purple: var(--dh-color-visual-purple);\n\n// Fallback colors are used if theme isn't loaded\n// this is required for error messages if the API doesn't load\n\n//Define our Gray scale\n$gray-100: var(--dh-color-gray-900, #fcfcfa);\n$gray-200: var(--dh-color-gray-800);\n$gray-300: var(--dh-color-gray-700);\n$gray-400: var(--dh-color-gray-600);\n$gray-500: var(--dh-color-gray-500);\n// intentional duplicate, scale doesn't line up otherwise\n// as we have gray-850 and spectrum doesn't and it is needed\n$gray-600: var(--dh-color-gray-500);\n$gray-700: var(--dh-color-gray-400);\n$gray-800: var(--dh-color-gray-300);\n$gray-850: var(--dh-color-gray-200);\n$gray-900: var(--dh-color-gray-75);\n$black: var(--dh-color-black, #1a171a);\n$white: var(--dh-color-white, #f0f0ee);\n\n//Define some UI colors\n$interfacegray: var(--dh-color-content-bg, #2d2a2e);\n$interfaceblue: var(--dh-color-accent-bg);\n$interfacewhite: $white;\n$interfaceblack: $black;\n$content-bg: var(--dh-color-content-bg, #2d2a2e);\n$background: var(--dh-color-bg, #1a171a);\n$foreground: var(--dh-color-fg, #f0f0ee);\n\n// Extend default Bootstrap $grays map\n$grays-custom: (\n '850': $gray-850,\n);\n$grays: () !default;\n$grays: map-merge($grays, $grays-custom);\n\n// Extend default Bootstrap $colors map\n$colors-custom: (\n 'black': $black,\n);\n$colors: () !default;\n$colors: map-merge($colors, $colors-custom);\n\n// Override default Bootstrap $theme-colors map by mapping each key to itself.\n// These will then be re-mapped inside of `button-outline-variant` and\n// `button-outline-variant` mixins in `bootstrap_override_mixins_buttons.scss`\n$theme-colors-self-map: ();\n@each $key\n in (\n 'primary',\n 'secondary',\n 'success',\n 'info',\n 'warning',\n 'danger',\n 'light',\n 'dark'\n )\n{\n $theme-colors-self-map: map.set($theme-colors-self-map, $key, $key);\n}\n$theme-colors: () !default;\n$theme-colors: map-merge($theme-colors, $theme-colors-self-map);\n\n// Used by bootstrap_override_mixins_buttons.scss to map Bootstrap colors to\n// DH semantic colors\n$bootstrap-dh-semantic-map: (\n 'primary': 'accent',\n 'secondary': 'neutral',\n 'success': 'positive',\n 'info': 'info',\n 'warning': 'notice',\n 'danger': 'negative',\n // We shouldn't be using these, but mapping so they work with our custom\n // `color-yiq` mixin. If we find a way to remove $light + $dark that are\n // defined in Bootstrap _variables.scss, we should remove these\n 'light': 'neutral',\n 'dark': 'neutral',\n);\n\n//Set default colors\n$body-bg: $black;\n$body-color: $interfacewhite;\n\n// Set brand colors\n$primary: var(--dh-color-accent-bg);\n$primary-hover: var(--dh-color-accent-hover-bg);\n$primary-dark: var(--dh-color-accent-down-bg);\n$secondary: var(--dh-color-neutral-bg);\n$secondary-hover: var(--dh-color-neutral-hover-bg);\n$success: $green;\n$info: $yellow;\n$warning: $orange;\n$danger: var(--dh-color-negative-bg);\n$danger-hover: var(--dh-color-negative-hover-bg);\n// We really don't want to use $light or $dark variables, but Bootstrap defines\n// them in _variables.scss. Explicitly setting them to ensure we are in control\n// of their values. If we can find a way to remove them, we should\n$light: var(--dh-color-gray-light);\n$dark: var(--dh-color-gray-dark);\n// Bootstrap doesn't define $mid, and we want to move away from this particular\n// semantic. Should be deleted by #1635\n$mid: var(--dh-color-gray-mid);\n\n$semantic-colors: (\n 'primary-hover': $primary-hover,\n 'primary-dark': $primary-dark,\n 'mid': $mid,\n 'content-bg': $interfacegray,\n 'background': $interfaceblack,\n 'foreground': $interfacewhite,\n 'secondary-hover': $secondary-hover,\n 'danger-hover': $danger-hover,\n);\n\n$component-active-bg: $primary;\n$theme-color-interval: 9%;\n$yiq-contrasted-threshold: 180;\n\n// Override fonts\n$font-family-sans-serif:\n 'Fira Sans',\n -apple-system,\n blinkmacsystemfont,\n 'Segoe UI',\n 'Roboto',\n 'Helvetica Neue',\n arial,\n sans-serif; //fira sans then native system ui fallbacks\n$font-family-monospace: 'Fira Mono', menlo, monaco, consolas, 'Liberation Mono',\n 'Courier New', monospace;\n$font-family-base: $font-family-sans-serif;\n\n$headings-font-weight: 400;\n\n//Text overides\n$text-muted: $gray-400;\n\n//Style Selection highlight color\n$text-select-color: var(--dh-color-text-highlight);\n\n//Grid variables, same value as default just making easily accessible\n$grid-gutter-width: 30px;\n\n//Visual Overrides\n$border-radius: 4px;\n$box-shadow: 0 0.1rem 1rem var(--dh-color-dropshadow);\n\n//Override Btn\n$btn-border-radius: 4rem;\n$btn-padding-x: 1.5rem;\n$btn-transition:\n color 0.12s ease-in-out,\n background-color 0.12s ease-in-out,\n border-color 0.12s ease-in-out,\n box-shadow 0.12s ease-in-out; //default 0.15 is too long\n$btn-border-width: 2px;\n$btn-font-weight: var(--spectrum-global-font-weight-bold);\n$btn-line-height: 1.3;\n\n//Override Inputs\n$input-bg: var(--dh-color-input-bg);\n$input-disabled-bg: var(--dh-color-input-disabled-bg);\n$input-color: var(--dh-color-input-fg);\n$input-border-color: var(--dh-color-input-border);\n$input-placeholder-color: var(--dh-color-input-placeholder);\n$input-focus-border-color: var(--dh-color-input-focus-border);\n\n$input-btn-focus-width: 0.2rem;\n$input-btn-focus-color: color-mix(\n in srgb,\n var(--dh-color-accent) 35%,\n transparent\n);\n$input-btn-focus-box-shadow: 0 0 0 $input-btn-focus-width $input-btn-focus-color;\n$input-btn-line-height: 1.3;\n// Bootstrap uses a calc expression to determine the input height (calc(line-height + 2*padding-y + border)).\n// The padding-y value has to be in rem to match units as it is a SASS calc.\n// Using 0.42145rem with 1.3 line height gets us to spectrum's 32px.\n/* stylelint-disable-next-line number-max-precision */\n$input-btn-padding-y: 0.42145rem;\n\n//checkbox\n$custom-control-indicator-bg: var(--dh-color-input-bg);\n$custom-control-indicator-border-color: var(--dh-color-input-border);\n$custom-checkbox-indicator-border-radius: 2px;\n$custom-control-indicator-border-width: 2px;\n$custom-control-indicator-active-bg: var(--dh-color-input-bg);\n$custom-control-indicator-active-border-color: var(--dh-color-input-fg);\n$custom-control-indicator-checked-bg: var(--dh-color-input-fg);\n$custom-control-indicator-checked-color: black; // used as mask fill color\n$custom-checkbox-indicator-indeterminate-bg: var(--dh-color-input-fg);\n$custom-control-indicator-bg-size: 75% 75%;\n$custom-control-indicator-disabled-bg: var(--dh-color-input-disabled-bg);\n$custom-control-indicator-checked-disabled-bg: var(\n --dh-color-input-disabled-bg\n);\n$custom-control-label-disabled-color: var(--dh-color-input-disabled-fg);\n\n// The $custom-select-indicator variable is used by Bootstrap to provide the\n// icon for the select dropdown. Inline svgs can't use CSS variables, so we hard\n// code the color to #929192 (the default value of --dh-color-gray-600). PR #1651\n// overrides this icon altogether for known dropdowns, so technically we may not\n// need this, but it's here in case there are any remaining instances.\n$custom-select-indicator-color: #929192;\n$custom-select-bg: var(--dh-color-selector-bg);\n$custom-select-bg-size: 16px 16px;\n//dhSort icon encoded\n$custom-select-indicator: str-replace(\n url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='#{$custom-select-indicator-color}' d='M4 7l-.4-.8 4-3.7h.8l4 3.7-.4.8H4zm0 2l-.4.8 4 3.7h.8l4-3.7L12 9H4z'/%3E%3C/svg%3E\"),\n '#',\n '%23'\n);\n$custom-select-focus-box-shadow: $input-btn-focus-box-shadow;\n$custom-select-disabled-color: $gray-500;\n$custom-select-disabled-bg: $gray-800;\n\n//modal\n$modal-content-bg: $content-bg;\n$modal-content-border-width: 0;\n$modal-md: 550px;\n$close-color: var(--dh-color-text);\n$close-text-shadow: none;\n\n// Toast notification\n$toast-bg: var(--dh-color-accent-100);\n$toast-color: var(--dh-color-text);\n$toast-error-bg: var(--dh-color-negative-bg);\n$toast-error-color: var(--dh-color-text);\n\n//tooltips\n$tooltip-bg: var(--dh-color-tooltip-bg);\n$tooltip-color: var(--dh-color-tooltip-fg);\n$tooltip-box-shadow: 0 0.1rem 1.5rem 0.1rem var(--dh-color-tooltip-box-shadow);\n\n//drowdowns\n$dropdown-bg: $gray-600;\n$dropdown-link-color: $foreground;\n$dropdown-link-hover-color: $foreground;\n$dropdown-link-hover-bg: var(--dh-color-item-list-hover-bg);\n$dropdown-divider-bg: $gray-700;\n\n//context menus\n$contextmenu-bg: var(--dh-color-popover-bg);\n$contextmenu-color: var(--dh-color-text);\n$contextmenu-disabled-color: var(--dh-color-text-disabled);\n$contextmenu-keyboard-selected-bg: var(--dh-color-keyboard-selected-bg);\n$contextmenu-selected-bg: var(--dh-color-item-list-hover-bg);\n$contextmenu-selected-color: var(--dh-color-item-list-selected-fg);\n\n//hr\n$hr-border-color: var(--dh-color-hr);\n\n//links\n$link-color: $gray-400;\n$link-hover-color: $foreground;\n\n//progress-bar\n$progress-bg: $gray-600;\n$progress-border-radius: 1rem;\n\n// Set global options\n$enable-shadows: false;\n$enable-gradients: false;\n$enable-print-styles: false; //I don't think anyone should expect to \"print\" this app.\n\n// Transition times\n$transition: 0.15s;\n$transition-mid: 0.2s;\n$transition-long: 0.3s;\n$transition-slow: 0.6s;\n\n//form-validation icon, uses vsWarning icon encoded here as svg\n$form-feedback-icon-invalid-color: $danger;\n$form-feedback-icon-invalid: str-replace(\n url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cg fill='none'%3E%3Cg fill='#{$form-feedback-icon-invalid-color}'%3E%3Cpath d='M7.56 1h.88l6.54 12.26-.44.74H1.44L1 13.26 7.56 1zM8 2.28 2.28 13H13.7L8 2.28zM8.625 12v-1h-1.25v1h1.25zm-1.25-2V6h1.25v4h-1.25z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E \"),\n '#',\n '%23'\n);\n\n// This section of variables is not consumed directly by DH, but they need to be\n// defined for sass to compile _variables\n$table-dark-bg: $gray-800;\n$table-dark-accent-bg: var(--dh-color-highlight-hover);\n$table-dark-hover-bg: var(--dh-color-highlight-active);\n$table-dark-border-color: $gray-700;\n$popover-bg: var(--dh-color-tooltip-bg);\n$popover-border-color: var(--dh-color-overlay-modal-bg);\n$popover-header-bg: #000;\n$popover-arrow-outer-color: var(--dh-color-dropshadow);\n$custom-range-thumb-active-bg: var(--dh-color-accent-1100);\n","@import '@deephaven/components/scss/custom.scss';\n\n.aggregations {\n height: 100%;\n display: flex;\n flex-direction: column;\n\n hr {\n margin: $spacer-2 $spacer-2;\n background-color: $gray-900;\n }\n\n .form-inline {\n padding: $spacer-2;\n\n .btn-add {\n margin-left: $spacer-1;\n }\n\n .custom-radio {\n margin-right: $spacer-3;\n &:first-of-type {\n margin-left: $spacer-2;\n }\n }\n }\n\n .draggable-item-list {\n flex-grow: 1;\n .item-list-scroll-pane {\n border: none;\n }\n\n .draggable-item-list-item-content {\n margin-right: 0;\n\n .title {\n span {\n margin-left: $spacer-2;\n }\n }\n }\n\n .btn-link-icon {\n padding: 0 $spacer-2 0;\n margin: -1px 0 $spacer-1 $spacer-1;\n\n &:last-child {\n margin-right: $spacer-1;\n }\n }\n }\n}\n","@use 'sass:math';\n\n//Set of spacer variables from the spacer map\n$spacer-0: map-get($spacers, 0); //0\n$spacer-1: map-get($spacers, 1);\n$spacer-2: map-get($spacers, 2);\n$spacer-3: map-get($spacers, 3);\n$spacer-4: map-get($spacers, 4);\n$spacer-5: map-get($spacers, 5);\n\n//Marching Ants for golden layout dropzone and drag and drop\n//top bottom, left right.\n//create 4 background images that are 50% color 1, 50% color 2 using graidents, two veritical, two horizontal\n//size them to ant-size and thickness\n//position those images along the egdes and make top/bottom repeat-x and left/right repeat-y\n//then offest each of those background positions by ant-size in animation to make them march.\n$ant-size: 8px;\n$ant-thickness: 1px;\n\n@mixin ants-base($color-1: black, $color-2: white) {\n background-image: linear-gradient(to right, $color-2 50%, $color-1 50%),\n linear-gradient(to right, $color-2 50%, $color-1 50%),\n linear-gradient(to bottom, $color-2 50%, $color-1 50%),\n linear-gradient(to bottom, $color-2 50%, $color-1 50%);\n background-size:\n $ant-size $ant-thickness,\n $ant-size $ant-thickness,\n $ant-thickness $ant-size,\n $ant-thickness $ant-size;\n background-position:\n 0 top,\n 0 bottom,\n left 0,\n right 0;\n background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;\n animation: march 0.5s;\n animation-timing-function: linear;\n animation-iteration-count: infinite;\n}\n\n@mixin drag-stack($pseudo-element) {\n &::#{$pseudo-element} {\n content: ' ';\n background: $primary;\n box-shadow: $box-shadow;\n border-radius: $border-radius;\n position: absolute;\n height: 100%;\n width: 100%;\n @content;\n }\n}\n\n$focus-bg-transparency: 12%;\n$hover-bg-transparency: 14%;\n$active-bg-transparency: 28%;\n$exception-transparency: 28%;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Aggregations.js","names":["React","useCallback","useEffect","useMemo","useState","DragDropContext","classNames","FontAwesomeIcon","dhNewCircleLargeFilled","vsTrash","vsEdit","dhWarningFilled","Log","DraggableItemList","DragUtils","Option","Select","Radio","RadioGroup","Button","AggregationOperation","AggregationUtils","SELECTABLE_OPTIONS","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","log","module","Aggregations","_ref","isRollup","settings","onChange","onEdit","dh","aggregations","showOnTop","options","filter","option","some","aggregation","operation","MEDIAN","undefined","selectedOperation","setSelectedOperation","selectedRanges","setSelectedRanges","changeSettings","changedSettings","added","arguments","length","removed","_objectSpread","changeAggregations","newAggregations","changeShowOnTop","newShowOnTop","handleDragStart","debug","startDragging","handleDragEnd","_ref2","destination","source","stopDragging","destinationIndex","index","draggedItems","reorder","insertIndex","adjustDestinationIndex","newSelectedRanges","handleOperationChange","handleAdd","selected","invert","handleDeleteClicked","itemIndex","keep","remove","reduce","_ref3","keepSoFar","removeSoFar","push","handleAggregationSelectionChange","handleAggregationSelect","isRollupOperation","handleShowOnTopChange","value","setDefaultOperation","includes","renderAggregation","_ref4","item","isClone","selectedCount","text","badgeText","concat","className","isRollupProhibited","isEditable","children","icon","renderBadge","renderHandle","kind","tooltip","onClick","disabled","isOptionsShown","isAggregationsShown","map","type","id","marginStart","orientation","onDragStart","onDragEnd","itemCount","items","renderItem","offset","onSelectionChange","onSelect","isMultiSelect"],"sources":["../../../src/sidebar/aggregations/Aggregations.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useMemo, useState } from 'react';\nimport { DragDropContext } from 'react-beautiful-dnd';\nimport classNames from 'classnames';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport {\n dhNewCircleLargeFilled,\n vsTrash,\n vsEdit,\n dhWarningFilled,\n} from '@deephaven/icons';\nimport Log from '@deephaven/log';\nimport {\n DraggableItemList,\n DragUtils,\n Option,\n Select,\n Radio,\n RadioGroup,\n Button,\n} from '@deephaven/components';\nimport type { DraggableRenderItemProps, Range } from '@deephaven/components';\nimport { type ModelIndex } from '@deephaven/grid';\nimport type { dh as DhType } from '@deephaven/jsapi-types';\nimport AggregationOperation from './AggregationOperation';\nimport AggregationUtils, { SELECTABLE_OPTIONS } from './AggregationUtils';\nimport './Aggregations.scss';\n\nconst log = Log.module('Aggregations');\n\nexport type Aggregation = {\n operation: AggregationOperation;\n selected: readonly string[];\n invert: boolean;\n};\n\nexport type AggregationSettings = {\n aggregations: readonly Aggregation[];\n showOnTop: boolean;\n};\n\nexport type AggregationsProps = {\n isRollup: boolean;\n settings: AggregationSettings;\n onChange: (\n settings: AggregationSettings,\n added: AggregationOperation[],\n removed: AggregationOperation[]\n ) => void;\n onEdit: (aggregation: Aggregation) => void;\n dh: typeof DhType;\n};\n\nfunction Aggregations({\n isRollup,\n settings,\n onChange,\n onEdit,\n dh,\n}: AggregationsProps): JSX.Element {\n const { aggregations, showOnTop } = settings;\n const options = useMemo(\n () =>\n SELECTABLE_OPTIONS.filter(\n option =>\n !aggregations.some(aggregation => aggregation.operation === option) &&\n !(\n option === AggregationOperation.MEDIAN &&\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore - MEDIAN is not defined in older version of Core\n dh.AggregationOperation.MEDIAN === undefined\n )\n ),\n [aggregations, dh]\n );\n const [selectedOperation, setSelectedOperation] = useState(options[0]);\n const [selectedRanges, setSelectedRanges] = useState<Range[]>([]);\n const changeSettings = useCallback(\n (changedSettings, added = [], removed = []) => {\n onChange({ ...settings, ...changedSettings }, added, removed);\n },\n [onChange, settings]\n );\n const changeAggregations = useCallback(\n (newAggregations, added = [], removed = []) => {\n changeSettings({ aggregations: newAggregations }, added, removed);\n },\n [changeSettings]\n );\n\n const changeShowOnTop = useCallback(\n newShowOnTop => {\n changeSettings({ showOnTop: newShowOnTop });\n },\n [changeSettings]\n );\n\n const handleDragStart = useCallback(() => {\n log.debug('handleDragStart');\n\n DragUtils.startDragging();\n }, []);\n\n const handleDragEnd = useCallback(\n ({ destination, source }) => {\n log.debug('handleDragEnd', destination, source);\n\n DragUtils.stopDragging();\n\n if (destination === null) {\n return;\n }\n\n let destinationIndex = destination.index;\n if (source.index < destination.index) {\n destinationIndex += 1;\n }\n\n const newAggregations = [...aggregations];\n const draggedItems = DragUtils.reorder(\n newAggregations,\n selectedRanges,\n newAggregations,\n destinationIndex\n );\n const insertIndex = DragUtils.adjustDestinationIndex(\n destinationIndex,\n selectedRanges\n );\n const newSelectedRanges: Range[] = [\n [insertIndex, insertIndex + draggedItems.length - 1],\n ];\n changeAggregations(newAggregations);\n setSelectedRanges(newSelectedRanges);\n },\n [changeAggregations, aggregations, selectedRanges, setSelectedRanges]\n );\n\n const handleOperationChange = useCallback(\n operation => {\n setSelectedOperation(operation);\n },\n [setSelectedOperation]\n );\n\n const handleAdd = useCallback(() => {\n changeAggregations(\n [\n ...aggregations,\n { operation: selectedOperation, selected: [], invert: true },\n ],\n [selectedOperation]\n );\n }, [aggregations, selectedOperation, changeAggregations]);\n\n const handleDeleteClicked = useCallback(\n (itemIndex: ModelIndex) => {\n const [keep, remove] = aggregations.reduce(\n ([keepSoFar, removeSoFar], aggregation, index) => {\n if (index === itemIndex) {\n removeSoFar.push(aggregation.operation);\n } else {\n keepSoFar.push(aggregation);\n }\n return [keepSoFar, removeSoFar];\n },\n [[], []] as [Aggregation[], AggregationOperation[]]\n );\n changeAggregations(keep, [], remove);\n },\n [aggregations, changeAggregations]\n );\n\n const handleAggregationSelectionChange = useCallback(\n newSelectedRanges => {\n setSelectedRanges(newSelectedRanges);\n },\n [setSelectedRanges]\n );\n\n const handleAggregationSelect = useCallback(\n itemIndex => {\n const aggregation = aggregations[itemIndex];\n if (!AggregationUtils.isRollupOperation(aggregation.operation)) {\n onEdit(aggregation);\n }\n },\n [aggregations, onEdit]\n );\n\n const handleShowOnTopChange = useCallback(\n (value: string) => {\n changeShowOnTop(value === 'true');\n },\n [changeShowOnTop]\n );\n\n useEffect(\n function setDefaultOperation() {\n if (options.length > 0 && !options.includes(selectedOperation)) {\n setSelectedOperation(options[0]);\n }\n },\n [options, selectedOperation]\n );\n\n const renderAggregation = useCallback(\n ({\n item,\n itemIndex,\n isClone = false,\n selectedCount,\n }: DraggableRenderItemProps<Aggregation>) => {\n const text = item.operation;\n const badgeText = isClone ? `${selectedCount}` : undefined;\n const className = isClone ? 'item-list-item-clone' : undefined;\n const isRollupOperation = AggregationUtils.isRollupOperation(\n item.operation\n );\n const isRollupProhibited = AggregationUtils.isRollupProhibited(\n item.operation\n );\n const isEditable = !isClone && !isRollupOperation;\n return (\n <>\n <div\n className={classNames(\n 'item-list-item-content',\n 'draggable-item-list-item-content',\n className\n )}\n >\n <span className=\"title\">\n {text}\n {!isRollup && isRollupOperation && (\n <span className=\"small text-warning\">\n <FontAwesomeIcon icon={dhWarningFilled} /> Requires rollup\n </span>\n )}\n {isRollup && isRollupProhibited && (\n <span className=\"small text-warning\">\n <FontAwesomeIcon icon={dhWarningFilled} /> Not available on\n rollups\n </span>\n )}\n </span>\n {DraggableItemList.renderBadge({ text: badgeText })}\n {DraggableItemList.renderHandle()}\n </div>\n {!isClone && (\n <>\n <Button\n kind=\"ghost\"\n className=\"btn-edit\"\n icon={vsEdit}\n tooltip=\"Edit Columns\"\n onClick={() => onEdit(item)}\n disabled={!isEditable}\n />\n <Button\n kind=\"ghost\"\n className=\"btn-delete\"\n icon={vsTrash}\n tooltip=\"Delete Aggregation\"\n onClick={() => handleDeleteClicked(itemIndex)}\n />\n </>\n )}\n </>\n );\n },\n [handleDeleteClicked, onEdit, isRollup]\n );\n\n const isOptionsShown = options.length > 0;\n const isAggregationsShown = aggregations.length > 0;\n\n return (\n <div className=\"aggregations\">\n {isOptionsShown && (\n <div className=\"form-inline\">\n <Select onChange={handleOperationChange} value={selectedOperation}>\n {options.map(option => (\n <Option value={option} key={option}>\n {option}\n </Option>\n ))}\n </Select>\n <button\n type=\"button\"\n className=\"btn btn-link btn-add\"\n onClick={handleAdd}\n >\n <FontAwesomeIcon icon={dhNewCircleLargeFilled} />\n Add Aggregation\n </button>\n </div>\n )}\n {isOptionsShown && isAggregationsShown && <hr />}\n {isAggregationsShown && (\n <>\n {!isRollup && (\n <div>\n <label id=\"placement-options-label\">Placement:&nbsp;</label>\n <RadioGroup\n aria-labelledby=\"placement-options-label\"\n marginStart=\"size-125\"\n orientation=\"horizontal\"\n onChange={handleShowOnTopChange}\n value={`${showOnTop}`}\n >\n <Radio value=\"true\">Top</Radio>\n <Radio value=\"false\">Bottom</Radio>\n </RadioGroup>\n </div>\n )}\n <DragDropContext\n onDragStart={handleDragStart}\n onDragEnd={handleDragEnd}\n >\n <DraggableItemList<Aggregation>\n className=\"selected-aggregations\"\n itemCount={aggregations.length}\n items={aggregations}\n renderItem={renderAggregation}\n offset={0}\n onSelectionChange={handleAggregationSelectionChange}\n onSelect={handleAggregationSelect}\n selectedRanges={selectedRanges}\n isMultiSelect\n />\n </DragDropContext>\n </>\n )}\n </div>\n );\n}\n\nexport default Aggregations;\n"],"mappings":";;;;;AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,SAAS,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AACxE,SAASC,eAAe,QAAQ,qBAAqB;AACrD,OAAOC,UAAU,MAAM,YAAY;AACnC,SAASC,eAAe,QAAQ,gCAAgC;AAChE,SACEC,sBAAsB,EACtBC,OAAO,EACPC,MAAM,EACNC,eAAe,QACV,kBAAkB;AACzB,OAAOC,GAAG,MAAM,gBAAgB;AAChC,SACEC,iBAAiB,EACjBC,SAAS,EACTC,MAAM,EACNC,MAAM,EACNC,KAAK,EACLC,UAAU,EACVC,MAAM,QACD,uBAAuB;AAAC,OAIxBC,oBAAoB;AAAA,OACpBC,gBAAgB,IAAIC,kBAAkB;AAAA;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAG7C,IAAMC,GAAG,GAAGjB,GAAG,CAACkB,MAAM,CAAC,cAAc,CAAC;AAyBtC,SAASC,YAAYA,CAAAC,IAAA,EAMc;EAAA,IANb;IACpBC,QAAQ;IACRC,QAAQ;IACRC,QAAQ;IACRC,MAAM;IACNC;EACiB,CAAC,GAAAL,IAAA;EAClB,IAAM;IAAEM,YAAY;IAAEC;EAAU,CAAC,GAAGL,QAAQ;EAC5C,IAAMM,OAAO,GAAGrC,OAAO,CACrB,MACEmB,kBAAkB,CAACmB,MAAM,CACvBC,MAAM,IACJ,CAACJ,YAAY,CAACK,IAAI,CAACC,WAAW,IAAIA,WAAW,CAACC,SAAS,KAAKH,MAAM,CAAC,IACnE,EACEA,MAAM,KAAKtB,oBAAoB,CAAC0B,MAAM;EACtC;EACA;EACAT,EAAE,CAACjB,oBAAoB,CA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A,EAAC;UAAG,CAAO,CAAC,eAC/BrF,IAAA,CAACP,KAAK;YAAC8E,KAAK,EAAC,OAAO;YAAAc,QAAA,EAAC;UAAM,CAAO,CAAC;QAAA,CACzB,CAAC;MAAA,CACV,CACN,eACDrF,IAAA,CAACnB,eAAe;QACduH,WAAW,EAAE7D,eAAgB;QAC7B8D,SAAS,EAAE3D,aAAc;QAAA2C,QAAA,eAEzBrF,IAAA,CAACX,iBAAiB;UAChB6F,SAAS,EAAC,uBAAuB;UACjCoB,SAAS,EAAExF,YAAY,CAACkB,MAAO;UAC/BuE,KAAK,EAAEzF,YAAa;UACpB0F,UAAU,EAAE9B,iBAAkB;UAC9B+B,MAAM,EAAE,CAAE;UACVC,iBAAiB,EAAEvC,gCAAiC;UACpDwC,QAAQ,EAAEvC,uBAAwB;UAClC1C,cAAc,EAAEA,cAAe;UAC/BkF,aAAa;QAAA,CACd;MAAC,CACa,CAAC;IAAA,CAClB,CACH;EAAA,CACE,CAAC;AAEV;AAEA,eAAerG,YAAY","ignoreList":[]}
1
+ {"version":3,"file":"Aggregations.js","names":["React","useCallback","useEffect","useMemo","useState","DragDropContext","classNames","FontAwesomeIcon","dhNewCircleLargeFilled","vsTrash","vsEdit","dhWarningFilled","Log","DraggableItemList","DragUtils","Option","Select","Radio","RadioGroup","Button","AggregationOperation","AggregationUtils","SELECTABLE_OPTIONS","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","log","module","Aggregations","_ref","isRollup","settings","onChange","onEdit","dh","aggregations","showOnTop","options","filter","option","some","aggregation","operation","MEDIAN","undefined","selectedOperation","setSelectedOperation","selectedRanges","setSelectedRanges","changeSettings","changedSettings","added","arguments","length","removed","_objectSpread","changeAggregations","newAggregations","changeShowOnTop","newShowOnTop","handleDragStart","debug","startDragging","handleDragEnd","_ref2","destination","source","stopDragging","destinationIndex","index","draggedItems","reorder","insertIndex","adjustDestinationIndex","newSelectedRanges","handleOperationChange","handleAdd","selected","invert","handleDeleteClicked","itemIndex","keep","remove","reduce","_ref3","keepSoFar","removeSoFar","push","handleAggregationSelectionChange","handleAggregationSelect","isRollupOperation","handleShowOnTopChange","value","setDefaultOperation","includes","renderAggregation","_ref4","item","isClone","selectedCount","text","badgeText","concat","className","isRollupProhibited","isEditable","children","icon","renderBadge","renderHandle","kind","tooltip","onClick","disabled","isOptionsShown","isAggregationsShown","map","type","id","marginStart","orientation","onDragStart","onDragEnd","itemCount","items","renderItem","offset","onSelectionChange","onSelect","isMultiSelect"],"sources":["../../../src/sidebar/aggregations/Aggregations.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useMemo, useState } from 'react';\nimport { DragDropContext } from 'react-beautiful-dnd';\nimport classNames from 'classnames';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport {\n dhNewCircleLargeFilled,\n vsTrash,\n vsEdit,\n dhWarningFilled,\n} from '@deephaven/icons';\nimport Log from '@deephaven/log';\nimport {\n DraggableItemList,\n DragUtils,\n Option,\n Select,\n Radio,\n RadioGroup,\n Button,\n} from '@deephaven/components';\nimport type { DraggableRenderItemProps, Range } from '@deephaven/components';\nimport { type ModelIndex } from '@deephaven/grid';\nimport type { dh as DhType } from '@deephaven/jsapi-types';\nimport AggregationOperation from './AggregationOperation';\nimport AggregationUtils, { SELECTABLE_OPTIONS } from './AggregationUtils';\nimport './Aggregations.scss';\n\nconst log = Log.module('Aggregations');\n\nexport type Aggregation = {\n operation: AggregationOperation;\n selected: readonly string[];\n invert: boolean;\n};\n\nexport type AggregationSettings = {\n aggregations: readonly Aggregation[];\n showOnTop: boolean;\n};\n\nexport type AggregationsProps = {\n isRollup: boolean;\n settings: AggregationSettings;\n onChange: (\n settings: AggregationSettings,\n added: AggregationOperation[],\n removed: AggregationOperation[]\n ) => void;\n onEdit: (aggregation: Aggregation) => void;\n dh: typeof DhType;\n};\n\nfunction Aggregations({\n isRollup,\n settings,\n onChange,\n onEdit,\n dh,\n}: AggregationsProps): JSX.Element {\n const { aggregations, showOnTop } = settings;\n const options = useMemo(\n () =>\n SELECTABLE_OPTIONS.filter(\n option =>\n !aggregations.some(aggregation => aggregation.operation === option) &&\n !(\n option === AggregationOperation.MEDIAN &&\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore - MEDIAN is not defined in older version of Core\n dh.AggregationOperation.MEDIAN === undefined\n )\n ),\n [aggregations, dh]\n );\n const [selectedOperation, setSelectedOperation] = useState(options[0]);\n const [selectedRanges, setSelectedRanges] = useState<Range[]>([]);\n const changeSettings = useCallback(\n (changedSettings, added = [], removed = []) => {\n onChange({ ...settings, ...changedSettings }, added, removed);\n },\n [onChange, settings]\n );\n const changeAggregations = useCallback(\n (newAggregations, added = [], removed = []) => {\n changeSettings({ aggregations: newAggregations }, added, removed);\n },\n [changeSettings]\n );\n\n const changeShowOnTop = useCallback(\n newShowOnTop => {\n changeSettings({ showOnTop: newShowOnTop });\n },\n [changeSettings]\n );\n\n const handleDragStart = useCallback(() => {\n log.debug('handleDragStart');\n\n DragUtils.startDragging();\n }, []);\n\n const handleDragEnd = useCallback(\n ({ destination, source }) => {\n log.debug('handleDragEnd', destination, source);\n\n DragUtils.stopDragging();\n\n if (destination === null) {\n return;\n }\n\n let destinationIndex = destination.index;\n if (source.index < destination.index) {\n destinationIndex += 1;\n }\n\n const newAggregations = [...aggregations];\n const draggedItems = DragUtils.reorder(\n newAggregations,\n selectedRanges,\n newAggregations,\n destinationIndex\n );\n const insertIndex = DragUtils.adjustDestinationIndex(\n destinationIndex,\n selectedRanges\n );\n const newSelectedRanges: Range[] = [\n [insertIndex, insertIndex + draggedItems.length - 1],\n ];\n changeAggregations(newAggregations);\n setSelectedRanges(newSelectedRanges);\n },\n [changeAggregations, aggregations, selectedRanges, setSelectedRanges]\n );\n\n const handleOperationChange = useCallback(\n operation => {\n setSelectedOperation(operation);\n },\n [setSelectedOperation]\n );\n\n const handleAdd = useCallback(() => {\n changeAggregations(\n [\n ...aggregations,\n { operation: selectedOperation, selected: [], invert: true },\n ],\n [selectedOperation]\n );\n }, [aggregations, selectedOperation, changeAggregations]);\n\n const handleDeleteClicked = useCallback(\n (itemIndex: ModelIndex) => {\n const [keep, remove] = aggregations.reduce(\n ([keepSoFar, removeSoFar], aggregation, index) => {\n if (index === itemIndex) {\n removeSoFar.push(aggregation.operation);\n } else {\n keepSoFar.push(aggregation);\n }\n return [keepSoFar, removeSoFar];\n },\n [[], []] as [Aggregation[], AggregationOperation[]]\n );\n changeAggregations(keep, [], remove);\n },\n [aggregations, changeAggregations]\n );\n\n const handleAggregationSelectionChange = useCallback(\n newSelectedRanges => {\n setSelectedRanges(newSelectedRanges);\n },\n [setSelectedRanges]\n );\n\n const handleAggregationSelect = useCallback(\n itemIndex => {\n const aggregation = aggregations[itemIndex];\n if (!AggregationUtils.isRollupOperation(aggregation.operation)) {\n onEdit(aggregation);\n }\n },\n [aggregations, onEdit]\n );\n\n const handleShowOnTopChange = useCallback(\n (value: string) => {\n changeShowOnTop(value === 'true');\n },\n [changeShowOnTop]\n );\n\n useEffect(\n function setDefaultOperation() {\n if (options.length > 0 && !options.includes(selectedOperation)) {\n setSelectedOperation(options[0]);\n }\n },\n [options, selectedOperation]\n );\n\n const renderAggregation = useCallback(\n ({\n item,\n itemIndex,\n isClone = false,\n selectedCount,\n }: DraggableRenderItemProps<Aggregation>) => {\n const text = item.operation;\n const badgeText = isClone ? `${selectedCount}` : undefined;\n const className = isClone ? 'item-list-item-clone' : undefined;\n const isRollupOperation = AggregationUtils.isRollupOperation(\n item.operation\n );\n const isRollupProhibited = AggregationUtils.isRollupProhibited(\n item.operation\n );\n const isEditable = !isClone && !isRollupOperation;\n return (\n <>\n <div\n className={classNames(\n 'item-list-item-content',\n 'draggable-item-list-item-content',\n className\n )}\n >\n <span className=\"title\">\n {text}\n {!isRollup && isRollupOperation && (\n <span className=\"small text-warning\">\n <FontAwesomeIcon icon={dhWarningFilled} /> Requires rollup\n </span>\n )}\n {isRollup && isRollupProhibited && (\n <span className=\"small text-warning\">\n <FontAwesomeIcon icon={dhWarningFilled} /> Not available on\n rollups\n </span>\n )}\n </span>\n {DraggableItemList.renderBadge({ text: badgeText })}\n {DraggableItemList.renderHandle()}\n </div>\n {!isClone && (\n <>\n <Button\n kind=\"ghost\"\n className=\"btn-edit\"\n icon={vsEdit}\n tooltip=\"Edit Columns\"\n onClick={() => onEdit(item)}\n disabled={!isEditable}\n />\n <Button\n kind=\"ghost\"\n className=\"btn-delete\"\n icon={vsTrash}\n tooltip=\"Delete Aggregation\"\n onClick={() => handleDeleteClicked(itemIndex)}\n />\n </>\n )}\n </>\n );\n },\n [handleDeleteClicked, onEdit, isRollup]\n );\n\n const isOptionsShown = options.length > 0;\n const isAggregationsShown = aggregations.length > 0;\n\n return (\n <div className=\"aggregations\">\n {isOptionsShown && (\n <div className=\"form-inline\">\n <Select onChange={handleOperationChange} value={selectedOperation}>\n {options.map(option => (\n <Option value={option} key={option}>\n {option}\n </Option>\n ))}\n </Select>\n <button\n type=\"button\"\n className=\"btn btn-link btn-add\"\n onClick={handleAdd}\n >\n <FontAwesomeIcon icon={dhNewCircleLargeFilled} />\n Add Aggregation\n </button>\n </div>\n )}\n {isOptionsShown && isAggregationsShown && <hr />}\n {isAggregationsShown && (\n <>\n {!isRollup && (\n <div>\n <label id=\"placement-options-label\">Placement:&nbsp;</label>\n <RadioGroup\n aria-labelledby=\"placement-options-label\"\n marginStart=\"size-125\"\n orientation=\"horizontal\"\n onChange={handleShowOnTopChange}\n value={`${showOnTop}`}\n >\n <Radio value=\"true\">Top</Radio>\n <Radio value=\"false\">Bottom</Radio>\n </RadioGroup>\n </div>\n )}\n <DragDropContext\n onDragStart={handleDragStart}\n onDragEnd={handleDragEnd}\n >\n <DraggableItemList<Aggregation>\n className=\"selected-aggregations\"\n itemCount={aggregations.length}\n items={aggregations}\n renderItem={renderAggregation}\n offset={0}\n onSelectionChange={handleAggregationSelectionChange}\n onSelect={handleAggregationSelect}\n selectedRanges={selectedRanges}\n isMultiSelect\n />\n </DragDropContext>\n </>\n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AAM,CAAO,CAAC;QAAA,CACzB,CAAC;MAAA,CACV,CACN,eACDrF,IAAA,CAACnB,eAAe;QACduH,WAAW,EAAE7D,eAAgB;QAC7B8D,SAAS,EAAE3D,aAAc;QAAA2C,QAAA,eAEzBrF,IAAA,CAACX,iBAAiB;UAChB6F,SAAS,EAAC,uBAAuB;UACjCoB,SAAS,EAAExF,YAAY,CAACkB,MAAO;UAC/BuE,KAAK,EAAEzF,YAAa;UACpB0F,UAAU,EAAE9B,iBAAkB;UAC9B+B,MAAM,EAAE,CAAE;UACVC,iBAAiB,EAAEvC,gCAAiC;UACpDwC,QAAQ,EAAEvC,uBAAwB;UAClC1C,cAAc,EAAEA,cAAe;UAC/BkF,aAAa;QAAA,CACd;MAAC,CACa,CAAC;IAAA,CAClB,CACH;EAAA,CACE,CAAC;AAEV;AAEA,eAAerG,YAAY"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["default","AggregationOperation","AggregationUtils"],"sources":["../../../src/sidebar/aggregations/index.ts"],"sourcesContent":["export * from './Aggregations';\nexport { default as AggregationOperation } from './AggregationOperation';\nexport { default as AggregationUtils } from './AggregationUtils';\n"],"mappings":";SACSA,OAAO,IAAIC,oBAAoB;AAAA,SAC/BD,OAAO,IAAIE,gBAAgB","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["default","AggregationOperation","AggregationUtils"],"sources":["../../../src/sidebar/aggregations/index.ts"],"sourcesContent":["export * from './Aggregations';\nexport { default as AggregationOperation } from './AggregationOperation';\nexport { default as AggregationUtils } from './AggregationUtils';\n"],"mappings":";SACSA,OAAO,IAAIC,oBAAoB;AAAA,SAC/BD,OAAO,IAAIE,gBAAgB"}