@deephaven/iris-grid 0.16.1-beta.0 → 0.16.1-vite.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AdvancedFilterCreator.js.map +1 -1
- package/dist/AdvancedFilterCreatorFilterItem.js.map +1 -1
- package/dist/AdvancedFilterCreatorSelectValue.js.map +1 -1
- package/dist/AdvancedFilterCreatorSelectValueList.js.map +1 -1
- package/dist/ColumnHeaderGroup.js.map +1 -1
- package/dist/ColumnStatistics.js.map +1 -1
- package/dist/CommonTypes.js.map +1 -1
- package/dist/CrossColumnSearch.js.map +1 -1
- package/dist/FilterInputField.js.map +1 -1
- package/dist/GotoRow.js.map +1 -1
- package/dist/IrisGrid.js.map +1 -1
- package/dist/IrisGridBottomBar.js.map +1 -1
- package/dist/IrisGridCellOverflowModal.js.map +1 -1
- package/dist/IrisGridCopyHandler.js.map +1 -1
- package/dist/IrisGridMetricCalculator.js.map +1 -1
- package/dist/IrisGridModel.js.map +1 -1
- package/dist/IrisGridModelFactory.js.map +1 -1
- package/dist/IrisGridModelUpdater.js.map +1 -1
- package/dist/IrisGridPartitionSelector.js.map +1 -1
- package/dist/IrisGridProxyModel.js.map +1 -1
- package/dist/IrisGridRenderer.js.map +1 -1
- package/dist/IrisGridShortcuts.js.map +1 -1
- package/dist/IrisGridTableModel.js.map +1 -1
- package/dist/IrisGridTableModelTemplate.js.map +1 -1
- package/dist/IrisGridTestUtils.js.map +1 -1
- package/dist/IrisGridTheme.js.map +1 -1
- package/dist/IrisGridTreeTableModel.js.map +1 -1
- package/dist/IrisGridUtils.js.map +1 -1
- package/dist/MissingKeyError.js.map +1 -1
- package/dist/PartitionSelectorSearch.js.map +1 -1
- package/dist/PendingDataBottomBar.js.map +1 -1
- package/dist/TableViewportUpdater.js.map +1 -1
- package/dist/ToastBottomBar.js.map +1 -1
- package/dist/TreeTableViewportUpdater.js.map +1 -1
- package/dist/declaration.d.js.map +1 -1
- package/dist/format-context-menus/CustomFormatAction.js.map +1 -1
- package/dist/format-context-menus/DateTimeFormatContextMenu.js.map +1 -1
- package/dist/format-context-menus/DecimalFormatContextMenu.js.map +1 -1
- package/dist/format-context-menus/FormatContextMenuUtils.js.map +1 -1
- package/dist/format-context-menus/IntegerFormatContextMenu.js.map +1 -1
- package/dist/format-context-menus/index.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/key-handlers/ClearFilterKeyHandler.js.map +1 -1
- package/dist/key-handlers/CopyKeyHandler.js.map +1 -1
- package/dist/key-handlers/ReverseKeyHandler.js.map +1 -1
- package/dist/key-handlers/index.js.map +1 -1
- package/dist/mousehandlers/IrisGridCellOverflowMouseHandler.js.map +1 -1
- package/dist/mousehandlers/IrisGridColumnSelectMouseHandler.js.map +1 -1
- package/dist/mousehandlers/IrisGridColumnTooltipMouseHandler.js.map +1 -1
- package/dist/mousehandlers/IrisGridContextMenuHandler.js.map +1 -1
- package/dist/mousehandlers/IrisGridDataSelectMouseHandler.js.map +1 -1
- package/dist/mousehandlers/IrisGridFilterMouseHandler.js.map +1 -1
- package/dist/mousehandlers/IrisGridSortMouseHandler.js.map +1 -1
- package/dist/mousehandlers/PendingMouseHandler.js.map +1 -1
- package/dist/mousehandlers/index.js.map +1 -1
- package/dist/sidebar/AdvancedSettings.js.map +1 -1
- package/dist/sidebar/AdvancedSettingsMenu.js.map +1 -1
- package/dist/sidebar/AdvancedSettingsType.js.map +1 -1
- package/dist/sidebar/ChartBuilder.js.map +1 -1
- package/dist/sidebar/CustomColumnBuilder.js +1 -1
- package/dist/sidebar/CustomColumnBuilder.js.map +1 -1
- package/dist/sidebar/CustomColumnInput.js +1 -1
- package/dist/sidebar/CustomColumnInput.js.map +1 -1
- package/dist/sidebar/InputEditor.js.map +1 -1
- package/dist/sidebar/OptionType.js.map +1 -1
- package/dist/sidebar/RollupRows.js +1 -1
- package/dist/sidebar/RollupRows.js.map +1 -1
- package/dist/sidebar/SelectDistinctBuilder.js.map +1 -1
- package/dist/sidebar/TableCsvExporter.js.map +1 -1
- package/dist/sidebar/TableSaver.js.map +1 -1
- package/dist/sidebar/VisibilityOrderingBuilder.js +1 -1
- package/dist/sidebar/VisibilityOrderingBuilder.js.map +1 -1
- package/dist/sidebar/aggregations/AggregationEdit.js.map +1 -1
- package/dist/sidebar/aggregations/AggregationOperation.js.map +1 -1
- package/dist/sidebar/aggregations/AggregationUtils.js.map +1 -1
- package/dist/sidebar/aggregations/Aggregations.js.map +1 -1
- package/dist/sidebar/aggregations/index.js.map +1 -1
- package/dist/sidebar/conditional-formatting/ColumnFormatEditor.js.map +1 -1
- package/dist/sidebar/conditional-formatting/ConditionEditor.js.map +1 -1
- package/dist/sidebar/conditional-formatting/ConditionalFormatEditor.js.map +1 -1
- package/dist/sidebar/conditional-formatting/ConditionalFormattingAPIUtils.js.map +1 -1
- package/dist/sidebar/conditional-formatting/ConditionalFormattingMenu.js +1 -1
- package/dist/sidebar/conditional-formatting/ConditionalFormattingMenu.js.map +1 -1
- package/dist/sidebar/conditional-formatting/ConditionalFormattingUtils.js.map +1 -1
- package/dist/sidebar/conditional-formatting/RowFormatEditor.js.map +1 -1
- package/dist/sidebar/conditional-formatting/StyleEditor.js.map +1 -1
- package/dist/sidebar/icons/BarIcon.js +1 -1
- package/dist/sidebar/icons/BarIcon.js.map +1 -1
- package/dist/sidebar/icons/FormatColumnWhereIcon.js +1 -1
- package/dist/sidebar/icons/FormatColumnWhereIcon.js.map +1 -1
- package/dist/sidebar/icons/FormatRowWhereIcon.js +1 -1
- package/dist/sidebar/icons/FormatRowWhereIcon.js.map +1 -1
- package/dist/sidebar/icons/HistogramIcon.js +1 -1
- package/dist/sidebar/icons/HistogramIcon.js.map +1 -1
- package/dist/sidebar/icons/LineIcon.js +1 -1
- package/dist/sidebar/icons/LineIcon.js.map +1 -1
- package/dist/sidebar/icons/PieIcon.js +1 -1
- package/dist/sidebar/icons/PieIcon.js.map +1 -1
- package/dist/sidebar/icons/ScatterIcon.js +1 -1
- package/dist/sidebar/icons/ScatterIcon.js.map +1 -1
- package/dist/sidebar/icons/index.js.map +1 -1
- package/dist/sidebar/index.js.map +1 -1
- package/package.json +16 -16
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/PartitionSelectorSearch.tsx"],"names":["React","Component","PropTypes","debounce","dh","ItemList","LoadingSpinner","Log","CanceledPromiseError","log","module","DEBOUNCE_UPDATE_FILTER","PartitionSelectorSearch","handleError","error","constructor","props","updateFilter","handleFilterChange","bind","handleInputFocus","handleKeyDown","handleListKeydown","handleSelect","handleTableUpdate","handleTextChange","handleViewportChange","itemList","searchInput","timer","state","offset","itemCount","items","text","isLoading","componentDidMount","startListening","componentDidUpdate","prevProps","prevState","onListResized","componentWillUnmount","debounceUpdateFilter","cancel","stopListening","event","key","selectedValue","length","value","trim","onSelect","stopPropagation","preventDefault","focusItem","focus","debug2","table","size","setState","itemIndex","offsetIndex","data","detail","getFormattedString","column","columns","r","rows","row","get","displayValue","type","name","push","target","topRow","bottomRow","delta","Math","max","top","bottom","setViewport","initialPageSize","addEventListener","Table","EVENT_UPDATED","EVENT_FILTERCHANGED","removeEventListener","filterText","filters","filter","invoke","FilterValue","ofString","applyFilter","render","listHeight","min","MAX_VISIBLE_ITEMS","DEFAULT_ROW_HEIGHT","height","undefined","func","isRequired","shape","arrayOf","string","number"],"mappings":";;AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,QAAP,MAAqB,iBAArB;AACA,OAAOC,EAAP,MAA0B,uBAA1B;AACA,SAASC,QAAT,EAAmBC,cAAnB,QAAyC,uBAAzC;AACA,OAAOC,GAAP,MAAgB,gBAAhB;AACA,SAASC,oBAAT,QAAqC,kBAArC;;AAIA,IAAMC,GAAG,GAAGF,GAAG,CAACG,MAAJ,CAAW,yBAAX,CAAZ;AACA,IAAMC,sBAAsB,GAAG,GAA/B;;AAqBA,MAAMC,uBAAN,SAAyCX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,eAAe,EAAE,GADG;AAEpBjC,EAAAA,QAAQ,EAAE,MAAYoD,SAFF;AAGpB/D,EAAAA,aAAa,EAAE,MAAY+D;AAHP,C;;gBANlB5F,uB,eAYe;AACjBqD,EAAAA,kBAAkB,EAAE/D,SAAS,CAACuG,IAAV,CAAeC,UADlB;AAEjBhD,EAAAA,KAAK,EAAExD,SAAS,CAACyG,KAAV,CAAgB;AACrBrB,IAAAA,gBAAgB,EAAEpF,SAAS,CAACuG,IAAV,CAAeC,UADZ;AAErBhB,IAAAA,mBAAmB,EAAExF,SAAS,CAACuG,IAAV,CAAeC,UAFf;AAGrBvC,IAAAA,OAAO,EAAEjE,SAAS,CAAC0G,OAAV,CACP1G,SAAS,CAACyG,KAAV,CAAgB;AACdjC,MAAAA,IAAI,EAAExE,SAAS,CAAC2G,MAAV,CAAiBH,UADT;AAEdjC,MAAAA,IAAI,EAAEvE,SAAS,CAAC2G,MAAV,CAAiBH,UAFT;AAGdb,MAAAA,MAAM,EAAE3F,SAAS,CAACuG,IAAV,CAAeC;AAHT,KAAhB,CADO,CAHY;AAUrB/C,IAAAA,IAAI,EAAEzD,SAAS,CAAC4G,MAAV,CAAiBJ,UAVF;AAWrBT,IAAAA,WAAW,EAAE/F,SAAS,CAACuG,IAAV,CAAeC,UAXP;AAYrBtB,IAAAA,WAAW,EAAElF,SAAS,CAACuG,IAAV,CAAeC;AAZP,GAAhB,EAaJA,UAfc;AAgBjBrB,EAAAA,eAAe,EAAEnF,SAAS,CAAC4G,MAhBV;AAiBjB1D,EAAAA,QAAQ,EAAElD,SAAS,CAACuG,IAjBH;AAkBjBhE,EAAAA,aAAa,EAAEvC,SAAS,CAACuG;AAlBR,C;;AAuTrB,eAAe7F,uBAAf","sourcesContent":["import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport debounce from 'lodash.debounce';\nimport dh, { Table } from '@deephaven/jsapi-shim';\nimport { ItemList, LoadingSpinner } from '@deephaven/components';\nimport Log from '@deephaven/log';\nimport { CanceledPromiseError } from '@deephaven/utils';\nimport './PartitionSelectorSearch.scss';\nimport { ModelIndex } from '@deephaven/grid';\n\nconst log = Log.module('PartitionSelectorSearch');\nconst DEBOUNCE_UPDATE_FILTER = 150;\n\ninterface Item {\n value: string;\n displayValue: string;\n}\n\ninterface PartitionSelectorSearchProps<T> {\n getFormattedString: (value: T, type: string, name: string) => string;\n table: Table;\n initialPageSize: number;\n onSelect: (value: string) => void;\n onListResized: () => void;\n}\ninterface PartitionSelectorSearchState {\n offset: number;\n itemCount: number;\n items: Item[];\n text: string;\n isLoading: boolean;\n}\nclass PartitionSelectorSearch<T> extends Component<\n PartitionSelectorSearchProps<T>,\n PartitionSelectorSearchState\n> {\n static MAX_VISIBLE_ITEMS = 12;\n\n static defaultProps = {\n initialPageSize: 100,\n onSelect: (): void => undefined,\n onListResized: (): void => undefined,\n };\n\n static propTypes = {\n getFormattedString: PropTypes.func.isRequired,\n table: PropTypes.shape({\n addEventListener: PropTypes.func.isRequired,\n removeEventListener: PropTypes.func.isRequired,\n columns: PropTypes.arrayOf(\n PropTypes.shape({\n name: PropTypes.string.isRequired,\n type: PropTypes.string.isRequired,\n filter: PropTypes.func.isRequired,\n })\n ),\n size: PropTypes.number.isRequired,\n applyFilter: PropTypes.func.isRequired,\n setViewport: PropTypes.func.isRequired,\n }).isRequired,\n initialPageSize: PropTypes.number,\n onSelect: PropTypes.func,\n onListResized: PropTypes.func,\n };\n\n static handleError(error: unknown): void {\n if (!(error instanceof CanceledPromiseError)) {\n log.error(error);\n }\n }\n\n constructor(props: PartitionSelectorSearchProps<T>) {\n super(props);\n\n this.handleFilterChange = this.handleFilterChange.bind(this);\n this.handleInputFocus = this.handleInputFocus.bind(this);\n this.handleKeyDown = this.handleKeyDown.bind(this);\n this.handleListKeydown = this.handleListKeydown.bind(this);\n this.handleSelect = this.handleSelect.bind(this);\n this.handleTableUpdate = this.handleTableUpdate.bind(this);\n this.handleTextChange = this.handleTextChange.bind(this);\n this.handleViewportChange = this.handleViewportChange.bind(this);\n\n this.itemList = null;\n this.searchInput = null;\n this.timer = null;\n\n this.state = {\n offset: 0,\n itemCount: 0,\n items: [],\n text: '',\n isLoading: true,\n };\n }\n\n componentDidMount(): void {\n this.startListening();\n }\n\n componentDidUpdate(\n prevProps: PartitionSelectorSearchProps<T>,\n prevState: PartitionSelectorSearchState\n ): void {\n const { isLoading, itemCount } = this.state;\n const { onListResized } = this.props;\n if (\n itemCount !== prevState.itemCount ||\n isLoading !== prevState.isLoading\n ) {\n onListResized();\n }\n }\n\n componentWillUnmount(): void {\n this.debounceUpdateFilter.cancel();\n\n this.stopListening();\n }\n\n itemList: ItemList<Item> | null;\n\n searchInput: HTMLInputElement | null;\n\n timer: null;\n\n handleKeyDown(event: React.KeyboardEvent<HTMLInputElement>): boolean {\n if (this.itemList == null) {\n return false;\n }\n\n const { items, itemCount } = this.state;\n switch (event.key) {\n case 'Enter': {\n let selectedValue = null;\n if (items.length > 0) {\n selectedValue = items[0].value;\n } else {\n const { text } = this.state;\n selectedValue = text.trim();\n }\n\n if (selectedValue.length > 0) {\n const { onSelect } = this.props;\n onSelect(selectedValue);\n }\n\n event.stopPropagation();\n event.preventDefault();\n return true;\n }\n case 'ArrowDown':\n if (itemCount > 0) {\n this.itemList.focusItem(1);\n }\n event.stopPropagation();\n event.preventDefault();\n return true;\n default:\n return false;\n }\n }\n\n handleListKeydown(event: React.KeyboardEvent<HTMLDivElement>): void {\n switch (event.key) {\n case 'Escape':\n // Do nothing\n break;\n default:\n this.focus();\n break;\n }\n }\n\n handleFilterChange(): void {\n log.debug2('handleFilterChange');\n\n const { table } = this.props;\n const itemCount = table.size;\n this.setState({ itemCount, isLoading: true });\n }\n\n handleInputFocus(): void {\n if (this.itemList) {\n this.itemList.focusItem(0);\n }\n }\n\n handleSelect(itemIndex: ModelIndex): void {\n log.debug2('handleSelect', itemIndex);\n\n const { onSelect } = this.props;\n const { offset, items } = this.state;\n const offsetIndex = itemIndex - offset;\n if (offsetIndex < 0 || items.length <= offsetIndex) {\n log.error('No data for item', itemIndex);\n return;\n }\n\n const { value } = items[offsetIndex];\n onSelect(value);\n }\n\n handleTableUpdate(event: CustomEvent): void {\n const data = event.detail;\n const { offset } = data;\n\n const items = [] as Item[];\n const { getFormattedString, table } = this.props;\n const column = table.columns[0];\n for (let r = 0; r < data.rows.length; r += 1) {\n const row = data.rows[r];\n const value = row.get(column);\n const displayValue = getFormattedString(value, column.type, column.name);\n items.push({\n displayValue,\n value,\n });\n }\n\n const itemCount = table.size;\n log.debug2('handleTableUpdate', itemCount, offset, items.length);\n this.setState({ itemCount, items, offset, isLoading: false });\n }\n\n handleTextChange(event: React.ChangeEvent<HTMLInputElement>): void {\n log.debug2('handleTextChange');\n\n const { value: text } = event.target;\n\n this.setState({ text });\n\n this.debounceUpdateFilter();\n }\n\n handleViewportChange(topRow: number, bottomRow: number): void {\n log.debug2('handleViewportChange', topRow, bottomRow);\n\n const delta = Math.max(1, bottomRow - topRow);\n const top = Math.max(0, topRow - delta);\n const bottom = bottomRow + delta;\n\n const { table } = this.props;\n table.setViewport(top, bottom);\n }\n\n debounceUpdateFilter = debounce((): void => {\n this.updateFilter();\n }, DEBOUNCE_UPDATE_FILTER);\n\n focus(): void {\n if (this.searchInput) {\n this.searchInput.focus();\n }\n }\n\n startListening(): void {\n const { initialPageSize, table } = this.props;\n table.addEventListener(dh.Table.EVENT_UPDATED, this.handleTableUpdate);\n table.addEventListener(\n dh.Table.EVENT_FILTERCHANGED,\n this.handleFilterChange\n );\n table.setViewport(0, initialPageSize);\n }\n\n stopListening(): void {\n const { table } = this.props;\n table.removeEventListener(dh.Table.EVENT_UPDATED, this.handleTableUpdate);\n table.removeEventListener(\n dh.Table.EVENT_FILTERCHANGED,\n this.handleFilterChange\n );\n }\n\n updateFilter(): void {\n const { initialPageSize, table } = this.props;\n const { text } = this.state;\n const filterText = text.trim();\n const filters = [];\n if (filterText.length > 0) {\n const column = table.columns[0];\n const filter = column\n .filter()\n .invoke(\n 'matches',\n dh.FilterValue.ofString(`(?s)(?i).*\\\\Q${filterText}\\\\E.*`)\n );\n filters.push(filter);\n }\n\n log.debug2('updateFilter', filters);\n\n table.applyFilter(filters);\n table.setViewport(0, initialPageSize);\n }\n\n render(): JSX.Element {\n const { isLoading, itemCount, items, offset, text } = this.state;\n const listHeight =\n Math.min(itemCount, PartitionSelectorSearch.MAX_VISIBLE_ITEMS) *\n ItemList.DEFAULT_ROW_HEIGHT +\n // Adjust for ListItem vertical padding - .375rem ~ 5.25px\n 11;\n return (\n <div className=\"iris-grid-partition-selector-search\">\n <div className=\"search-container\">\n <input\n type=\"text\"\n ref={searchInput => {\n this.searchInput = searchInput;\n }}\n value={text}\n placeholder=\"Available Partitions\"\n onChange={this.handleTextChange}\n onFocus={this.handleInputFocus}\n onKeyDown={this.handleKeyDown}\n className=\"form-control input-partition\"\n />\n </div>\n {!isLoading && itemCount > 0 && (\n <div\n className=\"iris-grid-partition-selector-search-list\"\n onKeyDown={this.handleListKeydown}\n role=\"presentation\"\n style={{ height: listHeight }}\n >\n <ItemList\n ref={itemList => {\n this.itemList = itemList;\n }}\n itemCount={itemCount}\n items={items}\n offset={offset}\n onSelect={this.handleSelect}\n onViewportChange={this.handleViewportChange}\n />\n </div>\n )}\n {!isLoading && itemCount === 0 && (\n <div className=\"iris-grid-partition-selector-search-empty\">\n No results\n </div>\n )}\n {isLoading && (\n <div className=\"iris-grid-partition-selector-loading\">\n <LoadingSpinner />\n Loading...\n </div>\n )}\n </div>\n );\n }\n}\n\nexport default PartitionSelectorSearch;\n"],"file":"PartitionSelectorSearch.js"}
|
|
1
|
+
{"version":3,"file":"PartitionSelectorSearch.js","names":["React","Component","PropTypes","debounce","dh","ItemList","LoadingSpinner","Log","CanceledPromiseError","log","module","DEBOUNCE_UPDATE_FILTER","PartitionSelectorSearch","handleError","error","constructor","props","updateFilter","handleFilterChange","bind","handleInputFocus","handleKeyDown","handleListKeydown","handleSelect","handleTableUpdate","handleTextChange","handleViewportChange","itemList","searchInput","timer","state","offset","itemCount","items","text","isLoading","componentDidMount","startListening","componentDidUpdate","prevProps","prevState","onListResized","componentWillUnmount","debounceUpdateFilter","cancel","stopListening","event","key","selectedValue","length","value","trim","onSelect","stopPropagation","preventDefault","focusItem","focus","debug2","table","size","setState","itemIndex","offsetIndex","data","detail","getFormattedString","column","columns","r","rows","row","get","displayValue","type","name","push","target","topRow","bottomRow","delta","Math","max","top","bottom","setViewport","initialPageSize","addEventListener","Table","EVENT_UPDATED","EVENT_FILTERCHANGED","removeEventListener","filterText","filters","filter","invoke","FilterValue","ofString","applyFilter","render","listHeight","min","MAX_VISIBLE_ITEMS","DEFAULT_ROW_HEIGHT","height","undefined","func","isRequired","shape","arrayOf","string","number"],"sources":["../src/PartitionSelectorSearch.tsx"],"sourcesContent":["import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport debounce from 'lodash.debounce';\nimport dh, { Table } from '@deephaven/jsapi-shim';\nimport { ItemList, LoadingSpinner } from '@deephaven/components';\nimport Log from '@deephaven/log';\nimport { CanceledPromiseError } from '@deephaven/utils';\nimport './PartitionSelectorSearch.scss';\nimport { ModelIndex } from '@deephaven/grid';\n\nconst log = Log.module('PartitionSelectorSearch');\nconst DEBOUNCE_UPDATE_FILTER = 150;\n\ninterface Item {\n value: string;\n displayValue: string;\n}\n\ninterface PartitionSelectorSearchProps<T> {\n getFormattedString: (value: T, type: string, name: string) => string;\n table: Table;\n initialPageSize: number;\n onSelect: (value: string) => void;\n onListResized: () => void;\n}\ninterface PartitionSelectorSearchState {\n offset: number;\n itemCount: number;\n items: Item[];\n text: string;\n isLoading: boolean;\n}\nclass PartitionSelectorSearch<T> extends Component<\n PartitionSelectorSearchProps<T>,\n PartitionSelectorSearchState\n> {\n static MAX_VISIBLE_ITEMS = 12;\n\n static defaultProps = {\n initialPageSize: 100,\n onSelect: (): void => undefined,\n onListResized: (): void => undefined,\n };\n\n static propTypes = {\n getFormattedString: PropTypes.func.isRequired,\n table: PropTypes.shape({\n addEventListener: PropTypes.func.isRequired,\n removeEventListener: PropTypes.func.isRequired,\n columns: PropTypes.arrayOf(\n PropTypes.shape({\n name: PropTypes.string.isRequired,\n type: PropTypes.string.isRequired,\n filter: PropTypes.func.isRequired,\n })\n ),\n size: PropTypes.number.isRequired,\n applyFilter: PropTypes.func.isRequired,\n setViewport: PropTypes.func.isRequired,\n }).isRequired,\n initialPageSize: PropTypes.number,\n onSelect: PropTypes.func,\n onListResized: PropTypes.func,\n };\n\n static handleError(error: unknown): void {\n if (!(error instanceof CanceledPromiseError)) {\n log.error(error);\n }\n }\n\n constructor(props: PartitionSelectorSearchProps<T>) {\n super(props);\n\n this.handleFilterChange = this.handleFilterChange.bind(this);\n this.handleInputFocus = this.handleInputFocus.bind(this);\n this.handleKeyDown = this.handleKeyDown.bind(this);\n this.handleListKeydown = this.handleListKeydown.bind(this);\n this.handleSelect = this.handleSelect.bind(this);\n this.handleTableUpdate = this.handleTableUpdate.bind(this);\n this.handleTextChange = this.handleTextChange.bind(this);\n this.handleViewportChange = this.handleViewportChange.bind(this);\n\n this.itemList = null;\n this.searchInput = null;\n this.timer = null;\n\n this.state = {\n offset: 0,\n itemCount: 0,\n items: [],\n text: '',\n isLoading: true,\n };\n }\n\n componentDidMount(): void {\n this.startListening();\n }\n\n componentDidUpdate(\n prevProps: PartitionSelectorSearchProps<T>,\n prevState: PartitionSelectorSearchState\n ): void {\n const { isLoading, itemCount } = this.state;\n const { onListResized } = this.props;\n if (\n itemCount !== prevState.itemCount ||\n isLoading !== prevState.isLoading\n ) {\n onListResized();\n }\n }\n\n componentWillUnmount(): void {\n this.debounceUpdateFilter.cancel();\n\n this.stopListening();\n }\n\n itemList: ItemList<Item> | null;\n\n searchInput: HTMLInputElement | null;\n\n timer: null;\n\n handleKeyDown(event: React.KeyboardEvent<HTMLInputElement>): boolean {\n if (this.itemList == null) {\n return false;\n }\n\n const { items, itemCount } = this.state;\n switch (event.key) {\n case 'Enter': {\n let selectedValue = null;\n if (items.length > 0) {\n selectedValue = items[0].value;\n } else {\n const { text } = this.state;\n selectedValue = text.trim();\n }\n\n if (selectedValue.length > 0) {\n const { onSelect } = this.props;\n onSelect(selectedValue);\n }\n\n event.stopPropagation();\n event.preventDefault();\n return true;\n }\n case 'ArrowDown':\n if (itemCount > 0) {\n this.itemList.focusItem(1);\n }\n event.stopPropagation();\n event.preventDefault();\n return true;\n default:\n return false;\n }\n }\n\n handleListKeydown(event: React.KeyboardEvent<HTMLDivElement>): void {\n switch (event.key) {\n case 'Escape':\n // Do nothing\n break;\n default:\n this.focus();\n break;\n }\n }\n\n handleFilterChange(): void {\n log.debug2('handleFilterChange');\n\n const { table } = this.props;\n const itemCount = table.size;\n this.setState({ itemCount, isLoading: true });\n }\n\n handleInputFocus(): void {\n if (this.itemList) {\n this.itemList.focusItem(0);\n }\n }\n\n handleSelect(itemIndex: ModelIndex): void {\n log.debug2('handleSelect', itemIndex);\n\n const { onSelect } = this.props;\n const { offset, items } = this.state;\n const offsetIndex = itemIndex - offset;\n if (offsetIndex < 0 || items.length <= offsetIndex) {\n log.error('No data for item', itemIndex);\n return;\n }\n\n const { value } = items[offsetIndex];\n onSelect(value);\n }\n\n handleTableUpdate(event: CustomEvent): void {\n const data = event.detail;\n const { offset } = data;\n\n const items = [] as Item[];\n const { getFormattedString, table } = this.props;\n const column = table.columns[0];\n for (let r = 0; r < data.rows.length; r += 1) {\n const row = data.rows[r];\n const value = row.get(column);\n const displayValue = getFormattedString(value, column.type, column.name);\n items.push({\n displayValue,\n value,\n });\n }\n\n const itemCount = table.size;\n log.debug2('handleTableUpdate', itemCount, offset, items.length);\n this.setState({ itemCount, items, offset, isLoading: false });\n }\n\n handleTextChange(event: React.ChangeEvent<HTMLInputElement>): void {\n log.debug2('handleTextChange');\n\n const { value: text } = event.target;\n\n this.setState({ text });\n\n this.debounceUpdateFilter();\n }\n\n handleViewportChange(topRow: number, bottomRow: number): void {\n log.debug2('handleViewportChange', topRow, bottomRow);\n\n const delta = Math.max(1, bottomRow - topRow);\n const top = Math.max(0, topRow - delta);\n const bottom = bottomRow + delta;\n\n const { table } = this.props;\n table.setViewport(top, bottom);\n }\n\n debounceUpdateFilter = debounce((): void => {\n this.updateFilter();\n }, DEBOUNCE_UPDATE_FILTER);\n\n focus(): void {\n if (this.searchInput) {\n this.searchInput.focus();\n }\n }\n\n startListening(): void {\n const { initialPageSize, table } = this.props;\n table.addEventListener(dh.Table.EVENT_UPDATED, this.handleTableUpdate);\n table.addEventListener(\n dh.Table.EVENT_FILTERCHANGED,\n this.handleFilterChange\n );\n table.setViewport(0, initialPageSize);\n }\n\n stopListening(): void {\n const { table } = this.props;\n table.removeEventListener(dh.Table.EVENT_UPDATED, this.handleTableUpdate);\n table.removeEventListener(\n dh.Table.EVENT_FILTERCHANGED,\n this.handleFilterChange\n );\n }\n\n updateFilter(): void {\n const { initialPageSize, table } = this.props;\n const { text } = this.state;\n const filterText = text.trim();\n const filters = [];\n if (filterText.length > 0) {\n const column = table.columns[0];\n const filter = column\n .filter()\n .invoke(\n 'matches',\n dh.FilterValue.ofString(`(?s)(?i).*\\\\Q${filterText}\\\\E.*`)\n );\n filters.push(filter);\n }\n\n log.debug2('updateFilter', filters);\n\n table.applyFilter(filters);\n table.setViewport(0, initialPageSize);\n }\n\n render(): JSX.Element {\n const { isLoading, itemCount, items, offset, text } = this.state;\n const listHeight =\n Math.min(itemCount, PartitionSelectorSearch.MAX_VISIBLE_ITEMS) *\n ItemList.DEFAULT_ROW_HEIGHT +\n // Adjust for ListItem vertical padding - .375rem ~ 5.25px\n 11;\n return (\n <div className=\"iris-grid-partition-selector-search\">\n <div className=\"search-container\">\n <input\n type=\"text\"\n ref={searchInput => {\n this.searchInput = searchInput;\n }}\n value={text}\n placeholder=\"Available Partitions\"\n onChange={this.handleTextChange}\n onFocus={this.handleInputFocus}\n onKeyDown={this.handleKeyDown}\n className=\"form-control input-partition\"\n />\n </div>\n {!isLoading && itemCount > 0 && (\n <div\n className=\"iris-grid-partition-selector-search-list\"\n onKeyDown={this.handleListKeydown}\n role=\"presentation\"\n style={{ height: listHeight }}\n >\n <ItemList\n ref={itemList => {\n this.itemList = itemList;\n }}\n itemCount={itemCount}\n items={items}\n offset={offset}\n onSelect={this.handleSelect}\n onViewportChange={this.handleViewportChange}\n />\n </div>\n )}\n {!isLoading && itemCount === 0 && (\n <div className=\"iris-grid-partition-selector-search-empty\">\n No results\n </div>\n )}\n {isLoading && (\n <div className=\"iris-grid-partition-selector-loading\">\n <LoadingSpinner />\n Loading...\n </div>\n )}\n </div>\n );\n }\n}\n\nexport default PartitionSelectorSearch;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,QAAP,MAAqB,iBAArB;AACA,OAAOC,EAAP,MAA0B,uBAA1B;AACA,SAASC,QAAT,EAAmBC,cAAnB,QAAyC,uBAAzC;AACA,OAAOC,GAAP,MAAgB,gBAAhB;AACA,SAASC,oBAAT,QAAqC,kBAArC;;AAIA,IAAMC,GAAG,GAAGF,GAAG,CAACG,MAAJ,CAAW,yBAAX,CAAZ;AACA,IAAMC,sBAAsB,GAAG,GAA/B;;AAqBA,MAAMC,uBAAN,SAAyCX,SAAzC,CAGE;EA8BkB,OAAXY,WAAW,CAACC,KAAD,EAAuB;IACvC,IAAI,EAAEA,KAAK,YAAYN,oBAAnB,CAAJ,EAA8C;MAC5CC,GAAG,CAACK,KAAJ,CAAUA,KAAV;IACD;EACF;;EAEDC,WAAW,CAACC,KAAD,EAAyC;IAClD,MAAMA,KAAN;;IADkD;;IAAA;;IAAA;;IAAA,8CA+K7Bb,QAAQ,CAAC,MAAY;MAC1C,KAAKc,YAAL;IACD,CAF8B,EAE5BN,sBAF4B,CA/KqB;;IAGlD,KAAKO,kBAAL,GAA0B,KAAKA,kBAAL,CAAwBC,IAAxB,CAA6B,IAA7B,CAA1B;IACA,KAAKC,gBAAL,GAAwB,KAAKA,gBAAL,CAAsBD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Ae,EAAE,GADG;EAEpBjC,QAAQ,EAAE,MAAYoD,SAFF;EAGpB/D,aAAa,EAAE,MAAY+D;AAHP,C;;gBANlB5F,uB,eAYe;EACjBqD,kBAAkB,EAAE/D,SAAS,CAACuG,IAAV,CAAeC,UADlB;EAEjBhD,KAAK,EAAExD,SAAS,CAACyG,KAAV,CAAgB;IACrBrB,gBAAgB,EAAEpF,SAAS,CAACuG,IAAV,CAAeC,UADZ;IAErBhB,mBAAmB,EAAExF,SAAS,CAACuG,IAAV,CAAeC,UAFf;IAGrBvC,OAAO,EAAEjE,SAAS,CAAC0G,OAAV,CACP1G,SAAS,CAACyG,KAAV,CAAgB;MACdjC,IAAI,EAAExE,SAAS,CAAC2G,MAAV,CAAiBH,UADT;MAEdjC,IAAI,EAAEvE,SAAS,CAAC2G,MAAV,CAAiBH,UAFT;MAGdb,MAAM,EAAE3F,SAAS,CAACuG,IAAV,CAAeC;IAHT,CAAhB,CADO,CAHY;IAUrB/C,IAAI,EAAEzD,SAAS,CAAC4G,MAAV,CAAiBJ,UAVF;IAWrBT,WAAW,EAAE/F,SAAS,CAACuG,IAAV,CAAeC,UAXP;IAYrBtB,WAAW,EAAElF,SAAS,CAACuG,IAAV,CAAeC;EAZP,CAAhB,EAaJA,UAfc;EAgBjBrB,eAAe,EAAEnF,SAAS,CAAC4G,MAhBV;EAiBjB1D,QAAQ,EAAElD,SAAS,CAACuG,IAjBH;EAkBjBhE,aAAa,EAAEvC,SAAS,CAACuG;AAlBR,C;;AAuTrB,eAAe7F,uBAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"PendingDataBottomBar.js","names":["React","useEffect","useMemo","useRef","useState","FontAwesomeIcon","vsPass","vsWarning","Button","LoadingSpinner","usePrevious","IrisGridBottomBar","HIDE_TIMEOUT","MAX_NUMBER_ROWS_SHOWN","PendingDataBottomBar","isSaving","onSave","onDiscard","discardTooltip","saveTooltip","error","pendingDataErrors","pendingDataMap","onEntering","onEntered","onExiting","onExited","isSuccessShown","setIsSuccessShown","wasSuccessShown","setWasSuccessShown","successTimeout","prevIsSaving","errorMessage","size","Array","from","keys","join","trim","showSuccessMessage","current","setTimeout","hideSuccessMessage","clearTimeout","cleanupTimeout","undefined","pendingRowCount","commitIcon"],"sources":["../src/PendingDataBottomBar.tsx"],"sourcesContent":["import React, { useEffect, useMemo, useRef, useState } from 'react';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { vsPass, vsWarning } from '@deephaven/icons';\nimport { Button, LoadingSpinner } from '@deephaven/components';\nimport { usePrevious } from '@deephaven/react-hooks';\nimport IrisGridBottomBar from './IrisGridBottomBar';\nimport './PendingDataBottomBar.scss';\nimport { PendingDataMap } from './CommonTypes';\n\nconst HIDE_TIMEOUT = 3000;\n\nconst MAX_NUMBER_ROWS_SHOWN = 5;\n\nexport type PendingDataBottomBarProps = {\n onSave: () => Promise<void>;\n onDiscard: () => Promise<void>;\n discardTooltip?: string;\n saveTooltip?: string;\n isSaving?: boolean;\n error?: string | null;\n pendingDataErrors: Map<number, Error[]>;\n pendingDataMap: PendingDataMap;\n onEntering?: () => void;\n onEntered?: () => void;\n onExiting?: () => void;\n onExited?: () => void;\n};\n\nexport const PendingDataBottomBar = ({\n isSaving = false,\n onSave,\n onDiscard,\n discardTooltip,\n saveTooltip,\n error,\n pendingDataErrors,\n pendingDataMap,\n onEntering,\n onEntered,\n onExiting,\n onExited,\n}: PendingDataBottomBarProps): JSX.Element => {\n const [isSuccessShown, setIsSuccessShown] = useState(false);\n const [wasSuccessShown, setWasSuccessShown] = useState(false);\n const successTimeout = useRef<ReturnType<typeof setTimeout>>();\n const prevIsSaving = usePrevious(isSaving);\n const errorMessage = useMemo(() => {\n if (pendingDataErrors.size === 0) {\n return error;\n }\n if (pendingDataErrors.size <= MAX_NUMBER_ROWS_SHOWN) {\n return `Key can't be empty (on pending row${\n pendingDataErrors.size > 1 ? 's' : ''\n } ${Array.from(pendingDataErrors.keys()).join(', ').trim()})`;\n }\n return `Key can't be empty (on ${pendingDataErrors.size} rows)`;\n }, [error, pendingDataErrors]);\n\n useEffect(\n function showSuccessMessage() {\n if (prevIsSaving && !isSaving && errorMessage == null) {\n setIsSuccessShown(true);\n setWasSuccessShown(true);\n successTimeout.current = setTimeout(() => {\n setIsSuccessShown(false);\n }, HIDE_TIMEOUT);\n }\n },\n [errorMessage, isSaving, prevIsSaving]\n );\n\n useEffect(\n function hideSuccessMessage() {\n if (successTimeout.current && pendingDataMap.size > 0) {\n // A change just occurred while the success message was still being shown, just hide the success message\n clearTimeout(successTimeout.current);\n setIsSuccessShown(false);\n setWasSuccessShown(false);\n }\n },\n [pendingDataMap]\n );\n\n useEffect(function cleanupTimeout() {\n return () =>\n successTimeout.current ? clearTimeout(successTimeout.current) : undefined;\n }, []);\n\n const pendingRowCount = pendingDataMap.size;\n let commitIcon;\n if (isSaving) {\n commitIcon = <LoadingSpinner />;\n } else if (wasSuccessShown) {\n commitIcon = vsPass;\n }\n\n return (\n <IrisGridBottomBar\n className=\"pending-data-bottom-bar\"\n isShown={pendingRowCount > 0 || isSuccessShown || errorMessage != null}\n onEntering={onEntering}\n onEntered={onEntered}\n onExiting={onExiting}\n onExited={() => {\n setWasSuccessShown(false);\n if (onExited) {\n onExited();\n }\n }}\n >\n {errorMessage && (\n <div className=\"error-message\">\n <FontAwesomeIcon icon={vsWarning} />\n <span>{`${errorMessage}`}</span>\n </div>\n )}\n {!errorMessage && (\n <div className=\"status-message\">\n {pendingRowCount > 0 && (\n <span>{`${pendingRowCount} row${\n pendingRowCount > 1 ? 's' : ''\n } pending`}</span>\n )}\n </div>\n )}\n <div className=\"buttons-container\">\n {!isSaving && !wasSuccessShown && (\n <Button kind=\"secondary\" onClick={onDiscard} tooltip={discardTooltip}>\n Discard\n </Button>\n )}\n <Button\n kind={wasSuccessShown ? 'success' : 'primary'}\n onClick={onSave}\n icon={commitIcon}\n disabled={isSaving || wasSuccessShown || errorMessage != null}\n tooltip={saveTooltip}\n >\n {isSaving && `Committing...`}\n {!isSaving && wasSuccessShown && `Success`}\n {!isSaving && !wasSuccessShown && `Commit`}\n </Button>\n </div>\n </IrisGridBottomBar>\n );\n};\n\nexport default PendingDataBottomBar;\n"],"mappings":"AAAA,OAAOA,KAAP,IAAgBC,SAAhB,EAA2BC,OAA3B,EAAoCC,MAApC,EAA4CC,QAA5C,QAA4D,OAA5D;AACA,SAASC,eAAT,QAAgC,gCAAhC;AACA,SAASC,MAAT,EAAiBC,SAAjB,QAAkC,kBAAlC;AACA,SAASC,MAAT,EAAiBC,cAAjB,QAAuC,uBAAvC;AACA,SAASC,WAAT,QAA4B,wBAA5B;OACOC,iB;;AAIP,IAAMC,YAAY,GAAG,IAArB;AAEA,IAAMC,qBAAqB,GAAG,CAA9B;AAiBA,OAAO,IAAMC,oBAAoB,GAAG,QAaU;EAAA,IAbT;IACnCC,QAAQ,GAAG,KADwB;IAEnCC,MAFmC;IAGnCC,SAHmC;IAInCC,cAJmC;IAKnCC,WALmC;IAMnCC,KANmC;IAOnCC,iBAPmC;IAQnCC,cARmC;IASnCC,UATmC;IAUnCC,SAVmC;IAWnCC,SAXmC;IAYnCC,QAAQ,EAARA;EAZmC,CAaS;EAC5C,IAAM,CAACC,cAAD,EAAiBC,iBAAjB,IAAsCxB,QAAQ,CAAC,KAAD,CAApD;EACA,IAAM,CAACyB,eAAD,EAAkBC,kBAAlB,IAAwC1B,QAAQ,CAAC,KAAD,CAAtD;EACA,IAAM2B,cAAc,GAAG5B,MAAM,EAA7B;EACA,IAAM6B,YAAY,GAAGtB,WAAW,CAACK,QAAD,CAAhC;EACA,IAAMkB,YAAY,GAAG/B,OAAO,CAAC,MAAM;IACjC,IAAImB,iBAAiB,CAACa,IAAlB,KAA2B,CAA/B,EAAkC;MAChC,OAAOd,KAAP;IACD;;IACD,IAAIC,iBAAiB,CAACa,IAAlB,IAA0BrB,qBAA9B,EAAqD;MACnD,mDACEQ,iBAAiB,CAACa,IAAlB,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@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/TableViewportUpdater.tsx"],"names":["PureComponent","memoize","throttle","GridUtils","Log","log","module","UPDATE_THROTTLE","TableViewportUpdater","table","top","bottom","viewHeight","viewportTop","Math","max","ROW_BUFFER_PAGES","viewportBottom","left","right","movedColumns","viewWidth","viewportLeft","COLUMN_BUFFER_PAGES","viewportRight","min","columns","length","i","modelIndex","getModelIndex","push","viewColumns","error","debug2","props","getViewportRowRange","getViewportColumns","subscription","setViewport","onSubscription","componentDidMount","filters","sorts","customColumns","applyFilter","applySort","applyCustomColumns","updateViewport","componentDidUpdate","prevProps","isFilterChanged","isSortChanged","isCustomColumnsChanged","isTableChanged","closeSubscription","debug","componentWillUnmount","close","undefined","cancel","render"],"mappings":";;AAAA,SAASA,aAAT,QAA8B,OAA9B;AACA,OAAOC,OAAP,MAAoB,aAApB;AACA,OAAOC,QAAP,MAAqB,iBAArB;AACA,SAASC,SAAT,QAAyC,iBAAzC;AAQA,OAAOC,GAAP,MAAgB,gBAAhB;AAGA,IAAMC,GAAG,GAAGD,GAAG,CAACE,MAAJ,CAAW,sBAAX,CAAZ;AAEA,IAAMC,eAAe,GAAG,GAAxB;AAEA;AACA;AACA;AACA;;AAgBA,MAAMC,oBAAN,SAAmCR,aAAnC,CAGE;AAAA;AAAA;;AAAA;;AAAA,iDAuFsBC,OAAO,CAAC,CAACQ,KAAD,EAAQC,GAAR,EAAaC,MAAb,KAAwB;AACpD,UAAMC,UAAU,GAAGD,MAAM,GAAGD,GAA5B;AACA,UAAMG,WAAW,GAAGC,IAAI,CAACC,GAAL,CAClB,CADkB,EAElBL,GAAG,GAAGE,UAAU,GAAGJ,oBAAoB,CAACQ,gBAFtB,CAApB;AAIA,UAAMC,cAAc,GAClBN,MAAM,GAAGC,UAAU,GAAGJ,oBAAoB,CAACQ,gBAD7C;AAEA,aAAO,CAACH,WAAD,EAAcI,cAAd,CAAP;AACD,KAT4B,CAvF7B;;AAAA,gDAmGqBh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,aAAzB;AACD;;AAED,SAAKI,cAAL,CAAoBtC,GAApB,EAAyBC,MAAzB,EAAiCO,IAAjC,EAAuCC,KAAvC,EAA8CO,OAA9C;AACD;;AAED+B,EAAAA,oBAAoB,GAAS;AAC3B,SAAKF,iBAAL;AACD;;AA4CDA,EAAAA,iBAAiB,GAAS;AACxBlD,IAAAA,GAAG,CAAC6B,MAAJ,CAAW,mBAAX,EAAgC,KAAKI,YAArC;;AACA,QAAI,KAAKA,YAAT,EAAuB;AACrB,WAAKA,YAAL,CAAkBoB,KAAlB;AACA,WAAKpB,YAAL,GAAoBqB,SAApB;AAEA,UAAM;AAAEnB,QAAAA;AAAF,UAAqB,KAAKL,KAAhC;AACAK,MAAAA,cAAc;AACf;;AAED,SAAKQ,cAAL,CAAoBY,MAApB;AACD;;AAuDDC,EAAAA,MAAM,GAAS;AACb,WAAO,IAAP;AACD;;AAlMD;;gBAHIrD,oB,sBAKsB,C;;gBALtBA,oB,yBAOyB,C;;gBAPzBA,oB,kBASkB;AACpBE,EAAAA,GAAG,EAAE,CADe;AAEpBC,EAAAA,MAAM,EAAE,CAFY;AAGpBO,EAAAA,IAAI,EAAE,IAHc;AAIpBC,EAAAA,KAAK,EAAE,IAJa;AAKpBO,EAAAA,OAAO,EAAE,IALW;AAMpBc,EAAAA,cAAc,EAAE,MAAYmB,SANR;AAOpBjB,EAAAA,OAAO,EAAE,EAPW;AAQpBC,EAAAA,KAAK,EAAE,EARa;AASpBC,EAAAA,aAAa,EAAE,EATK;AAUpBxB,EAAAA,YAAY,EAAE;AAVM,C;;AA+LxB,eAAeZ,oBAAf","sourcesContent":["import { PureComponent } from 'react';\nimport memoize from 'memoize-one';\nimport throttle from 'lodash.throttle';\nimport { GridUtils, MoveOperation } from '@deephaven/grid';\nimport {\n Column,\n FilterCondition,\n Sort,\n Table,\n TableViewportSubscription,\n} from '@deephaven/jsapi-shim';\nimport Log from '@deephaven/log';\nimport { ColumnName } from './CommonTypes';\n\nconst log = Log.module('TableViewportUpdater');\n\nconst UPDATE_THROTTLE = 150;\n\n/**\n * Updates the viewport for an Iris table, for use in a scroll pane.\n * Automatically throttles the viewport requests and buffers above and below.\n */\n\ninterface TableViewportUpdaterProps {\n table: Table;\n top: number;\n bottom: number;\n left: number;\n right: number;\n columns: Column[];\n filters: FilterCondition[];\n sorts: Sort[];\n customColumns: ColumnName[];\n movedColumns: MoveOperation[];\n onSubscription: (subscription?: TableViewportSubscription) => void;\n}\n\nclass TableViewportUpdater extends PureComponent<\n TableViewportUpdaterProps,\n Record<string, never>\n> {\n // Number of pages to buffer for rows/columns\n static ROW_BUFFER_PAGES = 3;\n\n static COLUMN_BUFFER_PAGES = 1;\n\n static defaultProps = {\n top: 0,\n bottom: 0,\n left: null,\n right: null,\n columns: null,\n onSubscription: (): void => undefined,\n filters: [],\n sorts: [],\n customColumns: [],\n movedColumns: [],\n };\n\n componentDidMount(): void {\n const {\n top,\n bottom,\n left,\n right,\n table,\n filters,\n sorts,\n columns,\n customColumns,\n } = this.props;\n table.applyFilter(filters);\n table.applySort(sorts);\n table.applyCustomColumns(customColumns);\n this.updateViewport(top, bottom, left, right, columns);\n }\n\n componentDidUpdate(prevProps: TableViewportUpdaterProps): void {\n const {\n top,\n bottom,\n left,\n right,\n table,\n filters,\n sorts,\n customColumns,\n columns,\n } = this.props;\n const isFilterChanged = filters !== prevProps.filters;\n const isSortChanged = sorts !== prevProps.sorts;\n const isCustomColumnsChanged = customColumns !== prevProps.customColumns;\n const isTableChanged = table !== prevProps.table;\n if (\n isFilterChanged ||\n isSortChanged ||\n isCustomColumnsChanged ||\n isTableChanged\n ) {\n this.closeSubscription();\n }\n\n if (isFilterChanged || isTableChanged) {\n log.debug('update table filter', filters);\n table.applyFilter(filters);\n }\n\n if (isSortChanged || isTableChanged) {\n log.debug('update table sort', sorts);\n table.applySort(sorts);\n }\n\n if (isCustomColumnsChanged || isTableChanged) {\n log.debug('update table custom columns', customColumns);\n table.applyCustomColumns(customColumns);\n }\n\n this.updateViewport(top, bottom, left, right, columns);\n }\n\n componentWillUnmount(): void {\n this.closeSubscription();\n }\n\n subscription?: TableViewportSubscription;\n\n // eslint-disable-next-line class-methods-use-this\n getViewportRowRange = memoize((table, top, bottom) => {\n const viewHeight = bottom - top;\n const viewportTop = Math.max(\n 0,\n top - viewHeight * TableViewportUpdater.ROW_BUFFER_PAGES\n );\n const viewportBottom =\n bottom + viewHeight * TableViewportUpdater.ROW_BUFFER_PAGES;\n return [viewportTop, viewportBottom];\n });\n\n // eslint-disable-next-line class-methods-use-this\n getViewportColumns = memoize(\n (table, left, right, movedColumns: MoveOperation[]) => {\n if (left == null || right == null) {\n return null;\n }\n\n const viewWidth = right - left;\n const viewportLeft = Math.max(\n 0,\n left - viewWidth * TableViewportUpdater.COLUMN_BUFFER_PAGES\n );\n const viewportRight = Math.min(\n right + viewWidth * TableViewportUpdater.COLUMN_BUFFER_PAGES,\n table.columns.length - 1\n );\n\n // Need to get all the columns from the table model now\n const columns = [];\n for (let i = viewportLeft; i <= viewportRight; i += 1) {\n const modelIndex = GridUtils.getModelIndex(i, movedColumns);\n columns.push(table.columns[modelIndex]);\n }\n\n return columns;\n }\n );\n\n closeSubscription(): void {\n log.debug2('closeSubscription', this.subscription);\n if (this.subscription) {\n this.subscription.close();\n this.subscription = undefined;\n\n const { onSubscription } = this.props;\n onSubscription();\n }\n\n this.updateViewport.cancel();\n }\n\n updateViewport = throttle(\n (\n top: number,\n bottom: number,\n left: number,\n right: number,\n viewColumns: Column[]\n ): void => {\n if (bottom < top) {\n log.error('Invalid viewport', top, bottom);\n return;\n }\n\n if (top === 0 && bottom === 0) {\n log.debug2('Ignoring 0-0 viewport');\n return;\n }\n\n const { movedColumns, table } = this.props;\n const [viewportTop, viewportBottom] = this.getViewportRowRange(\n table,\n top,\n bottom\n );\n const columns =\n viewColumns ??\n this.getViewportColumns(table, left, right, movedColumns);\n log.debug2(\n 'Setting Viewport Top:',\n viewportTop,\n 'Bottom:',\n viewportBottom,\n 'Columns:',\n columns\n );\n if (this.subscription == null) {\n log.debug2('updateViewport creating new subscription');\n this.subscription = table.setViewport(\n viewportTop,\n viewportBottom,\n columns\n );\n\n const { onSubscription } = this.props;\n onSubscription(this.subscription);\n } else {\n log.debug2('updateViewport using existing subscription');\n this.subscription.setViewport(viewportTop, viewportBottom, columns);\n }\n },\n UPDATE_THROTTLE\n );\n\n render(): null {\n return null;\n }\n}\n\nexport default TableViewportUpdater;\n"],"file":"TableViewportUpdater.js"}
|
|
1
|
+
{"version":3,"file":"TableViewportUpdater.js","names":["PureComponent","memoize","throttle","GridUtils","Log","log","module","UPDATE_THROTTLE","TableViewportUpdater","table","top","bottom","viewHeight","viewportTop","Math","max","ROW_BUFFER_PAGES","viewportBottom","left","right","movedColumns","viewWidth","viewportLeft","COLUMN_BUFFER_PAGES","viewportRight","min","columns","length","i","modelIndex","getModelIndex","push","viewColumns","error","debug2","props","getViewportRowRange","getViewportColumns","subscription","setViewport","onSubscription","componentDidMount","filters","sorts","customColumns","applyFilter","applySort","applyCustomColumns","updateViewport","componentDidUpdate","prevProps","isFilterChanged","isSortChanged","isCustomColumnsChanged","isTableChanged","closeSubscription","debug","componentWillUnmount","close","undefined","cancel","render"],"sources":["../src/TableViewportUpdater.tsx"],"sourcesContent":["import { PureComponent } from 'react';\nimport memoize from 'memoize-one';\nimport throttle from 'lodash.throttle';\nimport { GridUtils, MoveOperation } from '@deephaven/grid';\nimport {\n Column,\n FilterCondition,\n Sort,\n Table,\n TableViewportSubscription,\n} from '@deephaven/jsapi-shim';\nimport Log from '@deephaven/log';\nimport { ColumnName } from './CommonTypes';\n\nconst log = Log.module('TableViewportUpdater');\n\nconst UPDATE_THROTTLE = 150;\n\n/**\n * Updates the viewport for an Iris table, for use in a scroll pane.\n * Automatically throttles the viewport requests and buffers above and below.\n */\n\ninterface TableViewportUpdaterProps {\n table: Table;\n top: number;\n bottom: number;\n left: number;\n right: number;\n columns: Column[];\n filters: FilterCondition[];\n sorts: Sort[];\n customColumns: ColumnName[];\n movedColumns: MoveOperation[];\n onSubscription: (subscription?: TableViewportSubscription) => void;\n}\n\nclass TableViewportUpdater extends PureComponent<\n TableViewportUpdaterProps,\n Record<string, never>\n> {\n // Number of pages to buffer for rows/columns\n static ROW_BUFFER_PAGES = 3;\n\n static COLUMN_BUFFER_PAGES = 1;\n\n static defaultProps = {\n top: 0,\n bottom: 0,\n left: null,\n right: null,\n columns: null,\n onSubscription: (): void => undefined,\n filters: [],\n sorts: [],\n customColumns: [],\n movedColumns: [],\n };\n\n componentDidMount(): void {\n const {\n top,\n bottom,\n left,\n right,\n table,\n filters,\n sorts,\n columns,\n customColumns,\n } = this.props;\n table.applyFilter(filters);\n table.applySort(sorts);\n table.applyCustomColumns(customColumns);\n this.updateViewport(top, bottom, left, right, columns);\n }\n\n componentDidUpdate(prevProps: TableViewportUpdaterProps): void {\n const {\n top,\n bottom,\n left,\n right,\n table,\n filters,\n sorts,\n customColumns,\n columns,\n } = this.props;\n const isFilterChanged = filters !== prevProps.filters;\n const isSortChanged = sorts !== prevProps.sorts;\n const isCustomColumnsChanged = customColumns !== prevProps.customColumns;\n const isTableChanged = table !== prevProps.table;\n if (\n isFilterChanged ||\n isSortChanged ||\n isCustomColumnsChanged ||\n isTableChanged\n ) {\n this.closeSubscription();\n }\n\n if (isFilterChanged || isTableChanged) {\n log.debug('update table filter', filters);\n table.applyFilter(filters);\n }\n\n if (isSortChanged || isTableChanged) {\n log.debug('update table sort', sorts);\n table.applySort(sorts);\n }\n\n if (isCustomColumnsChanged || isTableChanged) {\n log.debug('update table custom columns', customColumns);\n table.applyCustomColumns(customColumns);\n }\n\n this.updateViewport(top, bottom, left, right, columns);\n }\n\n componentWillUnmount(): void {\n this.closeSubscription();\n }\n\n subscription?: TableViewportSubscription;\n\n // eslint-disable-next-line class-methods-use-this\n getViewportRowRange = memoize((table, top, bottom) => {\n const viewHeight = bottom - top;\n const viewportTop = Math.max(\n 0,\n top - viewHeight * TableViewportUpdater.ROW_BUFFER_PAGES\n );\n const viewportBottom =\n bottom + viewHeight * TableViewportUpdater.ROW_BUFFER_PAGES;\n return [viewportTop, viewportBottom];\n });\n\n // eslint-disable-next-line class-methods-use-this\n getViewportColumns = memoize(\n (table, left, right, movedColumns: MoveOperation[]) => {\n if (left == null || right == null) {\n return null;\n }\n\n const viewWidth = right - left;\n const viewportLeft = Math.max(\n 0,\n left - viewWidth * TableViewportUpdater.COLUMN_BUFFER_PAGES\n );\n const viewportRight = Math.min(\n right + viewWidth * TableViewportUpdater.COLUMN_BUFFER_PAGES,\n table.columns.length - 1\n );\n\n // Need to get all the columns from the table model now\n const columns = [];\n for (let i = viewportLeft; i <= viewportRight; i += 1) {\n const modelIndex = GridUtils.getModelIndex(i, movedColumns);\n columns.push(table.columns[modelIndex]);\n }\n\n return columns;\n }\n );\n\n closeSubscription(): void {\n log.debug2('closeSubscription', this.subscription);\n if (this.subscription) {\n this.subscription.close();\n this.subscription = undefined;\n\n const { onSubscription } = this.props;\n onSubscription();\n }\n\n this.updateViewport.cancel();\n }\n\n updateViewport = throttle(\n (\n top: number,\n bottom: number,\n left: number,\n right: number,\n viewColumns: Column[]\n ): void => {\n if (bottom < top) {\n log.error('Invalid viewport', top, bottom);\n return;\n }\n\n if (top === 0 && bottom === 0) {\n log.debug2('Ignoring 0-0 viewport');\n return;\n }\n\n const { movedColumns, table } = this.props;\n const [viewportTop, viewportBottom] = this.getViewportRowRange(\n table,\n top,\n bottom\n );\n const columns =\n viewColumns ??\n this.getViewportColumns(table, left, right, movedColumns);\n log.debug2(\n 'Setting Viewport Top:',\n viewportTop,\n 'Bottom:',\n viewportBottom,\n 'Columns:',\n columns\n );\n if (this.subscription == null) {\n log.debug2('updateViewport creating new subscription');\n this.subscription = table.setViewport(\n viewportTop,\n viewportBottom,\n columns\n );\n\n const { onSubscription } = this.props;\n onSubscription(this.subscription);\n } else {\n log.debug2('updateViewport using existing subscription');\n this.subscription.setViewport(viewportTop, viewportBottom, columns);\n }\n },\n UPDATE_THROTTLE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AAE,IALW;EAMpBc,cAAc,EAAE,MAAYmB,SANR;EAOpBjB,OAAO,EAAE,EAPW;EAQpBC,KAAK,EAAE,EARa;EASpBC,aAAa,EAAE,EATK;EAUpBxB,YAAY,EAAE;AAVM,C;;AA+LxB,eAAeZ,oBAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"ToastBottomBar.js","names":["React","useCallback","useEffect","useRef","useState","usePrevious","IrisGridBottomBar","HIDE_TIMEOUT","ToastBottomBar","children","onEntering","onEntered","onExiting","onExited","isShown","setIsShown","timeout","prevChildren","startTimer","current","clearTimeout","setTimeout","undefined"],"sources":["../src/ToastBottomBar.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useRef, useState } from 'react';\nimport { usePrevious } from '@deephaven/react-hooks';\nimport IrisGridBottomBar from './IrisGridBottomBar';\nimport './PendingDataBottomBar.scss';\n\nconst HIDE_TIMEOUT = 3000;\n\nexport type ToastBottomBarProps = {\n children?: React.ReactNode;\n onEntering?: () => void;\n onEntered?: () => void;\n onExiting?: () => void;\n onExited?: () => void;\n};\n\nexport const ToastBottomBar = ({\n children = null,\n onEntering,\n onEntered,\n onExiting,\n onExited,\n}: ToastBottomBarProps): JSX.Element => {\n const [isShown, setIsShown] = useState(false);\n const timeout = useRef<ReturnType<typeof setTimeout>>();\n const prevChildren = usePrevious(children);\n\n const startTimer = useCallback(() => {\n setIsShown(true);\n if (timeout.current) {\n clearTimeout(timeout.current);\n }\n timeout.current = setTimeout(() => {\n setIsShown(false);\n }, HIDE_TIMEOUT);\n }, [setIsShown, timeout]);\n\n useEffect(() => {\n if (prevChildren !== children && children != null) {\n startTimer();\n }\n }, [children, prevChildren, setIsShown, startTimer]);\n\n useEffect(\n () => () => (timeout.current ? clearTimeout(timeout.current) : undefined),\n []\n );\n\n return (\n <IrisGridBottomBar\n className=\"toast-bottom-bar\"\n isShown={isShown}\n onEntering={onEntering}\n onEntered={onEntered}\n onExiting={onExiting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;EAKA,oBACE,oBAAC,iBAAD;IACE,SAAS,EAAC,kBADZ;IAEE,OAAO,EAAER,OAFX;IAGE,UAAU,EAAEJ,UAHd;IAIE,SAAS,EAAEC,SAJb;IAKE,SAAS,EAAEC,SALb;IAME,QAAQ,EAAEC;EANZ,GAQGJ,QARH,CADF;AAYD,CA5CM;AA8CP,eAAeD,cAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"TreeTableViewportUpdater.js","names":["PureComponent","throttle","dh","Log","log","module","UPDATE_THROTTLE","TreeTableViewportUpdater","constructor","props","top","bottom","error","debug2","table","updateInterval","viewSize","viewportTop","Math","max","viewportBottom","listenerCleanup","onViewportUpdate","addEventListener","TreeTable","EVENT_UPDATED","setViewport","undefined","updateViewport","bind","componentDidMount","filters","sorts","debug","applyFilter","applySort","componentDidUpdate","prevProps","componentWillUnmount","cancel","render","UPDATE_INTERVAL"],"sources":["../src/TreeTableViewportUpdater.tsx"],"sourcesContent":["import { PureComponent } from 'react';\nimport throttle from 'lodash.throttle';\nimport dh, {\n EventListener,\n FilterCondition,\n RemoverFn,\n Sort,\n Table,\n} from '@deephaven/jsapi-shim';\nimport Log from '@deephaven/log';\n\nconst log = Log.module('TreeTableViewportUpdater');\n\nconst UPDATE_THROTTLE = 150;\n\ninterface TreeTableViewportUpdaterProps {\n table: Table;\n top: number;\n bottom: number;\n filters: FilterCondition[];\n sorts: Sort[];\n updateInterval: number;\n onViewportUpdate: EventListener;\n}\n\n/**\n * Updates the viewport of a TreeTable for use in a scroll pane.\n * Automatically throttles the viewport requests and buffers above and below.\n */\nclass TreeTableViewportUpdater extends PureComponent<\n TreeTableViewportUpdaterProps,\n Record<string, never>\n> {\n static UPDATE_INTERVAL = 1000;\n\n static defaultProps = {\n top: 0,\n bottom: 0,\n onViewportUpdate: (): void => undefined,\n filters: [],\n sorts: [],\n updateInterval: TreeTableViewportUpdater.UPDATE_INTERVAL,\n };\n\n constructor(props: TreeTableViewportUpdaterProps) {\n super(props);\n this.updateViewport = this.updateViewport.bind(this);\n\n this.listenerCleanup = null;\n }\n\n componentDidMount(): void {\n const { top, bottom, table, filters, sorts } = this.props;\n log.debug('componentDidMount', this.props);\n table.applyFilter(filters);\n table.applySort(sorts);\n this.updateViewport(top, bottom);\n }\n\n componentDidUpdate(prevProps: TreeTableViewportUpdaterProps): void {\n const { top, bottom, table, filters, sorts } = this.props;\n if (filters !== prevProps.filters) {\n log.debug('update table filter', filters);\n table.applyFilter(filters);\n }\n\n if (sorts !== prevProps.sorts) {\n log.debug('update table sort', sorts);\n table.applySort(sorts);\n }\n\n this.updateViewport(top, bottom);\n }\n\n componentWillUnmount(): void {\n this.updateViewport.cancel();\n if (this.listenerCleanup) {\n this.listenerCleanup();\n }\n }\n\n listenerCleanup: RemoverFn | null;\n\n updateViewport = throttle((top: number, bottom: number): void => {\n if (bottom < top) {\n log.error('Invalid viewport', top, bottom);\n return;\n }\n\n if (top === 0 && bottom === 0) {\n log.debug2('Ignoring 0-0 viewport');\n return;\n }\n\n const { table, updateInterval } = this.props;\n const viewSize = bottom - top;\n const viewportTop = Math.max(0, top - viewSize * 3);\n const viewportBottom = bottom + viewSize * 3 + 1;\n log.debug2(\n 'Setting Viewport Top:',\n viewportTop,\n 'Bottom:',\n viewportBottom,\n table\n );\n\n if (!this.listenerCleanup) {\n const { onViewportUpdate } = this.props;\n this.listenerCleanup = table.addEventListener(\n dh.TreeTable.EVENT_UPDATED,\n onViewportUpdate\n );\n }\n\n table.setViewport(viewportTop, viewportBottom, undefined, updateInterval);\n }, UPDATE_THROTTLE);\n\n render(): null {\n return null;\n }\n}\n\nexport default TreeTableViewportUpdater;\n"],"mappings":";;AAAA,SAASA,aAAT,QAA8B,OAA9B;AACA,OAAOC,QAAP,MAAqB,iBAArB;AACA,OAAOC,EAAP,MAMO,uBANP;AAOA,OAAOC,GAAP,MAAgB,gBAAhB;AAEA,IAAMC,GAAG,GAAGD,GAAG,CAACE,MAAJ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OAAO,EAAE,EAJW;EAKpBC,KAAK,EAAE,EALa;EAMpBjB,cAAc,EAAER,wBAAwB,CAACkC;AANrB,C;;AAuFxB,eAAelC,wBAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"declaration.d.js","names":[],"sources":["../src/declaration.d.ts"],"sourcesContent":["declare module '*.module.scss' {\n const content: Record<string, string>;\n export default content;\n}\n\ndeclare module '*.scss';\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"CustomFormatAction.js","names":["React","Component","Tooltip","DOMUtils","CustomFormatAction","constructor","props","defaultProps","handleInputChange","bind","handleKeyDown","inputRef","createRef","onChange","current","value","closeContextMenu","forwardedProps","closeMenu","revertToDefault","returnFocusToContextMenu","parentContextMenu","getClosestByClassName","HTMLElement","focus","event","key","stopPropagation","render","formatString","placeholder","title","menuItem","description","iconElement","focusInput"],"sources":["../../src/format-context-menus/CustomFormatAction.tsx"],"sourcesContent":["import React, { Component } from 'react';\nimport { Tooltip } from '@deephaven/components';\nimport { DOMUtils } from '@deephaven/utils';\n\nimport './CustomFormatAction.scss';\n\ntype CustomFormatActionProps = typeof CustomFormatAction.defaultProps & {\n forwardedProps: {\n menuItem: {\n title?: string;\n description?: string;\n };\n };\n};\n\n/**\n * Renders menuElement option with custom format input for use in formatting context menus\n *\n * TODO:\n * - capture focus when this menu action is selected via ArrowUp/ArrowDown keys\n * - dynamically update selected menu item when clicking on the input box\n */\nclass CustomFormatAction extends Component<CustomFormatActionProps> {\n static defaultProps = {\n formatString: '',\n forwardedProps: {\n menuItem: {},\n closeMenu(focusInput: boolean): void {\n // no-op\n },\n iconElement: null,\n },\n placeholder: '',\n title: '',\n onChange(value: string | null): void {\n // no-op\n },\n };\n\n constructor(\n props: CustomFormatActionProps = CustomFormatAction.defaultProps\n ) {\n super(props);\n\n this.handleInputChange = this.handleInputChange.bind(this);\n this.handleKeyDown = this.handleKeyDown.bind(this);\n\n this.inputRef = React.createRef();\n }\n\n inputRef: React.RefObject<HTMLInputElement>;\n\n handleInputChange(): void {\n const { onChange } = this.props;\n if (this.inputRef.current) {\n onChange(this.inputRef.current.value);\n }\n }\n\n closeContextMenu(): void {\n const { forwardedProps } = this.props;\n const { closeMenu } = forwardedProps;\n closeMenu(true);\n }\n\n revertToDefault(): void {\n const { onChange } = this.props;\n onChange(null);\n }\n\n returnFocusToContextMenu(): void {\n const parentContextMenu = DOMUtils.getClosestByClassName(\n this.inputRef.current,\n 'context-menu-container'\n );\n if (parentContextMenu instanceof HTMLElement) {\n parentContextMenu.focus();\n }\n }\n\n handleKeyDown(event: React.KeyboardEvent<HTMLInputElement>): void {\n switch (event.key) {\n case 'Enter':\n event.stopPropagation();\n this.closeContextMenu();\n break;\n case 'Escape':\n event.stopPropagation();\n this.revertToDefault();\n this.closeContextMenu();\n break;\n case 'ArrowRight':\n case 'ArrowLeft':\n event.stopPropagation();\n break;\n case 'ArrowUp':\n case 'ArrowDown':\n this.returnFocusToContextMenu();\n break;\n default:\n event.stopPropagation();\n }\n }\n\n render(): JSX.Element {\n const { formatString, forwardedProps, placeholder, title } = this.props;\n const {\n menuItem: { description },\n iconElement,\n } = forwardedProps;\n return (\n <div className=\"form-group flex-grow mb-0\">\n <div className=\"custom-format-title\">\n <span className=\"icon\">{iconElement}</span>\n <label className=\"title mb-0\" htmlFor=\"custom-format-input\">\n {title}\n {description && <Tooltip>{description}</Tooltip>}\n </label>\n </div>\n <div className=\"pl-2 pr-2 pb-2\">\n <input\n id=\"custom-format-input\"\n className=\"form-control text-right mb-0\"\n type=\"text\"\n defaultValue={formatString}\n ref={this.inputRef}\n placeholder={placeholder}\n onKeyDown={this.handleKeyDown}\n onChange={this.handleInputChange}\n autoComplete=\"off\"\n autoCorrect=\"off\"\n autoCapitalize=\"off\"\n spellCheck=\"false\"\n />\n </div>\n </div>\n );\n }\n}\n\nexport default CustomFormatAction;\n"],"mappings":";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AEdd,SAAS,CAACiB,UAAD,EAA4B,CACnC;IACD,CAJa;;IAKdD,WAAW,EAAE;EALC,CAFI;EASpBJ,WAAW,EAAE,EATO;EAUpBC,KAAK,EAAE,EAVa;;EAWpBlB,QAAQ,CAACE,KAAD,EAA6B,CACnC;EACD;;AAbmB,C;;AAqHxB,eAAeX,kBAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"DateTimeFormatContextMenu.js","names":["DateTimeColumnFormatter","TableUtils","FormatContextMenuUtils","DateTimeFormatContextMenu","getOptions","formatter","selectedFormat","currentTime","Date","formatItems","group","dateGroup","formatString","timeGroup","dateTimeGroup","presetFormatOptions","map","item","format","makeFormat","TYPE_CONTEXT_PRESET","title","getFormattedString","dataType","DATETIME","makeOption","isSameFormat","defaultOption","isDefaultSelected"],"sources":["../../src/format-context-menus/DateTimeFormatContextMenu.ts"],"sourcesContent":["import {\n DateTimeColumnFormatter,\n Formatter,\n TableColumnFormat,\n TableUtils,\n} from '@deephaven/jsapi-utils';\nimport FormatContextMenuUtils, {\n FormatContextMenuOption,\n} from './FormatContextMenuUtils';\n\nclass DateTimeFormatContextMenu {\n static dateGroup = 10;\n\n static timeGroup = 20;\n\n static dateTimeGroup = 30;\n\n /**\n * Creates list of formatting options for DateTime context menu\n * @param formatter Formatter instance\n * @param selectedFormat Selected format object, null for no selected format\n * @returns Array of formatting options for the context menu\n */\n static getOptions(\n formatter: Formatter,\n selectedFormat: TableColumnFormat | null\n ): FormatContextMenuOption[] {\n const currentTime = new Date();\n const formatItems = [\n {\n group: DateTimeFormatContextMenu.dateGroup,\n formatString: 'yyyy-MM-dd',\n },\n {\n group: DateTimeFormatContextMenu.dateGroup,\n formatString: 'MM-dd-yyyy',\n },\n\n {\n group: DateTimeFormatContextMenu.timeGroup,\n formatString: 'HH:mm:ss',\n },\n {\n group: DateTimeFormatContextMenu.timeGroup,\n formatString: 'HH:mm:ss.SSS',\n },\n {\n group: DateTimeFormatContextMenu.timeGroup,\n formatString: 'HH:mm:ss.SSSSSSSSS',\n },\n\n {\n group: DateTimeFormatContextMenu.dateTimeGroup,\n formatString: `yyyy-MM-dd HH:mm:ss`,\n },\n {\n group: DateTimeFormatContextMenu.dateTimeGroup,\n formatString: `yyyy-MM-dd HH:mm:ss.SSS`,\n },\n {\n group: DateTimeFormatContextMenu.dateTimeGroup,\n formatString: `yyyy-MM-dd HH:mm:ss.SSSSSSSSS`,\n },\n ];\n\n const presetFormatOptions = formatItems.map(item => {\n const format = DateTimeColumnFormatter.makeFormat(\n '',\n item.formatString,\n DateTimeColumnFormatter.TYPE_CONTEXT_PRESET\n );\n const title = formatter.getFormattedString(\n currentTime,\n TableUtils.dataType.DATETIME,\n '',\n format\n );\n\n return FormatContextMenuUtils.makeOption(\n title,\n format,\n item.group,\n DateTimeColumnFormatter.isSameFormat(format, selectedFormat)\n );\n });\n\n const defaultOption = FormatContextMenuUtils.makeOption(\n 'Default',\n null,\n DateTimeFormatContextMenu.dateGroup,\n FormatContextMenuUtils.isDefaultSelected(selectedFormat)\n );\n\n return [defaultOption, ...presetFormatOptions];\n }\n}\n\nexport default DateTimeFormatContextMenu;\n"],"mappings":";;AAAA,SACEA,uBADF,EAIEC,UAJF,QAKO,wBALP;OAMOC,sB;;AAIP,MAAMC,yBAAN,CAAgC;EAO9B;AACF;AACA;AACA;AACA;AACA;EACmB,OAAVC,UAAU,CACfC,SADe,EAEfC,cAFe,EAGY;IAC3B,IAAMC,WAAW,GAAG,IAAIC,IAAJ,EAApB;IACA,IAAMC,WAAW,GAAG,CAClB;MACEC,KAAK,EAAEP,yBAAyB,CAACQ,SADnC;MAEEC,YAAY,EAAE;IAFhB,CADkB,EAKlB;MACEF,KAAK,EAAEP,yBAAyB,CAACQ,SADnC;MAEEC,YAAY,EAAE;IAFhB,CALkB,EAUlB;MACEF,KAAK,EAAEP,yBAAyB,CAACU,SADnC;MAEED,YAAY,EAAE;IAFhB,CAVkB,EAclB;MACEF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
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"DecimalFormatContextMenu.js","names":["DecimalColumnFormatter","FormatContextMenuUtils","DecimalFormatContextMenu","getOptions","selectedFormat","onCustomFormatChange","formatItems","format","FORMAT_PERCENT","group","presetGroup","FORMAT_BASIS_POINTS","FORMAT_MILLIONS","FORMAT_ROUND","presetRoundGroup","FORMAT_ROUND_TWO_DECIMALS","FORMAT_ROUND_FOUR_DECIMALS","defaultFormatOption","makeOption","defaultGroup","isDefaultSelected","presetFormatOptions","map","item","label","isSameFormat","isCustomSelected","customFormat","makeCustomFormat","customFormatOption","makeCustomFormatOption","customGroup","DEFAULT_FORMAT_STRING","formatString","newCustomFormat","isValid"],"sources":["../../src/format-context-menus/DecimalFormatContextMenu.ts"],"sourcesContent":["import {\n DecimalColumnFormat,\n DecimalColumnFormatter,\n} from '@deephaven/jsapi-utils';\nimport FormatContextMenuUtils, {\n FormatContextMenuOption,\n} from './FormatContextMenuUtils';\n\nclass DecimalFormatContextMenu {\n static defaultGroup = 10;\n\n static presetGroup = 20;\n\n static presetRoundGroup = 30;\n\n static customGroup = 40;\n\n /**\n * Creates list of formatting options for Decimal context menu\n * @param selectedFormat Selected format object, null for no selected format\n * @param onCustomFormatChange Callback to call when the custom format is changed\n * @returns Array of formatting options for the context menu\n */\n static getOptions(\n selectedFormat: DecimalColumnFormat,\n onCustomFormatChange: (value: DecimalColumnFormat | null) => void\n ): FormatContextMenuOption[] {\n const formatItems = [\n {\n format: DecimalColumnFormatter.FORMAT_PERCENT,\n group: DecimalFormatContextMenu.presetGroup,\n },\n {\n format: DecimalColumnFormatter.FORMAT_BASIS_POINTS,\n group: DecimalFormatContextMenu.presetGroup,\n },\n {\n format: DecimalColumnFormatter.FORMAT_MILLIONS,\n group: DecimalFormatContextMenu.presetGroup,\n },\n {\n format: DecimalColumnFormatter.FORMAT_ROUND,\n group: DecimalFormatContextMenu.presetRoundGroup,\n },\n {\n format: DecimalColumnFormatter.FORMAT_ROUND_TWO_DECIMALS,\n group: DecimalFormatContextMenu.presetRoundGroup,\n },\n {\n format: DecimalColumnFormatter.FORMAT_ROUND_FOUR_DECIMALS,\n group: DecimalFormatContextMenu.presetRoundGroup,\n },\n ];\n\n const defaultFormatOption = FormatContextMenuUtils.makeOption(\n 'Default',\n null,\n DecimalFormatContextMenu.defaultGroup,\n FormatContextMenuUtils.isDefaultSelected(selectedFormat)\n );\n\n const presetFormatOptions = formatItems.map(item =>\n FormatContextMenuUtils.makeOption(\n item.format.label,\n item.format,\n item.group,\n DecimalColumnFormatter.isSameFormat(item.format, selectedFormat)\n )\n );\n\n const isCustomSelected = FormatContextMenuUtils.isCustomSelected(\n selectedFormat\n );\n\n const customFormat = isCustomSelected\n ? selectedFormat\n : DecimalColumnFormatter.makeCustomFormat();\n\n const customFormatOption = FormatContextMenuUtils.makeCustomFormatOption(\n customFormat,\n DecimalFormatContextMenu.customGroup,\n DecimalColumnFormatter.DEFAULT_FORMAT_STRING,\n isCustomSelected,\n formatString => {\n if (formatString) {\n const newCustomFormat = DecimalColumnFormatter.makeCustomFormat(\n formatString\n );\n if (DecimalColumnFormatter.isValid(newCustomFormat)) {\n onCustomFormatChange(newCustomFormat);\n }\n } else {\n onCustomFormatChange(null);\n }\n }\n );\n\n return [defaultFormatOption, ...presetFormatOptions, customFormatOption];\n }\n}\n\nexport default DecimalFormatContextMenu;\n"],"mappings":";;AAAA,SAEEA,sBAFF,QAGO,wBAHP;OAIOC,sB;;AAIP,MAAMC,wBAAN,CAA+B;EAS7B;AACF;AACA;AACA;AACA;AACA;EACmB,OAAVC,UAAU,CACfC,cADe,EAEfC,oBAFe,EAGY;IAC3B,IAAMC,WAAW,GAAG,CAClB;MACEC,MAAM,EAAEP,sBAAsB,CAACQ,cADjC;MAEEC,KAAK,EAAEP,wBAAwB,CAACQ;IAFlC,CADkB,EAKlB;MACEH,MAAM,EAAEP,sBAAsB,CAACW,mBADjC;MAEEF,KAAK,EAAEP,w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AIA,YAAJ,EAAkB;QAChB,IAAMC,eAAe,GAAGlC,sBAAsB,CAAC4B,gBAAvB,CACtBK,YADsB,CAAxB;;QAGA,IAAIjC,sBAAsB,CAACmC,OAAvB,CAA+BD,eAA/B,CAAJ,EAAqD;UACnD7B,oBAAoB,CAAC6B,eAAD,CAApB;QACD;MACF,CAPD,MAOO;QACL7B,oBAAoB,CAAC,IAAD,CAApB;MACD;IACF,CAhBwB,CAA3B;IAmBA,OAAO,CAACY,mBAAD,EAAsB,GAAGI,mBAAzB,EAA8CQ,kBAA9C,CAAP;EACD;;AA1F4B;;gBAAzB3B,wB,kBACkB,E;;gBADlBA,wB,iBAGiB,E;;gBAHjBA,wB,sBAKsB,E;;gBALtBA,wB,iBAOiB,E;;AAsFvB,eAAeA,wBAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"FormatContextMenuUtils.js","names":["React","TableColumnFormatter","CustomFormatAction","FormatContextMenuUtils","isDefaultSelected","selectedFormat","TYPE_CONTEXT_CUSTOM","TYPE_CONTEXT_PRESET","includes","type","isCustomSelected","makeOption","title","format","group","isSelected","description","makeCustomFormatOption","placeholder","onChange","label","menuElement","formatString"],"sources":["../../src/format-context-menus/FormatContextMenuUtils.tsx"],"sourcesContent":["import React from 'react';\nimport {\n TableColumnFormat,\n TableColumnFormatter,\n} from '@deephaven/jsapi-utils';\nimport CustomFormatAction from './CustomFormatAction';\n\nexport interface FormatContextMenuOption {\n title: string;\n description: string;\n group: number;\n format: TableColumnFormat | null;\n isSelected: boolean;\n}\n\nexport interface CustomFormatOption extends FormatContextMenuOption {\n menuElement: React.ReactElement;\n}\n\nclass FormatContextMenuUtils {\n /**\n * Returns true if default option should be active in the context menu\n * @param selectedFormat selected format object or null\n */\n static isDefaultSelected(selectedFormat: TableColumnFormat | null): boolean {\n return (\n !selectedFormat ||\n ![\n TableColumnFormatter.TYPE_CONTEXT_CUSTOM,\n TableColumnFormatter.TYPE_CONTEXT_PRESET,\n ].includes(selectedFormat.type)\n );\n }\n\n /**\n * Returns true if custom format option should be active in the context menu\n * @param selectedFormat selected format object or null\n */\n static isCustomSelected(selectedFormat: TableColumnFormat): boolean {\n return (\n selectedFormat &&\n selectedFormat.type === TableColumnFormatter.TYPE_CONTEXT_CUSTOM\n );\n }\n\n /**\n * Creates context menu option\n * @param title Context menu title\n * @param format Format object\n * @param group Context menu group\n * @param isSelected Is current option selected\n */\n static makeOption(\n title: string,\n format: TableColumnFormat | null,\n group: number,\n isSelected: boolean\n ): FormatContextMenuOption {\n return {\n title,\n description: title,\n group,\n format,\n isSelected,\n };\n }\n\n /**\n * Creates context menu option with an input element\n * @param format Format object\n * @param group Context menu group\n * @param placeholder Input element placeholder\n * @param isSelected Is current option selected\n * @param onChange Input element onChange callback\n */\n static makeCustomFormatOption(\n format: TableColumnFormat,\n group: number,\n placeholder: string,\n isSelected: boolean,\n onChange: (value: string | null) => void\n ): CustomFormatOption {\n return {\n title: format.label,\n description: format.label,\n format,\n group,\n isSelected,\n menuElement: (\n <CustomFormatAction\n formatString={format.formatString}\n title={format.label}\n placeholder={placeholder}\n onChange={onChange}\n />\n ),\n };\n }\n}\n\nexport default FormatContextMenuUtils;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAEEC,oBAFF,QAGO,wBAHP;OAIOC,kB;;AAcP,MAAMC,sBAAN,CAA6B;EAC3B;AACF;AACA;AACA;EAC0B,OAAjBC,iBAAiB,CAACC,cAAD,EAAoD;IAC1E,OACE,CAACA,cAAD,IACA,CAAC,CACCJ,oBAAoB,CAACK,mBADtB,EAECL,oBAAoB,CAACM,mBAFtB,EAGCC,QAHD,CAGUH,cAAc,CAACI,IAHzB,CAFH;EAOD;EAED;AACF;AACA;AACA;;;EACyB,OAAhBC,gBAAgB,CAACL,cAAD,EAA6C;IAClE,OACEA,cAAc,IACdA,cAAc,CAACI,IAAf,KAAwBR,oBAAoB,CAACK,mBAF/C;EAID;EAED;AACF;AACA;AACA;AACA;AACA;AACA;;;EACmB,OAAVK,UAAU,CACfC,KADe,EAEfC,MAFe,EAGfC,KAHe,EAIfC,UAJe,EAKU;IACzB,OAAO;MACLH,KADK;MAELI,WAAW,EAAEJ,KAFR;MAGLE,KAHK;MAILD,MAJK;MAKLE;IALK,CAAP;EAOD;EAED;AACF;AACA;AACA;AACA;AACA;AACA;AACA;;;EAC+B,OAAtBE,sBAAsB,CAC3BJ,MAD2B,EAE3BC,KAF2B,EAG3BI,WAH2B,EAI3BH,UAJ2B,EAK3BI,QAL2B,EAMP;IACpB,OAAO;MACLP,KAAK,EAAEC,MAAM,CAACO,KADT;MAELJ,WAAW,EAAEH,MAAM,CAACO,KAFf;MAGLP,MAHK;MAILC,KAJK;MAKLC,UALK;MAMLM,WAAW,eACT,oBAAC,kBAAD;QACE,YAAY,EAAER,MAAM,CAACS,YADvB;QAEE,KAAK,EAAET,MAAM,CAACO,KAFhB;QAGE,WAAW,EAAEF,WAHf;QAIE,QAAQ,EAAEC;MAJZ;IAPG,CAAP;EAeD;;AA9E0B;;AAiF7B,eAAehB,sBAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"IntegerFormatContextMenu.js","names":["IntegerColumnFormatter","FormatContextMenuUtils","IntegerFormatContextMenu","getOptions","selectedFormat","onCustomFormatChange","formatItems","format","FORMAT_MILLIONS","group","presetGroup","defaultFormatOption","makeOption","defaultGroup","isDefaultSelected","presetFormatOptions","map","item","label","isSameFormat","isCustomSelected","customFormat","makeCustomFormat","customFormatOption","makeCustomFormatOption","customGroup","DEFAULT_FORMAT_STRING","formatString","newCustomFormat","isValid"],"sources":["../../src/format-context-menus/IntegerFormatContextMenu.ts"],"sourcesContent":["import {\n IntegerColumnFormat,\n IntegerColumnFormatter,\n} from '@deephaven/jsapi-utils';\nimport FormatContextMenuUtils, {\n FormatContextMenuOption,\n} from './FormatContextMenuUtils';\n\nclass IntegerFormatContextMenu {\n static defaultGroup = 10;\n\n static presetGroup = 20;\n\n static customGroup = 30;\n\n /**\n * Creates list of formatting options for Integer context menu\n * @param selectedFormat Selected format object, null for no selected format\n * @param onCustomFormatChange Callback to call when the custom format is changed\n * @returns Array of formatting options for the context menu\n */\n static getOptions(\n selectedFormat: IntegerColumnFormat,\n onCustomFormatChange: (value: IntegerColumnFormat | null) => void\n ): FormatContextMenuOption[] {\n const formatItems = [\n {\n format: IntegerColumnFormatter.FORMAT_MILLIONS,\n group: IntegerFormatContextMenu.presetGroup,\n },\n ];\n\n const defaultFormatOption = FormatContextMenuUtils.makeOption(\n 'Default',\n null,\n IntegerFormatContextMenu.defaultGroup,\n FormatContextMenuUtils.isDefaultSelected(selectedFormat)\n );\n\n const presetFormatOptions = formatItems.map(item =>\n FormatContextMenuUtils.makeOption(\n item.format.label,\n item.format,\n item.group,\n IntegerColumnFormatter.isSameFormat(item.format, selectedFormat)\n )\n );\n\n const isCustomSelected = FormatContextMenuUtils.isCustomSelected(\n selectedFormat\n );\n\n const customFormat = isCustomSelected\n ? selectedFormat\n : IntegerColumnFormatter.makeCustomFormat();\n\n const customFormatOption = FormatContextMenuUtils.makeCustomFormatOption(\n customFormat,\n IntegerFormatContextMenu.customGroup,\n IntegerColumnFormatter.DEFAULT_FORMAT_STRING,\n isCustomSelected,\n formatString => {\n if (formatString) {\n const newCustomFormat = IntegerColumnFormatter.makeCustomFormat(\n formatString\n );\n if (IntegerColumnFormatter.isValid(newCustomFormat)) {\n onCustomFormatChange(newCustomFormat);\n }\n } else {\n onCustomFormatChange(null);\n }\n }\n );\n\n return [defaultFormatOption, ...presetFormatOptions, customFormatOption];\n }\n}\n\nexport default IntegerFormatContextMenu;\n"],"mappings":";;AAAA,SAEEA,sBAFF,QAGO,wBAHP;OAIOC,sB;;AAIP,MAAMC,wBAAN,CAA+B;EAO7B;AACF;AACA;AACA;AACA;AACA;EACmB,OAAVC,UAAU,CACfC,cADe,EAEfC,oBAFe,EAGY;IAC3B,IAA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EAA8CQ,kBAA9C,CAAP;EACD;;AApE4B;;gBAAzBrB,wB,kBACkB,E;;gBADlBA,wB,iBAGiB,E;;gBAHjBA,wB,iBAKiB,E;;AAkEvB,eAAeA,wBAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","names":["default","DateTimeFormatContextMenu","DecimalFormatContextMenu","IntegerFormatContextMenu"],"sources":["../../src/format-context-menus/index.ts"],"sourcesContent":["export { default as DateTimeFormatContextMenu } from './DateTimeFormatContextMenu';\nexport { default as DecimalFormatContextMenu } from './DecimalFormatContextMenu';\nexport { default as IntegerFormatContextMenu } from './IntegerFormatContextMenu';\n"],"mappings":"SAASA,OAAO,IAAIC,yB;SACXD,OAAO,IAAIE,wB;SACXF,OAAO,IAAIG,wB"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","names":["default","IrisGrid","SHORTCUTS","IrisGridModel","IrisGridTableModel","IrisGridTreeTableModel","IrisGridTableModelTemplate","IrisGridModelFactory","IrisGridTheme","IrisGridTestUtils","IrisGridUtils"],"sources":["../src/index.ts"],"sourcesContent":["export * from './sidebar';\nexport * from './AdvancedFilterCreator';\nexport * from './CommonTypes';\nexport { default as IrisGrid } from './IrisGrid';\nexport * from './IrisGrid';\nexport { default as SHORTCUTS } from './IrisGridShortcuts';\nexport { default as IrisGridModel } from './IrisGridModel';\nexport { default as IrisGridTableModel } from './IrisGridTableModel';\nexport * from './IrisGridTableModel';\nexport { default as IrisGridTreeTableModel } from './IrisGridTreeTableModel';\nexport { default as IrisGridTableModelTemplate } from './IrisGridTableModelTemplate';\nexport * from './IrisGridTableModelTemplate';\nexport * from './IrisGridTreeTableModel';\nexport { default as IrisGridModelFactory } from './IrisGridModelFactory';\nexport { default as IrisGridTheme } from './IrisGridTheme';\nexport type { IrisGridThemeType } from './IrisGridTheme';\nexport { default as IrisGridTestUtils } from './IrisGridTestUtils';\nexport { default as IrisGridUtils } from './IrisGridUtils';\nexport * from './IrisGridUtils';\nexport { default } from './IrisGrid';\nexport * from './IrisGrid';\n"],"mappings":";;;SAGSA,OAAO,IAAIC,Q;;SAEXD,OAAO,IAAIE,S;SACXF,OAAO,IAAIG,a;SACXH,OAAO,IAAII,kB;;SAEXJ,OAAO,IAAIK,sB;SACXL,OAAO,IAAIM,0B;;;SAGXN,OAAO,IAAIO,oB;SACXP,OAAO,IAAIQ,a;SAEXR,OAAO,IAAIS,iB;SACXT,OAAO,IAAIU,a;;SAEXV,O"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"ClearFilterKeyHandler.js","names":["KeyHandler","IrisGridShortcuts","ClearFilterKeyHandler","constructor","irisGrid","onDown","event","TABLE","CLEAR_FILTERS","matchesEvent","clearAllFilters"],"sources":["../../src/key-handlers/ClearFilterKeyHandler.ts"],"sourcesContent":["import { KeyboardEvent } from 'react';\nimport { KeyHandler } from '@deephaven/grid';\nimport { IrisGrid } from '../IrisGrid';\nimport IrisGridShortcuts from '../IrisGridShortcuts';\n\nclass ClearFilterKeyHandler extends KeyHandler {\n private irisGrid: IrisGrid;\n\n constructor(irisGrid: IrisGrid) {\n super();\n\n this.irisGrid = irisGrid;\n }\n\n onDown(event: KeyboardEvent): boolean {\n if (IrisGridShortcuts.TABLE.CLEAR_FILTERS.matchesEvent(event)) {\n this.irisGrid.clearAllFilters();\n return true;\n }\n return false;\n }\n}\n\nexport default ClearFilterKeyHandler;\n"],"mappings":";;AACA,SAASA,UAAT,QAA2B,iBAA3B;OAEOC,iB;;AAEP,MAAMC,qBAAN,SAAoCF,UAApC,CAA+C;EAG7CG,WAAW,CAACC,QAAD,EAAqB;IAC9B;;IAD8B;;IAG9B,KAAKA,QAAL,GAAgBA,QAAhB;EACD;;EAEDC,MAAM,CAACC,KAAD,EAAgC;IACpC,IAAIL,iBAAiB,CAACM,KAAlB,CAAwBC,aAAxB,CAAsCC,YAAtC,CAAmDH,KAAnD,CAAJ,EAA+D;MAC7D,KAAKF,QAAL,CAAcM,eAAd;MACA,OAAO,IAAP;IACD;;IACD,OAAO,KAAP;EACD;;AAf4C;;AAkB/C,eAAeR,qBAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"CopyKeyHandler.js","names":["ContextActionUtils","KeyHandler","IrisGridUtils","CopyKeyHandler","constructor","irisGrid","onDown","event","selectedRanges","state","key","isModifierKeyDown","isValidSnapshotRanges","copyRanges"],"sources":["../../src/key-handlers/CopyKeyHandler.ts"],"sourcesContent":["/* eslint class-methods-use-this: \"off\" */\nimport { KeyboardEvent } from 'react';\nimport { ContextActionUtils } from '@deephaven/components';\nimport { KeyHandler } from '@deephaven/grid';\nimport { IrisGrid } from '../IrisGrid';\nimport IrisGridUtils from '../IrisGridUtils';\n\nclass CopyKeyHandler extends KeyHandler {\n private irisGrid: IrisGrid;\n\n constructor(irisGrid: IrisGrid) {\n super();\n\n this.irisGrid = irisGrid;\n }\n\n onDown(event: KeyboardEvent): boolean {\n const { selectedRanges } = this.irisGrid.state;\n if (event.key === 'c' && ContextActionUtils.isModifierKeyDown(event)) {\n if (IrisGridUtils.isValidSnapshotRanges(selectedRanges)) {\n this.irisGrid.copyRanges(selectedRanges);\n } else {\n this.irisGrid.copyRanges(\n selectedRanges,\n false,\n false,\n 'Invalid copy ranges'\n );\n }\n return true;\n }\n return false;\n }\n}\n\nexport default CopyKeyHandler;\n"],"mappings":";;AAAA;AAEA,SAASA,kBAAT,QAAmC,uBAAnC;AACA,SAASC,UAAT,QAA2B,iBAA3B;OAEOC,a;;AAEP,MAAMC,cAAN,SAA6BF,UAA7B,CAAwC;EAGtCG,WAAW,CAACC,QAAD,EAAqB;IAC9B;;IAD8B;;IAG9B,KAAKA,QAAL,GAAgBA,QAAhB;EACD;;EAEDC,MAAM,CAACC,KAAD,EAAgC;IACpC,IAAM;MAAEC;IAAF,IAAqB,KAAKH,QAAL,CAAcI,KAAzC;;IACA,IAAIF,KAAK,CAACG,GAAN,KAAc,GAAd,IAAqBV,kBAAkB,CAACW,iBAAnB,CAAqCJ,KAArC,CAAzB,EAAsE;MACpE,IAAIL,aAAa,CAACU,qBAAd,CAAoCJ,cAApC,CAAJ,EAAyD;QACvD,KAAKH,QAAL,CAAcQ,UAAd,CAAyBL,cAAzB;MACD,CAFD,MAEO;QACL,KAAKH,QAAL,CAAcQ,UAAd,CACEL,cADF,EAEE,KAFF,EAGE,KAHF,EAIE,qBAJF;MAMD;;MACD,OAAO,IAAP;IACD;;IACD,OAAO,KAAP;EACD;;AAzBqC;;AA4BxC,eAAeL,cAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"ReverseKeyHandler.js","names":["KeyHandler","TableUtils","IrisGridShortcuts","ReverseKeyHandler","constructor","irisGrid","onDown","event","TABLE","REVERSE","matchesEvent","isReversible","reverseType","state","REVERSE_TYPE","NONE","reverse","POST_SORT"],"sources":["../../src/key-handlers/ReverseKeyHandler.ts"],"sourcesContent":["import { KeyboardEvent } from 'react';\nimport { KeyHandler } from '@deephaven/grid';\nimport { TableUtils } from '@deephaven/jsapi-utils';\nimport { IrisGrid } from '../IrisGrid';\nimport IrisGridShortcuts from '../IrisGridShortcuts';\n\nclass ReverseKeyHandler extends KeyHandler {\n private irisGrid: IrisGrid;\n\n constructor(irisGrid: IrisGrid) {\n super();\n\n this.irisGrid = irisGrid;\n }\n\n onDown(event: KeyboardEvent): boolean {\n if (IrisGridShortcuts.TABLE.REVERSE.matchesEvent(event)) {\n if (!this.irisGrid.isReversible()) {\n return false;\n }\n const { reverseType } = this.irisGrid.state;\n if (reverseType === TableUtils.REVERSE_TYPE.NONE) {\n this.irisGrid.reverse(TableUtils.REVERSE_TYPE.POST_SORT);\n } else {\n this.irisGrid.reverse(TableUtils.REVERSE_TYPE.NONE);\n }\n return true;\n }\n return false;\n }\n}\n\nexport default ReverseKeyHandler;\n"],"mappings":";;AACA,SAASA,UAAT,QAA2B,iBAA3B;AACA,SAASC,UAAT,QAA2B,wBAA3B;OAEOC,iB;;AAEP,MAAMC,iBAAN,SAAgCH,UAAhC,CAA2C;EAGzCI,WAAW,CAACC,QAAD,EAAqB;IAC9B;;IAD8B;;IAG9B,KAAKA,QAAL,GAAgBA,QAAhB;EACD;;EAEDC,MAAM,CAACC,KAAD,EAAgC;IACpC,IAAIL,iBAAiB,CAACM,KAAlB,CAAwBC,OAAxB,CAAgCC,YAAhC,CAA6CH,KAA7C,CAAJ,EAAyD;MACvD,IAAI,CAAC,KAAKF,QAAL,CAAcM,YAAd,EAAL,EAAmC;QACjC,OAAO,KAAP;MACD;;MACD,IAAM;QAAEC;MAAF,IAAkB,KAAKP,QAAL,CAAcQ,KAAtC;;MACA,IAAID,WAAW,KAAKX,UAAU,CAACa,YAAX,CAAwBC,IAA5C,EAAkD;QAChD,KAAKV,QAAL,CAAcW,OAAd,CAAsBf,UAAU,CAACa,YAAX,CAAwBG,SAA9C;MACD,CAFD,MAEO;QACL,KAAKZ,QAAL,CAAcW,OAAd,CAAsBf,UAAU,CAACa,YAAX,CAAwBC,IAA9C;MACD;;MACD,OAAO,IAAP;IACD;;IACD,OAAO,KAAP;EACD;;AAvBwC;;AA0B3C,eAAeZ,iBAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","names":["default","CopyKeyHandler","ReverseKeyHandler","ClearFilterKeyHandler"],"sources":["../../src/key-handlers/index.ts"],"sourcesContent":["export { default as CopyKeyHandler } from './CopyKeyHandler';\nexport { default as ReverseKeyHandler } from './ReverseKeyHandler';\nexport { default as ClearFilterKeyHandler } from './ClearFilterKeyHandler';\n"],"mappings":"SAASA,OAAO,IAAIC,c;SACXD,OAAO,IAAIE,iB;SACXF,OAAO,IAAIG,qB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"IrisGridCellOverflowMouseHandler.js","names":["GridMouseHandler","deepEqual","IrisGridCellOverflowMouseHandler","constructor","irisGrid","destroyColumnTooltip","setState","overflowButtonTooltipProps","setCursor","point","isHoveringOverflowButton","cursor","stopPropagation","preventDefault","getButtonPosition","x","y","column","row","renderer","grid","state","props","metrics","model","canvasContext","context","theme","getTheme","rendererState","mouseX","mouseY","left","top","width","height","getCellOverflowButtonPosition","shouldRenderOverflowButton","onMove","newProps","onWheel","onDown","showOverflowModal","overflowText","getValueForCell","onContextMenu","onLeave"],"sources":["../../src/mousehandlers/IrisGridCellOverflowMouseHandler.ts"],"sourcesContent":["import {\n GridPoint,\n GridMouseHandler,\n EventHandlerResult,\n} from '@deephaven/grid';\nimport deepEqual from 'deep-equal';\nimport type IrisGrid from '../IrisGrid';\nimport { IrisGridRenderState } from '../IrisGridRenderer';\n\n/**\n * Handles cursor and click action for cell overflow button\n * The button is rendered via IrisGridRenderer\n */\nclass IrisGridCellOverflowMouseHandler extends GridMouseHandler {\n private irisGrid: IrisGrid;\n\n constructor(irisGrid: IrisGrid) {\n super(850); // Needs to be before GridSelectionMouseHandler\n\n this.irisGrid = irisGrid;\n }\n\n private destroyColumnTooltip(): void {\n this.irisGrid.setState({ overflowButtonTooltipProps: null });\n }\n\n private setCursor(point: GridPoint): EventHandlerResult {\n if (this.isHoveringOverflowButton(point)) {\n this.cursor = 'pointer';\n return { stopPropagation: false, preventDefault: false };\n }\n\n this.cursor = null;\n return false;\n }\n\n private getButtonPosition({\n x,\n y,\n column,\n row,\n }: GridPoint): {\n left: number;\n top: number;\n width: number;\n height: number;\n } | null {\n if (column == null || row == null) {\n return null;\n }\n const { renderer, grid, state, props } = this.irisGrid;\n if (!grid) {\n return null;\n }\n const { metrics } = state;\n const { model } = props;\n const { canvasContext: context } = grid || {};\n const theme = grid.getTheme();\n const rendererState = {\n context,\n mouseX: x,\n mouseY: y,\n metrics,\n model,\n theme,\n };\n\n const { left, top, width, height } = renderer.getCellOverflowButtonPosition(\n rendererState\n );\n if (left == null || width == null || top == null || height == null) {\n return null;\n }\n\n return { left, top, width, height };\n }\n\n private isHoveringOverflowButton(point: GridPoint): boolean {\n const { x, y } = point;\n const { left, top, width, height } = this.getButtonPosition(point) ?? {};\n if (left == null || width == null || top == null || height == null) {\n return false;\n }\n\n const { renderer, grid, state, props } = this.irisGrid;\n if (!grid) {\n return false;\n }\n const { metrics } = state;\n const { model } = props;\n const { canvasContext: context } = grid || {};\n const theme = grid.getTheme();\n const rendererState = {\n context,\n mouseX: x,\n mouseY: y,\n metrics,\n model,\n theme,\n } as IrisGridRenderState;\n\n return (\n renderer.shouldRenderOverflowButton(rendererState) &&\n x >= left &&\n x <= left + width &&\n y >= top &&\n y <= top + height\n );\n }\n\n onMove(point: GridPoint): EventHandlerResult {\n if (this.isHoveringOverflowButton(point)) {\n const { overflowButtonTooltipProps } = this.irisGrid.state;\n const newProps = this.getButtonPosition(point);\n if (!deepEqual(overflowButtonTooltipProps, newProps)) {\n this.irisGrid.setState({ overflowButtonTooltipProps: newProps });\n }\n } else {\n this.destroyColumnTooltip();\n }\n return this.setCursor(point);\n }\n\n onWheel(point: GridPoint): EventHandlerResult {\n this.destroyColumnTooltip();\n return this.onMove(point);\n }\n\n // Needs to be onDown and not onClick b/c of GridSelectionMouseHandler shifting cell onDown\n onDown(point: GridPoint): boolean {\n this.destroyColumnTooltip();\n const { column, row } = point;\n\n if (this.isHoveringOverflowButton(point)) {\n this.irisGrid.setState({\n showOverflowModal: true,\n overflowText: this.irisGrid.getValueForCell(column, row) as string,\n });\n }\n\n return false;\n }\n\n onContextMenu(): EventHandlerResult {\n this.destroyColumnTooltip();\n return false;\n }\n\n onLeave(): EventHandlerResult {\n this.destroyColumnTooltip();\n return false;\n }\n}\n\nexport default IrisGridCellOverflowMouseHandler;\n"],"mappings":";;AAAA,SAEEA,gBAFF,QAIO,iBAJP;AAKA,OAAOC,SAAP,MAAsB,YAAtB;;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AeH,gCAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"IrisGridColumnSelectMouseHandler.js","names":["GridMouseHandler","IrisGridColumnSelectMouseHandler","constructor","irisGrid","cursor","isActive","isSelectingColumn","props","isValidColumn","tableColumn","columnSelectionValidator","updateColumnSelectionStatus","getTableColumn","columnIndex","model","modelColumn","getModelColumn","columns","onMove","gridPoint","columnAllowedCursor","columnNotAllowedCursor","column","setState","hoverSelectColumn","onWheel","preventDefault","stopPropagation","onLeave","onDown","onClick","selectColumn"],"sources":["../../src/mousehandlers/IrisGridColumnSelectMouseHandler.ts"],"sourcesContent":["/* eslint class-methods-use-this: \"off\" */\nimport {\n GridMouseHandler,\n GridPoint,\n EventHandlerResult,\n} from '@deephaven/grid';\nimport type { Column } from '@deephaven/jsapi-shim';\nimport { IrisGrid } from '../IrisGrid';\n\n/**\n * Handles interaction with tables when the Linker tool is active\n */\nclass IrisGridColumnSelectMouseHandler extends GridMouseHandler {\n constructor(irisGrid: IrisGrid) {\n super();\n\n this.irisGrid = irisGrid;\n this.cursor = null;\n }\n\n private irisGrid: IrisGrid;\n\n private isActive(): boolean {\n const { isSelectingColumn } = this.irisGrid.props;\n return isSelectingColumn;\n }\n\n private isValidColumn(tableColumn: Column | null): boolean {\n if (tableColumn == null) {\n return false;\n }\n\n const { columnSelectionValidator } = this.irisGrid.props;\n if (columnSelectionValidator) {\n return columnSelectionValidator(tableColumn);\n }\n return true;\n }\n\n private updateColumnSelectionStatus(): void {\n const { columnSelectionValidator } = this.irisGrid.props;\n if (columnSelectionValidator) {\n columnSelectionValidator(null);\n }\n }\n\n private getTableColumn(columnIndex: number | null): Column | null {\n if (columnIndex == null) {\n return null;\n }\n\n const { model } = this.irisGrid.props;\n const modelColumn = this.irisGrid.getModelColumn(columnIndex);\n if (modelColumn == null) {\n return null;\n }\n\n return model.columns[modelColumn];\n }\n\n onMove(gridPoint: GridPoint): EventHandlerResult {\n if (!this.isActive()) {\n return false;\n }\n\n const { columnAllowedCursor, columnNotAllowedCursor } = this.irisGrid.props;\n const { column } = gridPoint;\n const tableColumn = this.getTableColumn(column);\n\n if (this.isValidColumn(tableColumn)) {\n this.cursor = columnAllowedCursor;\n this.irisGrid.setState({ hoverSelectColumn: column });\n } else {\n this.cursor = columnNotAllowedCursor;\n this.irisGrid.setState({ hoverSelectColumn: null });\n }\n\n return true;\n }\n\n // keeps linker cursor state during wheel event\n onWheel(gridPoint: GridPoint): EventHandlerResult {\n if (!this.isActive()) {\n return false;\n }\n\n const { columnAllowedCursor, columnNotAllowedCursor } = this.irisGrid.props;\n const { column } = gridPoint;\n const tableColumn = this.getTableColumn(column);\n\n if (this.isValidColumn(tableColumn)) {\n this.cursor = columnAllowedCursor;\n } else {\n this.cursor = columnNotAllowedCursor;\n }\n\n // don't block wheel event from scrolling\n return { preventDefault: false, stopPropagation: false };\n }\n\n onLeave(): EventHandlerResult {\n if (this.isActive()) {\n this.irisGrid.setState({ hoverSelectColumn: null });\n }\n\n this.updateColumnSelectionStatus();\n\n return false;\n }\n\n onDown(): EventHandlerResult {\n return this.isActive();\n }\n\n onClick(gridPoint: GridPoint): EventHandlerResult {\n if (!this.isActive()) {\n return false;\n }\n\n const { column } = gridPoint;\n const tableColumn = this.getTableColumn(column);\n if (tableColumn != null && this.isValidColumn(tableColumn)) {\n this.irisGrid.selectColumn(tableColumn);\n }\n\n return true;\n }\n}\n\nexport default IrisGridColumnSelectMouseHandler;\n"],"mappings":";;AAAA;AACA,SACEA,gBADF,QAIO,iBAJP;;AAQA;AACA;AACA;AACA,MAAMC,gCAAN,SAA+CD,gBAA/C,CAAgE;EAC9DE,WAAW,CAACC,QAAD,EAAqB;IAC9B;;IAD8B;;IAG9B,KAAKA,QAAL,GAAgBA,QAAhB;IACA,KAAKC,MAAL,GAAc,IAAd;EACD;;EAIOC,QAAQ,GAAY;IAC1B,IAAM;MAAEC;IAAF,IAAwB,KAAKH,QAAL,CAAcI,KAA5C;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